@knowledge-stack/ksapi 1.80.0 → 1.80.1
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 +2 -0
- package/README.md +3 -2
- package/dist/apis/AgentApi.d.ts +4 -4
- package/dist/apis/AgentApi.js +2 -2
- package/dist/apis/SubscriptionsApi.d.ts +9 -9
- package/dist/apis/SubscriptionsApi.js +3 -3
- package/dist/esm/apis/AgentApi.d.ts +4 -4
- package/dist/esm/apis/AgentApi.js +2 -2
- package/dist/esm/apis/SubscriptionsApi.d.ts +9 -9
- package/dist/esm/apis/SubscriptionsApi.js +4 -4
- package/dist/esm/models/DocumentResponse.d.ts +6 -0
- package/dist/esm/models/DocumentResponse.js +2 -0
- package/dist/esm/models/FolderResponse.d.ts +6 -0
- package/dist/esm/models/FolderResponse.js +2 -0
- package/dist/esm/models/MeteredQuotaStatus.d.ts +6 -0
- package/dist/esm/models/MeteredQuotaStatus.js +2 -0
- package/dist/esm/models/SubmitSubscriptionResponse.d.ts +75 -0
- package/dist/esm/models/SubmitSubscriptionResponse.js +52 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/DocumentResponse.d.ts +6 -0
- package/dist/models/DocumentResponse.js +2 -0
- package/dist/models/FolderResponse.d.ts +6 -0
- package/dist/models/FolderResponse.js +2 -0
- package/dist/models/MeteredQuotaStatus.d.ts +6 -0
- package/dist/models/MeteredQuotaStatus.js +2 -0
- package/dist/models/SubmitSubscriptionResponse.d.ts +75 -0
- package/dist/models/SubmitSubscriptionResponse.js +60 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/AgentApi.md +1 -1
- package/docs/DocumentResponse.md +2 -0
- package/docs/FolderResponse.md +2 -0
- package/docs/FolderResponseOrDocumentResponse.md +2 -0
- package/docs/MeteredQuotaStatus.md +2 -0
- package/docs/SubmitSubscriptionResponse.md +39 -0
- package/docs/SubscriptionsApi.md +4 -4
- package/package.json +1 -1
- package/src/apis/AgentApi.ts +4 -4
- package/src/apis/SubscriptionsApi.ts +12 -12
- package/src/models/DocumentResponse.ts +8 -0
- package/src/models/FolderResponse.ts +8 -0
- package/src/models/MeteredQuotaStatus.ts +8 -0
- package/src/models/SubmitSubscriptionResponse.ts +117 -0
- package/src/models/index.ts +1 -0
|
@@ -150,6 +150,12 @@ export interface DocumentResponse {
|
|
|
150
150
|
* @memberof DocumentResponse
|
|
151
151
|
*/
|
|
152
152
|
tags?: Array<TagResponse> | null;
|
|
153
|
+
/**
|
|
154
|
+
* Whether the current caller has write access to this document. Only populated by endpoints that compute it (e.g. folder contents).
|
|
155
|
+
* @type {boolean}
|
|
156
|
+
* @memberof DocumentResponse
|
|
157
|
+
*/
|
|
158
|
+
canWrite?: boolean | null;
|
|
153
159
|
}
|
|
154
160
|
|
|
155
161
|
|
|
@@ -229,6 +235,7 @@ export function DocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
229
235
|
'createdAt': (new Date(json['created_at'])),
|
|
230
236
|
'updatedAt': (new Date(json['updated_at'])),
|
|
231
237
|
'tags': json['tags'] == null ? undefined : ((json['tags'] as Array<any>).map(TagResponseFromJSON)),
|
|
238
|
+
'canWrite': json['can_write'] == null ? undefined : json['can_write'],
|
|
232
239
|
};
|
|
233
240
|
}
|
|
234
241
|
|
|
@@ -260,6 +267,7 @@ export function DocumentResponseToJSONTyped(value?: DocumentResponse | null, ign
|
|
|
260
267
|
'created_at': value['createdAt'].toISOString(),
|
|
261
268
|
'updated_at': value['updatedAt'].toISOString(),
|
|
262
269
|
'tags': value['tags'] == null ? undefined : ((value['tags'] as Array<any>).map(TagResponseToJSON)),
|
|
270
|
+
'can_write': value['canWrite'],
|
|
263
271
|
};
|
|
264
272
|
}
|
|
265
273
|
|
|
@@ -99,6 +99,12 @@ export interface FolderResponse {
|
|
|
99
99
|
* @memberof FolderResponse
|
|
100
100
|
*/
|
|
101
101
|
tags?: Array<TagResponse> | null;
|
|
102
|
+
/**
|
|
103
|
+
* Whether the current caller has write access to this folder. Only populated by endpoints that compute it (e.g. folder contents).
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof FolderResponse
|
|
106
|
+
*/
|
|
107
|
+
canWrite?: boolean | null;
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
|
|
@@ -168,6 +174,7 @@ export function FolderResponseFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
168
174
|
'createdAt': (new Date(json['created_at'])),
|
|
169
175
|
'updatedAt': (new Date(json['updated_at'])),
|
|
170
176
|
'tags': json['tags'] == null ? undefined : ((json['tags'] as Array<any>).map(TagResponseFromJSON)),
|
|
177
|
+
'canWrite': json['can_write'] == null ? undefined : json['can_write'],
|
|
171
178
|
};
|
|
172
179
|
}
|
|
173
180
|
|
|
@@ -194,6 +201,7 @@ export function FolderResponseToJSONTyped(value?: FolderResponse | null, ignoreD
|
|
|
194
201
|
'created_at': value['createdAt'].toISOString(),
|
|
195
202
|
'updated_at': value['updatedAt'].toISOString(),
|
|
196
203
|
'tags': value['tags'] == null ? undefined : ((value['tags'] as Array<any>).map(TagResponseToJSON)),
|
|
204
|
+
'can_write': value['canWrite'],
|
|
197
205
|
};
|
|
198
206
|
}
|
|
199
207
|
|
|
@@ -57,6 +57,12 @@ export interface MeteredQuotaStatus {
|
|
|
57
57
|
* @memberof MeteredQuotaStatus
|
|
58
58
|
*/
|
|
59
59
|
periodEnd: Date;
|
|
60
|
+
/**
|
|
61
|
+
* Persistent additional-quota balance for this metric. Unchanged by period rollover; decremented when included is exhausted, incremented on refund or top-up.
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof MeteredQuotaStatus
|
|
64
|
+
*/
|
|
65
|
+
additionalBalance?: number;
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
|
|
@@ -105,6 +111,7 @@ export function MeteredQuotaStatusFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
105
111
|
'limit': json['limit'],
|
|
106
112
|
'periodStart': (new Date(json['period_start'])),
|
|
107
113
|
'periodEnd': (new Date(json['period_end'])),
|
|
114
|
+
'additionalBalance': json['additional_balance'] == null ? undefined : json['additional_balance'],
|
|
108
115
|
};
|
|
109
116
|
}
|
|
110
117
|
|
|
@@ -124,6 +131,7 @@ export function MeteredQuotaStatusToJSONTyped(value?: MeteredQuotaStatus | null,
|
|
|
124
131
|
'limit': value['limit'],
|
|
125
132
|
'period_start': value['periodStart'].toISOString(),
|
|
126
133
|
'period_end': value['periodEnd'].toISOString(),
|
|
134
|
+
'additional_balance': value['additionalBalance'],
|
|
127
135
|
};
|
|
128
136
|
}
|
|
129
137
|
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
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
|
+
/**
|
|
17
|
+
* Result envelope for the subscription-change submit endpoint.
|
|
18
|
+
*
|
|
19
|
+
* The endpoint returns immediately after the (mock-)Stripe charge is
|
|
20
|
+
* submitted; the actual plan/seat write happens later in the Stripe
|
|
21
|
+
* subscription webhook. ``submitted=True`` always when the route
|
|
22
|
+
* succeeds (errors raise via the global handler).
|
|
23
|
+
*
|
|
24
|
+
* ``noop=True`` indicates the tenant is already at the requested
|
|
25
|
+
* ``(plan, num_seats)`` — no Stripe call was issued, no webhook will
|
|
26
|
+
* arrive, and the user's account is unchanged. Symmetric with
|
|
27
|
+
* ``StripeWebhookAck.replayed`` so client UIs can render "already
|
|
28
|
+
* on this plan" rather than spinning a "waiting for webhook"
|
|
29
|
+
* indicator forever.
|
|
30
|
+
*
|
|
31
|
+
* ``idempotency_key`` echoes the value forwarded to Stripe — clients
|
|
32
|
+
* can store it to correlate the eventual webhook receipt with the
|
|
33
|
+
* original request, and re-send it verbatim on retries.
|
|
34
|
+
* @export
|
|
35
|
+
* @interface SubmitSubscriptionResponse
|
|
36
|
+
*/
|
|
37
|
+
export interface SubmitSubscriptionResponse {
|
|
38
|
+
/**
|
|
39
|
+
* Always True when the submit returns 202.
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
* @memberof SubmitSubscriptionResponse
|
|
42
|
+
*/
|
|
43
|
+
submitted: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* True when the tenant was already at the target ``(plan, num_seats)`` — no Stripe call was made and no webhook will arrive.
|
|
46
|
+
* @type {boolean}
|
|
47
|
+
* @memberof SubmitSubscriptionResponse
|
|
48
|
+
*/
|
|
49
|
+
noop: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Idempotency key forwarded to Stripe — sourced from the ``Idempotency-Key`` request header or a server-generated uuid4 when absent.
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof SubmitSubscriptionResponse
|
|
54
|
+
*/
|
|
55
|
+
idempotencyKey: string;
|
|
56
|
+
}
|
|
57
|
+
export const SubmitSubscriptionResponsePropertyValidationAttributesMap: {
|
|
58
|
+
[property: string]: {
|
|
59
|
+
maxLength?: number,
|
|
60
|
+
minLength?: number,
|
|
61
|
+
pattern?: string,
|
|
62
|
+
maximum?: number,
|
|
63
|
+
exclusiveMaximum?: boolean,
|
|
64
|
+
minimum?: number,
|
|
65
|
+
exclusiveMinimum?: boolean,
|
|
66
|
+
multipleOf?: number,
|
|
67
|
+
maxItems?: number,
|
|
68
|
+
minItems?: number,
|
|
69
|
+
uniqueItems?: boolean
|
|
70
|
+
}
|
|
71
|
+
} = {
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Check if a given object implements the SubmitSubscriptionResponse interface.
|
|
77
|
+
*/
|
|
78
|
+
export function instanceOfSubmitSubscriptionResponse(value: object): value is SubmitSubscriptionResponse {
|
|
79
|
+
if (!('submitted' in value) || value['submitted'] === undefined) return false;
|
|
80
|
+
if (!('noop' in value) || value['noop'] === undefined) return false;
|
|
81
|
+
if (!('idempotencyKey' in value) || value['idempotencyKey'] === undefined) return false;
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function SubmitSubscriptionResponseFromJSON(json: any): SubmitSubscriptionResponse {
|
|
86
|
+
return SubmitSubscriptionResponseFromJSONTyped(json, false);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function SubmitSubscriptionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubmitSubscriptionResponse {
|
|
90
|
+
if (json == null) {
|
|
91
|
+
return json;
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'submitted': json['submitted'],
|
|
96
|
+
'noop': json['noop'],
|
|
97
|
+
'idempotencyKey': json['idempotency_key'],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function SubmitSubscriptionResponseToJSON(json: any): SubmitSubscriptionResponse {
|
|
102
|
+
return SubmitSubscriptionResponseToJSONTyped(json, false);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function SubmitSubscriptionResponseToJSONTyped(value?: SubmitSubscriptionResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
106
|
+
if (value == null) {
|
|
107
|
+
return value;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
|
|
112
|
+
'submitted': value['submitted'],
|
|
113
|
+
'noop': value['noop'],
|
|
114
|
+
'idempotency_key': value['idempotencyKey'],
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -144,6 +144,7 @@ export * from './StepInput';
|
|
|
144
144
|
export * from './StepKind';
|
|
145
145
|
export * from './StepOutput';
|
|
146
146
|
export * from './SubmitFeedbackRequest';
|
|
147
|
+
export * from './SubmitSubscriptionResponse';
|
|
147
148
|
export * from './SubscriptionPlanResponse';
|
|
148
149
|
export * from './SubtreeChunkGroup';
|
|
149
150
|
export * from './SubtreeChunksResponse';
|