@wix/auto_sdk_benefit-programs_pool-items 1.0.0

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.
Files changed (52) hide show
  1. package/build/cjs/index.d.ts +11 -0
  2. package/build/cjs/index.js +424 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +733 -0
  5. package/build/cjs/index.typings.js +393 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +563 -0
  8. package/build/cjs/meta.js +147 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/schemas.d.ts +79 -0
  11. package/build/cjs/schemas.js +205 -0
  12. package/build/cjs/schemas.js.map +1 -0
  13. package/build/es/index.d.mts +11 -0
  14. package/build/es/index.mjs +385 -0
  15. package/build/es/index.mjs.map +1 -0
  16. package/build/es/index.typings.d.mts +733 -0
  17. package/build/es/index.typings.mjs +353 -0
  18. package/build/es/index.typings.mjs.map +1 -0
  19. package/build/es/meta.d.mts +563 -0
  20. package/build/es/meta.mjs +116 -0
  21. package/build/es/meta.mjs.map +1 -0
  22. package/build/es/package.json +3 -0
  23. package/build/es/schemas.d.mts +79 -0
  24. package/build/es/schemas.mjs +167 -0
  25. package/build/es/schemas.mjs.map +1 -0
  26. package/build/internal/cjs/index.d.ts +11 -0
  27. package/build/internal/cjs/index.js +424 -0
  28. package/build/internal/cjs/index.js.map +1 -0
  29. package/build/internal/cjs/index.typings.d.ts +763 -0
  30. package/build/internal/cjs/index.typings.js +393 -0
  31. package/build/internal/cjs/index.typings.js.map +1 -0
  32. package/build/internal/cjs/meta.d.ts +563 -0
  33. package/build/internal/cjs/meta.js +147 -0
  34. package/build/internal/cjs/meta.js.map +1 -0
  35. package/build/internal/cjs/schemas.d.ts +79 -0
  36. package/build/internal/cjs/schemas.js +205 -0
  37. package/build/internal/cjs/schemas.js.map +1 -0
  38. package/build/internal/es/index.d.mts +11 -0
  39. package/build/internal/es/index.mjs +385 -0
  40. package/build/internal/es/index.mjs.map +1 -0
  41. package/build/internal/es/index.typings.d.mts +763 -0
  42. package/build/internal/es/index.typings.mjs +353 -0
  43. package/build/internal/es/index.typings.mjs.map +1 -0
  44. package/build/internal/es/meta.d.mts +563 -0
  45. package/build/internal/es/meta.mjs +116 -0
  46. package/build/internal/es/meta.mjs.map +1 -0
  47. package/build/internal/es/schemas.d.mts +79 -0
  48. package/build/internal/es/schemas.mjs +167 -0
  49. package/build/internal/es/schemas.mjs.map +1 -0
  50. package/meta/package.json +3 -0
  51. package/package.json +61 -0
  52. package/schemas/package.json +3 -0
