@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
@@ -104,6 +104,8 @@ docs/MembershipResponse.md
104
104
  docs/MessageRole.md
105
105
  docs/MeteredQuotaStatus.md
106
106
  docs/NonFilesystemReferenceType.md
107
+ docs/OnboardingCompanyRequest.md
108
+ docs/OnboardingProfileRequest.md
107
109
  docs/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.md
108
110
  docs/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.md
109
111
  docs/PaginatedResponseDocumentResponse.md
@@ -161,6 +163,7 @@ docs/StepInput.md
161
163
  docs/StepKind.md
162
164
  docs/StepOutput.md
163
165
  docs/SubmitFeedbackRequest.md
166
+ docs/SubmitSubscriptionResponse.md
164
167
  docs/SubscriptionPlanResponse.md
165
168
  docs/SubscriptionsApi.md
166
169
  docs/SubtreeChunkGroup.md
@@ -342,6 +345,8 @@ src/models/MembershipResponse.ts
342
345
  src/models/MessageRole.ts
343
346
  src/models/MeteredQuotaStatus.ts
344
347
  src/models/NonFilesystemReferenceType.ts
348
+ src/models/OnboardingCompanyRequest.ts
349
+ src/models/OnboardingProfileRequest.ts
345
350
  src/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.ts
346
351
  src/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.ts
347
352
  src/models/PaginatedResponseDocumentResponse.ts
@@ -396,6 +401,7 @@ src/models/StepInput.ts
396
401
  src/models/StepKind.ts
397
402
  src/models/StepOutput.ts
398
403
  src/models/SubmitFeedbackRequest.ts
404
+ src/models/SubmitSubscriptionResponse.ts
399
405
  src/models/SubscriptionPlanResponse.ts
400
406
  src/models/SubtreeChunkGroup.ts
401
407
  src/models/SubtreeChunksResponse.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @knowledge-stack/ksapi@1.80.0
1
+ # @knowledge-stack/ksapi@1.81.0
2
2
 
3
3
  A TypeScript SDK client for the localhost API.
4
4
 
