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