@@ -0,0 +1,385 @@
1
+ // src/benefit-programs-v1-pool-item-pool-items.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-item-pool-items.http.ts
10
+ import { transformRESTTimestampToSDKTimestamp } from "@wix/sdk-runtime/transformations/timestamp";
11
+ import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
12
+ import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
13
+ function resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl(opts) {
14
+ const domainToMappings = {
15
+ _: [
16
+ {
17
+ srcPath: "/_api/benefit-programs/v1/pool-items",
18
+ destPath: "/v1/pool-items"
19
+ }
20
+ ],
21
+ "www.wixapis.com": [
22
+ {
23
+ srcPath: "/benefit-programs/v1/pool-items",
24
+ destPath: "/v1/pool-items"
25
+ }
26
+ ],
27
+ "*.dev.wix-code.com": [
28
+ {
29
+ srcPath: "/_api/benefit-programs/v1/pool-items",
30
+ destPath: "/v1/pool-items"
31
+ }
32
+ ]
33
+ };
34
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
35
+ }
36
+ var PACKAGE_NAME = "@wix/auto_sdk_benefit-programs_pool-items";
37
+ function queryPoolItems(payload) {
38
+ function __queryPoolItems({ host }) {
39
+ const metadata = {
40
+ entityFqdn: "wix.benefit_programs.v1.pool_item",
41
+ method: "POST",
42
+ methodFqn: "wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems",
43
+ packageName: PACKAGE_NAME,
44
+ migrationOptions: {
45
+ optInTransformResponse: true
46
+ },
47
+ url: resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl({
48
+ protoPath: "/v1/pool-items/query",
49
+ data: payload,
50
+ host
51
+ }),
52
+ data: payload,
53
+ transformResponse: (payload2) => transformPaths(payload2, [
54
+ {
55
+ transformFn: transformRESTTimestampToSDKTimestamp,
56
+ paths: [
57
+ { path: "poolItems.createdDate" },
58
+ { path: "poolItems.updatedDate" }
59
+ ]
60
+ }
61
+ ])
62
+ };
63
+ return metadata;
64
+ }
65
+ return __queryPoolItems;
66
+ }
67
+
68
+ // src/benefit-programs-v1-pool-item-pool-items.universal.ts
69
+ import { transformPaths as transformPaths2 } from "@wix/sdk-runtime/transformations/transform-paths";
70
+
71
+ // src/benefit-programs-v1-pool-item-pool-items.schemas.ts
72
+ import * as z from "zod";
73
+ var QueryPoolItemsRequest = z.object({
74
+ query: z.intersection(
75
+ z.object({
76
+ filter: z.record(z.string(), z.any()).describe(
77
+ '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`'
78
+ ).optional().nullable(),
79
+ sort: z.array(
80
+ z.object({
81
+ fieldName: z.string().describe("Name of the field to sort by.").max(512).optional(),
82
+ order: z.enum(["ASC", "DESC"]).optional()
83
+ })
84
+ ).max(5).optional()
85
+ }),
86
+ z.xor([
87
+ z.object({ cursorPaging: z.never().optional() }),
88
+ z.object({
89
+ cursorPaging: z.object({
90
+ limit: z.number().int().describe("Maximum number of items to return in the results.").min(0).max(1e3).optional().nullable(),
91
+ cursor: z.string().describe(
92
+ "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."
93
+ ).max(16e3).optional().nullable()
94
+ }).describe(
95
+ "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`."
96
+ )
97
+ })
98
+ ])
99
+ ).describe("Query to select benefit items."),
100
+ options: z.object({
101
+ fields: z.array(
102
+ z.enum(["POOL", "PROGRAM", "PROGRAM_DEFINITION", "ITEM", "BENEFIT"])
103
+ ).max(5).optional()
104
+ }).optional()
105
+ });
106
+ var QueryPoolItemsResponse = z.object({
107
+ poolItems: z.array(
108
+ z.object({
109
+ _id: z.string().describe("Benefit item ID.").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
+ revision: z.string().regex(/^-?\d+$/, "Must be a valid Int64 string").describe(
114
+ "Revision number, which increments by 1 each time the benefit item is updated.\nTo prevent conflicting changes, the current revision must be passed when updating the item.\n\nIgnored when creating an item."
115
+ ).optional().nullable(),
116
+ _createdDate: z.date().describe("Date and time the item was created.").optional().nullable(),
117
+ _updatedDate: z.date().describe("Date and time the item was updated.").optional().nullable(),
118
+ externalId: z.string().describe(
119
+ "External item ID assigned by the provider of the items.\n\nFor example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system."
120
+ ).regex(
121
+ /^[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}$/,
122
+ "Must be a valid GUID"
123
+ ).optional(),
124
+ category: z.string().describe(
125
+ "Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups."
126
+ ).max(20).optional(),
127
+ providerAppId: z.string().describe(
128
+ "ID of the application providing the benefit item.\n\nID of the external application supplying the items. Each item's external ID is unique to its respective provider's application."
129
+ ).regex(
130
+ /^[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}$/,
131
+ "Must be a valid GUID"
132
+ ).optional(),
133
+ namespace: z.string().describe(
134
+ "Module name of the item provider's application that originated the items.\n\nFor example, `store-inventory` or `fitness-resources`."
135
+ ).min(1).max(20).optional(),
136
+ poolId: z.string().describe("Pool id").regex(
137
+ /^[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}$/,
138
+ "Must be a valid GUID"
139
+ ).optional(),
140
+ programId: z.string().describe("Program id").regex(
141
+ /^[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}$/,
142
+ "Must be a valid GUID"
143
+ ).optional().nullable(),
144
+ externalProgramId: z.string().describe("Program external id").regex(
145
+ /^[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}$/,
146
+ "Must be a valid GUID"
147
+ ).optional().nullable(),
148
+ programDefinitionId: z.string().describe("Program definition id").regex(
149
+ /^[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}$/,
150
+ "Must be a valid GUID"
151
+ ).optional().nullable(),
152
+ externalProgramDefinitionId: z.string().describe("Program definition external id").regex(
153
+ /^[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}$/,
154
+ "Must be a valid GUID"
155
+ ).optional().nullable(),
156
+ poolDefinitionId: z.string().describe("Pool definition id").regex(
157
+ /^[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}$/,
158
+ "Must be a valid GUID"
159
+ ).optional().nullable(),
160
+ itemSetId: z.string().describe("Item set ID.").regex(
161
+ /^[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}$/,
162
+ "Must be a valid GUID"
163
+ ).optional(),
164
+ beneficiary: z.intersection(
165
+ z.object({}),
166
+ z.xor([
167
+ z.object({
168
+ anonymousVisitorId: z.never().optional(),
169
+ memberId: z.never().optional(),
170
+ wixUserId: z.never().optional()
171
+ }),
172
+ z.object({
173
+ memberId: z.never().optional(),
174
+ wixUserId: z.never().optional(),
175
+ anonymousVisitorId: z.string().describe(
176
+ "ID of a site visitor that hasn't logged in to the site."
177
+ ).regex(
178
+ /^[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}$/,
179
+ "Must be a valid GUID"
180
+ )
181
+ }),
182
+ z.object({
183
+ anonymousVisitorId: z.never().optional(),
184
+ wixUserId: z.never().optional(),
185
+ memberId: z.string().describe("ID of a site member.").regex(
186
+ /^[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}$/,
187
+ "Must be a valid GUID"
188
+ )
189
+ }),
190
+ z.object({
191
+ anonymousVisitorId: z.never().optional(),
192
+ memberId: z.never().optional(),
193
+ wixUserId: z.string().describe("ID of a Wix user.").regex(
194
+ /^[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}$/,
195
+ "Must be a valid GUID"
196
+ )
197
+ })
198
+ ])
199
+ ).describe("Who is getting the benefit").optional(),
200
+ itemId: z.string().describe("Item set ID.").regex(
201
+ /^[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}$/,
202
+ "Must be a valid GUID"
203
+ ).optional(),
204
+ benefitKey: z.string().describe(
205
+ "Unique identifier for the benefit associated with this item."
206
+ ).max(64).optional(),
207
+ itemReferenceSearchKey: z.string().describe(
208
+ `Search key for the item reference, which is a unique identifier for searching and referencing the item within the provider's system.
209
+ It's build by concatenating the following fields in this order, separated by a separator (e.g., "/"):
210
+ - providerAppId
211
+ - category
212
+ - externalId`
213
+ ).max(94).optional()
214
+ })
215
+ ).optional(),
216
+ metadata: z.object({
217
+ count: z.number().int().describe("Number of items returned in the response.").optional().nullable(),
218
+ cursors: z.object({
219
+ next: z.string().describe(
220
+ "Cursor string pointing to the next page in the list of results."
221
+ ).max(16e3).optional().nullable(),
222
+ prev: z.string().describe(
223
+ "Cursor pointing to the previous page in the list of results."
224
+ ).max(16e3).optional().nullable()
225
+ }).describe(
226
+ "Cursor strings that point to the next page, previous page, or both."
227
+ ).optional(),
228
+ hasNext: z.boolean().describe(
229
+ "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."
230
+ ).optional().nullable()
231
+ }).describe("Metadata for paginated results.").optional()
232
+ });
233
+
234
+ // src/benefit-programs-v1-pool-item-pool-items.universal.ts
235
+ import { createQueryUtils } from "@wix/sdk-runtime/query-builder-utils";
236
+ var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
237
+ IdentityType2["UNKNOWN"] = "UNKNOWN";
238
+ IdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
239
+ IdentityType2["MEMBER"] = "MEMBER";
240
+ IdentityType2["WIX_USER"] = "WIX_USER";
241
+ return IdentityType2;
242
+ })(IdentityType || {});
243
+ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
244
+ SortOrder2["ASC"] = "ASC";
245
+ SortOrder2["DESC"] = "DESC";
246
+ return SortOrder2;
247
+ })(SortOrder || {});
248
+ var RequestedFields = /* @__PURE__ */ ((RequestedFields2) => {
249
+ RequestedFields2["POOL"] = "POOL";
250
+ RequestedFields2["PROGRAM"] = "PROGRAM";
251
+ RequestedFields2["PROGRAM_DEFINITION"] = "PROGRAM_DEFINITION";
252
+ RequestedFields2["ITEM"] = "ITEM";
253
+ RequestedFields2["BENEFIT"] = "BENEFIT";
254
+ return RequestedFields2;
255
+ })(RequestedFields || {});
256
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
257
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
258
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
259
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
260
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
261
+ WebhookIdentityType2["APP"] = "APP";
262
+ return WebhookIdentityType2;
263
+ })(WebhookIdentityType || {});
264
+ function queryPoolItems2(options) {
265
+ const { httpClient, sideEffects } = arguments[1];
266
+ return queryBuilder({
267
+ func: async (payload) => {
268
+ const reqOpts = queryPoolItems({
269
+ ...payload,
270
+ ...options ?? {}
271
+ });
272
+ sideEffects?.onSiteCall?.();
273
+ try {
274
+ const result = await httpClient.request(reqOpts);
275
+ sideEffects?.onSuccess?.(result);
276
+ return result;
277
+ } catch (err) {
278
+ sideEffects?.onError?.(err);
279
+ throw err;
280
+ }
281
+ },
282
+ requestTransformer: (query) => {
283
+ const args = [query, options];
284
+ return renameKeysFromSDKRequestToRESTRequest({
285
+ ...args?.[1],
286
+ query: args?.[0]
287
+ });
288
+ },
289
+ responseTransformer: ({ data }) => {
290
+ const transformedData = renameKeysFromRESTResponseToSDKResponse(
291
+ transformPaths2(data, [])
292
+ );
293
+ return {
294
+ items: transformedData?.poolItems,
295
+ pagingMetadata: transformedData?.metadata
296
+ };
297
+ },
298
+ errorTransformer: (err) => {
299
+ const transformedError = sdkTransformError(err, {
300
+ spreadPathsToArguments: {},
301
+ explicitPathsToArguments: { query: "$[0]" },
302
+ singleArgumentUnchanged: false
303
+ });
304
+ throw transformedError;
305
+ },
306
+ pagingMethod: "CURSOR",
307
+ transformationPaths: {}
308
+ });
309
+ }
310
+ async function typedQueryPoolItems(query, options) {
311
+ const { httpClient, sideEffects, validateRequestSchema } = arguments[2];
312
+ if (validateRequestSchema) {
313
+ QueryPoolItemsRequest.parse({ query, options });
314
+ }
315
+ const payload = renameKeysFromSDKRequestToRESTRequest({
316
+ query,
317
+ ...options
318
+ });
319
+ const reqOpts = queryPoolItems(payload);
320
+ sideEffects?.onSiteCall?.();
321
+ try {
322
+ const result = await httpClient.request(reqOpts);
323
+ sideEffects?.onSuccess?.(result);
324
+ return renameKeysFromRESTResponseToSDKResponse(result.data);
325
+ } catch (err) {
326
+ const transformedError = sdkTransformError(
327
+ err,
328
+ {
329
+ spreadPathsToArguments: {},
330
+ explicitPathsToArguments: { query: "$[0]" },
331
+ singleArgumentUnchanged: false
332
+ },
333
+ ["query", "options"]
334
+ );
335
+ sideEffects?.onError?.(err);
336
+ throw transformedError;
337
+ }
338
+ }
339
+ var utils = {
340
+ query: {
341
+ ...createQueryUtils()
342
+ }
343
+ };
344
+
345
+ // src/benefit-programs-v1-pool-item-pool-items.public.ts
346
+ function queryPoolItems3(httpClient, __options) {
347
+ return (options) => queryPoolItems2(
348
+ options,
349
+ // @ts-ignore
350
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
351
+ );
352
+ }
353
+ function typedQueryPoolItems2(httpClient, __options) {
354
+ return (query, options) => typedQueryPoolItems(
355
+ query,
356
+ options,
357
+ // @ts-ignore
358
+ { httpClient, validateRequestSchema: __options?.validateRequestSchema }
359
+ );
360
+ }
361
+
362
+ // src/benefit-programs-v1-pool-item-pool-items.context.ts
363
+ import { createRESTModule } from "@wix/sdk-runtime/rest-modules";
364
+ import { createQueryOverloadRouter } from "@wix/sdk-runtime/query-method-router";
365
+ function customQueryPoolItems(httpClient) {
366
+ const router = createQueryOverloadRouter({
367
+ builderQueryFunction: (options) => queryPoolItems3(httpClient)(options),
368
+ typedQueryFunction: (query, options) => typedQueryPoolItems2(httpClient)(query, options),
369
+ hasOptionsParameter: true
370
+ });
371
+ function overloadedQuery(queryOrOptions, options) {
372
+ return router(...arguments);
373
+ }
374
+ return overloadedQuery;
375
+ }
376
+ var queryPoolItems4 = /* @__PURE__ */ createRESTModule(customQueryPoolItems);
377
+ export {
378
+ IdentityType,
379
+ RequestedFields,
380
+ SortOrder,
381
+ WebhookIdentityType,
382
+ queryPoolItems4 as queryPoolItems,
383
+ utils
384
+ };
385
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/benefit-programs-v1-pool-item-pool-items.universal.ts","../../../src/benefit-programs-v1-pool-item-pool-items.http.ts","../../../src/benefit-programs-v1-pool-item-pool-items.schemas.ts","../../../src/benefit-programs-v1-pool-item-pool-items.public.ts","../../../src/benefit-programs-v1-pool-item-pool-items.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixBenefitProgramsV1PoolItem from './benefit-programs-v1-pool-item-pool-items.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { QueryPoolItemsRequest as QueryPoolItemsRequestSchema } from './benefit-programs-v1-pool-item-pool-items.schemas.js';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\nexport interface PoolItem {\n /**\n * Benefit item ID.\n * @format GUID\n * @readonly\n */\n _id?: string;\n /**\n * Revision number, which increments by 1 each time the benefit item is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the item.\n *\n * Ignored when creating an item.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the item was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the item was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * External item ID assigned by the provider of the items.\n *\n * For example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system.\n * @format GUID\n * @immutable\n * @readonly\n */\n externalId?: string;\n /**\n * Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.\n * @maxLength 20\n * @immutable\n * @readonly\n */\n category?: string;\n /**\n * ID of the application providing the benefit item.\n *\n * ID of the external application supplying the items. Each item's external ID is unique to its respective provider's application.\n * @format GUID\n * @immutable\n * @readonly\n */\n providerAppId?: string;\n /**\n * Module name of the item provider's application that originated the items.\n *\n * For example, `store-inventory` or `fitness-resources`.\n * @minLength 1\n * @maxLength 20\n * @immutable\n * @readonly\n */\n namespace?: string;\n /**\n * Pool id\n * @format GUID\n * @immutable\n * @readonly\n */\n poolId?: string;\n /**\n * Program id\n * @format GUID\n * @immutable\n * @readonly\n */\n programId?: string | null;\n /**\n * Program external id\n * @format GUID\n * @readonly\n */\n externalProgramId?: string | null;\n /**\n * Program definition id\n * @format GUID\n * @immutable\n * @readonly\n */\n programDefinitionId?: string | null;\n /**\n * Program definition external id\n * @format GUID\n * @immutable\n * @readonly\n */\n externalProgramDefinitionId?: string | null;\n /**\n * Pool definition id\n * @format GUID\n * @immutable\n * @readonly\n */\n poolDefinitionId?: string | null;\n /**\n * Item set ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemSetId?: string;\n /**\n * Who is getting the benefit\n * @readonly\n * @immutable\n */\n beneficiary?: CommonIdentificationData;\n /**\n * Additional pool data related to the benefit item.\n * @internal\n * @readonly\n */\n pool?: PoolInfo;\n /**\n * Additional program data related to the benefit item\n * @internal\n * @readonly\n */\n program?: ProgramInfo;\n /**\n * Additional program definition data related to the benefit item\n * @internal\n * @readonly\n */\n programDefinition?: ProgramDefinitionInfo;\n /**\n * Item set ID.\n * @format GUID\n * @immutable\n * @readonly\n */\n itemId?: string;\n /**\n * Additional item data related to the benefit item.\n * @internal\n * @readonly\n */\n itemInfo?: ItemInfo;\n /**\n * Benefit information\n * @internal\n * @readonly\n */\n benefitInfo?: BenefitInfo;\n /**\n * Unique identifier for the benefit associated with this item.\n * @maxLength 64\n * @immutable\n * @readonly\n */\n benefitKey?: string;\n /**\n * Search key for the item reference, which is a unique identifier for searching and referencing the item within the provider's system.\n * It's build by concatenating the following fields in this order, separated by a separator (e.g., \"/\"):\n * - providerAppId\n * - category\n * - externalId\n * @maxLength 94\n * @immutable\n * @readonly\n */\n itemReferenceSearchKey?: string;\n}\n\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a site visitor that hasn't logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site member.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user.\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport enum IdentityType {\n /** Unknown type. This value is not used. */\n UNKNOWN = 'UNKNOWN',\n /** A site visitor who has not logged in. */\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n /** A logged-in site member. */\n MEMBER = 'MEMBER',\n /** A Wix account holder, such as a site owner or contributor. */\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals =\n | IdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER';\n\nexport interface PoolInfo {\n /**\n * Pool name.\n *\n * You may want to use the same name that's used in the associated pool definition.\n * @maxLength 64\n */\n displayName?: string;\n /**\n * Pool description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\nexport interface ProgramInfo {\n /**\n * Program id\n * @format GUID\n */\n _id?: string;\n /**\n * Program external id\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program name.\n * @maxLength 64\n */\n displayName?: string | null;\n}\n\nexport interface ProgramDefinitionInfo {\n /**\n * Program definition id\n * @format GUID\n */\n _id?: string;\n /**\n * Program definition external id\n * @format GUID\n */\n externalId?: string | null;\n /**\n * Program definition name\n * @maxLength 64\n */\n displayName?: string | null;\n /**\n * Program definition description.\n * @maxLength 450\n */\n description?: string | null;\n}\n\nexport interface ItemInfo {\n /**\n * Item display name.\n * @maxLength 64\n */\n displayName?: string | null;\n}\n\nexport interface BenefitInfo {\n /**\n * Price of the benefit in credits. The price is the same for all of this benefit's items.\n * @decimalValue options { gte:0, maxScale:4 }\n */\n price?: string | null;\n /**\n * Unique identifier for this benefit.\n * @maxLength 64\n */\n benefitKey?: string;\n /**\n * Benefit name.\n * @maxLength 40\n */\n displayName?: string | null;\n /**\n * Benefit description.\n * @maxLength 255\n */\n description?: string | null;\n}\n\nexport interface PoolItemDeactivated {\n /** The pool item that was deactivated. */\n poolItem?: PoolItem;\n}\n\nexport interface QueryPoolItemsRequest {\n /** Query to select benefit items. */\n query?: CursorQuery;\n /**\n * Fields to be included in the response.\n * @maxSize 5\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\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 cursorPaging?: CursorPaging;\n /**\n * Filter object in the following format:\n * `\"filter\" : {\n * \"fieldName1\": \"value1\",\n * \"fieldName2\":{\"$operator\":\"value2\"}\n * }`\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object in the following format:\n * `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\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 cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return in the results.\n * @max 1000\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport enum RequestedFields {\n POOL = 'POOL',\n PROGRAM = 'PROGRAM',\n PROGRAM_DEFINITION = 'PROGRAM_DEFINITION',\n ITEM = 'ITEM',\n BENEFIT = 'BENEFIT',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'POOL'\n | 'PROGRAM'\n | 'PROGRAM_DEFINITION'\n | 'ITEM'\n | 'BENEFIT';\n\nexport interface QueryPoolItemsResponse {\n /** List of items. */\n poolItems?: PoolItem[];\n /** Metadata for paginated results. */\n metadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\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 hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface InvalidatePoolItemsRequest {\n /**\n * The pool ID whose items are to be invalidated\n * @format GUID\n */\n poolId?: string;\n /**\n * List of item set ids whose items are to be invalidated\n * @maxSize 10\n * @format GUID\n */\n itemSetIds?: string[];\n}\n\nexport interface InvalidatePoolItemsResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/**\n * Retrieves a list of benefit items, given the provided paging, filtering, and sorting. Returns up to 1000 item per request.\n *\n * For a detailed list of supported operations, see [Items: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/item-v1/filtering-and-sorting).\n *\n * To learn how to query program definitions, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n * @public\n * @documentationMaturity preview\n * @permissionId benefit_programs:v1:pool_item:query_pool_items\n * @permissionId BENEFIT_PROGRAMS.POOL_READ\n * @applicableIdentity APP\n * @fqn wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems\n */\nexport function queryPoolItems(\n options?: QueryPoolItemsOptions\n): PoolItemsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n PoolItem,\n 'CURSOR',\n QueryPoolItemsRequest,\n QueryPoolItemsResponse\n >({\n func: async (payload: QueryPoolItemsRequest) => {\n const reqOpts = ambassadorWixBenefitProgramsV1PoolItem.queryPoolItems({\n ...payload,\n ...(options ?? {}),\n });\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryPoolItemsRequest['query']) => {\n const args = [query, options] as [\n QueryPoolItemsRequest['query'],\n QueryPoolItemsOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryPoolItemsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.poolItems,\n pagingMetadata: transformedData?.metadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\nexport interface QueryPoolItemsOptions {\n /**\n * Fields to be included in the response.\n * @maxSize 5\n */\n fields?: RequestedFieldsWithLiterals[] | undefined;\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface PoolItemsQueryResult extends QueryCursorResult {\n items: PoolItem[];\n query: PoolItemsQueryBuilder;\n next: () => Promise<PoolItemsQueryResult>;\n prev: () => Promise<PoolItemsQueryResult>;\n}\n\nexport interface PoolItemsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemReferenceSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemReferenceSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemReferenceSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemReferenceSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemReferenceSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemReferenceSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (\n propertyName:\n | '_id'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemReferenceSearchKey',\n value: string\n ) => PoolItemsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n * @documentationMaturity preview\n */\n hasSome: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemReferenceSearchKey',\n value: any[]\n ) => PoolItemsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemReferenceSearchKey',\n value: any\n ) => PoolItemsQueryBuilder;\n /** @documentationMaturity preview */\n exists: (\n propertyName:\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemReferenceSearchKey',\n value: boolean\n ) => PoolItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemReferenceSearchKey'\n >\n ) => PoolItemsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<\n | '_id'\n | '_createdDate'\n | 'externalId'\n | 'category'\n | 'providerAppId'\n | 'namespace'\n | 'poolId'\n | 'programId'\n | 'externalProgramId'\n | 'programDefinitionId'\n | 'externalProgramDefinitionId'\n | 'poolDefinitionId'\n | 'itemSetId'\n | 'beneficiary.memberId'\n | 'program.id'\n | 'programDefinition.id'\n | 'benefitKey'\n | 'itemReferenceSearchKey'\n >\n ) => PoolItemsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => PoolItemsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => PoolItemsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<PoolItemsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems\n * @requiredField query\n */\nexport async function typedQueryPoolItems(\n query: PoolItemQuery,\n options?: QueryPoolItemsOptions\n): Promise<\n NonNullablePaths<\n QueryPoolItemsResponse,\n | `poolItems`\n | `poolItems.${number}._id`\n | `poolItems.${number}.externalId`\n | `poolItems.${number}.category`\n | `poolItems.${number}.providerAppId`\n | `poolItems.${number}.namespace`\n | `poolItems.${number}.poolId`\n | `poolItems.${number}.itemSetId`\n | `poolItems.${number}.beneficiary.anonymousVisitorId`\n | `poolItems.${number}.beneficiary.memberId`\n | `poolItems.${number}.beneficiary.wixUserId`\n | `poolItems.${number}.itemId`\n | `poolItems.${number}.benefitKey`\n | `poolItems.${number}.itemReferenceSearchKey`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects, validateRequestSchema } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n validateRequestSchema?: boolean;\n };\n\n if (validateRequestSchema) {\n QueryPoolItemsRequestSchema.parse({ query, options });\n }\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n ...options,\n });\n\n const reqOpts =\n ambassadorWixBenefitProgramsV1PoolItem.queryPoolItems(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PoolItemQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: [\n '_createdDate',\n '_id',\n 'beneficiary.memberId',\n 'benefitKey',\n 'category',\n 'externalId',\n 'externalProgramDefinitionId',\n 'externalProgramId',\n 'itemReferenceSearchKey',\n 'itemSetId',\n 'namespace',\n 'poolDefinitionId',\n 'poolId',\n 'programDefinitionId',\n 'programId',\n 'providerAppId'\n ];\n operators: '*';\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n PoolItem,\n PoolItemQuerySpec\n>;\nexport type PoolItemQuery = {\n /** \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 cursorPaging?: {\n /** \n Maximum number of items to return in the results. \n @max: 1000 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object in the following format:\n `\"filter\" : {\n \"fieldName1\": \"value1\",\n \"fieldName2\":{\"$operator\":\"value2\"}\n }`\n Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object in the following format:\n `[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]` \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: {\n ...createQueryUtils<PoolItem, PoolItemQuerySpec, PoolItemQuery>(),\n },\n};\n","import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/benefit-programs/v1/pool-items',\n destPath: '/v1/pool-items',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_benefit-programs_pool-items';\n\n/**\n * Retrieves a list of benefit items, given the provided paging, filtering, and sorting. Returns up to 1000 item per request.\n *\n * For a detailed list of supported operations, see [Items: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/item-v1/filtering-and-sorting).\n *\n * To learn how to query program definitions, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n */\nexport function queryPoolItems(payload: object): RequestOptionsFactory<any> {\n function __queryPoolItems({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.benefit_programs.v1.pool_item',\n method: 'POST' as any,\n methodFqn:\n 'wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixBenefitProgramsV1PoolItemPoolItemServiceUrl({\n protoPath: '/v1/pool-items/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'poolItems.createdDate' },\n { path: 'poolItems.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryPoolItems;\n}\n","import * as z from 'zod';\n\nexport const QueryPoolItemsRequest = 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 to select benefit items.'),\n options: z\n .object({\n fields: z\n .array(\n z.enum(['POOL', 'PROGRAM', 'PROGRAM_DEFINITION', 'ITEM', 'BENEFIT'])\n )\n .max(5)\n .optional(),\n })\n .optional(),\n});\nexport const QueryPoolItemsResponse = z.object({\n poolItems: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Benefit 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 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 benefit item is updated.\\nTo prevent conflicting changes, the current revision must be passed when updating the item.\\n\\nIgnored when creating an item.'\n )\n .optional()\n .nullable(),\n _createdDate: z\n .date()\n .describe('Date and time the item was created.')\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe('Date and time the 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 benefit items are products, this ID corresponds to the specific product ID in the supplier'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 purposes. For example, classes, posts, groups.'\n )\n .max(20)\n .optional(),\n providerAppId: z\n .string()\n .describe(\n \"ID of the application providing the benefit item.\\n\\nID of the external application supplying the items. Each item's external ID is unique to its respective provider's 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 \"Module name of the item provider's application that originated the items.\\n\\nFor example, `store-inventory` or `fitness-resources`.\"\n )\n .min(1)\n .max(20)\n .optional(),\n poolId: z\n .string()\n .describe('Pool 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 programId: 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 .nullable(),\n externalProgramId: z\n .string()\n .describe('Program external 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 .nullable(),\n programDefinitionId: 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 .nullable(),\n externalProgramDefinitionId: z\n .string()\n .describe('Program definition external 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 .nullable(),\n poolDefinitionId: z\n .string()\n .describe('Pool 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 .nullable(),\n itemSetId: z\n .string()\n .describe('Item set 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 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('Who is getting the benefit')\n .optional(),\n itemId: z\n .string()\n .describe('Item set 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 benefitKey: z\n .string()\n .describe(\n 'Unique identifier for the benefit associated with this item.'\n )\n .max(64)\n .optional(),\n itemReferenceSearchKey: z\n .string()\n .describe(\n 'Search key for the item reference, which is a unique identifier for searching and referencing the item within the provider\\'s system.\\nIt\\'s build by concatenating the following fields in this order, separated by a separator (e.g., \"/\"):\\n- providerAppId\\n- category\\n- externalId'\n )\n .max(94)\n .optional(),\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('Metadata for paginated results.')\n .optional(),\n});\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n PoolItemQuery,\n PoolItemsQueryBuilder,\n QueryPoolItemsOptions,\n QueryPoolItemsResponse,\n queryPoolItems as universalQueryPoolItems,\n typedQueryPoolItems as universalTypedQueryPoolItems,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/benefit-programs' };\n\nexport function queryPoolItems(\n httpClient: HttpClient,\n __options?: { validateRequestSchema?: boolean }\n): QueryPoolItemsSignature {\n return (options?: QueryPoolItemsOptions) =>\n universalQueryPoolItems(\n options,\n // @ts-ignore\n { httpClient, validateRequestSchema: __options?.validateRequestSchema }\n );\n}\n\ninterface QueryPoolItemsSignature {\n /**\n * Retrieves a list of benefit items, given the provided paging, filtering, and sorting. Returns up to 1000 item per request.\n *\n * For a detailed list of supported operations, see [Items: Supported Filters and Sorting](https://dev.wix.com/docs/rest/business-solutions/benefit-programs/item-v1/filtering-and-sorting).\n *\n * To learn how to query program definitions, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).\n */\n (options?: QueryPoolItemsOptions): PoolItemsQueryBuilder;\n}\n\nexport function typedQueryPoolItems(\n httpClient: HttpClient,\n __options?: { validateRequestSchema?: boolean }\n): TypedQueryPoolItemsSignature {\n return (query: PoolItemQuery, options?: QueryPoolItemsOptions) =>\n universalTypedQueryPoolItems(\n query,\n options,\n // @ts-ignore\n { httpClient, validateRequestSchema: __options?.validateRequestSchema }\n );\n}\n\ninterface TypedQueryPoolItemsSignature {\n /** */\n (query: PoolItemQuery, options?: QueryPoolItemsOptions): Promise<\n NonNullablePaths<\n QueryPoolItemsResponse,\n | `poolItems`\n | `poolItems.${number}._id`\n | `poolItems.${number}.externalId`\n | `poolItems.${number}.category`\n | `poolItems.${number}.providerAppId`\n | `poolItems.${number}.namespace`\n | `poolItems.${number}.poolId`\n | `poolItems.${number}.itemSetId`\n | `poolItems.${number}.beneficiary.anonymousVisitorId`\n | `poolItems.${number}.beneficiary.memberId`\n | `poolItems.${number}.beneficiary.wixUserId`\n | `poolItems.${number}.itemId`\n | `poolItems.${number}.benefitKey`\n | `poolItems.${number}.itemReferenceSearchKey`,\n 5\n >\n >;\n}\n\nexport {\n AccountInfo,\n ActionEvent,\n BenefitInfo,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n InvalidatePoolItemsRequest,\n InvalidatePoolItemsResponse,\n ItemInfo,\n MessageEnvelope,\n PoolInfo,\n PoolItem,\n PoolItemDeactivated,\n PoolItemQuerySpec,\n PoolItemsQueryBuilder,\n PoolItemsQueryResult,\n ProgramDefinitionInfo,\n ProgramInfo,\n QueryPoolItemsOptions,\n QueryPoolItemsRequest,\n QueryPoolItemsResponse,\n RequestedFields,\n RestoreInfo,\n SortOrder,\n Sorting,\n WebhookIdentityType,\n utils,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\n","import {\n queryPoolItems as publicQueryPoolItems,\n typedQueryPoolItems as publicTypedQueryPoolItems,\n} from './benefit-programs-v1-pool-item-pool-items.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n PoolItemQuery,\n PoolItemsQueryBuilder,\n QueryPoolItemsOptions,\n typedQueryPoolItems as universalTypedQueryPoolItems,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\n\nfunction customQueryPoolItems(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: (options?: QueryPoolItemsOptions) =>\n publicQueryPoolItems(httpClient)(options),\n typedQueryFunction: (\n query: PoolItemQuery,\n options?: QueryPoolItemsOptions\n ) => publicTypedQueryPoolItems(httpClient)(query, options),\n hasOptionsParameter: true,\n });\n\n function overloadedQuery(\n query: PoolItemQuery,\n options?: QueryPoolItemsOptions\n ): ReturnType<typeof universalTypedQueryPoolItems>;\n function overloadedQuery(\n options?: QueryPoolItemsOptions\n ): PoolItemsQueryBuilder;\n function overloadedQuery(\n queryOrOptions?: PoolItemQuery | QueryPoolItemsOptions,\n options?: QueryPoolItemsOptions\n ): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const queryPoolItems: MaybeContext<\n BuildRESTFunction<typeof customQueryPoolItems> & typeof customQueryPoolItems\n> = /*#__PURE__*/ createRESTModule(customQueryPoolItems);\n\nexport {\n IdentityType,\n SortOrder,\n RequestedFields,\n WebhookIdentityType,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\nexport {\n PoolItem,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n PoolInfo,\n ProgramInfo,\n ProgramDefinitionInfo,\n ItemInfo,\n BenefitInfo,\n PoolItemDeactivated,\n QueryPoolItemsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryPoolItemsResponse,\n CursorPagingMetadata,\n Cursors,\n InvalidatePoolItemsRequest,\n InvalidatePoolItemsResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n QueryPoolItemsOptions,\n PoolItemsQueryResult,\n PoolItemsQueryBuilder,\n PoolItemQuerySpec,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\nexport { utils } from './benefit-programs-v1-pool-item-pool-items.universal.js';\nexport {\n IdentityTypeWithLiterals,\n SortOrderWithLiterals,\n RequestedFieldsWithLiterals,\n WebhookIdentityTypeWithLiterals,\n CommonQueryWithEntityContext,\n PoolItemQuery,\n} from './benefit-programs-v1-pool-item-pool-items.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD,SAAS,oBAAoB;AAC7B;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACLP,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,SAAS,sDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,SAAO,WAAW,OAAO,OAAO,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAC7D;AAEA,IAAM,eAAe;AASd,SAAS,eAAe,SAA6C;AAC1E,WAAS,iBAAiB,EAAE,KAAK,GAAQ;AACvC,UAAM,WAAW;AAAA,MACf,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,WACE;AAAA,MACF,aAAa;AAAA,MACb,kBAAkB;AAAA,QAChB,wBAAwB;AAAA,MAC1B;AAAA,MACA,KAAK,sDAAsD;AAAA,QACzD,WAAW;AAAA,QACX,MAAM;AAAA,QACN;AAAA,MACF,CAAC;AAAA,MACD,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O;AAAA,IACzD,qBAAqB;AAAA,EACvB,CAAC;AASD,WAAS,gBACP,gBACA,SACK;AACL,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMD,kBAEK,iCAAiB,oBAAoB;","names":["payload","transformPaths","IdentityType","SortOrder","RequestedFields","WebhookIdentityType","queryPoolItems","transformPaths","queryPoolItems","typedQueryPoolItems","queryPoolItems","typedQueryPoolItems"]}