@foldspace-fe/casdoor-next-auth-kit 0.1.15 → 0.1.17
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/dist/billing/index.d.ts +18 -3
- package/dist/billing/index.js +22 -2
- package/dist/chunk-46V73LSW.js +494 -0
- package/dist/chunk-46V73LSW.js.map +1 -0
- package/dist/{chunk-CLABP4I6.js → chunk-FW4WDHNS.js} +8 -1
- package/dist/chunk-FW4WDHNS.js.map +1 -0
- package/dist/{chunk-5ISF7ZAG.js → chunk-ZCHLJYLN.js} +14 -43
- package/dist/chunk-ZCHLJYLN.js.map +1 -0
- package/dist/cli.js +20 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +23 -3
- package/dist/react/index.d.ts +23 -3
- package/dist/react/index.js +285 -12
- package/dist/react/index.js.map +1 -1
- package/dist/skills/casdoor-next-auth-kit/SKILL.md +17 -4
- package/dist/types-xgHVGy75.d.ts +895 -0
- package/package.json +4 -3
- package/dist/chunk-5ISF7ZAG.js.map +0 -1
- package/dist/chunk-CLABP4I6.js.map +0 -1
- package/dist/chunk-O3FKI5NT.js +0 -187
- package/dist/chunk-O3FKI5NT.js.map +0 -1
- package/dist/types-DwThfdu-.d.ts +0 -362
|
@@ -0,0 +1,895 @@
|
|
|
1
|
+
type BillingItemKind = 'subscription' | 'product';
|
|
2
|
+
type BillingInterval = 'month' | 'year';
|
|
3
|
+
type BillingPurchasableKind = BillingItemKind;
|
|
4
|
+
interface BillingPurchasableEntryBase {
|
|
5
|
+
key: string;
|
|
6
|
+
kind: BillingPurchasableKind;
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
hooks?: BillingPurchaseHooks;
|
|
11
|
+
}
|
|
12
|
+
interface BillingSubscriptionPurchasableEntry extends BillingPurchasableEntryBase {
|
|
13
|
+
kind: 'subscription';
|
|
14
|
+
backendRef: {
|
|
15
|
+
productId: string;
|
|
16
|
+
planId?: string;
|
|
17
|
+
priceId?: string;
|
|
18
|
+
};
|
|
19
|
+
interval?: BillingInterval;
|
|
20
|
+
}
|
|
21
|
+
interface BillingProductPurchasableEntry extends BillingPurchasableEntryBase {
|
|
22
|
+
kind: 'product';
|
|
23
|
+
backendRef: {
|
|
24
|
+
productId: string;
|
|
25
|
+
priceId?: string;
|
|
26
|
+
};
|
|
27
|
+
quantity?: number;
|
|
28
|
+
creditGrant?: {
|
|
29
|
+
creditsPerUnit: number;
|
|
30
|
+
unitName?: string;
|
|
31
|
+
};
|
|
32
|
+
creditRedeem?: {
|
|
33
|
+
productKey: string;
|
|
34
|
+
creditsPerUnit: number;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
type BillingPurchasableEntry = BillingSubscriptionPurchasableEntry | BillingProductPurchasableEntry;
|
|
38
|
+
interface BillingPurchasableWhitelist {
|
|
39
|
+
purchasableIds?: string[];
|
|
40
|
+
purchasables?: BillingPurchasableEntry[];
|
|
41
|
+
}
|
|
42
|
+
interface BillingPurchaseRequest {
|
|
43
|
+
kind: BillingPurchasableKind;
|
|
44
|
+
key: string;
|
|
45
|
+
productId: string;
|
|
46
|
+
productOwner?: string;
|
|
47
|
+
productName?: string;
|
|
48
|
+
providerName?: string;
|
|
49
|
+
pricingName?: string;
|
|
50
|
+
planName?: string;
|
|
51
|
+
userName?: string;
|
|
52
|
+
paymentEnv?: string;
|
|
53
|
+
customPrice?: number;
|
|
54
|
+
quantity?: number;
|
|
55
|
+
returnTo?: string;
|
|
56
|
+
metadata?: Record<string, string>;
|
|
57
|
+
}
|
|
58
|
+
interface BillingCasdoorErrorDetail {
|
|
59
|
+
field?: string;
|
|
60
|
+
value?: string;
|
|
61
|
+
issue?: string;
|
|
62
|
+
location?: string;
|
|
63
|
+
[key: string]: unknown;
|
|
64
|
+
}
|
|
65
|
+
interface BillingCasdoorProviderOption {
|
|
66
|
+
name: string;
|
|
67
|
+
owner?: string;
|
|
68
|
+
title?: string;
|
|
69
|
+
description?: string;
|
|
70
|
+
}
|
|
71
|
+
interface BillingCasdoorProviderDetail extends BillingCasdoorProviderOption {
|
|
72
|
+
createdTime?: string;
|
|
73
|
+
displayName?: string;
|
|
74
|
+
category?: string;
|
|
75
|
+
type?: string;
|
|
76
|
+
subType?: string;
|
|
77
|
+
method?: string;
|
|
78
|
+
clientId?: string;
|
|
79
|
+
clientSecret?: string;
|
|
80
|
+
clientId2?: string;
|
|
81
|
+
clientSecret2?: string;
|
|
82
|
+
cert?: string;
|
|
83
|
+
customAuthUrl?: string;
|
|
84
|
+
customTokenUrl?: string;
|
|
85
|
+
customUserInfoUrl?: string;
|
|
86
|
+
customLogo?: string;
|
|
87
|
+
scopes?: string;
|
|
88
|
+
userMapping?: Record<string, string>;
|
|
89
|
+
httpHeaders?: Record<string, string> | null;
|
|
90
|
+
host?: string;
|
|
91
|
+
port?: number;
|
|
92
|
+
disableSsl?: boolean;
|
|
93
|
+
content?: string;
|
|
94
|
+
receiver?: string;
|
|
95
|
+
regionId?: string;
|
|
96
|
+
signName?: string;
|
|
97
|
+
templateCode?: string;
|
|
98
|
+
appId?: string;
|
|
99
|
+
endpoint?: string;
|
|
100
|
+
intranetEndpoint?: string;
|
|
101
|
+
domain?: string;
|
|
102
|
+
bucket?: string;
|
|
103
|
+
pathPrefix?: string;
|
|
104
|
+
metadata?: string;
|
|
105
|
+
idP?: string;
|
|
106
|
+
issuerUrl?: string;
|
|
107
|
+
enableSignAuthnRequest?: boolean;
|
|
108
|
+
emailRegex?: string;
|
|
109
|
+
providerUrl?: string;
|
|
110
|
+
enableProxy?: boolean;
|
|
111
|
+
}
|
|
112
|
+
interface BillingCasdoorOrganizationOption {
|
|
113
|
+
name: string;
|
|
114
|
+
displayName?: string;
|
|
115
|
+
}
|
|
116
|
+
interface BillingCasdoorOrganizationDetail extends BillingCasdoorOrganizationOption {
|
|
117
|
+
owner?: string;
|
|
118
|
+
createdTime?: string;
|
|
119
|
+
websiteUrl?: string;
|
|
120
|
+
logo?: string;
|
|
121
|
+
logoDark?: string;
|
|
122
|
+
favicon?: string;
|
|
123
|
+
hasPrivilegeConsent?: boolean;
|
|
124
|
+
passwordType?: string;
|
|
125
|
+
passwordSalt?: string;
|
|
126
|
+
passwordOptions?: unknown;
|
|
127
|
+
passwordObfuscatorType?: string;
|
|
128
|
+
passwordObfuscatorKey?: string;
|
|
129
|
+
passwordExpireDays?: number;
|
|
130
|
+
countryCodes?: string[] | null;
|
|
131
|
+
defaultAvatar?: string;
|
|
132
|
+
defaultApplication?: string;
|
|
133
|
+
userTypes?: unknown;
|
|
134
|
+
tags?: unknown;
|
|
135
|
+
languages?: string[] | null;
|
|
136
|
+
themeData?: unknown;
|
|
137
|
+
masterPassword?: string;
|
|
138
|
+
defaultPassword?: string;
|
|
139
|
+
masterVerificationCode?: string;
|
|
140
|
+
ipWhitelist?: string;
|
|
141
|
+
initScore?: number;
|
|
142
|
+
enableSoftDeletion?: boolean;
|
|
143
|
+
isProfilePublic?: boolean;
|
|
144
|
+
useEmailAsUsername?: boolean;
|
|
145
|
+
enableTour?: boolean;
|
|
146
|
+
disableSignin?: boolean;
|
|
147
|
+
ipRestriction?: string;
|
|
148
|
+
navItems?: string[] | null;
|
|
149
|
+
userNavItems?: unknown;
|
|
150
|
+
widgetItems?: unknown;
|
|
151
|
+
mfaItems?: unknown;
|
|
152
|
+
mfaRememberInHours?: number;
|
|
153
|
+
accountItems?: unknown;
|
|
154
|
+
orgBalance?: number;
|
|
155
|
+
userBalance?: number;
|
|
156
|
+
balanceCredit?: number;
|
|
157
|
+
balanceCurrency?: string;
|
|
158
|
+
}
|
|
159
|
+
interface BillingCasdoorProductDetail {
|
|
160
|
+
owner: string;
|
|
161
|
+
name: string;
|
|
162
|
+
createdTime?: string;
|
|
163
|
+
displayName?: string;
|
|
164
|
+
image?: string;
|
|
165
|
+
detail?: string;
|
|
166
|
+
description?: string;
|
|
167
|
+
tag?: string;
|
|
168
|
+
providers?: string[];
|
|
169
|
+
providerObjs?: BillingCasdoorProviderDetail[];
|
|
170
|
+
successUrl?: string;
|
|
171
|
+
returnUrl?: string;
|
|
172
|
+
price?: number;
|
|
173
|
+
currency?: string;
|
|
174
|
+
quantity?: number;
|
|
175
|
+
sold?: number;
|
|
176
|
+
isRecharge?: boolean;
|
|
177
|
+
state?: string;
|
|
178
|
+
}
|
|
179
|
+
interface BillingCasdoorErrorPayload {
|
|
180
|
+
code?: string;
|
|
181
|
+
message?: string;
|
|
182
|
+
detail?: BillingCasdoorErrorDetail;
|
|
183
|
+
[key: string]: unknown;
|
|
184
|
+
}
|
|
185
|
+
interface BillingCasdoorApiResponse<TData = unknown> {
|
|
186
|
+
status: string;
|
|
187
|
+
msg: string;
|
|
188
|
+
sub: string;
|
|
189
|
+
name: string;
|
|
190
|
+
data: TData;
|
|
191
|
+
data2: unknown | null;
|
|
192
|
+
data3: unknown | null;
|
|
193
|
+
}
|
|
194
|
+
type BillingCasdoorProductResponse = BillingCasdoorApiResponse<BillingCasdoorProductDetail>;
|
|
195
|
+
interface BillingCasdoorAccountMultiFactorAuthDetail {
|
|
196
|
+
enabled: boolean;
|
|
197
|
+
isPreferred: boolean;
|
|
198
|
+
mfaType: string;
|
|
199
|
+
mfaRememberInHours: number;
|
|
200
|
+
}
|
|
201
|
+
interface BillingCasdoorAccountDetail {
|
|
202
|
+
owner: string;
|
|
203
|
+
name: string;
|
|
204
|
+
createdTime?: string;
|
|
205
|
+
updatedTime?: string;
|
|
206
|
+
deletedTime?: string;
|
|
207
|
+
id?: string;
|
|
208
|
+
externalId?: string;
|
|
209
|
+
type?: string;
|
|
210
|
+
password?: string;
|
|
211
|
+
passwordSalt?: string;
|
|
212
|
+
passwordType?: string;
|
|
213
|
+
displayName?: string;
|
|
214
|
+
firstName?: string;
|
|
215
|
+
lastName?: string;
|
|
216
|
+
avatar?: string;
|
|
217
|
+
avatarType?: string;
|
|
218
|
+
permanentAvatar?: string;
|
|
219
|
+
email?: string;
|
|
220
|
+
emailVerified?: boolean;
|
|
221
|
+
phone?: string;
|
|
222
|
+
countryCode?: string;
|
|
223
|
+
region?: string;
|
|
224
|
+
location?: string;
|
|
225
|
+
address?: string[] | null;
|
|
226
|
+
affiliation?: string;
|
|
227
|
+
title?: string;
|
|
228
|
+
idCardType?: string;
|
|
229
|
+
idCard?: string;
|
|
230
|
+
homepage?: string;
|
|
231
|
+
bio?: string;
|
|
232
|
+
tag?: string;
|
|
233
|
+
language?: string;
|
|
234
|
+
gender?: string;
|
|
235
|
+
birthday?: string;
|
|
236
|
+
education?: string;
|
|
237
|
+
score?: number;
|
|
238
|
+
karma?: number;
|
|
239
|
+
ranking?: number;
|
|
240
|
+
balance?: number;
|
|
241
|
+
balanceCredit?: number;
|
|
242
|
+
currency?: string;
|
|
243
|
+
balanceCurrency?: string;
|
|
244
|
+
isDefaultAvatar?: boolean;
|
|
245
|
+
isOnline?: boolean;
|
|
246
|
+
isAdmin?: boolean;
|
|
247
|
+
isForbidden?: boolean;
|
|
248
|
+
isDeleted?: boolean;
|
|
249
|
+
signupApplication?: string;
|
|
250
|
+
hash?: string;
|
|
251
|
+
preHash?: string;
|
|
252
|
+
registerType?: string;
|
|
253
|
+
registerSource?: string;
|
|
254
|
+
accessKey?: string;
|
|
255
|
+
accessSecret?: string;
|
|
256
|
+
accessToken?: string;
|
|
257
|
+
originalToken?: string;
|
|
258
|
+
createdIp?: string;
|
|
259
|
+
lastSigninTime?: string;
|
|
260
|
+
lastSigninIp?: string;
|
|
261
|
+
properties?: Record<string, string>;
|
|
262
|
+
roles?: string[];
|
|
263
|
+
permissions?: string[];
|
|
264
|
+
groups?: string[];
|
|
265
|
+
lastChangePasswordTime?: string;
|
|
266
|
+
lastSigninWrongTime?: string;
|
|
267
|
+
signinWrongTimes?: number;
|
|
268
|
+
managedAccounts?: unknown[] | null;
|
|
269
|
+
mfaAccounts?: unknown[] | null;
|
|
270
|
+
mfaItems?: unknown[] | null;
|
|
271
|
+
mfaRememberDeadline?: string;
|
|
272
|
+
needUpdatePassword?: boolean;
|
|
273
|
+
ipWhitelist?: string;
|
|
274
|
+
webauthnCredentials?: unknown[] | null;
|
|
275
|
+
preferredMfaType?: string;
|
|
276
|
+
recoveryCodes?: string[] | null;
|
|
277
|
+
totpSecret?: string;
|
|
278
|
+
mfaPhoneEnabled?: boolean;
|
|
279
|
+
mfaEmailEnabled?: boolean;
|
|
280
|
+
mfaRadiusEnabled?: boolean;
|
|
281
|
+
mfaRadiusUsername?: string;
|
|
282
|
+
mfaRadiusProvider?: string;
|
|
283
|
+
mfaPushEnabled?: boolean;
|
|
284
|
+
mfaPushReceiver?: string;
|
|
285
|
+
mfaPushProvider?: string;
|
|
286
|
+
multiFactorAuths?: BillingCasdoorAccountMultiFactorAuthDetail[];
|
|
287
|
+
invitation?: string;
|
|
288
|
+
invitationCode?: string;
|
|
289
|
+
faceIds?: unknown[] | null;
|
|
290
|
+
ldap?: string;
|
|
291
|
+
[key: string]: unknown;
|
|
292
|
+
}
|
|
293
|
+
type BillingCasdoorAccountResponse = BillingCasdoorApiResponse<BillingCasdoorAccountDetail>;
|
|
294
|
+
interface BillingCasdoorApplicationProviderDetail {
|
|
295
|
+
owner?: string;
|
|
296
|
+
name?: string;
|
|
297
|
+
canSignUp?: boolean;
|
|
298
|
+
canSignIn?: boolean;
|
|
299
|
+
canUnlink?: boolean;
|
|
300
|
+
countryCodes?: string[] | null;
|
|
301
|
+
prompted?: boolean;
|
|
302
|
+
signupGroup?: string;
|
|
303
|
+
rule?: string;
|
|
304
|
+
provider?: BillingCasdoorProviderDetail;
|
|
305
|
+
}
|
|
306
|
+
interface BillingCasdoorApplicationSigninMethodDetail {
|
|
307
|
+
name?: string;
|
|
308
|
+
displayName?: string;
|
|
309
|
+
rule?: string;
|
|
310
|
+
}
|
|
311
|
+
interface BillingCasdoorApplicationSignupItemDetail {
|
|
312
|
+
name?: string;
|
|
313
|
+
visible?: boolean;
|
|
314
|
+
required?: boolean;
|
|
315
|
+
prompted?: boolean;
|
|
316
|
+
type?: string;
|
|
317
|
+
customCss?: string;
|
|
318
|
+
label?: string;
|
|
319
|
+
placeholder?: string;
|
|
320
|
+
options?: string[] | null;
|
|
321
|
+
regex?: string;
|
|
322
|
+
rule?: string;
|
|
323
|
+
}
|
|
324
|
+
interface BillingCasdoorApplicationSigninItemDetail {
|
|
325
|
+
name?: string;
|
|
326
|
+
visible?: boolean;
|
|
327
|
+
label?: string;
|
|
328
|
+
customCss?: string;
|
|
329
|
+
placeholder?: string;
|
|
330
|
+
rule?: string;
|
|
331
|
+
isCustom?: boolean;
|
|
332
|
+
}
|
|
333
|
+
interface BillingCasdoorApplicationDetail extends BillingCasdoorOrganizationDetail {
|
|
334
|
+
organization?: string;
|
|
335
|
+
cert?: string;
|
|
336
|
+
defaultGroup?: string;
|
|
337
|
+
headerHtml?: string;
|
|
338
|
+
enablePassword?: boolean;
|
|
339
|
+
enableSignUp?: boolean;
|
|
340
|
+
disableSignin?: boolean;
|
|
341
|
+
enableSigninSession?: boolean;
|
|
342
|
+
enableAutoSignin?: boolean;
|
|
343
|
+
enableCodeSignin?: boolean;
|
|
344
|
+
enableExclusiveSignin?: boolean;
|
|
345
|
+
enableSamlCompress?: boolean;
|
|
346
|
+
enableSamlC14n10?: boolean;
|
|
347
|
+
enableSamlPostBinding?: boolean;
|
|
348
|
+
useEmailAsSamlNameId?: boolean;
|
|
349
|
+
enableWebAuthn?: boolean;
|
|
350
|
+
enableLinkWithEmail?: boolean;
|
|
351
|
+
orgChoiceMode?: string;
|
|
352
|
+
samlReplyUrl?: string;
|
|
353
|
+
providers?: BillingCasdoorApplicationProviderDetail[];
|
|
354
|
+
signinMethods?: BillingCasdoorApplicationSigninMethodDetail[];
|
|
355
|
+
signupItems?: BillingCasdoorApplicationSignupItemDetail[];
|
|
356
|
+
signinItems?: BillingCasdoorApplicationSigninItemDetail[];
|
|
357
|
+
grantTypes?: string[];
|
|
358
|
+
organizationObj?: BillingCasdoorOrganizationDetail;
|
|
359
|
+
certPublicKey?: string;
|
|
360
|
+
tags?: string[];
|
|
361
|
+
samlAttributes?: Record<string, string> | null;
|
|
362
|
+
samlHashAlgorithm?: string;
|
|
363
|
+
isShared?: boolean;
|
|
364
|
+
ipRestriction?: string;
|
|
365
|
+
clientId?: string;
|
|
366
|
+
clientSecret?: string;
|
|
367
|
+
redirectUris?: string[];
|
|
368
|
+
forcedRedirectOrigin?: string;
|
|
369
|
+
tokenFormat?: string;
|
|
370
|
+
tokenSigningMethod?: string;
|
|
371
|
+
tokenFields?: string[];
|
|
372
|
+
tokenAttributes?: string[];
|
|
373
|
+
expireInHours?: number;
|
|
374
|
+
refreshExpireInHours?: number;
|
|
375
|
+
signupUrl?: string;
|
|
376
|
+
signinUrl?: string;
|
|
377
|
+
forgetUrl?: string;
|
|
378
|
+
affiliationUrl?: string;
|
|
379
|
+
termsOfUse?: string;
|
|
380
|
+
signupHtml?: string;
|
|
381
|
+
signinHtml?: string;
|
|
382
|
+
themeData?: unknown;
|
|
383
|
+
footerHtml?: string;
|
|
384
|
+
formCss?: string;
|
|
385
|
+
formCssMobile?: string;
|
|
386
|
+
formOffset?: number;
|
|
387
|
+
formSideHtml?: string;
|
|
388
|
+
formBackgroundUrl?: string;
|
|
389
|
+
formBackgroundUrlMobile?: string;
|
|
390
|
+
failedSigninLimit?: number;
|
|
391
|
+
failedSigninFrozenTime?: number;
|
|
392
|
+
codeResendTimeout?: number;
|
|
393
|
+
}
|
|
394
|
+
type BillingCasdoorApplicationResponse = BillingCasdoorApiResponse<BillingCasdoorApplicationDetail>;
|
|
395
|
+
interface BillingCasdoorPaymentDetail {
|
|
396
|
+
owner: string;
|
|
397
|
+
name: string;
|
|
398
|
+
createdTime?: string;
|
|
399
|
+
displayName?: string;
|
|
400
|
+
provider?: string;
|
|
401
|
+
type?: string;
|
|
402
|
+
productName?: string;
|
|
403
|
+
productDisplayName?: string;
|
|
404
|
+
detail?: string;
|
|
405
|
+
tag?: string;
|
|
406
|
+
currency?: string;
|
|
407
|
+
price?: number;
|
|
408
|
+
returnUrl?: string;
|
|
409
|
+
isRecharge?: boolean;
|
|
410
|
+
user?: string;
|
|
411
|
+
personName?: string;
|
|
412
|
+
personIdCard?: string;
|
|
413
|
+
personEmail?: string;
|
|
414
|
+
personPhone?: string;
|
|
415
|
+
invoiceType?: string;
|
|
416
|
+
invoiceTitle?: string;
|
|
417
|
+
invoiceTaxId?: string;
|
|
418
|
+
invoiceRemark?: string;
|
|
419
|
+
invoiceUrl?: string;
|
|
420
|
+
outOrderId?: string;
|
|
421
|
+
payUrl?: string;
|
|
422
|
+
successUrl?: string;
|
|
423
|
+
state?: string;
|
|
424
|
+
message?: string;
|
|
425
|
+
[key: string]: unknown;
|
|
426
|
+
}
|
|
427
|
+
type BillingCasdoorPaymentResponse = BillingCasdoorApiResponse<BillingCasdoorPaymentDetail>;
|
|
428
|
+
type BillingCasdoorOrganizationNamesResponse = BillingCasdoorApiResponse<BillingCasdoorOrganizationDetail[]>;
|
|
429
|
+
interface BillingCasdoorBuyProductRequest {
|
|
430
|
+
id: string;
|
|
431
|
+
providerName: string;
|
|
432
|
+
pricingName?: string;
|
|
433
|
+
planName?: string;
|
|
434
|
+
userName?: string;
|
|
435
|
+
paymentEnv?: string;
|
|
436
|
+
customPrice?: number;
|
|
437
|
+
}
|
|
438
|
+
type BillingCasdoorBuyProductResponse = BillingCasdoorApiResponse<unknown>;
|
|
439
|
+
interface BillingOrderCreatedContext {
|
|
440
|
+
request: BillingPurchaseRequest;
|
|
441
|
+
purchasable: BillingPurchasableEntry;
|
|
442
|
+
orderId: string | null;
|
|
443
|
+
paymentId: string | null;
|
|
444
|
+
redirectTo: string | null;
|
|
445
|
+
rawResult: unknown;
|
|
446
|
+
}
|
|
447
|
+
interface BillingPurchaseErrorContext {
|
|
448
|
+
request: BillingPurchaseRequest;
|
|
449
|
+
orderId: string | null;
|
|
450
|
+
paymentId: string | null;
|
|
451
|
+
status: 'failed';
|
|
452
|
+
message: string;
|
|
453
|
+
errorCode?: string;
|
|
454
|
+
redirectTo: string | null;
|
|
455
|
+
rawResult: unknown;
|
|
456
|
+
}
|
|
457
|
+
interface BillingPaymentCallbackContext {
|
|
458
|
+
request: Request;
|
|
459
|
+
url: URL;
|
|
460
|
+
searchParams: URLSearchParams;
|
|
461
|
+
params: Record<string, string>;
|
|
462
|
+
body: unknown;
|
|
463
|
+
paymentOwner: string | null;
|
|
464
|
+
paymentName: string | null;
|
|
465
|
+
paymentId: string | null;
|
|
466
|
+
orderId: string | null;
|
|
467
|
+
redirectTo: string | null;
|
|
468
|
+
status: 'success' | 'failure' | 'finished';
|
|
469
|
+
}
|
|
470
|
+
type BillingPaymentSuccessContext = BillingPaymentCallbackContext;
|
|
471
|
+
interface BillingPaymentFinishedContext extends BillingPaymentCallbackContext {
|
|
472
|
+
status: 'finished';
|
|
473
|
+
}
|
|
474
|
+
interface BillingPurchaseCompleteContext {
|
|
475
|
+
request: BillingPurchaseRequest;
|
|
476
|
+
orderId: string | null;
|
|
477
|
+
paymentId: string | null;
|
|
478
|
+
status: 'succeeded' | 'failed' | 'canceled';
|
|
479
|
+
redirectTo: string | null;
|
|
480
|
+
}
|
|
481
|
+
interface BillingPurchaseHooks {
|
|
482
|
+
onPurchaseStart?: (context: BillingPurchaseRequest) => void | Promise<void>;
|
|
483
|
+
onOrderCreated?: (context: BillingOrderCreatedContext) => void | Promise<void>;
|
|
484
|
+
onPurchaseError?: (context: BillingPurchaseErrorContext) => void | Promise<void>;
|
|
485
|
+
onPaymentSuccess?: (context: BillingPaymentCallbackContext) => void | Promise<void>;
|
|
486
|
+
onPaymentFailure?: (context: BillingPaymentCallbackContext) => void | Promise<void>;
|
|
487
|
+
onPaymentFinished?: (context: BillingPaymentFinishedContext) => void | Promise<void>;
|
|
488
|
+
onPurchaseComplete?: (context: BillingPurchaseCompleteContext) => void | Promise<void>;
|
|
489
|
+
}
|
|
490
|
+
interface BillingConversionRule {
|
|
491
|
+
productKey: string;
|
|
492
|
+
kind: 'grant-credits' | 'redeem-credits';
|
|
493
|
+
creditsPerUnit: number;
|
|
494
|
+
minQuantity?: number;
|
|
495
|
+
maxQuantity?: number;
|
|
496
|
+
}
|
|
497
|
+
interface BillingDefaults {
|
|
498
|
+
defaultReturnTo?: string;
|
|
499
|
+
defaultQuantity?: number;
|
|
500
|
+
defaultInterval?: BillingInterval;
|
|
501
|
+
}
|
|
502
|
+
interface BillingItem {
|
|
503
|
+
key: string;
|
|
504
|
+
kind: BillingItemKind;
|
|
505
|
+
title: string;
|
|
506
|
+
description?: string;
|
|
507
|
+
featured?: boolean;
|
|
508
|
+
badge?: string;
|
|
509
|
+
priceLabel?: string;
|
|
510
|
+
priceValue?: number;
|
|
511
|
+
interval?: BillingInterval;
|
|
512
|
+
credits?: number;
|
|
513
|
+
features?: string[];
|
|
514
|
+
backendRef: {
|
|
515
|
+
productId: string;
|
|
516
|
+
planId?: string;
|
|
517
|
+
priceId?: string;
|
|
518
|
+
};
|
|
519
|
+
creditGrant?: {
|
|
520
|
+
creditsPerUnit: number;
|
|
521
|
+
unitName?: string;
|
|
522
|
+
};
|
|
523
|
+
creditRedeem?: {
|
|
524
|
+
productKey: string;
|
|
525
|
+
creditsPerUnit: number;
|
|
526
|
+
};
|
|
527
|
+
metadata?: Record<string, string>;
|
|
528
|
+
}
|
|
529
|
+
interface BillingRuntimeConfig {
|
|
530
|
+
catalogKey: string;
|
|
531
|
+
items: BillingItem[];
|
|
532
|
+
purchasableIds?: string[];
|
|
533
|
+
purchasables?: BillingPurchasableEntry[];
|
|
534
|
+
conversionRules?: BillingConversionRule[];
|
|
535
|
+
defaults?: BillingDefaults;
|
|
536
|
+
}
|
|
537
|
+
interface BillingCatalogConfig extends BillingRuntimeConfig {
|
|
538
|
+
title?: string;
|
|
539
|
+
description?: string;
|
|
540
|
+
portalPath?: string;
|
|
541
|
+
successPath?: string;
|
|
542
|
+
cancelPath?: string;
|
|
543
|
+
}
|
|
544
|
+
type BillingPaymentSuccessHandlerResult = void | null | string | Response | {
|
|
545
|
+
redirectTo?: string | null;
|
|
546
|
+
};
|
|
547
|
+
type BillingPaymentSuccessHandler = (context: BillingPaymentSuccessContext) => BillingPaymentSuccessHandlerResult | Promise<BillingPaymentSuccessHandlerResult>;
|
|
548
|
+
type BillingPaymentFinishedHandler = (context: BillingPaymentFinishedContext) => BillingPaymentSuccessHandlerResult | Promise<BillingPaymentSuccessHandlerResult>;
|
|
549
|
+
interface BillingPaymentRouteBaseOptions {
|
|
550
|
+
appUrl?: string;
|
|
551
|
+
fallbackRedirect?: string;
|
|
552
|
+
}
|
|
553
|
+
interface BillingPaymentSuccessRouteOptions extends BillingPaymentRouteBaseOptions {
|
|
554
|
+
handler?: BillingPaymentSuccessHandler;
|
|
555
|
+
phase?: 'success' | 'failure';
|
|
556
|
+
}
|
|
557
|
+
interface BillingPaymentFinishedRouteOptions extends BillingPaymentRouteBaseOptions {
|
|
558
|
+
handler?: BillingPaymentFinishedHandler;
|
|
559
|
+
phase?: 'finished';
|
|
560
|
+
}
|
|
561
|
+
type BillingActionKind = 'purchase' | 'subscribe' | 'manage' | 'upgrade' | 'cancel';
|
|
562
|
+
interface BillingSubscriptionPurchaseConfig {
|
|
563
|
+
productKey: string;
|
|
564
|
+
productId: string;
|
|
565
|
+
planId?: string;
|
|
566
|
+
priceId?: string;
|
|
567
|
+
interval?: BillingInterval;
|
|
568
|
+
quantity?: number;
|
|
569
|
+
metadata?: Record<string, string>;
|
|
570
|
+
}
|
|
571
|
+
interface BillingProductPurchaseConfig {
|
|
572
|
+
productKey: string;
|
|
573
|
+
productId: string;
|
|
574
|
+
priceId?: string;
|
|
575
|
+
quantity?: number;
|
|
576
|
+
creditGrant?: BillingItem['creditGrant'];
|
|
577
|
+
creditRedeem?: BillingItem['creditRedeem'];
|
|
578
|
+
metadata?: Record<string, string>;
|
|
579
|
+
}
|
|
580
|
+
interface BillingActionPayload {
|
|
581
|
+
key: string;
|
|
582
|
+
kind: BillingActionKind;
|
|
583
|
+
productId?: string;
|
|
584
|
+
planId?: string;
|
|
585
|
+
priceId?: string;
|
|
586
|
+
providerName?: string;
|
|
587
|
+
pricingName?: string;
|
|
588
|
+
planName?: string;
|
|
589
|
+
userName?: string;
|
|
590
|
+
paymentEnv?: string;
|
|
591
|
+
customPrice?: number;
|
|
592
|
+
quantity?: number;
|
|
593
|
+
interval?: BillingInterval;
|
|
594
|
+
subscriptionConfig?: BillingSubscriptionPurchaseConfig;
|
|
595
|
+
productConfig?: BillingProductPurchaseConfig;
|
|
596
|
+
returnTo?: string;
|
|
597
|
+
metadata?: Record<string, string>;
|
|
598
|
+
}
|
|
599
|
+
interface BillingProductSnapshot {
|
|
600
|
+
productKey: string;
|
|
601
|
+
productId?: string;
|
|
602
|
+
title?: string;
|
|
603
|
+
kind: BillingItemKind;
|
|
604
|
+
planId?: string;
|
|
605
|
+
priceId?: string;
|
|
606
|
+
interval?: BillingInterval;
|
|
607
|
+
creditGrant?: BillingItem['creditGrant'];
|
|
608
|
+
creditRedeem?: BillingItem['creditRedeem'];
|
|
609
|
+
providers?: string[];
|
|
610
|
+
providerObjs?: BillingCasdoorProviderDetail[];
|
|
611
|
+
metadata?: Record<string, string>;
|
|
612
|
+
}
|
|
613
|
+
interface BillingSubscriptionState {
|
|
614
|
+
subscriptionId?: string;
|
|
615
|
+
planKey?: string;
|
|
616
|
+
planName?: string;
|
|
617
|
+
product?: BillingProductSnapshot;
|
|
618
|
+
status?: 'active' | 'trialing' | 'past_due' | 'canceled' | 'inactive';
|
|
619
|
+
interval?: BillingInterval;
|
|
620
|
+
renewAt?: string;
|
|
621
|
+
cancelAt?: string;
|
|
622
|
+
currentPeriodStart?: string;
|
|
623
|
+
currentPeriodEnd?: string;
|
|
624
|
+
autoRenew?: boolean;
|
|
625
|
+
}
|
|
626
|
+
interface BillingCreditsState {
|
|
627
|
+
balance: number;
|
|
628
|
+
used?: number;
|
|
629
|
+
reserved?: number;
|
|
630
|
+
unit?: string;
|
|
631
|
+
updatedAt?: string;
|
|
632
|
+
}
|
|
633
|
+
interface BillingProductState {
|
|
634
|
+
productKey: string;
|
|
635
|
+
productId?: string;
|
|
636
|
+
title?: string;
|
|
637
|
+
kind: 'product';
|
|
638
|
+
status?: 'active' | 'inactive' | 'archived';
|
|
639
|
+
quantity?: number;
|
|
640
|
+
owned?: boolean;
|
|
641
|
+
creditsBalance?: number;
|
|
642
|
+
creditGrant?: BillingItem['creditGrant'];
|
|
643
|
+
creditRedeem?: BillingItem['creditRedeem'];
|
|
644
|
+
providers?: string[];
|
|
645
|
+
providerObjs?: BillingCasdoorProviderDetail[];
|
|
646
|
+
updatedAt?: string;
|
|
647
|
+
}
|
|
648
|
+
interface BillingOrderHistoryItem {
|
|
649
|
+
orderId: string;
|
|
650
|
+
productKey?: string;
|
|
651
|
+
productId?: string;
|
|
652
|
+
productTitle?: string;
|
|
653
|
+
kind?: 'subscription' | 'product';
|
|
654
|
+
quantity?: number;
|
|
655
|
+
amount?: number;
|
|
656
|
+
currency?: string;
|
|
657
|
+
status?: 'pending' | 'paid' | 'failed' | 'canceled' | 'refunded';
|
|
658
|
+
paymentId?: string;
|
|
659
|
+
transactionId?: string;
|
|
660
|
+
createdAt?: string;
|
|
661
|
+
updatedAt?: string;
|
|
662
|
+
}
|
|
663
|
+
interface BillingPaymentHistoryItem {
|
|
664
|
+
paymentId: string;
|
|
665
|
+
orderId?: string;
|
|
666
|
+
productKey?: string;
|
|
667
|
+
amount?: number;
|
|
668
|
+
currency?: string;
|
|
669
|
+
status?: 'pending' | 'paid' | 'failed' | 'canceled' | 'refunded';
|
|
670
|
+
transactionId?: string;
|
|
671
|
+
createdAt?: string;
|
|
672
|
+
updatedAt?: string;
|
|
673
|
+
}
|
|
674
|
+
interface BillingSubscriptionHistoryItem {
|
|
675
|
+
subscriptionId: string;
|
|
676
|
+
product?: BillingProductSnapshot;
|
|
677
|
+
planKey?: string;
|
|
678
|
+
planName?: string;
|
|
679
|
+
status?: 'active' | 'trialing' | 'past_due' | 'canceled' | 'inactive';
|
|
680
|
+
interval?: BillingInterval;
|
|
681
|
+
orderId?: string;
|
|
682
|
+
paymentId?: string;
|
|
683
|
+
startedAt?: string;
|
|
684
|
+
endedAt?: string;
|
|
685
|
+
updatedAt?: string;
|
|
686
|
+
}
|
|
687
|
+
interface BillingEntitlementState {
|
|
688
|
+
features?: string[];
|
|
689
|
+
limits?: Record<string, number>;
|
|
690
|
+
flags?: Record<string, boolean>;
|
|
691
|
+
}
|
|
692
|
+
interface BillingStatusState {
|
|
693
|
+
loading: boolean;
|
|
694
|
+
refreshing: boolean;
|
|
695
|
+
error: string | null;
|
|
696
|
+
lastFetchedAt?: string;
|
|
697
|
+
}
|
|
698
|
+
interface BillingPurchaseStatus {
|
|
699
|
+
actionKey?: string;
|
|
700
|
+
orderId?: string;
|
|
701
|
+
paymentId?: string;
|
|
702
|
+
transactionId?: string;
|
|
703
|
+
status: 'idle' | 'pending' | 'requires_payment' | 'paid' | 'failed' | 'canceled' | 'refunded';
|
|
704
|
+
orderStatus?: string;
|
|
705
|
+
paymentStatus?: string;
|
|
706
|
+
transactionStatus?: string;
|
|
707
|
+
redirectTo?: string;
|
|
708
|
+
updatedAt?: string;
|
|
709
|
+
}
|
|
710
|
+
interface BillingApiClient {
|
|
711
|
+
fetchRuntimeConfig: (catalogKey: string) => Promise<BillingRuntimeConfig | BillingCatalogConfig>;
|
|
712
|
+
fetchSubscription: (args: {
|
|
713
|
+
userId?: string;
|
|
714
|
+
catalogKey?: string;
|
|
715
|
+
}) => Promise<BillingSubscriptionState>;
|
|
716
|
+
fetchSubscriptionHistory: (args: {
|
|
717
|
+
userId?: string;
|
|
718
|
+
catalogKey?: string;
|
|
719
|
+
}) => Promise<BillingSubscriptionHistoryItem[]>;
|
|
720
|
+
fetchProducts: (args: {
|
|
721
|
+
userId?: string;
|
|
722
|
+
catalogKey?: string;
|
|
723
|
+
}) => Promise<BillingProductState[]>;
|
|
724
|
+
fetchOrderHistory: (args: {
|
|
725
|
+
userId?: string;
|
|
726
|
+
catalogKey?: string;
|
|
727
|
+
productKey?: string;
|
|
728
|
+
}) => Promise<BillingOrderHistoryItem[]>;
|
|
729
|
+
fetchPaymentHistory: (args: {
|
|
730
|
+
userId?: string;
|
|
731
|
+
catalogKey?: string;
|
|
732
|
+
}) => Promise<BillingPaymentHistoryItem[]>;
|
|
733
|
+
fetchPurchaseStatus: (args: {
|
|
734
|
+
orderId?: string;
|
|
735
|
+
paymentId?: string;
|
|
736
|
+
transactionId?: string;
|
|
737
|
+
}) => Promise<BillingPurchaseStatus>;
|
|
738
|
+
fetchCredits: (args: {
|
|
739
|
+
userId?: string;
|
|
740
|
+
catalogKey?: string;
|
|
741
|
+
}) => Promise<BillingCreditsState>;
|
|
742
|
+
fetchEntitlements: (args: {
|
|
743
|
+
userId?: string;
|
|
744
|
+
catalogKey?: string;
|
|
745
|
+
}) => Promise<BillingEntitlementState>;
|
|
746
|
+
fetchAccount?: (args: {
|
|
747
|
+
id?: string;
|
|
748
|
+
}) => Promise<BillingCasdoorAccountResponse>;
|
|
749
|
+
fetchApplication?: (args: {
|
|
750
|
+
id?: string;
|
|
751
|
+
}) => Promise<BillingCasdoorApplicationResponse>;
|
|
752
|
+
fetchPayment?: (args: {
|
|
753
|
+
id?: string;
|
|
754
|
+
}) => Promise<BillingCasdoorPaymentResponse>;
|
|
755
|
+
fetchProduct?: (args: {
|
|
756
|
+
id: string;
|
|
757
|
+
}) => Promise<BillingCasdoorProductResponse>;
|
|
758
|
+
fetchOrganizationNames?: (args: {
|
|
759
|
+
owner: string;
|
|
760
|
+
}) => Promise<BillingCasdoorOrganizationNamesResponse>;
|
|
761
|
+
buyProduct?: (args: BillingCasdoorBuyProductRequest) => Promise<BillingCasdoorBuyProductResponse>;
|
|
762
|
+
createAction: (payload: BillingActionPayload) => Promise<BillingActionExecutionResult>;
|
|
763
|
+
refresh: (args: {
|
|
764
|
+
userId?: string;
|
|
765
|
+
catalogKey?: string;
|
|
766
|
+
}) => Promise<void>;
|
|
767
|
+
}
|
|
768
|
+
interface BillingActionExecutionResult {
|
|
769
|
+
redirectTo?: string;
|
|
770
|
+
nextAction?: string;
|
|
771
|
+
status?: 'pending' | 'succeeded' | 'failed';
|
|
772
|
+
message?: string;
|
|
773
|
+
errorCode?: string;
|
|
774
|
+
orderId?: string;
|
|
775
|
+
paymentId?: string;
|
|
776
|
+
transactionId?: string;
|
|
777
|
+
rawResult?: unknown;
|
|
778
|
+
}
|
|
779
|
+
interface BillingLoaders {
|
|
780
|
+
runtimeConfigLoader?: (catalogKey: string) => Promise<BillingRuntimeConfig | BillingCatalogConfig>;
|
|
781
|
+
subscriptionLoader?: (args: {
|
|
782
|
+
userId?: string;
|
|
783
|
+
catalogKey?: string;
|
|
784
|
+
}) => Promise<BillingSubscriptionState>;
|
|
785
|
+
subscriptionHistoryLoader?: (args: {
|
|
786
|
+
userId?: string;
|
|
787
|
+
catalogKey?: string;
|
|
788
|
+
}) => Promise<BillingSubscriptionHistoryItem[]>;
|
|
789
|
+
productsLoader?: (args: {
|
|
790
|
+
userId?: string;
|
|
791
|
+
catalogKey?: string;
|
|
792
|
+
}) => Promise<BillingProductState[]>;
|
|
793
|
+
orderHistoryLoader?: (args: {
|
|
794
|
+
userId?: string;
|
|
795
|
+
catalogKey?: string;
|
|
796
|
+
productKey?: string;
|
|
797
|
+
}) => Promise<BillingOrderHistoryItem[]>;
|
|
798
|
+
paymentHistoryLoader?: (args: {
|
|
799
|
+
userId?: string;
|
|
800
|
+
catalogKey?: string;
|
|
801
|
+
}) => Promise<BillingPaymentHistoryItem[]>;
|
|
802
|
+
purchaseStatusLoader?: (args: {
|
|
803
|
+
orderId?: string;
|
|
804
|
+
paymentId?: string;
|
|
805
|
+
transactionId?: string;
|
|
806
|
+
}) => Promise<BillingPurchaseStatus>;
|
|
807
|
+
creditsLoader?: (args: {
|
|
808
|
+
userId?: string;
|
|
809
|
+
catalogKey?: string;
|
|
810
|
+
}) => Promise<BillingCreditsState>;
|
|
811
|
+
entitlementsLoader?: (args: {
|
|
812
|
+
userId?: string;
|
|
813
|
+
catalogKey?: string;
|
|
814
|
+
}) => Promise<BillingEntitlementState>;
|
|
815
|
+
accountLoader?: (args: {
|
|
816
|
+
id?: string;
|
|
817
|
+
}) => Promise<BillingCasdoorAccountResponse>;
|
|
818
|
+
applicationLoader?: (args: {
|
|
819
|
+
id?: string;
|
|
820
|
+
}) => Promise<BillingCasdoorApplicationResponse>;
|
|
821
|
+
paymentLoader?: (args: {
|
|
822
|
+
id?: string;
|
|
823
|
+
}) => Promise<BillingCasdoorPaymentResponse>;
|
|
824
|
+
productLoader?: (args: {
|
|
825
|
+
id: string;
|
|
826
|
+
}) => Promise<BillingCasdoorProductResponse>;
|
|
827
|
+
organizationNamesLoader?: (args: {
|
|
828
|
+
owner: string;
|
|
829
|
+
}) => Promise<BillingCasdoorOrganizationNamesResponse>;
|
|
830
|
+
buyProductLoader?: (args: BillingCasdoorBuyProductRequest) => Promise<BillingCasdoorBuyProductResponse>;
|
|
831
|
+
}
|
|
832
|
+
interface BillingActionExecutor {
|
|
833
|
+
(payload: BillingActionPayload): Promise<BillingActionExecutionResult>;
|
|
834
|
+
}
|
|
835
|
+
interface BillingSubscriptionContextValue {
|
|
836
|
+
availablePlans?: BillingItem[];
|
|
837
|
+
subscription?: BillingSubscriptionState;
|
|
838
|
+
subscriptionHistory?: BillingSubscriptionHistoryItem[];
|
|
839
|
+
entitlements?: BillingEntitlementState;
|
|
840
|
+
status?: BillingStatusState;
|
|
841
|
+
}
|
|
842
|
+
interface BillingProductContextValue {
|
|
843
|
+
availableProducts?: BillingItem[];
|
|
844
|
+
products?: BillingProductState[];
|
|
845
|
+
orderHistory?: BillingOrderHistoryItem[];
|
|
846
|
+
paymentHistory?: BillingPaymentHistoryItem[];
|
|
847
|
+
status?: BillingStatusState;
|
|
848
|
+
}
|
|
849
|
+
interface BillingProductDetailState {
|
|
850
|
+
product?: BillingCasdoorProductDetail;
|
|
851
|
+
loading: boolean;
|
|
852
|
+
error: string | null;
|
|
853
|
+
refresh: () => Promise<void>;
|
|
854
|
+
}
|
|
855
|
+
interface BillingCreditsContextValue {
|
|
856
|
+
credits?: BillingCreditsState;
|
|
857
|
+
status?: BillingStatusState;
|
|
858
|
+
}
|
|
859
|
+
interface BillingCoreContextValue {
|
|
860
|
+
apiClient: BillingApiClient;
|
|
861
|
+
runtimeConfigLoader?: BillingLoaders['runtimeConfigLoader'];
|
|
862
|
+
loaders?: BillingLoaders;
|
|
863
|
+
actionExecutor?: BillingActionExecutor;
|
|
864
|
+
defaults?: BillingDefaults;
|
|
865
|
+
purchaseHooks?: BillingPurchaseHooks;
|
|
866
|
+
runtimeConfig?: BillingRuntimeConfig;
|
|
867
|
+
runtimeCatalog?: BillingCatalogConfig;
|
|
868
|
+
runtimeConfigLoading: boolean;
|
|
869
|
+
runtimeConfigError: string | null;
|
|
870
|
+
subscription?: BillingSubscriptionState;
|
|
871
|
+
subscriptionHistory?: BillingSubscriptionHistoryItem[];
|
|
872
|
+
products?: BillingProductState[];
|
|
873
|
+
orderHistory?: BillingOrderHistoryItem[];
|
|
874
|
+
paymentHistory?: BillingPaymentHistoryItem[];
|
|
875
|
+
availablePlans?: BillingItem[];
|
|
876
|
+
availableProducts?: BillingItem[];
|
|
877
|
+
credits?: BillingCreditsState;
|
|
878
|
+
entitlements?: BillingEntitlementState;
|
|
879
|
+
purchaseStatus?: BillingPurchaseStatus;
|
|
880
|
+
status: BillingStatusState;
|
|
881
|
+
refresh: () => Promise<void>;
|
|
882
|
+
runAction: (payload: BillingActionPayload) => Promise<BillingActionExecutionResult>;
|
|
883
|
+
setRuntimeConfig: (config?: BillingRuntimeConfig) => void;
|
|
884
|
+
setSubscription: (value?: BillingSubscriptionState) => void;
|
|
885
|
+
setSubscriptionHistory: (value?: BillingSubscriptionHistoryItem[]) => void;
|
|
886
|
+
setProducts: (value?: BillingProductState[]) => void;
|
|
887
|
+
setOrderHistory: (value?: BillingOrderHistoryItem[]) => void;
|
|
888
|
+
setPaymentHistory: (value?: BillingPaymentHistoryItem[]) => void;
|
|
889
|
+
setCredits: (value?: BillingCreditsState) => void;
|
|
890
|
+
setEntitlements: (value?: BillingEntitlementState) => void;
|
|
891
|
+
setPurchaseStatus: (status?: BillingPurchaseStatus) => void;
|
|
892
|
+
setStatus: (status: BillingStatusState | ((current: BillingStatusState) => BillingStatusState)) => void;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
export type { BillingPaymentFinishedRouteOptions as $, BillingCasdoorApplicationDetail as A, BillingActionPayload as B, BillingCasdoorApplicationProviderDetail as C, BillingCasdoorApplicationResponse as D, BillingCasdoorApplicationSigninItemDetail as E, BillingCasdoorApplicationSigninMethodDetail as F, BillingCasdoorApplicationSignupItemDetail as G, BillingCasdoorBuyProductRequest as H, BillingCasdoorBuyProductResponse as I, BillingCasdoorErrorDetail as J, BillingCasdoorErrorPayload as K, BillingCasdoorOrganizationDetail as L, BillingCasdoorOrganizationNamesResponse as M, BillingCasdoorOrganizationOption as N, BillingCasdoorPaymentDetail as O, BillingCasdoorPaymentResponse as P, BillingCasdoorProductResponse as Q, BillingCasdoorProviderDetail as R, BillingCasdoorProviderOption as S, BillingConversionRule as T, BillingCreditsContextValue as U, BillingInterval as V, BillingItemKind as W, BillingOrderCreatedContext as X, BillingPaymentCallbackContext as Y, BillingPaymentFinishedContext as Z, BillingPaymentFinishedHandler as _, BillingItem as a, BillingPaymentRouteBaseOptions as a0, BillingPaymentSuccessContext as a1, BillingPaymentSuccessHandler as a2, BillingPaymentSuccessHandlerResult as a3, BillingPaymentSuccessRouteOptions as a4, BillingProductContextValue as a5, BillingProductDetailState as a6, BillingProductPurchasableEntry as a7, BillingProductPurchaseConfig as a8, BillingPurchasableEntry as a9, BillingPurchasableEntryBase as aa, BillingPurchasableKind as ab, BillingPurchasableWhitelist as ac, BillingPurchaseCompleteContext as ad, BillingPurchaseErrorContext as ae, BillingPurchaseRequest as af, BillingSubscriptionContextValue as ag, BillingSubscriptionPurchasableEntry as ah, BillingSubscriptionPurchaseConfig as ai, BillingRuntimeConfig as b, BillingCatalogConfig as c, BillingApiClient as d, BillingLoaders as e, BillingActionExecutor as f, BillingDefaults as g, BillingSubscriptionState as h, BillingSubscriptionHistoryItem as i, BillingProductState as j, BillingOrderHistoryItem as k, BillingPaymentHistoryItem as l, BillingCreditsState as m, BillingEntitlementState as n, BillingStatusState as o, BillingPurchaseStatus as p, BillingPurchaseHooks as q, BillingProductSnapshot as r, BillingCasdoorProductDetail as s, BillingCoreContextValue as t, BillingActionExecutionResult as u, BillingActionKind as v, BillingCasdoorAccountDetail as w, BillingCasdoorAccountMultiFactorAuthDetail as x, BillingCasdoorAccountResponse as y, BillingCasdoorApiResponse as z };
|