@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.
Files changed (153) hide show
  1. package/.openapi-generator/FILES +20 -2
  2. package/README.md +13 -3
  3. package/dist/apis/BillingApi.d.ts +70 -0
  4. package/dist/apis/BillingApi.js +120 -0
  5. package/dist/apis/DocumentVersionsApi.d.ts +8 -8
  6. package/dist/apis/DocumentVersionsApi.js +4 -4
  7. package/dist/apis/DocumentsApi.d.ts +4 -4
  8. package/dist/apis/DocumentsApi.js +2 -2
  9. package/dist/apis/SubscriptionsApi.d.ts +17 -20
  10. package/dist/apis/SubscriptionsApi.js +6 -9
  11. package/dist/apis/TenantsApi.d.ts +4 -4
  12. package/dist/apis/TenantsApi.js +2 -2
  13. package/dist/apis/TrashApi.d.ts +39 -1
  14. package/dist/apis/TrashApi.js +48 -0
  15. package/dist/apis/WorkflowRunsApi.d.ts +4 -4
  16. package/dist/apis/WorkflowRunsApi.js +2 -2
  17. package/dist/apis/index.d.ts +1 -0
  18. package/dist/apis/index.js +1 -0
  19. package/dist/esm/apis/BillingApi.d.ts +70 -0
  20. package/dist/esm/apis/BillingApi.js +83 -0
  21. package/dist/esm/apis/DocumentVersionsApi.d.ts +8 -8
  22. package/dist/esm/apis/DocumentVersionsApi.js +4 -4
  23. package/dist/esm/apis/DocumentsApi.d.ts +4 -4
  24. package/dist/esm/apis/DocumentsApi.js +2 -2
  25. package/dist/esm/apis/SubscriptionsApi.d.ts +17 -20
  26. package/dist/esm/apis/SubscriptionsApi.js +7 -10
  27. package/dist/esm/apis/TenantsApi.d.ts +4 -4
  28. package/dist/esm/apis/TenantsApi.js +2 -2
  29. package/dist/esm/apis/TrashApi.d.ts +39 -1
  30. package/dist/esm/apis/TrashApi.js +49 -1
  31. package/dist/esm/apis/WorkflowRunsApi.d.ts +4 -4
  32. package/dist/esm/apis/WorkflowRunsApi.js +2 -2
  33. package/dist/esm/apis/index.d.ts +1 -0
  34. package/dist/esm/apis/index.js +1 -0
  35. package/dist/esm/models/BillingInterval.d.ts +25 -0
  36. package/dist/esm/models/BillingInterval.js +43 -0
  37. package/dist/esm/models/BillingPaymentResponse.d.ts +100 -0
  38. package/dist/esm/models/BillingPaymentResponse.js +75 -0
  39. package/dist/esm/models/BillingSystem.d.ts +30 -0
  40. package/dist/esm/models/BillingSystem.js +48 -0
  41. package/dist/esm/models/ChangeSubscriptionRequest.d.ts +34 -0
  42. package/dist/esm/models/ChangeSubscriptionRequest.js +10 -0
  43. package/dist/esm/models/CheckoutAction.d.ts +27 -0
  44. package/dist/esm/models/CheckoutAction.js +45 -0
  45. package/dist/esm/models/CheckoutResponse.d.ts +76 -0
  46. package/dist/esm/models/{SubmitSubscriptionResponse.js → CheckoutResponse.js} +20 -20
  47. package/dist/esm/models/CreateWorkflowDefinitionRequest.d.ts +19 -0
  48. package/dist/esm/models/CreateWorkflowDefinitionRequest.js +10 -0
  49. package/dist/esm/models/IdpConfig.d.ts +6 -0
  50. package/dist/esm/models/IdpConfig.js +10 -1
  51. package/dist/esm/models/PaginatedResponseBillingPaymentResponse.d.ts +66 -0
  52. package/dist/esm/models/PaginatedResponseBillingPaymentResponse.js +70 -0
  53. package/dist/esm/models/ScheduleCadence.d.ts +32 -0
  54. package/dist/esm/models/ScheduleCadence.js +50 -0
  55. package/dist/esm/models/SubscriptionPlanResponse.d.ts +24 -0
  56. package/dist/esm/models/SubscriptionPlanResponse.js +8 -0
  57. package/dist/esm/models/{SubmitSubscriptionResponse.d.ts → TenantSubscriptionResponse.d.ts} +49 -38
  58. package/dist/esm/models/TenantSubscriptionResponse.js +67 -0
  59. package/dist/esm/models/TrashItemDetailResponse.d.ts +110 -0
  60. package/dist/esm/models/TrashItemDetailResponse.js +81 -0
  61. package/dist/esm/models/TrashItemResponse.d.ts +7 -0
  62. package/dist/esm/models/TrashItemResponse.js +3 -0
  63. package/dist/esm/models/UpdateWorkflowDefinitionRequest.d.ts +19 -0
  64. package/dist/esm/models/UpdateWorkflowDefinitionRequest.js +10 -0
  65. package/dist/esm/models/WorkflowDefinitionResponse.d.ts +19 -0
  66. package/dist/esm/models/WorkflowDefinitionResponse.js +7 -0
  67. package/dist/esm/models/index.d.ts +9 -1
  68. package/dist/esm/models/index.js +9 -1
  69. package/dist/models/BillingInterval.d.ts +25 -0
  70. package/dist/models/BillingInterval.js +51 -0
  71. package/dist/models/BillingPaymentResponse.d.ts +100 -0
  72. package/dist/models/BillingPaymentResponse.js +83 -0
  73. package/dist/models/BillingSystem.d.ts +30 -0
  74. package/dist/models/BillingSystem.js +56 -0
  75. package/dist/models/ChangeSubscriptionRequest.d.ts +34 -0
  76. package/dist/models/ChangeSubscriptionRequest.js +10 -0
  77. package/dist/models/CheckoutAction.d.ts +27 -0
  78. package/dist/models/CheckoutAction.js +53 -0
  79. package/dist/models/CheckoutResponse.d.ts +76 -0
  80. package/dist/models/{SubmitSubscriptionResponse.js → CheckoutResponse.js} +26 -26
  81. package/dist/models/CreateWorkflowDefinitionRequest.d.ts +19 -0
  82. package/dist/models/CreateWorkflowDefinitionRequest.js +10 -0
  83. package/dist/models/IdpConfig.d.ts +6 -0
  84. package/dist/models/IdpConfig.js +10 -1
  85. package/dist/models/PaginatedResponseBillingPaymentResponse.d.ts +66 -0
  86. package/dist/models/PaginatedResponseBillingPaymentResponse.js +78 -0
  87. package/dist/models/ScheduleCadence.d.ts +32 -0
  88. package/dist/models/ScheduleCadence.js +58 -0
  89. package/dist/models/SubscriptionPlanResponse.d.ts +24 -0
  90. package/dist/models/SubscriptionPlanResponse.js +8 -0
  91. package/dist/models/{SubmitSubscriptionResponse.d.ts → TenantSubscriptionResponse.d.ts} +49 -38
  92. package/dist/models/TenantSubscriptionResponse.js +75 -0
  93. package/dist/models/TrashItemDetailResponse.d.ts +110 -0
  94. package/dist/models/TrashItemDetailResponse.js +89 -0
  95. package/dist/models/TrashItemResponse.d.ts +7 -0
  96. package/dist/models/TrashItemResponse.js +3 -0
  97. package/dist/models/UpdateWorkflowDefinitionRequest.d.ts +19 -0
  98. package/dist/models/UpdateWorkflowDefinitionRequest.js +10 -0
  99. package/dist/models/WorkflowDefinitionResponse.d.ts +19 -0
  100. package/dist/models/WorkflowDefinitionResponse.js +7 -0
  101. package/dist/models/index.d.ts +9 -1
  102. package/dist/models/index.js +9 -1
  103. package/docs/BillingApi.md +90 -0
  104. package/docs/BillingInterval.md +33 -0
  105. package/docs/BillingPaymentResponse.md +51 -0
  106. package/docs/BillingSystem.md +33 -0
  107. package/docs/ChangeSubscriptionRequest.md +9 -1
  108. package/docs/CheckoutAction.md +33 -0
  109. package/docs/CheckoutResponse.md +41 -0
  110. package/docs/CreateWorkflowDefinitionRequest.md +6 -0
  111. package/docs/DocumentVersionsApi.md +2 -2
  112. package/docs/DocumentsApi.md +1 -1
  113. package/docs/FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.md +6 -0
  114. package/docs/IdpConfig.md +2 -0
  115. package/docs/PaginatedResponseBillingPaymentResponse.md +40 -0
  116. package/docs/ScheduleCadence.md +33 -0
  117. package/docs/SubscriptionPlanResponse.md +8 -0
  118. package/docs/SubscriptionsApi.md +7 -10
  119. package/docs/TenantSubscriptionResponse.md +47 -0
  120. package/docs/TenantsApi.md +1 -1
  121. package/docs/TrashApi.md +76 -0
  122. package/docs/TrashItemDetailResponse.md +55 -0
  123. package/docs/TrashItemResponse.md +2 -0
  124. package/docs/UpdateWorkflowDefinitionRequest.md +6 -0
  125. package/docs/WorkflowDefinitionResponse.md +6 -0
  126. package/docs/WorkflowRunsApi.md +1 -1
  127. package/package.json +1 -1
  128. package/src/apis/BillingApi.ts +142 -0
  129. package/src/apis/DocumentVersionsApi.ts +8 -8
  130. package/src/apis/DocumentsApi.ts +4 -4
  131. package/src/apis/SubscriptionsApi.ts +24 -31
  132. package/src/apis/TenantsApi.ts +4 -4
  133. package/src/apis/TrashApi.ts +86 -0
  134. package/src/apis/WorkflowRunsApi.ts +4 -4
  135. package/src/apis/index.ts +1 -0
  136. package/src/models/BillingInterval.ts +53 -0
  137. package/src/models/BillingPaymentResponse.ts +168 -0
  138. package/src/models/BillingSystem.ts +58 -0
  139. package/src/models/ChangeSubscriptionRequest.ts +55 -0
  140. package/src/models/CheckoutAction.ts +55 -0
  141. package/src/models/{SubmitSubscriptionResponse.ts → CheckoutResponse.ts} +61 -47
  142. package/src/models/CreateWorkflowDefinitionRequest.ts +37 -0
  143. package/src/models/IdpConfig.ts +14 -0
  144. package/src/models/PaginatedResponseBillingPaymentResponse.ts +130 -0
  145. package/src/models/ScheduleCadence.ts +60 -0
  146. package/src/models/SubscriptionPlanResponse.ts +32 -0
  147. package/src/models/TenantSubscriptionResponse.ts +159 -0
  148. package/src/models/TrashItemDetailResponse.ts +194 -0
  149. package/src/models/TrashItemResponse.ts +15 -0
  150. package/src/models/UpdateWorkflowDefinitionRequest.ts +37 -0
  151. package/src/models/WorkflowDefinitionResponse.ts +31 -0
  152. package/src/models/index.ts +9 -1
  153. package/docs/SubmitSubscriptionResponse.md +0 -39
