* feat: enhance WorkAccessToken to include AgentID for improved token management
- Added AgentID field to WorkAccessToken struct.
- Updated NewWorkAccessToken function to accept AgentID as a parameter.
- Modified access token cache key to incorporate AgentID, ensuring unique cache entries per agent.
This change improves the handling of access tokens in a multi-agent environment.
* refactor: enhance WorkAccessToken to improve cache key handling
- Updated the AgentID field in WorkAccessToken struct to clarify its optional nature for distinguishing applications.
- Modified the access token cache key construction to support both new and legacy formats based on the presence of AgentID.
- Added comments for better understanding of the cache key logic and its compatibility with historical versions.
This change improves the flexibility and clarity of access token management in multi-agent scenarios.
* feat(work): add JsSdk method for JavaScript SDK integration
- Introduced a new JsSdk method in the Work struct to facilitate the creation of a Js instance.
- This addition enhances the functionality of the Work module by enabling JavaScript SDK support.
This change improves the integration capabilities for developers working with the WeChat Work API.
* fix gofmt
* refactor(jsapi): simplify signature generation in GetConfig and GetAgentConfig methods
- Replaced the use of strconv to format the signature string with fmt.Sprintf for improved readability.
- Updated the signature generation logic in both GetConfig and GetAgentConfig methods to use a single formatted string.
This change enhances code clarity and maintains functionality in the signature generation process.
* fix gofmt
* fix gofmt
* fix gofmt
* fix gofmt
* refactor(js): correct initialization of Config in GetConfig method
- Removed redundant initialization of the Config variable and ensured it is instantiated correctly before use.
- This change improves code clarity and maintains the intended functionality of the GetConfig method.
* feat: enhance WorkAccessToken to include AgentID for improved token management
- Added AgentID field to WorkAccessToken struct.
- Updated NewWorkAccessToken function to accept AgentID as a parameter.
- Modified access token cache key to incorporate AgentID, ensuring unique cache entries per agent.
This change improves the handling of access tokens in a multi-agent environment.
* refactor: enhance WorkAccessToken to improve cache key handling
- Updated the AgentID field in WorkAccessToken struct to clarify its optional nature for distinguishing applications.
- Modified the access token cache key construction to support both new and legacy formats based on the presence of AgentID.
- Added comments for better understanding of the cache key logic and its compatibility with historical versions.
This change improves the flexibility and clarity of access token management in multi-agent scenarios.
* feat(work): add JsSdk method for JavaScript SDK integration
- Introduced a new JsSdk method in the Work struct to facilitate the creation of a Js instance.
- This addition enhances the functionality of the Work module by enabling JavaScript SDK support.
This change improves the integration capabilities for developers working with the WeChat Work API.
* fix gofmt
* feat: enhance WorkAccessToken to include AgentID for improved token management
- Added AgentID field to WorkAccessToken struct.
- Updated NewWorkAccessToken function to accept AgentID as a parameter.
- Modified access token cache key to incorporate AgentID, ensuring unique cache entries per agent.
This change improves the handling of access tokens in a multi-agent environment.
* refactor: enhance WorkAccessToken to improve cache key handling
- Updated the AgentID field in WorkAccessToken struct to clarify its optional nature for distinguishing applications.
- Modified the access token cache key construction to support both new and legacy formats based on the presence of AgentID.
- Added comments for better understanding of the cache key logic and its compatibility with historical versions.
This change improves the flexibility and clarity of access token management in multi-agent scenarios.
* feat: enhance WorkAccessToken with new constructor for AgentID support
- Introduced NewWorkAccessTokenWithAgentID function to maintain backward compatibility while allowing for AgentID usage.
- Updated NewWorkAccessToken to call the new constructor, ensuring seamless integration.
- Improved error handling in GetAccessTokenContext by checking for cache availability and handling potential errors during cache operations.
This change enhances the flexibility of access token management, particularly in multi-agent scenarios, while ensuring compatibility with existing implementations.
* feat(media): add getTempFile api
add getTempFile api
* feat(media): handle error in GetTempFile
handle error in GetTempFile
* feat(media): add UploadImgFromReader api
add UploadImgFromReader api
* fix(media): fixed not return common error
fixed not return common error
* feat(work): add department by id
Refactor the DepartmentList function and add the DepartmentListByID function.
* fix: api name
* fix: formatURL name
* chore: format
* feat(work): add UploadAttachment API
add UploadAttachment API
* feat(work): add UploadAttachment API
add UploadAttachment API
* feat(work): add UploadAttachment API
add UploadAttachment API
* feat: 添加query 以及query单元测试
feat: 添加模板字符串解析以及模板字符串单元测试
* improve: 序列化请求参数,使得参数更易读
* delete: delete useless module
* format: format code
* docs: add function comment
* docs: comment method
* fix: fixed type convert error
* feat: support any type
* feat: support other type
* format: format code
* test: check logger
* format: format code
* test: udpate testing case
* del: remove useless code
* del: remove useless module
* test: update testing case
* ✨ feat: support for unsigned integers
* ✨ feat: template string support any type