@lotics/cli 0.38.0 → 0.40.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.
@@ -96,6 +96,7 @@ function readAppMeta(projectDir) {
96
96
  // App row's icon/theme is preserved.
97
97
  icon: pkg.lotics.icon,
98
98
  theme: pkg.lotics.theme,
99
+ capabilities: pkg.lotics.capabilities,
99
100
  };
100
101
  }
101
102
  function writeAppMeta(projectDir, meta) {
@@ -349,6 +350,12 @@ export async function appDeploy(client, args) {
349
350
  // declares them (undefined ⇒ omitted ⇒ App row left untouched).
350
351
  icon: meta.icon,
351
352
  theme: meta.theme,
353
+ // Capabilities are manifest-authoritative (like workflows/queries, not
354
+ // like icon/theme): always send, defaulting to `{}` when the manifest
355
+ // declares none — so deleting the `capabilities` block turns every
356
+ // capability OFF on the next deploy (fail-safe; the declaration is the
357
+ // grant). The manifest is the only writer of capabilities.
358
+ capabilities: meta.capabilities ?? {},
352
359
  // Opt into destructive workflow removal. Default false — the server
353
360
  // rejects deploys whose manifest is missing aliases the App row has.
354
361
  force_workflow_sync: args.forceWorkflowSync,
package/dist/client.d.ts CHANGED
@@ -1,3 +1,24 @@
1
+ /** One sort key forwarded to the app query RPC (wire shape of a `TableRecordSort` entry). */
2
+ export interface AppQuerySortKey {
3
+ field_key: string;
4
+ order: "asc" | "desc";
5
+ }
6
+ /** A filter condition over one output column (wire shape of a `TableRecordFilters` node). */
7
+ export interface AppQueryFilterCondition {
8
+ node_type: "condition";
9
+ field_key: string;
10
+ type?: string;
11
+ operator: string;
12
+ value?: unknown;
13
+ }
14
+ /** A boolean group of filter nodes (wire shape — recursive). */
15
+ export interface AppQueryFilterGroup {
16
+ node_type: "group";
17
+ logic: "and" | "or";
18
+ children: Array<AppQueryFilterCondition | AppQueryFilterGroup>;
19
+ }
20
+ /** Runtime filter/sort the app query RPC applies AFTER the named query, bounded to its output columns. */
21
+ export type AppQueryFilter = AppQueryFilterCondition | AppQueryFilterGroup;
1
22
  export interface LoticsClientOptions {
2
23
  apiKey: string;
3
24
  workspaceId?: string;
@@ -132,8 +153,12 @@ export declare class LoticsClient {
132
153
  params?: Record<string, unknown>;
133
154
  limit?: number;
134
155
  offset?: number;
156
+ sort?: AppQuerySortKey[];
157
+ filter?: AppQueryFilter;
158
+ count?: boolean;
135
159
  }): Promise<{
136
160
  rows: unknown[];
161
+ total?: number;
137
162
  }>;
138
163
  appMembers(app_id: string, group_id?: string): Promise<{
139
164
  members: Array<{
@@ -215,6 +240,15 @@ export declare class LoticsClient {
215
240
  */
216
241
  icon?: string;
217
242
  theme?: Record<string, unknown>;
243
+ /**
244
+ * Opt-in app capabilities from `package.json#lotics.capabilities`. The CLI
245
+ * sends this on every deploy (defaulting to `{}`): the manifest is
246
+ * authoritative, so an empty/absent block turns every capability off.
247
+ * `comments: true` enables the members-only `useComments` primitive.
248
+ */
249
+ capabilities?: {
250
+ comments?: boolean;
251
+ };
218
252
  /**
219
253
  * Opt into destructive workflow removal. When false/absent, the server
220
254
  * rejects a deploy whose `workflows` map is missing aliases that exist
package/dist/client.js CHANGED
@@ -230,6 +230,12 @@ export class LoticsClient {
230
230
  if (args.theme !== undefined) {
231
231
  formData.append("theme", JSON.stringify(args.theme));
232
232
  }
233
+ // capabilities is manifest-authoritative — the caller always passes it
234
+ // (`{}` when none declared), so a deploy turns off any capability the
235
+ // manifest no longer declares. JSON-encoded.
236
+ if (args.capabilities !== undefined) {
237
+ formData.append("capabilities", JSON.stringify(args.capabilities));
238
+ }
233
239
  // Only post the override flag when the user explicitly opts in. The
234
240
  // server defaults to "honor the guard" — opt-in is loud, opt-out
235
241
  // requires intent.
@@ -30,6 +30,9 @@ export async function dispatchRpc(client, body) {
30
30
  params: p.params,
31
31
  limit: p.limit,
32
32
  offset: p.offset,
33
+ sort: p.sort,
34
+ filter: p.filter,
35
+ count: p.count,
33
36
  });
34
37
  }
35
38
  case "workflow": {