@wix/auto_sdk_benefit-programs_pool-definitions 1.0.65 → 1.0.67

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 (41) hide show
  1. package/build/cjs/index.d.ts +1 -1
  2. package/build/cjs/index.js +2 -4
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +8 -12
  5. package/build/cjs/index.typings.js +1 -3
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +3 -3
  8. package/build/cjs/meta.js.map +1 -1
  9. package/build/cjs/schemas.js +28 -24
  10. package/build/cjs/schemas.js.map +1 -1
  11. package/build/es/index.d.mts +1 -1
  12. package/build/es/index.mjs +2 -4
  13. package/build/es/index.mjs.map +1 -1
  14. package/build/es/index.typings.d.mts +8 -12
  15. package/build/es/index.typings.mjs +1 -3
  16. package/build/es/index.typings.mjs.map +1 -1
  17. package/build/es/meta.d.mts +3 -3
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/es/schemas.mjs +28 -24
  20. package/build/es/schemas.mjs.map +1 -1
  21. package/build/internal/cjs/index.d.ts +1 -1
  22. package/build/internal/cjs/index.js +2 -4
  23. package/build/internal/cjs/index.js.map +1 -1
  24. package/build/internal/cjs/index.typings.d.ts +97 -12
  25. package/build/internal/cjs/index.typings.js +1 -3
  26. package/build/internal/cjs/index.typings.js.map +1 -1
  27. package/build/internal/cjs/meta.d.ts +125 -3
  28. package/build/internal/cjs/meta.js.map +1 -1
  29. package/build/internal/cjs/schemas.js +28 -24
  30. package/build/internal/cjs/schemas.js.map +1 -1
  31. package/build/internal/es/index.d.mts +1 -1
  32. package/build/internal/es/index.mjs +2 -4
  33. package/build/internal/es/index.mjs.map +1 -1
  34. package/build/internal/es/index.typings.d.mts +97 -12
  35. package/build/internal/es/index.typings.mjs +1 -3
  36. package/build/internal/es/index.typings.mjs.map +1 -1
  37. package/build/internal/es/meta.d.mts +125 -3
  38. package/build/internal/es/meta.mjs.map +1 -1
  39. package/build/internal/es/schemas.mjs +28 -24
  40. package/build/internal/es/schemas.mjs.map +1 -1
  41. package/package.json +4 -4
@@ -66,6 +66,12 @@ interface PoolDefinition {
66
66
  * @maxLength 450
67
67
  */
68
68
  description?: string | null;
69
+ /**
70
+ * Monotonic counter incremented on every change, including system/materialization updates that do not bump revision.
71
+ * @internal
72
+ * @readonly
73
+ */
74
+ changesCounter?: string | null;
69
75
  }
70
76
  interface Details {
71
77
  /**
@@ -79,6 +85,19 @@ interface Details {
79
85
  * If this object is empty, you can't set a price for the benefit.
80
86
  */
81
87
  creditConfiguration?: CreditConfiguration;
88
+ /**
89
+ * Defines when benefits can be redeemed.
90
+ *
91
+ * Benefit redemption can be limited by:
92
+ * - **Fixed intervals**: Benefits can be redeemed during specific times of the day or week.
93
+ * - **Rate limited**: Up to a maximum amount of benefits can be redeemed in a specified time period.
94
+ *
95
+ * Expressions can be combined using the *not*, *and*, and *or* operators.
96
+ *
97
+ * Each benefit can override this policy.
98
+ * @internal
99
+ */
100
+ policyExpression?: PolicyExpression;
82
101
  /** Additional information relating to this object. */
83
102
  additionalData?: Record<string, any> | null;
84
103
  }
@@ -102,6 +121,11 @@ interface Benefit {
102
121
  * @decimalValue options { gte:0, maxScale:4 }
103
122
  */
104
123
  price?: string | null;
124
+ /**
125
+ * Overrides the default policy expression in `benefit.details`.
126
+ * @internal
127
+ */
128
+ policyExpression?: PolicyExpression;
105
129
  /** Additional information for this benefit. */
106
130
  additionalData?: Record<string, any> | null;
107
131
  /**
@@ -513,6 +537,11 @@ interface BulkActionMetadata {
513
537
  interface UpdatePoolDefinitionRequest {
514
538
  /** Pool definition to update. */
515
539
  poolDefinition: PoolDefinition;
540
+ /**
541
+ * Explicit list of fields to update.
542
+ * @internal
543
+ */
544
+ fieldMask?: string[];
516
545
  /** *Required.** Determines when the changes to this pool definition and program definitions containing it will be applied to associated programs and pools. */
517
546
  cascade?: CascadeWithLiterals;
518
547
  }
