@celigo/api-specs 0.2.93 → 0.2.95

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/account.yml CHANGED
@@ -19,12 +19,12 @@ tags:
19
19
  description: |-
20
20
  Endpoints for discovering what the current account has access to.
21
21
 
22
- Resolve a bearer token to a user, list the external applications connected
23
- to the account, and manage shared accounts and stacks.
22
+ Resolve a bearer token to the account, credential, and user behind it, list the
23
+ external applications connected to the account, and manage shared accounts and stacks.
24
24
 
25
- ## Shared account and stack share schemas
25
+ ## Token info, shared account and stack share schemas
26
26
 
27
- {% openapi-schemas spec="account" schemas="SharedAccount,StackShare" grouped="true" %}
27
+ {% openapi-schemas spec="account" schemas="TokenInfo,SharedAccount,StackShare" grouped="true" %}
28
28
  paths:
29
29
  /v1/tokenInfo:
30
30
  get:
@@ -32,29 +32,79 @@ paths:
32
32
  operationId: getTokenInfo
33
33
  tags:
34
34
  - Account
35
- summary: Identify the current token's owner
36
- description: Resolves a bearer token to the user it authenticates as.
35
+ summary: Resolve the current token's identity
36
+ description: |-
37
+ Resolves the bearer token on the request to the account it belongs to, the credential it
38
+ is, the user acting through it, and the environment it is bound to. Call it with the
39
+ same token you use for other requests — there is no body and no query parameter.
40
+
41
+ `token.type` names the credential kind. An account API token (`service`) also reports
42
+ the acting user in `byUser`; an on-premise agent token (`agent`) acts as the account
43
+ itself and omits `byUser`.
37
44
  responses:
38
45
  '200':
39
- description: Token identity.
46
+ description: Token identity envelope.
40
47
  content:
41
48
  application/json:
42
49
  schema:
43
- type: object
44
- properties:
45
- _userId:
46
- type: string
47
- format: objectId
48
- x-celigo-refModel: users
49
- examples:
50
- - 5e58483b68b52e5827d56a86
51
- description: User this token authenticates as.
50
+ $ref: '#/components/schemas/TokenInfo'
52
51
  examples:
53
- default:
52
+ serviceToken:
53
+ summary: Account API token created by the account owner
54
+ value:
55
+ _userId: 5e58483b68b52e5827d56a86
56
+ token:
57
+ type: service
58
+ _id: 68f5a1b2c3d4e5f678901234
59
+ name: ci-deploy-bot
60
+ fullAccess: true
61
+ ownerUser:
62
+ _id: 5e58483b68b52e5827d56a86
63
+ email: jane@acme.com
64
+ name: Jane Owner
65
+ company: Acme Corp
66
+ byUser:
67
+ _id: 5e58483b68b52e5827d56a86
68
+ email: jane@acme.com
69
+ name: Jane Owner
70
+ accessLevel: owner
71
+ environment:
72
+ _id: 69f1da72317aa6e158632d9b
73
+ name: Production
74
+ _envUserId: 5e58483b68b52e5827d56a86
75
+ agentToken:
76
+ summary: On-premise agent token (no byUser, no fullAccess)
54
77
  value:
55
78
  _userId: 5e58483b68b52e5827d56a86
79
+ token:
80
+ type: agent
81
+ _id: 68f5a1b2c3d4e5f678901238
82
+ name: warehouse-agent-01
83
+ ownerUser:
84
+ _id: 5e58483b68b52e5827d56a86
85
+ email: jane@acme.com
86
+ name: Jane Owner
87
+ company: Acme Corp
88
+ environment:
89
+ _id: 69f1da72317aa6e158632d9b
90
+ name: Production
91
+ _envUserId: 5e58483b68b52e5827d56a86
56
92
  '401':
