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