@@ -598,6 +627,19 @@ interface GetPoolDefinitionResponse {
598
627
  interface QueryPoolDefinitionsRequest {
599
628
  /** Filter, sort, and paging to apply to the query. */
600
629
  query?: CursorQuery;
630
+ /**
631
+ * If true, the response will reflect a consistent snapshot of the data as of the time the request was received.
632
+ * @internal
633
+ */
634
+ consistent?: boolean | null;
635
+ /**
636
+ * HACK FIXME PPNP-4611. Supersedes the page limit provided in the CursorQuery. Provides a way for trusted clients to query large
637
+ * amounts of data because necessary index crashes mysql cluster so the only option is to perform filtering in memory
638
+ * https://wix.slack.com/archives/C0E3MBAGH/p1765097287055939
639
+ * @internal
640
+ * @max 10000
641
+ */
642
+ overrideLimit?: number | null;
601
643
  }
602
644
  interface CursorQuery extends CursorQueryPagingMethodOneOf {
603
645
  /** 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`. */
@@ -631,6 +673,20 @@ interface Sorting {
631
673
  * Default: `ASC`
632
674
  */
633
675
  order?: SortOrderWithLiterals;
676
+ /**
677
+ * When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
678
+ * a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
679
+ *
680
+ * If multiple filters are provided, they are combined with AND operator.
681
+ *
682
+ * Example:
683
+ * Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
684
+ * and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
685
+ * { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
686
+ * @internal
687
+ * @maxSize 10
688
+ */
689
+ selectItemsBy?: Record<string, any>[] | null;
634
690
  }
635
691
  declare enum SortOrder {
636
692
  /** Ascending sort order. */
@@ -748,9 +804,9 @@ interface HealPoolDefinitionRequest {
748
804
  }
749
805
  interface HealPoolDefinitionResponse {
750
806
  }
751
- interface HealPoolDefinitionsTenantRequest {
807
+ interface HealPoolDefinitionTenantRequest {
752
808
  }
753
- interface HealPoolDefinitionsTenantResponse {
809
+ interface HealPoolDefinitionTenantResponse {
754
810
  }
755
811
  interface DomainEvent extends DomainEventBodyOneOf {
756
812
  createdEvent?: EntityCreatedEvent;
@@ -1068,6 +1124,12 @@ interface UpdatePoolDefinition {
1068
1124
  * @maxLength 450
1069
1125
  */
1070
1126
  description?: string | null;
1127
+ /**
1128
+ * Monotonic counter incremented on every change, including system/materialization updates that do not bump revision.
1129
+ * @internal
1130
+ * @readonly
1131
+ */
1132
+ changesCounter?: string | null;
1071
1133
  }
1072
1134
  interface UpdatePoolDefinitionOptions {
1073
1135
  /** Required.** Determines when the changes to this pool definition and program definitions containing it will be applied to associated programs and pools. */
@@ -1158,6 +1220,19 @@ declare function getPoolDefinition(poolDefinitionId: string): Promise<NonNullabl
1158
1220
  */
1159
1221
  declare function queryPoolDefinitions(options?: QueryPoolDefinitionsOptions): PoolDefinitionsQueryBuilder;
1160
1222
  interface QueryPoolDefinitionsOptions {
1223
+ /**
1224
+ * If true, the response will reflect a consistent snapshot of the data as of the time the request was received.
1225
+ * @internal
1226
+ */
1227
+ consistent?: boolean | null | undefined;
1228
+ /**
1229
+ * HACK FIXME PPNP-4611. Supersedes the page limit provided in the CursorQuery. Provides a way for trusted clients to query large
1230
+ * amounts of data because necessary index crashes mysql cluster so the only option is to perform filtering in memory
1231
+ * https://wix.slack.com/archives/C0E3MBAGH/p1765097287055939
1232
+ * @internal
1233
+ * @max 10000
1234
+ */
1235
+ overrideLimit?: number | null | undefined;
1161
1236
  }
1162
1237
  interface QueryCursorResult {
1163
1238
  cursors: Cursors;
@@ -1176,11 +1251,11 @@ interface PoolDefinitionsQueryBuilder {
1176
1251
  /** @param propertyName - Property whose value is compared with `value`.
1177
1252
  * @param value - Value to compare against.
1178
1253
  */
1179
- eq: (propertyName: '_id' | '_createdDate' | 'programDefinitionIds' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace', value: any) => PoolDefinitionsQueryBuilder;
1254
+ eq: (propertyName: '_id' | '_createdDate' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace', value: any) => PoolDefinitionsQueryBuilder;
1180
1255
  /** @param propertyName - Property whose value is compared with `value`.
1181
1256
  * @param value - Value to compare against.
1182
1257
  */
1183
- ne: (propertyName: '_id' | '_createdDate' | 'programDefinitionIds' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace', value: any) => PoolDefinitionsQueryBuilder;
1258
+ ne: (propertyName: '_id' | '_createdDate' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace', value: any) => PoolDefinitionsQueryBuilder;
1184
1259
  /** @param propertyName - Property whose value is compared with `value`.
1185
1260
  * @param value - Value to compare against.
1186
1261
  */
@@ -1204,12 +1279,12 @@ interface PoolDefinitionsQueryBuilder {
1204
1279
  /** @param propertyName - Property whose value is compared with `values`.
1205
1280
  * @param values - List of values to compare against.
1206
1281
  */
1207
- hasSome: (propertyName: '_id' | '_createdDate' | 'programDefinitionIds' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace', value: any[]) => PoolDefinitionsQueryBuilder;
1282
+ hasSome: (propertyName: 'programDefinitionIds', value: any[]) => PoolDefinitionsQueryBuilder;
1208
1283
  /** @param propertyName - Property whose value is compared with `values`.
1209
1284
  * @param values - List of values to compare against.
1210
1285
  */
1211
1286
  hasAll: (propertyName: 'programDefinitionIds', value: any[]) => PoolDefinitionsQueryBuilder;
1212
- in: (propertyName: '_id' | '_createdDate' | 'programDefinitionIds' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace', value: any) => PoolDefinitionsQueryBuilder;
1287
+ in: (propertyName: '_id' | '_createdDate' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace', value: any) => PoolDefinitionsQueryBuilder;
1213
1288
  exists: (propertyName: '_id' | '_createdDate' | 'programDefinitionIds' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace', value: boolean) => PoolDefinitionsQueryBuilder;
1214
1289
  /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */
1215
1290
  ascending: (...propertyNames: Array<'_id' | '_createdDate' | 'programDefinitionIds' | 'details.benefits.itemSetId' | 'details.benefits.providerAppId' | 'namespace'>) => PoolDefinitionsQueryBuilder;
@@ -1288,14 +1363,24 @@ type PoolDefinitionQuery = {
1288
1363
  Default: `ASC`
1289
1364
  */
1290
1365
  order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
1366
+ /**
1367
+ When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
1368
+ a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
1369
+
1370
+ If multiple filters are provided, they are combined with AND operator.
1371
+
1372
+ Example:
1373
+ Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
1374
+ and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
1375
+ { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
1376
+ @internal: undefined,
1377
+ @maxSize: 10
1378
+ */
1379
+ selectItemsBy?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['selectItemsBy'] | null;
1291
1380
  }[];
1292
1381
  };
1293
1382
  declare const utils: {
1294
- query: {
1295
- QueryBuilder: () => _wix_sdk_types.QueryBuilder<PoolDefinition, PoolDefinitionQuerySpec, PoolDefinitionQuery>;
1296
- Filter: _wix_sdk_types.FilterFactory<PoolDefinition, PoolDefinitionQuerySpec>;
1297
- Sort: _wix_sdk_types.SortFactory<PoolDefinitionQuerySpec>;
1298
- };
1383
+ query: _wix_sdk_types.QueryHelpers<PoolDefinition, PoolDefinitionQuerySpec, PoolDefinitionQuery>;
1299
1384
  };
1300
1385
  /**
1301
1386
  * Adds a pool definition to a program definition.
@@ -1370,4 +1455,4 @@ interface FindPoolDefinitionsByProgramDefinitionOptions {
1370
1455
  namespace: string;
1371
1456
  }
1372
1457
 
1373
- export { type AccountInfo, type ActionEvent, type AddPoolDefinitionToProgramDefinitionOptions, type AddPoolDefinitionToProgramDefinitionRequest, type AddPoolDefinitionToProgramDefinitionResponse, type AddPoolDefinitionToProgramDefinitionValidationErrors, type ApplicationError, type Benefit, type BulkActionMetadata, type BulkCreatePoolDefinitionsOptions, type BulkCreatePoolDefinitionsRequest, type BulkCreatePoolDefinitionsResponse, type BulkDeletePoolDefinitionsOptions, type BulkDeletePoolDefinitionsRequest, type BulkDeletePoolDefinitionsResponse, type BulkPoolDefinitionResult, type BulkUpdatePoolDefinitionsOptions, type BulkUpdatePoolDefinitionsRequest, type BulkUpdatePoolDefinitionsResponse, type BulkUpdatePoolDefinitionsValidationErrors, Cascade, type CascadeWithLiterals, type CommonQueryWithEntityContext, type CreatePoolDefinitionOptions, type CreatePoolDefinitionRequest, type CreatePoolDefinitionResponse, type CreditConfiguration, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomPolicy, type DeletePoolDefinitionRequest, type DeletePoolDefinitionResponse, type Details, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type FindPoolDefinitionsByProgramDefinitionOptions, type FindPoolDefinitionsByProgramDefinitionRequest, type FindPoolDefinitionsByProgramDefinitionResponse, type FixedIntervalPolicy, type GetPoolDefinitionRequest, type GetPoolDefinitionResponse, type HealPoolDefinitionRequest, type HealPoolDefinitionResponse, type HealPoolDefinitionsTenantRequest, type HealPoolDefinitionsTenantResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MaskedPoolDefinition, type MessageEnvelope, type Policy, type PolicyExpression, type PolicyExpressionAnd, type PolicyExpressionExpressionOneOf, type PolicyExpressionNot, type PolicyExpressionOr, PolicyExpressionType, type PolicyExpressionTypeWithLiterals, type PolicyPolicyOneOf, type PoolDefinition, type PoolDefinitionAddedToProgramDefinition, type PoolDefinitionDeletedProxySupport, type PoolDefinitionQuery, type PoolDefinitionQuerySpec, type PoolDefinitionRemovedFromProgramDefinition, type PoolDefinitionTranslated, type PoolDefinitionTranslationDeleted, type PoolDefinitionUpdatedProxySupport, type PoolDefinitionsQueryBuilder, type PoolDefinitionsQueryResult, type ProgramDefinitionInfo, type QueryPoolDefinitionsOptions, type QueryPoolDefinitionsRequest, type QueryPoolDefinitionsResponse, type RateLimitedPolicy, type RemovePoolDefinitionFromProgramDefinitionOptions, type RemovePoolDefinitionFromProgramDefinitionRequest, type RemovePoolDefinitionFromProgramDefinitionResponse, type RemovePoolDefinitionFromProgramDefinitionValidationErrors, type RestoreInfo, type RolloverConfiguration, SortOrder, type SortOrderWithLiterals, type Sorting, TimePeriod, type TimePeriodWithLiterals, Type, type TypeWithLiterals, type UpdatePoolDefinition, type UpdatePoolDefinitionOptions, type UpdatePoolDefinitionRequest, type UpdatePoolDefinitionResponse, type UpdatePoolDefinitionValidationErrors, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeekDay, type WeekDayWithLiterals, addPoolDefinitionToProgramDefinition, bulkCreatePoolDefinitions, bulkDeletePoolDefinitions, bulkUpdatePoolDefinitions, createPoolDefinition, deletePoolDefinition, findPoolDefinitionsByProgramDefinition, getPoolDefinition, queryPoolDefinitions, removePoolDefinitionFromProgramDefinition, typedQueryPoolDefinitions, updatePoolDefinition, utils };
1458
+ export { type AccountInfo, type ActionEvent, type AddPoolDefinitionToProgramDefinitionOptions, type AddPoolDefinitionToProgramDefinitionRequest, type AddPoolDefinitionToProgramDefinitionResponse, type AddPoolDefinitionToProgramDefinitionValidationErrors, type ApplicationError, type Benefit, type BulkActionMetadata, type BulkCreatePoolDefinitionsOptions, type BulkCreatePoolDefinitionsRequest, type BulkCreatePoolDefinitionsResponse, type BulkDeletePoolDefinitionsOptions, type BulkDeletePoolDefinitionsRequest, type BulkDeletePoolDefinitionsResponse, type BulkPoolDefinitionResult, type BulkUpdatePoolDefinitionsOptions, type BulkUpdatePoolDefinitionsRequest, type BulkUpdatePoolDefinitionsResponse, type BulkUpdatePoolDefinitionsValidationErrors, Cascade, type CascadeWithLiterals, type CommonQueryWithEntityContext, type CreatePoolDefinitionOptions, type CreatePoolDefinitionRequest, type CreatePoolDefinitionResponse, type CreditConfiguration, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type CustomPolicy, type DeletePoolDefinitionRequest, type DeletePoolDefinitionResponse, type Details, type DomainEvent, type DomainEventBodyOneOf, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type FindPoolDefinitionsByProgramDefinitionOptions, type FindPoolDefinitionsByProgramDefinitionRequest, type FindPoolDefinitionsByProgramDefinitionResponse, type FixedIntervalPolicy, type GetPoolDefinitionRequest, type GetPoolDefinitionResponse, type HealPoolDefinitionRequest, type HealPoolDefinitionResponse, type HealPoolDefinitionTenantRequest, type HealPoolDefinitionTenantResponse, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MaskedPoolDefinition, type MessageEnvelope, type Policy, type PolicyExpression, type PolicyExpressionAnd, type PolicyExpressionExpressionOneOf, type PolicyExpressionNot, type PolicyExpressionOr, PolicyExpressionType, type PolicyExpressionTypeWithLiterals, type PolicyPolicyOneOf, type PoolDefinition, type PoolDefinitionAddedToProgramDefinition, type PoolDefinitionDeletedProxySupport, type PoolDefinitionQuery, type PoolDefinitionQuerySpec, type PoolDefinitionRemovedFromProgramDefinition, type PoolDefinitionTranslated, type PoolDefinitionTranslationDeleted, type PoolDefinitionUpdatedProxySupport, type PoolDefinitionsQueryBuilder, type PoolDefinitionsQueryResult, type ProgramDefinitionInfo, type QueryPoolDefinitionsOptions, type QueryPoolDefinitionsRequest, type QueryPoolDefinitionsResponse, type RateLimitedPolicy, type RemovePoolDefinitionFromProgramDefinitionOptions, type RemovePoolDefinitionFromProgramDefinitionRequest, type RemovePoolDefinitionFromProgramDefinitionResponse, type RemovePoolDefinitionFromProgramDefinitionValidationErrors, type RestoreInfo, type RolloverConfiguration, SortOrder, type SortOrderWithLiterals, type Sorting, TimePeriod, type TimePeriodWithLiterals, Type, type TypeWithLiterals, type UpdatePoolDefinition, type UpdatePoolDefinitionOptions, type UpdatePoolDefinitionRequest, type UpdatePoolDefinitionResponse, type UpdatePoolDefinitionValidationErrors, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, WeekDay, type WeekDayWithLiterals, addPoolDefinitionToProgramDefinition, bulkCreatePoolDefinitions, bulkDeletePoolDefinitions, bulkUpdatePoolDefinitions, createPoolDefinition, deletePoolDefinition, findPoolDefinitionsByProgramDefinition, getPoolDefinition, queryPoolDefinitions, removePoolDefinitionFromProgramDefinition, typedQueryPoolDefinitions, updatePoolDefinition, utils };
@@ -847,9 +847,7 @@ async function typedQueryPoolDefinitions(query, options) {
847
847
  }
848
848
  }
849
849
  var utils = {
850
- query: {
851
- ...createQueryUtils()
852
- }
850
+ query: /* @__PURE__ */ createQueryUtils()
853
851
  };
854
852
  async function addPoolDefinitionToProgramDefinition2(poolDefinitionId, options) {
855
853
  const { httpClient, sideEffects } = arguments[2];