@opencode-ai/sdk 1.17.4 → 1.17.5

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.
@@ -302,52 +302,23 @@ export class Resource extends HeyApiClient {
302
302
  }
303
303
  export class ProjectCopy extends HeyApiClient {
304
304
  /**
305
- * Remove project copy
305
+ * Generate project copy name
306
306
  *
307
- * Remove a local physical copy of a project using the selected strategy.
307
+ * Generate a short name for a project copy from task context.
308
308
  */
309
- remove(parameters, options) {
310
- const params = buildClientParams([parameters], [
311
- {
312
- args: [
313
- { in: "path", key: "projectID" },
314
- { in: "query", key: "workspace" },
315
- { in: "body", key: "directory" },
316
- { in: "body", key: "force" },
317
- ],
318
- },
319
- ]);
320
- return (options?.client ?? this.client).delete({
321
- url: "/experimental/project/{projectID}/copy",
322
- ...options,
323
- ...params,
324
- headers: {
325
- "Content-Type": "application/json",
326
- ...options?.headers,
327
- ...params.headers,
328
- },
329
- });
330
- }
331
- /**
332
- * Create project copy
333
- *
334
- * Create a local physical copy of a project using the selected strategy.
335
- */
336
- create(parameters, options) {
309
+ generateName(parameters, options) {
337
310
  const params = buildClientParams([parameters], [
338
311
  {
339
312
  args: [
340
313
  { in: "path", key: "projectID" },
314
+ { in: "query", key: "directory" },
341
315
  { in: "query", key: "workspace" },
342
- { in: "body", key: "strategy" },
343
- { in: "body", key: "directory" },
344
- { in: "body", key: "name" },
345
316
  { in: "body", key: "context" },
346
317
  ],
347
318
  },
348
319
  ]);
349
320
  return (options?.client ?? this.client).post({
350
- url: "/experimental/project/{projectID}/copy",
321
+ url: "/experimental/project/{projectID}/copy/generate-name",
351
322
  ...options,
352
323
  ...params,
353
324
  headers: {
@@ -357,27 +328,6 @@ export class ProjectCopy extends HeyApiClient {
357
328
  },
358
329
  });
359
330
  }
360
- /**
361
- * Refresh project copies
362
- *
363
- * Discover local project copies using one or all configured strategies.
364
- */
365
- refresh(parameters, options) {
366
- const params = buildClientParams([parameters], [
367
- {
368
- args: [
369
- { in: "path", key: "projectID" },
370
- { in: "query", key: "directory" },
371
- { in: "query", key: "workspace" },
372
- ],
373
- },
374
- ]);
375
- return (options?.client ?? this.client).post({
376
- url: "/experimental/project/{projectID}/copy/refresh",
377
- ...options,
378
- ...params,
379
- });
380
- }
381
331
  }
382
332
  export class Adapter extends HeyApiClient {
383
333
  /**
@@ -3432,17 +3382,44 @@ export class Provider2 extends HeyApiClient {
3432
3382
  });
3433
3383
  }
3434
3384
  }
3435
- export class Oauth2 extends HeyApiClient {
3385
+ export class Connect extends HeyApiClient {
3386
+ /**
3387
+ * Connect with key
3388
+ *
3389
+ * Run a key authentication method and store the resulting credential.
3390
+ */
3391
+ key(parameters, options) {
3392
+ const params = buildClientParams([parameters], [
3393
+ {
3394
+ args: [
3395
+ { in: "path", key: "integrationID" },
3396
+ { in: "query", key: "location" },
3397
+ { in: "body", key: "key" },
3398
+ { in: "body", key: "label" },
3399
+ ],
3400
+ },
3401
+ ]);
3402
+ return (options?.client ?? this.client).post({
3403
+ url: "/api/integration/{integrationID}/connect/key",
3404
+ ...options,
3405
+ ...params,
3406
+ headers: {
3407
+ "Content-Type": "application/json",
3408
+ ...options?.headers,
3409
+ ...params.headers,
3410
+ },
3411
+ });
3412
+ }
3436
3413
  /**
3437
3414
  * Begin OAuth connection
3438
3415
  *
3439
3416
  * Start an OAuth attempt and return the authorization details.
3440
3417
  */
3441
- begin(parameters, options) {
3418
+ oauth(parameters, options) {
3442
3419
  const params = buildClientParams([parameters], [
3443
3420
  {
3444
3421
  args: [
3445
- { in: "path", key: "connectorID" },
3422
+ { in: "path", key: "integrationID" },
3446
3423
  { in: "query", key: "location" },
3447
3424
  { in: "body", key: "methodID" },
3448
3425
  { in: "body", key: "inputs" },
@@ -3451,7 +3428,7 @@ export class Oauth2 extends HeyApiClient {
3451
3428
  },
3452
3429
  ]);
3453
3430
  return (options?.client ?? this.client).post({
3454
- url: "/api/connector/{connectorID}/connect/oauth",
3431
+ url: "/api/integration/{integrationID}/connect/oauth",
3455
3432
  ...options,
3456
3433
  ...params,
3457
3434
  headers: {
@@ -3461,6 +3438,8 @@ export class Oauth2 extends HeyApiClient {
3461
3438
  },
3462
3439
  });
3463
3440
  }
3441
+ }
3442
+ export class Attempt extends HeyApiClient {
3464
3443
  /**
3465
3444
  * Cancel OAuth connection
3466
3445
  *
@@ -3476,7 +3455,7 @@ export class Oauth2 extends HeyApiClient {
3476
3455
  },
3477
3456
  ]);
3478
3457
  return (options?.client ?? this.client).delete({
3479
- url: "/api/connector/oauth/{attemptID}",
3458
+ url: "/api/integration/attempt/{attemptID}",
3480
3459
  ...options,
3481
3460
  ...params,
3482
3461
  });
@@ -3496,7 +3475,7 @@ export class Oauth2 extends HeyApiClient {
3496
3475
  },
3497
3476
  ]);
3498
3477
  return (options?.client ?? this.client).get({
3499
- url: "/api/connector/oauth/{attemptID}",
3478
+ url: "/api/integration/attempt/{attemptID}",
3500
3479
  ...options,
3501
3480
  ...params,
3502
3481
  });
@@ -3517,7 +3496,7 @@ export class Oauth2 extends HeyApiClient {
3517
3496
  },
3518
3497
  ]);
3519
3498
  return (options?.client ?? this.client).post({
3520
- url: "/api/connector/oauth/{attemptID}/complete",
3499
+ url: "/api/integration/attempt/{attemptID}/complete",
3521
3500
  ...options,
3522
3501
  ...params,
3523
3502
  headers: {
@@ -3528,79 +3507,88 @@ export class Oauth2 extends HeyApiClient {
3528
3507
  });
3529
3508
  }
3530
3509
  }
3531
- export class Connect extends HeyApiClient {
3510
+ export class Integration extends HeyApiClient {
3532
3511
  /**
3533
- * Connect with key
3512
+ * List integrations
3534
3513
  *
3535
- * Run a key authentication method and store the resulting credential.
3514
+ * Retrieve available integrations and their authentication methods.
3536
3515
  */
3537
- key(parameters, options) {
3516
+ list(parameters, options) {
3517
+ const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3518
+ return (options?.client ?? this.client).get({
3519
+ url: "/api/integration",
3520
+ ...options,
3521
+ ...params,
3522
+ });
3523
+ }
3524
+ /**
3525
+ * Get integration
3526
+ *
3527
+ * Retrieve one integration and its authentication methods.
3528
+ */
3529
+ get(parameters, options) {
3538
3530
  const params = buildClientParams([parameters], [
3539
3531
  {
3540
3532
  args: [
3541
- { in: "path", key: "connectorID" },
3533
+ { in: "path", key: "integrationID" },
3542
3534
  { in: "query", key: "location" },
3543
- { in: "body", key: "methodID" },
3544
- { in: "body", key: "key" },
3545
- { in: "body", key: "inputs" },
3546
- { in: "body", key: "label" },
3547
3535
  ],
3548
3536
  },
3549
3537
  ]);
3550
- return (options?.client ?? this.client).post({
3551
- url: "/api/connector/{connectorID}/connect/key",
3538
+ return (options?.client ?? this.client).get({
3539
+ url: "/api/integration/{integrationID}",
3552
3540
  ...options,
3553
3541
  ...params,
3554
- headers: {
3555
- "Content-Type": "application/json",
3556
- ...options?.headers,
3557
- ...params.headers,
3558
- },
3559
3542
  });
3560
3543
  }
3561
- _oauth;
3562
- get oauth() {
3563
- return (this._oauth ??= new Oauth2({ client: this.client }));
3544
+ _connect;
3545
+ get connect() {
3546
+ return (this._connect ??= new Connect({ client: this.client }));
3547
+ }
3548
+ _attempt;
3549
+ get attempt() {
3550
+ return (this._attempt ??= new Attempt({ client: this.client }));
3564
3551
  }
3565
3552
  }
3566
- export class Connector extends HeyApiClient {
3553
+ export class Credential extends HeyApiClient {
3567
3554
  /**
3568
- * List connectors
3555
+ * Remove credential
3569
3556
  *
3570
- * Retrieve available connectors and their authentication methods.
3557
+ * Remove a stored integration credential.
3571
3558
  */
3572
- list(parameters, options) {
3573
- const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
3574
- return (options?.client ?? this.client).get({
3575
- url: "/api/connector",
3559
+ remove(parameters, options) {
3560
+ const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "credentialID" }] }]);
3561
+ return (options?.client ?? this.client).delete({
3562
+ url: "/api/credential/{credentialID}",
3576
3563
  ...options,
3577
3564
  ...params,
3578
3565
  });
3579
3566
  }
3580
3567
  /**
3581
- * Get connector
3568
+ * Update credential
3582
3569
  *
3583
- * Retrieve one connector and its authentication methods.
3570
+ * Update a stored credential label.
3584
3571
  */
3585
- get(parameters, options) {
3572
+ update(parameters, options) {
3586
3573
  const params = buildClientParams([parameters], [
3587
3574
  {
3588
3575
  args: [
3589
- { in: "path", key: "connectorID" },
3590
- { in: "query", key: "location" },
3576
+ { in: "path", key: "credentialID" },
3577
+ { in: "body", key: "label" },
3591
3578
  ],
3592
3579
  },
3593
3580
  ]);
3594
- return (options?.client ?? this.client).get({
3595
- url: "/api/connector/{connectorID}",
3581
+ return (options?.client ?? this.client).patch({
3582
+ url: "/api/credential/{credentialID}",
3596
3583
  ...options,
3597
3584
  ...params,
3585
+ headers: {
3586
+ "Content-Type": "application/json",
3587
+ ...options?.headers,
3588
+ ...params.headers,
3589
+ },
3598
3590
  });
3599
3591
  }
3600
- _connect;
3601
- get connect() {
3602
- return (this._connect ??= new Connect({ client: this.client }));
3603
- }
3604
3592
  }
3605
3593
  export class Request extends HeyApiClient {
3606
3594
  /**
@@ -3793,6 +3781,68 @@ export class Reference extends HeyApiClient {
3793
3781
  });
3794
3782
  }
3795
3783
  }
3784
+ export class ProjectCopy2 extends HeyApiClient {
3785
+ remove(parameters, options) {
3786
+ const params = buildClientParams([parameters], [
3787
+ {
3788
+ args: [
3789
+ { in: "path", key: "projectID" },
3790
+ { in: "query", key: "location" },
3791
+ { in: "body", key: "directory" },
3792
+ { in: "body", key: "force" },
3793
+ ],
3794
+ },
3795
+ ]);
3796
+ return (options?.client ?? this.client).delete({
3797
+ url: "/experimental/project/{projectID}/copy",
3798
+ ...options,
3799
+ ...params,
3800
+ headers: {
3801
+ "Content-Type": "application/json",
3802
+ ...options?.headers,
3803
+ ...params.headers,
3804
+ },
3805
+ });
3806
+ }
3807
+ create(parameters, options) {
3808
+ const params = buildClientParams([parameters], [
3809
+ {
3810
+ args: [
3811
+ { in: "path", key: "projectID" },
3812
+ { in: "query", key: "location" },
3813
+ { in: "body", key: "strategy" },
3814
+ { in: "body", key: "directory" },
3815
+ { in: "body", key: "name" },
3816
+ ],
3817
+ },
3818
+ ]);
3819
+ return (options?.client ?? this.client).post({
3820
+ url: "/experimental/project/{projectID}/copy",
3821
+ ...options,
3822
+ ...params,
3823
+ headers: {
3824
+ "Content-Type": "application/json",
3825
+ ...options?.headers,
3826
+ ...params.headers,
3827
+ },
3828
+ });
3829
+ }
3830
+ refresh(parameters, options) {
3831
+ const params = buildClientParams([parameters], [
3832
+ {
3833
+ args: [
3834
+ { in: "path", key: "projectID" },
3835
+ { in: "query", key: "location" },
3836
+ ],
3837
+ },
3838
+ ]);
3839
+ return (options?.client ?? this.client).post({
3840
+ url: "/experimental/project/{projectID}/copy/refresh",
3841
+ ...options,
3842
+ ...params,
3843
+ });
3844
+ }
3845
+ }
3796
3846
  export class V2 extends HeyApiClient {
3797
3847
  _health;
3798
3848
  get health() {
@@ -3818,9 +3868,13 @@ export class V2 extends HeyApiClient {
3818
3868
  get provider() {
3819
3869
  return (this._provider ??= new Provider2({ client: this.client }));
3820
3870
  }
3821
- _connector;
3822
- get connector() {
3823
- return (this._connector ??= new Connector({ client: this.client }));
3871
+ _integration;
3872
+ get integration() {
3873
+ return (this._integration ??= new Integration({ client: this.client }));
3874
+ }
3875
+ _credential;
3876
+ get credential() {
3877
+ return (this._credential ??= new Credential({ client: this.client }));
3824
3878
  }
3825
3879
  _permission;
3826
3880
  get permission() {
@@ -3850,6 +3904,10 @@ export class V2 extends HeyApiClient {
3850
3904
  get reference() {
3851
3905
  return (this._reference ??= new Reference({ client: this.client }));
3852
3906
  }
3907
+ _projectCopy;
3908
+ get projectCopy() {
3909
+ return (this._projectCopy ??= new ProjectCopy2({ client: this.client }));
3910
+ }
3853
3911
  }
3854
3912
  export class OpencodeClient extends HeyApiClient {
3855
3913
  static __registry = new HeyApiRegistry();