From 306d4bedb81ce9195d17c2168d9fcab2c408383b Mon Sep 17 00:00:00 2001 From: "kang.zou" Date: Wed, 4 Jun 2025 15:38:32 +0800 Subject: [PATCH 1/5] fix.InviteBotJoinChat --- v2/service/view/builder.go | 20 ++ v2/service/workitem/api.go | 28 ++- v2/service/workitem/builder.go | 90 +++++++++ v2/service/workitem/model.go | 334 ++++++++++++++++++++++++++++++++- 4 files changed, 462 insertions(+), 10 deletions(-) diff --git a/v2/service/view/builder.go b/v2/service/view/builder.go index 41e2b9a..3bd9ede 100644 --- a/v2/service/view/builder.go +++ b/v2/service/view/builder.go @@ -221,6 +221,7 @@ type QueryWorkItemDetailsByViewIDReqBody struct { PageSize *int64 `json:"page_size,omitempty"` PageNum *int64 `json:"page_num,omitempty"` Expand *Expand `json:"expand,omitempty"` + QuickFilterID *string `json:"quick_filter_id,omitempty"` } type QueryWorkItemDetailsByViewIDResp struct { *core.APIResp `json:"-"` @@ -273,6 +274,12 @@ func (builder *QueryWorkItemDetailsByViewIDReqBuilder) Expand(expand *Expand) *Q builder.apiReq.Body.(*QueryWorkItemDetailsByViewIDReqBody).Expand = expand return builder } + +func (builder *QueryWorkItemDetailsByViewIDReqBuilder) QuickFilterID(quickFilterID string) *QueryWorkItemDetailsByViewIDReqBuilder { + builder.apiReq.Body.(*QueryWorkItemDetailsByViewIDReqBody).QuickFilterID = &quickFilterID + return builder +} + func (builder *QueryWorkItemDetailsByViewIDReqBuilder) Build() *QueryWorkItemDetailsByViewIDReq { req := &QueryWorkItemDetailsByViewIDReq{} req.apiReq = builder.apiReq @@ -466,6 +473,7 @@ type ViewListReqBody struct { PageSize *int64 `json:"page_size,omitempty"` PageNum *int64 `json:"page_num,omitempty"` ViewName *string `json:"view_name,omitempty"` + IsQueryQuickFilter *bool `json:"is_query_quick_filter,omitempty"` } type ViewListResp struct { *core.APIResp `json:"-"` @@ -535,6 +543,12 @@ func (builder *ViewListReqBuilder) ViewName(viewName string) *ViewListReqBuilder return builder } + +func (builder *ViewListReqBuilder) IsQueryQuickFilter(isQueryQuickFilter bool) *ViewListReqBuilder { + builder.apiReq.Body.(*ViewListReqBody).IsQueryQuickFilter = &isQueryQuickFilter + return builder +} + func (builder *ViewListReqBuilder) Build() *ViewListReq { req := &ViewListReq{} req.apiReq = builder.apiReq @@ -589,6 +603,12 @@ func (builder *WorkItemListReqBuilder) PageNum(pageNum int64) *WorkItemListReqBu return builder } + +func (builder *WorkItemListReqBuilder) QuickFilterID(quickFilterID string) *WorkItemListReqBuilder { + builder.apiReq.QueryParams.Set("quick_filter_id", fmt.Sprint(quickFilterID)) + return builder +} + func (builder *WorkItemListReqBuilder) Build() *WorkItemListReq { req := &WorkItemListReq{} req.apiReq = builder.apiReq diff --git a/v2/service/workitem/api.go b/v2/service/workitem/api.go index 6fda477..08dbe31 100644 --- a/v2/service/workitem/api.go +++ b/v2/service/workitem/api.go @@ -72,13 +72,15 @@ const APIPath_GetWorkItemManHourRecords = "/open_api/work_item/man_hour/records" const APIPath_GetWorkItemOpRecord = "/open_api/op_record/work_item/list" +const APIPath_GetWorkItemTransRequiredItem = "/open_api/work_item/transition_required_info/get" + const APIPath_GetWorkItemTypeInfoByKey = "/open_api/:project_key/work_item/type/:work_item_type_key" const APIPath_GetWorkItemsByIds = "/open_api/:project_key/work_item/:work_item_type_key/query" const APIPath_IntegrateSearch = "/open_api/view_search/integrate_search" -const APIPath_InviteBotJoinChat = "/open_api/:project_key/work_item/:work_item_type_key/bot_join_chat" +const APIPath_InviteBotJoinChat = "/open_api/:project_key/work_item/:work_item_id/bot_join_chat" const APIPath_ListTemplateConf = "/open_api/:project_key/template_list/:work_item_type_key" @@ -936,6 +938,30 @@ func (a *WorkItemService) GetWorkItemOpRecord(ctx context.Context, req *GetWorkI return resp, err } +/* + * @name: OAPIGetWorkItemTransRequiredItem + * @desc: 获取节点/状态流转所需的必填信息 + */ +func (a *WorkItemService) GetWorkItemTransRequiredItem(ctx context.Context, req *GetWorkItemTransRequiredItemReq, options ...core.RequestOptionFunc) (*GetWorkItemTransRequiredItemResp, error) { + // 发起请求 + apiReq := req.apiReq + apiReq.ApiPath = APIPath_GetWorkItemTransRequiredItem + apiReq.HttpMethod = "POST" + apiResp, err := core.Request(ctx, apiReq, a.config, options...) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[GetWorkItemTransRequiredItem] fail to invoke api, error: %v", err.Error())) + return nil, err + } + // 反序列响应结果 + resp := &GetWorkItemTransRequiredItemResp{APIResp: apiResp} + err = apiResp.JSONUnmarshalBody(resp, a.config) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[GetWorkItemTransRequiredItem] fail to unmarshal response body, error: %v", err.Error())) + return nil, err + } + return resp, err +} + /* * @name: OAPIGetWorkItemTypeInfoByKey * @desc: 查询工作项类型 diff --git a/v2/service/workitem/builder.go b/v2/service/workitem/builder.go index f599d1e..e0c952f 100644 --- a/v2/service/workitem/builder.go +++ b/v2/service/workitem/builder.go @@ -456,6 +456,7 @@ type CreateFieldReqBody struct { RelatedFieldExtraDisplayInfos []RelatedFieldExtraDisplayInfo `json:"related_field_extra_display_infos,omitempty"` TeamOption *TeamOption `json:"team_option,omitempty"` ParentFieldKey *string `json:"parent_field_key,omitempty"` + NumberConfig *NumberConfig `json:"number_config,omitempty"` } type CreateFieldResp struct { *core.APIResp `json:"-"` @@ -586,6 +587,11 @@ func (builder *CreateFieldReqBuilder) ParentFieldKey(parentFieldKey string) *Cre return builder } + +func (builder *CreateFieldReqBuilder) NumberConfig(numberConfig *NumberConfig) *CreateFieldReqBuilder { + builder.apiReq.Body.(*CreateFieldReqBody).NumberConfig = numberConfig + return builder +} func (builder *CreateFieldReqBuilder) Build() *CreateFieldReq { req := &CreateFieldReq{} req.apiReq = builder.apiReq @@ -2228,6 +2234,72 @@ func (builder *GetWorkItemOpRecordReqBuilder) Build() *GetWorkItemOpRecordReq { return req } +type GetWorkItemTransRequiredItemReq struct { + apiReq *core.APIReq +} +type GetWorkItemTransRequiredItemReqBody struct { + ProjectKey *string `json:"project_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + StateKey *string `json:"state_key,omitempty"` + Mode *string `json:"mode,omitempty"` +} +type GetWorkItemTransRequiredItemResp struct { + *core.APIResp `json:"-"` + core.CodeError + Data *NodeRequiredItemRes `json:"data"` + +} + +type GetWorkItemTransRequiredItemReqBuilder struct { + apiReq *core.APIReq +} + +func NewGetWorkItemTransRequiredItemReqBuilder() *GetWorkItemTransRequiredItemReqBuilder { + builder := &GetWorkItemTransRequiredItemReqBuilder{} + builder.apiReq = &core.APIReq{ + PathParams: core.PathParams{}, + QueryParams: core.QueryParams{}, + Body: &GetWorkItemTransRequiredItemReqBody{}, + } + return builder +} + +func (builder *GetWorkItemTransRequiredItemReqBuilder) ProjectKey(projectKey string) *GetWorkItemTransRequiredItemReqBuilder { + builder.apiReq.Body.(*GetWorkItemTransRequiredItemReqBody).ProjectKey = &projectKey + return builder +} + + +func (builder *GetWorkItemTransRequiredItemReqBuilder) WorkItemTypeKey(workItemTypeKey string) *GetWorkItemTransRequiredItemReqBuilder { + builder.apiReq.Body.(*GetWorkItemTransRequiredItemReqBody).WorkItemTypeKey = &workItemTypeKey + return builder +} + + +func (builder *GetWorkItemTransRequiredItemReqBuilder) WorkItemID(workItemID int64) *GetWorkItemTransRequiredItemReqBuilder { + builder.apiReq.Body.(*GetWorkItemTransRequiredItemReqBody).WorkItemID = &workItemID + return builder +} + + +func (builder *GetWorkItemTransRequiredItemReqBuilder) StateKey(stateKey string) *GetWorkItemTransRequiredItemReqBuilder { + builder.apiReq.Body.(*GetWorkItemTransRequiredItemReqBody).StateKey = &stateKey + return builder +} + + +func (builder *GetWorkItemTransRequiredItemReqBuilder) Mode(mode string) *GetWorkItemTransRequiredItemReqBuilder { + builder.apiReq.Body.(*GetWorkItemTransRequiredItemReqBody).Mode = &mode + return builder +} + +func (builder *GetWorkItemTransRequiredItemReqBuilder) Build() *GetWorkItemTransRequiredItemReq { + req := &GetWorkItemTransRequiredItemReq{} + req.apiReq = builder.apiReq + return req +} + type GetWorkItemTypeInfoByKeyReq struct { apiReq *core.APIReq } @@ -3840,6 +3912,7 @@ type UpdateFieldReqBody struct { AuthorizedRoles []string `json:"authorized_roles,omitempty"` RelatedFieldExtraDisplayInfos []RelatedFieldExtraDisplayInfo `json:"related_field_extra_display_infos,omitempty"` TeamOption *TeamOption `json:"team_option,omitempty"` + NumberConfig *NumberConfig `json:"number_config,omitempty"` } type UpdateFieldResp struct { *core.APIResp `json:"-"` @@ -3932,6 +4005,11 @@ func (builder *UpdateFieldReqBuilder) TeamOption(teamOption *TeamOption) *Update builder.apiReq.Body.(*UpdateFieldReqBody).TeamOption = teamOption return builder } + +func (builder *UpdateFieldReqBuilder) NumberConfig(numberConfig *NumberConfig) *UpdateFieldReqBuilder { + builder.apiReq.Body.(*UpdateFieldReqBody).NumberConfig = numberConfig + return builder +} func (builder *UpdateFieldReqBuilder) Build() *UpdateFieldReq { req := &UpdateFieldReq{} req.apiReq = builder.apiReq @@ -4103,6 +4181,8 @@ type UpdateNodeStateReqBody struct { Schedules []Schedule `json:"schedules,omitempty"` Fields []FieldValuePair `json:"fields,omitempty"` RoleAssignee []RoleOwner `json:"role_assignee,omitempty"` + NodeFields []NodeField `json:"node_fields,omitempty"` + FinishedInfos *FinishedInfo `json:"finished_infos,omitempty"` } type UpdateNodeStateResp struct { *core.APIResp `json:"-"` @@ -4183,6 +4263,16 @@ func (builder *UpdateNodeStateReqBuilder) RoleAssignee(roleAssignee []RoleOwner) builder.apiReq.Body.(*UpdateNodeStateReqBody).RoleAssignee = roleAssignee return builder } + +func (builder *UpdateNodeStateReqBuilder) NodeFields(nodeFields []NodeField) *UpdateNodeStateReqBuilder { + builder.apiReq.Body.(*UpdateNodeStateReqBody).NodeFields = nodeFields + return builder +} + +func (builder *UpdateNodeStateReqBuilder) FinishedInfos(finishedInfos *FinishedInfo) *UpdateNodeStateReqBuilder { + builder.apiReq.Body.(*UpdateNodeStateReqBody).FinishedInfos = finishedInfos + return builder +} func (builder *UpdateNodeStateReqBuilder) Build() *UpdateNodeStateReq { req := &UpdateNodeStateReq{} req.apiReq = builder.apiReq diff --git a/v2/service/workitem/model.go b/v2/service/workitem/model.go index 24e19da..5ec49d5 100644 --- a/v2/service/workitem/model.go +++ b/v2/service/workitem/model.go @@ -91,19 +91,19 @@ type CompInfo struct { type Condition struct { - FieldItem *FieldItem `json:"field_item,omitempty"` + Field *string `json:"field,omitempty"` - Operator *string `json:"operator,omitempty"` + FieldType *string `json:"field_type,omitempty"` - OriginalValue *string `json:"original_value,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - Formula *string `json:"formula,omitempty"` + Operator *string `json:"operator,omitempty"` - Version *string `json:"version,omitempty"` + ValueList []string `json:"value_list,omitempty"` - PreOperator *string `json:"pre_operator,omitempty"` + Params map[string]string `json:"params,omitempty"` - ValueGroup *Filter `json:"value_group,omitempty"` + Version *string `json:"version,omitempty"` } @@ -123,6 +123,8 @@ type Connection struct { TransitionID *int64 `json:"transition_id,omitempty"` + Fields []FieldConf `json:"fields,omitempty"` + } type CreateWorkItemRelationData struct { @@ -147,7 +149,7 @@ type DataSource struct { ProjectKey *string `json:"project_key,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + WorkItemTypeKeys *string `json:"work_item_type_keys,omitempty"` } @@ -179,6 +181,28 @@ type DeliveryRelatedInfoItem struct { } +type Department struct { + + ID *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + EnName *string `json:"en_name,omitempty"` + +} + +type DependencyInfo struct { + + WorkItemID *int64 `json:"work_item_id,omitempty"` + + StateKey *string `json:"state_key,omitempty"` + + Name *string `json:"name,omitempty"` + + Type *string `json:"type,omitempty"` + +} + type DraftViewSubWorkItemConf struct { WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` @@ -201,6 +225,14 @@ type DraftViewSubWorkItemConfRelation struct { } +type EditablePersonnelScope struct { + + EditablePersonnelRangeType *string `json:"editable_personnel_range_type,omitempty"` + + EditableRoles []string `json:"editable_roles,omitempty"` + +} + type Expand struct { NeedWorkflow *bool `json:"need_workflow,omitempty"` @@ -213,6 +245,12 @@ type Expand struct { NeedSubTaskParent *bool `json:"need_sub_task_parent,omitempty"` + NeedUnionDeliverable *bool `json:"need_union_deliverable,omitempty"` + + NeedWbsRelationChainEntity *bool `json:"need_wbs_relation_chain_entity,omitempty"` + + NeedWbsRelationChainPath *bool `json:"need_wbs_relation_chain_path,omitempty"` + } type FieldConf struct { @@ -253,6 +291,8 @@ type FieldConf struct { SubTypeLevelClass *int64 `json:"sub_type_level_class,omitempty"` + EditablePersonnelScope *EditablePersonnelScope `json:"editable_personnel_scope,omitempty"` + } type FieldDeliverableItem struct { @@ -299,6 +339,8 @@ type FieldItem struct { ParentFieldType *string `json:"parent_field_type,omitempty"` + EntityScope *string `json:"entity_scope,omitempty"` + } type FieldValuePair struct { @@ -315,6 +357,8 @@ type FieldValuePair struct { HelpDescription *string `json:"help_description,omitempty"` + UpdateMode *int32 `json:"update_mode,omitempty"` + } type Filter struct { @@ -327,6 +371,16 @@ type Filter struct { } +type FinishedInfo struct { + + SummaryMode *string `json:"summary_mode,omitempty"` + + Conclusion *NodeFinishedConclusion `json:"conclusion,omitempty"` + + Opinion *NodeFinishedOpinion `json:"opinion,omitempty"` + +} + type Group struct { FieldItem *FieldItem `json:"field_item,omitempty"` @@ -357,6 +411,20 @@ type InstanceDeliverableItem struct { } +type Leader struct { + + Email *string `json:"email,omitempty"` + + EmployeeNumber *string `json:"employee_number,omitempty"` + + ID *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + UName *string `json:"u_name,omitempty"` + +} + type LinkedResourceInfo struct { ResourceID *int64 `json:"resource_id,omitempty"` @@ -485,6 +553,72 @@ type NodeElement struct { } +type NodeField struct { + + FieldKey *string `json:"field_key,omitempty"` + + FieldValue interface{} `json:"field_value,omitempty"` + + FieldAlias *string `json:"field_alias,omitempty"` + + FieldTypeKey *string `json:"field_type_key,omitempty"` + +} + +type NodeFinishedConclusion struct { + + FinishedConclusionResult *NodeFinishedConclusionOption `json:"finished_conclusion_result,omitempty"` + + OwnersFinishedConclusionResult []NodeOwnerFinishedConclusion `json:"owners_finished_conclusion_result,omitempty"` + +} + +type NodeFinishedConclusionOption struct { + + Key *string `json:"key,omitempty"` + + Label *string `json:"label,omitempty"` + + OriginalLabel *string `json:"original_label,omitempty"` + +} + +type NodeFinishedOpinion struct { + + FinishedOpinionResult *string `json:"finished_opinion_result,omitempty"` + + OwnersFinishedOpinionResult []NodeOwnerFinishedOpinion `json:"owners_finished_opinion_result,omitempty"` + +} + +type NodeOwnerFinishedConclusion struct { + + Owner *Owner `json:"owner,omitempty"` + + FinishedConclusionResult *NodeFinishedConclusionOption `json:"finished_conclusion_result,omitempty"` + +} + +type NodeOwnerFinishedOpinion struct { + + Owner *Owner `json:"owner,omitempty"` + + FinishedOpinionResult *string `json:"finished_opinion_result,omitempty"` + +} + +type NodeRequiredItemRes struct { + + FormItems []RequiredFormItem `json:"form_items,omitempty"` + + Tasks []RequiredTask `json:"tasks,omitempty"` + + Deliverables []RequiredDeliverable `json:"deliverables,omitempty"` + + NodeFields []RequiredField `json:"node_fields,omitempty"` + +} + type NodeTask struct { ID *string `json:"id,omitempty"` @@ -493,6 +627,12 @@ type NodeTask struct { SubTasks []SubTask `json:"sub_tasks,omitempty"` + NodeName *string `json:"node_name,omitempty"` + + TemplateID *int64 `json:"template_id,omitempty"` + + Version *int64 `json:"version,omitempty"` + } type NodeWBSRoleOwners struct { @@ -519,6 +659,22 @@ type NodesConnections struct { UserDetails []UserDetail `json:"user_details,omitempty"` + TemplateID *int64 `json:"template_id,omitempty"` + + Version *int64 `json:"version,omitempty"` + +} + +type NumberConfig struct { + + ScalingRatio *string `json:"scaling_ratio,omitempty"` + + DisplayDigits *int64 `json:"display_digits,omitempty"` + + SymbolSetting *SymbolSetting `json:"symbol_setting,omitempty"` + + Thousandth *bool `json:"thousandth,omitempty"` + } type OAPIBatchQueryConclusionOptionItem struct { @@ -763,6 +919,10 @@ type Option struct { Color *string `json:"color,omitempty"` + IsVisibility *int64 `json:"is_visibility,omitempty"` + + IsDisabled *int64 `json:"is_disabled,omitempty"` + } type OptionConf struct { @@ -789,6 +949,34 @@ type OrderInfo struct { } +type Owner struct { + + ID *string `json:"id,omitempty"` + + Username *string `json:"username,omitempty"` + + EmployeeId *string `json:"employeeId,omitempty"` + + Email *string `json:"email,omitempty"` + + Nickname *string `json:"nickname,omitempty"` + + Avatar *string `json:"avatar,omitempty"` + + AvatarUrl *string `json:"avatar_url,omitempty"` + + EnName *string `json:"en_name,omitempty"` + + Name *string `json:"name,omitempty"` + + LarkOpenId *string `json:"larkOpenId,omitempty"` + + Department *Department `json:"department,omitempty"` + + Leader *Leader `json:"leader,omitempty"` + +} + type OwnerConf struct { OwnerUsageMode *string `json:"owner_usage_mode,omitempty"` @@ -973,6 +1161,62 @@ type RelationRule struct { } +type RequiredDeliverable struct { + + DeliverableID *int64 `json:"deliverable_id,omitempty"` + + Finished *bool `json:"finished,omitempty"` + +} + +type RequiredField struct { + + FieldKey *string `json:"field_key,omitempty"` + + FieldTypeKey *string `json:"field_type_key,omitempty"` + + Finished *bool `json:"finished,omitempty"` + + NotFinishedOwner []string `json:"not_finished_owner,omitempty"` + + SubField []RequiredField `json:"sub_field,omitempty"` + +} + +type RequiredFormItem struct { + + Class *string `json:"class,omitempty"` + + Key *string `json:"key,omitempty"` + + Finished *bool `json:"finished,omitempty"` + + FieldTypeKey *string `json:"field_type_key,omitempty"` + + NotFinishedOwner []string `json:"not_finished_owner,omitempty"` + + SubField []RequiredField `json:"sub_field,omitempty"` + + StateInfo *RequiredStateInfo `json:"state_info,omitempty"` + +} + +type RequiredStateInfo struct { + + StateKey *string `json:"state_key,omitempty"` + + NodeFields []RequiredField `json:"node_fields,omitempty"` + +} + +type RequiredTask struct { + + TaskID *int64 `json:"task_id,omitempty"` + + Finished *bool `json:"finished,omitempty"` + +} + type RoleAssign struct { Role *string `json:"role,omitempty"` @@ -1009,6 +1253,14 @@ type RoleConfDetail struct { Key *string `json:"key,omitempty"` + AllowDelete *bool `json:"allow_delete,omitempty"` + + AuthorizationRoleKeys []string `json:"authorization_role_keys,omitempty"` + + IsMemberMulti *bool `json:"is_member_multi,omitempty"` + + IsRequired *int32 `json:"is_required,omitempty"` + } type RoleOwner struct { @@ -1019,6 +1271,10 @@ type RoleOwner struct { Owners []string `json:"owners,omitempty"` + Exist *bool `json:"exist,omitempty"` + + IsMemberMulti *bool `json:"is_member_multi,omitempty"` + } type Schedule struct { @@ -1033,6 +1289,22 @@ type Schedule struct { ActualWorkTime *float64 `json:"actual_work_time,omitempty"` + IsAuto *bool `json:"is_auto,omitempty"` + + PlannedConstructionPeriod *int32 `json:"planned_construction_period,omitempty"` + +} + +type ScheduleReferenceValue struct { + + WorkItemID *int64 `json:"work_item_id,omitempty"` + + StateKey *string `json:"state_key,omitempty"` + + Name *string `json:"name,omitempty"` + + Type *string `json:"type,omitempty"` + } type SearchGroup struct { @@ -1101,6 +1373,12 @@ type SimpleField struct { ValueGenerateMode *string `json:"value_generate_mode,omitempty"` + RelationID *string `json:"relation_id,omitempty"` + + EditablePersonnelScope *EditablePersonnelScope `json:"editable_personnel_scope,omitempty"` + + NumberConfig *NumberConfig `json:"number_config,omitempty"` + } type SimpleRoleConf struct { @@ -1115,10 +1393,16 @@ type SimpleRoleConf struct { type Sort struct { - FieldItem *FieldItem `json:"field_item,omitempty"` + FieldKey *string `json:"field_key,omitempty"` + + FieldType *string `json:"field_type,omitempty"` + + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` Order *string `json:"order,omitempty"` + Params map[string]string `json:"params,omitempty"` + } type StateFlowConfInfo struct { @@ -1261,6 +1545,10 @@ type SubTask struct { Deliverable []FieldValuePair `json:"deliverable,omitempty"` + OwnerRoles []string `json:"owner_roles,omitempty"` + + OwnerUsageMode *int64 `json:"owner_usage_mode,omitempty"` + Fields []FieldValuePair `json:"fields,omitempty"` } @@ -1291,6 +1579,16 @@ type SubWorkItemConfInfo struct { } +type SymbolSetting struct { + + Display *string `json:"display,omitempty"` + + Value *string `json:"value,omitempty"` + + Layout *string `json:"layout,omitempty"` + +} + type TargetState struct { StateKey *string `json:"state_key,omitempty"` @@ -1591,6 +1889,12 @@ type WBSWorkItem struct { DismantleMode *int64 `json:"dismantle_mode,omitempty"` + Dependencies []DependencyInfo `json:"dependencies,omitempty"` + + RelativeScheduleV2 []ScheduleReferenceValue `json:"relative_schedule_v2,omitempty"` + + IsScheduleAggItem *bool `json:"is_schedule_agg_item,omitempty"` + } type WbsDraft struct { @@ -1699,6 +2003,8 @@ type WorkItemInfo struct { SubTaskParentInfo *SubTaskParentInfo `json:"sub_task_parent_info,omitempty"` + CompoundFieldExtra []FieldValuePair `json:"compound_field_extra,omitempty"` + } type WorkItemKeyType struct { @@ -1779,6 +2085,8 @@ type WorkItemTypeInfo struct { BelongRoles []SimpleRoleConf `json:"belong_roles,omitempty"` + ActualWorkTimeSwitch *bool `json:"actual_work_time_switch,omitempty"` + } type WorkflowConf struct { @@ -1883,4 +2191,12 @@ type WorkflowNode struct { Participants []string `json:"participants,omitempty"` + OwnerRoles []string `json:"owner_roles,omitempty"` + + OwnerUsageMode *int64 `json:"owner_usage_mode,omitempty"` + + NodeFields []NodeField `json:"node_fields,omitempty"` + + FinishedInfos *FinishedInfo `json:"finished_infos,omitempty"` + } From 4ee08fdb1047c47aeadaabb002abaa733ea26398 Mon Sep 17 00:00:00 2001 From: "kang.zou" Date: Tue, 29 Jul 2025 17:21:17 +0800 Subject: [PATCH 2/5] feat.generator 7.29 --- v2/service/project/builder.go | 6 + v2/service/view/builder.go | 14 + v2/service/view/model.go | 10 + v2/service/workitem/api.go | 182 ++++++++ v2/service/workitem/builder.go | 576 ++++++++++++++++++++++--- v2/service/workitem/model.go | 762 ++++++++++++++++++++++++++++----- 6 files changed, 1380 insertions(+), 170 deletions(-) diff --git a/v2/service/project/builder.go b/v2/service/project/builder.go index 5e3bd78..14d1a52 100644 --- a/v2/service/project/builder.go +++ b/v2/service/project/builder.go @@ -8,6 +8,7 @@ type BatchQueryProjectInfoReq struct { apiReq *core.APIReq } type BatchQueryProjectInfoReqBody struct { + ProjectKeys []string `json:"project_keys,omitempty"` UserKey *string `json:"user_key,omitempty"` SimpleNames []string `json:"simple_names,omitempty"` TenantGroupID *int64 `json:"tenant_group_id,omitempty"` @@ -32,6 +33,11 @@ func NewBatchQueryProjectInfoReqBuilder() *BatchQueryProjectInfoReqBuilder { return builder } +func (builder *BatchQueryProjectInfoReqBuilder) ProjectKeys(projectKeys []string) *BatchQueryProjectInfoReqBuilder { + builder.apiReq.Body.(*BatchQueryProjectInfoReqBody).ProjectKeys = projectKeys + return builder +} + func (builder *BatchQueryProjectInfoReqBuilder) UserKey(userKey string) *BatchQueryProjectInfoReqBuilder { builder.apiReq.Body.(*BatchQueryProjectInfoReqBody).UserKey = &userKey return builder diff --git a/v2/service/view/builder.go b/v2/service/view/builder.go index 3bd9ede..cb7da15 100644 --- a/v2/service/view/builder.go +++ b/v2/service/view/builder.go @@ -18,6 +18,7 @@ type CreateConditionViewReqBody struct { CooperationUserKeys []string `json:"cooperation_user_keys,omitempty"` CooperationTeamIDs []int64 `json:"cooperation_team_ids,omitempty"` Name *string `json:"name,omitempty"` + MeegoUserKey *string `json:"meego_user_key,omitempty"` CooperationTeams []Team `json:"cooperation_teams,omitempty"` } type CreateConditionViewResp struct { @@ -83,6 +84,12 @@ func (builder *CreateConditionViewReqBuilder) Name(name string) *CreateCondition } +func (builder *CreateConditionViewReqBuilder) MeegoUserKey(meegoUserKey string) *CreateConditionViewReqBuilder { + builder.apiReq.Body.(*CreateConditionViewReqBody).MeegoUserKey = &meegoUserKey + return builder +} + + func (builder *CreateConditionViewReqBuilder) CooperationTeams(cooperationTeams []Team) *CreateConditionViewReqBuilder { builder.apiReq.Body.(*CreateConditionViewReqBody).CooperationTeams = cooperationTeams return builder @@ -297,6 +304,7 @@ type UpdateConditionViewReqBody struct { CooperationUserKeys []string `json:"cooperation_user_keys,omitempty"` CooperationTeamIDs []int64 `json:"cooperation_team_ids,omitempty"` Name *string `json:"name,omitempty"` + MeegoUserKey *string `json:"meego_user_key,omitempty"` ViewID *string `json:"view_id,omitempty"` CooperationTeams []Team `json:"cooperation_teams,omitempty"` } @@ -358,6 +366,12 @@ func (builder *UpdateConditionViewReqBuilder) Name(name string) *UpdateCondition } +func (builder *UpdateConditionViewReqBuilder) MeegoUserKey(meegoUserKey string) *UpdateConditionViewReqBuilder { + builder.apiReq.Body.(*UpdateConditionViewReqBody).MeegoUserKey = &meegoUserKey + return builder +} + + func (builder *UpdateConditionViewReqBuilder) ViewID(viewID string) *UpdateConditionViewReqBuilder { builder.apiReq.Body.(*UpdateConditionViewReqBody).ViewID = &viewID return builder diff --git a/v2/service/view/model.go b/v2/service/view/model.go index 5a72eb9..1323a0d 100644 --- a/v2/service/view/model.go +++ b/v2/service/view/model.go @@ -137,6 +137,14 @@ type Pagination struct { } +type QuickFilter struct { + + QuickFilterID *string `json:"quick_filter_id,omitempty"` + + QuickFilterName *string `json:"quick_filter_name,omitempty"` + +} + type RelationFieldDetail struct { FieldKey *string `json:"field_key,omitempty"` @@ -327,6 +335,8 @@ type ViewConf struct { CreatedBy *string `json:"created_by,omitempty"` + QuickFilters []QuickFilter `json:"quick_filters,omitempty"` + } type WorkItemInfo struct { diff --git a/v2/service/workitem/api.go b/v2/service/workitem/api.go index 08dbe31..e4f2496 100644 --- a/v2/service/workitem/api.go +++ b/v2/service/workitem/api.go @@ -24,6 +24,8 @@ const APIPath_CompositiveSearch = "/open_api/compositive_search" const APIPath_CreateField = "/open_api/:project_key/field/:work_item_type_key/create" +const APIPath_CreateFlowRole = "/open_api/:project_key/flow_roles/:work_item_type_key/create_role" + const APIPath_CreateProjectRelationInstances = "/open_api/:project_key/relation/:work_item_type_key/:work_item_id/batch_bind" const APIPath_CreateStoryRelations = "/open_api/:project_key/story_relations/create" @@ -40,6 +42,8 @@ const APIPath_CreateWorkingHourRecord = "/open_api/:project_key/work_item/:work_ const APIPath_DeleteFile = "/open_api/file/delete" +const APIPath_DeleteFlowRole = "/open_api/:project_key/flow_roles/:work_item_type_key/delete_role" + const APIPath_DeleteProjectRelationInstance = "/open_api/:project_key/relation/:work_item_type_key/:work_item_id" const APIPath_DeleteTemplateDetail = "/open_api/template/v2/delete_template/:project_key/:template_id" @@ -62,6 +66,8 @@ const APIPath_FilterAcrossProject = "/open_api/work_items/filter_across_project" const APIPath_FreezeWorkItem = "/open_api/work_item/freeze" +const APIPath_GetResourceWorkItemsByIds = "/open_api/work_item/resource/query" + const APIPath_GetWBSInfo = "/open_api/:project_key/work_item/:work_item_type_key/:work_item_id/wbs_view" const APIPath_GetWBSViewSubWorkItemConf = "/open_api/work_item/wbs_view_draft/sub_work_item_conf" @@ -84,6 +90,8 @@ const APIPath_InviteBotJoinChat = "/open_api/:project_key/work_item/:work_item_i const APIPath_ListTemplateConf = "/open_api/:project_key/template_list/:work_item_type_key" +const APIPath_OAPIUpdateCompoundFieldValue = "/open_api/work_item/field_value/update_compound_field" + const APIPath_PatchWBSViewDraft = "/open_api/work_item/wbs_view_draft/patch" const APIPath_PublishWBSViewDraft = "/open_api/work_item/wbs_view_draft/publish" @@ -120,6 +128,8 @@ const APIPath_ResetWBSViewDraft = "/open_api/work_item/wbs_view_draft/reset" const APIPath_ResourceCreateWorkItem = "/open_api/work_item/resource/create_work_item" +const APIPath_ResourceSearchByParams = "/open_api/work_item/resource/search/params" + const APIPath_SearchByParams = "/open_api/:project_key/work_item/:work_item_type_key/search/params" const APIPath_SearchSubtask = "/open_api/work_item/subtask/search" @@ -136,10 +146,14 @@ const APIPath_UpdateField = "/open_api/:project_key/field/:work_item_type_key" const APIPath_UpdateFinished = "/open_api/work_item/finished/update" +const APIPath_UpdateFlowRole = "/open_api/:project_key/flow_roles/:work_item_type_key/update_role" + const APIPath_UpdateMultiSignal = "/open_api/:project_key/work_item/:work_item_type_key/:work_item_id/update/multi_signal" const APIPath_UpdateNodeState = "/open_api/:project_key/workflow/:work_item_type_key/:work_item_id/node/:node_id/operate" +const APIPath_UpdateResourceWorkItem = "/open_api/work_item/resource/update" + const APIPath_UpdateStateFlow = "/open_api/:project_key/workflow/:work_item_type_key/:work_item_id/node/state_change" const APIPath_UpdateTemplateDetail = "/open_api/template/v2/update_template" @@ -362,6 +376,30 @@ func (a *WorkItemService) CreateField(ctx context.Context, req *CreateFieldReq, return resp, err } +/* + * @name: OAPICreateFlowRole + * @desc: 创建流程角色 + */ +func (a *WorkItemService) CreateFlowRole(ctx context.Context, req *CreateFlowRoleReq, options ...core.RequestOptionFunc) (*CreateFlowRoleResp, error) { + // 发起请求 + apiReq := req.apiReq + apiReq.ApiPath = APIPath_CreateFlowRole + apiReq.HttpMethod = "POST" + apiResp, err := core.Request(ctx, apiReq, a.config, options...) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[CreateFlowRole] fail to invoke api, error: %v", err.Error())) + return nil, err + } + // 反序列响应结果 + resp := &CreateFlowRoleResp{APIResp: apiResp} + err = apiResp.JSONUnmarshalBody(resp, a.config) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[CreateFlowRole] fail to unmarshal response body, error: %v", err.Error())) + return nil, err + } + return resp, err +} + /* * @name: OAPICreateProjectRelationInstances * @desc: 通过空间关联绑定关联工作项 @@ -554,6 +592,30 @@ func (a *WorkItemService) DeleteFile(ctx context.Context, req *DeleteFileReq, op return resp, err } +/* + * @name: OAPIDeleteFlowRole + * @desc: 删除流程角色 + */ +func (a *WorkItemService) DeleteFlowRole(ctx context.Context, req *DeleteFlowRoleReq, options ...core.RequestOptionFunc) (*DeleteFlowRoleResp, error) { + // 发起请求 + apiReq := req.apiReq + apiReq.ApiPath = APIPath_DeleteFlowRole + apiReq.HttpMethod = "POST" + apiResp, err := core.Request(ctx, apiReq, a.config, options...) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[DeleteFlowRole] fail to invoke api, error: %v", err.Error())) + return nil, err + } + // 反序列响应结果 + resp := &DeleteFlowRoleResp{APIResp: apiResp} + err = apiResp.JSONUnmarshalBody(resp, a.config) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[DeleteFlowRole] fail to unmarshal response body, error: %v", err.Error())) + return nil, err + } + return resp, err +} + /* * @name: OAPIDeleteProjectRelationInstance * @desc: 通过空间关联解绑关联工作项 @@ -818,6 +880,30 @@ func (a *WorkItemService) FreezeWorkItem(ctx context.Context, req *FreezeWorkIte return resp, err } +/* + * @name: OAPIGetWorkItemsByIds + * @desc: 批量查询工作项 + */ +func (a *WorkItemService) GetResourceWorkItemsByIds(ctx context.Context, req *GetResourceWorkItemsByIdsReq, options ...core.RequestOptionFunc) (*GetResourceWorkItemsByIdsResp, error) { + // 发起请求 + apiReq := req.apiReq + apiReq.ApiPath = APIPath_GetResourceWorkItemsByIds + apiReq.HttpMethod = "POST" + apiResp, err := core.Request(ctx, apiReq, a.config, options...) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[GetResourceWorkItemsByIds] fail to invoke api, error: %v", err.Error())) + return nil, err + } + // 反序列响应结果 + resp := &GetResourceWorkItemsByIdsResp{APIResp: apiResp} + err = apiResp.JSONUnmarshalBody(resp, a.config) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[GetResourceWorkItemsByIds] fail to unmarshal response body, error: %v", err.Error())) + return nil, err + } + return resp, err +} + /* * @name: OAPIGetWBSInfo * @desc: 获取WBS @@ -1082,6 +1168,30 @@ func (a *WorkItemService) ListTemplateConf(ctx context.Context, req *ListTemplat return resp, err } +/* + * @name: OAPIUpdateCompoundFieldValue + * @desc: 增量更新复合字段 + */ +func (a *WorkItemService) OAPIUpdateCompoundFieldValue(ctx context.Context, req *OAPIUpdateCompoundFieldValueReq, options ...core.RequestOptionFunc) (*OAPIUpdateCompoundFieldValueResp, error) { + // 发起请求 + apiReq := req.apiReq + apiReq.ApiPath = APIPath_OAPIUpdateCompoundFieldValue + apiReq.HttpMethod = "POST" + apiResp, err := core.Request(ctx, apiReq, a.config, options...) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[OAPIUpdateCompoundFieldValue] fail to invoke api, error: %v", err.Error())) + return nil, err + } + // 反序列响应结果 + resp := &OAPIUpdateCompoundFieldValueResp{APIResp: apiResp} + err = apiResp.JSONUnmarshalBody(resp, a.config) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[OAPIUpdateCompoundFieldValue] fail to unmarshal response body, error: %v", err.Error())) + return nil, err + } + return resp, err +} + /* * @name: wbs草稿态编辑 * @desc: wbs草稿态编辑 @@ -1514,6 +1624,30 @@ func (a *WorkItemService) ResourceCreateWorkItem(ctx context.Context, req *Resou return resp, err } +/* + * @name: openapi获取指定的资源工作项列表(单空间 | 复杂传参) + * @desc: openapi获取指定的资源工作项列表(单空间 | 复杂传参) + */ +func (a *WorkItemService) ResourceSearchByParams(ctx context.Context, req *ResourceSearchByParamsReq, options ...core.RequestOptionFunc) (*ResourceSearchByParamsResp, error) { + // 发起请求 + apiReq := req.apiReq + apiReq.ApiPath = APIPath_ResourceSearchByParams + apiReq.HttpMethod = "POST" + apiResp, err := core.Request(ctx, apiReq, a.config, options...) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[ResourceSearchByParams] fail to invoke api, error: %v", err.Error())) + return nil, err + } + // 反序列响应结果 + resp := &ResourceSearchByParamsResp{APIResp: apiResp} + err = apiResp.JSONUnmarshalBody(resp, a.config) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[ResourceSearchByParams] fail to unmarshal response body, error: %v", err.Error())) + return nil, err + } + return resp, err +} + /* * @name: openapi获取指定的工作项列表(单空间 | 复杂传参) * @desc: openapi获取指定的工作项列表(单空间 | 复杂传参) @@ -1706,6 +1840,30 @@ func (a *WorkItemService) UpdateFinished(ctx context.Context, req *UpdateFinishe return resp, err } +/* + * @name: OAPIUpdateFlowRole + * @desc: 更新流程角色 + */ +func (a *WorkItemService) UpdateFlowRole(ctx context.Context, req *UpdateFlowRoleReq, options ...core.RequestOptionFunc) (*UpdateFlowRoleResp, error) { + // 发起请求 + apiReq := req.apiReq + apiReq.ApiPath = APIPath_UpdateFlowRole + apiReq.HttpMethod = "POST" + apiResp, err := core.Request(ctx, apiReq, a.config, options...) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[UpdateFlowRole] fail to invoke api, error: %v", err.Error())) + return nil, err + } + // 反序列响应结果 + resp := &UpdateFlowRoleResp{APIResp: apiResp} + err = apiResp.JSONUnmarshalBody(resp, a.config) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[UpdateFlowRole] fail to unmarshal response body, error: %v", err.Error())) + return nil, err + } + return resp, err +} + /* * @name: OAPIUpdateMultiSignal * @desc: 更新多值系统外信号 @@ -1754,6 +1912,30 @@ func (a *WorkItemService) UpdateNodeState(ctx context.Context, req *UpdateNodeSt return resp, err } +/* + * @name: OAPIUpdateResourceWorkItem + * @desc: 更新资源实例工作项 + */ +func (a *WorkItemService) UpdateResourceWorkItem(ctx context.Context, req *UpdateResourceWorkItemReq, options ...core.RequestOptionFunc) (*UpdateResourceWorkItemResp, error) { + // 发起请求 + apiReq := req.apiReq + apiReq.ApiPath = APIPath_UpdateResourceWorkItem + apiReq.HttpMethod = "POST" + apiResp, err := core.Request(ctx, apiReq, a.config, options...) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[UpdateResourceWorkItem] fail to invoke api, error: %v", err.Error())) + return nil, err + } + // 反序列响应结果 + resp := &UpdateResourceWorkItemResp{APIResp: apiResp} + err = apiResp.JSONUnmarshalBody(resp, a.config) + if err != nil { + a.config.Logger.Error(ctx, fmt.Sprintf("[UpdateResourceWorkItem] fail to unmarshal response body, error: %v", err.Error())) + return nil, err + } + return resp, err +} + /* * @name: OAPIUpdateStateFlow * @desc: 状态流转 diff --git a/v2/service/workitem/builder.go b/v2/service/workitem/builder.go index e0c952f..865393e 100644 --- a/v2/service/workitem/builder.go +++ b/v2/service/workitem/builder.go @@ -366,6 +366,7 @@ type CompositiveSearchReq struct { apiReq *core.APIReq } type CompositiveSearchReqBody struct { + ProjectKeys []string `json:"project_keys,omitempty"` QueryType *string `json:"query_type,omitempty"` Query *string `json:"query,omitempty"` QuerySubType []string `json:"query_sub_type,omitempty"` @@ -396,6 +397,11 @@ func NewCompositiveSearchReqBuilder() *CompositiveSearchReqBuilder { return builder } +func (builder *CompositiveSearchReqBuilder) ProjectKeys(projectKeys []string) *CompositiveSearchReqBuilder { + builder.apiReq.Body.(*CompositiveSearchReqBody).ProjectKeys = projectKeys + return builder +} + func (builder *CompositiveSearchReqBuilder) QueryType(queryType string) *CompositiveSearchReqBuilder { builder.apiReq.Body.(*CompositiveSearchReqBody).QueryType = &queryType return builder @@ -598,6 +604,55 @@ func (builder *CreateFieldReqBuilder) Build() *CreateFieldReq { return req } +type CreateFlowRoleReq struct { + apiReq *core.APIReq +} +type CreateFlowRoleReqBody struct { + Role *RoleConfCreate `json:"role,omitempty"` +} +type CreateFlowRoleResp struct { + *core.APIResp `json:"-"` + core.CodeError + Data *string `json:"data"` + +} + +type CreateFlowRoleReqBuilder struct { + apiReq *core.APIReq +} + +func NewCreateFlowRoleReqBuilder() *CreateFlowRoleReqBuilder { + builder := &CreateFlowRoleReqBuilder{} + builder.apiReq = &core.APIReq{ + PathParams: core.PathParams{}, + QueryParams: core.QueryParams{}, + Body: &CreateFlowRoleReqBody{}, + } + return builder +} + +func (builder *CreateFlowRoleReqBuilder) ProjectKey(projectKey string) *CreateFlowRoleReqBuilder { + builder.apiReq.PathParams.Set("project_key", fmt.Sprint(projectKey)) + return builder +} + + +func (builder *CreateFlowRoleReqBuilder) WorkItemTypeKey(workItemTypeKey string) *CreateFlowRoleReqBuilder { + builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) + return builder +} + + +func (builder *CreateFlowRoleReqBuilder) Role(role *RoleConfCreate) *CreateFlowRoleReqBuilder { + builder.apiReq.Body.(*CreateFlowRoleReqBody).Role = role + return builder +} +func (builder *CreateFlowRoleReqBuilder) Build() *CreateFlowRoleReq { + req := &CreateFlowRoleReq{} + req.apiReq = builder.apiReq + return req +} + type CreateProjectRelationInstancesReq struct { apiReq *core.APIReq } @@ -765,7 +820,7 @@ type CreateWorkItemReq struct { } type CreateWorkItemReqBody struct { WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - FieldValuePairs []FieldValuePair `json:"field_value_pairs,omitempty"` + FieldValuePairs []WorkItem_work_item_FieldValuePair `json:"field_value_pairs,omitempty"` TemplateID *int64 `json:"template_id,omitempty"` Name *string `json:"name,omitempty"` } @@ -802,7 +857,7 @@ func (builder *CreateWorkItemReqBuilder) WorkItemTypeKey(workItemTypeKey string) } -func (builder *CreateWorkItemReqBuilder) FieldValuePairs(fieldValuePairs []FieldValuePair) *CreateWorkItemReqBuilder { +func (builder *CreateWorkItemReqBuilder) FieldValuePairs(fieldValuePairs []WorkItem_work_item_FieldValuePair) *CreateWorkItemReqBuilder { builder.apiReq.Body.(*CreateWorkItemReqBody).FieldValuePairs = fieldValuePairs return builder } @@ -890,10 +945,10 @@ type CreateWorkItemSubTaskReqBody struct { Name *string `json:"name,omitempty"` AliasKey *string `json:"alias_key,omitempty"` Assignee []string `json:"assignee,omitempty"` - RoleAssignee []RoleOwner `json:"role_assignee,omitempty"` - Schedule *Schedule `json:"schedule,omitempty"` + RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` + Schedule *WorkItem_work_item_Schedule `json:"schedule,omitempty"` Note *string `json:"note,omitempty"` - FieldValuePairs []FieldValuePair `json:"field_value_pairs,omitempty"` + FieldValuePairs []WorkItem_work_item_FieldValuePair `json:"field_value_pairs,omitempty"` } type CreateWorkItemSubTaskResp struct { *core.APIResp `json:"-"` @@ -951,12 +1006,12 @@ func (builder *CreateWorkItemSubTaskReqBuilder) Assignee(assignee []string) *Cre return builder } -func (builder *CreateWorkItemSubTaskReqBuilder) RoleAssignee(roleAssignee []RoleOwner) *CreateWorkItemSubTaskReqBuilder { +func (builder *CreateWorkItemSubTaskReqBuilder) RoleAssignee(roleAssignee []WorkItem_work_item_RoleOwner) *CreateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*CreateWorkItemSubTaskReqBody).RoleAssignee = roleAssignee return builder } -func (builder *CreateWorkItemSubTaskReqBuilder) Schedule(schedule *Schedule) *CreateWorkItemSubTaskReqBuilder { +func (builder *CreateWorkItemSubTaskReqBuilder) Schedule(schedule *WorkItem_work_item_Schedule) *CreateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*CreateWorkItemSubTaskReqBody).Schedule = schedule return builder } @@ -973,7 +1028,7 @@ func (builder *CreateWorkItemSubTaskReqBuilder) WorkItemTypeKey(workItemTypeKey } -func (builder *CreateWorkItemSubTaskReqBuilder) FieldValuePairs(fieldValuePairs []FieldValuePair) *CreateWorkItemSubTaskReqBuilder { +func (builder *CreateWorkItemSubTaskReqBuilder) FieldValuePairs(fieldValuePairs []WorkItem_work_item_FieldValuePair) *CreateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*CreateWorkItemSubTaskReqBody).FieldValuePairs = fieldValuePairs return builder } @@ -1122,6 +1177,61 @@ func (builder *DeleteFileReqBuilder) Build() *DeleteFileReq { return req } +type DeleteFlowRoleReq struct { + apiReq *core.APIReq +} +type DeleteFlowRoleReqBody struct { + RoleID *string `json:"role_id,omitempty"` + RoleAlias *string `json:"role_alias,omitempty"` +} +type DeleteFlowRoleResp struct { + *core.APIResp `json:"-"` + core.CodeError +} + +type DeleteFlowRoleReqBuilder struct { + apiReq *core.APIReq +} + +func NewDeleteFlowRoleReqBuilder() *DeleteFlowRoleReqBuilder { + builder := &DeleteFlowRoleReqBuilder{} + builder.apiReq = &core.APIReq{ + PathParams: core.PathParams{}, + QueryParams: core.QueryParams{}, + Body: &DeleteFlowRoleReqBody{}, + } + return builder +} + +func (builder *DeleteFlowRoleReqBuilder) ProjectKey(projectKey string) *DeleteFlowRoleReqBuilder { + builder.apiReq.PathParams.Set("project_key", fmt.Sprint(projectKey)) + return builder +} + + +func (builder *DeleteFlowRoleReqBuilder) WorkItemTypeKey(workItemTypeKey string) *DeleteFlowRoleReqBuilder { + builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) + return builder +} + + +func (builder *DeleteFlowRoleReqBuilder) RoleID(roleID string) *DeleteFlowRoleReqBuilder { + builder.apiReq.Body.(*DeleteFlowRoleReqBody).RoleID = &roleID + return builder +} + + +func (builder *DeleteFlowRoleReqBuilder) RoleAlias(roleAlias string) *DeleteFlowRoleReqBuilder { + builder.apiReq.Body.(*DeleteFlowRoleReqBody).RoleAlias = &roleAlias + return builder +} + +func (builder *DeleteFlowRoleReqBuilder) Build() *DeleteFlowRoleReq { + req := &DeleteFlowRoleReq{} + req.apiReq = builder.apiReq + return req +} + type DeleteProjectRelationInstanceReq struct { apiReq *core.APIReq } @@ -1688,6 +1798,7 @@ type FilterAcrossProjectReq struct { apiReq *core.APIReq } type FilterAcrossProjectReqBody struct { + ProjectKeys []string `json:"project_keys,omitempty"` SearchUser *SearchUser `json:"search_user,omitempty"` WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` CreatedAt *TimeInterval `json:"created_at,omitempty"` @@ -1728,6 +1839,11 @@ func NewFilterAcrossProjectReqBuilder() *FilterAcrossProjectReqBuilder { return builder } +func (builder *FilterAcrossProjectReqBuilder) ProjectKeys(projectKeys []string) *FilterAcrossProjectReqBuilder { + builder.apiReq.Body.(*FilterAcrossProjectReqBody).ProjectKeys = projectKeys + return builder +} + func (builder *FilterAcrossProjectReqBuilder) SearchUser(searchUser *SearchUser) *FilterAcrossProjectReqBuilder { builder.apiReq.Body.(*FilterAcrossProjectReqBody).SearchUser = searchUser return builder @@ -1868,11 +1984,74 @@ func (builder *FreezeWorkItemReqBuilder) Build() *FreezeWorkItemReq { return req } +type GetResourceWorkItemsByIdsReq struct { + apiReq *core.APIReq +} +type GetResourceWorkItemsByIdsReqBody struct { + ProjectKey *string `json:"project_key,omitempty"` + WorkItemIDs []int64 `json:"work_item_ids,omitempty"` + Fields []string `json:"fields,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` +} +type GetResourceWorkItemsByIdsResp struct { + *core.APIResp `json:"-"` + core.CodeError + Data []WorkItem_work_item_ResourceWorkItemInfo `json:"data"` + +} + +type GetResourceWorkItemsByIdsReqBuilder struct { + apiReq *core.APIReq +} + +func NewGetResourceWorkItemsByIdsReqBuilder() *GetResourceWorkItemsByIdsReqBuilder { + builder := &GetResourceWorkItemsByIdsReqBuilder{} + builder.apiReq = &core.APIReq{ + PathParams: core.PathParams{}, + QueryParams: core.QueryParams{}, + Body: &GetResourceWorkItemsByIdsReqBody{}, + } + return builder +} + +func (builder *GetResourceWorkItemsByIdsReqBuilder) ProjectKey(projectKey string) *GetResourceWorkItemsByIdsReqBuilder { + builder.apiReq.Body.(*GetResourceWorkItemsByIdsReqBody).ProjectKey = &projectKey + return builder +} + + +func (builder *GetResourceWorkItemsByIdsReqBuilder) WorkItemIDs(workItemIDs []int64) *GetResourceWorkItemsByIdsReqBuilder { + builder.apiReq.Body.(*GetResourceWorkItemsByIdsReqBody).WorkItemIDs = workItemIDs + return builder +} + +func (builder *GetResourceWorkItemsByIdsReqBuilder) Fields(fields []string) *GetResourceWorkItemsByIdsReqBuilder { + builder.apiReq.Body.(*GetResourceWorkItemsByIdsReqBody).Fields = fields + return builder +} + +func (builder *GetResourceWorkItemsByIdsReqBuilder) WorkItemTypeKey(workItemTypeKey string) *GetResourceWorkItemsByIdsReqBuilder { + builder.apiReq.Body.(*GetResourceWorkItemsByIdsReqBody).WorkItemTypeKey = &workItemTypeKey + return builder +} + + +func (builder *GetResourceWorkItemsByIdsReqBuilder) Expand(expand *WorkItem_work_item_Expand) *GetResourceWorkItemsByIdsReqBuilder { + builder.apiReq.Body.(*GetResourceWorkItemsByIdsReqBody).Expand = expand + return builder +} +func (builder *GetResourceWorkItemsByIdsReqBuilder) Build() *GetResourceWorkItemsByIdsReq { + req := &GetResourceWorkItemsByIdsReq{} + req.apiReq = builder.apiReq + return req +} + type GetWBSInfoReq struct { apiReq *core.APIReq } type GetWBSInfoReqBody struct { - Expand *Expand `json:"expand,omitempty"` + Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` } type GetWBSInfoResp struct { *core.APIResp `json:"-"` @@ -1913,7 +2092,7 @@ func (builder *GetWBSInfoReqBuilder) WorkItemTypeKey(workItemTypeKey string) *Ge } -func (builder *GetWBSInfoReqBuilder) Expand(expand *Expand) *GetWBSInfoReqBuilder { +func (builder *GetWBSInfoReqBuilder) Expand(expand *WorkItem_work_item_Expand) *GetWBSInfoReqBuilder { builder.apiReq.Body.(*GetWBSInfoReqBody).Expand = expand return builder } @@ -1990,12 +2169,12 @@ type GetWorkFlowReq struct { type GetWorkFlowReqBody struct { Fields []string `json:"fields,omitempty"` FlowType *int64 `json:"flow_type,omitempty"` - Expand *Expand `json:"expand,omitempty"` + Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` } type GetWorkFlowResp struct { *core.APIResp `json:"-"` core.CodeError - Data *NodesConnections `json:"data"` + Data *WorkItem_work_item_NodesConnections `json:"data"` } @@ -2042,7 +2221,7 @@ func (builder *GetWorkFlowReqBuilder) WorkItemTypeKey(workItemTypeKey string) *G } -func (builder *GetWorkFlowReqBuilder) Expand(expand *Expand) *GetWorkFlowReqBuilder { +func (builder *GetWorkFlowReqBuilder) Expand(expand *WorkItem_work_item_Expand) *GetWorkFlowReqBuilder { builder.apiReq.Body.(*GetWorkFlowReqBody).Expand = expand return builder } @@ -2067,7 +2246,7 @@ type GetWorkItemManHourRecordsResp struct { core.CodeError Data []ManHourRecord `json:"data"` - Pagination *Pagination `json:"pagination"` + Pagination *WorkItem_common_Pagination `json:"pagination"` } @@ -2346,12 +2525,12 @@ type GetWorkItemsByIdsReq struct { type GetWorkItemsByIdsReqBody struct { WorkItemIDs []int64 `json:"work_item_ids,omitempty"` Fields []string `json:"fields,omitempty"` - Expand *Expand `json:"expand,omitempty"` + Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` } type GetWorkItemsByIdsResp struct { *core.APIResp `json:"-"` core.CodeError - Data []WorkItemInfo `json:"data"` + Data []WorkItem_work_item_WorkItemInfo `json:"data"` } @@ -2391,7 +2570,7 @@ func (builder *GetWorkItemsByIdsReqBuilder) WorkItemTypeKey(workItemTypeKey stri } -func (builder *GetWorkItemsByIdsReqBuilder) Expand(expand *Expand) *GetWorkItemsByIdsReqBuilder { +func (builder *GetWorkItemsByIdsReqBuilder) Expand(expand *WorkItem_work_item_Expand) *GetWorkItemsByIdsReqBuilder { builder.apiReq.Body.(*GetWorkItemsByIdsReqBody).Expand = expand return builder } @@ -2417,7 +2596,7 @@ type IntegrateSearchResp struct { core.CodeError Data *string `json:"data"` - Pagination *Pagination `json:"pagination"` + Pagination *Search_concisesearch_Pagination `json:"pagination"` ExtraInfo map[string]string `json:"extra_info"` @@ -2570,6 +2749,83 @@ func (builder *ListTemplateConfReqBuilder) Build() *ListTemplateConfReq { return req } +type OAPIUpdateCompoundFieldValueReq struct { + apiReq *core.APIReq +} +type OAPIUpdateCompoundFieldValueReqBody struct { + WorkItemID *int64 `json:"work_item_id,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + FieldKey *string `json:"field_key,omitempty"` + FieldAlias *string `json:"field_alias,omitempty"` + GroupUUID *string `json:"group_uuid,omitempty"` + Action *string `json:"action,omitempty"` + Fields [][]WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` +} +type OAPIUpdateCompoundFieldValueResp struct { + *core.APIResp `json:"-"` + core.CodeError +} + +type OAPIUpdateCompoundFieldValueReqBuilder struct { + apiReq *core.APIReq +} + +func NewOAPIUpdateCompoundFieldValueReqBuilder() *OAPIUpdateCompoundFieldValueReqBuilder { + builder := &OAPIUpdateCompoundFieldValueReqBuilder{} + builder.apiReq = &core.APIReq{ + PathParams: core.PathParams{}, + QueryParams: core.QueryParams{}, + Body: &OAPIUpdateCompoundFieldValueReqBody{}, + } + return builder +} + +func (builder *OAPIUpdateCompoundFieldValueReqBuilder) WorkItemID(workItemID int64) *OAPIUpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).WorkItemID = &workItemID + return builder +} + + +func (builder *OAPIUpdateCompoundFieldValueReqBuilder) ProjectKey(projectKey string) *OAPIUpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).ProjectKey = &projectKey + return builder +} + + +func (builder *OAPIUpdateCompoundFieldValueReqBuilder) FieldKey(fieldKey string) *OAPIUpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).FieldKey = &fieldKey + return builder +} + + +func (builder *OAPIUpdateCompoundFieldValueReqBuilder) FieldAlias(fieldAlias string) *OAPIUpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).FieldAlias = &fieldAlias + return builder +} + + +func (builder *OAPIUpdateCompoundFieldValueReqBuilder) GroupUUID(groupUUID string) *OAPIUpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).GroupUUID = &groupUUID + return builder +} + + +func (builder *OAPIUpdateCompoundFieldValueReqBuilder) Action(action string) *OAPIUpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).Action = &action + return builder +} + + +func (builder *OAPIUpdateCompoundFieldValueReqBuilder) Fields(fields [][]WorkItem_work_item_FieldValuePair) *OAPIUpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).Fields = fields + return builder +} +func (builder *OAPIUpdateCompoundFieldValueReqBuilder) Build() *OAPIUpdateCompoundFieldValueReq { + req := &OAPIUpdateCompoundFieldValueReq{} + req.apiReq = builder.apiReq + return req +} + type PatchWBSViewDraftReq struct { apiReq *core.APIReq } @@ -3360,7 +3616,7 @@ type ResourceCreateWorkItemReqBody struct { ProjectKey *string `json:"project_key,omitempty"` WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` TemplateID *int64 `json:"template_id,omitempty"` - FieldValuePairs []FieldValuePair `json:"field_value_pairs,omitempty"` + FieldValuePairs []WorkItem_work_item_FieldValuePair `json:"field_value_pairs,omitempty"` } type ResourceCreateWorkItemResp struct { *core.APIResp `json:"-"` @@ -3401,7 +3657,7 @@ func (builder *ResourceCreateWorkItemReqBuilder) TemplateID(templateID int64) *R } -func (builder *ResourceCreateWorkItemReqBuilder) FieldValuePairs(fieldValuePairs []FieldValuePair) *ResourceCreateWorkItemReqBuilder { +func (builder *ResourceCreateWorkItemReqBuilder) FieldValuePairs(fieldValuePairs []WorkItem_work_item_FieldValuePair) *ResourceCreateWorkItemReqBuilder { builder.apiReq.Body.(*ResourceCreateWorkItemReqBody).FieldValuePairs = fieldValuePairs return builder } @@ -3411,11 +3667,74 @@ func (builder *ResourceCreateWorkItemReqBuilder) Build() *ResourceCreateWorkItem return req } +type ResourceSearchByParamsReq struct { + apiReq *core.APIReq +} +type ResourceSearchByParamsReqBody struct { + DataSources []DataSource `json:"data_sources,omitempty"` + SearchGroup *SearchGroup `json:"search_group,omitempty"` + Pagination *Search_concisesearch_Pagination `json:"pagination,omitempty"` + FieldSelected []string `json:"field_selected,omitempty"` + Features map[string]string `json:"features,omitempty"` +} +type ResourceSearchByParamsResp struct { + *core.APIResp `json:"-"` + core.CodeError + Data []ResourceWorkItemInfo `json:"data"` + + Pagination *Search_concisesearch_Pagination `json:"pagination"` + +} + +type ResourceSearchByParamsReqBuilder struct { + apiReq *core.APIReq +} + +func NewResourceSearchByParamsReqBuilder() *ResourceSearchByParamsReqBuilder { + builder := &ResourceSearchByParamsReqBuilder{} + builder.apiReq = &core.APIReq{ + PathParams: core.PathParams{}, + QueryParams: core.QueryParams{}, + Body: &ResourceSearchByParamsReqBody{}, + } + return builder +} + +func (builder *ResourceSearchByParamsReqBuilder) DataSources(dataSources []DataSource) *ResourceSearchByParamsReqBuilder { + builder.apiReq.Body.(*ResourceSearchByParamsReqBody).DataSources = dataSources + return builder +} + +func (builder *ResourceSearchByParamsReqBuilder) SearchGroup(searchGroup *SearchGroup) *ResourceSearchByParamsReqBuilder { + builder.apiReq.Body.(*ResourceSearchByParamsReqBody).SearchGroup = searchGroup + return builder +} + +func (builder *ResourceSearchByParamsReqBuilder) Pagination(pagination *Search_concisesearch_Pagination) *ResourceSearchByParamsReqBuilder { + builder.apiReq.Body.(*ResourceSearchByParamsReqBody).Pagination = pagination + return builder +} + +func (builder *ResourceSearchByParamsReqBuilder) FieldSelected(fieldSelected []string) *ResourceSearchByParamsReqBuilder { + builder.apiReq.Body.(*ResourceSearchByParamsReqBody).FieldSelected = fieldSelected + return builder +} + +func (builder *ResourceSearchByParamsReqBuilder) Features(features map[string]string) *ResourceSearchByParamsReqBuilder { + builder.apiReq.Body.(*ResourceSearchByParamsReqBody).Features = features + return builder +} +func (builder *ResourceSearchByParamsReqBuilder) Build() *ResourceSearchByParamsReq { + req := &ResourceSearchByParamsReq{} + req.apiReq = builder.apiReq + return req +} + type SearchByParamsReq struct { apiReq *core.APIReq } type SearchByParamsReqBody struct { - SearchGroup *SearchGroup `json:"search_group,omitempty"` + SearchGroup *Search_SearchGroup `json:"search_group,omitempty"` PageNum *int64 `json:"page_num,omitempty"` PageSize *int64 `json:"page_size,omitempty"` Fields []string `json:"fields,omitempty"` @@ -3450,7 +3769,7 @@ func (builder *SearchByParamsReqBuilder) ProjectKey(projectKey string) *SearchBy } -func (builder *SearchByParamsReqBuilder) SearchGroup(searchGroup *SearchGroup) *SearchByParamsReqBuilder { +func (builder *SearchByParamsReqBuilder) SearchGroup(searchGroup *Search_SearchGroup) *SearchByParamsReqBuilder { builder.apiReq.Body.(*SearchByParamsReqBody).SearchGroup = searchGroup return builder } @@ -3492,6 +3811,7 @@ type SearchSubtaskReq struct { apiReq *core.APIReq } type SearchSubtaskReqBody struct { + ProjectKeys []string `json:"project_keys,omitempty"` PageSize *int64 `json:"page_size,omitempty"` PageNum *int64 `json:"page_num,omitempty"` Name *string `json:"name,omitempty"` @@ -3523,6 +3843,11 @@ func NewSearchSubtaskReqBuilder() *SearchSubtaskReqBuilder { return builder } +func (builder *SearchSubtaskReqBuilder) ProjectKeys(projectKeys []string) *SearchSubtaskReqBuilder { + builder.apiReq.Body.(*SearchSubtaskReqBody).ProjectKeys = projectKeys + return builder +} + func (builder *SearchSubtaskReqBuilder) PageSize(pageSize int64) *SearchSubtaskReqBuilder { builder.apiReq.Body.(*SearchSubtaskReqBody).PageSize = &pageSize return builder @@ -3576,14 +3901,14 @@ type SearchWorkItemsRelationReqBody struct { PageNum *int64 `json:"page_num,omitempty"` PageSize *int64 `json:"page_size,omitempty"` RelationType *int32 `json:"relation_type,omitempty"` - Expand *Expand `json:"expand,omitempty"` + Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` } type SearchWorkItemsRelationResp struct { *core.APIResp `json:"-"` core.CodeError - Data []WorkItemInfo `json:"data"` + Data []WorkItem_work_item_WorkItemInfo `json:"data"` - Pagination *Pagination `json:"pagination"` + Pagination *WorkItem_common_Pagination `json:"pagination"` } @@ -3649,7 +3974,7 @@ func (builder *SearchWorkItemsRelationReqBuilder) RelationType(relationType int3 } -func (builder *SearchWorkItemsRelationReqBuilder) Expand(expand *Expand) *SearchWorkItemsRelationReqBuilder { +func (builder *SearchWorkItemsRelationReqBuilder) Expand(expand *WorkItem_work_item_Expand) *SearchWorkItemsRelationReqBuilder { builder.apiReq.Body.(*SearchWorkItemsRelationReqBody).Expand = expand return builder } @@ -3667,9 +3992,9 @@ type SubTaskModifyReqBody struct { TaskID *int64 `json:"task_id,omitempty"` Action *string `json:"action,omitempty"` Assignee []string `json:"assignee,omitempty"` - RoleAssignee []RoleOwner `json:"role_assignee,omitempty"` - Schedules []Schedule `json:"schedules,omitempty"` - Deliverable []FieldValuePair `json:"deliverable,omitempty"` + RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` + Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` + Deliverable []WorkItem_work_item_FieldValuePair `json:"deliverable,omitempty"` Note *string `json:"note,omitempty"` } type SubTaskModifyResp struct { @@ -3714,17 +4039,17 @@ func (builder *SubTaskModifyReqBuilder) Assignee(assignee []string) *SubTaskModi return builder } -func (builder *SubTaskModifyReqBuilder) RoleAssignee(roleAssignee []RoleOwner) *SubTaskModifyReqBuilder { +func (builder *SubTaskModifyReqBuilder) RoleAssignee(roleAssignee []WorkItem_work_item_RoleOwner) *SubTaskModifyReqBuilder { builder.apiReq.Body.(*SubTaskModifyReqBody).RoleAssignee = roleAssignee return builder } -func (builder *SubTaskModifyReqBuilder) Schedules(schedules []Schedule) *SubTaskModifyReqBuilder { +func (builder *SubTaskModifyReqBuilder) Schedules(schedules []WorkItem_work_item_Schedule) *SubTaskModifyReqBuilder { builder.apiReq.Body.(*SubTaskModifyReqBody).Schedules = schedules return builder } -func (builder *SubTaskModifyReqBuilder) Deliverable(deliverable []FieldValuePair) *SubTaskModifyReqBuilder { +func (builder *SubTaskModifyReqBuilder) Deliverable(deliverable []WorkItem_work_item_FieldValuePair) *SubTaskModifyReqBuilder { builder.apiReq.Body.(*SubTaskModifyReqBody).Deliverable = deliverable return builder } @@ -3826,8 +4151,8 @@ type UniversalSearchReqBody struct { DataSources []DataSource `json:"data_sources,omitempty"` UserKey *string `json:"user_key,omitempty"` SearchGroup *SearchGroup `json:"search_group,omitempty"` - Sort *Sort `json:"sort,omitempty"` - Pagination *Pagination `json:"pagination,omitempty"` + Sort *Search_concisesearch_Sort `json:"sort,omitempty"` + Pagination *Search_concisesearch_Pagination `json:"pagination,omitempty"` FieldSelected []string `json:"field_selected,omitempty"` Features map[string]string `json:"features,omitempty"` } @@ -3836,7 +4161,7 @@ type UniversalSearchResp struct { core.CodeError Data *string `json:"data"` - Pagination *Pagination `json:"pagination"` + Pagination *Search_concisesearch_Pagination `json:"pagination"` ExtraInfo map[string]string `json:"extra_info"` @@ -3872,12 +4197,12 @@ func (builder *UniversalSearchReqBuilder) SearchGroup(searchGroup *SearchGroup) return builder } -func (builder *UniversalSearchReqBuilder) Sort(sort *Sort) *UniversalSearchReqBuilder { +func (builder *UniversalSearchReqBuilder) Sort(sort *Search_concisesearch_Sort) *UniversalSearchReqBuilder { builder.apiReq.Body.(*UniversalSearchReqBody).Sort = sort return builder } -func (builder *UniversalSearchReqBuilder) Pagination(pagination *Pagination) *UniversalSearchReqBuilder { +func (builder *UniversalSearchReqBuilder) Pagination(pagination *Search_concisesearch_Pagination) *UniversalSearchReqBuilder { builder.apiReq.Body.(*UniversalSearchReqBody).Pagination = pagination return builder } @@ -4094,6 +4419,67 @@ func (builder *UpdateFinishedReqBuilder) Build() *UpdateFinishedReq { return req } +type UpdateFlowRoleReq struct { + apiReq *core.APIReq +} +type UpdateFlowRoleReqBody struct { + RoleID *string `json:"role_id,omitempty"` + RoleAlias *string `json:"role_alias,omitempty"` + Role *RoleConfUpdate `json:"role,omitempty"` +} +type UpdateFlowRoleResp struct { + *core.APIResp `json:"-"` + core.CodeError +} + +type UpdateFlowRoleReqBuilder struct { + apiReq *core.APIReq +} + +func NewUpdateFlowRoleReqBuilder() *UpdateFlowRoleReqBuilder { + builder := &UpdateFlowRoleReqBuilder{} + builder.apiReq = &core.APIReq{ + PathParams: core.PathParams{}, + QueryParams: core.QueryParams{}, + Body: &UpdateFlowRoleReqBody{}, + } + return builder +} + +func (builder *UpdateFlowRoleReqBuilder) ProjectKey(projectKey string) *UpdateFlowRoleReqBuilder { + builder.apiReq.PathParams.Set("project_key", fmt.Sprint(projectKey)) + return builder +} + + +func (builder *UpdateFlowRoleReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateFlowRoleReqBuilder { + builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) + return builder +} + + +func (builder *UpdateFlowRoleReqBuilder) RoleID(roleID string) *UpdateFlowRoleReqBuilder { + builder.apiReq.Body.(*UpdateFlowRoleReqBody).RoleID = &roleID + return builder +} + + +func (builder *UpdateFlowRoleReqBuilder) RoleAlias(roleAlias string) *UpdateFlowRoleReqBuilder { + builder.apiReq.Body.(*UpdateFlowRoleReqBody).RoleAlias = &roleAlias + return builder +} + + +func (builder *UpdateFlowRoleReqBuilder) Role(role *RoleConfUpdate) *UpdateFlowRoleReqBuilder { + builder.apiReq.Body.(*UpdateFlowRoleReqBody).Role = role + return builder +} +func (builder *UpdateFlowRoleReqBuilder) Build() *UpdateFlowRoleReq { + req := &UpdateFlowRoleReq{} + req.apiReq = builder.apiReq + return req +} + type UpdateMultiSignalReq struct { apiReq *core.APIReq } @@ -4177,10 +4563,10 @@ type UpdateNodeStateReqBody struct { Action *string `json:"action,omitempty"` RollbackReason *string `json:"rollback_reason,omitempty"` NodeOwners []string `json:"node_owners,omitempty"` - NodeSchedule *Schedule `json:"node_schedule,omitempty"` - Schedules []Schedule `json:"schedules,omitempty"` - Fields []FieldValuePair `json:"fields,omitempty"` - RoleAssignee []RoleOwner `json:"role_assignee,omitempty"` + NodeSchedule *WorkItem_work_item_Schedule `json:"node_schedule,omitempty"` + Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` + Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` + RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` NodeFields []NodeField `json:"node_fields,omitempty"` FinishedInfos *FinishedInfo `json:"finished_infos,omitempty"` } @@ -4244,22 +4630,22 @@ func (builder *UpdateNodeStateReqBuilder) NodeOwners(nodeOwners []string) *Updat return builder } -func (builder *UpdateNodeStateReqBuilder) NodeSchedule(nodeSchedule *Schedule) *UpdateNodeStateReqBuilder { +func (builder *UpdateNodeStateReqBuilder) NodeSchedule(nodeSchedule *WorkItem_work_item_Schedule) *UpdateNodeStateReqBuilder { builder.apiReq.Body.(*UpdateNodeStateReqBody).NodeSchedule = nodeSchedule return builder } -func (builder *UpdateNodeStateReqBuilder) Schedules(schedules []Schedule) *UpdateNodeStateReqBuilder { +func (builder *UpdateNodeStateReqBuilder) Schedules(schedules []WorkItem_work_item_Schedule) *UpdateNodeStateReqBuilder { builder.apiReq.Body.(*UpdateNodeStateReqBody).Schedules = schedules return builder } -func (builder *UpdateNodeStateReqBuilder) Fields(fields []FieldValuePair) *UpdateNodeStateReqBuilder { +func (builder *UpdateNodeStateReqBuilder) Fields(fields []WorkItem_work_item_FieldValuePair) *UpdateNodeStateReqBuilder { builder.apiReq.Body.(*UpdateNodeStateReqBody).Fields = fields return builder } -func (builder *UpdateNodeStateReqBuilder) RoleAssignee(roleAssignee []RoleOwner) *UpdateNodeStateReqBuilder { +func (builder *UpdateNodeStateReqBuilder) RoleAssignee(roleAssignee []WorkItem_work_item_RoleOwner) *UpdateNodeStateReqBuilder { builder.apiReq.Body.(*UpdateNodeStateReqBody).RoleAssignee = roleAssignee return builder } @@ -4279,13 +4665,69 @@ func (builder *UpdateNodeStateReqBuilder) Build() *UpdateNodeStateReq { return req } +type UpdateResourceWorkItemReq struct { + apiReq *core.APIReq +} +type UpdateResourceWorkItemReqBody struct { + ProjectKey *string `json:"project_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + UpdateFields []WorkItem_work_item_FieldValuePair `json:"update_fields,omitempty"` +} +type UpdateResourceWorkItemResp struct { + *core.APIResp `json:"-"` + core.CodeError +} + +type UpdateResourceWorkItemReqBuilder struct { + apiReq *core.APIReq +} + +func NewUpdateResourceWorkItemReqBuilder() *UpdateResourceWorkItemReqBuilder { + builder := &UpdateResourceWorkItemReqBuilder{} + builder.apiReq = &core.APIReq{ + PathParams: core.PathParams{}, + QueryParams: core.QueryParams{}, + Body: &UpdateResourceWorkItemReqBody{}, + } + return builder +} + +func (builder *UpdateResourceWorkItemReqBuilder) ProjectKey(projectKey string) *UpdateResourceWorkItemReqBuilder { + builder.apiReq.Body.(*UpdateResourceWorkItemReqBody).ProjectKey = &projectKey + return builder +} + + +func (builder *UpdateResourceWorkItemReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateResourceWorkItemReqBuilder { + builder.apiReq.Body.(*UpdateResourceWorkItemReqBody).WorkItemTypeKey = &workItemTypeKey + return builder +} + + +func (builder *UpdateResourceWorkItemReqBuilder) WorkItemID(workItemID int64) *UpdateResourceWorkItemReqBuilder { + builder.apiReq.Body.(*UpdateResourceWorkItemReqBody).WorkItemID = &workItemID + return builder +} + + +func (builder *UpdateResourceWorkItemReqBuilder) UpdateFields(updateFields []WorkItem_work_item_FieldValuePair) *UpdateResourceWorkItemReqBuilder { + builder.apiReq.Body.(*UpdateResourceWorkItemReqBody).UpdateFields = updateFields + return builder +} +func (builder *UpdateResourceWorkItemReqBuilder) Build() *UpdateResourceWorkItemReq { + req := &UpdateResourceWorkItemReq{} + req.apiReq = builder.apiReq + return req +} + type UpdateStateFlowReq struct { apiReq *core.APIReq } type UpdateStateFlowReqBody struct { TransitionID *int64 `json:"transition_id,omitempty"` - Fields []FieldValuePair `json:"fields,omitempty"` - RoleOwners []RoleOwner `json:"role_owners,omitempty"` + Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` + RoleOwners []WorkItem_work_item_RoleOwner `json:"role_owners,omitempty"` } type UpdateStateFlowResp struct { *core.APIResp `json:"-"` @@ -4330,12 +4772,12 @@ func (builder *UpdateStateFlowReqBuilder) TransitionID(transitionID int64) *Upda } -func (builder *UpdateStateFlowReqBuilder) Fields(fields []FieldValuePair) *UpdateStateFlowReqBuilder { +func (builder *UpdateStateFlowReqBuilder) Fields(fields []WorkItem_work_item_FieldValuePair) *UpdateStateFlowReqBuilder { builder.apiReq.Body.(*UpdateStateFlowReqBody).Fields = fields return builder } -func (builder *UpdateStateFlowReqBuilder) RoleOwners(roleOwners []RoleOwner) *UpdateStateFlowReqBuilder { +func (builder *UpdateStateFlowReqBuilder) RoleOwners(roleOwners []WorkItem_work_item_RoleOwner) *UpdateStateFlowReqBuilder { builder.apiReq.Body.(*UpdateStateFlowReqBody).RoleOwners = roleOwners return builder } @@ -4404,7 +4846,7 @@ type UpdateWorkItemReq struct { apiReq *core.APIReq } type UpdateWorkItemReqBody struct { - UpdateFields []FieldValuePair `json:"update_fields,omitempty"` + UpdateFields []WorkItem_work_item_FieldValuePair `json:"update_fields,omitempty"` } type UpdateWorkItemResp struct { *core.APIResp `json:"-"` @@ -4437,7 +4879,7 @@ func (builder *UpdateWorkItemReqBuilder) WorkItemTypeKey(workItemTypeKey string) } -func (builder *UpdateWorkItemReqBuilder) UpdateFields(updateFields []FieldValuePair) *UpdateWorkItemReqBuilder { +func (builder *UpdateWorkItemReqBuilder) UpdateFields(updateFields []WorkItem_work_item_FieldValuePair) *UpdateWorkItemReqBuilder { builder.apiReq.Body.(*UpdateWorkItemReqBody).UpdateFields = updateFields return builder } @@ -4522,11 +4964,11 @@ type UpdateWorkItemSubTaskReq struct { type UpdateWorkItemSubTaskReqBody struct { Name *string `json:"name,omitempty"` Assignee []string `json:"assignee,omitempty"` - RoleAssignee []RoleOwner `json:"role_assignee,omitempty"` - Schedule *Schedule `json:"schedule,omitempty"` + RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` + Schedule *WorkItem_work_item_Schedule `json:"schedule,omitempty"` Note *string `json:"note,omitempty"` - Deliverable []FieldValuePair `json:"deliverable,omitempty"` - UpdateFields []FieldValuePair `json:"update_fields,omitempty"` + Deliverable []WorkItem_work_item_FieldValuePair `json:"deliverable,omitempty"` + UpdateFields []WorkItem_work_item_FieldValuePair `json:"update_fields,omitempty"` } type UpdateWorkItemSubTaskResp struct { *core.APIResp `json:"-"` @@ -4588,12 +5030,12 @@ func (builder *UpdateWorkItemSubTaskReqBuilder) Assignee(assignee []string) *Upd return builder } -func (builder *UpdateWorkItemSubTaskReqBuilder) RoleAssignee(roleAssignee []RoleOwner) *UpdateWorkItemSubTaskReqBuilder { +func (builder *UpdateWorkItemSubTaskReqBuilder) RoleAssignee(roleAssignee []WorkItem_work_item_RoleOwner) *UpdateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*UpdateWorkItemSubTaskReqBody).RoleAssignee = roleAssignee return builder } -func (builder *UpdateWorkItemSubTaskReqBuilder) Schedule(schedule *Schedule) *UpdateWorkItemSubTaskReqBuilder { +func (builder *UpdateWorkItemSubTaskReqBuilder) Schedule(schedule *WorkItem_work_item_Schedule) *UpdateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*UpdateWorkItemSubTaskReqBody).Schedule = schedule return builder } @@ -4604,12 +5046,12 @@ func (builder *UpdateWorkItemSubTaskReqBuilder) Note(note string) *UpdateWorkIte } -func (builder *UpdateWorkItemSubTaskReqBuilder) Deliverable(deliverable []FieldValuePair) *UpdateWorkItemSubTaskReqBuilder { +func (builder *UpdateWorkItemSubTaskReqBuilder) Deliverable(deliverable []WorkItem_work_item_FieldValuePair) *UpdateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*UpdateWorkItemSubTaskReqBody).Deliverable = deliverable return builder } -func (builder *UpdateWorkItemSubTaskReqBuilder) UpdateFields(updateFields []FieldValuePair) *UpdateWorkItemSubTaskReqBuilder { +func (builder *UpdateWorkItemSubTaskReqBuilder) UpdateFields(updateFields []WorkItem_work_item_FieldValuePair) *UpdateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*UpdateWorkItemSubTaskReqBody).UpdateFields = updateFields return builder } @@ -4727,10 +5169,10 @@ type UpdateWorkflowNodeReq struct { } type UpdateWorkflowNodeReqBody struct { NodeOwners []string `json:"node_owners,omitempty"` - NodeSchedule *Schedule `json:"node_schedule,omitempty"` - Schedules []Schedule `json:"schedules,omitempty"` - Fields []FieldValuePair `json:"fields,omitempty"` - RoleAssignee []RoleOwner `json:"role_assignee,omitempty"` + NodeSchedule *WorkItem_work_item_Schedule `json:"node_schedule,omitempty"` + Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` + Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` + RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` } type UpdateWorkflowNodeResp struct { *core.APIResp `json:"-"` @@ -4780,22 +5222,22 @@ func (builder *UpdateWorkflowNodeReqBuilder) NodeOwners(nodeOwners []string) *Up return builder } -func (builder *UpdateWorkflowNodeReqBuilder) NodeSchedule(nodeSchedule *Schedule) *UpdateWorkflowNodeReqBuilder { +func (builder *UpdateWorkflowNodeReqBuilder) NodeSchedule(nodeSchedule *WorkItem_work_item_Schedule) *UpdateWorkflowNodeReqBuilder { builder.apiReq.Body.(*UpdateWorkflowNodeReqBody).NodeSchedule = nodeSchedule return builder } -func (builder *UpdateWorkflowNodeReqBuilder) Schedules(schedules []Schedule) *UpdateWorkflowNodeReqBuilder { +func (builder *UpdateWorkflowNodeReqBuilder) Schedules(schedules []WorkItem_work_item_Schedule) *UpdateWorkflowNodeReqBuilder { builder.apiReq.Body.(*UpdateWorkflowNodeReqBody).Schedules = schedules return builder } -func (builder *UpdateWorkflowNodeReqBuilder) Fields(fields []FieldValuePair) *UpdateWorkflowNodeReqBuilder { +func (builder *UpdateWorkflowNodeReqBuilder) Fields(fields []WorkItem_work_item_FieldValuePair) *UpdateWorkflowNodeReqBuilder { builder.apiReq.Body.(*UpdateWorkflowNodeReqBody).Fields = fields return builder } -func (builder *UpdateWorkflowNodeReqBuilder) RoleAssignee(roleAssignee []RoleOwner) *UpdateWorkflowNodeReqBuilder { +func (builder *UpdateWorkflowNodeReqBuilder) RoleAssignee(roleAssignee []WorkItem_work_item_RoleOwner) *UpdateWorkflowNodeReqBuilder { builder.apiReq.Body.(*UpdateWorkflowNodeReqBody).RoleAssignee = roleAssignee return builder } diff --git a/v2/service/workitem/model.go b/v2/service/workitem/model.go index 5ec49d5..b3be97f 100644 --- a/v2/service/workitem/model.go +++ b/v2/service/workitem/model.go @@ -29,7 +29,7 @@ type Business struct { Labels []string `json:"labels,omitempty"` - RoleOwners map[string]RoleOwner `json:"role_owners,omitempty"` + RoleOwners map[string]WorkItem_work_item_RoleOwner `json:"role_owners,omitempty"` Watchers []string `json:"watchers,omitempty"` @@ -67,6 +67,16 @@ type ChildOrder struct { } +type Common_RoleOwner struct { + + Role *string `json:"role,omitempty"` + + RoleKey *string `json:"role_key,omitempty"` + + Owners []UserDetail `json:"owners,omitempty"` + +} + type CompInfo struct { ID *string `json:"ID,omitempty"` @@ -91,20 +101,20 @@ type CompInfo struct { type Condition struct { - Field *string `json:"field,omitempty"` - - FieldType *string `json:"field_type,omitempty"` - - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + FieldItem *FieldItem `json:"field_item,omitempty"` Operator *string `json:"operator,omitempty"` - ValueList []string `json:"value_list,omitempty"` + OriginalValue *string `json:"original_value,omitempty"` - Params map[string]string `json:"params,omitempty"` + Formula *string `json:"formula,omitempty"` Version *string `json:"version,omitempty"` + PreOperator *string `json:"pre_operator,omitempty"` + + ValueGroup *Filter `json:"value_group,omitempty"` + } type ConfirmForm struct { @@ -123,8 +133,6 @@ type Connection struct { TransitionID *int64 `json:"transition_id,omitempty"` - Fields []FieldConf `json:"fields,omitempty"` - } type CreateWorkItemRelationData struct { @@ -245,12 +253,6 @@ type Expand struct { NeedSubTaskParent *bool `json:"need_sub_task_parent,omitempty"` - NeedUnionDeliverable *bool `json:"need_union_deliverable,omitempty"` - - NeedWbsRelationChainEntity *bool `json:"need_wbs_relation_chain_entity,omitempty"` - - NeedWbsRelationChainPath *bool `json:"need_wbs_relation_chain_path,omitempty"` - } type FieldConf struct { @@ -297,7 +299,7 @@ type FieldConf struct { type FieldDeliverableItem struct { - FieldInfo *FieldValuePair `json:"field_info,omitempty"` + FieldInfo *WorkItem_work_item_FieldValuePair `json:"field_info,omitempty"` Placeholder *string `json:"placeholder,omitempty"` @@ -357,8 +359,6 @@ type FieldValuePair struct { HelpDescription *string `json:"help_description,omitempty"` - UpdateMode *int32 `json:"update_mode,omitempty"` - } type Filter struct { @@ -625,7 +625,7 @@ type NodeTask struct { StateKey *string `json:"state_key,omitempty"` - SubTasks []SubTask `json:"sub_tasks,omitempty"` + SubTasks []WorkItem_work_item_SubTask `json:"sub_tasks,omitempty"` NodeName *string `json:"node_name,omitempty"` @@ -643,7 +643,7 @@ type NodeWBSRoleOwners struct { Name *string `json:"name,omitempty"` - RoleOwners []RoleOwner `json:"role_owners,omitempty"` + RoleOwners []WorkItem_work_item_RoleOwner `json:"role_owners,omitempty"` WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` @@ -659,10 +659,6 @@ type NodesConnections struct { UserDetails []UserDetail `json:"user_details,omitempty"` - TemplateID *int64 `json:"template_id,omitempty"` - - Version *int64 `json:"version,omitempty"` - } type NumberConfig struct { @@ -821,6 +817,8 @@ type OAPIRecordContent struct { BelongObject []OpRecordObject `json:"belong_object,omitempty"` + Extra map[string][]string `json:"extra,omitempty"` + } type ObjectStatusValue struct { @@ -873,7 +871,7 @@ type OperationValue struct { Name *string `json:"name,omitempty"` - RoleOwners []RoleOwner `json:"role_owners,omitempty"` + RoleOwners []WorkItem_work_item_RoleOwner `json:"role_owners,omitempty"` OperationCreate *OperationCreate `json:"operation_create,omitempty"` @@ -885,13 +883,13 @@ type OperationValue struct { Reason *string `json:"reason,omitempty"` - Schedule *Schedule `json:"schedule,omitempty"` + Schedule *WorkItem_work_item_Schedule `json:"schedule,omitempty"` - Schedules []Schedule `json:"schedules,omitempty"` + Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` WbsWorkItem *WBSWorkItem `json:"wbs_work_item,omitempty"` - Connections []Connection `json:"connections,omitempty"` + Connections []WorkItem_work_item_Connection `json:"connections,omitempty"` RestoreUuids []string `json:"restore_uuids,omitempty"` @@ -1017,7 +1015,7 @@ type Query struct { QueryType *int32 `json:"query_type,omitempty"` - Pagination *Pagination `json:"pagination,omitempty"` + Pagination *Search_apicommon_Pagination `json:"pagination,omitempty"` Projection map[string]int64 `json:"projection,omitempty"` @@ -1217,6 +1215,44 @@ type RequiredTask struct { } +type ResourceLibSetting struct { + + EnableFields []SimpleField `json:"enable_fields,omitempty"` + + EnableRoles []SimpleRoleConf `json:"enable_roles,omitempty"` + +} + +type ResourceWorkItemInfo struct { + + WorkItemID *int64 `json:"work_item_id,omitempty"` + + Name *string `json:"name,omitempty"` + + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + + ProjectKey *string `json:"project_key,omitempty"` + + TemplateType *string `json:"template_type,omitempty"` + + CreatedBy *UserDetail `json:"created_by,omitempty"` + + UpdatedBy *UserDetail `json:"updated_by,omitempty"` + + CreatedAt *int64 `json:"created_at,omitempty"` + + UpdatedAt *int64 `json:"updated_at,omitempty"` + + Owner *UserDetail `json:"owner,omitempty"` + + RoleOwners []Common_RoleOwner `json:"role_owners,omitempty"` + + TemplateVersion *int64 `json:"template_version,omitempty"` + + Template *Template `json:"template,omitempty"` + +} + type RoleAssign struct { Role *string `json:"role,omitempty"` @@ -1233,6 +1269,28 @@ type RoleAssign struct { } +type RoleConfCreate struct { + + ID *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + IsOwner *bool `json:"is_owner,omitempty"` + + AutoEnterGroup *bool `json:"auto_enter_group,omitempty"` + + MemberAssignMode *int32 `json:"member_assign_mode,omitempty"` + + Members []string `json:"members,omitempty"` + + IsMemberMulti *bool `json:"is_member_multi,omitempty"` + + RoleAlias *string `json:"role_alias,omitempty"` + + LockScope []string `json:"lock_scope,omitempty"` + +} + type RoleConfDetail struct { ID *string `json:"id,omitempty"` @@ -1261,6 +1319,32 @@ type RoleConfDetail struct { IsRequired *int32 `json:"is_required,omitempty"` + RoleAlias *string `json:"role_alias,omitempty"` + + LockAppID *string `json:"lock_app_id,omitempty"` + + LockScope []string `json:"lock_scope,omitempty"` + +} + +type RoleConfUpdate struct { + + Name *string `json:"name,omitempty"` + + IsOwner *bool `json:"is_owner,omitempty"` + + AutoEnterGroup *bool `json:"auto_enter_group,omitempty"` + + MemberAssignMode *int32 `json:"member_assign_mode,omitempty"` + + Members []string `json:"members,omitempty"` + + IsMemberMulti *bool `json:"is_member_multi,omitempty"` + + RoleAlias *string `json:"role_alias,omitempty"` + + LockScope []string `json:"lock_scope,omitempty"` + } type RoleOwner struct { @@ -1271,10 +1355,6 @@ type RoleOwner struct { Owners []string `json:"owners,omitempty"` - Exist *bool `json:"exist,omitempty"` - - IsMemberMulti *bool `json:"is_member_multi,omitempty"` - } type Schedule struct { @@ -1289,10 +1369,6 @@ type Schedule struct { ActualWorkTime *float64 `json:"actual_work_time,omitempty"` - IsAuto *bool `json:"is_auto,omitempty"` - - PlannedConstructionPeriod *int32 `json:"planned_construction_period,omitempty"` - } type ScheduleReferenceValue struct { @@ -1341,6 +1417,68 @@ type SearchUser struct { } +type Search_SearchGroup struct { + + SearchParams []Search_SearchParam `json:"search_params,omitempty"` + + Conjunction *string `json:"conjunction,omitempty"` + + SearchGroups []Search_SearchGroup `json:"search_groups,omitempty"` + +} + +type Search_SearchParam struct { + + ParamKey *string `json:"param_key,omitempty"` + + Value interface{} `json:"value,omitempty"` + + Operator *string `json:"operator,omitempty"` + + PreOperator *string `json:"pre_operator,omitempty"` + + ValueSearchGroups *Search_SearchGroup `json:"value_search_groups,omitempty"` + +} + +type Search_apicommon_Pagination struct { + + PageNum *int64 `json:"page_num,omitempty"` + + PageSize *int64 `json:"page_size,omitempty"` + + SearchAfter *string `json:"search_after,omitempty"` + + Pit *string `json:"pit,omitempty"` + +} + +type Search_concisesearch_Pagination struct { + + PageSize *int64 `json:"page_size,omitempty"` + + SearchAfter *string `json:"search_after,omitempty"` + + Pit *string `json:"pit,omitempty"` + + Total *int64 `json:"total,omitempty"` + +} + +type Search_concisesearch_Sort struct { + + FieldKey *string `json:"field_key,omitempty"` + + FieldType *string `json:"field_type,omitempty"` + + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + + Order *string `json:"order,omitempty"` + + Params map[string]string `json:"params,omitempty"` + +} + type SeqOrderInfo struct { Pre []OrderInfo `json:"pre,omitempty"` @@ -1393,16 +1531,10 @@ type SimpleRoleConf struct { type Sort struct { - FieldKey *string `json:"field_key,omitempty"` - - FieldType *string `json:"field_type,omitempty"` - - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + FieldItem *FieldItem `json:"field_item,omitempty"` Order *string `json:"order,omitempty"` - Params map[string]string `json:"params,omitempty"` - } type StateFlowConfInfo struct { @@ -1491,7 +1623,7 @@ type SubInstanceCreate struct { WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - FieldValues []FieldValuePair `json:"field_values,omitempty"` + FieldValues []WorkItem_work_item_FieldValuePair `json:"field_values,omitempty"` RelationCase *RelationCaseDetailForUpdate `json:"relation_case,omitempty"` @@ -1545,10 +1677,6 @@ type SubTask struct { Deliverable []FieldValuePair `json:"deliverable,omitempty"` - OwnerRoles []string `json:"owner_roles,omitempty"` - - OwnerUsageMode *int64 `json:"owner_usage_mode,omitempty"` - Fields []FieldValuePair `json:"fields,omitempty"` } @@ -1649,6 +1777,16 @@ type TeamOption struct { } +type Template struct { + + ID *int64 `json:"id,omitempty"` + + StateFlowKey *string `json:"state_flow_key,omitempty"` + + WorkFlowKey *string `json:"work_flow_key,omitempty"` + +} + type TemplateConf struct { TemplateID *string `json:"template_id,omitempty"` @@ -1671,7 +1809,7 @@ type TemplateDetail struct { StateFlowConfs []StateFlowConfInfo `json:"state_flow_confs,omitempty"` - Connections []Connection `json:"connections,omitempty"` + Connections []WorkItem_work_item_Connection `json:"connections,omitempty"` TemplateID *int64 `json:"template_id,omitempty"` @@ -1739,9 +1877,9 @@ type WBSInfo struct { RelatedParentWorkItem *WBSParentWorkItem `json:"related_parent_work_item,omitempty"` - UserDetails []UserDetail `json:"user_details,omitempty"` + UserDetails []WorkItem_work_item_UserDetail `json:"user_details,omitempty"` - Connections []Connection `json:"connections,omitempty"` + Connections []WorkItem_work_item_Connection `json:"connections,omitempty"` RelationChainPath *WBSRelationChainPath `json:"relation_chain_path,omitempty"` @@ -1849,21 +1987,21 @@ type WBSWorkItem struct { Name *string `json:"name,omitempty"` - Deliverable []FieldValuePair `json:"deliverable,omitempty"` + Deliverable []WorkItem_work_item_FieldValuePair `json:"deliverable,omitempty"` - Schedule *Schedule `json:"schedule,omitempty"` + Schedule *WorkItem_work_item_Schedule `json:"schedule,omitempty"` - Schedules []Schedule `json:"schedules,omitempty"` + Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` Points *float64 `json:"points,omitempty"` - RoleOwners []RoleOwner `json:"role_owners,omitempty"` + RoleOwners []WorkItem_work_item_RoleOwner `json:"role_owners,omitempty"` WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` Milestone *bool `json:"milestone,omitempty"` - Connections []Connection `json:"connections,omitempty"` + Connections []WorkItem_work_item_Connection `json:"connections,omitempty"` StateKey *string `json:"state_key,omitempty"` @@ -1889,6 +2027,8 @@ type WBSWorkItem struct { DismantleMode *int64 `json:"dismantle_mode,omitempty"` + Status *int64 `json:"status,omitempty"` + Dependencies []DependencyInfo `json:"dependencies,omitempty"` RelativeScheduleV2 []ScheduleReferenceValue `json:"relative_schedule_v2,omitempty"` @@ -1907,15 +2047,15 @@ type WbsDraft struct { RelatedSubWorkItems []WBSWorkItem `json:"related_sub_work_items,omitempty"` - Connections []Connection `json:"connections,omitempty"` + Connections []WorkItem_work_item_Connection `json:"connections,omitempty"` DraftID *string `json:"draft_id,omitempty"` DeleteUuids []string `json:"delete_uuids,omitempty"` - RoleOwners map[int64][]RoleOwner `json:"role_owners,omitempty"` + RoleOwners map[int64][]WorkItem_work_item_RoleOwner `json:"role_owners,omitempty"` - UserDetails []UserDetail `json:"user_details,omitempty"` + UserDetails []WorkItem_work_item_UserDetail `json:"user_details,omitempty"` WorkItemID *int64 `json:"work_item_id,omitempty"` @@ -2003,8 +2143,6 @@ type WorkItemInfo struct { SubTaskParentInfo *SubTaskParentInfo `json:"sub_task_parent_info,omitempty"` - CompoundFieldExtra []FieldValuePair `json:"compound_field_extra,omitempty"` - } type WorkItemKeyType struct { @@ -2017,6 +2155,8 @@ type WorkItemKeyType struct { APIName *string `json:"api_name,omitempty"` + EnableModelResourceLib *bool `json:"enable_model_resource_lib,omitempty"` + } type WorkItemRelation struct { @@ -2087,77 +2227,389 @@ type WorkItemTypeInfo struct { ActualWorkTimeSwitch *bool `json:"actual_work_time_switch,omitempty"` + EnableModelResourceLib *bool `json:"enable_model_resource_lib,omitempty"` + + ResourceLibSetting *ResourceLibSetting `json:"resource_lib_setting,omitempty"` + } -type WorkflowConf struct { +type WorkItem_common_Pagination struct { - StatusInfos []StatusConf `json:"status_infos,omitempty"` + PageNum *int64 `json:"page_num,omitempty"` - NodeInfos []NodeConf `json:"node_infos,omitempty"` + PageSize *int64 `json:"page_size,omitempty"` - Connections []Connection `json:"connections,omitempty"` + Total *int64 `json:"total,omitempty"` } -type WorkflowConfInfo struct { +type WorkItem_work_item_Checker struct { - StateKey *string `json:"state_key,omitempty"` + CheckedTime *int64 `json:"checked_time,omitempty"` - Name *string `json:"name,omitempty"` + Owner *string `json:"owner,omitempty"` - Tags []string `json:"tags,omitempty"` + Status *int32 `json:"status,omitempty"` - OwnerUsageMode *int64 `json:"owner_usage_mode,omitempty"` +} - OwnerRoles []string `json:"owner_roles,omitempty"` +type WorkItem_work_item_Connection struct { - Owners []string `json:"owners,omitempty"` + SourceStateKey *string `json:"source_state_key,omitempty"` - NeedSchedule *bool `json:"need_schedule,omitempty"` + TargetStateKey *string `json:"target_state_key,omitempty"` - DifferentSchedule *bool `json:"different_schedule,omitempty"` + TransitionID *int64 `json:"transition_id,omitempty"` - VisibilityUsageMode *int64 `json:"visibility_usage_mode,omitempty"` + Fields []FieldConf `json:"fields,omitempty"` - Deletable *bool `json:"deletable,omitempty"` +} - DeletableOperationRole []string `json:"deletable_operation_role,omitempty"` +type WorkItem_work_item_Expand struct { - PassMode *int64 `json:"pass_mode,omitempty"` + NeedWorkflow *bool `json:"need_workflow,omitempty"` - IsLimitNode *bool `json:"is_limit_node,omitempty"` + RelationFieldsDetail *bool `json:"relation_fields_detail,omitempty"` - DoneOperationRole []string `json:"done_operation_role,omitempty"` + NeedMultiText *bool `json:"need_multi_text,omitempty"` - DoneSchedule *bool `json:"done_schedule,omitempty"` + NeedUserDetail *bool `json:"need_user_detail,omitempty"` - DoneAllocateOwner *bool `json:"done_allocate_owner,omitempty"` + NeedSubTaskParent *bool `json:"need_sub_task_parent,omitempty"` - Action *int64 `json:"action,omitempty"` + NeedUnionDeliverable *bool `json:"need_union_deliverable,omitempty"` - PreNodeStateKey []string `json:"pre_node_state_key,omitempty"` + NeedWbsRelationChainEntity *bool `json:"need_wbs_relation_chain_entity,omitempty"` - CompletionTips *string `json:"completion_tips,omitempty"` + NeedWbsRelationChainPath *bool `json:"need_wbs_relation_chain_path,omitempty"` - TaskConfs []TaskConf `json:"task_confs,omitempty"` +} - BelongStatus *string `json:"belong_status,omitempty"` +type WorkItem_work_item_FieldDetail struct { - DoneActualPoint *bool `json:"done_actual_point,omitempty"` + StoryID *int64 `json:"story_id,omitempty"` - IsMilestone *bool `json:"is_milestone,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - DoneFinishTime *bool `json:"done_finish_time,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` - Fields []FieldConf `json:"fields,omitempty"` +} - SubWorkItems []SubWorkItemConfInfo `json:"sub_work_items,omitempty"` +type WorkItem_work_item_FieldValuePair struct { - SubTasks []TaskConfInfo `json:"sub_tasks,omitempty"` + FieldKey *string `json:"field_key,omitempty"` -} + FieldValue interface{} `json:"field_value,omitempty"` -type WorkflowNode struct { + TargetState *WorkItem_work_item_TargetState `json:"target_state,omitempty"` + + FieldTypeKey *string `json:"field_type_key,omitempty"` + + FieldAlias *string `json:"field_alias,omitempty"` + + HelpDescription *string `json:"help_description,omitempty"` + + UpdateMode *int32 `json:"update_mode,omitempty"` + +} + +type WorkItem_work_item_MultiText struct { + + FieldKey *string `json:"field_key,omitempty"` + + FieldValue *WorkItem_work_item_MultiTextDetail `json:"field_value,omitempty"` + +} + +type WorkItem_work_item_MultiTextDetail struct { + + Doc *string `json:"doc,omitempty"` + + DocText *string `json:"doc_text,omitempty"` + + IsEmpty *bool `json:"is_empty,omitempty"` + + NotifyUserList []string `json:"notify_user_list,omitempty"` + + NotifyUserType *string `json:"notify_user_type,omitempty"` + + DocHTML *string `json:"doc_html,omitempty"` + +} + +type WorkItem_work_item_NodeBasicInfo struct { + + ID *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Owners []string `json:"owners,omitempty"` + + Milestone *bool `json:"milestone,omitempty"` + +} + +type WorkItem_work_item_NodesConnections struct { + + WorkflowNodes []WorkItem_work_item_WorkflowNode `json:"workflow_nodes,omitempty"` + + Connections []WorkItem_work_item_Connection `json:"connections,omitempty"` + + StateFlowNodes []WorkItem_work_item_StateFlowNode `json:"state_flow_nodes,omitempty"` + + UserDetails []WorkItem_work_item_UserDetail `json:"user_details,omitempty"` + + TemplateID *int64 `json:"template_id,omitempty"` + + Version *int64 `json:"version,omitempty"` + +} + +type WorkItem_work_item_RelationFieldDetail struct { + + FieldKey *string `json:"field_key,omitempty"` + + Detail []WorkItem_work_item_FieldDetail `json:"detail,omitempty"` + +} + +type WorkItem_work_item_ResourceWorkItemInfo struct { + + ID *int64 `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + + ProjectKey *string `json:"project_key,omitempty"` + + TemplateType *string `json:"template_type,omitempty"` + + CreatedBy *string `json:"created_by,omitempty"` + + UpdatedBy *string `json:"updated_by,omitempty"` + + CreatedAt *int64 `json:"created_at,omitempty"` + + UpdatedAt *int64 `json:"updated_at,omitempty"` + + Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` + + SimpleName *string `json:"simple_name,omitempty"` + + TemplateID *int64 `json:"template_id,omitempty"` + + MultiTexts []WorkItem_work_item_MultiText `json:"multi_texts,omitempty"` + + RelationFieldsDetail []WorkItem_work_item_RelationFieldDetail `json:"relation_fields_detail,omitempty"` + + UserDetails []WorkItem_work_item_UserDetail `json:"user_details,omitempty"` + +} + +type WorkItem_work_item_RoleOwner struct { + + Role *string `json:"role,omitempty"` + + Name *string `json:"name,omitempty"` + + Owners []string `json:"owners,omitempty"` + + Exist *bool `json:"exist,omitempty"` + + IsMemberMulti *bool `json:"is_member_multi,omitempty"` + +} + +type WorkItem_work_item_Schedule struct { + + Points *float64 `json:"points,omitempty"` + + EstimateStartDate *int64 `json:"estimate_start_date,omitempty"` + + EstimateEndDate *int64 `json:"estimate_end_date,omitempty"` + + Owners []string `json:"owners,omitempty"` + + ActualWorkTime *float64 `json:"actual_work_time,omitempty"` + + IsAuto *bool `json:"is_auto,omitempty"` + + PlannedConstructionPeriod *int32 `json:"planned_construction_period,omitempty"` + +} + +type WorkItem_work_item_StateFlowNode struct { + + ID *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + RoleOwners []WorkItem_work_item_RoleOwner `json:"role_owners,omitempty"` + + Status *int32 `json:"status,omitempty"` + + ActualBeginTime *string `json:"actual_begin_time,omitempty"` + + ActualFinishTime *string `json:"actual_finish_time,omitempty"` + + Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` + +} + +type WorkItem_work_item_StateTime struct { + + StateKey *string `json:"state_key,omitempty"` + + StartTime *int64 `json:"start_time,omitempty"` + + EndTime *int64 `json:"end_time,omitempty"` + + Name *string `json:"name,omitempty"` + +} + +type WorkItem_work_item_SubTask struct { + + ID *string `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` + + Order *float64 `json:"order,omitempty"` + + Details *string `json:"details,omitempty"` + + Passed *bool `json:"passed,omitempty"` + + Owners []string `json:"owners,omitempty"` + + Note *string `json:"note,omitempty"` + + ActualBeginTime *string `json:"actual_begin_time,omitempty"` + + ActualFinishTime *string `json:"actual_finish_time,omitempty"` + + Assignee []string `json:"assignee,omitempty"` + + RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` + + Deliverable []WorkItem_work_item_FieldValuePair `json:"deliverable,omitempty"` + + OwnerRoles []string `json:"owner_roles,omitempty"` + + OwnerUsageMode *int64 `json:"owner_usage_mode,omitempty"` + + Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` + +} + +type WorkItem_work_item_SubTaskParentInfo struct { + + WorkItemID *int64 `json:"work_item_id,omitempty"` + + WorkItemName *string `json:"work_item_name,omitempty"` + + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + + NodeID *string `json:"node_id,omitempty"` + +} + +type WorkItem_work_item_TargetState struct { + + StateKey *string `json:"state_key,omitempty"` + + TransitionID *int64 `json:"transition_id,omitempty"` + +} + +type WorkItem_work_item_UserDetail struct { + + UserKey *string `json:"user_key,omitempty"` + + Username *string `json:"username,omitempty"` + + Email *string `json:"email,omitempty"` + + NameCn *string `json:"name_cn,omitempty"` + + NameEn *string `json:"name_en,omitempty"` + +} + +type WorkItem_work_item_WorkItemInfo struct { + + ID *int64 `json:"id,omitempty"` + + Name *string `json:"name,omitempty"` + + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + + ProjectKey *string `json:"project_key,omitempty"` + + TemplateType *string `json:"template_type,omitempty"` + + Pattern *string `json:"pattern,omitempty"` + + SubStage *string `json:"sub_stage,omitempty"` + + CurrentNodes []WorkItem_work_item_NodeBasicInfo `json:"current_nodes,omitempty"` + + CreatedBy *string `json:"created_by,omitempty"` + + UpdatedBy *string `json:"updated_by,omitempty"` + + CreatedAt *int64 `json:"created_at,omitempty"` + + UpdatedAt *int64 `json:"updated_at,omitempty"` + + Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` + + WorkItemStatus *WorkItem_work_item_WorkItemStatus `json:"work_item_status,omitempty"` + + DeletedBy *string `json:"deleted_by,omitempty"` + + DeletedAt *int64 `json:"deleted_at,omitempty"` + + SimpleName *string `json:"simple_name,omitempty"` + + TemplateID *int64 `json:"template_id,omitempty"` + + WorkflowInfos *WorkItem_work_item_NodesConnections `json:"workflow_infos,omitempty"` + + StateTimes []WorkItem_work_item_StateTime `json:"state_times,omitempty"` + + MultiTexts []WorkItem_work_item_MultiText `json:"multi_texts,omitempty"` + + RelationFieldsDetail []WorkItem_work_item_RelationFieldDetail `json:"relation_fields_detail,omitempty"` + + UserDetails []WorkItem_work_item_UserDetail `json:"user_details,omitempty"` + + SubTaskParentInfo *WorkItem_work_item_SubTaskParentInfo `json:"sub_task_parent_info,omitempty"` + + CompoundFieldExtra []WorkItem_work_item_FieldValuePair `json:"compound_field_extra,omitempty"` + +} + +type WorkItem_work_item_WorkItemStatus struct { + + StateKey *string `json:"state_key,omitempty"` + + IsArchivedState *bool `json:"is_archived_state,omitempty"` + + IsInitState *bool `json:"is_init_state,omitempty"` + + UpdatedAt *int64 `json:"updated_at,omitempty"` + + UpdatedBy *string `json:"updated_by,omitempty"` + + History []WorkItem_work_item_WorkItemStatus `json:"history,omitempty"` + +} + +type WorkItem_work_item_WorkflowNode struct { ID *string `json:"id,omitempty"` @@ -2167,25 +2619,25 @@ type WorkflowNode struct { Status *int32 `json:"status,omitempty"` - Fields []FieldValuePair `json:"fields,omitempty"` + Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` Owners []string `json:"owners,omitempty"` - NodeSchedule *Schedule `json:"node_schedule,omitempty"` + NodeSchedule *WorkItem_work_item_Schedule `json:"node_schedule,omitempty"` - Schedules []Schedule `json:"schedules,omitempty"` + Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` - SubTasks []SubTask `json:"sub_tasks,omitempty"` + SubTasks []WorkItem_work_item_SubTask `json:"sub_tasks,omitempty"` ActualBeginTime *string `json:"actual_begin_time,omitempty"` ActualFinishTime *string `json:"actual_finish_time,omitempty"` - RoleAssignee []RoleOwner `json:"role_assignee,omitempty"` + RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` DifferentSchedule *bool `json:"different_schedule,omitempty"` - SubStatus []Checker `json:"sub_status,omitempty"` + SubStatus []WorkItem_work_item_Checker `json:"sub_status,omitempty"` Milestone *bool `json:"milestone,omitempty"` @@ -2200,3 +2652,107 @@ type WorkflowNode struct { FinishedInfos *FinishedInfo `json:"finished_infos,omitempty"` } + +type WorkflowConf struct { + + StatusInfos []StatusConf `json:"status_infos,omitempty"` + + NodeInfos []NodeConf `json:"node_infos,omitempty"` + + Connections []WorkItem_work_item_Connection `json:"connections,omitempty"` + +} + +type WorkflowConfInfo struct { + + StateKey *string `json:"state_key,omitempty"` + + Name *string `json:"name,omitempty"` + + Tags []string `json:"tags,omitempty"` + + OwnerUsageMode *int64 `json:"owner_usage_mode,omitempty"` + + OwnerRoles []string `json:"owner_roles,omitempty"` + + Owners []string `json:"owners,omitempty"` + + NeedSchedule *bool `json:"need_schedule,omitempty"` + + DifferentSchedule *bool `json:"different_schedule,omitempty"` + + VisibilityUsageMode *int64 `json:"visibility_usage_mode,omitempty"` + + Deletable *bool `json:"deletable,omitempty"` + + DeletableOperationRole []string `json:"deletable_operation_role,omitempty"` + + PassMode *int64 `json:"pass_mode,omitempty"` + + IsLimitNode *bool `json:"is_limit_node,omitempty"` + + DoneOperationRole []string `json:"done_operation_role,omitempty"` + + DoneSchedule *bool `json:"done_schedule,omitempty"` + + DoneAllocateOwner *bool `json:"done_allocate_owner,omitempty"` + + Action *int64 `json:"action,omitempty"` + + PreNodeStateKey []string `json:"pre_node_state_key,omitempty"` + + CompletionTips *string `json:"completion_tips,omitempty"` + + TaskConfs []TaskConf `json:"task_confs,omitempty"` + + BelongStatus *string `json:"belong_status,omitempty"` + + DoneActualPoint *bool `json:"done_actual_point,omitempty"` + + IsMilestone *bool `json:"is_milestone,omitempty"` + + DoneFinishTime *bool `json:"done_finish_time,omitempty"` + + Fields []FieldConf `json:"fields,omitempty"` + + SubWorkItems []SubWorkItemConfInfo `json:"sub_work_items,omitempty"` + + SubTasks []TaskConfInfo `json:"sub_tasks,omitempty"` + +} + +type WorkflowNode struct { + + ID *string `json:"id,omitempty"` + + StateKey *string `json:"state_key,omitempty"` + + Name *string `json:"name,omitempty"` + + Status *int32 `json:"status,omitempty"` + + Fields []FieldValuePair `json:"fields,omitempty"` + + Owners []string `json:"owners,omitempty"` + + NodeSchedule *Schedule `json:"node_schedule,omitempty"` + + Schedules []Schedule `json:"schedules,omitempty"` + + SubTasks []SubTask `json:"sub_tasks,omitempty"` + + ActualBeginTime *string `json:"actual_begin_time,omitempty"` + + ActualFinishTime *string `json:"actual_finish_time,omitempty"` + + RoleAssignee []RoleOwner `json:"role_assignee,omitempty"` + + DifferentSchedule *bool `json:"different_schedule,omitempty"` + + SubStatus []Checker `json:"sub_status,omitempty"` + + Milestone *bool `json:"milestone,omitempty"` + + Participants []string `json:"participants,omitempty"` + +} From afed12aa5f291092f3fcc575c3108283b7c5ab45 Mon Sep 17 00:00:00 2001 From: "kang.zou" Date: Tue, 5 Aug 2025 15:34:52 +0800 Subject: [PATCH 3/5] feat.update_compound_field --- sample/demoV2.go | 4 ++-- v2/service/workitem/model.go | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sample/demoV2.go b/sample/demoV2.go index 64e05c3..53a3bb0 100644 --- a/sample/demoV2.go +++ b/sample/demoV2.go @@ -60,8 +60,8 @@ func updateWorkItemV2(client *sdk.ClientV2) { var work_item_id int64 = 0 fieldKey := "name" fieldValue := "fieldValue" - fieldValuePairs := []workitem.FieldValuePair{ - workitem.FieldValuePair{ + fieldValuePairs := []workitem.WorkItem_work_item_FieldValuePair{ + workitem.WorkItem_work_item_FieldValuePair{ FieldKey: &fieldKey, FieldValue: &fieldValue, }, diff --git a/v2/service/workitem/model.go b/v2/service/workitem/model.go index b3be97f..ee9485f 100644 --- a/v2/service/workitem/model.go +++ b/v2/service/workitem/model.go @@ -2283,6 +2283,8 @@ type WorkItem_work_item_Expand struct { NeedWbsRelationChainPath *bool `json:"need_wbs_relation_chain_path,omitempty"` + NeedGroupUUIDForCompound *bool `json:"need_group_uuid_for_compound,omitempty"` + } type WorkItem_work_item_FieldDetail struct { From ed3b02c9f9d084262d96a434fe8b27e8a9fe08d2 Mon Sep 17 00:00:00 2001 From: "kang.zou" Date: Thu, 11 Sep 2025 14:06:10 +0800 Subject: [PATCH 4/5] fix.func name delete oapi --- v2/service/workitem/api.go | 20 +- v2/service/workitem/builder.go | 1229 ++++++++++++-------------------- 2 files changed, 466 insertions(+), 783 deletions(-) diff --git a/v2/service/workitem/api.go b/v2/service/workitem/api.go index e4f2496..562f51d 100644 --- a/v2/service/workitem/api.go +++ b/v2/service/workitem/api.go @@ -7,7 +7,6 @@ import ( "github.com/larksuite/project-oapi-sdk-golang/core" ) - const APIPath_AbortWorkItem = "/open_api/:project_key/work_item/:work_item_type_key/:work_item_id/abort" const APIPath_ActualTimeUpdate = "/open_api/work_item/actual_time/update" @@ -90,7 +89,7 @@ const APIPath_InviteBotJoinChat = "/open_api/:project_key/work_item/:work_item_i const APIPath_ListTemplateConf = "/open_api/:project_key/template_list/:work_item_type_key" -const APIPath_OAPIUpdateCompoundFieldValue = "/open_api/work_item/field_value/update_compound_field" +const APIPath_UpdateCompoundFieldValue = "/open_api/work_item/field_value/update_compound_field" const APIPath_PatchWBSViewDraft = "/open_api/work_item/wbs_view_draft/patch" @@ -174,7 +173,6 @@ const APIPath_WBSUpdateDraftFrozenRows = "/open_api/:project_key/wbs_view_draft/ const APIPath_WbsCollaborationPublish = "/open_api/:project_key/wbs_view_draft/publish" - func NewService(config *core.Config) *WorkItemService { a := &WorkItemService{config: config} return a @@ -184,7 +182,6 @@ type WorkItemService struct { config *core.Config } - /* * @name: OAPIAbortWorkItem * @desc: 终止/恢复工作项 @@ -258,7 +255,7 @@ func (a *WorkItemService) BatchQueryConclusionOption(ctx context.Context, req *B } /* - * + * */ func (a *WorkItemService) BatchQueryDeliverable(ctx context.Context, req *BatchQueryDeliverableReq, options ...core.RequestOptionFunc) (*BatchQueryDeliverableResp, error) { // 发起请求 @@ -1169,24 +1166,24 @@ func (a *WorkItemService) ListTemplateConf(ctx context.Context, req *ListTemplat } /* - * @name: OAPIUpdateCompoundFieldValue + * @name: UpdateCompoundFieldValue * @desc: 增量更新复合字段 */ -func (a *WorkItemService) OAPIUpdateCompoundFieldValue(ctx context.Context, req *OAPIUpdateCompoundFieldValueReq, options ...core.RequestOptionFunc) (*OAPIUpdateCompoundFieldValueResp, error) { +func (a *WorkItemService) UpdateCompoundFieldValue(ctx context.Context, req *UpdateCompoundFieldValueReq, options ...core.RequestOptionFunc) (*UpdateCompoundFieldValueResp, error) { // 发起请求 apiReq := req.apiReq - apiReq.ApiPath = APIPath_OAPIUpdateCompoundFieldValue + apiReq.ApiPath = APIPath_UpdateCompoundFieldValue apiReq.HttpMethod = "POST" apiResp, err := core.Request(ctx, apiReq, a.config, options...) if err != nil { - a.config.Logger.Error(ctx, fmt.Sprintf("[OAPIUpdateCompoundFieldValue] fail to invoke api, error: %v", err.Error())) + a.config.Logger.Error(ctx, fmt.Sprintf("[UpdateCompoundFieldValue] fail to invoke api, error: %v", err.Error())) return nil, err } // 反序列响应结果 - resp := &OAPIUpdateCompoundFieldValueResp{APIResp: apiResp} + resp := &UpdateCompoundFieldValueResp{APIResp: apiResp} err = apiResp.JSONUnmarshalBody(resp, a.config) if err != nil { - a.config.Logger.Error(ctx, fmt.Sprintf("[OAPIUpdateCompoundFieldValue] fail to unmarshal response body, error: %v", err.Error())) + a.config.Logger.Error(ctx, fmt.Sprintf("[UpdateCompoundFieldValue] fail to unmarshal response body, error: %v", err.Error())) return nil, err } return resp, err @@ -2175,4 +2172,3 @@ func (a *WorkItemService) WbsCollaborationPublish(ctx context.Context, req *WbsC } return resp, err } - diff --git a/v2/service/workitem/builder.go b/v2/service/workitem/builder.go index 865393e..509c5fd 100644 --- a/v2/service/workitem/builder.go +++ b/v2/service/workitem/builder.go @@ -1,19 +1,17 @@ package workitem import ( - "fmt" - "github.com/larksuite/project-oapi-sdk-golang/core" - + "fmt" + "github.com/larksuite/project-oapi-sdk-golang/core" ) - type AbortWorkItemReq struct { apiReq *core.APIReq } type AbortWorkItemReqBody struct { - IsAborted *bool `json:"is_aborted,omitempty"` - Reason *string `json:"reason,omitempty"` - ReasonOption *string `json:"reason_option,omitempty"` + IsAborted *bool `json:"is_aborted,omitempty"` + Reason *string `json:"reason,omitempty"` + ReasonOption *string `json:"reason_option,omitempty"` } type AbortWorkItemResp struct { *core.APIResp `json:"-"` @@ -39,31 +37,26 @@ func (builder *AbortWorkItemReqBuilder) ProjectKey(projectKey string) *AbortWork return builder } - func (builder *AbortWorkItemReqBuilder) WorkItemTypeKey(workItemTypeKey string) *AbortWorkItemReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *AbortWorkItemReqBuilder) WorkItemID(workItemID int64) *AbortWorkItemReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *AbortWorkItemReqBuilder) IsAborted(isAborted bool) *AbortWorkItemReqBuilder { builder.apiReq.Body.(*AbortWorkItemReqBody).IsAborted = &isAborted return builder } - func (builder *AbortWorkItemReqBuilder) Reason(reason string) *AbortWorkItemReqBuilder { builder.apiReq.Body.(*AbortWorkItemReqBody).Reason = &reason return builder } - func (builder *AbortWorkItemReqBuilder) ReasonOption(reasonOption string) *AbortWorkItemReqBuilder { builder.apiReq.Body.(*AbortWorkItemReqBody).ReasonOption = &reasonOption return builder @@ -79,10 +72,10 @@ type ActualTimeUpdateReq struct { apiReq *core.APIReq } type ActualTimeUpdateReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemID *int64 `json:"work_item_id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - ActualTimeInfo *ActualTimeInfo `json:"actual_time_info,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + NodeID *string `json:"node_id,omitempty"` + ActualTimeInfo *ActualTimeInfo `json:"actual_time_info,omitempty"` } type ActualTimeUpdateResp struct { *core.APIResp `json:"-"` @@ -108,19 +101,16 @@ func (builder *ActualTimeUpdateReqBuilder) ProjectKey(projectKey string) *Actual return builder } - func (builder *ActualTimeUpdateReqBuilder) WorkItemID(workItemID int64) *ActualTimeUpdateReqBuilder { builder.apiReq.Body.(*ActualTimeUpdateReqBody).WorkItemID = &workItemID return builder } - func (builder *ActualTimeUpdateReqBuilder) NodeID(nodeID string) *ActualTimeUpdateReqBuilder { builder.apiReq.Body.(*ActualTimeUpdateReqBody).NodeID = &nodeID return builder } - func (builder *ActualTimeUpdateReqBuilder) ActualTimeInfo(actualTimeInfo *ActualTimeInfo) *ActualTimeUpdateReqBuilder { builder.apiReq.Body.(*ActualTimeUpdateReqBody).ActualTimeInfo = actualTimeInfo return builder @@ -135,15 +125,14 @@ type BatchQueryConclusionOptionReq struct { apiReq *core.APIReq } type BatchQueryConclusionOptionReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemID *int64 `json:"work_item_id,omitempty"` - NodeIDs []string `json:"node_ids,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + NodeIDs []string `json:"node_ids,omitempty"` } type BatchQueryConclusionOptionResp struct { *core.APIResp `json:"-"` core.CodeError - Data []OAPIBatchQueryConclusionOptionItem `json:"data"` - + Data []OAPIBatchQueryConclusionOptionItem `json:"data"` } type BatchQueryConclusionOptionReqBuilder struct { @@ -165,13 +154,11 @@ func (builder *BatchQueryConclusionOptionReqBuilder) ProjectKey(projectKey strin return builder } - func (builder *BatchQueryConclusionOptionReqBuilder) WorkItemID(workItemID int64) *BatchQueryConclusionOptionReqBuilder { builder.apiReq.Body.(*BatchQueryConclusionOptionReqBody).WorkItemID = &workItemID return builder } - func (builder *BatchQueryConclusionOptionReqBuilder) NodeIDs(nodeIDs []string) *BatchQueryConclusionOptionReqBuilder { builder.apiReq.Body.(*BatchQueryConclusionOptionReqBody).NodeIDs = nodeIDs return builder @@ -186,14 +173,13 @@ type BatchQueryDeliverableReq struct { apiReq *core.APIReq } type BatchQueryDeliverableReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemIDs []int64 `json:"work_item_ids,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemIDs []int64 `json:"work_item_ids,omitempty"` } type BatchQueryDeliverableResp struct { *core.APIResp `json:"-"` core.CodeError - Data []OAPIBatchQueryDeliverable `json:"data"` - + Data []OAPIBatchQueryDeliverable `json:"data"` } type BatchQueryDeliverableReqBuilder struct { @@ -215,7 +201,6 @@ func (builder *BatchQueryDeliverableReqBuilder) ProjectKey(projectKey string) *B return builder } - func (builder *BatchQueryDeliverableReqBuilder) WorkItemIDs(workItemIDs []int64) *BatchQueryDeliverableReqBuilder { builder.apiReq.Body.(*BatchQueryDeliverableReqBody).WorkItemIDs = workItemIDs return builder @@ -230,20 +215,20 @@ type BatchQueryFinishedReq struct { apiReq *core.APIReq } type BatchQueryFinishedReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemID *int64 `json:"work_item_id,omitempty"` - NodeIDs []string `json:"node_ids,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + NodeIDs []string `json:"node_ids,omitempty"` } type BatchQueryFinishedResp struct { *core.APIResp `json:"-"` core.CodeError - Data *BatchQueryFinishedRespData `json:"data,omitempty"` + Data *BatchQueryFinishedRespData `json:"data,omitempty"` } type BatchQueryFinishedRespData struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemID *int64 `json:"work_item_id,omitempty"` - FinishedInfos []OAPIFinishedInfoItem `json:"finished_infos,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + FinishedInfos []OAPIFinishedInfoItem `json:"finished_infos,omitempty"` } type BatchQueryFinishedReqBuilder struct { @@ -265,13 +250,11 @@ func (builder *BatchQueryFinishedReqBuilder) ProjectKey(projectKey string) *Batc return builder } - func (builder *BatchQueryFinishedReqBuilder) WorkItemID(workItemID int64) *BatchQueryFinishedReqBuilder { builder.apiReq.Body.(*BatchQueryFinishedReqBody).WorkItemID = &workItemID return builder } - func (builder *BatchQueryFinishedReqBuilder) NodeIDs(nodeIDs []string) *BatchQueryFinishedReqBuilder { builder.apiReq.Body.(*BatchQueryFinishedReqBody).NodeIDs = nodeIDs return builder @@ -286,22 +269,22 @@ type BatchUpdateBasicWorkItemReq struct { apiReq *core.APIReq } type BatchUpdateBasicWorkItemReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - WorkItemIDs []int64 `json:"work_item_ids,omitempty"` - UpdateMode *string `json:"update_mode,omitempty"` - FieldKey *string `json:"field_key,omitempty"` - BeforeFieldValue interface{} `json:"before_field_value,omitempty"` - AfterFieldValue interface{} `json:"after_field_value,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + WorkItemIDs []int64 `json:"work_item_ids,omitempty"` + UpdateMode *string `json:"update_mode,omitempty"` + FieldKey *string `json:"field_key,omitempty"` + BeforeFieldValue interface{} `json:"before_field_value,omitempty"` + AfterFieldValue interface{} `json:"after_field_value,omitempty"` } type BatchUpdateBasicWorkItemResp struct { *core.APIResp `json:"-"` core.CodeError - Data *BatchUpdateBasicWorkItemRespData `json:"data,omitempty"` + Data *BatchUpdateBasicWorkItemRespData `json:"data,omitempty"` } type BatchUpdateBasicWorkItemRespData struct { - TaskID *string `json:"task_id,omitempty"` + TaskID *string `json:"task_id,omitempty"` } type BatchUpdateBasicWorkItemReqBuilder struct { @@ -323,13 +306,11 @@ func (builder *BatchUpdateBasicWorkItemReqBuilder) ProjectKey(projectKey string) return builder } - func (builder *BatchUpdateBasicWorkItemReqBuilder) WorkItemTypeKey(workItemTypeKey string) *BatchUpdateBasicWorkItemReqBuilder { builder.apiReq.Body.(*BatchUpdateBasicWorkItemReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *BatchUpdateBasicWorkItemReqBuilder) WorkItemIDs(workItemIDs []int64) *BatchUpdateBasicWorkItemReqBuilder { builder.apiReq.Body.(*BatchUpdateBasicWorkItemReqBody).WorkItemIDs = workItemIDs return builder @@ -340,13 +321,11 @@ func (builder *BatchUpdateBasicWorkItemReqBuilder) UpdateMode(updateMode string) return builder } - func (builder *BatchUpdateBasicWorkItemReqBuilder) FieldKey(fieldKey string) *BatchUpdateBasicWorkItemReqBuilder { builder.apiReq.Body.(*BatchUpdateBasicWorkItemReqBody).FieldKey = &fieldKey return builder } - func (builder *BatchUpdateBasicWorkItemReqBuilder) BeforeFieldValue(beforeFieldValue interface{}) *BatchUpdateBasicWorkItemReqBuilder { builder.apiReq.Body.(*BatchUpdateBasicWorkItemReqBody).BeforeFieldValue = beforeFieldValue return builder @@ -366,21 +345,20 @@ type CompositiveSearchReq struct { apiReq *core.APIReq } type CompositiveSearchReqBody struct { - ProjectKeys []string `json:"project_keys,omitempty"` - QueryType *string `json:"query_type,omitempty"` - Query *string `json:"query,omitempty"` - QuerySubType []string `json:"query_sub_type,omitempty"` - PageSize *int64 `json:"page_size,omitempty"` - PageNum *int64 `json:"page_num,omitempty"` - SimpleNames []string `json:"simple_names,omitempty"` + ProjectKeys []string `json:"project_keys,omitempty"` + QueryType *string `json:"query_type,omitempty"` + Query *string `json:"query,omitempty"` + QuerySubType []string `json:"query_sub_type,omitempty"` + PageSize *int64 `json:"page_size,omitempty"` + PageNum *int64 `json:"page_num,omitempty"` + SimpleNames []string `json:"simple_names,omitempty"` } type CompositiveSearchResp struct { *core.APIResp `json:"-"` core.CodeError - Data []CompInfo `json:"data"` - - Pagination *Pagination `json:"pagination"` - + Data []CompInfo `json:"data"` + + Pagination *Pagination `json:"pagination"` } type CompositiveSearchReqBuilder struct { @@ -407,13 +385,11 @@ func (builder *CompositiveSearchReqBuilder) QueryType(queryType string) *Composi return builder } - func (builder *CompositiveSearchReqBuilder) Query(query string) *CompositiveSearchReqBuilder { builder.apiReq.Body.(*CompositiveSearchReqBody).Query = &query return builder } - func (builder *CompositiveSearchReqBuilder) QuerySubType(querySubType []string) *CompositiveSearchReqBuilder { builder.apiReq.Body.(*CompositiveSearchReqBody).QuerySubType = querySubType return builder @@ -424,13 +400,11 @@ func (builder *CompositiveSearchReqBuilder) PageSize(pageSize int64) *Compositiv return builder } - func (builder *CompositiveSearchReqBuilder) PageNum(pageNum int64) *CompositiveSearchReqBuilder { builder.apiReq.Body.(*CompositiveSearchReqBody).PageNum = &pageNum return builder } - func (builder *CompositiveSearchReqBuilder) SimpleNames(simpleNames []string) *CompositiveSearchReqBuilder { builder.apiReq.Body.(*CompositiveSearchReqBody).SimpleNames = simpleNames return builder @@ -445,30 +419,29 @@ type CreateFieldReq struct { apiReq *core.APIReq } type CreateFieldReqBody struct { - FieldName *string `json:"field_name,omitempty"` - FieldTypeKey *string `json:"field_type_key,omitempty"` - ValueType *int64 `json:"value_type,omitempty"` - ReferenceWorkItemTypeKey *string `json:"reference_work_item_type_key,omitempty"` - ReferenceFieldKey *string `json:"reference_field_key,omitempty"` - FieldValue interface{} `json:"field_value,omitempty"` - FreeAdd *int64 `json:"free_add,omitempty"` - WorkItemRelationUUID *string `json:"work_item_relation_uuid,omitempty"` - DefaultValue interface{} `json:"default_value,omitempty"` - FieldAlias *string `json:"field_alias,omitempty"` - HelpDescription *string `json:"help_description,omitempty"` - AuthorizedRoles []string `json:"authorized_roles,omitempty"` - IsMulti *bool `json:"is_multi,omitempty"` - Format *bool `json:"format,omitempty"` - RelatedFieldExtraDisplayInfos []RelatedFieldExtraDisplayInfo `json:"related_field_extra_display_infos,omitempty"` - TeamOption *TeamOption `json:"team_option,omitempty"` - ParentFieldKey *string `json:"parent_field_key,omitempty"` - NumberConfig *NumberConfig `json:"number_config,omitempty"` + FieldName *string `json:"field_name,omitempty"` + FieldTypeKey *string `json:"field_type_key,omitempty"` + ValueType *int64 `json:"value_type,omitempty"` + ReferenceWorkItemTypeKey *string `json:"reference_work_item_type_key,omitempty"` + ReferenceFieldKey *string `json:"reference_field_key,omitempty"` + FieldValue interface{} `json:"field_value,omitempty"` + FreeAdd *int64 `json:"free_add,omitempty"` + WorkItemRelationUUID *string `json:"work_item_relation_uuid,omitempty"` + DefaultValue interface{} `json:"default_value,omitempty"` + FieldAlias *string `json:"field_alias,omitempty"` + HelpDescription *string `json:"help_description,omitempty"` + AuthorizedRoles []string `json:"authorized_roles,omitempty"` + IsMulti *bool `json:"is_multi,omitempty"` + Format *bool `json:"format,omitempty"` + RelatedFieldExtraDisplayInfos []RelatedFieldExtraDisplayInfo `json:"related_field_extra_display_infos,omitempty"` + TeamOption *TeamOption `json:"team_option,omitempty"` + ParentFieldKey *string `json:"parent_field_key,omitempty"` + NumberConfig *NumberConfig `json:"number_config,omitempty"` } type CreateFieldResp struct { *core.APIResp `json:"-"` core.CodeError - Data *string `json:"data"` - + Data *string `json:"data"` } type CreateFieldReqBuilder struct { @@ -490,43 +463,36 @@ func (builder *CreateFieldReqBuilder) ProjectKey(projectKey string) *CreateField return builder } - func (builder *CreateFieldReqBuilder) WorkItemTypeKey(workItemTypeKey string) *CreateFieldReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *CreateFieldReqBuilder) FieldName(fieldName string) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).FieldName = &fieldName return builder } - func (builder *CreateFieldReqBuilder) FieldTypeKey(fieldTypeKey string) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).FieldTypeKey = &fieldTypeKey return builder } - func (builder *CreateFieldReqBuilder) ValueType(valueType int64) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).ValueType = &valueType return builder } - func (builder *CreateFieldReqBuilder) ReferenceWorkItemTypeKey(referenceWorkItemTypeKey string) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).ReferenceWorkItemTypeKey = &referenceWorkItemTypeKey return builder } - func (builder *CreateFieldReqBuilder) ReferenceFieldKey(referenceFieldKey string) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).ReferenceFieldKey = &referenceFieldKey return builder } - func (builder *CreateFieldReqBuilder) FieldValue(fieldValue interface{}) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).FieldValue = fieldValue return builder @@ -537,13 +503,11 @@ func (builder *CreateFieldReqBuilder) FreeAdd(freeAdd int64) *CreateFieldReqBuil return builder } - func (builder *CreateFieldReqBuilder) WorkItemRelationUUID(workItemRelationUUID string) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).WorkItemRelationUUID = &workItemRelationUUID return builder } - func (builder *CreateFieldReqBuilder) DefaultValue(defaultValue interface{}) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).DefaultValue = defaultValue return builder @@ -554,13 +518,11 @@ func (builder *CreateFieldReqBuilder) FieldAlias(fieldAlias string) *CreateField return builder } - func (builder *CreateFieldReqBuilder) HelpDescription(helpDescription string) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).HelpDescription = &helpDescription return builder } - func (builder *CreateFieldReqBuilder) AuthorizedRoles(authorizedRoles []string) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).AuthorizedRoles = authorizedRoles return builder @@ -571,13 +533,11 @@ func (builder *CreateFieldReqBuilder) IsMulti(isMulti bool) *CreateFieldReqBuild return builder } - func (builder *CreateFieldReqBuilder) Format(format bool) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).Format = &format return builder } - func (builder *CreateFieldReqBuilder) RelatedFieldExtraDisplayInfos(relatedFieldExtraDisplayInfos []RelatedFieldExtraDisplayInfo) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).RelatedFieldExtraDisplayInfos = relatedFieldExtraDisplayInfos return builder @@ -593,7 +553,6 @@ func (builder *CreateFieldReqBuilder) ParentFieldKey(parentFieldKey string) *Cre return builder } - func (builder *CreateFieldReqBuilder) NumberConfig(numberConfig *NumberConfig) *CreateFieldReqBuilder { builder.apiReq.Body.(*CreateFieldReqBody).NumberConfig = numberConfig return builder @@ -608,13 +567,12 @@ type CreateFlowRoleReq struct { apiReq *core.APIReq } type CreateFlowRoleReqBody struct { - Role *RoleConfCreate `json:"role,omitempty"` + Role *RoleConfCreate `json:"role,omitempty"` } type CreateFlowRoleResp struct { *core.APIResp `json:"-"` core.CodeError - Data *string `json:"data"` - + Data *string `json:"data"` } type CreateFlowRoleReqBuilder struct { @@ -636,13 +594,11 @@ func (builder *CreateFlowRoleReqBuilder) ProjectKey(projectKey string) *CreateFl return builder } - func (builder *CreateFlowRoleReqBuilder) WorkItemTypeKey(workItemTypeKey string) *CreateFlowRoleReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *CreateFlowRoleReqBuilder) Role(role *RoleConfCreate) *CreateFlowRoleReqBuilder { builder.apiReq.Body.(*CreateFlowRoleReqBody).Role = role return builder @@ -657,8 +613,8 @@ type CreateProjectRelationInstancesReq struct { apiReq *core.APIReq } type CreateProjectRelationInstancesReqBody struct { - RelationRuleID *string `json:"relation_rule_id,omitempty"` - Instances []RelationBindInstance `json:"instances,omitempty"` + RelationRuleID *string `json:"relation_rule_id,omitempty"` + Instances []RelationBindInstance `json:"instances,omitempty"` } type CreateProjectRelationInstancesResp struct { *core.APIResp `json:"-"` @@ -684,25 +640,21 @@ func (builder *CreateProjectRelationInstancesReqBuilder) ProjectKey(projectKey s return builder } - func (builder *CreateProjectRelationInstancesReqBuilder) WorkItemTypeKey(workItemTypeKey string) *CreateProjectRelationInstancesReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *CreateProjectRelationInstancesReqBuilder) WorkItemID(workItemID int64) *CreateProjectRelationInstancesReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *CreateProjectRelationInstancesReqBuilder) RelationRuleID(relationRuleID string) *CreateProjectRelationInstancesReqBuilder { builder.apiReq.Body.(*CreateProjectRelationInstancesReqBody).RelationRuleID = &relationRuleID return builder } - func (builder *CreateProjectRelationInstancesReqBuilder) Instances(instances []RelationBindInstance) *CreateProjectRelationInstancesReqBuilder { builder.apiReq.Body.(*CreateProjectRelationInstancesReqBody).Instances = instances return builder @@ -717,13 +669,12 @@ type CreateStoryRelationsReq struct { apiReq *core.APIReq } type CreateStoryRelationsReqBody struct { - StoryRelations []StoryRelationEntity `json:"story_relations,omitempty"` + StoryRelations []StoryRelationEntity `json:"story_relations,omitempty"` } type CreateStoryRelationsResp struct { *core.APIResp `json:"-"` core.CodeError - Data map[string]int64 `json:"data"` - + Data map[string]int64 `json:"data"` } type CreateStoryRelationsReqBuilder struct { @@ -760,16 +711,15 @@ type CreateTemplateDetailReq struct { apiReq *core.APIReq } type CreateTemplateDetailReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - TemplateName *string `json:"template_name,omitempty"` - CopyTemplateID *int64 `json:"copy_template_id,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + TemplateName *string `json:"template_name,omitempty"` + CopyTemplateID *int64 `json:"copy_template_id,omitempty"` } type CreateTemplateDetailResp struct { *core.APIResp `json:"-"` core.CodeError - Data *int64 `json:"data"` - + Data *int64 `json:"data"` } type CreateTemplateDetailReqBuilder struct { @@ -791,19 +741,16 @@ func (builder *CreateTemplateDetailReqBuilder) ProjectKey(projectKey string) *Cr return builder } - func (builder *CreateTemplateDetailReqBuilder) WorkItemTypeKey(workItemTypeKey string) *CreateTemplateDetailReqBuilder { builder.apiReq.Body.(*CreateTemplateDetailReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *CreateTemplateDetailReqBuilder) TemplateName(templateName string) *CreateTemplateDetailReqBuilder { builder.apiReq.Body.(*CreateTemplateDetailReqBody).TemplateName = &templateName return builder } - func (builder *CreateTemplateDetailReqBuilder) CopyTemplateID(copyTemplateID int64) *CreateTemplateDetailReqBuilder { builder.apiReq.Body.(*CreateTemplateDetailReqBody).CopyTemplateID = ©TemplateID return builder @@ -819,16 +766,15 @@ type CreateWorkItemReq struct { apiReq *core.APIReq } type CreateWorkItemReqBody struct { - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - FieldValuePairs []WorkItem_work_item_FieldValuePair `json:"field_value_pairs,omitempty"` - TemplateID *int64 `json:"template_id,omitempty"` - Name *string `json:"name,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + FieldValuePairs []WorkItem_work_item_FieldValuePair `json:"field_value_pairs,omitempty"` + TemplateID *int64 `json:"template_id,omitempty"` + Name *string `json:"name,omitempty"` } type CreateWorkItemResp struct { *core.APIResp `json:"-"` core.CodeError - Data *int64 `json:"data"` - + Data *int64 `json:"data"` } type CreateWorkItemReqBuilder struct { @@ -850,13 +796,11 @@ func (builder *CreateWorkItemReqBuilder) ProjectKey(projectKey string) *CreateWo return builder } - func (builder *CreateWorkItemReqBuilder) WorkItemTypeKey(workItemTypeKey string) *CreateWorkItemReqBuilder { builder.apiReq.Body.(*CreateWorkItemReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *CreateWorkItemReqBuilder) FieldValuePairs(fieldValuePairs []WorkItem_work_item_FieldValuePair) *CreateWorkItemReqBuilder { builder.apiReq.Body.(*CreateWorkItemReqBody).FieldValuePairs = fieldValuePairs return builder @@ -867,7 +811,6 @@ func (builder *CreateWorkItemReqBuilder) TemplateID(templateID int64) *CreateWor return builder } - func (builder *CreateWorkItemReqBuilder) Name(name string) *CreateWorkItemReqBuilder { builder.apiReq.Body.(*CreateWorkItemReqBody).Name = &name return builder @@ -883,16 +826,15 @@ type CreateWorkItemRelationReq struct { apiReq *core.APIReq } type CreateWorkItemRelationReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - Name *string `json:"name,omitempty"` - RelationDetails []RelationDetail `json:"relation_details,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + Name *string `json:"name,omitempty"` + RelationDetails []RelationDetail `json:"relation_details,omitempty"` } type CreateWorkItemRelationResp struct { *core.APIResp `json:"-"` core.CodeError - Data *CreateWorkItemRelationData `json:"data"` - + Data *CreateWorkItemRelationData `json:"data"` } type CreateWorkItemRelationReqBuilder struct { @@ -914,19 +856,16 @@ func (builder *CreateWorkItemRelationReqBuilder) ProjectKey(projectKey string) * return builder } - func (builder *CreateWorkItemRelationReqBuilder) WorkItemTypeKey(workItemTypeKey string) *CreateWorkItemRelationReqBuilder { builder.apiReq.Body.(*CreateWorkItemRelationReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *CreateWorkItemRelationReqBuilder) Name(name string) *CreateWorkItemRelationReqBuilder { builder.apiReq.Body.(*CreateWorkItemRelationReqBody).Name = &name return builder } - func (builder *CreateWorkItemRelationReqBuilder) RelationDetails(relationDetails []RelationDetail) *CreateWorkItemRelationReqBuilder { builder.apiReq.Body.(*CreateWorkItemRelationReqBody).RelationDetails = relationDetails return builder @@ -941,20 +880,19 @@ type CreateWorkItemSubTaskReq struct { apiReq *core.APIReq } type CreateWorkItemSubTaskReqBody struct { - NodeID *string `json:"node_id,omitempty"` - Name *string `json:"name,omitempty"` - AliasKey *string `json:"alias_key,omitempty"` - Assignee []string `json:"assignee,omitempty"` - RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` - Schedule *WorkItem_work_item_Schedule `json:"schedule,omitempty"` - Note *string `json:"note,omitempty"` - FieldValuePairs []WorkItem_work_item_FieldValuePair `json:"field_value_pairs,omitempty"` + NodeID *string `json:"node_id,omitempty"` + Name *string `json:"name,omitempty"` + AliasKey *string `json:"alias_key,omitempty"` + Assignee []string `json:"assignee,omitempty"` + RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` + Schedule *WorkItem_work_item_Schedule `json:"schedule,omitempty"` + Note *string `json:"note,omitempty"` + FieldValuePairs []WorkItem_work_item_FieldValuePair `json:"field_value_pairs,omitempty"` } type CreateWorkItemSubTaskResp struct { *core.APIResp `json:"-"` core.CodeError - Data *int64 `json:"data"` - + Data *int64 `json:"data"` } type CreateWorkItemSubTaskReqBuilder struct { @@ -976,31 +914,26 @@ func (builder *CreateWorkItemSubTaskReqBuilder) ProjectKey(projectKey string) *C return builder } - func (builder *CreateWorkItemSubTaskReqBuilder) WorkItemID(workItemID int64) *CreateWorkItemSubTaskReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *CreateWorkItemSubTaskReqBuilder) NodeID(nodeID string) *CreateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*CreateWorkItemSubTaskReqBody).NodeID = &nodeID return builder } - func (builder *CreateWorkItemSubTaskReqBuilder) Name(name string) *CreateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*CreateWorkItemSubTaskReqBody).Name = &name return builder } - func (builder *CreateWorkItemSubTaskReqBuilder) AliasKey(aliasKey string) *CreateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*CreateWorkItemSubTaskReqBody).AliasKey = &aliasKey return builder } - func (builder *CreateWorkItemSubTaskReqBuilder) Assignee(assignee []string) *CreateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*CreateWorkItemSubTaskReqBody).Assignee = assignee return builder @@ -1021,13 +954,11 @@ func (builder *CreateWorkItemSubTaskReqBuilder) Note(note string) *CreateWorkIte return builder } - func (builder *CreateWorkItemSubTaskReqBuilder) WorkItemTypeKey(workItemTypeKey string) *CreateWorkItemSubTaskReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *CreateWorkItemSubTaskReqBuilder) FieldValuePairs(fieldValuePairs []WorkItem_work_item_FieldValuePair) *CreateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*CreateWorkItemSubTaskReqBody).FieldValuePairs = fieldValuePairs return builder @@ -1042,16 +973,15 @@ type CreateWorkingHourRecordReq struct { apiReq *core.APIReq } type CreateWorkingHourRecordReqBody struct { - WorkBeginDate *int64 `json:"work_begin_date,omitempty"` - WorkEndDate *int64 `json:"work_end_date,omitempty"` - IncludeHolidays *bool `json:"include_holidays,omitempty"` - WorkingHourRecords []CreateWorkingHourRecord `json:"working_hour_records,omitempty"` + WorkBeginDate *int64 `json:"work_begin_date,omitempty"` + WorkEndDate *int64 `json:"work_end_date,omitempty"` + IncludeHolidays *bool `json:"include_holidays,omitempty"` + WorkingHourRecords []CreateWorkingHourRecord `json:"working_hour_records,omitempty"` } type CreateWorkingHourRecordResp struct { *core.APIResp `json:"-"` core.CodeError - Data []ManHourRecord `json:"data"` - + Data []ManHourRecord `json:"data"` } type CreateWorkingHourRecordReqBuilder struct { @@ -1073,37 +1003,31 @@ func (builder *CreateWorkingHourRecordReqBuilder) ProjectKey(projectKey string) return builder } - func (builder *CreateWorkingHourRecordReqBuilder) WorkItemTypeKey(workItemTypeKey string) *CreateWorkingHourRecordReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *CreateWorkingHourRecordReqBuilder) WorkItemID(workItemID int64) *CreateWorkingHourRecordReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *CreateWorkingHourRecordReqBuilder) WorkBeginDate(workBeginDate int64) *CreateWorkingHourRecordReqBuilder { builder.apiReq.Body.(*CreateWorkingHourRecordReqBody).WorkBeginDate = &workBeginDate return builder } - func (builder *CreateWorkingHourRecordReqBuilder) WorkEndDate(workEndDate int64) *CreateWorkingHourRecordReqBuilder { builder.apiReq.Body.(*CreateWorkingHourRecordReqBody).WorkEndDate = &workEndDate return builder } - func (builder *CreateWorkingHourRecordReqBuilder) IncludeHolidays(includeHolidays bool) *CreateWorkingHourRecordReqBuilder { builder.apiReq.Body.(*CreateWorkingHourRecordReqBody).IncludeHolidays = &includeHolidays return builder } - func (builder *CreateWorkingHourRecordReqBuilder) WorkingHourRecords(workingHourRecords []CreateWorkingHourRecord) *CreateWorkingHourRecordReqBuilder { builder.apiReq.Body.(*CreateWorkingHourRecordReqBody).WorkingHourRecords = workingHourRecords return builder @@ -1118,11 +1042,11 @@ type DeleteFileReq struct { apiReq *core.APIReq } type DeleteFileReqBody struct { - WorkItemID *int64 `json:"work_item_id,omitempty"` - ProjectKey *string `json:"project_key,omitempty"` - FieldKey *string `json:"field_key,omitempty"` - FieldAlias *string `json:"field_alias,omitempty"` - Uuids []string `json:"uuids,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + FieldKey *string `json:"field_key,omitempty"` + FieldAlias *string `json:"field_alias,omitempty"` + Uuids []string `json:"uuids,omitempty"` } type DeleteFileResp struct { *core.APIResp `json:"-"` @@ -1148,25 +1072,21 @@ func (builder *DeleteFileReqBuilder) WorkItemID(workItemID int64) *DeleteFileReq return builder } - func (builder *DeleteFileReqBuilder) ProjectKey(projectKey string) *DeleteFileReqBuilder { builder.apiReq.Body.(*DeleteFileReqBody).ProjectKey = &projectKey return builder } - func (builder *DeleteFileReqBuilder) FieldKey(fieldKey string) *DeleteFileReqBuilder { builder.apiReq.Body.(*DeleteFileReqBody).FieldKey = &fieldKey return builder } - func (builder *DeleteFileReqBuilder) FieldAlias(fieldAlias string) *DeleteFileReqBuilder { builder.apiReq.Body.(*DeleteFileReqBody).FieldAlias = &fieldAlias return builder } - func (builder *DeleteFileReqBuilder) Uuids(uuids []string) *DeleteFileReqBuilder { builder.apiReq.Body.(*DeleteFileReqBody).Uuids = uuids return builder @@ -1181,8 +1101,8 @@ type DeleteFlowRoleReq struct { apiReq *core.APIReq } type DeleteFlowRoleReqBody struct { - RoleID *string `json:"role_id,omitempty"` - RoleAlias *string `json:"role_alias,omitempty"` + RoleID *string `json:"role_id,omitempty"` + RoleAlias *string `json:"role_alias,omitempty"` } type DeleteFlowRoleResp struct { *core.APIResp `json:"-"` @@ -1208,19 +1128,16 @@ func (builder *DeleteFlowRoleReqBuilder) ProjectKey(projectKey string) *DeleteFl return builder } - func (builder *DeleteFlowRoleReqBuilder) WorkItemTypeKey(workItemTypeKey string) *DeleteFlowRoleReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *DeleteFlowRoleReqBuilder) RoleID(roleID string) *DeleteFlowRoleReqBuilder { builder.apiReq.Body.(*DeleteFlowRoleReqBody).RoleID = &roleID return builder } - func (builder *DeleteFlowRoleReqBuilder) RoleAlias(roleAlias string) *DeleteFlowRoleReqBuilder { builder.apiReq.Body.(*DeleteFlowRoleReqBody).RoleAlias = &roleAlias return builder @@ -1236,8 +1153,8 @@ type DeleteProjectRelationInstanceReq struct { apiReq *core.APIReq } type DeleteProjectRelationInstanceReqBody struct { - RelationRuleID *string `json:"relation_rule_id,omitempty"` - RelationWorkItemID *int64 `json:"relation_work_item_id,omitempty"` + RelationRuleID *string `json:"relation_rule_id,omitempty"` + RelationWorkItemID *int64 `json:"relation_work_item_id,omitempty"` } type DeleteProjectRelationInstanceResp struct { *core.APIResp `json:"-"` @@ -1263,25 +1180,21 @@ func (builder *DeleteProjectRelationInstanceReqBuilder) ProjectKey(projectKey st return builder } - func (builder *DeleteProjectRelationInstanceReqBuilder) WorkItemTypeKey(workItemTypeKey string) *DeleteProjectRelationInstanceReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *DeleteProjectRelationInstanceReqBuilder) WorkItemID(workItemID int64) *DeleteProjectRelationInstanceReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *DeleteProjectRelationInstanceReqBuilder) RelationRuleID(relationRuleID string) *DeleteProjectRelationInstanceReqBuilder { builder.apiReq.Body.(*DeleteProjectRelationInstanceReqBody).RelationRuleID = &relationRuleID return builder } - func (builder *DeleteProjectRelationInstanceReqBuilder) RelationWorkItemID(relationWorkItemID int64) *DeleteProjectRelationInstanceReqBuilder { builder.apiReq.Body.(*DeleteProjectRelationInstanceReqBody).RelationWorkItemID = &relationWorkItemID return builder @@ -1319,7 +1232,6 @@ func (builder *DeleteTemplateDetailReqBuilder) ProjectKey(projectKey string) *De return builder } - func (builder *DeleteTemplateDetailReqBuilder) TemplateID(templateID int64) *DeleteTemplateDetailReqBuilder { builder.apiReq.PathParams.Set("template_id", fmt.Sprint(templateID)) return builder @@ -1357,13 +1269,11 @@ func (builder *DeleteWorkItemReqBuilder) ProjectKey(projectKey string) *DeleteWo return builder } - func (builder *DeleteWorkItemReqBuilder) WorkItemTypeKey(workItemTypeKey string) *DeleteWorkItemReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *DeleteWorkItemReqBuilder) WorkItemID(workItemID int64) *DeleteWorkItemReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder @@ -1379,14 +1289,13 @@ type DeleteWorkItemRelationReq struct { apiReq *core.APIReq } type DeleteWorkItemRelationReqBody struct { - RelationID *string `json:"relation_id,omitempty"` - ProjectKey *string `json:"project_key,omitempty"` + RelationID *string `json:"relation_id,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` } type DeleteWorkItemRelationResp struct { *core.APIResp `json:"-"` core.CodeError - Data *string `json:"data"` - + Data *string `json:"data"` } type DeleteWorkItemRelationReqBuilder struct { @@ -1408,7 +1317,6 @@ func (builder *DeleteWorkItemRelationReqBuilder) RelationID(relationID string) * return builder } - func (builder *DeleteWorkItemRelationReqBuilder) ProjectKey(projectKey string) *DeleteWorkItemRelationReqBuilder { builder.apiReq.Body.(*DeleteWorkItemRelationReqBody).ProjectKey = &projectKey return builder @@ -1446,19 +1354,16 @@ func (builder *DeleteWorkItemSubTaskReqBuilder) ProjectKey(projectKey string) *D return builder } - func (builder *DeleteWorkItemSubTaskReqBuilder) WorkItemID(workItemID int64) *DeleteWorkItemSubTaskReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *DeleteWorkItemSubTaskReqBuilder) WorkItemTypeKey(workItemTypeKey string) *DeleteWorkItemSubTaskReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *DeleteWorkItemSubTaskReqBuilder) TaskID(taskID int64) *DeleteWorkItemSubTaskReqBuilder { builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskID)) return builder @@ -1474,7 +1379,7 @@ type DeleteWorkingHourRecordReq struct { apiReq *core.APIReq } type DeleteWorkingHourRecordReqBody struct { - WorkingHourRecordIDs []int64 `json:"working_hour_record_ids,omitempty"` + WorkingHourRecordIDs []int64 `json:"working_hour_record_ids,omitempty"` } type DeleteWorkingHourRecordResp struct { *core.APIResp `json:"-"` @@ -1500,19 +1405,16 @@ func (builder *DeleteWorkingHourRecordReqBuilder) ProjectKey(projectKey string) return builder } - func (builder *DeleteWorkingHourRecordReqBuilder) WorkItemTypeKey(workItemTypeKey string) *DeleteWorkingHourRecordReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *DeleteWorkingHourRecordReqBuilder) WorkItemID(workItemID int64) *DeleteWorkingHourRecordReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *DeleteWorkingHourRecordReqBuilder) WorkingHourRecordIDs(workingHourRecordIDs []int64) *DeleteWorkingHourRecordReqBuilder { builder.apiReq.Body.(*DeleteWorkingHourRecordReqBody).WorkingHourRecordIDs = workingHourRecordIDs return builder @@ -1527,20 +1429,20 @@ type ElementTemplateCreateReq struct { apiReq *core.APIReq } type ElementTemplateCreateReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - ElementType *string `json:"element_type,omitempty"` - NodeElement *NodeElement `json:"node_element,omitempty"` - TaskElement *TaskElement `json:"task_element,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + ElementType *string `json:"element_type,omitempty"` + NodeElement *NodeElement `json:"node_element,omitempty"` + TaskElement *TaskElement `json:"task_element,omitempty"` } type ElementTemplateCreateResp struct { *core.APIResp `json:"-"` core.CodeError - Data *ElementTemplateCreateRespData `json:"data,omitempty"` + Data *ElementTemplateCreateRespData `json:"data,omitempty"` } type ElementTemplateCreateRespData struct { - ElementKey *string `json:"element_key,omitempty"` + ElementKey *string `json:"element_key,omitempty"` } type ElementTemplateCreateReqBuilder struct { @@ -1562,19 +1464,16 @@ func (builder *ElementTemplateCreateReqBuilder) ProjectKey(projectKey string) *E return builder } - func (builder *ElementTemplateCreateReqBuilder) WorkItemTypeKey(workItemTypeKey string) *ElementTemplateCreateReqBuilder { builder.apiReq.Body.(*ElementTemplateCreateReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *ElementTemplateCreateReqBuilder) ElementType(elementType string) *ElementTemplateCreateReqBuilder { builder.apiReq.Body.(*ElementTemplateCreateReqBody).ElementType = &elementType return builder } - func (builder *ElementTemplateCreateReqBuilder) NodeElement(nodeElement *NodeElement) *ElementTemplateCreateReqBuilder { builder.apiReq.Body.(*ElementTemplateCreateReqBody).NodeElement = nodeElement return builder @@ -1594,22 +1493,22 @@ type ElementTemplateQueryReq struct { apiReq *core.APIReq } type ElementTemplateQueryReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - ElementType *string `json:"element_type,omitempty"` - PageNum *int64 `json:"page_num,omitempty"` - PageSize *int64 `json:"page_size,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + ElementType *string `json:"element_type,omitempty"` + PageNum *int64 `json:"page_num,omitempty"` + PageSize *int64 `json:"page_size,omitempty"` } type ElementTemplateQueryResp struct { *core.APIResp `json:"-"` core.CodeError - Data *ElementTemplateQueryRespData `json:"data,omitempty"` + Data *ElementTemplateQueryRespData `json:"data,omitempty"` } type ElementTemplateQueryRespData struct { - NodeElements []NodeElement `json:"node_elements,omitempty"` - TaskElements []TaskElement `json:"task_elements,omitempty"` - Total *int64 `json:"total,omitempty"` + NodeElements []NodeElement `json:"node_elements,omitempty"` + TaskElements []TaskElement `json:"task_elements,omitempty"` + Total *int64 `json:"total,omitempty"` } type ElementTemplateQueryReqBuilder struct { @@ -1631,25 +1530,21 @@ func (builder *ElementTemplateQueryReqBuilder) ProjectKey(projectKey string) *El return builder } - func (builder *ElementTemplateQueryReqBuilder) WorkItemTypeKey(workItemTypeKey string) *ElementTemplateQueryReqBuilder { builder.apiReq.Body.(*ElementTemplateQueryReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *ElementTemplateQueryReqBuilder) ElementType(elementType string) *ElementTemplateQueryReqBuilder { builder.apiReq.Body.(*ElementTemplateQueryReqBody).ElementType = &elementType return builder } - func (builder *ElementTemplateQueryReqBuilder) PageNum(pageNum int64) *ElementTemplateQueryReqBuilder { builder.apiReq.Body.(*ElementTemplateQueryReqBody).PageNum = &pageNum return builder } - func (builder *ElementTemplateQueryReqBuilder) PageSize(pageSize int64) *ElementTemplateQueryReqBuilder { builder.apiReq.Body.(*ElementTemplateQueryReqBody).PageSize = &pageSize return builder @@ -1665,29 +1560,28 @@ type FilterReq struct { apiReq *core.APIReq } type FilterReqBody struct { - WorkItemName *string `json:"work_item_name,omitempty"` - UserKeys []string `json:"user_keys,omitempty"` - WorkItemIDs []int64 `json:"work_item_ids,omitempty"` - WorkItemTypeKeys []string `json:"work_item_type_keys,omitempty"` - CreatedAt *TimeInterval `json:"created_at,omitempty"` - UpdatedAt *TimeInterval `json:"updated_at,omitempty"` - SubStages []string `json:"sub_stages,omitempty"` - Businesses []string `json:"businesses,omitempty"` - Priorities []string `json:"priorities,omitempty"` - Tags []string `json:"tags,omitempty"` - PageNum *int64 `json:"page_num,omitempty"` - PageSize *int64 `json:"page_size,omitempty"` - WorkItemStatus []WorkItemStatus `json:"work_item_status,omitempty"` - Expand *Expand `json:"expand,omitempty"` - SearchID *string `json:"search_id,omitempty"` + WorkItemName *string `json:"work_item_name,omitempty"` + UserKeys []string `json:"user_keys,omitempty"` + WorkItemIDs []int64 `json:"work_item_ids,omitempty"` + WorkItemTypeKeys []string `json:"work_item_type_keys,omitempty"` + CreatedAt *TimeInterval `json:"created_at,omitempty"` + UpdatedAt *TimeInterval `json:"updated_at,omitempty"` + SubStages []string `json:"sub_stages,omitempty"` + Businesses []string `json:"businesses,omitempty"` + Priorities []string `json:"priorities,omitempty"` + Tags []string `json:"tags,omitempty"` + PageNum *int64 `json:"page_num,omitempty"` + PageSize *int64 `json:"page_size,omitempty"` + WorkItemStatus []WorkItemStatus `json:"work_item_status,omitempty"` + Expand *Expand `json:"expand,omitempty"` + SearchID *string `json:"search_id,omitempty"` } type FilterResp struct { *core.APIResp `json:"-"` core.CodeError - Data []WorkItemInfo `json:"data"` - - Pagination *Pagination `json:"pagination"` - + Data []WorkItemInfo `json:"data"` + + Pagination *Pagination `json:"pagination"` } type FilterReqBuilder struct { @@ -1709,13 +1603,11 @@ func (builder *FilterReqBuilder) ProjectKey(projectKey string) *FilterReqBuilder return builder } - func (builder *FilterReqBuilder) WorkItemName(workItemName string) *FilterReqBuilder { builder.apiReq.Body.(*FilterReqBody).WorkItemName = &workItemName return builder } - func (builder *FilterReqBuilder) UserKeys(userKeys []string) *FilterReqBuilder { builder.apiReq.Body.(*FilterReqBody).UserKeys = userKeys return builder @@ -1766,13 +1658,11 @@ func (builder *FilterReqBuilder) PageNum(pageNum int64) *FilterReqBuilder { return builder } - func (builder *FilterReqBuilder) PageSize(pageSize int64) *FilterReqBuilder { builder.apiReq.Body.(*FilterReqBody).PageSize = &pageSize return builder } - func (builder *FilterReqBuilder) WorkItemStatus(workItemStatus []WorkItemStatus) *FilterReqBuilder { builder.apiReq.Body.(*FilterReqBody).WorkItemStatus = workItemStatus return builder @@ -1798,31 +1688,30 @@ type FilterAcrossProjectReq struct { apiReq *core.APIReq } type FilterAcrossProjectReqBody struct { - ProjectKeys []string `json:"project_keys,omitempty"` - SearchUser *SearchUser `json:"search_user,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - CreatedAt *TimeInterval `json:"created_at,omitempty"` - UpdatedAt *TimeInterval `json:"updated_at,omitempty"` - WorkItemStatus []WorkItemStatus `json:"work_item_status,omitempty"` - WorkItemName *string `json:"work_item_name,omitempty"` - PageNum *int64 `json:"page_num,omitempty"` - PageSize *int64 `json:"page_size,omitempty"` - TenantGroupID *int64 `json:"tenant_group_id,omitempty"` - WorkItemIDs []int64 `json:"work_item_ids,omitempty"` - Businesses []string `json:"businesses,omitempty"` - Priorities []string `json:"priorities,omitempty"` - Tags []string `json:"tags,omitempty"` - SimpleNames []string `json:"simple_names,omitempty"` - TemplateIDs []int64 `json:"template_ids,omitempty"` - Expand *Expand `json:"expand,omitempty"` + ProjectKeys []string `json:"project_keys,omitempty"` + SearchUser *SearchUser `json:"search_user,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + CreatedAt *TimeInterval `json:"created_at,omitempty"` + UpdatedAt *TimeInterval `json:"updated_at,omitempty"` + WorkItemStatus []WorkItemStatus `json:"work_item_status,omitempty"` + WorkItemName *string `json:"work_item_name,omitempty"` + PageNum *int64 `json:"page_num,omitempty"` + PageSize *int64 `json:"page_size,omitempty"` + TenantGroupID *int64 `json:"tenant_group_id,omitempty"` + WorkItemIDs []int64 `json:"work_item_ids,omitempty"` + Businesses []string `json:"businesses,omitempty"` + Priorities []string `json:"priorities,omitempty"` + Tags []string `json:"tags,omitempty"` + SimpleNames []string `json:"simple_names,omitempty"` + TemplateIDs []int64 `json:"template_ids,omitempty"` + Expand *Expand `json:"expand,omitempty"` } type FilterAcrossProjectResp struct { *core.APIResp `json:"-"` core.CodeError - Data []WorkItemInfo `json:"data"` - - Pagination *Pagination `json:"pagination"` - + Data []WorkItemInfo `json:"data"` + + Pagination *Pagination `json:"pagination"` } type FilterAcrossProjectReqBuilder struct { @@ -1854,7 +1743,6 @@ func (builder *FilterAcrossProjectReqBuilder) WorkItemTypeKey(workItemTypeKey st return builder } - func (builder *FilterAcrossProjectReqBuilder) CreatedAt(createdAt *TimeInterval) *FilterAcrossProjectReqBuilder { builder.apiReq.Body.(*FilterAcrossProjectReqBody).CreatedAt = createdAt return builder @@ -1875,25 +1763,21 @@ func (builder *FilterAcrossProjectReqBuilder) WorkItemName(workItemName string) return builder } - func (builder *FilterAcrossProjectReqBuilder) PageNum(pageNum int64) *FilterAcrossProjectReqBuilder { builder.apiReq.Body.(*FilterAcrossProjectReqBody).PageNum = &pageNum return builder } - func (builder *FilterAcrossProjectReqBuilder) PageSize(pageSize int64) *FilterAcrossProjectReqBuilder { builder.apiReq.Body.(*FilterAcrossProjectReqBody).PageSize = &pageSize return builder } - func (builder *FilterAcrossProjectReqBuilder) TenantGroupID(tenantGroupID int64) *FilterAcrossProjectReqBuilder { builder.apiReq.Body.(*FilterAcrossProjectReqBody).TenantGroupID = &tenantGroupID return builder } - func (builder *FilterAcrossProjectReqBuilder) WorkItemIDs(workItemIDs []int64) *FilterAcrossProjectReqBuilder { builder.apiReq.Body.(*FilterAcrossProjectReqBody).WorkItemIDs = workItemIDs return builder @@ -1938,9 +1822,9 @@ type FreezeWorkItemReq struct { apiReq *core.APIReq } type FreezeWorkItemReqBody struct { - WorkItemID *int64 `json:"work_item_id,omitempty"` - IsFrozen *bool `json:"is_frozen,omitempty"` - ProjectKey *string `json:"project_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + IsFrozen *bool `json:"is_frozen,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` } type FreezeWorkItemResp struct { *core.APIResp `json:"-"` @@ -1966,13 +1850,11 @@ func (builder *FreezeWorkItemReqBuilder) WorkItemID(workItemID int64) *FreezeWor return builder } - func (builder *FreezeWorkItemReqBuilder) IsFrozen(isFrozen bool) *FreezeWorkItemReqBuilder { builder.apiReq.Body.(*FreezeWorkItemReqBody).IsFrozen = &isFrozen return builder } - func (builder *FreezeWorkItemReqBuilder) ProjectKey(projectKey string) *FreezeWorkItemReqBuilder { builder.apiReq.Body.(*FreezeWorkItemReqBody).ProjectKey = &projectKey return builder @@ -1988,17 +1870,16 @@ type GetResourceWorkItemsByIdsReq struct { apiReq *core.APIReq } type GetResourceWorkItemsByIdsReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemIDs []int64 `json:"work_item_ids,omitempty"` - Fields []string `json:"fields,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemIDs []int64 `json:"work_item_ids,omitempty"` + Fields []string `json:"fields,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` } type GetResourceWorkItemsByIdsResp struct { *core.APIResp `json:"-"` core.CodeError - Data []WorkItem_work_item_ResourceWorkItemInfo `json:"data"` - + Data []WorkItem_work_item_ResourceWorkItemInfo `json:"data"` } type GetResourceWorkItemsByIdsReqBuilder struct { @@ -2020,7 +1901,6 @@ func (builder *GetResourceWorkItemsByIdsReqBuilder) ProjectKey(projectKey string return builder } - func (builder *GetResourceWorkItemsByIdsReqBuilder) WorkItemIDs(workItemIDs []int64) *GetResourceWorkItemsByIdsReqBuilder { builder.apiReq.Body.(*GetResourceWorkItemsByIdsReqBody).WorkItemIDs = workItemIDs return builder @@ -2036,7 +1916,6 @@ func (builder *GetResourceWorkItemsByIdsReqBuilder) WorkItemTypeKey(workItemType return builder } - func (builder *GetResourceWorkItemsByIdsReqBuilder) Expand(expand *WorkItem_work_item_Expand) *GetResourceWorkItemsByIdsReqBuilder { builder.apiReq.Body.(*GetResourceWorkItemsByIdsReqBody).Expand = expand return builder @@ -2051,13 +1930,12 @@ type GetWBSInfoReq struct { apiReq *core.APIReq } type GetWBSInfoReqBody struct { - Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` + Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` } type GetWBSInfoResp struct { *core.APIResp `json:"-"` core.CodeError - Data *WBSInfo `json:"data"` - + Data *WBSInfo `json:"data"` } type GetWBSInfoReqBuilder struct { @@ -2079,19 +1957,16 @@ func (builder *GetWBSInfoReqBuilder) ProjectKey(projectKey string) *GetWBSInfoRe return builder } - func (builder *GetWBSInfoReqBuilder) WorkItemID(workItemID int64) *GetWBSInfoReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *GetWBSInfoReqBuilder) WorkItemTypeKey(workItemTypeKey string) *GetWBSInfoReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *GetWBSInfoReqBuilder) Expand(expand *WorkItem_work_item_Expand) *GetWBSInfoReqBuilder { builder.apiReq.Body.(*GetWBSInfoReqBody).Expand = expand return builder @@ -2114,11 +1989,11 @@ type GetWBSViewSubWorkItemConfReq struct { type GetWBSViewSubWorkItemConfResp struct { *core.APIResp `json:"-"` core.CodeError - Data *GetWBSViewSubWorkItemConfRespData `json:"data,omitempty"` + Data *GetWBSViewSubWorkItemConfRespData `json:"data,omitempty"` } type GetWBSViewSubWorkItemConfRespData struct { - DraftViewSubWorkItemConfs []DraftViewSubWorkItemConf `json:"draft_view_sub_work_item_confs,omitempty"` + DraftViewSubWorkItemConfs []DraftViewSubWorkItemConf `json:"draft_view_sub_work_item_confs,omitempty"` } type GetWBSViewSubWorkItemConfReqBuilder struct { @@ -2139,19 +2014,16 @@ func (builder *GetWBSViewSubWorkItemConfReqBuilder) DraftID(draftID string) *Get return builder } - func (builder *GetWBSViewSubWorkItemConfReqBuilder) WorkItemID(workItemID int64) *GetWBSViewSubWorkItemConfReqBuilder { builder.apiReq.QueryParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *GetWBSViewSubWorkItemConfReqBuilder) NodeUUID(nodeUUID string) *GetWBSViewSubWorkItemConfReqBuilder { builder.apiReq.QueryParams.Set("node_uuid", fmt.Sprint(nodeUUID)) return builder } - func (builder *GetWBSViewSubWorkItemConfReqBuilder) ProjectKey(projectKey string) *GetWBSViewSubWorkItemConfReqBuilder { builder.apiReq.QueryParams.Set("project_key", fmt.Sprint(projectKey)) return builder @@ -2167,15 +2039,14 @@ type GetWorkFlowReq struct { apiReq *core.APIReq } type GetWorkFlowReqBody struct { - Fields []string `json:"fields,omitempty"` - FlowType *int64 `json:"flow_type,omitempty"` - Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` + Fields []string `json:"fields,omitempty"` + FlowType *int64 `json:"flow_type,omitempty"` + Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` } type GetWorkFlowResp struct { *core.APIResp `json:"-"` core.CodeError - Data *WorkItem_work_item_NodesConnections `json:"data"` - + Data *WorkItem_work_item_NodesConnections `json:"data"` } type GetWorkFlowReqBuilder struct { @@ -2197,13 +2068,11 @@ func (builder *GetWorkFlowReqBuilder) ProjectKey(projectKey string) *GetWorkFlow return builder } - func (builder *GetWorkFlowReqBuilder) WorkItemID(workItemID int64) *GetWorkFlowReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *GetWorkFlowReqBuilder) Fields(fields []string) *GetWorkFlowReqBuilder { builder.apiReq.Body.(*GetWorkFlowReqBody).Fields = fields return builder @@ -2214,13 +2083,11 @@ func (builder *GetWorkFlowReqBuilder) FlowType(flowType int64) *GetWorkFlowReqBu return builder } - func (builder *GetWorkFlowReqBuilder) WorkItemTypeKey(workItemTypeKey string) *GetWorkFlowReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *GetWorkFlowReqBuilder) Expand(expand *WorkItem_work_item_Expand) *GetWorkFlowReqBuilder { builder.apiReq.Body.(*GetWorkFlowReqBody).Expand = expand return builder @@ -2235,19 +2102,18 @@ type GetWorkItemManHourRecordsReq struct { apiReq *core.APIReq } type GetWorkItemManHourRecordsReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - WorkItemID *int64 `json:"work_item_id,omitempty"` - PageNum *int64 `json:"page_num,omitempty"` - PageSize *int64 `json:"page_size,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + PageNum *int64 `json:"page_num,omitempty"` + PageSize *int64 `json:"page_size,omitempty"` } type GetWorkItemManHourRecordsResp struct { *core.APIResp `json:"-"` core.CodeError - Data []ManHourRecord `json:"data"` - - Pagination *WorkItem_common_Pagination `json:"pagination"` - + Data []ManHourRecord `json:"data"` + + Pagination *WorkItem_common_Pagination `json:"pagination"` } type GetWorkItemManHourRecordsReqBuilder struct { @@ -2269,25 +2135,21 @@ func (builder *GetWorkItemManHourRecordsReqBuilder) ProjectKey(projectKey string return builder } - func (builder *GetWorkItemManHourRecordsReqBuilder) WorkItemTypeKey(workItemTypeKey string) *GetWorkItemManHourRecordsReqBuilder { builder.apiReq.Body.(*GetWorkItemManHourRecordsReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *GetWorkItemManHourRecordsReqBuilder) WorkItemID(workItemID int64) *GetWorkItemManHourRecordsReqBuilder { builder.apiReq.Body.(*GetWorkItemManHourRecordsReqBody).WorkItemID = &workItemID return builder } - func (builder *GetWorkItemManHourRecordsReqBuilder) PageNum(pageNum int64) *GetWorkItemManHourRecordsReqBuilder { builder.apiReq.Body.(*GetWorkItemManHourRecordsReqBody).PageNum = &pageNum return builder } - func (builder *GetWorkItemManHourRecordsReqBuilder) PageSize(pageSize int64) *GetWorkItemManHourRecordsReqBuilder { builder.apiReq.Body.(*GetWorkItemManHourRecordsReqBody).PageSize = &pageSize return builder @@ -2303,30 +2165,30 @@ type GetWorkItemOpRecordReq struct { apiReq *core.APIReq } type GetWorkItemOpRecordReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemIDs []int64 `json:"work_item_ids,omitempty"` - StartFrom *string `json:"start_from,omitempty"` - Operator []string `json:"operator,omitempty"` - OperatorType []string `json:"operator_type,omitempty"` - SourceType []string `json:"source_type,omitempty"` - Source []string `json:"source,omitempty"` - OperationType []string `json:"operation_type,omitempty"` - Start *int64 `json:"start,omitempty"` - End *int64 `json:"end,omitempty"` - OpRecordModule []string `json:"op_record_module,omitempty"` - PageSize *int64 `json:"page_size,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemIDs []int64 `json:"work_item_ids,omitempty"` + StartFrom *string `json:"start_from,omitempty"` + Operator []string `json:"operator,omitempty"` + OperatorType []string `json:"operator_type,omitempty"` + SourceType []string `json:"source_type,omitempty"` + Source []string `json:"source,omitempty"` + OperationType []string `json:"operation_type,omitempty"` + Start *int64 `json:"start,omitempty"` + End *int64 `json:"end,omitempty"` + OpRecordModule []string `json:"op_record_module,omitempty"` + PageSize *int64 `json:"page_size,omitempty"` } type GetWorkItemOpRecordResp struct { *core.APIResp `json:"-"` core.CodeError - Data *GetWorkItemOpRecordRespData `json:"data,omitempty"` + Data *GetWorkItemOpRecordRespData `json:"data,omitempty"` } type GetWorkItemOpRecordRespData struct { - HasMore *bool `json:"has_more,omitempty"` - StartFrom *string `json:"start_from,omitempty"` - OpRecords []OAPIOperationRecord `json:"op_records,omitempty"` - Total *int64 `json:"total,omitempty"` + HasMore *bool `json:"has_more,omitempty"` + StartFrom *string `json:"start_from,omitempty"` + OpRecords []OAPIOperationRecord `json:"op_records,omitempty"` + Total *int64 `json:"total,omitempty"` } type GetWorkItemOpRecordReqBuilder struct { @@ -2348,7 +2210,6 @@ func (builder *GetWorkItemOpRecordReqBuilder) ProjectKey(projectKey string) *Get return builder } - func (builder *GetWorkItemOpRecordReqBuilder) WorkItemIDs(workItemIDs []int64) *GetWorkItemOpRecordReqBuilder { builder.apiReq.Body.(*GetWorkItemOpRecordReqBody).WorkItemIDs = workItemIDs return builder @@ -2359,7 +2220,6 @@ func (builder *GetWorkItemOpRecordReqBuilder) StartFrom(startFrom string) *GetWo return builder } - func (builder *GetWorkItemOpRecordReqBuilder) Operator(operator []string) *GetWorkItemOpRecordReqBuilder { builder.apiReq.Body.(*GetWorkItemOpRecordReqBody).Operator = operator return builder @@ -2390,13 +2250,11 @@ func (builder *GetWorkItemOpRecordReqBuilder) Start(start int64) *GetWorkItemOpR return builder } - func (builder *GetWorkItemOpRecordReqBuilder) End(end int64) *GetWorkItemOpRecordReqBuilder { builder.apiReq.Body.(*GetWorkItemOpRecordReqBody).End = &end return builder } - func (builder *GetWorkItemOpRecordReqBuilder) OpRecordModule(opRecordModule []string) *GetWorkItemOpRecordReqBuilder { builder.apiReq.Body.(*GetWorkItemOpRecordReqBody).OpRecordModule = opRecordModule return builder @@ -2417,17 +2275,16 @@ type GetWorkItemTransRequiredItemReq struct { apiReq *core.APIReq } type GetWorkItemTransRequiredItemReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - WorkItemID *int64 `json:"work_item_id,omitempty"` - StateKey *string `json:"state_key,omitempty"` - Mode *string `json:"mode,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + StateKey *string `json:"state_key,omitempty"` + Mode *string `json:"mode,omitempty"` } type GetWorkItemTransRequiredItemResp struct { *core.APIResp `json:"-"` core.CodeError - Data *NodeRequiredItemRes `json:"data"` - + Data *NodeRequiredItemRes `json:"data"` } type GetWorkItemTransRequiredItemReqBuilder struct { @@ -2449,25 +2306,21 @@ func (builder *GetWorkItemTransRequiredItemReqBuilder) ProjectKey(projectKey str return builder } - func (builder *GetWorkItemTransRequiredItemReqBuilder) WorkItemTypeKey(workItemTypeKey string) *GetWorkItemTransRequiredItemReqBuilder { builder.apiReq.Body.(*GetWorkItemTransRequiredItemReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *GetWorkItemTransRequiredItemReqBuilder) WorkItemID(workItemID int64) *GetWorkItemTransRequiredItemReqBuilder { builder.apiReq.Body.(*GetWorkItemTransRequiredItemReqBody).WorkItemID = &workItemID return builder } - func (builder *GetWorkItemTransRequiredItemReqBuilder) StateKey(stateKey string) *GetWorkItemTransRequiredItemReqBuilder { builder.apiReq.Body.(*GetWorkItemTransRequiredItemReqBody).StateKey = &stateKey return builder } - func (builder *GetWorkItemTransRequiredItemReqBuilder) Mode(mode string) *GetWorkItemTransRequiredItemReqBuilder { builder.apiReq.Body.(*GetWorkItemTransRequiredItemReqBody).Mode = &mode return builder @@ -2485,8 +2338,7 @@ type GetWorkItemTypeInfoByKeyReq struct { type GetWorkItemTypeInfoByKeyResp struct { *core.APIResp `json:"-"` core.CodeError - Data *WorkItemTypeInfo `json:"data"` - + Data *WorkItemTypeInfo `json:"data"` } type GetWorkItemTypeInfoByKeyReqBuilder struct { @@ -2507,7 +2359,6 @@ func (builder *GetWorkItemTypeInfoByKeyReqBuilder) ProjectKey(projectKey string) return builder } - func (builder *GetWorkItemTypeInfoByKeyReqBuilder) WorkItemTypeKey(workItemTypeKey string) *GetWorkItemTypeInfoByKeyReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder @@ -2523,15 +2374,14 @@ type GetWorkItemsByIdsReq struct { apiReq *core.APIReq } type GetWorkItemsByIdsReqBody struct { - WorkItemIDs []int64 `json:"work_item_ids,omitempty"` - Fields []string `json:"fields,omitempty"` - Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` + WorkItemIDs []int64 `json:"work_item_ids,omitempty"` + Fields []string `json:"fields,omitempty"` + Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` } type GetWorkItemsByIdsResp struct { *core.APIResp `json:"-"` core.CodeError - Data []WorkItem_work_item_WorkItemInfo `json:"data"` - + Data []WorkItem_work_item_WorkItemInfo `json:"data"` } type GetWorkItemsByIdsReqBuilder struct { @@ -2553,7 +2403,6 @@ func (builder *GetWorkItemsByIdsReqBuilder) ProjectKey(projectKey string) *GetWo return builder } - func (builder *GetWorkItemsByIdsReqBuilder) WorkItemIDs(workItemIDs []int64) *GetWorkItemsByIdsReqBuilder { builder.apiReq.Body.(*GetWorkItemsByIdsReqBody).WorkItemIDs = workItemIDs return builder @@ -2569,7 +2418,6 @@ func (builder *GetWorkItemsByIdsReqBuilder) WorkItemTypeKey(workItemTypeKey stri return builder } - func (builder *GetWorkItemsByIdsReqBuilder) Expand(expand *WorkItem_work_item_Expand) *GetWorkItemsByIdsReqBuilder { builder.apiReq.Body.(*GetWorkItemsByIdsReqBody).Expand = expand return builder @@ -2584,22 +2432,21 @@ type IntegrateSearchReq struct { apiReq *core.APIReq } type IntegrateSearchReqBody struct { - Query *Query `json:"query,omitempty"` - SearchID *string `json:"search_id,omitempty"` - ViewID *string `json:"view_id,omitempty"` - FieldSelected []string `json:"field_selected,omitempty"` - Features map[string]string `json:"features,omitempty"` - DataSources []DataSource `json:"data_sources,omitempty"` + Query *Query `json:"query,omitempty"` + SearchID *string `json:"search_id,omitempty"` + ViewID *string `json:"view_id,omitempty"` + FieldSelected []string `json:"field_selected,omitempty"` + Features map[string]string `json:"features,omitempty"` + DataSources []DataSource `json:"data_sources,omitempty"` } type IntegrateSearchResp struct { *core.APIResp `json:"-"` core.CodeError - Data *string `json:"data"` - - Pagination *Search_concisesearch_Pagination `json:"pagination"` - - ExtraInfo map[string]string `json:"extra_info"` - + Data *string `json:"data"` + + Pagination *Search_concisesearch_Pagination `json:"pagination"` + + ExtraInfo map[string]string `json:"extra_info"` } type IntegrateSearchReqBuilder struct { @@ -2626,13 +2473,11 @@ func (builder *IntegrateSearchReqBuilder) SearchID(searchID string) *IntegrateSe return builder } - func (builder *IntegrateSearchReqBuilder) ViewID(viewID string) *IntegrateSearchReqBuilder { builder.apiReq.Body.(*IntegrateSearchReqBody).ViewID = &viewID return builder } - func (builder *IntegrateSearchReqBuilder) FieldSelected(fieldSelected []string) *IntegrateSearchReqBuilder { builder.apiReq.Body.(*IntegrateSearchReqBody).FieldSelected = fieldSelected return builder @@ -2657,14 +2502,13 @@ type InviteBotJoinChatReq struct { apiReq *core.APIReq } type InviteBotJoinChatReqBody struct { - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - AppIDs []string `json:"app_ids,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + AppIDs []string `json:"app_ids,omitempty"` } type InviteBotJoinChatResp struct { *core.APIResp `json:"-"` core.CodeError - Data *BotJoinChatInfo `json:"data"` - + Data *BotJoinChatInfo `json:"data"` } type InviteBotJoinChatReqBuilder struct { @@ -2686,19 +2530,16 @@ func (builder *InviteBotJoinChatReqBuilder) ProjectKey(projectKey string) *Invit return builder } - func (builder *InviteBotJoinChatReqBuilder) WorkItemID(workItemID int64) *InviteBotJoinChatReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *InviteBotJoinChatReqBuilder) WorkItemTypeKey(workItemTypeKey string) *InviteBotJoinChatReqBuilder { builder.apiReq.Body.(*InviteBotJoinChatReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *InviteBotJoinChatReqBuilder) AppIDs(appIDs []string) *InviteBotJoinChatReqBuilder { builder.apiReq.Body.(*InviteBotJoinChatReqBody).AppIDs = appIDs return builder @@ -2715,8 +2556,7 @@ type ListTemplateConfReq struct { type ListTemplateConfResp struct { *core.APIResp `json:"-"` core.CodeError - Data []TemplateConf `json:"data"` - + Data []TemplateConf `json:"data"` } type ListTemplateConfReqBuilder struct { @@ -2737,7 +2577,6 @@ func (builder *ListTemplateConfReqBuilder) ProjectKey(projectKey string) *ListTe return builder } - func (builder *ListTemplateConfReqBuilder) WorkItemTypeKey(workItemTypeKey string) *ListTemplateConfReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder @@ -2749,79 +2588,73 @@ func (builder *ListTemplateConfReqBuilder) Build() *ListTemplateConfReq { return req } -type OAPIUpdateCompoundFieldValueReq struct { +type UpdateCompoundFieldValueReq struct { apiReq *core.APIReq } -type OAPIUpdateCompoundFieldValueReqBody struct { - WorkItemID *int64 `json:"work_item_id,omitempty"` - ProjectKey *string `json:"project_key,omitempty"` - FieldKey *string `json:"field_key,omitempty"` - FieldAlias *string `json:"field_alias,omitempty"` - GroupUUID *string `json:"group_uuid,omitempty"` - Action *string `json:"action,omitempty"` - Fields [][]WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` +type UpdateCompoundFieldValueReqBody struct { + WorkItemID *int64 `json:"work_item_id,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + FieldKey *string `json:"field_key,omitempty"` + FieldAlias *string `json:"field_alias,omitempty"` + GroupUUID *string `json:"group_uuid,omitempty"` + Action *string `json:"action,omitempty"` + Fields [][]WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` } -type OAPIUpdateCompoundFieldValueResp struct { +type UpdateCompoundFieldValueResp struct { *core.APIResp `json:"-"` core.CodeError } -type OAPIUpdateCompoundFieldValueReqBuilder struct { +type UpdateCompoundFieldValueReqBuilder struct { apiReq *core.APIReq } -func NewOAPIUpdateCompoundFieldValueReqBuilder() *OAPIUpdateCompoundFieldValueReqBuilder { - builder := &OAPIUpdateCompoundFieldValueReqBuilder{} +func NewUpdateCompoundFieldValueReqBuilder() *UpdateCompoundFieldValueReqBuilder { + builder := &UpdateCompoundFieldValueReqBuilder{} builder.apiReq = &core.APIReq{ PathParams: core.PathParams{}, QueryParams: core.QueryParams{}, - Body: &OAPIUpdateCompoundFieldValueReqBody{}, + Body: &UpdateCompoundFieldValueReqBody{}, } return builder } -func (builder *OAPIUpdateCompoundFieldValueReqBuilder) WorkItemID(workItemID int64) *OAPIUpdateCompoundFieldValueReqBuilder { - builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).WorkItemID = &workItemID +func (builder *UpdateCompoundFieldValueReqBuilder) WorkItemID(workItemID int64) *UpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*UpdateCompoundFieldValueReqBody).WorkItemID = &workItemID return builder } - -func (builder *OAPIUpdateCompoundFieldValueReqBuilder) ProjectKey(projectKey string) *OAPIUpdateCompoundFieldValueReqBuilder { - builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).ProjectKey = &projectKey +func (builder *UpdateCompoundFieldValueReqBuilder) ProjectKey(projectKey string) *UpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*UpdateCompoundFieldValueReqBody).ProjectKey = &projectKey return builder } - -func (builder *OAPIUpdateCompoundFieldValueReqBuilder) FieldKey(fieldKey string) *OAPIUpdateCompoundFieldValueReqBuilder { - builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).FieldKey = &fieldKey +func (builder *UpdateCompoundFieldValueReqBuilder) FieldKey(fieldKey string) *UpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*UpdateCompoundFieldValueReqBody).FieldKey = &fieldKey return builder } - -func (builder *OAPIUpdateCompoundFieldValueReqBuilder) FieldAlias(fieldAlias string) *OAPIUpdateCompoundFieldValueReqBuilder { - builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).FieldAlias = &fieldAlias +func (builder *UpdateCompoundFieldValueReqBuilder) FieldAlias(fieldAlias string) *UpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*UpdateCompoundFieldValueReqBody).FieldAlias = &fieldAlias return builder } - -func (builder *OAPIUpdateCompoundFieldValueReqBuilder) GroupUUID(groupUUID string) *OAPIUpdateCompoundFieldValueReqBuilder { - builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).GroupUUID = &groupUUID +func (builder *UpdateCompoundFieldValueReqBuilder) GroupUUID(groupUUID string) *UpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*UpdateCompoundFieldValueReqBody).GroupUUID = &groupUUID return builder } - -func (builder *OAPIUpdateCompoundFieldValueReqBuilder) Action(action string) *OAPIUpdateCompoundFieldValueReqBuilder { - builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).Action = &action +func (builder *UpdateCompoundFieldValueReqBuilder) Action(action string) *UpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*UpdateCompoundFieldValueReqBody).Action = &action return builder } - -func (builder *OAPIUpdateCompoundFieldValueReqBuilder) Fields(fields [][]WorkItem_work_item_FieldValuePair) *OAPIUpdateCompoundFieldValueReqBuilder { - builder.apiReq.Body.(*OAPIUpdateCompoundFieldValueReqBody).Fields = fields +func (builder *UpdateCompoundFieldValueReqBuilder) Fields(fields [][]WorkItem_work_item_FieldValuePair) *UpdateCompoundFieldValueReqBuilder { + builder.apiReq.Body.(*UpdateCompoundFieldValueReqBody).Fields = fields return builder } -func (builder *OAPIUpdateCompoundFieldValueReqBuilder) Build() *OAPIUpdateCompoundFieldValueReq { - req := &OAPIUpdateCompoundFieldValueReq{} +func (builder *UpdateCompoundFieldValueReqBuilder) Build() *UpdateCompoundFieldValueReq { + req := &UpdateCompoundFieldValueReq{} req.apiReq = builder.apiReq return req } @@ -2830,18 +2663,18 @@ type PatchWBSViewDraftReq struct { apiReq *core.APIReq } type PatchWBSViewDraftReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - DraftID *string `json:"draft_id,omitempty"` - Operations []Operation `json:"operations,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + DraftID *string `json:"draft_id,omitempty"` + Operations []Operation `json:"operations,omitempty"` } type PatchWBSViewDraftResp struct { *core.APIResp `json:"-"` core.CodeError - Data *PatchWBSViewDraftRespData `json:"data,omitempty"` + Data *PatchWBSViewDraftRespData `json:"data,omitempty"` } type PatchWBSViewDraftRespData struct { - RelationValues []Operation `json:"relation_values,omitempty"` + RelationValues []Operation `json:"relation_values,omitempty"` } type PatchWBSViewDraftReqBuilder struct { @@ -2863,13 +2696,11 @@ func (builder *PatchWBSViewDraftReqBuilder) ProjectKey(projectKey string) *Patch return builder } - func (builder *PatchWBSViewDraftReqBuilder) DraftID(draftID string) *PatchWBSViewDraftReqBuilder { builder.apiReq.Body.(*PatchWBSViewDraftReqBody).DraftID = &draftID return builder } - func (builder *PatchWBSViewDraftReqBuilder) Operations(operations []Operation) *PatchWBSViewDraftReqBuilder { builder.apiReq.Body.(*PatchWBSViewDraftReqBody).Operations = operations return builder @@ -2884,8 +2715,8 @@ type PublishWBSViewDraftReq struct { apiReq *core.APIReq } type PublishWBSViewDraftReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - DraftID *string `json:"draft_id,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + DraftID *string `json:"draft_id,omitempty"` } type PublishWBSViewDraftResp struct { *core.APIResp `json:"-"` @@ -2911,7 +2742,6 @@ func (builder *PublishWBSViewDraftReqBuilder) ProjectKey(projectKey string) *Pub return builder } - func (builder *PublishWBSViewDraftReqBuilder) DraftID(draftID string) *PublishWBSViewDraftReqBuilder { builder.apiReq.Body.(*PublishWBSViewDraftReqBody).DraftID = &draftID return builder @@ -2929,8 +2759,7 @@ type QueryAWorkItemTypesReq struct { type QueryAWorkItemTypesResp struct { *core.APIResp `json:"-"` core.CodeError - Data []WorkItemKeyType `json:"data"` - + Data []WorkItemKeyType `json:"data"` } type QueryAWorkItemTypesReqBuilder struct { @@ -2963,8 +2792,7 @@ type QueryBusinessesReq struct { type QueryBusinessesResp struct { *core.APIResp `json:"-"` core.CodeError - Data []Business `json:"data"` - + Data []Business `json:"data"` } type QueryBusinessesReqBuilder struct { @@ -2995,13 +2823,12 @@ type QueryProjectFieldsReq struct { apiReq *core.APIReq } type QueryProjectFieldsReqBody struct { - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` } type QueryProjectFieldsResp struct { *core.APIResp `json:"-"` core.CodeError - Data []SimpleField `json:"data"` - + Data []SimpleField `json:"data"` } type QueryProjectFieldsReqBuilder struct { @@ -3023,7 +2850,6 @@ func (builder *QueryProjectFieldsReqBuilder) ProjectKey(projectKey string) *Quer return builder } - func (builder *QueryProjectFieldsReqBuilder) WorkItemTypeKey(workItemTypeKey string) *QueryProjectFieldsReqBuilder { builder.apiReq.Body.(*QueryProjectFieldsReqBody).WorkItemTypeKey = &workItemTypeKey return builder @@ -3039,13 +2865,12 @@ type QueryProjectRelationReq struct { apiReq *core.APIReq } type QueryProjectRelationReqBody struct { - RemoteProjects []string `json:"remote_projects,omitempty"` + RemoteProjects []string `json:"remote_projects,omitempty"` } type QueryProjectRelationResp struct { *core.APIResp `json:"-"` core.CodeError - Data []ProjectRelationRule `json:"data"` - + Data []ProjectRelationRule `json:"data"` } type QueryProjectRelationReqBuilder struct { @@ -3067,7 +2892,6 @@ func (builder *QueryProjectRelationReqBuilder) ProjectKey(projectKey string) *Qu return builder } - func (builder *QueryProjectRelationReqBuilder) RemoteProjects(remoteProjects []string) *QueryProjectRelationReqBuilder { builder.apiReq.Body.(*QueryProjectRelationReqBody).RemoteProjects = remoteProjects return builder @@ -3082,16 +2906,15 @@ type QueryProjectRelationInstanceReq struct { apiReq *core.APIReq } type QueryProjectRelationInstanceReqBody struct { - RelationRuleID *string `json:"relation_rule_id,omitempty"` - RelationWorkItemID *int64 `json:"relation_work_item_id,omitempty"` - RelationWorkItemTypeKey *string `json:"relation_work_item_type_key,omitempty"` - RelationProjectKey *string `json:"relation_project_key,omitempty"` + RelationRuleID *string `json:"relation_rule_id,omitempty"` + RelationWorkItemID *int64 `json:"relation_work_item_id,omitempty"` + RelationWorkItemTypeKey *string `json:"relation_work_item_type_key,omitempty"` + RelationProjectKey *string `json:"relation_project_key,omitempty"` } type QueryProjectRelationInstanceResp struct { *core.APIResp `json:"-"` core.CodeError - Data []RelationInstance `json:"data"` - + Data []RelationInstance `json:"data"` } type QueryProjectRelationInstanceReqBuilder struct { @@ -3113,37 +2936,31 @@ func (builder *QueryProjectRelationInstanceReqBuilder) ProjectKey(projectKey str return builder } - func (builder *QueryProjectRelationInstanceReqBuilder) WorkItemTypeKey(workItemTypeKey string) *QueryProjectRelationInstanceReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *QueryProjectRelationInstanceReqBuilder) WorkItemID(workItemID int64) *QueryProjectRelationInstanceReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *QueryProjectRelationInstanceReqBuilder) RelationRuleID(relationRuleID string) *QueryProjectRelationInstanceReqBuilder { builder.apiReq.Body.(*QueryProjectRelationInstanceReqBody).RelationRuleID = &relationRuleID return builder } - func (builder *QueryProjectRelationInstanceReqBuilder) RelationWorkItemID(relationWorkItemID int64) *QueryProjectRelationInstanceReqBuilder { builder.apiReq.Body.(*QueryProjectRelationInstanceReqBody).RelationWorkItemID = &relationWorkItemID return builder } - func (builder *QueryProjectRelationInstanceReqBuilder) RelationWorkItemTypeKey(relationWorkItemTypeKey string) *QueryProjectRelationInstanceReqBuilder { builder.apiReq.Body.(*QueryProjectRelationInstanceReqBody).RelationWorkItemTypeKey = &relationWorkItemTypeKey return builder } - func (builder *QueryProjectRelationInstanceReqBuilder) RelationProjectKey(relationProjectKey string) *QueryProjectRelationInstanceReqBuilder { builder.apiReq.Body.(*QueryProjectRelationInstanceReqBody).RelationProjectKey = &relationProjectKey return builder @@ -3161,8 +2978,7 @@ type QueryRoleConfDetailsReq struct { type QueryRoleConfDetailsResp struct { *core.APIResp `json:"-"` core.CodeError - Data []RoleConfDetail `json:"data"` - + Data []RoleConfDetail `json:"data"` } type QueryRoleConfDetailsReqBuilder struct { @@ -3183,7 +2999,6 @@ func (builder *QueryRoleConfDetailsReqBuilder) ProjectKey(projectKey string) *Qu return builder } - func (builder *QueryRoleConfDetailsReqBuilder) WorkItemTypeKey(workItemTypeKey string) *QueryRoleConfDetailsReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder @@ -3199,13 +3014,12 @@ type QueryStoryRelationsReq struct { apiReq *core.APIReq } type QueryStoryRelationsReqBody struct { - WorkItemIDs []int64 `json:"work_item_ids,omitempty"` + WorkItemIDs []int64 `json:"work_item_ids,omitempty"` } type QueryStoryRelationsResp struct { *core.APIResp `json:"-"` core.CodeError - Data *QueryStoryRelationData `json:"data"` - + Data *QueryStoryRelationData `json:"data"` } type QueryStoryRelationsReqBuilder struct { @@ -3244,18 +3058,18 @@ type QueryTaskResultReq struct { type QueryTaskResultResp struct { *core.APIResp `json:"-"` core.CodeError - Data *QueryTaskResultRespData `json:"data,omitempty"` + Data *QueryTaskResultRespData `json:"data,omitempty"` } type QueryTaskResultRespData struct { - TaskID *string `json:"task_id,omitempty"` - TaskStatus *string `json:"task_status,omitempty"` - Total *int64 `json:"total,omitempty"` - SuccessTotal *int64 `json:"success_total,omitempty"` - ErrorTotal *int64 `json:"error_total,omitempty"` - SuccessSubTaskList []string `json:"success_sub_task_list,omitempty"` - FailSubTaskList []string `json:"fail_sub_task_list,omitempty"` - ErrorScenes []string `json:"error_scenes,omitempty"` + TaskID *string `json:"task_id,omitempty"` + TaskStatus *string `json:"task_status,omitempty"` + Total *int64 `json:"total,omitempty"` + SuccessTotal *int64 `json:"success_total,omitempty"` + ErrorTotal *int64 `json:"error_total,omitempty"` + SuccessSubTaskList []string `json:"success_sub_task_list,omitempty"` + FailSubTaskList []string `json:"fail_sub_task_list,omitempty"` + ErrorScenes []string `json:"error_scenes,omitempty"` } type QueryTaskResultReqBuilder struct { @@ -3288,8 +3102,7 @@ type QueryTemplateDetailReq struct { type QueryTemplateDetailResp struct { *core.APIResp `json:"-"` core.CodeError - Data *TemplateDetail `json:"data"` - + Data *TemplateDetail `json:"data"` } type QueryTemplateDetailReqBuilder struct { @@ -3310,7 +3123,6 @@ func (builder *QueryTemplateDetailReqBuilder) ProjectKey(projectKey string) *Que return builder } - func (builder *QueryTemplateDetailReqBuilder) TemplateID(templateID int64) *QueryTemplateDetailReqBuilder { builder.apiReq.PathParams.Set("template_id", fmt.Sprint(templateID)) return builder @@ -3326,19 +3138,19 @@ type QueryWBSViewDraftReq struct { apiReq *core.APIReq } type QueryWBSViewDraftReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemID *int64 `json:"work_item_id,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - NeedInit *bool `json:"need_init,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + NeedInit *bool `json:"need_init,omitempty"` } type QueryWBSViewDraftResp struct { *core.APIResp `json:"-"` core.CodeError - Data *QueryWBSViewDraftRespData `json:"data,omitempty"` + Data *QueryWBSViewDraftRespData `json:"data,omitempty"` } type QueryWBSViewDraftRespData struct { - WbsDraft *WbsDraft `json:"wbs_draft,omitempty"` + WbsDraft *WbsDraft `json:"wbs_draft,omitempty"` } type QueryWBSViewDraftReqBuilder struct { @@ -3360,19 +3172,16 @@ func (builder *QueryWBSViewDraftReqBuilder) ProjectKey(projectKey string) *Query return builder } - func (builder *QueryWBSViewDraftReqBuilder) WorkItemID(workItemID int64) *QueryWBSViewDraftReqBuilder { builder.apiReq.Body.(*QueryWBSViewDraftReqBody).WorkItemID = &workItemID return builder } - func (builder *QueryWBSViewDraftReqBuilder) WorkItemTypeKey(workItemTypeKey string) *QueryWBSViewDraftReqBuilder { builder.apiReq.Body.(*QueryWBSViewDraftReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *QueryWBSViewDraftReqBuilder) NeedInit(needInit bool) *QueryWBSViewDraftReqBuilder { builder.apiReq.Body.(*QueryWBSViewDraftReqBody).NeedInit = &needInit return builder @@ -3388,13 +3197,12 @@ type QueryWbsTemplateConfReq struct { apiReq *core.APIReq } type QueryWbsTemplateConfReqBody struct { - TemplateKey *string `json:"template_key,omitempty"` + TemplateKey *string `json:"template_key,omitempty"` } type QueryWbsTemplateConfResp struct { *core.APIResp `json:"-"` core.CodeError - Data *WbsTemplate `json:"data"` - + Data *WbsTemplate `json:"data"` } type QueryWbsTemplateConfReqBuilder struct { @@ -3416,7 +3224,6 @@ func (builder *QueryWbsTemplateConfReqBuilder) ProjectKey(projectKey string) *Qu return builder } - func (builder *QueryWbsTemplateConfReqBuilder) TemplateKey(templateKey string) *QueryWbsTemplateConfReqBuilder { builder.apiReq.Body.(*QueryWbsTemplateConfReqBody).TemplateKey = &templateKey return builder @@ -3434,8 +3241,7 @@ type QueryWorkItemMetaDataReq struct { type QueryWorkItemMetaDataResp struct { *core.APIResp `json:"-"` core.CodeError - Data []FieldConf `json:"data"` - + Data []FieldConf `json:"data"` } type QueryWorkItemMetaDataReqBuilder struct { @@ -3456,7 +3262,6 @@ func (builder *QueryWorkItemMetaDataReqBuilder) ProjectKey(projectKey string) *Q return builder } - func (builder *QueryWorkItemMetaDataReqBuilder) WorkItemTypeKey(workItemTypeKey string) *QueryWorkItemMetaDataReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder @@ -3474,8 +3279,7 @@ type QueryWorkItemRelationReq struct { type QueryWorkItemRelationResp struct { *core.APIResp `json:"-"` core.CodeError - Data []WorkItemRelation `json:"data"` - + Data []WorkItemRelation `json:"data"` } type QueryWorkItemRelationReqBuilder struct { @@ -3508,8 +3312,7 @@ type QueryWorkItemSubTaskReq struct { type QueryWorkItemSubTaskResp struct { *core.APIResp `json:"-"` core.CodeError - Data []NodeTask `json:"data"` - + Data []NodeTask `json:"data"` } type QueryWorkItemSubTaskReqBuilder struct { @@ -3530,19 +3333,16 @@ func (builder *QueryWorkItemSubTaskReqBuilder) ProjectKey(projectKey string) *Qu return builder } - func (builder *QueryWorkItemSubTaskReqBuilder) WorkItemID(workItemID int64) *QueryWorkItemSubTaskReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *QueryWorkItemSubTaskReqBuilder) WorkItemTypeKey(workItemTypeKey string) *QueryWorkItemSubTaskReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *QueryWorkItemSubTaskReqBuilder) NodeID(nodeID string) *QueryWorkItemSubTaskReqBuilder { builder.apiReq.QueryParams.Set("node_id", fmt.Sprint(nodeID)) return builder @@ -3558,18 +3358,18 @@ type ResetWBSViewDraftReq struct { apiReq *core.APIReq } type ResetWBSViewDraftReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemID *int64 `json:"work_item_id,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` } type ResetWBSViewDraftResp struct { *core.APIResp `json:"-"` core.CodeError - Data *ResetWBSViewDraftRespData `json:"data,omitempty"` + Data *ResetWBSViewDraftRespData `json:"data,omitempty"` } type ResetWBSViewDraftRespData struct { - WbsDraft *WbsDraft `json:"wbs_draft,omitempty"` + WbsDraft *WbsDraft `json:"wbs_draft,omitempty"` } type ResetWBSViewDraftReqBuilder struct { @@ -3591,13 +3391,11 @@ func (builder *ResetWBSViewDraftReqBuilder) ProjectKey(projectKey string) *Reset return builder } - func (builder *ResetWBSViewDraftReqBuilder) WorkItemID(workItemID int64) *ResetWBSViewDraftReqBuilder { builder.apiReq.Body.(*ResetWBSViewDraftReqBody).WorkItemID = &workItemID return builder } - func (builder *ResetWBSViewDraftReqBuilder) WorkItemTypeKey(workItemTypeKey string) *ResetWBSViewDraftReqBuilder { builder.apiReq.Body.(*ResetWBSViewDraftReqBody).WorkItemTypeKey = &workItemTypeKey return builder @@ -3613,16 +3411,15 @@ type ResourceCreateWorkItemReq struct { apiReq *core.APIReq } type ResourceCreateWorkItemReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - TemplateID *int64 `json:"template_id,omitempty"` - FieldValuePairs []WorkItem_work_item_FieldValuePair `json:"field_value_pairs,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + TemplateID *int64 `json:"template_id,omitempty"` + FieldValuePairs []WorkItem_work_item_FieldValuePair `json:"field_value_pairs,omitempty"` } type ResourceCreateWorkItemResp struct { *core.APIResp `json:"-"` core.CodeError - Data *OAPICreateWorkItemInfo `json:"data"` - + Data *OAPICreateWorkItemInfo `json:"data"` } type ResourceCreateWorkItemReqBuilder struct { @@ -3644,19 +3441,16 @@ func (builder *ResourceCreateWorkItemReqBuilder) ProjectKey(projectKey string) * return builder } - func (builder *ResourceCreateWorkItemReqBuilder) WorkItemTypeKey(workItemTypeKey string) *ResourceCreateWorkItemReqBuilder { builder.apiReq.Body.(*ResourceCreateWorkItemReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *ResourceCreateWorkItemReqBuilder) TemplateID(templateID int64) *ResourceCreateWorkItemReqBuilder { builder.apiReq.Body.(*ResourceCreateWorkItemReqBody).TemplateID = &templateID return builder } - func (builder *ResourceCreateWorkItemReqBuilder) FieldValuePairs(fieldValuePairs []WorkItem_work_item_FieldValuePair) *ResourceCreateWorkItemReqBuilder { builder.apiReq.Body.(*ResourceCreateWorkItemReqBody).FieldValuePairs = fieldValuePairs return builder @@ -3671,19 +3465,18 @@ type ResourceSearchByParamsReq struct { apiReq *core.APIReq } type ResourceSearchByParamsReqBody struct { - DataSources []DataSource `json:"data_sources,omitempty"` - SearchGroup *SearchGroup `json:"search_group,omitempty"` - Pagination *Search_concisesearch_Pagination `json:"pagination,omitempty"` - FieldSelected []string `json:"field_selected,omitempty"` - Features map[string]string `json:"features,omitempty"` + DataSources []DataSource `json:"data_sources,omitempty"` + SearchGroup *SearchGroup `json:"search_group,omitempty"` + Pagination *Search_concisesearch_Pagination `json:"pagination,omitempty"` + FieldSelected []string `json:"field_selected,omitempty"` + Features map[string]string `json:"features,omitempty"` } type ResourceSearchByParamsResp struct { *core.APIResp `json:"-"` core.CodeError - Data []ResourceWorkItemInfo `json:"data"` - - Pagination *Search_concisesearch_Pagination `json:"pagination"` - + Data []ResourceWorkItemInfo `json:"data"` + + Pagination *Search_concisesearch_Pagination `json:"pagination"` } type ResourceSearchByParamsReqBuilder struct { @@ -3734,19 +3527,18 @@ type SearchByParamsReq struct { apiReq *core.APIReq } type SearchByParamsReqBody struct { - SearchGroup *Search_SearchGroup `json:"search_group,omitempty"` - PageNum *int64 `json:"page_num,omitempty"` - PageSize *int64 `json:"page_size,omitempty"` - Fields []string `json:"fields,omitempty"` - Expand *Expand `json:"expand,omitempty"` + SearchGroup *Search_SearchGroup `json:"search_group,omitempty"` + PageNum *int64 `json:"page_num,omitempty"` + PageSize *int64 `json:"page_size,omitempty"` + Fields []string `json:"fields,omitempty"` + Expand *Expand `json:"expand,omitempty"` } type SearchByParamsResp struct { *core.APIResp `json:"-"` core.CodeError - Data []WorkItemInfo `json:"data"` - - Pagination *Pagination `json:"pagination"` - + Data []WorkItemInfo `json:"data"` + + Pagination *Pagination `json:"pagination"` } type SearchByParamsReqBuilder struct { @@ -3768,7 +3560,6 @@ func (builder *SearchByParamsReqBuilder) ProjectKey(projectKey string) *SearchBy return builder } - func (builder *SearchByParamsReqBuilder) SearchGroup(searchGroup *Search_SearchGroup) *SearchByParamsReqBuilder { builder.apiReq.Body.(*SearchByParamsReqBody).SearchGroup = searchGroup return builder @@ -3779,19 +3570,16 @@ func (builder *SearchByParamsReqBuilder) WorkItemTypeKey(workItemTypeKey string) return builder } - func (builder *SearchByParamsReqBuilder) PageNum(pageNum int64) *SearchByParamsReqBuilder { builder.apiReq.Body.(*SearchByParamsReqBody).PageNum = &pageNum return builder } - func (builder *SearchByParamsReqBuilder) PageSize(pageSize int64) *SearchByParamsReqBuilder { builder.apiReq.Body.(*SearchByParamsReqBody).PageSize = &pageSize return builder } - func (builder *SearchByParamsReqBuilder) Fields(fields []string) *SearchByParamsReqBuilder { builder.apiReq.Body.(*SearchByParamsReqBody).Fields = fields return builder @@ -3811,22 +3599,21 @@ type SearchSubtaskReq struct { apiReq *core.APIReq } type SearchSubtaskReqBody struct { - ProjectKeys []string `json:"project_keys,omitempty"` - PageSize *int64 `json:"page_size,omitempty"` - PageNum *int64 `json:"page_num,omitempty"` - Name *string `json:"name,omitempty"` - UserKeys []string `json:"user_keys,omitempty"` - Status *int32 `json:"status,omitempty"` - CreatedAt *TimeInterval `json:"created_at,omitempty"` - SimpleNames []string `json:"simple_names,omitempty"` + ProjectKeys []string `json:"project_keys,omitempty"` + PageSize *int64 `json:"page_size,omitempty"` + PageNum *int64 `json:"page_num,omitempty"` + Name *string `json:"name,omitempty"` + UserKeys []string `json:"user_keys,omitempty"` + Status *int32 `json:"status,omitempty"` + CreatedAt *TimeInterval `json:"created_at,omitempty"` + SimpleNames []string `json:"simple_names,omitempty"` } type SearchSubtaskResp struct { *core.APIResp `json:"-"` core.CodeError - Pagination *Pagination `json:"pagination"` - - Data []SubDetail `json:"data"` - + Pagination *Pagination `json:"pagination"` + + Data []SubDetail `json:"data"` } type SearchSubtaskReqBuilder struct { @@ -3853,19 +3640,16 @@ func (builder *SearchSubtaskReqBuilder) PageSize(pageSize int64) *SearchSubtaskR return builder } - func (builder *SearchSubtaskReqBuilder) PageNum(pageNum int64) *SearchSubtaskReqBuilder { builder.apiReq.Body.(*SearchSubtaskReqBody).PageNum = &pageNum return builder } - func (builder *SearchSubtaskReqBuilder) Name(name string) *SearchSubtaskReqBuilder { builder.apiReq.Body.(*SearchSubtaskReqBody).Name = &name return builder } - func (builder *SearchSubtaskReqBuilder) UserKeys(userKeys []string) *SearchSubtaskReqBuilder { builder.apiReq.Body.(*SearchSubtaskReqBody).UserKeys = userKeys return builder @@ -3876,7 +3660,6 @@ func (builder *SearchSubtaskReqBuilder) Status(status int32) *SearchSubtaskReqBu return builder } - func (builder *SearchSubtaskReqBuilder) CreatedAt(createdAt *TimeInterval) *SearchSubtaskReqBuilder { builder.apiReq.Body.(*SearchSubtaskReqBody).CreatedAt = createdAt return builder @@ -3896,20 +3679,19 @@ type SearchWorkItemsRelationReq struct { apiReq *core.APIReq } type SearchWorkItemsRelationReqBody struct { - RelationWorkItemTypeKey *string `json:"relation_work_item_type_key,omitempty"` - RelationKey *string `json:"relation_key,omitempty"` - PageNum *int64 `json:"page_num,omitempty"` - PageSize *int64 `json:"page_size,omitempty"` - RelationType *int32 `json:"relation_type,omitempty"` - Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` + RelationWorkItemTypeKey *string `json:"relation_work_item_type_key,omitempty"` + RelationKey *string `json:"relation_key,omitempty"` + PageNum *int64 `json:"page_num,omitempty"` + PageSize *int64 `json:"page_size,omitempty"` + RelationType *int32 `json:"relation_type,omitempty"` + Expand *WorkItem_work_item_Expand `json:"expand,omitempty"` } type SearchWorkItemsRelationResp struct { *core.APIResp `json:"-"` core.CodeError - Data []WorkItem_work_item_WorkItemInfo `json:"data"` - - Pagination *WorkItem_common_Pagination `json:"pagination"` - + Data []WorkItem_work_item_WorkItemInfo `json:"data"` + + Pagination *WorkItem_common_Pagination `json:"pagination"` } type SearchWorkItemsRelationReqBuilder struct { @@ -3931,49 +3713,41 @@ func (builder *SearchWorkItemsRelationReqBuilder) ProjectKey(projectKey string) return builder } - func (builder *SearchWorkItemsRelationReqBuilder) WorkItemTypeKey(workItemTypeKey string) *SearchWorkItemsRelationReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *SearchWorkItemsRelationReqBuilder) WorkItemID(workItemID int64) *SearchWorkItemsRelationReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *SearchWorkItemsRelationReqBuilder) RelationWorkItemTypeKey(relationWorkItemTypeKey string) *SearchWorkItemsRelationReqBuilder { builder.apiReq.Body.(*SearchWorkItemsRelationReqBody).RelationWorkItemTypeKey = &relationWorkItemTypeKey return builder } - func (builder *SearchWorkItemsRelationReqBuilder) RelationKey(relationKey string) *SearchWorkItemsRelationReqBuilder { builder.apiReq.Body.(*SearchWorkItemsRelationReqBody).RelationKey = &relationKey return builder } - func (builder *SearchWorkItemsRelationReqBuilder) PageNum(pageNum int64) *SearchWorkItemsRelationReqBuilder { builder.apiReq.Body.(*SearchWorkItemsRelationReqBody).PageNum = &pageNum return builder } - func (builder *SearchWorkItemsRelationReqBuilder) PageSize(pageSize int64) *SearchWorkItemsRelationReqBuilder { builder.apiReq.Body.(*SearchWorkItemsRelationReqBody).PageSize = &pageSize return builder } - func (builder *SearchWorkItemsRelationReqBuilder) RelationType(relationType int32) *SearchWorkItemsRelationReqBuilder { builder.apiReq.Body.(*SearchWorkItemsRelationReqBody).RelationType = &relationType return builder } - func (builder *SearchWorkItemsRelationReqBuilder) Expand(expand *WorkItem_work_item_Expand) *SearchWorkItemsRelationReqBuilder { builder.apiReq.Body.(*SearchWorkItemsRelationReqBody).Expand = expand return builder @@ -3988,14 +3762,14 @@ type SubTaskModifyReq struct { apiReq *core.APIReq } type SubTaskModifyReqBody struct { - NodeID *string `json:"node_id,omitempty"` - TaskID *int64 `json:"task_id,omitempty"` - Action *string `json:"action,omitempty"` - Assignee []string `json:"assignee,omitempty"` - RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` - Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` - Deliverable []WorkItem_work_item_FieldValuePair `json:"deliverable,omitempty"` - Note *string `json:"note,omitempty"` + NodeID *string `json:"node_id,omitempty"` + TaskID *int64 `json:"task_id,omitempty"` + Action *string `json:"action,omitempty"` + Assignee []string `json:"assignee,omitempty"` + RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` + Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` + Deliverable []WorkItem_work_item_FieldValuePair `json:"deliverable,omitempty"` + Note *string `json:"note,omitempty"` } type SubTaskModifyResp struct { *core.APIResp `json:"-"` @@ -4021,19 +3795,16 @@ func (builder *SubTaskModifyReqBuilder) NodeID(nodeID string) *SubTaskModifyReqB return builder } - func (builder *SubTaskModifyReqBuilder) TaskID(taskID int64) *SubTaskModifyReqBuilder { builder.apiReq.Body.(*SubTaskModifyReqBody).TaskID = &taskID return builder } - func (builder *SubTaskModifyReqBuilder) Action(action string) *SubTaskModifyReqBuilder { builder.apiReq.Body.(*SubTaskModifyReqBody).Action = &action return builder } - func (builder *SubTaskModifyReqBuilder) Assignee(assignee []string) *SubTaskModifyReqBuilder { builder.apiReq.Body.(*SubTaskModifyReqBody).Assignee = assignee return builder @@ -4059,19 +3830,16 @@ func (builder *SubTaskModifyReqBuilder) Note(note string) *SubTaskModifyReqBuild return builder } - func (builder *SubTaskModifyReqBuilder) ProjectKey(projectKey string) *SubTaskModifyReqBuilder { builder.apiReq.PathParams.Set("project_key", fmt.Sprint(projectKey)) return builder } - func (builder *SubTaskModifyReqBuilder) WorkItemTypeKey(workItemTypeKey string) *SubTaskModifyReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *SubTaskModifyReqBuilder) WorkItemID(workItemID int64) *SubTaskModifyReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder @@ -4087,18 +3855,18 @@ type SwitchBackToWbsViewDraftReq struct { apiReq *core.APIReq } type SwitchBackToWbsViewDraftReqBody struct { - WorkItemID *int64 `json:"work_item_id,omitempty"` - DraftID *string `json:"draft_id,omitempty"` - CommitID *string `json:"commit_id,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + DraftID *string `json:"draft_id,omitempty"` + CommitID *string `json:"commit_id,omitempty"` } type SwitchBackToWbsViewDraftResp struct { *core.APIResp `json:"-"` core.CodeError - Data *SwitchBackToWbsViewDraftRespData `json:"data,omitempty"` + Data *SwitchBackToWbsViewDraftRespData `json:"data,omitempty"` } type SwitchBackToWbsViewDraftRespData struct { - Success *bool `json:"success,omitempty"` + Success *bool `json:"success,omitempty"` } type SwitchBackToWbsViewDraftReqBuilder struct { @@ -4120,19 +3888,16 @@ func (builder *SwitchBackToWbsViewDraftReqBuilder) ProjectKey(projectKey string) return builder } - func (builder *SwitchBackToWbsViewDraftReqBuilder) WorkItemID(workItemID int64) *SwitchBackToWbsViewDraftReqBuilder { builder.apiReq.Body.(*SwitchBackToWbsViewDraftReqBody).WorkItemID = &workItemID return builder } - func (builder *SwitchBackToWbsViewDraftReqBuilder) DraftID(draftID string) *SwitchBackToWbsViewDraftReqBuilder { builder.apiReq.Body.(*SwitchBackToWbsViewDraftReqBody).DraftID = &draftID return builder } - func (builder *SwitchBackToWbsViewDraftReqBuilder) CommitID(commitID string) *SwitchBackToWbsViewDraftReqBuilder { builder.apiReq.Body.(*SwitchBackToWbsViewDraftReqBody).CommitID = &commitID return builder @@ -4148,23 +3913,22 @@ type UniversalSearchReq struct { apiReq *core.APIReq } type UniversalSearchReqBody struct { - DataSources []DataSource `json:"data_sources,omitempty"` - UserKey *string `json:"user_key,omitempty"` - SearchGroup *SearchGroup `json:"search_group,omitempty"` - Sort *Search_concisesearch_Sort `json:"sort,omitempty"` - Pagination *Search_concisesearch_Pagination `json:"pagination,omitempty"` - FieldSelected []string `json:"field_selected,omitempty"` - Features map[string]string `json:"features,omitempty"` + DataSources []DataSource `json:"data_sources,omitempty"` + UserKey *string `json:"user_key,omitempty"` + SearchGroup *SearchGroup `json:"search_group,omitempty"` + Sort *Search_concisesearch_Sort `json:"sort,omitempty"` + Pagination *Search_concisesearch_Pagination `json:"pagination,omitempty"` + FieldSelected []string `json:"field_selected,omitempty"` + Features map[string]string `json:"features,omitempty"` } type UniversalSearchResp struct { *core.APIResp `json:"-"` core.CodeError - Data *string `json:"data"` - - Pagination *Search_concisesearch_Pagination `json:"pagination"` - - ExtraInfo map[string]string `json:"extra_info"` - + Data *string `json:"data"` + + Pagination *Search_concisesearch_Pagination `json:"pagination"` + + ExtraInfo map[string]string `json:"extra_info"` } type UniversalSearchReqBuilder struct { @@ -4191,7 +3955,6 @@ func (builder *UniversalSearchReqBuilder) UserKey(userKey string) *UniversalSear return builder } - func (builder *UniversalSearchReqBuilder) SearchGroup(searchGroup *SearchGroup) *UniversalSearchReqBuilder { builder.apiReq.Body.(*UniversalSearchReqBody).SearchGroup = searchGroup return builder @@ -4226,18 +3989,18 @@ type UpdateFieldReq struct { apiReq *core.APIReq } type UpdateFieldReqBody struct { - FieldName *string `json:"field_name,omitempty"` - FieldKey *string `json:"field_key,omitempty"` - FieldValue interface{} `json:"field_value,omitempty"` - FreeAdd *int64 `json:"free_add,omitempty"` - WorkItemRelationUUID *string `json:"work_item_relation_uuid,omitempty"` - DefaultValue interface{} `json:"default_value,omitempty"` - FieldAlias *string `json:"field_alias,omitempty"` - HelpDescription *string `json:"help_description,omitempty"` - AuthorizedRoles []string `json:"authorized_roles,omitempty"` - RelatedFieldExtraDisplayInfos []RelatedFieldExtraDisplayInfo `json:"related_field_extra_display_infos,omitempty"` - TeamOption *TeamOption `json:"team_option,omitempty"` - NumberConfig *NumberConfig `json:"number_config,omitempty"` + FieldName *string `json:"field_name,omitempty"` + FieldKey *string `json:"field_key,omitempty"` + FieldValue interface{} `json:"field_value,omitempty"` + FreeAdd *int64 `json:"free_add,omitempty"` + WorkItemRelationUUID *string `json:"work_item_relation_uuid,omitempty"` + DefaultValue interface{} `json:"default_value,omitempty"` + FieldAlias *string `json:"field_alias,omitempty"` + HelpDescription *string `json:"help_description,omitempty"` + AuthorizedRoles []string `json:"authorized_roles,omitempty"` + RelatedFieldExtraDisplayInfos []RelatedFieldExtraDisplayInfo `json:"related_field_extra_display_infos,omitempty"` + TeamOption *TeamOption `json:"team_option,omitempty"` + NumberConfig *NumberConfig `json:"number_config,omitempty"` } type UpdateFieldResp struct { *core.APIResp `json:"-"` @@ -4263,25 +4026,21 @@ func (builder *UpdateFieldReqBuilder) ProjectKey(projectKey string) *UpdateField return builder } - func (builder *UpdateFieldReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateFieldReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *UpdateFieldReqBuilder) FieldName(fieldName string) *UpdateFieldReqBuilder { builder.apiReq.Body.(*UpdateFieldReqBody).FieldName = &fieldName return builder } - func (builder *UpdateFieldReqBuilder) FieldKey(fieldKey string) *UpdateFieldReqBuilder { builder.apiReq.Body.(*UpdateFieldReqBody).FieldKey = &fieldKey return builder } - func (builder *UpdateFieldReqBuilder) FieldValue(fieldValue interface{}) *UpdateFieldReqBuilder { builder.apiReq.Body.(*UpdateFieldReqBody).FieldValue = fieldValue return builder @@ -4292,13 +4051,11 @@ func (builder *UpdateFieldReqBuilder) FreeAdd(freeAdd int64) *UpdateFieldReqBuil return builder } - func (builder *UpdateFieldReqBuilder) WorkItemRelationUUID(workItemRelationUUID string) *UpdateFieldReqBuilder { builder.apiReq.Body.(*UpdateFieldReqBody).WorkItemRelationUUID = &workItemRelationUUID return builder } - func (builder *UpdateFieldReqBuilder) DefaultValue(defaultValue interface{}) *UpdateFieldReqBuilder { builder.apiReq.Body.(*UpdateFieldReqBody).DefaultValue = defaultValue return builder @@ -4309,13 +4066,11 @@ func (builder *UpdateFieldReqBuilder) FieldAlias(fieldAlias string) *UpdateField return builder } - func (builder *UpdateFieldReqBuilder) HelpDescription(helpDescription string) *UpdateFieldReqBuilder { builder.apiReq.Body.(*UpdateFieldReqBody).HelpDescription = &helpDescription return builder } - func (builder *UpdateFieldReqBuilder) AuthorizedRoles(authorizedRoles []string) *UpdateFieldReqBuilder { builder.apiReq.Body.(*UpdateFieldReqBody).AuthorizedRoles = authorizedRoles return builder @@ -4345,13 +4100,13 @@ type UpdateFinishedReq struct { apiReq *core.APIReq } type UpdateFinishedReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemID *int64 `json:"work_item_id,omitempty"` - NodeID *string `json:"node_id,omitempty"` - Opinion *string `json:"opinion,omitempty"` - FinishedConclusionOptionKey *string `json:"finished_conclusion_option_key,omitempty"` - OperationType *string `json:"operation_type,omitempty"` - Reset *bool `json:"reset,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + NodeID *string `json:"node_id,omitempty"` + Opinion *string `json:"opinion,omitempty"` + FinishedConclusionOptionKey *string `json:"finished_conclusion_option_key,omitempty"` + OperationType *string `json:"operation_type,omitempty"` + Reset *bool `json:"reset,omitempty"` } type UpdateFinishedResp struct { *core.APIResp `json:"-"` @@ -4377,37 +4132,31 @@ func (builder *UpdateFinishedReqBuilder) ProjectKey(projectKey string) *UpdateFi return builder } - func (builder *UpdateFinishedReqBuilder) WorkItemID(workItemID int64) *UpdateFinishedReqBuilder { builder.apiReq.Body.(*UpdateFinishedReqBody).WorkItemID = &workItemID return builder } - func (builder *UpdateFinishedReqBuilder) NodeID(nodeID string) *UpdateFinishedReqBuilder { builder.apiReq.Body.(*UpdateFinishedReqBody).NodeID = &nodeID return builder } - func (builder *UpdateFinishedReqBuilder) Opinion(opinion string) *UpdateFinishedReqBuilder { builder.apiReq.Body.(*UpdateFinishedReqBody).Opinion = &opinion return builder } - func (builder *UpdateFinishedReqBuilder) FinishedConclusionOptionKey(finishedConclusionOptionKey string) *UpdateFinishedReqBuilder { builder.apiReq.Body.(*UpdateFinishedReqBody).FinishedConclusionOptionKey = &finishedConclusionOptionKey return builder } - func (builder *UpdateFinishedReqBuilder) OperationType(operationType string) *UpdateFinishedReqBuilder { builder.apiReq.Body.(*UpdateFinishedReqBody).OperationType = &operationType return builder } - func (builder *UpdateFinishedReqBuilder) Reset(reset bool) *UpdateFinishedReqBuilder { builder.apiReq.Body.(*UpdateFinishedReqBody).Reset = &reset return builder @@ -4423,9 +4172,9 @@ type UpdateFlowRoleReq struct { apiReq *core.APIReq } type UpdateFlowRoleReqBody struct { - RoleID *string `json:"role_id,omitempty"` - RoleAlias *string `json:"role_alias,omitempty"` - Role *RoleConfUpdate `json:"role,omitempty"` + RoleID *string `json:"role_id,omitempty"` + RoleAlias *string `json:"role_alias,omitempty"` + Role *RoleConfUpdate `json:"role,omitempty"` } type UpdateFlowRoleResp struct { *core.APIResp `json:"-"` @@ -4451,25 +4200,21 @@ func (builder *UpdateFlowRoleReqBuilder) ProjectKey(projectKey string) *UpdateFl return builder } - func (builder *UpdateFlowRoleReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateFlowRoleReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *UpdateFlowRoleReqBuilder) RoleID(roleID string) *UpdateFlowRoleReqBuilder { builder.apiReq.Body.(*UpdateFlowRoleReqBody).RoleID = &roleID return builder } - func (builder *UpdateFlowRoleReqBuilder) RoleAlias(roleAlias string) *UpdateFlowRoleReqBuilder { builder.apiReq.Body.(*UpdateFlowRoleReqBody).RoleAlias = &roleAlias return builder } - func (builder *UpdateFlowRoleReqBuilder) Role(role *RoleConfUpdate) *UpdateFlowRoleReqBuilder { builder.apiReq.Body.(*UpdateFlowRoleReqBody).Role = role return builder @@ -4484,16 +4229,15 @@ type UpdateMultiSignalReq struct { apiReq *core.APIReq } type UpdateMultiSignalReqBody struct { - FieldKey *string `json:"field_key,omitempty"` - FieldAlias *string `json:"field_alias,omitempty"` - Details []MultiSignalDetail `json:"details,omitempty"` - UpdateType *string `json:"update_type,omitempty"` + FieldKey *string `json:"field_key,omitempty"` + FieldAlias *string `json:"field_alias,omitempty"` + Details []MultiSignalDetail `json:"details,omitempty"` + UpdateType *string `json:"update_type,omitempty"` } type UpdateMultiSignalResp struct { *core.APIResp `json:"-"` core.CodeError - Data *MultiSignal `json:"data"` - + Data *MultiSignal `json:"data"` } type UpdateMultiSignalReqBuilder struct { @@ -4515,31 +4259,26 @@ func (builder *UpdateMultiSignalReqBuilder) ProjectKey(projectKey string) *Updat return builder } - func (builder *UpdateMultiSignalReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateMultiSignalReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *UpdateMultiSignalReqBuilder) WorkItemID(workItemID int64) *UpdateMultiSignalReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *UpdateMultiSignalReqBuilder) FieldKey(fieldKey string) *UpdateMultiSignalReqBuilder { builder.apiReq.Body.(*UpdateMultiSignalReqBody).FieldKey = &fieldKey return builder } - func (builder *UpdateMultiSignalReqBuilder) FieldAlias(fieldAlias string) *UpdateMultiSignalReqBuilder { builder.apiReq.Body.(*UpdateMultiSignalReqBody).FieldAlias = &fieldAlias return builder } - func (builder *UpdateMultiSignalReqBuilder) Details(details []MultiSignalDetail) *UpdateMultiSignalReqBuilder { builder.apiReq.Body.(*UpdateMultiSignalReqBody).Details = details return builder @@ -4560,15 +4299,15 @@ type UpdateNodeStateReq struct { apiReq *core.APIReq } type UpdateNodeStateReqBody struct { - Action *string `json:"action,omitempty"` - RollbackReason *string `json:"rollback_reason,omitempty"` - NodeOwners []string `json:"node_owners,omitempty"` - NodeSchedule *WorkItem_work_item_Schedule `json:"node_schedule,omitempty"` - Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` - Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` - RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` - NodeFields []NodeField `json:"node_fields,omitempty"` - FinishedInfos *FinishedInfo `json:"finished_infos,omitempty"` + Action *string `json:"action,omitempty"` + RollbackReason *string `json:"rollback_reason,omitempty"` + NodeOwners []string `json:"node_owners,omitempty"` + NodeSchedule *WorkItem_work_item_Schedule `json:"node_schedule,omitempty"` + Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` + Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` + RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` + NodeFields []NodeField `json:"node_fields,omitempty"` + FinishedInfos *FinishedInfo `json:"finished_infos,omitempty"` } type UpdateNodeStateResp struct { *core.APIResp `json:"-"` @@ -4594,37 +4333,31 @@ func (builder *UpdateNodeStateReqBuilder) ProjectKey(projectKey string) *UpdateN return builder } - func (builder *UpdateNodeStateReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateNodeStateReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *UpdateNodeStateReqBuilder) WorkItemID(workItemID int64) *UpdateNodeStateReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *UpdateNodeStateReqBuilder) NodeID(nodeID string) *UpdateNodeStateReqBuilder { builder.apiReq.PathParams.Set("node_id", fmt.Sprint(nodeID)) return builder } - func (builder *UpdateNodeStateReqBuilder) Action(action string) *UpdateNodeStateReqBuilder { builder.apiReq.Body.(*UpdateNodeStateReqBody).Action = &action return builder } - func (builder *UpdateNodeStateReqBuilder) RollbackReason(rollbackReason string) *UpdateNodeStateReqBuilder { builder.apiReq.Body.(*UpdateNodeStateReqBody).RollbackReason = &rollbackReason return builder } - func (builder *UpdateNodeStateReqBuilder) NodeOwners(nodeOwners []string) *UpdateNodeStateReqBuilder { builder.apiReq.Body.(*UpdateNodeStateReqBody).NodeOwners = nodeOwners return builder @@ -4669,10 +4402,10 @@ type UpdateResourceWorkItemReq struct { apiReq *core.APIReq } type UpdateResourceWorkItemReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - WorkItemID *int64 `json:"work_item_id,omitempty"` - UpdateFields []WorkItem_work_item_FieldValuePair `json:"update_fields,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + UpdateFields []WorkItem_work_item_FieldValuePair `json:"update_fields,omitempty"` } type UpdateResourceWorkItemResp struct { *core.APIResp `json:"-"` @@ -4698,19 +4431,16 @@ func (builder *UpdateResourceWorkItemReqBuilder) ProjectKey(projectKey string) * return builder } - func (builder *UpdateResourceWorkItemReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateResourceWorkItemReqBuilder { builder.apiReq.Body.(*UpdateResourceWorkItemReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *UpdateResourceWorkItemReqBuilder) WorkItemID(workItemID int64) *UpdateResourceWorkItemReqBuilder { builder.apiReq.Body.(*UpdateResourceWorkItemReqBody).WorkItemID = &workItemID return builder } - func (builder *UpdateResourceWorkItemReqBuilder) UpdateFields(updateFields []WorkItem_work_item_FieldValuePair) *UpdateResourceWorkItemReqBuilder { builder.apiReq.Body.(*UpdateResourceWorkItemReqBody).UpdateFields = updateFields return builder @@ -4725,9 +4455,9 @@ type UpdateStateFlowReq struct { apiReq *core.APIReq } type UpdateStateFlowReqBody struct { - TransitionID *int64 `json:"transition_id,omitempty"` - Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` - RoleOwners []WorkItem_work_item_RoleOwner `json:"role_owners,omitempty"` + TransitionID *int64 `json:"transition_id,omitempty"` + Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` + RoleOwners []WorkItem_work_item_RoleOwner `json:"role_owners,omitempty"` } type UpdateStateFlowResp struct { *core.APIResp `json:"-"` @@ -4753,25 +4483,21 @@ func (builder *UpdateStateFlowReqBuilder) ProjectKey(projectKey string) *UpdateS return builder } - func (builder *UpdateStateFlowReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateStateFlowReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *UpdateStateFlowReqBuilder) WorkItemID(workItemID int64) *UpdateStateFlowReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *UpdateStateFlowReqBuilder) TransitionID(transitionID int64) *UpdateStateFlowReqBuilder { builder.apiReq.Body.(*UpdateStateFlowReqBody).TransitionID = &transitionID return builder } - func (builder *UpdateStateFlowReqBuilder) Fields(fields []WorkItem_work_item_FieldValuePair) *UpdateStateFlowReqBuilder { builder.apiReq.Body.(*UpdateStateFlowReqBody).Fields = fields return builder @@ -4791,10 +4517,10 @@ type UpdateTemplateDetailReq struct { apiReq *core.APIReq } type UpdateTemplateDetailReqBody struct { - ProjectKey *string `json:"project_key,omitempty"` - TemplateID *int64 `json:"template_id,omitempty"` - WorkflowConfs []WorkflowConfInfo `json:"workflow_confs,omitempty"` - StateFlowConfs []StateFlowConfInfo `json:"state_flow_confs,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + TemplateID *int64 `json:"template_id,omitempty"` + WorkflowConfs []WorkflowConfInfo `json:"workflow_confs,omitempty"` + StateFlowConfs []StateFlowConfInfo `json:"state_flow_confs,omitempty"` } type UpdateTemplateDetailResp struct { *core.APIResp `json:"-"` @@ -4820,13 +4546,11 @@ func (builder *UpdateTemplateDetailReqBuilder) ProjectKey(projectKey string) *Up return builder } - func (builder *UpdateTemplateDetailReqBuilder) TemplateID(templateID int64) *UpdateTemplateDetailReqBuilder { builder.apiReq.Body.(*UpdateTemplateDetailReqBody).TemplateID = &templateID return builder } - func (builder *UpdateTemplateDetailReqBuilder) WorkflowConfs(workflowConfs []WorkflowConfInfo) *UpdateTemplateDetailReqBuilder { builder.apiReq.Body.(*UpdateTemplateDetailReqBody).WorkflowConfs = workflowConfs return builder @@ -4846,7 +4570,7 @@ type UpdateWorkItemReq struct { apiReq *core.APIReq } type UpdateWorkItemReqBody struct { - UpdateFields []WorkItem_work_item_FieldValuePair `json:"update_fields,omitempty"` + UpdateFields []WorkItem_work_item_FieldValuePair `json:"update_fields,omitempty"` } type UpdateWorkItemResp struct { *core.APIResp `json:"-"` @@ -4872,13 +4596,11 @@ func (builder *UpdateWorkItemReqBuilder) ProjectKey(projectKey string) *UpdateWo return builder } - func (builder *UpdateWorkItemReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateWorkItemReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *UpdateWorkItemReqBuilder) UpdateFields(updateFields []WorkItem_work_item_FieldValuePair) *UpdateWorkItemReqBuilder { builder.apiReq.Body.(*UpdateWorkItemReqBody).UpdateFields = updateFields return builder @@ -4899,11 +4621,11 @@ type UpdateWorkItemRelationReq struct { apiReq *core.APIReq } type UpdateWorkItemRelationReqBody struct { - RelationID *string `json:"relation_id,omitempty"` - ProjectKey *string `json:"project_key,omitempty"` - WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` - Name *string `json:"name,omitempty"` - RelationDetails []RelationDetail `json:"relation_details,omitempty"` + RelationID *string `json:"relation_id,omitempty"` + ProjectKey *string `json:"project_key,omitempty"` + WorkItemTypeKey *string `json:"work_item_type_key,omitempty"` + Name *string `json:"name,omitempty"` + RelationDetails []RelationDetail `json:"relation_details,omitempty"` } type UpdateWorkItemRelationResp struct { *core.APIResp `json:"-"` @@ -4929,25 +4651,21 @@ func (builder *UpdateWorkItemRelationReqBuilder) RelationID(relationID string) * return builder } - func (builder *UpdateWorkItemRelationReqBuilder) ProjectKey(projectKey string) *UpdateWorkItemRelationReqBuilder { builder.apiReq.Body.(*UpdateWorkItemRelationReqBody).ProjectKey = &projectKey return builder } - func (builder *UpdateWorkItemRelationReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateWorkItemRelationReqBuilder { builder.apiReq.Body.(*UpdateWorkItemRelationReqBody).WorkItemTypeKey = &workItemTypeKey return builder } - func (builder *UpdateWorkItemRelationReqBuilder) Name(name string) *UpdateWorkItemRelationReqBuilder { builder.apiReq.Body.(*UpdateWorkItemRelationReqBody).Name = &name return builder } - func (builder *UpdateWorkItemRelationReqBuilder) RelationDetails(relationDetails []RelationDetail) *UpdateWorkItemRelationReqBuilder { builder.apiReq.Body.(*UpdateWorkItemRelationReqBody).RelationDetails = relationDetails return builder @@ -4962,13 +4680,13 @@ type UpdateWorkItemSubTaskReq struct { apiReq *core.APIReq } type UpdateWorkItemSubTaskReqBody struct { - Name *string `json:"name,omitempty"` - Assignee []string `json:"assignee,omitempty"` - RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` - Schedule *WorkItem_work_item_Schedule `json:"schedule,omitempty"` - Note *string `json:"note,omitempty"` - Deliverable []WorkItem_work_item_FieldValuePair `json:"deliverable,omitempty"` - UpdateFields []WorkItem_work_item_FieldValuePair `json:"update_fields,omitempty"` + Name *string `json:"name,omitempty"` + Assignee []string `json:"assignee,omitempty"` + RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` + Schedule *WorkItem_work_item_Schedule `json:"schedule,omitempty"` + Note *string `json:"note,omitempty"` + Deliverable []WorkItem_work_item_FieldValuePair `json:"deliverable,omitempty"` + UpdateFields []WorkItem_work_item_FieldValuePair `json:"update_fields,omitempty"` } type UpdateWorkItemSubTaskResp struct { *core.APIResp `json:"-"` @@ -4994,37 +4712,31 @@ func (builder *UpdateWorkItemSubTaskReqBuilder) ProjectKey(projectKey string) *U return builder } - func (builder *UpdateWorkItemSubTaskReqBuilder) WorkItemID(workItemID int64) *UpdateWorkItemSubTaskReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *UpdateWorkItemSubTaskReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateWorkItemSubTaskReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *UpdateWorkItemSubTaskReqBuilder) NodeID(nodeID string) *UpdateWorkItemSubTaskReqBuilder { builder.apiReq.PathParams.Set("node_id", fmt.Sprint(nodeID)) return builder } - func (builder *UpdateWorkItemSubTaskReqBuilder) TaskID(taskID int64) *UpdateWorkItemSubTaskReqBuilder { builder.apiReq.PathParams.Set("task_id", fmt.Sprint(taskID)) return builder } - func (builder *UpdateWorkItemSubTaskReqBuilder) Name(name string) *UpdateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*UpdateWorkItemSubTaskReqBody).Name = &name return builder } - func (builder *UpdateWorkItemSubTaskReqBuilder) Assignee(assignee []string) *UpdateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*UpdateWorkItemSubTaskReqBody).Assignee = assignee return builder @@ -5045,7 +4757,6 @@ func (builder *UpdateWorkItemSubTaskReqBuilder) Note(note string) *UpdateWorkIte return builder } - func (builder *UpdateWorkItemSubTaskReqBuilder) Deliverable(deliverable []WorkItem_work_item_FieldValuePair) *UpdateWorkItemSubTaskReqBuilder { builder.apiReq.Body.(*UpdateWorkItemSubTaskReqBody).Deliverable = deliverable return builder @@ -5065,15 +4776,15 @@ type UpdateWorkItemTypeInfoReq struct { apiReq *core.APIReq } type UpdateWorkItemTypeInfoReqBody struct { - Description *string `json:"description,omitempty"` - IsDisabled *bool `json:"is_disabled,omitempty"` - IsPinned *bool `json:"is_pinned,omitempty"` - EnableSchedule *bool `json:"enable_schedule,omitempty"` - ScheduleFieldKey *string `json:"schedule_field_key,omitempty"` - EstimatePointFieldKey *string `json:"estimate_point_field_key,omitempty"` - ActualWorkTimeFieldKey *string `json:"actual_work_time_field_key,omitempty"` - BelongRoleKeys []string `json:"belong_role_keys,omitempty"` - ActualWorkTimeSwitch *bool `json:"actual_work_time_switch,omitempty"` + Description *string `json:"description,omitempty"` + IsDisabled *bool `json:"is_disabled,omitempty"` + IsPinned *bool `json:"is_pinned,omitempty"` + EnableSchedule *bool `json:"enable_schedule,omitempty"` + ScheduleFieldKey *string `json:"schedule_field_key,omitempty"` + EstimatePointFieldKey *string `json:"estimate_point_field_key,omitempty"` + ActualWorkTimeFieldKey *string `json:"actual_work_time_field_key,omitempty"` + BelongRoleKeys []string `json:"belong_role_keys,omitempty"` + ActualWorkTimeSwitch *bool `json:"actual_work_time_switch,omitempty"` } type UpdateWorkItemTypeInfoResp struct { *core.APIResp `json:"-"` @@ -5099,55 +4810,46 @@ func (builder *UpdateWorkItemTypeInfoReqBuilder) ProjectKey(projectKey string) * return builder } - func (builder *UpdateWorkItemTypeInfoReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateWorkItemTypeInfoReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *UpdateWorkItemTypeInfoReqBuilder) Description(description string) *UpdateWorkItemTypeInfoReqBuilder { builder.apiReq.Body.(*UpdateWorkItemTypeInfoReqBody).Description = &description return builder } - func (builder *UpdateWorkItemTypeInfoReqBuilder) IsDisabled(isDisabled bool) *UpdateWorkItemTypeInfoReqBuilder { builder.apiReq.Body.(*UpdateWorkItemTypeInfoReqBody).IsDisabled = &isDisabled return builder } - func (builder *UpdateWorkItemTypeInfoReqBuilder) IsPinned(isPinned bool) *UpdateWorkItemTypeInfoReqBuilder { builder.apiReq.Body.(*UpdateWorkItemTypeInfoReqBody).IsPinned = &isPinned return builder } - func (builder *UpdateWorkItemTypeInfoReqBuilder) EnableSchedule(enableSchedule bool) *UpdateWorkItemTypeInfoReqBuilder { builder.apiReq.Body.(*UpdateWorkItemTypeInfoReqBody).EnableSchedule = &enableSchedule return builder } - func (builder *UpdateWorkItemTypeInfoReqBuilder) ScheduleFieldKey(scheduleFieldKey string) *UpdateWorkItemTypeInfoReqBuilder { builder.apiReq.Body.(*UpdateWorkItemTypeInfoReqBody).ScheduleFieldKey = &scheduleFieldKey return builder } - func (builder *UpdateWorkItemTypeInfoReqBuilder) EstimatePointFieldKey(estimatePointFieldKey string) *UpdateWorkItemTypeInfoReqBuilder { builder.apiReq.Body.(*UpdateWorkItemTypeInfoReqBody).EstimatePointFieldKey = &estimatePointFieldKey return builder } - func (builder *UpdateWorkItemTypeInfoReqBuilder) ActualWorkTimeFieldKey(actualWorkTimeFieldKey string) *UpdateWorkItemTypeInfoReqBuilder { builder.apiReq.Body.(*UpdateWorkItemTypeInfoReqBody).ActualWorkTimeFieldKey = &actualWorkTimeFieldKey return builder } - func (builder *UpdateWorkItemTypeInfoReqBuilder) BelongRoleKeys(belongRoleKeys []string) *UpdateWorkItemTypeInfoReqBuilder { builder.apiReq.Body.(*UpdateWorkItemTypeInfoReqBody).BelongRoleKeys = belongRoleKeys return builder @@ -5168,11 +4870,11 @@ type UpdateWorkflowNodeReq struct { apiReq *core.APIReq } type UpdateWorkflowNodeReqBody struct { - NodeOwners []string `json:"node_owners,omitempty"` - NodeSchedule *WorkItem_work_item_Schedule `json:"node_schedule,omitempty"` - Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` - Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` - RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` + NodeOwners []string `json:"node_owners,omitempty"` + NodeSchedule *WorkItem_work_item_Schedule `json:"node_schedule,omitempty"` + Schedules []WorkItem_work_item_Schedule `json:"schedules,omitempty"` + Fields []WorkItem_work_item_FieldValuePair `json:"fields,omitempty"` + RoleAssignee []WorkItem_work_item_RoleOwner `json:"role_assignee,omitempty"` } type UpdateWorkflowNodeResp struct { *core.APIResp `json:"-"` @@ -5198,25 +4900,21 @@ func (builder *UpdateWorkflowNodeReqBuilder) ProjectKey(projectKey string) *Upda return builder } - func (builder *UpdateWorkflowNodeReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateWorkflowNodeReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *UpdateWorkflowNodeReqBuilder) WorkItemID(workItemID int64) *UpdateWorkflowNodeReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *UpdateWorkflowNodeReqBuilder) NodeID(nodeID string) *UpdateWorkflowNodeReqBuilder { builder.apiReq.PathParams.Set("node_id", fmt.Sprint(nodeID)) return builder } - func (builder *UpdateWorkflowNodeReqBuilder) NodeOwners(nodeOwners []string) *UpdateWorkflowNodeReqBuilder { builder.apiReq.Body.(*UpdateWorkflowNodeReqBody).NodeOwners = nodeOwners return builder @@ -5251,7 +4949,7 @@ type UpdateWorkingHourRecordReq struct { apiReq *core.APIReq } type UpdateWorkingHourRecordReqBody struct { - WorkingHourRecords []UpdateWorkingHourRecord `json:"working_hour_records,omitempty"` + WorkingHourRecords []UpdateWorkingHourRecord `json:"working_hour_records,omitempty"` } type UpdateWorkingHourRecordResp struct { *core.APIResp `json:"-"` @@ -5277,19 +4975,16 @@ func (builder *UpdateWorkingHourRecordReqBuilder) ProjectKey(projectKey string) return builder } - func (builder *UpdateWorkingHourRecordReqBuilder) WorkItemTypeKey(workItemTypeKey string) *UpdateWorkingHourRecordReqBuilder { builder.apiReq.PathParams.Set("work_item_type_key", fmt.Sprint(workItemTypeKey)) return builder } - func (builder *UpdateWorkingHourRecordReqBuilder) WorkItemID(workItemID int64) *UpdateWorkingHourRecordReqBuilder { builder.apiReq.PathParams.Set("work_item_id", fmt.Sprint(workItemID)) return builder } - func (builder *UpdateWorkingHourRecordReqBuilder) WorkingHourRecords(workingHourRecords []UpdateWorkingHourRecord) *UpdateWorkingHourRecordReqBuilder { builder.apiReq.Body.(*UpdateWorkingHourRecordReqBody).WorkingHourRecords = workingHourRecords return builder @@ -5304,10 +4999,10 @@ type WBSUpdateDraftFrozenRowsReq struct { apiReq *core.APIReq } type WBSUpdateDraftFrozenRowsReqBody struct { - WorkItemID *int64 `json:"work_item_id,omitempty"` - DraftID *string `json:"draft_id,omitempty"` - UpdateType *int32 `json:"update_type,omitempty"` - CommitID *string `json:"commit_id,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + DraftID *string `json:"draft_id,omitempty"` + UpdateType *int32 `json:"update_type,omitempty"` + CommitID *string `json:"commit_id,omitempty"` } type WBSUpdateDraftFrozenRowsResp struct { *core.APIResp `json:"-"` @@ -5333,25 +5028,21 @@ func (builder *WBSUpdateDraftFrozenRowsReqBuilder) ProjectKey(projectKey string) return builder } - func (builder *WBSUpdateDraftFrozenRowsReqBuilder) WorkItemID(workItemID int64) *WBSUpdateDraftFrozenRowsReqBuilder { builder.apiReq.Body.(*WBSUpdateDraftFrozenRowsReqBody).WorkItemID = &workItemID return builder } - func (builder *WBSUpdateDraftFrozenRowsReqBuilder) DraftID(draftID string) *WBSUpdateDraftFrozenRowsReqBuilder { builder.apiReq.Body.(*WBSUpdateDraftFrozenRowsReqBody).DraftID = &draftID return builder } - func (builder *WBSUpdateDraftFrozenRowsReqBuilder) UpdateType(updateType int32) *WBSUpdateDraftFrozenRowsReqBuilder { builder.apiReq.Body.(*WBSUpdateDraftFrozenRowsReqBody).UpdateType = &updateType return builder } - func (builder *WBSUpdateDraftFrozenRowsReqBuilder) CommitID(commitID string) *WBSUpdateDraftFrozenRowsReqBuilder { builder.apiReq.Body.(*WBSUpdateDraftFrozenRowsReqBody).CommitID = &commitID return builder @@ -5367,18 +5058,18 @@ type WbsCollaborationPublishReq struct { apiReq *core.APIReq } type WbsCollaborationPublishReqBody struct { - WorkItemID *int64 `json:"work_item_id,omitempty"` - DraftID *string `json:"draft_id,omitempty"` - CommitID *string `json:"commit_id,omitempty"` + WorkItemID *int64 `json:"work_item_id,omitempty"` + DraftID *string `json:"draft_id,omitempty"` + CommitID *string `json:"commit_id,omitempty"` } type WbsCollaborationPublishResp struct { *core.APIResp `json:"-"` core.CodeError - Data *WbsCollaborationPublishRespData `json:"data,omitempty"` + Data *WbsCollaborationPublishRespData `json:"data,omitempty"` } type WbsCollaborationPublishRespData struct { - Success *bool `json:"success,omitempty"` + Success *bool `json:"success,omitempty"` } type WbsCollaborationPublishReqBuilder struct { @@ -5400,19 +5091,16 @@ func (builder *WbsCollaborationPublishReqBuilder) ProjectKey(projectKey string) return builder } - func (builder *WbsCollaborationPublishReqBuilder) WorkItemID(workItemID int64) *WbsCollaborationPublishReqBuilder { builder.apiReq.Body.(*WbsCollaborationPublishReqBody).WorkItemID = &workItemID return builder } - func (builder *WbsCollaborationPublishReqBuilder) DraftID(draftID string) *WbsCollaborationPublishReqBuilder { builder.apiReq.Body.(*WbsCollaborationPublishReqBody).DraftID = &draftID return builder } - func (builder *WbsCollaborationPublishReqBuilder) CommitID(commitID string) *WbsCollaborationPublishReqBuilder { builder.apiReq.Body.(*WbsCollaborationPublishReqBody).CommitID = &commitID return builder @@ -5423,4 +5111,3 @@ func (builder *WbsCollaborationPublishReqBuilder) Build() *WbsCollaborationPubli req.apiReq = builder.apiReq return req } - From 61b44ccad29d7e7301ad88c3cee22ba43226afe7 Mon Sep 17 00:00:00 2001 From: "kang.zou" Date: Tue, 16 Sep 2025 12:17:37 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix.go=20version=20=E9=99=8D=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- go.mod | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ba27614..fab0018 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,3 @@ module github.com/larksuite/project-oapi-sdk-golang -go 1.22.0 - -toolchain go1.22.2 +go 1.15