@wix/auto_sdk_ecom_draft-orders 1.0.137 → 1.0.139

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.
@@ -2222,6 +2222,11 @@ interface CatalogReferenceLineItem {
2222
2222
  * @format GUID
2223
2223
  */
2224
2224
  _id?: string | null;
2225
+ /**
2226
+ * Recurring subscription settings for line item.
2227
+ * @internal
2228
+ */
2229
+ subscriptionSettings?: SubscriptionSettings;
2225
2230
  }
2226
2231
  interface DescriptionLinesOverride {
2227
2232
  /**
@@ -2307,6 +2312,11 @@ interface CustomLineItem {
2307
2312
  * @format GUID
2308
2313
  */
2309
2314
  taxGroupId?: string | null;
2315
+ /**
2316
+ * Recurring subscription settings for line item.
2317
+ * @internal
2318
+ */
2319
+ subscriptionSettings?: SubscriptionSettings;
2310
2320
  }
2311
2321
  interface SecuredMedia {
2312
2322
  /**
@@ -2716,6 +2726,11 @@ interface LineItemChangeDetails {
2716
2726
  * @internal
2717
2727
  */
2718
2728
  newCatalogReferenceOptions?: Record<string, any> | null;
2729
+ /**
2730
+ * New recurring subscription settings for this line item.
2731
+ * @internal
2732
+ */
2733
+ newSubscriptionSettings?: SubscriptionSettings;
2719
2734
  }
2720
2735
  interface ModifiersGroupsOverride {
2721
2736
  /**
@@ -4616,6 +4631,14 @@ interface OrderSettings extends OrderSettingsAllowedActionsOneOf, OrderSettingsE
4616
4631
  * @internal
4617
4632
  */
4618
4633
  specificItemsCouponBehavior?: SpecificItemsCouponBehaviorWithLiterals;
4634
+ /**
4635
+ * Whether to automatically generate an invoice when this order will be PAID.
4636
+ * If `false`, no invoice is auto-generated for this order.
4637
+ *
4638
+ * Default: `true`
4639
+ * @internal
4640
+ */
4641
+ createInvoice?: boolean | null;
4619
4642
  }
4620
4643
  /** @oneof */
4621
4644
  interface OrderSettingsAllowedActionsOneOf {
@@ -4785,6 +4808,14 @@ interface OrderCreateSettings extends OrderCreateSettingsEditableByOneOf {
4785
4808
  editableByOwnerApps?: OwnerApps;
4786
4809
  /** Notification settings to be applied on order creation */
4787
4810
  notifications?: OrderCreateNotifications;
4811
+ /**
4812
+ * Whether to automatically generate an invoice when this order will be PAID.
4813
+ * If `false`, no invoice is auto-generated for this order.
4814
+ *
4815
+ * Default: `true`
4816
+ * @internal
4817
+ */
4818
+ createInvoice?: boolean | null;
4788
4819
  }
4789
4820
  /** @oneof */
4790
4821
  interface OrderCreateSettingsEditableByOneOf {
@@ -5222,6 +5253,10 @@ type AddLineItemsToDraftOrderApplicationErrors = {
5222
5253
  code?: 'DRAFT_ORDER_ALREADY_COMMITTED';
5223
5254
  description?: string;
5224
5255
  data?: Record<string, any>;
5256
+ } | {
5257
+ code?: 'SUBSCRIPTION_SINGLE_ITEM_ALLOWED';
5258
+ description?: string;
5259
+ data?: Record<string, any>;
5225
5260
  } | {
5226
5261
  code?: 'DUPLICATED_LINE_ITEM_IDS';
5227
5262
  description?: string;
@@ -5280,6 +5315,10 @@ type UpdateLineItemsApplicationErrors = {
5280
5315
  code?: 'LINE_ITEM_HAS_PLATFORM_FEES';
5281
5316
  description?: string;
5282
5317
  data?: Record<string, any>;
5318
+ } | {
5319
+ code?: 'SUBSCRIPTION_SINGLE_ITEM_ALLOWED';
5320
+ description?: string;
5321
+ data?: Record<string, any>;
5283
5322
  };
5284
5323
  /** @docsIgnore */
5285
5324
  type SetDepositApplicationErrors = {
@@ -6250,7 +6289,7 @@ type DraftOrderQuery = {
6250
6289
  declare const utils: {
6251
6290
  query: {
6252
6291
  QueryBuilder: () => _wix_sdk_types.QueryBuilder<DraftOrder, DraftOrderQuerySpec, DraftOrderQuery>;
6253
- Filter: _wix_sdk_types.FilterFactory<DraftOrder, DraftOrderQuerySpec>; /** Discount details. */
6292
+ Filter: _wix_sdk_types.FilterFactory<DraftOrder, DraftOrderQuerySpec>;
6254
6293
  Sort: _wix_sdk_types.SortFactory<DraftOrderQuerySpec>;
6255
6294
  };
6256
6295
  };
@@ -58,7 +58,11 @@ function createDraftOrder(payload) {
58
58
  {
59
59
  transformFn: transformSDKTimestampToRESTTimestamp,
60
60
  paths: [
61
+ {
62
+ path: "draftOrder.catalogLineItems.subscriptionSettings.startDate"
63
+ },
61
64
  { path: "draftOrder.customLineItems.media.urlExpirationDate" },
65
+ { path: "draftOrder.customLineItems.subscriptionSettings.startDate" },
62
66
  { path: "draftOrder.shippingInfo.logistics.deliverByDate" },
63
67
  { path: "draftOrder.shippingInfo.logistics.deliveryTimeSlot.from" },
64
68
  { path: "draftOrder.shippingInfo.logistics.deliveryTimeSlot.to" }
@@ -366,7 +370,11 @@ function addLineItemsToDraftOrder(payload) {
366
370
  const serializedData = transformPaths(payload, [
367
371
  {
368
372
  transformFn: transformSDKTimestampToRESTTimestamp,
369
- paths: [{ path: "customLineItems.media.urlExpirationDate" }]
373
+ paths: [
374
+ { path: "catalogLineItems.subscriptionSettings.startDate" },
375
+ { path: "customLineItems.media.urlExpirationDate" },
376
+ { path: "customLineItems.subscriptionSettings.startDate" }
377
+ ]
370
378
  },
371
379
  {
372
380
  transformFn: transformSDKFloatToRESTFloat,
@@ -514,6 +522,12 @@ function addLineItemsToDraftOrder(payload) {
514
522
  }
515
523
  function updateLineItems(payload) {
516
524
  function __updateLineItems({ host }) {
525
+ const serializedData = transformPaths(payload, [
526
+ {
527
+ transformFn: transformSDKTimestampToRESTTimestamp,
528
+ paths: [{ path: "lineItemChanges.newSubscriptionSettings.startDate" }]
529
+ }
530
+ ]);
517
531
  const metadata = {
518
532
  entityFqdn: "wix.ecom.v1.draft_order",
519
533
  method: "POST",
@@ -524,10 +538,10 @@ function updateLineItems(payload) {
524
538
  },
525
539
  url: resolveComWixEcomOrdersDraftV1DraftOrdersUrl({
526
540
  protoPath: "/v1/draft-orders/{draftOrderId}/line-items",
527
- data: payload,
541
+ data: serializedData,
528
542
  host
529
543
  }),
530
- data: payload,
544
+ data: serializedData,
531
545
  transformResponse: (payload2) => transformPaths(payload2, [
532
546
  {
533
547
  transformFn: transformRESTTimestampToSDKTimestamp,