@wix/auto_sdk_benefit-programs_pools 1.0.80 → 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.js.map +1 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +2 -0
- package/build/internal/es/index.typings.d.mts +2 -0
- 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 -1247
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -1130
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -908
- 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 -1198
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -1080
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -857
- 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,1080 +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 cancelRedemption(payload) {
|
|
367
|
-
function __cancelRedemption({ host }) {
|
|
368
|
-
const metadata = {
|
|
369
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
370
|
-
method: "POST",
|
|
371
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CancelRedemption",
|
|
372
|
-
packageName: PACKAGE_NAME,
|
|
373
|
-
migrationOptions: {
|
|
374
|
-
optInTransformResponse: true
|
|
375
|
-
},
|
|
376
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
377
|
-
protoPath: "/v1/benefits/cancel-redemption",
|
|
378
|
-
data: payload,
|
|
379
|
-
host
|
|
380
|
-
}),
|
|
381
|
-
data: payload
|
|
382
|
-
};
|
|
383
|
-
return metadata;
|
|
384
|
-
}
|
|
385
|
-
return __cancelRedemption;
|
|
386
|
-
}
|
|
387
|
-
function checkBenefitEligibility(payload) {
|
|
388
|
-
function __checkBenefitEligibility({ host }) {
|
|
389
|
-
const serializedData = transformPaths(payload, [
|
|
390
|
-
{
|
|
391
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
392
|
-
paths: [{ path: "targetDate" }]
|
|
393
|
-
}
|
|
394
|
-
]);
|
|
395
|
-
const metadata = {
|
|
396
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
397
|
-
method: "POST",
|
|
398
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibility",
|
|
399
|
-
packageName: PACKAGE_NAME,
|
|
400
|
-
migrationOptions: {
|
|
401
|
-
optInTransformResponse: true
|
|
402
|
-
},
|
|
403
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
404
|
-
protoPath: "/v1/pools/check-eligibility",
|
|
405
|
-
data: serializedData,
|
|
406
|
-
host
|
|
407
|
-
}),
|
|
408
|
-
data: serializedData
|
|
409
|
-
};
|
|
410
|
-
return metadata;
|
|
411
|
-
}
|
|
412
|
-
return __checkBenefitEligibility;
|
|
413
|
-
}
|
|
414
|
-
function bulkCheckBenefitEligibility(payload) {
|
|
415
|
-
function __bulkCheckBenefitEligibility({ host }) {
|
|
416
|
-
const serializedData = transformPaths(payload, [
|
|
417
|
-
{
|
|
418
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
419
|
-
paths: [{ path: "benefitSelectors.targetDate" }]
|
|
420
|
-
}
|
|
421
|
-
]);
|
|
422
|
-
const metadata = {
|
|
423
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
424
|
-
method: "POST",
|
|
425
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.BulkCheckBenefitEligibility",
|
|
426
|
-
packageName: PACKAGE_NAME,
|
|
427
|
-
migrationOptions: {
|
|
428
|
-
optInTransformResponse: true
|
|
429
|
-
},
|
|
430
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
431
|
-
protoPath: "/v1/bulk/benefits/check-eligibility",
|
|
432
|
-
data: serializedData,
|
|
433
|
-
host
|
|
434
|
-
}),
|
|
435
|
-
data: serializedData,
|
|
436
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
437
|
-
{
|
|
438
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
439
|
-
paths: [{ path: "results.benefitSelector.targetDate" }]
|
|
440
|
-
}
|
|
441
|
-
])
|
|
442
|
-
};
|
|
443
|
-
return metadata;
|
|
444
|
-
}
|
|
445
|
-
return __bulkCheckBenefitEligibility;
|
|
446
|
-
}
|
|
447
|
-
function getEligibleBenefits(payload) {
|
|
448
|
-
function __getEligibleBenefits({ host }) {
|
|
449
|
-
const serializedData = transformPaths(payload, [
|
|
450
|
-
{
|
|
451
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
452
|
-
paths: [{ path: "targetDate" }]
|
|
453
|
-
}
|
|
454
|
-
]);
|
|
455
|
-
const metadata = {
|
|
456
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
457
|
-
method: "POST",
|
|
458
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.GetEligibleBenefits",
|
|
459
|
-
packageName: PACKAGE_NAME,
|
|
460
|
-
migrationOptions: {
|
|
461
|
-
optInTransformResponse: true
|
|
462
|
-
},
|
|
463
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
464
|
-
protoPath: "/v1/pools/eligible-pools",
|
|
465
|
-
data: serializedData,
|
|
466
|
-
host
|
|
467
|
-
}),
|
|
468
|
-
data: serializedData
|
|
469
|
-
};
|
|
470
|
-
return metadata;
|
|
471
|
-
}
|
|
472
|
-
return __getEligibleBenefits;
|
|
473
|
-
}
|
|
474
|
-
function bulkUpdatePools(payload) {
|
|
475
|
-
function __bulkUpdatePools({ host }) {
|
|
476
|
-
const serializedData = transformPaths(payload, [
|
|
477
|
-
{
|
|
478
|
-
transformFn: transformSDKFieldMaskToRESTFieldMask,
|
|
479
|
-
paths: [{ path: "pools.fieldMask" }]
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
483
|
-
paths: [
|
|
484
|
-
{ path: "pools.pool.createdDate" },
|
|
485
|
-
{ path: "pools.pool.updatedDate" }
|
|
486
|
-
]
|
|
487
|
-
}
|
|
488
|
-
]);
|
|
489
|
-
const metadata = {
|
|
490
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
491
|
-
method: "POST",
|
|
492
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.BulkUpdatePools",
|
|
493
|
-
packageName: PACKAGE_NAME,
|
|
494
|
-
migrationOptions: {
|
|
495
|
-
optInTransformResponse: true
|
|
496
|
-
},
|
|
497
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
498
|
-
protoPath: "/v1/bulk/pools",
|
|
499
|
-
data: serializedData,
|
|
500
|
-
host
|
|
501
|
-
}),
|
|
502
|
-
data: serializedData,
|
|
503
|
-
transformResponse: (payload2) => transformPaths(payload2, [
|
|
504
|
-
{
|
|
505
|
-
transformFn: transformRESTTimestampToSDKTimestamp,
|
|
506
|
-
paths: [
|
|
507
|
-
{ path: "results.item.createdDate" },
|
|
508
|
-
{ path: "results.item.updatedDate" }
|
|
509
|
-
]
|
|
510
|
-
}
|
|
511
|
-
])
|
|
512
|
-
};
|
|
513
|
-
return metadata;
|
|
514
|
-
}
|
|
515
|
-
return __bulkUpdatePools;
|
|
516
|
-
}
|
|
517
|
-
function checkBenefitEligibilityByFilter(payload) {
|
|
518
|
-
function __checkBenefitEligibilityByFilter({ host }) {
|
|
519
|
-
const serializedData = transformPaths(payload, [
|
|
520
|
-
{
|
|
521
|
-
transformFn: transformSDKTimestampToRESTTimestamp,
|
|
522
|
-
paths: [{ path: "targetDate" }]
|
|
523
|
-
}
|
|
524
|
-
]);
|
|
525
|
-
const metadata = {
|
|
526
|
-
entityFqdn: "wix.benefit_programs.v1.pool",
|
|
527
|
-
method: "POST",
|
|
528
|
-
methodFqn: "wix.benefit_programs.v1.pool.PoolService.CheckBenefitEligibilityByFilter",
|
|
529
|
-
packageName: PACKAGE_NAME,
|
|
530
|
-
migrationOptions: {
|
|
531
|
-
optInTransformResponse: true
|
|
532
|
-
},
|
|
533
|
-
url: resolveWixBenefitProgramsV1PoolPoolServiceUrl({
|
|
534
|
-
protoPath: "/v1/pools/check-benefit-eligibility-by-filter",
|
|
535
|
-
data: serializedData,
|
|
536
|
-
host
|
|
537
|
-
}),
|
|
538
|
-
data: serializedData
|
|
539
|
-
};
|
|
540
|
-
return metadata;
|
|
541
|
-
}
|
|
542
|
-
return __checkBenefitEligibilityByFilter;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
// src/benefit-programs-v1-pool-pools.universal.ts
|
|
546
|
-
import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
547
|
-
import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
|
|
548
|
-
var PoolStatus = /* @__PURE__ */ ((PoolStatus2) => {
|
|
549
|
-
PoolStatus2["ACTIVE"] = "ACTIVE";
|
|
550
|
-
PoolStatus2["PAUSED"] = "PAUSED";
|
|
551
|
-
PoolStatus2["ENDED"] = "ENDED";
|
|
552
|
-
PoolStatus2["PROVISIONING"] = "PROVISIONING";
|
|
553
|
-
PoolStatus2["RENEWING"] = "RENEWING";
|
|
554
|
-
PoolStatus2["PENDING"] = "PENDING";
|
|
555
|
-
return PoolStatus2;
|
|
556
|
-
})(PoolStatus || {});
|
|
557
|
-
var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
|
|
558
|
-
IdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
559
|
-
IdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
560
|
-
IdentityType2["MEMBER"] = "MEMBER";
|
|
561
|
-
IdentityType2["WIX_USER"] = "WIX_USER";
|
|
562
|
-
return IdentityType2;
|
|
563
|
-
})(IdentityType || {});
|
|
564
|
-
var PolicyExpressionType = /* @__PURE__ */ ((PolicyExpressionType2) => {
|
|
565
|
-
PolicyExpressionType2["OPERATOR_NOT"] = "OPERATOR_NOT";
|
|
566
|
-
PolicyExpressionType2["OPERATOR_AND"] = "OPERATOR_AND";
|
|
567
|
-
PolicyExpressionType2["OPERATOR_OR"] = "OPERATOR_OR";
|
|
568
|
-
PolicyExpressionType2["POLICY"] = "POLICY";
|
|
569
|
-
return PolicyExpressionType2;
|
|
570
|
-
})(PolicyExpressionType || {});
|
|
571
|
-
var Type = /* @__PURE__ */ ((Type2) => {
|
|
572
|
-
Type2["FIXED_INTERVAL"] = "FIXED_INTERVAL";
|
|
573
|
-
Type2["RATE_LIMITED"] = "RATE_LIMITED";
|
|
574
|
-
Type2["CUSTOM"] = "CUSTOM";
|
|
575
|
-
return Type2;
|
|
576
|
-
})(Type || {});
|
|
577
|
-
var WeekDay = /* @__PURE__ */ ((WeekDay2) => {
|
|
578
|
-
WeekDay2["UNKNOWN"] = "UNKNOWN";
|
|
579
|
-
WeekDay2["MONDAY"] = "MONDAY";
|
|
580
|
-
WeekDay2["TUESDAY"] = "TUESDAY";
|
|
581
|
-
WeekDay2["WEDNESDAY"] = "WEDNESDAY";
|
|
582
|
-
WeekDay2["THURSDAY"] = "THURSDAY";
|
|
583
|
-
WeekDay2["FRIDAY"] = "FRIDAY";
|
|
584
|
-
WeekDay2["SATURDAY"] = "SATURDAY";
|
|
585
|
-
WeekDay2["SUNDAY"] = "SUNDAY";
|
|
586
|
-
return WeekDay2;
|
|
587
|
-
})(WeekDay || {});
|
|
588
|
-
var TimePeriod = /* @__PURE__ */ ((TimePeriod2) => {
|
|
589
|
-
TimePeriod2["DAY"] = "DAY";
|
|
590
|
-
TimePeriod2["MONTH"] = "MONTH";
|
|
591
|
-
return TimePeriod2;
|
|
592
|
-
})(TimePeriod || {});
|
|
593
|
-
var PoolOrigin = /* @__PURE__ */ ((PoolOrigin2) => {
|
|
594
|
-
PoolOrigin2["PROVISION"] = "PROVISION";
|
|
595
|
-
PoolOrigin2["CASCADE"] = "CASCADE";
|
|
596
|
-
return PoolOrigin2;
|
|
597
|
-
})(PoolOrigin || {});
|
|
598
|
-
var PoolRenewalActionType = /* @__PURE__ */ ((PoolRenewalActionType2) => {
|
|
599
|
-
PoolRenewalActionType2["END"] = "END";
|
|
600
|
-
PoolRenewalActionType2["UPDATE"] = "UPDATE";
|
|
601
|
-
return PoolRenewalActionType2;
|
|
602
|
-
})(PoolRenewalActionType || {});
|
|
603
|
-
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
604
|
-
SortOrder2["ASC"] = "ASC";
|
|
605
|
-
SortOrder2["DESC"] = "DESC";
|
|
606
|
-
return SortOrder2;
|
|
607
|
-
})(SortOrder || {});
|
|
608
|
-
var Intent = /* @__PURE__ */ ((Intent2) => {
|
|
609
|
-
Intent2["REDEMPTION"] = "REDEMPTION";
|
|
610
|
-
Intent2["REALLOCATION"] = "REALLOCATION";
|
|
611
|
-
return Intent2;
|
|
612
|
-
})(Intent || {});
|
|
613
|
-
var BenefitResultType = /* @__PURE__ */ ((BenefitResultType2) => {
|
|
614
|
-
BenefitResultType2["ELIGIBLE_BENEFIT"] = "ELIGIBLE_BENEFIT";
|
|
615
|
-
BenefitResultType2["NOT_ENOUGH_BALANCE"] = "NOT_ENOUGH_BALANCE";
|
|
616
|
-
BenefitResultType2["POLICY_EXPRESSION_EVALUATED_TO_FALSE"] = "POLICY_EXPRESSION_EVALUATED_TO_FALSE";
|
|
617
|
-
BenefitResultType2["POOL_NOT_ACTIVE"] = "POOL_NOT_ACTIVE";
|
|
618
|
-
BenefitResultType2["BENEFIT_NOT_FOUND"] = "BENEFIT_NOT_FOUND";
|
|
619
|
-
BenefitResultType2["POOL_NOT_FOUND"] = "POOL_NOT_FOUND";
|
|
620
|
-
return BenefitResultType2;
|
|
621
|
-
})(BenefitResultType || {});
|
|
622
|
-
var ProvisionPoolsForProgramResponseType = /* @__PURE__ */ ((ProvisionPoolsForProgramResponseType2) => {
|
|
623
|
-
ProvisionPoolsForProgramResponseType2["SYNC"] = "SYNC";
|
|
624
|
-
ProvisionPoolsForProgramResponseType2["ASYNC"] = "ASYNC";
|
|
625
|
-
return ProvisionPoolsForProgramResponseType2;
|
|
626
|
-
})(ProvisionPoolsForProgramResponseType || {});
|
|
627
|
-
var PoolSelectorType = /* @__PURE__ */ ((PoolSelectorType2) => {
|
|
628
|
-
PoolSelectorType2["BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID"] = "BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID";
|
|
629
|
-
PoolSelectorType2["BY_PROGRAM_ID"] = "BY_PROGRAM_ID";
|
|
630
|
-
return PoolSelectorType2;
|
|
631
|
-
})(PoolSelectorType || {});
|
|
632
|
-
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
633
|
-
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
634
|
-
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
635
|
-
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
636
|
-
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
637
|
-
WebhookIdentityType2["APP"] = "APP";
|
|
638
|
-
return WebhookIdentityType2;
|
|
639
|
-
})(WebhookIdentityType || {});
|
|
640
|
-
async function getPool2(poolId) {
|
|
641
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
642
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({ poolId });
|
|
643
|
-
const reqOpts = getPool(payload);
|
|
644
|
-
sideEffects?.onSiteCall?.();
|
|
645
|
-
try {
|
|
646
|
-
const result = await httpClient.request(reqOpts);
|
|
647
|
-
sideEffects?.onSuccess?.(result);
|
|
648
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data)?.pool;
|
|
649
|
-
} catch (err) {
|
|
650
|
-
const transformedError = sdkTransformError(
|
|
651
|
-
err,
|
|
652
|
-
{
|
|
653
|
-
spreadPathsToArguments: {},
|
|
654
|
-
explicitPathsToArguments: { poolId: "$[0]" },
|
|
655
|
-
singleArgumentUnchanged: false
|
|
656
|
-
},
|
|
657
|
-
["poolId"]
|
|
658
|
-
);
|
|
659
|
-
sideEffects?.onError?.(err);
|
|
660
|
-
throw transformedError;
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
async function updatePool2(_id, pool) {
|
|
664
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
665
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
666
|
-
pool: { ...pool, id: _id }
|
|
667
|
-
});
|
|
668
|
-
const reqOpts = updatePool(payload);
|
|
669
|
-
sideEffects?.onSiteCall?.();
|
|
670
|
-
try {
|
|
671
|
-
const result = await httpClient.request(reqOpts);
|
|
672
|
-
sideEffects?.onSuccess?.(result);
|
|
673
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data)?.pool;
|
|
674
|
-
} catch (err) {
|
|
675
|
-
const transformedError = sdkTransformError(
|
|
676
|
-
err,
|
|
677
|
-
{
|
|
678
|
-
spreadPathsToArguments: { pool: "$[1]" },
|
|
679
|
-
explicitPathsToArguments: { "pool.id": "$[0]" },
|
|
680
|
-
singleArgumentUnchanged: false
|
|
681
|
-
},
|
|
682
|
-
["_id", "pool"]
|
|
683
|
-
);
|
|
684
|
-
sideEffects?.onError?.(err);
|
|
685
|
-
throw transformedError;
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
function queryPools2(options) {
|
|
689
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
690
|
-
return queryBuilder({
|
|
691
|
-
func: async (payload) => {
|
|
692
|
-
const reqOpts = queryPools({
|
|
693
|
-
...payload,
|
|
694
|
-
...options ?? {}
|
|
695
|
-
});
|
|
696
|
-
sideEffects?.onSiteCall?.();
|
|
697
|
-
try {
|
|
698
|
-
const result = await httpClient.request(reqOpts);
|
|
699
|
-
sideEffects?.onSuccess?.(result);
|
|
700
|
-
return result;
|
|
701
|
-
} catch (err) {
|
|
702
|
-
sideEffects?.onError?.(err);
|
|
703
|
-
throw err;
|
|
704
|
-
}
|
|
705
|
-
},
|
|
706
|
-
requestTransformer: (query) => {
|
|
707
|
-
const args = [query, options];
|
|
708
|
-
return renameKeysFromSDKRequestToRESTRequest({
|
|
709
|
-
...args?.[1],
|
|
710
|
-
query: args?.[0]
|
|
711
|
-
});
|
|
712
|
-
},
|
|
713
|
-
responseTransformer: ({ data }) => {
|
|
714
|
-
const transformedData = renameKeysFromRESTResponseToSDKResponse(
|
|
715
|
-
transformPaths2(data, [])
|
|
716
|
-
);
|
|
717
|
-
return {
|
|
718
|
-
items: transformedData?.pools,
|
|
719
|
-
pagingMetadata: transformedData?.metadata
|
|
720
|
-
};
|
|
721
|
-
},
|
|
722
|
-
errorTransformer: (err) => {
|
|
723
|
-
const transformedError = sdkTransformError(err, {
|
|
724
|
-
spreadPathsToArguments: {},
|
|
725
|
-
explicitPathsToArguments: { query: "$[0]" },
|
|
726
|
-
singleArgumentUnchanged: false
|
|
727
|
-
});
|
|
728
|
-
throw transformedError;
|
|
729
|
-
},
|
|
730
|
-
pagingMethod: "CURSOR",
|
|
731
|
-
transformationPaths: {}
|
|
732
|
-
});
|
|
733
|
-
}
|
|
734
|
-
async function typedQueryPools(query, options) {
|
|
735
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
736
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
737
|
-
query,
|
|
738
|
-
...options
|
|
739
|
-
});
|
|
740
|
-
const reqOpts = queryPools(payload);
|
|
741
|
-
sideEffects?.onSiteCall?.();
|
|
742
|
-
try {
|
|
743
|
-
const result = await httpClient.request(reqOpts);
|
|
744
|
-
sideEffects?.onSuccess?.(result);
|
|
745
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
746
|
-
} catch (err) {
|
|
747
|
-
const transformedError = sdkTransformError(
|
|
748
|
-
err,
|
|
749
|
-
{
|
|
750
|
-
spreadPathsToArguments: {},
|
|
751
|
-
explicitPathsToArguments: { query: "$[0]" },
|
|
752
|
-
singleArgumentUnchanged: false
|
|
753
|
-
},
|
|
754
|
-
["query", "options"]
|
|
755
|
-
);
|
|
756
|
-
sideEffects?.onError?.(err);
|
|
757
|
-
throw transformedError;
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
var utils = {
|
|
761
|
-
query: /* @__PURE__ */ createQueryUtils()
|
|
762
|
-
};
|
|
763
|
-
async function redeemBenefit2(poolId, options) {
|
|
764
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
765
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
766
|
-
poolId,
|
|
767
|
-
itemReference: options?.itemReference,
|
|
768
|
-
benefitKey: options?.benefitKey,
|
|
769
|
-
count: options?.count,
|
|
770
|
-
targetDate: options?.targetDate,
|
|
771
|
-
idempotencyKey: options?.idempotencyKey,
|
|
772
|
-
additionalData: options?.additionalData,
|
|
773
|
-
beneficiary: options?.beneficiary,
|
|
774
|
-
namespace: options?.namespace
|
|
775
|
-
});
|
|
776
|
-
const reqOpts = redeemBenefit(payload);
|
|
777
|
-
sideEffects?.onSiteCall?.();
|
|
778
|
-
try {
|
|
779
|
-
const result = await httpClient.request(reqOpts);
|
|
780
|
-
sideEffects?.onSuccess?.(result);
|
|
781
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
782
|
-
} catch (err) {
|
|
783
|
-
const transformedError = sdkTransformError(
|
|
784
|
-
err,
|
|
785
|
-
{
|
|
786
|
-
spreadPathsToArguments: {},
|
|
787
|
-
explicitPathsToArguments: {
|
|
788
|
-
poolId: "$[0]",
|
|
789
|
-
itemReference: "$[1].itemReference",
|
|
790
|
-
benefitKey: "$[1].benefitKey",
|
|
791
|
-
count: "$[1].count",
|
|
792
|
-
targetDate: "$[1].targetDate",
|
|
793
|
-
idempotencyKey: "$[1].idempotencyKey",
|
|
794
|
-
additionalData: "$[1].additionalData",
|
|
795
|
-
beneficiary: "$[1].beneficiary",
|
|
796
|
-
namespace: "$[1].namespace"
|
|
797
|
-
},
|
|
798
|
-
singleArgumentUnchanged: false
|
|
799
|
-
},
|
|
800
|
-
["poolId", "options"]
|
|
801
|
-
);
|
|
802
|
-
sideEffects?.onError?.(err);
|
|
803
|
-
throw transformedError;
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
async function reallocateBenefit2(transactionId, options) {
|
|
807
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
808
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
809
|
-
transactionId,
|
|
810
|
-
targetDate: options?.targetDate,
|
|
811
|
-
idempotencyKey: options?.idempotencyKey,
|
|
812
|
-
beneficiary: options?.beneficiary,
|
|
813
|
-
namespace: options?.namespace
|
|
814
|
-
});
|
|
815
|
-
const reqOpts = reallocateBenefit(payload);
|
|
816
|
-
sideEffects?.onSiteCall?.();
|
|
817
|
-
try {
|
|
818
|
-
const result = await httpClient.request(reqOpts);
|
|
819
|
-
sideEffects?.onSuccess?.(result);
|
|
820
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
821
|
-
} catch (err) {
|
|
822
|
-
const transformedError = sdkTransformError(
|
|
823
|
-
err,
|
|
824
|
-
{
|
|
825
|
-
spreadPathsToArguments: {},
|
|
826
|
-
explicitPathsToArguments: {
|
|
827
|
-
transactionId: "$[0]",
|
|
828
|
-
targetDate: "$[1].targetDate",
|
|
829
|
-
idempotencyKey: "$[1].idempotencyKey",
|
|
830
|
-
beneficiary: "$[1].beneficiary",
|
|
831
|
-
namespace: "$[1].namespace"
|
|
832
|
-
},
|
|
833
|
-
singleArgumentUnchanged: false
|
|
834
|
-
},
|
|
835
|
-
["transactionId", "options"]
|
|
836
|
-
);
|
|
837
|
-
sideEffects?.onError?.(err);
|
|
838
|
-
throw transformedError;
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
async function cancelRedemption2(transactionId, options) {
|
|
842
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
843
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
844
|
-
transactionId,
|
|
845
|
-
idempotencyKey: options?.idempotencyKey
|
|
846
|
-
});
|
|
847
|
-
const reqOpts = cancelRedemption(payload);
|
|
848
|
-
sideEffects?.onSiteCall?.();
|
|
849
|
-
try {
|
|
850
|
-
const result = await httpClient.request(reqOpts);
|
|
851
|
-
sideEffects?.onSuccess?.(result);
|
|
852
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
853
|
-
} catch (err) {
|
|
854
|
-
const transformedError = sdkTransformError(
|
|
855
|
-
err,
|
|
856
|
-
{
|
|
857
|
-
spreadPathsToArguments: {},
|
|
858
|
-
explicitPathsToArguments: {
|
|
859
|
-
transactionId: "$[0]",
|
|
860
|
-
idempotencyKey: "$[1].idempotencyKey"
|
|
861
|
-
},
|
|
862
|
-
singleArgumentUnchanged: false
|
|
863
|
-
},
|
|
864
|
-
["transactionId", "options"]
|
|
865
|
-
);
|
|
866
|
-
sideEffects?.onError?.(err);
|
|
867
|
-
throw transformedError;
|
|
868
|
-
}
|
|
869
|
-
}
|
|
870
|
-
async function checkBenefitEligibility2(poolId, options) {
|
|
871
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
872
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
873
|
-
poolId,
|
|
874
|
-
benefitKey: options?.benefitKey,
|
|
875
|
-
itemReference: options?.itemReference,
|
|
876
|
-
count: options?.count,
|
|
877
|
-
targetDate: options?.targetDate,
|
|
878
|
-
additionalData: options?.additionalData,
|
|
879
|
-
beneficiary: options?.beneficiary,
|
|
880
|
-
namespace: options?.namespace,
|
|
881
|
-
intent: options?.intent
|
|
882
|
-
});
|
|
883
|
-
const reqOpts = checkBenefitEligibility(payload);
|
|
884
|
-
sideEffects?.onSiteCall?.();
|
|
885
|
-
try {
|
|
886
|
-
const result = await httpClient.request(reqOpts);
|
|
887
|
-
sideEffects?.onSuccess?.(result);
|
|
888
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
889
|
-
} catch (err) {
|
|
890
|
-
const transformedError = sdkTransformError(
|
|
891
|
-
err,
|
|
892
|
-
{
|
|
893
|
-
spreadPathsToArguments: {},
|
|
894
|
-
explicitPathsToArguments: {
|
|
895
|
-
poolId: "$[0]",
|
|
896
|
-
benefitKey: "$[1].benefitKey",
|
|
897
|
-
itemReference: "$[1].itemReference",
|
|
898
|
-
count: "$[1].count",
|
|
899
|
-
targetDate: "$[1].targetDate",
|
|
900
|
-
additionalData: "$[1].additionalData",
|
|
901
|
-
beneficiary: "$[1].beneficiary",
|
|
902
|
-
namespace: "$[1].namespace",
|
|
903
|
-
intent: "$[1].intent"
|
|
904
|
-
},
|
|
905
|
-
singleArgumentUnchanged: false
|
|
906
|
-
},
|
|
907
|
-
["poolId", "options"]
|
|
908
|
-
);
|
|
909
|
-
sideEffects?.onError?.(err);
|
|
910
|
-
throw transformedError;
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
async function bulkCheckBenefitEligibility2(options) {
|
|
914
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
915
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
916
|
-
benefitSelectors: options?.benefitSelectors,
|
|
917
|
-
namespace: options?.namespace,
|
|
918
|
-
beneficiary: options?.beneficiary
|
|
919
|
-
});
|
|
920
|
-
const reqOpts = bulkCheckBenefitEligibility(payload);
|
|
921
|
-
sideEffects?.onSiteCall?.();
|
|
922
|
-
try {
|
|
923
|
-
const result = await httpClient.request(reqOpts);
|
|
924
|
-
sideEffects?.onSuccess?.(result);
|
|
925
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
926
|
-
} catch (err) {
|
|
927
|
-
const transformedError = sdkTransformError(
|
|
928
|
-
err,
|
|
929
|
-
{
|
|
930
|
-
spreadPathsToArguments: {},
|
|
931
|
-
explicitPathsToArguments: {
|
|
932
|
-
benefitSelectors: "$[0].benefitSelectors",
|
|
933
|
-
namespace: "$[0].namespace",
|
|
934
|
-
beneficiary: "$[0].beneficiary"
|
|
935
|
-
},
|
|
936
|
-
singleArgumentUnchanged: false
|
|
937
|
-
},
|
|
938
|
-
["options"]
|
|
939
|
-
);
|
|
940
|
-
sideEffects?.onError?.(err);
|
|
941
|
-
throw transformedError;
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
async function getEligibleBenefits2(itemReference, options) {
|
|
945
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
946
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
947
|
-
itemReference,
|
|
948
|
-
count: options?.count,
|
|
949
|
-
targetDate: options?.targetDate,
|
|
950
|
-
additionalData: options?.additionalData,
|
|
951
|
-
beneficiary: options?.beneficiary,
|
|
952
|
-
namespace: options?.namespace
|
|
953
|
-
});
|
|
954
|
-
const reqOpts = getEligibleBenefits(payload);
|
|
955
|
-
sideEffects?.onSiteCall?.();
|
|
956
|
-
try {
|
|
957
|
-
const result = await httpClient.request(reqOpts);
|
|
958
|
-
sideEffects?.onSuccess?.(result);
|
|
959
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
960
|
-
} catch (err) {
|
|
961
|
-
const transformedError = sdkTransformError(
|
|
962
|
-
err,
|
|
963
|
-
{
|
|
964
|
-
spreadPathsToArguments: {},
|
|
965
|
-
explicitPathsToArguments: {
|
|
966
|
-
itemReference: "$[0]",
|
|
967
|
-
count: "$[1].count",
|
|
968
|
-
targetDate: "$[1].targetDate",
|
|
969
|
-
additionalData: "$[1].additionalData",
|
|
970
|
-
beneficiary: "$[1].beneficiary",
|
|
971
|
-
namespace: "$[1].namespace"
|
|
972
|
-
},
|
|
973
|
-
singleArgumentUnchanged: false
|
|
974
|
-
},
|
|
975
|
-
["itemReference", "options"]
|
|
976
|
-
);
|
|
977
|
-
sideEffects?.onError?.(err);
|
|
978
|
-
throw transformedError;
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
async function bulkUpdatePools2(options) {
|
|
982
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
983
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
984
|
-
pools: options?.pools,
|
|
985
|
-
returnEntity: options?.returnEntity
|
|
986
|
-
});
|
|
987
|
-
const reqOpts = bulkUpdatePools(payload);
|
|
988
|
-
sideEffects?.onSiteCall?.();
|
|
989
|
-
try {
|
|
990
|
-
const result = await httpClient.request(reqOpts);
|
|
991
|
-
sideEffects?.onSuccess?.(result);
|
|
992
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
993
|
-
} catch (err) {
|
|
994
|
-
const transformedError = sdkTransformError(
|
|
995
|
-
err,
|
|
996
|
-
{
|
|
997
|
-
spreadPathsToArguments: {},
|
|
998
|
-
explicitPathsToArguments: {
|
|
999
|
-
pools: "$[0].pools",
|
|
1000
|
-
returnEntity: "$[0].returnEntity"
|
|
1001
|
-
},
|
|
1002
|
-
singleArgumentUnchanged: false
|
|
1003
|
-
},
|
|
1004
|
-
["options"]
|
|
1005
|
-
);
|
|
1006
|
-
sideEffects?.onError?.(err);
|
|
1007
|
-
throw transformedError;
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
|
-
async function checkBenefitEligibilityByFilter2(options) {
|
|
1011
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
1012
|
-
const payload = renameKeysFromSDKRequestToRESTRequest({
|
|
1013
|
-
poolFilter: options?.poolFilter,
|
|
1014
|
-
namespace: options?.namespace,
|
|
1015
|
-
itemReference: options?.itemReference,
|
|
1016
|
-
count: options?.count,
|
|
1017
|
-
targetDate: options?.targetDate,
|
|
1018
|
-
beneficiary: options?.beneficiary,
|
|
1019
|
-
additionalData: options?.additionalData,
|
|
1020
|
-
poolSelector: options?.poolSelector
|
|
1021
|
-
});
|
|
1022
|
-
const reqOpts = checkBenefitEligibilityByFilter(payload);
|
|
1023
|
-
sideEffects?.onSiteCall?.();
|
|
1024
|
-
try {
|
|
1025
|
-
const result = await httpClient.request(reqOpts);
|
|
1026
|
-
sideEffects?.onSuccess?.(result);
|
|
1027
|
-
return renameKeysFromRESTResponseToSDKResponse(result.data);
|
|
1028
|
-
} catch (err) {
|
|
1029
|
-
const transformedError = sdkTransformError(
|
|
1030
|
-
err,
|
|
1031
|
-
{
|
|
1032
|
-
spreadPathsToArguments: {},
|
|
1033
|
-
explicitPathsToArguments: {
|
|
1034
|
-
poolFilter: "$[0].poolFilter",
|
|
1035
|
-
namespace: "$[0].namespace",
|
|
1036
|
-
itemReference: "$[0].itemReference",
|
|
1037
|
-
count: "$[0].count",
|
|
1038
|
-
targetDate: "$[0].targetDate",
|
|
1039
|
-
beneficiary: "$[0].beneficiary",
|
|
1040
|
-
additionalData: "$[0].additionalData",
|
|
1041
|
-
poolSelector: "$[0].poolSelector"
|
|
1042
|
-
},
|
|
1043
|
-
singleArgumentUnchanged: false
|
|
1044
|
-
},
|
|
1045
|
-
["options"]
|
|
1046
|
-
);
|
|
1047
|
-
sideEffects?.onError?.(err);
|
|
1048
|
-
throw transformedError;
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
export {
|
|
1052
|
-
BenefitResultType,
|
|
1053
|
-
IdentityType,
|
|
1054
|
-
Intent,
|
|
1055
|
-
PolicyExpressionType,
|
|
1056
|
-
PoolOrigin,
|
|
1057
|
-
PoolRenewalActionType,
|
|
1058
|
-
PoolSelectorType,
|
|
1059
|
-
PoolStatus,
|
|
1060
|
-
ProvisionPoolsForProgramResponseType,
|
|
1061
|
-
SortOrder,
|
|
1062
|
-
TimePeriod,
|
|
1063
|
-
Type,
|
|
1064
|
-
WebhookIdentityType,
|
|
1065
|
-
WeekDay,
|
|
1066
|
-
bulkCheckBenefitEligibility2 as bulkCheckBenefitEligibility,
|
|
1067
|
-
bulkUpdatePools2 as bulkUpdatePools,
|
|
1068
|
-
cancelRedemption2 as cancelRedemption,
|
|
1069
|
-
checkBenefitEligibility2 as checkBenefitEligibility,
|
|
1070
|
-
checkBenefitEligibilityByFilter2 as checkBenefitEligibilityByFilter,
|
|
1071
|
-
getEligibleBenefits2 as getEligibleBenefits,
|
|
1072
|
-
getPool2 as getPool,
|
|
1073
|
-
queryPools2 as queryPools,
|
|
1074
|
-
reallocateBenefit2 as reallocateBenefit,
|
|
1075
|
-
redeemBenefit2 as redeemBenefit,
|
|
1076
|
-
typedQueryPools,
|
|
1077
|
-
updatePool2 as updatePool,
|
|
1078
|
-
utils
|
|
1079
|
-
};
|
|
1080
|
-
//# sourceMappingURL=index.typings.mjs.map
|