lemma-sdk 0.2.38 → 0.2.41

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 (181) hide show
  1. package/README.md +15 -4
  2. package/dist/browser/lemma-client.js +339 -106
  3. package/dist/client.d.ts +2 -0
  4. package/dist/client.js +3 -0
  5. package/dist/index.d.ts +2 -1
  6. package/dist/namespaces/pod-members.d.ts +5 -3
  7. package/dist/namespaces/pod-members.js +12 -6
  8. package/dist/namespaces/resources.d.ts +21 -5
  9. package/dist/namespaces/schedules.d.ts +22 -0
  10. package/dist/namespaces/schedules.js +24 -0
  11. package/dist/namespaces/workflows.d.ts +4 -5
  12. package/dist/namespaces/workflows.js +1 -4
  13. package/dist/openapi_client/index.d.ts +31 -26
  14. package/dist/openapi_client/index.js +8 -7
  15. package/dist/openapi_client/models/AgentResponse.d.ts +3 -2
  16. package/dist/openapi_client/models/BillingHistoryResponse.d.ts +8 -0
  17. package/dist/openapi_client/models/BillingInvoiceResponse.d.ts +29 -0
  18. package/dist/openapi_client/models/BillingInvoiceStatus.d.ts +10 -0
  19. package/dist/openapi_client/models/BillingInvoiceStatus.js +15 -0
  20. package/dist/openapi_client/models/BillingScope.d.ts +7 -0
  21. package/dist/openapi_client/models/BillingScope.js +12 -0
  22. package/dist/openapi_client/models/ConversationResponse.d.ts +1 -0
  23. package/dist/openapi_client/models/CreateAgentRequest.d.ts +3 -2
  24. package/dist/openapi_client/models/CreateConversationRequest.d.ts +1 -0
  25. package/dist/openapi_client/models/CreateDeskRequest.d.ts +1 -0
  26. package/dist/openapi_client/models/CreateFolderRequest.d.ts +2 -0
  27. package/dist/openapi_client/models/CreateFunctionRequest.d.ts +9 -4
  28. package/dist/openapi_client/models/CreateInvoicePaymentUrlRequest.d.ts +7 -0
  29. package/dist/openapi_client/models/CreateInvoicePaymentUrlResponse.d.ts +8 -0
  30. package/dist/openapi_client/models/CreateScheduleRequest.d.ts +15 -0
  31. package/dist/openapi_client/models/CreateTableRequest.d.ts +1 -0
  32. package/dist/openapi_client/models/DatastoreFileUploadRequest.d.ts +1 -0
  33. package/dist/openapi_client/models/DeskResponse.d.ts +2 -0
  34. package/dist/openapi_client/models/FileResponse.d.ts +2 -0
  35. package/dist/openapi_client/models/FlowResponse.d.ts +4 -2
  36. package/dist/openapi_client/models/FlowRunEntity.d.ts +5 -4
  37. package/dist/openapi_client/models/FormNodeConfig.d.ts +8 -0
  38. package/dist/openapi_client/models/FunctionResponse.d.ts +13 -2
  39. package/dist/openapi_client/models/{app__modules__function__api__schemas__function_schemas__TableAccessEntry.d.ts → FunctionTableAccessEntry.d.ts} +1 -1
  40. package/dist/openapi_client/models/PodConfigResponse.d.ts +0 -2
  41. package/dist/openapi_client/models/PodMemberAddRequest.d.ts +1 -0
  42. package/dist/openapi_client/models/PodMemberDetailResponse.d.ts +3 -0
  43. package/dist/openapi_client/models/PodMemberResponse.d.ts +3 -0
  44. package/dist/openapi_client/models/PodMemberUpdateRoleRequest.d.ts +2 -1
  45. package/dist/openapi_client/models/PodRoleCreateRequest.d.ts +6 -0
  46. package/dist/openapi_client/models/PodRoleListResponse.d.ts +7 -0
  47. package/dist/openapi_client/models/PodRoleResponse.d.ts +11 -0
  48. package/dist/openapi_client/models/ScheduleListResponse.d.ts +9 -0
  49. package/dist/openapi_client/models/{TriggerResponse.d.ts → ScheduleResponse.d.ts} +10 -4
  50. package/dist/openapi_client/models/{TriggerType.d.ts → ScheduleType.d.ts} +2 -2
  51. package/dist/openapi_client/models/ScheduleType.js +13 -0
  52. package/dist/openapi_client/models/ScheduledFlowStartInput.d.ts +1 -1
  53. package/dist/openapi_client/models/ScheduledFlowStartOutput.d.ts +1 -1
  54. package/dist/openapi_client/models/SendMessageRequest.d.ts +1 -2
  55. package/dist/openapi_client/models/StartSubscriptionResponse.d.ts +3 -1
  56. package/dist/openapi_client/models/StartTeamBillingRequest.d.ts +6 -0
  57. package/dist/openapi_client/models/SubscriptionResponse.d.ts +22 -0
  58. package/dist/openapi_client/models/SubscriptionWithPlanResponse.d.ts +4 -1
  59. package/dist/openapi_client/models/{app__modules__agent__domain__value_objects__TableAccessEntry.d.ts → TableAccessEntry.d.ts} +1 -1
  60. package/dist/openapi_client/models/TableResponse.d.ts +2 -0
  61. package/dist/openapi_client/models/UpdateAgentRequest.d.ts +3 -2
  62. package/dist/openapi_client/models/UpdateConversationRequest.d.ts +1 -0
  63. package/dist/openapi_client/models/UpdateDeskRequest.d.ts +2 -0
  64. package/dist/openapi_client/models/UpdateFunctionRequest.d.ts +6 -2
  65. package/dist/openapi_client/models/UpdateScheduleRequest.d.ts +12 -0
  66. package/dist/openapi_client/models/UpdateTableRequest.d.ts +2 -1
  67. package/dist/openapi_client/models/UsageLimitScopeResponse.d.ts +10 -0
  68. package/dist/openapi_client/models/UsageLimitsResponse.d.ts +11 -0
  69. package/dist/openapi_client/models/UsageListResponse.d.ts +10 -0
  70. package/dist/openapi_client/models/UsageRecordResponse.d.ts +12 -4
  71. package/dist/openapi_client/models/UsageStatsBucketResponse.d.ts +12 -0
  72. package/dist/openapi_client/models/UsageStatsResponse.d.ts +12 -0
  73. package/dist/openapi_client/models/UsageStatsResponse.js +1 -0
  74. package/dist/openapi_client/models/UsageSummaryResponse.d.ts +3 -0
  75. package/dist/openapi_client/models/WorkflowCreateRequest.d.ts +4 -3
  76. package/dist/openapi_client/models/WorkflowMode.d.ts +7 -0
  77. package/dist/openapi_client/models/WorkflowMode.js +12 -0
  78. package/dist/openapi_client/models/WorkflowRunWaitAssignment.d.ts +6 -0
  79. package/dist/openapi_client/models/WorkflowRunWaitAssignment.js +1 -0
  80. package/dist/openapi_client/models/WorkflowRunWaitAssignmentListResponse.d.ts +6 -0
  81. package/dist/openapi_client/models/WorkflowRunWaitAssignmentListResponse.js +1 -0
  82. package/dist/openapi_client/models/WorkflowRunWaitEntity.d.ts +20 -0
  83. package/dist/openapi_client/models/WorkflowRunWaitEntity.js +1 -0
  84. package/dist/openapi_client/models/WorkflowRunWaitStatus.d.ts +6 -0
  85. package/dist/openapi_client/models/WorkflowRunWaitStatus.js +11 -0
  86. package/dist/openapi_client/models/WorkflowRunWaitType.d.ts +7 -0
  87. package/dist/openapi_client/models/WorkflowRunWaitType.js +12 -0
  88. package/dist/openapi_client/models/WorkflowUpdateRequest.d.ts +4 -3
  89. package/dist/openapi_client/models/update.d.ts +2 -0
  90. package/dist/openapi_client/services/BillingSubscriptionsService.d.ts +80 -20
  91. package/dist/openapi_client/services/BillingSubscriptionsService.js +164 -27
  92. package/dist/openapi_client/services/BillingUsageService.d.ts +89 -5
  93. package/dist/openapi_client/services/BillingUsageService.js +186 -6
  94. package/dist/openapi_client/services/DesksService.d.ts +21 -4
  95. package/dist/openapi_client/services/DesksService.js +44 -2
  96. package/dist/openapi_client/services/FilesService.d.ts +10 -10
  97. package/dist/openapi_client/services/FilesService.js +10 -10
  98. package/dist/openapi_client/services/FunctionsService.d.ts +2 -2
  99. package/dist/openapi_client/services/FunctionsService.js +2 -2
  100. package/dist/openapi_client/services/PodMembersService.d.ts +35 -7
  101. package/dist/openapi_client/services/PodMembersService.js +81 -13
  102. package/dist/openapi_client/services/PodRolesService.d.ts +29 -0
  103. package/dist/openapi_client/services/PodRolesService.js +63 -0
  104. package/dist/openapi_client/services/SchedulesService.d.ts +59 -0
  105. package/dist/openapi_client/services/SchedulesService.js +125 -0
  106. package/dist/openapi_client/services/WebhooksService.d.ts +4 -4
  107. package/dist/openapi_client/services/WebhooksService.js +6 -6
  108. package/dist/openapi_client/services/WorkflowsService.d.ts +12 -33
  109. package/dist/openapi_client/services/WorkflowsService.js +26 -69
  110. package/dist/react/AuthGuard.js +1 -1
  111. package/dist/react/index.d.ts +11 -1
  112. package/dist/react/index.js +5 -0
  113. package/dist/react/useAssistantController.d.ts +8 -4
  114. package/dist/react/useAssistantController.js +9 -6
  115. package/dist/react/useAssistantSession.d.ts +3 -0
  116. package/dist/react/useAssistantSession.js +6 -2
  117. package/dist/react/useConversationMessages.d.ts +2 -1
  118. package/dist/react/useConversationMessages.js +2 -1
  119. package/dist/react/useCreateSchedule.d.ts +17 -0
  120. package/dist/react/useCreateSchedule.js +45 -0
  121. package/dist/react/useDeleteSchedule.d.ts +19 -0
  122. package/dist/react/useDeleteSchedule.js +49 -0
  123. package/dist/react/usePodAccess.js +1 -1
  124. package/dist/react/useSchedules.d.ts +30 -0
  125. package/dist/react/useSchedules.js +123 -0
  126. package/dist/react/useUpdateSchedule.d.ts +20 -0
  127. package/dist/react/useUpdateSchedule.js +49 -0
  128. package/dist/react/useWorkflowRun.js +1 -1
  129. package/dist/react/useWorkflowRunWaitAssignments.d.ts +26 -0
  130. package/dist/react/useWorkflowRunWaitAssignments.js +102 -0
  131. package/dist/react/useWorkflowStart.js +1 -1
  132. package/dist/types.d.ts +3 -1
  133. package/package.json +1 -1
  134. package/dist/openapi_client/models/Body_upload_file_files__resource_type___resource_id__upload_post.d.ts +0 -3
  135. package/dist/openapi_client/models/CreateTriggerRequest.d.ts +0 -13
  136. package/dist/openapi_client/models/FileInfo.d.ts +0 -14
  137. package/dist/openapi_client/models/FileInfo.js +0 -8
  138. package/dist/openapi_client/models/FileUploadResponse.d.ts +0 -6
  139. package/dist/openapi_client/models/FlowInstallResponse.d.ts +0 -15
  140. package/dist/openapi_client/models/GrantPermissionRequest.d.ts +0 -6
  141. package/dist/openapi_client/models/PodFlowConfigItem.d.ts +0 -7
  142. package/dist/openapi_client/models/PodPermissionsResponse.d.ts +0 -4
  143. package/dist/openapi_client/models/ResourceFileListResponse.d.ts +0 -6
  144. package/dist/openapi_client/models/ResourcePermissionListResponse.d.ts +0 -4
  145. package/dist/openapi_client/models/ResourcePermissionResponse.d.ts +0 -12
  146. package/dist/openapi_client/models/ResourceType.d.ts +0 -4
  147. package/dist/openapi_client/models/ResourceType.js +0 -9
  148. package/dist/openapi_client/models/SetVisibilityRequest.d.ts +0 -3
  149. package/dist/openapi_client/models/TriggerListResponse.d.ts +0 -9
  150. package/dist/openapi_client/models/TriggerType.js +0 -13
  151. package/dist/openapi_client/models/UpdateTriggerRequest.d.ts +0 -9
  152. package/dist/openapi_client/models/WorkflowInstallListResponse.d.ts +0 -4
  153. package/dist/openapi_client/models/WorkflowInstallMode.d.ts +0 -7
  154. package/dist/openapi_client/models/WorkflowInstallMode.js +0 -12
  155. package/dist/openapi_client/models/WorkflowInstallRequest.d.ts +0 -11
  156. package/dist/openapi_client/models/WorkflowTimeInstallConfig.d.ts +0 -19
  157. package/dist/openapi_client/services/AgentFilesService.d.ts +0 -46
  158. package/dist/openapi_client/services/AgentFilesService.js +0 -103
  159. package/dist/openapi_client/services/AuthorizationService.d.ts +0 -58
  160. package/dist/openapi_client/services/AuthorizationService.js +0 -122
  161. package/dist/openapi_client/services/TriggersService.d.ts +0 -53
  162. package/dist/openapi_client/services/TriggersService.js +0 -109
  163. /package/dist/openapi_client/models/{Body_upload_file_files__resource_type___resource_id__upload_post.js → BillingHistoryResponse.js} +0 -0
  164. /package/dist/openapi_client/models/{CreateTriggerRequest.js → BillingInvoiceResponse.js} +0 -0
  165. /package/dist/openapi_client/models/{FileUploadResponse.js → CreateInvoicePaymentUrlRequest.js} +0 -0
  166. /package/dist/openapi_client/models/{FlowInstallResponse.js → CreateInvoicePaymentUrlResponse.js} +0 -0
  167. /package/dist/openapi_client/models/{GrantPermissionRequest.js → CreateScheduleRequest.js} +0 -0
  168. /package/dist/openapi_client/models/{PodFlowConfigItem.js → FunctionTableAccessEntry.js} +0 -0
  169. /package/dist/openapi_client/models/{PodPermissionsResponse.js → PodRoleCreateRequest.js} +0 -0
  170. /package/dist/openapi_client/models/{ResourceFileListResponse.js → PodRoleListResponse.js} +0 -0
  171. /package/dist/openapi_client/models/{ResourcePermissionListResponse.js → PodRoleResponse.js} +0 -0
  172. /package/dist/openapi_client/models/{ResourcePermissionResponse.js → ScheduleListResponse.js} +0 -0
  173. /package/dist/openapi_client/models/{SetVisibilityRequest.js → ScheduleResponse.js} +0 -0
  174. /package/dist/openapi_client/models/{TriggerListResponse.js → StartTeamBillingRequest.js} +0 -0
  175. /package/dist/openapi_client/models/{TriggerResponse.js → SubscriptionResponse.js} +0 -0
  176. /package/dist/openapi_client/models/{UpdateTriggerRequest.js → TableAccessEntry.js} +0 -0
  177. /package/dist/openapi_client/models/{WorkflowInstallListResponse.js → UpdateScheduleRequest.js} +0 -0
  178. /package/dist/openapi_client/models/{WorkflowInstallRequest.js → UsageLimitScopeResponse.js} +0 -0
  179. /package/dist/openapi_client/models/{WorkflowTimeInstallConfig.js → UsageLimitsResponse.js} +0 -0
  180. /package/dist/openapi_client/models/{app__modules__agent__domain__value_objects__TableAccessEntry.js → UsageListResponse.js} +0 -0
  181. /package/dist/openapi_client/models/{app__modules__function__api__schemas__function_schemas__TableAccessEntry.js → UsageStatsBucketResponse.js} +0 -0
