lemma-sdk 0.2.40 → 0.2.42

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 (130) hide show
  1. package/README.md +10 -3
  2. package/dist/browser/lemma-client.js +95 -68
  3. package/dist/index.d.ts +1 -1
  4. package/dist/namespaces/conversations.d.ts +6 -0
  5. package/dist/namespaces/conversations.js +2 -0
  6. package/dist/namespaces/files.js +12 -21
  7. package/dist/namespaces/resources.d.ts +21 -5
  8. package/dist/openapi_client/index.d.ts +21 -15
  9. package/dist/openapi_client/index.js +5 -5
  10. package/dist/openapi_client/models/AgentResponse.d.ts +3 -2
  11. package/dist/openapi_client/models/BillingHistoryResponse.d.ts +8 -0
  12. package/dist/openapi_client/models/BillingInvoiceResponse.d.ts +29 -0
  13. package/dist/openapi_client/models/BillingInvoiceStatus.d.ts +10 -0
  14. package/dist/openapi_client/models/BillingInvoiceStatus.js +15 -0
  15. package/dist/openapi_client/models/BillingScope.d.ts +7 -0
  16. package/dist/openapi_client/models/BillingScope.js +12 -0
  17. package/dist/openapi_client/models/ConversationResponse.d.ts +6 -0
  18. package/dist/openapi_client/models/ConversationStatus.d.ts +11 -0
  19. package/dist/openapi_client/models/ConversationStatus.js +16 -0
  20. package/dist/openapi_client/models/ConversationType.d.ts +7 -0
  21. package/dist/openapi_client/models/ConversationType.js +12 -0
  22. package/dist/openapi_client/models/CreateAgentRequest.d.ts +3 -2
  23. package/dist/openapi_client/models/CreateConversationRequest.d.ts +4 -0
  24. package/dist/openapi_client/models/CreateDeskRequest.d.ts +1 -0
  25. package/dist/openapi_client/models/CreateFolderRequest.d.ts +1 -2
  26. package/dist/openapi_client/models/CreateFunctionRequest.d.ts +9 -4
  27. package/dist/openapi_client/models/CreateInvoicePaymentUrlRequest.d.ts +7 -0
  28. package/dist/openapi_client/models/CreateInvoicePaymentUrlResponse.d.ts +8 -0
  29. package/dist/openapi_client/models/CreateScheduleRequest.d.ts +1 -0
  30. package/dist/openapi_client/models/CreateTableRequest.d.ts +1 -0
  31. package/dist/openapi_client/models/DatastoreFileUploadRequest.d.ts +1 -2
  32. package/dist/openapi_client/models/DeskResponse.d.ts +2 -0
  33. package/dist/openapi_client/models/FileResponse.d.ts +2 -2
  34. package/dist/openapi_client/models/FlowResponse.d.ts +2 -0
  35. package/dist/openapi_client/models/FunctionResponse.d.ts +13 -2
  36. package/dist/openapi_client/models/{app__modules__function__api__schemas__function_schemas__TableAccessEntry.d.ts → FunctionTableAccessEntry.d.ts} +1 -1
  37. package/dist/openapi_client/models/PodMemberAddRequest.d.ts +1 -0
  38. package/dist/openapi_client/models/PodMemberDetailResponse.d.ts +1 -0
  39. package/dist/openapi_client/models/PodMemberResponse.d.ts +1 -0
  40. package/dist/openapi_client/models/PodMemberUpdateRoleRequest.d.ts +2 -1
  41. package/dist/openapi_client/models/PodRoleCreateRequest.d.ts +6 -0
  42. package/dist/openapi_client/models/PodRoleListResponse.d.ts +7 -0
  43. package/dist/openapi_client/models/PodRoleResponse.d.ts +11 -0
  44. package/dist/openapi_client/models/ScheduleResponse.d.ts +2 -0
  45. package/dist/openapi_client/models/SendMessageRequest.d.ts +1 -0
  46. package/dist/openapi_client/models/StartSubscriptionResponse.d.ts +3 -1
  47. package/dist/openapi_client/models/StartTeamBillingRequest.d.ts +6 -0
  48. package/dist/openapi_client/models/SubscriptionResponse.d.ts +22 -0
  49. package/dist/openapi_client/models/SubscriptionWithPlanResponse.d.ts +4 -1
  50. package/dist/openapi_client/models/{app__modules__agent__domain__value_objects__TableAccessEntry.d.ts → TableAccessEntry.d.ts} +1 -1
  51. package/dist/openapi_client/models/TableAccessEntry.js +1 -0
  52. package/dist/openapi_client/models/TableResponse.d.ts +2 -0
  53. package/dist/openapi_client/models/UpdateAgentRequest.d.ts +3 -2
  54. package/dist/openapi_client/models/UpdateConversationRequest.d.ts +2 -0
  55. package/dist/openapi_client/models/UpdateDeskRequest.d.ts +2 -0
  56. package/dist/openapi_client/models/UpdateFunctionRequest.d.ts +6 -2
  57. package/dist/openapi_client/models/UpdateScheduleRequest.d.ts +1 -0
  58. package/dist/openapi_client/models/UpdateTableRequest.d.ts +2 -1
  59. package/dist/openapi_client/models/UsageLimitScopeResponse.d.ts +10 -0
  60. package/dist/openapi_client/models/UsageLimitScopeResponse.js +1 -0
  61. package/dist/openapi_client/models/UsageLimitsResponse.d.ts +11 -0
  62. package/dist/openapi_client/models/UsageLimitsResponse.js +1 -0
  63. package/dist/openapi_client/models/UsageListResponse.d.ts +10 -0
  64. package/dist/openapi_client/models/UsageListResponse.js +1 -0
  65. package/dist/openapi_client/models/UsageRecordResponse.d.ts +12 -4
  66. package/dist/openapi_client/models/UsageStatsBucketResponse.d.ts +12 -0
  67. package/dist/openapi_client/models/UsageStatsBucketResponse.js +1 -0
  68. package/dist/openapi_client/models/UsageStatsResponse.d.ts +12 -0
  69. package/dist/openapi_client/models/UsageStatsResponse.js +1 -0
  70. package/dist/openapi_client/models/UsageSummaryResponse.d.ts +3 -0
  71. package/dist/openapi_client/models/WorkflowCreateRequest.d.ts +1 -0
  72. package/dist/openapi_client/models/WorkflowUpdateRequest.d.ts +1 -0
  73. package/dist/openapi_client/models/update.d.ts +1 -2
  74. package/dist/openapi_client/services/AgentConversationsService.d.ts +5 -1
  75. package/dist/openapi_client/services/AgentConversationsService.js +5 -1
  76. package/dist/openapi_client/services/BillingSubscriptionsService.d.ts +80 -20
  77. package/dist/openapi_client/services/BillingSubscriptionsService.js +164 -27
  78. package/dist/openapi_client/services/BillingUsageService.d.ts +89 -5
  79. package/dist/openapi_client/services/BillingUsageService.js +186 -6
  80. package/dist/openapi_client/services/DesksService.d.ts +21 -4
  81. package/dist/openapi_client/services/DesksService.js +44 -2
  82. package/dist/openapi_client/services/FilesService.d.ts +11 -20
  83. package/dist/openapi_client/services/FilesService.js +11 -28
  84. package/dist/openapi_client/services/FunctionsService.d.ts +2 -2
  85. package/dist/openapi_client/services/FunctionsService.js +2 -2
  86. package/dist/openapi_client/services/PodMembersService.d.ts +10 -0
  87. package/dist/openapi_client/services/PodMembersService.js +24 -0
  88. package/dist/openapi_client/services/PodRolesService.d.ts +29 -0
  89. package/dist/openapi_client/services/PodRolesService.js +63 -0
  90. package/dist/react/AuthGuard.d.ts +0 -15
  91. package/dist/react/AuthGuard.js +128 -167
  92. package/dist/react/index.d.ts +1 -1
  93. package/dist/react/useAssistantController.d.ts +8 -4
  94. package/dist/react/useAssistantController.js +9 -6
  95. package/dist/react/useAssistantSession.d.ts +9 -0
  96. package/dist/react/useAssistantSession.js +10 -2
  97. package/dist/react/useConversationMessages.d.ts +2 -1
  98. package/dist/react/useConversationMessages.js +2 -1
  99. package/dist/react/useConversations.d.ts +7 -1
  100. package/dist/react/useConversations.js +10 -4
  101. package/dist/types.d.ts +2 -2
  102. package/package.json +1 -1
  103. package/dist/openapi_client/models/Body_upload_file_files__resource_type___resource_id__upload_post.d.ts +0 -3
  104. package/dist/openapi_client/models/FileInfo.d.ts +0 -14
  105. package/dist/openapi_client/models/FileInfo.js +0 -8
  106. package/dist/openapi_client/models/FileNamespace.d.ts +0 -4
  107. package/dist/openapi_client/models/FileNamespace.js +0 -9
  108. package/dist/openapi_client/models/FileUploadResponse.d.ts +0 -6
  109. package/dist/openapi_client/models/GrantPermissionRequest.d.ts +0 -6
  110. package/dist/openapi_client/models/PodPermissionsResponse.d.ts +0 -4
  111. package/dist/openapi_client/models/ResourceFileListResponse.d.ts +0 -6
  112. package/dist/openapi_client/models/ResourcePermissionListResponse.d.ts +0 -4
  113. package/dist/openapi_client/models/ResourcePermissionResponse.d.ts +0 -12
  114. package/dist/openapi_client/models/ResourceType.d.ts +0 -4
  115. package/dist/openapi_client/models/ResourceType.js +0 -9
  116. package/dist/openapi_client/models/SetVisibilityRequest.d.ts +0 -3
  117. package/dist/openapi_client/services/AgentFilesService.d.ts +0 -46
  118. package/dist/openapi_client/services/AgentFilesService.js +0 -103
  119. package/dist/openapi_client/services/AuthorizationService.d.ts +0 -58
  120. package/dist/openapi_client/services/AuthorizationService.js +0 -122
  121. /package/dist/openapi_client/models/{Body_upload_file_files__resource_type___resource_id__upload_post.js → BillingHistoryResponse.js} +0 -0
  122. /package/dist/openapi_client/models/{FileUploadResponse.js → BillingInvoiceResponse.js} +0 -0
  123. /package/dist/openapi_client/models/{GrantPermissionRequest.js → CreateInvoicePaymentUrlRequest.js} +0 -0
  124. /package/dist/openapi_client/models/{PodPermissionsResponse.js → CreateInvoicePaymentUrlResponse.js} +0 -0
  125. /package/dist/openapi_client/models/{ResourceFileListResponse.js → FunctionTableAccessEntry.js} +0 -0
  126. /package/dist/openapi_client/models/{ResourcePermissionListResponse.js → PodRoleCreateRequest.js} +0 -0
  127. /package/dist/openapi_client/models/{ResourcePermissionResponse.js → PodRoleListResponse.js} +0 -0
  128. /package/dist/openapi_client/models/{SetVisibilityRequest.js → PodRoleResponse.js} +0 -0
  129. /package/dist/openapi_client/models/{app__modules__agent__domain__value_objects__TableAccessEntry.js → StartTeamBillingRequest.js} +0 -0
  130. /package/dist/openapi_client/models/{app__modules__function__api__schemas__function_schemas__TableAccessEntry.js → SubscriptionResponse.js} +0 -0
