@1claw/sdk 0.22.1 → 0.23.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.
@@ -2240,6 +2240,522 @@ export interface paths {
2240
2240
  patch?: never;
2241
2241
  trace?: never;
2242
2242
  };
2243
+ "/v1/platform/apps": {
2244
+ parameters: {
2245
+ query?: never;
2246
+ header?: never;
2247
+ path?: never;
2248
+ cookie?: never;
2249
+ };
2250
+ /**
2251
+ * List platform apps
2252
+ * @description List all platform apps in the organization.
2253
+ */
2254
+ get: {
2255
+ parameters: {
2256
+ query?: never;
2257
+ header?: never;
2258
+ path?: never;
2259
+ cookie?: never;
2260
+ };
2261
+ requestBody?: never;
2262
+ responses: {
2263
+ /** @description List of platform apps */
2264
+ 200: {
2265
+ headers: {
2266
+ [name: string]: unknown;
2267
+ };
2268
+ content: {
2269
+ "application/json": components["schemas"]["PlatformAppResponse"][];
2270
+ };
2271
+ };
2272
+ };
2273
+ };
2274
+ put?: never;
2275
+ /**
2276
+ * Register a platform app
2277
+ * @description Register a new platform app for building on top of 1Claw. Returns an API key (plt_ prefix) that must be saved immediately.
2278
+ */
2279
+ post: {
2280
+ parameters: {
2281
+ query?: never;
2282
+ header?: never;
2283
+ path?: never;
2284
+ cookie?: never;
2285
+ };
2286
+ requestBody: {
2287
+ content: {
2288
+ "application/json": components["schemas"]["CreatePlatformAppRequest"];
2289
+ };
2290
+ };
2291
+ responses: {
2292
+ /** @description Platform app created */
2293
+ 201: {
2294
+ headers: {
2295
+ [name: string]: unknown;
2296
+ };
2297
+ content: {
2298
+ "application/json": components["schemas"]["PlatformAppCreatedResponse"];
2299
+ };
2300
+ };
2301
+ /** @description Invalid request */
2302
+ 400: {
2303
+ headers: {
2304
+ [name: string]: unknown;
2305
+ };
2306
+ content?: never;
2307
+ };
2308
+ /** @description Only human users can register platform apps */
2309
+ 403: {
2310
+ headers: {
2311
+ [name: string]: unknown;
2312
+ };
2313
+ content?: never;
2314
+ };
2315
+ };
2316
+ };
2317
+ delete?: never;
2318
+ options?: never;
2319
+ head?: never;
2320
+ patch?: never;
2321
+ trace?: never;
2322
+ };
2323
+ "/v1/platform/apps/{appId}": {
2324
+ parameters: {
2325
+ query?: never;
2326
+ header?: never;
2327
+ path?: never;
2328
+ cookie?: never;
2329
+ };
2330
+ /** Get platform app details */
2331
+ get: {
2332
+ parameters: {
2333
+ query?: never;
2334
+ header?: never;
2335
+ path: {
2336
+ appId: string;
2337
+ };
2338
+ cookie?: never;
2339
+ };
2340
+ requestBody?: never;
2341
+ responses: {
2342
+ /** @description Platform app details */
2343
+ 200: {
2344
+ headers: {
2345
+ [name: string]: unknown;
2346
+ };
2347
+ content: {
2348
+ "application/json": components["schemas"]["PlatformAppResponse"];
2349
+ };
2350
+ };
2351
+ /** @description Not found */
2352
+ 404: {
2353
+ headers: {
2354
+ [name: string]: unknown;
2355
+ };
2356
+ content?: never;
2357
+ };
2358
+ };
2359
+ };
2360
+ put?: never;
2361
+ post?: never;
2362
+ /** Delete platform app */
2363
+ delete: {
2364
+ parameters: {
2365
+ query?: never;
2366
+ header?: never;
2367
+ path: {
2368
+ appId: string;
2369
+ };
2370
+ cookie?: never;
2371
+ };
2372
+ requestBody?: never;
2373
+ responses: {
2374
+ /** @description Deleted */
2375
+ 204: {
2376
+ headers: {
2377
+ [name: string]: unknown;
2378
+ };
2379
+ content?: never;
2380
+ };
2381
+ /** @description Only human users can delete platform apps */
2382
+ 403: {
2383
+ headers: {
2384
+ [name: string]: unknown;
2385
+ };
2386
+ content?: never;
2387
+ };
2388
+ };
2389
+ };
2390
+ options?: never;
2391
+ head?: never;
2392
+ /** Update platform app */
2393
+ patch: {
2394
+ parameters: {
2395
+ query?: never;
2396
+ header?: never;
2397
+ path: {
2398
+ appId: string;
2399
+ };
2400
+ cookie?: never;
2401
+ };
2402
+ requestBody: {
2403
+ content: {
2404
+ "application/json": components["schemas"]["UpdatePlatformAppRequest"];
2405
+ };
2406
+ };
2407
+ responses: {
2408
+ /** @description Updated platform app */
2409
+ 200: {
2410
+ headers: {
2411
+ [name: string]: unknown;
2412
+ };
2413
+ content: {
2414
+ "application/json": components["schemas"]["PlatformAppResponse"];
2415
+ };
2416
+ };
2417
+ };
2418
+ };
2419
+ trace?: never;
2420
+ };
2421
+ "/v1/platform/apps/{appId}/templates": {
2422
+ parameters: {
2423
+ query?: never;
2424
+ header?: never;
2425
+ path?: never;
2426
+ cookie?: never;
2427
+ };
2428
+ /** List templates */
2429
+ get: {
2430
+ parameters: {
2431
+ query?: never;
2432
+ header?: never;
2433
+ path: {
2434
+ appId: string;
2435
+ };
2436
+ cookie?: never;
2437
+ };
2438
+ requestBody?: never;
2439
+ responses: {
2440
+ /** @description List of templates */
2441
+ 200: {
2442
+ headers: {
2443
+ [name: string]: unknown;
2444
+ };
2445
+ content: {
2446
+ "application/json": components["schemas"]["PlatformTemplateResponse"][];
2447
+ };
2448
+ };
2449
+ };
2450
+ };
2451
+ put?: never;
2452
+ /**
2453
+ * Create bootstrap template
2454
+ * @description Create a template that defines what vault, agents, and policies to bootstrap for each connected user.
2455
+ */
2456
+ post: {
2457
+ parameters: {
2458
+ query?: never;
2459
+ header?: never;
2460
+ path: {
2461
+ appId: string;
2462
+ };
2463
+ cookie?: never;
2464
+ };
2465
+ requestBody: {
2466
+ content: {
2467
+ "application/json": components["schemas"]["CreateTemplateRequest"];
2468
+ };
2469
+ };
2470
+ responses: {
2471
+ /** @description Template created */
2472
+ 201: {
2473
+ headers: {
2474
+ [name: string]: unknown;
2475
+ };
2476
+ content: {
2477
+ "application/json": components["schemas"]["PlatformTemplateResponse"];
2478
+ };
2479
+ };
2480
+ };
2481
+ };
2482
+ delete?: never;
2483
+ options?: never;
2484
+ head?: never;
2485
+ patch?: never;
2486
+ trace?: never;
2487
+ };
2488
+ "/v1/platform/users/upsert": {
2489
+ parameters: {
2490
+ query?: never;
2491
+ header?: never;
2492
+ path?: never;
2493
+ cookie?: never;
2494
+ };
2495
+ get?: never;
2496
+ put?: never;
2497
+ /**
2498
+ * Provision or look up a platform user
2499
+ * @description Upserts a user using either an OIDC subject_token (verified against the platform app's JWKS) or an email address. Returns the user handle and connection ID.
2500
+ */
2501
+ post: {
2502
+ parameters: {
2503
+ query?: never;
2504
+ header?: never;
2505
+ path?: never;
2506
+ cookie?: never;
2507
+ };
2508
+ requestBody: {
2509
+ content: {
2510
+ "application/json": components["schemas"]["UpsertPlatformUserRequest"];
2511
+ };
2512
+ };
2513
+ responses: {
2514
+ /** @description Existing user found */
2515
+ 200: {
2516
+ headers: {
2517
+ [name: string]: unknown;
2518
+ };
2519
+ content: {
2520
+ "application/json": components["schemas"]["PlatformUserResponse"];
2521
+ };
2522
+ };
2523
+ /** @description New user created */
2524
+ 201: {
2525
+ headers: {
2526
+ [name: string]: unknown;
2527
+ };
2528
+ content: {
2529
+ "application/json": components["schemas"]["PlatformUserResponse"];
2530
+ };
2531
+ };
2532
+ };
2533
+ };
2534
+ delete?: never;
2535
+ options?: never;
2536
+ head?: never;
2537
+ patch?: never;
2538
+ trace?: never;
2539
+ };
2540
+ "/v1/platform/apps/{appId}/users": {
2541
+ parameters: {
2542
+ query?: never;
2543
+ header?: never;
2544
+ path?: never;
2545
+ cookie?: never;
2546
+ };
2547
+ /**
2548
+ * List connected users
2549
+ * @description List all users connected to this platform app.
2550
+ */
2551
+ get: {
2552
+ parameters: {
2553
+ query?: never;
2554
+ header?: never;
2555
+ path: {
2556
+ appId: string;
2557
+ };
2558
+ cookie?: never;
2559
+ };
2560
+ requestBody?: never;
2561
+ responses: {
2562
+ /** @description Connected users */
2563
+ 200: {
2564
+ headers: {
2565
+ [name: string]: unknown;
2566
+ };
2567
+ content: {
2568
+ "application/json": components["schemas"]["PlatformConnectedUserResponse"][];
2569
+ };
2570
+ };
2571
+ };
2572
+ };
2573
+ put?: never;
2574
+ post?: never;
2575
+ delete?: never;
2576
+ options?: never;
2577
+ head?: never;
2578
+ patch?: never;
2579
+ trace?: never;
2580
+ };
2581
+ "/v1/platform/connections/{connectionId}/bootstrap": {
2582
+ parameters: {
2583
+ query?: never;
2584
+ header?: never;
2585
+ path?: never;
2586
+ cookie?: never;
2587
+ };
2588
+ get?: never;
2589
+ put?: never;
2590
+ /**
2591
+ * Bootstrap resources for a connected user
2592
+ * @description Executes a template to create vault, agent, and policies for the connected user. Returns a claim URL and token for the user to claim their resources.
2593
+ */
2594
+ post: {
2595
+ parameters: {
2596
+ query?: never;
2597
+ header?: never;
2598
+ path: {
2599
+ connectionId: string;
2600
+ };
2601
+ cookie?: never;
2602
+ };
2603
+ requestBody: {
2604
+ content: {
2605
+ "application/json": components["schemas"]["BootstrapRequest"];
2606
+ };
2607
+ };
2608
+ responses: {
2609
+ /** @description Resources bootstrapped */
2610
+ 201: {
2611
+ headers: {
2612
+ [name: string]: unknown;
2613
+ };
2614
+ content: {
2615
+ "application/json": components["schemas"]["BootstrapResponse"];
2616
+ };
2617
+ };
2618
+ };
2619
+ };
2620
+ delete?: never;
2621
+ options?: never;
2622
+ head?: never;
2623
+ patch?: never;
2624
+ trace?: never;
2625
+ };
2626
+ "/v1/platform/apps/{appId}/audit": {
2627
+ parameters: {
2628
+ query?: never;
2629
+ header?: never;
2630
+ path?: never;
2631
+ cookie?: never;
2632
+ };
2633
+ /**
2634
+ * Platform audit log
2635
+ * @description Returns audit events related to this platform app.
2636
+ */
2637
+ get: {
2638
+ parameters: {
2639
+ query?: {
2640
+ limit?: number;
2641
+ offset?: number;
2642
+ };
2643
+ header?: never;
2644
+ path: {
2645
+ appId: string;
2646
+ };
2647
+ cookie?: never;
2648
+ };
2649
+ requestBody?: never;
2650
+ responses: {
2651
+ /** @description Audit events */
2652
+ 200: {
2653
+ headers: {
2654
+ [name: string]: unknown;
2655
+ };
2656
+ content: {
2657
+ "application/json": {
2658
+ events?: Record<string, never>[];
2659
+ };
2660
+ };
2661
+ };
2662
+ };
2663
+ };
2664
+ put?: never;
2665
+ post?: never;
2666
+ delete?: never;
2667
+ options?: never;
2668
+ head?: never;
2669
+ patch?: never;
2670
+ trace?: never;
2671
+ };
2672
+ "/v1/platform/connected-apps": {
2673
+ parameters: {
2674
+ query?: never;
2675
+ header?: never;
2676
+ path?: never;
2677
+ cookie?: never;
2678
+ };
2679
+ /**
2680
+ * List connected apps (user side)
2681
+ * @description Returns platform apps connected to the calling user's account.
2682
+ */
2683
+ get: {
2684
+ parameters: {
2685
+ query?: never;
2686
+ header?: never;
2687
+ path?: never;
2688
+ cookie?: never;
2689
+ };
2690
+ requestBody?: never;
2691
+ responses: {
2692
+ /** @description Connected apps */
2693
+ 200: {
2694
+ headers: {
2695
+ [name: string]: unknown;
2696
+ };
2697
+ content: {
2698
+ "application/json": {
2699
+ connected_apps?: components["schemas"]["ConnectedAppResponse"][];
2700
+ };
2701
+ };
2702
+ };
2703
+ };
2704
+ };
2705
+ put?: never;
2706
+ post?: never;
2707
+ delete?: never;
2708
+ options?: never;
2709
+ head?: never;
2710
+ patch?: never;
2711
+ trace?: never;
2712
+ };
2713
+ "/v1/platform/connected-apps/{connectionId}": {
2714
+ parameters: {
2715
+ query?: never;
2716
+ header?: never;
2717
+ path?: never;
2718
+ cookie?: never;
2719
+ };
2720
+ get?: never;
2721
+ put?: never;
2722
+ post?: never;
2723
+ /**
2724
+ * Disconnect a platform app
2725
+ * @description Disconnect the calling user from a platform app.
2726
+ */
2727
+ delete: {
2728
+ parameters: {
2729
+ query?: never;
2730
+ header?: never;
2731
+ path: {
2732
+ connectionId: string;
2733
+ };
2734
+ cookie?: never;
2735
+ };
2736
+ requestBody?: never;
2737
+ responses: {
2738
+ /** @description Disconnected */
2739
+ 204: {
2740
+ headers: {
2741
+ [name: string]: unknown;
2742
+ };
2743
+ content?: never;
2744
+ };
2745
+ /** @description Connection not found */
2746
+ 404: {
2747
+ headers: {
2748
+ [name: string]: unknown;
2749
+ };
2750
+ content?: never;
2751
+ };
2752
+ };
2753
+ };
2754
+ options?: never;
2755
+ head?: never;
2756
+ patch?: never;
2757
+ trace?: never;
2758
+ };
2243
2759
  }