@@ -0,0 +1,12 @@
1
+ import type { UsageStatsBucketResponse } from './UsageStatsBucketResponse.js';
2
+ /**
3
+ * Response schema for usage statistics.
4
+ */
5
+ export type UsageStatsResponse = {
6
+ end_date: string;
7
+ granularity: string;
8
+ group_by?: (string | null);
9
+ items: Array<UsageStatsBucketResponse>;
10
+ start_date: string;
11
+ total: number;
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -2,15 +2,18 @@
2
2
  * Response schema for usage summary.
3
3
  */
4
4
  export type UsageSummaryResponse = {
5
+ agent_id?: (string | null);
5
6
  end_date: string;
6
7
  organization_id?: (string | null);
7
8
  period_days: number;
8
9
  pod_id?: (string | null);
9
10
  start_date: string;
11
+ total_by_kind: Record<string, Record<string, number>>;
10
12
  total_by_model: Record<string, Record<string, number>>;
11
13
  total_cost_usd: number;
12
14
  total_input_tokens: number;
13
15
  total_output_tokens: number;
14
16
  total_tokens: number;
17
+ total_units: number;
15
18
  user_id?: (string | null);
16
19
  };
@@ -2,7 +2,7 @@ import type { DataStoreWorkflowStartInput } from './DataStoreWorkflowStartInput.
2
2
  import type { EventWorkflowStartInput } from './EventWorkflowStartInput.js';
3
3
  import type { ManualWorkflowStartInput } from './ManualWorkflowStartInput.js';
4
4
  import type { ScheduledWorkflowStartInput } from './ScheduledWorkflowStartInput.js';
5
- import type { WorkflowInstallMode } from './WorkflowInstallMode.js';
5
+ import type { WorkflowMode } from './WorkflowMode.js';
6
6
  export type WorkflowCreateRequest = {
7
7
  /**
8
8
  * Optional workflow description.
@@ -13,9 +13,9 @@ export type WorkflowCreateRequest = {
13
13
  */
14
14
  icon_url?: (string | null);
15
15
  /**
16
- * Workflow installation scope for non-manual starts. `GLOBAL` means one pod-level installation, `USER` means each user installs their own.
16
+ * Workflow schedule ownership mode. `GLOBAL` means one pod-level workflow schedule is allowed; `USER` is reserved for per-user schedule ownership.
17
17
  */
18
- mode?: WorkflowInstallMode;
18
+ mode?: WorkflowMode;
19
19
  /**
20
20
  * Workflow name.
21
21
  */
@@ -24,4 +24,5 @@ export type WorkflowCreateRequest = {
24
24
  * Start configuration. If omitted, the workflow can be started manually via `workflow.start`.
25
25
  */
26
26
  start?: ((ManualWorkflowStartInput | ScheduledWorkflowStartInput | EventWorkflowStartInput | DataStoreWorkflowStartInput) | null);
27
+ visibility_roles?: (Array<string> | null);
27
28
  };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Workflow schedule ownership mode.
3
+ */
4
+ export declare enum WorkflowMode {
5
+ GLOBAL = "GLOBAL",
6
+ USER = "USER"
7
+ }
@@ -0,0 +1,12 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Workflow schedule ownership mode.
7
+ */
8
+ export var WorkflowMode;
9
+ (function (WorkflowMode) {
10
+ WorkflowMode["GLOBAL"] = "GLOBAL";
11
+ WorkflowMode["USER"] = "USER";
12
+ })(WorkflowMode || (WorkflowMode = {}));
@@ -0,0 +1,6 @@
1
+ import type { FlowRunEntity } from './FlowRunEntity.js';
2
+ import type { WorkflowRunWaitEntity } from './WorkflowRunWaitEntity.js';
3
+ export type WorkflowRunWaitAssignment = {
4
+ run: FlowRunEntity;
5
+ wait: WorkflowRunWaitEntity;
6
+ };
@@ -0,0 +1,6 @@
1
+ import type { WorkflowRunWaitAssignment } from './WorkflowRunWaitAssignment.js';
2
+ export type WorkflowRunWaitAssignmentListResponse = {
3
+ items: Array<WorkflowRunWaitAssignment>;
4
+ limit: number;
5
+ next_page_token?: (string | null);
6
+ };
@@ -0,0 +1,20 @@
1
+ import type { WorkflowRunWaitStatus } from './WorkflowRunWaitStatus.js';
2
+ import type { WorkflowRunWaitType } from './WorkflowRunWaitType.js';
3
+ /**
4
+ * A queryable wait owned by a workflow run.
5
+ */
6
+ export type WorkflowRunWaitEntity = {
7
+ assigned_pod_member_id?: (string | null);
8
+ completed_at?: (string | null);
9
+ created_at?: string;
10
+ external_ref?: (string | null);
11
+ flow_id: string;
12
+ id?: string;
13
+ node_id: string;
14
+ payload?: Record<string, any>;
15
+ pod_id: string;
16
+ run_id: string;
17
+ status?: WorkflowRunWaitStatus;
18
+ updated_at?: string;
19
+ wait_type: WorkflowRunWaitType;
20
+ };
@@ -0,0 +1,6 @@
1
+ export declare enum WorkflowRunWaitStatus {
2
+ ACTIVE = "ACTIVE",
3
+ COMPLETED = "COMPLETED",
4
+ FAILED = "FAILED",
5
+ CANCELLED = "CANCELLED"
6
+ }
@@ -0,0 +1,11 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ export var WorkflowRunWaitStatus;
6
+ (function (WorkflowRunWaitStatus) {
7
+ WorkflowRunWaitStatus["ACTIVE"] = "ACTIVE";
8
+ WorkflowRunWaitStatus["COMPLETED"] = "COMPLETED";
9
+ WorkflowRunWaitStatus["FAILED"] = "FAILED";
10
+ WorkflowRunWaitStatus["CANCELLED"] = "CANCELLED";
11
+ })(WorkflowRunWaitStatus || (WorkflowRunWaitStatus = {}));
@@ -0,0 +1,7 @@
1
+ export declare enum WorkflowRunWaitType {
2
+ HUMAN = "HUMAN",
3
+ AGENT = "AGENT",
4
+ FUNCTION = "FUNCTION",
5
+ TIME = "TIME",
6
+ SCHEDULE = "SCHEDULE"
7
+ }
@@ -0,0 +1,12 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ export var WorkflowRunWaitType;
6
+ (function (WorkflowRunWaitType) {
7
+ WorkflowRunWaitType["HUMAN"] = "HUMAN";
8
+ WorkflowRunWaitType["AGENT"] = "AGENT";
9
+ WorkflowRunWaitType["FUNCTION"] = "FUNCTION";
10
+ WorkflowRunWaitType["TIME"] = "TIME";
11
+ WorkflowRunWaitType["SCHEDULE"] = "SCHEDULE";
12
+ })(WorkflowRunWaitType || (WorkflowRunWaitType = {}));
@@ -2,7 +2,7 @@ import type { DataStoreWorkflowStartInput } from './DataStoreWorkflowStartInput.
2
2
  import type { EventWorkflowStartInput } from './EventWorkflowStartInput.js';
3
3
  import type { ManualWorkflowStartInput } from './ManualWorkflowStartInput.js';
4
4
  import type { ScheduledWorkflowStartInput } from './ScheduledWorkflowStartInput.js';
5
- import type { WorkflowInstallMode } from './WorkflowInstallMode.js';
5
+ import type { WorkflowMode } from './WorkflowMode.js';
6
6
  export type WorkflowUpdateRequest = {
7
7
  /**
8
8
  * Updated workflow description.
@@ -13,11 +13,12 @@ export type WorkflowUpdateRequest = {
13
13
  */
14
14
  icon_url?: (string | null);
15
15
  /**
16
- * Updated workflow installation scope.
16
+ * Updated workflow schedule ownership mode.
17
17
  */
18
- mode?: (WorkflowInstallMode | null);
18
+ mode?: (WorkflowMode | null);
19
19
  /**
20
20
  * Updated start trigger configuration.
21
21
  */
22
22
  start?: ((ManualWorkflowStartInput | ScheduledWorkflowStartInput | EventWorkflowStartInput | DataStoreWorkflowStartInput) | null);
23
+ visibility_roles?: (Array<string> | null);
23
24
  };
@@ -6,4 +6,6 @@ export type update = {
6
6
  new_path?: (string | null);
7
7
  path: string;
8
8
  search_enabled?: (boolean | null);
9
+ visibility?: (string | null);
10
+ visibility_roles?: (string | null);
9
11
  };
@@ -1,56 +1,116 @@
1
+ import type { BillingHistoryResponse } from '../models/BillingHistoryResponse.js';
2
+ import type { BillingInvoiceResponse } from '../models/BillingInvoiceResponse.js';
1
3
  import type { CancelSubscriptionResponse } from '../models/CancelSubscriptionResponse.js';
4
+ import type { CreateInvoicePaymentUrlRequest } from '../models/CreateInvoicePaymentUrlRequest.js';
5
+ import type { CreateInvoicePaymentUrlResponse } from '../models/CreateInvoicePaymentUrlResponse.js';
2
6
  import type { PlanListResponse } from '../models/PlanListResponse.js';
3
7
  import type { SeatInfoResponse } from '../models/SeatInfoResponse.js';
4
8
  import type { StartSubscriptionRequest } from '../models/StartSubscriptionRequest.js';
5
9
  import type { StartSubscriptionResponse } from '../models/StartSubscriptionResponse.js';
10
+ import type { StartTeamBillingRequest } from '../models/StartTeamBillingRequest.js';
6
11
  import type { SubscriptionStatusResponse } from '../models/SubscriptionStatusResponse.js';
7
12
  import type { SubscriptionWithPlanResponse } from '../models/SubscriptionWithPlanResponse.js';
8
13
  import type { CancelablePromise } from '../core/CancelablePromise.js';
9
14
  export declare class BillingSubscriptionsService {
10
15
  /**
11
- * List Plans
12
- * List available subscription plans.
13
- * @param onlyActive
16
+ * List Organization Billing History
17
+ * List invoices for an organization.
18
+ * @param organizationId
14
19
  * @param limit
15
20
  * @param pageToken
16
- * @returns PlanListResponse Successful Response
21
+ * @returns BillingHistoryResponse Successful Response
22
+ * @throws ApiError
23
+ */
24
+ static billingOrganizationHistory(organizationId: string, limit?: number, pageToken?: (string | null)): CancelablePromise<BillingHistoryResponse>;
25
+ /**
26
+ * Get Current Organization Invoice
27
+ * Get or create the current unpaid monthly invoice.
28
+ * @param organizationId
29
+ * @returns BillingInvoiceResponse Successful Response
17
30
  * @throws ApiError
18
31
  */
19
- static billingPlansList(onlyActive?: boolean, limit?: number, pageToken?: (string | null)): CancelablePromise<PlanListResponse>;
32
+ static billingOrganizationInvoicesCurrent(organizationId: string): CancelablePromise<BillingInvoiceResponse>;
33
+ /**
34
+ * Create Invoice Payment URL
35
+ * Create a hosted checkout URL for an unpaid invoice.
36
+ * @param organizationId
37
+ * @param invoiceId
38
+ * @param requestBody
39
+ * @returns CreateInvoicePaymentUrlResponse Successful Response
40
+ * @throws ApiError
41
+ */
42
+ static billingOrganizationInvoicesPaymentUrl(organizationId: string, invoiceId: string, requestBody: CreateInvoicePaymentUrlRequest): CancelablePromise<CreateInvoicePaymentUrlResponse>;
20
43
  /**
21
44
  * Get Seat Info
22
45
  * Get seat availability information.
46
+ * @param organizationId
23
47
  * @returns SeatInfoResponse Successful Response
24
48
  * @throws ApiError
25
49
  */
26
- static billingSeatsInfo(): CancelablePromise<SeatInfoResponse>;
50
+ static billingOrganizationSeatsInfo(organizationId: string): CancelablePromise<SeatInfoResponse>;
27
51
  /**
28
- * Start Subscription
29
- * Start a new subscription. Returns checkout URL.
30
- * @param requestBody
31
- * @returns StartSubscriptionResponse Successful Response
52
+ * Get Organization Subscription
53
+ * Get subscription for an organization.
54
+ * @param organizationId
55
+ * @returns SubscriptionWithPlanResponse Successful Response
32
56
  * @throws ApiError
33
57
  */
34
- static billingSubscriptionsStart(requestBody: StartSubscriptionRequest): CancelablePromise<StartSubscriptionResponse>;
58
+ static billingOrganizationSubscriptionGet(organizationId: string): CancelablePromise<SubscriptionWithPlanResponse>;
35
59
  /**
36
- * Cancel Subscription
37
- * Cancel the current subscription.
60
+ * Cancel Organization Subscription
61
+ * Cancel an organization's team billing subscription.
62
+ * @param organizationId
38
63
  * @returns CancelSubscriptionResponse Successful Response
39
64
  * @throws ApiError
40
65
  */
41
- static billingSubscriptionsCancel(): CancelablePromise<CancelSubscriptionResponse>;
66
+ static billingOrganizationSubscriptionCancel(organizationId: string): CancelablePromise<CancelSubscriptionResponse>;
67
+ /**
68
+ * Start Organization Team Billing
69
+ * Start monthly-invoiced team billing for an organization.
70
+ * @param organizationId
71
+ * @param requestBody
72
+ * @returns SubscriptionWithPlanResponse Successful Response
73
+ * @throws ApiError
74
+ */
75
+ static billingOrganizationTeamBillingStart(organizationId: string, requestBody: StartTeamBillingRequest): CancelablePromise<SubscriptionWithPlanResponse>;
42
76
  /**
43
- * Get My Subscription
44
- * Get the current organization's subscription.
77
+ * Get Personal Subscription
78
+ * Get the current user's personal subscription.
45
79
  * @returns SubscriptionWithPlanResponse Successful Response
46
80
  * @throws ApiError
47
81
  */
48
- static billingSubscriptionsMy(): CancelablePromise<SubscriptionWithPlanResponse>;
82
+ static billingPersonalSubscriptionGet(): CancelablePromise<SubscriptionWithPlanResponse>;
49
83
  /**
50
- * Get Subscription Status
51
- * Get simple subscription status for the organization.
84
+ * Start Personal Subscription
85
+ * Start a new subscription.
86
+ * @param requestBody
87
+ * @returns StartSubscriptionResponse Successful Response
88
+ * @throws ApiError
89
+ */
90
+ static billingPersonalSubscriptionStart(requestBody: StartSubscriptionRequest): CancelablePromise<StartSubscriptionResponse>;
91
+ /**
92
+ * Cancel Personal Subscription
93
+ * Cancel subscription.
94
+ * @returns CancelSubscriptionResponse Successful Response
95
+ * @throws ApiError
96
+ */
97
+ static billingPersonalSubscriptionCancel(): CancelablePromise<CancelSubscriptionResponse>;
98
+ /**
99
+ * Get Personal Subscription Status
100
+ * Get subscription status.
52
101
  * @returns SubscriptionStatusResponse Successful Response
53
102
  * @throws ApiError
54
103
  */
55
- static billingSubscriptionsStatus(): CancelablePromise<SubscriptionStatusResponse>;
104
+ static billingPersonalSubscriptionStatus(): CancelablePromise<SubscriptionStatusResponse>;
105
+ /**
106
+ * List Plans
107
+ * List available subscription plans.
108
+ * @param onlyActive
109
+ * @param audience
110
+ * @param limit
111
+ * @param pageToken
112
+ * @returns PlanListResponse Successful Response
113
+ * @throws ApiError
114
+ */
115
+ static billingPlansList(onlyActive?: boolean, audience?: (string | null), limit?: number, pageToken?: (string | null)): CancelablePromise<PlanListResponse>;
56
116
  }
@@ -2,20 +2,22 @@ import { OpenAPI } from '../core/OpenAPI.js';
2
2
  import { request as __request } from '../core/request.js';
3
3
  export class BillingSubscriptionsService {
4
4
  /**
5
- * List Plans
6
- * List available subscription plans.
7
- * @param onlyActive
5
+ * List Organization Billing History
6
+ * List invoices for an organization.
7
+ * @param organizationId
8
8
  * @param limit
9
9
  * @param pageToken
10
- * @returns PlanListResponse Successful Response
10
+ * @returns BillingHistoryResponse Successful Response
11
11
  * @throws ApiError
12
12
  */
13
- static billingPlansList(onlyActive = true, limit = 100, pageToken) {
13
+ static billingOrganizationHistory(organizationId, limit = 100, pageToken) {
14
14
  return __request(OpenAPI, {
15
15
  method: 'GET',
16
- url: '/billing/plans',
16
+ url: '/billing/organizations/{organization_id}/billing-history',
17
+ path: {
18
+ 'organization_id': organizationId,
19
+ },
17
20
  query: {
18
- 'only_active': onlyActive,
19
21
  'limit': limit,
20
22
  'page_token': pageToken,
21
23
  },
@@ -24,29 +26,151 @@ export class BillingSubscriptionsService {
24
26
  },
25
27
  });
26
28
  }
29
+ /**
30
+ * Get Current Organization Invoice
31
+ * Get or create the current unpaid monthly invoice.
32
+ * @param organizationId
33
+ * @returns BillingInvoiceResponse Successful Response
34
+ * @throws ApiError
35
+ */
36
+ static billingOrganizationInvoicesCurrent(organizationId) {
37
+ return __request(OpenAPI, {
38
+ method: 'GET',
39
+ url: '/billing/organizations/{organization_id}/invoices/current',
40
+ path: {
41
+ 'organization_id': organizationId,
42
+ },
43
+ errors: {
44
+ 422: `Validation Error`,
45
+ },
46
+ });
47
+ }
48
+ /**
49
+ * Create Invoice Payment URL
50
+ * Create a hosted checkout URL for an unpaid invoice.
51
+ * @param organizationId
52
+ * @param invoiceId
53
+ * @param requestBody
54
+ * @returns CreateInvoicePaymentUrlResponse Successful Response
55
+ * @throws ApiError
56
+ */
57
+ static billingOrganizationInvoicesPaymentUrl(organizationId, invoiceId, requestBody) {
58
+ return __request(OpenAPI, {
59
+ method: 'POST',
60
+ url: '/billing/organizations/{organization_id}/invoices/{invoice_id}/payment-url',
61
+ path: {
62
+ 'organization_id': organizationId,
63
+ 'invoice_id': invoiceId,
64
+ },
65
+ body: requestBody,
66
+ mediaType: 'application/json',
67
+ errors: {
68
+ 422: `Validation Error`,
69
+ },
70
+ });
71
+ }
27
72
  /**
28
73
  * Get Seat Info
29
74
  * Get seat availability information.
75
+ * @param organizationId
30
76
  * @returns SeatInfoResponse Successful Response
31
77
  * @throws ApiError
32
78
  */
33
- static billingSeatsInfo() {
79
+ static billingOrganizationSeatsInfo(organizationId) {
34
80
  return __request(OpenAPI, {
35
81
  method: 'GET',
36
- url: '/billing/seats',
82
+ url: '/billing/organizations/{organization_id}/seats',
83
+ path: {
84
+ 'organization_id': organizationId,
85
+ },
86
+ errors: {
87
+ 422: `Validation Error`,
88
+ },
37
89
  });
38
90
  }
39
91
  /**
40
- * Start Subscription
41
- * Start a new subscription. Returns checkout URL.
92
+ * Get Organization Subscription
93
+ * Get subscription for an organization.
94
+ * @param organizationId
95
+ * @returns SubscriptionWithPlanResponse Successful Response
96
+ * @throws ApiError
97
+ */
98
+ static billingOrganizationSubscriptionGet(organizationId) {
99
+ return __request(OpenAPI, {
100
+ method: 'GET',
101
+ url: '/billing/organizations/{organization_id}/subscription',
102
+ path: {
103
+ 'organization_id': organizationId,
104
+ },
105
+ errors: {
106
+ 422: `Validation Error`,
107
+ },
108
+ });
109
+ }
110
+ /**
111
+ * Cancel Organization Subscription
112
+ * Cancel an organization's team billing subscription.
113
+ * @param organizationId
114
+ * @returns CancelSubscriptionResponse Successful Response
115
+ * @throws ApiError
116
+ */
117
+ static billingOrganizationSubscriptionCancel(organizationId) {
118
+ return __request(OpenAPI, {
119
+ method: 'POST',
120
+ url: '/billing/organizations/{organization_id}/subscription/cancel',
121
+ path: {
122
+ 'organization_id': organizationId,
123
+ },
124
+ errors: {
125
+ 422: `Validation Error`,
126
+ },
127
+ });
128
+ }
129
+ /**
130
+ * Start Organization Team Billing
131
+ * Start monthly-invoiced team billing for an organization.
132
+ * @param organizationId
133
+ * @param requestBody
134
+ * @returns SubscriptionWithPlanResponse Successful Response
135
+ * @throws ApiError
136
+ */
137
+ static billingOrganizationTeamBillingStart(organizationId, requestBody) {
138
+ return __request(OpenAPI, {
139
+ method: 'POST',
140
+ url: '/billing/organizations/{organization_id}/team-billing',
141
+ path: {
142
+ 'organization_id': organizationId,
143
+ },
144
+ body: requestBody,
145
+ mediaType: 'application/json',
146
+ errors: {
147
+ 422: `Validation Error`,
148
+ },
149
+ });
150
+ }
151
+ /**
152
+ * Get Personal Subscription
153
+ * Get the current user's personal subscription.
154
+ * @returns SubscriptionWithPlanResponse Successful Response
155
+ * @throws ApiError
156
+ */
157
+ static billingPersonalSubscriptionGet() {
158
+ return __request(OpenAPI, {
159
+ method: 'GET',
160
+ url: '/billing/personal/subscription',
161
+ });
162
+ }
163
+ /**
164
+ * Start Personal Subscription
165
+ * Start a new subscription.
42
166
  * @param requestBody
43
167
  * @returns StartSubscriptionResponse Successful Response
44
168
  * @throws ApiError
45
169
  */
46
- static billingSubscriptionsStart(requestBody) {
170
+ static billingPersonalSubscriptionStart(requestBody) {
47
171
  return __request(OpenAPI, {
48
172
  method: 'POST',
49
- url: '/billing/subscriptions',
173
+ url: '/billing/personal/subscription',
50
174
  body: requestBody,
51
175
  mediaType: 'application/json',
52
176
  errors: {
@@ -55,39 +179,52 @@ export class BillingSubscriptionsService {
55
179
  });
56
180
  }
57
181
  /**
58
- * Cancel Subscription
59
- * Cancel the current subscription.
182
+ * Cancel Personal Subscription
183
+ * Cancel subscription.
60
184
  * @returns CancelSubscriptionResponse Successful Response
61
185
  * @throws ApiError
62
186
  */
63
- static billingSubscriptionsCancel() {
187
+ static billingPersonalSubscriptionCancel() {
64
188
  return __request(OpenAPI, {
65
189
  method: 'POST',
66
- url: '/billing/subscriptions/cancel',
190
+ url: '/billing/personal/subscription/cancel',
67
191
  });
68
192
  }
69
193
  /**
70
- * Get My Subscription
71
- * Get the current organization's subscription.
72
- * @returns SubscriptionWithPlanResponse Successful Response
194
+ * Get Personal Subscription Status
195
+ * Get subscription status.
196
+ * @returns SubscriptionStatusResponse Successful Response
73
197
  * @throws ApiError
74
198
  */
75
- static billingSubscriptionsMy() {
199
+ static billingPersonalSubscriptionStatus() {
76
200
  return __request(OpenAPI, {
77
201
  method: 'GET',
78
- url: '/billing/subscriptions/my',
202
+ url: '/billing/personal/subscription/status',
79
203
  });
80
204
  }
81
205
  /**
82
- * Get Subscription Status
83
- * Get simple subscription status for the organization.
84
- * @returns SubscriptionStatusResponse Successful Response
206
+ * List Plans
207
+ * List available subscription plans.
208
+ * @param onlyActive
209
+ * @param audience
210
+ * @param limit
211
+ * @param pageToken
212
+ * @returns PlanListResponse Successful Response
85
213
  * @throws ApiError
86
214
  */
87
- static billingSubscriptionsStatus() {
215
+ static billingPlansList(onlyActive = true, audience, limit = 100, pageToken) {
88
216
  return __request(OpenAPI, {
89
217
  method: 'GET',
90
- url: '/billing/subscriptions/status',
218
+ url: '/billing/plans',
219
+ query: {
220
+ 'only_active': onlyActive,
221
+ 'audience': audience,
222
+ 'limit': limit,
223
+ 'page_token': pageToken,
224
+ },
225
+ errors: {
226
+ 422: `Validation Error`,
227
+ },
91
228
  });
92
229
  }
93
230
  }