@apotech-os/cli 7.3.0 → 7.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
@@ -22986,8 +22986,11 @@ var AppRoleSchema = external_exports.object({
22986
22986
  /**
22987
22987
  * Framework primitive capabilities granted to the app token.
22988
22988
  * Each string is a capability name: 'inbox', 'prompts', 'langfuse',
22989
- * 'agents', 'quality', 'llm', … Absence means the capability is denied
22990
- * (deny-by-default, backward-compatible).
22989
+ * 'agents', 'quality', 'llm', 'images', … Absence means the capability is
22990
+ * denied (deny-by-default, backward-compatible).
22991
+ *
22992
+ * 'images' unlocks `ctx.api.images.*`. Like 'llm' it spends instance money,
22993
+ * so installing an app that declares it needs a platform admin.
22991
22994
  *
22992
22995
  * 4.0.0 — `'llm'` remplace `role.actions: [{ provider: 'llm', … }]`. Le LLM
22993
22996
  * est délibérément HORS du système de scopes (spec §5-13) : il n'a pas de
@@ -23088,7 +23091,8 @@ var AgentDeclarationSchema = external_exports.object({
23088
23091
  description: external_exports.string().optional(),
23089
23092
  /** Immutable once created — the server never updates it. */
23090
23093
  type: external_exports.enum(["chat", "classifier"]).optional(),
23091
- provider: external_exports.enum(["openai", "anthropic"]).optional(),
23094
+ /** `openrouter`: any model of OpenRouter's catalogue (`vendor/model`), chat agents only. */
23095
+ provider: external_exports.enum(["openai", "anthropic", "openrouter"]).optional(),
23092
23096
  model: external_exports.string().optional(),
23093
23097
  /** System prompt: seeded as Langfuse v1, re-versioned when the app changes it. */
23094
23098
  prompt: external_exports.string().min(1),
@@ -23679,6 +23683,11 @@ function checkManifestSemantics(manifest) {
23679
23683
  errors.push(`agents: duplicate slug '${agent.slug}' \u2014 each declared agent needs its own`);
23680
23684
  }
23681
23685
  agentSlugs.add(agent.slug);
23686
+ if (agent.type === "classifier" && agent.provider !== void 0 && agent.provider !== "openai") {
23687
+ errors.push(
23688
+ `agents.${agent.slug}.provider: a classifier agent runs on OpenAI only \u2014 '${agent.provider}' is not supported`
23689
+ );
23690
+ }
23682
23691
  errors.push(...checkSuggestedToolBindings(agent));
23683
23692
  }
23684
23693
  errors.push(...checkPromptsCapabilityPairing(manifest));
@@ -24313,6 +24322,155 @@ var INTEGRATION_CATALOG = {
24313
24322
  }
24314
24323
  }
24315
24324
  },
