picked 0.0.103-next.1 → 0.0.103-next.3
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.
|
@@ -59,6 +59,9 @@ OAuth2 credential.
|
|
|
59
59
|
|
|
60
60
|
- Picked sends the token request as a `POST` with a form body, so no secret is in a URL.
|
|
61
61
|
- Picked uses an access token until 60 seconds before it expires.
|
|
62
|
+
- **Refresh credentials** on the page of the external API gets a new access token
|
|
63
|
+
immediately. The page then shows the time of the last refresh, or the reason for the
|
|
64
|
+
failure.
|
|
62
65
|
- Picked reads the lifetime from `expires_in_sec`, or else from `expires_in`. Picked keeps
|
|
63
66
|
a token with no lifetime for one hour.
|
|
64
67
|
- Picked counts an answer as a success when its JSON body has an `access_token`, for all
|
|
@@ -176,6 +179,7 @@ You can also do this task with the [Management API](/reference/management-api/sc
|
|
|
176
179
|
| --- | --- | --- | --- |
|
|
177
180
|
| Register an external API | [`externalApiCreate`](/reference/management-api/schema/external-api#externalapicreate) | None | None |
|
|
178
181
|
| Set or replace the authorization header | [`externalApiAuthHeaderSet`](/reference/management-api/schema/external-api#externalapiauthheaderset) | None | None |
|
|
182
|
+
| Get a new OAuth2 access token | [`externalApiOAuth2Refresh`](/reference/management-api/schema/external-api#externalapioauth2refresh) | None | None |
|
|
179
183
|
| Delete a registration | [`externalApiDelete`](/reference/management-api/schema/external-api#externalapidelete) | None | None |
|
|
180
184
|
| Set the arguments of an External API node | [`workflowGraphUpdate`](/reference/management-api/schema/workflow#workflowgraphupdate) | [`update_workflow_graph`](/reference/tools/mcp#update_workflow_graph) | `tools.update_workflow_graph({ workflow_id, update_nodes })` |
|
|
181
185
|
|
|
@@ -78,6 +78,16 @@ Scope: `ORGANIZATION_INTEGRATIONS_UPDATE`.
|
|
|
78
78
|
externalApiOAuth2Clear(input: ExternalApiOAuth2ClearInput!): ExternalApiOAuth2ClearPayload! @auth(only: USER)
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
+
### `externalApiOAuth2Refresh`
|
|
82
|
+
|
|
83
|
+
Fetches a new access token for the OAuth2 credential of an external API now, in place of any
|
|
84
|
+
cached one. An external API with no OAuth2 credential is refused.
|
|
85
|
+
Scope: `ORGANIZATION_INTEGRATIONS_UPDATE`.
|
|
86
|
+
|
|
87
|
+
```graphql
|
|
88
|
+
externalApiOAuth2Refresh(input: ExternalApiOAuth2RefreshInput!): ExternalApiOAuth2RefreshPayload! @auth(only: USER)
|
|
89
|
+
```
|
|
90
|
+
|
|
81
91
|
### `externalApiDelete`
|
|
82
92
|
|
|
83
93
|
Deletes an external API and its credential. Workflows then cannot call its origin.
|
|
@@ -521,6 +531,16 @@ input ExternalApiOAuth2ClearInput {
|
|
|
521
531
|
}
|
|
522
532
|
```
|
|
523
533
|
|
|
534
|
+
### `ExternalApiOAuth2RefreshInput`
|
|
535
|
+
|
|
536
|
+
```graphql
|
|
537
|
+
"""The input of `externalApiOAuth2Refresh`."""
|
|
538
|
+
input ExternalApiOAuth2RefreshInput {
|
|
539
|
+
"""The ID of the external API."""
|
|
540
|
+
id: ID!
|
|
541
|
+
}
|
|
542
|
+
```
|
|
543
|
+
|
|
524
544
|
### `ExternalApiDeleteInput`
|
|
525
545
|
|
|
526
546
|
```graphql
|
|
@@ -606,6 +626,21 @@ type ExternalApiOAuth2ClearPayload {
|
|
|
606
626
|
}
|
|
607
627
|
```
|
|
608
628
|
|
|
629
|
+
### `ExternalApiOAuth2RefreshPayload`
|
|
630
|
+
|
|
631
|
+
```graphql
|
|
632
|
+
"""The result of `externalApiOAuth2Refresh`."""
|
|
633
|
+
type ExternalApiOAuth2RefreshPayload {
|
|
634
|
+
"""
|
|
635
|
+
The external API after the refresh. `oauth2.lastRefreshedAt` moves on a new token, and
|
|
636
|
+
`oauth2.lastRefreshFailure` says why there is none.
|
|
637
|
+
"""
|
|
638
|
+
externalApi: ExternalApi
|
|
639
|
+
"""The errors. Always empty."""
|
|
640
|
+
errors: [UserError!]!
|
|
641
|
+
}
|
|
642
|
+
```
|
|
643
|
+
|
|
609
644
|
### `ExternalApiDeletePayload`
|
|
610
645
|
|
|
611
646
|
```graphql
|
|
@@ -79,6 +79,7 @@ An operation with `@auth` needs a caller that has authenticated. `@auth(only: US
|
|
|
79
79
|
| [`externalApiCreate`](/reference/management-api/schema/external-api#externalapicreate) | Mutation | Creates an external API in a project, with an optional credential. Scope: `ORGANIZATION_INTEGRATIONS_CREATE`. |
|
|
80
80
|
| [`externalApiDelete`](/reference/management-api/schema/external-api#externalapidelete) | Mutation | Deletes an external API and its credential. Workflows then cannot call its origin. Scope: `ORGANIZATION_INTEGRATIONS_DELETE`. |
|
|
81
81
|
| [`externalApiOAuth2Clear`](/reference/management-api/schema/external-api#externalapioauth2clear) | Mutation | Removes the OAuth2 credential of an external API, with its secrets and cached access token. An external API with no OAuth2 credential is unchanged. Scope: `ORGANIZATION_INTEGRATIONS_UPDATE`. |
|
|
82
|
+
| [`externalApiOAuth2Refresh`](/reference/management-api/schema/external-api#externalapioauth2refresh) | Mutation | Fetches a new access token for the OAuth2 credential of an external API now, in place of any cached one. An external API with no OAuth2 credential is refused. Scope: `ORGANIZATION_INTEGRATIONS_UPDATE`. |
|
|
82
83
|
| [`externalApiOAuth2Set`](/reference/management-api/schema/external-api#externalapioauth2set) | Mutation | Sets the OAuth2 credential of an external API, and removes any static auth header. The next call fetches a new access token. Scope: `ORGANIZATION_INTEGRATIONS_UPDATE`. |
|
|
83
84
|
| [`externalApiUpdate`](/reference/management-api/schema/external-api#externalapiupdate) | Mutation | Updates the name of an external API. To change the origin, delete it and create another. Scope: `ORGANIZATION_INTEGRATIONS_UPDATE`. |
|
|
84
85
|
| [`feature`](/reference/management-api/schema/feature#feature) | Query | Reads a feature flag by its ID and workspace. Scope: `ORGANIZATION_WORKSPACE_READ`. |
|
|
@@ -175,6 +175,12 @@ enum WorkflowEventName {
|
|
|
175
175
|
CONDITION_DELETED
|
|
176
176
|
"""An action was deleted."""
|
|
177
177
|
ACTION_DELETED
|
|
178
|
+
"""A lead was created."""
|
|
179
|
+
LEAD_CREATED
|
|
180
|
+
"""
|
|
181
|
+
A person or an API key changed a lead. A change a workflow run makes starts no workflow.
|
|
182
|
+
"""
|
|
183
|
+
LEAD_UPDATED
|
|
178
184
|
}
|
|
179
185
|
```
|
|
180
186
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "picked",
|
|
3
3
|
"description": "The Picked SDK front door: the client, the picked.config helpers, and the picked CLI in one install",
|
|
4
|
-
"version": "0.0.103-next.
|
|
4
|
+
"version": "0.0.103-next.3",
|
|
5
5
|
"bin": {
|
|
6
6
|
"picked": "dist/esm/bin.js"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@picked/cli": "0.0.103-next.
|
|
10
|
-
"@picked/config": "0.0.103-next.
|
|
9
|
+
"@picked/cli": "0.0.103-next.3",
|
|
10
|
+
"@picked/config": "0.0.103-next.3"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@picked/client": "workspace:*",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"main": "./dist/cjs/index.js",
|
|
65
65
|
"module": "./dist/esm/index.js",
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@picked/client": "0.0.103-next.
|
|
67
|
+
"@picked/client": "0.0.103-next.3"
|
|
68
68
|
},
|
|
69
69
|
"private": false,
|
|
70
70
|
"publishConfig": {
|