@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,110 @@
|
|
|
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 { PartType } from './PartType';
|
|
13
|
+
import type { DocumentType } from './DocumentType';
|
|
14
|
+
import type { UserInfo } from './UserInfo';
|
|
15
|
+
/**
|
|
16
|
+
* A single trash item plus a preview link for DOCUMENT items.
|
|
17
|
+
* @export
|
|
18
|
+
* @interface TrashItemDetailResponse
|
|
19
|
+
*/
|
|
20
|
+
export interface TrashItemDetailResponse {
|
|
21
|
+
/**
|
|
22
|
+
* PathPart ID
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof TrashItemDetailResponse
|
|
25
|
+
*/
|
|
26
|
+
pathPartId: string;
|
|
27
|
+
/**
|
|
28
|
+
* Underlying PDO ID
|
|
29
|
+
* @type {string}
|
|
30
|
+
* @memberof TrashItemDetailResponse
|
|
31
|
+
*/
|
|
32
|
+
metadataObjId: string;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {PartType}
|
|
36
|
+
* @memberof TrashItemDetailResponse
|
|
37
|
+
*/
|
|
38
|
+
partType: PartType;
|
|
39
|
+
/**
|
|
40
|
+
* Display name
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof TrashItemDetailResponse
|
|
43
|
+
*/
|
|
44
|
+
name: string;
|
|
45
|
+
/**
|
|
46
|
+
* Parent PathPart ID
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof TrashItemDetailResponse
|
|
49
|
+
*/
|
|
50
|
+
parentPathPartId: string | null;
|
|
51
|
+
/**
|
|
52
|
+
* Original materialized path
|
|
53
|
+
* @type {string}
|
|
54
|
+
* @memberof TrashItemDetailResponse
|
|
55
|
+
*/
|
|
56
|
+
materializedPath: string;
|
|
57
|
+
/**
|
|
58
|
+
* When the item was moved to trash
|
|
59
|
+
* @type {Date}
|
|
60
|
+
* @memberof TrashItemDetailResponse
|
|
61
|
+
*/
|
|
62
|
+
deletedAt: Date;
|
|
63
|
+
/**
|
|
64
|
+
* User that moved it to trash
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof TrashItemDetailResponse
|
|
67
|
+
*/
|
|
68
|
+
deletedBy: string | null;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {DocumentType}
|
|
72
|
+
* @memberof TrashItemDetailResponse
|
|
73
|
+
*/
|
|
74
|
+
documentType?: DocumentType;
|
|
75
|
+
/**
|
|
76
|
+
* Current owner (creator) of the item, or null if unowned.
|
|
77
|
+
* @type {UserInfo}
|
|
78
|
+
* @memberof TrashItemDetailResponse
|
|
79
|
+
*/
|
|
80
|
+
owner?: UserInfo | null;
|
|
81
|
+
/**
|
|
82
|
+
* Presigned URL (6-hour validity) to the document's source blob for preview; null for folders and other non-document items.
|
|
83
|
+
* @type {string}
|
|
84
|
+
* @memberof TrashItemDetailResponse
|
|
85
|
+
*/
|
|
86
|
+
assetS3Url?: string | null;
|
|
87
|
+
}
|
|
88
|
+
export declare const TrashItemDetailResponsePropertyValidationAttributesMap: {
|
|
89
|
+
[property: string]: {
|
|
90
|
+
maxLength?: number;
|
|
91
|
+
minLength?: number;
|
|
92
|
+
pattern?: string;
|
|
93
|
+
maximum?: number;
|
|
94
|
+
exclusiveMaximum?: boolean;
|
|
95
|
+
minimum?: number;
|
|
96
|
+
exclusiveMinimum?: boolean;
|
|
97
|
+
multipleOf?: number;
|
|
98
|
+
maxItems?: number;
|
|
99
|
+
minItems?: number;
|
|
100
|
+
uniqueItems?: boolean;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Check if a given object implements the TrashItemDetailResponse interface.
|
|
105
|
+
*/
|
|
106
|
+
export declare function instanceOfTrashItemDetailResponse(value: object): value is TrashItemDetailResponse;
|
|
107
|
+
export declare function TrashItemDetailResponseFromJSON(json: any): TrashItemDetailResponse;
|
|
108
|
+
export declare function TrashItemDetailResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrashItemDetailResponse;
|
|
109
|
+
export declare function TrashItemDetailResponseToJSON(json: any): TrashItemDetailResponse;
|
|
110
|
+
export declare function TrashItemDetailResponseToJSONTyped(value?: TrashItemDetailResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,89 @@
|
|
|
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.TrashItemDetailResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfTrashItemDetailResponse = instanceOfTrashItemDetailResponse;
|
|
18
|
+
exports.TrashItemDetailResponseFromJSON = TrashItemDetailResponseFromJSON;
|
|
19
|
+
exports.TrashItemDetailResponseFromJSONTyped = TrashItemDetailResponseFromJSONTyped;
|
|
20
|
+
exports.TrashItemDetailResponseToJSON = TrashItemDetailResponseToJSON;
|
|
21
|
+
exports.TrashItemDetailResponseToJSONTyped = TrashItemDetailResponseToJSONTyped;
|
|
22
|
+
const PartType_1 = require("./PartType");
|
|
23
|
+
const DocumentType_1 = require("./DocumentType");
|
|
24
|
+
const UserInfo_1 = require("./UserInfo");
|
|
25
|
+
exports.TrashItemDetailResponsePropertyValidationAttributesMap = {};
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the TrashItemDetailResponse interface.
|
|
28
|
+
*/
|
|
29
|
+
function instanceOfTrashItemDetailResponse(value) {
|
|
30
|
+
if (!('pathPartId' in value) || value['pathPartId'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('metadataObjId' in value) || value['metadataObjId'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('partType' in value) || value['partType'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('parentPathPartId' in value) || value['parentPathPartId'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('materializedPath' in value) || value['materializedPath'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('deletedAt' in value) || value['deletedAt'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('deletedBy' in value) || value['deletedBy'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
function TrashItemDetailResponseFromJSON(json) {
|
|
49
|
+
return TrashItemDetailResponseFromJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function TrashItemDetailResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
52
|
+
if (json == null) {
|
|
53
|
+
return json;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'pathPartId': json['path_part_id'],
|
|
57
|
+
'metadataObjId': json['metadata_obj_id'],
|
|
58
|
+
'partType': (0, PartType_1.PartTypeFromJSON)(json['part_type']),
|
|
59
|
+
'name': json['name'],
|
|
60
|
+
'parentPathPartId': json['parent_path_part_id'],
|
|
61
|
+
'materializedPath': json['materialized_path'],
|
|
62
|
+
'deletedAt': (new Date(json['deleted_at'])),
|
|
63
|
+
'deletedBy': json['deleted_by'],
|
|
64
|
+
'documentType': json['document_type'] == null ? undefined : (0, DocumentType_1.DocumentTypeFromJSON)(json['document_type']),
|
|
65
|
+
'owner': json['owner'] == null ? undefined : (0, UserInfo_1.UserInfoFromJSON)(json['owner']),
|
|
66
|
+
'assetS3Url': json['asset_s3_url'] == null ? undefined : json['asset_s3_url'],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function TrashItemDetailResponseToJSON(json) {
|
|
70
|
+
return TrashItemDetailResponseToJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
function TrashItemDetailResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
'path_part_id': value['pathPartId'],
|
|
78
|
+
'metadata_obj_id': value['metadataObjId'],
|
|
79
|
+
'part_type': (0, PartType_1.PartTypeToJSON)(value['partType']),
|
|
80
|
+
'name': value['name'],
|
|
81
|
+
'parent_path_part_id': value['parentPathPartId'],
|
|
82
|
+
'materialized_path': value['materializedPath'],
|
|
83
|
+
'deleted_at': value['deletedAt'].toISOString(),
|
|
84
|
+
'deleted_by': value['deletedBy'],
|
|
85
|
+
'document_type': (0, DocumentType_1.DocumentTypeToJSON)(value['documentType']),
|
|
86
|
+
'owner': (0, UserInfo_1.UserInfoToJSON)(value['owner']),
|
|
87
|
+
'asset_s3_url': value['assetS3Url'],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { PartType } from './PartType';
|
|
13
|
+
import type { DocumentType } from './DocumentType';
|
|
13
14
|
import type { UserInfo } from './UserInfo';
|
|
14
15
|
/**
|
|
15
16
|
* A top-level item currently in trash.
|
|
@@ -65,6 +66,12 @@ export interface TrashItemResponse {
|
|
|
65
66
|
* @memberof TrashItemResponse
|
|
66
67
|
*/
|
|
67
68
|
deletedBy: string | null;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* @type {DocumentType}
|
|
72
|
+
* @memberof TrashItemResponse
|
|
73
|
+
*/
|
|
74
|
+
documentType?: DocumentType;
|
|
68
75
|
/**
|
|
69
76
|
* Current owner (creator) of the item, or null if unowned.
|
|
70
77
|
* @type {UserInfo}
|
|
@@ -20,6 +20,7 @@ exports.TrashItemResponseFromJSONTyped = TrashItemResponseFromJSONTyped;
|
|
|
20
20
|
exports.TrashItemResponseToJSON = TrashItemResponseToJSON;
|
|
21
21
|
exports.TrashItemResponseToJSONTyped = TrashItemResponseToJSONTyped;
|
|
22
22
|
const PartType_1 = require("./PartType");
|
|
23
|
+
const DocumentType_1 = require("./DocumentType");
|
|
23
24
|
const UserInfo_1 = require("./UserInfo");
|
|
24
25
|
exports.TrashItemResponsePropertyValidationAttributesMap = {};
|
|
25
26
|
/**
|
|
@@ -60,6 +61,7 @@ function TrashItemResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
60
61
|
'materializedPath': json['materialized_path'],
|
|
61
62
|
'deletedAt': (new Date(json['deleted_at'])),
|
|
62
63
|
'deletedBy': json['deleted_by'],
|
|
64
|
+
'documentType': json['document_type'] == null ? undefined : (0, DocumentType_1.DocumentTypeFromJSON)(json['document_type']),
|
|
63
65
|
'owner': json['owner'] == null ? undefined : (0, UserInfo_1.UserInfoFromJSON)(json['owner']),
|
|
64
66
|
};
|
|
65
67
|
}
|
|
@@ -79,6 +81,7 @@ function TrashItemResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
79
81
|
'materialized_path': value['materializedPath'],
|
|
80
82
|
'deleted_at': value['deletedAt'].toISOString(),
|
|
81
83
|
'deleted_by': value['deletedBy'],
|
|
84
|
+
'document_type': (0, DocumentType_1.DocumentTypeToJSON)(value['documentType']),
|
|
82
85
|
'owner': (0, UserInfo_1.UserInfoToJSON)(value['owner']),
|
|
83
86
|
};
|
|
84
87
|
}
|
|
@@ -9,12 +9,31 @@
|
|
|
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
|
* Full replacement (PUT semantics).
|
|
14
15
|
* @export
|
|
15
16
|
* @interface UpdateWorkflowDefinitionRequest
|
|
16
17
|
*/
|
|
17
18
|
export interface UpdateWorkflowDefinitionRequest {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {ScheduleCadence}
|
|
22
|
+
* @memberof UpdateWorkflowDefinitionRequest
|
|
23
|
+
*/
|
|
24
|
+
scheduleCadence?: ScheduleCadence;
|
|
25
|
+
/**
|
|
26
|
+
* 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.
|
|
27
|
+
* @type {Date}
|
|
28
|
+
* @memberof UpdateWorkflowDefinitionRequest
|
|
29
|
+
*/
|
|
30
|
+
scheduleStartAt?: Date | null;
|
|
31
|
+
/**
|
|
32
|
+
* 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.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof UpdateWorkflowDefinitionRequest
|
|
35
|
+
*/
|
|
36
|
+
scheduleTimezone?: string | null;
|
|
18
37
|
/**
|
|
19
38
|
*
|
|
20
39
|
* @type {string}
|
|
@@ -19,7 +19,11 @@ exports.UpdateWorkflowDefinitionRequestFromJSON = UpdateWorkflowDefinitionReques
|
|
|
19
19
|
exports.UpdateWorkflowDefinitionRequestFromJSONTyped = UpdateWorkflowDefinitionRequestFromJSONTyped;
|
|
20
20
|
exports.UpdateWorkflowDefinitionRequestToJSON = UpdateWorkflowDefinitionRequestToJSON;
|
|
21
21
|
exports.UpdateWorkflowDefinitionRequestToJSONTyped = UpdateWorkflowDefinitionRequestToJSONTyped;
|
|
22
|
+
const ScheduleCadence_1 = require("./ScheduleCadence");
|
|
22
23
|
exports.UpdateWorkflowDefinitionRequestPropertyValidationAttributesMap = {
|
|
24
|
+
scheduleTimezone: {
|
|
25
|
+
maxLength: 64,
|
|
26
|
+
},
|
|
23
27
|
name: {
|
|
24
28
|
maxLength: 255,
|
|
25
29
|
},
|
|
@@ -58,6 +62,9 @@ function UpdateWorkflowDefinitionRequestFromJSONTyped(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 UpdateWorkflowDefinitionRequestToJSONTyped(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'],
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { ItemPermissions } from './ItemPermissions';
|
|
13
|
+
import type { ScheduleCadence } from './ScheduleCadence';
|
|
13
14
|
import type { LastRunSummary } from './LastRunSummary';
|
|
14
15
|
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
15
16
|
import type { UserInfo } from './UserInfo';
|
|
@@ -151,6 +152,24 @@ export interface WorkflowDefinitionResponse {
|
|
|
151
152
|
* @memberof WorkflowDefinitionResponse
|
|
152
153
|
*/
|
|
153
154
|
owner?: UserInfo | null;
|
|
155
|
+
/**
|
|
156
|
+
*
|
|
157
|
+
* @type {ScheduleCadence}
|
|
158
|
+
* @memberof WorkflowDefinitionResponse
|
|
159
|
+
*/
|
|
160
|
+
scheduleCadence?: ScheduleCadence;
|
|
161
|
+
/**
|
|
162
|
+
* First occurrence, read in ``schedule_timezone``.
|
|
163
|
+
* @type {Date}
|
|
164
|
+
* @memberof WorkflowDefinitionResponse
|
|
165
|
+
*/
|
|
166
|
+
scheduleStartAt?: Date | null;
|
|
167
|
+
/**
|
|
168
|
+
* IANA zone the schedule fires in, e.g. ``Asia/Shanghai``. Resolved at arm time: the tenant timezone unless the caller overrode it. Null only when unscheduled.
|
|
169
|
+
* @type {string}
|
|
170
|
+
* @memberof WorkflowDefinitionResponse
|
|
171
|
+
*/
|
|
172
|
+
scheduleTimezone?: string | null;
|
|
154
173
|
/**
|
|
155
174
|
*
|
|
156
175
|
* @type {Date}
|
|
@@ -20,6 +20,7 @@ exports.WorkflowDefinitionResponseFromJSONTyped = WorkflowDefinitionResponseFrom
|
|
|
20
20
|
exports.WorkflowDefinitionResponseToJSON = WorkflowDefinitionResponseToJSON;
|
|
21
21
|
exports.WorkflowDefinitionResponseToJSONTyped = WorkflowDefinitionResponseToJSONTyped;
|
|
22
22
|
const ItemPermissions_1 = require("./ItemPermissions");
|
|
23
|
+
const ScheduleCadence_1 = require("./ScheduleCadence");
|
|
23
24
|
const LastRunSummary_1 = require("./LastRunSummary");
|
|
24
25
|
const PathPartApprovalState_1 = require("./PathPartApprovalState");
|
|
25
26
|
const UserInfo_1 = require("./UserInfo");
|
|
@@ -97,6 +98,9 @@ function WorkflowDefinitionResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
97
98
|
'pendingApprovalCount': json['pending_approval_count'] == null ? undefined : json['pending_approval_count'],
|
|
98
99
|
'approvalState': (0, PathPartApprovalState_1.PathPartApprovalStateFromJSON)(json['approval_state']),
|
|
99
100
|
'owner': json['owner'] == null ? undefined : (0, UserInfo_1.UserInfoFromJSON)(json['owner']),
|
|
101
|
+
'scheduleCadence': json['schedule_cadence'] == null ? undefined : (0, ScheduleCadence_1.ScheduleCadenceFromJSON)(json['schedule_cadence']),
|
|
102
|
+
'scheduleStartAt': json['schedule_start_at'] == null ? undefined : (new Date(json['schedule_start_at'])),
|
|
103
|
+
'scheduleTimezone': json['schedule_timezone'] == null ? undefined : json['schedule_timezone'],
|
|
100
104
|
'createdAt': (new Date(json['created_at'])),
|
|
101
105
|
'updatedAt': (new Date(json['updated_at'])),
|
|
102
106
|
'permissions': json['permissions'] == null ? undefined : (0, ItemPermissions_1.ItemPermissionsFromJSON)(json['permissions']),
|
|
@@ -131,6 +135,9 @@ function WorkflowDefinitionResponseToJSONTyped(value, ignoreDiscriminator = fals
|
|
|
131
135
|
'pending_approval_count': value['pendingApprovalCount'],
|
|
132
136
|
'approval_state': (0, PathPartApprovalState_1.PathPartApprovalStateToJSON)(value['approvalState']),
|
|
133
137
|
'owner': (0, UserInfo_1.UserInfoToJSON)(value['owner']),
|
|
138
|
+
'schedule_cadence': (0, ScheduleCadence_1.ScheduleCadenceToJSON)(value['scheduleCadence']),
|
|
139
|
+
'schedule_start_at': value['scheduleStartAt'] == null ? value['scheduleStartAt'] : value['scheduleStartAt'].toISOString(),
|
|
140
|
+
'schedule_timezone': value['scheduleTimezone'],
|
|
134
141
|
'created_at': value['createdAt'].toISOString(),
|
|
135
142
|
'updated_at': value['updatedAt'].toISOString(),
|
|
136
143
|
'permissions': (0, ItemPermissions_1.ItemPermissionsToJSON)(value['permissions']),
|
package/dist/models/index.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ export * from './AppendMemoryChunkRequest';
|
|
|
14
14
|
export * from './Args';
|
|
15
15
|
export * from './AskRequest';
|
|
16
16
|
export * from './AskResponse';
|
|
17
|
+
export * from './BillingInterval';
|
|
18
|
+
export * from './BillingPaymentResponse';
|
|
19
|
+
export * from './BillingSystem';
|
|
17
20
|
export * from './BlockChangeType';
|
|
18
21
|
export * from './BlockKind';
|
|
19
22
|
export * from './BrandingLogoType';
|
|
@@ -41,6 +44,8 @@ export * from './CellDiff';
|
|
|
41
44
|
export * from './ChangeClass';
|
|
42
45
|
export * from './ChangePhoneNumberRequest';
|
|
43
46
|
export * from './ChangeSubscriptionRequest';
|
|
47
|
+
export * from './CheckoutAction';
|
|
48
|
+
export * from './CheckoutResponse';
|
|
44
49
|
export * from './CheckpointDetails';
|
|
45
50
|
export * from './ChunkBulkResponse';
|
|
46
51
|
export * from './ChunkContentItem';
|
|
@@ -194,6 +199,7 @@ export * from './OnboardingCompanyRequest';
|
|
|
194
199
|
export * from './OnboardingProfileRequest';
|
|
195
200
|
export * from './PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat';
|
|
196
201
|
export * from './PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator';
|
|
202
|
+
export * from './PaginatedResponseBillingPaymentResponse';
|
|
197
203
|
export * from './PaginatedResponseDocumentResponse';
|
|
198
204
|
export * from './PaginatedResponseDocumentVersionResponse';
|
|
199
205
|
export * from './PaginatedResponseEventResponse';
|
|
@@ -253,6 +259,7 @@ export * from './RunFolder';
|
|
|
253
259
|
export * from './RunFolderRef';
|
|
254
260
|
export * from './RunTimeseriesResponse';
|
|
255
261
|
export * from './SSOInitiateResponse';
|
|
262
|
+
export * from './ScheduleCadence';
|
|
256
263
|
export * from './ScoredChunkResponse';
|
|
257
264
|
export * from './SearchSkillsRequest';
|
|
258
265
|
export * from './SearchSkillsResponse';
|
|
@@ -285,7 +292,6 @@ export * from './StructuredChange';
|
|
|
285
292
|
export * from './StructuredChangeType';
|
|
286
293
|
export * from './StructuredDiff';
|
|
287
294
|
export * from './SubmitFeedbackRequest';
|
|
288
|
-
export * from './SubmitSubscriptionResponse';
|
|
289
295
|
export * from './SubscriptionPlanResponse';
|
|
290
296
|
export * from './SubtreeChunkGroup';
|
|
291
297
|
export * from './SubtreeChunksResponse';
|
|
@@ -302,6 +308,7 @@ export * from './TenantQuotaStateResponse';
|
|
|
302
308
|
export * from './TenantResponse';
|
|
303
309
|
export * from './TenantSettingsResponse';
|
|
304
310
|
export * from './TenantSettingsUpdate';
|
|
311
|
+
export * from './TenantSubscriptionResponse';
|
|
305
312
|
export * from './TenantUserEditRequest';
|
|
306
313
|
export * from './TenantUserOrder';
|
|
307
314
|
export * from './TenantUserResponse';
|
|
@@ -323,6 +330,7 @@ export * from './ToolPart';
|
|
|
323
330
|
export * from './ToolStatus';
|
|
324
331
|
export * from './TransferOwnerRequest';
|
|
325
332
|
export * from './TransferOwnerResponse';
|
|
333
|
+
export * from './TrashItemDetailResponse';
|
|
326
334
|
export * from './TrashItemResponse';
|
|
327
335
|
export * from './UpdateApiConnectionRequest';
|
|
328
336
|
export * from './UpdateChunkContentRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -32,6 +32,9 @@ __exportStar(require("./AppendMemoryChunkRequest"), exports);
|
|
|
32
32
|
__exportStar(require("./Args"), exports);
|
|
33
33
|
__exportStar(require("./AskRequest"), exports);
|
|
34
34
|
__exportStar(require("./AskResponse"), exports);
|
|
35
|
+
__exportStar(require("./BillingInterval"), exports);
|
|
36
|
+
__exportStar(require("./BillingPaymentResponse"), exports);
|
|
37
|
+
__exportStar(require("./BillingSystem"), exports);
|
|
35
38
|
__exportStar(require("./BlockChangeType"), exports);
|
|
36
39
|
__exportStar(require("./BlockKind"), exports);
|
|
37
40
|
__exportStar(require("./BrandingLogoType"), exports);
|
|
@@ -59,6 +62,8 @@ __exportStar(require("./CellDiff"), exports);
|
|
|
59
62
|
__exportStar(require("./ChangeClass"), exports);
|
|
60
63
|
__exportStar(require("./ChangePhoneNumberRequest"), exports);
|
|
61
64
|
__exportStar(require("./ChangeSubscriptionRequest"), exports);
|
|
65
|
+
__exportStar(require("./CheckoutAction"), exports);
|
|
66
|
+
__exportStar(require("./CheckoutResponse"), exports);
|
|
62
67
|
__exportStar(require("./CheckpointDetails"), exports);
|
|
63
68
|
__exportStar(require("./ChunkBulkResponse"), exports);
|
|
64
69
|
__exportStar(require("./ChunkContentItem"), exports);
|
|
@@ -212,6 +217,7 @@ __exportStar(require("./OnboardingCompanyRequest"), exports);
|
|
|
212
217
|
__exportStar(require("./OnboardingProfileRequest"), exports);
|
|
213
218
|
__exportStar(require("./PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat"), exports);
|
|
214
219
|
__exportStar(require("./PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator"), exports);
|
|
220
|
+
__exportStar(require("./PaginatedResponseBillingPaymentResponse"), exports);
|
|
215
221
|
__exportStar(require("./PaginatedResponseDocumentResponse"), exports);
|
|
216
222
|
__exportStar(require("./PaginatedResponseDocumentVersionResponse"), exports);
|
|
217
223
|
__exportStar(require("./PaginatedResponseEventResponse"), exports);
|
|
@@ -271,6 +277,7 @@ __exportStar(require("./RunFolder"), exports);
|
|
|
271
277
|
__exportStar(require("./RunFolderRef"), exports);
|
|
272
278
|
__exportStar(require("./RunTimeseriesResponse"), exports);
|
|
273
279
|
__exportStar(require("./SSOInitiateResponse"), exports);
|
|
280
|
+
__exportStar(require("./ScheduleCadence"), exports);
|
|
274
281
|
__exportStar(require("./ScoredChunkResponse"), exports);
|
|
275
282
|
__exportStar(require("./SearchSkillsRequest"), exports);
|
|
276
283
|
__exportStar(require("./SearchSkillsResponse"), exports);
|
|
@@ -303,7 +310,6 @@ __exportStar(require("./StructuredChange"), exports);
|
|
|
303
310
|
__exportStar(require("./StructuredChangeType"), exports);
|
|
304
311
|
__exportStar(require("./StructuredDiff"), exports);
|
|
305
312
|
__exportStar(require("./SubmitFeedbackRequest"), exports);
|
|
306
|
-
__exportStar(require("./SubmitSubscriptionResponse"), exports);
|
|
307
313
|
__exportStar(require("./SubscriptionPlanResponse"), exports);
|
|
308
314
|
__exportStar(require("./SubtreeChunkGroup"), exports);
|
|
309
315
|
__exportStar(require("./SubtreeChunksResponse"), exports);
|
|
@@ -320,6 +326,7 @@ __exportStar(require("./TenantQuotaStateResponse"), exports);
|
|
|
320
326
|
__exportStar(require("./TenantResponse"), exports);
|
|
321
327
|
__exportStar(require("./TenantSettingsResponse"), exports);
|
|
322
328
|
__exportStar(require("./TenantSettingsUpdate"), exports);
|
|
329
|
+
__exportStar(require("./TenantSubscriptionResponse"), exports);
|
|
323
330
|
__exportStar(require("./TenantUserEditRequest"), exports);
|
|
324
331
|
__exportStar(require("./TenantUserOrder"), exports);
|
|
325
332
|
__exportStar(require("./TenantUserResponse"), exports);
|
|
@@ -341,6 +348,7 @@ __exportStar(require("./ToolPart"), exports);
|
|
|
341
348
|
__exportStar(require("./ToolStatus"), exports);
|
|
342
349
|
__exportStar(require("./TransferOwnerRequest"), exports);
|
|
343
350
|
__exportStar(require("./TransferOwnerResponse"), exports);
|
|
351
|
+
__exportStar(require("./TrashItemDetailResponse"), exports);
|
|
344
352
|
__exportStar(require("./TrashItemResponse"), exports);
|
|
345
353
|
__exportStar(require("./UpdateApiConnectionRequest"), exports);
|
|
346
354
|
__exportStar(require("./UpdateChunkContentRequest"), exports);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# BillingApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:8000*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**listBillingPayments**](BillingApi.md#listbillingpayments) | **GET** /v1/tenants/{tenant_id}/billing/payments | List Billing Payments Handler |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## listBillingPayments
|
|
12
|
+
|
|
13
|
+
> PaginatedResponseBillingPaymentResponse listBillingPayments(tenantId, limit, offset)
|
|
14
|
+
|
|
15
|
+
List Billing Payments Handler
|
|
16
|
+
|
|
17
|
+
Newest-first payment history for the tenant (OWNER/ADMIN only). Backs the billing page\'s receipts list. ``invoice_url`` links the Stripe-hosted invoice when the payment ran through Stripe; CN (Ping++) payments render an in-app receipt from the row itself.
|
|
18
|
+
|
|
19
|
+
### Example
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import {
|
|
23
|
+
Configuration,
|
|
24
|
+
BillingApi,
|
|
25
|
+
} from '@knowledge-stack/ksapi';
|
|
26
|
+
import type { ListBillingPaymentsRequest } from '@knowledge-stack/ksapi';
|
|
27
|
+
|
|
28
|
+
async function example() {
|
|
29
|
+
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
30
|
+
const config = new Configuration({
|
|
31
|
+
// To configure API key authorization: cookieAuth
|
|
32
|
+
apiKey: "YOUR API KEY",
|
|
33
|
+
// Configure HTTP bearer authorization: bearerAuth
|
|
34
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
35
|
+
});
|
|
36
|
+
const api = new BillingApi(config);
|
|
37
|
+
|
|
38
|
+
const body = {
|
|
39
|
+
// string
|
|
40
|
+
tenantId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
41
|
+
// number | Number of items per page (optional)
|
|
42
|
+
limit: 56,
|
|
43
|
+
// number | Number of items to skip (optional)
|
|
44
|
+
offset: 56,
|
|
45
|
+
} satisfies ListBillingPaymentsRequest;
|
|
46
|
+
|
|
47
|
+
try {
|
|
48
|
+
const data = await api.listBillingPayments(body);
|
|
49
|
+
console.log(data);
|
|
50
|
+
} catch (error) {
|
|
51
|
+
console.error(error);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Run the test
|
|
56
|
+
example().catch(console.error);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Parameters
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
| Name | Type | Description | Notes |
|
|
63
|
+
|------------- | ------------- | ------------- | -------------|
|
|
64
|
+
| **tenantId** | `string` | | [Defaults to `undefined`] |
|
|
65
|
+
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
66
|
+
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
67
|
+
|
|
68
|
+
### Return type
|
|
69
|
+
|
|
70
|
+
[**PaginatedResponseBillingPaymentResponse**](PaginatedResponseBillingPaymentResponse.md)
|
|
71
|
+
|
|
72
|
+
### Authorization
|
|
73
|
+
|
|
74
|
+
[cookieAuth](../README.md#cookieAuth), [bearerAuth](../README.md#bearerAuth)
|
|
75
|
+
|
|
76
|
+
### HTTP request headers
|
|
77
|
+
|
|
78
|
+
- **Content-Type**: Not defined
|
|
79
|
+
- **Accept**: `application/json`
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
### HTTP response details
|
|
83
|
+
| Status code | Description | Response headers |
|
|
84
|
+
|-------------|-------------|------------------|
|
|
85
|
+
| **200** | Successful Response | - |
|
|
86
|
+
| **422** | Validation Error | - |
|
|
87
|
+
| **0** | Error response. | - |
|
|
88
|
+
|
|
89
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
90
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# BillingInterval
|
|
3
|
+
|
|
4
|
+
Self-serve billing period length.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { BillingInterval } from '@knowledge-stack/ksapi'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies BillingInterval
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as BillingInterval
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
# BillingPaymentResponse
|
|
3
|
+
|
|
4
|
+
One confirmed payment, as shown in the tenant\'s billing history. Backs in-app receipts: CN payments have no provider-hosted invoice (``invoice_url`` is NULL) — the frontend renders a receipt from these fields. Stripe payments link the hosted invoice.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`billingSystem` | [BillingSystem](BillingSystem.md)
|
|
12
|
+
`planId` | string
|
|
13
|
+
`interval` | string
|
|
14
|
+
`numSeats` | number
|
|
15
|
+
`amount` | number
|
|
16
|
+
`currency` | string
|
|
17
|
+
`invoiceUrl` | string
|
|
18
|
+
`createdAt` | Date
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import type { BillingPaymentResponse } from '@knowledge-stack/ksapi'
|
|
24
|
+
|
|
25
|
+
// TODO: Update the object below with actual values
|
|
26
|
+
const example = {
|
|
27
|
+
"id": null,
|
|
28
|
+
"billingSystem": null,
|
|
29
|
+
"planId": null,
|
|
30
|
+
"interval": null,
|
|
31
|
+
"numSeats": null,
|
|
32
|
+
"amount": null,
|
|
33
|
+
"currency": null,
|
|
34
|
+
"invoiceUrl": null,
|
|
35
|
+
"createdAt": null,
|
|
36
|
+
} satisfies BillingPaymentResponse
|
|
37
|
+
|
|
38
|
+
console.log(example)
|
|
39
|
+
|
|
40
|
+
// Convert the instance to a JSON string
|
|
41
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
42
|
+
console.log(exampleJSON)
|
|
43
|
+
|
|
44
|
+
// Parse the JSON string back to an object
|
|
45
|
+
const exampleParsed = JSON.parse(exampleJSON) as BillingPaymentResponse
|
|
46
|
+
console.log(exampleParsed)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
50
|
+
|
|
51
|
+
|