package/README.md CHANGED
@@ -187,12 +187,18 @@ function AgentButton({ client }: { client: LemmaClient }) {
187
187
  void (async () => {
188
188
  const thread = await conversation.createConversation({
189
189
  title: "Triage ticket ticket_123",
190
+ instructions: "Triage the ticket, propose the next owner, and explain the confidence level.",
191
+ metadata: { source: "support_queue", ticket_id: "ticket_123" },
192
+ type: "TASK",
190
193
  setActive: true,
191
194
  });
192
195
  await conversation.sendMessage(JSON.stringify({
193
196
  ticket_id: "ticket_123",
194
197
  prompt: "Triage this ticket.",
195
- }), { conversationId: thread.id });
198
+ }), {
199
+ conversationId: thread.id,
200
+ metadata: { source: "support_queue", ticket_id: "ticket_123" },
201
+ });
196
202
  })();
197
203
  }}
198
204
  >
@@ -438,7 +444,7 @@ Useful helpers:
438
444
  - `setTestingToken(...)`
439
445
  - `clearTestingToken()`
440
446
 
441
- When `client.podId` is set and the signed-in user is not a pod member, `AuthGuard` can render the request-access flow and create or show pod join requests.
447
+ When `client.podId` is set and the signed-in user is not a pod member, `AuthGuard` checks membership through the pod-member lookup endpoint and renders an interactive request-access flow. It can create a pod join request, show a pending request, retry access checks, and then render the app once the user is a member.
442
448
 
