@wix/auto_sdk_benefit-programs_pools 1.0.76 → 1.0.77
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.
- package/build/cjs/index.js +3 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +4 -12
- package/build/cjs/index.typings.js +2 -3
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +1 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.js +18 -18
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.mjs +3 -4
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +4 -12
- package/build/es/index.typings.mjs +2 -3
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +1 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.mjs +18 -18
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.js +3 -4
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +138 -12
- package/build/internal/cjs/index.typings.js +2 -3
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +239 -0
- package/build/internal/cjs/meta.js +1 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.js +18 -18
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.mjs +3 -4
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +138 -12
- package/build/internal/es/index.typings.mjs +2 -3
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +239 -0
- package/build/internal/es/meta.mjs +1 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.mjs +18 -18
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -102,6 +102,37 @@ interface Pool {
|
|
|
102
102
|
* @readonly
|
|
103
103
|
*/
|
|
104
104
|
renewalCount?: number | null;
|
|
105
|
+
/**
|
|
106
|
+
* Previous status of the benefit pool.
|
|
107
|
+
* @internal
|
|
108
|
+
* @readonly
|
|
109
|
+
*/
|
|
110
|
+
previousStatus?: PoolStatusWithLiterals;
|
|
111
|
+
/**
|
|
112
|
+
* Origin of the benefit pool.
|
|
113
|
+
* @internal
|
|
114
|
+
* @readonly
|
|
115
|
+
* @immutable
|
|
116
|
+
*/
|
|
117
|
+
origin?: PoolOriginWithLiterals;
|
|
118
|
+
/**
|
|
119
|
+
* Action to be performed on pool renewal
|
|
120
|
+
* @internal
|
|
121
|
+
* @readonly
|
|
122
|
+
*/
|
|
123
|
+
renewalAction?: PoolRenewalAction;
|
|
124
|
+
/**
|
|
125
|
+
* Pool description.
|
|
126
|
+
* @internal
|
|
127
|
+
* @maxLength 450
|
|
128
|
+
*/
|
|
129
|
+
description?: string | null;
|
|
130
|
+
/**
|
|
131
|
+
* Monotonic counter incremented on every change, including system/materialization updates that do not bump revision.
|
|
132
|
+
* @internal
|
|
133
|
+
* @readonly
|
|
134
|
+
*/
|
|
135
|
+
changesCounter?: string | null;
|
|
105
136
|
}
|
|
106
137
|
declare enum PoolStatus {
|
|
107
138
|
/** Pool is active. */
|
|
@@ -135,6 +166,12 @@ interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
|
135
166
|
* @format GUID
|
|
136
167
|
*/
|
|
137
168
|
wixUserId?: string;
|
|
169
|
+
/**
|
|
170
|
+
* Identity type.
|
|
171
|
+
* @internal
|
|
172
|
+
* @readonly
|
|
173
|
+
*/
|
|
174
|
+
identityType?: IdentityTypeWithLiterals;
|
|
138
175
|
}
|
|
139
176
|
/** @oneof */
|
|
140
177
|
interface CommonIdentificationDataIdOneOf {
|
|
@@ -178,6 +215,19 @@ interface Details {
|
|
|
178
215
|
* If this object is empty, you can't set a price for the benefit.
|
|
179
216
|
*/
|
|
180
217
|
creditConfiguration?: CreditConfiguration;
|
|
218
|
+
/**
|
|
219
|
+
* Defines when benefits can be redeemed.
|
|
220
|
+
*
|
|
221
|
+
* Benefit redemption can be limited by:
|
|
222
|
+
* - **Fixed intervals**: Benefits can be redeemed during specific times of the day or week.
|
|
223
|
+
* - **Rate limited**: Up to a maximum amount of benefits can be redeemed in a specified time period.
|
|
224
|
+
*
|
|
225
|
+
* Expressions can be combined using the *not*, *and*, and *or* operators.
|
|
226
|
+
*
|
|
227
|
+
* Each benefit can override this policy.
|
|
228
|
+
* @internal
|
|
229
|
+
*/
|
|
230
|
+
policyExpression?: PolicyExpression;
|
|
181
231
|
/** Additional information relating to this object. */
|
|
182
232
|
additionalData?: Record<string, any> | null;
|
|
183
233
|
}
|
|
@@ -201,6 +251,11 @@ interface Benefit {
|
|
|
201
251
|
* @decimalValue options { gte:0, maxScale:4 }
|
|
202
252
|
*/
|
|
203
253
|
price?: string | null;
|
|
254
|
+
/**
|
|
255
|
+
* Overrides the default policy expression in `benefit.details`.
|
|
256
|
+
* @internal
|
|
257
|
+
*/
|
|
258
|
+
policyExpression?: PolicyExpression;
|
|
204
259
|
/** Additional information for this benefit. */
|
|
205
260
|
additionalData?: Record<string, any> | null;
|
|
206
261
|
/**
|
|
@@ -408,6 +463,12 @@ interface CreditConfiguration {
|
|
|
408
463
|
* @maxLength 32
|
|
409
464
|
*/
|
|
410
465
|
unitDisplayName?: string | null;
|
|
466
|
+
/**
|
|
467
|
+
* Credit unit type.
|
|
468
|
+
* @internal
|
|
469
|
+
* @maxLength 16
|
|
470
|
+
*/
|
|
471
|
+
unitType?: string | null;
|
|
411
472
|
}
|
|
412
473
|
interface RolloverConfiguration {
|
|
413
474
|
/** Whether unused credits roll over to a new cycle when a program renews. */
|
|
@@ -713,6 +774,11 @@ interface GetPoolResponse {
|
|
|
713
774
|
interface UpdatePoolRequest {
|
|
714
775
|
/** Pool to update. */
|
|
715
776
|
pool: Pool;
|
|
777
|
+
/**
|
|
778
|
+
* Explicit list of fields to update.
|
|
779
|
+
* @internal
|
|
780
|
+
*/
|
|
781
|
+
fieldMask?: string[];
|
|
716
782
|
}
|
|
717
783
|
interface UpdatePoolResponse {
|
|
718
784
|
/** Updated pool. */
|
|
@@ -730,6 +796,11 @@ interface DeletePoolResponse {
|
|
|
730
796
|
interface QueryPoolsRequest {
|
|
731
797
|
/** Filter, sort, and paging to apply to the query. */
|
|
732
798
|
query?: CursorQuery;
|
|
799
|
+
/**
|
|
800
|
+
* If true, the response will reflect a consistent snapshot of the data as of the time the request was received.
|
|
801
|
+
* @internal
|
|
802
|
+
*/
|
|
803
|
+
consistent?: boolean | null;
|
|
733
804
|
}
|
|
734
805
|
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
735
806
|
/** 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`. */
|
|
@@ -763,6 +834,20 @@ interface Sorting {
|
|
|
763
834
|
* Default: `ASC`
|
|
764
835
|
*/
|
|
765
836
|
order?: SortOrderWithLiterals;
|
|
837
|
+
/**
|
|
838
|
+
* When `field_name` is a property of repeated field that is marked as `MATCH_ITEMS` and sort should be done by
|
|
839
|
+
* a specific element from a collection, filter can/should be provided to ensure correct sort value is picked.
|
|
840
|
+
*
|
|
841
|
+
* If multiple filters are provided, they are combined with AND operator.
|
|
842
|
+
*
|
|
843
|
+
* Example:
|
|
844
|
+
* Given we have document like {"id": "1", "nestedField": [{"price": 10, "region": "EU"}, {"price": 20, "region": "US"}]}
|
|
845
|
+
* and `nestedField` is marked as `MATCH_ITEMS`, to ensure that sorting is done by correct region, filter should be
|
|
846
|
+
* { fieldName: "nestedField.price", "select_items_by": [{"nestedField.region": "US"}] }
|
|
847
|
+
* @internal
|
|
848
|
+
* @maxSize 10
|
|
849
|
+
*/
|
|
850
|
+
selectItemsBy?: Record<string, any>[] | null;
|
|
766
851
|
}
|
|
767
852
|
declare enum SortOrder {
|
|
768
853
|
/** Ascending sort order. */
|
|
@@ -884,6 +969,26 @@ interface NotEnoughBalance {
|
|
|
884
969
|
* @decimalValue options { maxScale:4 }
|
|
885
970
|
*/
|
|
886
971
|
requestedBalance?: string;
|
|
972
|
+
/**
|
|
973
|
+
* Pool information.
|
|
974
|
+
* @internal
|
|
975
|
+
*/
|
|
976
|
+
poolInfo?: PoolInfo;
|
|
977
|
+
/**
|
|
978
|
+
* Program definition information.
|
|
979
|
+
* @internal
|
|
980
|
+
*/
|
|
981
|
+
programDefinitionInfo?: ProgramDefinitionInfo;
|
|
982
|
+
/**
|
|
983
|
+
* Program information.
|
|
984
|
+
* @internal
|
|
985
|
+
*/
|
|
986
|
+
programInfo?: PoolProgramInfo;
|
|
987
|
+
/**
|
|
988
|
+
* Benefit information.
|
|
989
|
+
* @internal
|
|
990
|
+
*/
|
|
991
|
+
benefitInfo?: BenefitInfo;
|
|
887
992
|
}
|
|
888
993
|
interface PoolInfo {
|
|
889
994
|
/** Current pool balance */
|
|
@@ -908,6 +1013,12 @@ interface PoolInfo {
|
|
|
908
1013
|
* @format GUID
|
|
909
1014
|
*/
|
|
910
1015
|
poolDefinitionId?: string;
|
|
1016
|
+
/**
|
|
1017
|
+
* Credit unit type.
|
|
1018
|
+
* @internal
|
|
1019
|
+
* @maxLength 16
|
|
1020
|
+
*/
|
|
1021
|
+
creditUnitType?: string | null;
|
|
911
1022
|
}
|
|
912
1023
|
interface BalanceAmount {
|
|
913
1024
|
/**
|
|
@@ -939,6 +1050,12 @@ interface BenefitInfo {
|
|
|
939
1050
|
* @maxLength 64
|
|
940
1051
|
*/
|
|
941
1052
|
benefitKey?: string;
|
|
1053
|
+
/**
|
|
1054
|
+
* Price of the benefit in credits.
|
|
1055
|
+
* @internal
|
|
1056
|
+
* @decimalValue options { gte:0, maxScale:4 }
|
|
1057
|
+
*/
|
|
1058
|
+
price?: string | null;
|
|
942
1059
|
}
|
|
943
1060
|
interface PolicyExpressionEvaluatedToFalse {
|
|
944
1061
|
/**
|
|
@@ -953,6 +1070,26 @@ interface PolicyExpressionEvaluatedToFalse {
|
|
|
953
1070
|
* @maxSize 10
|
|
954
1071
|
*/
|
|
955
1072
|
failureDetails?: FailureDetails[];
|
|
1073
|
+
/**
|
|
1074
|
+
* Pool information.
|
|
1075
|
+
* @internal
|
|
1076
|
+
*/
|
|
1077
|
+
poolInfo?: PoolInfo;
|
|
1078
|
+
/**
|
|
1079
|
+
* Program definition information.
|
|
1080
|
+
* @internal
|
|
1081
|
+
*/
|
|
1082
|
+
programDefinitionInfo?: ProgramDefinitionInfo;
|
|
1083
|
+
/**
|
|
1084
|
+
* Program information.
|
|
1085
|
+
* @internal
|
|
1086
|
+
*/
|
|
1087
|
+
programInfo?: PoolProgramInfo;
|
|
1088
|
+
/**
|
|
1089
|
+
* Benefit information.
|
|
1090
|
+
* @internal
|
|
1091
|
+
*/
|
|
1092
|
+
benefitInfo?: BenefitInfo;
|
|
956
1093
|
}
|
|
957
1094
|
interface FailureDetails {
|
|
958
1095
|
/**
|
|
@@ -987,6 +1124,26 @@ interface PoolNotActive {
|
|
|
987
1124
|
poolId?: string;
|
|
988
1125
|
/** Pool status. */
|
|
989
1126
|
poolStatus?: PoolStatusWithLiterals;
|
|
1127
|
+
/**
|
|
1128
|
+
* Pool information.
|
|
1129
|
+
* @internal
|
|
1130
|
+
*/
|
|
1131
|
+
poolInfo?: PoolInfo;
|
|
1132
|
+
/**
|
|
1133
|
+
* Program definition information.
|
|
1134
|
+
* @internal
|
|
1135
|
+
*/
|
|
1136
|
+
programDefinitionInfo?: ProgramDefinitionInfo;
|
|
1137
|
+
/**
|
|
1138
|
+
* Program information.
|
|
1139
|
+
* @internal
|
|
1140
|
+
*/
|
|
1141
|
+
programInfo?: PoolProgramInfo;
|
|
1142
|
+
/**
|
|
1143
|
+
* Benefit information.
|
|
1144
|
+
* @internal
|
|
1145
|
+
*/
|
|
1146
|
+
benefitInfo?: BenefitInfo;
|
|
990
1147
|
}
|
|
991
1148
|
interface PoolNotFound {
|
|
992
1149
|
/**
|
|
@@ -1018,6 +1175,21 @@ interface BenefitNotFound {
|
|
|
1018
1175
|
* @maxLength 64
|
|
1019
1176
|
*/
|
|
1020
1177
|
benefitKey?: string | null;
|
|
1178
|
+
/**
|
|
1179
|
+
* Pool information.
|
|
1180
|
+
* @internal
|
|
1181
|
+
*/
|
|
1182
|
+
poolInfo?: PoolInfo;
|
|
1183
|
+
/**
|
|
1184
|
+
* Program definition information.
|
|
1185
|
+
* @internal
|
|
1186
|
+
*/
|
|
1187
|
+
programDefinitionInfo?: ProgramDefinitionInfo;
|
|
1188
|
+
/**
|
|
1189
|
+
* Program information.
|
|
1190
|
+
* @internal
|
|
1191
|
+
*/
|
|
1192
|
+
programInfo?: PoolProgramInfo;
|
|
1021
1193
|
}
|
|
1022
1194
|
interface ReserveBenefitRequest {
|
|
1023
1195
|
/**
|
|
@@ -1157,6 +1329,11 @@ declare enum BenefitResultType {
|
|
|
1157
1329
|
ELIGIBLE_BENEFIT = "ELIGIBLE_BENEFIT",
|
|
1158
1330
|
/** Balance is lower than the cost of redeeming the items. */
|
|
1159
1331
|
NOT_ENOUGH_BALANCE = "NOT_ENOUGH_BALANCE",
|
|
1332
|
+
/**
|
|
1333
|
+
* Policy is false.
|
|
1334
|
+
* @internal
|
|
1335
|
+
*/
|
|
1336
|
+
POLICY_EXPRESSION_EVALUATED_TO_FALSE = "POLICY_EXPRESSION_EVALUATED_TO_FALSE",
|
|
1160
1337
|
/** Pool isn't active. */
|
|
1161
1338
|
POOL_NOT_ACTIVE = "POOL_NOT_ACTIVE",
|
|
1162
1339
|
/** Invalid benefit details provided. */
|
|
@@ -1185,6 +1362,26 @@ interface EligibleBenefit {
|
|
|
1185
1362
|
* @decimalValue options { gte:0, maxScale:4 }
|
|
1186
1363
|
*/
|
|
1187
1364
|
price?: string | null;
|
|
1365
|
+
/**
|
|
1366
|
+
* Pool information.
|
|
1367
|
+
* @internal
|
|
1368
|
+
*/
|
|
1369
|
+
poolInfo?: PoolInfo;
|
|
1370
|
+
/**
|
|
1371
|
+
* Benefit information.
|
|
1372
|
+
* @internal
|
|
1373
|
+
*/
|
|
1374
|
+
benefitInfo?: BenefitInfo;
|
|
1375
|
+
/**
|
|
1376
|
+
* Program definition information.
|
|
1377
|
+
* @internal
|
|
1378
|
+
*/
|
|
1379
|
+
programDefinitionInfo?: ProgramDefinitionInfo;
|
|
1380
|
+
/**
|
|
1381
|
+
* Program information.
|
|
1382
|
+
* @internal
|
|
1383
|
+
*/
|
|
1384
|
+
programInfo?: PoolProgramInfo;
|
|
1188
1385
|
}
|
|
1189
1386
|
interface BenefitResult extends BenefitResultResultOneOf {
|
|
1190
1387
|
/** Returned when item is eligible to be redeemed. */
|
|
@@ -1667,8 +1864,18 @@ interface DomainEventBodyOneOf {
|
|
|
1667
1864
|
}
|
|
1668
1865
|
interface EntityCreatedEvent {
|
|
1669
1866
|
entityAsJson?: string;
|
|
1867
|
+
/**
|
|
1868
|
+
* Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
|
|
1869
|
+
* @internal
|
|
1870
|
+
*/
|
|
1871
|
+
triggeredByUndelete?: boolean | null;
|
|
1670
1872
|
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
1671
1873
|
restoreInfo?: RestoreInfo;
|
|
1874
|
+
/**
|
|
1875
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
1876
|
+
* @internal
|
|
1877
|
+
*/
|
|
1878
|
+
additionalMetadataAsJson?: string | null;
|
|
1672
1879
|
}
|
|
1673
1880
|
interface RestoreInfo {
|
|
1674
1881
|
deletedDate?: Date | null;
|
|
@@ -1680,10 +1887,42 @@ interface EntityUpdatedEvent {
|
|
|
1680
1887
|
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1681
1888
|
*/
|
|
1682
1889
|
currentEntityAsJson?: string;
|
|
1890
|
+
/**
|
|
1891
|
+
* This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
|
|
1892
|
+
* wont populate it / have any reference to it in the API.
|
|
1893
|
+
* The main reason for it is that fetching the old entity from the DB will have a performance hit on an update operation so unless truly needed,
|
|
1894
|
+
* the developer should send only the new (current) entity.
|
|
1895
|
+
* An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
|
|
1896
|
+
* Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
|
|
1897
|
+
* @internal
|
|
1898
|
+
* @deprecated
|
|
1899
|
+
*/
|
|
1900
|
+
previousEntityAsJson?: string | null;
|
|
1901
|
+
/**
|
|
1902
|
+
* Map of fully qualified field paths to their previous values for fields that changed.
|
|
1903
|
+
* For more details please see [AIP](https://dev.wix.com/docs/rnd-general/articles/p13n-guidelines-aips/guidance-aips/design-patterns/7016-events#modified-fields-format)
|
|
1904
|
+
* @internal
|
|
1905
|
+
*/
|
|
1906
|
+
modifiedFields?: Record<string, any>;
|
|
1907
|
+
/**
|
|
1908
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
1909
|
+
* @internal
|
|
1910
|
+
*/
|
|
1911
|
+
additionalMetadataAsJson?: string | null;
|
|
1683
1912
|
}
|
|
1684
1913
|
interface EntityDeletedEvent {
|
|
1914
|
+
/**
|
|
1915
|
+
* Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
|
|
1916
|
+
* @internal
|
|
1917
|
+
*/
|
|
1918
|
+
movedToTrash?: boolean | null;
|
|
1685
1919
|
/** Entity that was deleted. */
|
|
1686
1920
|
deletedEntityAsJson?: string | null;
|
|
1921
|
+
/**
|
|
1922
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
1923
|
+
* @internal
|
|
1924
|
+
*/
|
|
1925
|
+
additionalMetadataAsJson?: string | null;
|
|
1687
1926
|
}
|
|
1688
1927
|
interface ActionEvent {
|
|
1689
1928
|
bodyAsJson?: string;
|
|
@@ -550,6 +550,7 @@ var SortOrder = /* @__PURE__ */ ((SortOrder2) => {
|
|
|
550
550
|
var BenefitResultType = /* @__PURE__ */ ((BenefitResultType2) => {
|
|
551
551
|
BenefitResultType2["ELIGIBLE_BENEFIT"] = "ELIGIBLE_BENEFIT";
|
|
552
552
|
BenefitResultType2["NOT_ENOUGH_BALANCE"] = "NOT_ENOUGH_BALANCE";
|
|
553
|
+
BenefitResultType2["POLICY_EXPRESSION_EVALUATED_TO_FALSE"] = "POLICY_EXPRESSION_EVALUATED_TO_FALSE";
|
|
553
554
|
BenefitResultType2["POOL_NOT_ACTIVE"] = "POOL_NOT_ACTIVE";
|
|
554
555
|
BenefitResultType2["BENEFIT_NOT_FOUND"] = "BENEFIT_NOT_FOUND";
|
|
555
556
|
BenefitResultType2["POOL_NOT_FOUND"] = "POOL_NOT_FOUND";
|