Skip to content

Commit 0890ad5

Browse files
committed
feat: update resources to schema 7.9.9
1 parent 86b5d71 commit 0890ad5

11 files changed

+186
-18
lines changed

gen/openapi.json

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"openapi": "3.1.0",
33
"info": {
44
"title": "Commerce Layer API",
5-
"version": "7.9.8",
5+
"version": "7.9.9",
66
"contact": {
77
"name": "API Support",
88
"url": "https://commercelayer.io",
@@ -47304,6 +47304,12 @@
4730447304
"example": 2,
4730547305
"nullable": true
4730647306
},
47307+
"total_usage_reached": {
47308+
"type": "boolean",
47309+
"description": "Indicates if the promotion has been applied the total number of allowed times.",
47310+
"example": false,
47311+
"nullable": true
47312+
},
4730747313
"active": {
4730847314
"type": "boolean",
4730947315
"description": "Indicates if the promotion is active (enabled and not expired).",
@@ -63339,6 +63345,12 @@
6333963345
"example": 2,
6334063346
"nullable": true
6334163347
},
63348+
"total_usage_reached": {
63349+
"type": "boolean",
63350+
"description": "Indicates if the promotion has been applied the total number of allowed times.",
63351+
"example": false,
63352+
"nullable": true
63353+
},
6334263354
"active": {
6334363355
"type": "boolean",
6334463356
"description": "Indicates if the promotion is active (enabled and not expired).",
@@ -65524,6 +65536,12 @@
6552465536
"example": 2,
6552565537
"nullable": true
6552665538
},
65539+
"total_usage_reached": {
65540+
"type": "boolean",
65541+
"description": "Indicates if the promotion has been applied the total number of allowed times.",
65542+
"example": false,
65543+
"nullable": true
65544+
},
6552765545
"active": {
6552865546
"type": "boolean",
6552965547
"description": "Indicates if the promotion is active (enabled and not expired).",
@@ -67119,6 +67137,12 @@
6711967137
"example": 2,
6712067138
"nullable": true
6712167139
},
67140+
"total_usage_reached": {
67141+
"type": "boolean",
67142+
"description": "Indicates if the promotion has been applied the total number of allowed times.",
67143+
"example": false,
67144+
"nullable": true
67145+
},
6712267146
"active": {
6712367147
"type": "boolean",
6712467148
"description": "Indicates if the promotion is active (enabled and not expired).",
@@ -69647,6 +69671,12 @@
6964769671
"example": 2,
6964869672
"nullable": true
6964969673
},
69674+
"total_usage_reached": {
69675+
"type": "boolean",
69676+
"description": "Indicates if the promotion has been applied the total number of allowed times.",
69677+
"example": false,
69678+
"nullable": true
69679+
},
6965069680
"active": {
6965169681
"type": "boolean",
6965269682
"description": "Indicates if the promotion is active (enabled and not expired).",
@@ -71232,6 +71262,12 @@
7123271262
"example": 2,
7123371263
"nullable": true
7123471264
},
71265+
"total_usage_reached": {
71266+
"type": "boolean",
71267+
"description": "Indicates if the promotion has been applied the total number of allowed times.",
71268+
"example": false,
71269+
"nullable": true
71270+
},
7123571271
"active": {
7123671272
"type": "boolean",
7123771273
"description": "Indicates if the promotion is active (enabled and not expired).",
@@ -100356,6 +100392,12 @@
100356100392
"example": 2,
100357100393
"nullable": true
100358100394
},
100395+
"total_usage_reached": {
100396+
"type": "boolean",
100397+
"description": "Indicates if the promotion has been applied the total number of allowed times.",
100398+
"example": false,
100399+
"nullable": true
100400+
},
100359100401
"active": {
100360100402
"type": "boolean",
100361100403
"description": "Indicates if the promotion is active (enabled and not expired).",
@@ -106718,6 +106760,12 @@
106718106760
"example": 2,
106719106761
"nullable": true
106720106762
},
106763+
"total_usage_reached": {
106764+
"type": "boolean",
106765+
"description": "Indicates if the promotion has been applied the total number of allowed times.",
106766+
"example": false,
106767+
"nullable": true
106768+
},
106721106769
"active": {
106722106770
"type": "boolean",
106723106771
"description": "Indicates if the promotion is active (enabled and not expired).",

gen/resources.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4258,6 +4258,16 @@
42584258
"sortable": true,
42594259
"example": "2"
42604260
},
4261+
"total_usage_reached": {
4262+
"type": "boolean",
4263+
"desc": "Indicates if the promotion has been applied the total number of allowed times.",
4264+
"creatable": false,
4265+
"updatable": false,
4266+
"fetchable": true,
4267+
"filterable": true,
4268+
"sortable": true,
4269+
"example": false
4270+
},
42614271
"active": {
42624272
"type": "boolean",
42634273
"desc": "Indicates if the promotion is active (enabled and not expired).",
@@ -4611,6 +4621,7 @@
46114621
"expires_at",
46124622
"total_usage_limit",
46134623
"total_usage_count",
4624+
"total_usage_reached",
46144625
"disabled_at",
46154626
"created_at",
46164627
"updated_at",
@@ -10717,6 +10728,16 @@
1071710728
"sortable": true,
1071810729
"example": "2"
1071910730
},
10731+
"total_usage_reached": {
10732+
"type": "boolean",
10733+
"desc": "Indicates if the promotion has been applied the total number of allowed times.",
10734+
"creatable": false,
10735+
"updatable": false,
10736+
"fetchable": true,
10737+
"filterable": true,
10738+
"sortable": true,
10739+
"example": false
10740+
},
1072010741
"active": {
1072110742
"type": "boolean",
1072210743
"desc": "Indicates if the promotion is active (enabled and not expired).",
@@ -11107,6 +11128,7 @@
1110711128
"expires_at",
1110811129
"total_usage_limit",
1110911130
"total_usage_count",
11131+
"total_usage_reached",
1111011132
"disabled_at",
1111111133
"created_at",
1111211134
"updated_at",
@@ -11534,6 +11556,16 @@
1153411556
"sortable": true,
1153511557
"example": "2"
1153611558
},
11559+
"total_usage_reached": {
11560+
"type": "boolean",
11561+
"desc": "Indicates if the promotion has been applied the total number of allowed times.",
11562+
"creatable": false,
11563+
"updatable": false,
11564+
"fetchable": true,
11565+
"filterable": true,
11566+
"sortable": true,
11567+
"example": false
11568+
},
1153711569
"active": {
1153811570
"type": "boolean",
1153911571
"desc": "Indicates if the promotion is active (enabled and not expired).",
@@ -11887,6 +11919,7 @@
1188711919
"expires_at",
1188811920
"total_usage_limit",
1188911921
"total_usage_count",
11922+
"total_usage_reached",
1189011923
"disabled_at",
1189111924
"created_at",
1189211925
"updated_at",
@@ -12054,6 +12087,16 @@
1205412087
"sortable": true,
1205512088
"example": "2"
1205612089
},
12090+
"total_usage_reached": {
12091+
"type": "boolean",
12092+
"desc": "Indicates if the promotion has been applied the total number of allowed times.",
12093+
"creatable": false,
12094+
"updatable": false,
12095+
"fetchable": true,
12096+
"filterable": true,
12097+
"sortable": true,
12098+
"example": false
12099+
},
1205712100
"active": {
1205812101
"type": "boolean",
1205912102
"desc": "Indicates if the promotion is active (enabled and not expired).",
@@ -12407,6 +12450,7 @@
1240712450
"expires_at",
1240812451
"total_usage_limit",
1240912452
"total_usage_count",
12453+
"total_usage_reached",
1241012454
"disabled_at",
1241112455
"created_at",
1241212456
"updated_at",
@@ -13001,6 +13045,16 @@
1300113045
"sortable": true,
1300213046
"example": "2"
1300313047
},
13048+
"total_usage_reached": {
13049+
"type": "boolean",
13050+
"desc": "Indicates if the promotion has been applied the total number of allowed times.",
13051+
"creatable": false,
13052+
"updatable": false,
13053+
"fetchable": true,
13054+
"filterable": true,
13055+
"sortable": true,
13056+
"example": false
13057+
},
1300413058
"active": {
1300513059
"type": "boolean",
1300613060
"desc": "Indicates if the promotion is active (enabled and not expired).",
@@ -13333,6 +13387,7 @@
1333313387
"expires_at",
1333413388
"total_usage_limit",
1333513389
"total_usage_count",
13390+
"total_usage_reached",
1333613391
"disabled_at",
1333713392
"created_at",
1333813393
"updated_at",
@@ -13500,6 +13555,16 @@
1350013555
"sortable": true,
1350113556
"example": "2"
1350213557
},
13558+
"total_usage_reached": {
13559+
"type": "boolean",
13560+
"desc": "Indicates if the promotion has been applied the total number of allowed times.",
13561+
"creatable": false,
13562+
"updatable": false,
13563+
"fetchable": true,
13564+
"filterable": true,
13565+
"sortable": true,
13566+
"example": false
13567+
},
1350313568
"active": {
1350413569
"type": "boolean",
1350513570
"desc": "Indicates if the promotion is active (enabled and not expired).",
@@ -13812,6 +13877,7 @@
1381213877
"expires_at",
1381313878
"total_usage_limit",
1381413879
"total_usage_count",
13880+
"total_usage_reached",
1381513881
"disabled_at",
1381613882
"created_at",
1381713883
"updated_at",
@@ -26208,6 +26274,16 @@
2620826274
"sortable": true,
2620926275
"example": "2"
2621026276
},
26277+
"total_usage_reached": {
26278+
"type": "boolean",
26279+
"desc": "Indicates if the promotion has been applied the total number of allowed times.",
26280+
"creatable": false,
26281+
"updatable": false,
26282+
"fetchable": true,
26283+
"filterable": true,
26284+
"sortable": true,
26285+
"example": false
26286+
},
2621126287
"active": {
2621226288
"type": "boolean",
2621326289
"desc": "Indicates if the promotion is active (enabled and not expired).",
@@ -26539,6 +26615,7 @@
2653926615
"expires_at",
2654026616
"total_usage_limit",
2654126617
"total_usage_count",
26618+
"total_usage_reached",
2654226619
"disabled_at",
2654326620
"created_at",
2654426621
"updated_at",
@@ -28495,6 +28572,16 @@
2849528572
"sortable": true,
2849628573
"example": "2"
2849728574
},
28575+
"total_usage_reached": {
28576+
"type": "boolean",
28577+
"desc": "Indicates if the promotion has been applied the total number of allowed times.",
28578+
"creatable": false,
28579+
"updatable": false,
28580+
"fetchable": true,
28581+
"filterable": true,
28582+
"sortable": true,
28583+
"example": false
28584+
},
2849828585
"active": {
2849928586
"type": "boolean",
2850028587
"desc": "Indicates if the promotion is active (enabled and not expired).",
@@ -28807,6 +28894,7 @@
2880728894
"expires_at",
2880828895
"total_usage_limit",
2880928896
"total_usage_count",
28897+
"total_usage_reached",
2881028898
"disabled_at",
2881128899
"created_at",
2881228900
"updated_at",

src/commercelayer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const debug = Debug('commercelayer')
1111

1212

1313
// Autogenerated version number, do not remove this line
14-
export const OPEN_API_SCHEMA_VERSION = '7.9.8'
14+
export const OPEN_API_SCHEMA_VERSION = '7.9.9'
1515

1616

1717
// SDK local configuration

src/resources/buy_x_pay_y_promotions.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ type SkuListRel = ResourceRel & { type: SkuListType }
2929
type TagRel = ResourceRel & { type: TagType }
3030

3131

32-
export type BuyXPayYPromotionSort = Pick<BuyXPayYPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'x' | 'y'> & ResourceSort
33-
// export type BuyXPayYPromotionFilter = Pick<BuyXPayYPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'x' | 'y'> & ResourceFilter
32+
export type BuyXPayYPromotionSort = Pick<BuyXPayYPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'total_usage_reached' | 'disabled_at' | 'x' | 'y'> & ResourceSort
33+
// export type BuyXPayYPromotionFilter = Pick<BuyXPayYPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'total_usage_reached' | 'disabled_at' | 'x' | 'y'> & ResourceFilter
3434

3535

3636
interface BuyXPayYPromotion extends Resource {
@@ -77,6 +77,10 @@ interface BuyXPayYPromotion extends Resource {
7777
* @example ```2```
7878
*/
7979
total_usage_count?: number | null
80+
/**
81+
* Indicates if the promotion has been applied the total number of allowed times.
82+
*/
83+
total_usage_reached?: boolean | null
8084
/**
8185
* Indicates if the promotion is active (enabled and not expired).
8286
* @example ```true```

src/resources/external_promotions.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ type SkuListRel = ResourceRel & { type: SkuListType }
2929
type TagRel = ResourceRel & { type: TagType }
3030

3131

32-
export type ExternalPromotionSort = Pick<ExternalPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort
33-
// export type ExternalPromotionFilter = Pick<ExternalPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter
32+
export type ExternalPromotionSort = Pick<ExternalPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'total_usage_reached' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceSort
33+
// export type ExternalPromotionFilter = Pick<ExternalPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'total_usage_reached' | 'disabled_at' | 'circuit_state' | 'circuit_failure_count'> & ResourceFilter
3434

3535

3636
interface ExternalPromotion extends Resource {
@@ -77,6 +77,10 @@ interface ExternalPromotion extends Resource {
7777
* @example ```2```
7878
*/
7979
total_usage_count?: number | null
80+
/**
81+
* Indicates if the promotion has been applied the total number of allowed times.
82+
*/
83+
total_usage_reached?: boolean | null
8084
/**
8185
* Indicates if the promotion is active (enabled and not expired).
8286
* @example ```true```

src/resources/fixed_amount_promotions.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ type SkuListRel = ResourceRel & { type: SkuListType }
2929
type TagRel = ResourceRel & { type: TagType }
3030

3131

32-
export type FixedAmountPromotionSort = Pick<FixedAmountPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceSort
33-
// export type FixedAmountPromotionFilter = Pick<FixedAmountPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'disabled_at'> & ResourceFilter
32+
export type FixedAmountPromotionSort = Pick<FixedAmountPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'total_usage_reached' | 'disabled_at'> & ResourceSort
33+
// export type FixedAmountPromotionFilter = Pick<FixedAmountPromotion, 'id' | 'name' | 'currency_code' | 'exclusive' | 'priority' | 'starts_at' | 'expires_at' | 'total_usage_limit' | 'total_usage_count' | 'total_usage_reached' | 'disabled_at'> & ResourceFilter
3434

3535

3636
interface FixedAmountPromotion extends Resource {
@@ -77,6 +77,10 @@ interface FixedAmountPromotion extends Resource {
7777
* @example ```2```
7878
*/
7979
total_usage_count?: number | null
80+
/**
81+
* Indicates if the promotion has been applied the total number of allowed times.
82+
*/
83+
total_usage_reached?: boolean | null
8084
/**
8185
* Indicates if the promotion is active (enabled and not expired).
8286
* @example ```true```

0 commit comments

Comments
 (0)