@wix/auto_sdk_loyalty_programs 1.0.22 → 1.0.24

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.
@@ -0,0 +1,781 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.typings.ts
21
+ var index_typings_exports = {};
22
+ __export(index_typings_exports, {
23
+ DeleteStatus: () => DeleteStatus,
24
+ FeaturePeriod: () => FeaturePeriod,
25
+ Namespace: () => Namespace,
26
+ ProgramStatus: () => ProgramStatus,
27
+ SiteCreatedContext: () => SiteCreatedContext,
28
+ State: () => State,
29
+ Status: () => Status,
30
+ Type: () => Type,
31
+ WebhookIdentityType: () => WebhookIdentityType,
32
+ activateLoyaltyProgram: () => activateLoyaltyProgram2,
33
+ bulkGetLoyaltyProgram: () => bulkGetLoyaltyProgram2,
34
+ disablePointsExpiration: () => disablePointsExpiration2,
35
+ enablePointsExpiration: () => enablePointsExpiration2,
36
+ getLoyaltyProgram: () => getLoyaltyProgram2,
37
+ getLoyaltyProgramPremiumFeatures: () => getLoyaltyProgramPremiumFeatures2,
38
+ pauseLoyaltyProgram: () => pauseLoyaltyProgram2,
39
+ updateLoyaltyProgram: () => updateLoyaltyProgram2
40
+ });
41
+ module.exports = __toCommonJS(index_typings_exports);
42
+
43
+ // src/loyalty-v1-program-programs.universal.ts
44
+ var import_transform_error = require("@wix/sdk-runtime/transform-error");
45
+ var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
46
+
47
+ // src/loyalty-v1-program-programs.http.ts
48
+ var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
49
+ var import_float = require("@wix/sdk-runtime/transformations/float");
50
+ var import_float2 = require("@wix/sdk-runtime/transformations/float");
51
+ var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
52
+ var import_timestamp2 = require("@wix/sdk-runtime/transformations/timestamp");
53
+ var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
54
+ var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
55
+ function resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl(opts) {
56
+ const domainToMappings = {
57
+ "manage._base_domain_": [
58
+ {
59
+ srcPath: "/_api/loyalty-programs",
60
+ destPath: ""
61
+ }
62
+ ],
63
+ "api._api_base_domain_": [
64
+ {
65
+ srcPath: "/loyalty-programs",
66
+ destPath: ""
67
+ }
68
+ ],
69
+ _: [
70
+ {
71
+ srcPath: "/_api/loyalty-programs",
72
+ destPath: ""
73
+ }
74
+ ],
75
+ "editor.wixapps.net": [
76
+ {
77
+ srcPath: "/_api/loyalty-programs",
78
+ destPath: ""
79
+ }
80
+ ],
81
+ "editor._base_domain_": [
82
+ {
83
+ srcPath: "/_api/loyalty-programs",
84
+ destPath: ""
85
+ }
86
+ ],
87
+ "blocks._base_domain_": [
88
+ {
89
+ srcPath: "/_api/loyalty-programs",
90
+ destPath: ""
91
+ }
92
+ ],
93
+ "create.editorx": [
94
+ {
95
+ srcPath: "/_api/loyalty-programs",
96
+ destPath: ""
97
+ }
98
+ ],
99
+ "www._base_domain_": [
100
+ {
101
+ srcPath: "/_api/loyalty-programs",
102
+ destPath: ""
103
+ }
104
+ ],
105
+ "*.dev.wix-code.com": [
106
+ {
107
+ srcPath: "/_api/loyalty-programs",
108
+ destPath: ""
109
+ }
110
+ ],
111
+ "*.pub.wix-code.com": [
112
+ {
113
+ srcPath: "/_api/loyalty-programs",
114
+ destPath: ""
115
+ }
116
+ ],
117
+ "www.wixapis.com": [
118
+ {
119
+ srcPath: "/loyalty-programs",
120
+ destPath: ""
121
+ }
122
+ ]
123
+ };
124
+ return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
125
+ }
126
+ var PACKAGE_NAME = "@wix/auto_sdk_loyalty_programs";
127
+ function getLoyaltyProgram(payload) {
128
+ function __getLoyaltyProgram({ host }) {
129
+ const metadata = {
130
+ entityFqdn: "wix.loyalty.v1.program",
131
+ method: "GET",
132
+ methodFqn: "com.wixpress.loyalty.program.LoyaltyPrograms.GetLoyaltyProgram",
133
+ packageName: PACKAGE_NAME,
134
+ url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({
135
+ protoPath: "/v1/program",
136
+ data: payload,
137
+ host
138
+ }),
139
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
140
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
141
+ {
142
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
143
+ paths: [
144
+ { path: "loyaltyProgram.createdDate" },
145
+ { path: "loyaltyProgram.updatedDate" },
146
+ { path: "loyaltyProgram.pointDefinition.icon.urlExpirationDate" }
147
+ ]
148
+ },
149
+ {
150
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
151
+ paths: [
152
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.x" },
153
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.y" }
154
+ ]
155
+ }
156
+ ])
157
+ };
158
+ return metadata;
159
+ }
160
+ return __getLoyaltyProgram;
161
+ }
162
+ function bulkGetLoyaltyProgram(payload) {
163
+ function __bulkGetLoyaltyProgram({ host }) {
164
+ const metadata = {
165
+ entityFqdn: "wix.loyalty.v1.program",
166
+ method: "GET",
167
+ methodFqn: "com.wixpress.loyalty.program.LoyaltyPrograms.BulkGetLoyaltyProgram",
168
+ packageName: PACKAGE_NAME,
169
+ url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({
170
+ protoPath: "/v1/bulk/programs",
171
+ data: payload,
172
+ host
173
+ }),
174
+ params: (0, import_rest_modules.toURLSearchParams)(payload),
175
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
176
+ {
177
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
178
+ paths: [
179
+ { path: "programInSites.loyaltyProgram.createdDate" },
180
+ { path: "programInSites.loyaltyProgram.updatedDate" },
181
+ {
182
+ path: "programInSites.loyaltyProgram.pointDefinition.icon.urlExpirationDate"
183
+ }
184
+ ]
185
+ },
186
+ {
187
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
188
+ paths: [
189
+ {
190
+ path: "programInSites.loyaltyProgram.pointDefinition.icon.focalPoint.x"
191
+ },
192
+ {
193
+ path: "programInSites.loyaltyProgram.pointDefinition.icon.focalPoint.y"
194
+ }
195
+ ]
196
+ }
197
+ ])
198
+ };
199
+ return metadata;
200
+ }
201
+ return __bulkGetLoyaltyProgram;
202
+ }
203
+ function updateLoyaltyProgram(payload) {
204
+ function __updateLoyaltyProgram({ host }) {
205
+ const serializedData = (0, import_transform_paths.transformPaths)(payload, [
206
+ {
207
+ transformFn: import_timestamp.transformSDKTimestampToRESTTimestamp,
208
+ paths: [
209
+ { path: "loyaltyProgram.createdDate" },
210
+ { path: "loyaltyProgram.updatedDate" },
211
+ { path: "loyaltyProgram.pointDefinition.icon.urlExpirationDate" }
212
+ ]
213
+ },
214
+ {
215
+ transformFn: import_float.transformSDKFloatToRESTFloat,
216
+ paths: [
217
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.x" },
218
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.y" }
219
+ ]
220
+ }
221
+ ]);
222
+ const metadata = {
223
+ entityFqdn: "wix.loyalty.v1.program",
224
+ method: "PATCH",
225
+ methodFqn: "com.wixpress.loyalty.program.LoyaltyPrograms.UpdateLoyaltyProgram",
226
+ packageName: PACKAGE_NAME,
227
+ url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({
228
+ protoPath: "/v1/program",
229
+ data: serializedData,
230
+ host
231
+ }),
232
+ data: serializedData,
233
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
234
+ {
235
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
236
+ paths: [
237
+ { path: "loyaltyProgram.createdDate" },
238
+ { path: "loyaltyProgram.updatedDate" },
239
+ { path: "loyaltyProgram.pointDefinition.icon.urlExpirationDate" }
240
+ ]
241
+ },
242
+ {
243
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
244
+ paths: [
245
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.x" },
246
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.y" }
247
+ ]
248
+ }
249
+ ])
250
+ };
251
+ return metadata;
252
+ }
253
+ return __updateLoyaltyProgram;
254
+ }
255
+ function activateLoyaltyProgram(payload) {
256
+ function __activateLoyaltyProgram({ host }) {
257
+ const metadata = {
258
+ entityFqdn: "wix.loyalty.v1.program",
259
+ method: "POST",
260
+ methodFqn: "com.wixpress.loyalty.program.LoyaltyPrograms.ActivateLoyaltyProgram",
261
+ packageName: PACKAGE_NAME,
262
+ url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({
263
+ protoPath: "/v1/program/activate",
264
+ data: payload,
265
+ host
266
+ }),
267
+ data: payload,
268
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
269
+ {
270
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
271
+ paths: [
272
+ { path: "loyaltyProgram.createdDate" },
273
+ { path: "loyaltyProgram.updatedDate" },
274
+ { path: "loyaltyProgram.pointDefinition.icon.urlExpirationDate" }
275
+ ]
276
+ },
277
+ {
278
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
279
+ paths: [
280
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.x" },
281
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.y" }
282
+ ]
283
+ }
284
+ ])
285
+ };
286
+ return metadata;
287
+ }
288
+ return __activateLoyaltyProgram;
289
+ }
290
+ function pauseLoyaltyProgram(payload) {
291
+ function __pauseLoyaltyProgram({ host }) {
292
+ const metadata = {
293
+ entityFqdn: "wix.loyalty.v1.program",
294
+ method: "POST",
295
+ methodFqn: "com.wixpress.loyalty.program.LoyaltyPrograms.PauseLoyaltyProgram",
296
+ packageName: PACKAGE_NAME,
297
+ url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({
298
+ protoPath: "/v1/program/pause",
299
+ data: payload,
300
+ host
301
+ }),
302
+ data: payload,
303
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
304
+ {
305
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
306
+ paths: [
307
+ { path: "loyaltyProgram.createdDate" },
308
+ { path: "loyaltyProgram.updatedDate" },
309
+ { path: "loyaltyProgram.pointDefinition.icon.urlExpirationDate" }
310
+ ]
311
+ },
312
+ {
313
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
314
+ paths: [
315
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.x" },
316
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.y" }
317
+ ]
318
+ }
319
+ ])
320
+ };
321
+ return metadata;
322
+ }
323
+ return __pauseLoyaltyProgram;
324
+ }
325
+ function getLoyaltyProgramPremiumFeatures(payload) {
326
+ function __getLoyaltyProgramPremiumFeatures({ host }) {
327
+ const metadata = {
328
+ entityFqdn: "wix.loyalty.v1.program",
329
+ method: "GET",
330
+ methodFqn: "com.wixpress.loyalty.program.LoyaltyPrograms.GetLoyaltyProgramPremiumFeatures",
331
+ packageName: PACKAGE_NAME,
332
+ url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({
333
+ protoPath: "/v1/program/premium-features",
334
+ data: payload,
335
+ host
336
+ }),
337
+ params: (0, import_rest_modules.toURLSearchParams)(payload)
338
+ };
339
+ return metadata;
340
+ }
341
+ return __getLoyaltyProgramPremiumFeatures;
342
+ }
343
+ function enablePointsExpiration(payload) {
344
+ function __enablePointsExpiration({ host }) {
345
+ const metadata = {
346
+ entityFqdn: "wix.loyalty.v1.program",
347
+ method: "POST",
348
+ methodFqn: "com.wixpress.loyalty.program.LoyaltyPrograms.EnablePointsExpiration",
349
+ packageName: PACKAGE_NAME,
350
+ url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({
351
+ protoPath: "/v1/program/points-expiration/enable",
352
+ data: payload,
353
+ host
354
+ }),
355
+ data: payload,
356
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
357
+ {
358
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
359
+ paths: [
360
+ { path: "loyaltyProgram.createdDate" },
361
+ { path: "loyaltyProgram.updatedDate" },
362
+ { path: "loyaltyProgram.pointDefinition.icon.urlExpirationDate" }
363
+ ]
364
+ },
365
+ {
366
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
367
+ paths: [
368
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.x" },
369
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.y" }
370
+ ]
371
+ }
372
+ ])
373
+ };
374
+ return metadata;
375
+ }
376
+ return __enablePointsExpiration;
377
+ }
378
+ function disablePointsExpiration(payload) {
379
+ function __disablePointsExpiration({ host }) {
380
+ const metadata = {
381
+ entityFqdn: "wix.loyalty.v1.program",
382
+ method: "POST",
383
+ methodFqn: "com.wixpress.loyalty.program.LoyaltyPrograms.DisablePointsExpiration",
384
+ packageName: PACKAGE_NAME,
385
+ url: resolveComWixpressLoyaltyProgramLoyaltyProgramsUrl({
386
+ protoPath: "/v1/program/points-expiration/disable",
387
+ data: payload,
388
+ host
389
+ }),
390
+ data: payload,
391
+ transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
392
+ {
393
+ transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
394
+ paths: [
395
+ { path: "loyaltyProgram.createdDate" },
396
+ { path: "loyaltyProgram.updatedDate" },
397
+ { path: "loyaltyProgram.pointDefinition.icon.urlExpirationDate" }
398
+ ]
399
+ },
400
+ {
401
+ transformFn: import_float2.transformRESTFloatToSDKFloat,
402
+ paths: [
403
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.x" },
404
+ { path: "loyaltyProgram.pointDefinition.icon.focalPoint.y" }
405
+ ]
406
+ }
407
+ ])
408
+ };
409
+ return metadata;
410
+ }
411
+ return __disablePointsExpiration;
412
+ }
413
+
414
+ // src/loyalty-v1-program-programs.universal.ts
415
+ var import_image = require("@wix/sdk-runtime/transformations/image");
416
+ var import_image2 = require("@wix/sdk-runtime/transformations/image");
417
+ var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
418
+ var ProgramStatus = /* @__PURE__ */ ((ProgramStatus2) => {
419
+ ProgramStatus2["UNKNOWN"] = "UNKNOWN";
420
+ ProgramStatus2["DRAFT"] = "DRAFT";
421
+ ProgramStatus2["ACTIVE"] = "ACTIVE";
422
+ ProgramStatus2["PAUSED"] = "PAUSED";
423
+ return ProgramStatus2;
424
+ })(ProgramStatus || {});
425
+ var Status = /* @__PURE__ */ ((Status2) => {
426
+ Status2["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
427
+ Status2["DISABLED"] = "DISABLED";
428
+ Status2["ENABLED"] = "ENABLED";
429
+ return Status2;
430
+ })(Status || {});
431
+ var Type = /* @__PURE__ */ ((Type2) => {
432
+ Type2["UNKNOWN_CHANNEL"] = "UNKNOWN_CHANNEL";
433
+ Type2["FACEBOOK"] = "FACEBOOK";
434
+ Type2["INSTAGRAM"] = "INSTAGRAM";
435
+ Type2["LINKEDIN"] = "LINKEDIN";
436
+ Type2["X"] = "X";
437
+ Type2["TIKTOK"] = "TIKTOK";
438
+ return Type2;
439
+ })(Type || {});
440
+ var State = /* @__PURE__ */ ((State2) => {
441
+ State2["UNKNOWN"] = "UNKNOWN";
442
+ State2["ENABLED"] = "ENABLED";
443
+ State2["DISABLED"] = "DISABLED";
444
+ State2["PENDING"] = "PENDING";
445
+ State2["DEMO"] = "DEMO";
446
+ return State2;
447
+ })(State || {});
448
+ var SiteCreatedContext = /* @__PURE__ */ ((SiteCreatedContext2) => {
449
+ SiteCreatedContext2["OTHER"] = "OTHER";
450
+ SiteCreatedContext2["FROM_TEMPLATE"] = "FROM_TEMPLATE";
451
+ SiteCreatedContext2["DUPLICATE_BY_SITE_TRANSFER"] = "DUPLICATE_BY_SITE_TRANSFER";
452
+ SiteCreatedContext2["DUPLICATE"] = "DUPLICATE";
453
+ SiteCreatedContext2["OLD_SITE_TRANSFER"] = "OLD_SITE_TRANSFER";
454
+ SiteCreatedContext2["FLASH"] = "FLASH";
455
+ return SiteCreatedContext2;
456
+ })(SiteCreatedContext || {});
457
+ var Namespace = /* @__PURE__ */ ((Namespace2) => {
458
+ Namespace2["UNKNOWN_NAMESPACE"] = "UNKNOWN_NAMESPACE";
459
+ Namespace2["WIX"] = "WIX";
460
+ Namespace2["SHOUT_OUT"] = "SHOUT_OUT";
461
+ Namespace2["ALBUMS"] = "ALBUMS";
462
+ Namespace2["WIX_STORES_TEST_DRIVE"] = "WIX_STORES_TEST_DRIVE";
463
+ Namespace2["HOTELS"] = "HOTELS";
464
+ Namespace2["CLUBS"] = "CLUBS";
465
+ Namespace2["ONBOARDING_DRAFT"] = "ONBOARDING_DRAFT";
466
+ Namespace2["DEV_SITE"] = "DEV_SITE";
467
+ Namespace2["LOGOS"] = "LOGOS";
468
+ Namespace2["VIDEO_MAKER"] = "VIDEO_MAKER";
469
+ Namespace2["PARTNER_DASHBOARD"] = "PARTNER_DASHBOARD";
470
+ Namespace2["DEV_CENTER_COMPANY"] = "DEV_CENTER_COMPANY";
471
+ Namespace2["HTML_DRAFT"] = "HTML_DRAFT";
472
+ Namespace2["SITELESS_BUSINESS"] = "SITELESS_BUSINESS";
473
+ Namespace2["CREATOR_ECONOMY"] = "CREATOR_ECONOMY";
474
+ Namespace2["DASHBOARD_FIRST"] = "DASHBOARD_FIRST";
475
+ Namespace2["ANYWHERE"] = "ANYWHERE";
476
+ Namespace2["HEADLESS"] = "HEADLESS";
477
+ Namespace2["ACCOUNT_MASTER_CMS"] = "ACCOUNT_MASTER_CMS";
478
+ Namespace2["RISE"] = "RISE";
479
+ Namespace2["BRANDED_FIRST"] = "BRANDED_FIRST";
480
+ Namespace2["NOWNIA"] = "NOWNIA";
481
+ Namespace2["UGC_TEMPLATE"] = "UGC_TEMPLATE";
482
+ Namespace2["CODUX"] = "CODUX";
483
+ Namespace2["MEDIA_DESIGN_CREATOR"] = "MEDIA_DESIGN_CREATOR";
484
+ Namespace2["SHARED_BLOG_ENTERPRISE"] = "SHARED_BLOG_ENTERPRISE";
485
+ Namespace2["STANDALONE_FORMS"] = "STANDALONE_FORMS";
486
+ Namespace2["STANDALONE_EVENTS"] = "STANDALONE_EVENTS";
487
+ Namespace2["MIMIR"] = "MIMIR";
488
+ return Namespace2;
489
+ })(Namespace || {});
490
+ var DeleteStatus = /* @__PURE__ */ ((DeleteStatus2) => {
491
+ DeleteStatus2["UNKNOWN"] = "UNKNOWN";
492
+ DeleteStatus2["TRASH"] = "TRASH";
493
+ DeleteStatus2["DELETED"] = "DELETED";
494
+ DeleteStatus2["PENDING_PURGE"] = "PENDING_PURGE";
495
+ DeleteStatus2["PURGED_EXTERNALLY"] = "PURGED_EXTERNALLY";
496
+ return DeleteStatus2;
497
+ })(DeleteStatus || {});
498
+ var FeaturePeriod = /* @__PURE__ */ ((FeaturePeriod2) => {
499
+ FeaturePeriod2["NO_PERIOD"] = "NO_PERIOD";
500
+ FeaturePeriod2["MILLISECOND"] = "MILLISECOND";
501
+ FeaturePeriod2["SECOND"] = "SECOND";
502
+ FeaturePeriod2["MINUTE"] = "MINUTE";
503
+ FeaturePeriod2["HOUR"] = "HOUR";
504
+ FeaturePeriod2["DAY"] = "DAY";
505
+ FeaturePeriod2["WEEK"] = "WEEK";
506
+ FeaturePeriod2["MONTH"] = "MONTH";
507
+ FeaturePeriod2["YEAR"] = "YEAR";
508
+ return FeaturePeriod2;
509
+ })(FeaturePeriod || {});
510
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
511
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
512
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
513
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
514
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
515
+ WebhookIdentityType2["APP"] = "APP";
516
+ return WebhookIdentityType2;
517
+ })(WebhookIdentityType || {});
518
+ async function getLoyaltyProgram2() {
519
+ const { httpClient, sideEffects } = arguments[0];
520
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
521
+ const reqOpts = getLoyaltyProgram(payload);
522
+ sideEffects?.onSiteCall?.();
523
+ try {
524
+ const result = await httpClient.request(reqOpts);
525
+ sideEffects?.onSuccess?.(result);
526
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
527
+ (0, import_transform_paths2.transformPaths)(result.data, [
528
+ {
529
+ transformFn: import_image2.transformRESTImageToSDKImage,
530
+ paths: [{ path: "loyaltyProgram.pointDefinition.icon" }]
531
+ }
532
+ ])
533
+ );
534
+ } catch (err) {
535
+ const transformedError = (0, import_transform_error.transformError)(
536
+ err,
537
+ {
538
+ spreadPathsToArguments: {},
539
+ explicitPathsToArguments: {},
540
+ singleArgumentUnchanged: false
541
+ },
542
+ []
543
+ );
544
+ sideEffects?.onError?.(err);
545
+ throw transformedError;
546
+ }
547
+ }
548
+ async function bulkGetLoyaltyProgram2() {
549
+ const { httpClient, sideEffects } = arguments[0];
550
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
551
+ const reqOpts = bulkGetLoyaltyProgram(payload);
552
+ sideEffects?.onSiteCall?.();
553
+ try {
554
+ const result = await httpClient.request(reqOpts);
555
+ sideEffects?.onSuccess?.(result);
556
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
557
+ (0, import_transform_paths2.transformPaths)(result.data, [
558
+ {
559
+ transformFn: import_image2.transformRESTImageToSDKImage,
560
+ paths: [
561
+ { path: "programInSites.loyaltyProgram.pointDefinition.icon" }
562
+ ]
563
+ }
564
+ ])
565
+ );
566
+ } catch (err) {
567
+ const transformedError = (0, import_transform_error.transformError)(
568
+ err,
569
+ {
570
+ spreadPathsToArguments: {},
571
+ explicitPathsToArguments: {},
572
+ singleArgumentUnchanged: false
573
+ },
574
+ []
575
+ );
576
+ sideEffects?.onError?.(err);
577
+ throw transformedError;
578
+ }
579
+ }
580
+ async function updateLoyaltyProgram2(loyaltyProgram) {
581
+ const { httpClient, sideEffects } = arguments[1];
582
+ const payload = (0, import_transform_paths2.transformPaths)(
583
+ (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ loyaltyProgram }),
584
+ [
585
+ {
586
+ transformFn: import_image.transformSDKImageToRESTImage,
587
+ paths: [{ path: "loyaltyProgram.pointDefinition.icon" }]
588
+ }
589
+ ]
590
+ );
591
+ const reqOpts = updateLoyaltyProgram(payload);
592
+ sideEffects?.onSiteCall?.();
593
+ try {
594
+ const result = await httpClient.request(reqOpts);
595
+ sideEffects?.onSuccess?.(result);
596
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
597
+ (0, import_transform_paths2.transformPaths)(result.data, [
598
+ {
599
+ transformFn: import_image2.transformRESTImageToSDKImage,
600
+ paths: [{ path: "loyaltyProgram.pointDefinition.icon" }]
601
+ }
602
+ ])
603
+ );
604
+ } catch (err) {
605
+ const transformedError = (0, import_transform_error.transformError)(
606
+ err,
607
+ {
608
+ spreadPathsToArguments: {},
609
+ explicitPathsToArguments: { loyaltyProgram: "$[0]" },
610
+ singleArgumentUnchanged: false
611
+ },
612
+ ["loyaltyProgram"]
613
+ );
614
+ sideEffects?.onError?.(err);
615
+ throw transformedError;
616
+ }
617
+ }
618
+ async function activateLoyaltyProgram2() {
619
+ const { httpClient, sideEffects } = arguments[0];
620
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
621
+ const reqOpts = activateLoyaltyProgram(payload);
622
+ sideEffects?.onSiteCall?.();
623
+ try {
624
+ const result = await httpClient.request(reqOpts);
625
+ sideEffects?.onSuccess?.(result);
626
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
627
+ (0, import_transform_paths2.transformPaths)(result.data, [
628
+ {
629
+ transformFn: import_image2.transformRESTImageToSDKImage,
630
+ paths: [{ path: "loyaltyProgram.pointDefinition.icon" }]
631
+ }
632
+ ])
633
+ );
634
+ } catch (err) {
635
+ const transformedError = (0, import_transform_error.transformError)(
636
+ err,
637
+ {
638
+ spreadPathsToArguments: {},
639
+ explicitPathsToArguments: {},
640
+ singleArgumentUnchanged: false
641
+ },
642
+ []
643
+ );
644
+ sideEffects?.onError?.(err);
645
+ throw transformedError;
646
+ }
647
+ }
648
+ async function pauseLoyaltyProgram2() {
649
+ const { httpClient, sideEffects } = arguments[0];
650
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
651
+ const reqOpts = pauseLoyaltyProgram(payload);
652
+ sideEffects?.onSiteCall?.();
653
+ try {
654
+ const result = await httpClient.request(reqOpts);
655
+ sideEffects?.onSuccess?.(result);
656
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
657
+ (0, import_transform_paths2.transformPaths)(result.data, [
658
+ {
659
+ transformFn: import_image2.transformRESTImageToSDKImage,
660
+ paths: [{ path: "loyaltyProgram.pointDefinition.icon" }]
661
+ }
662
+ ])
663
+ );
664
+ } catch (err) {
665
+ const transformedError = (0, import_transform_error.transformError)(
666
+ err,
667
+ {
668
+ spreadPathsToArguments: {},
669
+ explicitPathsToArguments: {},
670
+ singleArgumentUnchanged: false
671
+ },
672
+ []
673
+ );
674
+ sideEffects?.onError?.(err);
675
+ throw transformedError;
676
+ }
677
+ }
678
+ async function getLoyaltyProgramPremiumFeatures2() {
679
+ const { httpClient, sideEffects } = arguments[0];
680
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
681
+ const reqOpts = getLoyaltyProgramPremiumFeatures(payload);
682
+ sideEffects?.onSiteCall?.();
683
+ try {
684
+ const result = await httpClient.request(reqOpts);
685
+ sideEffects?.onSuccess?.(result);
686
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
687
+ } catch (err) {
688
+ const transformedError = (0, import_transform_error.transformError)(
689
+ err,
690
+ {
691
+ spreadPathsToArguments: {},
692
+ explicitPathsToArguments: {},
693
+ singleArgumentUnchanged: false
694
+ },
695
+ []
696
+ );
697
+ sideEffects?.onError?.(err);
698
+ throw transformedError;
699
+ }
700
+ }
701
+ async function enablePointsExpiration2() {
702
+ const { httpClient, sideEffects } = arguments[0];
703
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
704
+ const reqOpts = enablePointsExpiration(payload);
705
+ sideEffects?.onSiteCall?.();
706
+ try {
707
+ const result = await httpClient.request(reqOpts);
708
+ sideEffects?.onSuccess?.(result);
709
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
710
+ (0, import_transform_paths2.transformPaths)(result.data, [
711
+ {
712
+ transformFn: import_image2.transformRESTImageToSDKImage,
713
+ paths: [{ path: "loyaltyProgram.pointDefinition.icon" }]
714
+ }
715
+ ])
716
+ );
717
+ } catch (err) {
718
+ const transformedError = (0, import_transform_error.transformError)(
719
+ err,
720
+ {
721
+ spreadPathsToArguments: {},
722
+ explicitPathsToArguments: {},
723
+ singleArgumentUnchanged: false
724
+ },
725
+ []
726
+ );
727
+ sideEffects?.onError?.(err);
728
+ throw transformedError;
729
+ }
730
+ }
731
+ async function disablePointsExpiration2() {
732
+ const { httpClient, sideEffects } = arguments[0];
733
+ const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({});
734
+ const reqOpts = disablePointsExpiration(payload);
735
+ sideEffects?.onSiteCall?.();
736
+ try {
737
+ const result = await httpClient.request(reqOpts);
738
+ sideEffects?.onSuccess?.(result);
739
+ return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
740
+ (0, import_transform_paths2.transformPaths)(result.data, [
741
+ {
742
+ transformFn: import_image2.transformRESTImageToSDKImage,
743
+ paths: [{ path: "loyaltyProgram.pointDefinition.icon" }]
744
+ }
745
+ ])
746
+ );
747
+ } catch (err) {
748
+ const transformedError = (0, import_transform_error.transformError)(
749
+ err,
750
+ {
751
+ spreadPathsToArguments: {},
752
+ explicitPathsToArguments: {},
753
+ singleArgumentUnchanged: false
754
+ },
755
+ []
756
+ );
757
+ sideEffects?.onError?.(err);
758
+ throw transformedError;
759
+ }
760
+ }
761
+ // Annotate the CommonJS export names for ESM import in node:
762
+ 0 && (module.exports = {
763
+ DeleteStatus,
764
+ FeaturePeriod,
765
+ Namespace,
766
+ ProgramStatus,
767
+ SiteCreatedContext,
768
+ State,
769
+ Status,
770
+ Type,
771
+ WebhookIdentityType,
772
+ activateLoyaltyProgram,
773
+ bulkGetLoyaltyProgram,
774
+ disablePointsExpiration,
775
+ enablePointsExpiration,
776
+ getLoyaltyProgram,
777
+ getLoyaltyProgramPremiumFeatures,
778
+ pauseLoyaltyProgram,
779
+ updateLoyaltyProgram
780
+ });
781
+ //# sourceMappingURL=index.typings.js.map