@epcc-sdk/sdks-shopper 0.0.2 → 0.0.3

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.
@@ -1766,6 +1766,7 @@ export type CartsRequest = {
1766
1766
  * The cart name provided by the shopper. A cart name must contain 1 to 255 characters. You cannot use whitespace characters, but special characters are permitted. For more information, see the [Safe Characters](/guides/Getting-Started/safe-characters) section.
1767
1767
  */
1768
1768
  name?: string;
1769
+ contact?: CartContact;
1769
1770
  /**
1770
1771
  * This optional parameter sets a reference date for the cart. If this parameter is set, it allows the cart to act as one that might occur on that specified date. For example, such future carts might acquire future-enabled discounts, allowing users to test and validate future interactions with carts. The snapshot_date must be in the format 2026-02-21T15:07:25Z. By default, this parameter is left empty.
1771
1772
  */
@@ -1776,6 +1777,12 @@ export type CartsRequest = {
1776
1777
  */
1777
1778
  payment_intent_id?: string;
1778
1779
  };
1780
+ export type CartContact = {
1781
+ /**
1782
+ * The email address attached to a cart.
1783
+ */
1784
+ email?: string;
1785
+ };
1779
1786
  export type DiscountSettings = {
1780
1787
  /**
1781
1788
  * This parameter enables custom discounts for a cart. When set to true, Elastic Path promotions will not be applied to the new carts. Default is set from cart discount settings for the store. See [Cart Settings](/docs/api/settings/put-v-2-settings-cart).
@@ -1823,6 +1830,7 @@ export type CartResponse = {
1823
1830
  * A description of the cart.
1824
1831
  */
1825
1832
  description?: string;
1833
+ contact?: CartContact;
1826
1834
  discount_settings?: DiscountSettings;
1827
1835
  /**
1828
1836
  * Stripe-assigned unique identifier for the linked Payment Intent
@@ -1872,7 +1880,7 @@ export type CartResponse = {
1872
1880
  };
1873
1881
  };
1874
1882
  };
1875
- export type CartItemsObjectRequest = CartItemObject | CartMergeObjectRequest | CustomItemObject | ReOrderObjectRequest | PromotionItemObject;
1883
+ export type CartItemsObjectRequest = CartItemObject | SubscriptionItemObject | CartMergeObjectRequest | CustomItemObject | ReOrderObjectRequest | PromotionItemObject;
1876
1884
  export type CartItemObject = {
1877
1885
  data?: CartItemObjectData & CartItemResponse;
1878
1886
  };
@@ -1913,11 +1921,45 @@ export type CartItemObjectData = {
1913
1921
  selected_options?: {
1914
1922
  [key: string]: unknown;
1915
1923
  };
1924
+ /**
1925
+ * Array of component products for the selected options.
1926
+ */
1927
+ component_products?: Array<unknown>;
1916
1928
  };
1917
1929
  /**
1918
1930
  * Identifier for a created Cart Shipping Group
1919
1931
  */
1920
1932
  shipping_group_id?: string;
1933
+ /**
1934
+ * The slug of a stock location.
1935
+ */
1936
+ location?: string;
1937
+ };
1938
+ export type SubscriptionItemObject = {
1939
+ data?: SubscriptionItemObjectData & CartItemResponse;
1940
+ };
1941
+ export type SubscriptionItemObjectData = {
1942
+ /**
1943
+ * The type of object being returned.
1944
+ */
1945
+ type: "subscription_item";
1946
+ /**
1947
+ * The number of items added to the cart.
1948
+ */
1949
+ quantity: number;
1950
+ /**
1951
+ * Specifies the ID of the subscription offering you want to add to cart.
1952
+ */
1953
+ id: string;
1954
+ /**
1955
+ * Specifies how the subscription offering should be configured.
1956
+ */
1957
+ subscription_configuration: {
1958
+ /**
1959
+ * The ID of the plan within the offering to use for the subscription.
1960
+ */
1961
+ plan: string;
1962
+ };
1921
1963
  };
