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