@wix/benefit-programs 1.0.0 → 1.0.2
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/package.json +7 -7
- package/type-bundles/context.bundle.d.ts +259 -119
- package/type-bundles/index.bundle.d.ts +186 -62
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/benefit-programs",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"type-bundles"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@wix/benefit-programs_balance": "1.0.
|
|
22
|
-
"@wix/benefit-programs_item": "1.0.
|
|
23
|
-
"@wix/benefit-programs_pool": "1.0.
|
|
24
|
-
"@wix/benefit-programs_pool-definition": "1.0.
|
|
25
|
-
"@wix/benefit-programs_transaction": "1.0.
|
|
21
|
+
"@wix/benefit-programs_balance": "1.0.1",
|
|
22
|
+
"@wix/benefit-programs_item": "1.0.1",
|
|
23
|
+
"@wix/benefit-programs_pool": "1.0.1",
|
|
24
|
+
"@wix/benefit-programs_pool-definition": "1.0.1",
|
|
25
|
+
"@wix/benefit-programs_transaction": "1.0.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"fqdn": ""
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
"falconPackageHash": "
|
|
50
|
+
"falconPackageHash": "25ad9b897065e76475f5cb0d380067dd80b46e8d23576d1accadec6a"
|
|
51
51
|
}
|
|
@@ -410,42 +410,42 @@ interface RevertBalanceChangeOptions {
|
|
|
410
410
|
instructingParty?: CommonIdentificationData$2;
|
|
411
411
|
}
|
|
412
412
|
|
|
413
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
414
|
-
interface HttpClient {
|
|
415
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
413
|
+
type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
|
|
414
|
+
interface HttpClient$4 {
|
|
415
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
|
|
416
416
|
}
|
|
417
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
418
|
-
type HttpResponse<T = any> = {
|
|
417
|
+
type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
|
|
418
|
+
type HttpResponse$4<T = any> = {
|
|
419
419
|
data: T;
|
|
420
420
|
status: number;
|
|
421
421
|
statusText: string;
|
|
422
422
|
headers: any;
|
|
423
423
|
request?: any;
|
|
424
424
|
};
|
|
425
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
425
|
+
type RequestOptions$4<_TResponse = any, Data = any> = {
|
|
426
426
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
427
427
|
url: string;
|
|
428
428
|
data?: Data;
|
|
429
429
|
params?: URLSearchParams;
|
|
430
|
-
} & APIMetadata;
|
|
431
|
-
type APIMetadata = {
|
|
430
|
+
} & APIMetadata$4;
|
|
431
|
+
type APIMetadata$4 = {
|
|
432
432
|
methodFqn?: string;
|
|
433
433
|
entityFqdn?: string;
|
|
434
434
|
packageName?: string;
|
|
435
435
|
};
|
|
436
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
437
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
436
|
+
type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
|
|
437
|
+
type EventDefinition$4<Payload = unknown, Type extends string = string> = {
|
|
438
438
|
__type: 'event-definition';
|
|
439
439
|
type: Type;
|
|
440
440
|
isDomainEvent?: boolean;
|
|
441
441
|
transformations?: unknown;
|
|
442
442
|
__payload: Payload;
|
|
443
443
|
};
|
|
444
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
445
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
446
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
444
|
+
declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
|
|
445
|
+
type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
|
|
446
|
+
type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
|
|
447
447
|
|
|
448
|
-
declare function getBalance$1(httpClient: HttpClient): (poolId: string) => Promise<Balance & {
|
|
448
|
+
declare function getBalance$1(httpClient: HttpClient$4): (poolId: string) => Promise<Balance & {
|
|
449
449
|
_id: string;
|
|
450
450
|
beneficiary?: {
|
|
451
451
|
anonymousVisitorId: string;
|
|
@@ -460,20 +460,20 @@ declare function getBalance$1(httpClient: HttpClient): (poolId: string) => Promi
|
|
|
460
460
|
_id: string;
|
|
461
461
|
} | undefined;
|
|
462
462
|
}>;
|
|
463
|
-
declare function listBalances$1(httpClient: HttpClient): (options?: ListBalancesOptions) => Promise<ListBalancesResponse & ListBalancesResponseNonNullableFields>;
|
|
464
|
-
declare function queryBalances$1(httpClient: HttpClient): () => BalancesQueryBuilder;
|
|
465
|
-
declare function changeBalance$1(httpClient: HttpClient): (poolId: string, idempotencyKey: string, options?: ChangeBalanceOptions) => Promise<ChangeBalanceResponse & ChangeBalanceResponseNonNullableFields>;
|
|
466
|
-
declare function revertBalanceChange$1(httpClient: HttpClient): (transactionId: string, idempotencyKey: string, options?: RevertBalanceChangeOptions) => Promise<RevertBalanceChangeResponse>;
|
|
467
|
-
declare function getTransactionReversibility$1(httpClient: HttpClient): (transactionId: string) => Promise<GetTransactionReversibilityResponse & GetTransactionReversibilityResponseNonNullableFields>;
|
|
468
|
-
declare const onBalanceUpdated$1: EventDefinition<BalanceUpdatedEnvelope, "wix.benefit_programs.v1.balance_updated">;
|
|
463
|
+
declare function listBalances$1(httpClient: HttpClient$4): (options?: ListBalancesOptions) => Promise<ListBalancesResponse & ListBalancesResponseNonNullableFields>;
|
|
464
|
+
declare function queryBalances$1(httpClient: HttpClient$4): () => BalancesQueryBuilder;
|
|
465
|
+
declare function changeBalance$1(httpClient: HttpClient$4): (poolId: string, idempotencyKey: string, options?: ChangeBalanceOptions) => Promise<ChangeBalanceResponse & ChangeBalanceResponseNonNullableFields>;
|
|
466
|
+
declare function revertBalanceChange$1(httpClient: HttpClient$4): (transactionId: string, idempotencyKey: string, options?: RevertBalanceChangeOptions) => Promise<RevertBalanceChangeResponse>;
|
|
467
|
+
declare function getTransactionReversibility$1(httpClient: HttpClient$4): (transactionId: string) => Promise<GetTransactionReversibilityResponse & GetTransactionReversibilityResponseNonNullableFields>;
|
|
468
|
+
declare const onBalanceUpdated$1: EventDefinition$4<BalanceUpdatedEnvelope, "wix.benefit_programs.v1.balance_updated">;
|
|
469
469
|
|
|
470
|
-
declare const getBalance: BuildRESTFunction<typeof getBalance$1>;
|
|
471
|
-
declare const listBalances: BuildRESTFunction<typeof listBalances$1>;
|
|
472
|
-
declare const queryBalances: BuildRESTFunction<typeof queryBalances$1>;
|
|
473
|
-
declare const changeBalance: BuildRESTFunction<typeof changeBalance$1>;
|
|
474
|
-
declare const revertBalanceChange: BuildRESTFunction<typeof revertBalanceChange$1>;
|
|
475
|
-
declare const getTransactionReversibility: BuildRESTFunction<typeof getTransactionReversibility$1>;
|
|
476
|
-
declare const onBalanceUpdated: BuildEventDefinition<typeof onBalanceUpdated$1>;
|
|
470
|
+
declare const getBalance: BuildRESTFunction$4<typeof getBalance$1>;
|
|
471
|
+
declare const listBalances: BuildRESTFunction$4<typeof listBalances$1>;
|
|
472
|
+
declare const queryBalances: BuildRESTFunction$4<typeof queryBalances$1>;
|
|
473
|
+
declare const changeBalance: BuildRESTFunction$4<typeof changeBalance$1>;
|
|
474
|
+
declare const revertBalanceChange: BuildRESTFunction$4<typeof revertBalanceChange$1>;
|
|
475
|
+
declare const getTransactionReversibility: BuildRESTFunction$4<typeof getTransactionReversibility$1>;
|
|
476
|
+
declare const onBalanceUpdated: BuildEventDefinition$4<typeof onBalanceUpdated$1>;
|
|
477
477
|
|
|
478
478
|
declare const context$4_changeBalance: typeof changeBalance;
|
|
479
479
|
declare const context$4_getBalance: typeof getBalance;
|
|
@@ -968,46 +968,81 @@ interface AllocateItemSetsOptions {
|
|
|
968
968
|
numberOfSets?: number;
|
|
969
969
|
}
|
|
970
970
|
|
|
971
|
-
|
|
971
|
+
type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
|
|
972
|
+
interface HttpClient$3 {
|
|
973
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
974
|
+
}
|
|
975
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
976
|
+
type HttpResponse$3<T = any> = {
|
|
977
|
+
data: T;
|
|
978
|
+
status: number;
|
|
979
|
+
statusText: string;
|
|
980
|
+
headers: any;
|
|
981
|
+
request?: any;
|
|
982
|
+
};
|
|
983
|
+
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
984
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
985
|
+
url: string;
|
|
986
|
+
data?: Data;
|
|
987
|
+
params?: URLSearchParams;
|
|
988
|
+
} & APIMetadata$3;
|
|
989
|
+
type APIMetadata$3 = {
|
|
990
|
+
methodFqn?: string;
|
|
991
|
+
entityFqdn?: string;
|
|
992
|
+
packageName?: string;
|
|
993
|
+
};
|
|
994
|
+
type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
|
|
995
|
+
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
996
|
+
__type: 'event-definition';
|
|
997
|
+
type: Type;
|
|
998
|
+
isDomainEvent?: boolean;
|
|
999
|
+
transformations?: unknown;
|
|
1000
|
+
__payload: Payload;
|
|
1001
|
+
};
|
|
1002
|
+
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
1003
|
+
type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
|
|
1004
|
+
type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
|
|
1005
|
+
|
|
1006
|
+
declare function createItem$1(httpClient: HttpClient$3): (item: Item$1) => Promise<Item$1 & {
|
|
972
1007
|
externalId: string;
|
|
973
1008
|
itemSetId: string;
|
|
974
1009
|
}>;
|
|
975
|
-
declare function bulkCreateItem$1(httpClient: HttpClient): (items: Item$1[], options?: BulkCreateItemOptions) => Promise<BulkCreateItemResponse & BulkCreateItemResponseNonNullableFields>;
|
|
976
|
-
declare function deleteItem$1(httpClient: HttpClient): (itemId: string) => Promise<void>;
|
|
977
|
-
declare function bulkDeleteItem$1(httpClient: HttpClient): (itemIds: string[]) => Promise<BulkDeleteItemResponse & BulkDeleteItemResponseNonNullableFields>;
|
|
978
|
-
declare function updateItem$1(httpClient: HttpClient): (_id: string | null, item: UpdateItem) => Promise<Item$1 & {
|
|
1010
|
+
declare function bulkCreateItem$1(httpClient: HttpClient$3): (items: Item$1[], options?: BulkCreateItemOptions) => Promise<BulkCreateItemResponse & BulkCreateItemResponseNonNullableFields>;
|
|
1011
|
+
declare function deleteItem$1(httpClient: HttpClient$3): (itemId: string) => Promise<void>;
|
|
1012
|
+
declare function bulkDeleteItem$1(httpClient: HttpClient$3): (itemIds: string[]) => Promise<BulkDeleteItemResponse & BulkDeleteItemResponseNonNullableFields>;
|
|
1013
|
+
declare function updateItem$1(httpClient: HttpClient$3): (_id: string | null, item: UpdateItem) => Promise<Item$1 & {
|
|
979
1014
|
externalId: string;
|
|
980
1015
|
itemSetId: string;
|
|
981
1016
|
}>;
|
|
982
|
-
declare function bulkUpdateItem$1(httpClient: HttpClient): (options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
|
|
983
|
-
declare function getItem$1(httpClient: HttpClient): (itemId: string) => Promise<Item$1 & {
|
|
1017
|
+
declare function bulkUpdateItem$1(httpClient: HttpClient$3): (options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
|
|
1018
|
+
declare function getItem$1(httpClient: HttpClient$3): (itemId: string) => Promise<Item$1 & {
|
|
984
1019
|
externalId: string;
|
|
985
1020
|
itemSetId: string;
|
|
986
1021
|
}>;
|
|
987
|
-
declare function listItems$1(httpClient: HttpClient): (options?: ListItemsOptions) => Promise<ListItemsResponse & ListItemsResponseNonNullableFields>;
|
|
988
|
-
declare function queryItems$1(httpClient: HttpClient): () => ItemsQueryBuilder;
|
|
989
|
-
declare function countItems$1(httpClient: HttpClient): (options?: CountItemsOptions) => Promise<CountItemsResponse & CountItemsResponseNonNullableFields>;
|
|
990
|
-
declare function cloneItems$1(httpClient: HttpClient): (itemSetId: string) => Promise<CloneItemsResponse & CloneItemsResponseNonNullableFields>;
|
|
991
|
-
declare function allocateItemSets$1(httpClient: HttpClient): (options?: AllocateItemSetsOptions) => Promise<AllocateItemSetsResponse & AllocateItemSetsResponseNonNullableFields>;
|
|
992
|
-
declare const onItemCreated$1: EventDefinition<ItemCreatedEnvelope, "wix.benefit_programs.v1.item_created">;
|
|
993
|
-
declare const onItemDeleted$1: EventDefinition<ItemDeletedEnvelope, "wix.benefit_programs.v1.item_deleted">;
|
|
994
|
-
declare const onItemUpdated$1: EventDefinition<ItemUpdatedEnvelope, "wix.benefit_programs.v1.item_updated">;
|
|
1022
|
+
declare function listItems$1(httpClient: HttpClient$3): (options?: ListItemsOptions) => Promise<ListItemsResponse & ListItemsResponseNonNullableFields>;
|
|
1023
|
+
declare function queryItems$1(httpClient: HttpClient$3): () => ItemsQueryBuilder;
|
|
1024
|
+
declare function countItems$1(httpClient: HttpClient$3): (options?: CountItemsOptions) => Promise<CountItemsResponse & CountItemsResponseNonNullableFields>;
|
|
1025
|
+
declare function cloneItems$1(httpClient: HttpClient$3): (itemSetId: string) => Promise<CloneItemsResponse & CloneItemsResponseNonNullableFields>;
|
|
1026
|
+
declare function allocateItemSets$1(httpClient: HttpClient$3): (options?: AllocateItemSetsOptions) => Promise<AllocateItemSetsResponse & AllocateItemSetsResponseNonNullableFields>;
|
|
1027
|
+
declare const onItemCreated$1: EventDefinition$3<ItemCreatedEnvelope, "wix.benefit_programs.v1.item_created">;
|
|
1028
|
+
declare const onItemDeleted$1: EventDefinition$3<ItemDeletedEnvelope, "wix.benefit_programs.v1.item_deleted">;
|
|
1029
|
+
declare const onItemUpdated$1: EventDefinition$3<ItemUpdatedEnvelope, "wix.benefit_programs.v1.item_updated">;
|
|
995
1030
|
|
|
996
|
-
declare const createItem: BuildRESTFunction<typeof createItem$1>;
|
|
997
|
-
declare const bulkCreateItem: BuildRESTFunction<typeof bulkCreateItem$1>;
|
|
998
|
-
declare const deleteItem: BuildRESTFunction<typeof deleteItem$1>;
|
|
999
|
-
declare const bulkDeleteItem: BuildRESTFunction<typeof bulkDeleteItem$1>;
|
|
1000
|
-
declare const updateItem: BuildRESTFunction<typeof updateItem$1>;
|
|
1001
|
-
declare const bulkUpdateItem: BuildRESTFunction<typeof bulkUpdateItem$1>;
|
|
1002
|
-
declare const getItem: BuildRESTFunction<typeof getItem$1>;
|
|
1003
|
-
declare const listItems: BuildRESTFunction<typeof listItems$1>;
|
|
1004
|
-
declare const queryItems: BuildRESTFunction<typeof queryItems$1>;
|
|
1005
|
-
declare const countItems: BuildRESTFunction<typeof countItems$1>;
|
|
1006
|
-
declare const cloneItems: BuildRESTFunction<typeof cloneItems$1>;
|
|
1007
|
-
declare const allocateItemSets: BuildRESTFunction<typeof allocateItemSets$1>;
|
|
1008
|
-
declare const onItemCreated: BuildEventDefinition<typeof onItemCreated$1>;
|
|
1009
|
-
declare const onItemDeleted: BuildEventDefinition<typeof onItemDeleted$1>;
|
|
1010
|
-
declare const onItemUpdated: BuildEventDefinition<typeof onItemUpdated$1>;
|
|
1031
|
+
declare const createItem: BuildRESTFunction$3<typeof createItem$1>;
|
|
1032
|
+
declare const bulkCreateItem: BuildRESTFunction$3<typeof bulkCreateItem$1>;
|
|
1033
|
+
declare const deleteItem: BuildRESTFunction$3<typeof deleteItem$1>;
|
|
1034
|
+
declare const bulkDeleteItem: BuildRESTFunction$3<typeof bulkDeleteItem$1>;
|
|
1035
|
+
declare const updateItem: BuildRESTFunction$3<typeof updateItem$1>;
|
|
1036
|
+
declare const bulkUpdateItem: BuildRESTFunction$3<typeof bulkUpdateItem$1>;
|
|
1037
|
+
declare const getItem: BuildRESTFunction$3<typeof getItem$1>;
|
|
1038
|
+
declare const listItems: BuildRESTFunction$3<typeof listItems$1>;
|
|
1039
|
+
declare const queryItems: BuildRESTFunction$3<typeof queryItems$1>;
|
|
1040
|
+
declare const countItems: BuildRESTFunction$3<typeof countItems$1>;
|
|
1041
|
+
declare const cloneItems: BuildRESTFunction$3<typeof cloneItems$1>;
|
|
1042
|
+
declare const allocateItemSets: BuildRESTFunction$3<typeof allocateItemSets$1>;
|
|
1043
|
+
declare const onItemCreated: BuildEventDefinition$3<typeof onItemCreated$1>;
|
|
1044
|
+
declare const onItemDeleted: BuildEventDefinition$3<typeof onItemDeleted$1>;
|
|
1045
|
+
declare const onItemUpdated: BuildEventDefinition$3<typeof onItemUpdated$1>;
|
|
1011
1046
|
|
|
1012
1047
|
declare const context$3_allocateItemSets: typeof allocateItemSets;
|
|
1013
1048
|
declare const context$3_bulkCreateItem: typeof bulkCreateItem;
|
|
@@ -2125,7 +2160,42 @@ interface CountNumberOfPoolsInProvisioningStatusOptions {
|
|
|
2125
2160
|
programId?: string;
|
|
2126
2161
|
}
|
|
2127
2162
|
|
|
2128
|
-
|
|
2163
|
+
type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
|
|
2164
|
+
interface HttpClient$2 {
|
|
2165
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
2166
|
+
}
|
|
2167
|
+
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
2168
|
+
type HttpResponse$2<T = any> = {
|
|
2169
|
+
data: T;
|
|
2170
|
+
status: number;
|
|
2171
|
+
statusText: string;
|
|
2172
|
+
headers: any;
|
|
2173
|
+
request?: any;
|
|
2174
|
+
};
|
|
2175
|
+
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
2176
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
2177
|
+
url: string;
|
|
2178
|
+
data?: Data;
|
|
2179
|
+
params?: URLSearchParams;
|
|
2180
|
+
} & APIMetadata$2;
|
|
2181
|
+
type APIMetadata$2 = {
|
|
2182
|
+
methodFqn?: string;
|
|
2183
|
+
entityFqdn?: string;
|
|
2184
|
+
packageName?: string;
|
|
2185
|
+
};
|
|
2186
|
+
type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
|
|
2187
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
2188
|
+
__type: 'event-definition';
|
|
2189
|
+
type: Type;
|
|
2190
|
+
isDomainEvent?: boolean;
|
|
2191
|
+
transformations?: unknown;
|
|
2192
|
+
__payload: Payload;
|
|
2193
|
+
};
|
|
2194
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
2195
|
+
type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
|
|
2196
|
+
type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
|
|
2197
|
+
|
|
2198
|
+
declare function getPool$1(httpClient: HttpClient$2): (poolId: string) => Promise<Pool & {
|
|
2129
2199
|
poolDefinitionId: string;
|
|
2130
2200
|
programId: string;
|
|
2131
2201
|
status: PoolStatus;
|
|
@@ -2205,7 +2275,7 @@ declare function getPool$1(httpClient: HttpClient): (poolId: string) => Promise<
|
|
|
2205
2275
|
_id: string;
|
|
2206
2276
|
} | undefined;
|
|
2207
2277
|
}>;
|
|
2208
|
-
declare function updatePool$1(httpClient: HttpClient): (_id: string | null, pool: UpdatePool) => Promise<Pool & {
|
|
2278
|
+
declare function updatePool$1(httpClient: HttpClient$2): (_id: string | null, pool: UpdatePool) => Promise<Pool & {
|
|
2209
2279
|
poolDefinitionId: string;
|
|
2210
2280
|
programId: string;
|
|
2211
2281
|
status: PoolStatus;
|
|
@@ -2285,39 +2355,39 @@ declare function updatePool$1(httpClient: HttpClient): (_id: string | null, pool
|
|
|
2285
2355
|
_id: string;
|
|
2286
2356
|
} | undefined;
|
|
2287
2357
|
}>;
|
|
2288
|
-
declare function queryPools$1(httpClient: HttpClient): () => PoolsQueryBuilder;
|
|
2289
|
-
declare function redeemBenefit$1(httpClient: HttpClient): (poolId: string, options?: RedeemBenefitOptions) => Promise<RedeemBenefitResponse & RedeemBenefitResponseNonNullableFields>;
|
|
2290
|
-
declare function reserveBenefit$1(httpClient: HttpClient): (poolId: string, options?: ReserveBenefitOptions) => Promise<ReserveBenefitResponse & ReserveBenefitResponseNonNullableFields>;
|
|
2291
|
-
declare function cancelBenefitReservation$1(httpClient: HttpClient): (transactionId: string) => Promise<CancelBenefitReservationResponse & CancelBenefitReservationResponseNonNullableFields>;
|
|
2292
|
-
declare function releaseBenefitReservation$1(httpClient: HttpClient): (transactionId: string) => Promise<ReleaseBenefitReservationResponse & ReleaseBenefitReservationResponseNonNullableFields>;
|
|
2293
|
-
declare function checkBenefitEligibility$1(httpClient: HttpClient): (poolId: string, options?: CheckBenefitEligibilityOptions) => Promise<CheckBenefitEligibilityResponse & CheckBenefitEligibilityResponseNonNullableFields>;
|
|
2294
|
-
declare function bulkCheckBenefitEligibility$1(httpClient: HttpClient): (options?: BulkCheckBenefitEligibilityOptions) => Promise<BulkCheckBenefitEligibilityResponse & BulkCheckBenefitEligibilityResponseNonNullableFields>;
|
|
2295
|
-
declare function getEligibleBenefits$1(httpClient: HttpClient): (itemReference: ItemReference, options?: GetEligibleBenefitsOptions) => Promise<GetEligibleBenefitsResponse & GetEligibleBenefitsResponseNonNullableFields>;
|
|
2296
|
-
declare function bulkUpdatePool$1(httpClient: HttpClient): (options?: BulkUpdatePoolOptions) => Promise<BulkUpdatePoolResponse & BulkUpdatePoolResponseNonNullableFields>;
|
|
2297
|
-
declare function countNumberOfPoolsInProvisioningStatus$1(httpClient: HttpClient): (options?: CountNumberOfPoolsInProvisioningStatusOptions) => Promise<CountNumberOfPoolsInProvisioningStatusResponse & CountNumberOfPoolsInProvisioningStatusResponseNonNullableFields>;
|
|
2298
|
-
declare const onPoolUpdated$1: EventDefinition<PoolUpdatedEnvelope, "wix.benefit_programs.v1.pool_updated">;
|
|
2299
|
-
declare const onPoolRedeemed$1: EventDefinition<PoolRedeemedEnvelope, "wix.benefit_programs.v1.pool_redeemed">;
|
|
2300
|
-
declare const onPoolReserved$1: EventDefinition<PoolReservedEnvelope, "wix.benefit_programs.v1.pool_reserved">;
|
|
2301
|
-
declare const onPoolReservationCanceled$1: EventDefinition<PoolReservationCanceledEnvelope, "wix.benefit_programs.v1.pool_reservation_canceled">;
|
|
2302
|
-
declare const onPoolReservationReleased$1: EventDefinition<PoolReservationReleasedEnvelope, "wix.benefit_programs.v1.pool_reservation_released">;
|
|
2358
|
+
declare function queryPools$1(httpClient: HttpClient$2): () => PoolsQueryBuilder;
|
|
2359
|
+
declare function redeemBenefit$1(httpClient: HttpClient$2): (poolId: string, options?: RedeemBenefitOptions) => Promise<RedeemBenefitResponse & RedeemBenefitResponseNonNullableFields>;
|
|
2360
|
+
declare function reserveBenefit$1(httpClient: HttpClient$2): (poolId: string, options?: ReserveBenefitOptions) => Promise<ReserveBenefitResponse & ReserveBenefitResponseNonNullableFields>;
|
|
2361
|
+
declare function cancelBenefitReservation$1(httpClient: HttpClient$2): (transactionId: string) => Promise<CancelBenefitReservationResponse & CancelBenefitReservationResponseNonNullableFields>;
|
|
2362
|
+
declare function releaseBenefitReservation$1(httpClient: HttpClient$2): (transactionId: string) => Promise<ReleaseBenefitReservationResponse & ReleaseBenefitReservationResponseNonNullableFields>;
|
|
2363
|
+
declare function checkBenefitEligibility$1(httpClient: HttpClient$2): (poolId: string, options?: CheckBenefitEligibilityOptions) => Promise<CheckBenefitEligibilityResponse & CheckBenefitEligibilityResponseNonNullableFields>;
|
|
2364
|
+
declare function bulkCheckBenefitEligibility$1(httpClient: HttpClient$2): (options?: BulkCheckBenefitEligibilityOptions) => Promise<BulkCheckBenefitEligibilityResponse & BulkCheckBenefitEligibilityResponseNonNullableFields>;
|
|
2365
|
+
declare function getEligibleBenefits$1(httpClient: HttpClient$2): (itemReference: ItemReference, options?: GetEligibleBenefitsOptions) => Promise<GetEligibleBenefitsResponse & GetEligibleBenefitsResponseNonNullableFields>;
|
|
2366
|
+
declare function bulkUpdatePool$1(httpClient: HttpClient$2): (options?: BulkUpdatePoolOptions) => Promise<BulkUpdatePoolResponse & BulkUpdatePoolResponseNonNullableFields>;
|
|
2367
|
+
declare function countNumberOfPoolsInProvisioningStatus$1(httpClient: HttpClient$2): (options?: CountNumberOfPoolsInProvisioningStatusOptions) => Promise<CountNumberOfPoolsInProvisioningStatusResponse & CountNumberOfPoolsInProvisioningStatusResponseNonNullableFields>;
|
|
2368
|
+
declare const onPoolUpdated$1: EventDefinition$2<PoolUpdatedEnvelope, "wix.benefit_programs.v1.pool_updated">;
|
|
2369
|
+
declare const onPoolRedeemed$1: EventDefinition$2<PoolRedeemedEnvelope, "wix.benefit_programs.v1.pool_redeemed">;
|
|
2370
|
+
declare const onPoolReserved$1: EventDefinition$2<PoolReservedEnvelope, "wix.benefit_programs.v1.pool_reserved">;
|
|
2371
|
+
declare const onPoolReservationCanceled$1: EventDefinition$2<PoolReservationCanceledEnvelope, "wix.benefit_programs.v1.pool_reservation_canceled">;
|
|
2372
|
+
declare const onPoolReservationReleased$1: EventDefinition$2<PoolReservationReleasedEnvelope, "wix.benefit_programs.v1.pool_reservation_released">;
|
|
2303
2373
|
|
|
2304
|
-
declare const getPool: BuildRESTFunction<typeof getPool$1>;
|
|
2305
|
-
declare const updatePool: BuildRESTFunction<typeof updatePool$1>;
|
|
2306
|
-
declare const queryPools: BuildRESTFunction<typeof queryPools$1>;
|
|
2307
|
-
declare const redeemBenefit: BuildRESTFunction<typeof redeemBenefit$1>;
|
|
2308
|
-
declare const reserveBenefit: BuildRESTFunction<typeof reserveBenefit$1>;
|
|
2309
|
-
declare const cancelBenefitReservation: BuildRESTFunction<typeof cancelBenefitReservation$1>;
|
|
2310
|
-
declare const releaseBenefitReservation: BuildRESTFunction<typeof releaseBenefitReservation$1>;
|
|
2311
|
-
declare const checkBenefitEligibility: BuildRESTFunction<typeof checkBenefitEligibility$1>;
|
|
2312
|
-
declare const bulkCheckBenefitEligibility: BuildRESTFunction<typeof bulkCheckBenefitEligibility$1>;
|
|
2313
|
-
declare const getEligibleBenefits: BuildRESTFunction<typeof getEligibleBenefits$1>;
|
|
2314
|
-
declare const bulkUpdatePool: BuildRESTFunction<typeof bulkUpdatePool$1>;
|
|
2315
|
-
declare const countNumberOfPoolsInProvisioningStatus: BuildRESTFunction<typeof countNumberOfPoolsInProvisioningStatus$1>;
|
|
2316
|
-
declare const onPoolUpdated: BuildEventDefinition<typeof onPoolUpdated$1>;
|
|
2317
|
-
declare const onPoolRedeemed: BuildEventDefinition<typeof onPoolRedeemed$1>;
|
|
2318
|
-
declare const onPoolReserved: BuildEventDefinition<typeof onPoolReserved$1>;
|
|
2319
|
-
declare const onPoolReservationCanceled: BuildEventDefinition<typeof onPoolReservationCanceled$1>;
|
|
2320
|
-
declare const onPoolReservationReleased: BuildEventDefinition<typeof onPoolReservationReleased$1>;
|
|
2374
|
+
declare const getPool: BuildRESTFunction$2<typeof getPool$1>;
|
|
2375
|
+
declare const updatePool: BuildRESTFunction$2<typeof updatePool$1>;
|
|
2376
|
+
declare const queryPools: BuildRESTFunction$2<typeof queryPools$1>;
|
|
2377
|
+
declare const redeemBenefit: BuildRESTFunction$2<typeof redeemBenefit$1>;
|
|
2378
|
+
declare const reserveBenefit: BuildRESTFunction$2<typeof reserveBenefit$1>;
|
|
2379
|
+
declare const cancelBenefitReservation: BuildRESTFunction$2<typeof cancelBenefitReservation$1>;
|
|
2380
|
+
declare const releaseBenefitReservation: BuildRESTFunction$2<typeof releaseBenefitReservation$1>;
|
|
2381
|
+
declare const checkBenefitEligibility: BuildRESTFunction$2<typeof checkBenefitEligibility$1>;
|
|
2382
|
+
declare const bulkCheckBenefitEligibility: BuildRESTFunction$2<typeof bulkCheckBenefitEligibility$1>;
|
|
2383
|
+
declare const getEligibleBenefits: BuildRESTFunction$2<typeof getEligibleBenefits$1>;
|
|
2384
|
+
declare const bulkUpdatePool: BuildRESTFunction$2<typeof bulkUpdatePool$1>;
|
|
2385
|
+
declare const countNumberOfPoolsInProvisioningStatus: BuildRESTFunction$2<typeof countNumberOfPoolsInProvisioningStatus$1>;
|
|
2386
|
+
declare const onPoolUpdated: BuildEventDefinition$2<typeof onPoolUpdated$1>;
|
|
2387
|
+
declare const onPoolRedeemed: BuildEventDefinition$2<typeof onPoolRedeemed$1>;
|
|
2388
|
+
declare const onPoolReserved: BuildEventDefinition$2<typeof onPoolReserved$1>;
|
|
2389
|
+
declare const onPoolReservationCanceled: BuildEventDefinition$2<typeof onPoolReservationCanceled$1>;
|
|
2390
|
+
declare const onPoolReservationReleased: BuildEventDefinition$2<typeof onPoolReservationReleased$1>;
|
|
2321
2391
|
|
|
2322
2392
|
declare const context$2_bulkCheckBenefitEligibility: typeof bulkCheckBenefitEligibility;
|
|
2323
2393
|
declare const context$2_bulkUpdatePool: typeof bulkUpdatePool;
|
|
@@ -3172,7 +3242,42 @@ interface FindPoolDefinitionsByProgramDefinitionOptions {
|
|
|
3172
3242
|
namespace?: string;
|
|
3173
3243
|
}
|
|
3174
3244
|
|
|
3175
|
-
|
|
3245
|
+
type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
|
|
3246
|
+
interface HttpClient$1 {
|
|
3247
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
3248
|
+
}
|
|
3249
|
+
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
3250
|
+
type HttpResponse$1<T = any> = {
|
|
3251
|
+
data: T;
|
|
3252
|
+
status: number;
|
|
3253
|
+
statusText: string;
|
|
3254
|
+
headers: any;
|
|
3255
|
+
request?: any;
|
|
3256
|
+
};
|
|
3257
|
+
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
3258
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3259
|
+
url: string;
|
|
3260
|
+
data?: Data;
|
|
3261
|
+
params?: URLSearchParams;
|
|
3262
|
+
} & APIMetadata$1;
|
|
3263
|
+
type APIMetadata$1 = {
|
|
3264
|
+
methodFqn?: string;
|
|
3265
|
+
entityFqdn?: string;
|
|
3266
|
+
packageName?: string;
|
|
3267
|
+
};
|
|
3268
|
+
type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
|
|
3269
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
3270
|
+
__type: 'event-definition';
|
|
3271
|
+
type: Type;
|
|
3272
|
+
isDomainEvent?: boolean;
|
|
3273
|
+
transformations?: unknown;
|
|
3274
|
+
__payload: Payload;
|
|
3275
|
+
};
|
|
3276
|
+
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
3277
|
+
type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
|
|
3278
|
+
type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
|
|
3279
|
+
|
|
3280
|
+
declare function createPoolDefinition$1(httpClient: HttpClient$1): (poolDefinition: PoolDefinition, options?: CreatePoolDefinitionOptions) => Promise<PoolDefinition & {
|
|
3176
3281
|
displayName: string;
|
|
3177
3282
|
programDefinitionIds: string[];
|
|
3178
3283
|
details?: {
|
|
@@ -3238,7 +3343,7 @@ declare function createPoolDefinition$1(httpClient: HttpClient): (poolDefinition
|
|
|
3238
3343
|
} | undefined;
|
|
3239
3344
|
} | undefined;
|
|
3240
3345
|
}>;
|
|
3241
|
-
declare function updatePoolDefinition$1(httpClient: HttpClient): (_id: string | null, poolDefinition: UpdatePoolDefinition, options?: UpdatePoolDefinitionOptions) => Promise<PoolDefinition & {
|
|
3346
|
+
declare function updatePoolDefinition$1(httpClient: HttpClient$1): (_id: string | null, poolDefinition: UpdatePoolDefinition, options?: UpdatePoolDefinitionOptions) => Promise<PoolDefinition & {
|
|
3242
3347
|
displayName: string;
|
|
3243
3348
|
programDefinitionIds: string[];
|
|
3244
3349
|
details?: {
|
|
@@ -3304,9 +3409,9 @@ declare function updatePoolDefinition$1(httpClient: HttpClient): (_id: string |
|
|
|
3304
3409
|
} | undefined;
|
|
3305
3410
|
} | undefined;
|
|
3306
3411
|
}>;
|
|
3307
|
-
declare function deletePoolDefinition$1(httpClient: HttpClient): (poolDefinitionId: string, options?: DeletePoolDefinitionOptions) => Promise<void>;
|
|
3308
|
-
declare function bulkDeletePoolDefinition$1(httpClient: HttpClient): (poolDefinitionIds: string[], options?: BulkDeletePoolDefinitionOptions) => Promise<BulkDeletePoolDefinitionResponse & BulkDeletePoolDefinitionResponseNonNullableFields>;
|
|
3309
|
-
declare function getPoolDefinition$1(httpClient: HttpClient): (poolDefinitionId: string) => Promise<PoolDefinition & {
|
|
3412
|
+
declare function deletePoolDefinition$1(httpClient: HttpClient$1): (poolDefinitionId: string, options?: DeletePoolDefinitionOptions) => Promise<void>;
|
|
3413
|
+
declare function bulkDeletePoolDefinition$1(httpClient: HttpClient$1): (poolDefinitionIds: string[], options?: BulkDeletePoolDefinitionOptions) => Promise<BulkDeletePoolDefinitionResponse & BulkDeletePoolDefinitionResponseNonNullableFields>;
|
|
3414
|
+
declare function getPoolDefinition$1(httpClient: HttpClient$1): (poolDefinitionId: string) => Promise<PoolDefinition & {
|
|
3310
3415
|
displayName: string;
|
|
3311
3416
|
programDefinitionIds: string[];
|
|
3312
3417
|
details?: {
|
|
@@ -3372,30 +3477,30 @@ declare function getPoolDefinition$1(httpClient: HttpClient): (poolDefinitionId:
|
|
|
3372
3477
|
} | undefined;
|
|
3373
3478
|
} | undefined;
|
|
3374
3479
|
}>;
|
|
3375
|
-
declare function queryPoolDefinitions$1(httpClient: HttpClient): () => PoolDefinitionsQueryBuilder;
|
|
3376
|
-
declare function addPoolDefinitionToProgramDefinition$1(httpClient: HttpClient): (poolDefinitionId: string, options?: AddPoolDefinitionToProgramDefinitionOptions) => Promise<AddPoolDefinitionToProgramDefinitionResponse & AddPoolDefinitionToProgramDefinitionResponseNonNullableFields>;
|
|
3377
|
-
declare function removePoolDefinitionFromProgramDefinition$1(httpClient: HttpClient): (poolDefinitionId: string, options?: RemovePoolDefinitionFromProgramDefinitionOptions) => Promise<RemovePoolDefinitionFromProgramDefinitionResponse & RemovePoolDefinitionFromProgramDefinitionResponseNonNullableFields>;
|
|
3378
|
-
declare function findPoolDefinitionsByProgramDefinition$1(httpClient: HttpClient): (options?: FindPoolDefinitionsByProgramDefinitionOptions) => Promise<FindPoolDefinitionsByProgramDefinitionResponse & FindPoolDefinitionsByProgramDefinitionResponseNonNullableFields>;
|
|
3379
|
-
declare const onPoolDefinitionCreated$1: EventDefinition<PoolDefinitionCreatedEnvelope, "wix.benefit_programs.v1.pool_definition_created">;
|
|
3380
|
-
declare const onPoolDefinitionUpdateCascaded$1: EventDefinition<PoolDefinitionUpdateCascadedEnvelope, "wix.benefit_programs.v1.pool_definition_update_cascaded">;
|
|
3381
|
-
declare const onPoolDefinitionDeleteCascaded$1: EventDefinition<PoolDefinitionDeleteCascadedEnvelope, "wix.benefit_programs.v1.pool_definition_delete_cascaded">;
|
|
3382
|
-
declare const onPoolDefinitionAddedToProgramDefinition$1: EventDefinition<PoolDefinitionAddedToProgramDefinitionEnvelope, "wix.benefit_programs.v1.pool_definition_added_to_program_definition">;
|
|
3383
|
-
declare const onPoolDefinitionRemovedFromProgramDefinition$1: EventDefinition<PoolDefinitionRemovedFromProgramDefinitionEnvelope, "wix.benefit_programs.v1.pool_definition_removed_from_program_definition">;
|
|
3480
|
+
declare function queryPoolDefinitions$1(httpClient: HttpClient$1): () => PoolDefinitionsQueryBuilder;
|
|
3481
|
+
declare function addPoolDefinitionToProgramDefinition$1(httpClient: HttpClient$1): (poolDefinitionId: string, options?: AddPoolDefinitionToProgramDefinitionOptions) => Promise<AddPoolDefinitionToProgramDefinitionResponse & AddPoolDefinitionToProgramDefinitionResponseNonNullableFields>;
|
|
3482
|
+
declare function removePoolDefinitionFromProgramDefinition$1(httpClient: HttpClient$1): (poolDefinitionId: string, options?: RemovePoolDefinitionFromProgramDefinitionOptions) => Promise<RemovePoolDefinitionFromProgramDefinitionResponse & RemovePoolDefinitionFromProgramDefinitionResponseNonNullableFields>;
|
|
3483
|
+
declare function findPoolDefinitionsByProgramDefinition$1(httpClient: HttpClient$1): (options?: FindPoolDefinitionsByProgramDefinitionOptions) => Promise<FindPoolDefinitionsByProgramDefinitionResponse & FindPoolDefinitionsByProgramDefinitionResponseNonNullableFields>;
|
|
3484
|
+
declare const onPoolDefinitionCreated$1: EventDefinition$1<PoolDefinitionCreatedEnvelope, "wix.benefit_programs.v1.pool_definition_created">;
|
|
3485
|
+
declare const onPoolDefinitionUpdateCascaded$1: EventDefinition$1<PoolDefinitionUpdateCascadedEnvelope, "wix.benefit_programs.v1.pool_definition_update_cascaded">;
|
|
3486
|
+
declare const onPoolDefinitionDeleteCascaded$1: EventDefinition$1<PoolDefinitionDeleteCascadedEnvelope, "wix.benefit_programs.v1.pool_definition_delete_cascaded">;
|
|
3487
|
+
declare const onPoolDefinitionAddedToProgramDefinition$1: EventDefinition$1<PoolDefinitionAddedToProgramDefinitionEnvelope, "wix.benefit_programs.v1.pool_definition_added_to_program_definition">;
|
|
3488
|
+
declare const onPoolDefinitionRemovedFromProgramDefinition$1: EventDefinition$1<PoolDefinitionRemovedFromProgramDefinitionEnvelope, "wix.benefit_programs.v1.pool_definition_removed_from_program_definition">;
|
|
3384
3489
|
|
|
3385
|
-
declare const createPoolDefinition: BuildRESTFunction<typeof createPoolDefinition$1>;
|
|
3386
|
-
declare const updatePoolDefinition: BuildRESTFunction<typeof updatePoolDefinition$1>;
|
|
3387
|
-
declare const deletePoolDefinition: BuildRESTFunction<typeof deletePoolDefinition$1>;
|
|
3388
|
-
declare const bulkDeletePoolDefinition: BuildRESTFunction<typeof bulkDeletePoolDefinition$1>;
|
|
3389
|
-
declare const getPoolDefinition: BuildRESTFunction<typeof getPoolDefinition$1>;
|
|
3390
|
-
declare const queryPoolDefinitions: BuildRESTFunction<typeof queryPoolDefinitions$1>;
|
|
3391
|
-
declare const addPoolDefinitionToProgramDefinition: BuildRESTFunction<typeof addPoolDefinitionToProgramDefinition$1>;
|
|
3392
|
-
declare const removePoolDefinitionFromProgramDefinition: BuildRESTFunction<typeof removePoolDefinitionFromProgramDefinition$1>;
|
|
3393
|
-
declare const findPoolDefinitionsByProgramDefinition: BuildRESTFunction<typeof findPoolDefinitionsByProgramDefinition$1>;
|
|
3394
|
-
declare const onPoolDefinitionCreated: BuildEventDefinition<typeof onPoolDefinitionCreated$1>;
|
|
3395
|
-
declare const onPoolDefinitionUpdateCascaded: BuildEventDefinition<typeof onPoolDefinitionUpdateCascaded$1>;
|
|
3396
|
-
declare const onPoolDefinitionDeleteCascaded: BuildEventDefinition<typeof onPoolDefinitionDeleteCascaded$1>;
|
|
3397
|
-
declare const onPoolDefinitionAddedToProgramDefinition: BuildEventDefinition<typeof onPoolDefinitionAddedToProgramDefinition$1>;
|
|
3398
|
-
declare const onPoolDefinitionRemovedFromProgramDefinition: BuildEventDefinition<typeof onPoolDefinitionRemovedFromProgramDefinition$1>;
|
|
3490
|
+
declare const createPoolDefinition: BuildRESTFunction$1<typeof createPoolDefinition$1>;
|
|
3491
|
+
declare const updatePoolDefinition: BuildRESTFunction$1<typeof updatePoolDefinition$1>;
|
|
3492
|
+
declare const deletePoolDefinition: BuildRESTFunction$1<typeof deletePoolDefinition$1>;
|
|
3493
|
+
declare const bulkDeletePoolDefinition: BuildRESTFunction$1<typeof bulkDeletePoolDefinition$1>;
|
|
3494
|
+
declare const getPoolDefinition: BuildRESTFunction$1<typeof getPoolDefinition$1>;
|
|
3495
|
+
declare const queryPoolDefinitions: BuildRESTFunction$1<typeof queryPoolDefinitions$1>;
|
|
3496
|
+
declare const addPoolDefinitionToProgramDefinition: BuildRESTFunction$1<typeof addPoolDefinitionToProgramDefinition$1>;
|
|
3497
|
+
declare const removePoolDefinitionFromProgramDefinition: BuildRESTFunction$1<typeof removePoolDefinitionFromProgramDefinition$1>;
|
|
3498
|
+
declare const findPoolDefinitionsByProgramDefinition: BuildRESTFunction$1<typeof findPoolDefinitionsByProgramDefinition$1>;
|
|
3499
|
+
declare const onPoolDefinitionCreated: BuildEventDefinition$1<typeof onPoolDefinitionCreated$1>;
|
|
3500
|
+
declare const onPoolDefinitionUpdateCascaded: BuildEventDefinition$1<typeof onPoolDefinitionUpdateCascaded$1>;
|
|
3501
|
+
declare const onPoolDefinitionDeleteCascaded: BuildEventDefinition$1<typeof onPoolDefinitionDeleteCascaded$1>;
|
|
3502
|
+
declare const onPoolDefinitionAddedToProgramDefinition: BuildEventDefinition$1<typeof onPoolDefinitionAddedToProgramDefinition$1>;
|
|
3503
|
+
declare const onPoolDefinitionRemovedFromProgramDefinition: BuildEventDefinition$1<typeof onPoolDefinitionRemovedFromProgramDefinition$1>;
|
|
3399
3504
|
|
|
3400
3505
|
declare const context$1_addPoolDefinitionToProgramDefinition: typeof addPoolDefinitionToProgramDefinition;
|
|
3401
3506
|
declare const context$1_bulkDeletePoolDefinition: typeof bulkDeletePoolDefinition;
|
|
@@ -3821,6 +3926,41 @@ interface TransactionsQueryBuilder {
|
|
|
3821
3926
|
find: () => Promise<TransactionsQueryResult>;
|
|
3822
3927
|
}
|
|
3823
3928
|
|
|
3929
|
+
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
3930
|
+
interface HttpClient {
|
|
3931
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
3932
|
+
}
|
|
3933
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
3934
|
+
type HttpResponse<T = any> = {
|
|
3935
|
+
data: T;
|
|
3936
|
+
status: number;
|
|
3937
|
+
statusText: string;
|
|
3938
|
+
headers: any;
|
|
3939
|
+
request?: any;
|
|
3940
|
+
};
|
|
3941
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
3942
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3943
|
+
url: string;
|
|
3944
|
+
data?: Data;
|
|
3945
|
+
params?: URLSearchParams;
|
|
3946
|
+
} & APIMetadata;
|
|
3947
|
+
type APIMetadata = {
|
|
3948
|
+
methodFqn?: string;
|
|
3949
|
+
entityFqdn?: string;
|
|
3950
|
+
packageName?: string;
|
|
3951
|
+
};
|
|
3952
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
3953
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
3954
|
+
__type: 'event-definition';
|
|
3955
|
+
type: Type;
|
|
3956
|
+
isDomainEvent?: boolean;
|
|
3957
|
+
transformations?: unknown;
|
|
3958
|
+
__payload: Payload;
|
|
3959
|
+
};
|
|
3960
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
3961
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
3962
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
3963
|
+
|
|
3824
3964
|
declare function createTransaction$1(httpClient: HttpClient): (transaction: Transaction) => Promise<Transaction & {
|
|
3825
3965
|
pool?: {
|
|
3826
3966
|
_id: string;
|
|
@@ -636,41 +636,41 @@ interface RevertBalanceChangeOptions {
|
|
|
636
636
|
instructingParty?: CommonIdentificationData$2;
|
|
637
637
|
}
|
|
638
638
|
|
|
639
|
-
interface HttpClient {
|
|
640
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
639
|
+
interface HttpClient$4 {
|
|
640
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
|
|
641
641
|
}
|
|
642
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
643
|
-
type HttpResponse<T = any> = {
|
|
642
|
+
type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
|
|
643
|
+
type HttpResponse$4<T = any> = {
|
|
644
644
|
data: T;
|
|
645
645
|
status: number;
|
|
646
646
|
statusText: string;
|
|
647
647
|
headers: any;
|
|
648
648
|
request?: any;
|
|
649
649
|
};
|
|
650
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
650
|
+
type RequestOptions$4<_TResponse = any, Data = any> = {
|
|
651
651
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
652
652
|
url: string;
|
|
653
653
|
data?: Data;
|
|
654
654
|
params?: URLSearchParams;
|
|
655
|
-
} & APIMetadata;
|
|
656
|
-
type APIMetadata = {
|
|
655
|
+
} & APIMetadata$4;
|
|
656
|
+
type APIMetadata$4 = {
|
|
657
657
|
methodFqn?: string;
|
|
658
658
|
entityFqdn?: string;
|
|
659
659
|
packageName?: string;
|
|
660
660
|
};
|
|
661
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
661
|
+
type EventDefinition$4<Payload = unknown, Type extends string = string> = {
|
|
662
662
|
__type: 'event-definition';
|
|
663
663
|
type: Type;
|
|
664
664
|
isDomainEvent?: boolean;
|
|
665
665
|
transformations?: unknown;
|
|
666
666
|
__payload: Payload;
|
|
667
667
|
};
|
|
668
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
668
|
+
declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
|
|
669
669
|
|
|
670
670
|
declare const __metadata$4: {
|
|
671
671
|
PACKAGE_NAME: string;
|
|
672
672
|
};
|
|
673
|
-
declare function getBalance(httpClient: HttpClient): (poolId: string) => Promise<Balance & {
|
|
673
|
+
declare function getBalance(httpClient: HttpClient$4): (poolId: string) => Promise<Balance & {
|
|
674
674
|
_id: string;
|
|
675
675
|
beneficiary?: {
|
|
676
676
|
anonymousVisitorId: string;
|
|
@@ -685,12 +685,12 @@ declare function getBalance(httpClient: HttpClient): (poolId: string) => Promise
|
|
|
685
685
|
_id: string;
|
|
686
686
|
} | undefined;
|
|
687
687
|
}>;
|
|
688
|
-
declare function listBalances(httpClient: HttpClient): (options?: ListBalancesOptions) => Promise<ListBalancesResponse & ListBalancesResponseNonNullableFields>;
|
|
689
|
-
declare function queryBalances(httpClient: HttpClient): () => BalancesQueryBuilder;
|
|
690
|
-
declare function changeBalance(httpClient: HttpClient): (poolId: string, idempotencyKey: string, options?: ChangeBalanceOptions) => Promise<ChangeBalanceResponse & ChangeBalanceResponseNonNullableFields>;
|
|
691
|
-
declare function revertBalanceChange(httpClient: HttpClient): (transactionId: string, idempotencyKey: string, options?: RevertBalanceChangeOptions) => Promise<RevertBalanceChangeResponse>;
|
|
692
|
-
declare function getTransactionReversibility(httpClient: HttpClient): (transactionId: string) => Promise<GetTransactionReversibilityResponse & GetTransactionReversibilityResponseNonNullableFields>;
|
|
693
|
-
declare const onBalanceUpdated: EventDefinition<BalanceUpdatedEnvelope, "wix.benefit_programs.v1.balance_updated">;
|
|
688
|
+
declare function listBalances(httpClient: HttpClient$4): (options?: ListBalancesOptions) => Promise<ListBalancesResponse & ListBalancesResponseNonNullableFields>;
|
|
689
|
+
declare function queryBalances(httpClient: HttpClient$4): () => BalancesQueryBuilder;
|
|
690
|
+
declare function changeBalance(httpClient: HttpClient$4): (poolId: string, idempotencyKey: string, options?: ChangeBalanceOptions) => Promise<ChangeBalanceResponse & ChangeBalanceResponseNonNullableFields>;
|
|
691
|
+
declare function revertBalanceChange(httpClient: HttpClient$4): (transactionId: string, idempotencyKey: string, options?: RevertBalanceChangeOptions) => Promise<RevertBalanceChangeResponse>;
|
|
692
|
+
declare function getTransactionReversibility(httpClient: HttpClient$4): (transactionId: string) => Promise<GetTransactionReversibilityResponse & GetTransactionReversibilityResponseNonNullableFields>;
|
|
693
|
+
declare const onBalanceUpdated: EventDefinition$4<BalanceUpdatedEnvelope, "wix.benefit_programs.v1.balance_updated">;
|
|
694
694
|
|
|
695
695
|
type index_d$4_AdjustOptions = AdjustOptions;
|
|
696
696
|
type index_d$4_Balance = Balance;
|
|
@@ -1428,33 +1428,64 @@ interface AllocateItemSetsOptions {
|
|
|
1428
1428
|
numberOfSets?: number;
|
|
1429
1429
|
}
|
|
1430
1430
|
|
|
1431
|
+
interface HttpClient$3 {
|
|
1432
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
|
|
1433
|
+
}
|
|
1434
|
+
type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
|
|
1435
|
+
type HttpResponse$3<T = any> = {
|
|
1436
|
+
data: T;
|
|
1437
|
+
status: number;
|
|
1438
|
+
statusText: string;
|
|
1439
|
+
headers: any;
|
|
1440
|
+
request?: any;
|
|
1441
|
+
};
|
|
1442
|
+
type RequestOptions$3<_TResponse = any, Data = any> = {
|
|
1443
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
1444
|
+
url: string;
|
|
1445
|
+
data?: Data;
|
|
1446
|
+
params?: URLSearchParams;
|
|
1447
|
+
} & APIMetadata$3;
|
|
1448
|
+
type APIMetadata$3 = {
|
|
1449
|
+
methodFqn?: string;
|
|
1450
|
+
entityFqdn?: string;
|
|
1451
|
+
packageName?: string;
|
|
1452
|
+
};
|
|
1453
|
+
type EventDefinition$3<Payload = unknown, Type extends string = string> = {
|
|
1454
|
+
__type: 'event-definition';
|
|
1455
|
+
type: Type;
|
|
1456
|
+
isDomainEvent?: boolean;
|
|
1457
|
+
transformations?: unknown;
|
|
1458
|
+
__payload: Payload;
|
|
1459
|
+
};
|
|
1460
|
+
declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
|
|
1461
|
+
|
|
1431
1462
|
declare const __metadata$3: {
|
|
1432
1463
|
PACKAGE_NAME: string;
|
|
1433
1464
|
};
|
|
1434
|
-
declare function createItem(httpClient: HttpClient): (item: Item$1) => Promise<Item$1 & {
|
|
1465
|
+
declare function createItem(httpClient: HttpClient$3): (item: Item$1) => Promise<Item$1 & {
|
|
1435
1466
|
externalId: string;
|
|
1436
1467
|
itemSetId: string;
|
|
1437
1468
|
}>;
|
|
1438
|
-
declare function bulkCreateItem(httpClient: HttpClient): (items: Item$1[], options?: BulkCreateItemOptions) => Promise<BulkCreateItemResponse & BulkCreateItemResponseNonNullableFields>;
|
|
1439
|
-
declare function deleteItem(httpClient: HttpClient): (itemId: string) => Promise<void>;
|
|
1440
|
-
declare function bulkDeleteItem(httpClient: HttpClient): (itemIds: string[]) => Promise<BulkDeleteItemResponse & BulkDeleteItemResponseNonNullableFields>;
|
|
1441
|
-
declare function updateItem(httpClient: HttpClient): (_id: string | null, item: UpdateItem) => Promise<Item$1 & {
|
|
1469
|
+
declare function bulkCreateItem(httpClient: HttpClient$3): (items: Item$1[], options?: BulkCreateItemOptions) => Promise<BulkCreateItemResponse & BulkCreateItemResponseNonNullableFields>;
|
|
1470
|
+
declare function deleteItem(httpClient: HttpClient$3): (itemId: string) => Promise<void>;
|
|
1471
|
+
declare function bulkDeleteItem(httpClient: HttpClient$3): (itemIds: string[]) => Promise<BulkDeleteItemResponse & BulkDeleteItemResponseNonNullableFields>;
|
|
1472
|
+
declare function updateItem(httpClient: HttpClient$3): (_id: string | null, item: UpdateItem) => Promise<Item$1 & {
|
|
1442
1473
|
externalId: string;
|
|
1443
1474
|
itemSetId: string;
|
|
1444
1475
|
}>;
|
|
1445
|
-
declare function bulkUpdateItem(httpClient: HttpClient): (options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
|
|
1446
|
-
declare function getItem(httpClient: HttpClient): (itemId: string) => Promise<Item$1 & {
|
|
1476
|
+
declare function bulkUpdateItem(httpClient: HttpClient$3): (options?: BulkUpdateItemOptions) => Promise<BulkUpdateItemResponse & BulkUpdateItemResponseNonNullableFields>;
|
|
1477
|
+
declare function getItem(httpClient: HttpClient$3): (itemId: string) => Promise<Item$1 & {
|
|
1447
1478
|
externalId: string;
|
|
1448
1479
|
itemSetId: string;
|
|
1449
1480
|
}>;
|
|
1450
|
-
declare function listItems(httpClient: HttpClient): (options?: ListItemsOptions) => Promise<ListItemsResponse & ListItemsResponseNonNullableFields>;
|
|
1451
|
-
declare function queryItems(httpClient: HttpClient): () => ItemsQueryBuilder;
|
|
1452
|
-
declare function countItems(httpClient: HttpClient): (options?: CountItemsOptions) => Promise<CountItemsResponse & CountItemsResponseNonNullableFields>;
|
|
1453
|
-
declare function cloneItems(httpClient: HttpClient): (itemSetId: string) => Promise<CloneItemsResponse & CloneItemsResponseNonNullableFields>;
|
|
1454
|
-
declare function allocateItemSets(httpClient: HttpClient): (options?: AllocateItemSetsOptions) => Promise<AllocateItemSetsResponse & AllocateItemSetsResponseNonNullableFields>;
|
|
1455
|
-
declare const onItemCreated: EventDefinition<ItemCreatedEnvelope, "wix.benefit_programs.v1.item_created">;
|
|
1456
|
-
declare const onItemDeleted: EventDefinition<ItemDeletedEnvelope, "wix.benefit_programs.v1.item_deleted">;
|
|
1457
|
-
declare const onItemUpdated: EventDefinition<ItemUpdatedEnvelope, "wix.benefit_programs.v1.item_updated">;
|
|
1481
|
+
declare function listItems(httpClient: HttpClient$3): (options?: ListItemsOptions) => Promise<ListItemsResponse & ListItemsResponseNonNullableFields>;
|
|
1482
|
+
declare function queryItems(httpClient: HttpClient$3): () => ItemsQueryBuilder;
|
|
1483
|
+
declare function countItems(httpClient: HttpClient$3): (options?: CountItemsOptions) => Promise<CountItemsResponse & CountItemsResponseNonNullableFields>;
|
|
1484
|
+
declare function cloneItems(httpClient: HttpClient$3): (itemSetId: string) => Promise<CloneItemsResponse & CloneItemsResponseNonNullableFields>;
|
|
1485
|
+
declare function allocateItemSets(httpClient: HttpClient$3): (options?: AllocateItemSetsOptions) => Promise<AllocateItemSetsResponse & AllocateItemSetsResponseNonNullableFields>;
|
|
1486
|
+
declare const onItemCreated: EventDefinition$3<ItemCreatedEnvelope, "wix.benefit_programs.v1.item_created">;
|
|
1487
|
+
declare const onItemDeleted: EventDefinition$3<ItemDeletedEnvelope, "wix.benefit_programs.v1.item_deleted">;
|
|
1488
|
+
declare const onItemUpdated: EventDefinition$3<ItemUpdatedEnvelope, "wix.benefit_programs.v1.item_updated">;
|
|
1458
1489
|
|
|
1459
1490
|
type index_d$3_AllocateItemSetsOptions = AllocateItemSetsOptions;
|
|
1460
1491
|
type index_d$3_AllocateItemSetsRequest = AllocateItemSetsRequest;
|
|
@@ -3304,10 +3335,41 @@ interface CountNumberOfPoolsInProvisioningStatusOptions {
|
|
|
3304
3335
|
programId?: string;
|
|
3305
3336
|
}
|
|
3306
3337
|
|
|
3338
|
+
interface HttpClient$2 {
|
|
3339
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
|
|
3340
|
+
}
|
|
3341
|
+
type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
|
|
3342
|
+
type HttpResponse$2<T = any> = {
|
|
3343
|
+
data: T;
|
|
3344
|
+
status: number;
|
|
3345
|
+
statusText: string;
|
|
3346
|
+
headers: any;
|
|
3347
|
+
request?: any;
|
|
3348
|
+
};
|
|
3349
|
+
type RequestOptions$2<_TResponse = any, Data = any> = {
|
|
3350
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3351
|
+
url: string;
|
|
3352
|
+
data?: Data;
|
|
3353
|
+
params?: URLSearchParams;
|
|
3354
|
+
} & APIMetadata$2;
|
|
3355
|
+
type APIMetadata$2 = {
|
|
3356
|
+
methodFqn?: string;
|
|
3357
|
+
entityFqdn?: string;
|
|
3358
|
+
packageName?: string;
|
|
3359
|
+
};
|
|
3360
|
+
type EventDefinition$2<Payload = unknown, Type extends string = string> = {
|
|
3361
|
+
__type: 'event-definition';
|
|
3362
|
+
type: Type;
|
|
3363
|
+
isDomainEvent?: boolean;
|
|
3364
|
+
transformations?: unknown;
|
|
3365
|
+
__payload: Payload;
|
|
3366
|
+
};
|
|
3367
|
+
declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
|
|
3368
|
+
|
|
3307
3369
|
declare const __metadata$2: {
|
|
3308
3370
|
PACKAGE_NAME: string;
|
|
3309
3371
|
};
|
|
3310
|
-
declare function getPool(httpClient: HttpClient): (poolId: string) => Promise<Pool & {
|
|
3372
|
+
declare function getPool(httpClient: HttpClient$2): (poolId: string) => Promise<Pool & {
|
|
3311
3373
|
poolDefinitionId: string;
|
|
3312
3374
|
programId: string;
|
|
3313
3375
|
status: PoolStatus;
|
|
@@ -3387,7 +3449,7 @@ declare function getPool(httpClient: HttpClient): (poolId: string) => Promise<Po
|
|
|
3387
3449
|
_id: string;
|
|
3388
3450
|
} | undefined;
|
|
3389
3451
|
}>;
|
|
3390
|
-
declare function updatePool(httpClient: HttpClient): (_id: string | null, pool: UpdatePool) => Promise<Pool & {
|
|
3452
|
+
declare function updatePool(httpClient: HttpClient$2): (_id: string | null, pool: UpdatePool) => Promise<Pool & {
|
|
3391
3453
|
poolDefinitionId: string;
|
|
3392
3454
|
programId: string;
|
|
3393
3455
|
status: PoolStatus;
|
|
@@ -3467,21 +3529,21 @@ declare function updatePool(httpClient: HttpClient): (_id: string | null, pool:
|
|
|
3467
3529
|
_id: string;
|
|
3468
3530
|
} | undefined;
|
|
3469
3531
|
}>;
|
|
3470
|
-
declare function queryPools(httpClient: HttpClient): () => PoolsQueryBuilder;
|
|
3471
|
-
declare function redeemBenefit(httpClient: HttpClient): (poolId: string, options?: RedeemBenefitOptions) => Promise<RedeemBenefitResponse & RedeemBenefitResponseNonNullableFields>;
|
|
3472
|
-
declare function reserveBenefit(httpClient: HttpClient): (poolId: string, options?: ReserveBenefitOptions) => Promise<ReserveBenefitResponse & ReserveBenefitResponseNonNullableFields>;
|
|
3473
|
-
declare function cancelBenefitReservation(httpClient: HttpClient): (transactionId: string) => Promise<CancelBenefitReservationResponse & CancelBenefitReservationResponseNonNullableFields>;
|
|
3474
|
-
declare function releaseBenefitReservation(httpClient: HttpClient): (transactionId: string) => Promise<ReleaseBenefitReservationResponse & ReleaseBenefitReservationResponseNonNullableFields>;
|
|
3475
|
-
declare function checkBenefitEligibility(httpClient: HttpClient): (poolId: string, options?: CheckBenefitEligibilityOptions) => Promise<CheckBenefitEligibilityResponse & CheckBenefitEligibilityResponseNonNullableFields>;
|
|
3476
|
-
declare function bulkCheckBenefitEligibility(httpClient: HttpClient): (options?: BulkCheckBenefitEligibilityOptions) => Promise<BulkCheckBenefitEligibilityResponse & BulkCheckBenefitEligibilityResponseNonNullableFields>;
|
|
3477
|
-
declare function getEligibleBenefits(httpClient: HttpClient): (itemReference: ItemReference, options?: GetEligibleBenefitsOptions) => Promise<GetEligibleBenefitsResponse & GetEligibleBenefitsResponseNonNullableFields>;
|
|
3478
|
-
declare function bulkUpdatePool(httpClient: HttpClient): (options?: BulkUpdatePoolOptions) => Promise<BulkUpdatePoolResponse & BulkUpdatePoolResponseNonNullableFields>;
|
|
3479
|
-
declare function countNumberOfPoolsInProvisioningStatus(httpClient: HttpClient): (options?: CountNumberOfPoolsInProvisioningStatusOptions) => Promise<CountNumberOfPoolsInProvisioningStatusResponse & CountNumberOfPoolsInProvisioningStatusResponseNonNullableFields>;
|
|
3480
|
-
declare const onPoolUpdated: EventDefinition<PoolUpdatedEnvelope, "wix.benefit_programs.v1.pool_updated">;
|
|
3481
|
-
declare const onPoolRedeemed: EventDefinition<PoolRedeemedEnvelope, "wix.benefit_programs.v1.pool_redeemed">;
|
|
3482
|
-
declare const onPoolReserved: EventDefinition<PoolReservedEnvelope, "wix.benefit_programs.v1.pool_reserved">;
|
|
3483
|
-
declare const onPoolReservationCanceled: EventDefinition<PoolReservationCanceledEnvelope, "wix.benefit_programs.v1.pool_reservation_canceled">;
|
|
3484
|
-
declare const onPoolReservationReleased: EventDefinition<PoolReservationReleasedEnvelope, "wix.benefit_programs.v1.pool_reservation_released">;
|
|
3532
|
+
declare function queryPools(httpClient: HttpClient$2): () => PoolsQueryBuilder;
|
|
3533
|
+
declare function redeemBenefit(httpClient: HttpClient$2): (poolId: string, options?: RedeemBenefitOptions) => Promise<RedeemBenefitResponse & RedeemBenefitResponseNonNullableFields>;
|
|
3534
|
+
declare function reserveBenefit(httpClient: HttpClient$2): (poolId: string, options?: ReserveBenefitOptions) => Promise<ReserveBenefitResponse & ReserveBenefitResponseNonNullableFields>;
|
|
3535
|
+
declare function cancelBenefitReservation(httpClient: HttpClient$2): (transactionId: string) => Promise<CancelBenefitReservationResponse & CancelBenefitReservationResponseNonNullableFields>;
|
|
3536
|
+
declare function releaseBenefitReservation(httpClient: HttpClient$2): (transactionId: string) => Promise<ReleaseBenefitReservationResponse & ReleaseBenefitReservationResponseNonNullableFields>;
|
|
3537
|
+
declare function checkBenefitEligibility(httpClient: HttpClient$2): (poolId: string, options?: CheckBenefitEligibilityOptions) => Promise<CheckBenefitEligibilityResponse & CheckBenefitEligibilityResponseNonNullableFields>;
|
|
3538
|
+
declare function bulkCheckBenefitEligibility(httpClient: HttpClient$2): (options?: BulkCheckBenefitEligibilityOptions) => Promise<BulkCheckBenefitEligibilityResponse & BulkCheckBenefitEligibilityResponseNonNullableFields>;
|
|
3539
|
+
declare function getEligibleBenefits(httpClient: HttpClient$2): (itemReference: ItemReference, options?: GetEligibleBenefitsOptions) => Promise<GetEligibleBenefitsResponse & GetEligibleBenefitsResponseNonNullableFields>;
|
|
3540
|
+
declare function bulkUpdatePool(httpClient: HttpClient$2): (options?: BulkUpdatePoolOptions) => Promise<BulkUpdatePoolResponse & BulkUpdatePoolResponseNonNullableFields>;
|
|
3541
|
+
declare function countNumberOfPoolsInProvisioningStatus(httpClient: HttpClient$2): (options?: CountNumberOfPoolsInProvisioningStatusOptions) => Promise<CountNumberOfPoolsInProvisioningStatusResponse & CountNumberOfPoolsInProvisioningStatusResponseNonNullableFields>;
|
|
3542
|
+
declare const onPoolUpdated: EventDefinition$2<PoolUpdatedEnvelope, "wix.benefit_programs.v1.pool_updated">;
|
|
3543
|
+
declare const onPoolRedeemed: EventDefinition$2<PoolRedeemedEnvelope, "wix.benefit_programs.v1.pool_redeemed">;
|
|
3544
|
+
declare const onPoolReserved: EventDefinition$2<PoolReservedEnvelope, "wix.benefit_programs.v1.pool_reserved">;
|
|
3545
|
+
declare const onPoolReservationCanceled: EventDefinition$2<PoolReservationCanceledEnvelope, "wix.benefit_programs.v1.pool_reservation_canceled">;
|
|
3546
|
+
declare const onPoolReservationReleased: EventDefinition$2<PoolReservationReleasedEnvelope, "wix.benefit_programs.v1.pool_reservation_released">;
|
|
3485
3547
|
|
|
3486
3548
|
type index_d$2_BenefitAlreadyRedeemed = BenefitAlreadyRedeemed;
|
|
3487
3549
|
type index_d$2_BenefitNotFound = BenefitNotFound;
|
|
@@ -4941,10 +5003,41 @@ interface FindPoolDefinitionsByProgramDefinitionOptions {
|
|
|
4941
5003
|
namespace?: string;
|
|
4942
5004
|
}
|
|
4943
5005
|
|
|
5006
|
+
interface HttpClient$1 {
|
|
5007
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
|
|
5008
|
+
}
|
|
5009
|
+
type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
|
|
5010
|
+
type HttpResponse$1<T = any> = {
|
|
5011
|
+
data: T;
|
|
5012
|
+
status: number;
|
|
5013
|
+
statusText: string;
|
|
5014
|
+
headers: any;
|
|
5015
|
+
request?: any;
|
|
5016
|
+
};
|
|
5017
|
+
type RequestOptions$1<_TResponse = any, Data = any> = {
|
|
5018
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
5019
|
+
url: string;
|
|
5020
|
+
data?: Data;
|
|
5021
|
+
params?: URLSearchParams;
|
|
5022
|
+
} & APIMetadata$1;
|
|
5023
|
+
type APIMetadata$1 = {
|
|
5024
|
+
methodFqn?: string;
|
|
5025
|
+
entityFqdn?: string;
|
|
5026
|
+
packageName?: string;
|
|
5027
|
+
};
|
|
5028
|
+
type EventDefinition$1<Payload = unknown, Type extends string = string> = {
|
|
5029
|
+
__type: 'event-definition';
|
|
5030
|
+
type: Type;
|
|
5031
|
+
isDomainEvent?: boolean;
|
|
5032
|
+
transformations?: unknown;
|
|
5033
|
+
__payload: Payload;
|
|
5034
|
+
};
|
|
5035
|
+
declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
|
|
5036
|
+
|
|
4944
5037
|
declare const __metadata$1: {
|
|
4945
5038
|
PACKAGE_NAME: string;
|
|
4946
5039
|
};
|
|
4947
|
-
declare function createPoolDefinition(httpClient: HttpClient): (poolDefinition: PoolDefinition, options?: CreatePoolDefinitionOptions) => Promise<PoolDefinition & {
|
|
5040
|
+
declare function createPoolDefinition(httpClient: HttpClient$1): (poolDefinition: PoolDefinition, options?: CreatePoolDefinitionOptions) => Promise<PoolDefinition & {
|
|
4948
5041
|
displayName: string;
|
|
4949
5042
|
programDefinitionIds: string[];
|
|
4950
5043
|
details?: {
|
|
@@ -5010,7 +5103,7 @@ declare function createPoolDefinition(httpClient: HttpClient): (poolDefinition:
|
|
|
5010
5103
|
} | undefined;
|
|
5011
5104
|
} | undefined;
|
|
5012
5105
|
}>;
|
|
5013
|
-
declare function updatePoolDefinition(httpClient: HttpClient): (_id: string | null, poolDefinition: UpdatePoolDefinition, options?: UpdatePoolDefinitionOptions) => Promise<PoolDefinition & {
|
|
5106
|
+
declare function updatePoolDefinition(httpClient: HttpClient$1): (_id: string | null, poolDefinition: UpdatePoolDefinition, options?: UpdatePoolDefinitionOptions) => Promise<PoolDefinition & {
|
|
5014
5107
|
displayName: string;
|
|
5015
5108
|
programDefinitionIds: string[];
|
|
5016
5109
|
details?: {
|
|
@@ -5076,9 +5169,9 @@ declare function updatePoolDefinition(httpClient: HttpClient): (_id: string | nu
|
|
|
5076
5169
|
} | undefined;
|
|
5077
5170
|
} | undefined;
|
|
5078
5171
|
}>;
|
|
5079
|
-
declare function deletePoolDefinition(httpClient: HttpClient): (poolDefinitionId: string, options?: DeletePoolDefinitionOptions) => Promise<void>;
|
|
5080
|
-
declare function bulkDeletePoolDefinition(httpClient: HttpClient): (poolDefinitionIds: string[], options?: BulkDeletePoolDefinitionOptions) => Promise<BulkDeletePoolDefinitionResponse & BulkDeletePoolDefinitionResponseNonNullableFields>;
|
|
5081
|
-
declare function getPoolDefinition(httpClient: HttpClient): (poolDefinitionId: string) => Promise<PoolDefinition & {
|
|
5172
|
+
declare function deletePoolDefinition(httpClient: HttpClient$1): (poolDefinitionId: string, options?: DeletePoolDefinitionOptions) => Promise<void>;
|
|
5173
|
+
declare function bulkDeletePoolDefinition(httpClient: HttpClient$1): (poolDefinitionIds: string[], options?: BulkDeletePoolDefinitionOptions) => Promise<BulkDeletePoolDefinitionResponse & BulkDeletePoolDefinitionResponseNonNullableFields>;
|
|
5174
|
+
declare function getPoolDefinition(httpClient: HttpClient$1): (poolDefinitionId: string) => Promise<PoolDefinition & {
|
|
5082
5175
|
displayName: string;
|
|
5083
5176
|
programDefinitionIds: string[];
|
|
5084
5177
|
details?: {
|
|
@@ -5144,15 +5237,15 @@ declare function getPoolDefinition(httpClient: HttpClient): (poolDefinitionId: s
|
|
|
5144
5237
|
} | undefined;
|
|
5145
5238
|
} | undefined;
|
|
5146
5239
|
}>;
|
|
5147
|
-
declare function queryPoolDefinitions(httpClient: HttpClient): () => PoolDefinitionsQueryBuilder;
|
|
5148
|
-
declare function addPoolDefinitionToProgramDefinition(httpClient: HttpClient): (poolDefinitionId: string, options?: AddPoolDefinitionToProgramDefinitionOptions) => Promise<AddPoolDefinitionToProgramDefinitionResponse & AddPoolDefinitionToProgramDefinitionResponseNonNullableFields>;
|
|
5149
|
-
declare function removePoolDefinitionFromProgramDefinition(httpClient: HttpClient): (poolDefinitionId: string, options?: RemovePoolDefinitionFromProgramDefinitionOptions) => Promise<RemovePoolDefinitionFromProgramDefinitionResponse & RemovePoolDefinitionFromProgramDefinitionResponseNonNullableFields>;
|
|
5150
|
-
declare function findPoolDefinitionsByProgramDefinition(httpClient: HttpClient): (options?: FindPoolDefinitionsByProgramDefinitionOptions) => Promise<FindPoolDefinitionsByProgramDefinitionResponse & FindPoolDefinitionsByProgramDefinitionResponseNonNullableFields>;
|
|
5151
|
-
declare const onPoolDefinitionCreated: EventDefinition<PoolDefinitionCreatedEnvelope, "wix.benefit_programs.v1.pool_definition_created">;
|
|
5152
|
-
declare const onPoolDefinitionUpdateCascaded: EventDefinition<PoolDefinitionUpdateCascadedEnvelope, "wix.benefit_programs.v1.pool_definition_update_cascaded">;
|
|
5153
|
-
declare const onPoolDefinitionDeleteCascaded: EventDefinition<PoolDefinitionDeleteCascadedEnvelope, "wix.benefit_programs.v1.pool_definition_delete_cascaded">;
|
|
5154
|
-
declare const onPoolDefinitionAddedToProgramDefinition: EventDefinition<PoolDefinitionAddedToProgramDefinitionEnvelope, "wix.benefit_programs.v1.pool_definition_added_to_program_definition">;
|
|
5155
|
-
declare const onPoolDefinitionRemovedFromProgramDefinition: EventDefinition<PoolDefinitionRemovedFromProgramDefinitionEnvelope, "wix.benefit_programs.v1.pool_definition_removed_from_program_definition">;
|
|
5240
|
+
declare function queryPoolDefinitions(httpClient: HttpClient$1): () => PoolDefinitionsQueryBuilder;
|
|
5241
|
+
declare function addPoolDefinitionToProgramDefinition(httpClient: HttpClient$1): (poolDefinitionId: string, options?: AddPoolDefinitionToProgramDefinitionOptions) => Promise<AddPoolDefinitionToProgramDefinitionResponse & AddPoolDefinitionToProgramDefinitionResponseNonNullableFields>;
|
|
5242
|
+
declare function removePoolDefinitionFromProgramDefinition(httpClient: HttpClient$1): (poolDefinitionId: string, options?: RemovePoolDefinitionFromProgramDefinitionOptions) => Promise<RemovePoolDefinitionFromProgramDefinitionResponse & RemovePoolDefinitionFromProgramDefinitionResponseNonNullableFields>;
|
|
5243
|
+
declare function findPoolDefinitionsByProgramDefinition(httpClient: HttpClient$1): (options?: FindPoolDefinitionsByProgramDefinitionOptions) => Promise<FindPoolDefinitionsByProgramDefinitionResponse & FindPoolDefinitionsByProgramDefinitionResponseNonNullableFields>;
|
|
5244
|
+
declare const onPoolDefinitionCreated: EventDefinition$1<PoolDefinitionCreatedEnvelope, "wix.benefit_programs.v1.pool_definition_created">;
|
|
5245
|
+
declare const onPoolDefinitionUpdateCascaded: EventDefinition$1<PoolDefinitionUpdateCascadedEnvelope, "wix.benefit_programs.v1.pool_definition_update_cascaded">;
|
|
5246
|
+
declare const onPoolDefinitionDeleteCascaded: EventDefinition$1<PoolDefinitionDeleteCascadedEnvelope, "wix.benefit_programs.v1.pool_definition_delete_cascaded">;
|
|
5247
|
+
declare const onPoolDefinitionAddedToProgramDefinition: EventDefinition$1<PoolDefinitionAddedToProgramDefinitionEnvelope, "wix.benefit_programs.v1.pool_definition_added_to_program_definition">;
|
|
5248
|
+
declare const onPoolDefinitionRemovedFromProgramDefinition: EventDefinition$1<PoolDefinitionRemovedFromProgramDefinitionEnvelope, "wix.benefit_programs.v1.pool_definition_removed_from_program_definition">;
|
|
5156
5249
|
|
|
5157
5250
|
type index_d$1_AddPoolDefinitionToProgramDefinitionOptions = AddPoolDefinitionToProgramDefinitionOptions;
|
|
5158
5251
|
type index_d$1_AddPoolDefinitionToProgramDefinitionRequest = AddPoolDefinitionToProgramDefinitionRequest;
|
|
@@ -5929,6 +6022,37 @@ interface TransactionsQueryBuilder {
|
|
|
5929
6022
|
find: () => Promise<TransactionsQueryResult>;
|
|
5930
6023
|
}
|
|
5931
6024
|
|
|
6025
|
+
interface HttpClient {
|
|
6026
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
6027
|
+
}
|
|
6028
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
6029
|
+
type HttpResponse<T = any> = {
|
|
6030
|
+
data: T;
|
|
6031
|
+
status: number;
|
|
6032
|
+
statusText: string;
|
|
6033
|
+
headers: any;
|
|
6034
|
+
request?: any;
|
|
6035
|
+
};
|
|
6036
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
6037
|
+
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
6038
|
+
url: string;
|
|
6039
|
+
data?: Data;
|
|
6040
|
+
params?: URLSearchParams;
|
|
6041
|
+
} & APIMetadata;
|
|
6042
|
+
type APIMetadata = {
|
|
6043
|
+
methodFqn?: string;
|
|
6044
|
+
entityFqdn?: string;
|
|
6045
|
+
packageName?: string;
|
|
6046
|
+
};
|
|
6047
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
6048
|
+
__type: 'event-definition';
|
|
6049
|
+
type: Type;
|
|
6050
|
+
isDomainEvent?: boolean;
|
|
6051
|
+
transformations?: unknown;
|
|
6052
|
+
__payload: Payload;
|
|
6053
|
+
};
|
|
6054
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
6055
|
+
|
|
5932
6056
|
declare const __metadata: {
|
|
5933
6057
|
PACKAGE_NAME: string;
|
|
5934
6058
|
};
|