443
449
  `usePodAccess` exposes the same membership/request-access state as a hook for custom UI.
444
450
 
@@ -457,7 +463,8 @@ From `0.2.37` onward:
457
463
 
458
464
  - Agent APIs are the runtime abstraction. `client.assistants` is removed; use `client.agents` for definitions and `client.conversations` for turns/messages.
459
465
  - Conversations are pod-scoped under the agent conversation API; message sends stream conversation events until final output.
460
- - File APIs are namespace-aware. Shared pod files are the default for backwards-compatible file workspaces; pass `namespace: "PRIVATE"` for personal file input/upload flows and `namespace: "POD"` when you want to be explicit. The live OpenAPI currently names the private namespace `PERSONAL`; the SDK accepts `PRIVATE` as the product-facing alias.
466
+ - Conversation creation accepts `instructions`, `metadata`, and `type`; message sends accept `metadata`. Use conversation instructions for durable agent context and message metadata for per-turn provenance, object IDs, and UI recovery data.
467
+ - File API namespace query/body fields are no longer in the live OpenAPI. The SDK still accepts `namespace` in file helpers for source compatibility, but it is currently a no-op on requests.
461
468
 
462
469
  From `0.2.39` onward:
463
470
 
@@ -1649,6 +1649,8 @@ class ConversationsNamespace {
1649
1649
  return this.http.request("GET", `/pods/${podId}/conversations`, {
1650
1650
  params: {
1651
1651
  agent_name: options.agent_name,
1652
+ status: options.status,
1653
+ type: options.type,
1652
1654
  limit: options.limit ?? 20,
1653
1655
  page_token: options.page_token,
1654
1656
  },
@@ -1912,6 +1914,48 @@ class DesksService {
1912
1914
  },
1913
1915
  });
1914
1916
  }
1917
+ /**
1918
+ * Get Desk Root Asset
1919
+ * @param podId
1920
+ * @param deskName
1921
+ * @returns any Successful Response
1922
+ * @throws ApiError
1923
+ */
1924
+ static deskAssetRootGet(podId, deskName) {
1925
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1926
+ method: 'GET',
1927
+ url: '/pods/{pod_id}/desks/{desk_name}/assets',
1928
+ path: {
1929
+ 'pod_id': podId,
1930
+ 'desk_name': deskName,
1931
+ },
1932
+ errors: {
1933
+ 422: `Validation Error`,
1934
+ },
1935
+ });
1936
+ }
1937
+ /**
1938
+ * Get Desk Asset
1939
+ * @param podId
1940
+ * @param deskName
1941
+ * @param assetPath
1942
+ * @returns any Successful Response
1943
+ * @throws ApiError
1944
+ */
1945
+ static deskAssetGet(podId, deskName, assetPath) {
1946
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
1947
+ method: 'GET',
1948
+ url: '/pods/{pod_id}/desks/{desk_name}/assets/{asset_path}',
1949
+ path: {
1950
+ 'pod_id': podId,
1951
+ 'desk_name': deskName,
1952
+ 'asset_path': assetPath,
1953
+ },
1954
+ errors: {
1955
+ 422: `Validation Error`,
1956
+ },
1957
+ });
1958
+ }
1915
1959
  /**
1916
1960
  * Upload Desk Bundle
1917
1961
  * @param podId
@@ -1939,7 +1983,7 @@ class DesksService {
1939
1983
  * Download Desk Dist Archive
1940
1984
  * @param podId
1941
1985
  * @param deskName
1942
- * @returns any Successful Response
1986
+ * @returns binary Zip archive bytes
1943
1987
  * @throws ApiError
1944
1988
  */
