@wix/auto_sdk_benefit-programs_pool-definitions 1.0.66 → 1.0.68
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 +2 -4
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +5 -9
- package/build/cjs/index.typings.js +1 -3
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.mjs +2 -4
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +5 -9
- package/build/es/index.typings.mjs +1 -3
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +94 -9
- package/build/internal/cjs/meta.d.ts +122 -0
- package/build/internal/es/index.typings.d.mts +94 -9
- package/build/internal/es/meta.d.mts +122 -0
- package/package.json +5 -12
- package/build/cjs/schemas.d.ts +0 -700
- package/build/cjs/schemas.js +0 -1439
- package/build/cjs/schemas.js.map +0 -1
- package/build/es/schemas.d.mts +0 -700
- package/build/es/schemas.mjs +0 -1381
- package/build/es/schemas.mjs.map +0 -1
- package/build/internal/cjs/index.js +0 -1140
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.js +0 -1016
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.js +0 -836
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/schemas.d.ts +0 -700
- package/build/internal/cjs/schemas.js +0 -1439
- package/build/internal/cjs/schemas.js.map +0 -1
- package/build/internal/es/index.mjs +0 -1098
- package/build/internal/es/index.mjs.map +0 -1
- package/build/internal/es/index.typings.mjs +0 -973
- package/build/internal/es/index.typings.mjs.map +0 -1
- package/build/internal/es/meta.mjs +0 -792
- package/build/internal/es/meta.mjs.map +0 -1
- package/build/internal/es/schemas.d.mts +0 -700
- package/build/internal/es/schemas.mjs +0 -1381
- package/build/internal/es/schemas.mjs.map +0 -1
- package/schemas/package.json +0 -3
|
@@ -60,6 +60,18 @@ interface PoolDefinition {
|
|
|
60
60
|
* @maxSize 20
|
|
61
61
|
*/
|
|
62
62
|
programDefinitions?: ProgramDefinitionInfo[];
|
|
63
|
+
/**
|
|
64
|
+
* Pool description.
|
|
65
|
+
* @internal
|
|
66
|
+
* @maxLength 450
|
|
67
|
+
*/
|
|
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;
|
|
63
75
|
}
|
|
64
76
|
interface Details {
|
|
65
77
|
/**
|
|
@@ -73,6 +85,19 @@ interface Details {
|
|
|
73
85
|
* If this object is empty, you can't set a price for the benefit.
|
|
74
86
|
*/
|
|
75
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;
|
|
76
101
|
/** Additional information relating to this object. */
|
|
77
102
|
additionalData?: Record<string, any> | null;
|
|
78
103
|
}
|
|
@@ -96,6 +121,11 @@ interface Benefit {
|
|
|
96
121
|
* @decimalValue options { gte:0, maxScale:4 }
|
|
97
122
|
*/
|
|
98
123
|
price?: string | null;
|
|
124
|
+
/**
|
|
125
|
+
* Overrides the default policy expression in `benefit.details`.
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
policyExpression?: PolicyExpression;
|
|
99
129
|
/** Additional information for this benefit. */
|
|
100
130
|
additionalData?: Record<string, any> | null;
|
|
101
131
|
/**
|
|
@@ -303,6 +333,12 @@ interface CreditConfiguration {
|
|
|
303
333
|
* @maxLength 32
|
|
304
334
|
*/
|
|
305
335
|
unitDisplayName?: string | null;
|
|
336
|
+
/**
|
|
337
|
+
* Credit unit type.
|
|
338
|
+
* @internal
|
|
339
|
+
* @maxLength 16
|
|
340
|
+
*/
|
|
341
|
+
unitType?: string | null;
|
|
306
342
|
}
|
|
307
343
|
interface RolloverConfiguration {
|
|
308
344
|
/** Whether unused credits roll over to a new cycle when a program renews. */
|
|
@@ -337,6 +373,18 @@ interface ProgramDefinitionInfo {
|
|
|
337
373
|
* @readonly
|
|
338
374
|
*/
|
|
339
375
|
externalId?: string | null;
|
|
376
|
+
/**
|
|
377
|
+
* Program definition name.
|
|
378
|
+
* @internal
|
|
379
|
+
* @maxLength 64
|
|
380
|
+
*/
|
|
381
|
+
displayName?: string | null;
|
|
382
|
+
/**
|
|
383
|
+
* Program definition description.
|
|
384
|
+
* @internal
|
|
385
|
+
* @maxLength 450
|
|
386
|
+
*/
|
|
387
|
+
description?: string | null;
|
|
340
388
|
}
|
|
341
389
|
interface PoolDefinitionAddedToProgramDefinition {
|
|
342
390
|
/** PoolDefinition that was added to the program definition */
|
|
@@ -489,6 +537,11 @@ interface BulkActionMetadata {
|
|
|
489
537
|
interface UpdatePoolDefinitionRequest {
|
|
490
538
|
/** Pool definition to update. */
|
|
491
539
|
poolDefinition: PoolDefinition;
|
|
540
|
+
/**
|
|
541
|
+
* Explicit list of fields to update.
|
|
542
|
+
* @internal
|
|
543
|
+
*/
|
|
544
|
+
fieldMask?: string[];
|
|
492
545
|
/** *Required.** Determines when the changes to this pool definition and program definitions containing it will be applied to associated programs and pools. */
|
|
493
546
|
cascade?: CascadeWithLiterals;
|
|
494
547
|
}
|
|
@@ -574,6 +627,19 @@ interface GetPoolDefinitionResponse {
|
|
|
574
627
|
interface QueryPoolDefinitionsRequest {
|
|
575
628
|
/** Filter, sort, and paging to apply to the query. */
|
|
576
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;
|
|
577
643
|
}
|
|
578
644
|
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
579
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`. */
|
|
@@ -607,6 +673,20 @@ interface Sorting {
|
|
|
607
673
|
* Default: `ASC`
|
|
608
674
|
*/
|
|
609
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;
|
|
610
690
|
}
|
|
611
691
|
declare enum SortOrder {
|
|
612
692
|
/** Ascending sort order. */
|
|
@@ -771,8 +851,18 @@ interface DomainEventBodyOneOf {
|
|
|
771
851
|
}
|
|
772
852
|
interface EntityCreatedEvent {
|
|
773
853
|
entityAsJson?: string;
|
|
854
|
+
/**
|
|
855
|
+
* Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
|
|
856
|
+
* @internal
|
|
857
|
+
*/
|
|
858
|
+
triggeredByUndelete?: boolean | null;
|
|
774
859
|
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
775
860
|
restoreInfo?: RestoreInfo;
|
|
861
|
+
/**
|
|
862
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
863
|
+
* @internal
|
|
864
|
+
*/
|
|
865
|
+
additionalMetadataAsJson?: string | null;
|
|
776
866
|
}
|
|
777
867
|
interface RestoreInfo {
|
|
778
868
|
deletedDate?: Date | null;
|
|
@@ -784,10 +874,42 @@ interface EntityUpdatedEvent {
|
|
|
784
874
|
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
785
875
|
*/
|
|
786
876
|
currentEntityAsJson?: string;
|
|
877
|
+
/**
|
|
878
|
+
* This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
|
|
879
|
+
* wont populate it / have any reference to it in the API.
|
|
880
|
+
* 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,
|
|
881
|
+
* the developer should send only the new (current) entity.
|
|
882
|
+
* An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
|
|
883
|
+
* Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
|
|
884
|
+
* @internal
|
|
885
|
+
* @deprecated
|
|
886
|
+
*/
|
|
887
|
+
previousEntityAsJson?: string | null;
|
|
888
|
+
/**
|
|
889
|
+
* Map of fully qualified field paths to their previous values for fields that changed.
|
|
890
|
+
* 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)
|
|
891
|
+
* @internal
|
|
892
|
+
*/
|
|
893
|
+
modifiedFields?: Record<string, any>;
|
|
894
|
+
/**
|
|
895
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
896
|
+
* @internal
|
|
897
|
+
*/
|
|
898
|
+
additionalMetadataAsJson?: string | null;
|
|
787
899
|
}
|
|
788
900
|
interface EntityDeletedEvent {
|
|
901
|
+
/**
|
|
902
|
+
* Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
|
|
903
|
+
* @internal
|
|
904
|
+
*/
|
|
905
|
+
movedToTrash?: boolean | null;
|
|
789
906
|
/** Entity that was deleted. */
|
|
790
907
|
deletedEntityAsJson?: string | null;
|
|
908
|
+
/**
|
|
909
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
910
|
+
* @internal
|
|
911
|
+
*/
|
|
912
|
+
additionalMetadataAsJson?: string | null;
|
|
791
913
|
}
|
|
792
914
|
interface ActionEvent {
|
|
793
915
|
bodyAsJson?: string;
|
|
@@ -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. */
|
|
@@ -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' | '
|
|
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' | '
|
|
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: '
|
|
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' | '
|
|
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.
|
|
@@ -60,6 +60,18 @@ interface PoolDefinition {
|
|
|
60
60
|
* @maxSize 20
|
|
61
61
|
*/
|
|
62
62
|
programDefinitions?: ProgramDefinitionInfo[];
|
|
63
|
+
/**
|
|
64
|
+
* Pool description.
|
|
65
|
+
* @internal
|
|
66
|
+
* @maxLength 450
|
|
67
|
+
*/
|
|
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;
|
|
63
75
|
}
|
|
64
76
|
interface Details {
|
|
65
77
|
/**
|
|
@@ -73,6 +85,19 @@ interface Details {
|
|
|
73
85
|
* If this object is empty, you can't set a price for the benefit.
|
|
74
86
|
*/
|
|
75
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;
|
|
76
101
|
/** Additional information relating to this object. */
|
|
77
102
|
additionalData?: Record<string, any> | null;
|
|
78
103
|
}
|
|
@@ -96,6 +121,11 @@ interface Benefit {
|
|
|
96
121
|
* @decimalValue options { gte:0, maxScale:4 }
|
|
97
122
|
*/
|
|
98
123
|
price?: string | null;
|
|
124
|
+
/**
|
|
125
|
+
* Overrides the default policy expression in `benefit.details`.
|
|
126
|
+
* @internal
|
|
127
|
+
*/
|
|
128
|
+
policyExpression?: PolicyExpression;
|
|
99
129
|
/** Additional information for this benefit. */
|
|
100
130
|
additionalData?: Record<string, any> | null;
|
|
101
131
|
/**
|
|
@@ -303,6 +333,12 @@ interface CreditConfiguration {
|
|
|
303
333
|
* @maxLength 32
|
|
304
334
|
*/
|
|
305
335
|
unitDisplayName?: string | null;
|
|
336
|
+
/**
|
|
337
|
+
* Credit unit type.
|
|
338
|
+
* @internal
|
|
339
|
+
* @maxLength 16
|
|
340
|
+
*/
|
|
341
|
+
unitType?: string | null;
|
|
306
342
|
}
|
|
307
343
|
interface RolloverConfiguration {
|
|
308
344
|
/** Whether unused credits roll over to a new cycle when a program renews. */
|
|
@@ -337,6 +373,18 @@ interface ProgramDefinitionInfo {
|
|
|
337
373
|
* @readonly
|
|
338
374
|
*/
|
|
339
375
|
externalId?: string | null;
|
|
376
|
+
/**
|
|
377
|
+
* Program definition name.
|
|
378
|
+
* @internal
|
|
379
|
+
* @maxLength 64
|
|
380
|
+
*/
|
|
381
|
+
displayName?: string | null;
|
|
382
|
+
/**
|
|
383
|
+
* Program definition description.
|
|
384
|
+
* @internal
|
|
385
|
+
* @maxLength 450
|
|
386
|
+
*/
|
|
387
|
+
description?: string | null;
|
|
340
388
|
}
|
|
341
389
|
interface PoolDefinitionAddedToProgramDefinition {
|
|
342
390
|
/** PoolDefinition that was added to the program definition */
|
|
@@ -489,6 +537,11 @@ interface BulkActionMetadata {
|
|
|
489
537
|
interface UpdatePoolDefinitionRequest {
|
|
490
538
|
/** Pool definition to update. */
|
|
491
539
|
poolDefinition: PoolDefinition;
|
|
540
|
+
/**
|
|
541
|
+
* Explicit list of fields to update.
|
|
542
|
+
* @internal
|
|
543
|
+
*/
|
|
544
|
+
fieldMask?: string[];
|
|
492
545
|
/** *Required.** Determines when the changes to this pool definition and program definitions containing it will be applied to associated programs and pools. */
|
|
493
546
|
cascade?: CascadeWithLiterals;
|
|
494
547
|
}
|
|
@@ -574,6 +627,19 @@ interface GetPoolDefinitionResponse {
|
|
|
574
627
|
interface QueryPoolDefinitionsRequest {
|
|
575
628
|
/** Filter, sort, and paging to apply to the query. */
|
|
576
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;
|
|
577
643
|
}
|
|
578
644
|
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
579
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`. */
|
|
@@ -607,6 +673,20 @@ interface Sorting {
|
|
|
607
673
|
* Default: `ASC`
|
|
608
674
|
*/
|
|
609
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;
|
|
610
690
|
}
|
|
611
691
|
declare enum SortOrder {
|
|
612
692
|
/** Ascending sort order. */
|
|
@@ -771,8 +851,18 @@ interface DomainEventBodyOneOf {
|
|
|
771
851
|
}
|
|
772
852
|
interface EntityCreatedEvent {
|
|
773
853
|
entityAsJson?: string;
|
|
854
|
+
/**
|
|
855
|
+
* Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity
|
|
856
|
+
* @internal
|
|
857
|
+
*/
|
|
858
|
+
triggeredByUndelete?: boolean | null;
|
|
774
859
|
/** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
|
|
775
860
|
restoreInfo?: RestoreInfo;
|
|
861
|
+
/**
|
|
862
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
863
|
+
* @internal
|
|
864
|
+
*/
|
|
865
|
+
additionalMetadataAsJson?: string | null;
|
|
776
866
|
}
|
|
777
867
|
interface RestoreInfo {
|
|
778
868
|
deletedDate?: Date | null;
|
|
@@ -784,10 +874,42 @@ interface EntityUpdatedEvent {
|
|
|
784
874
|
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
785
875
|
*/
|
|
786
876
|
currentEntityAsJson?: string;
|
|
877
|
+
/**
|
|
878
|
+
* This field is currently part of the of the EntityUpdatedEvent msg, but scala/node libraries which implements the domain events standard
|
|
879
|
+
* wont populate it / have any reference to it in the API.
|
|
880
|
+
* 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,
|
|
881
|
+
* the developer should send only the new (current) entity.
|
|
882
|
+
* An additional reason is not wanting to send this additional entity over the wire (kafka) since in some cases it can be really big
|
|
883
|
+
* Developers that must reflect the old entity will have to implement their own domain event sender mechanism which will follow the DomainEvent proto message.
|
|
884
|
+
* @internal
|
|
885
|
+
* @deprecated
|
|
886
|
+
*/
|
|
887
|
+
previousEntityAsJson?: string | null;
|
|
888
|
+
/**
|
|
889
|
+
* Map of fully qualified field paths to their previous values for fields that changed.
|
|
890
|
+
* 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)
|
|
891
|
+
* @internal
|
|
892
|
+
*/
|
|
893
|
+
modifiedFields?: Record<string, any>;
|
|
894
|
+
/**
|
|
895
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
896
|
+
* @internal
|
|
897
|
+
*/
|
|
898
|
+
additionalMetadataAsJson?: string | null;
|
|
787
899
|
}
|
|
788
900
|
interface EntityDeletedEvent {
|
|
901
|
+
/**
|
|
902
|
+
* Indicates if the entity is sent to trash-bin. only available when trash-bin is enabled
|
|
903
|
+
* @internal
|
|
904
|
+
*/
|
|
905
|
+
movedToTrash?: boolean | null;
|
|
789
906
|
/** Entity that was deleted. */
|
|
790
907
|
deletedEntityAsJson?: string | null;
|
|
908
|
+
/**
|
|
909
|
+
* Optional domain-specific metadata defined by the API owner, encoded as JSON.
|
|
910
|
+
* @internal
|
|
911
|
+
*/
|
|
912
|
+
additionalMetadataAsJson?: string | null;
|
|
791
913
|
}
|
|
792
914
|
interface ActionEvent {
|
|
793
915
|
bodyAsJson?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto_sdk_benefit-programs_pool-definitions",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.68",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -21,23 +21,16 @@
|
|
|
21
21
|
"import": "./build/es/meta.mjs",
|
|
22
22
|
"require": "./build/cjs/meta.js",
|
|
23
23
|
"types": "./build/es/meta.d.mts"
|
|
24
|
-
},
|
|
25
|
-
"./schemas": {
|
|
26
|
-
"import": "./build/es/schemas.mjs",
|
|
27
|
-
"require": "./build/cjs/schemas.js",
|
|
28
|
-
"types": "./build/es/schemas.d.mts"
|
|
29
24
|
}
|
|
30
25
|
},
|
|
31
26
|
"files": [
|
|
32
27
|
"build",
|
|
33
28
|
"meta",
|
|
34
|
-
"service-plugins"
|
|
35
|
-
"schemas"
|
|
29
|
+
"service-plugins"
|
|
36
30
|
],
|
|
37
31
|
"dependencies": {
|
|
38
|
-
"@wix/sdk-runtime": "^1.0.
|
|
39
|
-
"@wix/sdk-types": "^1.17.
|
|
40
|
-
"zod": "^4.3.6"
|
|
32
|
+
"@wix/sdk-runtime": "^1.0.24",
|
|
33
|
+
"@wix/sdk-types": "^1.17.11"
|
|
41
34
|
},
|
|
42
35
|
"devDependencies": {
|
|
43
36
|
"tsup": "^8.4.0",
|
|
@@ -57,5 +50,5 @@
|
|
|
57
50
|
"fqdn": "wix.benefit_programs.v1.pool_definition"
|
|
58
51
|
}
|
|
59
52
|
},
|
|
60
|
-
"falconPackageHash": "
|
|
53
|
+
"falconPackageHash": "53267356a0579ba3c8a357a29ec2a9b1ec149d774ee91e2ded1c1b7a"
|
|
61
54
|
}
|