@@ -0,0 +1,159 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * 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.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { BillingInterval } from './BillingInterval';
17
+ import {
18
+ BillingIntervalFromJSON,
19
+ BillingIntervalFromJSONTyped,
20
+ BillingIntervalToJSON,
21
+ BillingIntervalToJSONTyped,
22
+ } from './BillingInterval';
23
+ import type { BillingSystem } from './BillingSystem';
24
+ import {
25
+ BillingSystemFromJSON,
26
+ BillingSystemFromJSONTyped,
27
+ BillingSystemToJSON,
28
+ BillingSystemToJSONTyped,
29
+ } from './BillingSystem';
30
+ import type { SubscriptionPlanResponse } from './SubscriptionPlanResponse';
31
+ import {
32
+ SubscriptionPlanResponseFromJSON,
33
+ SubscriptionPlanResponseFromJSONTyped,
34
+ SubscriptionPlanResponseToJSON,
35
+ SubscriptionPlanResponseToJSONTyped,
36
+ } from './SubscriptionPlanResponse';
37
+
38
+ /**
39
+ * The tenant's current subscription: plan body + period state.
40
+ * @export
41
+ * @interface TenantSubscriptionResponse
42
+ */
43
+ export interface TenantSubscriptionResponse {
44
+ /**
45
+ *
46
+ * @type {SubscriptionPlanResponse}
47
+ * @memberof TenantSubscriptionResponse
48
+ */
49
+ plan: SubscriptionPlanResponse;
50
+ /**
51
+ * Seats in force for this period.
52
+ * @type {number}
53
+ * @memberof TenantSubscriptionResponse
54
+ */
55
+ numSeats: number;
56
+ /**
57
+ * Inclusive period start.
58
+ * @type {Date}
59
+ * @memberof TenantSubscriptionResponse
60
+ */
61
+ startDate: Date;
62
+ /**
63
+ * Exclusive period end. Unbilled subscriptions carry a 100-year horizon; billed ones the paid-through date.
64
+ * @type {Date}
65
+ * @memberof TenantSubscriptionResponse
66
+ */
67
+ endDate: Date;
68
+ /**
69
+ *
70
+ * @type {BillingSystem}
71
+ * @memberof TenantSubscriptionResponse
72
+ */
73
+ billingSystem?: BillingSystem;
74
+ /**
75
+ *
76
+ * @type {BillingInterval}
77
+ * @memberof TenantSubscriptionResponse
78
+ */
79
+ interval?: BillingInterval;
80
+ /**
81
+ * 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.
82
+ * @type {boolean}
83
+ * @memberof TenantSubscriptionResponse
84
+ */
85
+ willRenew: boolean;
86
+ }
87
+
88
+
89
+ export const TenantSubscriptionResponsePropertyValidationAttributesMap: {
90
+ [property: string]: {
91
+ maxLength?: number,
92
+ minLength?: number,
93
+ pattern?: string,
94
+ maximum?: number,
95
+ exclusiveMaximum?: boolean,
96
+ minimum?: number,
97
+ exclusiveMinimum?: boolean,
98
+ multipleOf?: number,
99
+ maxItems?: number,
100
+ minItems?: number,
101
+ uniqueItems?: boolean
102
+ }
103
+ } = {
104
+ }
105
+
106
+
107
+ /**
108
+ * Check if a given object implements the TenantSubscriptionResponse interface.
109
+ */
110
+ export function instanceOfTenantSubscriptionResponse(value: object): value is TenantSubscriptionResponse {
111
+ if (!('plan' in value) || value['plan'] === undefined) return false;
112
+ if (!('numSeats' in value) || value['numSeats'] === undefined) return false;
113
+ if (!('startDate' in value) || value['startDate'] === undefined) return false;
114
+ if (!('endDate' in value) || value['endDate'] === undefined) return false;
115
+ if (!('willRenew' in value) || value['willRenew'] === undefined) return false;
116
+ return true;
117
+ }
118
+
119
+ export function TenantSubscriptionResponseFromJSON(json: any): TenantSubscriptionResponse {
120
+ return TenantSubscriptionResponseFromJSONTyped(json, false);
121
+ }
122
+
123
+ export function TenantSubscriptionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TenantSubscriptionResponse {
124
+ if (json == null) {
125
+ return json;
126
+ }
127
+ return {
128
+
129
+ 'plan': SubscriptionPlanResponseFromJSON(json['plan']),
130
+ 'numSeats': json['num_seats'],
131
+ 'startDate': (new Date(json['start_date'])),
132
+ 'endDate': (new Date(json['end_date'])),
133
+ 'billingSystem': json['billing_system'] == null ? undefined : BillingSystemFromJSON(json['billing_system']),
134
+ 'interval': json['interval'] == null ? undefined : BillingIntervalFromJSON(json['interval']),
135
+ 'willRenew': json['will_renew'],
136
+ };
137
+ }
138
+
139
+ export function TenantSubscriptionResponseToJSON(json: any): TenantSubscriptionResponse {
140
+ return TenantSubscriptionResponseToJSONTyped(json, false);
141
+ }
142
+
143
+ export function TenantSubscriptionResponseToJSONTyped(value?: TenantSubscriptionResponse | null, ignoreDiscriminator: boolean = false): any {
144
+ if (value == null) {
145
+ return value;
146
+ }
147
+
148
+ return {
149
+
150
+ 'plan': SubscriptionPlanResponseToJSON(value['plan']),
151
+ 'num_seats': value['numSeats'],
152
+ 'start_date': value['startDate'].toISOString(),
153
+ 'end_date': value['endDate'].toISOString(),
154
+ 'billing_system': BillingSystemToJSON(value['billingSystem']),
155
+ 'interval': BillingIntervalToJSON(value['interval']),
156
+ 'will_renew': value['willRenew'],
157
+ };
158
+ }
159
+
@@ -0,0 +1,194 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * 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.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { PartType } from './PartType';
17
+ import {
18
+ PartTypeFromJSON,
19
+ PartTypeFromJSONTyped,
20
+ PartTypeToJSON,
21
+ PartTypeToJSONTyped,
22
+ } from './PartType';
23
+ import type { DocumentType } from './DocumentType';
24
+ import {
25
+ DocumentTypeFromJSON,
26
+ DocumentTypeFromJSONTyped,
27
+ DocumentTypeToJSON,
28
+ DocumentTypeToJSONTyped,
29
+ } from './DocumentType';
30
+ import type { UserInfo } from './UserInfo';
31
+ import {
32
+ UserInfoFromJSON,
33
+ UserInfoFromJSONTyped,
34
+ UserInfoToJSON,
35
+ UserInfoToJSONTyped,
36
+ } from './UserInfo';
37
+
38
+ /**
39
+ * A single trash item plus a preview link for DOCUMENT items.
40
+ * @export
41
+ * @interface TrashItemDetailResponse
42
+ */
43
+ export interface TrashItemDetailResponse {
44
+ /**
45
+ * PathPart ID
46
+ * @type {string}
47
+ * @memberof TrashItemDetailResponse
48
+ */
49
+ pathPartId: string;
50
+ /**
51
+ * Underlying PDO ID
52
+ * @type {string}
53
+ * @memberof TrashItemDetailResponse
54
+ */
55
+ metadataObjId: string;
56
+ /**
57
+ *
58
+ * @type {PartType}
59
+ * @memberof TrashItemDetailResponse
60
+ */
61
+ partType: PartType;
62
+ /**
63
+ * Display name
64
+ * @type {string}
65
+ * @memberof TrashItemDetailResponse
66
+ */
67
+ name: string;
68
+ /**
69
+ * Parent PathPart ID
70
+ * @type {string}
71
+ * @memberof TrashItemDetailResponse
72
+ */
73
+ parentPathPartId: string | null;
74
+ /**
75
+ * Original materialized path
76
+ * @type {string}
77
+ * @memberof TrashItemDetailResponse
78
+ */
79
+ materializedPath: string;
80
+ /**
81
+ * When the item was moved to trash
82
+ * @type {Date}
83
+ * @memberof TrashItemDetailResponse
84
+ */
85
+ deletedAt: Date;
86
+ /**
87
+ * User that moved it to trash
88
+ * @type {string}
89
+ * @memberof TrashItemDetailResponse
90
+ */
91
+ deletedBy: string | null;
92
+ /**
93
+ *
94
+ * @type {DocumentType}
95
+ * @memberof TrashItemDetailResponse
96
+ */
97
+ documentType?: DocumentType;
98
+ /**
99
+ * Current owner (creator) of the item, or null if unowned.
100
+ * @type {UserInfo}
101
+ * @memberof TrashItemDetailResponse
102
+ */
103
+ owner?: UserInfo | null;
104
+ /**
105
+ * Presigned URL (6-hour validity) to the document's source blob for preview; null for folders and other non-document items.
106
+ * @type {string}
107
+ * @memberof TrashItemDetailResponse
108
+ */
109
+ assetS3Url?: string | null;
110
+ }
111
+
112
+
113
+ export const TrashItemDetailResponsePropertyValidationAttributesMap: {
114
+ [property: string]: {
115
+ maxLength?: number,
116
+ minLength?: number,
117
+ pattern?: string,
118
+ maximum?: number,
119
+ exclusiveMaximum?: boolean,
120
+ minimum?: number,
121
+ exclusiveMinimum?: boolean,
122
+ multipleOf?: number,
123
+ maxItems?: number,
124
+ minItems?: number,
125
+ uniqueItems?: boolean
126
+ }
127
+ } = {
128
+ }
129
+
130
+
131
+ /**
132
+ * Check if a given object implements the TrashItemDetailResponse interface.
133
+ */
134
+ export function instanceOfTrashItemDetailResponse(value: object): value is TrashItemDetailResponse {
135
+ if (!('pathPartId' in value) || value['pathPartId'] === undefined) return false;
136
+ if (!('metadataObjId' in value) || value['metadataObjId'] === undefined) return false;
137
+ if (!('partType' in value) || value['partType'] === undefined) return false;
138
+ if (!('name' in value) || value['name'] === undefined) return false;
139
+ if (!('parentPathPartId' in value) || value['parentPathPartId'] === undefined) return false;
140
+ if (!('materializedPath' in value) || value['materializedPath'] === undefined) return false;
141
+ if (!('deletedAt' in value) || value['deletedAt'] === undefined) return false;
142
+ if (!('deletedBy' in value) || value['deletedBy'] === undefined) return false;
143
+ return true;
144
+ }
145
+
146
+ export function TrashItemDetailResponseFromJSON(json: any): TrashItemDetailResponse {
147
+ return TrashItemDetailResponseFromJSONTyped(json, false);
148
+ }
149
+
150
+ export function TrashItemDetailResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrashItemDetailResponse {
151
+ if (json == null) {
152
+ return json;
153
+ }
154
+ return {
155
+
156
+ 'pathPartId': json['path_part_id'],
157
+ 'metadataObjId': json['metadata_obj_id'],
158
+ 'partType': PartTypeFromJSON(json['part_type']),
159
+ 'name': json['name'],
160
+ 'parentPathPartId': json['parent_path_part_id'],
161
+ 'materializedPath': json['materialized_path'],
162
+ 'deletedAt': (new Date(json['deleted_at'])),
163
+ 'deletedBy': json['deleted_by'],
164
+ 'documentType': json['document_type'] == null ? undefined : DocumentTypeFromJSON(json['document_type']),
165
+ 'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
166
+ 'assetS3Url': json['asset_s3_url'] == null ? undefined : json['asset_s3_url'],
167
+ };
168
+ }
169
+
170
+ export function TrashItemDetailResponseToJSON(json: any): TrashItemDetailResponse {
171
+ return TrashItemDetailResponseToJSONTyped(json, false);
172
+ }
173
+
174
+ export function TrashItemDetailResponseToJSONTyped(value?: TrashItemDetailResponse | null, ignoreDiscriminator: boolean = false): any {
175
+ if (value == null) {
176
+ return value;
177
+ }
178
+
179
+ return {
180
+
181
+ 'path_part_id': value['pathPartId'],
182
+ 'metadata_obj_id': value['metadataObjId'],
183
+ 'part_type': PartTypeToJSON(value['partType']),
184
+ 'name': value['name'],
185
+ 'parent_path_part_id': value['parentPathPartId'],
186
+ 'materialized_path': value['materializedPath'],
187
+ 'deleted_at': value['deletedAt'].toISOString(),
188
+ 'deleted_by': value['deletedBy'],
189
+ 'document_type': DocumentTypeToJSON(value['documentType']),
190
+ 'owner': UserInfoToJSON(value['owner']),
191
+ 'asset_s3_url': value['assetS3Url'],
192
+ };
193
+ }
194
+
@@ -20,6 +20,13 @@ import {
20
20
  PartTypeToJSON,
21
21
  PartTypeToJSONTyped,
22
22
  } from './PartType';
