@iblai/iblai-api 4.175.1-core → 4.175.2-core
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/index.cjs.js +113 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +113 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +113 -7
- package/dist/index.umd.js.map +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/models/AutoRechargeTriggerRequest.d.ts +4 -0
- package/dist/types/models/CreditAccountAutoRechargeUpdate.d.ts +4 -0
- package/dist/types/models/CreditAccountInfo.d.ts +20 -0
- package/dist/types/models/CreditTransactionHistory.d.ts +17 -0
- package/dist/types/models/CreditTransactionHistoryStatusEnum.d.ts +12 -0
- package/dist/types/models/FlowTypeEnum.d.ts +10 -0
- package/dist/types/models/PatchedCreditAccountAutoRechargeUpdate.d.ts +4 -0
- package/dist/types/models/StripeCustomerPortalRequest.d.ts +16 -2
- package/dist/types/models/TransactionTypeEnum.d.ts +16 -0
- package/dist/types/services/AccountService.d.ts +1 -1
- package/dist/types/services/AutoRechargeService.d.ts +2 -2
- package/dist/types/services/BillingService.d.ts +35 -3
- package/dist/types/services/TransactionsService.d.ts +35 -0
- package/package.json +1 -1
- package/sdk_schema.yml +292 -18
- package/src/core/OpenAPI.ts +1 -1
- package/src/index.ts +5 -0
- package/src/models/AutoRechargeTriggerRequest.ts +4 -0
- package/src/models/CreditAccountAutoRechargeUpdate.ts +4 -0
- package/src/models/CreditAccountInfo.ts +20 -0
- package/src/models/CreditTransactionHistory.ts +22 -0
- package/src/models/CreditTransactionHistoryStatusEnum.ts +16 -0
- package/src/models/FlowTypeEnum.ts +14 -0
- package/src/models/PatchedCreditAccountAutoRechargeUpdate.ts +4 -0
- package/src/models/StripeCustomerPortalRequest.ts +16 -2
- package/src/models/TransactionTypeEnum.ts +20 -0
- package/src/services/AccountService.ts +1 -1
- package/src/services/AutoRechargeService.ts +2 -2
- package/src/services/BillingService.ts +51 -3
- package/src/services/TransactionsService.ts +57 -0
|
@@ -6,6 +6,7 @@ import type { AutoRechargeTriggerRequest } from '../models/AutoRechargeTriggerRe
|
|
|
6
6
|
import type { AutoRechargeTriggerResponse } from '../models/AutoRechargeTriggerResponse';
|
|
7
7
|
import type { CreditAccountAutoRechargeUpdate } from '../models/CreditAccountAutoRechargeUpdate';
|
|
8
8
|
import type { CreditAccountInfo } from '../models/CreditAccountInfo';
|
|
9
|
+
import type { CreditTransactionHistory } from '../models/CreditTransactionHistory';
|
|
9
10
|
import type { PatchedCreditAccountAutoRechargeUpdate } from '../models/PatchedCreditAccountAutoRechargeUpdate';
|
|
10
11
|
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
11
12
|
import { OpenAPI } from '../core/OpenAPI';
|
|
@@ -35,7 +36,7 @@ export class BillingService {
|
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
38
|
* Update auto-recharge preferences
|
|
38
|
-
* Update auto_recharge_threshold_usd, auto_recharge_amount_usd, and/or
|
|
39
|
+
* Update auto_recharge_threshold_usd, auto_recharge_amount_usd, auto_recharge_enabled, and/or auto_recharge_spending_limit_usd. When enabling auto-recharge, missing values are calculated: if only limit set, amount = 20% of limit; if only amount set, limit = 5x amount; if neither set, defaults are limit=20, amount=4. Pass platform_key in the request body to update platform settings.
|
|
39
40
|
* @returns CreditAccountInfo
|
|
40
41
|
* @throws ApiError
|
|
41
42
|
*/
|
|
@@ -70,8 +71,8 @@ export class BillingService {
|
|
|
70
71
|
});
|
|
71
72
|
}
|
|
72
73
|
/**
|
|
73
|
-
* Trigger auto-recharge
|
|
74
|
-
*
|
|
74
|
+
* Trigger auto-recharge or manual top-up
|
|
75
|
+
* With amount_usd: manual top-up (charge that amount, add credits; no threshold/limit/cooldown). Without amount_usd: run auto-recharge once if enabled and balance below threshold. Returns 400 if skipped or failed (e.g. no payment method, cooldown). Pass platform_key in request body.
|
|
75
76
|
* @returns AutoRechargeTriggerResponse
|
|
76
77
|
* @throws ApiError
|
|
77
78
|
*/
|
|
@@ -87,4 +88,51 @@ export class BillingService {
|
|
|
87
88
|
mediaType: 'application/json',
|
|
88
89
|
});
|
|
89
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* List transaction history
|
|
93
|
+
* Paginated transaction history for the credit account. Use platform_key query param to list platform account transactions (if permitted). Filter by transaction_type, from_date (YYYY-MM-DD), to_date (YYYY-MM-DD).
|
|
94
|
+
* @returns CreditTransactionHistory
|
|
95
|
+
* @throws ApiError
|
|
96
|
+
*/
|
|
97
|
+
public static billingTransactionsRetrieve({
|
|
98
|
+
fromDate,
|
|
99
|
+
platformKey,
|
|
100
|
+
toDate,
|
|
101
|
+
transactionType,
|
|
102
|
+
}: {
|
|
103
|
+
/**
|
|
104
|
+
* Filter from date (YYYY-MM-DD), inclusive.
|
|
105
|
+
*/
|
|
106
|
+
fromDate?: string,
|
|
107
|
+
/**
|
|
108
|
+
* Platform key. Omit for user's own account.
|
|
109
|
+
*/
|
|
110
|
+
platformKey?: string,
|
|
111
|
+
/**
|
|
112
|
+
* Filter to date (YYYY-MM-DD), inclusive.
|
|
113
|
+
*/
|
|
114
|
+
toDate?: string,
|
|
115
|
+
/**
|
|
116
|
+
* Filter by transaction type.
|
|
117
|
+
*
|
|
118
|
+
* * `add` - add
|
|
119
|
+
* * `subtract` - subtract
|
|
120
|
+
* * `reserve` - reserve
|
|
121
|
+
* * `release` - release
|
|
122
|
+
* * `rollover` - rollover
|
|
123
|
+
* * `refund` - refund
|
|
124
|
+
*/
|
|
125
|
+
transactionType?: 'add' | 'subtract' | 'reserve' | 'release' | 'rollover' | 'refund',
|
|
126
|
+
}): CancelablePromise<CreditTransactionHistory> {
|
|
127
|
+
return __request(OpenAPI, {
|
|
128
|
+
method: 'GET',
|
|
129
|
+
url: '/api/billing/transactions/',
|
|
130
|
+
query: {
|
|
131
|
+
'from_date': fromDate,
|
|
132
|
+
'platform_key': platformKey,
|
|
133
|
+
'to_date': toDate,
|
|
134
|
+
'transaction_type': transactionType,
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
}
|
|
90
138
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
/* tslint:disable */
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
import type { CreditTransactionHistory } from '../models/CreditTransactionHistory';
|
|
6
|
+
import type { CancelablePromise } from '../core/CancelablePromise';
|
|
7
|
+
import { OpenAPI } from '../core/OpenAPI';
|
|
8
|
+
import { request as __request } from '../core/request';
|
|
9
|
+
export class TransactionsService {
|
|
10
|
+
/**
|
|
11
|
+
* List transaction history
|
|
12
|
+
* Paginated transaction history for the credit account. Use platform_key query param to list platform account transactions (if permitted). Filter by transaction_type, from_date (YYYY-MM-DD), to_date (YYYY-MM-DD).
|
|
13
|
+
* @returns CreditTransactionHistory
|
|
14
|
+
* @throws ApiError
|
|
15
|
+
*/
|
|
16
|
+
public static transactionsRetrieve({
|
|
17
|
+
fromDate,
|
|
18
|
+
platformKey,
|
|
19
|
+
toDate,
|
|
20
|
+
transactionType,
|
|
21
|
+
}: {
|
|
22
|
+
/**
|
|
23
|
+
* Filter from date (YYYY-MM-DD), inclusive.
|
|
24
|
+
*/
|
|
25
|
+
fromDate?: string,
|
|
26
|
+
/**
|
|
27
|
+
* Platform key. Omit for user's own account.
|
|
28
|
+
*/
|
|
29
|
+
platformKey?: string,
|
|
30
|
+
/**
|
|
31
|
+
* Filter to date (YYYY-MM-DD), inclusive.
|
|
32
|
+
*/
|
|
33
|
+
toDate?: string,
|
|
34
|
+
/**
|
|
35
|
+
* Filter by transaction type.
|
|
36
|
+
*
|
|
37
|
+
* * `add` - add
|
|
38
|
+
* * `subtract` - subtract
|
|
39
|
+
* * `reserve` - reserve
|
|
40
|
+
* * `release` - release
|
|
41
|
+
* * `rollover` - rollover
|
|
42
|
+
* * `refund` - refund
|
|
43
|
+
*/
|
|
44
|
+
transactionType?: 'add' | 'subtract' | 'reserve' | 'release' | 'rollover' | 'refund',
|
|
45
|
+
}): CancelablePromise<CreditTransactionHistory> {
|
|
46
|
+
return __request(OpenAPI, {
|
|
47
|
+
method: 'GET',
|
|
48
|
+
url: '/transactions/',
|
|
49
|
+
query: {
|
|
50
|
+
'from_date': fromDate,
|
|
51
|
+
'platform_key': platformKey,
|
|
52
|
+
'to_date': toDate,
|
|
53
|
+
'transaction_type': transactionType,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|