@poweredbysous/storefront-all-sdk 7.0.1 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -132,7 +132,8 @@ var RETRYABLE_ERROR_CODES = /* @__PURE__ */ new Set([
132
132
  "OTP_RATE_LIMIT_EXCEEDED",
133
133
  "RATE_LIMITED",
134
134
  "REFUND_PROCESSING_FAILED",
135
- "SUBSCRIPTION_STRIPE_ERROR"
135
+ "SUBSCRIPTION_STRIPE_ERROR",
136
+ "product_not_synced"
136
137
  ]);
137
138
  var RETRYABLE_HTTP_STATUSES = /* @__PURE__ */ new Set([429, 502]);
138
139
 
package/dist/index.d.cts CHANGED
@@ -1639,6 +1639,23 @@ interface paths {
1639
1639
  patch?: never;
1640
1640
  trace?: never;
1641
1641
  };
1642
+ "/api/v1/admin/stores/{store_public_id}/options-library/products/{product_id}/groups/order/": {
1643
+ parameters: {
1644
+ query?: never;
1645
+ header?: never;
1646
+ path?: never;
1647
+ cookie?: never;
1648
+ };
1649
+ get?: never;
1650
+ /** @description Put a product's linked groups in a new order (saved on Publish). */
1651
+ put: operations["admin_stores_options_library_products_groups_order_update"];
1652
+ post?: never;
1653
+ delete?: never;
1654
+ options?: never;
1655
+ head?: never;
1656
+ patch?: never;
1657
+ trace?: never;
1658
+ };
1642
1659
  "/api/v1/admin/stores/{store_public_id}/options-library/snoozes/": {
1643
1660
  parameters: {
1644
1661
  query?: never;
@@ -8094,9 +8111,14 @@ interface components {
8094
8111
  * @enum {string}
8095
8112
  */
8096
8113
  AssetTypeEnum: "logo" | "hero" | "favicon" | "og_image";
8097
- /** @description Either a library group to add, or a new group to create and add. */
8114
+ /**
8115
+ * @description Either a library group to add, or a new group to create and add.
8116
+ *
8117
+ * ``position`` puts a library group back in a slot (Undo of a removal).
8118
+ */
8098
8119
  AttachGroup: {
8099
8120
  library_group_id?: number;
8121
+ position?: number;
8100
8122
  group?: components["schemas"]["GroupWrite"];
8101
8123
  };
8102
8124
  Attribute: {
@@ -12221,11 +12243,16 @@ interface components {
12221
12243
  * @description Validates the request body for processing a payment.
12222
12244
  *
12223
12245
  * ``gateway_id`` is required. Additional gateway-specific fields
12224
- * (e.g. ``gift_card_code``, ``amount``) are passed through to the
12225
- * gateway via ``validated_data`` without explicit declaration here.
12246
+ * (e.g. ``gift_card_code``) are passed through to the gateway without
12247
+ * explicit declaration here. ``amount``, when sent, must be at least 0.01.
12226
12248
  */
12227
12249
  ProcessPaymentInput: {
12228
12250
  gateway_id: string;
12251
+ /**
12252
+ * Format: decimal
12253
+ * @description The part of the checkout to pay with this method, for a gateway that pays part of it (a gift card). Omitted, the rest owed.
12254
+ */
12255
+ amount?: string;
12229
12256
  /** @description The member's loyalty session: the order's points go to this member, whatever email the order carries. When the checkout carries Leat rewards, payment starts only once it may spend their points. */
12230
12257
  loyalty_token?: string;
12231
12258
  };
@@ -12475,8 +12502,13 @@ interface components {
12475
12502
  ProductFulfilmentDatesReasonEnum: "no_dates";
12476
12503
  ProductGroup: {
12477
12504
  modifier_group_id: number;
12505
+ readonly position: number | null;
12478
12506
  library_group: components["schemas"]["LibraryGroup"];
12479
12507
  };
12508
+ /** @description The product's linked groups, every one, in the order to show them. */
12509
+ ProductGroupOrder: {
12510
+ modifier_group_ids: number[];
12511
+ };
12480
12512
  ProductImage: {
12481
12513
  readonly id: number;
12482
12514
  /** Format: uri */
@@ -21547,6 +21579,100 @@ interface operations {
21547
21579
  };
21548
21580
  };
21549
21581
  };
21582
+ admin_stores_options_library_products_groups_order_update: {
21583
+ parameters: {
21584
+ query?: never;
21585
+ header?: {
21586
+ /** @description Company the request acts on. Ignored for merchant tokens (scoped to their own company); required for admin tokens to select a company. */
21587
+ "X-Sous-Company-Id"?: number;
21588
+ };
21589
+ path: {
21590
+ product_id: number;
21591
+ store_public_id: string;
21592
+ };
21593
+ cookie?: never;
21594
+ };
21595
+ requestBody: {
21596
+ content: {
21597
+ "application/json": components["schemas"]["ProductGroupOrder"];
21598
+ "application/x-www-form-urlencoded": components["schemas"]["ProductGroupOrder"];
21599
+ "multipart/form-data": components["schemas"]["ProductGroupOrder"];
21600
+ };
21601
+ };
21602
+ responses: {
21603
+ 200: {
21604
+ headers: {
21605
+ [name: string]: unknown;
21606
+ };
21607
+ content: {
21608
+ "application/json": components["schemas"]["ProductGroup"][];
21609
+ };
21610
+ };
21611
+ /** @description Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
21612
+ 400: {
21613
+ headers: {
21614
+ [name: string]: unknown;
21615
+ };
21616
+ content: {
21617
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21618
+ };
21619
+ };
21620
+ /** @description Possible error codes include `UNAUTHORIZED`. Use `x-error-codes` for machine-readable retryability metadata. */
21621
+ 401: {
21622
+ headers: {
21623
+ [name: string]: unknown;
21624
+ };
21625
+ content: {
21626
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21627
+ };
21628
+ };
21629
+ /** @description Possible error codes include `FORBIDDEN`. Use `x-error-codes` for machine-readable retryability metadata. */
21630
+ 403: {
21631
+ headers: {
21632
+ [name: string]: unknown;
21633
+ };
21634
+ content: {
21635
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21636
+ };
21637
+ };
21638
+ /** @description Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
21639
+ 404: {
21640
+ headers: {
21641
+ [name: string]: unknown;
21642
+ };
21643
+ content: {
21644
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21645
+ };
21646
+ };
21647
+ /** @description Possible error codes include `group_order_stale`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `product_not_synced`. Use `x-error-codes` for machine-readable retryability metadata. */
21648
+ 409: {
21649
+ headers: {
21650
+ [name: string]: unknown;
21651
+ };
21652
+ content: {
21653
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21654
+ };
21655
+ };
21656
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
21657
+ 429: {
21658
+ headers: {
21659
+ [name: string]: unknown;
21660
+ };
21661
+ content: {
21662
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21663
+ };
21664
+ };
21665
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
21666
+ 500: {
21667
+ headers: {
21668
+ [name: string]: unknown;
21669
+ };
21670
+ content: {
21671
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21672
+ };
21673
+ };
21674
+ };
21675
+ };
21550
21676
  admin_stores_options_library_snoozes_list: {
21551
21677
  parameters: {
21552
21678
  query?: never;
package/dist/index.d.ts CHANGED
@@ -1639,6 +1639,23 @@ interface paths {
1639
1639
  patch?: never;
1640
1640
  trace?: never;
1641
1641
  };
1642
+ "/api/v1/admin/stores/{store_public_id}/options-library/products/{product_id}/groups/order/": {
1643
+ parameters: {
1644
+ query?: never;
1645
+ header?: never;
1646
+ path?: never;
1647
+ cookie?: never;
1648
+ };
1649
+ get?: never;
1650
+ /** @description Put a product's linked groups in a new order (saved on Publish). */
1651
+ put: operations["admin_stores_options_library_products_groups_order_update"];
1652
+ post?: never;
1653
+ delete?: never;
1654
+ options?: never;
1655
+ head?: never;
1656
+ patch?: never;
1657
+ trace?: never;
1658
+ };
1642
1659
  "/api/v1/admin/stores/{store_public_id}/options-library/snoozes/": {
1643
1660
  parameters: {
1644
1661
  query?: never;
@@ -8094,9 +8111,14 @@ interface components {
8094
8111
  * @enum {string}
8095
8112
  */
8096
8113
  AssetTypeEnum: "logo" | "hero" | "favicon" | "og_image";
8097
- /** @description Either a library group to add, or a new group to create and add. */
8114
+ /**
8115
+ * @description Either a library group to add, or a new group to create and add.
8116
+ *
8117
+ * ``position`` puts a library group back in a slot (Undo of a removal).
8118
+ */
8098
8119
  AttachGroup: {
8099
8120
  library_group_id?: number;
8121
+ position?: number;
8100
8122
  group?: components["schemas"]["GroupWrite"];
8101
8123
  };
8102
8124
  Attribute: {
@@ -12221,11 +12243,16 @@ interface components {
12221
12243
  * @description Validates the request body for processing a payment.
12222
12244
  *
12223
12245
  * ``gateway_id`` is required. Additional gateway-specific fields
12224
- * (e.g. ``gift_card_code``, ``amount``) are passed through to the
12225
- * gateway via ``validated_data`` without explicit declaration here.
12246
+ * (e.g. ``gift_card_code``) are passed through to the gateway without
12247
+ * explicit declaration here. ``amount``, when sent, must be at least 0.01.
12226
12248
  */
12227
12249
  ProcessPaymentInput: {
12228
12250
  gateway_id: string;
12251
+ /**
12252
+ * Format: decimal
12253
+ * @description The part of the checkout to pay with this method, for a gateway that pays part of it (a gift card). Omitted, the rest owed.
12254
+ */
12255
+ amount?: string;
12229
12256
  /** @description The member's loyalty session: the order's points go to this member, whatever email the order carries. When the checkout carries Leat rewards, payment starts only once it may spend their points. */
12230
12257
  loyalty_token?: string;
12231
12258
  };
@@ -12475,8 +12502,13 @@ interface components {
12475
12502
  ProductFulfilmentDatesReasonEnum: "no_dates";
12476
12503
  ProductGroup: {
12477
12504
  modifier_group_id: number;
12505
+ readonly position: number | null;
12478
12506
  library_group: components["schemas"]["LibraryGroup"];
12479
12507
  };
12508
+ /** @description The product's linked groups, every one, in the order to show them. */
12509
+ ProductGroupOrder: {
12510
+ modifier_group_ids: number[];
12511
+ };
12480
12512
  ProductImage: {
12481
12513
  readonly id: number;
12482
12514
  /** Format: uri */
@@ -21547,6 +21579,100 @@ interface operations {
21547
21579
  };
21548
21580
  };
21549
21581
  };
21582
+ admin_stores_options_library_products_groups_order_update: {
21583
+ parameters: {
21584
+ query?: never;
21585
+ header?: {
21586
+ /** @description Company the request acts on. Ignored for merchant tokens (scoped to their own company); required for admin tokens to select a company. */
21587
+ "X-Sous-Company-Id"?: number;
21588
+ };
21589
+ path: {
21590
+ product_id: number;
21591
+ store_public_id: string;
21592
+ };
21593
+ cookie?: never;
21594
+ };
21595
+ requestBody: {
21596
+ content: {
21597
+ "application/json": components["schemas"]["ProductGroupOrder"];
21598
+ "application/x-www-form-urlencoded": components["schemas"]["ProductGroupOrder"];
21599
+ "multipart/form-data": components["schemas"]["ProductGroupOrder"];
21600
+ };
21601
+ };
21602
+ responses: {
21603
+ 200: {
21604
+ headers: {
21605
+ [name: string]: unknown;
21606
+ };
21607
+ content: {
21608
+ "application/json": components["schemas"]["ProductGroup"][];
21609
+ };
21610
+ };
21611
+ /** @description Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
21612
+ 400: {
21613
+ headers: {
21614
+ [name: string]: unknown;
21615
+ };
21616
+ content: {
21617
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21618
+ };
21619
+ };
21620
+ /** @description Possible error codes include `UNAUTHORIZED`. Use `x-error-codes` for machine-readable retryability metadata. */
21621
+ 401: {
21622
+ headers: {
21623
+ [name: string]: unknown;
21624
+ };
21625
+ content: {
21626
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21627
+ };
21628
+ };
21629
+ /** @description Possible error codes include `FORBIDDEN`. Use `x-error-codes` for machine-readable retryability metadata. */
21630
+ 403: {
21631
+ headers: {
21632
+ [name: string]: unknown;
21633
+ };
21634
+ content: {
21635
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21636
+ };
21637
+ };
21638
+ /** @description Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
21639
+ 404: {
21640
+ headers: {
21641
+ [name: string]: unknown;
21642
+ };
21643
+ content: {
21644
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21645
+ };
21646
+ };
21647
+ /** @description Possible error codes include `group_order_stale`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `product_not_synced`. Use `x-error-codes` for machine-readable retryability metadata. */
21648
+ 409: {
21649
+ headers: {
21650
+ [name: string]: unknown;
21651
+ };
21652
+ content: {
21653
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21654
+ };
21655
+ };
21656
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
21657
+ 429: {
21658
+ headers: {
21659
+ [name: string]: unknown;
21660
+ };
21661
+ content: {
21662
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21663
+ };
21664
+ };
21665
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
21666
+ 500: {
21667
+ headers: {
21668
+ [name: string]: unknown;
21669
+ };
21670
+ content: {
21671
+ "application/json": components["schemas"]["APIErrorEnvelope"];
21672
+ };
21673
+ };
21674
+ };
21675
+ };
21550
21676
  admin_stores_options_library_snoozes_list: {
21551
21677
  parameters: {
21552
21678
  query?: never;
package/dist/index.js CHANGED
@@ -93,7 +93,8 @@ var RETRYABLE_ERROR_CODES = /* @__PURE__ */ new Set([
93
93
  "OTP_RATE_LIMIT_EXCEEDED",
94
94
  "RATE_LIMITED",
95
95
  "REFUND_PROCESSING_FAILED",
96
- "SUBSCRIPTION_STRIPE_ERROR"
96
+ "SUBSCRIPTION_STRIPE_ERROR",
97
+ "product_not_synced"
97
98
  ]);
98
99
  var RETRYABLE_HTTP_STATUSES = /* @__PURE__ */ new Set([429, 502]);
99
100
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poweredbysous/storefront-all-sdk",
3
- "version": "7.0.1",
3
+ "version": "7.1.0",
4
4
  "description": "Type-safe TypeScript SDK for all SOUS Storefront Backend endpoints",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,