@aimee.shop/sdk 0.29.0-dev.292 → 0.30.0-dev.303

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.
Files changed (29) hide show
  1. package/dist/core/errors/checkout-refusal.d.ts +10 -0
  2. package/dist/core/errors/checkout-refusal.d.ts.map +1 -1
  3. package/dist/core/errors/checkout-refusal.js +2 -0
  4. package/dist/core/errors/checkout-refusal.js.map +1 -1
  5. package/dist/generated/core-api.d.ts +134 -39
  6. package/dist/generated/core-api.d.ts.map +1 -1
  7. package/dist/index.d.ts +2 -2
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/services/core/inventory/types.d.ts +6 -3
  11. package/dist/services/core/inventory/types.d.ts.map +1 -1
  12. package/dist/services/core/products.client.d.ts +11 -0
  13. package/dist/services/core/products.client.d.ts.map +1 -1
  14. package/dist/services/core/products.client.js +3 -0
  15. package/dist/services/core/products.client.js.map +1 -1
  16. package/dist/services/core/storefront/storefront.client.d.ts +14 -0
  17. package/dist/services/core/storefront/storefront.client.d.ts.map +1 -1
  18. package/dist/services/core/storefront/storefront.client.js +15 -0
  19. package/dist/services/core/storefront/storefront.client.js.map +1 -1
  20. package/dist/services/core/stores/configuration.client.d.ts +29 -8
  21. package/dist/services/core/stores/configuration.client.d.ts.map +1 -1
  22. package/dist/services/core/stores/configuration.client.js.map +1 -1
  23. package/dist/services/core/stores/index.d.ts +1 -1
  24. package/dist/services/core/stores/index.d.ts.map +1 -1
  25. package/dist/services/core/stores/index.js.map +1 -1
  26. package/dist/storefront/index.d.ts +1 -1
  27. package/dist/storefront/index.d.ts.map +1 -1
  28. package/dist/storefront/index.js.map +1 -1
  29. package/package.json +1 -1
