@wix/auto_sdk_pricing-plans_orders 1.0.122 → 1.0.124

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.
@@ -1,1304 +0,0 @@
1
- // src/pricing-plans-v2-order-orders.http.ts
2
- import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
3
- import { transformSDKFloatToRESTFloat } from "@wix/sdk-runtime/transformations/float";
4
- import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
5
- import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
6
- import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
7
- import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
8
- function resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl(opts) {
9
- const domainToMappings = {
10
- "api._api_base_domain_": [
11
- {
12
- srcPath: "/member-orders-service-proxy",
13
- destPath: ""
14
- }
15
- ],
16
- "*.dev.wix-code.com": [
17
- {
18
- srcPath: "/_api/pricing-plans-member-orders/v2/member/orders",
19
- destPath: "/v2/member/orders"
20
- },
21
- {
22
- srcPath: "/_api/pricing-plans/v2/member/orders",
23
- destPath: "/v2/member/orders"
24
- }
25
- ],
26
- "*.pub.wix-code.com": [
27
- {
28
- srcPath: "/_api/pricing-plans-member-orders/v2/member/orders",
29
- destPath: "/v2/member/orders"
30
- },
31
- {
32
- srcPath: "/_api/pricing-plans/v2/member/orders",
33
- destPath: "/v2/member/orders"
34
- }
35
- ],
36
- "editor.wixapps.net": [
37
- {
38
- srcPath: "/_api/pricing-plans/v2/member/orders",
39
- destPath: "/v2/member/orders"
40
- }
41
- ],
42
- "manage._base_domain_": [
43
- {
44
- srcPath: "/_api/pricing-plans/v2/member/orders",
45
- destPath: "/v2/member/orders"
46
- }
47
- ],
48
- "www._base_domain_": [
49
- {
50
- srcPath: "/_api/pricing-plans/v2/member/orders",
51
- destPath: "/v2/member/orders"
52
- }
53
- ],
54
- "www.wixapis.com": [
55
- {
56
- srcPath: "/pricing-plans/v2/member/orders",
57
- destPath: "/v2/member/orders"
58
- }
59
- ],
60
- _: [
61
- {
62
- srcPath: "/_api/pricing-plans/v2/member/orders",
63
- destPath: "/v2/member/orders"
64
- }
65
- ],
66
- "editor._base_domain_": [
67
- {
68
- srcPath: "/_api/pricing-plans/v2/member/orders",
69
- destPath: "/v2/member/orders"
70
- }
71
- ],
72
- "blocks._base_domain_": [
73
- {
74
- srcPath: "/_api/pricing-plans/v2/member/orders",
75
- destPath: "/v2/member/orders"
76
- }
77
- ],
78
- "create.editorx": [
79
- {
80
- srcPath: "/_api/pricing-plans/v2/member/orders",
81
- destPath: "/v2/member/orders"
82
- }
83
- ],
84
- "apps._base_domain_": [
85
- {
86
- srcPath: "/_api/pricing-plans/v2/member/orders",
87
- destPath: "/v2/member/orders"
88
- }
89
- ],
90
- "dev._base_domain_": [
91
- {
92
- srcPath: "/_api/pricing-plans/v2/member/orders",
93
- destPath: "/v2/member/orders"
94
- }
95
- ]
96
- };
97
- return resolveUrl(Object.assign(opts, { domainToMappings }));
98
- }
99
- function resolveComWixpressMembershipV2OrdersCheckoutServiceUrl(opts) {
100
- const domainToMappings = {
101
- "api._api_base_domain_": [
102
- {
103
- srcPath: "/pricing-plans-checkout-proxy",
104
- destPath: ""
105
- }
106
- ],
107
- "*.dev.wix-code.com": [
108
- {
109
- srcPath: "/_api/paid-plans/v2/checkout",
110
- destPath: "/v2/checkout"
111
- },
112
- {
113
- srcPath: "/_api/pricing-plans/v2/checkout",
114
- destPath: "/v2/checkout"
115
- }
116
- ],
117
- "*.wixapps.net": [
118
- {
119
- srcPath: "/_api/paid-plans/v2/checkout",
120
- destPath: "/v2/checkout"
121
- }
122
- ],
123
- "editor-flow.wixapps.net": [
124
- {
125
- srcPath: "/_api/paid-plans/v2/checkout",
126
- destPath: "/v2/checkout"
127
- }
128
- ],
129
- "editor._base_domain_": [
130
- {
131
- srcPath: "/_api/paid-plans/v2/checkout",
132
- destPath: "/v2/checkout"
133
- },
134
- {
135
- srcPath: "/_api/pricing-plans/v2/checkout",
136
- destPath: "/v2/checkout"
137
- }
138
- ],
139
- "blocks._base_domain_": [
140
- {
141
- srcPath: "/_api/paid-plans/v2/checkout",
142
- destPath: "/v2/checkout"
143
- },
144
- {
145
- srcPath: "/_api/pricing-plans/v2/checkout",
146
- destPath: "/v2/checkout"
147
- }
148
- ],
149
- "create.editorx": [
150
- {
151
- srcPath: "/_api/paid-plans/v2/checkout",
152
- destPath: "/v2/checkout"
153
- },
154
- {
155
- srcPath: "/_api/pricing-plans/v2/checkout",
156
- destPath: "/v2/checkout"
157
- }
158
- ],
159
- "editor.wixapps.net": [
160
- {
161
- srcPath: "/_api/paid-plans/v2/checkout",
162
- destPath: "/v2/checkout"
163
- },
164
- {
165
- srcPath: "/_api/pricing-plans/v2/checkout",
166
- destPath: "/v2/checkout"
167
- }
168
- ],
169
- "forums._base_domain_": [
170
- {
171
- srcPath: "/_api/paid-plans/v2/checkout",
172
- destPath: "/v2/checkout"
173
- }
174
- ],
175
- "forums.wixapps.net": [
176
- {
177
- srcPath: "/_api/paid-plans/v2/checkout",
178
- destPath: "/v2/checkout"
179
- }
180
- ],
181
- "manage._base_domain_": [
182
- {
183
- srcPath: "/_api/pricing-plans/v2/checkout",
184
- destPath: "/v2/checkout"
185
- },
186
- {
187
- srcPath: "/_api/paid-plans/v2/checkout",
188
- destPath: "/v2/checkout"
189
- },
190
- {
191
- srcPath: "/pricing-plans/v2/checkout",
192
- destPath: "/v2/checkout"
193
- }
194
- ],
195
- "www.wixapis.com": [
196
- {
197
- srcPath: "/pricing-plans/v2/checkout",
198
- destPath: "/v2/checkout"
199
- }
200
- ],
201
- _: [
202
- {
203
- srcPath: "/pricing-plans/v2/checkout",
204
- destPath: "/v2/checkout"
205
- },
206
- {
207
- srcPath: "/_api/paid-plans/v2/checkout",
208
- destPath: "/v2/checkout"
209
- },
210
- {
211
- srcPath: "/_api/pricing-plans/v2/checkout",
212
- destPath: "/v2/checkout"
213
- }
214
- ],
215
- "*.pub.wix-code.com": [
216
- {
217
- srcPath: "/_api/paid-plans/v2/checkout",
218
- destPath: "/v2/checkout"
219
- }
220
- ],
221
- "www._base_domain_": [
222
- {
223
- srcPath: "/_api/paid-plans/v2/checkout",
224
- destPath: "/v2/checkout"
225
- }
226
- ],
227
- "apps._base_domain_": [
228
- {
229
- srcPath: "/_api/paid-plans/v2/checkout",
230
- destPath: "/v2/checkout"
231
- },
232
- {
233
- srcPath: "/_api/pricing-plans/v2/checkout",
234
- destPath: "/v2/checkout"
235
- }
236
- ],
237
- "dev._base_domain_": [
238
- {
239
- srcPath: "/_api/paid-plans/v2/checkout",
240
- destPath: "/v2/checkout"
241
- },
242
- {
243
- srcPath: "/_api/pricing-plans/v2/checkout",
244
- destPath: "/v2/checkout"
245
- }
246
- ]
247
- };
248
- return resolveUrl(Object.assign(opts, { domainToMappings }));
249
- }
250
- function resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl(opts) {
251
- const domainToMappings = {
252
- "api._api_base_domain_": [
253
- {
254
- srcPath: "/order-management-service-proxy",
255
- destPath: ""
256
- }
257
- ],
258
- "*.dev.wix-code.com": [
259
- {
260
- srcPath: "/_api/paid-plans/v2/orders",
261
- destPath: "/v2/orders"
262
- },
263
- {
264
- srcPath: "/_api/pricing-plans/v2/orders",
265
- destPath: "/v2/orders"
266
- }
267
- ],
268
- "*.wixapps.net": [
269
- {
270
- srcPath: "/_api/paid-plans/v2/orders",
271
- destPath: "/v2/orders"
272
- }
273
- ],
274
- "editor-flow.wixapps.net": [
275
- {
276
- srcPath: "/_api/paid-plans/v2/orders",
277
- destPath: "/v2/orders"
278
- }
279
- ],
280
- "editor._base_domain_": [
281
- {
282
- srcPath: "/_api/paid-plans/v2/orders",
283
- destPath: "/v2/orders"
284
- },
285
- {
286
- srcPath: "/_api/pricing-plans/v2/orders",
287
- destPath: "/v2/orders"
288
- }
289
- ],
290
- "blocks._base_domain_": [
291
- {
292
- srcPath: "/_api/paid-plans/v2/orders",
293
- destPath: "/v2/orders"
294
- },
295
- {
296
- srcPath: "/_api/pricing-plans/v2/orders",
297
- destPath: "/v2/orders"
298
- }
299
- ],
300
- "create.editorx": [
301
- {
302
- srcPath: "/_api/paid-plans/v2/orders",
303
- destPath: "/v2/orders"
304
- },
305
- {
306
- srcPath: "/_api/pricing-plans/v2/orders",
307
- destPath: "/v2/orders"
308
- }
309
- ],
310
- "editor.wixapps.net": [
311
- {
312
- srcPath: "/_api/paid-plans/v2/orders",
313
- destPath: "/v2/orders"
314
- },
315
- {
316
- srcPath: "/_api/pricing-plans/v2/orders",
317
- destPath: "/v2/orders"
318
- }
319
- ],
320
- "forums._base_domain_": [
321
- {
322
- srcPath: "/_api/paid-plans/v2/orders",
323
- destPath: "/v2/orders"
324
- }
325
- ],
326
- "forums.wixapps.net": [
327
- {
328
- srcPath: "/_api/paid-plans/v2/orders",
329
- destPath: "/v2/orders"
330
- }
331
- ],
332
- "manage._base_domain_": [
333
- {
334
- srcPath: "/_api/pricing-plans/v2/orders",
335
- destPath: "/v2/orders"
336
- },
337
- {
338
- srcPath: "/_api/paid-plans/v2/orders",
339
- destPath: "/v2/orders"
340
- }
341
- ],
342
- "www.wixapis.com": [
343
- {
344
- srcPath: "/pricing-plans/v2/orders",
345
- destPath: "/v2/orders"
346
- }
347
- ],
348
- _: [
349
- {
350
- srcPath: "/_api/paid-plans/v2/orders",
351
- destPath: "/v2/orders"
352
- },
353
- {
354
- srcPath: "/_api/pricing-plans/v2/orders",
355
- destPath: "/v2/orders"
356
- }
357
- ],
358
- "*.pub.wix-code.com": [
359
- {
360
- srcPath: "/_api/paid-plans/v2/orders",
361
- destPath: "/v2/orders"
362
- }
363
- ],
364
- "www._base_domain_": [
365
- {
366
- srcPath: "/_api/paid-plans/v2/orders",
367
- destPath: "/v2/orders"
368
- }
369
- ],
370
- "apps._base_domain_": [
371
- {
372
- srcPath: "/_api/paid-plans/v2/orders",
373
- destPath: "/v2/orders"
374
- },
375
- {
376
- srcPath: "/_api/pricing-plans/v2/orders",
377
- destPath: "/v2/orders"
378
- }
379
- ],
380
- "dev._base_domain_": [
381
- {
382
- srcPath: "/_api/paid-plans/v2/orders",
383
- destPath: "/v2/orders"
384
- },
385
- {
386
- srcPath: "/_api/pricing-plans/v2/orders",
387
- destPath: "/v2/orders"
388
- }
389
- ]
390
- };
391
- return resolveUrl(Object.assign(opts, { domainToMappings }));
392
- }
393
- var PACKAGE_NAME = "@wix/auto_sdk_pricing-plans_orders";
394
- function managementGetOrder(payload) {
395
- function __managementGetOrder({ host }) {
396
- const metadata = {
397
- entityFqdn: "wix.pricing_plans.v2.order",
398
- method: "GET",
399
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.GetOrder",
400
- packageName: PACKAGE_NAME,
401
- migrationOptions: {
402
- optInTransformResponse: true
403
- },
404
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
405
- protoPath: "/v2/orders/{id}",
406
- data: payload,
407
- host
408
- }),
409
- params: toURLSearchParams(payload),
410
- transformResponse: (payload2) => transformPaths(payload2, [
411
- {
412
- transformFn: transformRESTTimestampToSDKTimestamp,
413
- paths: [
414
- { path: "order.startDate" },
415
- { path: "order.endDate" },
416
- { path: "order.earliestEndDate" },
417
- { path: "order.createdDate" },
418
- { path: "order.updatedDate" },
419
- { path: "order.cancellation.requestedDate" },
420
- { path: "order.pausePeriods.pauseDate" },
421
- { path: "order.pausePeriods.resumeDate" },
422
- { path: "order.currentCycle.startedDate" },
423
- { path: "order.currentCycle.endedDate" },
424
- { path: "order.cycles.startedDate" },
425
- { path: "order.cycles.endedDate" }
426
- ]
427
- }
428
- ])
429
- };
430
- return metadata;
431
- }
432
- return __managementGetOrder;
433
- }
434
- function managementListOrders(payload) {
435
- function __managementListOrders({ host }) {
436
- const serializedData = transformPaths(payload, [
437
- {
438
- transformFn: transformSDKFloatToRESTFloat,
439
- paths: [
440
- { path: "sorting.origin.latitude" },
441
- { path: "sorting.origin.longitude" }
442
- ]
443
- }
444
- ]);
445
- const metadata = {
446
- entityFqdn: "wix.pricing_plans.v2.order",
447
- method: "GET",
448
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.ListOrders",
449
- packageName: PACKAGE_NAME,
450
- migrationOptions: {
451
- optInTransformResponse: true
452
- },
453
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
454
- protoPath: "/v2/orders",
455
- data: serializedData,
456
- host
457
- }),
458
- params: toURLSearchParams(serializedData, true),
459
- transformResponse: (payload2) => transformPaths(payload2, [
460
- {
461
- transformFn: transformRESTTimestampToSDKTimestamp,
462
- paths: [
463
- { path: "orders.startDate" },
464
- { path: "orders.endDate" },
465
- { path: "orders.earliestEndDate" },
466
- { path: "orders.createdDate" },
467
- { path: "orders.updatedDate" },
468
- { path: "orders.cancellation.requestedDate" },
469
- { path: "orders.pausePeriods.pauseDate" },
470
- { path: "orders.pausePeriods.resumeDate" },
471
- { path: "orders.currentCycle.startedDate" },
472
- { path: "orders.currentCycle.endedDate" },
473
- { path: "orders.cycles.startedDate" },
474
- { path: "orders.cycles.endedDate" }
475
- ]
476
- }
477
- ])
478
- };
479
- return metadata;
480
- }
481
- return __managementListOrders;
482
- }
483
- function postponeEndDate(payload) {
484
- function __postponeEndDate({ host }) {
485
- const serializedData = transformPaths(payload, [
486
- {
487
- transformFn: transformSDKTimestampToRESTTimestamp,
488
- paths: [{ path: "endDate" }]
489
- }
490
- ]);
491
- const metadata = {
492
- entityFqdn: "wix.pricing_plans.v2.order",
493
- method: "PATCH",
494
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.PostponeEndDate",
495
- packageName: PACKAGE_NAME,
496
- migrationOptions: {
497
- optInTransformResponse: true
498
- },
499
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
500
- protoPath: "/v2/orders/{id}",
501
- data: serializedData,
502
- host
503
- }),
504
- data: serializedData
505
- };
506
- return metadata;
507
- }
508
- return __postponeEndDate;
509
- }
510
- function cancelOrder(payload) {
511
- function __cancelOrder({ host }) {
512
- const metadata = {
513
- entityFqdn: "wix.pricing_plans.v2.order",
514
- method: "POST",
515
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.CancelOrder",
516
- packageName: PACKAGE_NAME,
517
- migrationOptions: {
518
- optInTransformResponse: true
519
- },
520
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
521
- protoPath: "/v2/orders/{id}/cancel",
522
- data: payload,
523
- host
524
- }),
525
- data: payload
526
- };
527
- return metadata;
528
- }
529
- return __cancelOrder;
530
- }
531
- function markAsPaid(payload) {
532
- function __markAsPaid({ host }) {
533
- const metadata = {
534
- entityFqdn: "wix.pricing_plans.v2.order",
535
- method: "POST",
536
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.MarkAsPaid",
537
- packageName: PACKAGE_NAME,
538
- migrationOptions: {
539
- optInTransformResponse: true
540
- },
541
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
542
- protoPath: "/v2/orders/{id}/mark-as-paid",
543
- data: payload,
544
- host
545
- }),
546
- data: payload
547
- };
548
- return metadata;
549
- }
550
- return __markAsPaid;
551
- }
552
- function pauseOrder(payload) {
553
- function __pauseOrder({ host }) {
554
- const metadata = {
555
- entityFqdn: "wix.pricing_plans.v2.order",
556
- method: "POST",
557
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.PauseOrder",
558
- packageName: PACKAGE_NAME,
559
- migrationOptions: {
560
- optInTransformResponse: true
561
- },
562
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
563
- protoPath: "/v2/orders/{id}/pause",
564
- data: payload,
565
- host
566
- }),
567
- data: payload
568
- };
569
- return metadata;
570
- }
571
- return __pauseOrder;
572
- }
573
- function resumeOrder(payload) {
574
- function __resumeOrder({ host }) {
575
- const metadata = {
576
- entityFqdn: "wix.pricing_plans.v2.order",
577
- method: "POST",
578
- methodFqn: "com.wixpress.membership.v2.orders.OrderManagementService.ResumeOrder",
579
- packageName: PACKAGE_NAME,
580
- migrationOptions: {
581
- optInTransformResponse: true
582
- },
583
- url: resolveComWixpressMembershipV2OrdersOrderManagementServiceUrl({
584
- protoPath: "/v2/orders/{id}/resume",
585
- data: payload,
586
- host
587
- }),
588
- data: payload
589
- };
590
- return metadata;
591
- }
592
- return __resumeOrder;
593
- }
594
- function createOnlineOrder(payload) {
595
- function __createOnlineOrder({ host }) {
596
- const serializedData = transformPaths(payload, [
597
- {
598
- transformFn: transformSDKTimestampToRESTTimestamp,
599
- paths: [{ path: "startDate" }]
600
- }
601
- ]);
602
- const metadata = {
603
- entityFqdn: "wix.pricing_plans.v2.order",
604
- method: "POST",
605
- methodFqn: "com.wixpress.membership.v2.orders.CheckoutService.CreateOnlineOrder",
606
- packageName: PACKAGE_NAME,
607
- migrationOptions: {
608
- optInTransformResponse: true
609
- },
610
- url: resolveComWixpressMembershipV2OrdersCheckoutServiceUrl({
611
- protoPath: "/v2/checkout/orders/online",
612
- data: serializedData,
613
- host
614
- }),
615
- data: serializedData,
616
- transformResponse: (payload2) => transformPaths(payload2, [
617
- {
618
- transformFn: transformRESTTimestampToSDKTimestamp,
619
- paths: [
620
- { path: "order.startDate" },
621
- { path: "order.endDate" },
622
- { path: "order.earliestEndDate" },
623
- { path: "order.createdDate" },
624
- { path: "order.updatedDate" },
625
- { path: "order.cancellation.requestedDate" },
626
- { path: "order.pausePeriods.pauseDate" },
627
- { path: "order.pausePeriods.resumeDate" },
628
- { path: "order.currentCycle.startedDate" },
629
- { path: "order.currentCycle.endedDate" },
630
- { path: "order.cycles.startedDate" },
631
- { path: "order.cycles.endedDate" }
632
- ]
633
- }
634
- ])
635
- };
636
- return metadata;
637
- }
638
- return __createOnlineOrder;
639
- }
640
- function createOfflineOrder(payload) {
641
- function __createOfflineOrder({ host }) {
642
- const serializedData = transformPaths(payload, [
643
- {
644
- transformFn: transformSDKTimestampToRESTTimestamp,
645
- paths: [{ path: "startDate" }]
646
- }
647
- ]);
648
- const metadata = {
649
- entityFqdn: "wix.pricing_plans.v2.order",
650
- method: "POST",
651
- methodFqn: "com.wixpress.membership.v2.orders.CheckoutService.CreateOfflineOrder",
652
- packageName: PACKAGE_NAME,
653
- migrationOptions: {
654
- optInTransformResponse: true
655
- },
656
- url: resolveComWixpressMembershipV2OrdersCheckoutServiceUrl({
657
- protoPath: "/v2/checkout/orders/offline",
658
- data: serializedData,
659
- host
660
- }),
661
- data: serializedData,
662
- transformResponse: (payload2) => transformPaths(payload2, [
663
- {
664
- transformFn: transformRESTTimestampToSDKTimestamp,
665
- paths: [
666
- { path: "order.startDate" },
667
- { path: "order.endDate" },
668
- { path: "order.earliestEndDate" },
669
- { path: "order.createdDate" },
670
- { path: "order.updatedDate" },
671
- { path: "order.cancellation.requestedDate" },
672
- { path: "order.pausePeriods.pauseDate" },
673
- { path: "order.pausePeriods.resumeDate" },
674
- { path: "order.currentCycle.startedDate" },
675
- { path: "order.currentCycle.endedDate" },
676
- { path: "order.cycles.startedDate" },
677
- { path: "order.cycles.endedDate" }
678
- ]
679
- }
680
- ])
681
- };
682
- return metadata;
683
- }
684
- return __createOfflineOrder;
685
- }
686
- function getOnlineOrderPreview(payload) {
687
- function __getOnlineOrderPreview({ host }) {
688
- const serializedData = transformPaths(payload, [
689
- {
690
- transformFn: transformSDKTimestampToRESTTimestamp,
691
- paths: [{ path: "startDate" }]
692
- }
693
- ]);
694
- const metadata = {
695
- entityFqdn: "wix.pricing_plans.v2.order",
696
- method: "POST",
697
- methodFqn: "com.wixpress.membership.v2.orders.CheckoutService.GetOnlineOrderPreview",
698
- packageName: PACKAGE_NAME,
699
- migrationOptions: {
700
- optInTransformResponse: true
701
- },
702
- url: resolveComWixpressMembershipV2OrdersCheckoutServiceUrl({
703
- protoPath: "/v2/checkout/orders/preview-online",
704
- data: serializedData,
705
- host
706
- }),
707
- data: serializedData,
708
- transformResponse: (payload2) => transformPaths(payload2, [
709
- {
710
- transformFn: transformRESTTimestampToSDKTimestamp,
711
- paths: [
712
- { path: "order.startDate" },
713
- { path: "order.endDate" },
714
- { path: "order.earliestEndDate" },
715
- { path: "order.createdDate" },
716
- { path: "order.updatedDate" },
717
- { path: "order.cancellation.requestedDate" },
718
- { path: "order.pausePeriods.pauseDate" },
719
- { path: "order.pausePeriods.resumeDate" },
720
- { path: "order.currentCycle.startedDate" },
721
- { path: "order.currentCycle.endedDate" },
722
- { path: "order.cycles.startedDate" },
723
- { path: "order.cycles.endedDate" }
724
- ]
725
- }
726
- ])
727
- };
728
- return metadata;
729
- }
730
- return __getOnlineOrderPreview;
731
- }
732
- function getOfflineOrderPreview(payload) {
733
- function __getOfflineOrderPreview({ host }) {
734
- const serializedData = transformPaths(payload, [
735
- {
736
- transformFn: transformSDKTimestampToRESTTimestamp,
737
- paths: [{ path: "startDate" }]
738
- }
739
- ]);
740
- const metadata = {
741
- entityFqdn: "wix.pricing_plans.v2.order",
742
- method: "POST",
743
- methodFqn: "com.wixpress.membership.v2.orders.CheckoutService.GetOfflineOrderPreview",
744
- packageName: PACKAGE_NAME,
745
- migrationOptions: {
746
- optInTransformResponse: true
747
- },
748
- url: resolveComWixpressMembershipV2OrdersCheckoutServiceUrl({
749
- protoPath: "/v2/checkout/orders/preview-offline",
750
- data: serializedData,
751
- host
752
- }),
753
- data: serializedData,
754
- transformResponse: (payload2) => transformPaths(payload2, [
755
- {
756
- transformFn: transformRESTTimestampToSDKTimestamp,
757
- paths: [
758
- { path: "order.startDate" },
759
- { path: "order.endDate" },
760
- { path: "order.earliestEndDate" },
761
- { path: "order.createdDate" },
762
- { path: "order.updatedDate" },
763
- { path: "order.cancellation.requestedDate" },
764
- { path: "order.pausePeriods.pauseDate" },
765
- { path: "order.pausePeriods.resumeDate" },
766
- { path: "order.currentCycle.startedDate" },
767
- { path: "order.currentCycle.endedDate" },
768
- { path: "order.cycles.startedDate" },
769
- { path: "order.cycles.endedDate" }
770
- ]
771
- }
772
- ])
773
- };
774
- return metadata;
775
- }
776
- return __getOfflineOrderPreview;
777
- }
778
- function getPricePreview(payload) {
779
- function __getPricePreview({ host }) {
780
- const metadata = {
781
- entityFqdn: "wix.pricing_plans.v2.order",
782
- method: "POST",
783
- methodFqn: "com.wixpress.membership.v2.orders.CheckoutService.GetPricePreview",
784
- packageName: PACKAGE_NAME,
785
- migrationOptions: {
786
- optInTransformResponse: true
787
- },
788
- url: resolveComWixpressMembershipV2OrdersCheckoutServiceUrl({
789
- protoPath: "/v2/checkout/orders/price-preview",
790
- data: payload,
791
- host
792
- }),
793
- data: payload
794
- };
795
- return metadata;
796
- }
797
- return __getPricePreview;
798
- }
799
- function memberGetOrder(payload) {
800
- function __memberGetOrder({ host }) {
801
- const metadata = {
802
- entityFqdn: "wix.pricing_plans.v2.order",
803
- method: "GET",
804
- methodFqn: "com.wixpress.membership.v2.orders.member.MemberOrdersService.GetOrder",
805
- packageName: PACKAGE_NAME,
806
- migrationOptions: {
807
- optInTransformResponse: true
808
- },
809
- url: resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl({
810
- protoPath: "/v2/member/orders/{id}",
811
- data: payload,
812
- host
813
- }),
814
- params: toURLSearchParams(payload),
815
- transformResponse: (payload2) => transformPaths(payload2, [
816
- {
817
- transformFn: transformRESTTimestampToSDKTimestamp,
818
- paths: [
819
- { path: "order.startDate" },
820
- { path: "order.endDate" },
821
- { path: "order.earliestEndDate" },
822
- { path: "order.createdDate" },
823
- { path: "order.updatedDate" },
824
- { path: "order.cancellation.requestedDate" },
825
- { path: "order.pausePeriods.pauseDate" },
826
- { path: "order.pausePeriods.resumeDate" },
827
- { path: "order.currentCycle.startedDate" },
828
- { path: "order.currentCycle.endedDate" },
829
- { path: "order.cycles.startedDate" },
830
- { path: "order.cycles.endedDate" }
831
- ]
832
- }
833
- ])
834
- };
835
- return metadata;
836
- }
837
- return __memberGetOrder;
838
- }
839
- function memberListOrders(payload) {
840
- function __memberListOrders({ host }) {
841
- const serializedData = transformPaths(payload, [
842
- {
843
- transformFn: transformSDKFloatToRESTFloat,
844
- paths: [
845
- { path: "sorting.origin.latitude" },
846
- { path: "sorting.origin.longitude" }
847
- ]
848
- }
849
- ]);
850
- const metadata = {
851
- entityFqdn: "wix.pricing_plans.v2.order",
852
- method: "GET",
853
- methodFqn: "com.wixpress.membership.v2.orders.member.MemberOrdersService.ListOrders",
854
- packageName: PACKAGE_NAME,
855
- migrationOptions: {
856
- optInTransformResponse: true
857
- },
858
- url: resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl({
859
- protoPath: "/v2/member/orders",
860
- data: serializedData,
861
- host
862
- }),
863
- params: toURLSearchParams(serializedData, true),
864
- transformResponse: (payload2) => transformPaths(payload2, [
865
- {
866
- transformFn: transformRESTTimestampToSDKTimestamp,
867
- paths: [
868
- { path: "orders.startDate" },
869
- { path: "orders.endDate" },
870
- { path: "orders.earliestEndDate" },
871
- { path: "orders.createdDate" },
872
- { path: "orders.updatedDate" },
873
- { path: "orders.cancellation.requestedDate" },
874
- { path: "orders.pausePeriods.pauseDate" },
875
- { path: "orders.pausePeriods.resumeDate" },
876
- { path: "orders.currentCycle.startedDate" },
877
- { path: "orders.currentCycle.endedDate" },
878
- { path: "orders.cycles.startedDate" },
879
- { path: "orders.cycles.endedDate" }
880
- ]
881
- }
882
- ])
883
- };
884
- return metadata;
885
- }
886
- return __memberListOrders;
887
- }
888
- function requestCancellation(payload) {
889
- function __requestCancellation({ host }) {
890
- const metadata = {
891
- entityFqdn: "wix.pricing_plans.v2.order",
892
- method: "POST",
893
- methodFqn: "com.wixpress.membership.v2.orders.member.MemberOrdersService.RequestCancellation",
894
- packageName: PACKAGE_NAME,
895
- migrationOptions: {
896
- optInTransformResponse: true
897
- },
898
- url: resolveComWixpressMembershipV2OrdersMemberMemberOrdersServiceUrl({
899
- protoPath: "/v2/member/orders/{id}/cancel",
900
- data: payload,
901
- host
902
- }),
903
- data: payload
904
- };
905
- return metadata;
906
- }
907
- return __requestCancellation;
908
- }
909
-
910
- // src/pricing-plans-v2-order-orders.types.ts
911
- var PeriodUnit = /* @__PURE__ */ ((PeriodUnit2) => {
912
- PeriodUnit2["UNDEFINED"] = "UNDEFINED";
913
- PeriodUnit2["DAY"] = "DAY";
914
- PeriodUnit2["WEEK"] = "WEEK";
915
- PeriodUnit2["MONTH"] = "MONTH";
916
- PeriodUnit2["YEAR"] = "YEAR";
917
- return PeriodUnit2;
918
- })(PeriodUnit || {});
919
- var OrderType = /* @__PURE__ */ ((OrderType2) => {
920
- OrderType2["UNDEFINED"] = "UNDEFINED";
921
- OrderType2["ONLINE"] = "ONLINE";
922
- OrderType2["OFFLINE"] = "OFFLINE";
923
- OrderType2["EXTERNAL"] = "EXTERNAL";
924
- return OrderType2;
925
- })(OrderType || {});
926
- var OrderMethod = /* @__PURE__ */ ((OrderMethod2) => {
927
- OrderMethod2["UNKNOWN"] = "UNKNOWN";
928
- OrderMethod2["MOTO"] = "MOTO";
929
- OrderMethod2["POS"] = "POS";
930
- return OrderMethod2;
931
- })(OrderMethod || {});
932
- var OrderStatus = /* @__PURE__ */ ((OrderStatus2) => {
933
- OrderStatus2["UNDEFINED"] = "UNDEFINED";
934
- OrderStatus2["DRAFT"] = "DRAFT";
935
- OrderStatus2["PENDING"] = "PENDING";
936
- OrderStatus2["ACTIVE"] = "ACTIVE";
937
- OrderStatus2["PAUSED"] = "PAUSED";
938
- OrderStatus2["ENDED"] = "ENDED";
939
- OrderStatus2["CANCELED"] = "CANCELED";
940
- return OrderStatus2;
941
- })(OrderStatus || {});
942
- var CancellationCause = /* @__PURE__ */ ((CancellationCause2) => {
943
- CancellationCause2["UNDEFINED"] = "UNDEFINED";
944
- CancellationCause2["OWNER_ACTION"] = "OWNER_ACTION";
945
- CancellationCause2["MEMBER_ACTION"] = "MEMBER_ACTION";
946
- CancellationCause2["PAYMENT_FAILURE"] = "PAYMENT_FAILURE";
947
- CancellationCause2["PAYMENT_SETUP_FAILURE"] = "PAYMENT_SETUP_FAILURE";
948
- CancellationCause2["UNKNOWN"] = "UNKNOWN";
949
- return CancellationCause2;
950
- })(CancellationCause || {});
951
- var CancellationEffectiveAt = /* @__PURE__ */ ((CancellationEffectiveAt2) => {
952
- CancellationEffectiveAt2["UNDEFINED"] = "UNDEFINED";
953
- CancellationEffectiveAt2["IMMEDIATELY"] = "IMMEDIATELY";
954
- CancellationEffectiveAt2["NEXT_PAYMENT_DATE"] = "NEXT_PAYMENT_DATE";
955
- return CancellationEffectiveAt2;
956
- })(CancellationEffectiveAt || {});
957
- var PaymentStatus = /* @__PURE__ */ ((PaymentStatus2) => {
958
- PaymentStatus2["UNDEFINED"] = "UNDEFINED";
959
- PaymentStatus2["PAID"] = "PAID";
960
- PaymentStatus2["REFUNDED"] = "REFUNDED";
961
- PaymentStatus2["FAILED"] = "FAILED";
962
- PaymentStatus2["UNPAID"] = "UNPAID";
963
- PaymentStatus2["PENDING"] = "PENDING";
964
- PaymentStatus2["NOT_APPLICABLE"] = "NOT_APPLICABLE";
965
- return PaymentStatus2;
966
- })(PaymentStatus || {});
967
- var Status = /* @__PURE__ */ ((Status2) => {
968
- Status2["UNDEFINED"] = "UNDEFINED";
969
- Status2["ACTIVE"] = "ACTIVE";
970
- Status2["ENDED"] = "ENDED";
971
- return Status2;
972
- })(Status || {});
973
- var Set = /* @__PURE__ */ ((Set2) => {
974
- Set2["UNKNOWN_SET"] = "UNKNOWN_SET";
975
- Set2["BASIC"] = "BASIC";
976
- Set2["FULL"] = "FULL";
977
- return Set2;
978
- })(Set || {});
979
- var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
980
- SortOrder2["ASC"] = "ASC";
981
- SortOrder2["DESC"] = "DESC";
982
- return SortOrder2;
983
- })(SortOrder || {});
984
- var ReasonNotSuspendable = /* @__PURE__ */ ((ReasonNotSuspendable2) => {
985
- ReasonNotSuspendable2["UNDEFINED"] = "UNDEFINED";
986
- ReasonNotSuspendable2["PENDING"] = "PENDING";
987
- ReasonNotSuspendable2["TRIAL"] = "TRIAL";
988
- ReasonNotSuspendable2["CANCELED"] = "CANCELED";
989
- ReasonNotSuspendable2["ENDED"] = "ENDED";
990
- ReasonNotSuspendable2["NOT_STARTED"] = "NOT_STARTED";
991
- ReasonNotSuspendable2["ALREADY_SUSPENDED"] = "ALREADY_SUSPENDED";
992
- ReasonNotSuspendable2["OLD_STRIPE"] = "OLD_STRIPE";
993
- return ReasonNotSuspendable2;
994
- })(ReasonNotSuspendable || {});
995
- var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
996
- WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
997
- WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
998
- WebhookIdentityType2["MEMBER"] = "MEMBER";
999
- WebhookIdentityType2["WIX_USER"] = "WIX_USER";
1000
- WebhookIdentityType2["APP"] = "APP";
1001
- return WebhookIdentityType2;
1002
- })(WebhookIdentityType || {});
1003
-
1004
- // src/pricing-plans-v2-order-orders.meta.ts
1005
- function managementGetOrder2() {
1006
- const payload = { id: ":id" };
1007
- const getRequestOptions = managementGetOrder(payload);
1008
- const getUrl = (context) => {
1009
- const { url } = getRequestOptions(context);
1010
- return url;
1011
- };
1012
- return {
1013
- getUrl,
1014
- httpMethod: "GET",
1015
- path: "/v2/orders/{id}",
1016
- pathParams: { id: "id" },
1017
- __requestType: null,
1018
- __originalRequestType: null,
1019
- __responseType: null,
1020
- __originalResponseType: null
1021
- };
1022
- }
1023
- function managementListOrders2() {
1024
- const payload = {};
1025
- const getRequestOptions = managementListOrders(payload);
1026
- const getUrl = (context) => {
1027
- const { url } = getRequestOptions(context);
1028
- return url;
1029
- };
1030
- return {
1031
- getUrl,
1032
- httpMethod: "GET",
1033
- path: "/v2/orders",
1034
- pathParams: {},
1035
- __requestType: null,
1036
- __originalRequestType: null,
1037
- __responseType: null,
1038
- __originalResponseType: null
1039
- };
1040
- }
1041
- function postponeEndDate2() {
1042
- const payload = { id: ":id" };
1043
- const getRequestOptions = postponeEndDate(payload);
1044
- const getUrl = (context) => {
1045
- const { url } = getRequestOptions(context);
1046
- return url;
1047
- };
1048
- return {
1049
- getUrl,
1050
- httpMethod: "PATCH",
1051
- path: "/v2/orders/{id}",
1052
- pathParams: { id: "id" },
1053
- __requestType: null,
1054
- __originalRequestType: null,
1055
- __responseType: null,
1056
- __originalResponseType: null
1057
- };
1058
- }
1059
- function cancelOrder2() {
1060
- const payload = { id: ":id" };
1061
- const getRequestOptions = cancelOrder(payload);
1062
- const getUrl = (context) => {
1063
- const { url } = getRequestOptions(context);
1064
- return url;
1065
- };
1066
- return {
1067
- getUrl,
1068
- httpMethod: "POST",
1069
- path: "/v2/orders/{id}/cancel",
1070
- pathParams: { id: "id" },
1071
- __requestType: null,
1072
- __originalRequestType: null,
1073
- __responseType: null,
1074
- __originalResponseType: null
1075
- };
1076
- }
1077
- function markAsPaid2() {
1078
- const payload = { id: ":id" };
1079
- const getRequestOptions = markAsPaid(payload);
1080
- const getUrl = (context) => {
1081
- const { url } = getRequestOptions(context);
1082
- return url;
1083
- };
1084
- return {
1085
- getUrl,
1086
- httpMethod: "POST",
1087
- path: "/v2/orders/{id}/mark-as-paid",
1088
- pathParams: { id: "id" },
1089
- __requestType: null,
1090
- __originalRequestType: null,
1091
- __responseType: null,
1092
- __originalResponseType: null
1093
- };
1094
- }
1095
- function pauseOrder2() {
1096
- const payload = { id: ":id" };
1097
- const getRequestOptions = pauseOrder(payload);
1098
- const getUrl = (context) => {
1099
- const { url } = getRequestOptions(context);
1100
- return url;
1101
- };
1102
- return {
1103
- getUrl,
1104
- httpMethod: "POST",
1105
- path: "/v2/orders/{id}/pause",
1106
- pathParams: { id: "id" },
1107
- __requestType: null,
1108
- __originalRequestType: null,
1109
- __responseType: null,
1110
- __originalResponseType: null
1111
- };
1112
- }
1113
- function resumeOrder2() {
1114
- const payload = { id: ":id" };
1115
- const getRequestOptions = resumeOrder(payload);
1116
- const getUrl = (context) => {
1117
- const { url } = getRequestOptions(context);
1118
- return url;
1119
- };
1120
- return {
1121
- getUrl,
1122
- httpMethod: "POST",
1123
- path: "/v2/orders/{id}/resume",
1124
- pathParams: { id: "id" },
1125
- __requestType: null,
1126
- __originalRequestType: null,
1127
- __responseType: null,
1128
- __originalResponseType: null
1129
- };
1130
- }
1131
- function createOnlineOrder2() {
1132
- const payload = {};
1133
- const getRequestOptions = createOnlineOrder(payload);
1134
- const getUrl = (context) => {
1135
- const { url } = getRequestOptions(context);
1136
- return url;
1137
- };
1138
- return {
1139
- getUrl,
1140
- httpMethod: "POST",
1141
- path: "/v2/checkout/orders/online",
1142
- pathParams: {},
1143
- __requestType: null,
1144
- __originalRequestType: null,
1145
- __responseType: null,
1146
- __originalResponseType: null
1147
- };
1148
- }
1149
- function createOfflineOrder2() {
1150
- const payload = {};
1151
- const getRequestOptions = createOfflineOrder(payload);
1152
- const getUrl = (context) => {
1153
- const { url } = getRequestOptions(context);
1154
- return url;
1155
- };
1156
- return {
1157
- getUrl,
1158
- httpMethod: "POST",
1159
- path: "/v2/checkout/orders/offline",
1160
- pathParams: {},
1161
- __requestType: null,
1162
- __originalRequestType: null,
1163
- __responseType: null,
1164
- __originalResponseType: null
1165
- };
1166
- }
1167
- function getOnlineOrderPreview2() {
1168
- const payload = {};
1169
- const getRequestOptions = getOnlineOrderPreview(payload);
1170
- const getUrl = (context) => {
1171
- const { url } = getRequestOptions(context);
1172
- return url;
1173
- };
1174
- return {
1175
- getUrl,
1176
- httpMethod: "POST",
1177
- path: "/v2/checkout/orders/preview-online",
1178
- pathParams: {},
1179
- __requestType: null,
1180
- __originalRequestType: null,
1181
- __responseType: null,
1182
- __originalResponseType: null
1183
- };
1184
- }
1185
- function getOfflineOrderPreview2() {
1186
- const payload = {};
1187
- const getRequestOptions = getOfflineOrderPreview(payload);
1188
- const getUrl = (context) => {
1189
- const { url } = getRequestOptions(context);
1190
- return url;
1191
- };
1192
- return {
1193
- getUrl,
1194
- httpMethod: "POST",
1195
- path: "/v2/checkout/orders/preview-offline",
1196
- pathParams: {},
1197
- __requestType: null,
1198
- __originalRequestType: null,
1199
- __responseType: null,
1200
- __originalResponseType: null
1201
- };
1202
- }
1203
- function getPricePreview2() {
1204
- const payload = {};
1205
- const getRequestOptions = getPricePreview(payload);
1206
- const getUrl = (context) => {
1207
- const { url } = getRequestOptions(context);
1208
- return url;
1209
- };
1210
- return {
1211
- getUrl,
1212
- httpMethod: "POST",
1213
- path: "/v2/checkout/orders/price-preview",
1214
- pathParams: {},
1215
- __requestType: null,
1216
- __originalRequestType: null,
1217
- __responseType: null,
1218
- __originalResponseType: null
1219
- };
1220
- }
1221
- function memberGetOrder2() {
1222
- const payload = { id: ":id" };
1223
- const getRequestOptions = memberGetOrder(payload);
1224
- const getUrl = (context) => {
1225
- const { url } = getRequestOptions(context);
1226
- return url;
1227
- };
1228
- return {
1229
- getUrl,
1230
- httpMethod: "GET",
1231
- path: "/v2/member/orders/{id}",
1232
- pathParams: { id: "id" },
1233
- __requestType: null,
1234
- __originalRequestType: null,
1235
- __responseType: null,
1236
- __originalResponseType: null
1237
- };
1238
- }
1239
- function memberListOrders2() {
1240
- const payload = {};
1241
- const getRequestOptions = memberListOrders(payload);
1242
- const getUrl = (context) => {
1243
- const { url } = getRequestOptions(context);
1244
- return url;
1245
- };
1246
- return {
1247
- getUrl,
1248
- httpMethod: "GET",
1249
- path: "/v2/member/orders",
1250
- pathParams: {},
1251
- __requestType: null,
1252
- __originalRequestType: null,
1253
- __responseType: null,
1254
- __originalResponseType: null
1255
- };
1256
- }
1257
- function requestCancellation2() {
1258
- const payload = { id: ":id" };
1259
- const getRequestOptions = requestCancellation(payload);
1260
- const getUrl = (context) => {
1261
- const { url } = getRequestOptions(context);
1262
- return url;
1263
- };
1264
- return {
1265
- getUrl,
1266
- httpMethod: "POST",
1267
- path: "/v2/member/orders/{id}/cancel",
1268
- pathParams: { id: "id" },
1269
- __requestType: null,
1270
- __originalRequestType: null,
1271
- __responseType: null,
1272
- __originalResponseType: null
1273
- };
1274
- }
1275
- export {
1276
- CancellationCause as CancellationCauseOriginal,
1277
- CancellationEffectiveAt as CancellationEffectiveAtOriginal,
1278
- OrderMethod as OrderMethodOriginal,
1279
- OrderStatus as OrderStatusOriginal,
1280
- OrderType as OrderTypeOriginal,
1281
- PaymentStatus as PaymentStatusOriginal,
1282
- PeriodUnit as PeriodUnitOriginal,
1283
- ReasonNotSuspendable as ReasonNotSuspendableOriginal,
1284
- Set as SetOriginal,
1285
- SortOrder as SortOrderOriginal,
1286
- Status as StatusOriginal,
1287
- WebhookIdentityType as WebhookIdentityTypeOriginal,
1288
- cancelOrder2 as cancelOrder,
1289
- createOfflineOrder2 as createOfflineOrder,
1290
- createOnlineOrder2 as createOnlineOrder,
1291
- getOfflineOrderPreview2 as getOfflineOrderPreview,
1292
- getOnlineOrderPreview2 as getOnlineOrderPreview,
1293
- getPricePreview2 as getPricePreview,
1294
- managementGetOrder2 as managementGetOrder,
1295
- managementListOrders2 as managementListOrders,
1296
- markAsPaid2 as markAsPaid,
1297
- memberGetOrder2 as memberGetOrder,
1298
- memberListOrders2 as memberListOrders,
1299
- pauseOrder2 as pauseOrder,
1300
- postponeEndDate2 as postponeEndDate,
1301
- requestCancellation2 as requestCancellation,
1302
- resumeOrder2 as resumeOrder
1303
- };
1304
- //# sourceMappingURL=meta.mjs.map