Skip to content

Commit ee2a8b6

Browse files
authored
build(codegen): updating SDK (#1139)
Co-authored-by: ct-sdks[bot] <153784748+ct-sdks[bot]@users.noreply.github.com>
1 parent e46b15e commit ee2a8b6

6 files changed

Lines changed: 144 additions & 3 deletions

File tree

.changeset/changes_api.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
<summary>Added Type(s)</summary>
99

1010
- added type `RecurringOrderDeletedMessage`
11+
- added type `RecurringOrderExpiresAtSetMessage`
1112
- added type `RecurringOrderDeletedMessagePayload`
13+
- added type `RecurringOrderExpiresAtSetMessagePayload`
14+
- added type `RecurringOrderSetExpiresAtAction`
1215
</details>
1316

1417
<details>
@@ -17,3 +20,9 @@
1720
- added method `apiRoot.withProjectKey().recurringOrders().withId().delete()`
1821
- added method `apiRoot.withProjectKey().recurringOrders().withKey().delete()`
1922
</details>
23+
24+
<details>
25+
<summary>Added Property(s)</summary>
26+
27+
- added property `expiresAt` to type `RecurringOrderDraft`
28+
</details>

changes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
<summary>Added Type(s)</summary>
55

66
- added type `RecurringOrderDeletedMessage`
7+
- added type `RecurringOrderExpiresAtSetMessage`
78
- added type `RecurringOrderDeletedMessagePayload`
9+
- added type `RecurringOrderExpiresAtSetMessagePayload`
10+
- added type `RecurringOrderSetExpiresAtAction`
811
</details>
912

1013
<details>
@@ -14,6 +17,12 @@
1417
- added method `apiRoot.withProjectKey().recurringOrders().withKey().delete()`
1518
</details>
1619

20+
<details>
21+
<summary>Added Property(s)</summary>
22+
23+
- added property `expiresAt` to type `RecurringOrderDraft`
24+
</details>
25+
1726
**History changes**
1827

1928
<details>

packages/platform-sdk/src/generated/client/recurring-orders/by-project-key-recurring-orders-request-builder.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,11 @@ export class ByProjectKeyRecurringOrdersRequestBuilder {
110110
}
111111
/**
112112
* Creates a Recurring Order in the Project.
113-
* The Cart is validated to ensure that it is convertible to an [Order](ctp:api:type:Order). If validation fails, an error is returned.
114-
*
115113
* Produces the [RecurringOrderCreated](ctp:api:type:RecurringOrderCreatedMessage) message.
116114
*
115+
* The Cart is validated to ensure that it is convertible to an [Order](ctp:api:type:Order). If the validation fails, an error is returned.
116+
* If the expiration date has been reached when the [Recurring Order](ctp:api:type:RecurringOrder) is processed, its [RecurringOrderState](ctp:api:type:RecurringOrderState) will be updated to `Expired`, and no Order will be created.
117+
*
117118
* If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Recurring Order creation may still successfully complete after the error is returned.
118119
* If you receive this error, you should verify the status of the Recurring Order by querying a unique identifier supplied during the creation request, such as the key.
119120
*

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

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ export type Message =
392392
| RecurringOrderCustomTypeRemovedMessage
393393
| RecurringOrderCustomTypeSetMessage
394394
| RecurringOrderDeletedMessage
395+
| RecurringOrderExpiresAtSetMessage
395396
| RecurringOrderKeySetMessage
396397
| RecurringOrderScheduleSetMessage
397398
| RecurringOrderStartsAtSetMessage
@@ -20053,6 +20054,82 @@ export interface RecurringOrderDeletedMessage extends IMessage {
2005320054
*/
2005420055
readonly recurringOrder: RecurringOrder
2005520056
}
20057+
/**
20058+
* Generated after a successful [Set Expires At](ctp:api:type:RecurringOrderSetExpiresAtAction) update action.
20059+
*
20060+
*/
20061+
export interface RecurringOrderExpiresAtSetMessage extends IMessage {
20062+
readonly type: 'RecurringOrderExpiresAtSet'
20063+
/**
20064+
* Unique identifier of the Message. Can be used to track which Messages have been processed.
20065+
*
20066+
*/
20067+
readonly id: string
20068+
/**
20069+
* Version of a resource. In case of Messages, this is always `1`.
20070+
*
20071+
*/
20072+
readonly version: number
20073+
/**
20074+
* Date and time (UTC) the Message was generated.
20075+
*
20076+
*/
20077+
readonly createdAt: string
20078+
/**
20079+
* Value of `createdAt`.
20080+
*
20081+
*/
20082+
readonly lastModifiedAt: string
20083+
/**
20084+
* IDs and references that last modified the Message.
20085+
*
20086+
*
20087+
*/
20088+
readonly lastModifiedBy?: LastModifiedBy
20089+
/**
20090+
* IDs and references that created the Message.
20091+
*
20092+
*
20093+
*/
20094+
readonly createdBy?: CreatedBy
20095+
/**
20096+
* 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.
20097+
* `sequenceNumber` can be used to ensure that Messages are processed in the correct order for a particular resource.
20098+
*
20099+
*
20100+
*/
20101+
readonly sequenceNumber: number
20102+
/**
20103+
* [Reference](ctp:api:type:Reference) to the resource on which the change or action was performed.
20104+
*
20105+
*
20106+
*/
20107+
readonly resource: Reference
20108+
/**
20109+
* Version of the resource on which the change or action was performed.
20110+
*
20111+
*
20112+
*/
20113+
readonly resourceVersion: number
20114+
/**
20115+
* User-provided identifiers of the resource, such as `key` or `externalId`. Only present if the resource has such identifiers.
20116+
*
20117+
*
20118+
*/
20119+
readonly resourceUserProvidedIdentifiers?: UserProvidedIdentifiers
20120+
/**
20121+
* Expiration date and time of the Recurring Order after the [Set Expires At](ctp:api:type:RecurringOrderSetExpiresAtAction) update action.
20122+
*
20123+
*
20124+
*/
20125+
readonly newExpiresAt: string
20126+
/**
20127+
* Expiration date and time of the Recurring Order before the [Set Expires At](ctp:api:type:RecurringOrderSetExpiresAtAction) update action.
20128+
*
20129+
*
20130+
*/
20131+
readonly oldExpiresAt: string
20132+
}
2005620133
/**
2005720134
* Generated after a successful [Set Key](ctp:api:type:RecurringOrderSetKeyAction) update action.
2005820135
*
@@ -23523,6 +23600,7 @@ export type MessagePayload =
2352323600
| RecurringOrderCustomTypeRemovedMessagePayload
2352423601
| RecurringOrderCustomTypeSetMessagePayload
2352523602
| RecurringOrderDeletedMessagePayload
23603+
| RecurringOrderExpiresAtSetMessagePayload
2352623604
| RecurringOrderKeySetMessagePayload
2352723605
| RecurringOrderScheduleSetMessagePayload
2352823606
| RecurringOrderStartsAtSetMessagePayload
@@ -28732,6 +28810,26 @@ export interface RecurringOrderDeletedMessagePayload extends IMessagePayload {
2873228810
*/
2873328811
readonly recurringOrder: RecurringOrder
2873428812
}
28813+
/**
28814+
* Generated after a successful [Set Expires At](ctp:api:type:RecurringOrderSetExpiresAtAction) update action.
28815+
*
28816+
*/
28817+
export interface RecurringOrderExpiresAtSetMessagePayload
28818+
extends IMessagePayload {
28819+
readonly type: 'RecurringOrderExpiresAtSet'
28820+
/**
28821+
* Expiration date and time of the Recurring Order after the [Set Expires At](ctp:api:type:RecurringOrderSetExpiresAtAction) update action.
28822+
*
28823+
*
28824+
*/
28825+
readonly newExpiresAt: string
28826+
/**
28827+
* Expiration date and time of the Recurring Order before the [Set Expires At](ctp:api:type:RecurringOrderSetExpiresAtAction) update action.
28828+
*
28829+
*
28830+
*/
28831+
readonly oldExpiresAt: string
28832+
}
2873528833
/**
2873628834
* Generated after a successful [Set Key](ctp:api:type:RecurringOrderSetKeyAction) update action.
2873728835
*

packages/platform-sdk/src/generated/models/recurring-order.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,12 @@ export interface RecurringOrderDraft {
269269
*
270270
*/
271271
readonly startsAt: string
272+
/**
273+
* Date and time (UTC) when the RecurringOrder will expire.
274+
*
275+
*
276+
*/
277+
readonly expiresAt?: string
272278
/**
273279
* State for the RecurringOrder in a custom workflow.
274280
*
@@ -453,6 +459,7 @@ export interface RecurringOrderUpdate {
453459
export type RecurringOrderUpdateAction =
454460
| RecurringOrderSetCustomFieldAction
455461
| RecurringOrderSetCustomTypeAction
462+
| RecurringOrderSetExpiresAtAction
456463
| RecurringOrderSetKeyAction
457464
| RecurringOrderSetOrderSkipConfigurationAction
458465
| RecurringOrderSetScheduleAction
@@ -568,6 +575,22 @@ export interface RecurringOrderSetCustomTypeAction
568575
*/
569576
readonly fields?: FieldContainer
570577
}
578+
/**
579+
* Setting the expiration date and time generates the [RecurringOrderExpiresAtSet](ctp:api:type:RecurringOrderExpiresAtSetMessage) Message.
580+
*
581+
*/
582+
export interface RecurringOrderSetExpiresAtAction
583+
extends IRecurringOrderUpdateAction {
584+
readonly action: 'setExpiresAt'
585+
/**
586+
* Date and time (UTC) the Recurring Order should expire. If empty, any existing value will be removed.
587+
*
588+
* If the date or time is extended or removed when the [RecurringOrderState](ctp:api:type:RecurringOrderState) is `Expired`, the state will be updated to `Active`.
589+
*
590+
*
591+
*/
592+
readonly expiresAt?: string
593+
}
571594
/**
572595
* This update action generates the [RecurringOrderKeySet](ctp:api:type:RecurringOrderKeySetMessage) Message.
573596
*
@@ -593,7 +616,7 @@ export interface RecurringOrderSetOrderSkipConfigurationAction
593616
*/
594617
readonly skipConfiguration?: SkipConfigurationDraft
595618
/**
596-
* Date and time (UTC) the Recurring Order will resume and start to generate new orders.
619+
* Date and time (UTC) the Recurring Order will expire and stop generating new orders.
597620
*
598621
*
599622
*/

references.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,3 +440,4 @@ e4973c1b97c71699c2945d476161cd47eded2e6d
440440
48cdda09a82127b5745d64a6b889a500a31139d8
441441
315719fe14a0aa4f14761fe5e768ad59b1a8a3e4
442442
09f7ffec9d7cad1549201cafbf8da0170de93a9a
443+
ae6bd28bc66a9ad876c323a54026e34e4f26c475

0 commit comments

Comments
 (0)