@@ -180,7 +180,10 @@ All URIs are relative to *http://localhost:8000*
180
180
  *UserPermissionsApi* | [**listUserPermissions**](docs/UserPermissionsApi.md#listuserpermissions) | **GET** /v1/user-permissions | List User Permissions Handler
181
181
  *UserPermissionsApi* | [**updateUserPermission**](docs/UserPermissionsApi.md#updateuserpermission) | **PATCH** /v1/user-permissions/{permission_id} | Update User Permission Handler
182
182
  *UsersApi* | [**getMe**](docs/UsersApi.md#getme) | **GET** /v1/users/me | Get Me Handler
183
+ *UsersApi* | [**skipOnboarding**](docs/UsersApi.md#skiponboarding) | **POST** /v1/users/me/onboarding/skip | Skip Onboarding Handler
183
184
  *UsersApi* | [**updateMe**](docs/UsersApi.md#updateme) | **PATCH** /v1/users | Update Me Handler
185
+ *UsersApi* | [**updateOnboardingCompany**](docs/UsersApi.md#updateonboardingcompany) | **PATCH** /v1/users/me/onboarding/company | Update Onboarding Company Handler
186
+ *UsersApi* | [**updateOnboardingProfile**](docs/UsersApi.md#updateonboardingprofile) | **PATCH** /v1/users/me/onboarding/profile | Update Onboarding Profile Handler
184
187
  *WorkflowDefinitionsApi* | [**createWorkflowDefinition**](docs/WorkflowDefinitionsApi.md#createworkflowdefinitionoperation) | **POST** /v1/workflow-definitions | Create Workflow Definition Handler
185
188
  *WorkflowDefinitionsApi* | [**deleteWorkflowDefinition**](docs/WorkflowDefinitionsApi.md#deleteworkflowdefinition) | **DELETE** /v1/workflow-definitions/{definition_id} | Delete Workflow Definition Handler
186
189
  *WorkflowDefinitionsApi* | [**getWorkflowDefinition**](docs/WorkflowDefinitionsApi.md#getworkflowdefinition) | **GET** /v1/workflow-definitions/{definition_id} | Get Workflow Definition Handler
@@ -290,6 +293,8 @@ All URIs are relative to *http://localhost:8000*
290
293
  - [MessageRole](docs/MessageRole.md)
291
294
  - [MeteredQuotaStatus](docs/MeteredQuotaStatus.md)
292
295
  - [NonFilesystemReferenceType](docs/NonFilesystemReferenceType.md)
296
+ - [OnboardingCompanyRequest](docs/OnboardingCompanyRequest.md)
297
+ - [OnboardingProfileRequest](docs/OnboardingProfileRequest.md)
293
298
  - [PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator](docs/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.md)
294
299
  - [PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator](docs/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.md)
295
300
  - [PaginatedResponseDocumentResponse](docs/PaginatedResponseDocumentResponse.md)
@@ -344,6 +349,7 @@ All URIs are relative to *http://localhost:8000*
344
349
  - [StepKind](docs/StepKind.md)
345
350
  - [StepOutput](docs/StepOutput.md)
346
351
  - [SubmitFeedbackRequest](docs/SubmitFeedbackRequest.md)
352
+ - [SubmitSubscriptionResponse](docs/SubmitSubscriptionResponse.md)
347
353
  - [SubscriptionPlanResponse](docs/SubscriptionPlanResponse.md)
348
354
  - [SubtreeChunkGroup](docs/SubtreeChunkGroup.md)
349
355
  - [SubtreeChunksResponse](docs/SubtreeChunksResponse.md)
@@ -408,7 +414,7 @@ and is automatically generated by the
408
414
  [OpenAPI Generator](https://openapi-generator.tech) project:
409
415
 
410
416
  - API version: `0.1.0`
411
- - Package version: `1.80.0`
417
+ - Package version: `1.81.0`
412
418
  - Generator version: `7.21.0`
413
419
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
414
420
 
@@ -38,7 +38,7 @@ export interface AgentApiInterface {
38
38
  */
39
39
  agentAskRequestOpts(requestParameters: AgentAskRequest): Promise<runtime.RequestOpts>;
40
40
  /**
41
- * 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.
41
+ * 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.
42
42
  * @summary Agent Ask Handler
43
43
  * @param {AskRequest} askRequest
44
44
  * @param {string} [authorization]
@@ -49,7 +49,7 @@ export interface AgentApiInterface {
49
49
  */
50
50
  agentAskRaw(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AskResponse>>;
51
51
  /**
52
- * 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.
52
+ * 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.
53
53
  * Agent Ask Handler
54
54
  */
55
55
  agentAsk(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AskResponse>;
@@ -88,12 +88,12 @@ export declare class AgentApi extends runtime.BaseAPI implements AgentApiInterfa
88
88
  */
89
89
  agentAskRequestOpts(requestParameters: AgentAskRequest): Promise<runtime.RequestOpts>;
90
90
  /**
91
- * 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.
91
+ * 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.
92
92
  * Agent Ask Handler
93
93
  */
94
94
  agentAskRaw(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AskResponse>>;
95
95
  /**
96
- * 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.
96
+ * 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.
97
97
  * Agent Ask Handler
98
98
  */
99
99
  agentAsk(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AskResponse>;
@@ -87,7 +87,7 @@ class AgentApi extends runtime.BaseAPI {
87
87
  });
88
88
  }
89
89
  /**
90
- * 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.
90
+ * 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.
91
91
  * Agent Ask Handler
92
92
  */
93
93
  agentAskRaw(requestParameters, initOverrides) {
@@ -98,7 +98,7 @@ class AgentApi extends runtime.BaseAPI {
98
98
  });
99
99
  }
100
100
  /**
101
- * 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.
101
+ * 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.
102
102
  * Agent Ask Handler
103
103
  */
104
104
  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
  */
@@ -94,18 +94,18 @@ class SubscriptionsApi extends runtime.BaseAPI {
94
94
  });
95
95
  }
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
100
  changeTenantSubscriptionRaw(requestParameters, initOverrides) {
101
101
  return __awaiter(this, void 0, void 0, function* () {
102
102
  const requestOptions = yield this.changeTenantSubscriptionRequestOpts(requestParameters);
103
103
  const response = yield this.request(requestOptions, initOverrides);
104
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.TenantResponseFromJSON)(jsonValue));
104
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SubmitSubscriptionResponseFromJSON)(jsonValue));
105
105
  });
106
106
  }
107
107
  /**
108
- * 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.
108
+ * 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.
109
109
  * Change Tenant Subscription Handler
110
110
  */
111
111
  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
  }
@@ -102,6 +102,46 @@ class UsersApi extends runtime.BaseAPI {
102
102
  return yield response.value();
103
103
  });
104
104
  }
105
+ /**
106
+ * Creates request options for skipOnboarding without sending the request
107
+ */
108
+ skipOnboardingRequestOpts(requestParameters) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ const queryParameters = {};
111
+ const headerParameters = {};
112
+ if (requestParameters['authorization'] != null) {
113
+ headerParameters['authorization'] = String(requestParameters['authorization']);
114
+ }
115
+ let urlPath = `/v1/users/me/onboarding/skip`;
116
+ return {
117
+ path: urlPath,
118
+ method: 'POST',
119
+ headers: headerParameters,
120
+ query: queryParameters,
121
+ };
122
+ });
123
+ }
124
+ /**
125
+ * 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).
126
+ * Skip Onboarding Handler
127
+ */
128
+ skipOnboardingRaw(requestParameters, initOverrides) {
129
+ return __awaiter(this, void 0, void 0, function* () {
130
+ const requestOptions = yield this.skipOnboardingRequestOpts(requestParameters);
131
+ const response = yield this.request(requestOptions, initOverrides);
132
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserResponseFromJSON)(jsonValue));
133
+ });
134
+ }
135
+ /**
136
+ * 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).
137
+ * Skip Onboarding Handler
138
+ */
139
+ skipOnboarding() {
140
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
141
+ const response = yield this.skipOnboardingRaw(requestParameters, initOverrides);
142
+ return yield response.value();
143
+ });
144
+ }
105
145
  /**
106
146
  * Creates request options for updateMe without sending the request
107
147
  */
