@knowledge-stack/ksapi 1.162.0 → 2.4.2
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/.openapi-generator/FILES +20 -2
- package/README.md +13 -3
- package/dist/apis/BillingApi.d.ts +70 -0
- package/dist/apis/BillingApi.js +120 -0
- package/dist/apis/DocumentVersionsApi.d.ts +8 -8
- package/dist/apis/DocumentVersionsApi.js +4 -4
- package/dist/apis/DocumentsApi.d.ts +4 -4
- package/dist/apis/DocumentsApi.js +2 -2
- package/dist/apis/SubscriptionsApi.d.ts +17 -20
- package/dist/apis/SubscriptionsApi.js +6 -9
- package/dist/apis/TenantsApi.d.ts +4 -4
- package/dist/apis/TenantsApi.js +2 -2
- package/dist/apis/TrashApi.d.ts +39 -1
- package/dist/apis/TrashApi.js +48 -0
- package/dist/apis/WorkflowRunsApi.d.ts +4 -4
- package/dist/apis/WorkflowRunsApi.js +2 -2
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/BillingApi.d.ts +70 -0
- package/dist/esm/apis/BillingApi.js +83 -0
- package/dist/esm/apis/DocumentVersionsApi.d.ts +8 -8
- package/dist/esm/apis/DocumentVersionsApi.js +4 -4
- package/dist/esm/apis/DocumentsApi.d.ts +4 -4
- package/dist/esm/apis/DocumentsApi.js +2 -2
- package/dist/esm/apis/SubscriptionsApi.d.ts +17 -20
- package/dist/esm/apis/SubscriptionsApi.js +7 -10
- package/dist/esm/apis/TenantsApi.d.ts +4 -4
- package/dist/esm/apis/TenantsApi.js +2 -2
- package/dist/esm/apis/TrashApi.d.ts +39 -1
- package/dist/esm/apis/TrashApi.js +49 -1
- package/dist/esm/apis/WorkflowRunsApi.d.ts +4 -4
- package/dist/esm/apis/WorkflowRunsApi.js +2 -2
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/BillingInterval.d.ts +25 -0
- package/dist/esm/models/BillingInterval.js +43 -0
- package/dist/esm/models/BillingPaymentResponse.d.ts +100 -0
- package/dist/esm/models/BillingPaymentResponse.js +75 -0
- package/dist/esm/models/BillingSystem.d.ts +30 -0
- package/dist/esm/models/BillingSystem.js +48 -0
- package/dist/esm/models/ChangeSubscriptionRequest.d.ts +34 -0
- package/dist/esm/models/ChangeSubscriptionRequest.js +10 -0
- package/dist/esm/models/CheckoutAction.d.ts +27 -0
- package/dist/esm/models/CheckoutAction.js +45 -0
- package/dist/esm/models/CheckoutResponse.d.ts +76 -0
- package/dist/esm/models/{SubmitSubscriptionResponse.js → CheckoutResponse.js} +20 -20
- package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +19 -0
- package/dist/esm/models/CreateWorkflowDefinitionRequest.js +10 -0
- package/dist/esm/models/IdpConfig.d.ts +6 -0
- package/dist/esm/models/IdpConfig.js +10 -1
- package/dist/esm/models/PaginatedResponseBillingPaymentResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseBillingPaymentResponse.js +70 -0
- package/dist/esm/models/ScheduleCadence.d.ts +32 -0
- package/dist/esm/models/ScheduleCadence.js +50 -0
- package/dist/esm/models/SubscriptionPlanResponse.d.ts +24 -0
- package/dist/esm/models/SubscriptionPlanResponse.js +8 -0
- package/dist/esm/models/{SubmitSubscriptionResponse.d.ts → TenantSubscriptionResponse.d.ts} +49 -38
- package/dist/esm/models/TenantSubscriptionResponse.js +67 -0
- package/dist/esm/models/TrashItemDetailResponse.d.ts +110 -0
- package/dist/esm/models/TrashItemDetailResponse.js +81 -0
- package/dist/esm/models/TrashItemResponse.d.ts +7 -0
- package/dist/esm/models/TrashItemResponse.js +3 -0
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +19 -0
- package/dist/esm/models/UpdateWorkflowDefinitionRequest.js +10 -0
- package/dist/esm/models/WorkflowDefinitionResponse.d.ts +19 -0
- package/dist/esm/models/WorkflowDefinitionResponse.js +7 -0
- package/dist/esm/models/index.d.ts +9 -1
- package/dist/esm/models/index.js +9 -1
- package/dist/models/BillingInterval.d.ts +25 -0
- package/dist/models/BillingInterval.js +51 -0
- package/dist/models/BillingPaymentResponse.d.ts +100 -0
- package/dist/models/BillingPaymentResponse.js +83 -0
- package/dist/models/BillingSystem.d.ts +30 -0
- package/dist/models/BillingSystem.js +56 -0
- package/dist/models/ChangeSubscriptionRequest.d.ts +34 -0
- package/dist/models/ChangeSubscriptionRequest.js +10 -0
- package/dist/models/CheckoutAction.d.ts +27 -0
- package/dist/models/CheckoutAction.js +53 -0
- package/dist/models/CheckoutResponse.d.ts +76 -0
- package/dist/models/{SubmitSubscriptionResponse.js → CheckoutResponse.js} +26 -26
- package/dist/models/CreateWorkflowDefinitionRequest.d.ts +19 -0
- package/dist/models/CreateWorkflowDefinitionRequest.js +10 -0
- package/dist/models/IdpConfig.d.ts +6 -0
- package/dist/models/IdpConfig.js +10 -1
- package/dist/models/PaginatedResponseBillingPaymentResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseBillingPaymentResponse.js +78 -0
- package/dist/models/ScheduleCadence.d.ts +32 -0
- package/dist/models/ScheduleCadence.js +58 -0
- package/dist/models/SubscriptionPlanResponse.d.ts +24 -0
- package/dist/models/SubscriptionPlanResponse.js +8 -0
- package/dist/models/{SubmitSubscriptionResponse.d.ts → TenantSubscriptionResponse.d.ts} +49 -38
- package/dist/models/TenantSubscriptionResponse.js +75 -0
- package/dist/models/TrashItemDetailResponse.d.ts +110 -0
- package/dist/models/TrashItemDetailResponse.js +89 -0
- package/dist/models/TrashItemResponse.d.ts +7 -0
- package/dist/models/TrashItemResponse.js +3 -0
- package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +19 -0
- package/dist/models/UpdateWorkflowDefinitionRequest.js +10 -0
- package/dist/models/WorkflowDefinitionResponse.d.ts +19 -0
- package/dist/models/WorkflowDefinitionResponse.js +7 -0
- package/dist/models/index.d.ts +9 -1
- package/dist/models/index.js +9 -1
- package/docs/BillingApi.md +90 -0
- package/docs/BillingInterval.md +33 -0
- package/docs/BillingPaymentResponse.md +51 -0
- package/docs/BillingSystem.md +33 -0
- package/docs/ChangeSubscriptionRequest.md +9 -1
- package/docs/CheckoutAction.md +33 -0
- package/docs/CheckoutResponse.md +41 -0
- package/docs/CreateWorkflowDefinitionRequest.md +6 -0
- package/docs/DocumentVersionsApi.md +2 -2
- package/docs/DocumentsApi.md +1 -1
- package/docs/FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.md +6 -0
- package/docs/IdpConfig.md +2 -0
- package/docs/PaginatedResponseBillingPaymentResponse.md +40 -0
- package/docs/ScheduleCadence.md +33 -0
- package/docs/SubscriptionPlanResponse.md +8 -0
- package/docs/SubscriptionsApi.md +7 -10
- package/docs/TenantSubscriptionResponse.md +47 -0
- package/docs/TenantsApi.md +1 -1
- package/docs/TrashApi.md +76 -0
- package/docs/TrashItemDetailResponse.md +55 -0
- package/docs/TrashItemResponse.md +2 -0
- package/docs/UpdateWorkflowDefinitionRequest.md +6 -0
- package/docs/WorkflowDefinitionResponse.md +6 -0
- package/docs/WorkflowRunsApi.md +1 -1
- package/package.json +1 -1
- package/src/apis/BillingApi.ts +142 -0
- package/src/apis/DocumentVersionsApi.ts +8 -8
- package/src/apis/DocumentsApi.ts +4 -4
- package/src/apis/SubscriptionsApi.ts +24 -31
- package/src/apis/TenantsApi.ts +4 -4
- package/src/apis/TrashApi.ts +86 -0
- package/src/apis/WorkflowRunsApi.ts +4 -4
- package/src/apis/index.ts +1 -0
- package/src/models/BillingInterval.ts +53 -0
- package/src/models/BillingPaymentResponse.ts +168 -0
- package/src/models/BillingSystem.ts +58 -0
- package/src/models/ChangeSubscriptionRequest.ts +55 -0
- package/src/models/CheckoutAction.ts +55 -0
- package/src/models/{SubmitSubscriptionResponse.ts → CheckoutResponse.ts} +61 -47
- package/src/models/CreateWorkflowDefinitionRequest.ts +37 -0
- package/src/models/IdpConfig.ts +14 -0
- package/src/models/PaginatedResponseBillingPaymentResponse.ts +130 -0
- package/src/models/ScheduleCadence.ts +60 -0
- package/src/models/SubscriptionPlanResponse.ts +32 -0
- package/src/models/TenantSubscriptionResponse.ts +159 -0
- package/src/models/TrashItemDetailResponse.ts +194 -0
- package/src/models/TrashItemResponse.ts +15 -0
- package/src/models/UpdateWorkflowDefinitionRequest.ts +37 -0
- package/src/models/WorkflowDefinitionResponse.ts +31 -0
- package/src/models/index.ts +9 -1
- package/docs/SubmitSubscriptionResponse.md +0 -39
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { BillingSystem } from './BillingSystem';
|
|
13
|
+
/**
|
|
14
|
+
* One confirmed payment, as shown in the tenant's billing history.
|
|
15
|
+
*
|
|
16
|
+
* Backs in-app receipts: CN payments have no provider-hosted invoice
|
|
17
|
+
* (``invoice_url`` is NULL) — the frontend renders a receipt from
|
|
18
|
+
* these fields. Stripe payments link the hosted invoice.
|
|
19
|
+
* @export
|
|
20
|
+
* @interface BillingPaymentResponse
|
|
21
|
+
*/
|
|
22
|
+
export interface BillingPaymentResponse {
|
|
23
|
+
/**
|
|
24
|
+
* Payment id.
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof BillingPaymentResponse
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {BillingSystem}
|
|
32
|
+
* @memberof BillingPaymentResponse
|
|
33
|
+
*/
|
|
34
|
+
billingSystem: BillingSystem;
|
|
35
|
+
/**
|
|
36
|
+
* Plan purchased.
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof BillingPaymentResponse
|
|
39
|
+
*/
|
|
40
|
+
planId: string;
|
|
41
|
+
/**
|
|
42
|
+
* Billing period purchased.
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof BillingPaymentResponse
|
|
45
|
+
*/
|
|
46
|
+
interval: string;
|
|
47
|
+
/**
|
|
48
|
+
* Seats purchased.
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @memberof BillingPaymentResponse
|
|
51
|
+
*/
|
|
52
|
+
numSeats: number;
|
|
53
|
+
/**
|
|
54
|
+
* Total charged, in the currency's minor unit.
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof BillingPaymentResponse
|
|
57
|
+
*/
|
|
58
|
+
amount: number;
|
|
59
|
+
/**
|
|
60
|
+
* USD (cents) or CNY (fen).
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @memberof BillingPaymentResponse
|
|
63
|
+
*/
|
|
64
|
+
currency: string;
|
|
65
|
+
/**
|
|
66
|
+
* Provider-hosted invoice/receipt, when available.
|
|
67
|
+
* @type {string}
|
|
68
|
+
* @memberof BillingPaymentResponse
|
|
69
|
+
*/
|
|
70
|
+
invoiceUrl?: string | null;
|
|
71
|
+
/**
|
|
72
|
+
* When the payment confirmed.
|
|
73
|
+
* @type {Date}
|
|
74
|
+
* @memberof BillingPaymentResponse
|
|
75
|
+
*/
|
|
76
|
+
createdAt: Date;
|
|
77
|
+
}
|
|
78
|
+
export declare const BillingPaymentResponsePropertyValidationAttributesMap: {
|
|
79
|
+
[property: string]: {
|
|
80
|
+
maxLength?: number;
|
|
81
|
+
minLength?: number;
|
|
82
|
+
pattern?: string;
|
|
83
|
+
maximum?: number;
|
|
84
|
+
exclusiveMaximum?: boolean;
|
|
85
|
+
minimum?: number;
|
|
86
|
+
exclusiveMinimum?: boolean;
|
|
87
|
+
multipleOf?: number;
|
|
88
|
+
maxItems?: number;
|
|
89
|
+
minItems?: number;
|
|
90
|
+
uniqueItems?: boolean;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Check if a given object implements the BillingPaymentResponse interface.
|
|
95
|
+
*/
|
|
96
|
+
export declare function instanceOfBillingPaymentResponse(value: object): value is BillingPaymentResponse;
|
|
97
|
+
export declare function BillingPaymentResponseFromJSON(json: any): BillingPaymentResponse;
|
|
98
|
+
export declare function BillingPaymentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingPaymentResponse;
|
|
99
|
+
export declare function BillingPaymentResponseToJSON(json: any): BillingPaymentResponse;
|
|
100
|
+
export declare function BillingPaymentResponseToJSONTyped(value?: BillingPaymentResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.BillingPaymentResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfBillingPaymentResponse = instanceOfBillingPaymentResponse;
|
|
18
|
+
exports.BillingPaymentResponseFromJSON = BillingPaymentResponseFromJSON;
|
|
19
|
+
exports.BillingPaymentResponseFromJSONTyped = BillingPaymentResponseFromJSONTyped;
|
|
20
|
+
exports.BillingPaymentResponseToJSON = BillingPaymentResponseToJSON;
|
|
21
|
+
exports.BillingPaymentResponseToJSONTyped = BillingPaymentResponseToJSONTyped;
|
|
22
|
+
const BillingSystem_1 = require("./BillingSystem");
|
|
23
|
+
exports.BillingPaymentResponsePropertyValidationAttributesMap = {};
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the BillingPaymentResponse interface.
|
|
26
|
+
*/
|
|
27
|
+
function instanceOfBillingPaymentResponse(value) {
|
|
28
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('billingSystem' in value) || value['billingSystem'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('planId' in value) || value['planId'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('interval' in value) || value['interval'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('numSeats' in value) || value['numSeats'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('amount' in value) || value['amount'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('currency' in value) || value['currency'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
function BillingPaymentResponseFromJSON(json) {
|
|
47
|
+
return BillingPaymentResponseFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
function BillingPaymentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'id': json['id'],
|
|
55
|
+
'billingSystem': (0, BillingSystem_1.BillingSystemFromJSON)(json['billing_system']),
|
|
56
|
+
'planId': json['plan_id'],
|
|
57
|
+
'interval': json['interval'],
|
|
58
|
+
'numSeats': json['num_seats'],
|
|
59
|
+
'amount': json['amount'],
|
|
60
|
+
'currency': json['currency'],
|
|
61
|
+
'invoiceUrl': json['invoice_url'] == null ? undefined : json['invoice_url'],
|
|
62
|
+
'createdAt': (new Date(json['created_at'])),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function BillingPaymentResponseToJSON(json) {
|
|
66
|
+
return BillingPaymentResponseToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
function BillingPaymentResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
'id': value['id'],
|
|
74
|
+
'billing_system': (0, BillingSystem_1.BillingSystemToJSON)(value['billingSystem']),
|
|
75
|
+
'plan_id': value['planId'],
|
|
76
|
+
'interval': value['interval'],
|
|
77
|
+
'num_seats': value['numSeats'],
|
|
78
|
+
'amount': value['amount'],
|
|
79
|
+
'currency': value['currency'],
|
|
80
|
+
'invoice_url': value['invoiceUrl'],
|
|
81
|
+
'created_at': value['createdAt'].toISOString(),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* External payment platform a subscription or payment is linked to.
|
|
14
|
+
*
|
|
15
|
+
* ``STRIPE`` serves North America; ``PING_PP`` (Ping++, a mainland-China
|
|
16
|
+
* payment aggregator fronting Alipay + WeChat Pay) serves China. Rows
|
|
17
|
+
* with no external billing linkage (free / admin-issued / synthetic
|
|
18
|
+
* fall-back subscriptions) carry NULL instead of a value.
|
|
19
|
+
* @export
|
|
20
|
+
*/
|
|
21
|
+
export declare const BillingSystem: {
|
|
22
|
+
readonly Stripe: 'STRIPE';
|
|
23
|
+
readonly PingPp: 'PING_PP';
|
|
24
|
+
};
|
|
25
|
+
export type BillingSystem = typeof BillingSystem[keyof typeof BillingSystem];
|
|
26
|
+
export declare function instanceOfBillingSystem(value: any): boolean;
|
|
27
|
+
export declare function BillingSystemFromJSON(json: any): BillingSystem;
|
|
28
|
+
export declare function BillingSystemFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingSystem;
|
|
29
|
+
export declare function BillingSystemToJSON(value?: BillingSystem | null): any;
|
|
30
|
+
export declare function BillingSystemToJSONTyped(value: any, ignoreDiscriminator: boolean): BillingSystem;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.BillingSystem = void 0;
|
|
17
|
+
exports.instanceOfBillingSystem = instanceOfBillingSystem;
|
|
18
|
+
exports.BillingSystemFromJSON = BillingSystemFromJSON;
|
|
19
|
+
exports.BillingSystemFromJSONTyped = BillingSystemFromJSONTyped;
|
|
20
|
+
exports.BillingSystemToJSON = BillingSystemToJSON;
|
|
21
|
+
exports.BillingSystemToJSONTyped = BillingSystemToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* External payment platform a subscription or payment is linked to.
|
|
24
|
+
*
|
|
25
|
+
* ``STRIPE`` serves North America; ``PING_PP`` (Ping++, a mainland-China
|
|
26
|
+
* payment aggregator fronting Alipay + WeChat Pay) serves China. Rows
|
|
27
|
+
* with no external billing linkage (free / admin-issued / synthetic
|
|
28
|
+
* fall-back subscriptions) carry NULL instead of a value.
|
|
29
|
+
* @export
|
|
30
|
+
*/
|
|
31
|
+
exports.BillingSystem = {
|
|
32
|
+
Stripe: 'STRIPE',
|
|
33
|
+
PingPp: 'PING_PP'
|
|
34
|
+
};
|
|
35
|
+
function instanceOfBillingSystem(value) {
|
|
36
|
+
for (const key in exports.BillingSystem) {
|
|
37
|
+
if (Object.prototype.hasOwnProperty.call(exports.BillingSystem, key)) {
|
|
38
|
+
if (exports.BillingSystem[key] === value) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
function BillingSystemFromJSON(json) {
|
|
46
|
+
return BillingSystemFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function BillingSystemFromJSONTyped(json, ignoreDiscriminator) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
function BillingSystemToJSON(value) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
function BillingSystemToJSONTyped(value, ignoreDiscriminator) {
|
|
55
|
+
return value;
|
|
56
|
+
}
|
|
@@ -9,8 +9,16 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { BillingInterval } from './BillingInterval';
|
|
13
|
+
import type { BillingSystem } from './BillingSystem';
|
|
12
14
|
/**
|
|
13
15
|
* Body for ``POST /v1/tenants/{tenant_id}/subscriptions``.
|
|
16
|
+
*
|
|
17
|
+
* For a priced plan, ``interval`` and ``billing_system`` are required
|
|
18
|
+
* (``channel`` too for Ping++); the response carries the provider
|
|
19
|
+
* checkout to complete. For the free plan they are ignored — the
|
|
20
|
+
* downgrade is applied immediately (unbilled tenants) or scheduled
|
|
21
|
+
* for period end (billed tenants).
|
|
14
22
|
* @export
|
|
15
23
|
* @interface ChangeSubscriptionRequest
|
|
16
24
|
*/
|
|
@@ -27,6 +35,32 @@ export interface ChangeSubscriptionRequest {
|
|
|
27
35
|
* @memberof ChangeSubscriptionRequest
|
|
28
36
|
*/
|
|
29
37
|
numSeats: number;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {BillingInterval}
|
|
41
|
+
* @memberof ChangeSubscriptionRequest
|
|
42
|
+
*/
|
|
43
|
+
interval?: BillingInterval;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {BillingSystem}
|
|
47
|
+
* @memberof ChangeSubscriptionRequest
|
|
48
|
+
*/
|
|
49
|
+
billingSystem?: BillingSystem;
|
|
50
|
+
/**
|
|
51
|
+
* Ping++ payment channel chosen in the UI (e.g. 'alipay_pc_direct', 'wx_pub_qr'). Required when billing_system=PING_PP.
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof ChangeSubscriptionRequest
|
|
54
|
+
*/
|
|
55
|
+
channel?: string | null;
|
|
56
|
+
/**
|
|
57
|
+
* Channel-specific Ping++ charge `extra` parameters (success_url, product ids, ... — see the Ping++ charge API for the chosen channel). Passed through verbatim; amounts are always resolved server-side.
|
|
58
|
+
* @type {{ [key: string]: any; }}
|
|
59
|
+
* @memberof ChangeSubscriptionRequest
|
|
60
|
+
*/
|
|
61
|
+
channelExtra?: {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
} | null;
|
|
30
64
|
}
|
|
31
65
|
export declare const ChangeSubscriptionRequestPropertyValidationAttributesMap: {
|
|
32
66
|
[property: string]: {
|
|
@@ -19,6 +19,8 @@ exports.ChangeSubscriptionRequestFromJSON = ChangeSubscriptionRequestFromJSON;
|
|
|
19
19
|
exports.ChangeSubscriptionRequestFromJSONTyped = ChangeSubscriptionRequestFromJSONTyped;
|
|
20
20
|
exports.ChangeSubscriptionRequestToJSON = ChangeSubscriptionRequestToJSON;
|
|
21
21
|
exports.ChangeSubscriptionRequestToJSONTyped = ChangeSubscriptionRequestToJSONTyped;
|
|
22
|
+
const BillingInterval_1 = require("./BillingInterval");
|
|
23
|
+
const BillingSystem_1 = require("./BillingSystem");
|
|
22
24
|
exports.ChangeSubscriptionRequestPropertyValidationAttributesMap = {
|
|
23
25
|
numSeats: {
|
|
24
26
|
minimum: 1,
|
|
@@ -45,6 +47,10 @@ function ChangeSubscriptionRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
47
|
return {
|
|
46
48
|
'subscriptionId': json['subscription_id'],
|
|
47
49
|
'numSeats': json['num_seats'],
|
|
50
|
+
'interval': json['interval'] == null ? undefined : (0, BillingInterval_1.BillingIntervalFromJSON)(json['interval']),
|
|
51
|
+
'billingSystem': json['billing_system'] == null ? undefined : (0, BillingSystem_1.BillingSystemFromJSON)(json['billing_system']),
|
|
52
|
+
'channel': json['channel'] == null ? undefined : json['channel'],
|
|
53
|
+
'channelExtra': json['channel_extra'] == null ? undefined : json['channel_extra'],
|
|
48
54
|
};
|
|
49
55
|
}
|
|
50
56
|
function ChangeSubscriptionRequestToJSON(json) {
|
|
@@ -57,5 +63,9 @@ function ChangeSubscriptionRequestToJSONTyped(value, ignoreDiscriminator = false
|
|
|
57
63
|
return {
|
|
58
64
|
'subscription_id': value['subscriptionId'],
|
|
59
65
|
'num_seats': value['numSeats'],
|
|
66
|
+
'interval': (0, BillingInterval_1.BillingIntervalToJSON)(value['interval']),
|
|
67
|
+
'billing_system': (0, BillingSystem_1.BillingSystemToJSON)(value['billingSystem']),
|
|
68
|
+
'channel': value['channel'],
|
|
69
|
+
'channel_extra': value['channelExtra'],
|
|
60
70
|
};
|
|
61
71
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* What the client must do next after a subscription-change request.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const CheckoutAction: {
|
|
17
|
+
readonly Redirect: 'REDIRECT';
|
|
18
|
+
readonly Credential: 'CREDENTIAL';
|
|
19
|
+
readonly Scheduled: 'SCHEDULED';
|
|
20
|
+
readonly Applied: 'APPLIED';
|
|
21
|
+
};
|
|
22
|
+
export type CheckoutAction = typeof CheckoutAction[keyof typeof CheckoutAction];
|
|
23
|
+
export declare function instanceOfCheckoutAction(value: any): boolean;
|
|
24
|
+
export declare function CheckoutActionFromJSON(json: any): CheckoutAction;
|
|
25
|
+
export declare function CheckoutActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): CheckoutAction;
|
|
26
|
+
export declare function CheckoutActionToJSON(value?: CheckoutAction | null): any;
|
|
27
|
+
export declare function CheckoutActionToJSONTyped(value: any, ignoreDiscriminator: boolean): CheckoutAction;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.CheckoutAction = void 0;
|
|
17
|
+
exports.instanceOfCheckoutAction = instanceOfCheckoutAction;
|
|
18
|
+
exports.CheckoutActionFromJSON = CheckoutActionFromJSON;
|
|
19
|
+
exports.CheckoutActionFromJSONTyped = CheckoutActionFromJSONTyped;
|
|
20
|
+
exports.CheckoutActionToJSON = CheckoutActionToJSON;
|
|
21
|
+
exports.CheckoutActionToJSONTyped = CheckoutActionToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* What the client must do next after a subscription-change request.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.CheckoutAction = {
|
|
27
|
+
Redirect: 'REDIRECT',
|
|
28
|
+
Credential: 'CREDENTIAL',
|
|
29
|
+
Scheduled: 'SCHEDULED',
|
|
30
|
+
Applied: 'APPLIED'
|
|
31
|
+
};
|
|
32
|
+
function instanceOfCheckoutAction(value) {
|
|
33
|
+
for (const key in exports.CheckoutAction) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(exports.CheckoutAction, key)) {
|
|
35
|
+
if (exports.CheckoutAction[key] === value) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
function CheckoutActionFromJSON(json) {
|
|
43
|
+
return CheckoutActionFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function CheckoutActionFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
function CheckoutActionToJSON(value) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
function CheckoutActionToJSONTyped(value, ignoreDiscriminator) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { CheckoutAction } from './CheckoutAction';
|
|
13
|
+
import type { BillingSystem } from './BillingSystem';
|
|
14
|
+
/**
|
|
15
|
+
* Result of ``POST /v1/tenants/{tenant_id}/subscriptions``.
|
|
16
|
+
*
|
|
17
|
+
* ``REDIRECT`` → send the browser to ``url`` (Stripe Checkout).
|
|
18
|
+
* ``CREDENTIAL`` → feed ``credential`` to the Ping++ JS SDK to invoke
|
|
19
|
+
* the chosen channel. ``SCHEDULED`` → nothing to pay; the current
|
|
20
|
+
* billed subscription will not renew and expires at period end.
|
|
21
|
+
* ``APPLIED`` → the change is already in effect (free-plan downgrade
|
|
22
|
+
* of an unbilled tenant, or a no-op request).
|
|
23
|
+
* @export
|
|
24
|
+
* @interface CheckoutResponse
|
|
25
|
+
*/
|
|
26
|
+
export interface CheckoutResponse {
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {CheckoutAction}
|
|
30
|
+
* @memberof CheckoutResponse
|
|
31
|
+
*/
|
|
32
|
+
action: CheckoutAction;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {BillingSystem}
|
|
36
|
+
* @memberof CheckoutResponse
|
|
37
|
+
*/
|
|
38
|
+
billingSystem?: BillingSystem;
|
|
39
|
+
/**
|
|
40
|
+
* Stripe Checkout URL (action=REDIRECT).
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof CheckoutResponse
|
|
43
|
+
*/
|
|
44
|
+
url?: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Ping++ charge credential (action=CREDENTIAL).
|
|
47
|
+
* @type {{ [key: string]: any; }}
|
|
48
|
+
* @memberof CheckoutResponse
|
|
49
|
+
*/
|
|
50
|
+
credential?: {
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
} | null;
|
|
53
|
+
}
|
|
54
|
+
export declare const CheckoutResponsePropertyValidationAttributesMap: {
|
|
55
|
+
[property: string]: {
|
|
56
|
+
maxLength?: number;
|
|
57
|
+
minLength?: number;
|
|
58
|
+
pattern?: string;
|
|
59
|
+
maximum?: number;
|
|
60
|
+
exclusiveMaximum?: boolean;
|
|
61
|
+
minimum?: number;
|
|
62
|
+
exclusiveMinimum?: boolean;
|
|
63
|
+
multipleOf?: number;
|
|
64
|
+
maxItems?: number;
|
|
65
|
+
minItems?: number;
|
|
66
|
+
uniqueItems?: boolean;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Check if a given object implements the CheckoutResponse interface.
|
|
71
|
+
*/
|
|
72
|
+
export declare function instanceOfCheckoutResponse(value: object): value is CheckoutResponse;
|
|
73
|
+
export declare function CheckoutResponseFromJSON(json: any): CheckoutResponse;
|
|
74
|
+
export declare function CheckoutResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CheckoutResponse;
|
|
75
|
+
export declare function CheckoutResponseToJSON(json: any): CheckoutResponse;
|
|
76
|
+
export declare function CheckoutResponseToJSONTyped(value?: CheckoutResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -13,48 +13,48 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
|
|
16
|
+
exports.CheckoutResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfCheckoutResponse = instanceOfCheckoutResponse;
|
|
18
|
+
exports.CheckoutResponseFromJSON = CheckoutResponseFromJSON;
|
|
19
|
+
exports.CheckoutResponseFromJSONTyped = CheckoutResponseFromJSONTyped;
|
|
20
|
+
exports.CheckoutResponseToJSON = CheckoutResponseToJSON;
|
|
21
|
+
exports.CheckoutResponseToJSONTyped = CheckoutResponseToJSONTyped;
|
|
22
|
+
const CheckoutAction_1 = require("./CheckoutAction");
|
|
23
|
+
const BillingSystem_1 = require("./BillingSystem");
|
|
24
|
+
exports.CheckoutResponsePropertyValidationAttributesMap = {};
|
|
23
25
|
/**
|
|
24
|
-
* Check if a given object implements the
|
|
26
|
+
* Check if a given object implements the CheckoutResponse interface.
|
|
25
27
|
*/
|
|
26
|
-
function
|
|
27
|
-
if (!('
|
|
28
|
-
return false;
|
|
29
|
-
if (!('noop' in value) || value['noop'] === undefined)
|
|
30
|
-
return false;
|
|
31
|
-
if (!('idempotencyKey' in value) || value['idempotencyKey'] === undefined)
|
|
28
|
+
function instanceOfCheckoutResponse(value) {
|
|
29
|
+
if (!('action' in value) || value['action'] === undefined)
|
|
32
30
|
return false;
|
|
33
31
|
return true;
|
|
34
32
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
33
|
+
function CheckoutResponseFromJSON(json) {
|
|
34
|
+
return CheckoutResponseFromJSONTyped(json, false);
|
|
37
35
|
}
|
|
38
|
-
function
|
|
36
|
+
function CheckoutResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
39
37
|
if (json == null) {
|
|
40
38
|
return json;
|
|
41
39
|
}
|
|
42
40
|
return {
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
41
|
+
'action': (0, CheckoutAction_1.CheckoutActionFromJSON)(json['action']),
|
|
42
|
+
'billingSystem': json['billing_system'] == null ? undefined : (0, BillingSystem_1.BillingSystemFromJSON)(json['billing_system']),
|
|
43
|
+
'url': json['url'] == null ? undefined : json['url'],
|
|
44
|
+
'credential': json['credential'] == null ? undefined : json['credential'],
|
|
46
45
|
};
|
|
47
46
|
}
|
|
48
|
-
function
|
|
49
|
-
return
|
|
47
|
+
function CheckoutResponseToJSON(json) {
|
|
48
|
+
return CheckoutResponseToJSONTyped(json, false);
|
|
50
49
|
}
|
|
51
|
-
function
|
|
50
|
+
function CheckoutResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
51
|
if (value == null) {
|
|
53
52
|
return value;
|
|
54
53
|
}
|
|
55
54
|
return {
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
55
|
+
'action': (0, CheckoutAction_1.CheckoutActionToJSON)(value['action']),
|
|
56
|
+
'billing_system': (0, BillingSystem_1.BillingSystemToJSON)(value['billingSystem']),
|
|
57
|
+
'url': value['url'],
|
|
58
|
+
'credential': value['credential'],
|
|
59
59
|
};
|
|
60
60
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ScheduleCadence } from './ScheduleCadence';
|
|
12
13
|
/**
|
|
13
14
|
* Create a new workflow definition.
|
|
14
15
|
*
|
|
@@ -19,6 +20,24 @@
|
|
|
19
20
|
* @interface CreateWorkflowDefinitionRequest
|
|
20
21
|
*/
|
|
21
22
|
export interface CreateWorkflowDefinitionRequest {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @type {ScheduleCadence}
|
|
26
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
27
|
+
*/
|
|
28
|
+
scheduleCadence?: ScheduleCadence;
|
|
29
|
+
/**
|
|
30
|
+
* First occurrence. Read in ``schedule_timezone``, so its local wall time, weekday and day of month drive the recurrence. A MONTHLY schedule must land on or before the 28th: Temporal silently skips months that are too short.
|
|
31
|
+
* @type {Date}
|
|
32
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
33
|
+
*/
|
|
34
|
+
scheduleStartAt?: Date | null;
|
|
35
|
+
/**
|
|
36
|
+
* IANA zone the schedule fires in, e.g. ``Asia/Shanghai``. Optional: omit it to inherit the tenant timezone. Only set it to fire in a different zone than the tenant's. Must be an IANA name, not an ISO offset — an offset stops meaning the same wall clock across DST.
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof CreateWorkflowDefinitionRequest
|
|
39
|
+
*/
|
|
40
|
+
scheduleTimezone?: string | null;
|
|
22
41
|
/**
|
|
23
42
|
*
|
|
24
43
|
* @type {string}
|