Skip to content

Commit 7c337cd

Browse files
committed
build(codegen): updating SDK
1 parent dc00b10 commit 7c337cd

File tree

5 files changed

+179
-0
lines changed

5 files changed

+179
-0
lines changed

.changeset/changes_api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
- added type `CartMergeMode`
1111
- added type `MergeCartDraft`
12+
- added type `RecurringOrderFailureError`
13+
- added type `GraphQLRecurringOrderFailureError`
14+
- added type `RecurringOrderFailedMessage`
15+
- added type `RecurringOrderFailedMessagePayload`
1216
</details>
1317

1418
<details>

changes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
- added type `CartMergeMode`
77
- added type `MergeCartDraft`
8+
- added type `RecurringOrderFailureError`
9+
- added type `GraphQLRecurringOrderFailureError`
10+
- added type `RecurringOrderFailedMessage`
11+
- added type `RecurringOrderFailedMessagePayload`
812
</details>
913

1014
<details>

packages/platform-sdk/src/generated/models/error.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export type ErrorObject =
112112
| ProjectNotConfiguredForLanguagesError
113113
| QueryComplexityLimitExceededError
114114
| QueryTimedOutError
115+
| RecurringOrderFailureError
115116
| ReferenceExistsError
116117
| ReferencedResourceNotFoundError
117118
| RequiredFieldError
@@ -1867,6 +1868,26 @@ export interface QueryTimedOutError extends IErrorObject {
18671868
*/
18681869
readonly message: string
18691870
}
1871+
/**
1872+
* Returned when a subsequent Order for a [Recurring Order](ctp:api:type:RecurringOrder) could not be processed.
1873+
*
1874+
*/
1875+
export interface RecurringOrderFailureError extends IErrorObject {
1876+
readonly code: 'RecurringOrderFailure'
1877+
[key: string]: any
1878+
/**
1879+
* Plain text description of the error.
1880+
*
1881+
*
1882+
*/
1883+
readonly message: string
1884+
/**
1885+
* Details about the error's cause and the entities involved.
1886+
*
1887+
*
1888+
*/
1889+
readonly details: any
1890+
}
18701891
/**
18711892
* Returned when a resource cannot be deleted because it is being referenced by another resource.
18721893
*
@@ -2204,6 +2225,7 @@ export type GraphQLErrorObject =
22042225
| GraphQLProjectNotConfiguredForLanguagesError
22052226
| GraphQLQueryComplexityLimitExceededError
22062227
| GraphQLQueryTimedOutError
2228+
| GraphQLRecurringOrderFailureError
22072229
| GraphQLReferenceExistsError
22082230
| GraphQLReferencedResourceNotFoundError
22092231
| GraphQLRequiredFieldError
@@ -3507,6 +3529,20 @@ export interface GraphQLQueryTimedOutError extends IGraphQLErrorObject {
35073529
readonly code: 'QueryTimedOut'
35083530
[key: string]: any
35093531
}
3532+
/**
3533+
* Returned when a subsequent Order for a [Recurring Order](ctp:api:type:RecurringOrder) could not be processed.
3534+
*
3535+
*/
3536+
export interface GraphQLRecurringOrderFailureError extends IGraphQLErrorObject {
3537+
readonly code: 'RecurringOrderFailure'
3538+
[key: string]: any
3539+
/**
3540+
* Details about the error's cause and the entities involved.
3541+
*
3542+
*
3543+
*/
3544+
readonly details: any
3545+
}
35103546
/**
35113547
* Returned when a resource cannot be deleted because it is being referenced by another resource.
35123548
*

packages/platform-sdk/src/generated/models/message.ts

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ import {
5858
import { CustomerGroupReference } from './customer-group'
5959
import { DiscountCode, DiscountCodeReference } from './discount-code'
6060
import { DiscountGroup } from './discount-group'
61+
import { RecurringOrderFailureError } from './error'
6162
import { InventoryEntry } from './inventory'
6263
import {
6364
Delivery,
@@ -398,6 +399,7 @@ export type Message =
398399
| RecurringOrderCustomTypeSetMessage
399400
| RecurringOrderDeletedMessage
400401
| RecurringOrderExpiresAtSetMessage
402+
| RecurringOrderFailedMessage
401403
| RecurringOrderKeySetMessage
402404
| RecurringOrderScheduleSetMessage
403405
| RecurringOrderStartsAtSetMessage
@@ -20515,6 +20517,100 @@ export interface RecurringOrderExpiresAtSetMessage extends IMessage {
2051520517
*/
2051620518
readonly oldExpiresAt: string
2051720519
}
20520+
/**
20521+
* Generated after a [RecurringOrder](ctp:api:type:RecurringOrder) failed to process an Order.
20522+
*
20523+
*/
20524+
export interface RecurringOrderFailedMessage extends IMessage {
20525+
readonly type: 'RecurringOrderFailed'
20526+
/**
20527+
* Unique identifier of the Message. Can be used to track which Messages have been processed.
20528+
*
20529+
*/
20530+
readonly id: string
20531+
/**
20532+
* Version of a resource. In case of Messages, this is always `1`.
20533+
*
20534+
*/
20535+
readonly version: number
20536+
/**
20537+
* Date and time (UTC) the Message was generated.
20538+
*
20539+
*/
20540+
readonly createdAt: string
20541+
/**
20542+
* Value of `createdAt`.
20543+
*
20544+
*/
20545+
readonly lastModifiedAt: string
20546+
/**
20547+
* IDs and references that last modified the Message.
20548+
*
20549+
*
20550+
*/
20551+
readonly lastModifiedBy?: LastModifiedBy
20552+
/**
20553+
* IDs and references that created the Message.
20554+
*
20555+
*
20556+
*/
20557+
readonly createdBy?: CreatedBy
20558+
/**
20559+
* Message number in relation to other Messages for a given resource. The `sequenceNumber` of the next Message for the resource is the successor of the `sequenceNumber` of the current Message. Meaning, the `sequenceNumber` of the next Message equals the `sequenceNumber` of the current Message + 1.
20560+
* `sequenceNumber` can be used to ensure that Messages are processed in the correct order for a particular resource.
20561+
*
20562+
*
20563+
*/
20564+
readonly sequenceNumber: number
20565+
/**
20566+
* [Reference](ctp:api:type:Reference) to the resource on which the change or action was performed.
20567+
*
20568+
*
20569+
*/
20570+
readonly resource: Reference
20571+
/**
20572+
* Version of the resource on which the change or action was performed.
20573+
*
20574+
*
20575+
*/
20576+
readonly resourceVersion: number
20577+
/**
20578+
* User-provided identifiers of the resource, such as `key` or `externalId`. Only present if the resource has such identifiers.
20579+
*
20580+
*
20581+
*/
20582+
readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers
20583+
/**
20584+
* ID of the [Cart](ctp:api:type:Cart) used in the failed Order creation attempt.
20585+
*
20586+
*
20587+
*/
20588+
readonly cartId: string
20589+
/**
20590+
* Date and time (UTC) when the Order creation attempt failed.
20591+
*
20592+
*
20593+
*/
20594+
readonly failedAt: string
20595+
/**
20596+
* Description of why the Order creation failed, such as insufficient stock.
20597+
*
20598+
*
20599+
*/
20600+
readonly failureReason: string
20601+
/**
20602+
* Date and time (UTC) the Order was scheduled to be created.
20603+
*
20604+
*
20605+
*/
20606+
readonly orderScheduledAt: string
20607+
/**
20608+
* Errors due to which the Order creation failed.
20609+
*
20610+
*
20611+
*/
20612+
readonly errors?: RecurringOrderFailureError[]
20613+
}
2051820614
/**
2051920615
* Generated after a successful [Set Key](ctp:api:type:RecurringOrderSetKeyAction) update action.
2052020616
*
@@ -23991,6 +24087,7 @@ export type MessagePayload =
2399124087
| RecurringOrderCustomTypeSetMessagePayload
2399224088
| RecurringOrderDeletedMessagePayload
2399324089
| RecurringOrderExpiresAtSetMessagePayload
24090+
| RecurringOrderFailedMessagePayload
2399424091
| RecurringOrderKeySetMessagePayload
2399524092
| RecurringOrderScheduleSetMessagePayload
2399624093
| RecurringOrderStartsAtSetMessagePayload
@@ -29319,6 +29416,43 @@ export interface RecurringOrderExpiresAtSetMessagePayload
2931929416
*/
2932029417
readonly oldExpiresAt: string
2932129418
}
29419+
/**
29420+
* Generated after a [RecurringOrder](ctp:api:type:RecurringOrder) failed to process an Order.
29421+
*
29422+
*/
29423+
export interface RecurringOrderFailedMessagePayload extends IMessagePayload {
29424+
readonly type: 'RecurringOrderFailed'
29425+
/**
29426+
* ID of the [Cart](ctp:api:type:Cart) used in the failed Order creation attempt.
29427+
*
29428+
*
29429+
*/
29430+
readonly cartId: string
29431+
/**
29432+
* Date and time (UTC) when the Order creation attempt failed.
29433+
*
29434+
*
29435+
*/
29436+
readonly failedAt: string
29437+
/**
29438+
* Description of why the Order creation failed, such as insufficient stock.
29439+
*
29440+
*
29441+
*/
29442+
readonly failureReason: string
29443+
/**
29444+
* Date and time (UTC) the Order was scheduled to be created.
29445+
*
29446+
*
29447+
*/
29448+
readonly orderScheduledAt: string
29449+
/**
29450+
* Errors due to which the Order creation failed.
29451+
*
29452+
*
29453+
*/
29454+
readonly errors?: RecurringOrderFailureError[]
29455+
}
2932229456
/**
2932329457
* Generated after a successful [Set Key](ctp:api:type:RecurringOrderSetKeyAction) update action.
2932429458
*

references.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,3 +473,4 @@ ea7ba668e4084d845f2f3871c239999f43613b28
473473
524cda1d7939151daccfc43d29db2af42b52c592
474474
2d80e476e7b846987e3c2db6fdba76c470f1c173
475475
2ca7fba4e989ff96a2a3008d3168ea243c9cc3a8
476+
62910ed7ec4d1110dd8e5c98acc931a7df092a2e

0 commit comments

Comments
 (0)