@wix/auto_sdk_benefit-programs_pools 1.0.79 → 1.0.81
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 +1 -1
- package/build/cjs/index.js +61 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +88 -1
- package/build/cjs/index.typings.js +52 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +82 -2
- package/build/cjs/meta.js +41 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs +60 -0
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +88 -1
- package/build/es/index.typings.mjs +51 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +82 -2
- package/build/es/meta.mjs +40 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +20 -3
- package/build/internal/cjs/index.typings.d.ts +108 -1
- package/build/internal/cjs/meta.d.ts +82 -2
- package/build/internal/es/index.d.mts +20 -3
- package/build/internal/es/index.typings.d.mts +108 -1
- package/build/internal/es/meta.d.mts +82 -2
- package/package.json +4 -11
- package/build/cjs/schemas.d.ts +0 -1033
- package/build/cjs/schemas.js +0 -1991
- package/build/cjs/schemas.js.map +0 -1
- package/build/es/schemas.d.mts +0 -1033
- package/build/es/schemas.mjs +0 -1937
- package/build/es/schemas.mjs.map +0 -1
- package/build/internal/cjs/index.js +0 -1186
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -1078
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -867
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.d.ts +0 -1033
- package/build/internal/cjs/schemas.js +0 -1991
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -1138
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -1029
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -817
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.d.mts +0 -1033
- package/build/internal/es/schemas.mjs +0 -1937
- package/build/internal/es/schemas.mjs.map +0 -1
- package/schemas/package.json +0 -3
|
@@ -1,1138 +0,0 @@
|
|
|
1
|
-
// src/benefit-programs-v1-pool-pools.universal.ts
|
|
2
|
-
import { transformError as sdkTransformError } from "@wix/sdk-runtime/transform-error";
|
|
3
|
-
import { queryBuilder } from "@wix/sdk-runtime/query-builder";
|
|
4
|
-
import {
|
|
5
|
-
renameKeysFromSDKRequestToRESTRequest,
|
|
6
|
-
renameKeysFromRESTResponseToSDKResponse
|
|
7
|
-
} from "@wix/sdk-runtime/rename-all-nested-keys";
|
|
8
|
-
|
|
9
|
-
// src/benefit-programs-v1-pool-pools.http.ts
|
|
10
|
-
import { toURLSearchParams } from "@wix/sdk-runtime/rest-modules";
|
|
11
|
-
import { transformSDKTimestampToRESTTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
12
|
-
import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
|
|
13
|
-
import { transformSDKFieldMaskToRESTFieldMask } from "@wix/sdk-runtime/transformations/field-mask";
|
|
14
|
-
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
15
|
-
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
16
|
-
function resolveWixBenefitProgramsV1PoolPoolServiceUrl(opts) {
|
|
17
|
-
const domainToMappings = {
|
|
18
|
-
"api._api_base_domain_": [
|
|
19
|
-
{
|
|
20
|
-
srcPath: "/pools",
|
|
21
|
-
destPath: ""
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
_: [
|
|
25
|
-
{
|
|
26
|
-
srcPath: "/_api/benefit-programs-pools",
|
|
27
|
-
destPath: ""
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
srcPath: "/_api/benefit-programs/v1/bulk/benefits",
|
|
31
|
-
destPath: "/v1/bulk/benefits"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
srcPath: "/_api/benefit-programs/v1/bulk/pools",
|
|
35
|
-
destPath: "/v1/bulk/pools"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
srcPath: "/_api/benefit-programs/v1/pools",
|
|
39
|
-
destPath: "/v1/pools"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
srcPath: "/_api/benefit-programs/v1/benefits",
|
|
43
|
-
destPath: "/v1/benefits"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"editor._base_domain_": [
|
|
47
|
-
{
|
|
48
|
-
srcPath: "/_api/benefit-programs-pools",
|
|
49
|
-
destPath: ""
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
srcPath: "/_api/benefit-programs/v1/bulk/benefits",
|
|
53
|
-
destPath: "/v1/bulk/benefits"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
srcPath: "/_api/benefit-programs/v1/bulk/pools",
|
|
57
|
-
destPath: "/v1/bulk/pools"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
srcPath: "/_api/benefit-programs/v1/pools",
|
|
61
|
-
destPath: "/v1/pools"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
srcPath: "/_api/benefit-programs/v1/benefits",
|
|
65
|
-
destPath: "/v1/benefits"
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
"blocks._base_domain_": [
|
|
69
|
-
{
|
|
70
|
-
srcPath: "/_api/benefit-programs-pools",
|
|
71
|
-
destPath: ""
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
srcPath: "/_api/benefit-programs/v1/bulk/benefits",
|
|
75
|
-
destPath: "/v1/bulk/benefits"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
srcPath: "/_api/benefit-programs/v1/bulk/pools",
|
|
79
|
-
destPath: "/v1/bulk/pools"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
srcPath: "/_api/benefit-programs/v1/pools",
|
|
83
|
-
destPath: "/v1/pools"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
srcPath: "/_api/benefit-programs/v1/benefits",
|
|
87
|
-
destPath: "/v1/benefits"
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
"create.editorx": [
|
|
91
|
-
{
|
|
92
|
-
srcPath: "/_api/benefit-programs-pools",
|
|
93
|
-
destPath: ""
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
srcPath: "/_api/benefit-programs/v1/bulk/benefits",
|
|
97
|
-
destPath: "/v1/bulk/benefits"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
srcPath: "/_api/benefit-programs/v1/bulk/pools",
|
|
101
|
-
destPath: "/v1/bulk/pools"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
srcPath: "/_api/benefit-programs/v1/pools",
|
|
105
|
-
destPath: "/v1/pools"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
srcPath: "/_api/benefit-programs/v1/benefits",
|
|
109
|
-
destPath: "/v1/benefits"
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
"editor.wixapps.net": [
|
|
113
|
-
{
|
|
114
|
-
srcPath: "/_api/benefit-programs-pools",
|
|
115
|
-
destPath: ""
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
srcPath: "/_api/benefit-programs/v1/bulk/benefits",
|
|
119
|
-
destPath: "/v1/bulk/benefits"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
srcPath: "/_api/benefit-programs/v1/bulk/pools",
|
|
123
|
-
destPath: "/v1/bulk/pools"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
srcPath: "/_api/benefit-programs/v1/pools",
|
|
127
|
-
destPath: "/v1/pools"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
srcPath: "/_api/benefit-programs/v1/benefits",
|
|
131
|
-
destPath: "/v1/benefits"
|
|
132
|
-
}
|
|
133
|
-
],
|
|
134
|
-
"manage._base_domain_": [
|
|
135
|
-
{
|
|
136
|
-
srcPath: "/_api/benefit-programs-pools",
|
|
137
|
-
destPath: ""
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
srcPath: "/_api/benefit-programs/v1/bulk/benefits",
|
|
141
|
-
destPath: "/v1/bulk/benefits"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
srcPath: "/_api/benefit-programs/v1/bulk/pools",
|
|
145
|
-
destPath: "/v1/bulk/pools"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
srcPath: "/_api/benefit-programs/v1/pools",
|
|
149
|
-
destPath: "/v1/pools"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
srcPath: "/_api/benefit-programs/v1/benefits",
|
|
153
|
-
destPath: "/v1/benefits"
|
|
154
|
-
}
|
|
155
|
-
],
|
|
156
|
-
"www._base_domain_": [
|
|
157
|
-
{
|
|
158
|
-
srcPath: "/_api/benefit-programs-pools",
|
|
159
|
-
destPath: ""
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
srcPath: "/_api/benefit-programs/v1/benefits",
|
|
163
|
-
destPath: "/v1/benefits"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
srcPath: "/_api/benefit-programs/v1/pools",
|
|
167
|
-
destPath: "/v1/pools"
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
srcPath: "/_api/benefit-programs/v1/bulk/benefits",
|
|
171
|
-
destPath: "/v1/bulk/benefits"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
srcPath: "/_api/benefit-programs/v1/bulk/pools",
|
|
175
|
-
destPath: "/v1/bulk/pools"
|
|
176
|
-
}
|
|
177
|
-
],
|
|
178
|
-
"*.dev.wix-code.com": [
|
|
179
|
-
{
|
|
180
|
-
srcPath: "/_api/benefit-programs/v1/bulk/benefits",
|
|
181
|
-
destPath: "/v1/bulk/benefits"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
srcPath: "/_api/benefit-programs/v1/bulk/pools",
|
|
185
|
-
destPath: "/v1/bulk/pools"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
srcPath: "/_api/benefit-programs/v1/pools",
|
|
189
|
-
destPath: "/v1/pools"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
srcPath: "/_api/benefit-programs/v1/benefits",
|
|
193
|
-
destPath: "/v1/benefits"
|
|
194
|
-
}
|
|
195
|
-
],
|
|
196
|
-
"www.wixapis.com": [
|
|
197
|
-
{
|
|
198
|
-
srcPath: "/benefit-programs/v1/bulk/benefits",
|
|
199
|
-
destPath: "/v1/bulk/benefits"
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
srcPath: "/benefit-programs/v1/bulk/pools",
|
|
203
|
-
destPath: "/v1/bulk/pools"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
srcPath: "/benefit-programs/v1/pools",
|
|
207
|
-
destPath: "/v1/pools"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
srcPath: "/benefit-programs/v1/benefits",
|
|
211
|
-
destPath: "/v1/benefits"
|
|
212
|
-
}
|
|
213
|
-
]
|
|
214
|
-
};
|
|
215
|
-
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
216
|
-
}
|
|
217
|
-
var PACKAGE_NAME = "@wix/auto_sdk_benefit-programs_pools";
|
|
218
|
-
function getPool(payload) {
|
|
219
|
-
function __getPool({ host }) {
|
|
220
|
-
const metadata = {
|
|
221
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
222
|
-
method: "GET",
|
|
223
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.GetPool",
|
|
224
|
-
packageName: PACKAGE_NAME,
|
|
225
|
-
migrationOptions: {
|
|
226
|
-
optInTransformResponse: true
|
|
227
|
-
},
|
|
228
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
229
|
-
protoPath: "/v1/pools/{poolId}",
|
|
230
|
-
data: payload,
|
|
231
|
-
host
|
|
232
|
-
}),
|
|
233
|
-
params: toURLSearchParams(payload),
|
|
234
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
235
|
-
{
|
|
236
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
237
|
-
paths: [{ path: "pool.createdDate" }, { path: "pool.updatedDate" }]
|
|
238
|
-
}
|
|
239
|
-
])
|
|
240
|
-
};
|
|
241
|
-
return metadata;
|
|
242
|
-
}
|
|
243
|
-
return __getPool;
|
|
244
|
-
}
|
|
245
|
-
function updatePool(payload) {
|
|
246
|
-
function __updatePool({ host }) {
|
|
247
|
-
const serializedData = transformPaths(payload, [
|
|
248
|
-
{
|
|
249
|
-
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
250
|
-
paths: [{ path: "fieldMask" }]
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
254
|
-
paths: [{ path: "pool.createdDate" }, { path: "pool.updatedDate" }]
|
|
255
|
-
}
|
|
256
|
-
]);
|
|
257
|
-
const metadata = {
|
|
258
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
259
|
-
method: "PATCH",
|
|
260
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.UpdatePool",
|
|
261
|
-
packageName: PACKAGE_NAME,
|
|
262
|
-
migrationOptions: {
|
|
263
|
-
optInTransformResponse: true
|
|
264
|
-
},
|
|
265
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
266
|
-
protoPath: "/v1/pools/{pool.id}",
|
|
267
|
-
data: serializedData,
|
|
268
|
-
host
|
|
269
|
-
}),
|
|
270
|
-
data: serializedData,
|
|
271
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
272
|
-
{
|
|
273
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
274
|
-
paths: [{ path: "pool.createdDate" }, { path: "pool.updatedDate" }]
|
|
275
|
-
}
|
|
276
|
-
])
|
|
277
|
-
};
|
|
278
|
-
return metadata;
|
|
279
|
-
}
|
|
280
|
-
return __updatePool;
|
|
281
|
-
}
|
|
282
|
-
function queryPools(payload) {
|
|
283
|
-
function __queryPools({ host }) {
|
|
284
|
-
const metadata = {
|
|
285
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
286
|
-
method: "POST",
|
|
287
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.QueryPools",
|
|
288
|
-
packageName: PACKAGE_NAME,
|
|
289
|
-
migrationOptions: {
|
|
290
|
-
optInTransformResponse: true
|
|
291
|
-
},
|
|
292
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
293
|
-
protoPath: "/v1/pools/query",
|
|
294
|
-
data: payload,
|
|
295
|
-
host
|
|
296
|
-
}),
|
|
297
|
-
data: payload,
|
|
298
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
299
|
-
{
|
|
300
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
301
|
-
paths: [
|
|
302
|
-
{ path: "pools.createdDate" },
|
|
303
|
-
{ path: "pools.updatedDate" }
|
|
304
|
-
]
|
|
305
|
-
}
|
|
306
|
-
])
|
|
307
|
-
};
|
|
308
|
-
return metadata;
|
|
309
|
-
}
|
|
310
|
-
return __queryPools;
|
|
311
|
-
}
|
|
312
|
-
function redeemBenefit(payload) {
|
|
313
|
-
function __redeemBenefit({ host }) {
|
|
314
|
-
const serializedData = transformPaths(payload, [
|
|
315
|
-
{
|
|
316
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
317
|
-
paths: [{ path: "targetDate" }]
|
|
318
|
-
}
|
|
319
|
-
]);
|
|
320
|
-
const metadata = {
|
|
321
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
322
|
-
method: "POST",
|
|
323
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.RedeemBenefit",
|
|
324
|
-
packageName: PACKAGE_NAME,
|
|
325
|
-
migrationOptions: {
|
|
326
|
-
optInTransformResponse: true
|
|
327
|
-
},
|
|
328
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
329
|
-
protoPath: "/v1/benefits/redeem",
|
|
330
|
-
data: serializedData,
|
|
331
|
-
host
|
|
332
|
-
}),
|
|
333
|
-
data: serializedData
|
|
334
|
-
};
|
|
335
|
-
return metadata;
|
|
336
|
-
}
|
|
337
|
-
return __redeemBenefit;
|
|
338
|
-
}
|
|
339
|
-
function reallocateBenefit(payload) {
|
|
340
|
-
function __reallocateBenefit({ host }) {
|
|
341
|
-
const serializedData = transformPaths(payload, [
|
|
342
|
-
{
|
|
343
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
344
|
-
paths: [{ path: "targetDate" }]
|
|
345
|
-
}
|
|
346
|
-
]);
|
|
347
|
-
const metadata = {
|
|
348
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
349
|
-
method: "POST",
|
|
350
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.ReallocateBenefit",
|
|
351
|
-
packageName: PACKAGE_NAME,
|
|
352
|
-
migrationOptions: {
|
|
353
|
-
optInTransformResponse: true
|
|
354
|
-
},
|
|
355
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
356
|
-
protoPath: "/v1/benefits/reallocate",
|
|
357
|
-
data: serializedData,
|
|
358
|
-
host
|
|
359
|
-
}),
|
|
360
|
-
data: serializedData
|
|
361
|
-
};
|
|
362
|
-
return metadata;
|
|
363
|
-
}
|
|
364
|
-
return __reallocateBenefit;
|
|
365
|
-
}
|
|
366
|
-
function checkBenefitEligibility(payload) {
|
|
367
|
-
function __checkBenefitEligibility({ host }) {
|
|
368
|
-
const serializedData = transformPaths(payload, [
|
|
369
|
-
{
|
|
370
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
371
|
-
paths: [{ path: "targetDate" }]
|
|
372
|
-
}
|
|
373
|
-
]);
|
|
374
|
-
const metadata = {
|
|
375
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
376
|
-
method: "POST",
|
|
377
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibility",
|
|
378
|
-
packageName: PACKAGE_NAME,
|
|
379
|
-
migrationOptions: {
|
|
380
|
-
optInTransformResponse: true
|
|
381
|
-
},
|
|
382
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
383
|
-
protoPath: "/v1/pools/check-eligibility",
|
|
384
|
-
data: serializedData,
|
|
385
|
-
host
|
|
386
|
-
}),
|
|
387
|
-
data: serializedData
|
|
388
|
-
};
|
|
389
|
-
return metadata;
|
|
390
|
-
}
|
|
391
|
-
return __checkBenefitEligibility;
|
|
392
|
-
}
|
|
393
|
-
function bulkCheckBenefitEligibility(payload) {
|
|
394
|
-
function __bulkCheckBenefitEligibility({ host }) {
|
|
395
|
-
const serializedData = transformPaths(payload, [
|
|
396
|
-
{
|
|
397
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
398
|
-
paths: [{ path: "benefitSelectors.targetDate" }]
|
|
399
|
-
}
|
|
400
|
-
]);
|
|
401
|
-
const metadata = {
|
|
402
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
403
|
-
method: "POST",
|
|
404
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.BulkCheckBenefitEligibility",
|
|
405
|
-
packageName: PACKAGE_NAME,
|
|
406
|
-
migrationOptions: {
|
|
407
|
-
optInTransformResponse: true
|
|
408
|
-
},
|
|
409
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
410
|
-
protoPath: "/v1/bulk/benefits/check-eligibility",
|
|
411
|
-
data: serializedData,
|
|
412
|
-
host
|
|
413
|
-
}),
|
|
414
|
-
data: serializedData,
|
|
415
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
416
|
-
{
|
|
417
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
418
|
-
paths: [{ path: "results.benefitSelector.targetDate" }]
|
|
419
|
-
}
|
|
420
|
-
])
|
|
421
|
-
};
|
|
422
|
-
return metadata;
|
|
423
|
-
}
|
|
424
|
-
return __bulkCheckBenefitEligibility;
|
|
425
|
-
}
|
|
426
|
-
function getEligibleBenefits(payload) {
|
|
427
|
-
function __getEligibleBenefits({ host }) {
|
|
428
|
-
const serializedData = transformPaths(payload, [
|
|
429
|
-
{
|
|
430
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
431
|
-
paths: [{ path: "targetDate" }]
|
|
432
|
-
}
|
|
433
|
-
]);
|
|
434
|
-
const metadata = {
|
|
435
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
436
|
-
method: "POST",
|
|
437
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.GetEligibleBenefits",
|
|
438
|
-
packageName: PACKAGE_NAME,
|
|
439
|
-
migrationOptions: {
|
|
440
|
-
optInTransformResponse: true
|
|
441
|
-
},
|
|
442
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
443
|
-
protoPath: "/v1/pools/eligible-pools",
|
|
444
|
-
data: serializedData,
|
|
445
|
-
host
|
|
446
|
-
}),
|
|
447
|
-
data: serializedData
|
|
448
|
-
};
|
|
449
|
-
return metadata;
|
|
450
|
-
}
|
|
451
|
-
return __getEligibleBenefits;
|
|
452
|
-
}
|
|
453
|
-
function bulkUpdatePools(payload) {
|
|
454
|
-
function __bulkUpdatePools({ host }) {
|
|
455
|
-
const serializedData = transformPaths(payload, [
|
|
456
|
-
{
|
|
457
|
-
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
458
|
-
paths: [{ path: "pools.fieldMask" }]
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
462
|
-
paths: [
|
|
463
|
-
{ path: "pools.pool.createdDate" },
|
|
464
|
-
{ path: "pools.pool.updatedDate" }
|
|
465
|
-
]
|
|
466
|
-
}
|
|
467
|
-
]);
|
|
468
|
-
const metadata = {
|
|
469
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
470
|
-
method: "POST",
|
|
471
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.BulkUpdatePools",
|
|
472
|
-
packageName: PACKAGE_NAME,
|
|
473
|
-
migrationOptions: {
|
|
474
|
-
optInTransformResponse: true
|
|
475
|
-
},
|
|
476
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
477
|
-
protoPath: "/v1/bulk/pools",
|
|
478
|
-
data: serializedData,
|
|
479
|
-
host
|
|
480
|
-
}),
|
|
481
|
-
data: serializedData,
|
|
482
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
483
|
-
{
|
|
484
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
485
|
-
paths: [
|
|
486
|
-
{ path: "results.item.createdDate" },
|
|
487
|
-
{ path: "results.item.updatedDate" }
|
|
488
|
-
]
|
|
489
|
-
}
|
|
490
|
-
])
|
|
491
|
-
};
|
|
492
|
-
return metadata;
|
|
493
|
-
}
|
|
494
|
-
return __bulkUpdatePools;
|
|
495
|
-
}
|
|
496
|
-
function checkBenefitEligibilityByFilter(payload) {
|
|
497
|
-
function __checkBenefitEligibilityByFilter({ host }) {
|
|
498
|
-
const serializedData = transformPaths(payload, [
|
|
499
|
-
{
|
|
500
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
501
|
-
paths: [{ path: "targetDate" }]
|
|
502
|
-
}
|
|
503
|
-
]);
|
|
504
|
-
const metadata = {
|
|
505
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
506
|
-
method: "POST",
|
|
507
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibilityByFilter",
|
|
508
|
-
packageName: PACKAGE_NAME,
|
|
509
|
-
migrationOptions: {
|
|
510
|
-
optInTransformResponse: true
|
|
511
|
-
},
|
|
512
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
513
|
-
protoPath: "/v1/pools/check-benefit-eligibility-by-filter",
|
|
514
|
-
data: serializedData,
|
|
515
|
-
host
|
|
516
|
-
}),
|
|
517
|
-
data: serializedData
|
|
518
|
-
};
|
|
519
|
-
return metadata;
|
|
520
|
-
}
|
|
521
|
-
return __checkBenefitEligibilityByFilter;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
// src/benefit-programs-v1-pool-pools.universal.ts
|
|
525
|
-
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
526
|
-
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
527
|
-
var PoolStatus = /* @__PURE__ */ ((PoolStatus2) => {
|
|
528
|
-
PoolStatus2["ACTIVE"] = "ACTIVE";
|
|
529
|
-
PoolStatus2["PAUSED"] = "PAUSED";
|
|
530
|
-
PoolStatus2["ENDED"] = "ENDED";
|
|
531
|
-
PoolStatus2["PROVISIONING"] = "PROVISIONING";
|
|
532
|
-
PoolStatus2["RENEWING"] = "RENEWING";
|
|
533
|
-
PoolStatus2["PENDING"] = "PENDING";
|
|
534
|
-
return PoolStatus2;
|
|
535
|
-
})(PoolStatus || {});
|
|
536
|
-
var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
|
|
537
|
-
IdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
538
|
-
IdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
539
|
-
IdentityType2["MEMBER"] = "MEMBER";
|
|
540
|
-
IdentityType2["WIX_USER"] = "WIX_USER";
|
|
541
|
-
return IdentityType2;
|
|
542
|
-
})(IdentityType || {});
|
|
543
|
-
var PolicyExpressionType = /* @__PURE__ */ ((PolicyExpressionType2) => {
|
|
544
|
-
PolicyExpressionType2["OPERATOR_NOT"] = "OPERATOR_NOT";
|
|
545
|
-
PolicyExpressionType2["OPERATOR_AND"] = "OPERATOR_AND";
|
|
546
|
-
PolicyExpressionType2["OPERATOR_OR"] = "OPERATOR_OR";
|
|
547
|
-
PolicyExpressionType2["POLICY"] = "POLICY";
|
|
548
|
-
return PolicyExpressionType2;
|
|
549
|
-
})(PolicyExpressionType || {});
|
|
550
|
-
var Type = /* @__PURE__ */ ((Type2) => {
|
|
551
|
-
Type2["FIXED_INTERVAL"] = "FIXED_INTERVAL";
|
|
552
|
-
Type2["RATE_LIMITED"] = "RATE_LIMITED";
|
|
553
|
-
Type2["CUSTOM"] = "CUSTOM";
|
|
554
|
-
return Type2;
|
|
555
|
-
})(Type || {});
|
|
556
|
-
var WeekDay = /* @__PURE__ */ ((WeekDay2) => {
|
|
557
|
-
WeekDay2["UNKNOWN"] = "UNKNOWN";
|
|
558
|
-
WeekDay2["MONDAY"] = "MONDAY";
|
|
559
|
-
WeekDay2["TUESDAY"] = "TUESDAY";
|
|
560
|
-
WeekDay2["WEDNESDAY"] = "WEDNESDAY";
|
|
561
|
-
WeekDay2["THURSDAY"] = "THURSDAY";
|
|
562
|
-
WeekDay2["FRIDAY"] = "FRIDAY";
|
|
563
|
-
WeekDay2["SATURDAY"] = "SATURDAY";
|
|
564
|
-
WeekDay2["SUNDAY"] = "SUNDAY";
|
|
565
|
-
return WeekDay2;
|
|
566
|
-
})(WeekDay || {});
|
|
567
|
-
var TimePeriod = /* @__PURE__ */ ((TimePeriod2) => {
|
|
568
|
-
TimePeriod2["DAY"] = "DAY";
|
|
569
|
-
TimePeriod2["MONTH"] = "MONTH";
|
|
570
|
-
return TimePeriod2;
|
|
571
|
-
})(TimePeriod || {});
|
|
572
|
-
var PoolOrigin = /* @__PURE__ */ ((PoolOrigin2) => {
|
|
573
|
-
PoolOrigin2["PROVISION"] = "PROVISION";
|
|
574
|
-
PoolOrigin2["CASCADE"] = "CASCADE";
|
|
575
|
-
return PoolOrigin2;
|
|
576
|
-
})(PoolOrigin || {});
|
|
577
|
-
var PoolRenewalActionType = /* @__PURE__ */ ((PoolRenewalActionType2) => {
|
|
578
|
-
PoolRenewalActionType2["END"] = "END";
|
|
579
|
-
PoolRenewalActionType2["UPDATE"] = "UPDATE";
|
|
580
|
-
return PoolRenewalActionType2;
|
|
581
|
-
})(PoolRenewalActionType || {});
|
|
582
|
-
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
583
|
-
SortOrder2["ASC"] = "ASC";
|
|
584
|
-
SortOrder2["DESC"] = "DESC";
|
|
585
|
-
return SortOrder2;
|
|
586
|
-
})(SortOrder || {});
|
|
587
|
-
var Intent = /* @__PURE__ */ ((Intent2) => {
|
|
588
|
-
Intent2["REDEMPTION"] = "REDEMPTION";
|
|
589
|
-
Intent2["REALLOCATION"] = "REALLOCATION";
|
|
590
|
-
return Intent2;
|
|
591
|
-
})(Intent || {});
|
|
592
|
-
var BenefitResultType = /* @__PURE__ */ ((BenefitResultType2) => {
|
|
593
|
-
BenefitResultType2["ELIGIBLE_BENEFIT"] = "ELIGIBLE_BENEFIT";
|
|
594
|
-
BenefitResultType2["NOT_ENOUGH_BALANCE"] = "NOT_ENOUGH_BALANCE";
|
|
595
|
-
BenefitResultType2["POLICY_EXPRESSION_EVALUATED_TO_FALSE"] = "POLICY_EXPRESSION_EVALUATED_TO_FALSE";
|
|
596
|
-
BenefitResultType2["POOL_NOT_ACTIVE"] = "POOL_NOT_ACTIVE";
|
|
597
|
-
BenefitResultType2["BENEFIT_NOT_FOUND"] = "BENEFIT_NOT_FOUND";
|
|
598
|
-
BenefitResultType2["POOL_NOT_FOUND"] = "POOL_NOT_FOUND";
|
|
599
|
-
return BenefitResultType2;
|
|
600
|
-
})(BenefitResultType || {});
|
|
601
|
-
var ProvisionPoolsForProgramResponseType = /* @__PURE__ */ ((ProvisionPoolsForProgramResponseType2) => {
|
|
602
|
-
ProvisionPoolsForProgramResponseType2["SYNC"] = "SYNC";
|
|
603
|
-
ProvisionPoolsForProgramResponseType2["ASYNC"] = "ASYNC";
|
|
604
|
-
return ProvisionPoolsForProgramResponseType2;
|
|
605
|
-
})(ProvisionPoolsForProgramResponseType || {});
|
|
606
|
-
var PoolSelectorType = /* @__PURE__ */ ((PoolSelectorType2) => {
|
|
607
|
-
PoolSelectorType2["BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID"] = "BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID";
|
|
608
|
-
PoolSelectorType2["BY_PROGRAM_ID"] = "BY_PROGRAM_ID";
|
|
609
|
-
return PoolSelectorType2;
|
|
610
|
-
})(PoolSelectorType || {});
|
|
611
|
-
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
612
|
-
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
613
|
-
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
614
|
-
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
615
|
-
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
616
|
-
WebhookIdentityType2["APP"] = "APP";
|
|
617
|
-
return WebhookIdentityType2;
|
|
618
|
-
})(WebhookIdentityType || {});
|
|
619
|
-
async function getPool2(poolId) {
|
|
620
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
621
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({ poolId });
|
|
622
|
-
const reqOpts = getPool(payload);
|
|
623
|
-
sideEffects?.onSiteCall?.();
|
|
624
|
-
try {
|
|
625
|
-
const result = await httpClient.request(reqOpts);
|
|
626
|
-
sideEffects?.onSuccess?.(result);
|
|
627
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data)?.pool;
|
|
628
|
-
} catch (err) {
|
|
629
|
-
const transformedError = sdkTransformError(
|
|
630
|
-
err,
|
|
631
|
-
{
|
|
632
|
-
spreadPathsToArguments: {},
|
|
633
|
-
explicitPathsToArguments: { poolId: "$[0]" },
|
|
634
|
-
singleArgumentUnchanged: false
|
|
635
|
-
},
|
|
636
|
-
["poolId"]
|
|
637
|
-
);
|
|
638
|
-
sideEffects?.onError?.(err);
|
|
639
|
-
throw transformedError;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
async function updatePool2(_id, pool) {
|
|
643
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
644
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
645
|
-
pool: { ...pool, id: _id }
|
|
646
|
-
});
|
|
647
|
-
const reqOpts = updatePool(payload);
|
|
648
|
-
sideEffects?.onSiteCall?.();
|
|
649
|
-
try {
|
|
650
|
-
const result = await httpClient.request(reqOpts);
|
|
651
|
-
sideEffects?.onSuccess?.(result);
|
|
652
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data)?.pool;
|
|
653
|
-
} catch (err) {
|
|
654
|
-
const transformedError = sdkTransformError(
|
|
655
|
-
err,
|
|
656
|
-
{
|
|
657
|
-
spreadPathsToArguments: { pool: "$[1]" },
|
|
658
|
-
explicitPathsToArguments: { "pool.id": "$[0]" },
|
|
659
|
-
singleArgumentUnchanged: false
|
|
660
|
-
},
|
|
661
|
-
["_id", "pool"]
|
|
662
|
-
);
|
|
663
|
-
sideEffects?.onError?.(err);
|
|
664
|
-
throw transformedError;
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
function queryPools2(options) {
|
|
668
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
669
|
-
return queryBuilder({
|
|
670
|
-
func: async (payload) => {
|
|
671
|
-
const reqOpts = queryPools({
|
|
672
|
-
...payload,
|
|
673
|
-
...options ?? {}
|
|
674
|
-
});
|
|
675
|
-
sideEffects?.onSiteCall?.();
|
|
676
|
-
try {
|
|
677
|
-
const result = await httpClient.request(reqOpts);
|
|
678
|
-
sideEffects?.onSuccess?.(result);
|
|
679
|
-
return result;
|
|
680
|
-
} catch (err) {
|
|
681
|
-
sideEffects?.onError?.(err);
|
|
682
|
-
throw err;
|
|
683
|
-
}
|
|
684
|
-
},
|
|
685
|
-
requestTransformer: (query) => {
|
|
686
|
-
const args = [query, options];
|
|
687
|
-
return renameKeysFromSDKRequestToRESTRequest({
|
|
688
|
-
...args?.[1],
|
|
689
|
-
query: args?.[0]
|
|
690
|
-
});
|
|
691
|
-
},
|
|
692
|
-
responseTransformer: ({ data }) => {
|
|
693
|
-
const transformedData = renameKeysFromRESTResponseToSDKResponse(
|
|
694
|
-
transformPaths2(data, [])
|
|
695
|
-
);
|
|
696
|
-
return {
|
|
697
|
-
items: transformedData?.pools,
|
|
698
|
-
pagingMetadata: transformedData?.metadata
|
|
699
|
-
};
|
|
700
|
-
},
|
|
701
|
-
errorTransformer: (err) => {
|
|
702
|
-
const transformedError = sdkTransformError(err, {
|
|
703
|
-
spreadPathsToArguments: {},
|
|
704
|
-
explicitPathsToArguments: { query: "$[0]" },
|
|
705
|
-
singleArgumentUnchanged: false
|
|
706
|
-
});
|
|
707
|
-
throw transformedError;
|
|
708
|
-
},
|
|
709
|
-
pagingMethod: "CURSOR",
|
|
710
|
-
transformationPaths: {}
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
async function typedQueryPools(query, options) {
|
|
714
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
715
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
716
|
-
query,
|
|
717
|
-
...options
|
|
718
|
-
});
|
|
719
|
-
const reqOpts = queryPools(payload);
|
|
720
|
-
sideEffects?.onSiteCall?.();
|
|
721
|
-
try {
|
|
722
|
-
const result = await httpClient.request(reqOpts);
|
|
723
|
-
sideEffects?.onSuccess?.(result);
|
|
724
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
725
|
-
} catch (err) {
|
|
726
|
-
const transformedError = sdkTransformError(
|
|
727
|
-
err,
|
|
728
|
-
{
|
|
729
|
-
spreadPathsToArguments: {},
|
|
730
|
-
explicitPathsToArguments: { query: "$[0]" },
|
|
731
|
-
singleArgumentUnchanged: false
|
|
732
|
-
},
|
|
733
|
-
["query", "options"]
|
|
734
|
-
);
|
|
735
|
-
sideEffects?.onError?.(err);
|
|
736
|
-
throw transformedError;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
var utils = {
|
|
740
|
-
query: /* @__PURE__ */ createQueryUtils()
|
|
741
|
-
};
|
|
742
|
-
async function redeemBenefit2(poolId, options) {
|
|
743
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
744
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
745
|
-
poolId,
|
|
746
|
-
itemReference: options?.itemReference,
|
|
747
|
-
benefitKey: options?.benefitKey,
|
|
748
|
-
count: options?.count,
|
|
749
|
-
targetDate: options?.targetDate,
|
|
750
|
-
idempotencyKey: options?.idempotencyKey,
|
|
751
|
-
additionalData: options?.additionalData,
|
|
752
|
-
beneficiary: options?.beneficiary,
|
|
753
|
-
namespace: options?.namespace
|
|
754
|
-
});
|
|
755
|
-
const reqOpts = redeemBenefit(payload);
|
|
756
|
-
sideEffects?.onSiteCall?.();
|
|
757
|
-
try {
|
|
758
|
-
const result = await httpClient.request(reqOpts);
|
|
759
|
-
sideEffects?.onSuccess?.(result);
|
|
760
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
761
|
-
} catch (err) {
|
|
762
|
-
const transformedError = sdkTransformError(
|
|
763
|
-
err,
|
|
764
|
-
{
|
|
765
|
-
spreadPathsToArguments: {},
|
|
766
|
-
explicitPathsToArguments: {
|
|
767
|
-
poolId: "$[0]",
|
|
768
|
-
itemReference: "$[1].itemReference",
|
|
769
|
-
benefitKey: "$[1].benefitKey",
|
|
770
|
-
count: "$[1].count",
|
|
771
|
-
targetDate: "$[1].targetDate",
|
|
772
|
-
idempotencyKey: "$[1].idempotencyKey",
|
|
773
|
-
additionalData: "$[1].additionalData",
|
|
774
|
-
beneficiary: "$[1].beneficiary",
|
|
775
|
-
namespace: "$[1].namespace"
|
|
776
|
-
},
|
|
777
|
-
singleArgumentUnchanged: false
|
|
778
|
-
},
|
|
779
|
-
["poolId", "options"]
|
|
780
|
-
);
|
|
781
|
-
sideEffects?.onError?.(err);
|
|
782
|
-
throw transformedError;
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
async function reallocateBenefit2(transactionId, options) {
|
|
786
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
787
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
788
|
-
transactionId,
|
|
789
|
-
targetDate: options?.targetDate,
|
|
790
|
-
idempotencyKey: options?.idempotencyKey,
|
|
791
|
-
beneficiary: options?.beneficiary,
|
|
792
|
-
namespace: options?.namespace
|
|
793
|
-
});
|
|
794
|
-
const reqOpts = reallocateBenefit(payload);
|
|
795
|
-
sideEffects?.onSiteCall?.();
|
|
796
|
-
try {
|
|
797
|
-
const result = await httpClient.request(reqOpts);
|
|
798
|
-
sideEffects?.onSuccess?.(result);
|
|
799
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
800
|
-
} catch (err) {
|
|
801
|
-
const transformedError = sdkTransformError(
|
|
802
|
-
err,
|
|
803
|
-
{
|
|
804
|
-
spreadPathsToArguments: {},
|
|
805
|
-
explicitPathsToArguments: {
|
|
806
|
-
transactionId: "$[0]",
|
|
807
|
-
targetDate: "$[1].targetDate",
|
|
808
|
-
idempotencyKey: "$[1].idempotencyKey",
|
|
809
|
-
beneficiary: "$[1].beneficiary",
|
|
810
|
-
namespace: "$[1].namespace"
|
|
811
|
-
},
|
|
812
|
-
singleArgumentUnchanged: false
|
|
813
|
-
},
|
|
814
|
-
["transactionId", "options"]
|
|
815
|
-
);
|
|
816
|
-
sideEffects?.onError?.(err);
|
|
817
|
-
throw transformedError;
|
|
818
|
-
}
|
|
819
|
-
}
|
|
820
|
-
async function checkBenefitEligibility2(poolId, options) {
|
|
821
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
822
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
823
|
-
poolId,
|
|
824
|
-
benefitKey: options?.benefitKey,
|
|
825
|
-
itemReference: options?.itemReference,
|
|
826
|
-
count: options?.count,
|
|
827
|
-
targetDate: options?.targetDate,
|
|
828
|
-
additionalData: options?.additionalData,
|
|
829
|
-
beneficiary: options?.beneficiary,
|
|
830
|
-
namespace: options?.namespace,
|
|
831
|
-
intent: options?.intent
|
|
832
|
-
});
|
|
833
|
-
const reqOpts = checkBenefitEligibility(payload);
|
|
834
|
-
sideEffects?.onSiteCall?.();
|
|
835
|
-
try {
|
|
836
|
-
const result = await httpClient.request(reqOpts);
|
|
837
|
-
sideEffects?.onSuccess?.(result);
|
|
838
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
839
|
-
} catch (err) {
|
|
840
|
-
const transformedError = sdkTransformError(
|
|
841
|
-
err,
|
|
842
|
-
{
|
|
843
|
-
spreadPathsToArguments: {},
|
|
844
|
-
explicitPathsToArguments: {
|
|
845
|
-
poolId: "$[0]",
|
|
846
|
-
benefitKey: "$[1].benefitKey",
|
|
847
|
-
itemReference: "$[1].itemReference",
|
|
848
|
-
count: "$[1].count",
|
|
849
|
-
targetDate: "$[1].targetDate",
|
|
850
|
-
additionalData: "$[1].additionalData",
|
|
851
|
-
beneficiary: "$[1].beneficiary",
|
|
852
|
-
namespace: "$[1].namespace",
|
|
853
|
-
intent: "$[1].intent"
|
|
854
|
-
},
|
|
855
|
-
singleArgumentUnchanged: false
|
|
856
|
-
},
|
|
857
|
-
["poolId", "options"]
|
|
858
|
-
);
|
|
859
|
-
sideEffects?.onError?.(err);
|
|
860
|
-
throw transformedError;
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
async function bulkCheckBenefitEligibility2(options) {
|
|
864
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
865
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
866
|
-
benefitSelectors: options?.benefitSelectors,
|
|
867
|
-
namespace: options?.namespace,
|
|
868
|
-
beneficiary: options?.beneficiary
|
|
869
|
-
});
|
|
870
|
-
const reqOpts = bulkCheckBenefitEligibility(payload);
|
|
871
|
-
sideEffects?.onSiteCall?.();
|
|
872
|
-
try {
|
|
873
|
-
const result = await httpClient.request(reqOpts);
|
|
874
|
-
sideEffects?.onSuccess?.(result);
|
|
875
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
876
|
-
} catch (err) {
|
|
877
|
-
const transformedError = sdkTransformError(
|
|
878
|
-
err,
|
|
879
|
-
{
|
|
880
|
-
spreadPathsToArguments: {},
|
|
881
|
-
explicitPathsToArguments: {
|
|
882
|
-
benefitSelectors: "$[0].benefitSelectors",
|
|
883
|
-
namespace: "$[0].namespace",
|
|
884
|
-
beneficiary: "$[0].beneficiary"
|
|
885
|
-
},
|
|
886
|
-
singleArgumentUnchanged: false
|
|
887
|
-
},
|
|
888
|
-
["options"]
|
|
889
|
-
);
|
|
890
|
-
sideEffects?.onError?.(err);
|
|
891
|
-
throw transformedError;
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
async function getEligibleBenefits2(itemReference, options) {
|
|
895
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
896
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
897
|
-
itemReference,
|
|
898
|
-
count: options?.count,
|
|
899
|
-
targetDate: options?.targetDate,
|
|
900
|
-
additionalData: options?.additionalData,
|
|
901
|
-
beneficiary: options?.beneficiary,
|
|
902
|
-
namespace: options?.namespace
|
|
903
|
-
});
|
|
904
|
-
const reqOpts = getEligibleBenefits(payload);
|
|
905
|
-
sideEffects?.onSiteCall?.();
|
|
906
|
-
try {
|
|
907
|
-
const result = await httpClient.request(reqOpts);
|
|
908
|
-
sideEffects?.onSuccess?.(result);
|
|
909
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
910
|
-
} catch (err) {
|
|
911
|
-
const transformedError = sdkTransformError(
|
|
912
|
-
err,
|
|
913
|
-
{
|
|
914
|
-
spreadPathsToArguments: {},
|
|
915
|
-
explicitPathsToArguments: {
|
|
916
|
-
itemReference: "$[0]",
|
|
917
|
-
count: "$[1].count",
|
|
918
|
-
targetDate: "$[1].targetDate",
|
|
919
|
-
additionalData: "$[1].additionalData",
|
|
920
|
-
beneficiary: "$[1].beneficiary",
|
|
921
|
-
namespace: "$[1].namespace"
|
|
922
|
-
},
|
|
923
|
-
singleArgumentUnchanged: false
|
|
924
|
-
},
|
|
925
|
-
["itemReference", "options"]
|
|
926
|
-
);
|
|
927
|
-
sideEffects?.onError?.(err);
|
|
928
|
-
throw transformedError;
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
async function bulkUpdatePools2(options) {
|
|
932
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
933
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
934
|
-
pools: options?.pools,
|
|
935
|
-
returnEntity: options?.returnEntity
|
|
936
|
-
});
|
|
937
|
-
const reqOpts = bulkUpdatePools(payload);
|
|
938
|
-
sideEffects?.onSiteCall?.();
|
|
939
|
-
try {
|
|
940
|
-
const result = await httpClient.request(reqOpts);
|
|
941
|
-
sideEffects?.onSuccess?.(result);
|
|
942
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
943
|
-
} catch (err) {
|
|
944
|
-
const transformedError = sdkTransformError(
|
|
945
|
-
err,
|
|
946
|
-
{
|
|
947
|
-
spreadPathsToArguments: {},
|
|
948
|
-
explicitPathsToArguments: {
|
|
949
|
-
pools: "$[0].pools",
|
|
950
|
-
returnEntity: "$[0].returnEntity"
|
|
951
|
-
},
|
|
952
|
-
singleArgumentUnchanged: false
|
|
953
|
-
},
|
|
954
|
-
["options"]
|
|
955
|
-
);
|
|
956
|
-
sideEffects?.onError?.(err);
|
|
957
|
-
throw transformedError;
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
async function checkBenefitEligibilityByFilter2(options) {
|
|
961
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
962
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
963
|
-
poolFilter: options?.poolFilter,
|
|
964
|
-
namespace: options?.namespace,
|
|
965
|
-
itemReference: options?.itemReference,
|
|
966
|
-
count: options?.count,
|
|
967
|
-
targetDate: options?.targetDate,
|
|
968
|
-
beneficiary: options?.beneficiary,
|
|
969
|
-
additionalData: options?.additionalData,
|
|
970
|
-
poolSelector: options?.poolSelector
|
|
971
|
-
});
|
|
972
|
-
const reqOpts = checkBenefitEligibilityByFilter(payload);
|
|
973
|
-
sideEffects?.onSiteCall?.();
|
|
974
|
-
try {
|
|
975
|
-
const result = await httpClient.request(reqOpts);
|
|
976
|
-
sideEffects?.onSuccess?.(result);
|
|
977
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
978
|
-
} catch (err) {
|
|
979
|
-
const transformedError = sdkTransformError(
|
|
980
|
-
err,
|
|
981
|
-
{
|
|
982
|
-
spreadPathsToArguments: {},
|
|
983
|
-
explicitPathsToArguments: {
|
|
984
|
-
poolFilter: "$[0].poolFilter",
|
|
985
|
-
namespace: "$[0].namespace",
|
|
986
|
-
itemReference: "$[0].itemReference",
|
|
987
|
-
count: "$[0].count",
|
|
988
|
-
targetDate: "$[0].targetDate",
|
|
989
|
-
beneficiary: "$[0].beneficiary",
|
|
990
|
-
additionalData: "$[0].additionalData",
|
|
991
|
-
poolSelector: "$[0].poolSelector"
|
|
992
|
-
},
|
|
993
|
-
singleArgumentUnchanged: false
|
|
994
|
-
},
|
|
995
|
-
["options"]
|
|
996
|
-
);
|
|
997
|
-
sideEffects?.onError?.(err);
|
|
998
|
-
throw transformedError;
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
// src/benefit-programs-v1-pool-pools.public.ts
|
|
1003
|
-
function getPool3(httpClient) {
|
|
1004
|
-
return (poolId) => getPool2(
|
|
1005
|
-
poolId,
|
|
1006
|
-
// @ts-ignore
|
|
1007
|
-
{ httpClient }
|
|
1008
|
-
);
|
|
1009
|
-
}
|
|
1010
|
-
function updatePool3(httpClient) {
|
|
1011
|
-
return (_id, pool) => updatePool2(
|
|
1012
|
-
_id,
|
|
1013
|
-
pool,
|
|
1014
|
-
// @ts-ignore
|
|
1015
|
-
{ httpClient }
|
|
1016
|
-
);
|
|
1017
|
-
}
|
|
1018
|
-
function queryPools3(httpClient) {
|
|
1019
|
-
return (options) => queryPools2(
|
|
1020
|
-
options,
|
|
1021
|
-
// @ts-ignore
|
|
1022
|
-
{ httpClient }
|
|
1023
|
-
);
|
|
1024
|
-
}
|
|
1025
|
-
function typedQueryPools2(httpClient) {
|
|
1026
|
-
return (query, options) => typedQueryPools(
|
|
1027
|
-
query,
|
|
1028
|
-
options,
|
|
1029
|
-
// @ts-ignore
|
|
1030
|
-
{ httpClient }
|
|
1031
|
-
);
|
|
1032
|
-
}
|
|
1033
|
-
function redeemBenefit3(httpClient) {
|
|
1034
|
-
return (poolId, options) => redeemBenefit2(
|
|
1035
|
-
poolId,
|
|
1036
|
-
options,
|
|
1037
|
-
// @ts-ignore
|
|
1038
|
-
{ httpClient }
|
|
1039
|
-
);
|
|
1040
|
-
}
|
|
1041
|
-
function reallocateBenefit3(httpClient) {
|
|
1042
|
-
return (transactionId, options) => reallocateBenefit2(
|
|
1043
|
-
transactionId,
|
|
1044
|
-
options,
|
|
1045
|
-
// @ts-ignore
|
|
1046
|
-
{ httpClient }
|
|
1047
|
-
);
|
|
1048
|
-
}
|
|
1049
|
-
function checkBenefitEligibility3(httpClient) {
|
|
1050
|
-
return (poolId, options) => checkBenefitEligibility2(
|
|
1051
|
-
poolId,
|
|
1052
|
-
options,
|
|
1053
|
-
// @ts-ignore
|
|
1054
|
-
{ httpClient }
|
|
1055
|
-
);
|
|
1056
|
-
}
|
|
1057
|
-
function bulkCheckBenefitEligibility3(httpClient) {
|
|
1058
|
-
return (options) => bulkCheckBenefitEligibility2(
|
|
1059
|
-
options,
|
|
1060
|
-
// @ts-ignore
|
|
1061
|
-
{ httpClient }
|
|
1062
|
-
);
|
|
1063
|
-
}
|
|
1064
|
-
function getEligibleBenefits3(httpClient) {
|
|
1065
|
-
return (itemReference, options) => getEligibleBenefits2(
|
|
1066
|
-
itemReference,
|
|
1067
|
-
options,
|
|
1068
|
-
// @ts-ignore
|
|
1069
|
-
{ httpClient }
|
|
1070
|
-
);
|
|
1071
|
-
}
|
|
1072
|
-
function bulkUpdatePools3(httpClient) {
|
|
1073
|
-
return (options) => bulkUpdatePools2(
|
|
1074
|
-
options,
|
|
1075
|
-
// @ts-ignore
|
|
1076
|
-
{ httpClient }
|
|
1077
|
-
);
|
|
1078
|
-
}
|
|
1079
|
-
function checkBenefitEligibilityByFilter3(httpClient) {
|
|
1080
|
-
return (options) => checkBenefitEligibilityByFilter2(
|
|
1081
|
-
options,
|
|
1082
|
-
// @ts-ignore
|
|
1083
|
-
{ httpClient }
|
|
1084
|
-
);
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
// src/benefit-programs-v1-pool-pools.context.ts
|
|
1088
|
-
import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
|
|
1089
|
-
import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
|
|
1090
|
-
function customQueryPools(httpClient) {
|
|
1091
|
-
const router = /* @__PURE__ */ createQueryOverloadRouter({
|
|
1092
|
-
builderQueryFunction: (options) => queryPools3(httpClient)(options),
|
|
1093
|
-
typedQueryFunction: (query, options) => typedQueryPools2(httpClient)(query, options),
|
|
1094
|
-
hasOptionsParameter: true
|
|
1095
|
-
});
|
|
1096
|
-
function overloadedQuery(queryOrOptions, options) {
|
|
1097
|
-
return router(...arguments);
|
|
1098
|
-
}
|
|
1099
|
-
return overloadedQuery;
|
|
1100
|
-
}
|
|
1101
|
-
var getPool4 = /* @__PURE__ */ createRESTModule(getPool3);
|
|
1102
|
-
var updatePool4 = /* @__PURE__ */ createRESTModule(updatePool3);
|
|
1103
|
-
var redeemBenefit4 = /* @__PURE__ */ createRESTModule(redeemBenefit3);
|
|
1104
|
-
var reallocateBenefit4 = /* @__PURE__ */ createRESTModule(reallocateBenefit3);
|
|
1105
|
-
var checkBenefitEligibility4 = /* @__PURE__ */ createRESTModule(checkBenefitEligibility3);
|
|
1106
|
-
var bulkCheckBenefitEligibility4 = /* @__PURE__ */ createRESTModule(bulkCheckBenefitEligibility3);
|
|
1107
|
-
var getEligibleBenefits4 = /* @__PURE__ */ createRESTModule(getEligibleBenefits3);
|
|
1108
|
-
var bulkUpdatePools4 = /* @__PURE__ */ createRESTModule(bulkUpdatePools3);
|
|
1109
|
-
var checkBenefitEligibilityByFilter4 = /* @__PURE__ */ createRESTModule(checkBenefitEligibilityByFilter3);
|
|
1110
|
-
var queryPools4 = /* @__PURE__ */ createRESTModule(customQueryPools);
|
|
1111
|
-
export {
|
|
1112
|
-
BenefitResultType,
|
|
1113
|
-
IdentityType,
|
|
1114
|
-
Intent,
|
|
1115
|
-
PolicyExpressionType,
|
|
1116
|
-
PoolOrigin,
|
|
1117
|
-
PoolRenewalActionType,
|
|
1118
|
-
PoolSelectorType,
|
|
1119
|
-
PoolStatus,
|
|
1120
|
-
ProvisionPoolsForProgramResponseType,
|
|
1121
|
-
SortOrder,
|
|
1122
|
-
TimePeriod,
|
|
1123
|
-
Type,
|
|
1124
|
-
WebhookIdentityType,
|
|
1125
|
-
WeekDay,
|
|
1126
|
-
bulkCheckBenefitEligibility4 as bulkCheckBenefitEligibility,
|
|
1127
|
-
bulkUpdatePools4 as bulkUpdatePools,
|
|
1128
|
-
checkBenefitEligibility4 as checkBenefitEligibility,
|
|
1129
|
-
checkBenefitEligibilityByFilter4 as checkBenefitEligibilityByFilter,
|
|
1130
|
-
getEligibleBenefits4 as getEligibleBenefits,
|
|
1131
|
-
getPool4 as getPool,
|
|
1132
|
-
queryPools4 as queryPools,
|
|
1133
|
-
reallocateBenefit4 as reallocateBenefit,
|
|
1134
|
-
redeemBenefit4 as redeemBenefit,
|
|
1135
|
-
updatePool4 as updatePool,
|
|
1136
|
-
utils
|
|
1137
|
-
};
|
|
1138
|
-
//# sourceMappingURL=index.mjs.map
|