Skip to content

Commit 85190d1

Browse files
committed
feat: updated sdks
1 parent 3c2d9e3 commit 85190d1

File tree

144 files changed

+1005
-224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+1005
-224
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Added
2+
body: Updated sdks
3+
time: 2024-10-22T10:43:28.018867356+02:00

Taskfile.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ tasks:
2929
- task: generate-connect
3030
- task: generate-importapi
3131
# - task: generate-frontend
32-
# - task: generate-ml
3332
- task: generate-platform
3433
- task: generate-history
3534

@@ -53,11 +52,6 @@ tasks:
5352
- task: generate-api
5453
vars: {apiName: frontend, path: frontend-api}
5554

56-
generate-ml:
57-
cmds:
58-
- task: generate-api
59-
vars: {apiName: ml, path: ml}
60-
6155
generate-platform:
6256
cmds:
6357
- task: generate-api

connect/types_common.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ type ApplicationDeployment struct {
111111
SecuredConfiguration []ConfigurationValue `json:"securedConfiguration"`
112112
// URL generated after deployment of service applications.
113113
Url *string `json:"url,omitempty"`
114-
// Pub/Sub Topic generated after deployment of event applications.
114+
// Google Cloud Pub/Sub Topic generated after deployment of event applications.
115115
Topic *string `json:"topic,omitempty"`
116+
// Azure Service Bus connection string generated after deployment of event applications.
117+
ConnectionString *string `json:"connectionString,omitempty"`
116118
// Cron schedule for job applications.
117119
Schedule *string `json:"schedule,omitempty"`
118120
}
@@ -335,6 +337,7 @@ const (
335337
RegionEuropeWest1Gcp Region = "europe-west1.gcp"
336338
RegionUsCentral1Gcp Region = "us-central1.gcp"
337339
RegionAustraliaSoutheast1Gcp Region = "australia-southeast1.gcp"
340+
RegionEastusAzure Region = "eastus.azure"
338341
)
339342

