@lunnoa/client 1.3.0 → 1.5.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.
package/dist/index.js CHANGED
@@ -1082,7 +1082,7 @@ var EntityTypesResource = class {
1082
1082
  }
1083
1083
  http;
1084
1084
  /**
1085
- * Lists entity types in the workspace. Request
1085
+ * Lists entity types granted to the API key's workspace. Request
1086
1086
  * `expansion: ['attributeSchema', 'stateSchema']` for the field and state
1087
1087
  * machine definitions the codegen CLI builds types from.
1088
1088
  */
@@ -1107,7 +1107,9 @@ var EntityTypesResource = class {
1107
1107
  });
1108
1108
  }
1109
1109
  /**
1110
- * Creates or updates an entity type by workspace-scoped slug.
1110
+ * Creates or updates an entity type by deployment-wide slug.
1111
+ * A new slug is granted to the API key's workspace. A slug already shared
1112
+ * with another workspace is rejected unless the key belongs to a platform admin.
1111
1113
  * Prefer the CLI (`npx @lunnoa/client entity-types deploy`) for happy-path deploy.
1112
1114
  */
1113
1115
  upsertBySlug(definition) {
@@ -1121,6 +1123,35 @@ var EntityTypesResource = class {
1121
1123
  }
1122
1124
  };
1123
1125
 
1126
+ // src/resources/tables.ts
1127
+ var TablesResource = class {
1128
+ constructor(http) {
1129
+ this.http = http;
1130
+ }
1131
+ http;
1132
+ /** Lists tables in the API key's workspace (without columns and rows). */
1133
+ list(options = {}) {
1134
+ return this.http.get("/api/tables", {
1135
+ query: { projectId: options.projectId }
1136
+ });
1137
+ }
1138
+ /** Returns a single table by ID, including columns and rows. */
1139
+ get(id) {
1140
+ return this.http.get(`/api/tables/${id}`);
1141
+ }
1142
+ /** Returns a single table by its workspace slug, including columns and rows. */
1143
+ getBySlug(slug) {
1144
+ return this.http.get(`/api/tables/slug/${slug}`);
1145
+ }
1146
+ /**
1147
+ * Creates or updates a table by workspace slug. Omitted columns or rows
1148
+ * keep their current value. Marks `managedByCode` by default.
1149
+ */
1150
+ upsertBySlug(input) {
1151
+ return this.http.post("/api/tables/upsert", { body: input });
1152
+ }
1153
+ };
1154
+
1124
1155
  // src/resources/approvals.ts
1125
1156
  var ApprovalsResource = class {
1126
1157
  constructor(http) {
@@ -2105,6 +2136,8 @@ var LunnoaClient = class {
2105
2136
  approvals;
2106
2137
  entities;
2107
2138
  entityTypes;
2139
+ /** Small reference / lookup tables (rows stored inline; use entities for transactional data). */
2140
+ tables;
2108
2141
  knowledge;
2109
2142
  queues;
2110
2143
  queueItems;
@@ -2128,6 +2161,7 @@ var LunnoaClient = class {
2128
2161
  this.workflows = new WorkflowsResource(this.http, this.executions);
2129
2162
  this.entities = new EntitiesResource(this.http);
2130
2163
  this.entityTypes = new EntityTypesResource(this.http);
2164
+ this.tables = new TablesResource(this.http);
2131
2165
  this.knowledge = new KnowledgeResource(this.http);
2132
2166
  this.queues = new QueuesResource(this.http);
2133
2167
  this.queueItems = new QueueItemsResource(this.http);
@@ -2211,6 +2245,6 @@ function createServerClient(options) {
2211
2245
  });
2212
2246
  }
2213
2247
 
2214
- export { API_KEY_PREFIX, ActionsResource, AgentChatClient, AgentChatStream, AgentsResource, ApprovalsResource, AuthResource, ConnectionsResource, DEFINE_KINDS, DiscoveryResource, EntitiesResource, EntityTypesResource, ExecutionProgressStream, ExecutionTimeoutError, ExecutionsResource, HttpClient, KnowledgeResource, LunnoaApiError, LunnoaClient, ProjectsResource, QueueItemsResource, QueuesResource, RunsResource, ScorecardsResource, SsoAuthResource, TasksResource, VariablesResource, WorkflowAppsResource, WorkflowsResource, assertApiKeyAllowedInEnvironment, createBrowserClient, createLocalStorageTokenStore, createMemoryTokenStore, createServerClient, defineAction, defineAgent, defineAiConnection, defineConnection, defineEntityType, defineWorkflow, entityTypeDefinitionToUpsert, isBrowserEnvironment, isLoginRequires2FA, iterateOffset, iteratePages, parseSseEvents, parseSseStream, resolveActionAppId, resolveActionId };
2248
+ export { API_KEY_PREFIX, ActionsResource, AgentChatClient, AgentChatStream, AgentsResource, ApprovalsResource, AuthResource, ConnectionsResource, DEFINE_KINDS, DiscoveryResource, EntitiesResource, EntityTypesResource, ExecutionProgressStream, ExecutionTimeoutError, ExecutionsResource, HttpClient, KnowledgeResource, LunnoaApiError, LunnoaClient, ProjectsResource, QueueItemsResource, QueuesResource, RunsResource, ScorecardsResource, SsoAuthResource, TablesResource, TasksResource, VariablesResource, WorkflowAppsResource, WorkflowsResource, assertApiKeyAllowedInEnvironment, createBrowserClient, createLocalStorageTokenStore, createMemoryTokenStore, createServerClient, defineAction, defineAgent, defineAiConnection, defineConnection, defineEntityType, defineWorkflow, entityTypeDefinitionToUpsert, isBrowserEnvironment, isLoginRequires2FA, iterateOffset, iteratePages, parseSseEvents, parseSseStream, resolveActionAppId, resolveActionId };
2215
2249
  //# sourceMappingURL=index.js.map
2216
2250
  //# sourceMappingURL=index.js.map