@knowledge-stack/ksapi 1.72.4 → 1.77.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 +36 -4
- package/README.md +33 -11
- package/dist/apis/AgentApi.d.ts +114 -0
- package/dist/apis/AgentApi.js +156 -0
- package/dist/apis/ChunksApi.d.ts +19 -16
- package/dist/apis/ChunksApi.js +9 -6
- package/dist/apis/DocumentsApi.d.ts +4 -4
- package/dist/apis/DocumentsApi.js +2 -2
- package/dist/apis/FoldersApi.d.ts +4 -4
- package/dist/apis/FoldersApi.js +2 -2
- package/dist/apis/InvitesApi.d.ts +54 -7
- package/dist/apis/InvitesApi.js +51 -2
- package/dist/apis/PublicApi.d.ts +59 -0
- package/dist/apis/PublicApi.js +103 -0
- package/dist/apis/SubscriptionsApi.d.ts +120 -0
- package/dist/apis/SubscriptionsApi.js +162 -0
- package/dist/apis/TenantsApi.d.ts +45 -1
- package/dist/apis/TenantsApi.js +44 -0
- package/dist/apis/ThreadsApi.d.ts +4 -4
- package/dist/apis/ThreadsApi.js +2 -2
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/AgentApi.d.ts +114 -0
- package/dist/esm/apis/AgentApi.js +119 -0
- package/dist/esm/apis/ChunksApi.d.ts +19 -16
- package/dist/esm/apis/ChunksApi.js +9 -6
- package/dist/esm/apis/DocumentsApi.d.ts +4 -4
- package/dist/esm/apis/DocumentsApi.js +2 -2
- package/dist/esm/apis/FoldersApi.d.ts +4 -4
- package/dist/esm/apis/FoldersApi.js +2 -2
- package/dist/esm/apis/InvitesApi.d.ts +54 -7
- package/dist/esm/apis/InvitesApi.js +52 -3
- package/dist/esm/apis/PublicApi.d.ts +59 -0
- package/dist/esm/apis/PublicApi.js +66 -0
- package/dist/esm/apis/SubscriptionsApi.d.ts +120 -0
- package/dist/esm/apis/SubscriptionsApi.js +125 -0
- package/dist/esm/apis/TenantsApi.d.ts +45 -1
- package/dist/esm/apis/TenantsApi.js +45 -1
- package/dist/esm/apis/ThreadsApi.d.ts +4 -4
- package/dist/esm/apis/ThreadsApi.js +2 -2
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/AcceptInviteResponse.d.ts +6 -0
- package/dist/esm/models/AcceptInviteResponse.js +2 -0
- package/dist/esm/models/AskRequest.d.ts +47 -0
- package/dist/esm/models/AskRequest.js +44 -0
- package/dist/esm/models/AskResponse.d.ts +47 -0
- package/dist/esm/models/AskResponse.js +44 -0
- package/dist/esm/models/ChangeSubscriptionRequest.d.ts +53 -0
- package/dist/esm/models/ChangeSubscriptionRequest.js +53 -0
- package/dist/esm/models/CheckpointDetails.d.ts +96 -0
- package/dist/esm/models/CheckpointDetails.js +91 -0
- package/dist/esm/models/ChunkBulkResponse.d.ts +3 -3
- package/dist/esm/models/ChunkBulkResponse.js +3 -3
- package/dist/esm/models/ChunkContentItem.d.ts +3 -3
- package/dist/esm/models/ChunkContentItem.js +3 -3
- package/dist/esm/models/{ChunkMetadataInput.d.ts → ChunkMetadata.d.ts} +23 -23
- package/dist/esm/models/{ChunkMetadataInput.js → ChunkMetadata.js} +9 -9
- package/dist/esm/models/ChunkNeighborsResponse.d.ts +18 -0
- package/dist/esm/models/ChunkNeighborsResponse.js +10 -0
- package/dist/esm/models/ChunkResponse.d.ts +3 -3
- package/dist/esm/models/ChunkResponse.js +3 -3
- package/dist/esm/models/CreateChunkRequest.d.ts +3 -3
- package/dist/esm/models/CreateChunkRequest.js +3 -3
- package/dist/esm/models/DocumentResponse.d.ts +6 -0
- package/dist/esm/models/DocumentResponse.js +4 -0
- package/dist/esm/models/DocumentVersionMetadata.d.ts +24 -0
- package/dist/esm/models/DocumentVersionMetadata.js +8 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +24 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.js +8 -0
- package/dist/esm/models/ExtractRequest.d.ts +61 -0
- package/dist/esm/models/ExtractRequest.js +48 -0
- package/dist/esm/models/ExtractResponse.d.ts +49 -0
- package/dist/esm/models/ExtractResponse.js +44 -0
- package/dist/esm/models/FolderResponse.d.ts +6 -0
- package/dist/esm/models/FolderResponse.js +4 -0
- package/dist/esm/models/InviteLinkSettingsRequest.d.ts +70 -0
- package/dist/esm/models/InviteLinkSettingsRequest.js +58 -0
- package/dist/esm/models/InviteLinkSettingsResponse.d.ts +67 -0
- package/dist/esm/models/InviteLinkSettingsResponse.js +57 -0
- package/dist/esm/models/InviteResponse.d.ts +6 -0
- package/dist/esm/models/InviteResponse.js +2 -0
- package/dist/esm/models/InviteUserRequest.d.ts +6 -0
- package/dist/esm/models/InviteUserRequest.js +8 -1
- package/dist/esm/models/LineageNodeResponse.d.ts +3 -3
- package/dist/esm/models/LineageNodeResponse.js +3 -3
- package/dist/esm/models/MeteredQuotaStatus.d.ts +72 -0
- package/dist/esm/models/MeteredQuotaStatus.js +61 -0
- package/dist/esm/models/PathPartAncestorItem.d.ts +6 -0
- package/dist/esm/models/PathPartAncestorItem.js +4 -0
- package/dist/esm/models/PathPartResponse.d.ts +6 -0
- package/dist/esm/models/PathPartResponse.js +4 -0
- package/dist/esm/models/PipelineStatus.d.ts +1 -0
- package/dist/esm/models/PipelineStatus.js +2 -1
- package/dist/esm/models/ScoredChunkResponse.d.ts +3 -3
- package/dist/esm/models/ScoredChunkResponse.js +3 -3
- package/dist/esm/models/SeatQuotaStatus.d.ts +55 -0
- package/dist/esm/models/SeatQuotaStatus.js +48 -0
- package/dist/esm/models/SubscriptionPlanResponse.d.ts +101 -0
- package/dist/esm/models/SubscriptionPlanResponse.js +76 -0
- package/dist/esm/models/TenantQuotaStateResponse.d.ts +55 -0
- package/dist/esm/models/TenantQuotaStateResponse.js +50 -0
- package/dist/esm/models/TenantResponse.d.ts +12 -0
- package/dist/esm/models/TenantResponse.js +14 -1
- package/dist/esm/models/TenantSettingsResponse.d.ts +7 -0
- package/dist/esm/models/TenantSettingsResponse.js +5 -0
- package/dist/esm/models/TenantSettingsUpdate.d.ts +7 -0
- package/dist/esm/models/TenantSettingsUpdate.js +3 -0
- package/dist/esm/models/ThreadMessageDetailsInput.d.ts +7 -0
- package/dist/esm/models/ThreadMessageDetailsInput.js +3 -0
- package/dist/esm/models/ThreadMessageDetailsOutput.d.ts +7 -0
- package/dist/esm/models/ThreadMessageDetailsOutput.js +3 -0
- package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +3 -3
- package/dist/esm/models/UpdateChunkMetadataRequest.js +3 -3
- package/dist/esm/models/UpdateDocumentRequest.d.ts +7 -1
- package/dist/esm/models/UpdateDocumentRequest.js +2 -0
- package/dist/esm/models/UpdateFolderRequest.d.ts +7 -1
- package/dist/esm/models/UpdateFolderRequest.js +2 -0
- package/dist/esm/models/UpdateInviteRequest.d.ts +53 -0
- package/dist/esm/models/UpdateInviteRequest.js +49 -0
- package/dist/esm/models/UsageMetric.d.ts +26 -0
- package/dist/esm/models/UsageMetric.js +44 -0
- package/dist/esm/models/index.d.ts +15 -2
- package/dist/esm/models/index.js +15 -2
- package/dist/models/AcceptInviteResponse.d.ts +6 -0
- package/dist/models/AcceptInviteResponse.js +2 -0
- package/dist/models/AskRequest.d.ts +47 -0
- package/dist/models/AskRequest.js +52 -0
- package/dist/models/AskResponse.d.ts +47 -0
- package/dist/models/AskResponse.js +52 -0
- package/dist/models/ChangeSubscriptionRequest.d.ts +53 -0
- package/dist/models/ChangeSubscriptionRequest.js +61 -0
- package/dist/models/CheckpointDetails.d.ts +96 -0
- package/dist/models/CheckpointDetails.js +99 -0
- package/dist/models/ChunkBulkResponse.d.ts +3 -3
- package/dist/models/ChunkBulkResponse.js +3 -3
- package/dist/models/ChunkContentItem.d.ts +3 -3
- package/dist/models/ChunkContentItem.js +3 -3
- package/dist/models/{ChunkMetadataInput.d.ts → ChunkMetadata.d.ts} +23 -23
- package/dist/models/{ChunkMetadataInput.js → ChunkMetadata.js} +15 -15
- package/dist/models/ChunkNeighborsResponse.d.ts +18 -0
- package/dist/models/ChunkNeighborsResponse.js +10 -0
- package/dist/models/ChunkResponse.d.ts +3 -3
- package/dist/models/ChunkResponse.js +3 -3
- package/dist/models/CreateChunkRequest.d.ts +3 -3
- package/dist/models/CreateChunkRequest.js +3 -3
- package/dist/models/DocumentResponse.d.ts +6 -0
- package/dist/models/DocumentResponse.js +4 -0
- package/dist/models/DocumentVersionMetadata.d.ts +24 -0
- package/dist/models/DocumentVersionMetadata.js +8 -0
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +24 -0
- package/dist/models/DocumentVersionMetadataUpdate.js +8 -0
- package/dist/models/ExtractRequest.d.ts +61 -0
- package/dist/models/ExtractRequest.js +56 -0
- package/dist/models/ExtractResponse.d.ts +49 -0
- package/dist/models/ExtractResponse.js +52 -0
- package/dist/models/FolderResponse.d.ts +6 -0
- package/dist/models/FolderResponse.js +4 -0
- package/dist/models/InviteLinkSettingsRequest.d.ts +70 -0
- package/dist/models/InviteLinkSettingsRequest.js +66 -0
- package/dist/models/InviteLinkSettingsResponse.d.ts +67 -0
- package/dist/models/InviteLinkSettingsResponse.js +65 -0
- package/dist/models/InviteResponse.d.ts +6 -0
- package/dist/models/InviteResponse.js +2 -0
- package/dist/models/InviteUserRequest.d.ts +6 -0
- package/dist/models/InviteUserRequest.js +8 -1
- package/dist/models/LineageNodeResponse.d.ts +3 -3
- package/dist/models/LineageNodeResponse.js +3 -3
- package/dist/models/MeteredQuotaStatus.d.ts +72 -0
- package/dist/models/MeteredQuotaStatus.js +69 -0
- package/dist/models/PathPartAncestorItem.d.ts +6 -0
- package/dist/models/PathPartAncestorItem.js +4 -0
- package/dist/models/PathPartResponse.d.ts +6 -0
- package/dist/models/PathPartResponse.js +4 -0
- package/dist/models/PipelineStatus.d.ts +1 -0
- package/dist/models/PipelineStatus.js +2 -1
- package/dist/models/ScoredChunkResponse.d.ts +3 -3
- package/dist/models/ScoredChunkResponse.js +3 -3
- package/dist/models/SeatQuotaStatus.d.ts +55 -0
- package/dist/models/SeatQuotaStatus.js +56 -0
- package/dist/models/SubscriptionPlanResponse.d.ts +101 -0
- package/dist/models/SubscriptionPlanResponse.js +84 -0
- package/dist/models/TenantQuotaStateResponse.d.ts +55 -0
- package/dist/models/TenantQuotaStateResponse.js +58 -0
- package/dist/models/TenantResponse.d.ts +12 -0
- package/dist/models/TenantResponse.js +14 -1
- package/dist/models/TenantSettingsResponse.d.ts +7 -0
- package/dist/models/TenantSettingsResponse.js +5 -0
- package/dist/models/TenantSettingsUpdate.d.ts +7 -0
- package/dist/models/TenantSettingsUpdate.js +3 -0
- package/dist/models/ThreadMessageDetailsInput.d.ts +7 -0
- package/dist/models/ThreadMessageDetailsInput.js +3 -0
- package/dist/models/ThreadMessageDetailsOutput.d.ts +7 -0
- package/dist/models/ThreadMessageDetailsOutput.js +3 -0
- package/dist/models/UpdateChunkMetadataRequest.d.ts +3 -3
- package/dist/models/UpdateChunkMetadataRequest.js +3 -3
- package/dist/models/UpdateDocumentRequest.d.ts +7 -1
- package/dist/models/UpdateDocumentRequest.js +2 -0
- package/dist/models/UpdateFolderRequest.d.ts +7 -1
- package/dist/models/UpdateFolderRequest.js +2 -0
- package/dist/models/UpdateInviteRequest.d.ts +53 -0
- package/dist/models/UpdateInviteRequest.js +57 -0
- package/dist/models/UsageMetric.d.ts +26 -0
- package/dist/models/UsageMetric.js +52 -0
- package/dist/models/index.d.ts +15 -2
- package/dist/models/index.js +15 -2
- package/docs/AcceptInviteResponse.md +2 -0
- package/docs/AgentApi.md +158 -0
- package/docs/AskRequest.md +35 -0
- package/docs/AskResponse.md +35 -0
- package/docs/ChangeSubscriptionRequest.md +37 -0
- package/docs/CheckpointDetails.md +49 -0
- package/docs/ChunkBulkResponse.md +1 -1
- package/docs/ChunkContentItem.md +1 -1
- package/docs/{ChunkMetadataInput.md → ChunkMetadata.md} +4 -4
- package/docs/ChunkNeighborsResponse.md +6 -0
- package/docs/ChunkResponse.md +1 -1
- package/docs/ChunksApi.md +13 -10
- package/docs/CreateChunkRequest.md +1 -1
- package/docs/DocumentResponse.md +2 -0
- package/docs/DocumentVersionMetadata.md +8 -0
- package/docs/DocumentVersionMetadataUpdate.md +8 -0
- package/docs/DocumentsApi.md +1 -1
- package/docs/ExtractRequest.md +39 -0
- package/docs/ExtractResponse.md +35 -0
- package/docs/FolderResponse.md +2 -0
- package/docs/FolderResponseOrDocumentResponse.md +2 -0
- package/docs/FoldersApi.md +1 -1
- package/docs/InviteLinkSettingsRequest.md +39 -0
- package/docs/InviteLinkSettingsResponse.md +39 -0
- package/docs/InviteResponse.md +2 -0
- package/docs/InviteUserRequest.md +2 -0
- package/docs/InvitesApi.md +81 -3
- package/docs/LineageNodeResponse.md +1 -1
- package/docs/MeteredQuotaStatus.md +43 -0
- package/docs/PathPartAncestorItem.md +2 -0
- package/docs/PathPartResponse.md +2 -0
- package/docs/PublicApi.md +68 -0
- package/docs/ScoredChunkResponse.md +1 -1
- package/docs/SeatQuotaStatus.md +37 -0
- package/docs/SectionContentItemOrChunkContentItem.md +1 -1
- package/docs/SubscriptionPlanResponse.md +51 -0
- package/docs/SubscriptionsApi.md +164 -0
- package/docs/TenantQuotaStateResponse.md +37 -0
- package/docs/TenantResponse.md +4 -0
- package/docs/TenantSettingsResponse.md +2 -0
- package/docs/TenantSettingsUpdate.md +2 -0
- package/docs/TenantsApi.md +75 -0
- package/docs/ThreadMessageDetailsInput.md +2 -0
- package/docs/ThreadMessageDetailsOutput.md +2 -0
- package/docs/ThreadsApi.md +1 -1
- package/docs/UpdateChunkMetadataRequest.md +1 -1
- package/docs/UpdateDocumentRequest.md +3 -1
- package/docs/UpdateFolderRequest.md +3 -1
- package/docs/UpdateInviteRequest.md +37 -0
- package/docs/UsageMetric.md +32 -0
- package/package.json +1 -1
- package/src/apis/AgentApi.ts +225 -0
- package/src/apis/ChunksApi.ts +27 -17
- package/src/apis/DocumentsApi.ts +4 -4
- package/src/apis/FoldersApi.ts +4 -4
- package/src/apis/InvitesApi.ts +107 -6
- package/src/apis/PublicApi.ts +100 -0
- package/src/apis/SubscriptionsApi.ts +238 -0
- package/src/apis/TenantsApi.ts +88 -0
- package/src/apis/ThreadsApi.ts +4 -4
- package/src/apis/index.ts +3 -0
- package/src/models/AcceptInviteResponse.ts +8 -0
- package/src/models/AskRequest.ts +83 -0
- package/src/models/AskResponse.ts +83 -0
- package/src/models/ChangeSubscriptionRequest.ts +96 -0
- package/src/models/CheckpointDetails.ts +169 -0
- package/src/models/ChunkBulkResponse.ts +11 -11
- package/src/models/ChunkContentItem.ts +10 -10
- package/src/models/{ChunkMetadataInput.ts → ChunkMetadata.ts} +25 -25
- package/src/models/ChunkNeighborsResponse.ts +26 -0
- package/src/models/ChunkResponse.ts +11 -11
- package/src/models/CreateChunkRequest.ts +10 -10
- package/src/models/DocumentResponse.ts +9 -0
- package/src/models/DocumentVersionMetadata.ts +32 -0
- package/src/models/DocumentVersionMetadataUpdate.ts +32 -0
- package/src/models/ExtractRequest.ts +99 -0
- package/src/models/ExtractResponse.ts +83 -0
- package/src/models/FolderResponse.ts +9 -0
- package/src/models/InviteLinkSettingsRequest.ts +116 -0
- package/src/models/InviteLinkSettingsResponse.ts +111 -0
- package/src/models/InviteResponse.ts +8 -0
- package/src/models/InviteUserRequest.ts +12 -0
- package/src/models/LineageNodeResponse.ts +10 -10
- package/src/models/MeteredQuotaStatus.ts +129 -0
- package/src/models/PathPartAncestorItem.ts +9 -0
- package/src/models/PathPartResponse.ts +9 -0
- package/src/models/PipelineStatus.ts +2 -1
- package/src/models/ScoredChunkResponse.ts +11 -11
- package/src/models/SeatQuotaStatus.ts +94 -0
- package/src/models/SubscriptionPlanResponse.ts +161 -0
- package/src/models/TenantQuotaStateResponse.ts +107 -0
- package/src/models/TenantResponse.ts +22 -0
- package/src/models/TenantSettingsResponse.ts +16 -0
- package/src/models/TenantSettingsUpdate.ts +15 -0
- package/src/models/ThreadMessageDetailsInput.ts +15 -0
- package/src/models/ThreadMessageDetailsOutput.ts +15 -0
- package/src/models/UpdateChunkMetadataRequest.ts +10 -10
- package/src/models/UpdateDocumentRequest.ts +9 -1
- package/src/models/UpdateFolderRequest.ts +9 -1
- package/src/models/UpdateInviteRequest.ts +94 -0
- package/src/models/UsageMetric.ts +54 -0
- package/src/models/index.ts +15 -2
- package/dist/esm/models/ChunkMetadataOutput.d.ts +0 -135
- package/dist/esm/models/ChunkMetadataOutput.js +0 -70
- package/dist/models/ChunkMetadataOutput.d.ts +0 -135
- package/dist/models/ChunkMetadataOutput.js +0 -78
- package/docs/ChunkMetadataOutput.md +0 -61
- package/src/models/ChunkMetadataOutput.ts +0 -203
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AcceptInviteResponse, InviteResponse, InviteStatus, InviteUserRequest, PaginatedResponseInviteResponse } from '../models/index';
|
|
13
|
+
import type { AcceptInviteResponse, InviteResponse, InviteStatus, InviteUserRequest, PaginatedResponseInviteResponse, UpdateInviteRequest } from '../models/index';
|
|
14
14
|
export interface AcceptInviteRequest {
|
|
15
15
|
inviteId: string;
|
|
16
16
|
authorization?: string | null;
|
|
@@ -34,6 +34,12 @@ export interface ListInvitesRequest {
|
|
|
34
34
|
authorization?: string | null;
|
|
35
35
|
ksUat?: string | null;
|
|
36
36
|
}
|
|
37
|
+
export interface UpdateInviteOperationRequest {
|
|
38
|
+
inviteId: string;
|
|
39
|
+
updateInviteRequest: UpdateInviteRequest;
|
|
40
|
+
authorization?: string | null;
|
|
41
|
+
ksUat?: string | null;
|
|
42
|
+
}
|
|
37
43
|
/**
|
|
38
44
|
* InvitesApi - interface
|
|
39
45
|
*
|
|
@@ -43,7 +49,7 @@ export interface ListInvitesRequest {
|
|
|
43
49
|
export interface InvitesApiInterface {
|
|
44
50
|
/**
|
|
45
51
|
* Creates request options for acceptInvite without sending the request
|
|
46
|
-
* @param {string} inviteId
|
|
52
|
+
* @param {string} inviteId Either an Invite ID (traditional per-email invite) OR a Tenant ID (when the tenant has ``invite_link.enabled``). Tenant lookup is tried first.
|
|
47
53
|
* @param {string} [authorization]
|
|
48
54
|
* @param {string} [ksUat]
|
|
49
55
|
* @throws {RequiredError}
|
|
@@ -51,9 +57,9 @@ export interface InvitesApiInterface {
|
|
|
51
57
|
*/
|
|
52
58
|
acceptInviteRequestOpts(requestParameters: AcceptInviteRequest): Promise<runtime.RequestOpts>;
|
|
53
59
|
/**
|
|
54
|
-
*
|
|
60
|
+
* Accept an invite OR a tenant invite-link. The path parameter ``invite_id`` may be either: * a Tenant ID (when an admin has enabled ``invite_link`` on the tenant), OR * an Invite ID (the traditional per-email invite flow). Tenant lookup is tried first. If the row is found, the request is treated as an invite-link request — both 400 paths below have *distinct* messages so the frontend can branch on copy: * \"does not have invite link enabled\" → admin hasn\'t turned it on * \"does not support inviting users\" → tenant kill-switch ``system_metadata.can_invite`` is honored on this path too — it\'s a hard kill switch for self-serve onboarding. Only when no tenant matches do we look up an Invite row.
|
|
55
61
|
* @summary Accept Invite
|
|
56
|
-
* @param {string} inviteId
|
|
62
|
+
* @param {string} inviteId Either an Invite ID (traditional per-email invite) OR a Tenant ID (when the tenant has ``invite_link.enabled``). Tenant lookup is tried first.
|
|
57
63
|
* @param {string} [authorization]
|
|
58
64
|
* @param {string} [ksUat]
|
|
59
65
|
* @param {*} [options] Override http request option.
|
|
@@ -62,7 +68,7 @@ export interface InvitesApiInterface {
|
|
|
62
68
|
*/
|
|
63
69
|
acceptInviteRaw(requestParameters: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AcceptInviteResponse>>;
|
|
64
70
|
/**
|
|
65
|
-
*
|
|
71
|
+
* Accept an invite OR a tenant invite-link. The path parameter ``invite_id`` may be either: * a Tenant ID (when an admin has enabled ``invite_link`` on the tenant), OR * an Invite ID (the traditional per-email invite flow). Tenant lookup is tried first. If the row is found, the request is treated as an invite-link request — both 400 paths below have *distinct* messages so the frontend can branch on copy: * \"does not have invite link enabled\" → admin hasn\'t turned it on * \"does not support inviting users\" → tenant kill-switch ``system_metadata.can_invite`` is honored on this path too — it\'s a hard kill switch for self-serve onboarding. Only when no tenant matches do we look up an Invite row.
|
|
66
72
|
* Accept Invite
|
|
67
73
|
*/
|
|
68
74
|
acceptInvite(requestParameters: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AcceptInviteResponse>;
|
|
@@ -147,6 +153,33 @@ export interface InvitesApiInterface {
|
|
|
147
153
|
* List Invites Handler
|
|
148
154
|
*/
|
|
149
155
|
listInvites(requestParameters: ListInvitesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseInviteResponse>;
|
|
156
|
+
/**
|
|
157
|
+
* Creates request options for updateInvite without sending the request
|
|
158
|
+
* @param {string} inviteId
|
|
159
|
+
* @param {UpdateInviteRequest} updateInviteRequest
|
|
160
|
+
* @param {string} [authorization]
|
|
161
|
+
* @param {string} [ksUat]
|
|
162
|
+
* @throws {RequiredError}
|
|
163
|
+
* @memberof InvitesApiInterface
|
|
164
|
+
*/
|
|
165
|
+
updateInviteRequestOpts(requestParameters: UpdateInviteOperationRequest): Promise<runtime.RequestOpts>;
|
|
166
|
+
/**
|
|
167
|
+
* Update an invite\'s expiry or groups (admin/owner only). The invite must belong to the caller\'s current tenant. Any provided groups are validated to belong to the same tenant.
|
|
168
|
+
* @summary Update Invite Handler
|
|
169
|
+
* @param {string} inviteId
|
|
170
|
+
* @param {UpdateInviteRequest} updateInviteRequest
|
|
171
|
+
* @param {string} [authorization]
|
|
172
|
+
* @param {string} [ksUat]
|
|
173
|
+
* @param {*} [options] Override http request option.
|
|
174
|
+
* @throws {RequiredError}
|
|
175
|
+
* @memberof InvitesApiInterface
|
|
176
|
+
*/
|
|
177
|
+
updateInviteRaw(requestParameters: UpdateInviteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InviteResponse>>;
|
|
178
|
+
/**
|
|
179
|
+
* Update an invite\'s expiry or groups (admin/owner only). The invite must belong to the caller\'s current tenant. Any provided groups are validated to belong to the same tenant.
|
|
180
|
+
* Update Invite Handler
|
|
181
|
+
*/
|
|
182
|
+
updateInvite(requestParameters: UpdateInviteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteResponse>;
|
|
150
183
|
}
|
|
151
184
|
/**
|
|
152
185
|
*
|
|
@@ -157,12 +190,12 @@ export declare class InvitesApi extends runtime.BaseAPI implements InvitesApiInt
|
|
|
157
190
|
*/
|
|
158
191
|
acceptInviteRequestOpts(requestParameters: AcceptInviteRequest): Promise<runtime.RequestOpts>;
|
|
159
192
|
/**
|
|
160
|
-
*
|
|
193
|
+
* Accept an invite OR a tenant invite-link. The path parameter ``invite_id`` may be either: * a Tenant ID (when an admin has enabled ``invite_link`` on the tenant), OR * an Invite ID (the traditional per-email invite flow). Tenant lookup is tried first. If the row is found, the request is treated as an invite-link request — both 400 paths below have *distinct* messages so the frontend can branch on copy: * \"does not have invite link enabled\" → admin hasn\'t turned it on * \"does not support inviting users\" → tenant kill-switch ``system_metadata.can_invite`` is honored on this path too — it\'s a hard kill switch for self-serve onboarding. Only when no tenant matches do we look up an Invite row.
|
|
161
194
|
* Accept Invite
|
|
162
195
|
*/
|
|
163
196
|
acceptInviteRaw(requestParameters: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AcceptInviteResponse>>;
|
|
164
197
|
/**
|
|
165
|
-
*
|
|
198
|
+
* Accept an invite OR a tenant invite-link. The path parameter ``invite_id`` may be either: * a Tenant ID (when an admin has enabled ``invite_link`` on the tenant), OR * an Invite ID (the traditional per-email invite flow). Tenant lookup is tried first. If the row is found, the request is treated as an invite-link request — both 400 paths below have *distinct* messages so the frontend can branch on copy: * \"does not have invite link enabled\" → admin hasn\'t turned it on * \"does not support inviting users\" → tenant kill-switch ``system_metadata.can_invite`` is honored on this path too — it\'s a hard kill switch for self-serve onboarding. Only when no tenant matches do we look up an Invite row.
|
|
166
199
|
* Accept Invite
|
|
167
200
|
*/
|
|
168
201
|
acceptInvite(requestParameters: AcceptInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AcceptInviteResponse>;
|
|
@@ -208,4 +241,18 @@ export declare class InvitesApi extends runtime.BaseAPI implements InvitesApiInt
|
|
|
208
241
|
* List Invites Handler
|
|
209
242
|
*/
|
|
210
243
|
listInvites(requestParameters?: ListInvitesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseInviteResponse>;
|
|
244
|
+
/**
|
|
245
|
+
* Creates request options for updateInvite without sending the request
|
|
246
|
+
*/
|
|
247
|
+
updateInviteRequestOpts(requestParameters: UpdateInviteOperationRequest): Promise<runtime.RequestOpts>;
|
|
248
|
+
/**
|
|
249
|
+
* Update an invite\'s expiry or groups (admin/owner only). The invite must belong to the caller\'s current tenant. Any provided groups are validated to belong to the same tenant.
|
|
250
|
+
* Update Invite Handler
|
|
251
|
+
*/
|
|
252
|
+
updateInviteRaw(requestParameters: UpdateInviteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InviteResponse>>;
|
|
253
|
+
/**
|
|
254
|
+
* Update an invite\'s expiry or groups (admin/owner only). The invite must belong to the caller\'s current tenant. Any provided groups are validated to belong to the same tenant.
|
|
255
|
+
* Update Invite Handler
|
|
256
|
+
*/
|
|
257
|
+
updateInvite(requestParameters: UpdateInviteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InviteResponse>;
|
|
211
258
|
}
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { AcceptInviteResponseFromJSON, InviteResponseFromJSON, InviteUserRequestToJSON, PaginatedResponseInviteResponseFromJSON, } from '../models/index';
|
|
24
|
+
import { AcceptInviteResponseFromJSON, InviteResponseFromJSON, InviteUserRequestToJSON, PaginatedResponseInviteResponseFromJSON, UpdateInviteRequestToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -50,7 +50,7 @@ export class InvitesApi extends runtime.BaseAPI {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Accept an invite OR a tenant invite-link. The path parameter ``invite_id`` may be either: * a Tenant ID (when an admin has enabled ``invite_link`` on the tenant), OR * an Invite ID (the traditional per-email invite flow). Tenant lookup is tried first. If the row is found, the request is treated as an invite-link request — both 400 paths below have *distinct* messages so the frontend can branch on copy: * \"does not have invite link enabled\" → admin hasn\'t turned it on * \"does not support inviting users\" → tenant kill-switch ``system_metadata.can_invite`` is honored on this path too — it\'s a hard kill switch for self-serve onboarding. Only when no tenant matches do we look up an Invite row.
|
|
54
54
|
* Accept Invite
|
|
55
55
|
*/
|
|
56
56
|
acceptInviteRaw(requestParameters, initOverrides) {
|
|
@@ -61,7 +61,7 @@ export class InvitesApi extends runtime.BaseAPI {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Accept an invite OR a tenant invite-link. The path parameter ``invite_id`` may be either: * a Tenant ID (when an admin has enabled ``invite_link`` on the tenant), OR * an Invite ID (the traditional per-email invite flow). Tenant lookup is tried first. If the row is found, the request is treated as an invite-link request — both 400 paths below have *distinct* messages so the frontend can branch on copy: * \"does not have invite link enabled\" → admin hasn\'t turned it on * \"does not support inviting users\" → tenant kill-switch ``system_metadata.can_invite`` is honored on this path too — it\'s a hard kill switch for self-serve onboarding. Only when no tenant matches do we look up an Invite row.
|
|
65
65
|
* Accept Invite
|
|
66
66
|
*/
|
|
67
67
|
acceptInvite(requestParameters, initOverrides) {
|
|
@@ -210,4 +210,53 @@ export class InvitesApi extends runtime.BaseAPI {
|
|
|
210
210
|
return yield response.value();
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* Creates request options for updateInvite without sending the request
|
|
215
|
+
*/
|
|
216
|
+
updateInviteRequestOpts(requestParameters) {
|
|
217
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
218
|
+
if (requestParameters['inviteId'] == null) {
|
|
219
|
+
throw new runtime.RequiredError('inviteId', 'Required parameter "inviteId" was null or undefined when calling updateInvite().');
|
|
220
|
+
}
|
|
221
|
+
if (requestParameters['updateInviteRequest'] == null) {
|
|
222
|
+
throw new runtime.RequiredError('updateInviteRequest', 'Required parameter "updateInviteRequest" was null or undefined when calling updateInvite().');
|
|
223
|
+
}
|
|
224
|
+
const queryParameters = {};
|
|
225
|
+
const headerParameters = {};
|
|
226
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
227
|
+
if (requestParameters['authorization'] != null) {
|
|
228
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
229
|
+
}
|
|
230
|
+
let urlPath = `/v1/invites/{invite_id}`;
|
|
231
|
+
urlPath = urlPath.replace(`{${"invite_id"}}`, encodeURIComponent(String(requestParameters['inviteId'])));
|
|
232
|
+
return {
|
|
233
|
+
path: urlPath,
|
|
234
|
+
method: 'PATCH',
|
|
235
|
+
headers: headerParameters,
|
|
236
|
+
query: queryParameters,
|
|
237
|
+
body: UpdateInviteRequestToJSON(requestParameters['updateInviteRequest']),
|
|
238
|
+
};
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Update an invite\'s expiry or groups (admin/owner only). The invite must belong to the caller\'s current tenant. Any provided groups are validated to belong to the same tenant.
|
|
243
|
+
* Update Invite Handler
|
|
244
|
+
*/
|
|
245
|
+
updateInviteRaw(requestParameters, initOverrides) {
|
|
246
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
247
|
+
const requestOptions = yield this.updateInviteRequestOpts(requestParameters);
|
|
248
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
249
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InviteResponseFromJSON(jsonValue));
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Update an invite\'s expiry or groups (admin/owner only). The invite must belong to the caller\'s current tenant. Any provided groups are validated to belong to the same tenant.
|
|
254
|
+
* Update Invite Handler
|
|
255
|
+
*/
|
|
256
|
+
updateInvite(requestParameters, initOverrides) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
const response = yield this.updateInviteRaw(requestParameters, initOverrides);
|
|
259
|
+
return yield response.value();
|
|
260
|
+
});
|
|
261
|
+
}
|
|
213
262
|
}
|
|
@@ -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
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { SubscriptionPlanResponse } from '../models/index';
|
|
14
|
+
/**
|
|
15
|
+
* PublicApi - interface
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface PublicApiInterface
|
|
19
|
+
*/
|
|
20
|
+
export interface PublicApiInterface {
|
|
21
|
+
/**
|
|
22
|
+
* Creates request options for listPublicSubscriptions without sending the request
|
|
23
|
+
* @throws {RequiredError}
|
|
24
|
+
* @memberof PublicApiInterface
|
|
25
|
+
*/
|
|
26
|
+
listPublicSubscriptionsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
27
|
+
/**
|
|
28
|
+
* List publicly-visible subscription plans (no authentication required). Filters to ``subscription_plan.public = true`` — custom enterprise tiers (created with ``public=False`` via ``POST /system/subscriptions``) are excluded. Tenants on a private plan can still read it via ``GET /v1/tenants/{tenant_id}/subscriptions``.
|
|
29
|
+
* @summary List Public Subscriptions Handler
|
|
30
|
+
* @param {*} [options] Override http request option.
|
|
31
|
+
* @throws {RequiredError}
|
|
32
|
+
* @memberof PublicApiInterface
|
|
33
|
+
*/
|
|
34
|
+
listPublicSubscriptionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SubscriptionPlanResponse>>>;
|
|
35
|
+
/**
|
|
36
|
+
* List publicly-visible subscription plans (no authentication required). Filters to ``subscription_plan.public = true`` — custom enterprise tiers (created with ``public=False`` via ``POST /system/subscriptions``) are excluded. Tenants on a private plan can still read it via ``GET /v1/tenants/{tenant_id}/subscriptions``.
|
|
37
|
+
* List Public Subscriptions Handler
|
|
38
|
+
*/
|
|
39
|
+
listPublicSubscriptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SubscriptionPlanResponse>>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
export declare class PublicApi extends runtime.BaseAPI implements PublicApiInterface {
|
|
45
|
+
/**
|
|
46
|
+
* Creates request options for listPublicSubscriptions without sending the request
|
|
47
|
+
*/
|
|
48
|
+
listPublicSubscriptionsRequestOpts(): Promise<runtime.RequestOpts>;
|
|
49
|
+
/**
|
|
50
|
+
* List publicly-visible subscription plans (no authentication required). Filters to ``subscription_plan.public = true`` — custom enterprise tiers (created with ``public=False`` via ``POST /system/subscriptions``) are excluded. Tenants on a private plan can still read it via ``GET /v1/tenants/{tenant_id}/subscriptions``.
|
|
51
|
+
* List Public Subscriptions Handler
|
|
52
|
+
*/
|
|
53
|
+
listPublicSubscriptionsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<SubscriptionPlanResponse>>>;
|
|
54
|
+
/**
|
|
55
|
+
* List publicly-visible subscription plans (no authentication required). Filters to ``subscription_plan.public = true`` — custom enterprise tiers (created with ``public=False`` via ``POST /system/subscriptions``) are excluded. Tenants on a private plan can still read it via ``GET /v1/tenants/{tenant_id}/subscriptions``.
|
|
56
|
+
* List Public Subscriptions Handler
|
|
57
|
+
*/
|
|
58
|
+
listPublicSubscriptions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<SubscriptionPlanResponse>>;
|
|
59
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { SubscriptionPlanResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class PublicApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for listPublicSubscriptions without sending the request
|
|
31
|
+
*/
|
|
32
|
+
listPublicSubscriptionsRequestOpts() {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const queryParameters = {};
|
|
35
|
+
const headerParameters = {};
|
|
36
|
+
let urlPath = `/public/subscriptions`;
|
|
37
|
+
return {
|
|
38
|
+
path: urlPath,
|
|
39
|
+
method: 'GET',
|
|
40
|
+
headers: headerParameters,
|
|
41
|
+
query: queryParameters,
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* List publicly-visible subscription plans (no authentication required). Filters to ``subscription_plan.public = true`` — custom enterprise tiers (created with ``public=False`` via ``POST /system/subscriptions``) are excluded. Tenants on a private plan can still read it via ``GET /v1/tenants/{tenant_id}/subscriptions``.
|
|
47
|
+
* List Public Subscriptions Handler
|
|
48
|
+
*/
|
|
49
|
+
listPublicSubscriptionsRaw(initOverrides) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
const requestOptions = yield this.listPublicSubscriptionsRequestOpts();
|
|
52
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
53
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SubscriptionPlanResponseFromJSON));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* List publicly-visible subscription plans (no authentication required). Filters to ``subscription_plan.public = true`` — custom enterprise tiers (created with ``public=False`` via ``POST /system/subscriptions``) are excluded. Tenants on a private plan can still read it via ``GET /v1/tenants/{tenant_id}/subscriptions``.
|
|
58
|
+
* List Public Subscriptions Handler
|
|
59
|
+
*/
|
|
60
|
+
listPublicSubscriptions(initOverrides) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const response = yield this.listPublicSubscriptionsRaw(initOverrides);
|
|
63
|
+
return yield response.value();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { ChangeSubscriptionRequest, SubscriptionPlanResponse, TenantResponse } from '../models/index';
|
|
14
|
+
export interface ChangeTenantSubscriptionRequest {
|
|
15
|
+
tenantId: string;
|
|
16
|
+
changeSubscriptionRequest: ChangeSubscriptionRequest;
|
|
17
|
+
idempotencyKey?: string | null;
|
|
18
|
+
authorization?: string | null;
|
|
19
|
+
ksUat?: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface GetTenantSubscriptionRequest {
|
|
22
|
+
tenantId: string;
|
|
23
|
+
authorization?: string | null;
|
|
24
|
+
ksUat?: string | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* SubscriptionsApi - interface
|
|
28
|
+
*
|
|
29
|
+
* @export
|
|
30
|
+
* @interface SubscriptionsApiInterface
|
|
31
|
+
*/
|
|
32
|
+
export interface SubscriptionsApiInterface {
|
|
33
|
+
/**
|
|
34
|
+
* Creates request options for changeTenantSubscription without sending the request
|
|
35
|
+
* @param {string} tenantId
|
|
36
|
+
* @param {ChangeSubscriptionRequest} changeSubscriptionRequest
|
|
37
|
+
* @param {string} [idempotencyKey]
|
|
38
|
+
* @param {string} [authorization]
|
|
39
|
+
* @param {string} [ksUat]
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
* @memberof SubscriptionsApiInterface
|
|
42
|
+
*/
|
|
43
|
+
changeTenantSubscriptionRequestOpts(requestParameters: ChangeTenantSubscriptionRequest): Promise<runtime.RequestOpts>;
|
|
44
|
+
/**
|
|
45
|
+
* 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.
|
|
46
|
+
* @summary Change Tenant Subscription Handler
|
|
47
|
+
* @param {string} tenantId
|
|
48
|
+
* @param {ChangeSubscriptionRequest} changeSubscriptionRequest
|
|
49
|
+
* @param {string} [idempotencyKey]
|
|
50
|
+
* @param {string} [authorization]
|
|
51
|
+
* @param {string} [ksUat]
|
|
52
|
+
* @param {*} [options] Override http request option.
|
|
53
|
+
* @throws {RequiredError}
|
|
54
|
+
* @memberof SubscriptionsApiInterface
|
|
55
|
+
*/
|
|
56
|
+
changeTenantSubscriptionRaw(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
|
|
57
|
+
/**
|
|
58
|
+
* 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.
|
|
59
|
+
* Change Tenant Subscription Handler
|
|
60
|
+
*/
|
|
61
|
+
changeTenantSubscription(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
|
|
62
|
+
/**
|
|
63
|
+
* Creates request options for getTenantSubscription without sending the request
|
|
64
|
+
* @param {string} tenantId
|
|
65
|
+
* @param {string} [authorization]
|
|
66
|
+
* @param {string} [ksUat]
|
|
67
|
+
* @throws {RequiredError}
|
|
68
|
+
* @memberof SubscriptionsApiInterface
|
|
69
|
+
*/
|
|
70
|
+
getTenantSubscriptionRequestOpts(requestParameters: GetTenantSubscriptionRequest): Promise<runtime.RequestOpts>;
|
|
71
|
+
/**
|
|
72
|
+
* Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
|
|
73
|
+
* @summary Get Tenant Subscription Handler
|
|
74
|
+
* @param {string} tenantId
|
|
75
|
+
* @param {string} [authorization]
|
|
76
|
+
* @param {string} [ksUat]
|
|
77
|
+
* @param {*} [options] Override http request option.
|
|
78
|
+
* @throws {RequiredError}
|
|
79
|
+
* @memberof SubscriptionsApiInterface
|
|
80
|
+
*/
|
|
81
|
+
getTenantSubscriptionRaw(requestParameters: GetTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionPlanResponse>>;
|
|
82
|
+
/**
|
|
83
|
+
* Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
|
|
84
|
+
* Get Tenant Subscription Handler
|
|
85
|
+
*/
|
|
86
|
+
getTenantSubscription(requestParameters: GetTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionPlanResponse>;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
*/
|
|
91
|
+
export declare class SubscriptionsApi extends runtime.BaseAPI implements SubscriptionsApiInterface {
|
|
92
|
+
/**
|
|
93
|
+
* Creates request options for changeTenantSubscription without sending the request
|
|
94
|
+
*/
|
|
95
|
+
changeTenantSubscriptionRequestOpts(requestParameters: ChangeTenantSubscriptionRequest): Promise<runtime.RequestOpts>;
|
|
96
|
+
/**
|
|
97
|
+
* 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.
|
|
98
|
+
* Change Tenant Subscription Handler
|
|
99
|
+
*/
|
|
100
|
+
changeTenantSubscriptionRaw(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
|
|
101
|
+
/**
|
|
102
|
+
* 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.
|
|
103
|
+
* Change Tenant Subscription Handler
|
|
104
|
+
*/
|
|
105
|
+
changeTenantSubscription(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
|
|
106
|
+
/**
|
|
107
|
+
* Creates request options for getTenantSubscription without sending the request
|
|
108
|
+
*/
|
|
109
|
+
getTenantSubscriptionRequestOpts(requestParameters: GetTenantSubscriptionRequest): Promise<runtime.RequestOpts>;
|
|
110
|
+
/**
|
|
111
|
+
* Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
|
|
112
|
+
* Get Tenant Subscription Handler
|
|
113
|
+
*/
|
|
114
|
+
getTenantSubscriptionRaw(requestParameters: GetTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubscriptionPlanResponse>>;
|
|
115
|
+
/**
|
|
116
|
+
* Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
|
|
117
|
+
* Get Tenant Subscription Handler
|
|
118
|
+
*/
|
|
119
|
+
getTenantSubscription(requestParameters: GetTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubscriptionPlanResponse>;
|
|
120
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { ChangeSubscriptionRequestToJSON, SubscriptionPlanResponseFromJSON, TenantResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class SubscriptionsApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for changeTenantSubscription without sending the request
|
|
31
|
+
*/
|
|
32
|
+
changeTenantSubscriptionRequestOpts(requestParameters) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['tenantId'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling changeTenantSubscription().');
|
|
36
|
+
}
|
|
37
|
+
if (requestParameters['changeSubscriptionRequest'] == null) {
|
|
38
|
+
throw new runtime.RequiredError('changeSubscriptionRequest', 'Required parameter "changeSubscriptionRequest" was null or undefined when calling changeTenantSubscription().');
|
|
39
|
+
}
|
|
40
|
+
const queryParameters = {};
|
|
41
|
+
const headerParameters = {};
|
|
42
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
43
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
44
|
+
headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
|
|
45
|
+
}
|
|
46
|
+
if (requestParameters['authorization'] != null) {
|
|
47
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
48
|
+
}
|
|
49
|
+
let urlPath = `/v1/tenants/{tenant_id}/subscriptions`;
|
|
50
|
+
urlPath = urlPath.replace(`{${"tenant_id"}}`, encodeURIComponent(String(requestParameters['tenantId'])));
|
|
51
|
+
return {
|
|
52
|
+
path: urlPath,
|
|
53
|
+
method: 'POST',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
body: ChangeSubscriptionRequestToJSON(requestParameters['changeSubscriptionRequest']),
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 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.
|
|
62
|
+
* Change Tenant Subscription Handler
|
|
63
|
+
*/
|
|
64
|
+
changeTenantSubscriptionRaw(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const requestOptions = yield this.changeTenantSubscriptionRequestOpts(requestParameters);
|
|
67
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
68
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => TenantResponseFromJSON(jsonValue));
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 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.
|
|
73
|
+
* Change Tenant Subscription Handler
|
|
74
|
+
*/
|
|
75
|
+
changeTenantSubscription(requestParameters, initOverrides) {
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
const response = yield this.changeTenantSubscriptionRaw(requestParameters, initOverrides);
|
|
78
|
+
return yield response.value();
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Creates request options for getTenantSubscription without sending the request
|
|
83
|
+
*/
|
|
84
|
+
getTenantSubscriptionRequestOpts(requestParameters) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
if (requestParameters['tenantId'] == null) {
|
|
87
|
+
throw new runtime.RequiredError('tenantId', 'Required parameter "tenantId" was null or undefined when calling getTenantSubscription().');
|
|
88
|
+
}
|
|
89
|
+
const queryParameters = {};
|
|
90
|
+
const headerParameters = {};
|
|
91
|
+
if (requestParameters['authorization'] != null) {
|
|
92
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
93
|
+
}
|
|
94
|
+
let urlPath = `/v1/tenants/{tenant_id}/subscriptions`;
|
|
95
|
+
urlPath = urlPath.replace(`{${"tenant_id"}}`, encodeURIComponent(String(requestParameters['tenantId'])));
|
|
96
|
+
return {
|
|
97
|
+
path: urlPath,
|
|
98
|
+
method: 'GET',
|
|
99
|
+
headers: headerParameters,
|
|
100
|
+
query: queryParameters,
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
|
|
106
|
+
* Get Tenant Subscription Handler
|
|
107
|
+
*/
|
|
108
|
+
getTenantSubscriptionRaw(requestParameters, initOverrides) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const requestOptions = yield this.getTenantSubscriptionRequestOpts(requestParameters);
|
|
111
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
112
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SubscriptionPlanResponseFromJSON(jsonValue));
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Read the tenant\'s current subscription plan, including private tiers. Any active member of the tenant can read. This is the only path that surfaces private (custom enterprise) plans to non-admin users — ``GET /public/subscriptions`` filters them out, but tenants on a private plan still need to see their own caps. Returns the full plan body (id, name, caps, max_seats, public flag, timestamps). Returns 404 when the user is not a member of the tenant — same response shape as a non-existent tenant so we don\'t leak existence to outsiders.
|
|
117
|
+
* Get Tenant Subscription Handler
|
|
118
|
+
*/
|
|
119
|
+
getTenantSubscription(requestParameters, initOverrides) {
|
|
120
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
+
const response = yield this.getTenantSubscriptionRaw(requestParameters, initOverrides);
|
|
122
|
+
return yield response.value();
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}
|