@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
@@ -51,7 +51,7 @@ export class AgentApi extends runtime.BaseAPI {
51
51
  });
52
52
  }
53
53
  /**
54
- * 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.
54
+ * 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.
55
55
  * Agent Ask Handler
56
56
  */
57
57
  agentAskRaw(requestParameters, initOverrides) {
@@ -62,7 +62,7 @@ export class AgentApi extends runtime.BaseAPI {
62
62
  });
63
63
  }
64
64
  /**
65
- * 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.
65
+ * 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.
66
66
  * Agent Ask Handler
67
67
  */
68
68
  agentAsk(requestParameters, initOverrides) {
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ChangeSubscriptionRequest, SubscriptionPlanResponse, TenantResponse } from '../models/index';
13
+ import type { ChangeSubscriptionRequest, SubmitSubscriptionResponse, SubscriptionPlanResponse } from '../models/index';
14
14
  export interface ChangeTenantSubscriptionRequest {
15
15
  tenantId: string;
16
16
  changeSubscriptionRequest: ChangeSubscriptionRequest;
@@ -42,7 +42,7 @@ export interface SubscriptionsApiInterface {
42
42
  */
43
43
  changeTenantSubscriptionRequestOpts(requestParameters: ChangeTenantSubscriptionRequest): Promise<runtime.RequestOpts>;
44
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.
45
+ * 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.
46
46
  * @summary Change Tenant Subscription Handler
47
47
  * @param {string} tenantId
48
48
  * @param {ChangeSubscriptionRequest} changeSubscriptionRequest
@@ -53,12 +53,12 @@ export interface SubscriptionsApiInterface {
53
53
  * @throws {RequiredError}
54
54
  * @memberof SubscriptionsApiInterface
55
55
  */
56
- changeTenantSubscriptionRaw(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
56
+ changeTenantSubscriptionRaw(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubmitSubscriptionResponse>>;
57
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.
58
+ * 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.
59
59
  * Change Tenant Subscription Handler
60
60
  */
61
- changeTenantSubscription(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
61
+ changeTenantSubscription(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubmitSubscriptionResponse>;
62
62
  /**
63
63
  * Creates request options for getTenantSubscription without sending the request
64
64
  * @param {string} tenantId
@@ -94,15 +94,15 @@ export declare class SubscriptionsApi extends runtime.BaseAPI implements Subscri
94
94
  */
95
95
  changeTenantSubscriptionRequestOpts(requestParameters: ChangeTenantSubscriptionRequest): Promise<runtime.RequestOpts>;
96
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.
97
+ * 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.
98
98
  * Change Tenant Subscription Handler
99
99
  */
100
- changeTenantSubscriptionRaw(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TenantResponse>>;
100
+ changeTenantSubscriptionRaw(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SubmitSubscriptionResponse>>;
101
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.
102
+ * 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.
103
103
  * Change Tenant Subscription Handler
104
104
  */
105
- changeTenantSubscription(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TenantResponse>;
105
+ changeTenantSubscription(requestParameters: ChangeTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SubmitSubscriptionResponse>;
106
106
  /**
107
107
  * Creates request options for getTenantSubscription without sending the request
108
108
  */
@@ -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 { ChangeSubscriptionRequestToJSON, SubscriptionPlanResponseFromJSON, TenantResponseFromJSON, } from '../models/index';
24
+ import { ChangeSubscriptionRequestToJSON, SubmitSubscriptionResponseFromJSON, SubscriptionPlanResponseFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -58,18 +58,18 @@ export class SubscriptionsApi extends runtime.BaseAPI {
58
58
  });
59
59
  }
60
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.
61
+ * 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.
62
62
  * Change Tenant Subscription Handler
63
63
  */
64
64
  changeTenantSubscriptionRaw(requestParameters, initOverrides) {
65
65
  return __awaiter(this, void 0, void 0, function* () {
66
66
  const requestOptions = yield this.changeTenantSubscriptionRequestOpts(requestParameters);
67
67
  const response = yield this.request(requestOptions, initOverrides);
68
- return new runtime.JSONApiResponse(response, (jsonValue) => TenantResponseFromJSON(jsonValue));
68
+ return new runtime.JSONApiResponse(response, (jsonValue) => SubmitSubscriptionResponseFromJSON(jsonValue));
69
69
  });
70
70
  }
71
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.
72
+ * 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.
73
73
  * Change Tenant Subscription Handler
74
74
  */
75
75
  changeTenantSubscription(requestParameters, initOverrides) {
@@ -10,16 +10,30 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { UpdateUserRequest, UserResponse } from '../models/index';
13
+ import type { OnboardingCompanyRequest, OnboardingProfileRequest, UpdateUserRequest, UserResponse } from '../models/index';
14
14
  export interface GetMeRequest {
15
15
  authorization?: string | null;
16
16
  ksUat?: string | null;
17
17
  }
18
+ export interface SkipOnboardingRequest {
19
+ authorization?: string | null;
20
+ ksUat?: string | null;
21
+ }
18
22
  export interface UpdateMeRequest {
19
23
  updateUserRequest: UpdateUserRequest;
20
24
  authorization?: string | null;
21
25
  ksUat?: string | null;
22
26
  }
27
+ export interface UpdateOnboardingCompanyRequest {
28
+ onboardingCompanyRequest: OnboardingCompanyRequest;
29
+ authorization?: string | null;
30
+ ksUat?: string | null;
31
+ }
32
+ export interface UpdateOnboardingProfileRequest {
33
+ onboardingProfileRequest: OnboardingProfileRequest;
34
+ authorization?: string | null;
35
+ ksUat?: string | null;
36
+ }
23
37
  /**
24
38
  * UsersApi - interface
25
39
  *
@@ -50,6 +64,29 @@ export interface UsersApiInterface {
50
64
  * Get Me Handler
51
65
  */
52
66
  getMe(requestParameters: GetMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
67
+ /**
68
+ * Creates request options for skipOnboarding without sending the request
69
+ * @param {string} [authorization]
70
+ * @param {string} [ksUat]
71
+ * @throws {RequiredError}
72
+ * @memberof UsersApiInterface
73
+ */
74
+ skipOnboardingRequestOpts(requestParameters: SkipOnboardingRequest): Promise<runtime.RequestOpts>;
75
+ /**
76
+ * Mark onboarding complete without writing any profile/company fields. Idempotent — calling this after onboarding is already complete returns the current state unchanged (the CRUD only stamps the timestamp when it is NULL).
77
+ * @summary Skip Onboarding Handler
78
+ * @param {string} [authorization]
79
+ * @param {string} [ksUat]
80
+ * @param {*} [options] Override http request option.
81
+ * @throws {RequiredError}
82
+ * @memberof UsersApiInterface
83
+ */
84
+ skipOnboardingRaw(requestParameters: SkipOnboardingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
85
+ /**
86
+ * Mark onboarding complete without writing any profile/company fields. Idempotent — calling this after onboarding is already complete returns the current state unchanged (the CRUD only stamps the timestamp when it is NULL).
87
+ * Skip Onboarding Handler
88
+ */
89
+ skipOnboarding(requestParameters: SkipOnboardingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
53
90
  /**
54
91
  * Creates request options for updateMe without sending the request
55
92
  * @param {UpdateUserRequest} updateUserRequest
@@ -75,6 +112,56 @@ export interface UsersApiInterface {
75
112
  * Update Me Handler
76
113
  */
77
114
  updateMe(requestParameters: UpdateMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
115
+ /**
116
+ * Creates request options for updateOnboardingCompany without sending the request
117
+ * @param {OnboardingCompanyRequest} onboardingCompanyRequest
118
+ * @param {string} [authorization]
119
+ * @param {string} [ksUat]
120
+ * @throws {RequiredError}
121
+ * @memberof UsersApiInterface
122
+ */
123
+ updateOnboardingCompanyRequestOpts(requestParameters: UpdateOnboardingCompanyRequest): Promise<runtime.RequestOpts>;
124
+ /**
125
+ * Step 1 of onboarding: tenant-wide company info. Writes ``industry`` and ``description`` into the current tenant\'s settings JSONB. Restricted to OWNER and ADMIN — invited USERs see a pre-filled, read-only step on the frontend instead. Does not mark onboarding complete; the user finishes via the profile step. Re-running while the wizard is still open overwrites prior values; once onboarding has been completed/skipped, this endpoint returns 409. Post-onboarding edits go through PATCH /v1/tenants/{id}.
126
+ * @summary Update Onboarding Company Handler
127
+ * @param {OnboardingCompanyRequest} onboardingCompanyRequest
128
+ * @param {string} [authorization]
129
+ * @param {string} [ksUat]
130
+ * @param {*} [options] Override http request option.
131
+ * @throws {RequiredError}
132
+ * @memberof UsersApiInterface
133
+ */
134
+ updateOnboardingCompanyRaw(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
135
+ /**
136
+ * Step 1 of onboarding: tenant-wide company info. Writes ``industry`` and ``description`` into the current tenant\'s settings JSONB. Restricted to OWNER and ADMIN — invited USERs see a pre-filled, read-only step on the frontend instead. Does not mark onboarding complete; the user finishes via the profile step. Re-running while the wizard is still open overwrites prior values; once onboarding has been completed/skipped, this endpoint returns 409. Post-onboarding edits go through PATCH /v1/tenants/{id}.
137
+ * Update Onboarding Company Handler
138
+ */
139
+ updateOnboardingCompany(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
140
+ /**
141
+ * Creates request options for updateOnboardingProfile without sending the request
142
+ * @param {OnboardingProfileRequest} onboardingProfileRequest
143
+ * @param {string} [authorization]
144
+ * @param {string} [ksUat]
145
+ * @throws {RequiredError}
146
+ * @memberof UsersApiInterface
147
+ */
148
+ updateOnboardingProfileRequestOpts(requestParameters: UpdateOnboardingProfileRequest): Promise<runtime.RequestOpts>;
149
+ /**
150
+ * Step 2 (final) of onboarding: per-user profile for the current tenant. Writes name to the User row (global) and job_title to the TenantUser row (per-tenant), then stamps ``onboarding_completed_at`` on the membership. Returns 409 if onboarding has already been completed or skipped — post-onboarding edits go through PATCH /v1/users (name) or a future per-membership profile endpoint (job_title).
151
+ * @summary Update Onboarding Profile Handler
152
+ * @param {OnboardingProfileRequest} onboardingProfileRequest
153
+ * @param {string} [authorization]
154
+ * @param {string} [ksUat]
155
+ * @param {*} [options] Override http request option.
156
+ * @throws {RequiredError}
157
+ * @memberof UsersApiInterface
158
+ */
159
+ updateOnboardingProfileRaw(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
160
+ /**
161
+ * Step 2 (final) of onboarding: per-user profile for the current tenant. Writes name to the User row (global) and job_title to the TenantUser row (per-tenant), then stamps ``onboarding_completed_at`` on the membership. Returns 409 if onboarding has already been completed or skipped — post-onboarding edits go through PATCH /v1/users (name) or a future per-membership profile endpoint (job_title).
162
+ * Update Onboarding Profile Handler
163
+ */
164
+ updateOnboardingProfile(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
78
165
  }
79
166
  /**
80
167
  *
@@ -94,6 +181,20 @@ export declare class UsersApi extends runtime.BaseAPI implements UsersApiInterfa
94
181
  * Get Me Handler
95
182
  */
96
183
  getMe(requestParameters?: GetMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
184
+ /**
185
+ * Creates request options for skipOnboarding without sending the request
186
+ */
187
+ skipOnboardingRequestOpts(requestParameters: SkipOnboardingRequest): Promise<runtime.RequestOpts>;
188
+ /**
189
+ * Mark onboarding complete without writing any profile/company fields. Idempotent — calling this after onboarding is already complete returns the current state unchanged (the CRUD only stamps the timestamp when it is NULL).
190
+ * Skip Onboarding Handler
191
+ */
192
+ skipOnboardingRaw(requestParameters: SkipOnboardingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
193
+ /**
194
+ * Mark onboarding complete without writing any profile/company fields. Idempotent — calling this after onboarding is already complete returns the current state unchanged (the CRUD only stamps the timestamp when it is NULL).
195
+ * Skip Onboarding Handler
196
+ */
197
+ skipOnboarding(requestParameters?: SkipOnboardingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
97
198
  /**
98
199
  * Creates request options for updateMe without sending the request
99
200
  */
@@ -108,4 +209,32 @@ export declare class UsersApi extends runtime.BaseAPI implements UsersApiInterfa
108
209
  * Update Me Handler
109
210
  */
110
211
  updateMe(requestParameters: UpdateMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
212
+ /**
213
+ * Creates request options for updateOnboardingCompany without sending the request
214
+ */
215
+ updateOnboardingCompanyRequestOpts(requestParameters: UpdateOnboardingCompanyRequest): Promise<runtime.RequestOpts>;
216
+ /**
217
+ * Step 1 of onboarding: tenant-wide company info. Writes ``industry`` and ``description`` into the current tenant\'s settings JSONB. Restricted to OWNER and ADMIN — invited USERs see a pre-filled, read-only step on the frontend instead. Does not mark onboarding complete; the user finishes via the profile step. Re-running while the wizard is still open overwrites prior values; once onboarding has been completed/skipped, this endpoint returns 409. Post-onboarding edits go through PATCH /v1/tenants/{id}.
218
+ * Update Onboarding Company Handler
219
+ */
220
+ updateOnboardingCompanyRaw(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
221
+ /**
222
+ * Step 1 of onboarding: tenant-wide company info. Writes ``industry`` and ``description`` into the current tenant\'s settings JSONB. Restricted to OWNER and ADMIN — invited USERs see a pre-filled, read-only step on the frontend instead. Does not mark onboarding complete; the user finishes via the profile step. Re-running while the wizard is still open overwrites prior values; once onboarding has been completed/skipped, this endpoint returns 409. Post-onboarding edits go through PATCH /v1/tenants/{id}.
223
+ * Update Onboarding Company Handler
224
+ */
225
+ updateOnboardingCompany(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
226
+ /**
227
+ * Creates request options for updateOnboardingProfile without sending the request
228
+ */
229
+ updateOnboardingProfileRequestOpts(requestParameters: UpdateOnboardingProfileRequest): Promise<runtime.RequestOpts>;
230
+ /**
231
+ * Step 2 (final) of onboarding: per-user profile for the current tenant. Writes name to the User row (global) and job_title to the TenantUser row (per-tenant), then stamps ``onboarding_completed_at`` on the membership. Returns 409 if onboarding has already been completed or skipped — post-onboarding edits go through PATCH /v1/users (name) or a future per-membership profile endpoint (job_title).
232
+ * Update Onboarding Profile Handler
233
+ */
234
+ updateOnboardingProfileRaw(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
235
+ /**
236
+ * Step 2 (final) of onboarding: per-user profile for the current tenant. Writes name to the User row (global) and job_title to the TenantUser row (per-tenant), then stamps ``onboarding_completed_at`` on the membership. Returns 409 if onboarding has already been completed or skipped — post-onboarding edits go through PATCH /v1/users (name) or a future per-membership profile endpoint (job_title).
237
+ * Update Onboarding Profile Handler
238
+ */
239
+ updateOnboardingProfile(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
111
240
  }
@@ -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 { UpdateUserRequestToJSON, UserResponseFromJSON, } from '../models/index';
24
+ import { OnboardingCompanyRequestToJSON, OnboardingProfileRequestToJSON, UpdateUserRequestToJSON, UserResponseFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
@@ -66,6 +66,46 @@ export class UsersApi extends runtime.BaseAPI {
66
66
  return yield response.value();
67
67
  });
68
68
  }
69
+ /**
70
+ * Creates request options for skipOnboarding without sending the request
71
+ */
72
+ skipOnboardingRequestOpts(requestParameters) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const queryParameters = {};
75
+ const headerParameters = {};
76
+ if (requestParameters['authorization'] != null) {
77
+ headerParameters['authorization'] = String(requestParameters['authorization']);
78
+ }
79
+ let urlPath = `/v1/users/me/onboarding/skip`;
80
+ return {
81
+ path: urlPath,
82
+ method: 'POST',
83
+ headers: headerParameters,
84
+ query: queryParameters,
85
+ };
86
+ });
87
+ }
88
+ /**
89
+ * Mark onboarding complete without writing any profile/company fields. Idempotent — calling this after onboarding is already complete returns the current state unchanged (the CRUD only stamps the timestamp when it is NULL).
90
+ * Skip Onboarding Handler
91
+ */
92
+ skipOnboardingRaw(requestParameters, initOverrides) {
93
+ return __awaiter(this, void 0, void 0, function* () {
94
+ const requestOptions = yield this.skipOnboardingRequestOpts(requestParameters);
95
+ const response = yield this.request(requestOptions, initOverrides);
96
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
97
+ });
98
+ }
99
+ /**
100
+ * Mark onboarding complete without writing any profile/company fields. Idempotent — calling this after onboarding is already complete returns the current state unchanged (the CRUD only stamps the timestamp when it is NULL).
101
+ * Skip Onboarding Handler
102
+ */
103
+ skipOnboarding() {
104
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
105
+ const response = yield this.skipOnboardingRaw(requestParameters, initOverrides);
106
+ return yield response.value();
107
+ });
108
+ }
69
109
  /**
70
110
  * Creates request options for updateMe without sending the request
71
111
  */
@@ -111,4 +151,94 @@ export class UsersApi extends runtime.BaseAPI {
111
151
  return yield response.value();
112
152
  });
113
153
  }
154
+ /**
155
+ * Creates request options for updateOnboardingCompany without sending the request
156
+ */
157
+ updateOnboardingCompanyRequestOpts(requestParameters) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ if (requestParameters['onboardingCompanyRequest'] == null) {
160
+ throw new runtime.RequiredError('onboardingCompanyRequest', 'Required parameter "onboardingCompanyRequest" was null or undefined when calling updateOnboardingCompany().');
161
+ }
162
+ const queryParameters = {};
163
+ const headerParameters = {};
164
+ headerParameters['Content-Type'] = 'application/json';
165
+ if (requestParameters['authorization'] != null) {
166
+ headerParameters['authorization'] = String(requestParameters['authorization']);
167
+ }
168
+ let urlPath = `/v1/users/me/onboarding/company`;
169
+ return {
170
+ path: urlPath,
171
+ method: 'PATCH',
172
+ headers: headerParameters,
173
+ query: queryParameters,
174
+ body: OnboardingCompanyRequestToJSON(requestParameters['onboardingCompanyRequest']),
175
+ };
176
+ });
177
+ }
178
+ /**
179
+ * Step 1 of onboarding: tenant-wide company info. Writes ``industry`` and ``description`` into the current tenant\'s settings JSONB. Restricted to OWNER and ADMIN — invited USERs see a pre-filled, read-only step on the frontend instead. Does not mark onboarding complete; the user finishes via the profile step. Re-running while the wizard is still open overwrites prior values; once onboarding has been completed/skipped, this endpoint returns 409. Post-onboarding edits go through PATCH /v1/tenants/{id}.
180
+ * Update Onboarding Company Handler
181
+ */
182
+ updateOnboardingCompanyRaw(requestParameters, initOverrides) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ const requestOptions = yield this.updateOnboardingCompanyRequestOpts(requestParameters);
185
+ const response = yield this.request(requestOptions, initOverrides);
186
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
187
+ });
188
+ }
189
+ /**
190
+ * Step 1 of onboarding: tenant-wide company info. Writes ``industry`` and ``description`` into the current tenant\'s settings JSONB. Restricted to OWNER and ADMIN — invited USERs see a pre-filled, read-only step on the frontend instead. Does not mark onboarding complete; the user finishes via the profile step. Re-running while the wizard is still open overwrites prior values; once onboarding has been completed/skipped, this endpoint returns 409. Post-onboarding edits go through PATCH /v1/tenants/{id}.
191
+ * Update Onboarding Company Handler
192
+ */
193
+ updateOnboardingCompany(requestParameters, initOverrides) {
194
+ return __awaiter(this, void 0, void 0, function* () {
195
+ const response = yield this.updateOnboardingCompanyRaw(requestParameters, initOverrides);
196
+ return yield response.value();
197
+ });
198
+ }
199
+ /**
200
+ * Creates request options for updateOnboardingProfile without sending the request
201
+ */
202
+ updateOnboardingProfileRequestOpts(requestParameters) {
203
+ return __awaiter(this, void 0, void 0, function* () {
204
+ if (requestParameters['onboardingProfileRequest'] == null) {
205
+ throw new runtime.RequiredError('onboardingProfileRequest', 'Required parameter "onboardingProfileRequest" was null or undefined when calling updateOnboardingProfile().');
206
+ }
207
+ const queryParameters = {};
208
+ const headerParameters = {};
209
+ headerParameters['Content-Type'] = 'application/json';
210
+ if (requestParameters['authorization'] != null) {
211
+ headerParameters['authorization'] = String(requestParameters['authorization']);
212
+ }
213
+ let urlPath = `/v1/users/me/onboarding/profile`;
214
+ return {
215
+ path: urlPath,
216
+ method: 'PATCH',
217
+ headers: headerParameters,
218
+ query: queryParameters,
219
+ body: OnboardingProfileRequestToJSON(requestParameters['onboardingProfileRequest']),
220
+ };
221
+ });
222
+ }
223
+ /**
224
+ * Step 2 (final) of onboarding: per-user profile for the current tenant. Writes name to the User row (global) and job_title to the TenantUser row (per-tenant), then stamps ``onboarding_completed_at`` on the membership. Returns 409 if onboarding has already been completed or skipped — post-onboarding edits go through PATCH /v1/users (name) or a future per-membership profile endpoint (job_title).
225
+ * Update Onboarding Profile Handler
226
+ */
227
+ updateOnboardingProfileRaw(requestParameters, initOverrides) {
228
+ return __awaiter(this, void 0, void 0, function* () {
229
+ const requestOptions = yield this.updateOnboardingProfileRequestOpts(requestParameters);
230
+ const response = yield this.request(requestOptions, initOverrides);
231
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
232
+ });
233
+ }
234
+ /**
235
+ * Step 2 (final) of onboarding: per-user profile for the current tenant. Writes name to the User row (global) and job_title to the TenantUser row (per-tenant), then stamps ``onboarding_completed_at`` on the membership. Returns 409 if onboarding has already been completed or skipped — post-onboarding edits go through PATCH /v1/users (name) or a future per-membership profile endpoint (job_title).
236
+ * Update Onboarding Profile Handler
237
+ */
238
+ updateOnboardingProfile(requestParameters, initOverrides) {
239
+ return __awaiter(this, void 0, void 0, function* () {
240
+ const response = yield this.updateOnboardingProfileRaw(requestParameters, initOverrides);
241
+ return yield response.value();
242
+ });
243
+ }
114
244
  }
@@ -121,6 +121,12 @@ export interface DocumentResponse {
121
121
  * @memberof DocumentResponse
122
122
  */
123
123
  tags?: Array<TagResponse> | null;
124
+ /**
125
+ * Whether the current caller has write access to this document. Only populated by endpoints that compute it (e.g. folder contents).
126
+ * @type {boolean}
127
+ * @memberof DocumentResponse
128
+ */
129
+ canWrite?: boolean | null;
124
130
  }
125
131
  /**
126
132
  * @export
@@ -85,6 +85,7 @@ export function DocumentResponseFromJSONTyped(json, ignoreDiscriminator) {
85
85
  'createdAt': (new Date(json['created_at'])),
86
86
  'updatedAt': (new Date(json['updated_at'])),
87
87
  'tags': json['tags'] == null ? undefined : (json['tags'].map(TagResponseFromJSON)),
88
+ 'canWrite': json['can_write'] == null ? undefined : json['can_write'],
88
89
  };
89
90
  }
90
91
  export function DocumentResponseToJSON(json) {
@@ -112,5 +113,6 @@ export function DocumentResponseToJSONTyped(value, ignoreDiscriminator = false)
112
113
  'created_at': value['createdAt'].toISOString(),
113
114
  'updated_at': value['updatedAt'].toISOString(),
114
115
  'tags': value['tags'] == null ? undefined : (value['tags'].map(TagResponseToJSON)),
116
+ 'can_write': value['canWrite'],
115
117
  };
116
118
  }
@@ -88,6 +88,12 @@ export interface FolderResponse {
88
88
  * @memberof FolderResponse
89
89
  */
90
90
  tags?: Array<TagResponse> | null;
91
+ /**
92
+ * Whether the current caller has write access to this folder. Only populated by endpoints that compute it (e.g. folder contents).
93
+ * @type {boolean}
94
+ * @memberof FolderResponse
95
+ */
96
+ canWrite?: boolean | null;
91
97
  }
92
98
  /**
93
99
  * @export
@@ -67,6 +67,7 @@ export function FolderResponseFromJSONTyped(json, ignoreDiscriminator) {
67
67
  'createdAt': (new Date(json['created_at'])),
68
68
  'updatedAt': (new Date(json['updated_at'])),
69
69
  'tags': json['tags'] == null ? undefined : (json['tags'].map(TagResponseFromJSON)),
70
+ 'canWrite': json['can_write'] == null ? undefined : json['can_write'],
70
71
  };
71
72
  }
72
73
  export function FolderResponseToJSON(json) {
@@ -89,5 +90,6 @@ export function FolderResponseToJSONTyped(value, ignoreDiscriminator = false) {
89
90
  'created_at': value['createdAt'].toISOString(),
90
91
  'updated_at': value['updatedAt'].toISOString(),
91
92
  'tags': value['tags'] == null ? undefined : (value['tags'].map(TagResponseToJSON)),
93
+ 'can_write': value['canWrite'],
92
94
  };
93
95
  }
@@ -46,6 +46,12 @@ export interface MeteredQuotaStatus {
46
46
  * @memberof MeteredQuotaStatus
47
47
  */
48
48
  periodEnd: Date;
49
+ /**
50
+ * Persistent additional-quota balance for this metric. Unchanged by period rollover; decremented when included is exhausted, incremented on refund or top-up.
51
+ * @type {number}
52
+ * @memberof MeteredQuotaStatus
53
+ */
54
+ additionalBalance?: number;
49
55
  }
50
56
  export declare const MeteredQuotaStatusPropertyValidationAttributesMap: {
51
57
  [property: string]: {
@@ -42,6 +42,7 @@ export function MeteredQuotaStatusFromJSONTyped(json, ignoreDiscriminator) {
42
42
  'limit': json['limit'],
43
43
  'periodStart': (new Date(json['period_start'])),
44
44
  'periodEnd': (new Date(json['period_end'])),
45
+ 'additionalBalance': json['additional_balance'] == null ? undefined : json['additional_balance'],
45
46
  };
46
47
  }
47
48
  export function MeteredQuotaStatusToJSON(json) {
@@ -57,5 +58,6 @@ export function MeteredQuotaStatusToJSONTyped(value, ignoreDiscriminator = false
57
58
  'limit': value['limit'],
58
59
  'period_start': value['periodStart'].toISOString(),
59
60
  'period_end': value['periodEnd'].toISOString(),
61
+ 'additional_balance': value['additionalBalance'],
60
62
  };
61
63
  }
@@ -0,0 +1,53 @@
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 1 of onboarding — tenant-wide company info. OWNER/ADMIN only.
14
+ * @export
15
+ * @interface OnboardingCompanyRequest
16
+ */
17
+ export interface OnboardingCompanyRequest {
18
+ /**
19
+ * Brief company description (≤5000 chars)
20
+ * @type {string}
21
+ * @memberof OnboardingCompanyRequest
22
+ */
23
+ description?: string | null;
24
+ /**
25
+ * Industry / company type (free text)
26
+ * @type {string}
27
+ * @memberof OnboardingCompanyRequest
28
+ */
29
+ industry?: string | null;
30
+ }
31
+ export declare const OnboardingCompanyRequestPropertyValidationAttributesMap: {
32
+ [property: string]: {
33
+ maxLength?: number;
34
+ minLength?: number;
35
+ pattern?: string;
36
+ maximum?: number;
37
+ exclusiveMaximum?: boolean;
38
+ minimum?: number;
39
+ exclusiveMinimum?: boolean;
40
+ multipleOf?: number;
41
+ maxItems?: number;
42
+ minItems?: number;
43
+ uniqueItems?: boolean;
44
+ };
45
+ };
46
+ /**
47
+ * Check if a given object implements the OnboardingCompanyRequest interface.
48
+ */
49
+ export declare function instanceOfOnboardingCompanyRequest(value: object): value is OnboardingCompanyRequest;
50
+ export declare function OnboardingCompanyRequestFromJSON(json: any): OnboardingCompanyRequest;
51
+ export declare function OnboardingCompanyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OnboardingCompanyRequest;
52
+ export declare function OnboardingCompanyRequestToJSON(json: any): OnboardingCompanyRequest;
53
+ export declare function OnboardingCompanyRequestToJSONTyped(value?: OnboardingCompanyRequest | null, ignoreDiscriminator?: boolean): any;