57
- $ref: '#/components/responses/401-unauthorized'
93
+ description: |-
94
+ Unauthorized. Unlike other routes, this one answers a missing `Authorization` header
95
+ and an invalid token the same way: a bare text body `Unauthorized` with no
96
+ `Content-Type` header and no `{errors: [...]}` or `{message}` JSON envelope. Key off
97
+ the HTTP status, not the body.
98
+ content:
99
+ text/plain:
100
+ schema:
101
+ type: string
102
+ examples:
103
+ - Unauthorized
104
+ examples:
105
+ unauthorized:
106
+ summary: Missing or invalid bearer token
107
+ value: Unauthorized
58
108
  /v1/applications:
59
109
  get:
60
110
  x-internal: false
@@ -350,42 +400,160 @@ components:
350
400
  bearerAuth:
351
401
  type: http
352
402
  scheme: bearer
353
- responses:
354
- 401-unauthorized:
403
+ schemas:
404
+ TokenInfo:
405
+ type: object
355
406
  description: |-
356
- Unauthorized. The request lacks a valid bearer token, or the provided token
357
- failed to authenticate.
358
-
359
- Note: the 401 response is produced by the auth middleware **before** the
360
- request reaches the endpoint handler, so it does **not** follow the
361
- standard `{errors: [...]}` envelope. Instead the body is a bare
362
- `{message: string}` object with no `code`, no `errors` array. Callers
363
- handling 401s should key off the HTTP status and the `message` string,
364
- not try to destructure an `errors[]`.
365
- content:
366
- application/json:
367
- schema:
368
- type: object
369
- properties:
370
- message:
371
- type: string
372
- description: |-
373
- Human-readable description of the auth failure. Known values:
374
- - `"Unauthorized"` — no `Authorization` header on the request.
375
- - `"Bearer Authentication Failed"` — header present but token
376
- is invalid, revoked, or expired.
377
- required:
378
- - message
407
+ Identity envelope for the bearer token on the request: the credential kind, the
408
+ account owner, the user acting through it, and the environment it is bound to.
409
+ Read the account id from `ownerUser._id` and the actor from `byUser`; `_userId` is
410
+ the user record the token is bound to, which for a token on the production
411
+ environment is the account owner.
412
+ required:
413
+ - _userId
414
+ - token
415
+ - ownerUser
416
+ x-celigo-ai-guidance:
417
+ - |-
418
+ Use ownerUser._id as the account id and token.type to tell credential kinds apart.
419
+ byUser is absent on on-premise agent tokens (type agent), so never dereference it
420
+ without checking the type first.
421
+ properties:
422
+ _userId:
423
+ type: string
424
+ format: objectId
425
+ x-celigo-refModel: users
379
426
  examples:
