@aimee.shop/sdk 0.24.0 → 0.25.1

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.
@@ -6537,93 +6537,6 @@ export interface paths {
6537
6537
  patch?: never;
6538
6538
  trace?: never;
6539
6539
  };
6540
- '/v1/promotion/promote': {
6541
- parameters: {
6542
- query?: never;
6543
- header?: never;
6544
- path?: never;
6545
- cookie?: never;
6546
- };
6547
- get?: never;
6548
- put?: never;
6549
- /**
6550
- * Promote resources from sandbox to production
6551
- * @description Promotes specified resources from a sandbox tenant to its linked production tenant.
6552
- *
6553
- * **Supported Resource Types:**
6554
- * - product: Products with variants and relationships
6555
- * - (Future: category, discount, etc.)
6556
- *
6557
- * **Operation Modes:**
6558
- * - CREATE: Creates new resources in production
6559
- * - UPDATE: Updates existing resources (matched by slug/code)
6560
- *
6561
- * **Dependency Handling:**
6562
- * - Variants: Reconciled by SKU (update existing, create new)
6563
- * - Assets: (Future) Copied to production S3 bucket
6564
- * - Categories: (Future) Connected to existing by slug
6565
- *
6566
- * **Transaction Safety:**
6567
- * All operations are atomic - if any step fails, the entire promotion rolls back.
6568
- *
6569
- * Tenant and actor come from auth context (x-tenant-id / JWT), not the body.
6570
- */
6571
- post: operations['PromotionController_promoteResources'];
6572
- delete?: never;
6573
- options?: never;
6574
- head?: never;
6575
- patch?: never;
6576
- trace?: never;
6577
- };
6578
- '/v1/promotion/supported-types': {
6579
- parameters: {
6580
- query?: never;
6581
- header?: never;
6582
- path?: never;
6583
- cookie?: never;
6584
- };
6585
- /**
6586
- * Get list of supported resource types for promotion
6587
- * @description Returns all resource types that have registered promotion handlers.
6588
- *
6589
- * **Example Response:**
6590
- * ```json
6591
- * ["product", "category", "discount"]
6592
- * ```
6593
- */
6594
- get: operations['PromotionController_getSupportedResourceTypes'];
6595
- put?: never;
6596
- post?: never;
6597
- delete?: never;
6598
- options?: never;
6599
- head?: never;
6600
- patch?: never;
6601
- trace?: never;
6602
- };
6603
- '/v1/promotion/supported-types/{type}': {
6604
- parameters: {
6605
- query?: never;
6606
- header?: never;
6607
- path?: never;
6608
- cookie?: never;
6609
- };
6610
- /**
6611
- * Check if specific resource type is supported for promotion
6612
- * @description Checks whether a specific resource type has a registered promotion handler.
6613
- *
6614
- * **Example Usage:**
6615
- * - `GET /promotion/supported-types/product` → `true`
6616
- * - `GET /promotion/supported-types/unknown` → `false`
6617
- */
6618
- get: operations['PromotionController_isResourceTypeSupported'];
6619
- put?: never;
6620
- post?: never;
6621
- delete?: never;
6622
- options?: never;
6623
- head?: never;
6624
- patch?: never;
6625
- trace?: never;
6626
- };
6627
6540
  '/v1/signup': {
6628
6541
  parameters: {
6629
6542
  query?: never;
@@ -11589,8 +11502,8 @@ export interface paths {
11589
11502
  options?: never;
11590
11503
  head?: never;
11591
11504
  /**
11592
- * Bulk publish or unpublish entries
11593
- * @description Publishes or unpublishes 1-100 entries in the current store through the single-entry publish path. Each id reports its own result: one that fails (missing, invalid state, publish validation) does not stop the rest.
11505
+ * Bulk publish, unpublish or apply held updates on entries
11506
+ * @description Publishes, unpublishes or applies the held update of 1-100 entries in the current store through the single-entry paths. apply-latest-version applies a held copied update; it reverts to that version, so an undo version is written. Each id reports its own result: one that fails (missing, invalid state, publish validation, no held update) does not stop the rest.
11594
11507
  */
11595
11508
  patch: operations['CmsController_bulkUpdateEntryStatus'];
11596
11509
  trace?: never;
@@ -26753,137 +26666,6 @@ export interface components {
26753
26666
  [key: string]: unknown;
26754
26667
  };
26755
26668
  };
26756
- PromotionRequestDto: {
26757
- /**
26758
- * @description Resource type to promote
26759
- * @example product
26760
- * @enum {string}
26761
- */
26762
- resourceType: 'product' | 'category' | 'price_list' | 'discount' | 'cms_page';
26763
- /**
26764
- * @description Array of resource IDs to promote
26765
- * @example [
26766
- * "123e4567-e89b-12d3-a456-426614174001"
26767
- * ]
26768
- */
26769
- resourceIds: string[];
26770
- /**
26771
- * @description Optional array of dependency types to include (e.g., ["variant", "asset"])
26772
- * @example [
26773
- * "variant",
26774
- * "asset"
26775
- * ]
26776
- */
26777
- includeDependencies?: string[];
26778
- };
26779
- PromotedResourceDto: {
26780
- /**
26781
- * @description Original resource ID in sandbox environment
26782
- * @example 123e4567-e89b-12d3-a456-426614174001
26783
- */
26784
- sandboxId: string;
26785
- /**
26786
- * @description New resource ID in production environment
26787
- * @example 987e6543-e21b-98d7-a654-426614174999
26788
- */
26789
- productionId: string;
26790
- /**
26791
- * @description Resource type
26792
- * @example product
26793
- */
26794
- type: string;
26795
- };
26796
- DependentResourceDto: {
26797
- /**
26798
- * @description Resource ID
26799
- * @example 123e4567-e89b-12d3-a456-426614174005
26800
- */
26801
- id: string;
26802
- /**
26803
- * @description Resource name or identifier
26804
- * @example Product Variant: Red/Large
26805
- */
26806
- name: string;
26807
- /**
26808
- * @description Resource type
26809
- * @example variant
26810
- */
26811
- type: string;
26812
- };
26813
- DependencyAnalysisDto: {
26814
- /**
26815
- * @description Dependency type identifier
26816
- * @example variant
26817
- */
26818
- type: string;
26819
- /**
26820
- * @description Human-readable dependency label
26821
- * @example Product Variants
26822
- */
26823
- label: string;
26824
- /**
26825
- * @description Number of dependent resources found
26826
- * @example 3
26827
- */
26828
- count: number;
26829
- /** @description Array of dependent resources */
26830
- resources: components['schemas']['DependentResourceDto'][];
26831
- /**
26832
- * @description Whether this dependency is required
26833
- * @example true
26834
- */
26835
- required: boolean;
26836
- /**
26837
- * @description Explanation of the dependency relationship
26838
- * @example Product variants define the available options (size, color) for this product
26839
- */
26840
- explanation: string;
26841
- };
26842
- PromotionResultDto: {
26843
- /**
26844
- * @description Promotion operation status
26845
- * @example success
26846
- * @enum {string}
26847
- */
26848
- status: 'success' | 'pending_confirmation' | 'failed';
26849
- /**
26850
- * @description Production tenant ID (for successful promotions)
26851
- * @example 123e4567-e89b-12d3-a456-426614174003
26852
- */
26853
- productionTenantId?: string;
26854
- /** @description Array of promoted resources with ID mappings */
26855
- promotedResources?: components['schemas']['PromotedResourceDto'][];
26856
- /** @description Dependencies requiring user confirmation (when status=pending_confirmation) */
26857
- dependencies?: components['schemas']['DependencyAnalysisDto'][];
26858
- /**
26859
- * @description Human-readable message describing the result
26860
- * @example Successfully promoted 5 products to production
26861
- */
26862
- message?: string;
26863
- /**
26864
- * @description Operation duration in milliseconds
26865
- * @example 1523
26866
- */
26867
- duration?: number;
26868
- /**
26869
- * @description Audit trail ID for this promotion
26870
- * @example 123e4567-e89b-12d3-a456-426614174004
26871
- */
26872
- auditId?: string;
26873
- /**
26874
- * @description OpenTelemetry trace ID
26875
- * @example 1234567890abcdef
26876
- */
26877
- traceId?: string;
26878
- /**
26879
- * @description Dependency types that were included
26880
- * @example [
26881
- * "variant",
26882
- * "asset"
26883
- * ]
26884
- */
26885
- dependenciesIncluded?: string[];
26886
- };
26887
26669
  StartSignupDto: {
26888
26670
  /** @example owner@acme.com */
26889
26671
  email: string;
@@ -35510,7 +35292,7 @@ export interface components {
35510
35292
  id: string;
35511
35293
  tenantId: string;
35512
35294
  storeId: string | null;
35513
- /** @description First 12 chars for fast lookup (sk_live_abc123) */
35295
+ /** @description Key prefix plus first 4 random chars, for fast lookup (sk_live_abc1) */
35514
35296
  keyIdentifier: string;
35515
35297
  /** @description Last 4 chars for display */
35516
35298
  lastFour: string;
@@ -35550,7 +35332,7 @@ export interface components {
35550
35332
  id: string;
35551
35333
  tenantId: string;
35552
35334
  storeId: string | null;
35553
- /** @description First 12 chars for fast lookup (sk_live_abc123) */
35335
+ /** @description Key prefix plus first 4 random chars, for fast lookup (sk_live_abc1) */
35554
35336
  keyIdentifier: string;
35555
35337
  /** @description Last 4 chars for display */
35556
35338
  lastFour: string;
@@ -35656,7 +35438,7 @@ export interface components {
35656
35438
  id: string;
35657
35439
  tenantId: string;
35658
35440
  storeId: string | null;
35659
- /** @description First 12 chars for fast lookup (sk_live_abc123) */
35441
+ /** @description Key prefix plus first 4 random chars, for fast lookup (sk_live_abc1) */
35660
35442
  keyIdentifier: string;
35661
35443
  /** @description Last 4 chars for display */
35662
35444
  lastFour: string;
@@ -36029,6 +35811,8 @@ export interface components {
36029
35811
  /** @enum {string} */
36030
35812
  status: 'draft' | 'in_review' | 'published' | 'scheduled' | 'archived';
36031
35813
  currentVersionNumber: number;
35814
+ /** @description True when the version at currentVersionNumber is a copied update held unapplied. The entry and its blocks still hold the old content. Returned on entry list and detail for admin callers. */
35815
+ hasHeldUpdate?: boolean;
36032
35816
  /** Format: date-time */
36033
35817
  publishedAt?: string | null;
36034
35818
  /** Format: date-time */
@@ -36216,13 +36000,13 @@ export interface components {
36216
36000
  feedback?: string;
36217
36001
  };
36218
36002
  BulkUpdateEntryStatusDto: {
36219
- /** @description Entry IDs to publish or unpublish */
36003
+ /** @description Entry IDs to publish, unpublish or apply */
36220
36004
  entryIds: string[];
36221
36005
  /**
36222
- * @description publish sends entries live; unpublish returns them to draft
36006
+ * @description publish sends entries live; unpublish returns them to draft; apply-latest-version applies a held copied update
36223
36007
  * @enum {string}
36224
36008
  */
36225
- action: 'publish' | 'unpublish';
36009
+ action: 'publish' | 'unpublish' | 'apply-latest-version';
36226
36010
  };
36227
36011
  BulkEntryStatusResultItemDto: {
36228
36012
  /** @description Entry ID */
@@ -36231,7 +36015,7 @@ export interface components {
36231
36015
  success: boolean;
36232
36016
  /** @description Entry status after the call; unchanged when it failed */
36233
36017
  status?: string;
36234
- /** @description Why the transition failed, for example a missing entry or a publish validation error */
36018
+ /** @description Why the transition failed, for example a missing entry, a publish validation error or no held update */
36235
36019
  error?: string;
36236
36020
  };
36237
36021
  BulkEntryStatusResultDto: {
@@ -53638,94 +53422,6 @@ export interface operations {
53638
53422
  };
53639
53423
  };
53640
53424
  };
53641
- PromotionController_promoteResources: {
53642
- parameters: {
53643
- query?: never;
53644
- header?: never;
53645
- path?: never;
53646
- cookie?: never;
53647
- };
53648
- requestBody: {
53649
- content: {
53650
- 'application/json': components['schemas']['PromotionRequestDto'];
53651
- };
53652
- };
53653
- responses: {
53654
- /** @description Resources promoted successfully */
53655
- 201: {
53656
- headers: {
53657
- [name: string]: unknown;
53658
- };
53659
- content: {
53660
- 'application/json': components['schemas']['PromotionResultDto'];
53661
- };
53662
- };
53663
- /** @description Invalid request (unsupported resource type, validation errors) */
53664
- 400: {
53665
- headers: {
53666
- [name: string]: unknown;
53667
- };
53668
- content?: never;
53669
- };
53670
- /** @description Resources not found (sandbox tenant, production tenant, or resources) */
53671
- 404: {
53672
- headers: {
53673
- [name: string]: unknown;
53674
- };
53675
- content?: never;
53676
- };
53677
- /** @description Promotion operation failed */
53678
- 500: {
53679
- headers: {
53680
- [name: string]: unknown;
53681
- };
53682
- content?: never;
53683
- };
53684
- };
53685
- };
53686
- PromotionController_getSupportedResourceTypes: {
53687
- parameters: {
53688
- query?: never;
53689
- header?: never;
53690
- path?: never;
53691
- cookie?: never;
53692
- };
53693
- requestBody?: never;
53694
- responses: {
53695
- /** @description List of supported resource types */
53696
- 200: {
53697
- headers: {
53698
- [name: string]: unknown;
53699
- };
53700
- content: {
53701
- 'application/json': string[];
53702
- };
53703
- };
53704
- };
53705
- };
53706
- PromotionController_isResourceTypeSupported: {
53707
- parameters: {
53708
- query?: never;
53709
- header?: never;
53710
- path: {
53711
- /** @description Resource type to check (e.g., product, category) */
53712
- type: string;
53713
- };
53714
- cookie?: never;
53715
- };
53716
- requestBody?: never;
53717
- responses: {
53718
- /** @description Whether resource type is supported */
53719
- 200: {
53720
- headers: {
53721
- [name: string]: unknown;
53722
- };
53723
- content: {
53724
- 'application/json': boolean;
53725
- };
53726
- };
53727
- };
53728
- };
53729
53425
  SignupController_start: {
53730
53426
  parameters: {
53731
53427
  query?: never;