@1claw/sdk 0.34.4 → 0.35.1
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/README.md +2 -2
- package/dist/generated/api-types.d.ts +210 -0
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/resources/platform.d.ts +10 -1
- package/dist/resources/platform.d.ts.map +1 -1
- package/dist/resources/platform.js +15 -0
- package/dist/resources/platform.js.map +1 -1
- package/dist/types.d.ts +24 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -102,7 +102,7 @@ await client.auth.verifyEmailChange({ code: "123456" });
|
|
|
102
102
|
| `client.fiat` | `createOnrampSession`, `initiateOfframp` |
|
|
103
103
|
| `client.signingKeys` | `create`, `list`, `rotate`, `deactivate`, `export` |
|
|
104
104
|
| `client.agents` (Bankr) | `leaseBankrKey`, `listBankrKeys`, `revokeBankrKey` — privileged; `api_key` omitted for agent JWTs (use Shroud) |
|
|
105
|
-
| `client.platform` | `createApp`, `listApps`, `getApp`, `updateApp`, `deleteApp`, `rotateKey`, `createTemplate`, `listTemplates`, `upsertUser`, `listUsers`, `bootstrapUser`, `reissueClaim`, `claimPreview`, `claimRedeem`, `listConnectedApps`, `disconnectApp`, `createSpendPolicy`, `listSpendPolicies`, `setUserSpendPolicy`, `deleteSpendPolicy` |
|
|
105
|
+
| `client.platform` | `createApp`, `listApps`, `getApp`, `updateApp`, `deleteApp`, `rotateKey`, `createTemplate`, `listTemplates`, `upsertUser`, `listUsers`, `bootstrapUser`, `reissueClaim`, `claimPreview`, `claimRedeem`, `listConnectedApps`, `disconnectApp`, `grantAccess`, `listGrants`, `revokeGrant`, `createSpendPolicy`, `listSpendPolicies`, `setUserSpendPolicy`, `deleteSpendPolicy` |
|
|
106
106
|
| `client.devices` | `register`, `list`, `delete`, `challenge`, `attest`, `setPushToken` |
|
|
107
107
|
| `client.passkeys` | `list`, `registerBegin`, `registerComplete`, `assertBegin`, `assertComplete`, `delete` |
|
|
108
108
|
| `client.risk` | `listEvents`, `getVerdict`, `listVerdicts`, `createHoneytoken`, `listHoneytokens`, `deleteHoneytoken` |
|
|
@@ -470,7 +470,7 @@ const { data } = await client.agents.create({
|
|
|
470
470
|
injection_threshold: 0.7,
|
|
471
471
|
|
|
472
472
|
// Model restrictions
|
|
473
|
-
allowed_models: ["gpt-4o-mini", "claude-sonnet-
|
|
473
|
+
allowed_models: ["gpt-4o-mini", "claude-sonnet-5"], // Whitelist specific models
|
|
474
474
|
denied_models: ["gpt-3.5-turbo"], // Blacklist models
|
|
475
475
|
allowed_providers: ["openai", "anthropic"], // Restrict providers
|
|
476
476
|
|
|
@@ -3529,6 +3529,169 @@ export interface paths {
|
|
|
3529
3529
|
patch?: never;
|
|
3530
3530
|
trace?: never;
|
|
3531
3531
|
};
|
|
3532
|
+
"/v1/platform/connections/{connectionId}/grant": {
|
|
3533
|
+
parameters: {
|
|
3534
|
+
query?: never;
|
|
3535
|
+
header?: never;
|
|
3536
|
+
path?: never;
|
|
3537
|
+
cookie?: never;
|
|
3538
|
+
};
|
|
3539
|
+
get?: never;
|
|
3540
|
+
put?: never;
|
|
3541
|
+
/**
|
|
3542
|
+
* Grant platform app access to vaults/agents
|
|
3543
|
+
* @description User-authenticated. Grant the platform app access to selected vaults and agents.
|
|
3544
|
+
* Validates user ownership of all requested resources. Creates platform_user_grants
|
|
3545
|
+
* entries and merges resource IDs into the connection record.
|
|
3546
|
+
*/
|
|
3547
|
+
post: {
|
|
3548
|
+
parameters: {
|
|
3549
|
+
query?: never;
|
|
3550
|
+
header?: never;
|
|
3551
|
+
path: {
|
|
3552
|
+
connectionId: string;
|
|
3553
|
+
};
|
|
3554
|
+
cookie?: never;
|
|
3555
|
+
};
|
|
3556
|
+
requestBody: {
|
|
3557
|
+
content: {
|
|
3558
|
+
"application/json": components["schemas"]["GrantResourcesRequest"];
|
|
3559
|
+
};
|
|
3560
|
+
};
|
|
3561
|
+
responses: {
|
|
3562
|
+
/** @description Grants created */
|
|
3563
|
+
201: {
|
|
3564
|
+
headers: {
|
|
3565
|
+
[name: string]: unknown;
|
|
3566
|
+
};
|
|
3567
|
+
content: {
|
|
3568
|
+
"application/json": components["schemas"]["GrantResourcesResponse"];
|
|
3569
|
+
};
|
|
3570
|
+
};
|
|
3571
|
+
/** @description No vault_ids or agent_ids provided */
|
|
3572
|
+
400: {
|
|
3573
|
+
headers: {
|
|
3574
|
+
[name: string]: unknown;
|
|
3575
|
+
};
|
|
3576
|
+
content?: never;
|
|
3577
|
+
};
|
|
3578
|
+
/** @description Resource not owned by caller */
|
|
3579
|
+
403: {
|
|
3580
|
+
headers: {
|
|
3581
|
+
[name: string]: unknown;
|
|
3582
|
+
};
|
|
3583
|
+
content?: never;
|
|
3584
|
+
};
|
|
3585
|
+
/** @description Connection not found */
|
|
3586
|
+
404: {
|
|
3587
|
+
headers: {
|
|
3588
|
+
[name: string]: unknown;
|
|
3589
|
+
};
|
|
3590
|
+
content?: never;
|
|
3591
|
+
};
|
|
3592
|
+
};
|
|
3593
|
+
};
|
|
3594
|
+
delete?: never;
|
|
3595
|
+
options?: never;
|
|
3596
|
+
head?: never;
|
|
3597
|
+
patch?: never;
|
|
3598
|
+
trace?: never;
|
|
3599
|
+
};
|
|
3600
|
+
"/v1/platform/connections/{connectionId}/grants": {
|
|
3601
|
+
parameters: {
|
|
3602
|
+
query?: never;
|
|
3603
|
+
header?: never;
|
|
3604
|
+
path?: never;
|
|
3605
|
+
cookie?: never;
|
|
3606
|
+
};
|
|
3607
|
+
/**
|
|
3608
|
+
* List active resource grants for a connection
|
|
3609
|
+
* @description User-authenticated. Returns active (non-revoked) grants for the connection.
|
|
3610
|
+
*/
|
|
3611
|
+
get: {
|
|
3612
|
+
parameters: {
|
|
3613
|
+
query?: never;
|
|
3614
|
+
header?: never;
|
|
3615
|
+
path: {
|
|
3616
|
+
connectionId: string;
|
|
3617
|
+
};
|
|
3618
|
+
cookie?: never;
|
|
3619
|
+
};
|
|
3620
|
+
requestBody?: never;
|
|
3621
|
+
responses: {
|
|
3622
|
+
/** @description Grant list */
|
|
3623
|
+
200: {
|
|
3624
|
+
headers: {
|
|
3625
|
+
[name: string]: unknown;
|
|
3626
|
+
};
|
|
3627
|
+
content: {
|
|
3628
|
+
"application/json": components["schemas"]["GrantListResponse"];
|
|
3629
|
+
};
|
|
3630
|
+
};
|
|
3631
|
+
/** @description Connection not found */
|
|
3632
|
+
404: {
|
|
3633
|
+
headers: {
|
|
3634
|
+
[name: string]: unknown;
|
|
3635
|
+
};
|
|
3636
|
+
content?: never;
|
|
3637
|
+
};
|
|
3638
|
+
};
|
|
3639
|
+
};
|
|
3640
|
+
put?: never;
|
|
3641
|
+
post?: never;
|
|
3642
|
+
delete?: never;
|
|
3643
|
+
options?: never;
|
|
3644
|
+
head?: never;
|
|
3645
|
+
patch?: never;
|
|
3646
|
+
trace?: never;
|
|
3647
|
+
};
|
|
3648
|
+
"/v1/platform/connections/{connectionId}/grants/{grantId}": {
|
|
3649
|
+
parameters: {
|
|
3650
|
+
query?: never;
|
|
3651
|
+
header?: never;
|
|
3652
|
+
path?: never;
|
|
3653
|
+
cookie?: never;
|
|
3654
|
+
};
|
|
3655
|
+
get?: never;
|
|
3656
|
+
put?: never;
|
|
3657
|
+
post?: never;
|
|
3658
|
+
/**
|
|
3659
|
+
* Revoke a resource grant
|
|
3660
|
+
* @description User-authenticated. Revoke a specific resource grant by ID.
|
|
3661
|
+
*/
|
|
3662
|
+
delete: {
|
|
3663
|
+
parameters: {
|
|
3664
|
+
query?: never;
|
|
3665
|
+
header?: never;
|
|
3666
|
+
path: {
|
|
3667
|
+
connectionId: string;
|
|
3668
|
+
grantId: string;
|
|
3669
|
+
};
|
|
3670
|
+
cookie?: never;
|
|
3671
|
+
};
|
|
3672
|
+
requestBody?: never;
|
|
3673
|
+
responses: {
|
|
3674
|
+
/** @description Grant revoked */
|
|
3675
|
+
204: {
|
|
3676
|
+
headers: {
|
|
3677
|
+
[name: string]: unknown;
|
|
3678
|
+
};
|
|
3679
|
+
content?: never;
|
|
3680
|
+
};
|
|
3681
|
+
/** @description Grant not found or already revoked */
|
|
3682
|
+
404: {
|
|
3683
|
+
headers: {
|
|
3684
|
+
[name: string]: unknown;
|
|
3685
|
+
};
|
|
3686
|
+
content?: never;
|
|
3687
|
+
};
|
|
3688
|
+
};
|
|
3689
|
+
};
|
|
3690
|
+
options?: never;
|
|
3691
|
+
head?: never;
|
|
3692
|
+
patch?: never;
|
|
3693
|
+
trace?: never;
|
|
3694
|
+
};
|
|
3532
3695
|
"/v1/platform/claim/{token}": {
|
|
3533
3696
|
parameters: {
|
|
3534
3697
|
query?: never;
|
|
@@ -6368,6 +6531,53 @@ export interface components {
|
|
|
6368
6531
|
/** Format: date-time */
|
|
6369
6532
|
created_at?: string;
|
|
6370
6533
|
};
|
|
6534
|
+
GrantResourcesRequest: {
|
|
6535
|
+
/** @description Vault IDs to grant access to */
|
|
6536
|
+
vault_ids?: string[];
|
|
6537
|
+
/** @description Agent IDs to grant access to */
|
|
6538
|
+
agent_ids?: string[];
|
|
6539
|
+
/**
|
|
6540
|
+
* @description Secret path patterns the app can access
|
|
6541
|
+
* @default [
|
|
6542
|
+
* "**"
|
|
6543
|
+
* ]
|
|
6544
|
+
*/
|
|
6545
|
+
allowed_paths: string[];
|
|
6546
|
+
/**
|
|
6547
|
+
* @description Permissions granted (read, write, rotate)
|
|
6548
|
+
* @default [
|
|
6549
|
+
* "read"
|
|
6550
|
+
* ]
|
|
6551
|
+
*/
|
|
6552
|
+
permissions: string[];
|
|
6553
|
+
/**
|
|
6554
|
+
* Format: date-time
|
|
6555
|
+
* @description Optional grant expiration
|
|
6556
|
+
*/
|
|
6557
|
+
expires_at?: string;
|
|
6558
|
+
};
|
|
6559
|
+
GrantResponse: {
|
|
6560
|
+
/** Format: uuid */
|
|
6561
|
+
id?: string;
|
|
6562
|
+
/** Format: uuid */
|
|
6563
|
+
vault_id?: string;
|
|
6564
|
+
allowed_paths?: string[];
|
|
6565
|
+
permissions?: string[];
|
|
6566
|
+
/** Format: date-time */
|
|
6567
|
+
expires_at?: string | null;
|
|
6568
|
+
/** Format: date-time */
|
|
6569
|
+
created_at?: string;
|
|
6570
|
+
};
|
|
6571
|
+
GrantResourcesResponse: {
|
|
6572
|
+
/** Format: uuid */
|
|
6573
|
+
connection_id?: string;
|
|
6574
|
+
grants?: components["schemas"]["GrantResponse"][];
|
|
6575
|
+
vault_ids?: string[];
|
|
6576
|
+
agent_ids?: string[];
|
|
6577
|
+
};
|
|
6578
|
+
GrantListResponse: {
|
|
6579
|
+
grants?: components["schemas"]["GrantResponse"][];
|
|
6580
|
+
};
|
|
6371
6581
|
ClaimPreviewResponse: {
|
|
6372
6582
|
app_name?: string;
|
|
6373
6583
|
app_slug?: string;
|