@wix/auto_sdk_benefit-programs_pool-items 1.0.12 → 1.0.13
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/package.json +4 -11
- package/build/cjs/schemas.d.ts +0 -121
- package/build/cjs/schemas.js +0 -299
- package/build/cjs/schemas.js.map +0 -1
- package/build/es/schemas.d.mts +0 -121
- package/build/es/schemas.mjs +0 -261
- package/build/es/schemas.mjs.map +0 -1
- package/build/internal/cjs/index.js +0 -256
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -225
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -159
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.d.ts +0 -121
- package/build/internal/cjs/schemas.js +0 -299
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -226
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -194
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -127
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.d.mts +0 -121
- package/build/internal/es/schemas.mjs +0 -261
- package/build/internal/es/schemas.mjs.map +0 -1
- package/schemas/package.json +0 -3
package/build/es/schemas.mjs
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
// src/benefit-programs-v1-pool-item-pool-items.schemas.ts
|
|
2
|
-
import * as z from "zod";
|
|
3
|
-
var QueryPoolItemsRequest = /* @__PURE__ */ z.object({
|
|
4
|
-
query: z.intersection(
|
|
5
|
-
z.object({
|
|
6
|
-
filter: z.record(z.string(), z.any()).describe(
|
|
7
|
-
'Filter object in the following format:\n`"filter" : {\n"fieldName1": "value1",\n"fieldName2":{"$operator":"value2"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`'
|
|
8
|
-
).optional().nullable(),
|
|
9
|
-
sort: z.array(
|
|
10
|
-
z.object({
|
|
11
|
-
fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
|
|
12
|
-
order: z.enum(["ASC", "DESC"]).optional()
|
|
13
|
-
})
|
|
14
|
-
).max(5).optional()
|
|
15
|
-
}),
|
|
16
|
-
z.xor([
|
|
17
|
-
z.object({ cursorPaging: z.never().optional() }),
|
|
18
|
-
z.object({
|
|
19
|
-
cursorPaging: z.object({
|
|
20
|
-
limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(1e3).optional().nullable(),
|
|
21
|
-
cursor: z.string().describe(
|
|
22
|
-
"Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request."
|
|
23
|
-
).max(16e3).optional().nullable()
|
|
24
|
-
}).describe(
|
|
25
|
-
"Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`."
|
|
26
|
-
)
|
|
27
|
-
})
|
|
28
|
-
])
|
|
29
|
-
).describe("Query options."),
|
|
30
|
-
options: z.object({
|
|
31
|
-
fields: z.array(
|
|
32
|
-
z.enum([
|
|
33
|
-
"POOL",
|
|
34
|
-
"PROGRAM",
|
|
35
|
-
"PROGRAM_DEFINITION",
|
|
36
|
-
"ITEM",
|
|
37
|
-
"BENEFIT",
|
|
38
|
-
"BALANCE"
|
|
39
|
-
])
|
|
40
|
-
).max(6).optional()
|
|
41
|
-
}).optional()
|
|
42
|
-
});
|
|
43
|
-
var QueryPoolItemsResponse = /* @__PURE__ */ z.object({
|
|
44
|
-
poolItems: z.array(
|
|
45
|
-
z.object({
|
|
46
|
-
_id: z.string().describe(
|
|
47
|
-
"Pool item ID. Generated deterministically from `poolId` and `itemId`."
|
|
48
|
-
).regex(
|
|
49
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
50
|
-
"Must be a valid GUID"
|
|
51
|
-
).optional(),
|
|
52
|
-
revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
|
|
53
|
-
"Revision number, which increments by 1 each time the pool item is updated."
|
|
54
|
-
).optional().nullable(),
|
|
55
|
-
_createdDate: z.date().describe("Date and time the pool item was created.").optional().nullable(),
|
|
56
|
-
_updatedDate: z.date().describe("Date and time the pool item was updated.").optional().nullable(),
|
|
57
|
-
externalId: z.string().describe(
|
|
58
|
-
"External item ID assigned by the provider of the items.\n\nFor example, if the items are products, this ID corresponds to the specific product ID in the provider's system."
|
|
59
|
-
).regex(
|
|
60
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
61
|
-
"Must be a valid GUID"
|
|
62
|
-
).optional(),
|
|
63
|
-
category: z.string().describe(
|
|
64
|
-
"Item category. Groups benefit items together for organization and management. For example, `classes`, `posts`, or `groups`."
|
|
65
|
-
).max(20).optional(),
|
|
66
|
-
providerAppId: z.string().describe(
|
|
67
|
-
"ID of the application that provides the benefit items. Each item's `externalId` is unique within its provider application."
|
|
68
|
-
).regex(
|
|
69
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
70
|
-
"Must be a valid GUID"
|
|
71
|
-
).optional(),
|
|
72
|
-
namespace: z.string().describe(
|
|
73
|
-
"Namespace for your app or site's benefit programs. Namespaces let you distinguish between entities that you created and entities that other apps created."
|
|
74
|
-
).min(1).max(20).optional(),
|
|
75
|
-
poolId: z.string().describe(
|
|
76
|
-
"ID of the pool that contains this item. A pool is the runtime container of benefits and items provisioned for a beneficiary."
|
|
77
|
-
).regex(
|
|
78
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
79
|
-
"Must be a valid GUID"
|
|
80
|
-
).optional(),
|
|
81
|
-
programId: z.string().describe(
|
|
82
|
-
"ID of the program that contains this pool item. The program is the runtime instance of a program definition for a specific beneficiary."
|
|
83
|
-
).regex(
|
|
84
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
85
|
-
"Must be a valid GUID"
|
|
86
|
-
).optional().nullable(),
|
|
87
|
-
externalProgramId: z.string().describe("External program ID assigned by the provider.").regex(
|
|
88
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
89
|
-
"Must be a valid GUID"
|
|
90
|
-
).optional().nullable(),
|
|
91
|
-
programDefinitionId: z.string().describe(
|
|
92
|
-
"ID of the program definition that's the template for this pool item's program."
|
|
93
|
-
).regex(
|
|
94
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
95
|
-
"Must be a valid GUID"
|
|
96
|
-
).optional().nullable(),
|
|
97
|
-
externalProgramDefinitionId: z.string().describe("External program definition ID assigned by the provider.").regex(
|
|
98
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
99
|
-
"Must be a valid GUID"
|
|
100
|
-
).optional().nullable(),
|
|
101
|
-
poolDefinitionId: z.string().describe(
|
|
102
|
-
"ID of the pool definition that's the template for this pool item's pool."
|
|
103
|
-
).regex(
|
|
104
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
105
|
-
"Must be a valid GUID"
|
|
106
|
-
).optional().nullable(),
|
|
107
|
-
itemSetId: z.string().describe(
|
|
108
|
-
"Internal grouping identifier for this benefit's item set. Use `poolId` together with `benefitKey` to identify a benefit - `itemSetId` is an implementation detail."
|
|
109
|
-
).regex(
|
|
110
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
111
|
-
"Must be a valid GUID"
|
|
112
|
-
).optional(),
|
|
113
|
-
beneficiary: z.intersection(
|
|
114
|
-
z.object({}),
|
|
115
|
-
z.xor([
|
|
116
|
-
z.object({
|
|
117
|
-
anonymousVisitorId: z.never().optional(),
|
|
118
|
-
memberId: z.never().optional(),
|
|
119
|
-
wixUserId: z.never().optional()
|
|
120
|
-
}),
|
|
121
|
-
z.object({
|
|
122
|
-
memberId: z.never().optional(),
|
|
123
|
-
wixUserId: z.never().optional(),
|
|
124
|
-
anonymousVisitorId: z.string().describe(
|
|
125
|
-
"ID of a site visitor that hasn't logged in to the site."
|
|
126
|
-
).regex(
|
|
127
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
128
|
-
"Must be a valid GUID"
|
|
129
|
-
)
|
|
130
|
-
}),
|
|
131
|
-
z.object({
|
|
132
|
-
anonymousVisitorId: z.never().optional(),
|
|
133
|
-
wixUserId: z.never().optional(),
|
|
134
|
-
memberId: z.string().describe("ID of a site member.").regex(
|
|
135
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
136
|
-
"Must be a valid GUID"
|
|
137
|
-
)
|
|
138
|
-
}),
|
|
139
|
-
z.object({
|
|
140
|
-
anonymousVisitorId: z.never().optional(),
|
|
141
|
-
memberId: z.never().optional(),
|
|
142
|
-
wixUserId: z.string().describe("ID of a Wix user.").regex(
|
|
143
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
144
|
-
"Must be a valid GUID"
|
|
145
|
-
)
|
|
146
|
-
})
|
|
147
|
-
])
|
|
148
|
-
).describe(
|
|
149
|
-
"Beneficiary of the pool - the member, contact, or visitor who holds this pool item."
|
|
150
|
-
).optional(),
|
|
151
|
-
pool: z.object({
|
|
152
|
-
displayName: z.string().describe(
|
|
153
|
-
"Pool's display name. Often matches the name on the associated pool definition."
|
|
154
|
-
).max(64).optional(),
|
|
155
|
-
description: z.string().describe("Pool description.").max(450).optional().nullable(),
|
|
156
|
-
status: z.enum([
|
|
157
|
-
"ACTIVE",
|
|
158
|
-
"PAUSED",
|
|
159
|
-
"ENDED",
|
|
160
|
-
"PROVISIONING",
|
|
161
|
-
"RENEWING",
|
|
162
|
-
"PENDING"
|
|
163
|
-
]).describe("Status of the pool that contains this item.").optional(),
|
|
164
|
-
creditConfiguration: z.object({
|
|
165
|
-
amount: z.string().describe("Number of credits configured for the pool.").optional(),
|
|
166
|
-
unitDisplayName: z.string().describe("Credit unit display name.").max(32).optional().nullable(),
|
|
167
|
-
unitType: z.string().describe("Credit unit type.").max(16).optional().nullable()
|
|
168
|
-
}).describe(
|
|
169
|
-
"Credit configuration of the pool, when credit-based pricing is enabled."
|
|
170
|
-
).optional()
|
|
171
|
-
}).describe(
|
|
172
|
-
"Pool details, including display name and description.\n\nReturned only when `POOL` is included in the `fields` request parameter."
|
|
173
|
-
).optional(),
|
|
174
|
-
program: z.object({
|
|
175
|
-
_id: z.string().describe("Program ID.").regex(
|
|
176
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
177
|
-
"Must be a valid GUID"
|
|
178
|
-
).optional(),
|
|
179
|
-
externalId: z.string().describe("External program ID assigned by the provider.").regex(
|
|
180
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
181
|
-
"Must be a valid GUID"
|
|
182
|
-
).optional().nullable(),
|
|
183
|
-
displayName: z.string().describe("Program's display name.").max(64).optional().nullable()
|
|
184
|
-
}).describe(
|
|
185
|
-
"Program details - `id`, `externalId`, and `displayName`.\n\nReturned only when `PROGRAM` is included in the `fields` request parameter."
|
|
186
|
-
).optional(),
|
|
187
|
-
programDefinition: z.object({
|
|
188
|
-
_id: z.string().describe("Program definition ID.").regex(
|
|
189
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
190
|
-
"Must be a valid GUID"
|
|
191
|
-
).optional(),
|
|
192
|
-
externalId: z.string().describe(
|
|
193
|
-
"External program definition ID assigned by the provider."
|
|
194
|
-
).regex(
|
|
195
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
196
|
-
"Must be a valid GUID"
|
|
197
|
-
).optional().nullable(),
|
|
198
|
-
displayName: z.string().describe("Program definition's display name.").max(64).optional().nullable(),
|
|
199
|
-
description: z.string().describe("Program definition description.").max(450).optional().nullable()
|
|
200
|
-
}).describe(
|
|
201
|
-
"Program definition that includes this item as an accessible benefit.\n\nReturned only when `PROGRAM_DEFINITION` is included in the `fields` request parameter."
|
|
202
|
-
).optional(),
|
|
203
|
-
itemId: z.string().describe("Item ID.").regex(
|
|
204
|
-
/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,
|
|
205
|
-
"Must be a valid GUID"
|
|
206
|
-
).optional(),
|
|
207
|
-
itemInfo: z.object({
|
|
208
|
-
displayName: z.string().describe("Item's display name.").max(400).optional().nullable()
|
|
209
|
-
}).describe(
|
|
210
|
-
"Display name for the catalog item.\n\nReturned only when `ITEM` is included in the `fields` request parameter."
|
|
211
|
-
).optional(),
|
|
212
|
-
benefitInfo: z.object({
|
|
213
|
-
price: z.string().describe(
|
|
214
|
-
"Cost of the benefit in credits. The cost is the same for all items in this benefit.\n\nCredits are a configurable unit defined on the parent pool definition. The unit type is set in the pool definition's credit configuration. Absent when no credit-based pricing is configured for this benefit."
|
|
215
|
-
).optional().nullable(),
|
|
216
|
-
benefitKey: z.string().describe(
|
|
217
|
-
"Unique identifier for this benefit. Same value as `poolItem.benefitKey`."
|
|
218
|
-
).max(64).optional(),
|
|
219
|
-
displayName: z.string().describe("Benefit's display name.").max(40).optional().nullable(),
|
|
220
|
-
description: z.string().describe("Benefit description.").max(255).optional().nullable()
|
|
221
|
-
}).describe(
|
|
222
|
-
"Pricing and display information for the associated benefit, including credit price, name, and description.\n\nReturned only when `BENEFIT` is included in the `fields` request parameter."
|
|
223
|
-
).optional(),
|
|
224
|
-
balance: z.object({
|
|
225
|
-
available: z.string().describe(
|
|
226
|
-
"Number of available credits in the pool.\n\nCredits are a configurable unit defined on the parent pool definition. Absent when no credit-based pricing is configured for the pool."
|
|
227
|
-
).optional().nullable()
|
|
228
|
-
}).describe(
|
|
229
|
-
"Credit balance of the pool that contains this item.\n\nReturned only when `BALANCE` is included in the `fields` request parameter."
|
|
230
|
-
).optional(),
|
|
231
|
-
benefitKey: z.string().describe(
|
|
232
|
-
"Unique identifier for the benefit that grants access to this item."
|
|
233
|
-
).max(64).optional(),
|
|
234
|
-
itemSearchKey: z.string().describe(
|
|
235
|
-
"Pre-computed search key for the item reference, built by concatenating `providerAppId`, `category`, and `externalId` separated by `/`. Use this field for efficient single-field filtering instead of composing three separate conditions."
|
|
236
|
-
).max(94).optional(),
|
|
237
|
-
removed: z.boolean().describe("Indicates whether this pool item has been removed").optional().nullable()
|
|
238
|
-
})
|
|
239
|
-
).optional(),
|
|
240
|
-
metadata: z.object({
|
|
241
|
-
count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
|
|
242
|
-
cursors: z.object({
|
|
243
|
-
next: z.string().describe(
|
|
244
|
-
"Cursor string pointing to the next page in the list of results."
|
|
245
|
-
).max(16e3).optional().nullable(),
|
|
246
|
-
prev: z.string().describe(
|
|
247
|
-
"Cursor pointing to the previous page in the list of results."
|
|
248
|
-
).max(16e3).optional().nullable()
|
|
249
|
-
}).describe(
|
|
250
|
-
"Cursor strings that point to the next page, previous page, or both."
|
|
251
|
-
).optional(),
|
|
252
|
-
hasNext: z.boolean().describe(
|
|
253
|
-
"Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page."
|
|
254
|
-
).optional().nullable()
|
|
255
|
-
}).describe("Paging metadata.").optional()
|
|
256
|
-
});
|
|
257
|
-
export {
|
|
258
|
-
QueryPoolItemsRequest,
|
|
259
|
-
QueryPoolItemsResponse
|
|
260
|
-
};
|
|
261
|
-
//# sourceMappingURL=schemas.mjs.map
|
package/build/es/schemas.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/benefit-programs-v1-pool-item-pool-items.schemas.ts"],"sourcesContent":["import * as z from 'zod';\n\nexport const QueryPoolItemsRequest = /*#__PURE__*/ z.object({\n query: z\n .intersection(\n z.object({\n filter: z\n .record(z.string(), z.any())\n .describe(\n 'Filter object in the following format:\\n`\"filter\" : {\\n\"fieldName1\": \"value1\",\\n\"fieldName2\":{\"$operator\":\"value2\"}\\n}`\\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`'\n )\n .optional()\n .nullable(),\n sort: z\n .array(\n z.object({\n fieldName: z\n .string()\n .describe('Name of the field to sort by.')\n .max(512)\n .optional(),\n order: z.enum(['ASC', 'DESC']).optional(),\n })\n )\n .max(5)\n .optional(),\n }),\n z.xor([\n z.object({ cursorPaging: z.never().optional() }),\n z.object({\n cursorPaging: z\n .object({\n limit: z\n .number()\n .int()\n .describe('Maximum number of items to return in the results.')\n .min(0)\n .max(1000)\n .optional()\n .nullable(),\n cursor: z\n .string()\n .describe(\n \"Pointer to the next or previous page in the list of results.\\n\\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\\nNot relevant for the first request.\"\n )\n .max(16000)\n .optional()\n .nullable(),\n })\n .describe(\n 'Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`.'\n ),\n }),\n ])\n )\n .describe('Query options.'),\n options: z\n .object({\n fields: z\n .array(\n z.enum([\n 'POOL',\n 'PROGRAM',\n 'PROGRAM_DEFINITION',\n 'ITEM',\n 'BENEFIT',\n 'BALANCE',\n ])\n )\n .max(6)\n .optional(),\n })\n .optional(),\n});\nexport const QueryPoolItemsResponse = /*#__PURE__*/ z.object({\n poolItems: z\n .array(\n z.object({\n _id: z\n .string()\n .describe(\n 'Pool item ID. Generated deterministically from `poolId` and `itemId`.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n revision: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Revision number, which increments by 1 each time the pool item is updated.'\n )\n .optional()\n .nullable(),\n _createdDate: z\n .date()\n .describe('Date and time the pool item was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the pool item was updated.')\n .optional()\n .nullable(),\n externalId: z\n .string()\n .describe(\n \"External item ID assigned by the provider of the items.\\n\\nFor example, if the items are products, this ID corresponds to the specific product ID in the provider's system.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n category: z\n .string()\n .describe(\n 'Item category. Groups benefit items together for organization and management. For example, `classes`, `posts`, or `groups`.'\n )\n .max(20)\n .optional(),\n providerAppId: z\n .string()\n .describe(\n \"ID of the application that provides the benefit items. Each item's `externalId` is unique within its provider application.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n namespace: z\n .string()\n .describe(\n \"Namespace for your app or site's benefit programs. Namespaces let you distinguish between entities that you created and entities that other apps created.\"\n )\n .min(1)\n .max(20)\n .optional(),\n poolId: z\n .string()\n .describe(\n 'ID of the pool that contains this item. A pool is the runtime container of benefits and items provisioned for a beneficiary.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n programId: z\n .string()\n .describe(\n 'ID of the program that contains this pool item. The program is the runtime instance of a program definition for a specific beneficiary.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n externalProgramId: z\n .string()\n .describe('External program ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n programDefinitionId: z\n .string()\n .describe(\n \"ID of the program definition that's the template for this pool item's program.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n externalProgramDefinitionId: z\n .string()\n .describe('External program definition ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n poolDefinitionId: z\n .string()\n .describe(\n \"ID of the pool definition that's the template for this pool item's pool.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n itemSetId: z\n .string()\n .describe(\n \"Internal grouping identifier for this benefit's item set. Use `poolId` together with `benefitKey` to identify a benefit - `itemSetId` is an implementation detail.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n beneficiary: z\n .intersection(\n z.object({}),\n z.xor([\n z.object({\n anonymousVisitorId: z.never().optional(),\n memberId: z.never().optional(),\n wixUserId: z.never().optional(),\n }),\n z.object({\n memberId: z.never().optional(),\n wixUserId: z.never().optional(),\n anonymousVisitorId: z\n .string()\n .describe(\n \"ID of a site visitor that hasn't logged in to the site.\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n }),\n z.object({\n anonymousVisitorId: z.never().optional(),\n wixUserId: z.never().optional(),\n memberId: z\n .string()\n .describe('ID of a site member.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n }),\n z.object({\n anonymousVisitorId: z.never().optional(),\n memberId: z.never().optional(),\n wixUserId: z\n .string()\n .describe('ID of a Wix user.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n }),\n ])\n )\n .describe(\n 'Beneficiary of the pool - the member, contact, or visitor who holds this pool item.'\n )\n .optional(),\n pool: z\n .object({\n displayName: z\n .string()\n .describe(\n \"Pool's display name. Often matches the name on the associated pool definition.\"\n )\n .max(64)\n .optional(),\n description: z\n .string()\n .describe('Pool description.')\n .max(450)\n .optional()\n .nullable(),\n status: z\n .enum([\n 'ACTIVE',\n 'PAUSED',\n 'ENDED',\n 'PROVISIONING',\n 'RENEWING',\n 'PENDING',\n ])\n .describe('Status of the pool that contains this item.')\n .optional(),\n creditConfiguration: z\n .object({\n amount: z\n .string()\n .describe('Number of credits configured for the pool.')\n .optional(),\n unitDisplayName: z\n .string()\n .describe('Credit unit display name.')\n .max(32)\n .optional()\n .nullable(),\n unitType: z\n .string()\n .describe('Credit unit type.')\n .max(16)\n .optional()\n .nullable(),\n })\n .describe(\n 'Credit configuration of the pool, when credit-based pricing is enabled.'\n )\n .optional(),\n })\n .describe(\n 'Pool details, including display name and description.\\n\\nReturned only when `POOL` is included in the `fields` request parameter.'\n )\n .optional(),\n program: z\n .object({\n _id: z\n .string()\n .describe('Program ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n externalId: z\n .string()\n .describe('External program ID assigned by the provider.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n displayName: z\n .string()\n .describe(\"Program's display name.\")\n .max(64)\n .optional()\n .nullable(),\n })\n .describe(\n 'Program details - `id`, `externalId`, and `displayName`.\\n\\nReturned only when `PROGRAM` is included in the `fields` request parameter.'\n )\n .optional(),\n programDefinition: z\n .object({\n _id: z\n .string()\n .describe('Program definition ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n externalId: z\n .string()\n .describe(\n 'External program definition ID assigned by the provider.'\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n displayName: z\n .string()\n .describe(\"Program definition's display name.\")\n .max(64)\n .optional()\n .nullable(),\n description: z\n .string()\n .describe('Program definition description.')\n .max(450)\n .optional()\n .nullable(),\n })\n .describe(\n 'Program definition that includes this item as an accessible benefit.\\n\\nReturned only when `PROGRAM_DEFINITION` is included in the `fields` request parameter.'\n )\n .optional(),\n itemId: z\n .string()\n .describe('Item ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n itemInfo: z\n .object({\n displayName: z\n .string()\n .describe(\"Item's display name.\")\n .max(400)\n .optional()\n .nullable(),\n })\n .describe(\n 'Display name for the catalog item.\\n\\nReturned only when `ITEM` is included in the `fields` request parameter.'\n )\n .optional(),\n benefitInfo: z\n .object({\n price: z\n .string()\n .describe(\n \"Cost of the benefit in credits. The cost is the same for all items in this benefit.\\n\\nCredits are a configurable unit defined on the parent pool definition. The unit type is set in the pool definition's credit configuration. Absent when no credit-based pricing is configured for this benefit.\"\n )\n .optional()\n .nullable(),\n benefitKey: z\n .string()\n .describe(\n 'Unique identifier for this benefit. Same value as `poolItem.benefitKey`.'\n )\n .max(64)\n .optional(),\n displayName: z\n .string()\n .describe(\"Benefit's display name.\")\n .max(40)\n .optional()\n .nullable(),\n description: z\n .string()\n .describe('Benefit description.')\n .max(255)\n .optional()\n .nullable(),\n })\n .describe(\n 'Pricing and display information for the associated benefit, including credit price, name, and description.\\n\\nReturned only when `BENEFIT` is included in the `fields` request parameter.'\n )\n .optional(),\n balance: z\n .object({\n available: z\n .string()\n .describe(\n 'Number of available credits in the pool.\\n\\nCredits are a configurable unit defined on the parent pool definition. Absent when no credit-based pricing is configured for the pool.'\n )\n .optional()\n .nullable(),\n })\n .describe(\n 'Credit balance of the pool that contains this item.\\n\\nReturned only when `BALANCE` is included in the `fields` request parameter.'\n )\n .optional(),\n benefitKey: z\n .string()\n .describe(\n 'Unique identifier for the benefit that grants access to this item.'\n )\n .max(64)\n .optional(),\n itemSearchKey: z\n .string()\n .describe(\n 'Pre-computed search key for the item reference, built by concatenating `providerAppId`, `category`, and `externalId` separated by `/`. Use this field for efficient single-field filtering instead of composing three separate conditions.'\n )\n .max(94)\n .optional(),\n removed: z\n .boolean()\n .describe('Indicates whether this pool item has been removed')\n .optional()\n .nullable(),\n })\n )\n .optional(),\n metadata: z\n .object({\n count: z\n .number()\n .int()\n .describe('Number of items returned in the response.')\n .optional()\n .nullable(),\n cursors: z\n .object({\n next: z\n .string()\n .describe(\n 'Cursor string pointing to the next page in the list of results.'\n )\n .max(16000)\n .optional()\n .nullable(),\n prev: z\n .string()\n .describe(\n 'Cursor pointing to the previous page in the list of results.'\n )\n .max(16000)\n .optional()\n .nullable(),\n })\n .describe(\n 'Cursor strings that point to the next page, previous page, or both.'\n )\n .optional(),\n hasNext: z\n .boolean()\n .describe(\n 'Whether there are more pages to retrieve following the current page.\\n\\n+ `true`: Another page of results can be retrieved.\\n+ `false`: This is the last page.'\n )\n .optional()\n .nullable(),\n })\n .describe('Paging metadata.')\n .optional(),\n});\n"],"mappings":";AAAA,YAAY,OAAO;AAEZ,IA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AS,EACT,SAAS;AAAA,IACd,CAAC,EACA;AAAA,MACC;AAAA,IACF,EACC,SAAS;AAAA,IACZ,SACG,UAAQ,EACR;AAAA,MACC;AAAA,IACF,EACC,SAAS,EACT,SAAS;AAAA,EACd,CAAC,EACA,SAAS,kBAAkB,EAC3B,SAAS;AACd,CAAC;","names":[]}
|
|
@@ -1,256 +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
|
-
IdentityType: () => IdentityType,
|
|
24
|
-
PoolStatus: () => PoolStatus,
|
|
25
|
-
RequestedFields: () => RequestedFields,
|
|
26
|
-
SortOrder: () => SortOrder,
|
|
27
|
-
WebhookIdentityType: () => WebhookIdentityType,
|
|
28
|
-
queryPoolItems: () => queryPoolItems4,
|
|
29
|
-
utils: () => utils
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(index_exports);
|
|
32
|
-
|
|
33
|
-
// src/benefit-programs-v1-pool-item-pool-items.universal.ts
|
|
34
|
-
var import_transform_error = require("@wix/sdk-runtime/transform-error");
|
|
35
|
-
var import_query_builder = require("@wix/sdk-runtime/query-builder");
|
|
36
|
-
var import_rename_all_nested_keys = require("@wix/sdk-runtime/rename-all-nested-keys");
|
|
37
|
-
|
|
38
|
-
// src/benefit-programs-v1-pool-item-pool-items.http.ts
|
|
39
|
-
var import_timestamp = require("@wix/sdk-runtime/transformations/timestamp");
|
|
40
|
-
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
41
|
-
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
42
|
-
function resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl(opts) {
|
|
43
|
-
const domainToMappings = {
|
|
44
|
-
_: [
|
|
45
|
-
{
|
|
46
|
-
srcPath: "/_api/benefit-programs/v1/pool-items",
|
|
47
|
-
destPath: "/v1/pool-items"
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
"www.wixapis.com": [
|
|
51
|
-
{
|
|
52
|
-
srcPath: "/benefit-programs/v1/pool-items",
|
|
53
|
-
destPath: "/v1/pool-items"
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
"*.dev.wix-code.com": [
|
|
57
|
-
{
|
|
58
|
-
srcPath: "/_api/benefit-programs/v1/pool-items",
|
|
59
|
-
destPath: "/v1/pool-items"
|
|
60
|
-
}
|
|
61
|
-
]
|
|
62
|
-
};
|
|
63
|
-
return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
64
|
-
}
|
|
65
|
-
var PACKAGE_NAME = "@wix/auto_sdk_benefit-programs_pool-items";
|
|
66
|
-
function queryPoolItems(payload) {
|
|
67
|
-
function __queryPoolItems({ host }) {
|
|
68
|
-
const metadata = {
|
|
69
|
-
entityFqdn: "wix.benefit_programs.v1.pool_item",
|
|
70
|
-
method: "POST",
|
|
71
|
-
methodFqn: "wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems",
|
|
72
|
-
packageName: PACKAGE_NAME,
|
|
73
|
-
migrationOptions: {
|
|
74
|
-
optInTransformResponse: true
|
|
75
|
-
},
|
|
76
|
-
url: resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl({
|
|
77
|
-
protoPath: "/v1/pool-items/query",
|
|
78
|
-
data: payload,
|
|
79
|
-
host
|
|
80
|
-
}),
|
|
81
|
-
data: payload,
|
|
82
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
83
|
-
{
|
|
84
|
-
transformFn: import_timestamp.transformRESTTimestampToSDKTimestamp,
|
|
85
|
-
paths: [
|
|
86
|
-
{ path: "poolItems.createdDate" },
|
|
87
|
-
{ path: "poolItems.updatedDate" }
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
])
|
|
91
|
-
};
|
|
92
|
-
return metadata;
|
|
93
|
-
}
|
|
94
|
-
return __queryPoolItems;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// src/benefit-programs-v1-pool-item-pool-items.universal.ts
|
|
98
|
-
var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
99
|
-
var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
|
|
100
|
-
var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
|
|
101
|
-
IdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
102
|
-
IdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
103
|
-
IdentityType2["MEMBER"] = "MEMBER";
|
|
104
|
-
IdentityType2["WIX_USER"] = "WIX_USER";
|
|
105
|
-
return IdentityType2;
|
|
106
|
-
})(IdentityType || {});
|
|
107
|
-
var PoolStatus = /* @__PURE__ */ ((PoolStatus2) => {
|
|
108
|
-
PoolStatus2["ACTIVE"] = "ACTIVE";
|
|
109
|
-
PoolStatus2["PAUSED"] = "PAUSED";
|
|
110
|
-
PoolStatus2["ENDED"] = "ENDED";
|
|
111
|
-
PoolStatus2["PROVISIONING"] = "PROVISIONING";
|
|
112
|
-
PoolStatus2["RENEWING"] = "RENEWING";
|
|
113
|
-
PoolStatus2["PENDING"] = "PENDING";
|
|
114
|
-
return PoolStatus2;
|
|
115
|
-
})(PoolStatus || {});
|
|
116
|
-
var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
117
|
-
SortOrder2["ASC"] = "ASC";
|
|
118
|
-
SortOrder2["DESC"] = "DESC";
|
|
119
|
-
return SortOrder2;
|
|
120
|
-
})(SortOrder || {});
|
|
121
|
-
var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
|
|
122
|
-
RequestedFields2["POOL"] = "POOL";
|
|
123
|
-
RequestedFields2["PROGRAM"] = "PROGRAM";
|
|
124
|
-
RequestedFields2["PROGRAM_DEFINITION"] = "PROGRAM_DEFINITION";
|
|
125
|
-
RequestedFields2["ITEM"] = "ITEM";
|
|
126
|
-
RequestedFields2["BENEFIT"] = "BENEFIT";
|
|
127
|
-
RequestedFields2["BALANCE"] = "BALANCE";
|
|
128
|
-
return RequestedFields2;
|
|
129
|
-
})(RequestedFields || {});
|
|
130
|
-
var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
|
|
131
|
-
WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
|
|
132
|
-
WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
133
|
-
WebhookIdentityType2["MEMBER"] = "MEMBER";
|
|
134
|
-
WebhookIdentityType2["WIX_USER"] = "WIX_USER";
|
|
135
|
-
WebhookIdentityType2["APP"] = "APP";
|
|
136
|
-
return WebhookIdentityType2;
|
|
137
|
-
})(WebhookIdentityType || {});
|
|
138
|
-
function queryPoolItems2(options) {
|
|
139
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
140
|
-
return (0, import_query_builder.queryBuilder)({
|
|
141
|
-
func: async (payload) => {
|
|
142
|
-
const reqOpts = queryPoolItems({
|
|
143
|
-
...payload,
|
|
144
|
-
...options ?? {}
|
|
145
|
-
});
|
|
146
|
-
sideEffects?.onSiteCall?.();
|
|
147
|
-
try {
|
|
148
|
-
const result = await httpClient.request(reqOpts);
|
|
149
|
-
sideEffects?.onSuccess?.(result);
|
|
150
|
-
return result;
|
|
151
|
-
} catch (err) {
|
|
152
|
-
sideEffects?.onError?.(err);
|
|
153
|
-
throw err;
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
requestTransformer: (query) => {
|
|
157
|
-
const args = [query, options];
|
|
158
|
-
return (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
159
|
-
...args?.[1],
|
|
160
|
-
query: args?.[0]
|
|
161
|
-
});
|
|
162
|
-
},
|
|
163
|
-
responseTransformer: ({ data }) => {
|
|
164
|
-
const transformedData = (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
165
|
-
(0, import_transform_paths2.transformPaths)(data, [])
|
|
166
|
-
);
|
|
167
|
-
return {
|
|
168
|
-
items: transformedData?.poolItems,
|
|
169
|
-
pagingMetadata: transformedData?.metadata
|
|
170
|
-
};
|
|
171
|
-
},
|
|
172
|
-
errorTransformer: (err) => {
|
|
173
|
-
const transformedError = (0, import_transform_error.transformError)(err, {
|
|
174
|
-
spreadPathsToArguments: {},
|
|
175
|
-
explicitPathsToArguments: { query: "$[0]" },
|
|
176
|
-
singleArgumentUnchanged: false
|
|
177
|
-
});
|
|
178
|
-
throw transformedError;
|
|
179
|
-
},
|
|
180
|
-
pagingMethod: "CURSOR",
|
|
181
|
-
transformationPaths: {}
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
async function typedQueryPoolItems(query, options) {
|
|
185
|
-
const { httpClient, sideEffects } = arguments[2];
|
|
186
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
187
|
-
query,
|
|
188
|
-
...options
|
|
189
|
-
});
|
|
190
|
-
const reqOpts = queryPoolItems(payload);
|
|
191
|
-
sideEffects?.onSiteCall?.();
|
|
192
|
-
try {
|
|
193
|
-
const result = await httpClient.request(reqOpts);
|
|
194
|
-
sideEffects?.onSuccess?.(result);
|
|
195
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
196
|
-
} catch (err) {
|
|
197
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
198
|
-
err,
|
|
199
|
-
{
|
|
200
|
-
spreadPathsToArguments: {},
|
|
201
|
-
explicitPathsToArguments: { query: "$[0]" },
|
|
202
|
-
singleArgumentUnchanged: false
|
|
203
|
-
},
|
|
204
|
-
["query", "options"]
|
|
205
|
-
);
|
|
206
|
-
sideEffects?.onError?.(err);
|
|
207
|
-
throw transformedError;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
var utils = {
|
|
211
|
-
query: /* @__PURE__ */ (0, import_query_builder_utils.createQueryUtils)()
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
// src/benefit-programs-v1-pool-item-pool-items.public.ts
|
|
215
|
-
function queryPoolItems3(httpClient) {
|
|
216
|
-
return (options) => queryPoolItems2(
|
|
217
|
-
options,
|
|
218
|
-
// @ts-ignore
|
|
219
|
-
{ httpClient }
|
|
220
|
-
);
|
|
221
|
-
}
|
|
222
|
-
function typedQueryPoolItems2(httpClient) {
|
|
223
|
-
return (query, options) => typedQueryPoolItems(
|
|
224
|
-
query,
|
|
225
|
-
options,
|
|
226
|
-
// @ts-ignore
|
|
227
|
-
{ httpClient }
|
|
228
|
-
);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// src/benefit-programs-v1-pool-item-pool-items.context.ts
|
|
232
|
-
var import_rest_modules2 = require("@wix/sdk-runtime/rest-modules");
|
|
233
|
-
var import_query_method_router = require("@wix/sdk-runtime/query-method-router");
|
|
234
|
-
function customQueryPoolItems(httpClient) {
|
|
235
|
-
const router = /* @__PURE__ */ (0, import_query_method_router.createQueryOverloadRouter)({
|
|
236
|
-
builderQueryFunction: (options) => queryPoolItems3(httpClient)(options),
|
|
237
|
-
typedQueryFunction: (query, options) => typedQueryPoolItems2(httpClient)(query, options),
|
|
238
|
-
hasOptionsParameter: true
|
|
239
|
-
});
|
|
240
|
-
function overloadedQuery(queryOrOptions, options) {
|
|
241
|
-
return router(...arguments);
|
|
242
|
-
}
|
|
243
|
-
return overloadedQuery;
|
|
244
|
-
}
|
|
245
|
-
var queryPoolItems4 = /* @__PURE__ */ (0, import_rest_modules2.createRESTModule)(customQueryPoolItems);
|
|
246
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
247
|
-
0 && (module.exports = {
|
|
248
|
-
IdentityType,
|
|
249
|
-
PoolStatus,
|
|
250
|
-
RequestedFields,
|
|
251
|
-
SortOrder,
|
|
252
|
-
WebhookIdentityType,
|
|
253
|
-
queryPoolItems,
|
|
254
|
-
utils
|
|
255
|
-
});
|
|
256
|
-
//# sourceMappingURL=index.js.map
|