2244
2760
  export type webhooks = Record<string, never>;
2245
2761
  export interface components {
@@ -3205,6 +3721,7 @@ export interface components {
3205
3721
  chain: string;
3206
3722
  /** @description Hex-encoded calldata */
3207
3723
  data?: string;
3724
+ /** @description Vault path to signing key. Auto-resolves per-chain signing key if provisioned, otherwise keys/{chain}-signer. */
3208
3725
  signing_key_path?: string;
3209
3726
  nonce?: number;
3210
3727
  gas_price?: string;
@@ -3229,6 +3746,7 @@ export interface components {
3229
3746
  chain: string;
3230
3747
  /** @description Hex-encoded calldata */
3231
3748
  data?: string;
3749
+ /** @description Vault path to signing key. Auto-resolves per-chain signing key if provisioned, otherwise keys/{chain}-signer. */
3232
3750
  signing_key_path?: string;
3233
3751
  nonce?: number;
3234
3752
  gas_price?: string;
@@ -3261,6 +3779,7 @@ export interface components {
3261
3779
  value: string;
3262
3780
  chain: string;
3263
3781
  data?: string;
3782
+ /** @description Vault path to signing key. Auto-resolves per-chain signing key if provisioned, otherwise keys/{chain}-signer. */
3264
3783
  signing_key_path?: string;
3265
3784
  gas_limit?: number;
3266
3785
  };
@@ -3294,6 +3813,7 @@ export interface components {
3294
3813
  /** @enum {string} */
3295
3814
  intent_type: "personal_sign" | "typed_data" | "transaction";
3296
3815
  chain: string;
3816
+ /** @description Vault path to signing key. Auto-resolves per-chain signing key if provisioned, otherwise keys/{chain}-signer. */
3297
3817
  signing_key_path?: string;
3298
3818
  /** @description Hex-encoded message bytes (for personal_sign) */
3299
3819
  message?: string;
@@ -3963,6 +4483,162 @@ export interface components {
3963
4483
  status?: "healthy" | "degraded";
3964
4484
  version?: string;
3965
4485
  };
4486
+ CreatePlatformAppRequest: {
4487
+ name: string;
4488
+ slug: string;
4489
+ description?: string;
4490
+ /** Format: uri */
4491
+ oidc_jwks_url?: string;
4492
+ /** Format: uri */
4493
+ oidc_issuer?: string;
4494
+ redirect_uris?: string[];
4495
+ /**
4496
+ * @default platform_pays
4497
+ * @enum {string}
4498
+ */
4499
+ billing_model: "platform_pays" | "user_pays" | "hybrid";
4500
+ /**
4501
+ * @default silent
4502
+ * @enum {string}
4503
+ */
4504
+ auth_mode: "silent" | "user_signin" | "configurable";
4505
+ max_connected_users?: number | null;
4506
+ };
4507
+ UpdatePlatformAppRequest: {
4508
+ name?: string;
4509
+ description?: string;
4510
+ logo_url?: string;
4511
+ oidc_jwks_url?: string;
4512
+ oidc_issuer?: string;
4513
+ redirect_uris?: string[];
4514
+ webhook_url?: string;
4515
+ /** @enum {string} */
4516
+ billing_model?: "platform_pays" | "user_pays" | "hybrid";
4517
+ /** @enum {string} */
4518
+ auth_mode?: "silent" | "user_signin" | "configurable";
4519
+ max_connected_users?: number | null;
4520
+ is_active?: boolean;
4521
+ };
4522
+ PlatformAppResponse: {
4523
+ /** Format: uuid */
4524
+ id?: string;
4525
+ name?: string;
4526
+ slug?: string;
4527
+ description?: string;
4528
+ logo_url?: string | null;
4529
+ api_key_prefix?: string;
4530
+ oidc_jwks_url?: string | null;
4531
+ oidc_issuer?: string | null;
4532
+ redirect_uris?: string[];
4533
+ webhook_url?: string | null;
4534
+ is_active?: boolean;
4535
+ billing_model?: string;
4536
+ auth_mode?: string;
4537
+ max_connected_users?: number | null;
4538
+ connected_users?: number;
4539
+ /** Format: date-time */
4540
+ created_at?: string;
4541
+ /** Format: date-time */
4542
+ updated_at?: string;
4543
+ };
4544
+ PlatformAppCreatedResponse: components["schemas"]["PlatformAppResponse"] & {
4545
+ /** @description The platform API key. Save immediately - it cannot be retrieved again. */
4546
+ api_key: string;
4547
+ };
4548
+ CreateTemplateRequest: {
4549
+ name: string;
4550
+ description?: string;
4551
+ /** @description Template specification defining vault, agents, and policies to bootstrap. */
4552
+ spec: Record<string, never>;
4553
+ };
4554
+ PlatformTemplateResponse: {
4555
+ /** Format: uuid */
4556
+ id?: string;
4557
+ /** Format: uuid */
4558
+ platform_app_id?: string;
4559
+ name?: string;
4560
+ description?: string;
4561
+ version?: number;
4562
+ spec?: Record<string, never>;
4563
+ is_active?: boolean;
4564
+ /** Format: date-time */
4565
+ created_at?: string;
4566
+ /** Format: date-time */
4567
+ updated_at?: string;
4568
+ };
4569
+ UpsertPlatformUserRequest: {
4570
+ /** @description OIDC JWT from the platform's IdP (verified against JWKS) */
4571
+ subject_token?: string;
4572
+ /** @default urn:ietf:params:oauth:token-type:jwt */
4573
+ subject_token_type: string;
4574
+ /**
4575
+ * Format: email
4576
+ * @description Fallback when subject_token is not provided
4577
+ */
4578
+ email?: string;
4579
+ display_name?: string;
4580
+ };
4581
+ PlatformUserResponse: {
4582
+ /** Format: uuid */
4583
+ user_handle?: string;
4584
+ is_new?: boolean;
4585
+ /** Format: uuid */
4586
+ connection_id?: string;
4587
+ email?: string;
4588
+ };
4589
+ PlatformConnectedUserResponse: {
4590
+ /** Format: uuid */
4591
+ connection_id?: string;
4592
+ /** Format: uuid */
4593
+ user_id?: string;
4594
+ external_subject?: string;
4595
+ status?: string;
4596
+ vault_ids?: string[];
4597
+ agent_ids?: string[];
4598
+ /** Format: date-time */
4599
+ created_at?: string;
4600
+ /** Format: date-time */
4601
+ claimed_at?: string | null;
4602
+ };
4603
+ BootstrapRequest: {
4604
+ /**
4605
+ * Format: uuid
4606
+ * @description Template to use. Falls back to the app's default template.
4607
+ */
4608
+ template_id?: string;
4609
+ /**
4610
+ * Format: uri
4611
+ * @description URL to redirect the user to after claiming resources.
4612
+ */
4613
+ return_to?: string;
4614
+ };
4615
+ BootstrapResponse: {
4616
+ /** Format: uri */
4617
+ claim_url?: string;
4618
+ claim_token?: string;
4619
+ /** @description Seconds until the claim token expires */
4620
+ expires_in?: number;
4621
+ /** Format: uuid */
4622
+ connection_id?: string;
4623
+ summary?: {
4624
+ /** Format: uuid */
4625
+ vault_id?: string | null;
4626
+ /** Format: uuid */
4627
+ agent_id?: string | null;
4628
+ policy_ids?: string[];
4629
+ };
4630
+ };
4631
+ ConnectedAppResponse: {
4632
+ /** Format: uuid */
4633
+ connection_id?: string;
4634
+ app_name?: string;
4635
+ app_slug?: string;
4636
+ status?: string;
4637
+ vault_ids?: string[];
4638
+ agent_ids?: string[];
4639
+ /** Format: date-time */
4640
+ created_at?: string;
4641
+ };
3966
4642
  };
3967
4643
  responses: {
3968
4644
  /** @description Invalid request */