380
- missing_token:
381
- summary: No Authorization header sent
382
- value:
383
- message: Unauthorized
384
- invalid_token:
385
- summary: Bearer token invalid or revoked
386
- value:
387
- message: Bearer Authentication Failed
388
- schemas:
427
+ - 5e58483b68b52e5827d56a86
428
+ description: |-
429
+ User record the token is bound to. For a token on the production environment this
430
+ is the account owner, so it matches both `ownerUser._id` and
431
+ `environment._envUserId`.
432
+ token:
433
+ type: object
434
+ description: The credential that authenticated the request. Never echoes the secret value.
435
+ required:
436
+ - type
437
+ properties:
438
+ type:
439
+ type: string
440
+ examples:
441
+ - service
442
+ description: |-
443
+ Credential kind: `service` for an account API token, `agent` for an on-premise
444
+ agent's access token. Read this field rather than inferring the kind from which
445
+ other fields are present.
446
+ _id:
447
+ type: string
448
+ format: objectId
449
+ examples:
450
+ - 68f5a1b2c3d4e5f678901234
451
+ description: |-
452
+ Record the credential belongs to: the access token for a `service` token, the
453
+ on-premise agent (`GET /v1/agents/{_id}`) for an `agent` token.
454
+ name:
455
+ type: string
456
+ examples:
457
+ - ci-deploy-bot
458
+ description: |-
459
+ Display name of the access token for a `service` token; the agent's name for an
460
+ `agent` token.
461
+ fullAccess:
462
+ type: boolean
463
+ description: |-
464
+ When true, the token has unrestricted access to the account. Present on `service`
465
+ tokens only; `agent` tokens omit it.
466
+ ownerUser:
467
+ type: object
468
+ description: Account (tenant) owner. Use `_id` as the account id.
469
+ required:
470
+ - _id
471
+ properties:
472
+ _id:
473
+ type: string
474
+ format: objectId
475
+ x-celigo-refModel: users
476
+ examples:
477
+ - 5e58483b68b52e5827d56a86
478
+ description: Account owner's user id, which identifies the account itself.
479
+ email:
480
+ type: string
481
+ format: email
482
+ examples:
483
+ - jane@acme.com
484
+ description: Account owner's email address.
485
+ name:
486
+ type: string
487
+ examples:
488
+ - Jane Owner
489
+ description: Account owner's display name.
490
+ company:
491
+ type: string
492
+ examples:
493
+ - Acme Corp
494
+ description: Company name on the owner's profile.
495
+ byUser:
496
+ type: object
497
+ description: |-
498
+ User acting through the token. Omitted for `agent` tokens, which act as the account
499
+ itself. For a `service` token created by the account owner this mirrors `ownerUser`
500
+ with `accessLevel: owner`.
501
+ required:
502
+ - _id
503
+ properties:
504
+ _id:
505
+ type: string
506
+ format: objectId
507
+ x-celigo-refModel: users
508
+ examples:
509
+ - 5e58483b68b52e5827d56a86
510
+ description: Acting user's id. Equals `ownerUser._id` when the owner is acting.
511
+ email:
512
+ type: string
513
+ format: email
514
+ examples:
515
+ - jane@acme.com
516
+ description: Acting user's email address.
517
+ name:
518
+ type: string
519
+ examples:
520
+ - Jane Owner
521
+ description: Acting user's display name.
522
+ accessLevel:
523
+ type: string
524
+ examples:
525
+ - owner
526
+ description: |-
527
+ Acting user's account-wide access level. `owner` when the acting user is the
528
+ account owner.
529
+ environment:
530
+ type: object
531
+ description: Environment the token is bound to.
532
+ required:
533
+ - name
534
+ properties:
535
+ _id:
536
+ type: string
537
+ format: objectId
538
+ x-celigo-refModel: environments
539
+ examples:
540
+ - 69f1da72317aa6e158632d9b
541
+ description: Environment id, as listed by `GET /v1/environments`.
542
+ name:
543
+ type: string
544
+ examples:
545
+ - Production
546
+ description: Environment display name.
547
+ _envUserId:
548
+ type: string
549
+ format: objectId
550
+ x-celigo-refModel: users
551
+ examples:
552
+ - 5e58483b68b52e5827d56a86
553
+ description: |-
554
+ User record that owns this environment's resources: the account owner for the
555
+ production environment, a per-environment user for every other environment
556
+ (the same ids `GET /v1/environments` lists).
389
557
  ApplicationUsage:
390
558
  type: object
391
559
  description: An application and its connections in this account.
@@ -786,5 +954,40 @@ components:
786
954
  else:
787
955
  required:
788
956
  - lambda
