@epcc-sdk/sdks-cart-checkout-order 0.0.1 → 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.
@@ -1029,6 +1029,9 @@ export declare const getCustomerOrders: <ThrowOnError extends boolean = false>(o
1029
1029
  data?: Array<import("./types.gen").OrderResponse>;
1030
1030
  links?: import("./types.gen").ResponsePageLinks;
1031
1031
  meta?: import("./types.gen").ResponseMetaOrders;
1032
+ included?: {
1033
+ items?: Array<import("./types.gen").OrderItemResponse>;
1034
+ };
1032
1035
  }, import("./types.gen").ResponseError, ThrowOnError>;
1033
1036
  /**
1034
1037
  * Get an Order
@@ -96,30 +96,11 @@ export type CartResponse = {
96
96
  timestamps?: Timestamps;
97
97
  };
98
98
  relationships?: {
99
- customers?: {
100
- data?: {
101
- /**
102
- * The type of related object.
103
- */
104
- type?: string;
105
- /**
106
- * The ID of the customer.
107
- */
108
- readonly id?: string;
109
- };
110
- };
111
- items?: {
112
- data?: {
113
- /**
114
- * The type of related object.
115
- */
116
- type?: string;
117
- /**
118
- * The unique identifier for the cart item
119
- */
120
- readonly id?: string;
121
- };
122
- };
99
+ customers?: RelationshipArray;
100
+ items?: RelationshipArray;
101
+ accounts?: RelationshipArray;
102
+ custom_discounts?: RelationshipArray;
103
+ promotions?: RelationshipArray;
123
104
  };
124
105
  };
125
106
  export type CartItemsObjectRequest = CartItemObject | SubscriptionItemObject | CartMergeObjectRequest | CustomItemObject | ReOrderObjectRequest | PromotionItemObject;
@@ -513,11 +494,11 @@ export type CartsBulkCustomDiscounts = {
513
494
  options?: AddAllOrNothingOptionsObject;
514
495
  };
515
496
  export type CartsBulkCustomDiscountsResponse = {
516
- data?: Array<CartsCustomDiscountsResponse & ArtItemBulkCustomDiscountResponse>;
497
+ data?: Array<CartsCustomDiscountsResponse & CartItemBulkCustomDiscountResponse>;
517
498
  options?: AddAllOrNothingOptionsObject;
518
499
  };
519
500
  export type CartItemBulkCustomDiscountObject = CartsCustomDiscountsObject & CustomDiscountRelationshipsCartItemRequest;
520
- export type ArtItemBulkCustomDiscountResponse = CartsCustomDiscountsResponse & CustomDiscountRelationshipsCartItemRequest;
501
+ export type CartItemBulkCustomDiscountResponse = CartsCustomDiscountsResponse & CustomDiscountRelationshipsCartItemRequest;
521
502
  export type CartsCustomDiscountsObject = {
522
503
  /**
523
504
  * Specifies an amount to be applied for the custom discount. It must be less than zero.
@@ -1054,10 +1035,38 @@ export type OrderPriceData = {
1054
1035
  */
1055
1036
  currency?: string;
1056
1037
  /**
1057
- * Whether or not this price is tax inclusive.
1038
+ * Whether this price is tax inclusive.
1058
1039
  */
1059
1040
  includes_tax?: boolean;
1060
1041
  };
1042
+ /**
1043
+ * Relationship data entry
1044
+ */
1045
+ export type RelationshipItem = {
1046
+ /**
1047
+ * The type of related resource.
1048
+ */
1049
+ type?: string;
1050
+ /**
1051
+ * The ID of the related resource.
1052
+ */
1053
+ id?: string;
1054
+ };
1055
+ /**
1056
+ * Array of relationships
1057
+ */
1058
+ export type RelationshipArray = {
1059
+ /**
1060
+ * Individual relationships
1061
+ */
1062
+ data?: Array<RelationshipItem>;
1063
+ };
1064
+ /**
1065
+ * Single relationship
1066
+ */
1067
+ export type SingleRelationship = {
1068
+ data?: RelationshipItem;
1069
+ };
1061
1070
  export type FormattedPriceData = {
1062
1071
  /**
1063
1072
  * The raw total of this cart.
@@ -1193,6 +1202,14 @@ export type OrderResponse = {
1193
1202
  billing_address?: BillingAddress;
1194
1203
  contact?: Contact;
1195
1204
  shipping_address?: ShippingAddress;
1205
+ relationships?: {
1206
+ items?: RelationshipArray;
1207
+ custom_discounts?: RelationshipArray;
1208
+ promotions?: RelationshipArray;
1209
+ customer?: SingleRelationship;
1210
+ account?: SingleRelationship;
1211
+ account_member?: SingleRelationship;
1212
+ };
1196
1213
  };
1197
1214
  export type OrderMeta = {
1198
1215
  timestamps?: Timestamps;
@@ -1201,9 +1218,12 @@ export type OrderMeta = {
1201
1218
  without_tax?: FormattedPriceData;
1202
1219
  tax?: FormattedPriceData;
1203
1220
  discount?: FormattedPriceData;
1221
+ balance_owing?: FormattedPriceData;
1204
1222
  paid?: FormattedPriceData;
1205
1223
  authorized?: FormattedPriceData;
1206
1224
  without_discount?: FormattedPriceData;
1225
+ shipping?: FormattedPriceData;
1226
+ shipping_discount?: FormattedPriceData;
1207
1227
  };
1208
1228
  };
1209
1229
  export type CustomerCheckout = {
@@ -1467,7 +1487,7 @@ export type GetCartsResponses = {
1467
1487
  };
1468
1488
  export type GetCartsResponse = GetCartsResponses[keyof GetCartsResponses];
1469
1489
  export type CreateACartData = {
1470
- body?: {
1490
+ body?: ResponseData & {
1471
1491
  data?: CartsRequest;
1472
1492
  };
1473
1493
  headers?: {
@@ -2287,7 +2307,20 @@ export type GetCustomerOrdersData = {
2287
2307
  "x-moltin-customer-token"?: string;
2288
2308
  };
2289
2309
  path?: never;
2290
- query?: never;
2310
+ query?: {
2311
+ /**
2312
+ * The number of records to offset the results by.
2313
+ */
2314
+ "page[offset]"?: BigInt;
2315
+ /**
2316
+ * The number of records per page. The maximum limit is 100.
2317
+ */
2318
+ "page[limit]"?: BigInt;
2319
+ /**
2320
+ * A comma-separated list of resources to include. See [Characteristics of Include Parameter](/guides/Getting-Started/includes#characteristics-of-include-parameter).
2321
+ */
2322
+ include?: string;
2323
+ };
2291
2324
  url: "/v2/orders";
2292
2325
  };
2293
2326
  export type GetCustomerOrdersErrors = {
@@ -2302,6 +2335,9 @@ export type GetCustomerOrdersResponses = {
2302
2335
  data?: Array<OrderResponse>;
2303
2336
  links?: ResponsePageLinks;
2304
2337
  meta?: ResponseMetaOrders;
2338
+ included?: {
2339
+ items?: Array<OrderItemResponse>;
2340
+ };
2305
2341
  };
2306
2342
  };
2307
2343
  export type GetCustomerOrdersResponse = GetCustomerOrdersResponses[keyof GetCustomerOrdersResponses];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epcc-sdk/sdks-cart-checkout-order",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "exports": {