@wix/auto_sdk_benefit-programs_balances 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.context.d.ts +9 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.context.js +19 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.context.js.map +1 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.http.d.ts +34 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.http.js +296 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.http.js.map +1 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.meta.d.ts +23 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.meta.js +123 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.meta.js.map +1 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.public.d.ts +66 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.public.js +44 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.public.js.map +1 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.types.d.ts +719 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.types.js +63 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.types.js.map +1 -0
- package/build/{benefit-programs-v1-balance-balances.universal-qcbBfXdg.d.mts → cjs/src/benefit-programs-v1-balance-balances.universal.d.ts} +169 -66
- package/build/cjs/src/benefit-programs-v1-balance-balances.universal.js +345 -0
- package/build/cjs/src/benefit-programs-v1-balance-balances.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/benefit-programs-v1-balance-balances.context.d.ts +9 -0
- package/build/es/src/benefit-programs-v1-balance-balances.context.js +9 -0
- package/build/es/src/benefit-programs-v1-balance-balances.context.js.map +1 -0
- package/build/es/src/benefit-programs-v1-balance-balances.http.d.ts +34 -0
- package/build/es/src/benefit-programs-v1-balance-balances.http.js +288 -0
- package/build/es/src/benefit-programs-v1-balance-balances.http.js.map +1 -0
- package/build/es/src/benefit-programs-v1-balance-balances.meta.d.ts +23 -0
- package/build/es/src/benefit-programs-v1-balance-balances.meta.js +92 -0
- package/build/es/src/benefit-programs-v1-balance-balances.meta.js.map +1 -0
- package/build/es/src/benefit-programs-v1-balance-balances.public.d.ts +66 -0
- package/build/es/src/benefit-programs-v1-balance-balances.public.js +29 -0
- package/build/es/src/benefit-programs-v1-balance-balances.public.js.map +1 -0
- package/build/es/src/benefit-programs-v1-balance-balances.types.d.ts +719 -0
- package/build/es/src/benefit-programs-v1-balance-balances.types.js +60 -0
- package/build/es/src/benefit-programs-v1-balance-balances.types.js.map +1 -0
- package/build/{benefit-programs-v1-balance-balances.universal-qcbBfXdg.d.ts → es/src/benefit-programs-v1-balance-balances.universal.d.ts} +169 -66
- package/build/es/src/benefit-programs-v1-balance-balances.universal.js +314 -0
- package/build/es/src/benefit-programs-v1-balance-balances.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.context.d.ts +9 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.context.js +19 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.context.js.map +1 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.http.d.ts +34 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.http.js +296 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.http.js.map +1 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.meta.d.ts +23 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.meta.js +123 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.meta.js.map +1 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.public.d.ts +66 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.public.js +44 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.public.js.map +1 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.types.d.ts +719 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.types.js +63 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.types.js.map +1 -0
- package/build/internal/{benefit-programs-v1-balance-balances.universal-qcbBfXdg.d.mts → cjs/src/benefit-programs-v1-balance-balances.universal.d.ts} +169 -66
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.universal.js +345 -0
- package/build/internal/cjs/src/benefit-programs-v1-balance-balances.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.context.d.ts +9 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.context.js +9 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.context.js.map +1 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.http.d.ts +34 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.http.js +288 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.http.js.map +1 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.meta.d.ts +23 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.meta.js +92 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.meta.js.map +1 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.public.d.ts +66 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.public.js +29 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.public.js.map +1 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.types.d.ts +719 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.types.js +60 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.types.js.map +1 -0
- package/build/internal/{benefit-programs-v1-balance-balances.universal-qcbBfXdg.d.ts → es/src/benefit-programs-v1-balance-balances.universal.d.ts} +169 -66
- package/build/internal/es/src/benefit-programs-v1-balance-balances.universal.js +314 -0
- package/build/internal/es/src/benefit-programs-v1-balance-balances.universal.js.map +1 -0
- package/package.json +13 -14
- package/build/index.d.mts +0 -72
- package/build/index.d.ts +0 -72
- package/build/index.js +0 -573
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -538
- package/build/index.mjs.map +0 -1
- package/build/internal/index.d.mts +0 -72
- package/build/internal/index.d.ts +0 -72
- package/build/internal/index.js +0 -573
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -538
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -431
- package/build/internal/meta.d.ts +0 -431
- package/build/internal/meta.js +0 -391
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -360
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -431
- package/build/meta.d.ts +0 -431
- package/build/meta.js +0 -391
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -360
- package/build/meta.mjs.map +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebhookIdentityType = exports.TransactionReversibility = exports.Type = exports.LimitRule = exports.ChangeBalanceRequestType = exports.SortOrder = exports.IdentityType = void 0;
|
|
4
|
+
var IdentityType;
|
|
5
|
+
(function (IdentityType) {
|
|
6
|
+
/** Unknown type. This value is not used. */
|
|
7
|
+
IdentityType["UNKNOWN"] = "UNKNOWN";
|
|
8
|
+
/** A site visitor who has not logged in. */
|
|
9
|
+
IdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
10
|
+
/** A logged-in site member. */
|
|
11
|
+
IdentityType["MEMBER"] = "MEMBER";
|
|
12
|
+
/** A Wix account holder, such as a site owner or contributor. */
|
|
13
|
+
IdentityType["WIX_USER"] = "WIX_USER";
|
|
14
|
+
})(IdentityType || (exports.IdentityType = IdentityType = {}));
|
|
15
|
+
var SortOrder;
|
|
16
|
+
(function (SortOrder) {
|
|
17
|
+
/** Ascending sort order. */
|
|
18
|
+
SortOrder["ASC"] = "ASC";
|
|
19
|
+
/** Descending sort order. */
|
|
20
|
+
SortOrder["DESC"] = "DESC";
|
|
21
|
+
})(SortOrder || (exports.SortOrder = SortOrder = {}));
|
|
22
|
+
var ChangeBalanceRequestType;
|
|
23
|
+
(function (ChangeBalanceRequestType) {
|
|
24
|
+
/** Unknown balance change type. */
|
|
25
|
+
ChangeBalanceRequestType["UNKNOWN_OPERATION"] = "UNKNOWN_OPERATION";
|
|
26
|
+
/** Use with `adjustOptions`. */
|
|
27
|
+
ChangeBalanceRequestType["ADJUST"] = "ADJUST";
|
|
28
|
+
/** Use with `setOptions`. */
|
|
29
|
+
ChangeBalanceRequestType["SET"] = "SET";
|
|
30
|
+
})(ChangeBalanceRequestType || (exports.ChangeBalanceRequestType = ChangeBalanceRequestType = {}));
|
|
31
|
+
var LimitRule;
|
|
32
|
+
(function (LimitRule) {
|
|
33
|
+
/** Unknown limit rule */
|
|
34
|
+
LimitRule["UNKNOWN_LIMIT_RULE"] = "UNKNOWN_LIMIT_RULE";
|
|
35
|
+
/** If the limit is exceeded, the operation will fail */
|
|
36
|
+
LimitRule["FAIL"] = "FAIL";
|
|
37
|
+
/** If the limit is exceeded, the operation will succeed but the balance never goes beyond the provided limits. For balance that was already outside of provided limits, it will not be changed. */
|
|
38
|
+
LimitRule["SOFT_ENFORCE"] = "SOFT_ENFORCE";
|
|
39
|
+
/** If the limit is exceeded, the operation will succeed but the balance will be adjusted so that it satisfies the provided limits. If the resulting balance is below the lower_limit, it will be set to the lower_limit. If the resulting balance is above the upper_limit, it will be set to the upper_limit. */
|
|
40
|
+
LimitRule["HARD_ENFORCE"] = "HARD_ENFORCE";
|
|
41
|
+
})(LimitRule || (exports.LimitRule = LimitRule = {}));
|
|
42
|
+
var Type;
|
|
43
|
+
(function (Type) {
|
|
44
|
+
/** Unknown balance change type. */
|
|
45
|
+
Type["UNKNOWN_OPERATION"] = "UNKNOWN_OPERATION";
|
|
46
|
+
})(Type || (exports.Type = Type = {}));
|
|
47
|
+
/** Transaction reversibility results */
|
|
48
|
+
var TransactionReversibility;
|
|
49
|
+
(function (TransactionReversibility) {
|
|
50
|
+
/** Transaction is allowed to be reverted */
|
|
51
|
+
TransactionReversibility["TRANSACTION_IS_REVERSIBLE"] = "TRANSACTION_IS_REVERSIBLE";
|
|
52
|
+
/** Transaction isn't allowed to be reverted, because it was already reverted */
|
|
53
|
+
TransactionReversibility["TRANSACTION_ALREADY_REVERSED"] = "TRANSACTION_ALREADY_REVERSED";
|
|
54
|
+
})(TransactionReversibility || (exports.TransactionReversibility = TransactionReversibility = {}));
|
|
55
|
+
var WebhookIdentityType;
|
|
56
|
+
(function (WebhookIdentityType) {
|
|
57
|
+
WebhookIdentityType["UNKNOWN"] = "UNKNOWN";
|
|
58
|
+
WebhookIdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
|
|
59
|
+
WebhookIdentityType["MEMBER"] = "MEMBER";
|
|
60
|
+
WebhookIdentityType["WIX_USER"] = "WIX_USER";
|
|
61
|
+
WebhookIdentityType["APP"] = "APP";
|
|
62
|
+
})(WebhookIdentityType || (exports.WebhookIdentityType = WebhookIdentityType = {}));
|
|
63
|
+
//# sourceMappingURL=benefit-programs-v1-balance-balances.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"benefit-programs-v1-balance-balances.types.js","sourceRoot":"","sources":["../../../src/benefit-programs-v1-balance-balances.types.ts"],"names":[],"mappings":";;;AA2FA,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,4BAAZ,YAAY,QASvB;AAmLD,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAA4B;IAC5B,wBAAW,CAAA;IACX,6BAA6B;IAC7B,0BAAa,CAAA;AACf,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AA0CD,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,mCAAmC;IACnC,mEAAuC,CAAA;IACvC,gCAAgC;IAChC,6CAAiB,CAAA;IACjB,6BAA6B;IAC7B,uCAAW,CAAA;AACb,CAAC,EAPW,wBAAwB,wCAAxB,wBAAwB,QAOnC;AAcD,IAAY,SASX;AATD,WAAY,SAAS;IACnB,yBAAyB;IACzB,sDAAyC,CAAA;IACzC,wDAAwD;IACxD,0BAAa,CAAA;IACb,mMAAmM;IACnM,0CAA6B,CAAA;IAC7B,kTAAkT;IAClT,0CAA6B,CAAA;AAC/B,CAAC,EATW,SAAS,yBAAT,SAAS,QASpB;AAgID,IAAY,IAGX;AAHD,WAAY,IAAI;IACd,mCAAmC;IACnC,+CAAuC,CAAA;AACzC,CAAC,EAHW,IAAI,oBAAJ,IAAI,QAGf;AAmID,wCAAwC;AACxC,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,4CAA4C;IAC5C,mFAAuD,CAAA;IACvD,gFAAgF;IAChF,yFAA6D,CAAA;AAC/D,CAAC,EALW,wBAAwB,wCAAxB,wBAAwB,QAKnC;AAmJD,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,8DAAuC,CAAA;IACvC,wCAAiB,CAAA;IACjB,4CAAqB,CAAA;IACrB,kCAAW,CAAA;AACb,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
export interface Balance {
|
|
2
3
|
/**
|
|
3
4
|
* Balance ID. This is the same as the associated pool's ID.
|
|
4
5
|
* @format GUID
|
|
@@ -50,7 +51,7 @@ interface Balance {
|
|
|
50
51
|
*/
|
|
51
52
|
lastTransactionId?: string | null;
|
|
52
53
|
}
|
|
53
|
-
interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
54
|
+
export interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
54
55
|
/**
|
|
55
56
|
* ID of a site visitor that hasn't logged in to the site.
|
|
56
57
|
* @format GUID
|
|
@@ -68,7 +69,7 @@ interface CommonIdentificationData extends CommonIdentificationDataIdOneOf {
|
|
|
68
69
|
wixUserId?: string;
|
|
69
70
|
}
|
|
70
71
|
/** @oneof */
|
|
71
|
-
interface CommonIdentificationDataIdOneOf {
|
|
72
|
+
export interface CommonIdentificationDataIdOneOf {
|
|
72
73
|
/**
|
|
73
74
|
* ID of a site visitor that hasn't logged in to the site.
|
|
74
75
|
* @format GUID
|
|
@@ -85,7 +86,7 @@ interface CommonIdentificationDataIdOneOf {
|
|
|
85
86
|
*/
|
|
86
87
|
wixUserId?: string;
|
|
87
88
|
}
|
|
88
|
-
declare enum IdentityType {
|
|
89
|
+
export declare enum IdentityType {
|
|
89
90
|
/** Unknown type. This value is not used. */
|
|
90
91
|
UNKNOWN = "UNKNOWN",
|
|
91
92
|
/** A site visitor who has not logged in. */
|
|
@@ -95,7 +96,7 @@ declare enum IdentityType {
|
|
|
95
96
|
/** A Wix account holder, such as a site owner or contributor. */
|
|
96
97
|
WIX_USER = "WIX_USER"
|
|
97
98
|
}
|
|
98
|
-
interface BalanceAmount {
|
|
99
|
+
export interface BalanceAmount {
|
|
99
100
|
/**
|
|
100
101
|
* number of available credits.
|
|
101
102
|
* @decimalValue options { maxScale:4 }
|
|
@@ -103,7 +104,7 @@ interface BalanceAmount {
|
|
|
103
104
|
*/
|
|
104
105
|
available?: string;
|
|
105
106
|
}
|
|
106
|
-
interface PoolInfo {
|
|
107
|
+
export interface PoolInfo {
|
|
107
108
|
/**
|
|
108
109
|
* Pool ID.
|
|
109
110
|
* @format GUID
|
|
@@ -140,7 +141,7 @@ interface PoolInfo {
|
|
|
140
141
|
*/
|
|
141
142
|
namespace?: string | null;
|
|
142
143
|
}
|
|
143
|
-
interface ExtendedFields {
|
|
144
|
+
export interface ExtendedFields {
|
|
144
145
|
/**
|
|
145
146
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
146
147
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -151,18 +152,18 @@ interface ExtendedFields {
|
|
|
151
152
|
*/
|
|
152
153
|
namespaces?: Record<string, Record<string, any>>;
|
|
153
154
|
}
|
|
154
|
-
interface GetBalanceRequest {
|
|
155
|
+
export interface GetBalanceRequest {
|
|
155
156
|
/**
|
|
156
157
|
* ID of the pool associated with the balance to retrieve. This is also the ID of the balance.
|
|
157
158
|
* @format GUID
|
|
158
159
|
*/
|
|
159
160
|
poolId: string;
|
|
160
161
|
}
|
|
161
|
-
interface GetBalanceResponse {
|
|
162
|
+
export interface GetBalanceResponse {
|
|
162
163
|
/** Retrieved balance. */
|
|
163
164
|
balance?: Balance;
|
|
164
165
|
}
|
|
165
|
-
interface ListBalancesRequest {
|
|
166
|
+
export interface ListBalancesRequest {
|
|
166
167
|
/**
|
|
167
168
|
* List of IDs of the pools associated with the balances to retrieve. These are also the IDs of the balances.
|
|
168
169
|
* @format GUID
|
|
@@ -172,7 +173,7 @@ interface ListBalancesRequest {
|
|
|
172
173
|
/** Cursor paging. */
|
|
173
174
|
cursorPaging?: CursorPaging;
|
|
174
175
|
}
|
|
175
|
-
interface CursorPaging {
|
|
176
|
+
export interface CursorPaging {
|
|
176
177
|
/**
|
|
177
178
|
* Maximum number of items to return.
|
|
178
179
|
* @max 100
|
|
@@ -187,7 +188,7 @@ interface CursorPaging {
|
|
|
187
188
|
*/
|
|
188
189
|
cursor?: string | null;
|
|
189
190
|
}
|
|
190
|
-
interface ListBalancesResponse {
|
|
191
|
+
export interface ListBalancesResponse {
|
|
191
192
|
/**
|
|
192
193
|
* Retrieved balances.
|
|
193
194
|
* @maxSize 100
|
|
@@ -196,7 +197,7 @@ interface ListBalancesResponse {
|
|
|
196
197
|
/** Metadata for paginated results. */
|
|
197
198
|
metadata?: CursorPagingMetadata;
|
|
198
199
|
}
|
|
199
|
-
interface CursorPagingMetadata {
|
|
200
|
+
export interface CursorPagingMetadata {
|
|
200
201
|
/** Number of items returned in the response. */
|
|
201
202
|
count?: number | null;
|
|
202
203
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -209,7 +210,7 @@ interface CursorPagingMetadata {
|
|
|
209
210
|
*/
|
|
210
211
|
hasNext?: boolean | null;
|
|
211
212
|
}
|
|
212
|
-
interface Cursors {
|
|
213
|
+
export interface Cursors {
|
|
213
214
|
/**
|
|
214
215
|
* Cursor string pointing to the next page in the list of results.
|
|
215
216
|
* @maxLength 16000
|
|
@@ -221,11 +222,11 @@ interface Cursors {
|
|
|
221
222
|
*/
|
|
222
223
|
prev?: string | null;
|
|
223
224
|
}
|
|
224
|
-
interface QueryBalancesRequest {
|
|
225
|
+
export interface QueryBalancesRequest {
|
|
225
226
|
/** Filter, sort, and paging to apply to the query. */
|
|
226
227
|
query?: CursorQuery;
|
|
227
228
|
}
|
|
228
|
-
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
229
|
+
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
229
230
|
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
230
231
|
cursorPaging?: CursorPaging;
|
|
231
232
|
/**
|
|
@@ -241,11 +242,11 @@ interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
241
242
|
sort?: Sorting[];
|
|
242
243
|
}
|
|
243
244
|
/** @oneof */
|
|
244
|
-
interface CursorQueryPagingMethodOneOf {
|
|
245
|
+
export interface CursorQueryPagingMethodOneOf {
|
|
245
246
|
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
246
247
|
cursorPaging?: CursorPaging;
|
|
247
248
|
}
|
|
248
|
-
interface Sorting {
|
|
249
|
+
export interface Sorting {
|
|
249
250
|
/**
|
|
250
251
|
* Field to sort by.
|
|
251
252
|
* @maxLength 512
|
|
@@ -258,19 +259,19 @@ interface Sorting {
|
|
|
258
259
|
*/
|
|
259
260
|
order?: SortOrder;
|
|
260
261
|
}
|
|
261
|
-
declare enum SortOrder {
|
|
262
|
+
export declare enum SortOrder {
|
|
262
263
|
/** Ascending sort order. */
|
|
263
264
|
ASC = "ASC",
|
|
264
265
|
/** Descending sort order. */
|
|
265
266
|
DESC = "DESC"
|
|
266
267
|
}
|
|
267
|
-
interface QueryBalancesResponse {
|
|
268
|
+
export interface QueryBalancesResponse {
|
|
268
269
|
/** List of retrieved balances. */
|
|
269
270
|
balances?: Balance[];
|
|
270
271
|
/** Metadata for the paginated results. */
|
|
271
272
|
metadata?: CursorPagingMetadata;
|
|
272
273
|
}
|
|
273
|
-
interface BalanceChangeBalanceRequest extends BalanceChangeBalanceRequestOperationOneOf {
|
|
274
|
+
export interface BalanceChangeBalanceRequest extends BalanceChangeBalanceRequestOperationOneOf {
|
|
274
275
|
/** Adjust the balance by a specific number of credits. */
|
|
275
276
|
adjustOptions?: AdjustOptions;
|
|
276
277
|
/** Set the balance to a specific number of credits. */
|
|
@@ -294,13 +295,13 @@ interface BalanceChangeBalanceRequest extends BalanceChangeBalanceRequestOperati
|
|
|
294
295
|
transactionDetails?: TransactionDetails;
|
|
295
296
|
}
|
|
296
297
|
/** @oneof */
|
|
297
|
-
interface BalanceChangeBalanceRequestOperationOneOf {
|
|
298
|
+
export interface BalanceChangeBalanceRequestOperationOneOf {
|
|
298
299
|
/** Adjust the balance by a specific number of credits. */
|
|
299
300
|
adjustOptions?: AdjustOptions;
|
|
300
301
|
/** Set the balance to a specific number of credits. */
|
|
301
302
|
setOptions?: SetOptions;
|
|
302
303
|
}
|
|
303
|
-
declare enum ChangeBalanceRequestType {
|
|
304
|
+
export declare enum ChangeBalanceRequestType {
|
|
304
305
|
/** Unknown balance change type. */
|
|
305
306
|
UNKNOWN_OPERATION = "UNKNOWN_OPERATION",
|
|
306
307
|
/** Use with `adjustOptions`. */
|
|
@@ -308,7 +309,7 @@ declare enum ChangeBalanceRequestType {
|
|
|
308
309
|
/** Use with `setOptions`. */
|
|
309
310
|
SET = "SET"
|
|
310
311
|
}
|
|
311
|
-
interface AdjustOptions {
|
|
312
|
+
export interface AdjustOptions {
|
|
312
313
|
/**
|
|
313
314
|
* Amount to change the balance's available credits by.
|
|
314
315
|
* - To increase the balance, specify a positive number.
|
|
@@ -319,7 +320,7 @@ interface AdjustOptions {
|
|
|
319
320
|
/** Beneficiary of the associated pool. */
|
|
320
321
|
beneficiary?: CommonIdentificationData;
|
|
321
322
|
}
|
|
322
|
-
declare enum LimitRule {
|
|
323
|
+
export declare enum LimitRule {
|
|
323
324
|
/** Unknown limit rule */
|
|
324
325
|
UNKNOWN_LIMIT_RULE = "UNKNOWN_LIMIT_RULE",
|
|
325
326
|
/** If the limit is exceeded, the operation will fail */
|
|
@@ -329,7 +330,7 @@ declare enum LimitRule {
|
|
|
329
330
|
/** If the limit is exceeded, the operation will succeed but the balance will be adjusted so that it satisfies the provided limits. If the resulting balance is below the lower_limit, it will be set to the lower_limit. If the resulting balance is above the upper_limit, it will be set to the upper_limit. */
|
|
330
331
|
HARD_ENFORCE = "HARD_ENFORCE"
|
|
331
332
|
}
|
|
332
|
-
interface SetOptions {
|
|
333
|
+
export interface SetOptions {
|
|
333
334
|
/**
|
|
334
335
|
* Amount to set the balance's available credits to.
|
|
335
336
|
*
|
|
@@ -340,7 +341,7 @@ interface SetOptions {
|
|
|
340
341
|
/** Beneficiary of the associated pool. */
|
|
341
342
|
beneficiary?: CommonIdentificationData;
|
|
342
343
|
}
|
|
343
|
-
interface SetInitialOptions {
|
|
344
|
+
export interface SetInitialOptions {
|
|
344
345
|
/**
|
|
345
346
|
* Set the available balance to the provided amount.
|
|
346
347
|
* @decimalValue options { maxScale:4 }
|
|
@@ -349,7 +350,7 @@ interface SetInitialOptions {
|
|
|
349
350
|
/** Benefit pool owner associated with this balance. */
|
|
350
351
|
beneficiary?: CommonIdentificationData;
|
|
351
352
|
}
|
|
352
|
-
interface TransactionDetails {
|
|
353
|
+
export interface TransactionDetails {
|
|
353
354
|
/**
|
|
354
355
|
* Item associated with the transaction.
|
|
355
356
|
* @readonly
|
|
@@ -369,7 +370,7 @@ interface TransactionDetails {
|
|
|
369
370
|
*/
|
|
370
371
|
reason?: string | null;
|
|
371
372
|
}
|
|
372
|
-
interface Item {
|
|
373
|
+
export interface Item {
|
|
373
374
|
/**
|
|
374
375
|
* Item ID.
|
|
375
376
|
* @format GUID
|
|
@@ -401,7 +402,7 @@ interface Item {
|
|
|
401
402
|
*/
|
|
402
403
|
displayName?: string | null;
|
|
403
404
|
}
|
|
404
|
-
interface ChangeBalanceResponse {
|
|
405
|
+
export interface ChangeBalanceResponse {
|
|
405
406
|
/** Updated balance. */
|
|
406
407
|
balance?: Balance;
|
|
407
408
|
/**
|
|
@@ -410,7 +411,7 @@ interface ChangeBalanceResponse {
|
|
|
410
411
|
*/
|
|
411
412
|
transactionId?: string | null;
|
|
412
413
|
}
|
|
413
|
-
interface BalanceExceededLimits {
|
|
414
|
+
export interface BalanceExceededLimits {
|
|
414
415
|
/** Current balance */
|
|
415
416
|
balance?: BalanceAmount;
|
|
416
417
|
/**
|
|
@@ -432,7 +433,7 @@ interface BalanceExceededLimits {
|
|
|
432
433
|
*/
|
|
433
434
|
upperLimit?: string | null;
|
|
434
435
|
}
|
|
435
|
-
interface BulkChangeBalancesRequest {
|
|
436
|
+
export interface BulkChangeBalancesRequest {
|
|
436
437
|
/**
|
|
437
438
|
* List of balances to change.
|
|
438
439
|
* @minSize 1
|
|
@@ -448,11 +449,11 @@ interface BulkChangeBalancesRequest {
|
|
|
448
449
|
/** Whether to return the full balance entities in the response. */
|
|
449
450
|
returnEntity?: boolean;
|
|
450
451
|
}
|
|
451
|
-
declare enum Type {
|
|
452
|
+
export declare enum Type {
|
|
452
453
|
/** Unknown balance change type. */
|
|
453
454
|
UNKNOWN_OPERATION = "UNKNOWN_OPERATION"
|
|
454
455
|
}
|
|
455
|
-
interface ChangeBalanceRequest extends ChangeBalanceRequestOperationOneOf {
|
|
456
|
+
export interface ChangeBalanceRequest extends ChangeBalanceRequestOperationOneOf {
|
|
456
457
|
/**
|
|
457
458
|
* ID of the pool associated with the balance to change. This is also the ID of the balance.
|
|
458
459
|
* @format GUID
|
|
@@ -466,9 +467,9 @@ interface ChangeBalanceRequest extends ChangeBalanceRequestOperationOneOf {
|
|
|
466
467
|
transactionDetails?: TransactionDetails;
|
|
467
468
|
}
|
|
468
469
|
/** @oneof */
|
|
469
|
-
interface ChangeBalanceRequestOperationOneOf {
|
|
470
|
+
export interface ChangeBalanceRequestOperationOneOf {
|
|
470
471
|
}
|
|
471
|
-
interface BulkChangeBalancesResponse {
|
|
472
|
+
export interface BulkChangeBalancesResponse {
|
|
472
473
|
/**
|
|
473
474
|
* Updated item and associated metadata.
|
|
474
475
|
* @minSize 1
|
|
@@ -478,7 +479,7 @@ interface BulkChangeBalancesResponse {
|
|
|
478
479
|
/** Metadata. */
|
|
479
480
|
bulkActionMetadata?: BulkActionMetadata;
|
|
480
481
|
}
|
|
481
|
-
interface ItemMetadata {
|
|
482
|
+
export interface ItemMetadata {
|
|
482
483
|
/**
|
|
483
484
|
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
484
485
|
* @format GUID
|
|
@@ -491,7 +492,7 @@ interface ItemMetadata {
|
|
|
491
492
|
/** Details about the error in case of failure. */
|
|
492
493
|
error?: ApplicationError;
|
|
493
494
|
}
|
|
494
|
-
interface ApplicationError {
|
|
495
|
+
export interface ApplicationError {
|
|
495
496
|
/** Error code. */
|
|
496
497
|
code?: string;
|
|
497
498
|
/** Description of the error. */
|
|
@@ -499,13 +500,13 @@ interface ApplicationError {
|
|
|
499
500
|
/** Data related to the error. */
|
|
500
501
|
data?: Record<string, any> | null;
|
|
501
502
|
}
|
|
502
|
-
interface BulkChangeBalanceResult {
|
|
503
|
+
export interface BulkChangeBalanceResult {
|
|
503
504
|
/** Item metadata. */
|
|
504
505
|
itemMetadata?: ItemMetadata;
|
|
505
506
|
/** Updated item. */
|
|
506
507
|
balance?: Balance;
|
|
507
508
|
}
|
|
508
|
-
interface BulkActionMetadata {
|
|
509
|
+
export interface BulkActionMetadata {
|
|
509
510
|
/** Number of items that were successfully processed. */
|
|
510
511
|
totalSuccesses?: number;
|
|
511
512
|
/** Number of items that couldn't be processed. */
|
|
@@ -513,7 +514,7 @@ interface BulkActionMetadata {
|
|
|
513
514
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
514
515
|
undetailedFailures?: number;
|
|
515
516
|
}
|
|
516
|
-
interface RevertBalanceChangeRequest {
|
|
517
|
+
export interface RevertBalanceChangeRequest {
|
|
517
518
|
/**
|
|
518
519
|
* ID of the transaction associated with the balance change to revert.
|
|
519
520
|
* @format GUID
|
|
@@ -528,14 +529,14 @@ interface RevertBalanceChangeRequest {
|
|
|
528
529
|
/** Identity reverting the balance change. */
|
|
529
530
|
instructingParty?: CommonIdentificationData;
|
|
530
531
|
}
|
|
531
|
-
interface RevertBalanceChangeResponse {
|
|
532
|
+
export interface RevertBalanceChangeResponse {
|
|
532
533
|
/**
|
|
533
534
|
* ID of the transaction associated with the balance reversion.
|
|
534
535
|
* @format GUID
|
|
535
536
|
*/
|
|
536
537
|
transactionId?: string | null;
|
|
537
538
|
}
|
|
538
|
-
interface ChangeAlreadyReverted {
|
|
539
|
+
export interface ChangeAlreadyReverted {
|
|
539
540
|
/**
|
|
540
541
|
* The id of the transaction which was already reverted
|
|
541
542
|
* @format GUID
|
|
@@ -547,7 +548,7 @@ interface ChangeAlreadyReverted {
|
|
|
547
548
|
*/
|
|
548
549
|
revertedTransactionId?: string;
|
|
549
550
|
}
|
|
550
|
-
interface NotEnoughBalance {
|
|
551
|
+
export interface NotEnoughBalance {
|
|
551
552
|
/** Current balance */
|
|
552
553
|
balance?: BalanceAmount;
|
|
553
554
|
/**
|
|
@@ -557,25 +558,25 @@ interface NotEnoughBalance {
|
|
|
557
558
|
*/
|
|
558
559
|
requested?: string;
|
|
559
560
|
}
|
|
560
|
-
interface GetTransactionReversibilityRequest {
|
|
561
|
+
export interface GetTransactionReversibilityRequest {
|
|
561
562
|
/**
|
|
562
563
|
* Id of the transaction to get the reversibility
|
|
563
564
|
* @format GUID
|
|
564
565
|
*/
|
|
565
566
|
transactionId?: string;
|
|
566
567
|
}
|
|
567
|
-
interface GetTransactionReversibilityResponse {
|
|
568
|
+
export interface GetTransactionReversibilityResponse {
|
|
568
569
|
/** The result of transaction reversibility validation */
|
|
569
570
|
transactionReversibility?: TransactionReversibility;
|
|
570
571
|
}
|
|
571
572
|
/** Transaction reversibility results */
|
|
572
|
-
declare enum TransactionReversibility {
|
|
573
|
+
export declare enum TransactionReversibility {
|
|
573
574
|
/** Transaction is allowed to be reverted */
|
|
574
575
|
TRANSACTION_IS_REVERSIBLE = "TRANSACTION_IS_REVERSIBLE",
|
|
575
576
|
/** Transaction isn't allowed to be reverted, because it was already reverted */
|
|
576
577
|
TRANSACTION_ALREADY_REVERSED = "TRANSACTION_ALREADY_REVERSED"
|
|
577
578
|
}
|
|
578
|
-
interface DomainEvent extends DomainEventBodyOneOf {
|
|
579
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
579
580
|
createdEvent?: EntityCreatedEvent;
|
|
580
581
|
updatedEvent?: EntityUpdatedEvent;
|
|
581
582
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -618,19 +619,19 @@ interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
618
619
|
entityEventSequence?: string | null;
|
|
619
620
|
}
|
|
620
621
|
/** @oneof */
|
|
621
|
-
interface DomainEventBodyOneOf {
|
|
622
|
+
export interface DomainEventBodyOneOf {
|
|
622
623
|
createdEvent?: EntityCreatedEvent;
|
|
623
624
|
updatedEvent?: EntityUpdatedEvent;
|
|
624
625
|
deletedEvent?: EntityDeletedEvent;
|
|
625
626
|
actionEvent?: ActionEvent;
|
|
626
627
|
}
|
|
627
|
-
interface EntityCreatedEvent {
|
|
628
|
+
export interface EntityCreatedEvent {
|
|
628
629
|
entity?: string;
|
|
629
630
|
}
|
|
630
|
-
interface RestoreInfo {
|
|
631
|
+
export interface RestoreInfo {
|
|
631
632
|
deletedDate?: Date | null;
|
|
632
633
|
}
|
|
633
|
-
interface EntityUpdatedEvent {
|
|
634
|
+
export interface EntityUpdatedEvent {
|
|
634
635
|
/**
|
|
635
636
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
636
637
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -638,14 +639,14 @@ interface EntityUpdatedEvent {
|
|
|
638
639
|
*/
|
|
639
640
|
currentEntity?: string;
|
|
640
641
|
}
|
|
641
|
-
interface EntityDeletedEvent {
|
|
642
|
+
export interface EntityDeletedEvent {
|
|
642
643
|
/** Entity that was deleted */
|
|
643
644
|
deletedEntity?: string | null;
|
|
644
645
|
}
|
|
645
|
-
interface ActionEvent {
|
|
646
|
+
export interface ActionEvent {
|
|
646
647
|
body?: string;
|
|
647
648
|
}
|
|
648
|
-
interface MessageEnvelope {
|
|
649
|
+
export interface MessageEnvelope {
|
|
649
650
|
/**
|
|
650
651
|
* App instance ID.
|
|
651
652
|
* @format GUID
|
|
@@ -661,7 +662,7 @@ interface MessageEnvelope {
|
|
|
661
662
|
/** Stringify payload. */
|
|
662
663
|
data?: string;
|
|
663
664
|
}
|
|
664
|
-
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
665
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
665
666
|
/**
|
|
666
667
|
* ID of a site visitor that has not logged in to the site.
|
|
667
668
|
* @format GUID
|
|
@@ -686,7 +687,7 @@ interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
686
687
|
identityType?: WebhookIdentityType;
|
|
687
688
|
}
|
|
688
689
|
/** @oneof */
|
|
689
|
-
interface IdentificationDataIdOneOf {
|
|
690
|
+
export interface IdentificationDataIdOneOf {
|
|
690
691
|
/**
|
|
691
692
|
* ID of a site visitor that has not logged in to the site.
|
|
692
693
|
* @format GUID
|
|
@@ -708,14 +709,50 @@ interface IdentificationDataIdOneOf {
|
|
|
708
709
|
*/
|
|
709
710
|
appId?: string;
|
|
710
711
|
}
|
|
711
|
-
declare enum WebhookIdentityType {
|
|
712
|
+
export declare enum WebhookIdentityType {
|
|
712
713
|
UNKNOWN = "UNKNOWN",
|
|
713
714
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
714
715
|
MEMBER = "MEMBER",
|
|
715
716
|
WIX_USER = "WIX_USER",
|
|
716
717
|
APP = "APP"
|
|
717
718
|
}
|
|
718
|
-
|
|
719
|
+
type BalanceNonNullablePaths = `_id` | `beneficiary.anonymousVisitorId` | `beneficiary.memberId` | `beneficiary.wixUserId` | `amount.available` | `poolInfo._id`;
|
|
720
|
+
/**
|
|
721
|
+
* Retrieves a balance.
|
|
722
|
+
* @param poolId - ID of the pool associated with the balance to retrieve. This is also the ID of the balance.
|
|
723
|
+
* @public
|
|
724
|
+
* @documentationMaturity preview
|
|
725
|
+
* @requiredField poolId
|
|
726
|
+
* @permissionId BENEFIT_PROGRAMS.BALANCE_READ
|
|
727
|
+
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
728
|
+
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
729
|
+
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
730
|
+
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
731
|
+
* @permissionScope Manage Events
|
|
732
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
733
|
+
* @applicableIdentity APP
|
|
734
|
+
* @returns Retrieved balance.
|
|
735
|
+
* @fqn wix.benefit_programs.v1.balance.BalanceService.GetBalance
|
|
736
|
+
*/
|
|
737
|
+
export declare function getBalance(poolId: string): Promise<NonNullablePaths<Balance, BalanceNonNullablePaths>>;
|
|
738
|
+
/**
|
|
739
|
+
* Retrieves a list of balances.
|
|
740
|
+
* @public
|
|
741
|
+
* @documentationMaturity preview
|
|
742
|
+
* @permissionId BENEFIT_PROGRAMS.BALANCE_READ
|
|
743
|
+
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
744
|
+
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
745
|
+
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
746
|
+
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
747
|
+
* @permissionScope Manage Events
|
|
748
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
749
|
+
* @applicableIdentity APP
|
|
750
|
+
* @fqn wix.benefit_programs.v1.balance.BalanceService.ListBalances
|
|
751
|
+
*/
|
|
752
|
+
export declare function listBalances(options?: ListBalancesOptions): Promise<NonNullablePaths<ListBalancesResponse, {
|
|
753
|
+
[P in BalanceNonNullablePaths]: `balances.${number}.${P}`;
|
|
754
|
+
}[BalanceNonNullablePaths]>>;
|
|
755
|
+
export interface ListBalancesOptions {
|
|
719
756
|
/**
|
|
720
757
|
* List of IDs of the pools associated with the balances to retrieve. These are also the IDs of the balances.
|
|
721
758
|
* @format GUID
|
|
@@ -725,6 +762,31 @@ interface ListBalancesOptions {
|
|
|
725
762
|
/** Cursor paging. */
|
|
726
763
|
cursorPaging?: CursorPaging;
|
|
727
764
|
}
|
|
765
|
+
/**
|
|
766
|
+
* Creates a query to retrieve a list of balances.
|
|
767
|
+
*
|
|
768
|
+
* The Query Balances method builds a query to retrieve a list of balances and returns a `BalancesQueryBuilder` object.
|
|
769
|
+
*
|
|
770
|
+
* The returned object contains the query definition, which is used to run the query using the `find()` method.
|
|
771
|
+
*
|
|
772
|
+
* You can refine the query by chaining `BalancesQueryBuilder` methods onto the query. `BalancesQueryBuilder` methods enable you to filter, sort, and control the results that Query Balances returns.
|
|
773
|
+
*
|
|
774
|
+
* Query Balances has a default paging limit of 50, which you can override.
|
|
775
|
+
*
|
|
776
|
+
* For a full description of the item object, see the object returned for the `items` property in `BalancesQueryResult`.
|
|
777
|
+
* @public
|
|
778
|
+
* @documentationMaturity preview
|
|
779
|
+
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
780
|
+
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
781
|
+
* @permissionScope SCOPE.BENEFIT_PROGRAMS.READ
|
|
782
|
+
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.READ
|
|
783
|
+
* @permissionScope Manage Events
|
|
784
|
+
* @permissionScopeId SCOPE.EVENTS.MANAGE-EVENTS
|
|
785
|
+
* @permissionId BENEFIT_PROGRAMS.BALANCE_READ
|
|
786
|
+
* @applicableIdentity APP
|
|
787
|
+
* @fqn wix.benefit_programs.v1.balance.BalanceService.QueryBalances
|
|
788
|
+
*/
|
|
789
|
+
export declare function queryBalances(): BalancesQueryBuilder;
|
|
728
790
|
interface QueryCursorResult {
|
|
729
791
|
cursors: Cursors;
|
|
730
792
|
hasNext: () => boolean;
|
|
@@ -732,13 +794,13 @@ interface QueryCursorResult {
|
|
|
732
794
|
length: number;
|
|
733
795
|
pageSize: number;
|
|
734
796
|
}
|
|
735
|
-
interface BalancesQueryResult extends QueryCursorResult {
|
|
797
|
+
export interface BalancesQueryResult extends QueryCursorResult {
|
|
736
798
|
items: Balance[];
|
|
737
799
|
query: BalancesQueryBuilder;
|
|
738
800
|
next: () => Promise<BalancesQueryResult>;
|
|
739
801
|
prev: () => Promise<BalancesQueryResult>;
|
|
740
802
|
}
|
|
741
|
-
interface BalancesQueryBuilder {
|
|
803
|
+
export interface BalancesQueryBuilder {
|
|
742
804
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
743
805
|
* @param value - Value to compare against.
|
|
744
806
|
* @documentationMaturity preview
|
|
@@ -802,7 +864,28 @@ interface BalancesQueryBuilder {
|
|
|
802
864
|
/** @documentationMaturity preview */
|
|
803
865
|
find: () => Promise<BalancesQueryResult>;
|
|
804
866
|
}
|
|
805
|
-
|
|
867
|
+
/**
|
|
868
|
+
* Changes the number of available credits in a balance.
|
|
869
|
+
*
|
|
870
|
+
* You can adjust or set the number of available credits.
|
|
871
|
+
* @param poolId - ID of the pool associated with the balance to change. This is also the ID of the balance.
|
|
872
|
+
* @param idempotencyKey - Unique identifier, generated by the client.
|
|
873
|
+
* Used to recognize repeated attempts to make the same request.
|
|
874
|
+
* @public
|
|
875
|
+
* @documentationMaturity preview
|
|
876
|
+
* @requiredField idempotencyKey
|
|
877
|
+
* @requiredField options.operation
|
|
878
|
+
* @requiredField poolId
|
|
879
|
+
* @permissionId BENEFIT_PROGRAMS.BALANCE_CHANGE
|
|
880
|
+
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
881
|
+
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
882
|
+
* @applicableIdentity APP
|
|
883
|
+
* @fqn wix.benefit_programs.v1.balance.BalanceService.ChangeBalance
|
|
884
|
+
*/
|
|
885
|
+
export declare function changeBalance(poolId: string, idempotencyKey: string, options?: ChangeBalanceOptions): Promise<NonNullablePaths<ChangeBalanceResponse, {
|
|
886
|
+
[P in BalanceNonNullablePaths]: `balance.${P}`;
|
|
887
|
+
}[BalanceNonNullablePaths]>>;
|
|
888
|
+
export interface ChangeBalanceOptions extends ChangeBalanceOptionsOperationOneOf {
|
|
806
889
|
/** Identity changing the balance. */
|
|
807
890
|
instructingParty?: CommonIdentificationData;
|
|
808
891
|
/** Balance change type. */
|
|
@@ -815,15 +898,35 @@ interface ChangeBalanceOptions extends ChangeBalanceOptionsOperationOneOf {
|
|
|
815
898
|
transactionDetails?: TransactionDetails;
|
|
816
899
|
}
|
|
817
900
|
/** @oneof */
|
|
818
|
-
interface ChangeBalanceOptionsOperationOneOf {
|
|
901
|
+
export interface ChangeBalanceOptionsOperationOneOf {
|
|
819
902
|
/** Adjust the balance by a specific number of credits. */
|
|
820
903
|
adjustOptions?: AdjustOptions;
|
|
821
904
|
/** Set the balance to a specific number of credits. */
|
|
822
905
|
setOptions?: SetOptions;
|
|
823
906
|
}
|
|
824
|
-
|
|
907
|
+
/**
|
|
908
|
+
* Reverts a transaction created by calling Change Balance.
|
|
909
|
+
*
|
|
910
|
+
* For example, if a transaction increased a balance's available credits by 5,
|
|
911
|
+
* calling Revert Balance Change with the transaction's ID will decrease the balance's available credit by 5.
|
|
912
|
+
*
|
|
913
|
+
* > **Note:** If the Change Balance call set the balance, Revert Transaction reverts the amount the balance changed by, ensuring subsequent balance changes are still reflected after the reversion.
|
|
914
|
+
* @param transactionId - ID of the transaction associated with the balance change to revert.
|
|
915
|
+
* @param idempotencyKey - Unique identifier, generated by the client.
|
|
916
|
+
* Used to recognize repeated attempts to make the same request.
|
|
917
|
+
* @public
|
|
918
|
+
* @documentationMaturity preview
|
|
919
|
+
* @requiredField idempotencyKey
|
|
920
|
+
* @requiredField transactionId
|
|
921
|
+
* @permissionId BENEFIT_PROGRAMS.BALANCE_CHANGE
|
|
922
|
+
* @permissionScope SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
923
|
+
* @permissionScopeId SCOPE.BENEFIT_PROGRAMS.MANAGE
|
|
924
|
+
* @applicableIdentity APP
|
|
925
|
+
* @fqn wix.benefit_programs.v1.balance.BalanceService.RevertBalanceChange
|
|
926
|
+
*/
|
|
927
|
+
export declare function revertBalanceChange(transactionId: string, idempotencyKey: string, options?: RevertBalanceChangeOptions): Promise<RevertBalanceChangeResponse>;
|
|
928
|
+
export interface RevertBalanceChangeOptions {
|
|
825
929
|
/** Identity reverting the balance change. */
|
|
826
930
|
instructingParty?: CommonIdentificationData;
|
|
827
931
|
}
|
|
828
|
-
|
|
829
|
-
export { type DomainEventBodyOneOf as $, type AdjustOptions as A, type Balance as B, type ChangeBalanceOptions as C, type BulkChangeBalancesRequest as D, type ExtendedFields as E, type ChangeBalanceRequest as F, type GetBalanceRequest as G, type ChangeBalanceRequestOperationOneOf as H, IdentityType as I, type BulkChangeBalancesResponse as J, type ItemMetadata as K, type ListBalancesOptions as L, type ApplicationError as M, type BulkChangeBalanceResult as N, type BulkActionMetadata as O, type PoolInfo as P, type QueryBalancesRequest as Q, type RevertBalanceChangeOptions as R, SortOrder as S, Type as T, type RevertBalanceChangeRequest as U, type ChangeAlreadyReverted as V, WebhookIdentityType as W, type NotEnoughBalance as X, type GetTransactionReversibilityRequest as Y, type GetTransactionReversibilityResponse as Z, type DomainEvent as _, type ListBalancesResponse as a, type EntityCreatedEvent as a0, type RestoreInfo as a1, type EntityUpdatedEvent as a2, type EntityDeletedEvent as a3, type ActionEvent as a4, type MessageEnvelope as a5, type IdentificationData as a6, type IdentificationDataIdOneOf as a7, type BalancesQueryResult as a8, type ChangeBalanceOptionsOperationOneOf as a9, type BalancesQueryBuilder as b, type ChangeBalanceResponse as c, type RevertBalanceChangeResponse as d, ChangeBalanceRequestType as e, LimitRule as f, TransactionReversibility as g, type CommonIdentificationData as h, type CommonIdentificationDataIdOneOf as i, type BalanceAmount as j, type GetBalanceResponse as k, type ListBalancesRequest as l, type CursorPaging as m, type CursorPagingMetadata as n, type Cursors as o, type CursorQuery as p, type CursorQueryPagingMethodOneOf as q, type Sorting as r, type QueryBalancesResponse as s, type BalanceChangeBalanceRequest as t, type BalanceChangeBalanceRequestOperationOneOf as u, type SetOptions as v, type SetInitialOptions as w, type TransactionDetails as x, type Item as y, type BalanceExceededLimits as z };
|
|
932
|
+
export {};
|