@robosystems/client 0.2.12 → 0.2.14
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/extensions/index.d.ts +1 -0
- package/extensions/index.js +1 -0
- package/extensions/index.ts +1 -0
- package/package.json +1 -1
- package/sdk/sdk.gen.d.ts +110 -20
- package/sdk/sdk.gen.js +116 -46
- package/sdk/sdk.gen.ts +115 -45
- package/sdk/types.gen.d.ts +41 -101
- package/sdk/types.gen.ts +42 -109
- package/sdk-extensions/index.d.ts +1 -0
- package/sdk-extensions/index.js +1 -0
- package/sdk-extensions/index.ts +1 -0
- package/sdk.gen.d.ts +110 -20
- package/sdk.gen.js +116 -46
- package/sdk.gen.ts +115 -45
- package/types.gen.d.ts +41 -101
- package/types.gen.ts +42 -109
package/sdk/sdk.gen.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.batchProcessQueries = exports.executeSpecificAgent = exports.getAgentMetadata = exports.autoSelectAgent = exports.listAgents = exports.syncConnection = exports.getConnection = exports.deleteConnection = exports.oauthCallback = exports.initOAuth = exports.createLinkToken = exports.exchangeLinkToken = exports.getConnectionOptions = exports.createConnection = exports.listConnections = exports.getOrgUsage = exports.getOrgLimits = exports.updateOrgMemberRole = exports.removeOrgMember = exports.inviteOrgMember = exports.listOrgMembers = exports.listOrgGraphs = exports.updateOrg = exports.getOrg = exports.createOrg = exports.listUserOrgs = exports.updateUserApiKey = exports.revokeUserApiKey = exports.createUserApiKey = exports.listUserApiKeys = exports.updateUserPassword = exports.updateUser = exports.getCurrentUser = exports.getServiceStatus = exports.getCaptchaConfig = exports.completeSsoAuth = exports.ssoTokenExchange = exports.generateSsoToken = exports.resetPassword = exports.validateResetToken = exports.forgotPassword = exports.checkPasswordStrength = exports.getPasswordPolicy = exports.verifyEmail = exports.resendVerificationEmail = exports.refreshAuthSession = exports.getCurrentAuthUser = exports.logoutUser = exports.loginUser = exports.registerUser = void 0;
|
|
5
|
-
exports.
|
|
6
|
-
exports.getCheckoutStatus = exports.createCheckoutSession = exports.getOrgUpcomingInvoice = exports.listOrgInvoices = exports.cancelOrgSubscription = exports.getOrgSubscription =
|
|
5
|
+
exports.listOrgSubscriptions = exports.createPortalSession = exports.getOrgBillingCustomer = exports.cancelOperation = exports.getOperationStatus = exports.streamOperationEvents = exports.getServiceOfferings = exports.selectGraph = exports.getAvailableGraphTiers = exports.getAvailableExtensions = exports.createGraph = exports.getGraphs = exports.queryTables = exports.ingestTables = exports.updateFileStatus = exports.getFileInfo = exports.deleteFile = exports.getUploadUrl = exports.listTableFiles = exports.listTables = exports.upgradeSubscription = exports.createRepositorySubscription = exports.getGraphSubscription = exports.getSubgraphQuota = exports.getSubgraphInfo = exports.deleteSubgraph = exports.createSubgraph = exports.listSubgraphs = exports.getGraphLimits = exports.getDatabaseInfo = exports.getDatabaseHealth = exports.checkStorageLimits = exports.getStorageUsage = exports.checkCreditBalance = exports.listCreditTransactions = exports.getCreditSummary = exports.validateSchema = exports.exportGraphSchema = exports.getGraphSchema = exports.executeCypherQuery = exports.getGraphUsageAnalytics = exports.getGraphMetrics = exports.getBackupStats = exports.restoreBackup = exports.getBackupDownloadUrl = exports.createBackup = exports.listBackups = exports.callMcpTool = exports.listMcpTools = exports.recommendAgent = void 0;
|
|
6
|
+
exports.getCheckoutStatus = exports.createCheckoutSession = exports.getOrgUpcomingInvoice = exports.listOrgInvoices = exports.cancelOrgSubscription = exports.getOrgSubscription = void 0;
|
|
7
7
|
const client_gen_1 = require("./client.gen");
|
|
8
8
|
/**
|
|
9
9
|
* Register New User
|
|
@@ -1103,6 +1103,13 @@ exports.listAgents = listAgents;
|
|
|
1103
1103
|
* - Leverage conversation history for contextual understanding
|
|
1104
1104
|
* - Enable RAG for knowledge base enrichment
|
|
1105
1105
|
*
|
|
1106
|
+
* **Subgraph Support:**
|
|
1107
|
+
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1108
|
+
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1109
|
+
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1110
|
+
* Agents operate on the specified graph/subgraph's data independently. RAG enrichment
|
|
1111
|
+
* and knowledge base search are scoped to the specific graph/subgraph.
|
|
1112
|
+
*
|
|
1106
1113
|
* See request/response examples in the "Examples" dropdown below.
|
|
1107
1114
|
*/
|
|
1108
1115
|
const autoSelectAgent = (options) => {
|
|
@@ -1287,6 +1294,13 @@ exports.recommendAgent = recommendAgent;
|
|
|
1287
1294
|
* - User permissions and subscription tier
|
|
1288
1295
|
* - Backend capabilities (Kuzu, Neo4j, etc.)
|
|
1289
1296
|
*
|
|
1297
|
+
* **Subgraph Support:**
|
|
1298
|
+
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1299
|
+
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1300
|
+
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1301
|
+
* The returned tool list is identical for parent graphs and subgraphs, as all
|
|
1302
|
+
* MCP tools work uniformly across graph boundaries.
|
|
1303
|
+
*
|
|
1290
1304
|
* **Note:**
|
|
1291
1305
|
* MCP tool listing is included - no credit consumption required.
|
|
1292
1306
|
*/
|
|
@@ -1341,6 +1355,13 @@ exports.listMcpTools = listMcpTools;
|
|
|
1341
1355
|
* - `408 Request Timeout`: Tool execution exceeded timeout
|
|
1342
1356
|
* - Clients should implement exponential backoff on errors
|
|
1343
1357
|
*
|
|
1358
|
+
* **Subgraph Support:**
|
|
1359
|
+
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1360
|
+
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1361
|
+
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1362
|
+
* MCP tools operate on the specified graph/subgraph independently. Each subgraph
|
|
1363
|
+
* has its own schema, data, and can be queried separately via MCP.
|
|
1364
|
+
*
|
|
1344
1365
|
* **Credit Model:**
|
|
1345
1366
|
* MCP tool execution is included - no credit consumption required. Database
|
|
1346
1367
|
* operations (queries, schema inspection, analytics) are completely free.
|
|
@@ -1748,6 +1769,12 @@ exports.getGraphUsageAnalytics = getGraphUsageAnalytics;
|
|
|
1748
1769
|
* - `503 Service Unavailable`: Circuit breaker open or SSE disabled
|
|
1749
1770
|
* - Clients should implement exponential backoff
|
|
1750
1771
|
*
|
|
1772
|
+
* **Subgraph Support:**
|
|
1773
|
+
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1774
|
+
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1775
|
+
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1776
|
+
* Subgraphs share the same instance as their parent graph and have independent data.
|
|
1777
|
+
*
|
|
1751
1778
|
* **Note:**
|
|
1752
1779
|
* Query operations are included - no credit consumption required.
|
|
1753
1780
|
* Queue position is based on subscription tier for priority.
|
|
@@ -1810,6 +1837,14 @@ exports.executeCypherQuery = executeCypherQuery;
|
|
|
1810
1837
|
* Property discovery is limited to 10 properties per node type for performance.
|
|
1811
1838
|
* For complete schema definitions, use `/schema/export`.
|
|
1812
1839
|
*
|
|
1840
|
+
* ## Subgraph Support
|
|
1841
|
+
*
|
|
1842
|
+
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1843
|
+
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1844
|
+
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1845
|
+
* Each subgraph has independent schema and data. The returned schema reflects
|
|
1846
|
+
* only the specified graph/subgraph's actual structure.
|
|
1847
|
+
*
|
|
1813
1848
|
* This operation is included - no credit consumption required.
|
|
1814
1849
|
*/
|
|
1815
1850
|
const getGraphSchema = (options) => {
|
|
@@ -1919,6 +1954,13 @@ exports.exportGraphSchema = exportGraphSchema;
|
|
|
1919
1954
|
* - Performance problems
|
|
1920
1955
|
* - Naming conflicts
|
|
1921
1956
|
*
|
|
1957
|
+
* **Subgraph Support:**
|
|
1958
|
+
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
1959
|
+
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
1960
|
+
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
1961
|
+
* Schema validation is performed against the specified graph/subgraph's current
|
|
1962
|
+
* schema and data structure.
|
|
1963
|
+
*
|
|
1922
1964
|
* This operation is included - no credit consumption required.
|
|
1923
1965
|
*/
|
|
1924
1966
|
const validateSchema = (options) => {
|
|
@@ -2115,6 +2157,13 @@ exports.checkStorageLimits = checkStorageLimits;
|
|
|
2115
2157
|
* - **Resource Usage**: Memory and storage consumption
|
|
2116
2158
|
* - **Alerts**: Active warnings or issues
|
|
2117
2159
|
*
|
|
2160
|
+
* **Subgraph Support:**
|
|
2161
|
+
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
2162
|
+
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
2163
|
+
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
2164
|
+
* Health metrics are specific to the requested graph/subgraph. Subgraphs share the
|
|
2165
|
+
* same physical instance as their parent but have independent health indicators.
|
|
2166
|
+
*
|
|
2118
2167
|
* This endpoint provides essential monitoring data for operational visibility.
|
|
2119
2168
|
*/
|
|
2120
2169
|
const getDatabaseHealth = (options) => {
|
|
@@ -2153,6 +2202,13 @@ exports.getDatabaseHealth = getDatabaseHealth;
|
|
|
2153
2202
|
* - **Backup Status**: Backup availability and recency
|
|
2154
2203
|
* - **Timestamps**: Creation and modification dates
|
|
2155
2204
|
*
|
|
2205
|
+
* **Subgraph Support:**
|
|
2206
|
+
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
2207
|
+
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
2208
|
+
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
2209
|
+
* Returned metrics are specific to the requested graph/subgraph. Subgraphs have
|
|
2210
|
+
* independent size, node/relationship counts, and backup status.
|
|
2211
|
+
*
|
|
2156
2212
|
* This endpoint provides essential database information for capacity planning and monitoring.
|
|
2157
2213
|
*/
|
|
2158
2214
|
const getDatabaseInfo = (options) => {
|
|
@@ -2186,7 +2242,7 @@ exports.getDatabaseInfo = getDatabaseInfo;
|
|
|
2186
2242
|
*
|
|
2187
2243
|
* This unified endpoint provides all limits in one place for easier client integration.
|
|
2188
2244
|
*
|
|
2189
|
-
* **Note**: Limits vary based on subscription tier (
|
|
2245
|
+
* **Note**: Limits vary based on subscription tier (kuzu-standard, kuzu-large, kuzu-xlarge).
|
|
2190
2246
|
*/
|
|
2191
2247
|
const getGraphLimits = (options) => {
|
|
2192
2248
|
return (options.client ?? client_gen_1.client).get({
|
|
@@ -2243,12 +2299,18 @@ exports.listSubgraphs = listSubgraphs;
|
|
|
2243
2299
|
* - Valid authentication
|
|
2244
2300
|
* - Parent graph must exist and be accessible to the user
|
|
2245
2301
|
* - User must have 'admin' permission on the parent graph
|
|
2246
|
-
* - Parent graph tier must support subgraphs (
|
|
2302
|
+
* - Parent graph tier must support subgraphs (Kuzu Large/XLarge or Neo4j Enterprise XLarge)
|
|
2247
2303
|
* - Must be within subgraph quota limits
|
|
2248
2304
|
* - Subgraph name must be unique within the parent graph
|
|
2249
2305
|
*
|
|
2250
2306
|
* **Returns:**
|
|
2251
2307
|
* - Created subgraph details including its unique ID
|
|
2308
|
+
* - Subgraph ID format: `{parent_id}_{subgraph_name}` (e.g., kg1234567890abcdef_dev)
|
|
2309
|
+
*
|
|
2310
|
+
* **Usage:**
|
|
2311
|
+
* - Subgraphs share parent's credit pool
|
|
2312
|
+
* - Subgraph ID can be used in all standard `/v1/graphs/{graph_id}*` endpoints
|
|
2313
|
+
* - Permissions inherited from parent graph
|
|
2252
2314
|
*/
|
|
2253
2315
|
const createSubgraph = (options) => {
|
|
2254
2316
|
return (options.client ?? client_gen_1.client).post({
|
|
@@ -2278,6 +2340,7 @@ exports.createSubgraph = createSubgraph;
|
|
|
2278
2340
|
* **Requirements:**
|
|
2279
2341
|
* - Must be a valid subgraph (not parent graph)
|
|
2280
2342
|
* - User must have admin access to parent graph
|
|
2343
|
+
* - Subgraph name must be alphanumeric (1-20 characters)
|
|
2281
2344
|
* - Optional backup before deletion
|
|
2282
2345
|
*
|
|
2283
2346
|
* **Deletion Options:**
|
|
@@ -2289,8 +2352,13 @@ exports.createSubgraph = createSubgraph;
|
|
|
2289
2352
|
* All data in the subgraph will be lost.
|
|
2290
2353
|
*
|
|
2291
2354
|
* **Backup Location:**
|
|
2292
|
-
* If backup requested, stored in S3 at:
|
|
2293
|
-
* `s3://
|
|
2355
|
+
* If backup requested, stored in S3 Kuzu database bucket at:
|
|
2356
|
+
* `s3://{kuzu_s3_bucket}/{instance_id}/{database_name}_{timestamp}.backup`
|
|
2357
|
+
*
|
|
2358
|
+
* **Notes:**
|
|
2359
|
+
* - Use the subgraph name (e.g., 'dev', 'staging') not the full subgraph ID
|
|
2360
|
+
* - Deletion does not affect parent graph's credit pool or permissions
|
|
2361
|
+
* - Backup creation consumes credits from parent graph's allocation
|
|
2294
2362
|
*/
|
|
2295
2363
|
const deleteSubgraph = (options) => {
|
|
2296
2364
|
return (options.client ?? client_gen_1.client).delete({
|
|
@@ -2304,7 +2372,7 @@ const deleteSubgraph = (options) => {
|
|
|
2304
2372
|
type: 'http'
|
|
2305
2373
|
}
|
|
2306
2374
|
],
|
|
2307
|
-
url: '/v1/graphs/{graph_id}/subgraphs/{
|
|
2375
|
+
url: '/v1/graphs/{graph_id}/subgraphs/{subgraph_name}',
|
|
2308
2376
|
...options,
|
|
2309
2377
|
headers: {
|
|
2310
2378
|
'Content-Type': 'application/json',
|
|
@@ -2319,6 +2387,7 @@ exports.deleteSubgraph = deleteSubgraph;
|
|
|
2319
2387
|
*
|
|
2320
2388
|
* **Requirements:**
|
|
2321
2389
|
* - User must have read access to parent graph
|
|
2390
|
+
* - Subgraph name must be alphanumeric (1-20 characters)
|
|
2322
2391
|
*
|
|
2323
2392
|
* **Response includes:**
|
|
2324
2393
|
* - Full subgraph metadata
|
|
@@ -2334,6 +2403,10 @@ exports.deleteSubgraph = deleteSubgraph;
|
|
|
2334
2403
|
* - Edge count
|
|
2335
2404
|
* - Database size on disk
|
|
2336
2405
|
* - Schema information
|
|
2406
|
+
*
|
|
2407
|
+
* **Note:**
|
|
2408
|
+
* Use the subgraph name (e.g., 'dev', 'staging') not the full subgraph ID.
|
|
2409
|
+
* The full ID is returned in the response (e.g., 'kg0123456789abcdef_dev').
|
|
2337
2410
|
*/
|
|
2338
2411
|
const getSubgraphInfo = (options) => {
|
|
2339
2412
|
return (options.client ?? client_gen_1.client).get({
|
|
@@ -2347,7 +2420,7 @@ const getSubgraphInfo = (options) => {
|
|
|
2347
2420
|
type: 'http'
|
|
2348
2421
|
}
|
|
2349
2422
|
],
|
|
2350
|
-
url: '/v1/graphs/{graph_id}/subgraphs/{
|
|
2423
|
+
url: '/v1/graphs/{graph_id}/subgraphs/{subgraph_name}/info',
|
|
2351
2424
|
...options
|
|
2352
2425
|
});
|
|
2353
2426
|
};
|
|
@@ -2389,32 +2462,6 @@ const getSubgraphQuota = (options) => {
|
|
|
2389
2462
|
});
|
|
2390
2463
|
};
|
|
2391
2464
|
exports.getSubgraphQuota = getSubgraphQuota;
|
|
2392
|
-
/**
|
|
2393
|
-
* Cancel Subscription
|
|
2394
|
-
* Cancel a subscription.
|
|
2395
|
-
*
|
|
2396
|
-
* For shared repositories: Cancels the user's personal subscription
|
|
2397
|
-
* For user graphs: Not allowed - delete the graph instead
|
|
2398
|
-
*
|
|
2399
|
-
* The subscription will be marked as canceled and will end at the current period end date.
|
|
2400
|
-
*/
|
|
2401
|
-
const cancelSubscription = (options) => {
|
|
2402
|
-
return (options.client ?? client_gen_1.client).delete({
|
|
2403
|
-
security: [
|
|
2404
|
-
{
|
|
2405
|
-
name: 'X-API-Key',
|
|
2406
|
-
type: 'apiKey'
|
|
2407
|
-
},
|
|
2408
|
-
{
|
|
2409
|
-
scheme: 'bearer',
|
|
2410
|
-
type: 'http'
|
|
2411
|
-
}
|
|
2412
|
-
],
|
|
2413
|
-
url: '/v1/graphs/{graph_id}/subscriptions',
|
|
2414
|
-
...options
|
|
2415
|
-
});
|
|
2416
|
-
};
|
|
2417
|
-
exports.cancelSubscription = cancelSubscription;
|
|
2418
2465
|
/**
|
|
2419
2466
|
* Get Subscription
|
|
2420
2467
|
* Get subscription details for a graph or shared repository.
|
|
@@ -2637,6 +2684,13 @@ exports.listTableFiles = listTableFiles;
|
|
|
2637
2684
|
* Tables are automatically created on first file upload with type inferred from name
|
|
2638
2685
|
* (e.g., "Transaction" → relationship) and empty schema populated during ingestion.
|
|
2639
2686
|
*
|
|
2687
|
+
* **Subgraph Support:**
|
|
2688
|
+
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
2689
|
+
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
2690
|
+
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
2691
|
+
* Each subgraph has completely isolated S3 staging areas and tables. Files uploaded
|
|
2692
|
+
* to one subgraph do not appear in other subgraphs.
|
|
2693
|
+
*
|
|
2640
2694
|
* **Important Notes:**
|
|
2641
2695
|
* - Presigned URLs expire (default: 1 hour)
|
|
2642
2696
|
* - Use appropriate Content-Type header when uploading to S3
|
|
@@ -2828,7 +2882,7 @@ exports.updateFileStatus = updateFileStatus;
|
|
|
2828
2882
|
* 2. Files are validated and marked as 'uploaded'
|
|
2829
2883
|
* 3. Trigger ingestion: `POST /tables/ingest`
|
|
2830
2884
|
* 4. DuckDB staging tables created from S3 patterns
|
|
2831
|
-
* 5. Data copied
|
|
2885
|
+
* 5. Data copied from DuckDB to Kuzu
|
|
2832
2886
|
* 6. Per-table results and metrics returned
|
|
2833
2887
|
*
|
|
2834
2888
|
* **Rebuild Feature:**
|
|
@@ -2859,6 +2913,13 @@ exports.updateFileStatus = updateFileStatus;
|
|
|
2859
2913
|
* you'll receive a 409 Conflict error. The distributed lock automatically expires after
|
|
2860
2914
|
* the configured TTL (default: 1 hour) to prevent deadlocks from failed ingestions.
|
|
2861
2915
|
*
|
|
2916
|
+
* **Subgraph Support:**
|
|
2917
|
+
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
2918
|
+
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
2919
|
+
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
2920
|
+
* Each subgraph has independent staging tables and graph data. Ingestion operates
|
|
2921
|
+
* on the specified graph/subgraph only and does not affect other subgraphs.
|
|
2922
|
+
*
|
|
2862
2923
|
* **Important Notes:**
|
|
2863
2924
|
* - Only files with 'uploaded' status are processed
|
|
2864
2925
|
* - Tables with no uploaded files are skipped
|
|
@@ -2935,6 +2996,12 @@ exports.ingestTables = ingestTables;
|
|
|
2935
2996
|
* - Read-only: No INSERT, UPDATE, DELETE
|
|
2936
2997
|
* - User's tables only: Cannot query other users' data
|
|
2937
2998
|
*
|
|
2999
|
+
* **Subgraph Support:**
|
|
3000
|
+
* This endpoint accepts both parent graph IDs and subgraph IDs.
|
|
3001
|
+
* - Parent graph: Use `graph_id` like `kg0123456789abcdef`
|
|
3002
|
+
* - Subgraph: Use full subgraph ID like `kg0123456789abcdef_dev`
|
|
3003
|
+
* Each subgraph has its own independent staging tables.
|
|
3004
|
+
*
|
|
2938
3005
|
* **Shared Repositories:**
|
|
2939
3006
|
* Shared repositories (SEC, etc.) do not allow direct SQL queries.
|
|
2940
3007
|
* Use the graph query endpoint instead: `POST /v1/graphs/{graph_id}/query`
|
|
@@ -3447,15 +3514,22 @@ const getOrgBillingCustomer = (options) => {
|
|
|
3447
3514
|
};
|
|
3448
3515
|
exports.getOrgBillingCustomer = getOrgBillingCustomer;
|
|
3449
3516
|
/**
|
|
3450
|
-
*
|
|
3451
|
-
*
|
|
3517
|
+
* Create Customer Portal Session
|
|
3518
|
+
* Create a Stripe Customer Portal session for managing payment methods.
|
|
3452
3519
|
*
|
|
3453
|
-
*
|
|
3520
|
+
* The portal allows users to:
|
|
3521
|
+
* - Add new payment methods
|
|
3522
|
+
* - Remove existing payment methods
|
|
3523
|
+
* - Update default payment method
|
|
3524
|
+
* - View billing history
|
|
3525
|
+
*
|
|
3526
|
+
* The user will be redirected to Stripe's hosted portal page and returned to the billing page when done.
|
|
3454
3527
|
*
|
|
3455
3528
|
* **Requirements:**
|
|
3456
3529
|
* - User must be an OWNER of the organization
|
|
3530
|
+
* - Organization must have a Stripe customer ID (i.e., has gone through checkout at least once)
|
|
3457
3531
|
*/
|
|
3458
|
-
const
|
|
3532
|
+
const createPortalSession = (options) => {
|
|
3459
3533
|
return (options.client ?? client_gen_1.client).post({
|
|
3460
3534
|
security: [
|
|
3461
3535
|
{
|
|
@@ -3467,15 +3541,11 @@ const updateOrgPaymentMethod = (options) => {
|
|
|
3467
3541
|
type: 'http'
|
|
3468
3542
|
}
|
|
3469
3543
|
],
|
|
3470
|
-
url: '/v1/billing/customer/{org_id}/
|
|
3471
|
-
...options
|
|
3472
|
-
headers: {
|
|
3473
|
-
'Content-Type': 'application/json',
|
|
3474
|
-
...options.headers
|
|
3475
|
-
}
|
|
3544
|
+
url: '/v1/billing/customer/{org_id}/portal',
|
|
3545
|
+
...options
|
|
3476
3546
|
});
|
|
3477
3547
|
};
|
|
3478
|
-
exports.
|
|
3548
|
+
exports.createPortalSession = createPortalSession;
|
|
3479
3549
|
/**
|
|
3480
3550
|
* List Organization Subscriptions
|
|
3481
3551
|
* List all active and past subscriptions for an organization.
|