@knowledge-stack/ksapi 1.80.0 → 1.81.0

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 (81) hide show
  1. package/.openapi-generator/FILES +6 -0
  2. package/README.md +8 -2
  3. package/dist/apis/AgentApi.d.ts +4 -4
  4. package/dist/apis/AgentApi.js +2 -2
  5. package/dist/apis/SubscriptionsApi.d.ts +9 -9
  6. package/dist/apis/SubscriptionsApi.js +3 -3
  7. package/dist/apis/UsersApi.d.ts +130 -1
  8. package/dist/apis/UsersApi.js +130 -0
  9. package/dist/esm/apis/AgentApi.d.ts +4 -4
  10. package/dist/esm/apis/AgentApi.js +2 -2
  11. package/dist/esm/apis/SubscriptionsApi.d.ts +9 -9
  12. package/dist/esm/apis/SubscriptionsApi.js +4 -4
  13. package/dist/esm/apis/UsersApi.d.ts +130 -1
  14. package/dist/esm/apis/UsersApi.js +131 -1
  15. package/dist/esm/models/DocumentResponse.d.ts +6 -0
  16. package/dist/esm/models/DocumentResponse.js +2 -0
  17. package/dist/esm/models/FolderResponse.d.ts +6 -0
  18. package/dist/esm/models/FolderResponse.js +2 -0
  19. package/dist/esm/models/MeteredQuotaStatus.d.ts +6 -0
  20. package/dist/esm/models/MeteredQuotaStatus.js +2 -0
  21. package/dist/esm/models/OnboardingCompanyRequest.d.ts +53 -0
  22. package/dist/esm/models/OnboardingCompanyRequest.js +51 -0
  23. package/dist/esm/models/OnboardingProfileRequest.d.ts +59 -0
  24. package/dist/esm/models/OnboardingProfileRequest.js +50 -0
  25. package/dist/esm/models/SubmitSubscriptionResponse.d.ts +75 -0
  26. package/dist/esm/models/SubmitSubscriptionResponse.js +52 -0
  27. package/dist/esm/models/TenantSettingsResponse.d.ts +6 -0
  28. package/dist/esm/models/TenantSettingsResponse.js +2 -0
  29. package/dist/esm/models/TenantSettingsUpdate.d.ts +6 -0
  30. package/dist/esm/models/TenantSettingsUpdate.js +10 -1
  31. package/dist/esm/models/UserResponse.d.ts +12 -0
  32. package/dist/esm/models/UserResponse.js +4 -0
  33. package/dist/esm/models/index.d.ts +3 -0
  34. package/dist/esm/models/index.js +3 -0
  35. package/dist/models/DocumentResponse.d.ts +6 -0
  36. package/dist/models/DocumentResponse.js +2 -0
  37. package/dist/models/FolderResponse.d.ts +6 -0
  38. package/dist/models/FolderResponse.js +2 -0
  39. package/dist/models/MeteredQuotaStatus.d.ts +6 -0
  40. package/dist/models/MeteredQuotaStatus.js +2 -0
  41. package/dist/models/OnboardingCompanyRequest.d.ts +53 -0
  42. package/dist/models/OnboardingCompanyRequest.js +59 -0
  43. package/dist/models/OnboardingProfileRequest.d.ts +59 -0
  44. package/dist/models/OnboardingProfileRequest.js +58 -0
  45. package/dist/models/SubmitSubscriptionResponse.d.ts +75 -0
  46. package/dist/models/SubmitSubscriptionResponse.js +60 -0
  47. package/dist/models/TenantSettingsResponse.d.ts +6 -0
  48. package/dist/models/TenantSettingsResponse.js +2 -0
  49. package/dist/models/TenantSettingsUpdate.d.ts +6 -0
  50. package/dist/models/TenantSettingsUpdate.js +10 -1
  51. package/dist/models/UserResponse.d.ts +12 -0
  52. package/dist/models/UserResponse.js +4 -0
  53. package/dist/models/index.d.ts +3 -0
  54. package/dist/models/index.js +3 -0
  55. package/docs/AgentApi.md +1 -1
  56. package/docs/DocumentResponse.md +2 -0
  57. package/docs/FolderResponse.md +2 -0
  58. package/docs/FolderResponseOrDocumentResponse.md +2 -0
  59. package/docs/MeteredQuotaStatus.md +2 -0
  60. package/docs/OnboardingCompanyRequest.md +37 -0
  61. package/docs/OnboardingProfileRequest.md +39 -0
  62. package/docs/SubmitSubscriptionResponse.md +39 -0
  63. package/docs/SubscriptionsApi.md +4 -4
  64. package/docs/TenantSettingsResponse.md +2 -0
  65. package/docs/TenantSettingsUpdate.md +2 -0
  66. package/docs/UserResponse.md +4 -0
  67. package/docs/UsersApi.md +222 -0
  68. package/package.json +1 -1
  69. package/src/apis/AgentApi.ts +4 -4
  70. package/src/apis/SubscriptionsApi.ts +12 -12
  71. package/src/apis/UsersApi.ts +254 -0
  72. package/src/models/DocumentResponse.ts +8 -0
  73. package/src/models/FolderResponse.ts +8 -0
  74. package/src/models/MeteredQuotaStatus.ts +8 -0
  75. package/src/models/OnboardingCompanyRequest.ts +96 -0
  76. package/src/models/OnboardingProfileRequest.ts +101 -0
  77. package/src/models/SubmitSubscriptionResponse.ts +117 -0
  78. package/src/models/TenantSettingsResponse.ts +8 -0
  79. package/src/models/TenantSettingsUpdate.ts +14 -0
  80. package/src/models/UserResponse.ts +16 -0
  81. package/src/models/index.ts +3 -0
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Step 2 of onboarding — per-user info for the current tenant.
14
+ * @export
15
+ * @interface OnboardingProfileRequest
16
+ */
17
+ export interface OnboardingProfileRequest {
18
+ /**
19
+ * User's first name
20
+ * @type {string}
21
+ * @memberof OnboardingProfileRequest
22
+ */
23
+ firstName?: string | null;
24
+ /**
25
+ * User's last name
26
+ * @type {string}
27
+ * @memberof OnboardingProfileRequest
28
+ */
29
+ lastName?: string | null;
30
+ /**
31
+ * What the user does at this tenant
32
+ * @type {string}
33
+ * @memberof OnboardingProfileRequest
34
+ */
35
+ jobTitle?: string | null;
36
+ }
37
+ export declare const OnboardingProfileRequestPropertyValidationAttributesMap: {
38
+ [property: string]: {
39
+ maxLength?: number;
40
+ minLength?: number;
41
+ pattern?: string;
42
+ maximum?: number;
43
+ exclusiveMaximum?: boolean;
44
+ minimum?: number;
45
+ exclusiveMinimum?: boolean;
46
+ multipleOf?: number;
47
+ maxItems?: number;
48
+ minItems?: number;
49
+ uniqueItems?: boolean;
50
+ };
51
+ };
52
+ /**
53
+ * Check if a given object implements the OnboardingProfileRequest interface.
54
+ */
55
+ export declare function instanceOfOnboardingProfileRequest(value: object): value is OnboardingProfileRequest;
56
+ export declare function OnboardingProfileRequestFromJSON(json: any): OnboardingProfileRequest;
57
+ export declare function OnboardingProfileRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OnboardingProfileRequest;
58
+ export declare function OnboardingProfileRequestToJSON(json: any): OnboardingProfileRequest;
59
+ export declare function OnboardingProfileRequestToJSONTyped(value?: OnboardingProfileRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management
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.OnboardingProfileRequestPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfOnboardingProfileRequest = instanceOfOnboardingProfileRequest;
18
+ exports.OnboardingProfileRequestFromJSON = OnboardingProfileRequestFromJSON;
19
+ exports.OnboardingProfileRequestFromJSONTyped = OnboardingProfileRequestFromJSONTyped;
20
+ exports.OnboardingProfileRequestToJSON = OnboardingProfileRequestToJSON;
21
+ exports.OnboardingProfileRequestToJSONTyped = OnboardingProfileRequestToJSONTyped;
22
+ exports.OnboardingProfileRequestPropertyValidationAttributesMap = {
23
+ jobTitle: {
24
+ maxLength: 120,
25
+ },
26
+ };
27
+ /**
28
+ * Check if a given object implements the OnboardingProfileRequest interface.
29
+ */
30
+ function instanceOfOnboardingProfileRequest(value) {
31
+ return true;
32
+ }
33
+ function OnboardingProfileRequestFromJSON(json) {
34
+ return OnboardingProfileRequestFromJSONTyped(json, false);
35
+ }
36
+ function OnboardingProfileRequestFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'firstName': json['first_name'] == null ? undefined : json['first_name'],
42
+ 'lastName': json['last_name'] == null ? undefined : json['last_name'],
43
+ 'jobTitle': json['job_title'] == null ? undefined : json['job_title'],
44
+ };
45
+ }
46
+ function OnboardingProfileRequestToJSON(json) {
47
+ return OnboardingProfileRequestToJSONTyped(json, false);
48
+ }
49
+ function OnboardingProfileRequestToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'first_name': value['firstName'],
55
+ 'last_name': value['lastName'],
56
+ 'job_title': value['jobTitle'],
57
+ };
58
+ }
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Knowledge Stack API
3
+ * Knowledge Stack backend API for authentication and knowledge management
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ * Result envelope for the subscription-change submit endpoint.
14
+ *
15
+ * The endpoint returns immediately after the (mock-)Stripe charge is
16
+ * submitted; the actual plan/seat write happens later in the Stripe
17
+ * subscription webhook. ``submitted=True`` always when the route
18
+ * succeeds (errors raise via the global handler).
19
+ *
20
+ * ``noop=True`` indicates the tenant is already at the requested
21
+ * ``(plan, num_seats)`` — no Stripe call was issued, no webhook will
22
+ * arrive, and the user's account is unchanged. Symmetric with
23
+ * ``StripeWebhookAck.replayed`` so client UIs can render "already
24
+ * on this plan" rather than spinning a "waiting for webhook"
25
+ * indicator forever.
26
+ *
27
+ * ``idempotency_key`` echoes the value forwarded to Stripe — clients
28
+ * can store it to correlate the eventual webhook receipt with the
29
+ * original request, and re-send it verbatim on retries.
30
+ * @export
31
+ * @interface SubmitSubscriptionResponse
32
+ */
33
+ export interface SubmitSubscriptionResponse {
34
+ /**
35
+ * Always True when the submit returns 202.
36
+ * @type {boolean}
37
+ * @memberof SubmitSubscriptionResponse
38
+ */
39
+ submitted: boolean;
40
+ /**
41
+ * True when the tenant was already at the target ``(plan, num_seats)`` — no Stripe call was made and no webhook will arrive.
42
+ * @type {boolean}
43
+ * @memberof SubmitSubscriptionResponse
44
+ */
45
+ noop: boolean;
46
+ /**
47
+ * Idempotency key forwarded to Stripe — sourced from the ``Idempotency-Key`` request header or a server-generated uuid4 when absent.
48
+ * @type {string}
49
+ * @memberof SubmitSubscriptionResponse
50
+ */
51
+ idempotencyKey: string;
52
+ }
53
+ export declare const SubmitSubscriptionResponsePropertyValidationAttributesMap: {
54
+ [property: string]: {
55
+ maxLength?: number;
56
+ minLength?: number;
57
+ pattern?: string;
58
+ maximum?: number;
59
+ exclusiveMaximum?: boolean;
60
+ minimum?: number;
61
+ exclusiveMinimum?: boolean;
62
+ multipleOf?: number;
63
+ maxItems?: number;
64
+ minItems?: number;
65
+ uniqueItems?: boolean;
66
+ };
67
+ };
68
+ /**
69
+ * Check if a given object implements the SubmitSubscriptionResponse interface.
70
+ */
71
+ export declare function instanceOfSubmitSubscriptionResponse(value: object): value is SubmitSubscriptionResponse;
72
+ export declare function SubmitSubscriptionResponseFromJSON(json: any): SubmitSubscriptionResponse;
73
+ export declare function SubmitSubscriptionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubmitSubscriptionResponse;
74
+ export declare function SubmitSubscriptionResponseToJSON(json: any): SubmitSubscriptionResponse;
75
+ export declare function SubmitSubscriptionResponseToJSONTyped(value?: SubmitSubscriptionResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management
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.SubmitSubscriptionResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfSubmitSubscriptionResponse = instanceOfSubmitSubscriptionResponse;
18
+ exports.SubmitSubscriptionResponseFromJSON = SubmitSubscriptionResponseFromJSON;
19
+ exports.SubmitSubscriptionResponseFromJSONTyped = SubmitSubscriptionResponseFromJSONTyped;
20
+ exports.SubmitSubscriptionResponseToJSON = SubmitSubscriptionResponseToJSON;
21
+ exports.SubmitSubscriptionResponseToJSONTyped = SubmitSubscriptionResponseToJSONTyped;
22
+ exports.SubmitSubscriptionResponsePropertyValidationAttributesMap = {};
23
+ /**
24
+ * Check if a given object implements the SubmitSubscriptionResponse interface.
25
+ */
26
+ function instanceOfSubmitSubscriptionResponse(value) {
27
+ if (!('submitted' in value) || value['submitted'] === undefined)
28
+ return false;
29
+ if (!('noop' in value) || value['noop'] === undefined)
30
+ return false;
31
+ if (!('idempotencyKey' in value) || value['idempotencyKey'] === undefined)
32
+ return false;
33
+ return true;
34
+ }
35
+ function SubmitSubscriptionResponseFromJSON(json) {
36
+ return SubmitSubscriptionResponseFromJSONTyped(json, false);
37
+ }
38
+ function SubmitSubscriptionResponseFromJSONTyped(json, ignoreDiscriminator) {
39
+ if (json == null) {
40
+ return json;
41
+ }
42
+ return {
43
+ 'submitted': json['submitted'],
44
+ 'noop': json['noop'],
45
+ 'idempotencyKey': json['idempotency_key'],
46
+ };
47
+ }
48
+ function SubmitSubscriptionResponseToJSON(json) {
49
+ return SubmitSubscriptionResponseToJSONTyped(json, false);
50
+ }
51
+ function SubmitSubscriptionResponseToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'submitted': value['submitted'],
57
+ 'noop': value['noop'],
58
+ 'idempotency_key': value['idempotencyKey'],
59
+ };
60
+ }
@@ -29,6 +29,12 @@ export interface TenantSettingsResponse {
29
29
  * @memberof TenantSettingsResponse
30
30
  */
31
31
  description: string;
32
+ /**
33
+ * Industry / company type captured during onboarding
34
+ * @type {string}
35
+ * @memberof TenantSettingsResponse
36
+ */
37
+ industry?: string | null;
32
38
  /**
33
39
  * IANA timezone (e.g. 'America/New_York')
34
40
  * @type {string}
@@ -46,6 +46,7 @@ function TenantSettingsResponseFromJSONTyped(json, ignoreDiscriminator) {
46
46
  return {
47
47
  'language': (0, SupportedLanguage_1.SupportedLanguageFromJSON)(json['language']),
48
48
  'description': json['description'],
49
+ 'industry': json['industry'] == null ? undefined : json['industry'],
49
50
  'timezone': json['timezone'],
50
51
  'inviteLink': (0, InviteLinkSettingsResponse_1.InviteLinkSettingsResponseFromJSON)(json['invite_link']),
51
52
  };
@@ -60,6 +61,7 @@ function TenantSettingsResponseToJSONTyped(value, ignoreDiscriminator = false) {
60
61
  return {
61
62
  'language': (0, SupportedLanguage_1.SupportedLanguageToJSON)(value['language']),
62
63
  'description': value['description'],
64
+ 'industry': value['industry'],
63
65
  'timezone': value['timezone'],
64
66
  'invite_link': (0, InviteLinkSettingsResponse_1.InviteLinkSettingsResponseToJSON)(value['inviteLink']),
65
67
  };
@@ -29,6 +29,12 @@ export interface TenantSettingsUpdate {
29
29
  * @memberof TenantSettingsUpdate
30
30
  */
31
31
  description?: string | null;
32
+ /**
33
+ * Industry / company type captured during onboarding
34
+ * @type {string}
35
+ * @memberof TenantSettingsUpdate
36
+ */
37
+ industry?: string | null;
32
38
  /**
33
39
  * IANA timezone (e.g. 'America/New_York')
34
40
  * @type {string}
@@ -21,7 +21,14 @@ exports.TenantSettingsUpdateToJSON = TenantSettingsUpdateToJSON;
21
21
  exports.TenantSettingsUpdateToJSONTyped = TenantSettingsUpdateToJSONTyped;
22
22
  const SupportedLanguage_1 = require("./SupportedLanguage");
23
23
  const InviteLinkSettingsRequest_1 = require("./InviteLinkSettingsRequest");
24
- exports.TenantSettingsUpdatePropertyValidationAttributesMap = {};
24
+ exports.TenantSettingsUpdatePropertyValidationAttributesMap = {
25
+ description: {
26
+ maxLength: 5000,
27
+ },
28
+ industry: {
29
+ maxLength: 120,
30
+ },
31
+ };
25
32
  /**
26
33
  * Check if a given object implements the TenantSettingsUpdate interface.
27
34
  */
@@ -38,6 +45,7 @@ function TenantSettingsUpdateFromJSONTyped(json, ignoreDiscriminator) {
38
45
  return {
39
46
  'language': json['language'] == null ? undefined : (0, SupportedLanguage_1.SupportedLanguageFromJSON)(json['language']),
40
47
  'description': json['description'] == null ? undefined : json['description'],
48
+ 'industry': json['industry'] == null ? undefined : json['industry'],
41
49
  'timezone': json['timezone'] == null ? undefined : json['timezone'],
42
50
  'brandName': json['brand_name'] == null ? undefined : json['brand_name'],
43
51
  'brandColor': json['brand_color'] == null ? undefined : json['brand_color'],
@@ -55,6 +63,7 @@ function TenantSettingsUpdateToJSONTyped(value, ignoreDiscriminator = false) {
55
63
  return {
56
64
  'language': (0, SupportedLanguage_1.SupportedLanguageToJSON)(value['language']),
57
65
  'description': value['description'],
66
+ 'industry': value['industry'],
58
67
  'timezone': value['timezone'],
59
68
  'brand_name': value['brandName'],
60
69
  'brand_color': value['brandColor'],
@@ -65,6 +65,18 @@ export interface UserResponse {
65
65
  * @memberof UserResponse
66
66
  */
67
67
  defaultTenantId: string;
68
+ /**
69
+ * User's job title at the current tenant (per-membership)
70
+ * @type {string}
71
+ * @memberof UserResponse
72
+ */
73
+ jobTitle?: string | null;
74
+ /**
75
+ * When the user finished onboarding for the current tenant. NULL = wizard should be shown.
76
+ * @type {Date}
77
+ * @memberof UserResponse
78
+ */
79
+ onboardingCompletedAt?: Date | null;
68
80
  }
69
81
  export declare const UserResponsePropertyValidationAttributesMap: {
70
82
  [property: string]: {
@@ -60,6 +60,8 @@ function UserResponseFromJSONTyped(json, ignoreDiscriminator) {
60
60
  'currentTenantId': json['current_tenant_id'],
61
61
  'currentTenantRole': (0, TenantUserRole_1.TenantUserRoleFromJSON)(json['current_tenant_role']),
62
62
  'defaultTenantId': json['default_tenant_id'],
63
+ 'jobTitle': json['job_title'] == null ? undefined : json['job_title'],
64
+ 'onboardingCompletedAt': json['onboarding_completed_at'] == null ? undefined : (new Date(json['onboarding_completed_at'])),
63
65
  };
64
66
  }
65
67
  function UserResponseToJSON(json) {
@@ -78,5 +80,7 @@ function UserResponseToJSONTyped(value, ignoreDiscriminator = false) {
78
80
  'current_tenant_id': value['currentTenantId'],
79
81
  'current_tenant_role': (0, TenantUserRole_1.TenantUserRoleToJSON)(value['currentTenantRole']),
80
82
  'default_tenant_id': value['defaultTenantId'],
83
+ 'job_title': value['jobTitle'],
84
+ 'onboarding_completed_at': value['onboardingCompletedAt'] == null ? value['onboardingCompletedAt'] : value['onboardingCompletedAt'].toISOString(),
81
85
  };
82
86
  }
@@ -88,6 +88,8 @@ export * from './MembershipResponse';
88
88
  export * from './MessageRole';
89
89
  export * from './MeteredQuotaStatus';
90
90
  export * from './NonFilesystemReferenceType';
91
+ export * from './OnboardingCompanyRequest';
92
+ export * from './OnboardingProfileRequest';
91
93
  export * from './PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator';
92
94
  export * from './PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator';
93
95
  export * from './PaginatedResponseDocumentResponse';
@@ -142,6 +144,7 @@ export * from './StepInput';
142
144
  export * from './StepKind';
143
145
  export * from './StepOutput';
144
146
  export * from './SubmitFeedbackRequest';
147
+ export * from './SubmitSubscriptionResponse';
145
148
  export * from './SubscriptionPlanResponse';
146
149
  export * from './SubtreeChunkGroup';
147
150
  export * from './SubtreeChunksResponse';
@@ -106,6 +106,8 @@ __exportStar(require("./MembershipResponse"), exports);
106
106
  __exportStar(require("./MessageRole"), exports);
107
107
  __exportStar(require("./MeteredQuotaStatus"), exports);
108
108
  __exportStar(require("./NonFilesystemReferenceType"), exports);
109
+ __exportStar(require("./OnboardingCompanyRequest"), exports);
110
+ __exportStar(require("./OnboardingProfileRequest"), exports);
109
111
  __exportStar(require("./PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator"), exports);
110
112
  __exportStar(require("./PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator"), exports);
111
113
  __exportStar(require("./PaginatedResponseDocumentResponse"), exports);
@@ -160,6 +162,7 @@ __exportStar(require("./StepInput"), exports);
160
162
  __exportStar(require("./StepKind"), exports);
161
163
  __exportStar(require("./StepOutput"), exports);
162
164
  __exportStar(require("./SubmitFeedbackRequest"), exports);
165
+ __exportStar(require("./SubmitSubscriptionResponse"), exports);
163
166
  __exportStar(require("./SubscriptionPlanResponse"), exports);
164
167
  __exportStar(require("./SubtreeChunkGroup"), exports);
165
168
  __exportStar(require("./SubtreeChunksResponse"), exports);
package/docs/AgentApi.md CHANGED
@@ -15,7 +15,7 @@ All URIs are relative to *http://localhost:8000*
15
15
 
16
16
  Agent Ask Handler
17
17
 
18
- Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refunds on any failure between consume and ``handle.result()`` returning pre-enqueue ``start_workflow`` raises and post-enqueue workflow failures both refund.
18
+ Run a one-shot text agent request to completion and return the payload. The request blocks until the underlying Temporal workflow finishes. Clients should set a generous HTTP timeout to accommodate tool-heavy runs. Quota: consumes one MESSAGE before ``start_workflow``. Refund semantics distinguish cause: * **Cancellation** (client disconnect ``asyncio.CancelledError``, OR explicit ``DELETE /v1/workflows/{id}`` while we await ``handle.result()`` Temporal-wrapped ``CancelledError``) → **NO REFUND.** The user walked away or actively cancelled; that\'s their volition. We still best-effort cancel the workflow so the agent stops burning LLM tokens, but the consume stays charged. Detection uses ``temporalio.exceptions.is_cancelled_exception`` which spans both forms. * Any other exception (pre-enqueue ``start_workflow`` raise, Temporal failure, workflow-internal error) → **REFUND.** Server / our-problem failures don\'t bill the user.
19
19
 
20
20
  ### Example
21
21
 
@@ -24,6 +24,7 @@ Name | Type
24
24
  `createdAt` | Date
25
25
  `updatedAt` | Date
26
26
  `tags` | [Array<TagResponse>](TagResponse.md)
27
+ `canWrite` | boolean
27
28
 
28
29
  ## Example
29
30
 
@@ -49,6 +50,7 @@ const example = {
49
50
  "createdAt": null,
50
51
  "updatedAt": null,
51
52
  "tags": null,
53
+ "canWrite": null,
52
54
  } satisfies DocumentResponse
53
55
 
54
56
  console.log(example)
@@ -19,6 +19,7 @@ Name | Type
19
19
  `createdAt` | Date
20
20
  `updatedAt` | Date
21
21
  `tags` | [Array<TagResponse>](TagResponse.md)
22
+ `canWrite` | boolean
22
23
 
23
24
  ## Example
24
25
 
@@ -39,6 +40,7 @@ const example = {
39
40
  "createdAt": null,
40
41
  "updatedAt": null,
41
42
  "tags": null,
43
+ "canWrite": null,
42
44
  } satisfies FolderResponse
43
45
 
44
46
  console.log(example)
@@ -18,6 +18,7 @@ Name | Type
18
18
  `createdAt` | Date
19
19
  `updatedAt` | Date
20
20
  `tags` | [Array<TagResponse>](TagResponse.md)
21
+ `canWrite` | boolean
21
22
  `documentType` | [DocumentType](DocumentType.md)
22
23
  `documentOrigin` | [DocumentOrigin](DocumentOrigin.md)
23
24
  `activeVersionId` | string
@@ -43,6 +44,7 @@ const example = {
43
44
  "createdAt": null,
44
45
  "updatedAt": null,
45
46
  "tags": null,
47
+ "canWrite": null,
46
48
  "documentType": null,
47
49
  "documentOrigin": null,
48
50
  "activeVersionId": null,
@@ -12,6 +12,7 @@ Name | Type
12
12
  `limit` | number
13
13
  `periodStart` | Date
14
14
  `periodEnd` | Date
15
+ `additionalBalance` | number
15
16
 
16
17
  ## Example
17
18
 
@@ -25,6 +26,7 @@ const example = {
25
26
  "limit": null,
26
27
  "periodStart": null,
27
28
  "periodEnd": null,
29
+ "additionalBalance": null,
28
30
  } satisfies MeteredQuotaStatus
29
31
 
30
32
  console.log(example)
@@ -0,0 +1,37 @@
1
+
2
+ # OnboardingCompanyRequest
3
+
4
+ Step 1 of onboarding — tenant-wide company info. OWNER/ADMIN only.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `description` | string
11
+ `industry` | string
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { OnboardingCompanyRequest } from '@knowledge-stack/ksapi'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "description": null,
21
+ "industry": null,
22
+ } satisfies OnboardingCompanyRequest
23
+
24
+ console.log(example)
25
+
26
+ // Convert the instance to a JSON string
27
+ const exampleJSON: string = JSON.stringify(example)
28
+ console.log(exampleJSON)
29
+
30
+ // Parse the JSON string back to an object
31
+ const exampleParsed = JSON.parse(exampleJSON) as OnboardingCompanyRequest
32
+ console.log(exampleParsed)
33
+ ```
34
+
35
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
36
+
37
+
@@ -0,0 +1,39 @@
1
+
2
+ # OnboardingProfileRequest
3
+
4
+ Step 2 of onboarding — per-user info for the current tenant.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `firstName` | string
11
+ `lastName` | string
12
+ `jobTitle` | string
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { OnboardingProfileRequest } from '@knowledge-stack/ksapi'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "firstName": null,
22
+ "lastName": null,
23
+ "jobTitle": null,
24
+ } satisfies OnboardingProfileRequest
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 OnboardingProfileRequest
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
+
@@ -0,0 +1,39 @@
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
+
@@ -11,11 +11,11 @@ All URIs are relative to *http://localhost:8000*
11
11
 
12
12
  ## changeTenantSubscription
13
13
 
14
- > TenantResponse changeTenantSubscription(tenantId, changeSubscriptionRequest, idempotencyKey, authorization, ksUat)
14
+ > SubmitSubscriptionResponse changeTenantSubscription(tenantId, changeSubscriptionRequest, idempotencyKey, authorization, ksUat)
15
15
 
16
16
  Change Tenant Subscription Handler
17
17
 
18
- Change the tenant\'s subscription plan and/or seat count. OWNER-only on the target tenant. Covers three scenarios with one shape: - Plan change (with optional seat-count change). - Pure seat-count change (same plan, different ``num_seats``). - No-op (same plan, same seats) returns 200, performs no DB or Stripe writes. Optional ``Idempotency-Key`` request header is forwarded to Stripe verbatim (clients that retry the same logical operation MUST send the same value across attempts; Stripe collapses duplicates server- side). Absent the header, the server generates a fresh ``uuid4()`` per call and emits a warning — retries in that case are NOT deduplicated. v1 mock-Stripe doesn\'t care, but the contract is in place for the real integration.
18
+ Submit a subscription change (mock-Stripe). OWNER-only on the target tenant. Validates the request (tenant + plan exist, ``num_seats`` within bounds), submits the (mock-)Stripe subscription update, and returns 202. The plan/seat write is NOT applied here — that happens in ``POST /webhooks/stripe/subscription`` after Stripe confirms the change. Async two-hop workflow per ``docs/billing_additional_limits.md`` §\"Async payment workflow\": the dev environment exercises the same submit/webhook split as production will when the real Stripe SDK replaces the log-line stub in ``notify_billing``. Optional ``Idempotency-Key`` request header is forwarded to Stripe verbatim (clients that retry the same logical operation MUST send the same value across attempts; Stripe collapses duplicates server- side). Absent the header, the server generates a fresh ``uuid4()`` per call and emits a warning — but only when a Stripe call is actually about to fire (i.e. the validation passed AND the change is not a no-op). Warning before validation would false-positive on every 4xx and on every redundant submit. **Header value lands in structured logs.** The header value is forwarded into the ``stripe.update_subscription`` log event\'s ``idempotency_key`` field (and into the eventual real Stripe call). Use opaque random IDs (e.g. ``uuid4()``); do NOT pass user identifiers, tokens, or other sensitive material as the ``Idempotency-Key`` header.
19
19
 
20
20
  ### Example
21
21
 
@@ -68,7 +68,7 @@ example().catch(console.error);
68
68
 
69
69
  ### Return type
70
70
 
71
- [**TenantResponse**](TenantResponse.md)
71
+ [**SubmitSubscriptionResponse**](SubmitSubscriptionResponse.md)
72
72
 
73
73
  ### Authorization
74
74
 
@@ -83,7 +83,7 @@ No authorization required
83
83
  ### HTTP response details
84
84
  | Status code | Description | Response headers |
85
85
  |-------------|-------------|------------------|
86
- | **200** | Successful Response | - |
86
+ | **202** | Successful Response | - |
87
87
  | **422** | Validation Error | - |
88
88
 
89
89
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -9,6 +9,7 @@ Name | Type
9
9
  ------------ | -------------
10
10
  `language` | [SupportedLanguage](SupportedLanguage.md)
11
11
  `description` | string
12
+ `industry` | string
12
13
  `timezone` | string
13
14
  `inviteLink` | [InviteLinkSettingsResponse](InviteLinkSettingsResponse.md)
14
15
 
@@ -21,6 +22,7 @@ import type { TenantSettingsResponse } from '@knowledge-stack/ksapi'
21
22
  const example = {
22
23
  "language": null,
23
24
  "description": null,
25
+ "industry": null,
24
26
  "timezone": null,
25
27
  "inviteLink": null,
26
28
  } satisfies TenantSettingsResponse