957
+ responses:
958
+ 401-unauthorized:
959
+ description: |-
960
+ Unauthorized. The request lacks a valid bearer token, or the provided token
961
+ failed to authenticate.
962
+
963
+ Note: the 401 response is produced by the auth middleware **before** the
964
+ request reaches the endpoint handler, so it does **not** follow the
965
+ standard `{errors: [...]}` envelope. Instead the body is a bare
966
+ `{message: string}` object with no `code`, no `errors` array. Callers
967
+ handling 401s should key off the HTTP status and the `message` string,
968
+ not try to destructure an `errors[]`.
969
+ content:
970
+ application/json:
971
+ schema:
972
+ type: object
973
+ properties:
974
+ message:
975
+ type: string
976
+ description: |-
977
+ Human-readable description of the auth failure. Known values:
978
+ - `"Unauthorized"` — no `Authorization` header on the request.
979
+ - `"Bearer Authentication Failed"` — header present but token
980
+ is invalid, revoked, or expired.
981
+ required:
982
+ - message
983
+ examples:
984
+ missing_token:
985
+ summary: No Authorization header sent
986
+ value:
987
+ message: Unauthorized
988
+ invalid_token:
989
+ summary: Bearer token invalid or revoked
990
+ value:
991
+ message: Bearer Authentication Failed
789
992
  x-enable-proxy: true
790
993
  x-internal: false
package/dist/api.yml CHANGED
@@ -7365,11 +7365,23 @@ components:
7365
7365
  description: |-
7366
7366
  HTTP connector (pre-built application template) this connection is linked to. Linking
7367
7367
  lets exports and imports on the connection pick endpoints from the connector's catalog and
7368
- drives the `assistant` form in the UI. An id that does not resolve to an accessible
7369
- connector is dropped from the saved document rather than rejected — read the response back
7370
- to confirm the link took.
7368
+ drives the `assistant` form in the UI. The link is resolved server-side on create and on
7369
+ any update that changes `assistant` or a connector id, and the result overwrites
7370
+ `_httpConnectorId`, `_httpConnectorApiId` and `_httpConnectorVersionId`: an id that does
7371
+ not resolve to an accessible connector is dropped rather than rejected, and when the
7372
+ top-level `assistant` names an application with a legacy adaptor (the connector's
7373
+ `legacyId`, e.g. `shopify`) the connector resolved from that slug replaces the id you sent
7374
+ and a sent `_httpConnectorVersionId` is dropped. Read the response back to confirm the
7375
+ link took.
7371
7376
  examples:
7372
7377
  - 5d8f6a2b9c1e4f00112a3b4c
7378
+ x-celigo-ai-guidance:
7379
+ - |-
7380
+ To link an Azure Data Lake Storage Gen2 connection to its connector, send
7381
+ `_httpConnectorId` and `_httpConnectorVersionId` and omit the top-level `assistant`:
7382
+ with `assistant` set (`azuredatalakestoragegen2` or any other slug) the save answers
7383
+ 201/200 and stores neither id. Dropping `assistant` and re-sending both ids on a PUT
7384
+ restores the link.
7373
7385
  _httpConnectorApiId:
7374
7386
  type: string
7375
7387
  format: objectId
@@ -5972,11 +5972,23 @@ components:
5972
5972
  description: |-
5973
5973
  HTTP connector (pre-built application template) this connection is linked to. Linking
5974
5974
  lets exports and imports on the connection pick endpoints from the connector's catalog and
5975
- drives the `assistant` form in the UI. An id that does not resolve to an accessible
5976
- connector is dropped from the saved document rather than rejected — read the response back
5977
- to confirm the link took.
5975
+ drives the `assistant` form in the UI. The link is resolved server-side on create and on
5976
+ any update that changes `assistant` or a connector id, and the result overwrites
5977
+ `_httpConnectorId`, `_httpConnectorApiId` and `_httpConnectorVersionId`: an id that does
5978
+ not resolve to an accessible connector is dropped rather than rejected, and when the
5979
+ top-level `assistant` names an application with a legacy adaptor (the connector's
5980
+ `legacyId`, e.g. `shopify`) the connector resolved from that slug replaces the id you sent
5981
+ and a sent `_httpConnectorVersionId` is dropped. Read the response back to confirm the
5982
+ link took.
5978
5983
  examples:
5979
5984
  - 5d8f6a2b9c1e4f00112a3b4c
