@epcc-sdk/sdks-shopper 0.6.0 → 0.6.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.
@@ -4515,7 +4515,7 @@ type CustomerCheckout = {
4515
4515
  * An optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
4516
4516
  */
4517
4517
  external_ref?: string;
4518
- customer?: {
4518
+ customer: {
4519
4519
  /**
4520
4520
  * The ID of the customer.
4521
4521
  */
@@ -4556,7 +4556,7 @@ type AccountCheckout = {
4556
4556
  */
4557
4557
  member_id?: string;
4558
4558
  };
4559
- contact?: {
4559
+ contact: {
4560
4560
  /**
4561
4561
  * The name of the account member.
4562
4562
  */
@@ -5339,6 +5339,8 @@ type CartsResponse = {
5339
5339
  tax?: FormattedPriceData;
5340
5340
  discount?: FormattedPriceData;
5341
5341
  without_discount?: FormattedPriceData;
5342
+ shipping?: FormattedPriceData;
5343
+ shipping_discount?: FormattedPriceData;
5342
5344
  discounts?: {
5343
5345
  [key: string]: {
5344
5346
  amount?: number;
@@ -5354,12 +5356,33 @@ type CartsResponse = {
5354
5356
  * Cart Items Response
5355
5357
  */
5356
5358
  type CartItemsResponse = {
5357
- data?: Array<CartItemObject | CustomItemObject | SubscriptionItemObject | PromotionItemObject>;
5359
+ data?: Array<CartItemObject | CustomItemCartObject | SubscriptionItemCartObject | PromotionItemCartObject>;
5358
5360
  };
5359
5361
  /**
5360
5362
  * Cart Item Object
5361
5363
  */
5362
5364
  type CartItemObject = CartItemObjectData & CartItemResponse;
5365
+ /**
5366
+ * Custom Item Cart Object
5367
+ */
5368
+ type CustomItemCartObject = CartItemResponse & {
5369
+ type: "custom_item";
5370
+ quantity: number;
5371
+ };
5372
+ /**
5373
+ * Subscription Item Cart Object
5374
+ */
5375
+ type SubscriptionItemCartObject = CartItemResponse & {
5376
+ type: "subscription_item";
5377
+ quantity: number;
5378
+ };
5379
+ /**
5380
+ * Promotion Item Cart Object
5381
+ */
5382
+ type PromotionItemCartObject = CartItemResponse & {
5383
+ type: "promotion_item";
5384
+ quantity: number;
5385
+ };
5363
5386
  /**
5364
5387
  * Data.StripeConnectPayment
5365
5388
  */
@@ -5409,28 +5432,6 @@ type CartIncludedPromotion = {
5409
5432
  */
5410
5433
  end: string;
5411
5434
  };
5412
- /**
5413
- * Subscription Item Cart Object
5414
- */
5415
- type SubscriptionItemCartObject = SubscriptionItemObjectData & CartItemResponse;
5416
- /**
5417
- * Promotion Item Cart Object
5418
- */
5419
- type PromotionItemCartObject = PromotionItemObjectData & CartItemResponse & {
5420
- /**
5421
- * The unique identifier of the promotion item.
5422
- */
5423
- id?: string;
5424
- };
5425
- /**
5426
- * Custom Item Cart Object
5427
- */
5428
- type CustomItemCartObject = CustomItemObjectData & CartItemResponse & {
5429
- /**
5430
- * The unique identifier of the custom item.
5431
- */
5432
- id?: string;
5433
- };
5434
5435
  /**
5435
5436
  * Included is an array of resources that are included in the response.
5436
5437
  */
@@ -11422,6 +11423,8 @@ type CartsResponseWritable = {
11422
11423
  tax?: FormattedPriceData;
11423
11424
  discount?: FormattedPriceData;
11424
11425
  without_discount?: FormattedPriceData;
11426
+ shipping?: FormattedPriceData;
11427
+ shipping_discount?: FormattedPriceData;
11425
11428
  discounts?: {
11426
11429
  [key: string]: {
11427
11430
  amount?: number;
@@ -11437,33 +11440,32 @@ type CartsResponseWritable = {
11437
11440
  * Cart Items Response
11438
11441
  */
11439
11442
  type CartItemsResponseWritable = {
11440
- data?: Array<CartItemObjectWritable | CustomItemObject | SubscriptionItemObjectWritable | PromotionItemObject>;
11443
+ data?: Array<CartItemObjectWritable | CustomItemCartObjectWritable | SubscriptionItemCartObjectWritable | PromotionItemCartObjectWritable>;
11441
11444
  };
11442
11445
  /**
11443
11446
  * Cart Item Object
11444
11447
  */
11445
11448
  type CartItemObjectWritable = CartItemObjectData & CartItemResponseWritable;
11446
11449
  /**
11447
- * Subscription Item Cart Object
11450
+ * Custom Item Cart Object
11448
11451
  */
11449
- type SubscriptionItemCartObjectWritable = SubscriptionItemObjectData & CartItemResponseWritable;
11452
+ type CustomItemCartObjectWritable = CartItemResponseWritable & {
11453
+ type: "custom_item";
11454
+ quantity: number;
11455
+ };
11450
11456
  /**
11451
- * Promotion Item Cart Object
11457
+ * Subscription Item Cart Object
11452
11458
  */
11453
- type PromotionItemCartObjectWritable = PromotionItemObjectData & CartItemResponseWritable & {
11454
- /**
11455
- * The unique identifier of the promotion item.
11456
- */
11457
- id?: string;
11459
+ type SubscriptionItemCartObjectWritable = CartItemResponseWritable & {
11460
+ type: "subscription_item";
11461
+ quantity: number;
11458
11462
  };
11459
11463
  /**
11460
- * Custom Item Cart Object
11464
+ * Promotion Item Cart Object
11461
11465
  */
11462
- type CustomItemCartObjectWritable = CustomItemObjectData & CartItemResponseWritable & {
11463
- /**
11464
- * The unique identifier of the custom item.
11465
- */
11466
- id?: string;
11466
+ type PromotionItemCartObjectWritable = CartItemResponseWritable & {
11467
+ type: "promotion_item";
11468
+ quantity: number;
11467
11469
  };
11468
11470
  /**
11469
11471
  * Included is an array of resources that are included in the response.
@@ -4515,7 +4515,7 @@ type CustomerCheckout = {
4515
4515
  * An optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and is not required to be unique. The maximum allowed length is 64 characters. It can be used to include an external reference from a separate company system.
4516
4516
  */
4517
4517
  external_ref?: string;
4518
- customer?: {
4518
+ customer: {
4519
4519
  /**
4520
4520
  * The ID of the customer.
4521
4521
  */
@@ -4556,7 +4556,7 @@ type AccountCheckout = {
4556
4556
  */
4557
4557
  member_id?: string;
4558
4558
  };
4559
- contact?: {
4559
+ contact: {
4560
4560
  /**
4561
4561
  * The name of the account member.
4562
4562
  */
@@ -5339,6 +5339,8 @@ type CartsResponse = {
5339
5339
  tax?: FormattedPriceData;
5340
5340
  discount?: FormattedPriceData;
5341
5341
  without_discount?: FormattedPriceData;
5342
+ shipping?: FormattedPriceData;
5343
+ shipping_discount?: FormattedPriceData;
5342
5344
  discounts?: {
5343
5345
  [key: string]: {
5344
5346
  amount?: number;
@@ -5354,12 +5356,33 @@ type CartsResponse = {
5354
5356
  * Cart Items Response
5355
5357
  */
5356
5358
  type CartItemsResponse = {
5357
- data?: Array<CartItemObject | CustomItemObject | SubscriptionItemObject | PromotionItemObject>;
5359
+ data?: Array<CartItemObject | CustomItemCartObject | SubscriptionItemCartObject | PromotionItemCartObject>;
5358
5360
  };
5359
5361
  /**
5360
5362
  * Cart Item Object
5361
5363
  */
5362
5364
  type CartItemObject = CartItemObjectData & CartItemResponse;
5365
+ /**
5366
+ * Custom Item Cart Object
5367
+ */
5368
+ type CustomItemCartObject = CartItemResponse & {
5369
+ type: "custom_item";
5370
+ quantity: number;
5371
+ };
5372
+ /**
5373
+ * Subscription Item Cart Object
5374
+ */
5375
+ type SubscriptionItemCartObject = CartItemResponse & {
5376
+ type: "subscription_item";
5377
+ quantity: number;
5378
+ };
5379
+ /**
5380
+ * Promotion Item Cart Object
5381
+ */
5382
+ type PromotionItemCartObject = CartItemResponse & {
5383
+ type: "promotion_item";
5384
+ quantity: number;
5385
+ };
5363
5386
  /**
5364
5387
  * Data.StripeConnectPayment
5365
5388
  */
@@ -5409,28 +5432,6 @@ type CartIncludedPromotion = {
5409
5432
  */
5410
5433
  end: string;
5411
5434
  };
5412
- /**
5413
- * Subscription Item Cart Object
5414
- */
5415
- type SubscriptionItemCartObject = SubscriptionItemObjectData & CartItemResponse;
5416
- /**
5417
- * Promotion Item Cart Object
5418
- */
5419
- type PromotionItemCartObject = PromotionItemObjectData & CartItemResponse & {
5420
- /**
5421
- * The unique identifier of the promotion item.
5422
- */
5423
- id?: string;
5424
- };
5425
- /**
5426
- * Custom Item Cart Object
5427
- */
5428
- type CustomItemCartObject = CustomItemObjectData & CartItemResponse & {
5429
- /**
5430
- * The unique identifier of the custom item.
5431
- */
5432
- id?: string;
5433
- };
5434
5435
  /**
5435
5436
  * Included is an array of resources that are included in the response.
5436
5437
  */
@@ -11422,6 +11423,8 @@ type CartsResponseWritable = {
11422
11423
  tax?: FormattedPriceData;
11423
11424
  discount?: FormattedPriceData;
11424
11425
  without_discount?: FormattedPriceData;
11426
+ shipping?: FormattedPriceData;
11427
+ shipping_discount?: FormattedPriceData;
11425
11428
  discounts?: {
11426
11429
  [key: string]: {
11427
11430
  amount?: number;
@@ -11437,33 +11440,32 @@ type CartsResponseWritable = {
11437
11440
  * Cart Items Response
11438
11441
  */
11439
11442
  type CartItemsResponseWritable = {
11440
- data?: Array<CartItemObjectWritable | CustomItemObject | SubscriptionItemObjectWritable | PromotionItemObject>;
11443
+ data?: Array<CartItemObjectWritable | CustomItemCartObjectWritable | SubscriptionItemCartObjectWritable | PromotionItemCartObjectWritable>;
11441
11444
  };
11442
11445
  /**
11443
11446
  * Cart Item Object
11444
11447
  */
11445
11448
  type CartItemObjectWritable = CartItemObjectData & CartItemResponseWritable;
11446
11449
  /**
11447
- * Subscription Item Cart Object
11450
+ * Custom Item Cart Object
11448
11451
  */
11449
- type SubscriptionItemCartObjectWritable = SubscriptionItemObjectData & CartItemResponseWritable;
11452
+ type CustomItemCartObjectWritable = CartItemResponseWritable & {
11453
+ type: "custom_item";
11454
+ quantity: number;
11455
+ };
11450
11456
  /**
11451
- * Promotion Item Cart Object
11457
+ * Subscription Item Cart Object
11452
11458
  */
11453
- type PromotionItemCartObjectWritable = PromotionItemObjectData & CartItemResponseWritable & {
11454
- /**
11455
- * The unique identifier of the promotion item.
11456
- */
11457
- id?: string;
11459
+ type SubscriptionItemCartObjectWritable = CartItemResponseWritable & {
11460
+ type: "subscription_item";
11461
+ quantity: number;
11458
11462
  };
11459
11463
  /**
11460
- * Custom Item Cart Object
11464
+ * Promotion Item Cart Object
11461
11465
  */
11462
- type CustomItemCartObjectWritable = CustomItemObjectData & CartItemResponseWritable & {
11463
- /**
11464
- * The unique identifier of the custom item.
11465
- */
11466
- id?: string;
11466
+ type PromotionItemCartObjectWritable = CartItemResponseWritable & {
11467
+ type: "promotion_item";
11468
+ quantity: number;
11467
11469
  };
11468
11470
  /**
11469
11471
  * Included is an array of resources that are included in the response.
@@ -2765,7 +2765,7 @@ const zCustomerCheckout = import_zod.z.object({
2765
2765
  id: import_zod.z.string().optional(),
2766
2766
  email: import_zod.z.string().optional(),
2767
2767
  name: import_zod.z.string().optional()
2768
- }).optional(),
2768
+ }),
2769
2769
  billing_address: zBillingAddress.optional(),
2770
2770
  shipping_address: zShippingAddress.optional()
2771
2771
  }).optional()
@@ -2781,7 +2781,7 @@ const zAccountCheckout = import_zod.z.object({
2781
2781
  contact: import_zod.z.object({
2782
2782
  name: import_zod.z.string().optional(),
2783
2783
  email: import_zod.z.string().email().optional()
2784
- }).optional(),
2784
+ }),
2785
2785
  billing_address: zBillingAddress.optional(),
2786
2786
  shipping_address: zShippingAddress.optional()
2787
2787
  }).optional()
@@ -3228,7 +3228,7 @@ const zOrderItemResponse = import_zod.z.object({
3228
3228
  type: import_zod.z.string().optional(),
3229
3229
  id: import_zod.z.string().uuid().readonly().optional(),
3230
3230
  quantity: import_zod.z.number().optional(),
3231
- product_id: import_zod.z.string().uuid().readonly().optional(),
3231
+ product_id: import_zod.z.string().readonly().optional(),
3232
3232
  subscription_offering_id: import_zod.z.string().uuid().readonly().optional(),
3233
3233
  name: import_zod.z.string().optional(),
3234
3234
  sku: import_zod.z.string().optional(),
@@ -3388,43 +3388,22 @@ const zTransactionListResponse = import_zod.z.object({
3388
3388
  data: import_zod.z.array(zTransactionResponse)
3389
3389
  });
3390
3390
  const zCartItemObject = zCartItemObjectData.and(zCartItemResponse);
3391
- const zCartItemsResponse = import_zod.z.object({
3392
- data: import_zod.z.array(
3393
- import_zod.z.union([
3394
- zCartItemObject,
3395
- zCustomItemObject,
3396
- zSubscriptionItemObject,
3397
- zPromotionItemObject
3398
- ])
3399
- ).optional()
3400
- });
3401
- const zDataStripeConnectPayment = zDataBasePayments.and(
3391
+ const zCustomItemCartObject = zCartItemResponse.and(
3402
3392
  import_zod.z.object({
3403
- gateway: import_zod.z.enum(["stripe_connect"]),
3404
- options: import_zod.z.object({
3405
- receipt_email: import_zod.z.string().optional()
3406
- }).optional(),
3407
- payment: import_zod.z.string().optional()
3393
+ type: import_zod.z.literal("custom_item"),
3394
+ quantity: import_zod.z.number().int()
3408
3395
  })
3409
3396
  );
3410
- const zCartIncludedPromotion = import_zod.z.object({
3411
- id: import_zod.z.string().uuid(),
3412
- name: import_zod.z.string(),
3413
- description: import_zod.z.string().optional(),
3414
- automatic: import_zod.z.boolean(),
3415
- promotion_source: import_zod.z.string(),
3416
- start: import_zod.z.string().datetime(),
3417
- end: import_zod.z.string().datetime()
3418
- });
3419
- const zSubscriptionItemCartObject = zSubscriptionItemObjectData.and(zCartItemResponse);
3420
- const zPromotionItemCartObject = zPromotionItemObjectData.and(zCartItemResponse).and(
3397
+ const zSubscriptionItemCartObject = zCartItemResponse.and(
3421
3398
  import_zod.z.object({
3422
- id: import_zod.z.string().optional()
3399
+ type: import_zod.z.literal("subscription_item"),
3400
+ quantity: import_zod.z.number().int()
3423
3401
  })
3424
3402
  );
3425
- const zCustomItemCartObject = zCustomItemObjectData.and(zCartItemResponse).and(
3403
+ const zPromotionItemCartObject = zCartItemResponse.and(
3426
3404
  import_zod.z.object({
3427
- id: import_zod.z.string().optional()
3405
+ type: import_zod.z.literal("promotion_item"),
3406
+ quantity: import_zod.z.number().int()
3428
3407
  })
3429
3408
  );
3430
3409
  const zCartsResponse = import_zod.z.object({
@@ -3443,6 +3422,8 @@ const zCartsResponse = import_zod.z.object({
3443
3422
  tax: zFormattedPriceData.optional(),
3444
3423
  discount: zFormattedPriceData.optional(),
3445
3424
  without_discount: zFormattedPriceData.optional(),
3425
+ shipping: zFormattedPriceData.optional(),
3426
+ shipping_discount: zFormattedPriceData.optional(),
3446
3427
  discounts: import_zod.z.record(
3447
3428
  import_zod.z.object({
3448
3429
  amount: import_zod.z.number().optional(),
@@ -3454,6 +3435,34 @@ const zCartsResponse = import_zod.z.object({
3454
3435
  timestamps: zCartTimestamps.optional()
3455
3436
  }).optional()
3456
3437
  });
3438
+ const zCartItemsResponse = import_zod.z.object({
3439
+ data: import_zod.z.array(
3440
+ import_zod.z.union([
3441
+ zCartItemObject,
3442
+ zCustomItemCartObject,
3443
+ zSubscriptionItemCartObject,
3444
+ zPromotionItemCartObject
3445
+ ])
3446
+ ).optional()
3447
+ });
3448
+ const zDataStripeConnectPayment = zDataBasePayments.and(
3449
+ import_zod.z.object({
3450
+ gateway: import_zod.z.enum(["stripe_connect"]),
3451
+ options: import_zod.z.object({
3452
+ receipt_email: import_zod.z.string().optional()
3453
+ }).optional(),
3454
+ payment: import_zod.z.string().optional()
3455
+ })
3456
+ );
3457
+ const zCartIncludedPromotion = import_zod.z.object({
3458
+ id: import_zod.z.string().uuid(),
3459
+ name: import_zod.z.string(),
3460
+ description: import_zod.z.string().optional(),
3461
+ automatic: import_zod.z.boolean(),
3462
+ promotion_source: import_zod.z.string(),
3463
+ start: import_zod.z.string().datetime(),
3464
+ end: import_zod.z.string().datetime()
3465
+ });
3457
3466
  const zCartIncluded = import_zod.z.object({
3458
3467
  items: import_zod.z.array(
3459
3468
  import_zod.z.union([
@@ -6449,25 +6458,22 @@ const zSettingsCartWritable = import_zod.z.object({
6449
6458
  const zCartItemObjectWritable = zCartItemObjectData.and(
6450
6459
  zCartItemResponseWritable
6451
6460
  );
6452
- const zCartItemsResponseWritable = import_zod.z.object({
6453
- data: import_zod.z.array(
6454
- import_zod.z.union([
6455
- zCartItemObjectWritable,
6456
- zCustomItemObject,
6457
- zSubscriptionItemObjectWritable,
6458
- zPromotionItemObject
6459
- ])
6460
- ).optional()
6461
- });
6462
- const zSubscriptionItemCartObjectWritable = zSubscriptionItemObjectData.and(zCartItemResponseWritable);
6463
- const zPromotionItemCartObjectWritable = zPromotionItemObjectData.and(zCartItemResponseWritable).and(
6461
+ const zCustomItemCartObjectWritable = zCartItemResponseWritable.and(
6462
+ import_zod.z.object({
6463
+ type: import_zod.z.literal("custom_item"),
6464
+ quantity: import_zod.z.number().int()
6465
+ })
6466
+ );
6467
+ const zSubscriptionItemCartObjectWritable = zCartItemResponseWritable.and(
6464
6468
  import_zod.z.object({
6465
- id: import_zod.z.string().optional()
6469
+ type: import_zod.z.literal("subscription_item"),
6470
+ quantity: import_zod.z.number().int()
6466
6471
  })
6467
6472
  );
6468
- const zCustomItemCartObjectWritable = zCustomItemObjectData.and(zCartItemResponseWritable).and(
6473
+ const zPromotionItemCartObjectWritable = zCartItemResponseWritable.and(
6469
6474
  import_zod.z.object({
6470
- id: import_zod.z.string().optional()
6475
+ type: import_zod.z.literal("promotion_item"),
6476
+ quantity: import_zod.z.number().int()
6471
6477
  })
6472
6478
  );
6473
6479
  const zCartsResponseWritable = import_zod.z.object({
@@ -6486,6 +6492,8 @@ const zCartsResponseWritable = import_zod.z.object({
6486
6492
  tax: zFormattedPriceData.optional(),
6487
6493
  discount: zFormattedPriceData.optional(),
6488
6494
  without_discount: zFormattedPriceData.optional(),
6495
+ shipping: zFormattedPriceData.optional(),
6496
+ shipping_discount: zFormattedPriceData.optional(),
6489
6497
  discounts: import_zod.z.record(
6490
6498
  import_zod.z.object({
6491
6499
  amount: import_zod.z.number().optional(),
@@ -6497,6 +6505,16 @@ const zCartsResponseWritable = import_zod.z.object({
6497
6505
  timestamps: zCartTimestamps.optional()
6498
6506
  }).optional()
6499
6507
  });
6508
+ const zCartItemsResponseWritable = import_zod.z.object({
6509
+ data: import_zod.z.array(
6510
+ import_zod.z.union([
6511
+ zCartItemObjectWritable,
6512
+ zCustomItemCartObjectWritable,
6513
+ zSubscriptionItemCartObjectWritable,
6514
+ zPromotionItemCartObjectWritable
6515
+ ])
6516
+ ).optional()
6517
+ });
6500
6518
  const zCartIncludedWritable = import_zod.z.object({
6501
6519
  items: import_zod.z.array(
6502
6520
  import_zod.z.union([