Skip to content

Commit 786e0a4

Browse files
feat(api): split credentials and secrets
1 parent fd82f81 commit 786e0a4

20 files changed

Lines changed: 1601 additions & 1589 deletions

File tree

apps/docs/openapi-v2-resources.json

Lines changed: 230 additions & 357 deletions
Large diffs are not rendered by default.

apps/docs/openapi-v2-tables.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4766,6 +4766,11 @@
47664766
"data": {
47674767
"$ref": "#/components/schemas/RowData"
47684768
},
4769+
"__privateSecretProvenance": {
4770+
"type": "object",
4771+
"writeOnly": true,
4772+
"description": "Opaque Sim-managed encrypted provenance metadata. External callers should omit this field."
4773+
},
47694774
"afterRowId": {
47704775
"type": "string",
47714776
"minLength": 1,
@@ -4788,6 +4793,11 @@
47884793
"minLength": 1,
47894794
"description": "The workspace that owns the table."
47904795
},
4796+
"__privateSecretProvenance": {
4797+
"type": "object",
4798+
"writeOnly": true,
4799+
"description": "Opaque Sim-managed encrypted provenance metadata. External callers should omit this field."
4800+
},
47914801
"rows": {
47924802
"type": "array",
47934803
"minItems": 1,
@@ -4826,6 +4836,11 @@
48264836
"data": {
48274837
"$ref": "#/components/schemas/RowData"
48284838
},
4839+
"__privateSecretProvenance": {
4840+
"type": "object",
4841+
"writeOnly": true,
4842+
"description": "Opaque Sim-managed encrypted provenance metadata. External callers should omit this field."
4843+
},
48294844
"limit": {
48304845
"type": "integer",
48314846
"minimum": 1,
@@ -4906,6 +4921,11 @@
49064921
},
49074922
"data": {
49084923
"$ref": "#/components/schemas/RowData"
4924+
},
4925+
"__privateSecretProvenance": {
4926+
"type": "object",
4927+
"writeOnly": true,
4928+
"description": "Opaque Sim-managed encrypted provenance metadata. External callers should omit this field."
49094929
}
49104930
}
49114931
},
@@ -4922,6 +4942,11 @@
49224942
"data": {
49234943
"$ref": "#/components/schemas/RowData"
49244944
},
4945+
"__privateSecretProvenance": {
4946+
"type": "object",
4947+
"writeOnly": true,
4948+
"description": "Opaque Sim-managed encrypted provenance metadata. External callers should omit this field."
4949+
},
49254950
"conflictTarget": {
49264951
"type": "string",
49274952
"minLength": 1,

apps/sim/app/api/credentials/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export const GET = withRouteHandler(async (request: NextRequest) => {
219219
workspaceId,
220220
userId: session.user.id,
221221
workspaceAccess,
222-
type,
222+
types: type ? [type] : undefined,
223223
providerId,
224224
})
225225
const credentials = visible.map(({ hasServiceAccountKey: _hasKey, ...rest }) => rest)

apps/sim/app/api/v1/middleware.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ export type ApiEndpoint =
6666
| 'custom-tools'
6767
| 'custom-tool-detail'
6868
| 'credentials'
69-
| 'credential-detail'
69+
| 'secrets'
70+
| 'secret-detail'
7071

7172
export interface RateLimitResult {
7273
allowed: boolean

0 commit comments

Comments
 (0)