23
+ import type { DocumentType } from './DocumentType';
24
+ import {
25
+ DocumentTypeFromJSON,
26
+ DocumentTypeFromJSONTyped,
27
+ DocumentTypeToJSON,
28
+ DocumentTypeToJSONTyped,
29
+ } from './DocumentType';
23
30
  import type { UserInfo } from './UserInfo';
24
31
  import {
25
32
  UserInfoFromJSON,
@@ -82,6 +89,12 @@ export interface TrashItemResponse {
82
89
  * @memberof TrashItemResponse
83
90
  */
84
91
  deletedBy: string | null;
92
+ /**
93
+ *
94
+ * @type {DocumentType}
95
+ * @memberof TrashItemResponse
96
+ */
97
+ documentType?: DocumentType;
85
98
  /**
86
99
  * Current owner (creator) of the item, or null if unowned.
87
100
  * @type {UserInfo}
@@ -142,6 +155,7 @@ export function TrashItemResponseFromJSONTyped(json: any, ignoreDiscriminator: b
142
155
  'materializedPath': json['materialized_path'],
143
156
  'deletedAt': (new Date(json['deleted_at'])),
144
157
  'deletedBy': json['deleted_by'],
158
+ 'documentType': json['document_type'] == null ? undefined : DocumentTypeFromJSON(json['document_type']),
145
159
  'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
146
160
  };
147
161
  }
@@ -165,6 +179,7 @@ export function TrashItemResponseToJSONTyped(value?: TrashItemResponse | null, i
165
179
  'materialized_path': value['materializedPath'],
166
180
  'deleted_at': value['deletedAt'].toISOString(),
167
181
  'deleted_by': value['deletedBy'],
182
+ 'document_type': DocumentTypeToJSON(value['documentType']),
168
183
  'owner': UserInfoToJSON(value['owner']),
169
184
  };
170
185
  }
@@ -13,12 +13,38 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
+ import type { ScheduleCadence } from './ScheduleCadence';
17
+ import {
18
+ ScheduleCadenceFromJSON,
19
+ ScheduleCadenceFromJSONTyped,
20
+ ScheduleCadenceToJSON,
21
+ ScheduleCadenceToJSONTyped,
22
+ } from './ScheduleCadence';
23
+
16
24
  /**
17
25
  * Full replacement (PUT semantics).
18
26
  * @export
19
27
  * @interface UpdateWorkflowDefinitionRequest
20
28
  */
21
29
  export interface UpdateWorkflowDefinitionRequest {
30
+ /**
31
+ *
32
+ * @type {ScheduleCadence}
33
+ * @memberof UpdateWorkflowDefinitionRequest
34
+ */
35
+ scheduleCadence?: ScheduleCadence;
36
+ /**
37
+ * 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.
38
+ * @type {Date}
39
+ * @memberof UpdateWorkflowDefinitionRequest
40
+ */
41
+ scheduleStartAt?: Date | null;
42
+ /**
43
+ * 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.
44
+ * @type {string}
45
+ * @memberof UpdateWorkflowDefinitionRequest
46
+ */
47
+ scheduleTimezone?: string | null;
22
48
  /**
23
49
  *
24
50
  * @type {string}
@@ -74,6 +100,8 @@ export interface UpdateWorkflowDefinitionRequest {
74
100
  */
75
101
  commonFilePathPartIds?: Array<string> | null;
76
102
  }
103
+
104
+
77
105
  export const UpdateWorkflowDefinitionRequestPropertyValidationAttributesMap: {
78
106
  [property: string]: {
79
107
  maxLength?: number,
@@ -89,6 +117,9 @@ export const UpdateWorkflowDefinitionRequestPropertyValidationAttributesMap: {
89
117
  uniqueItems?: boolean
90
118
  }
91
119
  } = {
120
+ scheduleTimezone: {
121
+ maxLength: 64,
122
+ },
92
123
  name: {
93
124
  maxLength: 255,
94
125
  },
@@ -129,6 +160,9 @@ export function UpdateWorkflowDefinitionRequestFromJSONTyped(json: any, ignoreDi
129
160
  }
130
161
  return {
131
162
 
163
+ 'scheduleCadence': json['schedule_cadence'] == null ? undefined : ScheduleCadenceFromJSON(json['schedule_cadence']),
164
+ 'scheduleStartAt': json['schedule_start_at'] == null ? undefined : (new Date(json['schedule_start_at'])),
165
+ 'scheduleTimezone': json['schedule_timezone'] == null ? undefined : json['schedule_timezone'],
132
166
  'name': json['name'],
133
167
  'description': json['description'] == null ? undefined : json['description'],
134
168
  'maxRunDurationSeconds': json['max_run_duration_seconds'] == null ? undefined : json['max_run_duration_seconds'],
@@ -152,6 +186,9 @@ export function UpdateWorkflowDefinitionRequestToJSONTyped(value?: UpdateWorkflo
152
186
 
153
187
  return {
154
188
 
189
+ 'schedule_cadence': ScheduleCadenceToJSON(value['scheduleCadence']),
190
+ 'schedule_start_at': value['scheduleStartAt'] == null ? value['scheduleStartAt'] : value['scheduleStartAt'].toISOString(),
191
+ 'schedule_timezone': value['scheduleTimezone'],
155
192
  'name': value['name'],
156
193
  'description': value['description'],
157
194
  'max_run_duration_seconds': value['maxRunDurationSeconds'],
@@ -20,6 +20,13 @@ import {
20
20
  ItemPermissionsToJSON,
21
21
  ItemPermissionsToJSONTyped,
22
22
  } from './ItemPermissions';
23
+ import type { ScheduleCadence } from './ScheduleCadence';
24
+ import {
25
+ ScheduleCadenceFromJSON,
26
+ ScheduleCadenceFromJSONTyped,
27
+ ScheduleCadenceToJSON,
28
+ ScheduleCadenceToJSONTyped,
29
+ } from './ScheduleCadence';
23
30
  import type { LastRunSummary } from './LastRunSummary';
24
31
  import {
25
32
  LastRunSummaryFromJSON,
@@ -180,6 +187,24 @@ export interface WorkflowDefinitionResponse {
180
187
  * @memberof WorkflowDefinitionResponse
181
188
  */
182
189
  owner?: UserInfo | null;
190
+ /**
191
+ *
192
+ * @type {ScheduleCadence}
193
+ * @memberof WorkflowDefinitionResponse
194
+ */
195
+ scheduleCadence?: ScheduleCadence;
196
+ /**
197
+ * First occurrence, read in ``schedule_timezone``.
198
+ * @type {Date}
199
+ * @memberof WorkflowDefinitionResponse
200
+ */
201
+ scheduleStartAt?: Date | null;
202
+ /**
203
+ * 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.
204
+ * @type {string}
205
+ * @memberof WorkflowDefinitionResponse
206
+ */
207
+ scheduleTimezone?: string | null;
183
208
  /**
184
209
  *
185
210
  * @type {Date}
@@ -281,6 +306,9 @@ export function WorkflowDefinitionResponseFromJSONTyped(json: any, ignoreDiscrim
281
306
  'pendingApprovalCount': json['pending_approval_count'] == null ? undefined : json['pending_approval_count'],
282
307
  'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
283
308
  'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
309
+ 'scheduleCadence': json['schedule_cadence'] == null ? undefined : ScheduleCadenceFromJSON(json['schedule_cadence']),
310
+ 'scheduleStartAt': json['schedule_start_at'] == null ? undefined : (new Date(json['schedule_start_at'])),
311
+ 'scheduleTimezone': json['schedule_timezone'] == null ? undefined : json['schedule_timezone'],
284
312
  'createdAt': (new Date(json['created_at'])),
285
313
  'updatedAt': (new Date(json['updated_at'])),
286
314
  'permissions': json['permissions'] == null ? undefined : ItemPermissionsFromJSON(json['permissions']),
@@ -319,6 +347,9 @@ export function WorkflowDefinitionResponseToJSONTyped(value?: WorkflowDefinition
319
347
  'pending_approval_count': value['pendingApprovalCount'],
320
348
  'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
321
349
  'owner': UserInfoToJSON(value['owner']),
350
+ 'schedule_cadence': ScheduleCadenceToJSON(value['scheduleCadence']),
351
+ 'schedule_start_at': value['scheduleStartAt'] == null ? value['scheduleStartAt'] : value['scheduleStartAt'].toISOString(),
352
+ 'schedule_timezone': value['scheduleTimezone'],
322
353
  'created_at': value['createdAt'].toISOString(),
323
354
  'updated_at': value['updatedAt'].toISOString(),
324
355
  'permissions': ItemPermissionsToJSON(value['permissions']),
@@ -16,6 +16,9 @@ export * from './AppendMemoryChunkRequest';
16
16
  export * from './Args';
17
17
  export * from './AskRequest';
18
18
  export * from './AskResponse';
19
+ export * from './BillingInterval';
20
+ export * from './BillingPaymentResponse';
21
+ export * from './BillingSystem';
19
22
  export * from './BlockChangeType';
20
23
  export * from './BlockKind';
21
24
  export * from './BrandingLogoType';
@@ -43,6 +46,8 @@ export * from './CellDiff';
43
46
  export * from './ChangeClass';
44
47
  export * from './ChangePhoneNumberRequest';
45
48
  export * from './ChangeSubscriptionRequest';
49
+ export * from './CheckoutAction';
50
+ export * from './CheckoutResponse';
46
51
  export * from './CheckpointDetails';
47
52
  export * from './ChunkBulkResponse';
48
53
  export * from './ChunkContentItem';
@@ -196,6 +201,7 @@ export * from './OnboardingCompanyRequest';
196
201
  export * from './OnboardingProfileRequest';
197
202
  export * from './PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat';
198
203
  export * from './PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator';
204
+ export * from './PaginatedResponseBillingPaymentResponse';
199
205
  export * from './PaginatedResponseDocumentResponse';
200
206
  export * from './PaginatedResponseDocumentVersionResponse';
201
207
  export * from './PaginatedResponseEventResponse';
@@ -255,6 +261,7 @@ export * from './RunFolder';
255
261
  export * from './RunFolderRef';
256
262
  export * from './RunTimeseriesResponse';
257
263
  export * from './SSOInitiateResponse';
264
+ export * from './ScheduleCadence';
258
265
  export * from './ScoredChunkResponse';
259
266
  export * from './SearchSkillsRequest';
260
267
  export * from './SearchSkillsResponse';
@@ -287,7 +294,6 @@ export * from './StructuredChange';
287
294
  export * from './StructuredChangeType';
288
295
  export * from './StructuredDiff';
289
296
  export * from './SubmitFeedbackRequest';
290
- export * from './SubmitSubscriptionResponse';
291
297
  export * from './SubscriptionPlanResponse';
292
298
  export * from './SubtreeChunkGroup';
293
299
  export * from './SubtreeChunksResponse';
@@ -304,6 +310,7 @@ export * from './TenantQuotaStateResponse';
304
310
  export * from './TenantResponse';
305
311
  export * from './TenantSettingsResponse';
306
312
  export * from './TenantSettingsUpdate';
313
+ export * from './TenantSubscriptionResponse';
307
314
  export * from './TenantUserEditRequest';
308
315
  export * from './TenantUserOrder';
309
316
  export * from './TenantUserResponse';
@@ -325,6 +332,7 @@ export * from './ToolPart';
325
332
  export * from './ToolStatus';
326
333
  export * from './TransferOwnerRequest';
327
334
  export * from './TransferOwnerResponse';
335
+ export * from './TrashItemDetailResponse';
328
336
  export * from './TrashItemResponse';
329
337
  export * from './UpdateApiConnectionRequest';
330
338
  export * from './UpdateChunkContentRequest';
@@ -1,39 +0,0 @@
1
-
2
- # SubmitSubscriptionResponse
3
-
4
- Result envelope for the subscription-change submit endpoint. The endpoint returns immediately after the (mock-)Stripe charge is submitted; the actual plan/seat write happens later in the Stripe subscription webhook. ``submitted=True`` always when the route succeeds (errors raise via the global handler). ``noop=True`` indicates the tenant is already at the requested ``(plan, num_seats)`` — no Stripe call was issued, no webhook will arrive, and the user\'s account is unchanged. Symmetric with ``StripeWebhookAck.replayed`` so client UIs can render \"already on this plan\" rather than spinning a \"waiting for webhook\" indicator forever. ``idempotency_key`` echoes the value forwarded to Stripe — clients can store it to correlate the eventual webhook receipt with the original request, and re-send it verbatim on retries.
5
-
6
- ## Properties
7
-
8
- Name | Type
9
- ------------ | -------------
10
- `submitted` | boolean
11
- `noop` | boolean
12
- `idempotencyKey` | string
13
-
14
- ## Example
15
-
16
- ```typescript
17
- import type { SubmitSubscriptionResponse } from '@knowledge-stack/ksapi'
18
-
19
- // TODO: Update the object below with actual values
20
- const example = {
21
- "submitted": null,
22
- "noop": null,
23
- "idempotencyKey": null,
24
- } satisfies SubmitSubscriptionResponse
25
-
26
- console.log(example)
27
-
28
- // Convert the instance to a JSON string
29
- const exampleJSON: string = JSON.stringify(example)
30
- console.log(exampleJSON)
31
-
32
- // Parse the JSON string back to an object
33
- const exampleParsed = JSON.parse(exampleJSON) as SubmitSubscriptionResponse
34
- console.log(exampleParsed)
35
- ```
36
-
37
- [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
38
-
39
-