24325
+ "google-drive": {
24326
+ displayName: "Google Drive",
24327
+ description: "Lecture des fichiers (Excel, CSV, PDF, images) et d\xE9p\xF4t de nouveaux fichiers dans les dossiers Drive partag\xE9s avec le compte de service, dossier par dossier et application par application.",
24328
+ authKind: "service_account",
24329
+ events: [],
24330
+ hasWebhooks: false,
24331
+ supportsGenericRequest: true,
24332
+ scopeCatalog: [
24333
+ {
24334
+ name: "read_drive_files",
24335
+ label: "Lire les fichiers des dossiers Drive autoris\xE9s",
24336
+ description: "Lister, chercher, consulter les m\xE9tadonn\xE9es, t\xE9l\xE9charger, exporter et afficher les miniatures des fichiers des dossiers autoris\xE9s pour l\u2019application."
24337
+ },
24338
+ {
24339
+ name: "write_drive_files",
24340
+ label: "D\xE9poser des fichiers dans les dossiers Drive autoris\xE9s",
24341
+ description: "Cr\xE9er des dossiers et d\xE9poser de NOUVEAUX fichiers dans les dossiers autoris\xE9s. Jamais d\u2019\xE9crasement, de renommage, de d\xE9placement, de suppression ni de changement de partage."
24342
+ }
24343
+ ],
24344
+ actions: {
24345
+ createFolder: {
24346
+ description: "Create a sub-folder in `parentId`. Idempotent: when a folder with that exact name already exists there, it is returned with `created: false`. A service account has no storage of its own: write into a shared drive (507 NO_STORAGE otherwise). Folder shared as Viewer only: 403 FOLDER_NOT_SHARED. Access requires both: the folder shared with the service account (`getServiceAccount`) \u2014 Viewer to read, Editor/Contributor to write \u2014 AND the folder (or one of its ancestors) in the app's allowed folders, set by an admin in Settings \u203A Applications \u203A app \u203A Integrations (empty list = no access). Outside the allowed folders: 403 RESOURCE_NOT_GRANTED. Unknown or unshared id: 404 FILE_NOT_FOUND. `path` is relative to the allowed folder, file name included.",
24347
+ destructive: true,
24348
+ agentExposable: false,
24349
+ requiresApproval: false,
24350
+ scopes: ["write_drive_files"]
24351
+ },
24352
+ downloadFile: {
24353
+ description: "Download a binary file (Excel, CSV, PDF, image) as base64 \u2014 exact bytes. Capped at `maxBytes` (default 10 MB, max 25 MB): 413 FILE_TOO_LARGE beyond. A native Google file (Sheets, Docs) has no bytes: use exportFile. In a workflow, decode and process the content in the SAME step \u2014 never return `contentBase64` from a step. Access requires both: the folder shared with the service account (`getServiceAccount`) \u2014 Viewer to read, Editor/Contributor to write \u2014 AND the folder (or one of its ancestors) in the app's allowed folders, set by an admin in Settings \u203A Applications \u203A app \u203A Integrations (empty list = no access). Outside the allowed folders: 403 RESOURCE_NOT_GRANTED. Unknown or unshared id: 404 FILE_NOT_FOUND. `path` is relative to the allowed folder, file name included.",
24354
+ destructive: false,
24355
+ agentExposable: false,
24356
+ requiresApproval: false,
24357
+ scopes: ["read_drive_files"]
24358
+ },
24359
+ exportFile: {
24360
+ description: "Export a native Google file (Sheets, Docs, Slides) as xlsx, csv (first sheet only) or pdf, base64. Same cap as downloadFile; Google itself refuses exports above 10 MB. Access requires both: the folder shared with the service account (`getServiceAccount`) \u2014 Viewer to read, Editor/Contributor to write \u2014 AND the folder (or one of its ancestors) in the app's allowed folders, set by an admin in Settings \u203A Applications \u203A app \u203A Integrations (empty list = no access). Outside the allowed folders: 403 RESOURCE_NOT_GRANTED. Unknown or unshared id: 404 FILE_NOT_FOUND. `path` is relative to the allowed folder, file name included.",
24361
+ destructive: false,
24362
+ agentExposable: false,
24363
+ requiresApproval: false,
24364
+ scopes: ["read_drive_files"]
24365
+ },
24366
+ getFile: {
24367
+ description: "Get one file's or folder's metadata (name, mimeType, size, modifiedTime, parents, webViewLink) and its `path` from the allowed folder. Access requires both: the folder shared with the service account (`getServiceAccount`) \u2014 Viewer to read, Editor/Contributor to write \u2014 AND the folder (or one of its ancestors) in the app's allowed folders, set by an admin in Settings \u203A Applications \u203A app \u203A Integrations (empty list = no access). Outside the allowed folders: 403 RESOURCE_NOT_GRANTED. Unknown or unshared id: 404 FILE_NOT_FOUND. `path` is relative to the allowed folder, file name included.",
24368
+ destructive: false,
24369
+ agentExposable: false,
24370
+ requiresApproval: false,
24371
+ scopes: ["read_drive_files"]
24372
+ },
24373
+ getServiceAccount: {
24374
+ description: "Get the email address of the platform service account \u2014 the address a Drive folder must be shared with (Viewer to read, Editor/Contributor to write). Calls nothing at Google.",
24375
+ destructive: false,
24376
+ agentExposable: true,
24377
+ requiresApproval: false,
24378
+ scopes: []
24379
+ },
24380
+ getThumbnail: {
24381
+ description: "Get the thumbnail Google generated for a file (image, PDF, video\u2026), base64, or null when there is none. Capped at `maxBytes` (default 100 KB). Access requires both: the folder shared with the service account (`getServiceAccount`) \u2014 Viewer to read, Editor/Contributor to write \u2014 AND the folder (or one of its ancestors) in the app's allowed folders, set by an admin in Settings \u203A Applications \u203A app \u203A Integrations (empty list = no access). Outside the allowed folders: 403 RESOURCE_NOT_GRANTED. Unknown or unshared id: 404 FILE_NOT_FOUND. `path` is relative to the allowed folder, file name included.",
24382
+ destructive: false,
24383
+ agentExposable: false,
24384
+ requiresApproval: false,
24385
+ scopes: ["read_drive_files"]
24386
+ },
24387
+ listFolder: {
24388
+ description: "List the files and folders of a folder (shared drives included). `recursive` walks sub-folders (500 folders max); `modifiedSince` (RFC 3339) and `mimeTypes` filter files; a sub-folder is returned only when it matches the filters itself. Pages may hold fewer than `pageSize` entries: follow `nextPageToken` until absent. Access requires both: the folder shared with the service account (`getServiceAccount`) \u2014 Viewer to read, Editor/Contributor to write \u2014 AND the folder (or one of its ancestors) in the app's allowed folders, set by an admin in Settings \u203A Applications \u203A app \u203A Integrations (empty list = no access). Outside the allowed folders: 403 RESOURCE_NOT_GRANTED. Unknown or unshared id: 404 FILE_NOT_FOUND. `path` is relative to the allowed folder, file name included.",
24389
+ destructive: false,
24390
+ agentExposable: false,
24391
+ requiresApproval: false,
24392
+ scopes: ["read_drive_files"]
24393
+ },
24394
+ searchFiles: {
24395
+ description: "Search files by name fragment (`nameContains`, word-prefix match, case-insensitive), `modifiedSince` and `mimeTypes`, across shared drives and folders shared with the service account. Results are limited to `within` (sub-folders included) or, when omitted, to all the app's allowed folders; a page may hold fewer than `pageSize` results \u2014 follow `nextPageToken`. Access requires both: the folder shared with the service account (`getServiceAccount`) \u2014 Viewer to read, Editor/Contributor to write \u2014 AND the folder (or one of its ancestors) in the app's allowed folders, set by an admin in Settings \u203A Applications \u203A app \u203A Integrations (empty list = no access). Outside the allowed folders: 403 RESOURCE_NOT_GRANTED. Unknown or unshared id: 404 FILE_NOT_FOUND. `path` is relative to the allowed folder, file name included.",
24396
+ destructive: false,
24397
+ agentExposable: false,
24398
+ requiresApproval: false,
24399
+ scopes: ["read_drive_files"]
24400
+ },
24401
+ uploadFile: {
24402
+ description: 'Upload a NEW file (base64, 5 MB max) into `parentId`. Never overwrites: when an item with that exact name already exists there, nothing is written and the call fails with 409 FILE_EXISTS (details.fileId). Write into a shared drive: a service account has no storage in "My Drive" (507 NO_STORAGE). Access requires both: the folder shared with the service account (`getServiceAccount`) \u2014 Viewer to read, Editor/Contributor to write \u2014 AND the folder (or one of its ancestors) in the app\'s allowed folders, set by an admin in Settings \u203A Applications \u203A app \u203A Integrations (empty list = no access). Outside the allowed folders: 403 RESOURCE_NOT_GRANTED. Unknown or unshared id: 404 FILE_NOT_FOUND. `path` is relative to the allowed folder, file name included.',
24403
+ destructive: true,
24404
+ agentExposable: false,
24405
+ requiresApproval: false,
24406
+ scopes: ["write_drive_files"]
24407
+ }
24408
+ }
24409
+ },
24410
+ "google-sheets": {
24411
+ displayName: "Google Sheets",
24412
+ description: "Lecture et ajout de lignes dans les Google Sheets partag\xE9s avec le compte de service de la plateforme.",
24413
+ authKind: "service_account",
24414
+ events: [],
24415
+ hasWebhooks: false,
24416
+ supportsGenericRequest: true,
24417
+ scopeCatalog: [
24418
+ {
24419
+ name: "read_spreadsheets",
24420
+ label: "Lire les Google Sheets partag\xE9s",
24421
+ description: "Consulter le titre, les onglets et les valeurs des fichiers partag\xE9s avec le compte de service de la plateforme."
24422
+ },
24423
+ {
24424
+ name: "write_spreadsheets",
24425
+ label: "\xC9crire dans les Google Sheets partag\xE9s",
24426
+ description: "Ajouter des lignes et mettre \xE0 jour des valeurs dans les fichiers partag\xE9s en \xC9diteur avec le compte de service. Ni suppression, ni effacement, ni changement de structure."
24427
+ }
24428
+ ],
24429
+ actions: {
24430
+ appendValues: {
24431
+ description: "Append rows after the last non-empty row of the table found in `range` (rows are INSERTED, never written over). valueInputOption defaults to USER_ENTERED (dates and numbers parsed as if typed); RAW stores strings as-is. Returns where the rows landed. Access comes from Google sharing: the file must be shared with the service account (`getServiceAccount`) \u2014 as Viewer to read, Editor to write. An unshared file fails with 403 SPREADSHEET_NOT_SHARED (details: serviceAccountEmail, requiredRole); a renamed or deleted tab with 400 INVALID_RANGE.",
24432
+ destructive: true,
24433
+ agentExposable: false,
24434
+ requiresApproval: false,
24435
+ scopes: ["write_spreadsheets"]
24436
+ },
24437
+ getServiceAccount: {
24438
+ description: "Get the email address of the platform service account \u2014 the address a Google Sheet must be shared with before this connector can read (Viewer) or write (Editor) it. Calls nothing at Google.",
24439
+ destructive: false,
24440
+ agentExposable: true,
24441
+ requiresApproval: false,
24442
+ scopes: []
24443
+ },
24444
+ getSpreadsheet: {
24445
+ description: "Get a spreadsheet's title and its tabs (sheetId = the `gid` in the tab URL, title, row and column counts). Access comes from Google sharing: the file must be shared with the service account (`getServiceAccount`) \u2014 as Viewer to read, Editor to write. An unshared file fails with 403 SPREADSHEET_NOT_SHARED (details: serviceAccountEmail, requiredRole); a renamed or deleted tab with 400 INVALID_RANGE.",
24446
+ destructive: false,
24447
+ agentExposable: true,
24448
+ requiresApproval: false,
24449
+ scopes: ["read_spreadsheets"]
24450
+ },
24451
+ readValues: {
24452
+ description: "Read the cell values of one A1 range (`'COMMANDE'!A1:Z`, `Sheet1`). Defaults: valueRenderOption UNFORMATTED_VALUE (numbers stay numbers), dateTimeRenderOption FORMATTED_STRING (dates as displayed), majorDimension ROWS. Trailing empty cells and rows are omitted by Google; an empty range returns `values: []`. Access comes from Google sharing: the file must be shared with the service account (`getServiceAccount`) \u2014 as Viewer to read, Editor to write. An unshared file fails with 403 SPREADSHEET_NOT_SHARED (details: serviceAccountEmail, requiredRole); a renamed or deleted tab with 400 INVALID_RANGE.",
24453
+ destructive: false,
24454
+ agentExposable: true,
24455
+ requiresApproval: false,
24456
+ scopes: ["read_spreadsheets"]
24457
+ },
24458
+ readValuesBatch: {
24459
+ description: "Read several A1 ranges of the same spreadsheet in ONE call (counts as one request against Google's 60 reads/minute quota). Same defaults as readValues; `valueRanges` follows the order of `ranges`. Access comes from Google sharing: the file must be shared with the service account (`getServiceAccount`) \u2014 as Viewer to read, Editor to write. An unshared file fails with 403 SPREADSHEET_NOT_SHARED (details: serviceAccountEmail, requiredRole); a renamed or deleted tab with 400 INVALID_RANGE.",
24460
+ destructive: false,
24461
+ agentExposable: true,
24462
+ requiresApproval: false,
24463
+ scopes: ["read_spreadsheets"]
24464
+ },
24465
+ updateValues: {
24466
+ description: "Overwrite the cells of one A1 range with `values` (cells outside the given grid are left untouched; nothing is cleared). valueInputOption defaults to USER_ENTERED. Access comes from Google sharing: the file must be shared with the service account (`getServiceAccount`) \u2014 as Viewer to read, Editor to write. An unshared file fails with 403 SPREADSHEET_NOT_SHARED (details: serviceAccountEmail, requiredRole); a renamed or deleted tab with 400 INVALID_RANGE.",
24467
+ destructive: true,
24468
+ agentExposable: false,
24469
+ requiresApproval: false,
24470
+ scopes: ["write_spreadsheets"]
24471
+ }
24472
+ }
24473
+ },
24316
24474
  gorgias: {
24317
24475
  displayName: "Gorgias",
24318
24476
  description: "Customer support helpdesk \u2014 ticket views, conversations and tagging.",
@@ -34010,6 +34168,450 @@ var INTEGRATION_ACTION_SCHEMAS = {
34010
34168
  }
34011
34169
  }