340343
/**

connect/types_connector.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type Connector struct {
2828
Configurations []ConnectorConfigurationApplication `json:"configurations"`
2929
// If `true`, only Composable Commerce Projects specified in `privateProjects` can access the Connector.
3030
Private bool `json:"private"`
31-
// If not empty, Connectors can only be deployed in these Regions. If empty, Connectors can be deployed in any [supported Region](hosts-and-authorization#hosts).
31+
// If provided, Connectors can only be deployed in these Regions. If not provided, Connectors can be deployed in any [supported Region](hosts-and-authorization#hosts). For faster request processing, we recommend adding only the required Region.
3232
SupportedRegions []Region `json:"supportedRegions"`
3333
// If `true`, the Connector is certified.
3434
Certified bool `json:"certified"`
@@ -73,7 +73,7 @@ type ConnectorDraft struct {
7373
Creator Creator `json:"creator"`
7474
// GitHub repository details of the Connector.
7575
Repository Repository `json:"repository"`
76-
// If provided, Connectors can only be deployed in these Regions. If not provided, Connectors can be deployed in any [supported Region](hosts-and-authorization#hosts).
76+
// If provided, Connectors can only be deployed in these Regions. If not provided, Connectors can be deployed in any [supported Region](hosts-and-authorization#hosts). For faster request processing, we recommend adding only the required Region.
7777
SupportedRegions []Region `json:"supportedRegions"`
7878
// Composable Commerce Projects that can access the Connector. If empty, only the creator can access this Connector.
7979
PrivateProjects []string `json:"privateProjects"`
@@ -136,7 +136,7 @@ type ConnectorStaged struct {
136136
Private bool `json:"private"`
137137
// If `private` is true, only these Composable Commerce Projects can access the Connector.
138138
PrivateProjects []string `json:"privateProjects"`
139-
// If not empty, Connectors can only be deployed in these Regions. If empty, Connectors can be deployed in any [supported Region](hosts-and-authorization#hosts).
139+
// If provided, Connectors can only be deployed in these Regions. If not provided, Connectors can be deployed in any [supported Region](hosts-and-authorization#hosts). For faster request processing, we recommend adding only the required Region.
140140
SupportedRegions []Region `json:"supportedRegions"`
141141
// Comments made during the certification process.
142142
CertificationInfo *CertificationInfo `json:"certificationInfo,omitempty"`

connect/types_error.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ func (obj BadGatewayError) Error() string {
483483

484484
/**
485485
* Returned when the request conflicts with the current state of the involved resources. Typically, the request attempts to modify a resource that is out of date (that is modified by another client since it was last retrieved).
486-
* The client application should resolve the conflict (with or without involving the end-user) before retrying the request.
486+
* The client application should resolve the conflict (with or without involving the end user) before retrying the request.
487487
*
488488
*/
489489
type ConcurrentModificationError struct {

importapi/types_discount_codes.go

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ type DiscountCodeImport struct {
1919
// Maps to `DiscountCode.description`.
2020
Description *LocalizedString `json:"description,omitempty"`
2121
// User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.
22+
//
23+
// The value cannot be updated. Attempting to update the value will result in an [InvalidFieldsUpdate](/error#invalidfieldsupdateerror) error.
2224
Code string `json:"code"`
2325
// Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.
2426
CartDiscounts []CartDiscountKeyReference `json:"cartDiscounts"`

importapi/types_errors.go

+65
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ func mapDiscriminatorErrorObject(input interface{}) (ErrorObject, error) {
170170
return nil, err
171171
}
172172
return obj, nil
173+
case "InvalidFieldUpdate":
174+
obj := InvalidFieldsUpdateError{}
175+
if err := decodeStruct(input, &obj); err != nil {
176+
return nil, err
177+
}
178+
return obj, nil
173179
case "InvalidJsonInput":
174180
obj := InvalidJsonInput{}
175181
if err := decodeStruct(input, &obj); err != nil {
@@ -236,6 +242,12 @@ func mapDiscriminatorErrorObject(input interface{}) (ErrorObject, error) {
236242
return nil, err
237243
}
238244
return obj, nil
245+
case "ReferencedResourceNotFound":
246+
obj := ReferencedResourceNotFound{}
247+
if err := decodeStruct(input, &obj); err != nil {
248+
return nil, err
249+
}
250+
return obj, nil
239251
}
240252
return nil, nil
241253
}
@@ -586,6 +598,34 @@ func (obj InvalidFieldError) Error() string {
586598
return "unknown InvalidFieldError: failed to parse error response"
587599
}
588600

601+
/**
602+
* Returned when a field cannot be updated.
603+
*
604+
*/
605+
type InvalidFieldsUpdateError struct {
606+
// `"The following fields are currently not supported for changes/updates"`
607+
Message string `json:"message"`
608+
// Fields that cannot be updated.
609+
Fields []string `json:"fields"`
610+
}
611+
612+
// MarshalJSON override to set the discriminator value or remove
613+
// optional nil slices
614+
func (obj InvalidFieldsUpdateError) MarshalJSON() ([]byte, error) {
615+
type Alias InvalidFieldsUpdateError
616+
return json.Marshal(struct {
617+
Action string `json:"code"`
618+
*Alias
619+
}{Action: "InvalidFieldUpdate", Alias: (*Alias)(&obj)})
620+
}
621+
622+
func (obj InvalidFieldsUpdateError) Error() string {
623+
if obj.Message != "" {
624+
return obj.Message
625+
}
626+
return "unknown InvalidFieldsUpdateError: failed to parse error response"
627+
}
628+
589629
/**
590630
* An invalid JSON input has been sent to the service.
591631
* Either the JSON is syntactically incorrect or the JSON has an unexpected shape, for example, a required field is missing.
@@ -838,3 +878,28 @@ func (obj GenericError) Error() string {
838878
}
839879
return "unknown GenericError: failed to parse error response"
840880
}
881+
882+
/**
883+
* Returned when a resource referenced by a [Reference](/../api/types#reference) or a [ResourceIdentifier](/../api/types#resourceidentifier) could not be found.
884+
*
885+
*/
886+
type ReferencedResourceNotFound struct {
887+
// `"The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."`
888+
Message string `json:"message"`
889+
// Type of referenced resource.
890+
TypeId ReferenceType `json:"typeId"`
891+
// Unique identifier of the referenced resource, if known.
892+
ID *string `json:"id,omitempty"`
893+
// User-defined unique identifier of the referenced resource, if known.
894+
Key *string `json:"key,omitempty"`
895+
}
896+
897+
// MarshalJSON override to set the discriminator value or remove
898+
// optional nil slices
899+
func (obj ReferencedResourceNotFound) MarshalJSON() ([]byte, error) {
900+
type Alias ReferencedResourceNotFound
901+
return json.Marshal(struct {
902+
Action string `json:"code"`
903+
*Alias
904+
}{Action: "ReferencedResourceNotFound", Alias: (*Alias)(&obj)})
905+
}

importapi/types_standalone_prices.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@ type StandalonePriceImport struct {
1919
// Sets the money value of this Price.
2020
Value TypedMoney `json:"value"`
2121
// Sets the country for which this Price is valid.
22+
//
23+
// The value cannot be updated. Attempting to update the value will result in an [InvalidFieldsUpdate](/error#invalidfieldsupdateerror) error.
2224
Country *string `json:"country,omitempty"`
2325
// Sets the CustomerGroup for which this Price is valid.
26+
//
27+
// The value cannot be updated. Attempting to update the value will result in an [InvalidFieldsUpdate](/error#invalidfieldsupdateerror) error.
2428
CustomerGroup *CustomerGroupKeyReference `json:"customerGroup,omitempty"`
25-
// Sets the product distribution Channel for which this Price is valid
29+
// Sets the product distribution Channel for which this Price is valid.
30+
//
31+
// The value cannot be updated. Attempting to update the value will result in an [InvalidFieldsUpdate](/error#invalidfieldsupdateerror) error.
2632
Channel *ChannelKeyReference `json:"channel,omitempty"`
2733
// Sets the date from which the Price is valid.
2834
ValidFrom *time.Time `json:"validFrom,omitempty"`

platform/client_active_cart_by_project_key_in_store_key_by_store_key_me_active_cart.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestBuilder struct {
2121
*
2222
* - If no active Cart exists.
2323
* - If an active Cart exists but does not have a `store` specified, or the `store` field references a different Store.
24-
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
24+
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
2525
*
2626
*/
2727
func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestBuilder) Get() *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodGet {
@@ -38,7 +38,7 @@ func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestBuilder) Get() *ByP
3838
*
3939
* - If no active Cart exists in a Store.
4040
* - If an active Cart exists but does not have a `store` specified, or the `store` field references a different Store.
41-
* - If an active Cart exists but does not contain a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
41+
* - If an active Cart exists but does not contain a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
4242
*
4343
*/
4444
func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestBuilder) Head() *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodHead {

platform/client_active_cart_by_project_key_in_store_key_by_store_key_me_active_cart_get.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodGet) WithHead
6363
*
6464
* - If no active Cart exists.
6565
* - If an active Cart exists but does not have a `store` specified, or the `store` field references a different Store.
66-
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
66+
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
6767
*
6868
*/
6969
func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodGet) Execute(ctx context.Context) (result *Cart, err error) {

platform/client_active_cart_by_project_key_in_store_key_by_store_key_me_active_cart_head.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodHead) WithHea
3434
*
3535
* - If no active Cart exists in a Store.
3636
* - If an active Cart exists but does not have a `store` specified, or the `store` field references a different Store.
37-
* - If an active Cart exists but does not contain a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
37+
* - If an active Cart exists but does not contain a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
3838
*
3939
*/
4040
func (rb *ByProjectKeyInStoreKeyByStoreKeyMeActiveCartRequestMethodHead) Execute(ctx context.Context) error {

platform/client_active_cart_by_project_key_me_active_cart.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type ByProjectKeyMeActiveCartRequestBuilder struct {
1919
* A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
2020
*
2121
* - If no active Cart exists.
22-
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
22+
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
2323
*
2424
*/
2525
func (rb *ByProjectKeyMeActiveCartRequestBuilder) Get() *ByProjectKeyMeActiveCartRequestMethodGet {
@@ -35,7 +35,7 @@ func (rb *ByProjectKeyMeActiveCartRequestBuilder) Get() *ByProjectKeyMeActiveCar
3535
* A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
3636
*
3737
* - If no active Cart exists.
38-
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
38+
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
3939
*
4040
*/
4141
func (rb *ByProjectKeyMeActiveCartRequestBuilder) Head() *ByProjectKeyMeActiveCartRequestMethodHead {

platform/client_active_cart_by_project_key_me_active_cart_get.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func (rb *ByProjectKeyMeActiveCartRequestMethodGet) WithHeaders(headers http.Hea
6262
* A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
6363
*
6464
* - If no active Cart exists.
65-
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
65+
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
6666
*
6767
*/
6868
func (rb *ByProjectKeyMeActiveCartRequestMethodGet) Execute(ctx context.Context) (result *Cart, err error) {

platform/client_active_cart_by_project_key_me_active_cart_head.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func (rb *ByProjectKeyMeActiveCartRequestMethodHead) WithHeaders(headers http.He
3333
* A [ResourceNotFound](ctp:api:type:ResourceNotFoundError) error is returned in the following scenarios:
3434
*
3535
* - If no active Cart exists.
36-
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
36+
* - If an active Cart exists but does not have a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
3737
*
3838
*/
3939
func (rb *ByProjectKeyMeActiveCartRequestMethodHead) Execute(ctx context.Context) error {

platform/client_carts_by_project_key_in_store_key_by_store_key_me_carts.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func (rb *ByProjectKeyInStoreKeyByStoreKeyMeCartsRequestBuilder) Head() *ByProje
4545

4646
/**
4747
*
48-
* Creates a Cart in a Store for the Customer or anonymous user. The `customerId` or `anonymousId` field on the Cart is automatically set based on the [customer:{id}](/scopes#customer_idid) or [anonymous_id:{id}](/scopes#anonymous_idid) scope.
48+
* Creates a Cart in a Store for the Customer or anonymous user. The `customerId` or `anonymousId` field on the Cart is automatically set based on the [customer:{id}](/scopes#composable-commerce-oauth) or [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
4949
*
5050
* The `store` field in the created [Cart](ctp:api:type:Cart) is set to the Store specified by the `storeKey` path parameter.
5151
*

platform/client_carts_by_project_key_in_store_key_by_store_key_me_carts_by_id.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestBuilder struct {
2020
*
2121
* - If no Cart exists in the Store for the given `id`.
2222
* - If the Cart exists but does not belong to a Store, or the Cart's `store` field references a different Store.
23-
* - If the Cart exists but does not have either a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
23+
* - If the Cart exists but does not have either a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
2424
*
2525
*/
2626
func (rb *ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestBuilder) Get() *ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestMethodGet {
@@ -44,7 +44,7 @@ func (rb *ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestBuilder) Head() *ByP
4444
*
4545
* - If no Cart exists in the Store for the given `id`.
4646
* - If the Cart exists but does not belong to a Store, or the Cart's `store` field references a different Store.
47-
* - If the Cart exists but does not have either a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
47+
* - If the Cart exists but does not have either a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
4848
*
4949
*/
5050
func (rb *ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestBuilder) Post(body MyCartUpdate) *ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestMethodPost {
@@ -62,7 +62,7 @@ func (rb *ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestBuilder) Post(body M
6262
*
6363
* - If no Cart exists in the Store for the given `id`.
6464
* - If the Cart exists in the Project but does not belong to a Store, or the Cart's `store` field references a different Store.
65-
* - If the Cart exists in the Project but does not have either a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
65+
* - If the Cart exists in the Project but does not have either a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
6666
*
6767
*/
6868
func (rb *ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestBuilder) Delete() *ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestMethodDelete {

platform/client_carts_by_project_key_in_store_key_by_store_key_me_carts_by_id_delete.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (rb *ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestMethodDelete) WithHe
7272
*
7373
* - If no Cart exists in the Store for the given `id`.
7474
* - If the Cart exists in the Project but does not belong to a Store, or the Cart's `store` field references a different Store.
75-
* - If the Cart exists in the Project but does not have either a `customerId` that matches the [customer:{id}](/scopes#customer_idid) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#anonymous_idid) scope.
75+
* - If the Cart exists in the Project but does not have either a `customerId` that matches the [customer:{id}](/scopes#composable-commerce-oauth) scope, or an `anonymousId` that matches the [anonymous_id:{id}](/scopes#composable-commerce-oauth) scope.
7676
*
7777
*/
7878
func (rb *ByProjectKeyInStoreKeyByStoreKeyMeCartsByIDRequestMethodDelete) Execute(ctx context.Context) (result *Cart, err error) {

0 commit comments

Comments
 (0)