-
Notifications
You must be signed in to change notification settings - Fork 80
feat: Add some api #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add some api #108
Conversation
Change-Id: I389c6a1d9f3d3ee5915f1783edc08942d4c633f8
Change-Id: I6f1ccdb994ef25c975a985cc27736b36b8998451
WalkthroughThis update introduces comprehensive support for commerce benefits, connectors, and variable management in the Coze API Java client. It adds new API interfaces, service layers, and data models for benefit limitations, bill download tasks, connectors, and variables. The core Changes
Sequence Diagram(s)sequenceDiagram
participant ClientApp
participant CozeAPI
participant CommerceService
participant BenefitService
participant LimitationService
participant BillService
participant CommerceBenefitLimitationAPI
participant CommerceBenefitBillAPI
ClientApp->>CozeAPI: commerces()
CozeAPI->>CommerceService: return instance
ClientApp->>CommerceService: benefits()
CommerceService->>BenefitService: return instance
%% Create Benefit Limitation
ClientApp->>BenefitService: limitations().create(req)
BenefitService->>LimitationService: create(req)
LimitationService->>CommerceBenefitLimitationAPI: create(req)
CommerceBenefitLimitationAPI-->>LimitationService: BaseResponse<CreateBenefitLimitationResp>
LimitationService-->>BenefitService: CreateBenefitLimitationResp
BenefitService-->>ClientApp: CreateBenefitLimitationResp
%% List Bill Download Tasks
ClientApp->>BenefitService: bills().list(req)
BenefitService->>BillService: list(req)
BillService->>CommerceBenefitBillAPI: list(params)
CommerceBenefitBillAPI-->>BillService: BaseResponse<ListBillDownloadTaskResp>
BillService-->>BenefitService: PageResp<BillTaskInfo>
BenefitService-->>ClientApp: PageResp<BillTaskInfo>
sequenceDiagram
participant ClientApp
participant CozeAPI
participant VariablesService
participant VariablesAPI
ClientApp->>CozeAPI: variables()
CozeAPI->>VariablesService: return instance
%% Update Variable
ClientApp->>VariablesService: update(UpdateVariableReq)
VariablesService->>VariablesAPI: update(UpdateVariableReq, UpdateVariableReq)
VariablesAPI-->>VariablesService: BaseResponse<UpdateVariableResp>
VariablesService-->>ClientApp: UpdateVariableResp
%% Retrieve Variable
ClientApp->>VariablesService: retrieve(RetrieveVariableReq)
VariablesService->>VariablesAPI: retrieve(params)
VariablesAPI-->>VariablesService: BaseResponse<RetrieveVariableResp>
VariablesService-->>ClientApp: RetrieveVariableResp
sequenceDiagram
participant ClientApp
participant CozeAPI
participant ConnectorService
participant ConnectorAPI
ClientApp->>CozeAPI: connectors()
CozeAPI->>ConnectorService: return instance
ClientApp->>ConnectorService: install(InstallConnectorReq)
ConnectorService->>ConnectorAPI: install(connectorId, req, req)
ConnectorAPI-->>ConnectorService: BaseResponse<InstallConnectorResp>
ConnectorService-->>ClientApp: InstallConnectorResp
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 20
🧹 Nitpick comments (14)
api/src/main/java/com/coze/openapi/client/variables/model/VariableEntity.java (1)
10-26
: Add missing Jackson annotation for consistency.Consider adding
@JsonIgnoreProperties(ignoreUnknown = true)
annotation to maintain consistency with other model classes in the codebase and provide resilience against unknown JSON properties.Apply this diff:
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + @Data @Builder @NoArgsConstructor @AllArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) public class VariableEntity {api/src/main/java/com/coze/openapi/client/variables/RetrieveVariablesResp.java (1)
15-23
: Consider adding@JsonInclude
to keep payloads leanSerializing null fields increases payload size with no benefit. All other response DTOs appear to use
@JsonInclude(JsonInclude.Include.NON_NULL)
– worth adding here for consistency and smaller responses.@Data @SuperBuilder @NoArgsConstructor +@JsonInclude(JsonInclude.Include.NON_NULL) @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public class RetrieveVariablesResp extends BaseResp {
api/src/main/java/com/coze/openapi/service/service/commerce/CommerceService.java (2)
6-8
: Field name mis-represents its type
benefitAPI
actually holds aBenefitService
, not an API interface. Renaming tobenefitService
(or simplybenefits
) avoids confusion when reading code that already differentiates “API” vs “Service”.- private final BenefitService benefitAPI; + private final BenefitService benefitService;
9-16
: Expose immutable dependency or add getters only when needed
CommerceService
exposesBenefitService
via a trivial accessor. If no extra behaviour is planned here, consider inliningBenefitService
into the parent façade (or marking the fieldpublic final
) to remove an unnecessary layer.api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskResp.java (1)
20-28
: Optional: default empty list to avoid NPEsDownstream callers often iterate over
taskInfos
; returningnull
forces null-checks. Initialise withCollections.emptyList()
or annotate with@Builder.Default
to provide a safe default.api/src/main/java/com/coze/openapi/client/commerce/benefit/common/ActiveMode.java (1)
5-6
: Consider using a proper enum if only predefined values are expected.If this class will only have predefined constants like
ACTIVE_MODE_ABSOLUTE_TIME
, consider using a standard Java enum instead of this pattern.-public class ActiveMode { - public static final ActiveMode ACTIVE_MODE_ABSOLUTE_TIME = new ActiveMode("absolute_time"); +public enum ActiveMode { + ABSOLUTE_TIME("absolute_time"); + + private final String value; + + ActiveMode(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } +}api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskReq.java (1)
25-29
: Consider adding validation for pagination parameters.The pagination parameters (
pageNum
andpageSize
) should be validated to ensure they contain reasonable values. Consider adding validation annotations or validation logic in the service layer.@JsonProperty("page_num") + @Min(value = 1, message = "Page number must be greater than 0") private Integer pageNum; @JsonProperty("page_size") + @Min(value = 1, message = "Page size must be greater than 0") + @Max(value = 100, message = "Page size must not exceed 100") private Integer pageSize;Note: You'll need to add the appropriate validation dependency and import
javax.validation.constraints.*
.api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitStatus.java (1)
8-9
: Fix incorrect comment for BENEFIT_STATUS_FROZEN.The comment "The server is processing the conversation" doesn't match the frozen benefit status context and appears to be copied from elsewhere.
- /** The server is processing the conversation. */ + /** The benefit is frozen and not currently active. */ public static final BenefitStatus BENEFIT_STATUS_FROZEN = new BenefitStatus("frozen");api/src/main/java/com/coze/openapi/service/service/commerce/benefits/BenefitService.java (1)
6-24
: LGTM! Clean facade pattern implementation.The service facade correctly composes the limitation and bill services, providing a clean interface for benefit-related operations. The constructor and accessor methods are implemented correctly.
Consider renaming the fields to better reflect that they hold Service instances rather than API instances:
- private final LimitationService limitationAPI; - private final BillService billAPI; + private final LimitationService limitationService; + private final BillService billService;And update the constructor accordingly:
- this.limitationAPI = new LimitationService(limitationAPI); - this.billAPI = new BillService(billAPI); + this.limitationService = new LimitationService(limitationAPI); + this.billService = new BillService(billAPI);api/src/main/java/com/coze/openapi/client/connectors/bots/AuditReq.java (1)
22-23
: Fix field naming convention to follow Java standards.The fields
BotID
andConnectorID
should follow camelCase convention.Apply this diff to fix the naming:
- @JsonIgnore private String BotID; - @JsonIgnore private String ConnectorID; + @JsonIgnore private String botID; + @JsonIgnore private String connectorID;example/src/main/java/example/variables/VariableExample.java (1)
20-38
: Add error handling around API calls.The example should handle potential exceptions from API calls to demonstrate proper usage patterns.
Consider wrapping API calls with try-catch:
+ try { UpdateVariablesResp resp = coze.variables() .update( UpdateVariablesReq.builder() .connectorUID(uid) .botID(botID) .data( Collections.singletonList( VariableEntity.builder().keyword("key").value("value").build())) .build()); System.out.println(resp); RetrieveVariablesResp retrieveResp = coze.variables() .retrieve(RetrieveVariablesReq.builder().connectorUID(uid).botID(botID).build()); System.out.println(retrieveResp); + } catch (Exception e) { + System.err.println("API call failed: " + e.getMessage()); + e.printStackTrace(); + } finally { coze.shutdownExecutor(); + }example/src/main/java/example/commerce/benefit/bill/CrudExample.java (2)
40-40
: Fix variable naming convention.Variable name should follow camelCase convention.
- BillTaskInfo BillTaskInfo = liter.next(); + BillTaskInfo billTaskInfo = liter.next();And update the corresponding print statement:
- System.out.println(BillTaskInfo); + System.out.println(billTaskInfo);
49-50
: Consider using dynamic timestamps for better example flexibility.The hardcoded timestamps make this example less useful for demonstration purposes.
Consider using relative timestamps:
+ long now = System.currentTimeMillis() / 1000; + long startTime = now - (30 * 24 * 60 * 60); // 30 days ago + long endTime = now; CreateBillDownloadTaskReq req = - CreateBillDownloadTaskReq.builder().startedAt(1743004800).endedAt(1745424000).build(); + CreateBillDownloadTaskReq.builder().startedAt(startTime).endedAt(endTime).build();api/src/main/java/com/coze/openapi/service/service/variable/VariablesService.java (1)
12-16
: Fix field naming convention.Field name should follow camelCase convention.
- private final VariablesAPI VariablesAPI; + private final VariablesAPI variablesAPI; - public VariablesService(VariablesAPI VariablesAPI) { - this.VariablesAPI = VariablesAPI; + public VariablesService(VariablesAPI variablesAPI) { + this.variablesAPI = variablesAPI;Also update the method implementations:
return Utils.execute( - VariablesAPI.retrieve( + variablesAPI.retrieve( req.getAppID(), req.getBotID(), req.getConnectorID(), req.getConnectorUID(), keywords, req)) .getData(); - return Utils.execute(VariablesAPI.update(req, req)).getData(); + return Utils.execute(variablesAPI.update(req, req)).getData();
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (55)
api/src/main/java/com/coze/openapi/api/CommerceBenefitBillAPI.java
(1 hunks)api/src/main/java/com/coze/openapi/api/CommerceBenefitLimitationAPI.java
(1 hunks)api/src/main/java/com/coze/openapi/api/ConnectorAPI.java
(1 hunks)api/src/main/java/com/coze/openapi/api/ConnectorBotAPI.java
(1 hunks)api/src/main/java/com/coze/openapi/api/VariablesAPI.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/CreateBillDownloadTaskReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/CreateBillDownloadTaskResp.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskResp.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/model/BillTaskInfo.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/common/ActiveMode.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitEntityType.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitStatus.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitType.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/CreateBenefitLimitationReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/CreateBenefitLimitationResp.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/ListBenefitLimitationReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/ListBenefitLimitationResp.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/UpdateBenefitLimitationReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/UpdateBenefitLimitationResp.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/model/BenefitInfo.java
(1 hunks)api/src/main/java/com/coze/openapi/client/common/BaseReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/common/pagination/PageNumBasedPaginator.java
(1 hunks)api/src/main/java/com/coze/openapi/client/common/pagination/TokenBasedPaginator.java
(1 hunks)api/src/main/java/com/coze/openapi/client/connectors/InstallConnectorReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/connectors/InstallConnectorResp.java
(1 hunks)api/src/main/java/com/coze/openapi/client/connectors/bots/AuditReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/connectors/bots/AuditResp.java
(1 hunks)api/src/main/java/com/coze/openapi/client/connectors/bots/model/AuditStatus.java
(1 hunks)api/src/main/java/com/coze/openapi/client/variables/RetrieveVariablesReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/variables/RetrieveVariablesResp.java
(1 hunks)api/src/main/java/com/coze/openapi/client/variables/UpdateVariablesReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/variables/UpdateVariablesResp.java
(1 hunks)api/src/main/java/com/coze/openapi/client/variables/model/VariableEntity.java
(1 hunks)api/src/main/java/com/coze/openapi/client/websocket/event/EventType.java
(1 hunks)api/src/main/java/com/coze/openapi/client/websocket/event/downstream/ConversationAudioSentenceStartEvent.java
(1 hunks)api/src/main/java/com/coze/openapi/client/websocket/event/model/ChatUpdateEventData.java
(1 hunks)api/src/main/java/com/coze/openapi/client/websocket/event/model/TurnDetection.java
(0 hunks)api/src/main/java/com/coze/openapi/service/auth/JWTOAuth.java
(1 hunks)api/src/main/java/com/coze/openapi/service/auth/OAuthClient.java
(1 hunks)api/src/main/java/com/coze/openapi/service/service/AuthenticationInterceptor.java
(2 hunks)api/src/main/java/com/coze/openapi/service/service/CozeAPI.java
(8 hunks)api/src/main/java/com/coze/openapi/service/service/commerce/CommerceService.java
(1 hunks)api/src/main/java/com/coze/openapi/service/service/commerce/benefits/BenefitService.java
(1 hunks)api/src/main/java/com/coze/openapi/service/service/commerce/benefits/BillService.java
(1 hunks)api/src/main/java/com/coze/openapi/service/service/commerce/benefits/LimitationService.java
(1 hunks)api/src/main/java/com/coze/openapi/service/service/connector/ConnectorBotService.java
(1 hunks)api/src/main/java/com/coze/openapi/service/service/connector/ConnectorService.java
(1 hunks)api/src/main/java/com/coze/openapi/service/service/variable/VariablesService.java
(1 hunks)api/src/main/java/com/coze/openapi/service/service/websocket/chat/WebsocketsChatCallbackHandler.java
(1 hunks)api/src/main/java/com/coze/openapi/service/service/websocket/chat/WebsocketsChatClient.java
(1 hunks)example/src/main/java/example/commerce/benefit/bill/CrudExample.java
(1 hunks)example/src/main/java/example/commerce/benefit/limitations/CrudExample.java
(1 hunks)example/src/main/java/example/example_utils/Utils.java
(1 hunks)example/src/main/java/example/variables/VariableExample.java
(1 hunks)
💤 Files with no reviewable changes (1)
- api/src/main/java/com/coze/openapi/client/websocket/event/model/TurnDetection.java
🧰 Additional context used
🧬 Code Graph Analysis (17)
api/src/main/java/com/coze/openapi/service/service/websocket/chat/WebsocketsChatClient.java (1)
api/src/main/java/com/coze/openapi/client/websocket/event/EventType.java (1)
EventType
(3-94)
api/src/main/java/com/coze/openapi/service/service/commerce/CommerceService.java (1)
api/src/main/java/com/coze/openapi/service/service/commerce/benefits/BenefitService.java (1)
BenefitService
(6-24)
api/src/main/java/com/coze/openapi/client/connectors/bots/AuditResp.java (2)
api/src/main/java/com/coze/openapi/client/connectors/InstallConnectorResp.java (1)
Data
(12-18)api/src/main/java/com/coze/openapi/client/connectors/bots/AuditReq.java (1)
Data
(15-30)
api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskResp.java (4)
api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/model/BillTaskInfo.java (1)
BillTaskInfo
(5-10)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/CreateBillDownloadTaskResp.java (1)
Data
(13-21)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskReq.java (1)
Data
(15-30)api/src/main/java/com/coze/openapi/client/common/BaseReq.java (1)
Data
(9-17)
api/src/main/java/com/coze/openapi/service/service/connector/ConnectorService.java (2)
example/src/main/java/example/example_utils/Utils.java (1)
Utils
(12-61)api/src/main/java/com/coze/openapi/service/service/connector/ConnectorBotService.java (1)
ConnectorBotService
(8-20)
api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskReq.java (4)
api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskResp.java (1)
Data
(16-28)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/CreateBillDownloadTaskResp.java (1)
Data
(13-21)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/CreateBillDownloadTaskReq.java (1)
Data
(13-25)api/src/main/java/com/coze/openapi/client/common/BaseReq.java (1)
Data
(9-17)
api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/ListBenefitLimitationResp.java (1)
api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/model/BenefitInfo.java (1)
Data
(13-38)
example/src/main/java/example/example_utils/Utils.java (2)
api/src/main/java/com/coze/openapi/service/auth/JWTOAuthClient.java (1)
JWTOAuthClient
(17-177)api/src/main/java/com/coze/openapi/service/service/CozeAPI.java (1)
CozeAPI
(38-313)
api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/UpdateBenefitLimitationReq.java (4)
api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitStatus.java (1)
BenefitStatus
(5-21)api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/CreateBenefitLimitationReq.java (1)
Data
(15-30)api/src/main/java/com/coze/openapi/client/common/BaseReq.java (1)
Data
(9-17)api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/model/BenefitInfo.java (1)
Data
(13-38)
api/src/main/java/com/coze/openapi/service/service/variable/VariablesService.java (1)
example/src/main/java/example/example_utils/Utils.java (1)
Utils
(12-61)
example/src/main/java/example/commerce/benefit/bill/CrudExample.java (4)
api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/model/BillTaskInfo.java (1)
BillTaskInfo
(5-10)api/src/main/java/com/coze/openapi/service/auth/TokenAuth.java (1)
TokenAuth
(3-13)api/src/main/java/com/coze/openapi/service/service/CozeAPI.java (1)
CozeAPI
(38-313)example/src/main/java/example/commerce/benefit/limitations/CrudExample.java (1)
CrudExample
(17-91)
api/src/main/java/com/coze/openapi/client/variables/UpdateVariablesReq.java (1)
api/src/main/java/com/coze/openapi/client/common/BaseReq.java (1)
Data
(9-17)
api/src/main/java/com/coze/openapi/api/CommerceBenefitBillAPI.java (1)
api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/model/BillTaskInfo.java (1)
BillTaskInfo
(5-10)
example/src/main/java/example/commerce/benefit/limitations/CrudExample.java (5)
api/src/main/java/com/coze/openapi/client/commerce/benefit/common/ActiveMode.java (1)
ActiveMode
(5-18)api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitEntityType.java (1)
BenefitEntityType
(5-27)api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitType.java (1)
BenefitType
(5-18)api/src/main/java/com/coze/openapi/service/auth/TokenAuth.java (1)
TokenAuth
(3-13)api/src/main/java/com/coze/openapi/service/service/CozeAPI.java (1)
CozeAPI
(38-313)
api/src/main/java/com/coze/openapi/service/service/CozeAPI.java (3)
api/src/main/java/com/coze/openapi/service/service/commerce/CommerceService.java (1)
CommerceService
(6-17)api/src/main/java/com/coze/openapi/service/service/connector/ConnectorService.java (1)
ConnectorService
(9-26)api/src/main/java/com/coze/openapi/service/service/variable/VariablesService.java (1)
VariablesService
(10-38)
api/src/main/java/com/coze/openapi/service/service/commerce/benefits/LimitationService.java (1)
example/src/main/java/example/example_utils/Utils.java (1)
Utils
(12-61)
api/src/main/java/com/coze/openapi/service/service/commerce/benefits/BillService.java (2)
api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/model/BillTaskInfo.java (1)
BillTaskInfo
(5-10)example/src/main/java/example/example_utils/Utils.java (1)
Utils
(12-61)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: test (Java 17 on Windows)
- GitHub Check: test (Java 11 on Windows)
🔇 Additional comments (49)
api/src/main/java/com/coze/openapi/client/websocket/event/EventType.java (1)
92-93
: LGTM: Event type constant follows established patternThe new event type constant is correctly defined and follows the same naming convention and structure as other event types in the class.
api/src/main/java/com/coze/openapi/service/service/websocket/chat/WebsocketsChatClient.java (1)
189-193
: LGTM: Event handler follows established patternThe new event handler case is implemented consistently with all other event handlers in the switch statement, maintaining the same deserialization and callback invocation pattern.
api/src/main/java/com/coze/openapi/client/websocket/event/model/ChatUpdateEventData.java (1)
28-29
: AsrConfig field addition verifiedAll checks confirm that
AsrConfig
is defined in the same package asChatUpdateEventData
and no leftover references toTurnDetection.asrConfig
remain:• AsrConfig.java exists at
api/src/main/java/com/coze/openapi/client/websocket/event/model/AsrConfig.java
• Both classes share the packagecom.coze.openapi.client.websocket.event.model
, so no import is needed
• No occurrences ofTurnDetection.asrConfig
,getAsrConfig
, orsetAsrConfig
were found elsewhereNo further action required.
api/src/main/java/com/coze/openapi/service/service/websocket/chat/WebsocketsChatCallbackHandler.java (1)
83-85
: LGTM: Callback method follows established patternThe new callback method is implemented consistently with all other callback methods in the class, maintaining the same signature pattern and empty default implementation.
api/src/main/java/com/coze/openapi/client/websocket/event/downstream/ConversationAudioSentenceStartEvent.java (1)
10-34
: LGTM: Well-structured event class following best practicesThe event class is excellently implemented with:
- Proper inheritance from
BaseEvent
- Correct Lombok annotations including
callSuper = true
for equals/hashCode- Appropriate Jackson annotations for JSON mapping
- Consistent event type constant usage
- Clean nested
Data
class structureThe implementation follows established patterns and maintains consistency with other event classes in the system.
api/src/main/java/com/coze/openapi/client/common/BaseReq.java (1)
16-16
: LGTM! Clean implementation for per-request authentication.The addition of the
customerToken
field with@JsonIgnore
annotation is well-designed for request-level authentication overrides. The field properly follows encapsulation principles and integrates cleanly with the authentication interceptor.api/src/main/java/com/coze/openapi/client/common/pagination/TokenBasedPaginator.java (1)
32-32
: Good improvement to exception handling.Rethrowing the original exception directly preserves valuable debugging information and maintains the original exception type. This is better than wrapping in a generic RuntimeException and aligns with the similar change in PageNumBasedPaginator.
api/src/main/java/com/coze/openapi/client/common/pagination/PageNumBasedPaginator.java (1)
34-34
: Consistent exception handling improvement.This change mirrors the improvement in TokenBasedPaginator by preserving original exception details. The consistent approach across both paginator classes enhances debuggability and maintains clean exception propagation.
api/src/main/java/com/coze/openapi/service/auth/OAuthClient.java (1)
357-357
: Good optimization for connection management.The increased connection pool size (5→10) and extended keep-alive duration (1s→5min) are sensible optimizations that support the expanded API services. These settings should improve performance by reducing connection overhead while maintaining reasonable resource usage.
api/src/main/java/com/coze/openapi/service/auth/JWTOAuth.java (1)
59-61
: Excellent null safety improvement.Adding the null check for
ttl
prevents potential NullPointerExceptions and provides a sensible default behavior. This defensive programming approach enhances the robustness of token TTL handling.api/src/main/java/com/coze/openapi/client/connectors/bots/AuditResp.java (1)
12-18
: LGTM! Follows established response class patterns.The implementation correctly follows the established pattern for response classes in the codebase, with proper Lombok annotations and Jackson configuration. The empty class body is appropriate since audit responses typically don't require additional fields beyond those inherited from
BaseResp
.api/src/main/java/com/coze/openapi/client/connectors/InstallConnectorResp.java (1)
12-18
: LGTM! Consistent with established response class patterns.The implementation correctly follows the same pattern used throughout the codebase for response DTOs, with appropriate Lombok and Jackson annotations. The empty class body is standard for simple response types that only need the common fields from
BaseResp
.api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/CreateBillDownloadTaskReq.java (1)
13-25
: LGTM! Well-structured request class with proper timestamp handling.The implementation correctly:
- Uses proper Lombok annotations for boilerplate code generation
- Maps Java camelCase fields to JSON snake_case properties
- Uses
long
type for timestamp fields which is appropriate- Includes proper JSON serialization configuration
api/src/main/java/com/coze/openapi/client/connectors/InstallConnectorReq.java (1)
17-23
: Clarify whereconnectorID
is supplied
connectorID
is@JsonIgnore
, so the only place it can go is a path or query parameter. Ensure the Retrofit method actually passes this field (e.g.,@Path("connectorId") String connectorId
). If not, the install call will drop the connector identifier and 404.api/src/main/java/com/coze/openapi/client/variables/UpdateVariablesResp.java (1)
11-16
: LGTM! Proper implementation following established patterns.The class correctly uses Lombok annotations for inheritance scenarios with
@SuperBuilder
andcallSuper = true
in equality and toString methods. The empty body is appropriate for a marker response type.api/src/main/java/com/coze/openapi/api/ConnectorBotAPI.java (1)
11-19
: LGTM! Proper Retrofit API interface implementation.The interface correctly uses Retrofit annotations with proper HTTP method, path parameters, request body, and response type. The @tag parameter for BaseReq follows the established pattern for request metadata.
api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/CreateBenefitLimitationReq.java (1)
1-30
: LGTM! Well-structured request DTO class.The class follows Java best practices with proper Lombok annotations, Jackson JSON serialization configuration, and correct inheritance handling. The field naming and JSON property mapping are consistent with REST API conventions.
api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/UpdateBenefitLimitationResp.java (1)
1-16
: LGTM! Proper empty response class implementation.This follows the common pattern of extending BaseResp without additional fields. All annotations are correctly configured for inheritance and JSON serialization.
api/src/main/java/com/coze/openapi/service/service/AuthenticationInterceptor.java (1)
22-46
: LGTM! Enhanced authentication logic with customer token support.The implementation properly handles both customer tokens and fallback to default authentication. The logic flow is clear and maintains backward compatibility for requests without BaseReq tags or customer tokens.
api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/model/BenefitInfo.java (1)
1-38
: LGTM! Well-designed model class with appropriate field types.The class properly models benefit information with suitable data types, correct Lombok annotations, and consistent Jackson JSON property mapping. The use of enum types for structured fields enhances type safety.
api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitStatus.java (1)
5-21
: LGTM! Proper type-safe enum pattern implementation.The class correctly implements the type-safe enum pattern with appropriate use of
@JsonValue
for serialization. The constants are well-named and the overall structure is sound.api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/CreateBillDownloadTaskResp.java (1)
1-21
: LGTM! Clean and consistent response class implementation.The class follows established patterns with appropriate Lombok annotations and JSON serialization configuration. The structure is simple and correct for a response wrapper.
api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/ListBenefitLimitationResp.java (1)
16-31
: LGTM! Well-structured paginated response class.The class correctly implements pagination fields and uses appropriate JSON property mappings. The field types and annotations are all suitable for the intended purpose.
api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/CreateBenefitLimitationResp.java (1)
14-23
: LGTM! Consistent response class implementation.The class follows the established pattern with proper JSON property mapping and standard annotations. The implementation is clean and correct.
api/src/main/java/com/coze/openapi/api/ConnectorAPI.java (1)
11-18
: LGTM! Clean and well-structured API interface.The Retrofit interface follows best practices with proper annotations, clear parameter naming, and consistent return type patterns.
api/src/main/java/com/coze/openapi/client/connectors/bots/AuditReq.java (1)
15-30
: LGTM! Well-structured request class with proper annotations.The class correctly extends BaseReq, uses appropriate Lombok and Jackson annotations, and properly separates JSON-serialized fields from internal-only fields.
api/src/main/java/com/coze/openapi/client/variables/RetrieveVariablesReq.java (1)
13-34
: LGTM! Well-structured request class with proper field separation.The class correctly uses Lombok and Jackson annotations, and appropriately separates JSON-serialized fields from internal processing fields like
keywords
.example/src/main/java/example/variables/VariableExample.java (1)
14-39
: LGTM! Good example demonstrating the variables API usage.The example clearly demonstrates both update and retrieve operations for variables, and properly cleans up resources with
shutdownExecutor()
.api/src/main/java/com/coze/openapi/api/VariablesAPI.java (1)
12-27
: LGTM! Well-designed Retrofit API interface.The interface follows Retrofit conventions correctly with proper HTTP method annotations, content-type headers, and parameter mappings. The method signatures are consistent and provide good flexibility for variables management operations.
api/src/main/java/com/coze/openapi/service/service/connector/ConnectorService.java (1)
9-26
: LGTM! Well-structured service class following established patterns.The service correctly implements the wrapper pattern around the API interfaces, provides clean method signatures, and follows the established conventions for dependency injection and response handling.
api/src/main/java/com/coze/openapi/client/variables/UpdateVariablesReq.java (2)
12-35
: LGTM! Well-designed request class with proper Lombok usage.The class correctly extends
BaseReq
, uses appropriate Lombok annotations for inheritance, and provides proper JSON property mappings. The use of@NonNull
annotations enhances null safety.
24-26
: ConnectorID default “1024” is consistent across the codebaseWe’ve verified that the default value
"1024"
appears in both UpdateVariablesReq.java and RetrieveVariablesReq.java, is referenced in the WorkflowRunHistory documentation, and is used in example code (BotPublishExample). This matches the intended API behavior and requires no change.• api/src/main/java/com/coze/openapi/client/variables/UpdateVariablesReq.java
• api/src/main/java/com/coze/openapi/client/variables/RetrieveVariablesReq.java
• api/src/main/java/com/coze/openapi/client/workflows/run/model/WorkflowRunHistory.java
• example/src/main/java/example/bot/BotPublishExample.javaapi/src/main/java/com/coze/openapi/api/CommerceBenefitLimitationAPI.java (1)
21-42
: LGTM!The interface is well-structured with appropriate HTTP method annotations, consistent headers, and proper parameter handling. The method signatures follow Retrofit conventions correctly.
api/src/main/java/com/coze/openapi/service/service/commerce/benefits/LimitationService.java (4)
17-22
: LGTM! Clean implementation of create method.The create method correctly executes the API call, extracts the response data, sets the log ID, and returns the response object.
24-27
: LGTM! Proper implementation of update method.The update method correctly passes the benefit ID as a path parameter and builds the response with the log ID.
29-54
: LGTM! Well-structured pagination implementation.The list method properly:
- Sets a default page size of 20 when not provided
- Uses TokenBasedPaginator for token-based pagination
- Builds the PageResp with all necessary pagination metadata
The implementation follows good pagination practices.
56-92
: LGTM! Comprehensive page fetcher implementation.The getLimitationPageFetcher method:
- Properly handles enum value extraction for filtering parameters
- Passes all required parameters to the API call
- Correctly maps the API response to PageResponse
The null-safe enum value extraction is a good defensive programming practice.
api/src/main/java/com/coze/openapi/service/service/commerce/benefits/BillService.java (2)
20-26
: LGTM! Clean implementation of create method.The create method correctly executes the API call and builds the response with both the bill task info and log ID.
28-51
: LGTM! Well-structured pagination implementation.The list method properly uses PageNumBasedPaginator for number-based pagination and builds the PageResp with all necessary metadata.
example/src/main/java/example/commerce/benefit/limitations/CrudExample.java (4)
18-35
: LGTM! Clean API client initialization.The main method properly initializes the CozeAPI client with token authentication and demonstrates the list operation after a brief delay.
37-53
: LGTM! Good demonstration of pagination usage.The list method effectively demonstrates:
- Building a request with filtering and page size
- Using the pagination iterator
- Counting and displaying results
This is a clear example for users of the API.
78-83
: LGTM! Clean update method implementation.The update method demonstrates a straightforward update operation with proper parameter passing.
85-90
: LGTM! Secure random string generation.The generateRandomString method uses SecureRandom and URL-safe Base64 encoding, which is appropriate for generating secure random identifiers.
api/src/main/java/com/coze/openapi/service/service/CozeAPI.java (6)
16-16
: LGTM! Clean import additions for new services.The new imports for CommerceService, ConnectorService, and VariablesService are appropriately placed and organized.
Also applies to: 18-18, 23-23
53-55
: LGTM! Proper field declarations for new services.The new private final fields follow the established pattern and naming conventions of the class.
70-73
: LGTM! Constructor properly updated for new services.The constructor parameters and field assignments are correctly added, maintaining consistency with the existing pattern.
Also applies to: 87-89
132-142
: LGTM! Clean accessor methods for new services.The new public accessor methods follow the established naming pattern and provide appropriate access to the new service instances.
234-241
: LGTM! Proper service instantiation in build method.The new services are correctly instantiated with their required API dependencies and properly passed to the CozeAPI constructor.
Also applies to: 255-258
295-295
: Significant connection pool configuration change - verify performance impact.The connection pool configuration has been changed from 5 connections with 1-second keep-alive to 10 connections with 5-minute keep-alive. This is a substantial change that could impact:
- Memory usage (more persistent connections)
- Connection reuse efficiency (longer keep-alive)
- Concurrent request handling (more connections)
Please verify this change aligns with expected usage patterns and doesn't cause resource issues in production environments. Consider documenting the rationale for this change.
api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/model/BillTaskInfo.java
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/client/variables/model/VariableEntity.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitType.java
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/client/commerce/benefit/common/ActiveMode.java
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskReq.java
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitEntityType.java
Show resolved
Hide resolved
...ain/java/com/coze/openapi/client/commerce/benefit/limitation/UpdateBenefitLimitationReq.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/service/service/commerce/benefits/BillService.java
Outdated
Show resolved
Hide resolved
example/src/main/java/example/commerce/benefit/limitations/CrudExample.java
Show resolved
Hide resolved
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (2)
api/src/main/java/com/coze/openapi/client/commerce/benefit/common/ActiveMode.java (1)
8-26
: Past review suggestions have been successfully addressed.The class now properly implements the suggested improvements from the previous review:
- ✅ Null validation added to constructor
- ✅ equals(), hashCode(), and toString() methods provided via Lombok @DaTa
- ✅ Immutable design with final field
The implementation follows good practices for a type-safe enumeration pattern with proper JSON serialization support.
api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/model/BillTaskInfo.java (1)
12-22
: Great improvements! Consider adding the remaining annotations from previous feedback.The class implementation has been significantly improved since the previous review - all the critical issues have been addressed:
- ✅ Lombok annotations added for boilerplate code
- ✅ Jackson annotations added for JSON serialization
- ✅ Incomplete commented line removed
However, the previous review also suggested two additional annotations that could enhance robustness:
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import lombok.Builder; +@Builder @Data @NoArgsConstructor @AllArgsConstructor +@JsonIgnoreProperties(ignoreUnknown = true) @JsonInclude(JsonInclude.Include.NON_NULL) public class BillTaskInfo {
🧹 Nitpick comments (1)
api/src/main/java/com/coze/openapi/client/commerce/benefit/common/ActiveMode.java (1)
8-9
: Remove redundant @EqualsAndHashCode annotation.The
@EqualsAndHashCode
annotation is redundant since@Data
already includes equals() and hashCode() generation.@Data -@EqualsAndHashCode public class ActiveMode {
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
api/pom.xml
(1 hunks)api/src/main/java/com/coze/openapi/api/CommerceBenefitBillAPI.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/model/BillTaskInfo.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/common/ActiveMode.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitEntityType.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitType.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/UpdateBenefitLimitationReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/variables/model/VariableEntity.java
(1 hunks)api/src/main/java/com/coze/openapi/service/service/commerce/benefits/BillService.java
(1 hunks)example/pom.xml
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- example/pom.xml
- api/pom.xml
🚧 Files skipped from review as they are similar to previous changes (7)
- api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskReq.java
- api/src/main/java/com/coze/openapi/client/variables/model/VariableEntity.java
- api/src/main/java/com/coze/openapi/service/service/commerce/benefits/BillService.java
- api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitEntityType.java
- api/src/main/java/com/coze/openapi/api/CommerceBenefitBillAPI.java
- api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitType.java
- api/src/main/java/com/coze/openapi/client/commerce/benefit/limitation/UpdateBenefitLimitationReq.java
🧰 Additional context used
🧬 Code Graph Analysis (1)
api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/model/BillTaskInfo.java (5)
api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskReq.java (1)
Data
(12-28)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/CreateBillDownloadTaskResp.java (1)
Data
(13-21)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/ListBillDownloadTaskResp.java (1)
Data
(16-28)api/src/main/java/com/coze/openapi/client/commerce/benefit/bill/CreateBillDownloadTaskReq.java (1)
Data
(13-25)api/src/main/java/com/coze/openapi/client/common/BaseReq.java (1)
Data
(9-17)
🔇 Additional comments (1)
api/src/main/java/com/coze/openapi/client/commerce/benefit/common/ActiveMode.java (1)
15-20
: Constructor implementation looks good.The null validation in the constructor properly addresses the previous review feedback and prevents invalid state creation.
api/src/main/java/com/coze/openapi/api/CommerceBenefitBillAPI.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/api/CommerceBenefitBillAPI.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/api/CommerceBenefitLimitationAPI.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/api/CommerceBenefitLimitationAPI.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/client/variables/RetrieveVariablesReq.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/client/variables/RetrieveVariablesResp.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/client/variables/UpdateVariablesReq.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/client/variables/UpdateVariablesResp.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/client/variables/model/VariableEntity.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
♻️ Duplicate comments (2)
api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitEntityType.java (2)
29-43
: Previous feedback has been addressed - JSON deserialization support added.The @JsonCreator method has been properly implemented to handle JSON deserialization, addressing the previous bot review comment.
7-8
: Enterprise prefix added as requested.The enterprise prefix has been added to the JSON values as requested in previous reviews.
Also applies to: 10-11
🧹 Nitpick comments (2)
api/src/main/java/com/coze/openapi/client/variables/UpdateVariableReq.java (2)
24-26
: Consider extracting magic number to a constantThe default value "1024" for
connectorID
appears to be a magic number without context about what it represents.Consider defining this as a constant to improve maintainability:
+ public static final String DEFAULT_CONNECTOR_ID = "1024"; + @JsonProperty("connector_id") @Builder.Default - private String connectorID = "1024"; + private String connectorID = DEFAULT_CONNECTOR_ID;Alternatively, add a comment explaining what this value represents.
28-34
: Consider using validation annotations for better runtime validationThe
@NonNull
annotation from Lombok only provides compile-time null checks in generated constructors. For a request object that may be validated at runtime, consider using validation annotations.Consider adding validation annotations:
+import javax.validation.constraints.NotNull; +import javax.validation.constraints.NotEmpty; - @NonNull + @NotNull @JsonProperty("connector_uid") private String connectorUID; - @NonNull + @NotNull + @NotEmpty @JsonProperty("data") private List<VariableValue> data;This provides better integration with validation frameworks and clearer intent for API consumers.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (14)
api/pom.xml
(1 hunks)api/src/main/java/com/coze/openapi/api/VariablesAPI.java
(1 hunks)api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitEntityType.java
(1 hunks)api/src/main/java/com/coze/openapi/client/variables/RetrieveVariableReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/variables/RetrieveVariableResp.java
(1 hunks)api/src/main/java/com/coze/openapi/client/variables/UpdateVariableReq.java
(1 hunks)api/src/main/java/com/coze/openapi/client/variables/UpdateVariableResp.java
(1 hunks)api/src/main/java/com/coze/openapi/client/variables/model/VariableValue.java
(1 hunks)api/src/main/java/com/coze/openapi/service/service/CozeAPI.java
(8 hunks)api/src/main/java/com/coze/openapi/service/service/connector/ConnectorService.java
(1 hunks)api/src/main/java/com/coze/openapi/service/service/variable/VariablesService.java
(1 hunks)api/src/main/resources/version.properties
(1 hunks)example/pom.xml
(1 hunks)example/src/main/java/example/variables/VariableExample.java
(1 hunks)
✅ Files skipped from review due to trivial changes (6)
- api/src/main/resources/version.properties
- api/pom.xml
- api/src/main/java/com/coze/openapi/client/variables/RetrieveVariableResp.java
- api/src/main/java/com/coze/openapi/client/variables/UpdateVariableResp.java
- api/src/main/java/com/coze/openapi/client/variables/model/VariableValue.java
- api/src/main/java/com/coze/openapi/client/variables/RetrieveVariableReq.java
🚧 Files skipped from review as they are similar to previous changes (5)
- example/pom.xml
- example/src/main/java/example/variables/VariableExample.java
- api/src/main/java/com/coze/openapi/service/service/variable/VariablesService.java
- api/src/main/java/com/coze/openapi/api/VariablesAPI.java
- api/src/main/java/com/coze/openapi/service/service/CozeAPI.java
🧰 Additional context used
🧬 Code Graph Analysis (1)
api/src/main/java/com/coze/openapi/service/service/connector/ConnectorService.java (1)
example/src/main/java/example/example_utils/Utils.java (1)
Utils
(12-61)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: test (Java 17 on Windows)
- GitHub Check: test (Java 11 on Windows)
- GitHub Check: test (Java 8 on macOS)
🔇 Additional comments (3)
api/src/main/java/com/coze/openapi/client/variables/UpdateVariableReq.java (2)
1-11
: LGTM - Clean imports and package structureThe package structure and imports are well-organized and appropriate for the functionality.
12-17
: Well-structured Lombok annotations with proper inheritance handlingThe Lombok annotations are correctly configured for a class that extends
BaseReq
:
@SuperBuilder
is appropriate for inheritance scenarioscallSuper = true
for@EqualsAndHashCode
and@ToString
ensures proper inheritance behavior- The combination provides clean boilerplate code generation
api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitEntityType.java (1)
29-42
: LGTM - Well-implemented JSON deserialization logic.The @JsonCreator method correctly handles both predefined constants and unknown values by creating new instances when no match is found. This provides good flexibility for API evolution.
api/src/main/java/com/coze/openapi/client/commerce/benefit/common/BenefitEntityType.java
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/service/service/connector/ConnectorService.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/service/service/connector/ConnectorService.java
Outdated
Show resolved
Hide resolved
api/src/main/java/com/coze/openapi/service/service/connector/ConnectorService.java
Show resolved
Hide resolved
…at/apply_interface Change-Id: I0ad06788cf21f579071025593c4582b635196612
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@EqualsAndHashCode(callSuper = true) | ||
public class ListBenefitLimitationReq extends BaseReq { | ||
@JsonProperty("entity_id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entity_type
@AllArgsConstructor | ||
public static class Data { | ||
@JsonProperty("content") | ||
private String content; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text
No description provided.