34012
34170
  },
34171
+ "google-drive": {
34172
+ createFolder: {
34173
+ input: {
34174
+ $schema: "http://json-schema.org/draft-07/schema#",
34175
+ type: "object",
34176
+ properties: {
34177
+ parentId: { type: "string", minLength: 1, maxLength: 200, pattern: "^[A-Za-z0-9_-]+$" },
34178
+ name: { type: "string", minLength: 1, maxLength: 255 }
34179
+ },
34180
+ required: ["parentId", "name"]
34181
+ },
34182
+ output: {
34183
+ $schema: "http://json-schema.org/draft-07/schema#",
34184
+ type: "object",
34185
+ properties: { id: { type: "string" }, created: { type: "boolean" } },
34186
+ required: ["id", "created"],
34187
+ additionalProperties: false
34188
+ }
34189
+ },
34190
+ downloadFile: {
34191
+ input: {
34192
+ $schema: "http://json-schema.org/draft-07/schema#",
34193
+ type: "object",
34194
+ properties: {
34195
+ fileId: { type: "string", minLength: 1, maxLength: 200, pattern: "^[A-Za-z0-9_-]+$" },
34196
+ maxBytes: { type: "integer", minimum: 1, maximum: 26214400 }
34197
+ },
34198
+ required: ["fileId"]
34199
+ },
34200
+ output: {
34201
+ $schema: "http://json-schema.org/draft-07/schema#",
34202
+ type: "object",
34203
+ properties: {
34204
+ name: { type: "string" },
34205
+ mimeType: { type: "string" },
34206
+ size: { type: "number" },
34207
+ contentBase64: { type: "string" }
34208
+ },
34209
+ required: ["name", "mimeType", "size", "contentBase64"],
34210
+ additionalProperties: false
34211
+ }
34212
+ },
34213
+ exportFile: {
34214
+ input: {
34215
+ $schema: "http://json-schema.org/draft-07/schema#",
34216
+ type: "object",
34217
+ properties: {
34218
+ fileId: { type: "string", minLength: 1, maxLength: 200, pattern: "^[A-Za-z0-9_-]+$" },
34219
+ mimeType: {
34220
+ type: "string",
34221
+ enum: [
34222
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
34223
+ "text/csv",
34224
+ "application/pdf"
34225
+ ]
34226
+ },
34227
+ maxBytes: { type: "integer", minimum: 1, maximum: 26214400 }
34228
+ },
34229
+ required: ["fileId", "mimeType"]
34230
+ },
34231
+ output: {
34232
+ $schema: "http://json-schema.org/draft-07/schema#",
34233
+ type: "object",
34234
+ properties: {
34235
+ name: { type: "string" },
34236
+ mimeType: { type: "string" },
34237
+ size: { type: "number" },
34238
+ contentBase64: { type: "string" }
34239
+ },
34240
+ required: ["name", "mimeType", "size", "contentBase64"],
34241
+ additionalProperties: false
34242
+ }
34243
+ },
34244
+ getFile: {
34245
+ input: {
34246
+ $schema: "http://json-schema.org/draft-07/schema#",
34247
+ type: "object",
34248
+ properties: {
34249
+ fileId: { type: "string", minLength: 1, maxLength: 200, pattern: "^[A-Za-z0-9_-]+$" }
34250
+ },
34251
+ required: ["fileId"]
34252
+ },
34253
+ output: {
34254
+ $schema: "http://json-schema.org/draft-07/schema#",
34255
+ type: "object",
34256
+ properties: {
34257
+ id: { type: "string" },
34258
+ name: { type: "string" },
34259
+ mimeType: { type: "string" },
34260
+ size: { anyOf: [{ type: "number" }, { type: "null" }] },
34261
+ modifiedTime: { anyOf: [{ type: "string" }, { type: "null" }] },
34262
+ parents: { type: "array", items: { type: "string" } },
34263
+ path: { anyOf: [{ type: "string" }, { type: "null" }] },
34264
+ webViewLink: { anyOf: [{ type: "string" }, { type: "null" }] }
34265
+ },
34266
+ required: [
34267
+ "id",
34268
+ "name",
34269
+ "mimeType",
34270
+ "size",
34271
+ "modifiedTime",
34272
+ "parents",
34273
+ "path",
34274
+ "webViewLink"
34275
+ ],
34276
+ additionalProperties: false
34277
+ }
34278
+ },
34279
+ getServiceAccount: {
34280
+ input: { $schema: "http://json-schema.org/draft-07/schema#", type: "object", properties: {} },
34281
+ output: {
34282
+ $schema: "http://json-schema.org/draft-07/schema#",
34283
+ type: "object",
34284
+ properties: { email: { type: "string" } },
34285
+ required: ["email"],
34286
+ additionalProperties: false
34287
+ }
34288
+ },
34289
+ getThumbnail: {
34290
+ input: {
34291
+ $schema: "http://json-schema.org/draft-07/schema#",
34292
+ type: "object",
34293
+ properties: {
34294
+ fileId: { type: "string", minLength: 1, maxLength: 200, pattern: "^[A-Za-z0-9_-]+$" },
34295
+ maxBytes: { type: "integer", minimum: 1, maximum: 26214400 }
34296
+ },
34297
+ required: ["fileId"]
34298
+ },
34299
+ output: {
34300
+ $schema: "http://json-schema.org/draft-07/schema#",
34301
+ anyOf: [
34302
+ {
34303
+ type: "object",
34304
+ properties: { mimeType: { type: "string" }, contentBase64: { type: "string" } },
34305
+ required: ["mimeType", "contentBase64"],
34306
+ additionalProperties: false
34307
+ },
34308
+ { type: "null" }
34309
+ ]
34310
+ }
34311
+ },
34312
+ listFolder: {
34313
+ input: {
34314
+ $schema: "http://json-schema.org/draft-07/schema#",
34315
+ type: "object",
34316
+ properties: {
34317
+ folderId: { type: "string", minLength: 1, maxLength: 200, pattern: "^[A-Za-z0-9_-]+$" },
34318
+ recursive: { type: "boolean" },
34319
+ modifiedSince: {
34320
+ type: "string",
34321
+ format: "date-time",
34322
+ pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
34323
+ },
34324
+ mimeTypes: {
34325
+ minItems: 1,
34326
+ maxItems: 20,
34327
+ type: "array",
34328
+ items: { type: "string", minLength: 1, maxLength: 255 }
34329
+ },
34330
+ pageSize: { type: "integer", minimum: 1, maximum: 1e3 },
34331
+ pageToken: { type: "string", minLength: 1, maxLength: 65536 }
34332
+ },
34333
+ required: ["folderId"]
34334
+ },
34335
+ output: {
34336
+ $schema: "http://json-schema.org/draft-07/schema#",
34337
+ type: "object",
34338
+ properties: {
34339
+ files: {
34340
+ type: "array",
34341
+ items: {
34342
+ type: "object",
34343
+ properties: {
34344
+ id: { type: "string" },
34345
+ name: { type: "string" },
34346
+ mimeType: { type: "string" },
34347
+ size: { anyOf: [{ type: "number" }, { type: "null" }] },
34348
+ modifiedTime: { anyOf: [{ type: "string" }, { type: "null" }] },
34349
+ parents: { type: "array", items: { type: "string" } },
34350
+ path: { anyOf: [{ type: "string" }, { type: "null" }] },
34351
+ webViewLink: { anyOf: [{ type: "string" }, { type: "null" }] }
34352
+ },
34353
+ required: [
34354
+ "id",
34355
+ "name",
34356
+ "mimeType",
34357
+ "size",
34358
+ "modifiedTime",
34359
+ "parents",
34360
+ "path",
34361
+ "webViewLink"
34362
+ ],
34363
+ additionalProperties: false
34364
+ }
34365
+ },
34366
+ nextPageToken: { type: "string" }
34367
+ },
34368
+ required: ["files"],
34369
+ additionalProperties: false
34370
+ }
34371
+ },
34372
+ searchFiles: {
34373
+ input: {
34374
+ $schema: "http://json-schema.org/draft-07/schema#",
34375
+ type: "object",
34376
+ properties: {
34377
+ nameContains: { type: "string", minLength: 1, maxLength: 255 },
34378
+ modifiedSince: {
34379
+ type: "string",
34380
+ format: "date-time",
34381
+ pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
34382
+ },
34383
+ mimeTypes: {
34384
+ minItems: 1,
34385
+ maxItems: 20,
34386
+ type: "array",
34387
+ items: { type: "string", minLength: 1, maxLength: 255 }
34388
+ },
34389
+ within: {
34390
+ minItems: 1,
34391
+ maxItems: 50,
34392
+ type: "array",
34393
+ items: { type: "string", minLength: 1, maxLength: 200, pattern: "^[A-Za-z0-9_-]+$" }
34394
+ },
34395
+ pageSize: { type: "integer", minimum: 1, maximum: 100 },
34396
+ pageToken: { type: "string", minLength: 1, maxLength: 4096 }
34397
+ }
34398
+ },
34399
+ output: {
34400
+ $schema: "http://json-schema.org/draft-07/schema#",
34401
+ type: "object",
34402
+ properties: {
34403
+ files: {
34404
+ type: "array",
34405
+ items: {
34406
+ type: "object",
34407
+ properties: {
34408
+ id: { type: "string" },
34409
+ name: { type: "string" },
34410
+ mimeType: { type: "string" },
34411
+ size: { anyOf: [{ type: "number" }, { type: "null" }] },
34412
+ modifiedTime: { anyOf: [{ type: "string" }, { type: "null" }] },
34413
+ parents: { type: "array", items: { type: "string" } },
34414
+ path: { anyOf: [{ type: "string" }, { type: "null" }] },
34415
+ webViewLink: { anyOf: [{ type: "string" }, { type: "null" }] }
34416
+ },
34417
+ required: [
34418
+ "id",
34419
+ "name",
34420
+ "mimeType",
34421
+ "size",
34422
+ "modifiedTime",
34423
+ "parents",
34424
+ "path",
34425
+ "webViewLink"
34426
+ ],
34427
+ additionalProperties: false
34428
+ }
34429
+ },
34430
+ nextPageToken: { type: "string" }
34431
+ },
34432
+ required: ["files"],
34433
+ additionalProperties: false
34434
+ }
34435
+ },
34436
+ uploadFile: {
34437
+ input: {
34438
+ $schema: "http://json-schema.org/draft-07/schema#",
34439
+ type: "object",
34440
+ properties: {
34441
+ parentId: { type: "string", minLength: 1, maxLength: 200, pattern: "^[A-Za-z0-9_-]+$" },
34442
+ name: { type: "string", minLength: 1, maxLength: 255 },
34443
+ mimeType: { type: "string", minLength: 1, maxLength: 255 },
34444
+ contentBase64: { type: "string", minLength: 1, maxLength: 10485760 }
34445
+ },
34446
+ required: ["parentId", "name", "mimeType", "contentBase64"]
34447
+ },
34448
+ output: {
34449
+ $schema: "http://json-schema.org/draft-07/schema#",
34450
+ type: "object",
34451
+ properties: {
34452
+ id: { type: "string" },
34453
+ webViewLink: { anyOf: [{ type: "string" }, { type: "null" }] }
34454
+ },
34455
+ required: ["id", "webViewLink"],
34456
+ additionalProperties: false
34457
+ }
34458
+ }
34459
+ },
34460
+ "google-sheets": {
34461
+ appendValues: {
34462
+ input: {
34463
+ $schema: "http://json-schema.org/draft-07/schema#",
34464
+ type: "object",
34465
+ properties: {
34466
+ spreadsheetId: { type: "string", minLength: 1, pattern: "^[A-Za-z0-9_-]+$" },
34467
+ range: { type: "string", minLength: 1 },
34468
+ values: { minItems: 1, type: "array", items: { type: "array", items: {} } },
34469
+ valueInputOption: { type: "string", enum: ["USER_ENTERED", "RAW"] }
34470
+ },
34471
+ required: ["spreadsheetId", "range", "values"]
34472
+ },
34473
+ output: {
34474
+ $schema: "http://json-schema.org/draft-07/schema#",
34475
+ type: "object",
34476
+ properties: { updatedRange: { type: "string" }, updatedRows: { type: "number" } },
34477
+ required: ["updatedRange", "updatedRows"],
34478
+ additionalProperties: false
34479
+ }
34480
+ },
34481
+ getServiceAccount: {
34482
+ input: { $schema: "http://json-schema.org/draft-07/schema#", type: "object", properties: {} },
34483
+ output: {
34484
+ $schema: "http://json-schema.org/draft-07/schema#",
34485
+ type: "object",
34486
+ properties: { email: { type: "string" } },
34487
+ required: ["email"],
34488
+ additionalProperties: false
34489
+ }
34490
+ },
34491
+ getSpreadsheet: {
34492
+ input: {
34493
+ $schema: "http://json-schema.org/draft-07/schema#",
34494
+ type: "object",
34495
+ properties: {
34496
+ spreadsheetId: { type: "string", minLength: 1, pattern: "^[A-Za-z0-9_-]+$" }
34497
+ },
34498
+ required: ["spreadsheetId"]
34499
+ },
34500
+ output: {
34501
+ $schema: "http://json-schema.org/draft-07/schema#",
34502
+ type: "object",
34503
+ properties: {
34504
+ spreadsheetId: { type: "string" },
34505
+ title: { type: "string" },
34506
+ sheets: {
34507
+ type: "array",
34508
+ items: {
34509
+ type: "object",
34510
+ properties: {
34511
+ sheetId: { type: "number" },
34512
+ title: { type: "string" },
34513
+ rowCount: { anyOf: [{ type: "number" }, { type: "null" }] },
34514
+ columnCount: { anyOf: [{ type: "number" }, { type: "null" }] }
34515
+ },
34516
+ required: ["sheetId", "title", "rowCount", "columnCount"],
34517
+ additionalProperties: false
34518
+ }
34519
+ }
34520
+ },
34521
+ required: ["spreadsheetId", "title", "sheets"],
34522
+ additionalProperties: false
34523
+ }
34524
+ },
34525
+ readValues: {
34526
+ input: {
34527
+ $schema: "http://json-schema.org/draft-07/schema#",
34528
+ type: "object",
34529
+ properties: {
34530
+ spreadsheetId: { type: "string", minLength: 1, pattern: "^[A-Za-z0-9_-]+$" },
34531
+ range: { type: "string", minLength: 1 },
34532
+ valueRenderOption: {
34533
+ type: "string",
34534
+ enum: ["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"]
34535
+ },
34536
+ dateTimeRenderOption: { type: "string", enum: ["SERIAL_NUMBER", "FORMATTED_STRING"] },
34537
+ majorDimension: { type: "string", enum: ["ROWS", "COLUMNS"] }
34538
+ },
34539
+ required: ["spreadsheetId", "range"]
34540
+ },
34541
+ output: {
34542
+ $schema: "http://json-schema.org/draft-07/schema#",
34543
+ type: "object",
34544
+ properties: {
34545
+ range: { type: "string" },
34546
+ values: { type: "array", items: { type: "array", items: {} } }
34547
+ },
34548
+ required: ["range", "values"],
34549
+ additionalProperties: false
34550
+ }
34551
+ },
34552
+ readValuesBatch: {
34553
+ input: {
34554
+ $schema: "http://json-schema.org/draft-07/schema#",
34555
+ type: "object",
34556
+ properties: {
34557
+ spreadsheetId: { type: "string", minLength: 1, pattern: "^[A-Za-z0-9_-]+$" },
34558
+ ranges: {
34559
+ minItems: 1,
34560
+ maxItems: 100,
34561
+ type: "array",
34562
+ items: { type: "string", minLength: 1 }
34563
+ },
34564
+ valueRenderOption: {
34565
+ type: "string",
34566
+ enum: ["FORMATTED_VALUE", "UNFORMATTED_VALUE", "FORMULA"]
34567
+ },
34568
+ dateTimeRenderOption: { type: "string", enum: ["SERIAL_NUMBER", "FORMATTED_STRING"] },
34569
+ majorDimension: { type: "string", enum: ["ROWS", "COLUMNS"] }
34570
+ },
34571
+ required: ["spreadsheetId", "ranges"]
34572
+ },
34573
+ output: {
34574
+ $schema: "http://json-schema.org/draft-07/schema#",
34575
+ type: "object",
34576
+ properties: {
34577
+ valueRanges: {
34578
+ type: "array",
34579
+ items: {
34580
+ type: "object",
34581
+ properties: {
34582
+ range: { type: "string" },
34583
+ values: { type: "array", items: { type: "array", items: {} } }
34584
+ },
34585
+ required: ["range", "values"],
34586
+ additionalProperties: false
34587
+ }
34588
+ }
34589
+ },
34590
+ required: ["valueRanges"],
34591
+ additionalProperties: false
34592
+ }
34593
+ },
34594
+ updateValues: {
34595
+ input: {
34596
+ $schema: "http://json-schema.org/draft-07/schema#",
34597
+ type: "object",
34598
+ properties: {
34599
+ spreadsheetId: { type: "string", minLength: 1, pattern: "^[A-Za-z0-9_-]+$" },
34600
+ range: { type: "string", minLength: 1 },
34601
+ values: { minItems: 1, type: "array", items: { type: "array", items: {} } },
34602
+ valueInputOption: { type: "string", enum: ["USER_ENTERED", "RAW"] }
34603
+ },
34604
+ required: ["spreadsheetId", "range", "values"]
34605
+ },
34606
+ output: {
34607
+ $schema: "http://json-schema.org/draft-07/schema#",
34608
+ type: "object",
34609
+ properties: { updatedRange: { type: "string" }, updatedCells: { type: "number" } },
34610
+ required: ["updatedRange", "updatedCells"],
34611
+ additionalProperties: false
34612
+ }
34613
+ }
34614
+ },
34013
34615
  gorgias: {
34014
34616
  addTag: {
34015
34617
  input: {