@amerged/ohmyhost-sdk 0.1.59 → 0.1.62

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amerged/ohmyhost-sdk",
3
- "version": "0.1.59",
3
+ "version": "0.1.62",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohmyhost/sdk-ts",
3
- "version": "0.1.59",
3
+ "version": "0.1.62",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -6,6 +6,7 @@ export {
6
6
  applyPaidProjectDomain,
7
7
  authorizeApplicationDomainIdentityDns,
8
8
  authorizeWorkspaceMailDomainDns,
9
+ beginConnection,
9
10
  changeDatabaseCompute,
10
11
  changeManagedSource,
11
12
  changeProjectHandle,
@@ -48,7 +49,9 @@ export {
48
49
  detachProjectMailDomainBinding,
49
50
  diffManagedSource,
50
51
  disableManagedMailReceiving,
52
+ disconnectConnection,
51
53
  disconnectGithubOrganization,
54
+ discoverConnection,
52
55
  ensureProjectDevShareLink,
53
56
  getAccountProfile,
54
57
  getApplicationDomainIdentity,
@@ -56,6 +59,7 @@ export {
56
59
  getBillingCheckout,
57
60
  getBillingRecharge,
58
61
  getCloudflareDnsAuthorizationStatus,
62
+ getConnectionRequest,
59
63
  getCurrentIdentity,
60
64
  getDatabaseCompute,
61
65
  getDatabaseWebhookSubscription,
@@ -87,6 +91,7 @@ export {
87
91
  getProjectHandleAvailability,
88
92
  getProjectMailDomainBinding,
89
93
  getProjectPoweredByFlag,
94
+ getProjectPreview,
90
95
  getProjectSource,
91
96
  getProjectSourceAutoDeploy,
92
97
  getProjectStatus,
@@ -96,6 +101,8 @@ export {
96
101
  initializeManagedSource,
97
102
  linkProjectSource,
98
103
  listAuditEvents,
104
+ listConnectionProviders,
105
+ listConnections,
99
106
  listDeployments,
100
107
  listEnvironmentSecrets,
101
108
  listFunctionRuns,
@@ -113,6 +120,7 @@ export {
113
120
  listProjects,
114
121
  listUserApiKeys,
115
122
  listWorkspaceMailDomains,
123
+ openProjectPreview,
116
124
  type Options,
117
125
  planDeployment,
118
126
  planDeploymentPromotion,
@@ -148,12 +156,14 @@ export {
148
156
  rotateEnvironmentSecret,
149
157
  rotateManagedMailWebhookSecret,
150
158
  rotateProjectDevShareLink,
159
+ rotateProjectPreviewToken,
151
160
  runProjectDatabaseSchedule,
152
161
  setProjectCreditBudget,
153
162
  setProjectDatabaseSchedule,
154
163
  setProjectDevAccessMode,
155
164
  setProjectNotes,
156
165
  setProjectPoweredByFlag,
166
+ stopProjectPreview,
157
167
  streamDeploymentLogs,
158
168
  streamOperationEvents,
159
169
  submitContactRequest,
@@ -202,6 +212,11 @@ export type {
202
212
  AuthorizeWorkspaceMailDomainDnsErrors,
203
213
  AuthorizeWorkspaceMailDomainDnsResponse,
204
214
  AuthorizeWorkspaceMailDomainDnsResponses,
215
+ BeginConnectionData,
216
+ BeginConnectionError,
217
+ BeginConnectionErrors,
218
+ BeginConnectionResponse,
219
+ BeginConnectionResponses,
205
220
  BillingCheckout,
206
221
  BillingPortal,
207
222
  BillingRecharge,
@@ -267,6 +282,15 @@ export type {
267
282
  ConnectGithubOrganizationRequest,
268
283
  ConnectGithubOrganizationResponse,
269
284
  ConnectGithubOrganizationResponses,
285
+ ConnectionBegin,
286
+ ConnectionDisconnection,
287
+ ConnectionDiscovery,
288
+ ConnectionDiscoveryItem,
289
+ ConnectionGrant,
290
+ ConnectionGrantList,
291
+ ConnectionHandoff,
292
+ ConnectionProviders,
293
+ ConnectionRequestStatus,
270
294
  CostEstimate,
271
295
  CreateBillingCheckoutData,
272
296
  CreateBillingCheckoutError,
@@ -488,11 +512,21 @@ export type {
488
512
  DisableManagedMailReceivingErrors,
489
513
  DisableManagedMailReceivingResponse,
490
514
  DisableManagedMailReceivingResponses,
515
+ DisconnectConnectionData,
516
+ DisconnectConnectionError,
517
+ DisconnectConnectionErrors,
518
+ DisconnectConnectionResponse,
519
+ DisconnectConnectionResponses,
491
520
  DisconnectGithubOrganizationData,
492
521
  DisconnectGithubOrganizationError,
493
522
  DisconnectGithubOrganizationErrors,
494
523
  DisconnectGithubOrganizationResponse,
495
524
  DisconnectGithubOrganizationResponses,
525
+ DiscoverConnectionData,
526
+ DiscoverConnectionError,
527
+ DiscoverConnectionErrors,
528
+ DiscoverConnectionResponse,
529
+ DiscoverConnectionResponses,
496
530
  EnsureProjectDevShareLinkData,
497
531
  EnsureProjectDevShareLinkError,
498
532
  EnsureProjectDevShareLinkErrors,
@@ -541,6 +575,11 @@ export type {
541
575
  GetCloudflareDnsAuthorizationStatusErrors,
542
576
  GetCloudflareDnsAuthorizationStatusResponse,
543
577
  GetCloudflareDnsAuthorizationStatusResponses,
578
+ GetConnectionRequestData,
579
+ GetConnectionRequestError,
580
+ GetConnectionRequestErrors,
581
+ GetConnectionRequestResponse,
582
+ GetConnectionRequestResponses,
544
583
  GetCurrentIdentityData,
545
584
  GetCurrentIdentityError,
546
585
  GetCurrentIdentityErrors,
@@ -694,6 +733,11 @@ export type {
694
733
  GetProjectPoweredByFlagErrors,
695
734
  GetProjectPoweredByFlagResponse,
696
735
  GetProjectPoweredByFlagResponses,
736
+ GetProjectPreviewData,
737
+ GetProjectPreviewError,
738
+ GetProjectPreviewErrors,
739
+ GetProjectPreviewResponse,
740
+ GetProjectPreviewResponses,
697
741
  GetProjectResponse,
698
742
  GetProjectResponses,
699
743
  GetProjectSourceAutoDeployData,
@@ -754,6 +798,16 @@ export type {
754
798
  ListAuditEventsErrors,
755
799
  ListAuditEventsResponse,
756
800
  ListAuditEventsResponses,
801
+ ListConnectionProvidersData,
802
+ ListConnectionProvidersError,
803
+ ListConnectionProvidersErrors,
804
+ ListConnectionProvidersResponse,
805
+ ListConnectionProvidersResponses,
806
+ ListConnectionsData,
807
+ ListConnectionsError,
808
+ ListConnectionsErrors,
809
+ ListConnectionsResponse,
810
+ ListConnectionsResponses,
757
811
  ListDeploymentsData,
758
812
  ListDeploymentsError,
759
813
  ListDeploymentsErrors,
@@ -878,6 +932,11 @@ export type {
878
932
  NativeAuthUserCreate,
879
933
  NativeAuthUserPage,
880
934
  NullableCommitSha,
935
+ OpenProjectPreviewData,
936
+ OpenProjectPreviewError,
937
+ OpenProjectPreviewErrors,
938
+ OpenProjectPreviewResponse,
939
+ OpenProjectPreviewResponses,
881
940
  Operation,
882
941
  OperationDeploymentProgress,
883
942
  OperationEvent,
@@ -933,6 +992,8 @@ export type {
933
992
  PrepareManagedMailWebhookErrors,
934
993
  PrepareManagedMailWebhookResponse,
935
994
  PrepareManagedMailWebhookResponses,
995
+ Preview,
996
+ PreviewEnvironment,
936
997
  ProblemDetails,
937
998
  Project,
938
999
  ProjectContext,
@@ -1103,6 +1164,11 @@ export type {
1103
1164
  RotateProjectDevShareLinkErrors,
1104
1165
  RotateProjectDevShareLinkResponse,
1105
1166
  RotateProjectDevShareLinkResponses,
1167
+ RotateProjectPreviewTokenData,
1168
+ RotateProjectPreviewTokenError,
1169
+ RotateProjectPreviewTokenErrors,
1170
+ RotateProjectPreviewTokenResponse,
1171
+ RotateProjectPreviewTokenResponses,
1106
1172
  RunProjectDatabaseScheduleData,
1107
1173
  RunProjectDatabaseScheduleError,
1108
1174
  RunProjectDatabaseScheduleErrors,
@@ -1146,6 +1212,11 @@ export type {
1146
1212
  SourceManifest,
1147
1213
  SourceManifestFile,
1148
1214
  SourceMessage,
1215
+ StopProjectPreviewData,
1216
+ StopProjectPreviewError,
1217
+ StopProjectPreviewErrors,
1218
+ StopProjectPreviewResponse,
1219
+ StopProjectPreviewResponses,
1149
1220
  StreamDeploymentLogsData,
1150
1221
  StreamDeploymentLogsError,
1151
1222
  StreamDeploymentLogsErrors,
@@ -22,6 +22,8 @@ import type {
22
22
  AuthorizeApplicationDomainIdentityDnsResponses,
23
23
  AuthorizeWorkspaceMailDomainDnsErrors,
24
24
  AuthorizeWorkspaceMailDomainDnsResponses,
25
+ BeginConnectionErrors,
26
+ BeginConnectionResponses,
25
27
  ChangeDatabaseComputeErrors,
26
28
  ChangeDatabaseComputeResponses,
27
29
  ChangeManagedSourceErrors,
@@ -47,6 +49,7 @@ import type {
47
49
  ConnectGithubOrganizationErrors,
48
50
  ConnectGithubOrganizationRequest,
49
51
  ConnectGithubOrganizationResponses,
52
+ ConnectionBegin,
50
53
  CreateBillingCheckoutErrors,
51
54
  CreateBillingCheckoutResponses,
52
55
  CreateBillingPortalErrors,
@@ -118,8 +121,12 @@ import type {
118
121
  DiffManagedSourceResponses,
119
122
  DisableManagedMailReceivingErrors,
120
123
  DisableManagedMailReceivingResponses,
124
+ DisconnectConnectionErrors,
125
+ DisconnectConnectionResponses,
121
126
  DisconnectGithubOrganizationErrors,
122
127
  DisconnectGithubOrganizationResponses,
128
+ DiscoverConnectionErrors,
129
+ DiscoverConnectionResponses,
123
130
  EnsureProjectDevShareLinkErrors,
124
131
  EnsureProjectDevShareLinkResponses,
125
132
  FeedbackSubmission,
@@ -135,6 +142,8 @@ import type {
135
142
  GetBillingRechargeResponses,
136
143
  GetCloudflareDnsAuthorizationStatusErrors,
137
144
  GetCloudflareDnsAuthorizationStatusResponses,
145
+ GetConnectionRequestErrors,
146
+ GetConnectionRequestResponses,
138
147
  GetCurrentIdentityErrors,
139
148
  GetCurrentIdentityResponses,
140
149
  GetDatabaseComputeErrors,
@@ -196,6 +205,8 @@ import type {
196
205
  GetProjectMailDomainBindingResponses,
197
206
  GetProjectPoweredByFlagErrors,
198
207
  GetProjectPoweredByFlagResponses,
208
+ GetProjectPreviewErrors,
209
+ GetProjectPreviewResponses,
199
210
  GetProjectResponses,
200
211
  GetProjectSourceAutoDeployErrors,
201
212
  GetProjectSourceAutoDeployResponses,
@@ -216,6 +227,10 @@ import type {
216
227
  LinkProjectSourceResponses,
217
228
  ListAuditEventsErrors,
218
229
  ListAuditEventsResponses,
230
+ ListConnectionProvidersErrors,
231
+ ListConnectionProvidersResponses,
232
+ ListConnectionsErrors,
233
+ ListConnectionsResponses,
219
234
  ListDeploymentsErrors,
220
235
  ListDeploymentsResponses,
221
236
  ListEnvironmentSecretsErrors,
@@ -264,6 +279,8 @@ import type {
264
279
  NativeAuthConfigurationUpdate,
265
280
  NativeAuthProviderUpdateWritable,
266
281
  NativeAuthUserCreate,
282
+ OpenProjectPreviewErrors,
283
+ OpenProjectPreviewResponses,
267
284
  PaidDomainRequest,
268
285
  PlanDeploymentErrors,
269
286
  PlanDeploymentPromotionErrors,
@@ -340,6 +357,8 @@ import type {
340
357
  RotateManagedMailWebhookSecretResponses,
341
358
  RotateProjectDevShareLinkErrors,
342
359
  RotateProjectDevShareLinkResponses,
360
+ RotateProjectPreviewTokenErrors,
361
+ RotateProjectPreviewTokenResponses,
343
362
  RunProjectDatabaseScheduleErrors,
344
363
  RunProjectDatabaseScheduleResponses,
345
364
  SetDevAccessModeRequest,
@@ -356,6 +375,8 @@ import type {
356
375
  SetProjectPoweredByFlagErrors,
357
376
  SetProjectPoweredByFlagResponses,
358
377
  SharedMailDnsAuthorizationRequest,
378
+ StopProjectPreviewErrors,
379
+ StopProjectPreviewResponses,
359
380
  StreamDeploymentLogsErrors,
360
381
  StreamDeploymentLogsResponse,
361
382
  StreamDeploymentLogsResponses,
@@ -404,6 +425,421 @@ export type Options<
404
425
  meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
405
426
  };
406
427
 
428
+ /**
429
+ * Stop a project environment preview
430
+ *
431
+ * Stops the runtime and removes its backups while preserving the stable URL. Repeat uncertain calls with the same idempotency key.
432
+ */
433
+ export const stopProjectPreview = <ThrowOnError extends boolean = true>(
434
+ parameters: {
435
+ "X-Request-Id"?: string;
436
+ "Idempotency-Key": string;
437
+ project_id: Ulid;
438
+ environment: "dev" | "prod";
439
+ },
440
+ options?: Options<never, ThrowOnError>,
441
+ ): RequestResult<StopProjectPreviewResponses, StopProjectPreviewErrors, ThrowOnError, "data"> => {
442
+ const params = buildClientParams(
443
+ [parameters],
444
+ [
445
+ {
446
+ args: [
447
+ { in: "headers", key: "X-Request-Id" },
448
+ { in: "headers", key: "Idempotency-Key" },
449
+ { in: "path", key: "project_id" },
450
+ { in: "query", key: "environment" },
451
+ ],
452
+ },
453
+ ],
454
+ );
455
+ return (options?.client ?? client).delete<
456
+ StopProjectPreviewResponses,
457
+ StopProjectPreviewErrors,
458
+ ThrowOnError,
459
+ "data"
460
+ >({
461
+ responseStyle: "data",
462
+ security: [{ scheme: "bearer", type: "http" }],
463
+ url: "/v1/projects/{project_id}/preview",
464
+ ...options,
465
+ ...params,
466
+ });
467
+ };
468
+
469
+ /**
470
+ * Read the preview for a project environment
471
+ *
472
+ * Requires project write permission to retrieve the private capability URL. Free projects have Prod; Paid projects can also have Dev.
473
+ */
474
+ export const getProjectPreview = <ThrowOnError extends boolean = true>(
475
+ parameters: {
476
+ "X-Request-Id"?: string;
477
+ project_id: Ulid;
478
+ environment: "dev" | "prod";
479
+ },
480
+ options?: Options<never, ThrowOnError>,
481
+ ): RequestResult<GetProjectPreviewResponses, GetProjectPreviewErrors, ThrowOnError, "data"> => {
482
+ const params = buildClientParams(
483
+ [parameters],
484
+ [
485
+ {
486
+ args: [
487
+ { in: "headers", key: "X-Request-Id" },
488
+ { in: "path", key: "project_id" },
489
+ { in: "query", key: "environment" },
490
+ ],
491
+ },
492
+ ],
493
+ );
494
+ return (options?.client ?? client).get<
495
+ GetProjectPreviewResponses,
496
+ GetProjectPreviewErrors,
497
+ ThrowOnError,
498
+ "data"
499
+ >({
500
+ responseStyle: "data",
501
+ security: [{ scheme: "bearer", type: "http" }],
502
+ url: "/v1/projects/{project_id}/preview",
503
+ ...options,
504
+ ...params,
505
+ });
506
+ };
507
+
508
+ /**
509
+ * Open or create a project environment preview
510
+ *
511
+ * Requires project write permission. Returns the existing stable URL or creates one. Opening its URL starts a sleeping preview; source saves update it independently of deployments.
512
+ */
513
+ export const openProjectPreview = <ThrowOnError extends boolean = true>(
514
+ parameters: {
515
+ "X-Request-Id"?: string;
516
+ project_id: Ulid;
517
+ environment: "dev" | "prod";
518
+ },
519
+ options?: Options<never, ThrowOnError>,
520
+ ): RequestResult<OpenProjectPreviewResponses, OpenProjectPreviewErrors, ThrowOnError, "data"> => {
521
+ const params = buildClientParams(
522
+ [parameters],
523
+ [
524
+ {
525
+ args: [
526
+ { in: "headers", key: "X-Request-Id" },
527
+ { in: "path", key: "project_id" },
528
+ { in: "query", key: "environment" },
529
+ ],
530
+ },
531
+ ],
532
+ );
533
+ return (options?.client ?? client).post<
534
+ OpenProjectPreviewResponses,
535
+ OpenProjectPreviewErrors,
536
+ ThrowOnError,
537
+ "data"
538
+ >({
539
+ responseStyle: "data",
540
+ security: [{ scheme: "bearer", type: "http" }],
541
+ url: "/v1/projects/{project_id}/preview",
542
+ ...options,
543
+ ...params,
544
+ });
545
+ };
546
+
547
+ /**
548
+ * Rotate a preview capability URL
549
+ *
550
+ * Invalidates the previous URL and closes its existing connections before returning the new URL. Repeat uncertain calls with the same idempotency key.
551
+ */
552
+ export const rotateProjectPreviewToken = <ThrowOnError extends boolean = true>(
553
+ parameters: {
554
+ "X-Request-Id"?: string;
555
+ "Idempotency-Key": string;
556
+ project_id: Ulid;
557
+ environment: "dev" | "prod";
558
+ },
559
+ options?: Options<never, ThrowOnError>,
560
+ ): RequestResult<
561
+ RotateProjectPreviewTokenResponses,
562
+ RotateProjectPreviewTokenErrors,
563
+ ThrowOnError,
564
+ "data"
565
+ > => {
566
+ const params = buildClientParams(
567
+ [parameters],
568
+ [
569
+ {
570
+ args: [
571
+ { in: "headers", key: "X-Request-Id" },
572
+ { in: "headers", key: "Idempotency-Key" },
573
+ { in: "path", key: "project_id" },
574
+ { in: "query", key: "environment" },
575
+ ],
576
+ },
577
+ ],
578
+ );
579
+ return (options?.client ?? client).post<
580
+ RotateProjectPreviewTokenResponses,
581
+ RotateProjectPreviewTokenErrors,
582
+ ThrowOnError,
583
+ "data"
584
+ >({
585
+ responseStyle: "data",
586
+ security: [{ scheme: "bearer", type: "http" }],
587
+ url: "/v1/projects/{project_id}/preview/token",
588
+ ...options,
589
+ ...params,
590
+ });
591
+ };
592
+
593
+ /**
594
+ * List connection grants
595
+ */
596
+ export const listConnections = <ThrowOnError extends boolean = true>(
597
+ parameters: {
598
+ "X-Request-Id"?: string;
599
+ organization_id: Ulid;
600
+ },
601
+ options?: Options<never, ThrowOnError>,
602
+ ): RequestResult<ListConnectionsResponses, ListConnectionsErrors, ThrowOnError, "data"> => {
603
+ const params = buildClientParams(
604
+ [parameters],
605
+ [
606
+ {
607
+ args: [
608
+ { in: "headers", key: "X-Request-Id" },
609
+ { in: "path", key: "organization_id" },
610
+ ],
611
+ },
612
+ ],
613
+ );
614
+ return (options?.client ?? client).get<
615
+ ListConnectionsResponses,
616
+ ListConnectionsErrors,
617
+ ThrowOnError,
618
+ "data"
619
+ >({
620
+ responseStyle: "data",
621
+ security: [{ scheme: "bearer", type: "http" }],
622
+ url: "/v1/organizations/{organization_id}/connections",
623
+ ...options,
624
+ ...params,
625
+ });
626
+ };
627
+
628
+ /**
629
+ * List available connection providers
630
+ */
631
+ export const listConnectionProviders = <ThrowOnError extends boolean = true>(
632
+ parameters: {
633
+ "X-Request-Id"?: string;
634
+ organization_id: Ulid;
635
+ },
636
+ options?: Options<never, ThrowOnError>,
637
+ ): RequestResult<
638
+ ListConnectionProvidersResponses,
639
+ ListConnectionProvidersErrors,
640
+ ThrowOnError,
641
+ "data"
642
+ > => {
643
+ const params = buildClientParams(
644
+ [parameters],
645
+ [
646
+ {
647
+ args: [
648
+ { in: "headers", key: "X-Request-Id" },
649
+ { in: "path", key: "organization_id" },
650
+ ],
651
+ },
652
+ ],
653
+ );
654
+ return (options?.client ?? client).get<
655
+ ListConnectionProvidersResponses,
656
+ ListConnectionProvidersErrors,
657
+ ThrowOnError,
658
+ "data"
659
+ >({
660
+ responseStyle: "data",
661
+ security: [{ scheme: "bearer", type: "http" }],
662
+ url: "/v1/organizations/{organization_id}/connections/providers",
663
+ ...options,
664
+ ...params,
665
+ });
666
+ };
667
+
668
+ /**
669
+ * Start an owner consent handoff
670
+ */
671
+ export const beginConnection = <ThrowOnError extends boolean = true>(
672
+ parameters: {
673
+ "X-Request-Id"?: string;
674
+ "Idempotency-Key": string;
675
+ organization_id: Ulid;
676
+ connectionBegin: ConnectionBegin;
677
+ },
678
+ options?: Options<never, ThrowOnError>,
679
+ ): RequestResult<BeginConnectionResponses, BeginConnectionErrors, ThrowOnError, "data"> => {
680
+ const params = buildClientParams(
681
+ [parameters],
682
+ [
683
+ {
684
+ args: [
685
+ { in: "headers", key: "X-Request-Id" },
686
+ { in: "headers", key: "Idempotency-Key" },
687
+ { in: "path", key: "organization_id" },
688
+ { key: "connectionBegin", map: "body" },
689
+ ],
690
+ },
691
+ ],
692
+ );
693
+ return (options?.client ?? client).post<
694
+ BeginConnectionResponses,
695
+ BeginConnectionErrors,
696
+ ThrowOnError,
697
+ "data"
698
+ >({
699
+ responseStyle: "data",
700
+ security: [{ scheme: "bearer", type: "http" }],
701
+ url: "/v1/organizations/{organization_id}/connections/begin",
702
+ ...options,
703
+ ...params,
704
+ headers: {
705
+ "Content-Type": "application/json",
706
+ ...options?.headers,
707
+ ...params.headers,
708
+ },
709
+ });
710
+ };
711
+
712
+ /**
713
+ * Read a consent handoff status
714
+ */
715
+ export const getConnectionRequest = <ThrowOnError extends boolean = true>(
716
+ parameters: {
717
+ "X-Request-Id"?: string;
718
+ organization_id: Ulid;
719
+ request_id: string;
720
+ },
721
+ options?: Options<never, ThrowOnError>,
722
+ ): RequestResult<
723
+ GetConnectionRequestResponses,
724
+ GetConnectionRequestErrors,
725
+ ThrowOnError,
726
+ "data"
727
+ > => {
728
+ const params = buildClientParams(
729
+ [parameters],
730
+ [
731
+ {
732
+ args: [
733
+ { in: "headers", key: "X-Request-Id" },
734
+ { in: "path", key: "organization_id" },
735
+ { in: "path", key: "request_id" },
736
+ ],
737
+ },
738
+ ],
739
+ );
740
+ return (options?.client ?? client).get<
741
+ GetConnectionRequestResponses,
742
+ GetConnectionRequestErrors,
743
+ ThrowOnError,
744
+ "data"
745
+ >({
746
+ responseStyle: "data",
747
+ security: [{ scheme: "bearer", type: "http" }],
748
+ url: "/v1/organizations/{organization_id}/connections/requests/{request_id}",
749
+ ...options,
750
+ ...params,
751
+ });
752
+ };
753
+
754
+ /**
755
+ * Discover organizations, teams and connections
756
+ */
757
+ export const discoverConnection = <ThrowOnError extends boolean = true>(
758
+ parameters: {
759
+ "X-Request-Id"?: string;
760
+ organization_id: Ulid;
761
+ grant_id: string;
762
+ project_id: Ulid;
763
+ environment_id: Ulid;
764
+ provider_organization_id?: number;
765
+ team_id?: number;
766
+ },
767
+ options?: Options<never, ThrowOnError>,
768
+ ): RequestResult<DiscoverConnectionResponses, DiscoverConnectionErrors, ThrowOnError, "data"> => {
769
+ const params = buildClientParams(
770
+ [parameters],
771
+ [
772
+ {
773
+ args: [
774
+ { in: "headers", key: "X-Request-Id" },
775
+ { in: "path", key: "organization_id" },
776
+ { in: "path", key: "grant_id" },
777
+ { in: "query", key: "project_id" },
778
+ { in: "query", key: "environment_id" },
779
+ { in: "query", key: "provider_organization_id" },
780
+ { in: "query", key: "team_id" },
781
+ ],
782
+ },
783
+ ],
784
+ );
785
+ return (options?.client ?? client).get<
786
+ DiscoverConnectionResponses,
787
+ DiscoverConnectionErrors,
788
+ ThrowOnError,
789
+ "data"
790
+ >({
791
+ responseStyle: "data",
792
+ security: [{ scheme: "bearer", type: "http" }],
793
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}/catalog",
794
+ ...options,
795
+ ...params,
796
+ });
797
+ };
798
+
799
+ /**
800
+ * Disconnect a connection grant
801
+ */
802
+ export const disconnectConnection = <ThrowOnError extends boolean = true>(
803
+ parameters: {
804
+ "X-Request-Id"?: string;
805
+ "Idempotency-Key": string;
806
+ organization_id: Ulid;
807
+ grant_id: string;
808
+ },
809
+ options?: Options<never, ThrowOnError>,
810
+ ): RequestResult<
811
+ DisconnectConnectionResponses,
812
+ DisconnectConnectionErrors,
813
+ ThrowOnError,
814
+ "data"
815
+ > => {
816
+ const params = buildClientParams(
817
+ [parameters],
818
+ [
819
+ {
820
+ args: [
821
+ { in: "headers", key: "X-Request-Id" },
822
+ { in: "headers", key: "Idempotency-Key" },
823
+ { in: "path", key: "organization_id" },
824
+ { in: "path", key: "grant_id" },
825
+ ],
826
+ },
827
+ ],
828
+ );
829
+ return (options?.client ?? client).delete<
830
+ DisconnectConnectionResponses,
831
+ DisconnectConnectionErrors,
832
+ ThrowOnError,
833
+ "data"
834
+ >({
835
+ responseStyle: "data",
836
+ security: [{ scheme: "bearer", type: "http" }],
837
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}",
838
+ ...options,
839
+ ...params,
840
+ });
841
+ };
842
+
407
843
  /**
408
844
  * Read Native Auth configuration
409
845
  *