5985
+ x-celigo-ai-guidance:
5986
+ - |-
5987
+ To link an Azure Data Lake Storage Gen2 connection to its connector, send
5988
+ `_httpConnectorId` and `_httpConnectorVersionId` and omit the top-level `assistant`:
5989
+ with `assistant` set (`azuredatalakestoragegen2` or any other slug) the save answers
5990
+ 201/200 and stores neither id. Dropping `assistant` and re-sending both ids on a PUT
5991
+ restores the link.
5980
5992
  _httpConnectorApiId:
5981
5993
  type: string
5982
5994
  format: objectId
@@ -8746,9 +8758,24 @@ components:
8746
8758
  type: string
8747
8759
  description: |-
8748
8760
  Lowercase application name for HTTP connections to systems with an integrator.io
8749
- adaptor (e.g. "shopify", "ebay"). Only applies to http connections.
8761
+ adaptor (e.g. "shopify", "ebay"). Only applies to http connections. The platform
8762
+ checks the slug against its current adaptor list — an unknown value fails the save
8763
+ with 422 `enum` — and uses it to resolve the HTTP connector link on every save (see
8764
+ `http._httpConnectorId`), so send it only when the application really is a legacy
8765
+ adaptor: on an Azure Data Lake Storage Gen2 connection it drops the connector ids.
8750
8766
  examples:
8751
8767
  - shopify
8768
+ x-celigo-ai-guidance:
8769
+ - |-
8770
+ Omit `assistant` on an Azure Data Lake Storage Gen2 connection. With
8771
+ `assistant: "azuredatalakestoragegen2"` (or any other slug) the save answers 201/200
8772
+ but stores no `http._httpConnectorId` or `http._httpConnectorVersionId`; the
8773
+ connection form never sends it. Send the ADLS connector id and version id without
8774
+ `assistant` — a PUT that drops `assistant` and re-sends them restores the link.
8775
+ - |-
8776
+ A value outside the platform's adaptor list fails with 422 `enum` on `assistant`
8777
+ ("`<value>` is not a valid enum value for path `assistant`."); for a connector-framework
8778
+ application with no legacy adaptor, link it through `http._httpConnectorId` instead.
8752
8779
  _agentId:
8753
8780
  type: string
8754
8781
  format: objectId
package/dist/enduser.yml CHANGED
@@ -4611,11 +4611,23 @@ components:
4611
4611
  description: |-
4612
4612
  HTTP connector (pre-built application template) this connection is linked to. Linking
4613
4613
  lets exports and imports on the connection pick endpoints from the connector's catalog and
4614
- drives the `assistant` form in the UI. An id that does not resolve to an accessible
4615
- connector is dropped from the saved document rather than rejected — read the response back
4616
- to confirm the link took.
4614
+ drives the `assistant` form in the UI. The link is resolved server-side on create and on
4615
+ any update that changes `assistant` or a connector id, and the result overwrites
4616
+ `_httpConnectorId`, `_httpConnectorApiId` and `_httpConnectorVersionId`: an id that does
4617
+ not resolve to an accessible connector is dropped rather than rejected, and when the
4618
+ top-level `assistant` names an application with a legacy adaptor (the connector's
4619
+ `legacyId`, e.g. `shopify`) the connector resolved from that slug replaces the id you sent
4620
+ and a sent `_httpConnectorVersionId` is dropped. Read the response back to confirm the
4621
+ link took.
4617
4622
  examples:
4618
4623
  - 5d8f6a2b9c1e4f00112a3b4c
4624
+ x-celigo-ai-guidance:
4625
+ - |-
4626
+ To link an Azure Data Lake Storage Gen2 connection to its connector, send
4627
+ `_httpConnectorId` and `_httpConnectorVersionId` and omit the top-level `assistant`:
4628
+ with `assistant` set (`azuredatalakestoragegen2` or any other slug) the save answers
4629
+ 201/200 and stores neither id. Dropping `assistant` and re-sending both ids on a PUT
4630
+ restores the link.
4619
4631
  _httpConnectorApiId:
4620
4632
  type: string
4621
4633
  format: objectId