@@ -147,5 +187,95 @@ class UsersApi extends runtime.BaseAPI {
147
187
  return yield response.value();
148
188
  });
149
189
  }
190
+ /**
191
+ * Creates request options for updateOnboardingCompany without sending the request
192
+ */
193
+ updateOnboardingCompanyRequestOpts(requestParameters) {
194
+ return __awaiter(this, void 0, void 0, function* () {
195
+ if (requestParameters['onboardingCompanyRequest'] == null) {
196
+ throw new runtime.RequiredError('onboardingCompanyRequest', 'Required parameter "onboardingCompanyRequest" was null or undefined when calling updateOnboardingCompany().');
197
+ }
198
+ const queryParameters = {};
199
+ const headerParameters = {};
200
+ headerParameters['Content-Type'] = 'application/json';
201
+ if (requestParameters['authorization'] != null) {
202
+ headerParameters['authorization'] = String(requestParameters['authorization']);
203
+ }
204
+ let urlPath = `/v1/users/me/onboarding/company`;
205
+ return {
206
+ path: urlPath,
207
+ method: 'PATCH',
208
+ headers: headerParameters,
209
+ query: queryParameters,
210
+ body: (0, index_1.OnboardingCompanyRequestToJSON)(requestParameters['onboardingCompanyRequest']),
211
+ };
212
+ });
213
+ }
214
+ /**
215
+ * 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}.
216
+ * Update Onboarding Company Handler
217
+ */
218
+ updateOnboardingCompanyRaw(requestParameters, initOverrides) {
219
+ return __awaiter(this, void 0, void 0, function* () {
220
+ const requestOptions = yield this.updateOnboardingCompanyRequestOpts(requestParameters);
221
+ const response = yield this.request(requestOptions, initOverrides);
222
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserResponseFromJSON)(jsonValue));
223
+ });
224
+ }
225
+ /**
226
+ * 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}.
227
+ * Update Onboarding Company Handler
228
+ */
229
+ updateOnboardingCompany(requestParameters, initOverrides) {
230
+ return __awaiter(this, void 0, void 0, function* () {
231
+ const response = yield this.updateOnboardingCompanyRaw(requestParameters, initOverrides);
232
+ return yield response.value();
233
+ });
234
+ }
235
+ /**
236
+ * Creates request options for updateOnboardingProfile without sending the request
237
+ */
238
+ updateOnboardingProfileRequestOpts(requestParameters) {
239
+ return __awaiter(this, void 0, void 0, function* () {
240
+ if (requestParameters['onboardingProfileRequest'] == null) {
241
+ throw new runtime.RequiredError('onboardingProfileRequest', 'Required parameter "onboardingProfileRequest" was null or undefined when calling updateOnboardingProfile().');
242
+ }
243
+ const queryParameters = {};
244
+ const headerParameters = {};
245
+ headerParameters['Content-Type'] = 'application/json';
246
+ if (requestParameters['authorization'] != null) {
247
+ headerParameters['authorization'] = String(requestParameters['authorization']);
248
+ }
249
+ let urlPath = `/v1/users/me/onboarding/profile`;
250
+ return {
251
+ path: urlPath,
252
+ method: 'PATCH',
253
+ headers: headerParameters,
254
+ query: queryParameters,
255
+ body: (0, index_1.OnboardingProfileRequestToJSON)(requestParameters['onboardingProfileRequest']),
256
+ };
257
+ });
258
+ }
259
+ /**
260
+ * 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).
261
+ * Update Onboarding Profile Handler
262
+ */
263
+ updateOnboardingProfileRaw(requestParameters, initOverrides) {
264
+ return __awaiter(this, void 0, void 0, function* () {
265
+ const requestOptions = yield this.updateOnboardingProfileRequestOpts(requestParameters);
266
+ const response = yield this.request(requestOptions, initOverrides);
267
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.UserResponseFromJSON)(jsonValue));
268
+ });
269
+ }
270
+ /**
271
+ * 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).
272
+ * Update Onboarding Profile Handler
273
+ */
274
+ updateOnboardingProfile(requestParameters, initOverrides) {
275
+ return __awaiter(this, void 0, void 0, function* () {
276
+ const response = yield this.updateOnboardingProfileRaw(requestParameters, initOverrides);
277
+ return yield response.value();
278
+ });
279
+ }
150
280
  }
