@wix/auto_sdk_pricing-plans_orders 1.0.124 → 1.0.125

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.
@@ -109,317 +109,323 @@ function resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl(opts)
109
109
  };
110
110
  return resolveUrl(Object.assign(opts, { domainToMappings }));
111
111
  }
112
- function resolveComWixpressMembershipV2OrdersCheckoutServiceUrl(opts) {
112
+ function resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl(opts) {
113
113
  const domainToMappings = {
114
114
  "api._api_base_domain_": [
115
115
  {
116
- srcPath: "/pricing-plans-checkout-proxy",
116
+ srcPath: "/order-management-service-proxy",
117
117
  destPath: ""
118
118
  }
119
119
  ],
120
120
  "*.dev.wix-code.com": [
121
121
  {
122
- srcPath: "/_api/paid-plans/v2/checkout",
123
- destPath: "/v2/checkout"
122
+ srcPath: "/_api/paid-plans/v2/orders",
123
+ destPath: "/v2/orders"
124
124
  },
125
125
  {
126
- srcPath: "/_api/pricing-plans/v2/checkout",
127
- destPath: "/v2/checkout"
126
+ srcPath: "/_api/pricing-plans/v2/orders",
127
+ destPath: "/v2/orders"
128
128
  }
129
129
  ],
130
130
  "*.wixapps.net": [
131
131
  {
132
- srcPath: "/_api/paid-plans/v2/checkout",
133
- destPath: "/v2/checkout"
132
+ srcPath: "/_api/paid-plans/v2/orders",
133
+ destPath: "/v2/orders"
134
134
  }
135
135
  ],
136
136
  "editor-flow.wixapps.net": [
137
137
  {
138
- srcPath: "/_api/paid-plans/v2/checkout",
139
- destPath: "/v2/checkout"
138
+ srcPath: "/_api/paid-plans/v2/orders",
139
+ destPath: "/v2/orders"
140
140
  }
141
141
  ],
142
142
  "editor._base_domain_": [
143
143
  {
144
- srcPath: "/_api/paid-plans/v2/checkout",
145
- destPath: "/v2/checkout"
144
+ srcPath: "/_api/paid-plans/v2/orders",
145
+ destPath: "/v2/orders"
146
146
  },
147
147
  {
148
- srcPath: "/_api/pricing-plans/v2/checkout",
149
- destPath: "/v2/checkout"
148
+ srcPath: "/_api/pricing-plans/v2/orders",
149
+ destPath: "/v2/orders"
150
150
  }
151
151
  ],
152
152
  "blocks._base_domain_": [
153
153
  {
154
- srcPath: "/_api/paid-plans/v2/checkout",
155
- destPath: "/v2/checkout"
154
+ srcPath: "/_api/paid-plans/v2/orders",
155
+ destPath: "/v2/orders"
156
156
  },
157
157
  {
158
- srcPath: "/_api/pricing-plans/v2/checkout",
159
- destPath: "/v2/checkout"
158
+ srcPath: "/_api/pricing-plans/v2/orders",
159
+ destPath: "/v2/orders"
160
160
  }
161
161
  ],
162
162
  "create.editorx": [
163
163
  {
164
- srcPath: "/_api/paid-plans/v2/checkout",
165
- destPath: "/v2/checkout"
164
+ srcPath: "/_api/paid-plans/v2/orders",
165
+ destPath: "/v2/orders"
166
166
  },
167
167
  {
168
- srcPath: "/_api/pricing-plans/v2/checkout",
169
- destPath: "/v2/checkout"
168
+ srcPath: "/_api/pricing-plans/v2/orders",
169
+ destPath: "/v2/orders"
170
170
  }
171
171
  ],
172
172
  "editor.wixapps.net": [
173
173
  {
174
- srcPath: "/_api/paid-plans/v2/checkout",
175
- destPath: "/v2/checkout"
174
+ srcPath: "/_api/paid-plans/v2/orders",
175
+ destPath: "/v2/orders"
176
176
  },
177
177
  {
178
- srcPath: "/_api/pricing-plans/v2/checkout",
179
- destPath: "/v2/checkout"
178
+ srcPath: "/_api/pricing-plans/v2/orders",
179
+ destPath: "/v2/orders"
180
180
  }
181
181
  ],
182
182
  "forums._base_domain_": [
183
183
  {
184
- srcPath: "/_api/paid-plans/v2/checkout",
185
- destPath: "/v2/checkout"
184
+ srcPath: "/_api/paid-plans/v2/orders",
185
+ destPath: "/v2/orders"
186
186
  }
187
187
  ],
188
188
  "forums.wixapps.net": [
189
189
  {
190
- srcPath: "/_api/paid-plans/v2/checkout",
191
- destPath: "/v2/checkout"
190
+ srcPath: "/_api/paid-plans/v2/orders",
191
+ destPath: "/v2/orders"
192
192
  }
193
193
  ],
194
194
  "manage._base_domain_": [
195
195
  {
196
- srcPath: "/_api/pricing-plans/v2/checkout",
197
- destPath: "/v2/checkout"
198
- },
199
- {
200
- srcPath: "/_api/paid-plans/v2/checkout",
201
- destPath: "/v2/checkout"
196
+ srcPath: "/_api/pricing-plans/v2/orders",
197
+ destPath: "/v2/orders"
202
198
  },
203
199
  {
204
- srcPath: "/pricing-plans/v2/checkout",
205
- destPath: "/v2/checkout"
200
+ srcPath: "/_api/paid-plans/v2/orders",
201
+ destPath: "/v2/orders"
206
202
  }
207
203
  ],
208
204
  "www.wixapis.com": [
209
205
  {
210
- srcPath: "/pricing-plans/v2/checkout",
211
- destPath: "/v2/checkout"
206
+ srcPath: "/pricing-plans/v2/orders",
207
+ destPath: "/v2/orders"
212
208
  }
213
209
  ],
214
210
  _: [
215
211
  {
216
- srcPath: "/pricing-plans/v2/checkout",
217
- destPath: "/v2/checkout"
218
- },
219
- {
220
- srcPath: "/_api/paid-plans/v2/checkout",
221
- destPath: "/v2/checkout"
212
+ srcPath: "/_api/paid-plans/v2/orders",
213
+ destPath: "/v2/orders"
222
214
  },
223
215
  {
224
- srcPath: "/_api/pricing-plans/v2/checkout",
225
- destPath: "/v2/checkout"
216
+ srcPath: "/_api/pricing-plans/v2/orders",
217
+ destPath: "/v2/orders"
226
218
  }
227
219
  ],
228
220
  "*.pub.wix-code.com": [
229
221
  {
230
- srcPath: "/_api/paid-plans/v2/checkout",
231
- destPath: "/v2/checkout"
222
+ srcPath: "/_api/paid-plans/v2/orders",
223
+ destPath: "/v2/orders"
232
224
  }
233
225
  ],
234
226
  "www._base_domain_": [
235
227
  {
236
- srcPath: "/_api/paid-plans/v2/checkout",
237
- destPath: "/v2/checkout"
228
+ srcPath: "/_api/paid-plans/v2/orders",
229
+ destPath: "/v2/orders"
238
230
  }
239
231
  ],
240
232
  "apps._base_domain_": [
241
233
  {
242
- srcPath: "/_api/paid-plans/v2/checkout",
243
- destPath: "/v2/checkout"
234
+ srcPath: "/_api/paid-plans/v2/orders",
235
+ destPath: "/v2/orders"
244
236
  },
245
237
  {
246
- srcPath: "/_api/pricing-plans/v2/checkout",
247
- destPath: "/v2/checkout"
238
+ srcPath: "/_api/pricing-plans/v2/orders",
239
+ destPath: "/v2/orders"
248
240
  }
249
241
  ],
250
242
  "dev._base_domain_": [
251
243
  {
252
- srcPath: "/_api/paid-plans/v2/checkout",
253
- destPath: "/v2/checkout"
244
+ srcPath: "/_api/paid-plans/v2/orders",
245
+ destPath: "/v2/orders"
254
246
  },
255
247
  {
256
- srcPath: "/_api/pricing-plans/v2/checkout",
257
- destPath: "/v2/checkout"
248
+ srcPath: "/_api/pricing-plans/v2/orders",
249
+ destPath: "/v2/orders"
258
250
  }
259
251
  ]
260
252
  };
261
253
  return resolveUrl(Object.assign(opts, { domainToMappings }));
262
254
  }
263
- function resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl(opts) {
255
+ function resolveComWixpressMembershipV2OrdersCheckoutServiceUrl(opts) {
264
256
  const domainToMappings = {
265
257
  "api._api_base_domain_": [
266
258
  {
267
- srcPath: "/order-management-service-proxy",
259
+ srcPath: "/pricing-plans-checkout-proxy",
268
260
  destPath: ""
269
261
  }
270
262
  ],
271
263
  "*.dev.wix-code.com": [
272
264
  {
273
- srcPath: "/_api/paid-plans/v2/orders",
274
- destPath: "/v2/orders"
265
+ srcPath: "/_api/paid-plans/v2/checkout",
266
+ destPath: "/v2/checkout"
275
267
  },
276
268
  {
277
- srcPath: "/_api/pricing-plans/v2/orders",
278
- destPath: "/v2/orders"
269
+ srcPath: "/_api/pricing-plans/v2/checkout",
270
+ destPath: "/v2/checkout"
279
271
  }
280
272
  ],
281
273
  "*.wixapps.net": [
282
274
  {
283
- srcPath: "/_api/paid-plans/v2/orders",
284
- destPath: "/v2/orders"
275
+ srcPath: "/_api/paid-plans/v2/checkout",
276
+ destPath: "/v2/checkout"
285
277
  }
286
278
  ],
287
279
  "editor-flow.wixapps.net": [
288
280
  {
289
- srcPath: "/_api/paid-plans/v2/orders",
290
- destPath: "/v2/orders"
281
+ srcPath: "/_api/paid-plans/v2/checkout",
282
+ destPath: "/v2/checkout"
291
283
  }
292
284
  ],
293
285
  "editor._base_domain_": [
294
286
  {
295
- srcPath: "/_api/paid-plans/v2/orders",
296
- destPath: "/v2/orders"
287
+ srcPath: "/_api/paid-plans/v2/checkout",
288
+ destPath: "/v2/checkout"
297
289
  },
298
290
  {
299
- srcPath: "/_api/pricing-plans/v2/orders",
300
- destPath: "/v2/orders"
291
+ srcPath: "/_api/pricing-plans/v2/checkout",
292
+ destPath: "/v2/checkout"
301
293
  }
302
294
  ],
303
295
  "blocks._base_domain_": [
304
296
  {
305
- srcPath: "/_api/paid-plans/v2/orders",
306
- destPath: "/v2/orders"
297
+ srcPath: "/_api/paid-plans/v2/checkout",
298
+ destPath: "/v2/checkout"
307
299
  },
308
300
  {
309
- srcPath: "/_api/pricing-plans/v2/orders",
310
- destPath: "/v2/orders"
301
+ srcPath: "/_api/pricing-plans/v2/checkout",
302
+ destPath: "/v2/checkout"
311
303
  }
312
304
  ],
313
305
  "create.editorx": [
314
306
  {
315
- srcPath: "/_api/paid-plans/v2/orders",
316
- destPath: "/v2/orders"
307
+ srcPath: "/_api/paid-plans/v2/checkout",
308
+ destPath: "/v2/checkout"
317
309
  },
318
310
  {
319
- srcPath: "/_api/pricing-plans/v2/orders",
320
- destPath: "/v2/orders"
311
+ srcPath: "/_api/pricing-plans/v2/checkout",
312
+ destPath: "/v2/checkout"
321
313
  }
322
314
  ],
323
315
  "editor.wixapps.net": [
324
316
  {
325
- srcPath: "/_api/paid-plans/v2/orders",
326
- destPath: "/v2/orders"
317
+ srcPath: "/_api/paid-plans/v2/checkout",
318
+ destPath: "/v2/checkout"
327
319
  },
328
320
  {
329
- srcPath: "/_api/pricing-plans/v2/orders",
330
- destPath: "/v2/orders"
321
+ srcPath: "/_api/pricing-plans/v2/checkout",
322
+ destPath: "/v2/checkout"
331
323
  }
332
324
  ],
333
325
  "forums._base_domain_": [
334
326
  {
335
- srcPath: "/_api/paid-plans/v2/orders",
336
- destPath: "/v2/orders"
327
+ srcPath: "/_api/paid-plans/v2/checkout",
328
+ destPath: "/v2/checkout"
337
329
  }
338
330
  ],
339
331
  "forums.wixapps.net": [
340
332
  {
341
- srcPath: "/_api/paid-plans/v2/orders",
342
- destPath: "/v2/orders"
333
+ srcPath: "/_api/paid-plans/v2/checkout",
334
+ destPath: "/v2/checkout"
343
335
  }
344
336
  ],
345
337
  "manage._base_domain_": [
346
338
  {
347
- srcPath: "/_api/pricing-plans/v2/orders",
348
- destPath: "/v2/orders"
339
+ srcPath: "/_api/pricing-plans/v2/checkout",
340
+ destPath: "/v2/checkout"
349
341
  },
350
342
  {
351
- srcPath: "/_api/paid-plans/v2/orders",
352
- destPath: "/v2/orders"
343
+ srcPath: "/_api/paid-plans/v2/checkout",
344
+ destPath: "/v2/checkout"
345
+ },
346
+ {
347
+ srcPath: "/pricing-plans/v2/checkout",
348
+ destPath: "/v2/checkout"
353
349
  }
354
350
  ],
355
351
  "www.wixapis.com": [
356
352
  {
357
- srcPath: "/pricing-plans/v2/orders",
358
- destPath: "/v2/orders"
353
+ srcPath: "/pricing-plans/v2/checkout",
354
+ destPath: "/v2/checkout"
359
355
  }
360
356
  ],
361
357
  _: [
362
358
  {
363
- srcPath: "/_api/paid-plans/v2/orders",
364
- destPath: "/v2/orders"
359
+ srcPath: "/pricing-plans/v2/checkout",
360
+ destPath: "/v2/checkout"
365
361
  },
366
362
  {
367
- srcPath: "/_api/pricing-plans/v2/orders",
368
- destPath: "/v2/orders"
363
+ srcPath: "/_api/paid-plans/v2/checkout",
364
+ destPath: "/v2/checkout"
365
+ },
366
+ {
367
+ srcPath: "/_api/pricing-plans/v2/checkout",
368
+ destPath: "/v2/checkout"
369
369
  }
370
370
  ],
371
371
  "*.pub.wix-code.com": [
372
372
  {
373
- srcPath: "/_api/paid-plans/v2/orders",
374
- destPath: "/v2/orders"
373
+ srcPath: "/_api/paid-plans/v2/checkout",
374
+ destPath: "/v2/checkout"
375
375
  }
376
376
  ],
377
377
  "www._base_domain_": [
378
378
  {
379
- srcPath: "/_api/paid-plans/v2/orders",
380
- destPath: "/v2/orders"
379
+ srcPath: "/_api/paid-plans/v2/checkout",
380
+ destPath: "/v2/checkout"
381
381
  }
382
382
  ],
383
383
  "apps._base_domain_": [
384
384
  {
385
- srcPath: "/_api/paid-plans/v2/orders",
386
- destPath: "/v2/orders"
385
+ srcPath: "/_api/paid-plans/v2/checkout",
386
+ destPath: "/v2/checkout"
387
387
  },
388
388
  {
389
- srcPath: "/_api/pricing-plans/v2/orders",
390
- destPath: "/v2/orders"
389
+ srcPath: "/_api/pricing-plans/v2/checkout",
390
+ destPath: "/v2/checkout"
391
391
  }
392
392
  ],
393
393
  "dev._base_domain_": [
394
394
  {
395
- srcPath: "/_api/paid-plans/v2/orders",
396
- destPath: "/v2/orders"
395
+ srcPath: "/_api/paid-plans/v2/checkout",
396
+ destPath: "/v2/checkout"
397
397
  },
398
398
  {
399
- srcPath: "/_api/pricing-plans/v2/orders",
400
- destPath: "/v2/orders"
399
+ srcPath: "/_api/pricing-plans/v2/checkout",
400
+ destPath: "/v2/checkout"
401
401
  }
402
402
  ]
403
403
  };
404
404
  return resolveUrl(Object.assign(opts, { domainToMappings }));
405
405
  }
406
406
  var PACKAGE_NAME = "@wix/auto_sdk_pricing-plans_orders";
407
- function managementGetOrder(payload) {
408
- function __managementGetOrder({ host }) {
407
+ function createOnlineOrder(payload) {
408
+ function __createOnlineOrder({ host }) {
409
+ const serializedData = transformPaths(payload, [
410
+ {
411
+ transformFn: transformSDKTimestampToRESTTimestamp,
412
+ paths: [{ path: "startDate" }]
413
+ }
414
+ ]);
409
415
  const metadata = {
410
416
  entityFqdn: "wix.pricing_plans.v2.order",
411
- method: "GET",
412
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.GetOrder",
417
+ method: "POST",
418
+ methodFqn: "com.wixpress.membership.v2.orders.CheckoutService.CreateOnlineOrder",
413
419
  packageName: PACKAGE_NAME,
414
420
  migrationOptions: {
415
421
  optInTransformResponse: true
416
422
  },
417
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
418
- protoPath: "/v2/orders/{id}",
419
- data: payload,
423
+ url: resolveComWixpressMembershipV2OrdersCheckoutServiceUrl({
424
+ protoPath: "/v2/checkout/orders/online",
425
+ data: serializedData,
420
426
  host
421
427
  }),
422
- params: toURLSearchParams(payload),
428
+ data: serializedData,
423
429
  transformResponse: (payload2) => transformPaths(payload2, [
424
430
  {
425
431
  transformFn: transformRESTTimestampToSDKTimestamp,
@@ -442,216 +448,10 @@ function managementGetOrder(payload) {
442
448
  };
443
449
  return metadata;
444
450
  }
445
- return __managementGetOrder;
451
+ return __createOnlineOrder;
446
452
  }
447
- function managementListOrders(payload) {
448
- function __managementListOrders({ host }) {
449
- const serializedData = transformPaths(payload, [
450
- {
451
- transformFn: transformSDKFloatToRESTFloat,
452
- paths: [
453
- { path: "sorting.origin.latitude" },
454
- { path: "sorting.origin.longitude" }
455
- ]
456
- }
457
- ]);
458
- const metadata = {
459
- entityFqdn: "wix.pricing_plans.v2.order",
460
- method: "GET",
461
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.ListOrders",
462
- packageName: PACKAGE_NAME,
463
- migrationOptions: {
464
- optInTransformResponse: true
465
- },
466
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
467
- protoPath: "/v2/orders",
468
- data: serializedData,
469
- host
470
- }),
471
- params: toURLSearchParams(serializedData, true),
472
- transformResponse: (payload2) => transformPaths(payload2, [
473
- {
474
- transformFn: transformRESTTimestampToSDKTimestamp,
475
- paths: [
476
- { path: "orders.startDate" },
477
- { path: "orders.endDate" },
478
- { path: "orders.earliestEndDate" },
479
- { path: "orders.createdDate" },
480
- { path: "orders.updatedDate" },
481
- { path: "orders.cancellation.requestedDate" },
482
- { path: "orders.pausePeriods.pauseDate" },
483
- { path: "orders.pausePeriods.resumeDate" },
484
- { path: "orders.currentCycle.startedDate" },
485
- { path: "orders.currentCycle.endedDate" },
486
- { path: "orders.cycles.startedDate" },
487
- { path: "orders.cycles.endedDate" }
488
- ]
489
- }
490
- ])
491
- };
492
- return metadata;
493
- }
494
- return __managementListOrders;
495
- }
496
- function postponeEndDate(payload) {
497
- function __postponeEndDate({ host }) {
498
- const serializedData = transformPaths(payload, [
499
- {
500
- transformFn: transformSDKTimestampToRESTTimestamp,
501
- paths: [{ path: "endDate" }]
502
- }
503
- ]);
504
- const metadata = {
505
- entityFqdn: "wix.pricing_plans.v2.order",
506
- method: "PATCH",
507
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate",
508
- packageName: PACKAGE_NAME,
509
- migrationOptions: {
510
- optInTransformResponse: true
511
- },
512
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
513
- protoPath: "/v2/orders/{id}",
514
- data: serializedData,
515
- host
516
- }),
517
- data: serializedData
518
- };
519
- return metadata;
520
- }
521
- return __postponeEndDate;
522
- }
523
- function cancelOrder(payload) {
524
- function __cancelOrder({ host }) {
525
- const metadata = {
526
- entityFqdn: "wix.pricing_plans.v2.order",
527
- method: "POST",
528
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder",
529
- packageName: PACKAGE_NAME,
530
- migrationOptions: {
531
- optInTransformResponse: true
532
- },
533
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
534
- protoPath: "/v2/orders/{id}/cancel",
535
- data: payload,
536
- host
537
- }),
538
- data: payload
539
- };
540
- return metadata;
541
- }
542
- return __cancelOrder;
543
- }
544
- function markAsPaid(payload) {
545
- function __markAsPaid({ host }) {
546
- const metadata = {
547
- entityFqdn: "wix.pricing_plans.v2.order",
548
- method: "POST",
549
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid",
550
- packageName: PACKAGE_NAME,
551
- migrationOptions: {
552
- optInTransformResponse: true
553
- },
554
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
555
- protoPath: "/v2/orders/{id}/mark-as-paid",
556
- data: payload,
557
- host
558
- }),
559
- data: payload
560
- };
561
- return metadata;
562
- }
563
- return __markAsPaid;
564
- }
565
- function pauseOrder(payload) {
566
- function __pauseOrder({ host }) {
567
- const metadata = {
568
- entityFqdn: "wix.pricing_plans.v2.order",
569
- method: "POST",
570
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder",
571
- packageName: PACKAGE_NAME,
572
- migrationOptions: {
573
- optInTransformResponse: true
574
- },
575
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
576
- protoPath: "/v2/orders/{id}/pause",
577
- data: payload,
578
- host
579
- }),
580
- data: payload
581
- };
582
- return metadata;
583
- }
584
- return __pauseOrder;
585
- }
586
- function resumeOrder(payload) {
587
- function __resumeOrder({ host }) {
588
- const metadata = {
589
- entityFqdn: "wix.pricing_plans.v2.order",
590
- method: "POST",
591
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder",
592
- packageName: PACKAGE_NAME,
593
- migrationOptions: {
594
- optInTransformResponse: true
595
- },
596
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
597
- protoPath: "/v2/orders/{id}/resume",
598
- data: payload,
599
- host
600
- }),
601
- data: payload
602
- };
603
- return metadata;
604
- }
605
- return __resumeOrder;
606
- }
607
- function createOnlineOrder(payload) {
608
- function __createOnlineOrder({ host }) {
609
- const serializedData = transformPaths(payload, [
610
- {
611
- transformFn: transformSDKTimestampToRESTTimestamp,
612
- paths: [{ path: "startDate" }]
613
- }
614
- ]);
615
- const metadata = {
616
- entityFqdn: "wix.pricing_plans.v2.order",
617
- method: "POST",
618
- methodFqn: "com.wixpress.membership.v2.orders.CheckoutService.CreateOnlineOrder",
619
- packageName: PACKAGE_NAME,
620
- migrationOptions: {
621
- optInTransformResponse: true
622
- },
623
- url: resolveComWixpressMembershipV2OrdersCheckoutServiceUrl({
624
- protoPath: "/v2/checkout/orders/online",
625
- data: serializedData,
626
- host
627
- }),
628
- data: serializedData,
629
- transformResponse: (payload2) => transformPaths(payload2, [
630
- {
631
- transformFn: transformRESTTimestampToSDKTimestamp,
632
- paths: [
633
- { path: "order.startDate" },
634
- { path: "order.endDate" },
635
- { path: "order.earliestEndDate" },
636
- { path: "order.createdDate" },
637
- { path: "order.updatedDate" },
638
- { path: "order.cancellation.requestedDate" },
639
- { path: "order.pausePeriods.pauseDate" },
640
- { path: "order.pausePeriods.resumeDate" },
641
- { path: "order.currentCycle.startedDate" },
642
- { path: "order.currentCycle.endedDate" },
643
- { path: "order.cycles.startedDate" },
644
- { path: "order.cycles.endedDate" }
645
- ]
646
- }
647
- ])
648
- };
649
- return metadata;
650
- }
651
- return __createOnlineOrder;
652
- }
653
- function createOfflineOrder(payload) {
654
- function __createOfflineOrder({ host }) {
453
+ function createOfflineOrder(payload) {
454
+ function __createOfflineOrder({ host }) {
655
455
  const serializedData = transformPaths(payload, [
656
456
  {
657
457
  transformFn: transformSDKTimestampToRESTTimestamp,
@@ -809,18 +609,18 @@ function getPricePreview(payload) {
809
609
  }
810
610
  return __getPricePreview;
811
611
  }
812
- function memberGetOrder(payload) {
813
- function __memberGetOrder({ host }) {
612
+ function managementGetOrder(payload) {
613
+ function __managementGetOrder({ host }) {
814
614
  const metadata = {
815
615
  entityFqdn: "wix.pricing_plans.v2.order",
816
616
  method: "GET",
817
- methodFqn: "com.wixpress.membership.v2.orders.member.MemberOrdersService.GetOrder",
617
+ methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.GetOrder",
818
618
  packageName: PACKAGE_NAME,
819
619
  migrationOptions: {
820
620
  optInTransformResponse: true
821
621
  },
822
- url: resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl({
823
- protoPath: "/v2/member/orders/{id}",
622
+ url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
623
+ protoPath: "/v2/orders/{id}",
824
624
  data: payload,
825
625
  host
826
626
  }),
@@ -847,10 +647,10 @@ function memberGetOrder(payload) {
847
647
  };
848
648
  return metadata;
849
649
  }
850
- return __memberGetOrder;
650
+ return __managementGetOrder;
851
651
  }
852
- function memberListOrders(payload) {
853
- function __memberListOrders({ host }) {
652
+ function managementListOrders(payload) {
653
+ function __managementListOrders({ host }) {
854
654
  const serializedData = transformPaths(payload, [
855
655
  {
856
656
  transformFn: transformSDKFloatToRESTFloat,
@@ -863,13 +663,13 @@ function memberListOrders(payload) {
863
663
  const metadata = {
864
664
  entityFqdn: "wix.pricing_plans.v2.order",
865
665
  method: "GET",
866
- methodFqn: "com.wixpress.membership.v2.orders.member.MemberOrdersService.ListOrders",
666
+ methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.ListOrders",
867
667
  packageName: PACKAGE_NAME,
868
668
  migrationOptions: {
869
669
  optInTransformResponse: true
870
670
  },
871
- url: resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl({
872
- protoPath: "/v2/member/orders",
671
+ url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
672
+ protoPath: "/v2/orders",
873
673
  data: serializedData,
874
674
  host
875
675
  }),
@@ -896,35 +696,235 @@ function memberListOrders(payload) {
896
696
  };
897
697
  return metadata;
898
698
  }
899
- return __memberListOrders;
699
+ return __managementListOrders;
900
700
  }
901
- function requestCancellation(payload) {
902
- function __requestCancellation({ host }) {
701
+ function postponeEndDate(payload) {
702
+ function __postponeEndDate({ host }) {
703
+ const serializedData = transformPaths(payload, [
704
+ {
705
+ transformFn: transformSDKTimestampToRESTTimestamp,
706
+ paths: [{ path: "endDate" }]
707
+ }
708
+ ]);
903
709
  const metadata = {
904
710
  entityFqdn: "wix.pricing_plans.v2.order",
905
- method: "POST",
906
- methodFqn: "com.wixpress.membership.v2.orders.member.MemberOrdersService.RequestCancellation",
711
+ method: "PATCH",
712
+ methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate",
907
713
  packageName: PACKAGE_NAME,
908
714
  migrationOptions: {
909
715
  optInTransformResponse: true
910
716
  },
911
- url: resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl({
912
- protoPath: "/v2/member/orders/{id}/cancel",
913
- data: payload,
717
+ url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
718
+ protoPath: "/v2/orders/{id}",
719
+ data: serializedData,
914
720
  host
915
721
  }),
916
- data: payload
722
+ data: serializedData
917
723
  };
918
724
  return metadata;
919
725
  }
920
- return __requestCancellation;
726
+ return __postponeEndDate;
921
727
  }
922
-
923
- // src/pricing-plans-v2-order-orders.universal.ts
924
- var PeriodUnit = /* @__PURE__ */ ((PeriodUnit2) => {
925
- PeriodUnit2["UNDEFINED"] = "UNDEFINED";
926
- PeriodUnit2["DAY"] = "DAY";
927
- PeriodUnit2["WEEK"] = "WEEK";
728
+ function cancelOrder(payload) {
729
+ function __cancelOrder({ host }) {
730
+ const metadata = {
731
+ entityFqdn: "wix.pricing_plans.v2.order",
732
+ method: "POST",
733
+ methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder",
734
+ packageName: PACKAGE_NAME,
735
+ migrationOptions: {
736
+ optInTransformResponse: true
737
+ },
738
+ url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
739
+ protoPath: "/v2/orders/{id}/cancel",
740
+ data: payload,
741
+ host
742
+ }),
743
+ data: payload
744
+ };
745
+ return metadata;
746
+ }
747
+ return __cancelOrder;
748
+ }
749
+ function markAsPaid(payload) {
750
+ function __markAsPaid({ host }) {
751
+ const metadata = {
752
+ entityFqdn: "wix.pricing_plans.v2.order",
753
+ method: "POST",
754
+ methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid",
755
+ packageName: PACKAGE_NAME,
756
+ migrationOptions: {
757
+ optInTransformResponse: true
758
+ },
759
+ url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
760
+ protoPath: "/v2/orders/{id}/mark-as-paid",
761
+ data: payload,
762
+ host
763
+ }),
764
+ data: payload
765
+ };
766
+ return metadata;
767
+ }
768
+ return __markAsPaid;
769
+ }
770
+ function pauseOrder(payload) {
771
+ function __pauseOrder({ host }) {
772
+ const metadata = {
773
+ entityFqdn: "wix.pricing_plans.v2.order",
774
+ method: "POST",
775
+ methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder",
776
+ packageName: PACKAGE_NAME,
777
+ migrationOptions: {
778
+ optInTransformResponse: true
779
+ },
780
+ url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
781
+ protoPath: "/v2/orders/{id}/pause",
782
+ data: payload,
783
+ host
784
+ }),
785
+ data: payload
786
+ };
787
+ return metadata;
788
+ }
789
+ return __pauseOrder;
790
+ }
791
+ function resumeOrder(payload) {
792
+ function __resumeOrder({ host }) {
793
+ const metadata = {
794
+ entityFqdn: "wix.pricing_plans.v2.order",
795
+ method: "POST",
796
+ methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder",
797
+ packageName: PACKAGE_NAME,
798
+ migrationOptions: {
799
+ optInTransformResponse: true
800
+ },
801
+ url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
802
+ protoPath: "/v2/orders/{id}/resume",
803
+ data: payload,
804
+ host
805
+ }),
806
+ data: payload
807
+ };
808
+ return metadata;
809
+ }
810
+ return __resumeOrder;
811
+ }
812
+ function memberGetOrder(payload) {
813
+ function __memberGetOrder({ host }) {
814
+ const metadata = {
815
+ entityFqdn: "wix.pricing_plans.v2.order",
816
+ method: "GET",
817
+ methodFqn: "com.wixpress.membership.v2.orders.member.MemberOrdersService.GetOrder",
818
+ packageName: PACKAGE_NAME,
819
+ migrationOptions: {
820
+ optInTransformResponse: true
821
+ },
822
+ url: resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl({
823
+ protoPath: "/v2/member/orders/{id}",
824
+ data: payload,
825
+ host
826
+ }),
827
+ params: toURLSearchParams(payload),
828
+ transformResponse: (payload2) => transformPaths(payload2, [
829
+ {
830
+ transformFn: transformRESTTimestampToSDKTimestamp,
831
+ paths: [
832
+ { path: "order.startDate" },
833
+ { path: "order.endDate" },
834
+ { path: "order.earliestEndDate" },
835
+ { path: "order.createdDate" },
836
+ { path: "order.updatedDate" },
837
+ { path: "order.cancellation.requestedDate" },
838
+ { path: "order.pausePeriods.pauseDate" },
839
+ { path: "order.pausePeriods.resumeDate" },
840
+ { path: "order.currentCycle.startedDate" },
841
+ { path: "order.currentCycle.endedDate" },
842
+ { path: "order.cycles.startedDate" },
843
+ { path: "order.cycles.endedDate" }
844
+ ]
845
+ }
846
+ ])
847
+ };
848
+ return metadata;
849
+ }
850
+ return __memberGetOrder;
851
+ }
852
+ function memberListOrders(payload) {
853
+ function __memberListOrders({ host }) {
854
+ const serializedData = transformPaths(payload, [
855
+ {
856
+ transformFn: transformSDKFloatToRESTFloat,
857
+ paths: [
858
+ { path: "sorting.origin.latitude" },
859
+ { path: "sorting.origin.longitude" }
860
+ ]
861
+ }
862
+ ]);
863
+ const metadata = {
864
+ entityFqdn: "wix.pricing_plans.v2.order",
865
+ method: "GET",
866
+ methodFqn: "com.wixpress.membership.v2.orders.member.MemberOrdersService.ListOrders",
867
+ packageName: PACKAGE_NAME,
868
+ migrationOptions: {
869
+ optInTransformResponse: true
870
+ },
871
+ url: resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl({
872
+ protoPath: "/v2/member/orders",
873
+ data: serializedData,
874
+ host
875
+ }),
876
+ params: toURLSearchParams(serializedData, true),
877
+ transformResponse: (payload2) => transformPaths(payload2, [
878
+ {
879
+ transformFn: transformRESTTimestampToSDKTimestamp,
880
+ paths: [
881
+ { path: "orders.startDate" },
882
+ { path: "orders.endDate" },
883
+ { path: "orders.earliestEndDate" },
884
+ { path: "orders.createdDate" },
885
+ { path: "orders.updatedDate" },
886
+ { path: "orders.cancellation.requestedDate" },
887
+ { path: "orders.pausePeriods.pauseDate" },
888
+ { path: "orders.pausePeriods.resumeDate" },
889
+ { path: "orders.currentCycle.startedDate" },
890
+ { path: "orders.currentCycle.endedDate" },
891
+ { path: "orders.cycles.startedDate" },
892
+ { path: "orders.cycles.endedDate" }
893
+ ]
894
+ }
895
+ ])
896
+ };
897
+ return metadata;
898
+ }
899
+ return __memberListOrders;
900
+ }
901
+ function requestCancellation(payload) {
902
+ function __requestCancellation({ host }) {
903
+ const metadata = {
904
+ entityFqdn: "wix.pricing_plans.v2.order",
905
+ method: "POST",
906
+ methodFqn: "com.wixpress.membership.v2.orders.member.MemberOrdersService.RequestCancellation",
907
+ packageName: PACKAGE_NAME,
908
+ migrationOptions: {
909
+ optInTransformResponse: true
910
+ },
911
+ url: resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl({
912
+ protoPath: "/v2/member/orders/{id}/cancel",
913
+ data: payload,
914
+ host
915
+ }),
916
+ data: payload
917
+ };
918
+ return metadata;
919
+ }
920
+ return __requestCancellation;
921
+ }
922
+
923
+ // src/pricing-plans-v2-order-orders.universal.ts
924
+ var PeriodUnit = /* @__PURE__ */ ((PeriodUnit2) => {
925
+ PeriodUnit2["UNDEFINED"] = "UNDEFINED";
926
+ PeriodUnit2["DAY"] = "DAY";
927
+ PeriodUnit2["WEEK"] = "WEEK";
928
928
  PeriodUnit2["MONTH"] = "MONTH";
929
929
  PeriodUnit2["YEAR"] = "YEAR";
930
930
  return PeriodUnit2;
@@ -983,6 +983,14 @@ var Status = /* @__PURE__ */ ((Status2) => {
983
983
  Status2["ENDED"] = "ENDED";
984
984
  return Status2;
985
985
  })(Status || {});
986
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
987
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
988
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
989
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
990
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
991
+ WebhookIdentityType2["APP"] = "APP";
992
+ return WebhookIdentityType2;
993
+ })(WebhookIdentityType || {});
986
994
  var Set = /* @__PURE__ */ ((Set2) => {
987
995
  Set2["UNKNOWN_SET"] = "UNKNOWN_SET";
988
996
  Set2["BASIC"] = "BASIC";
@@ -1005,21 +1013,16 @@ var ReasonNotSuspendable = /* @__PURE__ */ ((ReasonNotSuspendable2) => {
1005
1013
  ReasonNotSuspendable2["OLD_STRIPE"] = "OLD_STRIPE";
1006
1014
  return ReasonNotSuspendable2;
1007
1015
  })(ReasonNotSuspendable || {});
1008
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
1009
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
1010
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
1011
- WebhookIdentityType2["MEMBER"] = "MEMBER";
1012
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
1013
- WebhookIdentityType2["APP"] = "APP";
1014
- return WebhookIdentityType2;
1015
- })(WebhookIdentityType || {});
1016
- async function managementGetOrder2(_id, options) {
1016
+ async function createOnlineOrder2(planId, options) {
1017
1017
  const { httpClient, sideEffects } = arguments[2];
1018
1018
  const payload = renameKeysFromSDKRequestToRESTRequest({
1019
- id: _id,
1020
- fieldSet: options?.fieldSet
1019
+ planId,
1020
+ startDate: options?.startDate,
1021
+ couponCode: options?.couponCode,
1022
+ onBehalf: options?.onBehalf,
1023
+ submissionId: options?.submissionId
1021
1024
  });
1022
- const reqOpts = managementGetOrder(payload);
1025
+ const reqOpts = createOnlineOrder(payload);
1023
1026
  sideEffects?.onSiteCall?.();
1024
1027
  try {
1025
1028
  const result = await httpClient.request(reqOpts);
@@ -1030,29 +1033,32 @@ async function managementGetOrder2(_id, options) {
1030
1033
  err,
1031
1034
  {
1032
1035
  spreadPathsToArguments: {},
1033
- explicitPathsToArguments: { id: "$[0]", fieldSet: "$[1].fieldSet" },
1036
+ explicitPathsToArguments: {
1037
+ planId: "$[0]",
1038
+ startDate: "$[1].startDate",
1039
+ couponCode: "$[1].couponCode",
1040
+ onBehalf: "$[1].onBehalf",
1041
+ submissionId: "$[1].submissionId"
1042
+ },
1034
1043
  singleArgumentUnchanged: false
1035
1044
  },
1036
- ["_id", "options"]
1045
+ ["planId", "options"]
1037
1046
  );
1038
1047
  sideEffects?.onError?.(err);
1039
1048
  throw transformedError;
1040
1049
  }
1041
1050
  }
1042
- async function managementListOrders2(options) {
1043
- const { httpClient, sideEffects } = arguments[1];
1051
+ async function createOfflineOrder2(planId, memberId, options) {
1052
+ const { httpClient, sideEffects } = arguments[3];
1044
1053
  const payload = renameKeysFromSDKRequestToRESTRequest({
1045
- buyerIds: options?.buyerIds,
1046
- planIds: options?.planIds,
1047
- autoRenewCanceled: options?.autoRenewCanceled,
1048
- orderStatuses: options?.orderStatuses,
1049
- paymentStatuses: options?.paymentStatuses,
1050
- limit: options?.limit,
1051
- offset: options?.offset,
1052
- sorting: options?.sorting,
1053
- fieldSet: options?.fieldSet
1054
+ planId,
1055
+ memberId,
1056
+ startDate: options?.startDate,
1057
+ paid: options?.paid,
1058
+ couponCode: options?.couponCode,
1059
+ submissionId: options?.submissionId
1054
1060
  });
1055
- const reqOpts = managementListOrders(payload);
1061
+ const reqOpts = createOfflineOrder(payload);
1056
1062
  sideEffects?.onSiteCall?.();
1057
1063
  try {
1058
1064
  const result = await httpClient.request(reqOpts);
@@ -1064,300 +1070,294 @@ async function managementListOrders2(options) {
1064
1070
  {
1065
1071
  spreadPathsToArguments: {},
1066
1072
  explicitPathsToArguments: {
1067
- buyerIds: "$[0].buyerIds",
1068
- planIds: "$[0].planIds",
1069
- autoRenewCanceled: "$[0].autoRenewCanceled",
1070
- orderStatuses: "$[0].orderStatuses",
1071
- paymentStatuses: "$[0].paymentStatuses",
1072
- limit: "$[0].limit",
1073
- offset: "$[0].offset",
1074
- sorting: "$[0].sorting",
1075
- fieldSet: "$[0].fieldSet"
1073
+ planId: "$[0]",
1074
+ memberId: "$[1]",
1075
+ startDate: "$[2].startDate",
1076
+ paid: "$[2].paid",
1077
+ couponCode: "$[2].couponCode",
1078
+ submissionId: "$[2].submissionId"
1076
1079
  },
1077
1080
  singleArgumentUnchanged: false
1078
1081
  },
1079
- ["options"]
1082
+ ["planId", "memberId", "options"]
1080
1083
  );
1081
1084
  sideEffects?.onError?.(err);
1082
1085
  throw transformedError;
1083
1086
  }
1084
1087
  }
1085
- async function postponeEndDate2(_id, endDate) {
1088
+ async function getOnlineOrderPreview2(planId, options) {
1086
1089
  const { httpClient, sideEffects } = arguments[2];
1087
1090
  const payload = renameKeysFromSDKRequestToRESTRequest({
1088
- id: _id,
1089
- endDate
1091
+ planId,
1092
+ startDate: options?.startDate,
1093
+ couponCode: options?.couponCode
1090
1094
  });
1091
- const reqOpts = postponeEndDate(payload);
1095
+ const reqOpts = getOnlineOrderPreview(payload);
1092
1096
  sideEffects?.onSiteCall?.();
1093
1097
  try {
1094
1098
  const result = await httpClient.request(reqOpts);
1095
1099
  sideEffects?.onSuccess?.(result);
1100
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1096
1101
  } catch (err) {
1097
1102
  const transformedError = sdkTransformError(
1098
1103
  err,
1099
1104
  {
1100
1105
  spreadPathsToArguments: {},
1101
- explicitPathsToArguments: { id: "$[0]", endDate: "$[1]" },
1106
+ explicitPathsToArguments: {
1107
+ planId: "$[0]",
1108
+ startDate: "$[1].startDate",
1109
+ couponCode: "$[1].couponCode"
1110
+ },
1102
1111
  singleArgumentUnchanged: false
1103
1112
  },
1104
- ["_id", "endDate"]
1113
+ ["planId", "options"]
1105
1114
  );
1106
1115
  sideEffects?.onError?.(err);
1107
1116
  throw transformedError;
1108
1117
  }
1109
1118
  }
1110
- async function cancelOrder2(_id, effectiveAt) {
1111
- const { httpClient, sideEffects } = arguments[2];
1119
+ async function getOfflineOrderPreview2(planId, memberId, options) {
1120
+ const { httpClient, sideEffects } = arguments[3];
1112
1121
  const payload = renameKeysFromSDKRequestToRESTRequest({
1113
- id: _id,
1114
- effectiveAt
1122
+ planId,
1123
+ memberId,
1124
+ startDate: options?.startDate,
1125
+ couponCode: options?.couponCode
1115
1126
  });
1116
- const reqOpts = cancelOrder(payload);
1127
+ const reqOpts = getOfflineOrderPreview(payload);
1117
1128
  sideEffects?.onSiteCall?.();
1118
1129
  try {
1119
1130
  const result = await httpClient.request(reqOpts);
1120
1131
  sideEffects?.onSuccess?.(result);
1132
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1121
1133
  } catch (err) {
1122
1134
  const transformedError = sdkTransformError(
1123
1135
  err,
1124
1136
  {
1125
1137
  spreadPathsToArguments: {},
1126
- explicitPathsToArguments: { id: "$[0]", effectiveAt: "$[1]" },
1138
+ explicitPathsToArguments: {
1139
+ planId: "$[0]",
1140
+ memberId: "$[1]",
1141
+ startDate: "$[2].startDate",
1142
+ couponCode: "$[2].couponCode"
1143
+ },
1127
1144
  singleArgumentUnchanged: false
1128
1145
  },
1129
- ["_id", "effectiveAt"]
1146
+ ["planId", "memberId", "options"]
1130
1147
  );
1131
1148
  sideEffects?.onError?.(err);
1132
1149
  throw transformedError;
1133
1150
  }
1134
1151
  }
1135
- async function markAsPaid2(_id) {
1136
- const { httpClient, sideEffects } = arguments[1];
1137
- const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1138
- const reqOpts = markAsPaid(payload);
1152
+ async function getPricePreview2(planId, options) {
1153
+ const { httpClient, sideEffects } = arguments[2];
1154
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1155
+ planId,
1156
+ couponCode: options?.couponCode
1157
+ });
1158
+ const reqOpts = getPricePreview(payload);
1139
1159
  sideEffects?.onSiteCall?.();
1140
1160
  try {
1141
1161
  const result = await httpClient.request(reqOpts);
1142
1162
  sideEffects?.onSuccess?.(result);
1163
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1143
1164
  } catch (err) {
1144
1165
  const transformedError = sdkTransformError(
1145
1166
  err,
1146
1167
  {
1147
1168
  spreadPathsToArguments: {},
1148
- explicitPathsToArguments: { id: "$[0]" },
1169
+ explicitPathsToArguments: {
1170
+ planId: "$[0]",
1171
+ couponCode: "$[1].couponCode"
1172
+ },
1149
1173
  singleArgumentUnchanged: false
1150
1174
  },
1151
- ["_id"]
1175
+ ["planId", "options"]
1152
1176
  );
1153
1177
  sideEffects?.onError?.(err);
1154
1178
  throw transformedError;
1155
1179
  }
1156
1180
  }
1157
- async function pauseOrder2(_id) {
1158
- const { httpClient, sideEffects } = arguments[1];
1159
- const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1160
- const reqOpts = pauseOrder(payload);
1181
+ async function managementGetOrder2(_id, options) {
1182
+ const { httpClient, sideEffects } = arguments[2];
1183
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1184
+ id: _id,
1185
+ fieldSet: options?.fieldSet
1186
+ });
1187
+ const reqOpts = managementGetOrder(payload);
1161
1188
  sideEffects?.onSiteCall?.();
1162
1189
  try {
1163
1190
  const result = await httpClient.request(reqOpts);
1164
1191
  sideEffects?.onSuccess?.(result);
1192
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1165
1193
  } catch (err) {
1166
1194
  const transformedError = sdkTransformError(
1167
1195
  err,
1168
1196
  {
1169
1197
  spreadPathsToArguments: {},
1170
- explicitPathsToArguments: { id: "$[0]" },
1198
+ explicitPathsToArguments: { id: "$[0]", fieldSet: "$[1].fieldSet" },
1171
1199
  singleArgumentUnchanged: false
1172
1200
  },
1173
- ["_id"]
1201
+ ["_id", "options"]
1174
1202
  );
1175
1203
  sideEffects?.onError?.(err);
1176
1204
  throw transformedError;
1177
1205
  }
1178
1206
  }
1179
- async function resumeOrder2(_id) {
1207
+ async function managementListOrders2(options) {
1180
1208
  const { httpClient, sideEffects } = arguments[1];
1181
- const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1182
- const reqOpts = resumeOrder(payload);
1209
+ const payload = renameKeysFromSDKRequestToRESTRequest({
1210
+ buyerIds: options?.buyerIds,
1211
+ planIds: options?.planIds,
1212
+ autoRenewCanceled: options?.autoRenewCanceled,
1213
+ orderStatuses: options?.orderStatuses,
1214
+ paymentStatuses: options?.paymentStatuses,
1215
+ limit: options?.limit,
1216
+ offset: options?.offset,
1217
+ sorting: options?.sorting,
1218
+ fieldSet: options?.fieldSet
1219
+ });
1220
+ const reqOpts = managementListOrders(payload);
1183
1221
  sideEffects?.onSiteCall?.();
1184
1222
  try {
1185
1223
  const result = await httpClient.request(reqOpts);
1186
1224
  sideEffects?.onSuccess?.(result);
1225
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
1187
1226
  } catch (err) {
1188
1227
  const transformedError = sdkTransformError(
1189
1228
  err,
1190
1229
  {
1191
1230
  spreadPathsToArguments: {},
1192
- explicitPathsToArguments: { id: "$[0]" },
1231
+ explicitPathsToArguments: {
1232
+ buyerIds: "$[0].buyerIds",
1233
+ planIds: "$[0].planIds",
1234
+ autoRenewCanceled: "$[0].autoRenewCanceled",
1235
+ orderStatuses: "$[0].orderStatuses",
1236
+ paymentStatuses: "$[0].paymentStatuses",
1237
+ limit: "$[0].limit",
1238
+ offset: "$[0].offset",
1239
+ sorting: "$[0].sorting",
1240
+ fieldSet: "$[0].fieldSet"
1241
+ },
1193
1242
  singleArgumentUnchanged: false
1194
1243
  },
1195
- ["_id"]
1244
+ ["options"]
1196
1245
  );
1197
1246
  sideEffects?.onError?.(err);
1198
1247
  throw transformedError;
1199
1248
  }
1200
1249
  }
1201
- async function createOnlineOrder2(planId, options) {
1250
+ async function postponeEndDate2(_id, endDate) {
1202
1251
  const { httpClient, sideEffects } = arguments[2];
1203
1252
  const payload = renameKeysFromSDKRequestToRESTRequest({
1204
- planId,
1205
- startDate: options?.startDate,
1206
- couponCode: options?.couponCode,
1207
- onBehalf: options?.onBehalf,
1208
- submissionId: options?.submissionId
1253
+ id: _id,
1254
+ endDate
1209
1255
  });
1210
- const reqOpts = createOnlineOrder(payload);
1256
+ const reqOpts = postponeEndDate(payload);
1211
1257
  sideEffects?.onSiteCall?.();
1212
1258
  try {
1213
1259
  const result = await httpClient.request(reqOpts);
1214
1260
  sideEffects?.onSuccess?.(result);
1215
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1216
1261
  } catch (err) {
1217
1262
  const transformedError = sdkTransformError(
1218
1263
  err,
1219
1264
  {
1220
1265
  spreadPathsToArguments: {},
1221
- explicitPathsToArguments: {
1222
- planId: "$[0]",
1223
- startDate: "$[1].startDate",
1224
- couponCode: "$[1].couponCode",
1225
- onBehalf: "$[1].onBehalf",
1226
- submissionId: "$[1].submissionId"
1227
- },
1266
+ explicitPathsToArguments: { id: "$[0]", endDate: "$[1]" },
1228
1267
  singleArgumentUnchanged: false
1229
1268
  },
1230
- ["planId", "options"]
1269
+ ["_id", "endDate"]
1231
1270
  );
1232
1271
  sideEffects?.onError?.(err);
1233
1272
  throw transformedError;
1234
1273
  }
1235
1274
  }
1236
- async function createOfflineOrder2(planId, memberId, options) {
1237
- const { httpClient, sideEffects } = arguments[3];
1275
+ async function cancelOrder2(_id, effectiveAt) {
1276
+ const { httpClient, sideEffects } = arguments[2];
1238
1277
  const payload = renameKeysFromSDKRequestToRESTRequest({
1239
- planId,
1240
- memberId,
1241
- startDate: options?.startDate,
1242
- paid: options?.paid,
1243
- couponCode: options?.couponCode,
1244
- submissionId: options?.submissionId
1278
+ id: _id,
1279
+ effectiveAt
1245
1280
  });
1246
- const reqOpts = createOfflineOrder(payload);
1281
+ const reqOpts = cancelOrder(payload);
1247
1282
  sideEffects?.onSiteCall?.();
1248
1283
  try {
1249
1284
  const result = await httpClient.request(reqOpts);
1250
1285
  sideEffects?.onSuccess?.(result);
1251
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1252
1286
  } catch (err) {
1253
1287
  const transformedError = sdkTransformError(
1254
1288
  err,
1255
1289
  {
1256
1290
  spreadPathsToArguments: {},
1257
- explicitPathsToArguments: {
1258
- planId: "$[0]",
1259
- memberId: "$[1]",
1260
- startDate: "$[2].startDate",
1261
- paid: "$[2].paid",
1262
- couponCode: "$[2].couponCode",
1263
- submissionId: "$[2].submissionId"
1264
- },
1291
+ explicitPathsToArguments: { id: "$[0]", effectiveAt: "$[1]" },
1265
1292
  singleArgumentUnchanged: false
1266
1293
  },
1267
- ["planId", "memberId", "options"]
1294
+ ["_id", "effectiveAt"]
1268
1295
  );
1269
1296
  sideEffects?.onError?.(err);
1270
1297
  throw transformedError;
1271
1298
  }
1272
1299
  }
1273
- async function getOnlineOrderPreview2(planId, options) {
1274
- const { httpClient, sideEffects } = arguments[2];
1275
- const payload = renameKeysFromSDKRequestToRESTRequest({
1276
- planId,
1277
- startDate: options?.startDate,
1278
- couponCode: options?.couponCode
1279
- });
1280
- const reqOpts = getOnlineOrderPreview(payload);
1300
+ async function markAsPaid2(_id) {
1301
+ const { httpClient, sideEffects } = arguments[1];
1302
+ const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1303
+ const reqOpts = markAsPaid(payload);
1281
1304
  sideEffects?.onSiteCall?.();
1282
1305
  try {
1283
1306
  const result = await httpClient.request(reqOpts);
1284
1307
  sideEffects?.onSuccess?.(result);
1285
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1286
1308
  } catch (err) {
1287
1309
  const transformedError = sdkTransformError(
1288
1310
  err,
1289
1311
  {
1290
1312
  spreadPathsToArguments: {},
1291
- explicitPathsToArguments: {
1292
- planId: "$[0]",
1293
- startDate: "$[1].startDate",
1294
- couponCode: "$[1].couponCode"
1295
- },
1313
+ explicitPathsToArguments: { id: "$[0]" },
1296
1314
  singleArgumentUnchanged: false
1297
1315
  },
1298
- ["planId", "options"]
1316
+ ["_id"]
1299
1317
  );
1300
1318
  sideEffects?.onError?.(err);
1301
1319
  throw transformedError;
1302
1320
  }
1303
1321
  }
1304
- async function getOfflineOrderPreview2(planId, memberId, options) {
1305
- const { httpClient, sideEffects } = arguments[3];
1306
- const payload = renameKeysFromSDKRequestToRESTRequest({
1307
- planId,
1308
- memberId,
1309
- startDate: options?.startDate,
1310
- couponCode: options?.couponCode
1311
- });
1312
- const reqOpts = getOfflineOrderPreview(payload);
1322
+ async function pauseOrder2(_id) {
1323
+ const { httpClient, sideEffects } = arguments[1];
1324
+ const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1325
+ const reqOpts = pauseOrder(payload);
1313
1326
  sideEffects?.onSiteCall?.();
1314
1327
  try {
1315
1328
  const result = await httpClient.request(reqOpts);
1316
1329
  sideEffects?.onSuccess?.(result);
1317
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1318
1330
  } catch (err) {
1319
1331
  const transformedError = sdkTransformError(
1320
1332
  err,
1321
1333
  {
1322
1334
  spreadPathsToArguments: {},
1323
- explicitPathsToArguments: {
1324
- planId: "$[0]",
1325
- memberId: "$[1]",
1326
- startDate: "$[2].startDate",
1327
- couponCode: "$[2].couponCode"
1328
- },
1335
+ explicitPathsToArguments: { id: "$[0]" },
1329
1336
  singleArgumentUnchanged: false
1330
1337
  },
1331
- ["planId", "memberId", "options"]
1338
+ ["_id"]
1332
1339
  );
1333
1340
  sideEffects?.onError?.(err);
1334
1341
  throw transformedError;
1335
1342
  }
1336
1343
  }
1337
- async function getPricePreview2(planId, options) {
1338
- const { httpClient, sideEffects } = arguments[2];
1339
- const payload = renameKeysFromSDKRequestToRESTRequest({
1340
- planId,
1341
- couponCode: options?.couponCode
1342
- });
1343
- const reqOpts = getPricePreview(payload);
1344
+ async function resumeOrder2(_id) {
1345
+ const { httpClient, sideEffects } = arguments[1];
1346
+ const payload = renameKeysFromSDKRequestToRESTRequest({ id: _id });
1347
+ const reqOpts = resumeOrder(payload);
1344
1348
  sideEffects?.onSiteCall?.();
1345
1349
  try {
1346
1350
  const result = await httpClient.request(reqOpts);
1347
1351
  sideEffects?.onSuccess?.(result);
1348
- return renameKeysFromRESTResponseToSDKResponse(result.data);
1349
1352
  } catch (err) {
1350
1353
  const transformedError = sdkTransformError(
1351
1354
  err,
1352
1355
  {
1353
- spreadPathsToArguments: {},
1354
- explicitPathsToArguments: {
1355
- planId: "$[0]",
1356
- couponCode: "$[1].couponCode"
1357
- },
1356
+ spreadPathsToArguments: {},
1357
+ explicitPathsToArguments: { id: "$[0]" },
1358
1358
  singleArgumentUnchanged: false
1359
1359
  },
1360
- ["planId", "options"]
1360
+ ["_id"]
1361
1361
  );
1362
1362
  sideEffects?.onError?.(err);
1363
1363
  throw transformedError;
@@ -1457,6 +1457,48 @@ async function requestCancellation2(_id, effectiveAt) {
1457
1457
  }
1458
1458
 
1459
1459
  // src/pricing-plans-v2-order-orders.public.ts
1460
+ function createOnlineOrder3(httpClient) {
1461
+ return (planId, options) => createOnlineOrder2(
1462
+ planId,
1463
+ options,
1464
+ // @ts-ignore
1465
+ { httpClient }
1466
+ );
1467
+ }
1468
+ function createOfflineOrder3(httpClient) {
1469
+ return (planId, memberId, options) => createOfflineOrder2(
1470
+ planId,
1471
+ memberId,
1472
+ options,
1473
+ // @ts-ignore
1474
+ { httpClient }
1475
+ );
1476
+ }
1477
+ function getOnlineOrderPreview3(httpClient) {
1478
+ return (planId, options) => getOnlineOrderPreview2(
1479
+ planId,
1480
+ options,
1481
+ // @ts-ignore
1482
+ { httpClient }
1483
+ );
1484
+ }
1485
+ function getOfflineOrderPreview3(httpClient) {
1486
+ return (planId, memberId, options) => getOfflineOrderPreview2(
1487
+ planId,
1488
+ memberId,
1489
+ options,
1490
+ // @ts-ignore
1491
+ { httpClient }
1492
+ );
1493
+ }
1494
+ function getPricePreview3(httpClient) {
1495
+ return (planId, options) => getPricePreview2(
1496
+ planId,
1497
+ options,
1498
+ // @ts-ignore
1499
+ { httpClient }
1500
+ );
1501
+ }
1460
1502
  function managementGetOrder3(httpClient) {
1461
1503
  return (_id, options) => managementGetOrder2(
1462
1504
  _id,
@@ -1509,48 +1551,6 @@ function resumeOrder3(httpClient) {
1509
1551
  { httpClient }
1510
1552
  );
1511
1553
  }
1512
- function createOnlineOrder3(httpClient) {
1513
- return (planId, options) => createOnlineOrder2(
1514
- planId,
1515
- options,
1516
- // @ts-ignore
1517
- { httpClient }
1518
- );
1519
- }
1520
- function createOfflineOrder3(httpClient) {
1521
- return (planId, memberId, options) => createOfflineOrder2(
1522
- planId,
1523
- memberId,
1524
- options,
1525
- // @ts-ignore
1526
- { httpClient }
1527
- );
1528
- }
1529
- function getOnlineOrderPreview3(httpClient) {
1530
- return (planId, options) => getOnlineOrderPreview2(
1531
- planId,
1532
- options,
1533
- // @ts-ignore
1534
- { httpClient }
1535
- );
1536
- }
1537
- function getOfflineOrderPreview3(httpClient) {
1538
- return (planId, memberId, options) => getOfflineOrderPreview2(
1539
- planId,
1540
- memberId,
1541
- options,
1542
- // @ts-ignore
1543
- { httpClient }
1544
- );
1545
- }
1546
- function getPricePreview3(httpClient) {
1547
- return (planId, options) => getPricePreview2(
1548
- planId,
1549
- options,
1550
- // @ts-ignore
1551
- { httpClient }
1552
- );
1553
- }
1554
1554
  function memberGetOrder3(httpClient) {
1555
1555
  return (_id, options) => memberGetOrder2(
1556
1556
  _id,
@@ -1574,34 +1574,34 @@ function requestCancellation3(httpClient) {
1574
1574
  { httpClient }
1575
1575
  );
1576
1576
  }
1577
- var onOrderAutoRenewCanceled = /* @__PURE__ */ EventDefinition(
1578
- "wix.pricing_plans.v2.order_auto_renew_canceled",
1577
+ var onOrderCreated = /* @__PURE__ */ EventDefinition(
1578
+ "wix.pricing_plans.v2.order_created",
1579
1579
  true,
1580
1580
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1581
1581
  transformPaths2(event, [
1582
1582
  {
1583
1583
  transformFn: transformRESTTimestampToSDKTimestamp2,
1584
1584
  paths: [
1585
- { path: "data.order.startDate" },
1586
- { path: "data.order.endDate" },
1587
- { path: "data.order.earliestEndDate" },
1588
- { path: "data.order.createdDate" },
1589
- { path: "data.order.updatedDate" },
1590
- { path: "data.order.cancellation.requestedDate" },
1591
- { path: "data.order.pausePeriods.pauseDate" },
1592
- { path: "data.order.pausePeriods.resumeDate" },
1593
- { path: "data.order.currentCycle.startedDate" },
1594
- { path: "data.order.currentCycle.endedDate" },
1595
- { path: "data.order.cycles.startedDate" },
1596
- { path: "data.order.cycles.endedDate" },
1585
+ { path: "entity.startDate" },
1586
+ { path: "entity.endDate" },
1587
+ { path: "entity.earliestEndDate" },
1588
+ { path: "entity.createdDate" },
1589
+ { path: "entity.updatedDate" },
1590
+ { path: "entity.cancellation.requestedDate" },
1591
+ { path: "entity.pausePeriods.pauseDate" },
1592
+ { path: "entity.pausePeriods.resumeDate" },
1593
+ { path: "entity.currentCycle.startedDate" },
1594
+ { path: "entity.currentCycle.endedDate" },
1595
+ { path: "entity.cycles.startedDate" },
1596
+ { path: "entity.cycles.endedDate" },
1597
1597
  { path: "metadata.eventTime" }
1598
1598
  ]
1599
1599
  }
1600
1600
  ])
1601
1601
  )
1602
1602
  )();
1603
- var onOrderCanceled = /* @__PURE__ */ EventDefinition(
1604
- "wix.pricing_plans.v2.order_canceled",
1603
+ var onOrderStartDateChanged = /* @__PURE__ */ EventDefinition(
1604
+ "wix.pricing_plans.v2.order_start_date_changed",
1605
1605
  true,
1606
1606
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1607
1607
  transformPaths2(event, [
@@ -1626,34 +1626,34 @@ var onOrderCanceled = /* @__PURE__ */ EventDefinition(
1626
1626
  ])
1627
1627
  )
1628
1628
  )();
1629
- var onOrderCycleStarted = /* @__PURE__ */ EventDefinition(
1630
- "wix.pricing_plans.v2.order_cycle_started",
1629
+ var onOrderUpdated = /* @__PURE__ */ EventDefinition(
1630
+ "wix.pricing_plans.v2.order_updated",
1631
1631
  true,
1632
1632
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1633
1633
  transformPaths2(event, [
1634
1634
  {
1635
1635
  transformFn: transformRESTTimestampToSDKTimestamp2,
1636
1636
  paths: [
1637
- { path: "data.order.startDate" },
1638
- { path: "data.order.endDate" },
1639
- { path: "data.order.earliestEndDate" },
1640
- { path: "data.order.createdDate" },
1641
- { path: "data.order.updatedDate" },
1642
- { path: "data.order.cancellation.requestedDate" },
1643
- { path: "data.order.pausePeriods.pauseDate" },
1644
- { path: "data.order.pausePeriods.resumeDate" },
1645
- { path: "data.order.currentCycle.startedDate" },
1646
- { path: "data.order.currentCycle.endedDate" },
1647
- { path: "data.order.cycles.startedDate" },
1648
- { path: "data.order.cycles.endedDate" },
1637
+ { path: "entity.startDate" },
1638
+ { path: "entity.endDate" },
1639
+ { path: "entity.earliestEndDate" },
1640
+ { path: "entity.createdDate" },
1641
+ { path: "entity.updatedDate" },
1642
+ { path: "entity.cancellation.requestedDate" },
1643
+ { path: "entity.pausePeriods.pauseDate" },
1644
+ { path: "entity.pausePeriods.resumeDate" },
1645
+ { path: "entity.currentCycle.startedDate" },
1646
+ { path: "entity.currentCycle.endedDate" },
1647
+ { path: "entity.cycles.startedDate" },
1648
+ { path: "entity.cycles.endedDate" },
1649
1649
  { path: "metadata.eventTime" }
1650
1650
  ]
1651
1651
  }
1652
1652
  ])
1653
1653
  )
1654
1654
  )();
1655
- var onOrderEndDatePostponed = /* @__PURE__ */ EventDefinition(
1656
- "wix.pricing_plans.v2.order_end_date_postponed",
1655
+ var onOrderAutoRenewCanceled = /* @__PURE__ */ EventDefinition(
1656
+ "wix.pricing_plans.v2.order_auto_renew_canceled",
1657
1657
  true,
1658
1658
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1659
1659
  transformPaths2(event, [
@@ -1678,8 +1678,8 @@ var onOrderEndDatePostponed = /* @__PURE__ */ EventDefinition(
1678
1678
  ])
1679
1679
  )
1680
1680
  )();
1681
- var onOrderEnded = /* @__PURE__ */ EventDefinition(
1682
- "wix.pricing_plans.v2.order_ended",
1681
+ var onOrderCanceled = /* @__PURE__ */ EventDefinition(
1682
+ "wix.pricing_plans.v2.order_canceled",
1683
1683
  true,
1684
1684
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1685
1685
  transformPaths2(event, [
@@ -1704,8 +1704,8 @@ var onOrderEnded = /* @__PURE__ */ EventDefinition(
1704
1704
  ])
1705
1705
  )
1706
1706
  )();
1707
- var onOrderMarkedAsPaid = /* @__PURE__ */ EventDefinition(
1708
- "wix.pricing_plans.v2.order_marked_as_paid",
1707
+ var onOrderCycleStarted = /* @__PURE__ */ EventDefinition(
1708
+ "wix.pricing_plans.v2.order_cycle_started",
1709
1709
  true,
1710
1710
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1711
1711
  transformPaths2(event, [
@@ -1730,8 +1730,8 @@ var onOrderMarkedAsPaid = /* @__PURE__ */ EventDefinition(
1730
1730
  ])
1731
1731
  )
1732
1732
  )();
1733
- var onOrderPaused = /* @__PURE__ */ EventDefinition(
1734
- "wix.pricing_plans.v2.order_paused",
1733
+ var onOrderEndDatePostponed = /* @__PURE__ */ EventDefinition(
1734
+ "wix.pricing_plans.v2.order_end_date_postponed",
1735
1735
  true,
1736
1736
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1737
1737
  transformPaths2(event, [
@@ -1756,8 +1756,8 @@ var onOrderPaused = /* @__PURE__ */ EventDefinition(
1756
1756
  ])
1757
1757
  )
1758
1758
  )();
1759
- var onOrderPurchased = /* @__PURE__ */ EventDefinition(
1760
- "wix.pricing_plans.v2.order_purchased",
1759
+ var onOrderEnded = /* @__PURE__ */ EventDefinition(
1760
+ "wix.pricing_plans.v2.order_ended",
1761
1761
  true,
1762
1762
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1763
1763
  transformPaths2(event, [
@@ -1782,8 +1782,8 @@ var onOrderPurchased = /* @__PURE__ */ EventDefinition(
1782
1782
  ])
1783
1783
  )
1784
1784
  )();
1785
- var onOrderResumed = /* @__PURE__ */ EventDefinition(
1786
- "wix.pricing_plans.v2.order_resumed",
1785
+ var onOrderMarkedAsPaid = /* @__PURE__ */ EventDefinition(
1786
+ "wix.pricing_plans.v2.order_marked_as_paid",
1787
1787
  true,
1788
1788
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1789
1789
  transformPaths2(event, [
@@ -1808,8 +1808,8 @@ var onOrderResumed = /* @__PURE__ */ EventDefinition(
1808
1808
  ])
1809
1809
  )
1810
1810
  )();
1811
- var onOrderStarted = /* @__PURE__ */ EventDefinition(
1812
- "wix.pricing_plans.v2.order_started",
1811
+ var onOrderPaused = /* @__PURE__ */ EventDefinition(
1812
+ "wix.pricing_plans.v2.order_paused",
1813
1813
  true,
1814
1814
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1815
1815
  transformPaths2(event, [
@@ -1834,60 +1834,60 @@ var onOrderStarted = /* @__PURE__ */ EventDefinition(
1834
1834
  ])
1835
1835
  )
1836
1836
  )();
1837
- var onOrderUpdated = /* @__PURE__ */ EventDefinition(
1838
- "wix.pricing_plans.v2.order_updated",
1837
+ var onOrderPurchased = /* @__PURE__ */ EventDefinition(
1838
+ "wix.pricing_plans.v2.order_purchased",
1839
1839
  true,
1840
1840
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1841
1841
  transformPaths2(event, [
1842
1842
  {
1843
1843
  transformFn: transformRESTTimestampToSDKTimestamp2,
1844
1844
  paths: [
1845
- { path: "entity.startDate" },
1846
- { path: "entity.endDate" },
1847
- { path: "entity.earliestEndDate" },
1848
- { path: "entity.createdDate" },
1849
- { path: "entity.updatedDate" },
1850
- { path: "entity.cancellation.requestedDate" },
1851
- { path: "entity.pausePeriods.pauseDate" },
1852
- { path: "entity.pausePeriods.resumeDate" },
1853
- { path: "entity.currentCycle.startedDate" },
1854
- { path: "entity.currentCycle.endedDate" },
1855
- { path: "entity.cycles.startedDate" },
1856
- { path: "entity.cycles.endedDate" },
1845
+ { path: "data.order.startDate" },
1846
+ { path: "data.order.endDate" },
1847
+ { path: "data.order.earliestEndDate" },
1848
+ { path: "data.order.createdDate" },
1849
+ { path: "data.order.updatedDate" },
1850
+ { path: "data.order.cancellation.requestedDate" },
1851
+ { path: "data.order.pausePeriods.pauseDate" },
1852
+ { path: "data.order.pausePeriods.resumeDate" },
1853
+ { path: "data.order.currentCycle.startedDate" },
1854
+ { path: "data.order.currentCycle.endedDate" },
1855
+ { path: "data.order.cycles.startedDate" },
1856
+ { path: "data.order.cycles.endedDate" },
1857
1857
  { path: "metadata.eventTime" }
1858
1858
  ]
1859
1859
  }
1860
1860
  ])
1861
1861
  )
1862
1862
  )();
1863
- var onOrderCreated = /* @__PURE__ */ EventDefinition(
1864
- "wix.pricing_plans.v2.order_created",
1863
+ var onOrderResumed = /* @__PURE__ */ EventDefinition(
1864
+ "wix.pricing_plans.v2.order_resumed",
1865
1865
  true,
1866
1866
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1867
1867
  transformPaths2(event, [
1868
1868
  {
1869
1869
  transformFn: transformRESTTimestampToSDKTimestamp2,
1870
1870
  paths: [
1871
- { path: "entity.startDate" },
1872
- { path: "entity.endDate" },
1873
- { path: "entity.earliestEndDate" },
1874
- { path: "entity.createdDate" },
1875
- { path: "entity.updatedDate" },
1876
- { path: "entity.cancellation.requestedDate" },
1877
- { path: "entity.pausePeriods.pauseDate" },
1878
- { path: "entity.pausePeriods.resumeDate" },
1879
- { path: "entity.currentCycle.startedDate" },
1880
- { path: "entity.currentCycle.endedDate" },
1881
- { path: "entity.cycles.startedDate" },
1882
- { path: "entity.cycles.endedDate" },
1871
+ { path: "data.order.startDate" },
1872
+ { path: "data.order.endDate" },
1873
+ { path: "data.order.earliestEndDate" },
1874
+ { path: "data.order.createdDate" },
1875
+ { path: "data.order.updatedDate" },
1876
+ { path: "data.order.cancellation.requestedDate" },
1877
+ { path: "data.order.pausePeriods.pauseDate" },
1878
+ { path: "data.order.pausePeriods.resumeDate" },
1879
+ { path: "data.order.currentCycle.startedDate" },
1880
+ { path: "data.order.currentCycle.endedDate" },
1881
+ { path: "data.order.cycles.startedDate" },
1882
+ { path: "data.order.cycles.endedDate" },
1883
1883
  { path: "metadata.eventTime" }
1884
1884
  ]
1885
1885
  }
1886
1886
  ])
1887
1887
  )
1888
1888
  )();
1889
- var onOrderStartDateChanged = /* @__PURE__ */ EventDefinition(
1890
- "wix.pricing_plans.v2.order_start_date_changed",
1889
+ var onOrderStarted = /* @__PURE__ */ EventDefinition(
1890
+ "wix.pricing_plans.v2.order_started",
1891
1891
  true,
1892
1892
  (event) => renameKeysFromRESTResponseToSDKResponse2(
1893
1893
  transformPaths2(event, [
@@ -1916,6 +1916,11 @@ var onOrderStartDateChanged = /* @__PURE__ */ EventDefinition(
1916
1916
  // src/pricing-plans-v2-order-orders.context.ts
1917
1917
  import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
1918
1918
  import { createEventModule } from "@wix/sdk-runtime/event-definition-modules";
1919
+ var createOnlineOrder4 = /* @__PURE__ */ createRESTModule(createOnlineOrder3);
1920
+ var createOfflineOrder4 = /* @__PURE__ */ createRESTModule(createOfflineOrder3);
1921
+ var getOnlineOrderPreview4 = /* @__PURE__ */ createRESTModule(getOnlineOrderPreview3);
1922
+ var getOfflineOrderPreview4 = /* @__PURE__ */ createRESTModule(getOfflineOrderPreview3);
1923
+ var getPricePreview4 = /* @__PURE__ */ createRESTModule(getPricePreview3);
1919
1924
  var managementGetOrder4 = /* @__PURE__ */ createRESTModule(managementGetOrder3);
1920
1925
  var managementListOrders4 = /* @__PURE__ */ createRESTModule(managementListOrders3);
1921
1926
  var postponeEndDate4 = /* @__PURE__ */ createRESTModule(postponeEndDate3);
@@ -1923,14 +1928,14 @@ var cancelOrder4 = /* @__PURE__ */ createRESTModule(cancelOrder3);
1923
1928
  var markAsPaid4 = /* @__PURE__ */ createRESTModule(markAsPaid3);
1924
1929
  var pauseOrder4 = /* @__PURE__ */ createRESTModule(pauseOrder3);
1925
1930
  var resumeOrder4 = /* @__PURE__ */ createRESTModule(resumeOrder3);
1926
- var createOnlineOrder4 = /* @__PURE__ */ createRESTModule(createOnlineOrder3);
1927
- var createOfflineOrder4 = /* @__PURE__ */ createRESTModule(createOfflineOrder3);
1928
- var getOnlineOrderPreview4 = /* @__PURE__ */ createRESTModule(getOnlineOrderPreview3);
1929
- var getOfflineOrderPreview4 = /* @__PURE__ */ createRESTModule(getOfflineOrderPreview3);
1930
- var getPricePreview4 = /* @__PURE__ */ createRESTModule(getPricePreview3);
1931
1931
  var memberGetOrder4 = /* @__PURE__ */ createRESTModule(memberGetOrder3);
1932
1932
  var memberListOrders4 = /* @__PURE__ */ createRESTModule(memberListOrders3);
1933
1933
  var requestCancellation4 = /* @__PURE__ */ createRESTModule(requestCancellation3);
1934
+ var onOrderCreated2 = /* @__PURE__ */ createEventModule(onOrderCreated);
1935
+ var onOrderStartDateChanged2 = /* @__PURE__ */ createEventModule(
1936
+ onOrderStartDateChanged
1937
+ );
1938
+ var onOrderUpdated2 = /* @__PURE__ */ createEventModule(onOrderUpdated);
1934
1939
  var onOrderAutoRenewCanceled2 = /* @__PURE__ */ createEventModule(
1935
1940
  onOrderAutoRenewCanceled
1936
1941
  );
@@ -1953,11 +1958,6 @@ var onOrderPurchased2 = /* @__PURE__ */ createEventModule(
1953
1958
  );
1954
1959
  var onOrderResumed2 = /* @__PURE__ */ createEventModule(onOrderResumed);
1955
1960
  var onOrderStarted2 = /* @__PURE__ */ createEventModule(onOrderStarted);
1956
- var onOrderUpdated2 = /* @__PURE__ */ createEventModule(onOrderUpdated);
1957
- var onOrderCreated2 = /* @__PURE__ */ createEventModule(onOrderCreated);
1958
- var onOrderStartDateChanged2 = /* @__PURE__ */ createEventModule(
1959
- onOrderStartDateChanged
1960
- );
1961
1961
  export {
1962
1962
  CancellationCause,
1963
1963
  CancellationEffectiveAt,