1945
1989
  static deskDistArchiveGet(podId, deskName) {
@@ -1959,7 +2003,7 @@ class DesksService {
1959
2003
  * Download Desk Source Archive
1960
2004
  * @param podId
1961
2005
  * @param deskName
1962
- * @returns any Successful Response
2006
+ * @returns binary Zip archive bytes
1963
2007
  * @throws ApiError
1964
2008
  */
1965
2009
  static deskSourceArchiveGet(podId, deskName) {
@@ -1983,7 +2027,6 @@ exports.DesksService = DesksService;
1983
2027
  "use strict";
1984
2028
  Object.defineProperty(exports, "__esModule", { value: true });
1985
2029
  exports.FilesNamespace = void 0;
1986
- const FileNamespace_js_1 = require("./openapi_client/models/FileNamespace.js");
1987
2030
  const SearchMethod_js_1 = require("./openapi_client/models/SearchMethod.js");
1988
2031
  const FilesService_js_1 = require("./openapi_client/services/FilesService.js");
1989
2032
  function joinDatastorePath(basePath, leaf) {
@@ -2015,13 +2058,6 @@ function getBaseName(path) {
2015
2058
  }
2016
2059
  return normalized.slice(index + 1);
2017
2060
  }
2018
- function normalizeFileNamespace(namespace) {
2019
- const normalized = String(namespace ?? "").trim().toUpperCase();
2020
- if (normalized === FileNamespace_js_1.FileNamespace.PERSONAL || normalized === "PRIVATE") {
2021
- return FileNamespace_js_1.FileNamespace.PERSONAL;
2022
- }
2023
- return FileNamespace_js_1.FileNamespace.POD;
2024
- }
2025
2061
  class FilesNamespace {
2026
2062
  constructor(client, http, podId) {
2027
2063
  this.client = client;
@@ -2032,31 +2068,32 @@ class FilesNamespace {
2032
2068
  const payload = {
2033
2069
  path: joinDatastorePath(options.directoryPath ?? options.parentId, name),
2034
2070
  description: options.description,
2035
- namespace: normalizeFileNamespace(options.namespace),
2036
2071
  };
2037
2072
  return this.client.request(() => FilesService_js_1.FilesService.fileFolderCreate(this.podId(), payload));
2038
2073
  },
2039
2074
  };
2040
2075
  this.converted = {
2041
- get: (path, options = {}) => this.client.request(() => FilesService_js_1.FilesService.fileConvertedGet(this.podId(), path, normalizeFileNamespace(options.namespace))),
2042
- render: (path, options = {}) => this.client.request(() => FilesService_js_1.FilesService.fileConvertedRender(this.podId(), path, normalizeFileNamespace(options.namespace))),
2076
+ get: (path, options = {}) => (void options, this.client.request(() => FilesService_js_1.FilesService.fileConvertedGet(this.podId(), path))),
2077
+ render: (path, options = {}) => (void options, this.client.request(() => FilesService_js_1.FilesService.fileConvertedRender(this.podId(), path))),
2043
2078
  download: (path, artifact = "document.md", options = {}) => {
2079
+ void options;
2044
2080
  const encodedPath = encodeURIComponent(path);
2045
2081
  const encodedArtifact = encodeURIComponent(artifact);
2046
- const encodedNamespace = encodeURIComponent(normalizeFileNamespace(options.namespace));
2047
- return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/converted/download?path=${encodedPath}&artifact=${encodedArtifact}&namespace=${encodedNamespace}`);
2082
+ return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/converted/download?path=${encodedPath}&artifact=${encodedArtifact}`);
2048
2083
  },
2049
2084
  };
2050
2085
  }
2051
2086
  list(options = {}) {
2052
2087
  const directoryPath = options.directoryPath ?? options.parentId ?? "/";
2053
- return this.client.request(() => FilesService_js_1.FilesService.fileList(this.podId(), directoryPath, normalizeFileNamespace(options.namespace), options.limit ?? 100, options.pageToken));
2088
+ return this.client.request(() => FilesService_js_1.FilesService.fileList(this.podId(), directoryPath, options.limit ?? 100, options.pageToken));
2054
2089
  }
2055
2090
  get(path, options = {}) {
2056
- return this.client.request(() => FilesService_js_1.FilesService.fileGet(this.podId(), path, normalizeFileNamespace(options.namespace)));
2091
+ void options;
2092
+ return this.client.request(() => FilesService_js_1.FilesService.fileGet(this.podId(), path));
2057
2093
  }
2058
2094
  delete(path, options = {}) {
2059
- return this.client.request(() => FilesService_js_1.FilesService.fileDelete(this.podId(), path, normalizeFileNamespace(options.namespace)));
2095
+ void options;
2096
+ return this.client.request(() => FilesService_js_1.FilesService.fileDelete(this.podId(), path));
2060
2097
  }
2061
2098
  search(query, options = {}) {
2062
2099
  return this.client.request(() => FilesService_js_1.FilesService.fileSearch(this.podId(), {
@@ -2066,12 +2103,12 @@ class FilesNamespace {
2066
2103
  }));
2067
2104
  }
2068
2105
  download(path, options = {}) {
2106
+ void options;
2069
2107
  const encodedPath = encodeURIComponent(path);
2070
- const encodedNamespace = encodeURIComponent(normalizeFileNamespace(options.namespace));
2071
- return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/download?path=${encodedPath}&namespace=${encodedNamespace}`);
2108
+ return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/download?path=${encodedPath}`);
2072
2109
  }
2073
2110
  tree(options = {}) {
2074
- return this.client.request(() => FilesService_js_1.FilesService.fileTree(this.podId(), options.rootPath ?? "/", normalizeFileNamespace(options.namespace), options.filesPerDirectory ?? 3));
2111
+ return this.client.request(() => FilesService_js_1.FilesService.fileTree(this.podId(), options.rootPath ?? "/", options.filesPerDirectory ?? 3));
2075
2112
  }
2076
2113
  upload(file, options = {}) {
2077
2114
  const payload = {
@@ -2080,7 +2117,6 @@ class FilesNamespace {
2080
2117
  description: options.description,
2081
2118
  directory_path: options.directoryPath ?? options.parentId ?? "/",
2082
2119
  search_enabled: options.searchEnabled ?? true,
2083
- namespace: normalizeFileNamespace(options.namespace),
2084
2120
  };
2085
2121
  return this.client.request(() => FilesService_js_1.FilesService.fileUpload(this.podId(), payload));
2086
2122
  }
@@ -2099,28 +2135,12 @@ class FilesNamespace {
2099
2135
  description: options.description,
2100
2136
  new_path: resolvedNewPath,
2101
2137
  search_enabled: options.searchEnabled,
2102
- namespace: normalizeFileNamespace(options.namespace),
2103
2138
  };
2104
2139
  return this.client.request(() => FilesService_js_1.FilesService.fileUpdate(this.podId(), payload));
2105
2140
  }
2106
2141
  }
2107
2142
  exports.FilesNamespace = FilesNamespace;
2108
2143
 
2109
- },
2110
- "./openapi_client/models/FileNamespace.js": function (module, exports, require) {
2111
- "use strict";
2112
- Object.defineProperty(exports, "__esModule", { value: true });
2113
- exports.FileNamespace = void 0;
2114
- /* generated using openapi-typescript-codegen -- do not edit */
2115
- /* istanbul ignore file */
2116
- /* tslint:disable */
2117
- /* eslint-disable */
2118
- var FileNamespace;
2119
- (function (FileNamespace) {
2120
- FileNamespace["PERSONAL"] = "PERSONAL";
2121
- FileNamespace["POD"] = "POD";
2122
- })(FileNamespace || (exports.FileNamespace = FileNamespace = {}));
2123
-
2124
2144
  },