151
281
  exports.UsersApi = UsersApi;
@@ -38,7 +38,7 @@ export interface AgentApiInterface {
38
38
  */
39
39
  agentAskRequestOpts(requestParameters: AgentAskRequest): Promise<runtime.RequestOpts>;
40
40
  /**
41
- * 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.
41
+ * 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.
42
42
  * @summary Agent Ask Handler
43
43
  * @param {AskRequest} askRequest
44
44
  * @param {string} [authorization]
@@ -49,7 +49,7 @@ export interface AgentApiInterface {
49
49
  */
50
50
  agentAskRaw(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AskResponse>>;
51
51
  /**
52
- * 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.
52
+ * 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.
53
53
  * Agent Ask Handler
54
54
  */
55
55
  agentAsk(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AskResponse>;
@@ -88,12 +88,12 @@ export declare class AgentApi extends runtime.BaseAPI implements AgentApiInterfa
88
88
  */
89
89
  agentAskRequestOpts(requestParameters: AgentAskRequest): Promise<runtime.RequestOpts>;
90
90
  /**
91
- * 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.
91
+ * 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.
92
92
  * Agent Ask Handler
93
93
  */
94
94
  agentAskRaw(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AskResponse>>;
95
95
  /**
96
- * 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.
96
+ * 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.
97
97
  * Agent Ask Handler
98
98
  */
99
99
  agentAsk(requestParameters: AgentAskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AskResponse>;