@@ -24,6 +24,8 @@ export declare const CHECKOUT_REFUSAL_CODES: {
24
24
  readonly PAYMENT_BINDING_MISSING: "PAYMENT_BINDING_MISSING";
25
25
  /** 409 (complete): a discount code on the checkout can no longer be redeemed; the payment is returned. Remove it and pay again. */
26
26
  readonly CHECKOUT_DISCOUNT_UNAVAILABLE: "CHECKOUT_DISCOUNT_UNAVAILABLE";
27
+ /** 409 (complete): an item no longer has enough stock; `items` lists the shortfalls. Update the cart and pay again. */
28
+ readonly CHECKOUT_STOCK_UNAVAILABLE: "CHECKOUT_STOCK_UNAVAILABLE";
27
29
  /** 409 (prepare): the current attempt was already paid; complete instead. */
28
30
  readonly CHECKOUT_PAYMENT_TAKEN: "CHECKOUT_PAYMENT_TAKEN";
29
31
  /** 503, retryable (complete): returning the payment is still in progress. */
@@ -59,6 +61,12 @@ export interface CheckoutRefusalTotals {
59
61
  total: string;
60
62
  currency: string;
61
63
  }
64
+ /** One short item of a `CHECKOUT_STOCK_UNAVAILABLE` refusal. */
65
+ export interface CheckoutStockShortfall {
66
+ variantId: string;
67
+ requested: number;
68
+ available: number;
69
+ }
62
70
  export type CheckoutCompensationStatus = 'pending' | 'undone' | 'nothing_to_undo' | 'refund_accepted' | 'refused';
63
71
  /** The undo of a paid attempt, on refusals after payment. */
64
72
  export interface CheckoutRefusalCompensation {
@@ -85,6 +93,8 @@ export interface CheckoutRefusalBody {
85
93
  refusalCode?: string;
86
94
  /** `CHECKOUT_DISCOUNT_UNAVAILABLE`: the code that was refused. */
87
95
  discountCode?: string;
96
+ /** `CHECKOUT_STOCK_UNAVAILABLE`: the items that lack stock. */
97
+ items?: CheckoutStockShortfall[];
88
98
  /** `PAYMENT_DECLINED`: the provider's reason, when it gave one (e.g. `card_declined`, `insufficient_funds`). */
89
99
  declineCode?: string;
90
100
  /** 503 refusals: when to retry. */
@@ -1 +1 @@
1
- {"version":3,"file":"checkout-refusal.d.ts","sourceRoot":"","sources":["../../../../../src/core/errors/checkout-refusal.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;IACjC,oFAAoF;;IAEpF,4FAA4F;;IAE5F,kEAAkE;;IAElE,mGAAmG;;IAEnG,qEAAqE;;IAErE,4EAA4E;;IAE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): a discount code on the checkout can no longer be redeemed; the payment is returned. Remove it and pay again. */
27
27
  CHECKOUT_DISCOUNT_UNAVAILABLE: 'CHECKOUT_DISCOUNT_UNAVAILABLE',
28
+ /** 409 (complete): an item no longer has enough stock; `items` lists the shortfalls. Update the cart and pay again. */
29
+ CHECKOUT_STOCK_UNAVAILABLE: 'CHECKOUT_STOCK_UNAVAILABLE',
28
30
  /** 409 (prepare): the current attempt was already paid; complete instead. */
29
31
  CHECKOUT_PAYMENT_TAKEN: 'CHECKOUT_PAYMENT_TAKEN',
30
32
  /** 503, retryable (complete): returning the payment is still in progress. */
@@ -1 +1 @@
1
- {"version":3,"file":"checkout-refusal.js","sourceRoot":"","sources":["../../../../../src/core/errors/checkout-refusal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAErD;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,oFAAoF;IACpF,yBAAyB,EAAE,2BAA2B;IACtD,4FAA4F;IAC5F,qBAAqB,EAAE,uBAAuB;IAC9C,kEAAkE;IAClE,+BAA+B,EAAE,iCAAiC;IAClE,mGAAmG;IACnG,mCAAmC,EAAE,qCAAqC;IAC1E,qEAAqE;IACrE,wBAAwB,EAAE,0BAA0B;IACpD,4EAA4E;IAC5E,yBAAyB,EAAE,2BAA2B;IACtD,4EAA4E;IAC5E,yBAAyB,EAAE,2BAA2B;IACtD,8EAA8E;IAC9E,0BAA0B,EAAE,4BAA4B;IACxD,kEAAkE;IAClE,uBAAuB,EAAE,yBAAyB;IAClD,mIAAmI;IACnI,6BAA6B,EAAE,+BAA+B;IAC9D,6EAA6E;IAC7E,sBAAsB,EAAE,wBAAwB;IAChD,6EAA6E;IAC7E,6BAA6B,EAAE,+BAA+B;IAC9D,6FAA6F;IAC7F,yBAAyB,EAAE,2BAA2B;IACtD,2EAA2E;IAC3E,+BAA+B,EAAE,iCAAiC;IAClE,8DAA8D;IAC9D,2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,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,CAAC;AAEhG,SAAS,qBAAqB,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,mBAAmB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC;AAED,uGAAuG;AACvG,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,MAAM,IAAI,KAAK;QACf,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC;QACjC,WAAW,IAAI,KAAK;QACpB,OAAO,KAAK,CAAC,SAAS,KAAK,SAAS,CACrC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,IAAI,CAAC,CAAC,KAAK,YAAY,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,YAAY,QAAQ,CAAC,EAAE,CAAC;QACtE,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,qBAAqB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AAC1E,CAAC"}
@@ -2127,6 +2127,26 @@ export interface paths {
2127
2127
  patch?: never;
2128
2128
  trace?: never;
2129
2129
  };
2130
+ '/v1/stores/{storeId}/configuration/storefront': {
2131
+ parameters: {
2132
+ query?: never;
2133
+ header?: never;
2134
+ path?: never;
2135
+ cookie?: never;
2136
+ };
2137
+ /**
2138
+ * Get storefront display settings
2139
+ * @description Resolved inventory display settings for storefronts: stock count display, low stock threshold and out-of-stock product visibility. Readable with a publishable key for its own store.
2140
+ */
2141
+ get: operations['StoreConfigurationController_getStorefrontSettings'];
2142
+ put?: never;
2143
+ post?: never;
2144
+ delete?: never;
2145
+ options?: never;
2146
+ head?: never;
2147
+ patch?: never;
2148
+ trace?: never;
2149
+ };
2130
2150
  '/v1/stores/{storeId}/configuration': {
2131
2151
  parameters: {
2132
2152
  query?: never;
@@ -14412,6 +14432,11 @@ export interface components {
14412
14432
  * @example premium-wireless-headphones
14413
14433
  */
14414
14434
  slug: string;
14435
+ /**
14436
+ * @description SKU of the default variant created with the product. Defaults to the slug (truncated to 64 characters, with a suffix if the SKU is taken). The first option variant replaces the default variant; a variant created without options takes it over.
14437
+ * @example HEADPHONES-001
14438
+ */
14439
+ sku?: string;
14415
14440
  /**
14416
14441
  * @description Product tags for categorization
14417
14442
  * @example [
@@ -17896,6 +17921,40 @@ export interface components {
17896
17921
  [key: string]: unknown;
17897
17922
  };
17898
17923
  };
17924
+ InventorySettingsDto: {
17925
+ /**
17926
+ * @description Track stock for variants that do not override it. Default false.
17927
+ * @example true
17928
+ */
17929
+ trackInventory?: boolean;
17930
+ /**
17931
+ * @description When out of stock: false stops selling, true allows backorders. Default false.
17932
+ * @example false
17933
+ */
17934
+ allowBackorder?: boolean;
17935
+ /**
17936
+ * @description Default low stock threshold for stock rows that do not set their own. Default 10.
17937
+ * @example 5
17938
+ */
17939
+ lowStockThreshold?: number;
17940
+ /**
17941
+ * @description Storefront stock count display: never, when_low (at or below the threshold) or always. Default when_low.
17942
+ * @example when_low
17943
+ * @enum {string}
17944
+ */
17945
+ stockDisplay?: 'never' | 'when_low' | 'always';
17946
+ /**
17947
+ * @description Storefront listing of out-of-stock products: show, show_last (after in-stock products) or hide. Default show.
17948
+ * @example show
17949
+ * @enum {string}
17950
+ */
17951
+ outOfStockVisibility?: 'show' | 'show_last' | 'hide';
17952
+ /**
17953
+ * @description Recipient of the low stock alert email. Tenant and store settings only. Null or absent inherits: store, then tenant, then the tenant contactEmail.
17954
+ * @example ops@example.com
17955
+ */
17956
+ lowStockAlertEmail?: string | null;
17957
+ };
17899
17958
  CreateTenantConfigurationDto: {
17900
17959
  /**
17901
17960
  * @description Commerce settings (order management, checkout, etc.)
@@ -17909,18 +17968,8 @@ export interface components {
17909
17968
  commerceSettings?: {
17910
17969
  [key: string]: unknown;
17911
17970
  };
17912
- /**
17913
- * @description Inventory settings (stock tracking, reservations, etc.)
17914
- * @example {
17915
- * "trackInventory": false,
17916
- * "allowBackorders": false,
17917
- * "lowStockThreshold": 10,
17918
- * "reservationDurationMinutes": 15
17919
- * }
17920
- */
17921
- inventorySettings?: {
17922
- [key: string]: unknown;
17923
- };
17971
+ /** @description Inventory settings, flat. Fields left out inherit the tenant value, then the default. Any other key is refused with 400. */
17972
+ inventorySettings?: components['schemas']['InventorySettingsDto'];
17924
17973
  /**
17925
17974
  * @description Shipping settings (carriers, rates, zones, etc.)
17926
17975
  * @example {
@@ -17977,10 +18026,8 @@ export interface components {
17977
18026
  commerceSettings?: {
17978
18027
  [key: string]: unknown;
17979
18028
  };
17980
- /** @description Inventory settings (stock tracking, reservations, etc.) */
17981
- inventorySettings?: {
17982
- [key: string]: unknown;
17983
- };
18029
+ /** @description Inventory settings, flat. Fields left out inherit the tenant value, then the default. Any other key is refused with 400. */
18030
+ inventorySettings?: components['schemas']['InventorySettingsDto'];
17984
18031
  /** @description Shipping settings (carriers, rates, zones, etc.) */
17985
18032
  shippingSettings?: {
17986
18033
  [key: string]: unknown;
@@ -18452,6 +18499,28 @@ export interface components {
18452
18499
  */
18453
18500
  remove?: string[];
18454
18501
  };
18502
+ StorefrontInventorySettingsDto: {
18503
+ /**
18504
+ * @description Stock count display: never, when_low (at or below lowStockThreshold) or always
18505
+ * @example when_low
18506
+ * @enum {string}
18507
+ */
18508
+ stockDisplay: 'never' | 'when_low' | 'always';
18509
+ /**
18510
+ * @description Store low stock threshold (store, then tenant, then 10). Stock rows may set their own; variant summaries already reflect it in their low_stock status.
18511
+ * @example 10
18512
+ */
18513
+ lowStockThreshold: number;
18514
+ /**
18515
+ * @description Out-of-stock products: show, show_last (search with inStockFirst=true) or hide (search with inStock=true)
18516
+ * @example show
18517
+ * @enum {string}
18518
+ */
18519
+ outOfStockVisibility: 'show' | 'show_last' | 'hide';
18520
+ };
18521
+ StorefrontSettingsResponseDto: {
18522
+ inventory: components['schemas']['StorefrontInventorySettingsDto'];
18523
+ };
18455
18524
  StoreConfigurationResponseDto: {
18456
18525
  /**
18457
18526
  * @description Configuration ID
@@ -18537,6 +18606,13 @@ export interface components {
18537
18606
  inventorySettings: {
18538
18607
  [key: string]: unknown;
18539
18608
  };
18609
+ /** @description Effective low stock alert recipient: store inventorySettings.lowStockAlertEmail, then tenant inventorySettings.lowStockAlertEmail, then the tenant contactEmail. source says which one applied. Null when none is set. */
18610
+ lowStockAlertEmail: {
18611
+ /** @example ops@example.com */
18612
+ email?: string;
18613
+ /** @enum {string} */
18614
+ source?: 'store' | 'tenant' | 'contactEmail';
18615
+ } | null;
18540
18616
  /** @description Merged shipping settings (store → tenant → defaults) */
18541
18617
  shippingSettings: {
18542
18618
  [key: string]: unknown;
@@ -18593,17 +18669,8 @@ export interface components {
18593
18669
  commerceSettings?: {
18594
18670
  [key: string]: unknown;
18595
18671
  };
18596
- /**
18597
- * @description Inventory settings (stock management, reservations)
18598
- * @example {
18599
- * "trackInventory": false,
18600
- * "allowBackorders": false,
18601
- * "lowStockThreshold": 10
18602
- * }
18603
- */
18604
- inventorySettings?: {
18605
- [key: string]: unknown;
18606
- };
18672
+ /** @description Inventory settings, flat. Fields left out inherit the tenant value, then the default. Any other key is refused with 400. */
18673
+ inventorySettings?: components['schemas']['InventorySettingsDto'];
18607
18674
  /**
18608
18675
  * @description Shipping settings (rates, zones, providers)
18609
18676
  * @example {
@@ -18693,10 +18760,8 @@ export interface components {
18693
18760
  commerceSettings?: {
18694
18761
  [key: string]: unknown;
18695
18762
  };
18696
- /** @description Inventory settings (stock management, reservations) */
18697
- inventorySettings?: {
18698
- [key: string]: unknown;
18699
- };
18763
+ /** @description Inventory settings, flat. Fields left out inherit the tenant value, then the default. Any other key is refused with 400. */
18764
+ inventorySettings?: components['schemas']['InventorySettingsDto'];
18700
18765
  /** @description Shipping settings (rates, zones, providers) */
18701
18766
  shippingSettings?: {
18702
18767
  [key: string]: unknown;
@@ -26061,10 +26126,10 @@ export interface components {
26061
26126
  sessionId?: string;
26062
26127
  /**
26063
26128
  * Format: date-time
26064
- * @description Reservation expiration date
26129
+ * @description Reservation expiration date. Null for order stock commitments (status confirmed with orderId), which never expire.
26065
26130
  * @example 2023-12-31T23:59:59Z
26066
26131
  */
26067
- expiresAt: string;
26132
+ expiresAt: string | null;
26068
26133
  /**
26069
26134
  * Format: date-time
26070
26135
  * @description Confirmation date (when converted to order)
@@ -26161,8 +26226,7 @@ export interface components {
26161
26226
  */
26162
26227
  status?: 'inStock' | 'lowStock' | 'outOfStock' | 'backorder';
26163
26228
  /**
26164
- * @description Threshold for low stock alerts
26165
- * @default 10
26229
+ * @description Row low stock threshold. Omit to use the store (then tenant) inventorySettings.lowStockThreshold, default 10.
26166
26230
  * @example 10
26167
26231
  */
26168
26232
  lowStockThreshold?: number;
@@ -26253,10 +26317,10 @@ export interface components {
26253
26317
  */
26254
26318
  status: 'inStock' | 'lowStock' | 'outOfStock' | 'backorder';
26255
26319
  /**
26256
- * @description Threshold for low stock alerts
26320
+ * @description Row low stock threshold. Null: the row uses the store (then tenant) inventorySettings.lowStockThreshold, default 10.
26257
26321
  * @example 10
26258
26322
  */
26259
- lowStockThreshold: number;
26323
+ lowStockThreshold: number | null;
26260
26324
  /**
26261
26325
  * Format: date-time
26262
26326
  * @description Last synchronization with ERP system
@@ -26322,10 +26386,10 @@ export interface components {
26322
26386
  */
26323
26387
  status?: 'inStock' | 'lowStock' | 'outOfStock' | 'backorder';
26324
26388
  /**
26325
- * @description Threshold for low stock alerts
26389
+ * @description Row low stock threshold. null resets the row to the store (then tenant) inventorySettings.lowStockThreshold.
26326
26390
  * @example 10
26327
26391
  */
26328
- lowStockThreshold?: number;
26392
+ lowStockThreshold?: number | null;
26329
26393
  /**
26330
26394
  * @description Last count from ERP system
26331
26395
  * @example 95
@@ -38935,6 +38999,8 @@ export interface operations {
38935
38999
  maxPrice?: number;
38936
39000
  /** @description true returns products with at least one variant that is not out of stock (same resolution as include=inventory); false returns the rest. */
38937
39001
  inStock?: boolean;
39002
+ /** @description true lists products that are in stock (as for inStock=true) before the rest, each group in the requested order. For the out-of-stock "show_last" storefront setting. */
39003
+ inStockFirst?: boolean;
38938
39004
  /** @description Category ids, comma-separated. Matches any of them. */
38939
39005
  categories?: string;
38940
39006
  /** @description Filter by sale status. true returns products with at least one variant whose current price has compareAtAmount > amount; false returns the rest. */
@@ -43591,6 +43657,35 @@ export interface operations {
43591
43657
  };
43592
43658
  };
43593
43659
  };
43660
+ StoreConfigurationController_getStorefrontSettings: {
43661
+ parameters: {
43662
+ query?: never;
43663
+ header?: never;
43664
+ path: {
43665
+ /** @description Store ID */
43666
+ storeId: string;
43667
+ };
43668
+ cookie?: never;
43669
+ };
43670
+ requestBody?: never;
43671
+ responses: {
43672
+ 200: {
43673
+ headers: {
43674
+ [name: string]: unknown;
43675
+ };
43676
+ content: {
43677
+ 'application/json': components['schemas']['StorefrontSettingsResponseDto'];
43678
+ };
43679
+ };
43680
+ /** @description Store not found */
43681
+ 404: {
43682
+ headers: {
43683
+ [name: string]: unknown;
43684
+ };
43685
+ content?: never;
43686
+ };
43687
+ };
43688
+ };
43594
43689
  StoreConfigurationController_getConfiguration: {
43595
43690
  parameters: {
43596
43691
  query?: never;