@wix/auto_sdk_benefit-programs_programs 1.0.5 → 1.0.7
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/src/benefit-programs-v1-program-programs.context.d.ts +1 -1
- package/build/cjs/src/benefit-programs-v1-program-programs.http.d.ts +4 -8
- package/build/cjs/src/benefit-programs-v1-program-programs.http.js +4 -8
- package/build/cjs/src/benefit-programs-v1-program-programs.http.js.map +1 -1
- package/build/cjs/src/benefit-programs-v1-program-programs.meta.d.ts +9 -9
- package/build/cjs/src/benefit-programs-v1-program-programs.meta.js.map +1 -1
- package/build/cjs/src/benefit-programs-v1-program-programs.public.d.ts +14 -16
- package/build/cjs/src/benefit-programs-v1-program-programs.public.js.map +1 -1
- package/build/cjs/src/benefit-programs-v1-program-programs.types.d.ts +15 -57
- package/build/cjs/src/benefit-programs-v1-program-programs.types.js +4 -4
- package/build/cjs/src/benefit-programs-v1-program-programs.types.js.map +1 -1
- package/build/cjs/src/benefit-programs-v1-program-programs.universal.d.ts +38 -73
- package/build/cjs/src/benefit-programs-v1-program-programs.universal.js +8 -10
- package/build/cjs/src/benefit-programs-v1-program-programs.universal.js.map +1 -1
- package/build/es/src/benefit-programs-v1-program-programs.context.d.ts +1 -1
- package/build/es/src/benefit-programs-v1-program-programs.http.d.ts +4 -8
- package/build/es/src/benefit-programs-v1-program-programs.http.js +4 -8
- package/build/es/src/benefit-programs-v1-program-programs.http.js.map +1 -1
- package/build/es/src/benefit-programs-v1-program-programs.meta.d.ts +9 -9
- package/build/es/src/benefit-programs-v1-program-programs.meta.js.map +1 -1
- package/build/es/src/benefit-programs-v1-program-programs.public.d.ts +14 -16
- package/build/es/src/benefit-programs-v1-program-programs.public.js.map +1 -1
- package/build/es/src/benefit-programs-v1-program-programs.types.d.ts +15 -57
- package/build/es/src/benefit-programs-v1-program-programs.types.js +4 -4
- package/build/es/src/benefit-programs-v1-program-programs.types.js.map +1 -1
- package/build/es/src/benefit-programs-v1-program-programs.universal.d.ts +38 -73
- package/build/es/src/benefit-programs-v1-program-programs.universal.js +8 -10
- package/build/es/src/benefit-programs-v1-program-programs.universal.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.context.d.ts +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.http.d.ts +4 -8
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.http.js +4 -8
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.http.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.meta.d.ts +9 -9
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.meta.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.public.d.ts +14 -16
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.public.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.types.d.ts +15 -57
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.types.js +4 -4
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.types.js.map +1 -1
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.universal.d.ts +38 -73
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.universal.js +8 -10
- package/build/internal/cjs/src/benefit-programs-v1-program-programs.universal.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-program-programs.context.d.ts +1 -1
- package/build/internal/es/src/benefit-programs-v1-program-programs.http.d.ts +4 -8
- package/build/internal/es/src/benefit-programs-v1-program-programs.http.js +4 -8
- package/build/internal/es/src/benefit-programs-v1-program-programs.http.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-program-programs.meta.d.ts +9 -9
- package/build/internal/es/src/benefit-programs-v1-program-programs.meta.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-program-programs.public.d.ts +14 -16
- package/build/internal/es/src/benefit-programs-v1-program-programs.public.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-program-programs.types.d.ts +15 -57
- package/build/internal/es/src/benefit-programs-v1-program-programs.types.js +4 -4
- package/build/internal/es/src/benefit-programs-v1-program-programs.types.js.map +1 -1
- package/build/internal/es/src/benefit-programs-v1-program-programs.universal.d.ts +38 -73
- package/build/internal/es/src/benefit-programs-v1-program-programs.universal.js +8 -10
- package/build/internal/es/src/benefit-programs-v1-program-programs.universal.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import { EndProgramResponse,
|
|
2
|
+
import { EndProgramResponse, GetProgramByExternalIdAndNamespaceOptions, GetProgramByExternalIdAndNamespaceResponse, PauseProgramResponse, PoolDefinitionLookupId, Program, ProgramsQueryBuilder, ProvisionProgramOptions, ProvisionProgramResponse, RenewProgramResponse, ResumeProgramResponse, UpdateProgram } from './benefit-programs-v1-program-programs.universal.js';
|
|
3
3
|
export declare const __metadata: {
|
|
4
4
|
PACKAGE_NAME: string;
|
|
5
5
|
};
|
|
@@ -9,21 +9,21 @@ interface ProvisionProgramSignature {
|
|
|
9
9
|
* Creates a program for the specified beneficiary. Creating a program is also referred to as provisioning a program.
|
|
10
10
|
*
|
|
11
11
|
* You can provision a program from a program definition or a pool definition:
|
|
12
|
-
* - **Program definition**: The program has pools that are created from the pool definitions in the program definition.
|
|
13
|
-
* - **Pool definition**: The program has 1 pool that is created from the pool definition.
|
|
12
|
+
* - **Program definition**: The provisioned program has pools that are created from the pool definitions in the program definition.
|
|
13
|
+
* - **Pool definition**: The provisioned program has 1 pool that is created from the pool definition.
|
|
14
14
|
* @param - The program definition or pool definition to use to provision the program.
|
|
15
15
|
*/
|
|
16
|
-
(poolDefinitionLookupId: PoolDefinitionLookupId, options?: ProvisionProgramOptions | undefined): Promise<ProvisionProgramResponse
|
|
16
|
+
(poolDefinitionLookupId: PoolDefinitionLookupId, options?: ProvisionProgramOptions | undefined): Promise<ProvisionProgramResponse>;
|
|
17
17
|
}
|
|
18
18
|
export declare function renewProgram(httpClient: HttpClient): RenewProgramSignature;
|
|
19
19
|
interface RenewProgramSignature {
|
|
20
20
|
/**
|
|
21
21
|
* Renews the specified program.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
23
|
+
* The number of available credits in each pool in the program is defined in the corresponding pool's credit configuration.
|
|
24
24
|
* @param - ID of the program to renew.
|
|
25
25
|
*/
|
|
26
|
-
(programId: string): Promise<RenewProgramResponse
|
|
26
|
+
(programId: string): Promise<RenewProgramResponse>;
|
|
27
27
|
}
|
|
28
28
|
export declare function pauseProgram(httpClient: HttpClient): PauseProgramSignature;
|
|
29
29
|
interface PauseProgramSignature {
|
|
@@ -31,7 +31,7 @@ interface PauseProgramSignature {
|
|
|
31
31
|
* Pauses the specified program. Benefits in the program's pools can't be redeemed until the program is resumed.
|
|
32
32
|
* @param - ID of the program to pause.
|
|
33
33
|
*/
|
|
34
|
-
(programId: string): Promise<PauseProgramResponse
|
|
34
|
+
(programId: string): Promise<PauseProgramResponse>;
|
|
35
35
|
}
|
|
36
36
|
export declare function resumeProgram(httpClient: HttpClient): ResumeProgramSignature;
|
|
37
37
|
interface ResumeProgramSignature {
|
|
@@ -41,17 +41,15 @@ interface ResumeProgramSignature {
|
|
|
41
41
|
* Call this method for paused programs.
|
|
42
42
|
* @param - ID of program to resume.
|
|
43
43
|
*/
|
|
44
|
-
(programId: string): Promise<ResumeProgramResponse
|
|
44
|
+
(programId: string): Promise<ResumeProgramResponse>;
|
|
45
45
|
}
|
|
46
46
|
export declare function endProgram(httpClient: HttpClient): EndProgramSignature;
|
|
47
47
|
interface EndProgramSignature {
|
|
48
48
|
/**
|
|
49
49
|
* Ends the specified program.
|
|
50
|
-
*
|
|
51
|
-
* Benefits in the program's pools can't be redeemed until the program is resumed.
|
|
52
50
|
* @param - ID of the program to end.
|
|
53
51
|
*/
|
|
54
|
-
(programId: string): Promise<EndProgramResponse
|
|
52
|
+
(programId: string): Promise<EndProgramResponse>;
|
|
55
53
|
}
|
|
56
54
|
export declare function updateProgram(httpClient: HttpClient): UpdateProgramSignature;
|
|
57
55
|
interface UpdateProgramSignature {
|
|
@@ -66,7 +64,7 @@ interface UpdateProgramSignature {
|
|
|
66
64
|
* @param - Program ID.
|
|
67
65
|
* @returns Updated program.
|
|
68
66
|
*/
|
|
69
|
-
(_id: string
|
|
67
|
+
(_id: string, program: UpdateProgram): Promise<Program>;
|
|
70
68
|
}
|
|
71
69
|
export declare function getProgram(httpClient: HttpClient): GetProgramSignature;
|
|
72
70
|
interface GetProgramSignature {
|
|
@@ -75,7 +73,7 @@ interface GetProgramSignature {
|
|
|
75
73
|
* @param - ID of the program to retrieve.
|
|
76
74
|
* @returns Retrieved program.
|
|
77
75
|
*/
|
|
78
|
-
(programId: string): Promise<Program
|
|
76
|
+
(programId: string): Promise<Program>;
|
|
79
77
|
}
|
|
80
78
|
export declare function queryPrograms(httpClient: HttpClient): QueryProgramsSignature;
|
|
81
79
|
interface QueryProgramsSignature {
|
|
@@ -98,8 +96,8 @@ export declare function getProgramByExternalIdAndNamespace(httpClient: HttpClien
|
|
|
98
96
|
interface GetProgramByExternalIdAndNamespaceSignature {
|
|
99
97
|
/**
|
|
100
98
|
* Retrieves a program with the specified external ID and namespace.
|
|
101
|
-
* @param - Namespace for your app or site's benefit programs.
|
|
99
|
+
* @param - Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
102
100
|
*/
|
|
103
|
-
(namespace: string, options: GetProgramByExternalIdAndNamespaceOptions): Promise<GetProgramByExternalIdAndNamespaceResponse
|
|
101
|
+
(namespace: string, options: GetProgramByExternalIdAndNamespaceOptions): Promise<GetProgramByExternalIdAndNamespaceResponse>;
|
|
104
102
|
}
|
|
105
|
-
export { ActionEvent, CommonIdentificationData, CommonIdentificationDataIdOneOf, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DomainEvent, DomainEventBodyOneOf, EndProgramRequest, EndProgramResponse,
|
|
103
|
+
export { ActionEvent, CommonIdentificationData, CommonIdentificationDataIdOneOf, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DomainEvent, DomainEventBodyOneOf, EndProgramRequest, EndProgramResponse, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, ExtendedFields, GetProgramByExternalIdAndNamespaceOptions, GetProgramByExternalIdAndNamespaceRequest, GetProgramByExternalIdAndNamespaceResponse, GetProgramRequest, GetProgramResponse, IdentificationData, IdentificationDataIdOneOf, IdentityType, MessageEnvelope, OrderStatus, PauseProgramRequest, PauseProgramResponse, PoolDefinitionLookupId, PoolDefinitionLookupIdIdOneOf, Program, ProgramAlreadyExists, ProgramDefinitionInfo, ProgramEnded, ProgramPaused, ProgramProvisioned, ProgramRenewed, ProgramResumed, ProgramStatus, ProgramStatusTransitionNotAllowed, ProgramsQueryBuilder, ProgramsQueryResult, ProvisionProgramOptions, ProvisionProgramRequest, ProvisionProgramRequestProgramStatus, ProvisionProgramResponse, QueryProgramsRequest, QueryProgramsResponse, RenewProgramRequest, RenewProgramResponse, RestoreInfo, ResumeProgramRequest, ResumeProgramResponse, SortOrder, Sorting, UpdateProgram, UpdateProgramRequest, UpdateProgramResponse, UpdateProgramStatusRequest, UpdateProgramStatusResponse, UpsertMigratedProgramRequest, UpsertMigratedProgramResponse, WebhookIdentityType, } from './benefit-programs-v1-program-programs.universal.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"benefit-programs-v1-program-programs.public.js","sourceRoot":"","sources":["../../../src/benefit-programs-v1-program-programs.public.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"benefit-programs-v1-program-programs.public.js","sourceRoot":"","sources":["../../../src/benefit-programs-v1-program-programs.public.ts"],"names":[],"mappings":"AACA,OAAO,EAaL,UAAU,IAAI,mBAAmB,EACjC,UAAU,IAAI,mBAAmB,EACjC,kCAAkC,IAAI,2CAA2C,EACjF,YAAY,IAAI,qBAAqB,EACrC,gBAAgB,IAAI,yBAAyB,EAC7C,aAAa,IAAI,sBAAsB,EACvC,YAAY,IAAI,qBAAqB,EACrC,aAAa,IAAI,sBAAsB,EACvC,aAAa,IAAI,sBAAsB,GACxC,MAAM,qDAAqD,CAAC;AAE7D,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,uBAAuB,EAAE,CAAC;AAEpE,MAAM,UAAU,gBAAgB,CAC9B,UAAsB;IAEtB,OAAO,CACL,sBAA8C,EAC9C,OAGC,EACD,EAAE,CACF,yBAAyB,CACvB,sBAAsB,EACtB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAiBD,MAAM,UAAU,YAAY,CAAC,UAAsB;IACjD,OAAO,CAAC,SAAiB,EAAE,EAAE,CAC3B,qBAAqB,CACnB,SAAS;IACT,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAYD,MAAM,UAAU,YAAY,CAAC,UAAsB;IACjD,OAAO,CAAC,SAAiB,EAAE,EAAE,CAC3B,qBAAqB,CACnB,SAAS;IACT,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAUD,MAAM,UAAU,aAAa,CAAC,UAAsB;IAClD,OAAO,CAAC,SAAiB,EAAE,EAAE,CAC3B,sBAAsB,CACpB,SAAS;IACT,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAYD,MAAM,UAAU,UAAU,CAAC,UAAsB;IAC/C,OAAO,CAAC,SAAiB,EAAE,EAAE,CAC3B,mBAAmB,CACjB,SAAS;IACT,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAUD,MAAM,UAAU,aAAa,CAAC,UAAsB;IAClD,OAAO,CAAC,GAAW,EAAE,OAAoD,EAAE,EAAE,CAC3E,sBAAsB,CACpB,GAAG,EACH,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAiBD,MAAM,UAAU,UAAU,CAAC,UAAsB;IAC/C,OAAO,CAAC,SAAiB,EAAE,EAAE,CAC3B,mBAAmB,CACjB,SAAS;IACT,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAWD,MAAM,UAAU,aAAa,CAAC,UAAsB;IAClD,OAAO,GAAG,EAAE,CACV,sBAAsB;IACpB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAmBD,MAAM,UAAU,kCAAkC,CAChD,UAAsB;IAEtB,OAAO,CACL,SAAiB,EACjB,OAGC,EACD,EAAE,CACF,2CAA2C,CACzC,SAAS,EACT,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAaD,OAAO,EAwBL,YAAY,EAEZ,WAAW,EAaX,aAAa,EAMb,oCAAoC,EASpC,SAAS,EAST,mBAAmB,GACpB,MAAM,qDAAqD,CAAC"}
|
|
@@ -50,10 +50,11 @@ export interface Program {
|
|
|
50
50
|
*/
|
|
51
51
|
displayName?: string | null;
|
|
52
52
|
/**
|
|
53
|
-
* Namespace for your app or site's benefit programs.
|
|
53
|
+
* Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
54
54
|
* @minLength 1
|
|
55
55
|
* @maxLength 50
|
|
56
56
|
* @immutable
|
|
57
|
+
* @readonly
|
|
57
58
|
*/
|
|
58
59
|
namespace?: string | null;
|
|
59
60
|
/**
|
|
@@ -66,6 +67,7 @@ export interface Program {
|
|
|
66
67
|
* ID for the program defined by you. You can use `externalId` to filter queries.
|
|
67
68
|
* @format GUID
|
|
68
69
|
* @immutable
|
|
70
|
+
* @readonly
|
|
69
71
|
*/
|
|
70
72
|
externalId?: string | null;
|
|
71
73
|
/**
|
|
@@ -83,13 +85,13 @@ export declare enum ProgramStatus {
|
|
|
83
85
|
PAUSED = "PAUSED",
|
|
84
86
|
/** Program has ended. It can't be resumed. */
|
|
85
87
|
ENDED = "ENDED",
|
|
86
|
-
/** Program is being activated for the first time. This status
|
|
88
|
+
/** Program is being activated for the first time. This status exists for a short time during processing. */
|
|
87
89
|
PROVISIONING = "PROVISIONING",
|
|
88
|
-
/** Program is being paused. This status
|
|
90
|
+
/** Program is being paused. This status exists for a short time during processing. */
|
|
89
91
|
PAUSING = "PAUSING",
|
|
90
|
-
/** Program is being re-activated after being paused. This status
|
|
92
|
+
/** Program is being re-activated after being paused. This status exists for a short time during processing. */
|
|
91
93
|
RESUMING = "RESUMING",
|
|
92
|
-
/** Program is being ended. This status
|
|
94
|
+
/** Program is being ended. This status exists for a short time during processing. */
|
|
93
95
|
ENDING = "ENDING"
|
|
94
96
|
}
|
|
95
97
|
export interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
@@ -195,7 +197,7 @@ export interface ProvisionProgramRequest {
|
|
|
195
197
|
*/
|
|
196
198
|
programStatus?: ProvisionProgramRequestProgramStatus;
|
|
197
199
|
/**
|
|
198
|
-
* Namespace for your app or site's benefit programs.
|
|
200
|
+
* Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
199
201
|
* @minLength 1
|
|
200
202
|
* @maxLength 50
|
|
201
203
|
*/
|
|
@@ -203,7 +205,7 @@ export interface ProvisionProgramRequest {
|
|
|
203
205
|
/**
|
|
204
206
|
* Program name.
|
|
205
207
|
*
|
|
206
|
-
* If you're provisioning the program from a program definition, you may want to use the same name that used for the program definition.
|
|
208
|
+
* If you're provisioning the program from a program definition, you may want to use the same name that was used for the program definition.
|
|
207
209
|
* @maxLength 64
|
|
208
210
|
*/
|
|
209
211
|
displayName?: string | null;
|
|
@@ -246,7 +248,7 @@ export declare enum ProvisionProgramRequestProgramStatus {
|
|
|
246
248
|
}
|
|
247
249
|
export interface ProvisionProgramResponse {
|
|
248
250
|
/**
|
|
249
|
-
* Job ID of the provisioning of the program.
|
|
251
|
+
* Job ID of the provisioning of the program. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).
|
|
250
252
|
* @format GUID
|
|
251
253
|
*/
|
|
252
254
|
jobId?: string;
|
|
@@ -275,7 +277,7 @@ export interface RenewProgramRequest {
|
|
|
275
277
|
}
|
|
276
278
|
export interface RenewProgramResponse {
|
|
277
279
|
/**
|
|
278
|
-
* Job ID of the program renewal.
|
|
280
|
+
* Job ID of the program renewal. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).
|
|
279
281
|
* @format GUID
|
|
280
282
|
*/
|
|
281
283
|
jobId?: string;
|
|
@@ -289,7 +291,7 @@ export interface PauseProgramRequest {
|
|
|
289
291
|
}
|
|
290
292
|
export interface PauseProgramResponse {
|
|
291
293
|
/**
|
|
292
|
-
* Job ID of the pausing of the program.
|
|
294
|
+
* Job ID of the pausing of the program. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).
|
|
293
295
|
* @format GUID
|
|
294
296
|
*/
|
|
295
297
|
jobId?: string;
|
|
@@ -309,7 +311,7 @@ export interface ResumeProgramRequest {
|
|
|
309
311
|
}
|
|
310
312
|
export interface ResumeProgramResponse {
|
|
311
313
|
/**
|
|
312
|
-
* Job ID of the resuming of the program.
|
|
314
|
+
* Job ID of the resuming of the program. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).
|
|
313
315
|
* @format GUID
|
|
314
316
|
*/
|
|
315
317
|
jobId?: string;
|
|
@@ -323,7 +325,7 @@ export interface EndProgramRequest {
|
|
|
323
325
|
}
|
|
324
326
|
export interface EndProgramResponse {
|
|
325
327
|
/**
|
|
326
|
-
* Job ID of the ending of the program.
|
|
328
|
+
* Job ID of the ending of the program. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).
|
|
327
329
|
* @format GUID
|
|
328
330
|
*/
|
|
329
331
|
jobId?: string;
|
|
@@ -489,7 +491,7 @@ export interface Cursors {
|
|
|
489
491
|
}
|
|
490
492
|
export interface GetProgramByExternalIdAndNamespaceRequest {
|
|
491
493
|
/**
|
|
492
|
-
* Namespace for your app or site's benefit programs.
|
|
494
|
+
* Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
493
495
|
* @minLength 1
|
|
494
496
|
* @maxLength 50
|
|
495
497
|
*/
|
|
@@ -646,47 +648,3 @@ export declare enum WebhookIdentityType {
|
|
|
646
648
|
WIX_USER = "WIX_USER",
|
|
647
649
|
APP = "APP"
|
|
648
650
|
}
|
|
649
|
-
interface CommonIdentificationDataNonNullableFields {
|
|
650
|
-
anonymousVisitorId: string;
|
|
651
|
-
memberId: string;
|
|
652
|
-
wixUserId: string;
|
|
653
|
-
identityType: IdentityType;
|
|
654
|
-
}
|
|
655
|
-
interface ProgramDefinitionInfoNonNullableFields {
|
|
656
|
-
id: string;
|
|
657
|
-
}
|
|
658
|
-
interface ProgramNonNullableFields {
|
|
659
|
-
status: ProgramStatus;
|
|
660
|
-
beneficiary?: CommonIdentificationDataNonNullableFields;
|
|
661
|
-
programDefinition?: ProgramDefinitionInfoNonNullableFields;
|
|
662
|
-
targetStatus: ProgramStatus;
|
|
663
|
-
}
|
|
664
|
-
export interface ProvisionProgramResponseNonNullableFields {
|
|
665
|
-
jobId: string;
|
|
666
|
-
program?: ProgramNonNullableFields;
|
|
667
|
-
}
|
|
668
|
-
export interface RenewProgramResponseNonNullableFields {
|
|
669
|
-
jobId: string;
|
|
670
|
-
}
|
|
671
|
-
export interface PauseProgramResponseNonNullableFields {
|
|
672
|
-
jobId: string;
|
|
673
|
-
}
|
|
674
|
-
export interface ResumeProgramResponseNonNullableFields {
|
|
675
|
-
jobId: string;
|
|
676
|
-
}
|
|
677
|
-
export interface EndProgramResponseNonNullableFields {
|
|
678
|
-
jobId: string;
|
|
679
|
-
}
|
|
680
|
-
export interface UpdateProgramResponseNonNullableFields {
|
|
681
|
-
program?: ProgramNonNullableFields;
|
|
682
|
-
}
|
|
683
|
-
export interface GetProgramResponseNonNullableFields {
|
|
684
|
-
program?: ProgramNonNullableFields;
|
|
685
|
-
}
|
|
686
|
-
export interface QueryProgramsResponseNonNullableFields {
|
|
687
|
-
programs: ProgramNonNullableFields[];
|
|
688
|
-
}
|
|
689
|
-
export interface GetProgramByExternalIdAndNamespaceResponseNonNullableFields {
|
|
690
|
-
program?: ProgramNonNullableFields;
|
|
691
|
-
}
|
|
692
|
-
export {};
|
|
@@ -8,13 +8,13 @@ export var ProgramStatus;
|
|
|
8
8
|
ProgramStatus["PAUSED"] = "PAUSED";
|
|
9
9
|
/** Program has ended. It can't be resumed. */
|
|
10
10
|
ProgramStatus["ENDED"] = "ENDED";
|
|
11
|
-
/** Program is being activated for the first time. This status
|
|
11
|
+
/** Program is being activated for the first time. This status exists for a short time during processing. */
|
|
12
12
|
ProgramStatus["PROVISIONING"] = "PROVISIONING";
|
|
13
|
-
/** Program is being paused. This status
|
|
13
|
+
/** Program is being paused. This status exists for a short time during processing. */
|
|
14
14
|
ProgramStatus["PAUSING"] = "PAUSING";
|
|
15
|
-
/** Program is being re-activated after being paused. This status
|
|
15
|
+
/** Program is being re-activated after being paused. This status exists for a short time during processing. */
|
|
16
16
|
ProgramStatus["RESUMING"] = "RESUMING";
|
|
17
|
-
/** Program is being ended. This status
|
|
17
|
+
/** Program is being ended. This status exists for a short time during processing. */
|
|
18
18
|
ProgramStatus["ENDING"] = "ENDING";
|
|
19
19
|
})(ProgramStatus || (ProgramStatus = {}));
|
|
20
20
|
export var IdentityType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"benefit-programs-v1-program-programs.types.js","sourceRoot":"","sources":["../../../src/benefit-programs-v1-program-programs.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"benefit-programs-v1-program-programs.types.js","sourceRoot":"","sources":["../../../src/benefit-programs-v1-program-programs.types.ts"],"names":[],"mappings":"AA+EA,MAAM,CAAN,IAAY,aAiBX;AAjBD,WAAY,aAAa;IACvB,gCAAgC;IAChC,wCAAuB,CAAA;IACvB,yBAAyB;IACzB,kCAAiB,CAAA;IACjB,4CAA4C;IAC5C,kCAAiB,CAAA;IACjB,8CAA8C;IAC9C,gCAAe,CAAA;IACf,4GAA4G;IAC5G,8CAA6B,CAAA;IAC7B,sFAAsF;IACtF,oCAAmB,CAAA;IACnB,+GAA+G;IAC/G,sCAAqB,CAAA;IACrB,qFAAqF;IACrF,kCAAiB,CAAA;AACnB,CAAC,EAjBW,aAAa,KAAb,aAAa,QAiBxB;AAwCD,MAAM,CAAN,IAAY,YASX;AATD,WAAY,YAAY;IACtB,4CAA4C;IAC5C,mCAAmB,CAAA;IACnB,4CAA4C;IAC5C,uDAAuC,CAAA;IACvC,+BAA+B;IAC/B,iCAAiB,CAAA;IACjB,iEAAiE;IACjE,qCAAqB,CAAA;AACvB,CAAC,EATW,YAAY,KAAZ,YAAY,QASvB;AAiHD,MAAM,CAAN,IAAY,oCAKX;AALD,WAAY,oCAAoC;IAC9C,yBAAyB;IACzB,yDAAiB,CAAA;IACjB,yBAAyB;IACzB,yDAAiB,CAAA;AACnB,CAAC,EALW,oCAAoC,KAApC,oCAAoC,QAK/C;AA6ID,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,gCAAiB,CAAA;IACjB,8BAAe,CAAA;AACjB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAuED,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAA4B;IAC5B,wBAAW,CAAA;IACX,6BAA6B;IAC7B,0BAAa,CAAA;AACf,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAwND,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
1
2
|
export interface Program {
|
|
2
3
|
/**
|
|
3
4
|
* Program ID.
|
|
@@ -50,10 +51,11 @@ export interface Program {
|
|
|
50
51
|
*/
|
|
51
52
|
displayName?: string | null;
|
|
52
53
|
/**
|
|
53
|
-
* Namespace for your app or site's benefit programs.
|
|
54
|
+
* Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
54
55
|
* @minLength 1
|
|
55
56
|
* @maxLength 50
|
|
56
57
|
* @immutable
|
|
58
|
+
* @readonly
|
|
57
59
|
*/
|
|
58
60
|
namespace?: string | null;
|
|
59
61
|
/**
|
|
@@ -66,6 +68,7 @@ export interface Program {
|
|
|
66
68
|
* ID for the program defined by you. You can use `externalId` to filter queries.
|
|
67
69
|
* @format GUID
|
|
68
70
|
* @immutable
|
|
71
|
+
* @readonly
|
|
69
72
|
*/
|
|
70
73
|
externalId?: string | null;
|
|
71
74
|
/**
|
|
@@ -83,13 +86,13 @@ export declare enum ProgramStatus {
|
|
|
83
86
|
PAUSED = "PAUSED",
|
|
84
87
|
/** Program has ended. It can't be resumed. */
|
|
85
88
|
ENDED = "ENDED",
|
|
86
|
-
/** Program is being activated for the first time. This status
|
|
89
|
+
/** Program is being activated for the first time. This status exists for a short time during processing. */
|
|
87
90
|
PROVISIONING = "PROVISIONING",
|
|
88
|
-
/** Program is being paused. This status
|
|
91
|
+
/** Program is being paused. This status exists for a short time during processing. */
|
|
89
92
|
PAUSING = "PAUSING",
|
|
90
|
-
/** Program is being re-activated after being paused. This status
|
|
93
|
+
/** Program is being re-activated after being paused. This status exists for a short time during processing. */
|
|
91
94
|
RESUMING = "RESUMING",
|
|
92
|
-
/** Program is being ended. This status
|
|
95
|
+
/** Program is being ended. This status exists for a short time during processing. */
|
|
93
96
|
ENDING = "ENDING"
|
|
94
97
|
}
|
|
95
98
|
export interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
@@ -195,7 +198,7 @@ export interface ProvisionProgramRequest {
|
|
|
195
198
|
*/
|
|
196
199
|
programStatus?: ProvisionProgramRequestProgramStatus;
|
|
197
200
|
/**
|
|
198
|
-
* Namespace for your app or site's benefit programs.
|
|
201
|
+
* Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
199
202
|
* @minLength 1
|
|
200
203
|
* @maxLength 50
|
|
201
204
|
*/
|
|
@@ -203,7 +206,7 @@ export interface ProvisionProgramRequest {
|
|
|
203
206
|
/**
|
|
204
207
|
* Program name.
|
|
205
208
|
*
|
|
206
|
-
* If you're provisioning the program from a program definition, you may want to use the same name that used for the program definition.
|
|
209
|
+
* If you're provisioning the program from a program definition, you may want to use the same name that was used for the program definition.
|
|
207
210
|
* @maxLength 64
|
|
208
211
|
*/
|
|
209
212
|
displayName?: string | null;
|
|
@@ -246,7 +249,7 @@ export declare enum ProvisionProgramRequestProgramStatus {
|
|
|
246
249
|
}
|
|
247
250
|
export interface ProvisionProgramResponse {
|
|
248
251
|
/**
|
|
249
|
-
* Job ID of the provisioning of the program.
|
|
252
|
+
* Job ID of the provisioning of the program. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).
|
|
250
253
|
* @format GUID
|
|
251
254
|
*/
|
|
252
255
|
jobId?: string;
|
|
@@ -275,7 +278,7 @@ export interface RenewProgramRequest {
|
|
|
275
278
|
}
|
|
276
279
|
export interface RenewProgramResponse {
|
|
277
280
|
/**
|
|
278
|
-
* Job ID of the program renewal.
|
|
281
|
+
* Job ID of the program renewal. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).
|
|
279
282
|
* @format GUID
|
|
280
283
|
*/
|
|
281
284
|
jobId?: string;
|
|
@@ -289,7 +292,7 @@ export interface PauseProgramRequest {
|
|
|
289
292
|
}
|
|
290
293
|
export interface PauseProgramResponse {
|
|
291
294
|
/**
|
|
292
|
-
* Job ID of the pausing of the program.
|
|
295
|
+
* Job ID of the pausing of the program. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).
|
|
293
296
|
* @format GUID
|
|
294
297
|
*/
|
|
295
298
|
jobId?: string;
|
|
@@ -309,7 +312,7 @@ export interface ResumeProgramRequest {
|
|
|
309
312
|
}
|
|
310
313
|
export interface ResumeProgramResponse {
|
|
311
314
|
/**
|
|
312
|
-
* Job ID of the resuming of the program.
|
|
315
|
+
* Job ID of the resuming of the program. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).
|
|
313
316
|
* @format GUID
|
|
314
317
|
*/
|
|
315
318
|
jobId?: string;
|
|
@@ -323,7 +326,7 @@ export interface EndProgramRequest {
|
|
|
323
326
|
}
|
|
324
327
|
export interface EndProgramResponse {
|
|
325
328
|
/**
|
|
326
|
-
* Job ID of the ending of the program.
|
|
329
|
+
* Job ID of the ending of the program. Retrieve job details using the Async Job API ([SDK](https://dev.wix.com/docs/sdk/backend-modules/async-jobs/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/async-job/introduction)).
|
|
327
330
|
* @format GUID
|
|
328
331
|
*/
|
|
329
332
|
jobId?: string;
|
|
@@ -489,7 +492,7 @@ export interface Cursors {
|
|
|
489
492
|
}
|
|
490
493
|
export interface GetProgramByExternalIdAndNamespaceRequest {
|
|
491
494
|
/**
|
|
492
|
-
* Namespace for your app or site's benefit programs.
|
|
495
|
+
* Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
493
496
|
* @minLength 1
|
|
494
497
|
* @maxLength 50
|
|
495
498
|
*/
|
|
@@ -644,55 +647,13 @@ export declare enum WebhookIdentityType {
|
|
|
644
647
|
WIX_USER = "WIX_USER",
|
|
645
648
|
APP = "APP"
|
|
646
649
|
}
|
|
647
|
-
|
|
648
|
-
anonymousVisitorId: string;
|
|
649
|
-
memberId: string;
|
|
650
|
-
wixUserId: string;
|
|
651
|
-
identityType: IdentityType;
|
|
652
|
-
}
|
|
653
|
-
interface ProgramDefinitionInfoNonNullableFields {
|
|
654
|
-
_id: string;
|
|
655
|
-
}
|
|
656
|
-
export interface ProgramNonNullableFields {
|
|
657
|
-
status: ProgramStatus;
|
|
658
|
-
beneficiary?: CommonIdentificationDataNonNullableFields;
|
|
659
|
-
programDefinition?: ProgramDefinitionInfoNonNullableFields;
|
|
660
|
-
targetStatus: ProgramStatus;
|
|
661
|
-
}
|
|
662
|
-
export interface ProvisionProgramResponseNonNullableFields {
|
|
663
|
-
jobId: string;
|
|
664
|
-
program?: ProgramNonNullableFields;
|
|
665
|
-
}
|
|
666
|
-
export interface RenewProgramResponseNonNullableFields {
|
|
667
|
-
jobId: string;
|
|
668
|
-
}
|
|
669
|
-
export interface PauseProgramResponseNonNullableFields {
|
|
670
|
-
jobId: string;
|
|
671
|
-
}
|
|
672
|
-
export interface ResumeProgramResponseNonNullableFields {
|
|
673
|
-
jobId: string;
|
|
674
|
-
}
|
|
675
|
-
export interface EndProgramResponseNonNullableFields {
|
|
676
|
-
jobId: string;
|
|
677
|
-
}
|
|
678
|
-
export interface UpdateProgramResponseNonNullableFields {
|
|
679
|
-
program?: ProgramNonNullableFields;
|
|
680
|
-
}
|
|
681
|
-
export interface GetProgramResponseNonNullableFields {
|
|
682
|
-
program?: ProgramNonNullableFields;
|
|
683
|
-
}
|
|
684
|
-
export interface QueryProgramsResponseNonNullableFields {
|
|
685
|
-
programs: ProgramNonNullableFields[];
|
|
686
|
-
}
|
|
687
|
-
export interface GetProgramByExternalIdAndNamespaceResponseNonNullableFields {
|
|
688
|
-
program?: ProgramNonNullableFields;
|
|
689
|
-
}
|
|
650
|
+
type ProgramNonNullablePaths = `status` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `programDefinition._id`;
|
|
690
651
|
/**
|
|
691
652
|
* Creates a program for the specified beneficiary. Creating a program is also referred to as provisioning a program.
|
|
692
653
|
*
|
|
693
654
|
* You can provision a program from a program definition or a pool definition:
|
|
694
|
-
* - **Program definition**: The program has pools that are created from the pool definitions in the program definition.
|
|
695
|
-
* - **Pool definition**: The program has 1 pool that is created from the pool definition.
|
|
655
|
+
* - **Program definition**: The provisioned program has pools that are created from the pool definitions in the program definition.
|
|
656
|
+
* - **Pool definition**: The provisioned program has 1 pool that is created from the pool definition.
|
|
696
657
|
* @param poolDefinitionLookupId - The program definition or pool definition to use to provision the program.
|
|
697
658
|
* @public
|
|
698
659
|
* @documentationMaturity preview
|
|
@@ -706,7 +667,9 @@ export interface GetProgramByExternalIdAndNamespaceResponseNonNullableFields {
|
|
|
706
667
|
* @applicableIdentity APP
|
|
707
668
|
* @fqn wix.benefit_programs.v1.program.ProgramService.ProvisionProgram
|
|
708
669
|
*/
|
|
709
|
-
export declare function provisionProgram(poolDefinitionLookupId: PoolDefinitionLookupId, options?: ProvisionProgramOptions): Promise<ProvisionProgramResponse
|
|
670
|
+
export declare function provisionProgram(poolDefinitionLookupId: PoolDefinitionLookupId, options?: NonNullablePaths<ProvisionProgramOptions, `beneficiary` | `externalProgramId` | `namespace`>): Promise<NonNullablePaths<ProvisionProgramResponse, `jobId` | {
|
|
671
|
+
[P in ProgramNonNullablePaths]: `program.${P}`;
|
|
672
|
+
}[ProgramNonNullablePaths]>>;
|
|
710
673
|
export interface ProvisionProgramOptions {
|
|
711
674
|
/** Program beneficiary. */
|
|
712
675
|
beneficiary: CommonIdentificationData;
|
|
@@ -717,7 +680,7 @@ export interface ProvisionProgramOptions {
|
|
|
717
680
|
*/
|
|
718
681
|
programStatus?: ProvisionProgramRequestProgramStatus;
|
|
719
682
|
/**
|
|
720
|
-
* Namespace for your app or site's benefit programs.
|
|
683
|
+
* Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
721
684
|
* @minLength 1
|
|
722
685
|
* @maxLength 50
|
|
723
686
|
*/
|
|
@@ -725,7 +688,7 @@ export interface ProvisionProgramOptions {
|
|
|
725
688
|
/**
|
|
726
689
|
* Program name.
|
|
727
690
|
*
|
|
728
|
-
* If you're provisioning the program from a program definition, you may want to use the same name that used for the program definition.
|
|
691
|
+
* If you're provisioning the program from a program definition, you may want to use the same name that was used for the program definition.
|
|
729
692
|
* @maxLength 64
|
|
730
693
|
*/
|
|
731
694
|
displayName?: string | null;
|
|
@@ -738,7 +701,7 @@ export interface ProvisionProgramOptions {
|
|
|
738
701
|
/**
|
|
739
702
|
* Renews the specified program.
|
|
740
703
|
*
|
|
741
|
-
*
|
|
704
|
+
* The number of available credits in each pool in the program is defined in the corresponding pool's credit configuration.
|
|
742
705
|
* @param programId - ID of the program to renew.
|
|
743
706
|
* @public
|
|
744
707
|
* @documentationMaturity preview
|
|
@@ -749,7 +712,7 @@ export interface ProvisionProgramOptions {
|
|
|
749
712
|
* @applicableIdentity APP
|
|
750
713
|
* @fqn wix.benefit_programs.v1.program.ProgramService.RenewProgram
|
|
751
714
|
*/
|
|
752
|
-
export declare function renewProgram(programId: string): Promise<RenewProgramResponse
|
|
715
|
+
export declare function renewProgram(programId: string): Promise<NonNullablePaths<RenewProgramResponse, `jobId`>>;
|
|
753
716
|
/**
|
|
754
717
|
* Pauses the specified program. Benefits in the program's pools can't be redeemed until the program is resumed.
|
|
755
718
|
* @param programId - ID of the program to pause.
|
|
@@ -762,7 +725,7 @@ export declare function renewProgram(programId: string): Promise<RenewProgramRes
|
|
|
762
725
|
* @applicableIdentity APP
|
|
763
726
|
* @fqn wix.benefit_programs.v1.program.ProgramService.PauseProgram
|
|
764
727
|
*/
|
|
765
|
-
export declare function pauseProgram(programId: string): Promise<PauseProgramResponse
|
|
728
|
+
export declare function pauseProgram(programId: string): Promise<NonNullablePaths<PauseProgramResponse, `jobId`>>;
|
|
766
729
|
/**
|
|
767
730
|
* Resumes the specified program.
|
|
768
731
|
*
|
|
@@ -777,11 +740,9 @@ export declare function pauseProgram(programId: string): Promise<PauseProgramRes
|
|
|
777
740
|
* @applicableIdentity APP
|
|
778
741
|
* @fqn wix.benefit_programs.v1.program.ProgramService.ResumeProgram
|
|
779
742
|
*/
|
|
780
|
-
export declare function resumeProgram(programId: string): Promise<ResumeProgramResponse
|
|
743
|
+
export declare function resumeProgram(programId: string): Promise<NonNullablePaths<ResumeProgramResponse, `jobId`>>;
|
|
781
744
|
/**
|
|
782
745
|
* Ends the specified program.
|
|
783
|
-
*
|
|
784
|
-
* Benefits in the program's pools can't be redeemed until the program is resumed.
|
|
785
746
|
* @param programId - ID of the program to end.
|
|
786
747
|
* @public
|
|
787
748
|
* @documentationMaturity preview
|
|
@@ -792,7 +753,7 @@ export declare function resumeProgram(programId: string): Promise<ResumeProgramR
|
|
|
792
753
|
* @applicableIdentity APP
|
|
793
754
|
* @fqn wix.benefit_programs.v1.program.ProgramService.EndProgram
|
|
794
755
|
*/
|
|
795
|
-
export declare function endProgram(programId: string): Promise<EndProgramResponse
|
|
756
|
+
export declare function endProgram(programId: string): Promise<NonNullablePaths<EndProgramResponse, `jobId`>>;
|
|
796
757
|
/**
|
|
797
758
|
* Updates a program.
|
|
798
759
|
*
|
|
@@ -814,7 +775,7 @@ export declare function endProgram(programId: string): Promise<EndProgramRespons
|
|
|
814
775
|
* @returns Updated program.
|
|
815
776
|
* @fqn wix.benefit_programs.v1.program.ProgramService.UpdateProgram
|
|
816
777
|
*/
|
|
817
|
-
export declare function updateProgram(_id: string
|
|
778
|
+
export declare function updateProgram(_id: string, program: NonNullablePaths<UpdateProgram, `revision`>): Promise<NonNullablePaths<Program, ProgramNonNullablePaths>>;
|
|
818
779
|
export interface UpdateProgram {
|
|
819
780
|
/**
|
|
820
781
|
* Program ID.
|
|
@@ -867,10 +828,11 @@ export interface UpdateProgram {
|
|
|
867
828
|
*/
|
|
868
829
|
displayName?: string | null;
|
|
869
830
|
/**
|
|
870
|
-
* Namespace for your app or site's benefit programs.
|
|
831
|
+
* Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
871
832
|
* @minLength 1
|
|
872
833
|
* @maxLength 50
|
|
873
834
|
* @immutable
|
|
835
|
+
* @readonly
|
|
874
836
|
*/
|
|
875
837
|
namespace?: string | null;
|
|
876
838
|
/**
|
|
@@ -883,6 +845,7 @@ export interface UpdateProgram {
|
|
|
883
845
|
* ID for the program defined by you. You can use `externalId` to filter queries.
|
|
884
846
|
* @format GUID
|
|
885
847
|
* @immutable
|
|
848
|
+
* @readonly
|
|
886
849
|
*/
|
|
887
850
|
externalId?: string | null;
|
|
888
851
|
/**
|
|
@@ -908,7 +871,7 @@ export interface UpdateProgram {
|
|
|
908
871
|
* @returns Retrieved program.
|
|
909
872
|
* @fqn wix.benefit_programs.v1.program.ProgramService.GetProgram
|
|
910
873
|
*/
|
|
911
|
-
export declare function getProgram(programId: string): Promise<Program
|
|
874
|
+
export declare function getProgram(programId: string): Promise<NonNullablePaths<Program, ProgramNonNullablePaths>>;
|
|
912
875
|
/**
|
|
913
876
|
* Creates a query to retrieve a list of programs.
|
|
914
877
|
*
|
|
@@ -1013,7 +976,7 @@ export interface ProgramsQueryBuilder {
|
|
|
1013
976
|
}
|
|
1014
977
|
/**
|
|
1015
978
|
* Retrieves a program with the specified external ID and namespace.
|
|
1016
|
-
* @param namespace - Namespace for your app or site's benefit programs.
|
|
979
|
+
* @param namespace - Namespace for your app or site's benefit programs. Namespaces allow you to distinguish between entities that you created and entities that other apps created.
|
|
1017
980
|
* @public
|
|
1018
981
|
* @documentationMaturity preview
|
|
1019
982
|
* @requiredField namespace
|
|
@@ -1029,7 +992,9 @@ export interface ProgramsQueryBuilder {
|
|
|
1029
992
|
* @applicableIdentity APP
|
|
1030
993
|
* @fqn wix.benefit_programs.v1.program.ProgramService.GetProgramByExternalIdAndNamespace
|
|
1031
994
|
*/
|
|
1032
|
-
export declare function getProgramByExternalIdAndNamespace(namespace: string, options: GetProgramByExternalIdAndNamespaceOptions): Promise<GetProgramByExternalIdAndNamespaceResponse
|
|
995
|
+
export declare function getProgramByExternalIdAndNamespace(namespace: string, options: NonNullablePaths<GetProgramByExternalIdAndNamespaceOptions, `externalId`>): Promise<NonNullablePaths<GetProgramByExternalIdAndNamespaceResponse, {
|
|
996
|
+
[P in ProgramNonNullablePaths]: `program.${P}`;
|
|
997
|
+
}[ProgramNonNullablePaths]>>;
|
|
1033
998
|
export interface GetProgramByExternalIdAndNamespaceOptions {
|
|
1034
999
|
/**
|
|
1035
1000
|
* Program's external ID.
|