@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,733 @@
1
+ import * as _wix_sdk_types from '@wix/sdk-types';
2
+ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
3
+
4
+ interface PoolItem {
5
+ /**
6
+ * Benefit item ID.
7
+ * @format GUID
8
+ * @readonly
9
+ */
10
+ _id?: string;
11
+ /**
12
+ * Revision number, which increments by 1 each time the benefit item is updated.
13
+ * To prevent conflicting changes, the current revision must be passed when updating the item.
14
+ *
15
+ * Ignored when creating an item.
16
+ * @readonly
17
+ */
18
+ revision?: string | null;
19
+ /**
20
+ * Date and time the item was created.
21
+ * @readonly
22
+ */
23
+ _createdDate?: Date | null;
24
+ /**
25
+ * Date and time the item was updated.
26
+ * @readonly
27
+ */
28
+ _updatedDate?: Date | null;
29
+ /**
30
+ * External item ID assigned by the provider of the items.
31
+ *
32
+ * For example, if the benefit items are products, this ID corresponds to the specific product ID in the supplier's system.
33
+ * @format GUID
34
+ * @immutable
35
+ * @readonly
36
+ */
37
+ externalId?: string;
38
+ /**
39
+ * Item category. Groups benefit items together for organization and management purposes. For example, classes, posts, groups.
40
+ * @maxLength 20
41
+ * @immutable
42
+ * @readonly
43
+ */
44
+ category?: string;
45
+ /**
46
+ * ID of the application providing the benefit item.
47
+ *
48
+ * ID of the external application supplying the items. Each item's external ID is unique to its respective provider's application.
49
+ * @format GUID
50
+ * @immutable
51
+ * @readonly
52
+ */
53
+ providerAppId?: string;
54
+ /**
55
+ * Module name of the item provider's application that originated the items.
56
+ *
57
+ * For example, `store-inventory` or `fitness-resources`.
58
+ * @minLength 1
59
+ * @maxLength 20
60
+ * @immutable
61
+ * @readonly
62
+ */
63
+ namespace?: string;
64
+ /**
65
+ * Pool id
66
+ * @format GUID
67
+ * @immutable
68
+ * @readonly
69
+ */
70
+ poolId?: string;
71
+ /**
72
+ * Program id
73
+ * @format GUID
74
+ * @immutable
75
+ * @readonly
76
+ */
77
+ programId?: string | null;
78
+ /**
79
+ * Program external id
80
+ * @format GUID
81
+ * @readonly
82
+ */
83
+ externalProgramId?: string | null;
84
+ /**
85
+ * Program definition id
86
+ * @format GUID
87
+ * @immutable
88
+ * @readonly
89
+ */
90
+ programDefinitionId?: string | null;
91
+ /**
92
+ * Program definition external id
93
+ * @format GUID
94
+ * @immutable
95
+ * @readonly
96
+ */
97
+ externalProgramDefinitionId?: string | null;
98
+ /**
99
+ * Pool definition id
100
+ * @format GUID
101
+ * @immutable
102
+ * @readonly
103
+ */
104
+ poolDefinitionId?: string | null;
105
+ /**
106
+ * Item set ID.
107
+ * @format GUID
108
+ * @immutable
109
+ * @readonly
110
+ */
111
+ itemSetId?: string;
112
+ /**
113
+ * Who is getting the benefit
114
+ * @readonly
115
+ * @immutable
116
+ */
117
+ beneficiary?: CommonIdentificationData;
118
+ /**
119
+ * Item set ID.
120
+ * @format GUID
121
+ * @immutable
122
+ * @readonly
123
+ */
124
+ itemId?: string;
125
+ /**
126
+ * Unique identifier for the benefit associated with this item.
127
+ * @maxLength 64
128
+ * @immutable
129
+ * @readonly
130
+ */
131
+ benefitKey?: string;
132
+ /**
133
+ * Search key for the item reference, which is a unique identifier for searching and referencing the item within the provider's system.
134
+ * It's build by concatenating the following fields in this order, separated by a separator (e.g., "/"):
135
+ * - providerAppId
136
+ * - category
137
+ * - externalId
138
+ * @maxLength 94
139
+ * @immutable
140
+ * @readonly
141
+ */
142
+ itemReferenceSearchKey?: string;
143
+ }
144
+ interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
145
+ /**
146
+ * ID of a site visitor that hasn't logged in to the site.
147
+ * @format GUID
148
+ */
149
+ anonymousVisitorId?: string;
150
+ /**
151
+ * ID of a site member.
152
+ * @format GUID
153
+ */
154
+ memberId?: string;
155
+ /**
156
+ * ID of a Wix user.
157
+ * @format GUID
158
+ */
159
+ wixUserId?: string;
160
+ }
161
+ /** @oneof */
162
+ interface CommonIdentificationDataIdOneOf {
163
+ /**
164
+ * ID of a site visitor that hasn't logged in to the site.
165
+ * @format GUID
166
+ */
167
+ anonymousVisitorId?: string;
168
+ /**
169
+ * ID of a site member.
170
+ * @format GUID
171
+ */
172
+ memberId?: string;
173
+ /**
174
+ * ID of a Wix user.
175
+ * @format GUID
176
+ */
177
+ wixUserId?: string;
178
+ }
179
+ declare enum IdentityType {
180
+ /** Unknown type. This value is not used. */
181
+ UNKNOWN = "UNKNOWN",
182
+ /** A site visitor who has not logged in. */
183
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
184
+ /** A logged-in site member. */
185
+ MEMBER = "MEMBER",
186
+ /** A Wix account holder, such as a site owner or contributor. */
187
+ WIX_USER = "WIX_USER"
188
+ }
189
+ /** @enumType */
190
+ type IdentityTypeWithLiterals = IdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER';
191
+ interface PoolInfo {
192
+ /**
193
+ * Pool name.
194
+ *
195
+ * You may want to use the same name that's used in the associated pool definition.
196
+ * @maxLength 64
197
+ */
198
+ displayName?: string;
199
+ /**
200
+ * Pool description.
201
+ * @maxLength 450
202
+ */
203
+ description?: string | null;
204
+ }
205
+ interface ProgramInfo {
206
+ /**
207
+ * Program id
208
+ * @format GUID
209
+ */
210
+ _id?: string;
211
+ /**
212
+ * Program external id
213
+ * @format GUID
214
+ */
215
+ externalId?: string | null;
216
+ /**
217
+ * Program name.
218
+ * @maxLength 64
219
+ */
220
+ displayName?: string | null;
221
+ }
222
+ interface ProgramDefinitionInfo {
223
+ /**
224
+ * Program definition id
225
+ * @format GUID
226
+ */
227
+ _id?: string;
228
+ /**
229
+ * Program definition external id
230
+ * @format GUID
231
+ */
232
+ externalId?: string | null;
233
+ /**
234
+ * Program definition name
235
+ * @maxLength 64
236
+ */
237
+ displayName?: string | null;
238
+ /**
239
+ * Program definition description.
240
+ * @maxLength 450
241
+ */
242
+ description?: string | null;
243
+ }
244
+ interface ItemInfo {
245
+ /**
246
+ * Item display name.
247
+ * @maxLength 64
248
+ */
249
+ displayName?: string | null;
250
+ }
251
+ interface BenefitInfo {
252
+ /**
253
+ * Price of the benefit in credits. The price is the same for all of this benefit's items.
254
+ * @decimalValue options { gte:0, maxScale:4 }
255
+ */
256
+ price?: string | null;
257
+ /**
258
+ * Unique identifier for this benefit.
259
+ * @maxLength 64
260
+ */
261
+ benefitKey?: string;
262
+ /**
263
+ * Benefit name.
264
+ * @maxLength 40
265
+ */
266
+ displayName?: string | null;
267
+ /**
268
+ * Benefit description.
269
+ * @maxLength 255
270
+ */
271
+ description?: string | null;
272
+ }
273
+ interface PoolItemDeactivated {
274
+ /** The pool item that was deactivated. */
275
+ poolItem?: PoolItem;
276
+ }
277
+ interface QueryPoolItemsRequest {
278
+ /** Query to select benefit items. */
279
+ query?: CursorQuery;
280
+ /**
281
+ * Fields to be included in the response.
282
+ * @maxSize 5
283
+ */
284
+ fields?: RequestedFieldsWithLiterals[];
285
+ }
286
+ interface CursorQuery extends CursorQueryPagingMethodOneOf {
287
+ /** 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`. */
288
+ cursorPaging?: CursorPaging;
289
+ /**
290
+ * Filter object in the following format:
291
+ * `"filter" : {
292
+ * "fieldName1": "value1",
293
+ * "fieldName2":{"$operator":"value2"}
294
+ * }`
295
+ * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
296
+ */
297
+ filter?: Record<string, any> | null;
298
+ /**
299
+ * Sort object in the following format:
300
+ * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
301
+ * @maxSize 5
302
+ */
303
+ sort?: Sorting[];
304
+ }
305
+ /** @oneof */
306
+ interface CursorQueryPagingMethodOneOf {
307
+ /** 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`. */
308
+ cursorPaging?: CursorPaging;
309
+ }
310
+ interface Sorting {
311
+ /**
312
+ * Name of the field to sort by.
313
+ * @maxLength 512
314
+ */
315
+ fieldName?: string;
316
+ /** Sort order. */
317
+ order?: SortOrderWithLiterals;
318
+ }
319
+ declare enum SortOrder {
320
+ ASC = "ASC",
321
+ DESC = "DESC"
322
+ }
323
+ /** @enumType */
324
+ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
325
+ interface CursorPaging {
326
+ /**
327
+ * Maximum number of items to return in the results.
328
+ * @max 1000
329
+ */
330
+ limit?: number | null;
331
+ /**
332
+ * Pointer to the next or previous page in the list of results.
333
+ *
334
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
335
+ * Not relevant for the first request.
336
+ * @maxLength 16000
337
+ */
338
+ cursor?: string | null;
339
+ }
340
+ declare enum RequestedFields {
341
+ POOL = "POOL",
342
+ PROGRAM = "PROGRAM",
343
+ PROGRAM_DEFINITION = "PROGRAM_DEFINITION",
344
+ ITEM = "ITEM",
345
+ BENEFIT = "BENEFIT"
346
+ }
347
+ /** @enumType */
348
+ type RequestedFieldsWithLiterals = RequestedFields | 'POOL' | 'PROGRAM' | 'PROGRAM_DEFINITION' | 'ITEM' | 'BENEFIT';
349
+ interface QueryPoolItemsResponse {
350
+ /** List of items. */
351
+ poolItems?: PoolItem[];
352
+ /** Metadata for paginated results. */
353
+ metadata?: CursorPagingMetadata;
354
+ }
355
+ interface CursorPagingMetadata {
356
+ /** Number of items returned in the response. */
357
+ count?: number | null;
358
+ /** Cursor strings that point to the next page, previous page, or both. */
359
+ cursors?: Cursors;
360
+ /**
361
+ * Whether there are more pages to retrieve following the current page.
362
+ *
363
+ * + `true`: Another page of results can be retrieved.
364
+ * + `false`: This is the last page.
365
+ */
366
+ hasNext?: boolean | null;
367
+ }
368
+ interface Cursors {
369
+ /**
370
+ * Cursor string pointing to the next page in the list of results.
371
+ * @maxLength 16000
372
+ */
373
+ next?: string | null;
374
+ /**
375
+ * Cursor pointing to the previous page in the list of results.
376
+ * @maxLength 16000
377
+ */
378
+ prev?: string | null;
379
+ }
380
+ interface InvalidatePoolItemsRequest {
381
+ /**
382
+ * The pool ID whose items are to be invalidated
383
+ * @format GUID
384
+ */
385
+ poolId?: string;
386
+ /**
387
+ * List of item set ids whose items are to be invalidated
388
+ * @maxSize 10
389
+ * @format GUID
390
+ */
391
+ itemSetIds?: string[];
392
+ }
393
+ interface InvalidatePoolItemsResponse {
394
+ }
395
+ interface DomainEvent extends DomainEventBodyOneOf {
396
+ createdEvent?: EntityCreatedEvent;
397
+ updatedEvent?: EntityUpdatedEvent;
398
+ deletedEvent?: EntityDeletedEvent;
399
+ actionEvent?: ActionEvent;
400
+ /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
401
+ _id?: string;
402
+ /**
403
+ * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
404
+ * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
405
+ */
406
+ entityFqdn?: string;
407
+ /**
408
+ * Event action name, placed at the top level to make it easier for users to dispatch messages.
409
+ * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
410
+ */
411
+ slug?: string;
412
+ /** ID of the entity associated with the event. */
413
+ entityId?: string;
414
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
415
+ eventTime?: Date | null;
416
+ /**
417
+ * Whether the event was triggered as a result of a privacy regulation application
418
+ * (for example, GDPR).
419
+ */
420
+ triggeredByAnonymizeRequest?: boolean | null;
421
+ /** If present, indicates the action that triggered the event. */
422
+ originatedFrom?: string | null;
423
+ /**
424
+ * 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.
425
+ * 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.
426
+ */
427
+ entityEventSequence?: string | null;
428
+ }
429
+ /** @oneof */
430
+ interface DomainEventBodyOneOf {
431
+ createdEvent?: EntityCreatedEvent;
432
+ updatedEvent?: EntityUpdatedEvent;
433
+ deletedEvent?: EntityDeletedEvent;
434
+ actionEvent?: ActionEvent;
435
+ }
436
+ interface EntityCreatedEvent {
437
+ entity?: string;
438
+ }
439
+ interface RestoreInfo {
440
+ deletedDate?: Date | null;
441
+ }
442
+ interface EntityUpdatedEvent {
443
+ /**
444
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
445
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
446
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
447
+ */
448
+ currentEntity?: string;
449
+ }
450
+ interface EntityDeletedEvent {
451
+ /** Entity that was deleted. */
452
+ deletedEntity?: string | null;
453
+ }
454
+ interface ActionEvent {
455
+ body?: string;
456
+ }
457
+ interface MessageEnvelope {
458
+ /**
459
+ * App instance ID.
460
+ * @format GUID
461
+ */
462
+ instanceId?: string | null;
463
+ /**
464
+ * Event type.
465
+ * @maxLength 150
466
+ */
467
+ eventType?: string;
468
+ /** The identification type and identity data. */
469
+ identity?: IdentificationData;
470
+ /** Stringify payload. */
471
+ data?: string;
472
+ /** Details related to the account */
473
+ accountInfo?: AccountInfo;
474
+ }
475
+ interface IdentificationData extends IdentificationDataIdOneOf {
476
+ /**
477
+ * ID of a site visitor that has not logged in to the site.
478
+ * @format GUID
479
+ */
480
+ anonymousVisitorId?: string;
481
+ /**
482
+ * ID of a site visitor that has logged in to the site.
483
+ * @format GUID
484
+ */
485
+ memberId?: string;
486
+ /**
487
+ * ID of a Wix user (site owner, contributor, etc.).
488
+ * @format GUID
489
+ */
490
+ wixUserId?: string;
491
+ /**
492
+ * ID of an app.
493
+ * @format GUID
494
+ */
495
+ appId?: string;
496
+ /** @readonly */
497
+ identityType?: WebhookIdentityTypeWithLiterals;
498
+ }
499
+ /** @oneof */
500
+ interface IdentificationDataIdOneOf {
501
+ /**
502
+ * ID of a site visitor that has not logged in to the site.
503
+ * @format GUID
504
+ */
505
+ anonymousVisitorId?: string;
506
+ /**
507
+ * ID of a site visitor that has logged in to the site.
508
+ * @format GUID
509
+ */
510
+ memberId?: string;
511
+ /**
512
+ * ID of a Wix user (site owner, contributor, etc.).
513
+ * @format GUID
514
+ */
515
+ wixUserId?: string;
516
+ /**
517
+ * ID of an app.
518
+ * @format GUID
519
+ */
520
+ appId?: string;
521
+ }
522
+ declare enum WebhookIdentityType {
523
+ UNKNOWN = "UNKNOWN",
524
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
525
+ MEMBER = "MEMBER",
526
+ WIX_USER = "WIX_USER",
527
+ APP = "APP"
528
+ }
529
+ /** @enumType */
530
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
531
+ interface AccountInfo {
532
+ /**
533
+ * ID of the Wix account associated with the event.
534
+ * @format GUID
535
+ */
536
+ accountId?: string | null;
537
+ /**
538
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
539
+ * @format GUID
540
+ */
541
+ parentAccountId?: string | null;
542
+ /**
543
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
544
+ * @format GUID
545
+ */
546
+ siteId?: string | null;
547
+ }
548
+ /**
549
+ * Retrieves a list of benefit items, given the provided paging, filtering, and sorting. Returns up to 1000 item per request.
550
+ *
551
+ * 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).
552
+ *
553
+ * To learn how to query program definitions, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
554
+ * @public
555
+ * @documentationMaturity preview
556
+ * @permissionId benefit_programs:v1:pool_item:query_pool_items
557
+ * @permissionId BENEFIT_PROGRAMS.POOL_READ
558
+ * @applicableIdentity APP
559
+ * @fqn wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems
560
+ */
561
+ declare function queryPoolItems(options?: QueryPoolItemsOptions): PoolItemsQueryBuilder;
562
+ interface QueryPoolItemsOptions {
563
+ /**
564
+ * Fields to be included in the response.
565
+ * @maxSize 5
566
+ */
567
+ fields?: RequestedFieldsWithLiterals[] | undefined;
568
+ }
569
+ interface QueryCursorResult {
570
+ cursors: Cursors;
571
+ hasNext: () => boolean;
572
+ hasPrev: () => boolean;
573
+ length: number;
574
+ pageSize: number;
575
+ }
576
+ interface PoolItemsQueryResult extends QueryCursorResult {
577
+ items: PoolItem[];
578
+ query: PoolItemsQueryBuilder;
579
+ next: () => Promise<PoolItemsQueryResult>;
580
+ prev: () => Promise<PoolItemsQueryResult>;
581
+ }
582
+ interface PoolItemsQueryBuilder {
583
+ /** @param propertyName - Property whose value is compared with `value`.
584
+ * @param value - Value to compare against.
585
+ * @documentationMaturity preview
586
+ */
587
+ eq: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemReferenceSearchKey', value: any) => PoolItemsQueryBuilder;
588
+ /** @param propertyName - Property whose value is compared with `value`.
589
+ * @param value - Value to compare against.
590
+ * @documentationMaturity preview
591
+ */
592
+ ne: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemReferenceSearchKey', value: any) => PoolItemsQueryBuilder;
593
+ /** @param propertyName - Property whose value is compared with `value`.
594
+ * @param value - Value to compare against.
595
+ * @documentationMaturity preview
596
+ */
597
+ ge: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemReferenceSearchKey', value: any) => PoolItemsQueryBuilder;
598
+ /** @param propertyName - Property whose value is compared with `value`.
599
+ * @param value - Value to compare against.
600
+ * @documentationMaturity preview
601
+ */
602
+ gt: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemReferenceSearchKey', value: any) => PoolItemsQueryBuilder;
603
+ /** @param propertyName - Property whose value is compared with `value`.
604
+ * @param value - Value to compare against.
605
+ * @documentationMaturity preview
606
+ */
607
+ le: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemReferenceSearchKey', value: any) => PoolItemsQueryBuilder;
608
+ /** @param propertyName - Property whose value is compared with `value`.
609
+ * @param value - Value to compare against.
610
+ * @documentationMaturity preview
611
+ */
612
+ lt: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemReferenceSearchKey', value: any) => PoolItemsQueryBuilder;
613
+ /** @param propertyName - Property whose value is compared with `string`.
614
+ * @param string - String to compare against. Case-insensitive.
615
+ * @documentationMaturity preview
616
+ */
617
+ startsWith: (propertyName: '_id' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemReferenceSearchKey', value: string) => PoolItemsQueryBuilder;
618
+ /** @param propertyName - Property whose value is compared with `values`.
619
+ * @param values - List of values to compare against.
620
+ * @documentationMaturity preview
621
+ */
622
+ hasSome: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemReferenceSearchKey', value: any[]) => PoolItemsQueryBuilder;
623
+ /** @documentationMaturity preview */
624
+ in: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemReferenceSearchKey', value: any) => PoolItemsQueryBuilder;
625
+ /** @documentationMaturity preview */
626
+ exists: (propertyName: '_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemReferenceSearchKey', value: boolean) => PoolItemsQueryBuilder;
627
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
628
+ * @documentationMaturity preview
629
+ */
630
+ ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemReferenceSearchKey'>) => PoolItemsQueryBuilder;
631
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
632
+ * @documentationMaturity preview
633
+ */
634
+ descending: (...propertyNames: Array<'_id' | '_createdDate' | 'externalId' | 'category' | 'providerAppId' | 'namespace' | 'poolId' | 'programId' | 'externalProgramId' | 'programDefinitionId' | 'externalProgramDefinitionId' | 'poolDefinitionId' | 'itemSetId' | 'beneficiary.memberId' | 'program.id' | 'programDefinition.id' | 'benefitKey' | 'itemReferenceSearchKey'>) => PoolItemsQueryBuilder;
635
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
636
+ * @documentationMaturity preview
637
+ */
638
+ limit: (limit: number) => PoolItemsQueryBuilder;
639
+ /** @param cursor - A pointer to specific record
640
+ * @documentationMaturity preview
641
+ */
642
+ skipTo: (cursor: string) => PoolItemsQueryBuilder;
643
+ /** @documentationMaturity preview */
644
+ find: () => Promise<PoolItemsQueryResult>;
645
+ }
646
+ /**
647
+ * @hidden
648
+ * @fqn wix.benefit_programs.v1.pool_item.PoolItemService.QueryPoolItems
649
+ * @requiredField query
650
+ */
651
+ declare function typedQueryPoolItems(query: PoolItemQuery, options?: QueryPoolItemsOptions): Promise<NonNullablePaths<QueryPoolItemsResponse, `poolItems` | `poolItems.${number}._id` | `poolItems.${number}.externalId` | `poolItems.${number}.category` | `poolItems.${number}.providerAppId` | `poolItems.${number}.namespace` | `poolItems.${number}.poolId` | `poolItems.${number}.itemSetId` | `poolItems.${number}.beneficiary.anonymousVisitorId` | `poolItems.${number}.beneficiary.memberId` | `poolItems.${number}.beneficiary.wixUserId` | `poolItems.${number}.itemId` | `poolItems.${number}.benefitKey` | `poolItems.${number}.itemReferenceSearchKey`, 5>>;
652
+ interface PoolItemQuerySpec extends QuerySpec {
653
+ paging: 'cursor';
654
+ wql: [
655
+ {
656
+ fields: [
657
+ '_createdDate',
658
+ '_id',
659
+ 'beneficiary.memberId',
660
+ 'benefitKey',
661
+ 'category',
662
+ 'externalId',
663
+ 'externalProgramDefinitionId',
664
+ 'externalProgramId',
665
+ 'itemReferenceSearchKey',
666
+ 'itemSetId',
667
+ 'namespace',
668
+ 'poolDefinitionId',
669
+ 'poolId',
670
+ 'programDefinitionId',
671
+ 'programId',
672
+ 'providerAppId'
673
+ ];
674
+ operators: '*';
675
+ sort: 'BOTH';
676
+ }
677
+ ];
678
+ }
679
+ type CommonQueryWithEntityContext = Query<PoolItem, PoolItemQuerySpec>;
680
+ type PoolItemQuery = {
681
+ /**
682
+ 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`.
683
+ */
684
+ cursorPaging?: {
685
+ /**
686
+ Maximum number of items to return in the results.
687
+ @max: 1000
688
+ */
689
+ limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
690
+ /**
691
+ Pointer to the next or previous page in the list of results.
692
+
693
+ Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
694
+ Not relevant for the first request.
695
+ @maxLength: 16000
696
+ */
697
+ cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
698
+ };
699
+ /**
700
+ Filter object in the following format:
701
+ `"filter" : {
702
+ "fieldName1": "value1",
703
+ "fieldName2":{"$operator":"value2"}
704
+ }`
705
+ Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
706
+ */
707
+ filter?: CommonQueryWithEntityContext['filter'] | null;
708
+ /**
709
+ Sort object in the following format:
710
+ `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
711
+ @maxSize: 5
712
+ */
713
+ sort?: {
714
+ /**
715
+ Name of the field to sort by.
716
+ @maxLength: 512
717
+ */
718
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
719
+ /**
720
+ Sort order.
721
+ */
722
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
723
+ }[];
724
+ };
725
+ declare const utils: {
726
+ query: {
727
+ QueryBuilder: () => _wix_sdk_types.QueryBuilder<PoolItem, PoolItemQuerySpec, PoolItemQuery>;
728
+ Filter: _wix_sdk_types.FilterFactory<PoolItem, PoolItemQuerySpec>;
729
+ Sort: _wix_sdk_types.SortFactory<PoolItemQuerySpec>;
730
+ };
731
+ };
732
+
733
+ export { type AccountInfo, type ActionEvent, type BenefitInfo, type CommonIdentificationData, type CommonIdentificationDataIdOneOf, type CommonQueryWithEntityContext, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type IdentificationData, type IdentificationDataIdOneOf, IdentityType, type IdentityTypeWithLiterals, type InvalidatePoolItemsRequest, type InvalidatePoolItemsResponse, type ItemInfo, type MessageEnvelope, type PoolInfo, type PoolItem, type PoolItemDeactivated, type PoolItemQuery, type PoolItemQuerySpec, type PoolItemsQueryBuilder, type PoolItemsQueryResult, type ProgramDefinitionInfo, type ProgramInfo, type QueryPoolItemsOptions, type QueryPoolItemsRequest, type QueryPoolItemsResponse, RequestedFields, type RequestedFieldsWithLiterals, type RestoreInfo, SortOrder, type SortOrderWithLiterals, type Sorting, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, queryPoolItems, typedQueryPoolItems, utils };