1922
1964
  export type CartMergeObjectRequest = {
1923
1965
  data?: Array<CartMergeObject>;
@@ -2066,6 +2108,10 @@ export type CartItemResponse = {
2066
2108
  * The unique ID of the product.
2067
2109
  */
2068
2110
  readonly product_id?: string;
2111
+ /**
2112
+ * The unique ID of the subscription offering for subscription items.
2113
+ */
2114
+ readonly subscription_offering_id?: string;
2069
2115
  /**
2070
2116
  * The name of this item
2071
2117
  */
@@ -2322,11 +2368,15 @@ export type OrdersAnonymizeData = {
2322
2368
  order_ids?: Array<string>;
2323
2369
  };
2324
2370
  export type OrdersUpdateRequest = {
2325
- data?: OrdersAddressData | OrdersCancelData | OrdersFulfulledData;
2371
+ data?: OrdersAddressData | OrdersCancelData | OrdersFulfilledData;
2326
2372
  };
2327
2373
  export type OrdersAddressData = {
2328
2374
  /**
2329
- * Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and does 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.
2375
+ * Specifies a user-managed, optional field used as an alternative to the existing order_id. If provided, the order-number will be sent to Authorize.net instead of the order_id, and will appear as the invoice number in Authorize.net transactions.
2376
+ */
2377
+ order_number?: string;
2378
+ /**
2379
+ * Represents 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.
2330
2380
  */
2331
2381
  external_ref?: string;
2332
2382
  shipping_address: {
@@ -2390,11 +2440,11 @@ export type OrdersCancelData = {
2390
2440
  */
2391
2441
  type: string;
2392
2442
  /**
2393
- * Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and does 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.
2443
+ * Represents 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.
2394
2444
  */
2395
2445
  external_ref?: string;
2396
2446
  };
2397
- export type OrdersFulfulledData = {
2447
+ export type OrdersFulfilledData = {
2398
2448
  /**
2399
2449
  * The shipping status of the order. You can only update the shipping status to `fulfilled`.
2400
2450
  */
@@ -2404,7 +2454,7 @@ export type OrdersFulfulledData = {
2404
2454
  */
2405
2455
  type: string;
2406
2456
  /**
2407
- * Represents an optional external ID reference for an order. It can contain alphanumeric characters, special characters, and spaces, and does 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.
2457
+ * Represents 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.
2408
2458
  */
2409
2459
  external_ref?: string;
2410
2460
  };
@@ -2554,7 +2604,7 @@ export type DataPayPalExpressCheckoutPayment = DataBasePayments & {
2554
2604
  soft_descriptor?: string;
2555
2605
  application_context?: {
2556
2606
  /**
2557
- * The label that overrides the business name in the PayPal account on the payPal site.
2607
+ * The label that overrides the business name in the PayPal account on the PayPal site.
2558
2608
  */
2559
2609
  brand_name?: string;
2560
2610
  /**
@@ -2786,6 +2836,10 @@ export type OrderItemResponse = {
2786
2836
  * The unique identifier for this order item.
2787
2837
  */
2788
2838
  readonly product_id?: string;
2839
+ /**
2840
+ * The unique identifier for the subscription offering for this order item.
2841
+ */
2842
+ readonly subscription_offering_id?: string;
2789
2843
  /**
2790
2844
  * The name of this order item.
2791
2845
  */
@@ -2845,6 +2899,14 @@ export type OrderResponse = {
2845
2899
  * Specifies the type of object being returned. You must use `order`.
2846
2900
  */
2847
2901
  type?: string;
2902
+ /**
2903
+ * Specifies a user-managed, optional field used as an alternative to the existing `order_id`. If provided, the order-number will be sent to Authorize.net instead of the `order_id`, and will appear as the invoice number in Authorize.net transactions.
2904
+ */
2905
+ order_number?: string;
2906
+ /**
2907
+ * 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.
2908
+ */
2909
+ external_ref?: string;
2848
2910
  /**
2849
2911
  * Specifies the unique identifier of the order.
2850
2912
  */
@@ -2882,6 +2944,14 @@ export type OrderMeta = {
2882
2944
  };
2883
2945
  export type CustomerCheckout = {
2884
2946
  data?: {
2947
+ /**
2948
+ * A user-managed, optional field used as an alternative to the existing `order_id`. If provided, the order-number will be sent to Authorize.net instead of the `order_id`, and will appear as the invoice number in Authorize.net transactions.
2949
+ */
2950
+ order_number?: string;
2951
+ /**
2952
+ * 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.
2953
+ */
2954
+ external_ref?: string;
2885
2955
  customer?: {
2886
2956
  /**
2887
2957
  * The ID of the customer.
@@ -2894,6 +2964,14 @@ export type CustomerCheckout = {
2894
2964
  };
2895
2965
  export type AccountCheckout = {
2896
2966
  data?: {
2967
+ /**
2968
+ * A user-managed, optional field used as an alternative to the existing `order_id`. If provided, the order-number will be sent to Authorize.net instead of the `order_id`, and will appear as the invoice number in Authorize.net transactions.
2969
+ */
2970
+ order_number?: string;
2971
+ /**
2972
+ * 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.
2973
+ */
2974
+ external_ref?: string;
2897
2975
  account?: {
2898
2976
  /**
2899
2977
  * The account ID.
@@ -2919,18 +2997,6 @@ export type AccountCheckout = {
2919
2997
  };
2920
2998
  };
2921
2999
  export type BillingAddress = {
2922
- /**
2923
- * Company name of the billing recipient.
2924
- */
2925
- company_name?: string;
2926
- /**
2927
- * Specifies the country of the billing address.
2928
- */
2929
- country: string;
2930
- /**
2931
- * Specifies the county of the billing address.
2932
- */
2933
- county?: string;
2934
3000
  /**
2935
3001
  * First name of the billing recipient.
2936
3002
  */
@@ -2939,6 +3005,10 @@ export type BillingAddress = {
2939
3005
  * Last name of the billing recipient.
2940
3006
  */
2941
3007
  last_name: string;
3008
+ /**
3009
+ * Company name of the billing recipient.
3010
+ */
3011
+ company_name: string;
2942
3012
  /**
2943
3013
  * First line of the billing address.
2944
3014
  */
@@ -2946,13 +3016,25 @@ export type BillingAddress = {
2946
3016
  /**
2947
3017
  * Second line of the billing address.
2948
3018
  */
2949
- line_2?: string;
3019
+ line_2: string;
3020
+ /**
3021
+ * City of the billing address.
3022
+ */
3023
+ city: string;
2950
3024
  /**
2951
3025
  * Postcode of the billing address.
2952
3026
  */
2953
3027
  postcode: string;
2954
3028
  /**
2955
- * Specifies state, province, or region of the billing address.
3029
+ * County of the billing address.
3030
+ */
3031
+ county: string;
3032
+ /**
3033
+ * Country of the billing address.
3034
+ */
3035
+ country: string;
3036
+ /**
3037
+ * State, province, or region of the billing address.
2956
3038
  */
2957
3039
  region: string;
2958
3040
  };
@@ -2967,18 +3049,6 @@ export type Contact = {
2967
3049
  name?: string;
2968
3050
  };
2969
3051
  export type ShippingAddress = {
2970
- /**
2971
- * Company of the shipping recipient.
2972
- */
2973
- company_name?: string;
2974
- /**
2975
- * Specifies the country of the shipping address.
2976
- */
2977
- country: string;
2978
- /**
2979
- * Specifies the county of the shipping address.
2980
- */
2981
- county?: string;
2982
3052
  /**
2983
3053
  * First name of the shipping recipient.
2984
3054
  */
@@ -2987,6 +3057,14 @@ export type ShippingAddress = {
2987
3057
  * Last name of the shipping recipient.
2988
3058
  */
2989
3059
  last_name: string;
3060
+ /**
3061
+ * Phone number of the shipping recipient.
3062
+ */
3063
+ phone_number: string;
3064
+ /**
3065
+ * Company of the shipping recipient.
3066
+ */
3067
+ company_name: string;
2990
3068
  /**
2991
3069
  * First line of the shipping address.
2992
3070
  */
@@ -2994,15 +3072,31 @@ export type ShippingAddress = {
2994
3072
  /**
2995
3073
  * Second line of the shipping address.
2996
3074
  */
2997
- line_2?: string;
3075
+ line_2: string;
3076
+ /**
3077
+ * City of the shipping address.
3078
+ */
3079
+ city: string;
2998
3080
  /**
2999
3081
  * Post code of the shipping address.
3000
3082
  */
3001
3083
  postcode: string;
3002
3084
  /**
3003
- * Specifies the state, province, or region of the shipping address.
3085
+ * County of the shipping address.
3086
+ */
3087
+ county: string;
3088
+ /**
3089
+ * Country of the shipping address.
3090
+ */
3091
+ country: string;
3092
+ /**
3093
+ * State, province, or region of the shipping address.
3004
3094
  */
3005
3095
  region: string;
3096
+ /**
3097
+ * Delivery instructions.
3098
+ */
3099
+ instructions: string;
3006
3100
  };
3007
3101
  export type ResponseMetaCarts = {
3008
3102
  page?: ResponsePaginationPage;
@@ -5567,6 +5661,19 @@ export type AddCustomDiscountToCartItemData = {
5567
5661
  query?: never;
5568
5662
  url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts";
5569
5663
  };
5664
+ export type AddCustomDiscountToCartItemErrors = {
5665
+ /**
5666
+ * Unauthorized
5667
+ */
5668
+ 401: ResponseError;
5669
+ };
5670
+ export type AddCustomDiscountToCartItemError = AddCustomDiscountToCartItemErrors[keyof AddCustomDiscountToCartItemErrors];
5671
+ export type AddCustomDiscountToCartItemResponses = {
5672
+ 200: ResponseData & {
5673
+ data?: CartsCustomDiscountsResponse;
5674
+ };
5675
+ };
5676
+ export type AddCustomDiscountToCartItemResponse = AddCustomDiscountToCartItemResponses[keyof AddCustomDiscountToCartItemResponses];
5570
5677
  export type DeleteCustomDiscountFromCartItemData = {
5571
5678
  body?: never;
5572
5679
  path: {
@@ -5621,6 +5728,19 @@ export type UpdateCustomDiscountForCartItemData = {
5621
5728
  query?: never;
5622
5729
  url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}";
5623
5730
  };
5731
+ export type UpdateCustomDiscountForCartItemErrors = {
5732
+ /**
5733
+ * Unauthorized
5734
+ */
5735
+ 401: ResponseError;
5736
+ };
5737
+ export type UpdateCustomDiscountForCartItemError = UpdateCustomDiscountForCartItemErrors[keyof UpdateCustomDiscountForCartItemErrors];
5738
+ export type UpdateCustomDiscountForCartItemResponses = {
5739
+ 200: ResponseData & {
5740
+ data?: CartsCustomDiscountsResponse;
5741
+ };
5742
+ };
5743
+ export type UpdateCustomDiscountForCartItemResponse = UpdateCustomDiscountForCartItemResponses[keyof UpdateCustomDiscountForCartItemResponses];
5624
5744
  export type CreateCartPaymentIntentData = {
5625
5745
  body?: ElasticPathPaymentsPoweredByStripePayment;
5626
5746
  path: {
@@ -5785,7 +5905,7 @@ export type GetOrderItemsResponses = {
5785
5905
  };
5786
5906
  export type GetOrderItemsResponse = GetOrderItemsResponses[keyof GetOrderItemsResponses];
5787
5907
  export type AnonymizeOrdersData = {
5788
- body?: OrdersAnonymizeRequest;
5908
+ body?: OrdersAnonymizeRequest & unknown;
5789
5909
  path?: never;
5790
5910
  query?: never;
5791
5911
  url: "/v2/orders/anonymize";
@@ -5810,7 +5930,7 @@ export type AnonymizeOrdersResponses = {
5810
5930
  };
5811
5931
  };
5812
5932
  export type AnonymizeOrdersResponse = AnonymizeOrdersResponses[keyof AnonymizeOrdersResponses];
5813
- export type AuthorizeSetupData = {
5933
+ export type PaymentSetupData = {
5814
5934
  body?: PaymentsRequest;
5815
5935
  path: {
5816
5936
  /**
@@ -5821,14 +5941,14 @@ export type AuthorizeSetupData = {
5821
5941
  query?: never;
5822
5942
  url: "/v2/orders/{orderID}/payments";
5823
5943
  };
5824
- export type AuthorizeSetupErrors = {
5944
+ export type PaymentSetupErrors = {
5825
5945
  /**
5826
5946
  * Unauthorized
5827
5947
  */
5828
5948
  401: ResponseError;
5829
5949
  };
5830
- export type AuthorizeSetupError = AuthorizeSetupErrors[keyof AuthorizeSetupErrors];
5831
- export type AuthorizeSetupResponses = {
5950
+ export type PaymentSetupError = PaymentSetupErrors[keyof PaymentSetupErrors];
5951
+ export type PaymentSetupResponses = {
5832
5952
  /**
5833
5953
  * OK
5834
5954
  */
@@ -5836,8 +5956,8 @@ export type AuthorizeSetupResponses = {
5836
5956
  data?: TransactionResponse;
5837
5957
  };
5838
5958
  };
5839
- export type AuthorizeSetupResponse = AuthorizeSetupResponses[keyof AuthorizeSetupResponses];
5840
- export type ConfirmSetupData = {
5959
+ export type PaymentSetupResponse = PaymentSetupResponses[keyof PaymentSetupResponses];
5960
+ export type ConfirmPaymentData = {
5841
5961
  body?: OrdersTransactionsConfirmRequest;
5842
5962
  path: {
5843
5963
  /**
@@ -5852,19 +5972,19 @@ export type ConfirmSetupData = {
5852
5972
  query?: never;
5853
5973
  url: "/v2/orders/{orderID}/transactions/{transactionID}/confirm";
5854
5974
  };
5855
- export type ConfirmSetupErrors = {
5975
+ export type ConfirmPaymentErrors = {
5856
5976
  /**
5857
5977
  * Unauthorized
5858
5978
  */
5859
5979
  401: ResponseError;
5860
5980
  };
5861
- export type ConfirmSetupError = ConfirmSetupErrors[keyof ConfirmSetupErrors];
5862
- export type ConfirmSetupResponses = {
5981
+ export type ConfirmPaymentError = ConfirmPaymentErrors[keyof ConfirmPaymentErrors];
5982
+ export type ConfirmPaymentResponses = {
5863
5983
  200: ResponseData & {
5864
5984
  data?: TransactionResponse;
5865
5985
  };
5866
5986
  };
5867
- export type ConfirmSetupResponse = ConfirmSetupResponses[keyof ConfirmSetupResponses];
5987
+ export type ConfirmPaymentResponse = ConfirmPaymentResponses[keyof ConfirmPaymentResponses];
5868
5988
  export type CaptureATransactionData = {
5869
5989
  body?: OrdersTransactionsCaptureRequest;
5870
5990
  path: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epcc-sdk/sdks-shopper",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "exports": {