@wix/auto_sdk_benefit-programs_pool-definitions 1.0.40 → 1.0.42

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.
@@ -1,4 +1,4 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
1
+ import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types';
2
2
 
3
3
  interface PoolDefinition {
4
4
  /**
@@ -309,6 +309,12 @@ interface CreditConfiguration {
309
309
  * @maxLength 32
310
310
  */
311
311
  unitDisplayName?: string | null;
312
+ /**
313
+ * Credit unit type.
314
+ * @internal
315
+ * @maxLength 16
316
+ */
317
+ unitType?: string | null;
312
318
  }
313
319
  interface RolloverConfiguration {
314
320
  /** Whether unused credits roll over to a new cycle when a program renews. */
@@ -846,6 +852,23 @@ declare enum WebhookIdentityType {
846
852
  }
847
853
  /** @enumType */
848
854
  type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
855
+ interface AccountDetails {
856
+ /**
857
+ * ID of the account.
858
+ * @format GUID
859
+ */
860
+ accountId?: string | null;
861
+ /**
862
+ * ID of the parent account.
863
+ * @format GUID
864
+ */
865
+ parentAccountId?: string | null;
866
+ /**
867
+ * ID of the site, if applicable.
868
+ * @format GUID
869
+ */
870
+ siteId?: string | null;
871
+ }
849
872
  /** @docsIgnore */
850
873
  type UpdatePoolDefinitionValidationErrors = {
851
874
  ruleName?: 'cascade_is_required';
@@ -1161,7 +1184,70 @@ interface PoolDefinitionsQueryBuilder {
1161
1184
  * @fqn wix.benefit_programs.v1.pool_definition.PoolDefinitionService.QueryPoolDefinitions
1162
1185
  * @requiredField query
1163
1186
  */
1164
- declare function typedQueryPoolDefinitions(query: CursorQuery, options?: QueryPoolDefinitionsOptions): Promise<NonNullablePaths<QueryPoolDefinitionsResponse, `poolDefinitions` | `poolDefinitions.${number}.displayName` | `poolDefinitions.${number}.details.creditConfiguration.amount`, 6>>;
1187
+ declare function typedQueryPoolDefinitions(query: PoolDefinitionQuery, options?: QueryPoolDefinitionsOptions): Promise<NonNullablePaths<QueryPoolDefinitionsResponse, `poolDefinitions` | `poolDefinitions.${number}.displayName` | `poolDefinitions.${number}.details.creditConfiguration.amount`, 6>>;
1188
+ interface PoolDefinitionQuerySpec extends QuerySpec {
1189
+ paging: 'cursor';
1190
+ wql: [
1191
+ {
1192
+ fields: [
1193
+ 'details.benefits.itemSetId',
1194
+ 'details.benefits.providerAppId',
1195
+ 'programDefinitionIds'
1196
+ ];
1197
+ operators: ['$hasAll', '$hasSome'];
1198
+ sort: 'BOTH';
1199
+ },
1200
+ {
1201
+ fields: ['_createdDate', '_id', 'namespace'];
1202
+ operators: '*';
1203
+ sort: 'BOTH';
1204
+ }
1205
+ ];
1206
+ }
1207
+ type CommonQueryWithEntityContext = Query<PoolDefinition, PoolDefinitionQuerySpec>;
1208
+ type PoolDefinitionQuery = {
1209
+ /**
1210
+ 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`.
1211
+ */
1212
+ cursorPaging?: {
1213
+ /**
1214
+ Maximum number of items to return.
1215
+ @max: 100
1216
+ */
1217
+ limit?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit'] | null;
1218
+ /**
1219
+ Pointer to the next or previous page in the list of results.
1220
+
1221
+ Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
1222
+ Not relevant for the first request.
1223
+ @maxLength: 16000
1224
+ */
1225
+ cursor?: NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor'] | null;
1226
+ };
1227
+ /**
1228
+ Filter object.
1229
+ See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language)
1230
+ for more information.
1231
+ */
1232
+ filter?: CommonQueryWithEntityContext['filter'] | null;
1233
+ /**
1234
+ List of sort objects.
1235
+ @maxSize: 5
1236
+ */
1237
+ sort?: {
1238
+ /**
1239
+ Field to sort by.
1240
+ @maxLength: 512
1241
+ */
1242
+ fieldName?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['fieldName'];
1243
+ /**
1244
+ Sort order. Use `ASC` for ascending order or `DESC` for descending order.
1245
+
1246
+ Default: `ASC`
1247
+ */
1248
+ order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];
1249
+ }[];
1250
+ };
1165
1251
  /**
1166
1252
  * Adds a pool definition to a program definition.
1167
1253
  *
@@ -1235,4 +1321,4 @@ interface FindPoolDefinitionsByProgramDefinitionOptions {
1235
1321
  namespace: string;
1236
1322
  }
1237
1323
 
1238
- export { 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 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 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 PoolDefinitionRemovedFromProgramDefinition, 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 };
1324
+ export { type AccountDetails, 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 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 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 };