2125
2145
  "./openapi_client/models/SearchMethod.js": function (module, exports, require) {
2126
2146
  "use strict";
@@ -2142,7 +2162,6 @@ var SearchMethod;
2142
2162
  "use strict";
2143
2163
  Object.defineProperty(exports, "__esModule", { value: true });
2144
2164
  exports.FilesService = void 0;
2145
- const FileNamespace_js_1 = require("./openapi_client/models/FileNamespace.js");
2146
2165
  const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
2147
2166
  const request_js_1 = require("./openapi_client/core/request.js");
2148
2167
  class FilesService {
@@ -2150,13 +2169,12 @@ class FilesService {
2150
2169
  * List Files
2151
2170
  * @param podId
2152
2171
  * @param directoryPath
2153
- * @param namespace
2154
2172
  * @param limit
2155
2173
  * @param pageToken
2156
2174
  * @returns FileListResponse Successful Response
2157
2175
  * @throws ApiError
2158
2176
  */
2159
- static fileList(podId, directoryPath = '/', namespace = FileNamespace_js_1.FileNamespace.PERSONAL, limit = 100, pageToken) {
2177
+ static fileList(podId, directoryPath = '/', limit = 100, pageToken) {
2160
2178
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2161
2179
  method: 'GET',
2162
2180
  url: '/pods/{pod_id}/datastore/files',
@@ -2165,7 +2183,6 @@ class FilesService {
2165
2183
  },
2166
2184
  query: {
2167
2185
  'directory_path': directoryPath,
2168
- 'namespace': namespace,
2169
2186
  'limit': limit,
2170
2187
  'page_token': pageToken,
2171
2188
  },
@@ -2199,11 +2216,10 @@ class FilesService {
2199
2216
  * Delete File Or Folder
2200
2217
  * @param podId
2201
2218
  * @param path
2202
- * @param namespace
2203
2219
  * @returns DatastoreMessageResponse Successful Response
2204
2220
  * @throws ApiError
2205
2221
  */
2206
- static fileDelete(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
2222
+ static fileDelete(podId, path) {
2207
2223
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2208
2224
  method: 'DELETE',
2209
2225
  url: '/pods/{pod_id}/datastore/files/by-path',
@@ -2212,7 +2228,6 @@ class FilesService {
2212
2228
  },
2213
2229
  query: {
2214
2230
  'path': path,
2215
- 'namespace': namespace,
2216
2231
  },
2217
2232
  errors: {
2218
2233
  422: `Validation Error`,
@@ -2223,11 +2238,10 @@ class FilesService {
2223
2238
  * Get File
2224
2239
  * @param podId
2225
2240
  * @param path
2226
- * @param namespace
2227
2241
  * @returns FileResponse Successful Response
2228
2242
  * @throws ApiError
2229
2243
  */
2230
- static fileGet(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
2244
+ static fileGet(podId, path) {
2231
2245
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2232
2246
  method: 'GET',
2233
2247
  url: '/pods/{pod_id}/datastore/files/by-path',
@@ -2236,7 +2250,6 @@ class FilesService {
2236
2250
  },
2237
2251
  query: {
2238
2252
  'path': path,
2239
- 'namespace': namespace,
2240
2253
  },
2241
2254
  errors: {
2242
2255
  422: `Validation Error`,
@@ -2268,11 +2281,10 @@ class FilesService {
2268
2281
  * Get Converted File Metadata
2269
2282
  * @param podId
2270
2283
  * @param path
2271
- * @param namespace
2272
2284
  * @returns ConvertedFileResponse Successful Response
2273
2285
  * @throws ApiError
2274
2286
  */
2275
- static fileConvertedGet(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
2287
+ static fileConvertedGet(podId, path) {
2276
2288
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2277
2289
  method: 'GET',
2278
2290
  url: '/pods/{pod_id}/datastore/files/converted/by-path',
@@ -2281,7 +2293,6 @@ class FilesService {
2281
2293
  },
2282
2294
  query: {
2283
2295
  'path': path,
2284
- 'namespace': namespace,
2285
2296
  },
2286
2297
  errors: {
2287
2298
  422: `Validation Error`,
@@ -2293,11 +2304,10 @@ class FilesService {
2293
2304
  * @param podId
2294
2305
  * @param path
2295
2306
  * @param artifact
2296
- * @param namespace
2297
- * @returns any Successful Response
2307
+ * @returns binary File bytes
2298
2308
  * @throws ApiError
2299
2309
  */
2300
- static fileConvertedDownload(podId, path, artifact = 'document.md', namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
2310
+ static fileConvertedDownload(podId, path, artifact = 'document.md') {
2301
2311
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2302
2312
  method: 'GET',
2303
2313
  url: '/pods/{pod_id}/datastore/files/converted/download',
@@ -2307,7 +2317,6 @@ class FilesService {
2307
2317
  query: {
2308
2318
  'path': path,
2309
2319
  'artifact': artifact,
2310
- 'namespace': namespace,
2311
2320
  },
2312
2321
  errors: {
2313
2322
  422: `Validation Error`,
@@ -2318,11 +2327,10 @@ class FilesService {
2318
2327
  * Render Converted File As HTML
2319
2328
  * @param podId
2320
2329
  * @param path
2321
- * @param namespace
2322
- * @returns any Successful Response
2330
+ * @returns string Rendered HTML
2323
2331
  * @throws ApiError
2324
2332
  */
2325
- static fileConvertedRender(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
2333
+ static fileConvertedRender(podId, path) {
2326
2334
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2327
2335
  method: 'GET',
2328
2336
  url: '/pods/{pod_id}/datastore/files/converted/render',
@@ -2331,7 +2339,6 @@ class FilesService {
2331
2339
  },
2332
2340
  query: {
2333
2341
  'path': path,
2334
- 'namespace': namespace,
2335
2342
  },
2336
2343
  errors: {
2337
2344
  422: `Validation Error`,
@@ -2342,11 +2349,10 @@ class FilesService {
2342
2349
  * Download File
2343
2350
  * @param podId
2344
2351
  * @param path
2345
- * @param namespace
2346
- * @returns any Successful Response
2352
+ * @returns binary File bytes
2347
2353
  * @throws ApiError
2348
2354
  */
2349
- static fileDownload(podId, path, namespace = FileNamespace_js_1.FileNamespace.PERSONAL) {
2355
+ static fileDownload(podId, path) {
2350
2356
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2351
2357
  method: 'GET',
2352
2358
  url: '/pods/{pod_id}/datastore/files/download',
@@ -2355,7 +2361,6 @@ class FilesService {
2355
2361
  },
2356
2362
  query: {
2357
2363
  'path': path,
2358
- 'namespace': namespace,
2359
2364
  },
2360
2365
  errors: {
2361
2366
  422: `Validation Error`,
@@ -2408,12 +2413,11 @@ class FilesService {
2408
2413
  * Get Directory Tree
2409
2414
  * @param podId
2410
2415
  * @param rootPath
2411
- * @param namespace
2412
2416
  * @param filesPerDirectory
2413
2417
  * @returns DirectoryTreeResponse Successful Response
2414
2418
  * @throws ApiError
2415
2419
  */
2416
- static fileTree(podId, rootPath = '/', namespace = FileNamespace_js_1.FileNamespace.PERSONAL, filesPerDirectory = 3) {
2420
+ static fileTree(podId, rootPath = '/', filesPerDirectory = 3) {
2417
2421
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2418
2422
  method: 'GET',
2419
2423
  url: '/pods/{pod_id}/datastore/files/tree',
@@ -2422,7 +2426,6 @@ class FilesService {
2422
2426
  },
2423
2427
  query: {
2424
2428
  'root_path': rootPath,
2425
- 'namespace': namespace,
2426
2429
  'files_per_directory': filesPerDirectory,
2427
2430
  },
2428
2431
  errors: {
@@ -2505,7 +2508,7 @@ class FunctionsService {
2505
2508
  }
2506
2509
  /**
2507
2510
  * Create Function
2508
- * Create a new function in a pod
2511
+ * Create a new function in a pod. Do not send input_schema or output_schema; the platform derives those schemas from the function code and returns them in the response.
2509
2512
  * @param podId
2510
2513
  * @param requestBody
2511
2514
  * @returns FunctionResponse Successful Response
@@ -2569,7 +2572,7 @@ class FunctionsService {
2569
2572
  }
2570
2573
  /**
2571
2574
  * Update Function
2572
- * Update a function
2575
+ * Update a function. When code is supplied, the platform re-derives the function input_schema and output_schema and returns the refreshed function.
2573
2576
  * @param podId
2574
2577
  * @param functionName
2575
2578
  * @param requestBody
@@ -3776,6 +3779,30 @@ class PodMembersService {
3776
3779
  },
3777
3780
  });
3778
3781
  }
3782
+ /**
3783
+ * Update Member Roles
3784
+ * Update a pod member's roles
3785
+ * @param podId
3786
+ * @param podMemberId
3787
+ * @param requestBody
3788
+ * @returns PodMemberResponse Successful Response
3789
+ * @throws ApiError
3790
+ */
3791
+ static podMemberUpdateRoles(podId, podMemberId, requestBody) {
3792
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3793
+ method: 'PATCH',
3794
+ url: '/pods/{pod_id}/members/{pod_member_id}/roles',
3795
+ path: {
3796
+ 'pod_id': podId,
3797
+ 'pod_member_id': podMemberId,
3798
+ },
3799
+ body: requestBody,
3800
+ mediaType: 'application/json',
3801
+ errors: {
3802
+ 422: `Validation Error`,
3803
+ },
3804
+ });
3805
+ }
3779
3806
  }
3780
3807
  exports.PodMembersService = PodMembersService;
3781
3808
 
package/dist/index.d.ts CHANGED
@@ -32,7 +32,7 @@ export type { PodMembersNamespace } from "./namespaces/pod-members.js";
32
32
  export type { PodsNamespace } from "./namespaces/pods.js";
33
33
  export type { PodSurfacesNamespace } from "./namespaces/pod-surfaces.js";
34
34
  export type { RecordsNamespace } from "./namespaces/records.js";
35
- export type { ResourceType, ResourcesNamespace } from "./namespaces/resources.js";
35
+ export type { ResourceFileInfo, ResourceFileListResponse, ResourceFileUploadResponse, ResourceType, ResourcesNamespace, } from "./namespaces/resources.js";
36
36
  export type { ScheduleListOptions, SchedulesNamespace } from "./namespaces/schedules.js";
37
37
  export type { TablesNamespace } from "./namespaces/tables.js";
38
38
  export type { UsersNamespace } from "./namespaces/users.js";
@@ -1,5 +1,7 @@
1
1
  import type { HttpClient } from "../http.js";
2
2
  import type { ConversationListResponse } from "../openapi_client/models/ConversationListResponse.js";
3
+ import type { ConversationStatus } from "../openapi_client/models/ConversationStatus.js";
4
+ import type { ConversationType } from "../openapi_client/models/ConversationType.js";
3
5
  import type { CreateConversationRequest } from "../openapi_client/models/CreateConversationRequest.js";
4
6
  import type { SendMessageRequest } from "../openapi_client/models/SendMessageRequest.js";
5
7
  import type { UpdateConversationRequest } from "../openapi_client/models/UpdateConversationRequest.js";
@@ -21,11 +23,15 @@ export declare class ConversationsNamespace {
21
23
  list(options?: {
22
24
  agent_name?: string | null;
23
25
  pod_id?: string | null;
26
+ status?: ConversationStatus | `${ConversationStatus}` | null;
27
+ type?: ConversationType | `${ConversationType}` | null;
24
28
  limit?: number;
25
29
  page_token?: string | null;
26
30
  }): Promise<ConversationListResponse>;
27
31
  listByAgent(agentName: string, options?: {
28
32
  pod_id?: string | null;
33
+ status?: ConversationStatus | `${ConversationStatus}` | null;
34
+ type?: ConversationType | `${ConversationType}` | null;
29
35
  limit?: number;
30
36
  page_token?: string | null;
31
37
  }): Promise<ConversationListResponse>;
@@ -55,6 +55,8 @@ export class ConversationsNamespace {
55
55
  return this.http.request("GET", `/pods/${podId}/conversations`, {
56
56
  params: {
57
57
  agent_name: options.agent_name,
58
+ status: options.status,
59
+ type: options.type,
58
60
  limit: options.limit ?? 20,
59
61
  page_token: options.page_token,
60
62
  },
@@ -1,4 +1,3 @@
1
- import { FileNamespace } from "../openapi_client/models/FileNamespace.js";
2
1
  import { SearchMethod } from "../openapi_client/models/SearchMethod.js";
3
2
  import { FilesService } from "../openapi_client/services/FilesService.js";
4
3
  function joinDatastorePath(basePath, leaf) {
@@ -30,13 +29,6 @@ function getBaseName(path) {
30
29
  }
31
30
  return normalized.slice(index + 1);
32
31
  }
33
- function normalizeFileNamespace(namespace) {
34
- const normalized = String(namespace ?? "").trim().toUpperCase();
35
- if (normalized === FileNamespace.PERSONAL || normalized === "PRIVATE") {
36
- return FileNamespace.PERSONAL;
37
- }
38
- return FileNamespace.POD;
39
- }
40
32
  export class FilesNamespace {
41
33
  client;
42
34
  http;
@@ -48,13 +40,15 @@ export class FilesNamespace {
48
40
  }
49
41
  list(options = {}) {
50
42
  const directoryPath = options.directoryPath ?? options.parentId ?? "/";
51
- return this.client.request(() => FilesService.fileList(this.podId(), directoryPath, normalizeFileNamespace(options.namespace), options.limit ?? 100, options.pageToken));
43
+ return this.client.request(() => FilesService.fileList(this.podId(), directoryPath, options.limit ?? 100, options.pageToken));
52
44
  }
53
45
  get(path, options = {}) {
54
- return this.client.request(() => FilesService.fileGet(this.podId(), path, normalizeFileNamespace(options.namespace)));
46
+ void options;
47
+ return this.client.request(() => FilesService.fileGet(this.podId(), path));
55
48
  }
56
49
  delete(path, options = {}) {
57
- return this.client.request(() => FilesService.fileDelete(this.podId(), path, normalizeFileNamespace(options.namespace)));
50
+ void options;
51
+ return this.client.request(() => FilesService.fileDelete(this.podId(), path));
58
52
  }
59
53
  search(query, options = {}) {
60
54
  return this.client.request(() => FilesService.fileSearch(this.podId(), {
@@ -64,12 +58,12 @@ export class FilesNamespace {
64
58
  }));
65
59
  }
66
60
  download(path, options = {}) {
61
+ void options;
67
62
  const encodedPath = encodeURIComponent(path);
68
- const encodedNamespace = encodeURIComponent(normalizeFileNamespace(options.namespace));
69
- return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/download?path=${encodedPath}&namespace=${encodedNamespace}`);
63
+ return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/download?path=${encodedPath}`);
70
64
  }
71
65
  tree(options = {}) {
72
- return this.client.request(() => FilesService.fileTree(this.podId(), options.rootPath ?? "/", normalizeFileNamespace(options.namespace), options.filesPerDirectory ?? 3));
66
+ return this.client.request(() => FilesService.fileTree(this.podId(), options.rootPath ?? "/", options.filesPerDirectory ?? 3));
73
67
  }
74
68
  upload(file, options = {}) {
75
69
  const payload = {
@@ -78,7 +72,6 @@ export class FilesNamespace {
78
72
  description: options.description,
79
73
  directory_path: options.directoryPath ?? options.parentId ?? "/",
80
74
  search_enabled: options.searchEnabled ?? true,
81
- namespace: normalizeFileNamespace(options.namespace),
82
75
  };
83
76
  return this.client.request(() => FilesService.fileUpload(this.podId(), payload));
84
77
  }
@@ -97,7 +90,6 @@ export class FilesNamespace {
97
90
  description: options.description,
98
91
  new_path: resolvedNewPath,
99
92
  search_enabled: options.searchEnabled,
100
- namespace: normalizeFileNamespace(options.namespace),
101
93
  };
102
94
  return this.client.request(() => FilesService.fileUpdate(this.podId(), payload));
103
95
  }
@@ -106,19 +98,18 @@ export class FilesNamespace {
106
98
  const payload = {
107
99
  path: joinDatastorePath(options.directoryPath ?? options.parentId, name),
108
100
  description: options.description,
109
- namespace: normalizeFileNamespace(options.namespace),
110
101
  };
111
102
  return this.client.request(() => FilesService.fileFolderCreate(this.podId(), payload));
112
103
  },
113
104
  };
114
105
  converted = {
115
- get: (path, options = {}) => this.client.request(() => FilesService.fileConvertedGet(this.podId(), path, normalizeFileNamespace(options.namespace))),
116
- render: (path, options = {}) => this.client.request(() => FilesService.fileConvertedRender(this.podId(), path, normalizeFileNamespace(options.namespace))),
106
+ get: (path, options = {}) => (void options, this.client.request(() => FilesService.fileConvertedGet(this.podId(), path))),
107
+ render: (path, options = {}) => (void options, this.client.request(() => FilesService.fileConvertedRender(this.podId(), path))),
117
108
  download: (path, artifact = "document.md", options = {}) => {
109
+ void options;
118
110
  const encodedPath = encodeURIComponent(path);
119
111
  const encodedArtifact = encodeURIComponent(artifact);
120
- const encodedNamespace = encodeURIComponent(normalizeFileNamespace(options.namespace));
121
- return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/converted/download?path=${encodedPath}&artifact=${encodedArtifact}&namespace=${encodedNamespace}`);
112
+ return this.http.requestBytes("GET", `/pods/${this.podId()}/datastore/files/converted/download?path=${encodedPath}&artifact=${encodedArtifact}`);
122
113
  },
123
114
  };
124
115
  }
@@ -1,8 +1,24 @@
1
1
  import type { HttpClient } from "../http.js";
2
- import type { FileUploadResponse } from "../openapi_client/models/FileUploadResponse.js";
3
- import type { ResourceFileListResponse } from "../openapi_client/models/ResourceFileListResponse.js";
4
- import type { ResourceType as OpenApiResourceType } from "../openapi_client/models/ResourceType.js";
5
- export type ResourceType = `${OpenApiResourceType}`;
2
+ export type ResourceType = "pod" | "conversation" | (string & {});
3
+ export interface ResourceFileInfo {
4
+ created?: string | null;
5
+ last_modified?: string | null;
6
+ name: string;
7
+ path: string;
8
+ size?: number | null;
9
+ type: "file" | "directory" | (string & {});
10
+ }
11
+ export interface ResourceFileListResponse {
12
+ items: ResourceFileInfo[];
13
+ limit: number;
14
+ next_page_token?: string | null;
15
+ }
16
+ export interface ResourceFileUploadResponse {
17
+ file_name: string;
18
+ message: string;
19
+ path: string;
20
+ success: boolean;
21
+ }
6
22
  export declare class ResourcesNamespace {
7
23
  private readonly http;
8
24
  constructor(http: HttpClient);
@@ -14,7 +30,7 @@ export declare class ResourcesNamespace {
14
30
  upload(resourceType: ResourceType, resourceId: string, file: Blob, options?: {
15
31
  path?: string;
16
32
  name?: string;
17
- }): Promise<FileUploadResponse>;
33
+ }): Promise<ResourceFileUploadResponse>;
18
34
  delete(resourceType: ResourceType, resourceId: string, filePath: string): Promise<Record<string, unknown>>;
19
35
  download(resourceType: ResourceType, resourceId: string, filePath: string): Promise<Blob>;
20
36
  }