@wix/auto_sdk_benefit-programs_pools 1.0.57 → 1.0.59

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.
@@ -104,8 +104,6 @@ interface Pool {
104
104
  renewalCount?: number | null;
105
105
  }
106
106
  declare enum PoolStatus {
107
- /** Undefined pool status. */
108
- UNDEFINED = "UNDEFINED",
109
107
  /** Pool is active. */
110
108
  ACTIVE = "ACTIVE",
111
109
  /** Pool is paused. It can be resumed. */
@@ -120,7 +118,7 @@ declare enum PoolStatus {
120
118
  PENDING = "PENDING"
121
119
  }
122
120
  /** @enumType */
123
- type PoolStatusWithLiterals = PoolStatus | 'UNDEFINED' | 'ACTIVE' | 'PAUSED' | 'ENDED' | 'PROVISIONING' | 'RENEWING' | 'PENDING';
121
+ type PoolStatusWithLiterals = PoolStatus | 'ACTIVE' | 'PAUSED' | 'ENDED' | 'PROVISIONING' | 'RENEWING' | 'PENDING';
124
122
  interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
125
123
  /**
126
124
  * ID of a site visitor that hasn't logged in to the site.
@@ -246,7 +244,6 @@ interface PolicyExpressionExpressionOneOf {
246
244
  policyOptions?: Policy;
247
245
  }
248
246
  declare enum PolicyExpressionType {
249
- UNKNOWN = "UNKNOWN",
250
247
  /** Use with `operatorNotOptions`. */
251
248
  OPERATOR_NOT = "OPERATOR_NOT",
252
249
  /** Use with `operatorAndOptions`. */
@@ -257,7 +254,7 @@ declare enum PolicyExpressionType {
257
254
  POLICY = "POLICY"
258
255
  }
259
256
  /** @enumType */
260
- type PolicyExpressionTypeWithLiterals = PolicyExpressionType | 'UNKNOWN' | 'OPERATOR_NOT' | 'OPERATOR_AND' | 'OPERATOR_OR' | 'POLICY';
257
+ type PolicyExpressionTypeWithLiterals = PolicyExpressionType | 'OPERATOR_NOT' | 'OPERATOR_AND' | 'OPERATOR_OR' | 'POLICY';
261
258
  interface PolicyExpressionNot {
262
259
  /** Policy expression. If this expression is not fulfilled, benefits can be redeemed. */
263
260
  expression?: PolicyExpression;
@@ -306,8 +303,6 @@ interface PolicyPolicyOneOf {
306
303
  customOptions?: CustomPolicy;
307
304
  }
308
305
  declare enum Type {
309
- /** Unknown policy type. */
310
- UNKNOWN = "UNKNOWN",
311
306
  /** Use with `fixedIntervalOptions`. */
312
307
  FIXED_INTERVAL = "FIXED_INTERVAL",
313
308
  /** Use with `rateLimitedOptions`. */
@@ -316,7 +311,7 @@ declare enum Type {
316
311
  CUSTOM = "CUSTOM"
317
312
  }
318
313
  /** @enumType */
319
- type TypeWithLiterals = Type | 'UNKNOWN' | 'FIXED_INTERVAL' | 'RATE_LIMITED' | 'CUSTOM';
314
+ type TypeWithLiterals = Type | 'FIXED_INTERVAL' | 'RATE_LIMITED' | 'CUSTOM';
320
315
  interface FixedIntervalPolicy {
321
316
  /** Weekday that this interval starts from. If this field is defined, then `toWeekDay` is required. */
322
317
  fromWeekDay?: WeekDayWithLiterals;
@@ -378,17 +373,13 @@ interface RateLimitedPolicy {
378
373
  quotaId?: string | null;
379
374
  }
380
375
  declare enum TimePeriod {
381
- /** Unknown time period. */
382
- UNKNOWN_TIME_PERIOD = "UNKNOWN_TIME_PERIOD",
383
376
  /** Day, starting at midnight. */
384
377
  DAY = "DAY",
385
- /** Calendar week, starting day depending on locale. */
386
- WEEK = "WEEK",
387
378
  /** Calendar month, starting on the first day of the month. */
388
379
  MONTH = "MONTH"
389
380
  }
390
381
  /** @enumType */
391
- type TimePeriodWithLiterals = TimePeriod | 'UNKNOWN_TIME_PERIOD' | 'DAY' | 'WEEK' | 'MONTH';
382
+ type TimePeriodWithLiterals = TimePeriod | 'DAY' | 'MONTH';
392
383
  /** Custom policy as implemented by the Entitlement Policy Provider */
393
384
  interface CustomPolicy {
394
385
  /**
@@ -460,7 +451,7 @@ interface ProgramDefinitionInfo {
460
451
  /**
461
452
  * Display name of the program definition.
462
453
  * @readonly
463
- * @maxLength 128
454
+ * @maxLength 64
464
455
  */
465
456
  displayName?: string | null;
466
457
  /**
@@ -491,15 +482,13 @@ interface PoolProgramInfo {
491
482
  displayName?: string | null;
492
483
  }
493
484
  declare enum PoolOrigin {
494
- /** Unknown pool origin. */
495
- UNKNOWN = "UNKNOWN",
496
485
  /** Benefit pool created by a program provision. */
497
486
  PROVISION = "PROVISION",
498
487
  /** Benefit pool was created when pool definition was added to program definition. */
499
488
  CASCADE = "CASCADE"
500
489
  }
501
490
  /** @enumType */
502
- type PoolOriginWithLiterals = PoolOrigin | 'UNKNOWN' | 'PROVISION' | 'CASCADE';
491
+ type PoolOriginWithLiterals = PoolOrigin | 'PROVISION' | 'CASCADE';
503
492
  interface PoolRenewalAction extends PoolRenewalActionActionOneOf {
504
493
  /**
505
494
  * The pool's details (benefits and settings) will be updated to match the details of the specified pool definition revision.
@@ -526,15 +515,13 @@ interface PoolRenewalActionActionOneOf {
526
515
  updateOptions?: Update;
527
516
  }
528
517
  declare enum PoolRenewalActionType {
529
- /** Undefined action type. */
530
- UNDEFINED = "UNDEFINED",
531
518
  /** Pool will end on program renewal */
532
519
  END = "END",
533
520
  /** Pool will be updated on program renewal */
534
521
  UPDATE = "UPDATE"
535
522
  }
536
523
  /** @enumType */
537
- type PoolRenewalActionTypeWithLiterals = PoolRenewalActionType | 'UNDEFINED' | 'END' | 'UPDATE';
524
+ type PoolRenewalActionTypeWithLiterals = PoolRenewalActionType | 'END' | 'UPDATE';
538
525
  interface Update {
539
526
  /**
540
527
  * The pool's details will be updated to match the details of the specified pool definition revision.
@@ -1237,8 +1224,6 @@ interface EligibilityCheckResult {
1237
1224
  benefitResults?: BenefitResult[];
1238
1225
  }
1239
1226
  declare enum BenefitResultType {
1240
- /** Unknown eligibility. */
1241
- UNKNOWN = "UNKNOWN",
1242
1227
  /** Item is eligible to be redeemed. */
1243
1228
  ELIGIBLE_BENEFIT = "ELIGIBLE_BENEFIT",
1244
1229
  /** Balance is lower than the cost of redeeming the items. */
@@ -1251,7 +1236,7 @@ declare enum BenefitResultType {
1251
1236
  POOL_NOT_FOUND = "POOL_NOT_FOUND"
1252
1237
  }
1253
1238
  /** @enumType */
1254
- type BenefitResultTypeWithLiterals = BenefitResultType | 'UNKNOWN' | 'ELIGIBLE_BENEFIT' | 'NOT_ENOUGH_BALANCE' | 'POOL_NOT_ACTIVE' | 'BENEFIT_NOT_FOUND' | 'POOL_NOT_FOUND';
1239
+ type BenefitResultTypeWithLiterals = BenefitResultType | 'ELIGIBLE_BENEFIT' | 'NOT_ENOUGH_BALANCE' | 'POOL_NOT_ACTIVE' | 'BENEFIT_NOT_FOUND' | 'POOL_NOT_FOUND';
1255
1240
  interface EligibleBenefit {
1256
1241
  /**
1257
1242
  * Pool ID.
@@ -1418,11 +1403,10 @@ interface ListPoolsRequest {
1418
1403
  cursorPaging?: CursorPaging;
1419
1404
  }
1420
1405
  declare enum ListPoolsRequestType {
1421
- UNKNOWN_FILTER = "UNKNOWN_FILTER",
1422
1406
  BY_ITEM_REFERENCE = "BY_ITEM_REFERENCE"
1423
1407
  }
1424
1408
  /** @enumType */
1425
- type ListPoolsRequestTypeWithLiterals = ListPoolsRequestType | 'UNKNOWN_FILTER' | 'BY_ITEM_REFERENCE';
1409
+ type ListPoolsRequestTypeWithLiterals = ListPoolsRequestType | 'BY_ITEM_REFERENCE';
1426
1410
  interface ByItemReference {
1427
1411
  /**
1428
1412
  * A list of filters
@@ -1600,15 +1584,13 @@ interface ProvisionPoolsForProgramResponseResultOneOf {
1600
1584
  asyncOptions?: AsyncResult;
1601
1585
  }
1602
1586
  declare enum ProvisionPoolsForProgramResponseType {
1603
- /** Unknown result type */
1604
- UNKNOWN = "UNKNOWN",
1605
1587
  /** Sync result */
1606
1588
  SYNC = "SYNC",
1607
1589
  /** Async result */
1608
1590
  ASYNC = "ASYNC"
1609
1591
  }
1610
1592
  /** @enumType */
1611
- type ProvisionPoolsForProgramResponseTypeWithLiterals = ProvisionPoolsForProgramResponseType | 'UNKNOWN' | 'SYNC' | 'ASYNC';
1593
+ type ProvisionPoolsForProgramResponseTypeWithLiterals = ProvisionPoolsForProgramResponseType | 'SYNC' | 'ASYNC';
1612
1594
  interface SyncResult {
1613
1595
  /** Indicates if the operation was successful */
1614
1596
  success?: boolean;
@@ -1656,12 +1638,11 @@ interface UpdatePoolStatusRequestPoolSelectorOneOf {
1656
1638
  byProgramIdOptions?: ByProgramIdOptions;
1657
1639
  }
1658
1640
  declare enum PoolSelectorType {
1659
- UNKNOWN_SELECTOR = "UNKNOWN_SELECTOR",
1660
1641
  BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID = "BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID",
1661
1642
  BY_PROGRAM_ID = "BY_PROGRAM_ID"
1662
1643
  }
1663
1644
  /** @enumType */
1664
- type PoolSelectorTypeWithLiterals = PoolSelectorType | 'UNKNOWN_SELECTOR' | 'BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID' | 'BY_PROGRAM_ID';
1645
+ type PoolSelectorTypeWithLiterals = PoolSelectorType | 'BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID' | 'BY_PROGRAM_ID';
1665
1646
  interface ByPoolDefinitionIdAndProgramDefinitionIdOptions {
1666
1647
  /**
1667
1648
  * Pool definition id
@@ -2219,9 +2200,11 @@ type PoolQuery = {
2219
2200
  }[];
2220
2201
  };
2221
2202
  declare const utils: {
2222
- QueryBuilder: () => _wix_sdk_types.QueryBuilder<Pool, PoolQuerySpec, PoolQuery>;
2223
- Filter: _wix_sdk_types.FilterFactory<Pool, PoolQuerySpec>;
2224
- Sort: _wix_sdk_types.SortFactory<PoolQuerySpec>;
2203
+ query: {
2204
+ QueryBuilder: () => _wix_sdk_types.QueryBuilder<Pool, PoolQuerySpec, PoolQuery>;
2205
+ Filter: _wix_sdk_types.FilterFactory<Pool, PoolQuerySpec>;
2206
+ Sort: _wix_sdk_types.SortFactory<PoolQuerySpec>;
2207
+ };
2225
2208
  };
2226
2209
  /**
2227
2210
  * Redeems a specified benefit.
@@ -545,7 +545,6 @@ function checkEligibilityByFilter(payload) {
545
545
  var import_transform_paths2 = require("@wix/sdk-runtime/transformations/transform-paths");
546
546
  var import_query_builder_utils = require("@wix/sdk-runtime/query-builder-utils");
547
547
  var PoolStatus = /* @__PURE__ */ ((PoolStatus2) => {
548
- PoolStatus2["UNDEFINED"] = "UNDEFINED";
549
548
  PoolStatus2["ACTIVE"] = "ACTIVE";
550
549
  PoolStatus2["PAUSED"] = "PAUSED";
551
550
  PoolStatus2["ENDED"] = "ENDED";
@@ -562,7 +561,6 @@ var IdentityType = /* @__PURE__ */ ((IdentityType2) => {
562
561
  return IdentityType2;
563
562
  })(IdentityType || {});
564
563
  var PolicyExpressionType = /* @__PURE__ */ ((PolicyExpressionType2) => {
565
- PolicyExpressionType2["UNKNOWN"] = "UNKNOWN";
566
564
  PolicyExpressionType2["OPERATOR_NOT"] = "OPERATOR_NOT";
567
565
  PolicyExpressionType2["OPERATOR_AND"] = "OPERATOR_AND";
568
566
  PolicyExpressionType2["OPERATOR_OR"] = "OPERATOR_OR";
@@ -570,7 +568,6 @@ var PolicyExpressionType = /* @__PURE__ */ ((PolicyExpressionType2) => {
570
568
  return PolicyExpressionType2;
571
569
  })(PolicyExpressionType || {});
572
570
  var Type = /* @__PURE__ */ ((Type2) => {
573
- Type2["UNKNOWN"] = "UNKNOWN";
574
571
  Type2["FIXED_INTERVAL"] = "FIXED_INTERVAL";
575
572
  Type2["RATE_LIMITED"] = "RATE_LIMITED";
576
573
  Type2["CUSTOM"] = "CUSTOM";
@@ -588,20 +585,16 @@ var WeekDay = /* @__PURE__ */ ((WeekDay2) => {
588
585
  return WeekDay2;
589
586
  })(WeekDay || {});
590
587
  var TimePeriod = /* @__PURE__ */ ((TimePeriod2) => {
591
- TimePeriod2["UNKNOWN_TIME_PERIOD"] = "UNKNOWN_TIME_PERIOD";
592
588
  TimePeriod2["DAY"] = "DAY";
593
- TimePeriod2["WEEK"] = "WEEK";
594
589
  TimePeriod2["MONTH"] = "MONTH";
595
590
  return TimePeriod2;
596
591
  })(TimePeriod || {});
597
592
  var PoolOrigin = /* @__PURE__ */ ((PoolOrigin2) => {
598
- PoolOrigin2["UNKNOWN"] = "UNKNOWN";
599
593
  PoolOrigin2["PROVISION"] = "PROVISION";
600
594
  PoolOrigin2["CASCADE"] = "CASCADE";
601
595
  return PoolOrigin2;
602
596
  })(PoolOrigin || {});
603
597
  var PoolRenewalActionType = /* @__PURE__ */ ((PoolRenewalActionType2) => {
604
- PoolRenewalActionType2["UNDEFINED"] = "UNDEFINED";
605
598
  PoolRenewalActionType2["END"] = "END";
606
599
  PoolRenewalActionType2["UPDATE"] = "UPDATE";
607
600
  return PoolRenewalActionType2;
@@ -612,7 +605,6 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
612
605
  return SortOrder2;
613
606
  })(SortOrder || {});
614
607
  var BenefitResultType = /* @__PURE__ */ ((BenefitResultType2) => {
615
- BenefitResultType2["UNKNOWN"] = "UNKNOWN";
616
608
  BenefitResultType2["ELIGIBLE_BENEFIT"] = "ELIGIBLE_BENEFIT";
617
609
  BenefitResultType2["NOT_ENOUGH_BALANCE"] = "NOT_ENOUGH_BALANCE";
618
610
  BenefitResultType2["POOL_NOT_ACTIVE"] = "POOL_NOT_ACTIVE";
@@ -621,18 +613,15 @@ var BenefitResultType = /* @__PURE__ */ ((BenefitResultType2) => {
621
613
  return BenefitResultType2;
622
614
  })(BenefitResultType || {});
623
615
  var ListPoolsRequestType = /* @__PURE__ */ ((ListPoolsRequestType2) => {
624
- ListPoolsRequestType2["UNKNOWN_FILTER"] = "UNKNOWN_FILTER";
625
616
  ListPoolsRequestType2["BY_ITEM_REFERENCE"] = "BY_ITEM_REFERENCE";
626
617
  return ListPoolsRequestType2;
627
618
  })(ListPoolsRequestType || {});
628
619
  var ProvisionPoolsForProgramResponseType = /* @__PURE__ */ ((ProvisionPoolsForProgramResponseType2) => {
629
- ProvisionPoolsForProgramResponseType2["UNKNOWN"] = "UNKNOWN";
630
620
  ProvisionPoolsForProgramResponseType2["SYNC"] = "SYNC";
631
621
  ProvisionPoolsForProgramResponseType2["ASYNC"] = "ASYNC";
632
622
  return ProvisionPoolsForProgramResponseType2;
633
623
  })(ProvisionPoolsForProgramResponseType || {});
634
624
  var PoolSelectorType = /* @__PURE__ */ ((PoolSelectorType2) => {
635
- PoolSelectorType2["UNKNOWN_SELECTOR"] = "UNKNOWN_SELECTOR";
636
625
  PoolSelectorType2["BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID"] = "BY_POOL_DEFINITION_ID_AND_PROGRAM_DEFINITION_ID";
637
626
  PoolSelectorType2["BY_PROGRAM_ID"] = "BY_PROGRAM_ID";
638
627
  return PoolSelectorType2;
@@ -766,7 +755,9 @@ async function typedQueryPools(query, options) {
766
755
  }
767
756
  }
768
757
  var utils = {
769
- ...(0, import_query_builder_utils.createQueryUtils)()
758
+ query: {
759
+ ...(0, import_query_builder_utils.createQueryUtils)()
760
+ }
770
761
  };
771
762
  async function redeemBenefit2(poolId, options) {
772
763
  const { httpClient, sideEffects } = arguments[2];