primitive-functions 0.2.0-alpha.12 → 0.2.0-alpha.13

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 (2) hide show
  1. package/index.d.ts +7 -44
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -114,7 +114,7 @@ export interface PrimitivePlatformError extends Error {
114
114
 
115
115
  /**
116
116
  * The typed HTTP profile, generated from the platform's OpenAPI document. Its
117
- * namespaces mirror the operation ids: analytics, blobBuckets, channels, collections, configVars, connections, databaseTypeConfigs, databases, documents, email, functions, gemini, groups, integrations, llm, locks, notifications, prompts, resourceMetadata, secrets, users.
117
+ * namespaces mirror the operation ids: analytics, blobBuckets, channels, collections, configVars, connections, databaseTypeConfigs, databases, documents, email, functions, groups, integrations, locks, notifications, prompts, resourceMetadata, secrets, users.
118
118
  * Methods take one options object carrying the operation's path parameters,
119
119
  * query parameters, request headers (under their wire names) and `body`.
120
120
  *
@@ -770,6 +770,7 @@ export interface FunctionApi {
770
770
  "delete"(args: {
771
771
  "scope": string | number;
772
772
  "aliasKey": string | number;
773
+ "userId"?: string | number | boolean;
773
774
  }): Promise<any>;
774
775
  /** `documents.aliases.listForDocument` — GET /documents/{documentId}/aliases. List aliases bound to a document */
775
776
  "listForDocument"(args: {
@@ -779,6 +780,7 @@ export interface FunctionApi {
779
780
  "resolve"(args: {
780
781
  "scope": string | number;
781
782
  "aliasKey": string | number;
783
+ "userId"?: string | number | boolean;
782
784
  }): Promise<any>;
783
785
  /** `documents.aliases.set` — PUT /document-aliases/{scope}/{aliasKey}. Bind a (scope, aliasKey) alias to a document */
784
786
  "set"(args: {
@@ -1141,35 +1143,6 @@ export interface FunctionApi {
1141
1143
  body?: unknown;
1142
1144
  }): Promise<any>;
1143
1145
  };
1144
- "gemini": {
1145
- /**
1146
- * `gemini.countTokens` — POST /gemini/count-tokens. Count tokens for a Gemini request
1147
- * @deprecated These direct proxy routes will be removed in the next major release of the platform server. Run a managed prompt from a server function instead: `ctx.prompts.run` (see the Server Functions guide).
1148
- */
1149
- "countTokens"(args: {
1150
- body: unknown;
1151
- }): Promise<any>;
1152
- /**
1153
- * `gemini.generate` — POST /gemini/generate. Generate content with Gemini
1154
- * @deprecated These direct proxy routes will be removed in the next major release of the platform server. Run a managed prompt from a server function instead: `ctx.prompts.run` (see the Server Functions guide).
1155
- */
1156
- "generate"(args: {
1157
- body: unknown;
1158
- }): Promise<any>;
1159
- /**
1160
- * `gemini.generateRaw` — POST /gemini/generate-raw. Generate content with Gemini (raw passthrough)
1161
- * @deprecated These direct proxy routes will be removed in the next major release of the platform server. Run a managed prompt from a server function instead: `ctx.prompts.run` (see the Server Functions guide).
1162
- */
1163
- "generateRaw"(args: {
1164
- "model"?: string | number | boolean;
1165
- body: unknown;
1166
- }): Promise<any>;
1167
- /**
1168
- * `gemini.models` — GET /gemini/models. List available Gemini models
1169
- * @deprecated These direct proxy routes will be removed in the next major release of the platform server. Run a managed prompt from a server function instead: `ctx.prompts.run` (see the Server Functions guide).
1170
- */
1171
- "models"(args?: Record<string, never>): Promise<any>;
1172
- };
1173
1146
  "groups": {
1174
1147
  /** `groups.addMember` — POST /groups/{groupType}/{groupId}/members. Add a member to a group */
1175
1148
  "addMember"(args: {
@@ -1259,20 +1232,6 @@ export interface FunctionApi {
1259
1232
  "integrationKey": string | number;
1260
1233
  }): Promise<any>;
1261
1234
  };
1262
- "llm": {
1263
- /**
1264
- * `llm.chat` — POST /llm/chat. Run an LLM chat completion
1265
- * @deprecated These direct proxy routes will be removed in the next major release of the platform server. Run a managed prompt from a server function instead: `ctx.prompts.run` (see the Server Functions guide).
1266
- */
1267
- "chat"(args: {
1268
- body: unknown;
1269
- }): Promise<any>;
1270
- /**
1271
- * `llm.models` — GET /llm/models. List available LLM models
1272
- * @deprecated These direct proxy routes will be removed in the next major release of the platform server. Run a managed prompt from a server function instead: `ctx.prompts.run` (see the Server Functions guide).
1273
- */
1274
- "models"(args?: Record<string, never>): Promise<any>;
1275
- };
1276
1235
  "locks": {
1277
1236
  /** `locks.list` — GET /locks. List all currently-held named locks in the app */
1278
1237
  "list"(args?: Record<string, never>): Promise<any>;
@@ -1383,6 +1342,10 @@ export interface FunctionApi {
1383
1342
  "getProfiles"(args: {
1384
1343
  body: unknown;
1385
1344
  }): Promise<any>;
1345
+ /** `users.getRootDocument` — GET /users/{userId}/root-document. Get an app user's root document id */
1346
+ "getRootDocument"(args: {
1347
+ "userId": string | number;
1348
+ }): Promise<any>;
1386
1349
  /** `users.list` — GET /users. List app users */
1387
1350
  "list"(args?: {
1388
1351
  "email"?: string | number | boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primitive-functions",
3
- "version": "0.2.0-alpha.12",
3
+ "version": "0.2.0-alpha.13",
4
4
  "description": "The module a Primitive server function imports. Supplied by the platform at invoke time; reserved here so the name is ours before the runtime lands.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Primitive LLC",