@knowledge-stack/ksapi 1.163.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
|
@@ -19,7 +19,11 @@ exports.CreateWorkflowDefinitionRequestFromJSON = CreateWorkflowDefinitionReques
|
|
|
19
19
|
exports.CreateWorkflowDefinitionRequestFromJSONTyped = CreateWorkflowDefinitionRequestFromJSONTyped;
|
|
20
20
|
exports.CreateWorkflowDefinitionRequestToJSON = CreateWorkflowDefinitionRequestToJSON;
|
|
21
21
|
exports.CreateWorkflowDefinitionRequestToJSONTyped = CreateWorkflowDefinitionRequestToJSONTyped;
|
|
22
|
+
const ScheduleCadence_1 = require("./ScheduleCadence");
|
|
22
23
|
exports.CreateWorkflowDefinitionRequestPropertyValidationAttributesMap = {
|
|
24
|
+
scheduleTimezone: {
|
|
25
|
+
maxLength: 64,
|
|
26
|
+
},
|
|
23
27
|
name: {
|
|
24
28
|
maxLength: 255,
|
|
25
29
|
},
|
|
@@ -58,6 +62,9 @@ function CreateWorkflowDefinitionRequestFromJSONTyped(json, ignoreDiscriminator)
|
|
|
58
62
|
return json;
|
|
59
63
|
}
|
|
60
64
|
return {
|
|
65
|
+
'scheduleCadence': json['schedule_cadence'] == null ? undefined : (0, ScheduleCadence_1.ScheduleCadenceFromJSON)(json['schedule_cadence']),
|
|
66
|
+
'scheduleStartAt': json['schedule_start_at'] == null ? undefined : (new Date(json['schedule_start_at'])),
|
|
67
|
+
'scheduleTimezone': json['schedule_timezone'] == null ? undefined : json['schedule_timezone'],
|
|
61
68
|
'name': json['name'],
|
|
62
69
|
'description': json['description'] == null ? undefined : json['description'],
|
|
63
70
|
'maxRunDurationSeconds': json['max_run_duration_seconds'] == null ? undefined : json['max_run_duration_seconds'],
|
|
@@ -77,6 +84,9 @@ function CreateWorkflowDefinitionRequestToJSONTyped(value, ignoreDiscriminator =
|
|
|
77
84
|
return value;
|
|
78
85
|
}
|
|
79
86
|
return {
|
|
87
|
+
'schedule_cadence': (0, ScheduleCadence_1.ScheduleCadenceToJSON)(value['scheduleCadence']),
|
|
88
|
+
'schedule_start_at': value['scheduleStartAt'] == null ? value['scheduleStartAt'] : value['scheduleStartAt'].toISOString(),
|
|
89
|
+
'schedule_timezone': value['scheduleTimezone'],
|
|
80
90
|
'name': value['name'],
|
|
81
91
|
'description': value['description'],
|
|
82
92
|
'max_run_duration_seconds': value['maxRunDurationSeconds'],
|
|
@@ -34,6 +34,12 @@ export interface IdpConfig {
|
|
|
34
34
|
_configuration: {
|
|
35
35
|
[key: string]: any;
|
|
36
36
|
};
|
|
37
|
+
/**
|
|
38
|
+
* Crontab string for directory sync
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof IdpConfig
|
|
41
|
+
*/
|
|
42
|
+
syncCrontab?: string | null;
|
|
37
43
|
}
|
|
38
44
|
export declare const IdpConfigPropertyValidationAttributesMap: {
|
|
39
45
|
[property: string]: {
|
package/dist/models/IdpConfig.js
CHANGED
|
@@ -20,7 +20,14 @@ exports.IdpConfigFromJSONTyped = IdpConfigFromJSONTyped;
|
|
|
20
20
|
exports.IdpConfigToJSON = IdpConfigToJSON;
|
|
21
21
|
exports.IdpConfigToJSONTyped = IdpConfigToJSONTyped;
|
|
22
22
|
const SupportedIdP_1 = require("./SupportedIdP");
|
|
23
|
-
exports.IdpConfigPropertyValidationAttributesMap = {
|
|
23
|
+
exports.IdpConfigPropertyValidationAttributesMap = {
|
|
24
|
+
_configuration: {
|
|
25
|
+
minItems: 1,
|
|
26
|
+
},
|
|
27
|
+
syncCrontab: {
|
|
28
|
+
minLength: 9,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
24
31
|
/**
|
|
25
32
|
* Check if a given object implements the IdpConfig interface.
|
|
26
33
|
*/
|
|
@@ -41,6 +48,7 @@ function IdpConfigFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
41
48
|
return {
|
|
42
49
|
'provider': (0, SupportedIdP_1.SupportedIdPFromJSON)(json['provider']),
|
|
43
50
|
'_configuration': json['configuration'],
|
|
51
|
+
'syncCrontab': json['sync_crontab'] == null ? undefined : json['sync_crontab'],
|
|
44
52
|
};
|
|
45
53
|
}
|
|
46
54
|
function IdpConfigToJSON(json) {
|
|
@@ -53,5 +61,6 @@ function IdpConfigToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
53
61
|
return {
|
|
54
62
|
'provider': (0, SupportedIdP_1.SupportedIdPToJSON)(value['provider']),
|
|
55
63
|
'configuration': value['_configuration'],
|
|
64
|
+
'sync_crontab': value['syncCrontab'],
|
|
56
65
|
};
|
|
57
66
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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 { BillingPaymentResponse } from './BillingPaymentResponse';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface PaginatedResponseBillingPaymentResponse
|
|
17
|
+
*/
|
|
18
|
+
export interface PaginatedResponseBillingPaymentResponse {
|
|
19
|
+
/**
|
|
20
|
+
* List of items
|
|
21
|
+
* @type {Array<BillingPaymentResponse>}
|
|
22
|
+
* @memberof PaginatedResponseBillingPaymentResponse
|
|
23
|
+
*/
|
|
24
|
+
items: Array<BillingPaymentResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Total number of items
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof PaginatedResponseBillingPaymentResponse
|
|
29
|
+
*/
|
|
30
|
+
total: number;
|
|
31
|
+
/**
|
|
32
|
+
* Number of items per page
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof PaginatedResponseBillingPaymentResponse
|
|
35
|
+
*/
|
|
36
|
+
limit: number;
|
|
37
|
+
/**
|
|
38
|
+
* Number of items to skip
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof PaginatedResponseBillingPaymentResponse
|
|
41
|
+
*/
|
|
42
|
+
offset: number;
|
|
43
|
+
}
|
|
44
|
+
export declare const PaginatedResponseBillingPaymentResponsePropertyValidationAttributesMap: {
|
|
45
|
+
[property: string]: {
|
|
46
|
+
maxLength?: number;
|
|
47
|
+
minLength?: number;
|
|
48
|
+
pattern?: string;
|
|
49
|
+
maximum?: number;
|
|
50
|
+
exclusiveMaximum?: boolean;
|
|
51
|
+
minimum?: number;
|
|
52
|
+
exclusiveMinimum?: boolean;
|
|
53
|
+
multipleOf?: number;
|
|
54
|
+
maxItems?: number;
|
|
55
|
+
minItems?: number;
|
|
56
|
+
uniqueItems?: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Check if a given object implements the PaginatedResponseBillingPaymentResponse interface.
|
|
61
|
+
*/
|
|
62
|
+
export declare function instanceOfPaginatedResponseBillingPaymentResponse(value: object): value is PaginatedResponseBillingPaymentResponse;
|
|
63
|
+
export declare function PaginatedResponseBillingPaymentResponseFromJSON(json: any): PaginatedResponseBillingPaymentResponse;
|
|
64
|
+
export declare function PaginatedResponseBillingPaymentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseBillingPaymentResponse;
|
|
65
|
+
export declare function PaginatedResponseBillingPaymentResponseToJSON(json: any): PaginatedResponseBillingPaymentResponse;
|
|
66
|
+
export declare function PaginatedResponseBillingPaymentResponseToJSONTyped(value?: PaginatedResponseBillingPaymentResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,78 @@
|
|
|
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.PaginatedResponseBillingPaymentResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfPaginatedResponseBillingPaymentResponse = instanceOfPaginatedResponseBillingPaymentResponse;
|
|
18
|
+
exports.PaginatedResponseBillingPaymentResponseFromJSON = PaginatedResponseBillingPaymentResponseFromJSON;
|
|
19
|
+
exports.PaginatedResponseBillingPaymentResponseFromJSONTyped = PaginatedResponseBillingPaymentResponseFromJSONTyped;
|
|
20
|
+
exports.PaginatedResponseBillingPaymentResponseToJSON = PaginatedResponseBillingPaymentResponseToJSON;
|
|
21
|
+
exports.PaginatedResponseBillingPaymentResponseToJSONTyped = PaginatedResponseBillingPaymentResponseToJSONTyped;
|
|
22
|
+
const BillingPaymentResponse_1 = require("./BillingPaymentResponse");
|
|
23
|
+
exports.PaginatedResponseBillingPaymentResponsePropertyValidationAttributesMap = {
|
|
24
|
+
total: {
|
|
25
|
+
minimum: 0,
|
|
26
|
+
exclusiveMinimum: false,
|
|
27
|
+
},
|
|
28
|
+
limit: {
|
|
29
|
+
minimum: 1,
|
|
30
|
+
exclusiveMinimum: false,
|
|
31
|
+
},
|
|
32
|
+
offset: {
|
|
33
|
+
minimum: 0,
|
|
34
|
+
exclusiveMinimum: false,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the PaginatedResponseBillingPaymentResponse interface.
|
|
39
|
+
*/
|
|
40
|
+
function instanceOfPaginatedResponseBillingPaymentResponse(value) {
|
|
41
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('total' in value) || value['total'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('limit' in value) || value['limit'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if (!('offset' in value) || value['offset'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
function PaginatedResponseBillingPaymentResponseFromJSON(json) {
|
|
52
|
+
return PaginatedResponseBillingPaymentResponseFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function PaginatedResponseBillingPaymentResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'items': (json['items'].map(BillingPaymentResponse_1.BillingPaymentResponseFromJSON)),
|
|
60
|
+
'total': json['total'],
|
|
61
|
+
'limit': json['limit'],
|
|
62
|
+
'offset': json['offset'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function PaginatedResponseBillingPaymentResponseToJSON(json) {
|
|
66
|
+
return PaginatedResponseBillingPaymentResponseToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
function PaginatedResponseBillingPaymentResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
69
|
+
if (value == null) {
|
|
70
|
+
return value;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
'items': (value['items'].map(BillingPaymentResponse_1.BillingPaymentResponseToJSON)),
|
|
74
|
+
'total': value['total'],
|
|
75
|
+
'limit': value['limit'],
|
|
76
|
+
'offset': value['offset'],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
* How often a workflow definition runs itself.
|
|
14
|
+
*
|
|
15
|
+
* The cadence names the recurrence; the time of day, weekday and day of
|
|
16
|
+
* month all come from the definition's ``schedule_start_at``, so an illegal
|
|
17
|
+
* combination (a daily cadence carrying a weekday, say) cannot be expressed.
|
|
18
|
+
* ``None`` on the definition means manual-only — the state every definition
|
|
19
|
+
* is in today.
|
|
20
|
+
* @export
|
|
21
|
+
*/
|
|
22
|
+
export declare const ScheduleCadence: {
|
|
23
|
+
readonly Daily: 'DAILY';
|
|
24
|
+
readonly Weekly: 'WEEKLY';
|
|
25
|
+
readonly Monthly: 'MONTHLY';
|
|
26
|
+
};
|
|
27
|
+
export type ScheduleCadence = typeof ScheduleCadence[keyof typeof ScheduleCadence];
|
|
28
|
+
export declare function instanceOfScheduleCadence(value: any): boolean;
|
|
29
|
+
export declare function ScheduleCadenceFromJSON(json: any): ScheduleCadence;
|
|
30
|
+
export declare function ScheduleCadenceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ScheduleCadence;
|
|
31
|
+
export declare function ScheduleCadenceToJSON(value?: ScheduleCadence | null): any;
|
|
32
|
+
export declare function ScheduleCadenceToJSONTyped(value: any, ignoreDiscriminator: boolean): ScheduleCadence;
|
|
@@ -0,0 +1,58 @@
|
|
|
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.ScheduleCadence = void 0;
|
|
17
|
+
exports.instanceOfScheduleCadence = instanceOfScheduleCadence;
|
|
18
|
+
exports.ScheduleCadenceFromJSON = ScheduleCadenceFromJSON;
|
|
19
|
+
exports.ScheduleCadenceFromJSONTyped = ScheduleCadenceFromJSONTyped;
|
|
20
|
+
exports.ScheduleCadenceToJSON = ScheduleCadenceToJSON;
|
|
21
|
+
exports.ScheduleCadenceToJSONTyped = ScheduleCadenceToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* How often a workflow definition runs itself.
|
|
24
|
+
*
|
|
25
|
+
* The cadence names the recurrence; the time of day, weekday and day of
|
|
26
|
+
* month all come from the definition's ``schedule_start_at``, so an illegal
|
|
27
|
+
* combination (a daily cadence carrying a weekday, say) cannot be expressed.
|
|
28
|
+
* ``None`` on the definition means manual-only — the state every definition
|
|
29
|
+
* is in today.
|
|
30
|
+
* @export
|
|
31
|
+
*/
|
|
32
|
+
exports.ScheduleCadence = {
|
|
33
|
+
Daily: 'DAILY',
|
|
34
|
+
Weekly: 'WEEKLY',
|
|
35
|
+
Monthly: 'MONTHLY'
|
|
36
|
+
};
|
|
37
|
+
function instanceOfScheduleCadence(value) {
|
|
38
|
+
for (const key in exports.ScheduleCadence) {
|
|
39
|
+
if (Object.prototype.hasOwnProperty.call(exports.ScheduleCadence, key)) {
|
|
40
|
+
if (exports.ScheduleCadence[key] === value) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
function ScheduleCadenceFromJSON(json) {
|
|
48
|
+
return ScheduleCadenceFromJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function ScheduleCadenceFromJSONTyped(json, ignoreDiscriminator) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
function ScheduleCadenceToJSON(value) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
function ScheduleCadenceToJSONTyped(value, ignoreDiscriminator) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
@@ -69,6 +69,30 @@ export interface SubscriptionPlanResponse {
|
|
|
69
69
|
* @memberof SubscriptionPlanResponse
|
|
70
70
|
*/
|
|
71
71
|
_public: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Per-seat monthly price in USD cents (Stripe / NA). NULL = not self-serve purchasable in this currency/interval.
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof SubscriptionPlanResponse
|
|
76
|
+
*/
|
|
77
|
+
priceMonthlyUsdCents?: number | null;
|
|
78
|
+
/**
|
|
79
|
+
* Per-seat annual price in USD cents (Stripe / NA).
|
|
80
|
+
* @type {number}
|
|
81
|
+
* @memberof SubscriptionPlanResponse
|
|
82
|
+
*/
|
|
83
|
+
priceAnnualUsdCents?: number | null;
|
|
84
|
+
/**
|
|
85
|
+
* Per-seat monthly price in CNY fen (Ping++ / CN).
|
|
86
|
+
* @type {number}
|
|
87
|
+
* @memberof SubscriptionPlanResponse
|
|
88
|
+
*/
|
|
89
|
+
priceMonthlyCnyFen?: number | null;
|
|
90
|
+
/**
|
|
91
|
+
* Per-seat annual price in CNY fen (Ping++ / CN).
|
|
92
|
+
* @type {number}
|
|
93
|
+
* @memberof SubscriptionPlanResponse
|
|
94
|
+
*/
|
|
95
|
+
priceAnnualCnyFen?: number | null;
|
|
72
96
|
/**
|
|
73
97
|
* Plan creation timestamp.
|
|
74
98
|
* @type {Date}
|
|
@@ -62,6 +62,10 @@ function SubscriptionPlanResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
62
62
|
'mediaMinutes': json['media_minutes'],
|
|
63
63
|
'maxSeats': json['max_seats'],
|
|
64
64
|
'_public': json['public'],
|
|
65
|
+
'priceMonthlyUsdCents': json['price_monthly_usd_cents'] == null ? undefined : json['price_monthly_usd_cents'],
|
|
66
|
+
'priceAnnualUsdCents': json['price_annual_usd_cents'] == null ? undefined : json['price_annual_usd_cents'],
|
|
67
|
+
'priceMonthlyCnyFen': json['price_monthly_cny_fen'] == null ? undefined : json['price_monthly_cny_fen'],
|
|
68
|
+
'priceAnnualCnyFen': json['price_annual_cny_fen'] == null ? undefined : json['price_annual_cny_fen'],
|
|
65
69
|
'createdAt': (new Date(json['created_at'])),
|
|
66
70
|
'updatedAt': (new Date(json['updated_at'])),
|
|
67
71
|
};
|
|
@@ -82,6 +86,10 @@ function SubscriptionPlanResponseToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
82
86
|
'media_minutes': value['mediaMinutes'],
|
|
83
87
|
'max_seats': value['maxSeats'],
|
|
84
88
|
'public': value['_public'],
|
|
89
|
+
'price_monthly_usd_cents': value['priceMonthlyUsdCents'],
|
|
90
|
+
'price_annual_usd_cents': value['priceAnnualUsdCents'],
|
|
91
|
+
'price_monthly_cny_fen': value['priceMonthlyCnyFen'],
|
|
92
|
+
'price_annual_cny_fen': value['priceAnnualCnyFen'],
|
|
85
93
|
'created_at': value['createdAt'].toISOString(),
|
|
86
94
|
'updated_at': value['updatedAt'].toISOString(),
|
|
87
95
|
};
|
|
@@ -9,48 +9,59 @@
|
|
|
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';
|
|
14
|
+
import type { SubscriptionPlanResponse } from './SubscriptionPlanResponse';
|
|
12
15
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* The endpoint returns immediately after the (mock-)Stripe charge is
|
|
16
|
-
* submitted; the actual plan/seat write happens later in the Stripe
|
|
17
|
-
* subscription webhook. ``submitted=True`` always when the route
|
|
18
|
-
* succeeds (errors raise via the global handler).
|
|
19
|
-
*
|
|
20
|
-
* ``noop=True`` indicates the tenant is already at the requested
|
|
21
|
-
* ``(plan, num_seats)`` — no Stripe call was issued, no webhook will
|
|
22
|
-
* arrive, and the user's account is unchanged. Symmetric with
|
|
23
|
-
* ``StripeWebhookAck.replayed`` so client UIs can render "already
|
|
24
|
-
* on this plan" rather than spinning a "waiting for webhook"
|
|
25
|
-
* indicator forever.
|
|
26
|
-
*
|
|
27
|
-
* ``idempotency_key`` echoes the value forwarded to Stripe — clients
|
|
28
|
-
* can store it to correlate the eventual webhook receipt with the
|
|
29
|
-
* original request, and re-send it verbatim on retries.
|
|
16
|
+
* The tenant's current subscription: plan body + period state.
|
|
30
17
|
* @export
|
|
31
|
-
* @interface
|
|
18
|
+
* @interface TenantSubscriptionResponse
|
|
32
19
|
*/
|
|
33
|
-
export interface
|
|
20
|
+
export interface TenantSubscriptionResponse {
|
|
34
21
|
/**
|
|
35
|
-
*
|
|
36
|
-
* @type {
|
|
37
|
-
* @memberof
|
|
22
|
+
*
|
|
23
|
+
* @type {SubscriptionPlanResponse}
|
|
24
|
+
* @memberof TenantSubscriptionResponse
|
|
38
25
|
*/
|
|
39
|
-
|
|
26
|
+
plan: SubscriptionPlanResponse;
|
|
40
27
|
/**
|
|
41
|
-
*
|
|
42
|
-
* @type {
|
|
43
|
-
* @memberof
|
|
28
|
+
* Seats in force for this period.
|
|
29
|
+
* @type {number}
|
|
30
|
+
* @memberof TenantSubscriptionResponse
|
|
31
|
+
*/
|
|
32
|
+
numSeats: number;
|
|
33
|
+
/**
|
|
34
|
+
* Inclusive period start.
|
|
35
|
+
* @type {Date}
|
|
36
|
+
* @memberof TenantSubscriptionResponse
|
|
44
37
|
*/
|
|
45
|
-
|
|
38
|
+
startDate: Date;
|
|
46
39
|
/**
|
|
47
|
-
*
|
|
48
|
-
* @type {
|
|
49
|
-
* @memberof
|
|
40
|
+
* Exclusive period end. Unbilled subscriptions carry a 100-year horizon; billed ones the paid-through date.
|
|
41
|
+
* @type {Date}
|
|
42
|
+
* @memberof TenantSubscriptionResponse
|
|
43
|
+
*/
|
|
44
|
+
endDate: Date;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @type {BillingSystem}
|
|
48
|
+
* @memberof TenantSubscriptionResponse
|
|
49
|
+
*/
|
|
50
|
+
billingSystem?: BillingSystem;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {BillingInterval}
|
|
54
|
+
* @memberof TenantSubscriptionResponse
|
|
55
|
+
*/
|
|
56
|
+
interval?: BillingInterval;
|
|
57
|
+
/**
|
|
58
|
+
* True when the subscription auto-renews at period end (a Stripe subscription with no cancellation scheduled). False for Ping++ prepay (renewal = buying again), unbilled subscriptions, and Stripe periods with a scheduled cancellation.
|
|
59
|
+
* @type {boolean}
|
|
60
|
+
* @memberof TenantSubscriptionResponse
|
|
50
61
|
*/
|
|
51
|
-
|
|
62
|
+
willRenew: boolean;
|
|
52
63
|
}
|
|
53
|
-
export declare const
|
|
64
|
+
export declare const TenantSubscriptionResponsePropertyValidationAttributesMap: {
|
|
54
65
|
[property: string]: {
|
|
55
66
|
maxLength?: number;
|
|
56
67
|
minLength?: number;
|
|
@@ -66,10 +77,10 @@ export declare const SubmitSubscriptionResponsePropertyValidationAttributesMap:
|
|
|
66
77
|
};
|
|
67
78
|
};
|
|
68
79
|
/**
|
|
69
|
-
* Check if a given object implements the
|
|
80
|
+
* Check if a given object implements the TenantSubscriptionResponse interface.
|
|
70
81
|
*/
|
|
71
|
-
export declare function
|
|
72
|
-
export declare function
|
|
73
|
-
export declare function
|
|
74
|
-
export declare function
|
|
75
|
-
export declare function
|
|
82
|
+
export declare function instanceOfTenantSubscriptionResponse(value: object): value is TenantSubscriptionResponse;
|
|
83
|
+
export declare function TenantSubscriptionResponseFromJSON(json: any): TenantSubscriptionResponse;
|
|
84
|
+
export declare function TenantSubscriptionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TenantSubscriptionResponse;
|
|
85
|
+
export declare function TenantSubscriptionResponseToJSON(json: any): TenantSubscriptionResponse;
|
|
86
|
+
export declare function TenantSubscriptionResponseToJSONTyped(value?: TenantSubscriptionResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,75 @@
|
|
|
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.TenantSubscriptionResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfTenantSubscriptionResponse = instanceOfTenantSubscriptionResponse;
|
|
18
|
+
exports.TenantSubscriptionResponseFromJSON = TenantSubscriptionResponseFromJSON;
|
|
19
|
+
exports.TenantSubscriptionResponseFromJSONTyped = TenantSubscriptionResponseFromJSONTyped;
|
|
20
|
+
exports.TenantSubscriptionResponseToJSON = TenantSubscriptionResponseToJSON;
|
|
21
|
+
exports.TenantSubscriptionResponseToJSONTyped = TenantSubscriptionResponseToJSONTyped;
|
|
22
|
+
const BillingInterval_1 = require("./BillingInterval");
|
|
23
|
+
const BillingSystem_1 = require("./BillingSystem");
|
|
24
|
+
const SubscriptionPlanResponse_1 = require("./SubscriptionPlanResponse");
|
|
25
|
+
exports.TenantSubscriptionResponsePropertyValidationAttributesMap = {};
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the TenantSubscriptionResponse interface.
|
|
28
|
+
*/
|
|
29
|
+
function instanceOfTenantSubscriptionResponse(value) {
|
|
30
|
+
if (!('plan' in value) || value['plan'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('numSeats' in value) || value['numSeats'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('startDate' in value) || value['startDate'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('endDate' in value) || value['endDate'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('willRenew' in value) || value['willRenew'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
function TenantSubscriptionResponseFromJSON(json) {
|
|
43
|
+
return TenantSubscriptionResponseFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function TenantSubscriptionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
if (json == null) {
|
|
47
|
+
return json;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'plan': (0, SubscriptionPlanResponse_1.SubscriptionPlanResponseFromJSON)(json['plan']),
|
|
51
|
+
'numSeats': json['num_seats'],
|
|
52
|
+
'startDate': (new Date(json['start_date'])),
|
|
53
|
+
'endDate': (new Date(json['end_date'])),
|
|
54
|
+
'billingSystem': json['billing_system'] == null ? undefined : (0, BillingSystem_1.BillingSystemFromJSON)(json['billing_system']),
|
|
55
|
+
'interval': json['interval'] == null ? undefined : (0, BillingInterval_1.BillingIntervalFromJSON)(json['interval']),
|
|
56
|
+
'willRenew': json['will_renew'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function TenantSubscriptionResponseToJSON(json) {
|
|
60
|
+
return TenantSubscriptionResponseToJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
function TenantSubscriptionResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
'plan': (0, SubscriptionPlanResponse_1.SubscriptionPlanResponseToJSON)(value['plan']),
|
|
68
|
+
'num_seats': value['numSeats'],
|
|
69
|
+
'start_date': value['startDate'].toISOString(),
|
|
70
|
+
'end_date': value['endDate'].toISOString(),
|
|
71
|
+
'billing_system': (0, BillingSystem_1.BillingSystemToJSON)(value['billingSystem']),
|
|
72
|
+
'interval': (0, BillingInterval_1.BillingIntervalToJSON)(value['interval']),
|
|
73
|
+
'will_renew': value['willRenew'],
|
|
74
|
+
};
|
|
75
|
+
}
|