@amerged/ohmyhost-sdk 0.1.60 → 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.60",
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.60",
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,
@@ -97,6 +101,8 @@ export {
97
101
  initializeManagedSource,
98
102
  linkProjectSource,
99
103
  listAuditEvents,
104
+ listConnectionProviders,
105
+ listConnections,
100
106
  listDeployments,
101
107
  listEnvironmentSecrets,
102
108
  listFunctionRuns,
@@ -206,6 +212,11 @@ export type {
206
212
  AuthorizeWorkspaceMailDomainDnsErrors,
207
213
  AuthorizeWorkspaceMailDomainDnsResponse,
208
214
  AuthorizeWorkspaceMailDomainDnsResponses,
215
+ BeginConnectionData,
216
+ BeginConnectionError,
217
+ BeginConnectionErrors,
218
+ BeginConnectionResponse,
219
+ BeginConnectionResponses,
209
220
  BillingCheckout,
210
221
  BillingPortal,
211
222
  BillingRecharge,
@@ -271,6 +282,15 @@ export type {
271
282
  ConnectGithubOrganizationRequest,
272
283
  ConnectGithubOrganizationResponse,
273
284
  ConnectGithubOrganizationResponses,
285
+ ConnectionBegin,
286
+ ConnectionDisconnection,
287
+ ConnectionDiscovery,
288
+ ConnectionDiscoveryItem,
289
+ ConnectionGrant,
290
+ ConnectionGrantList,
291
+ ConnectionHandoff,
292
+ ConnectionProviders,
293
+ ConnectionRequestStatus,
274
294
  CostEstimate,
275
295
  CreateBillingCheckoutData,
276
296
  CreateBillingCheckoutError,
@@ -492,11 +512,21 @@ export type {
492
512
  DisableManagedMailReceivingErrors,
493
513
  DisableManagedMailReceivingResponse,
494
514
  DisableManagedMailReceivingResponses,
515
+ DisconnectConnectionData,
516
+ DisconnectConnectionError,
517
+ DisconnectConnectionErrors,
518
+ DisconnectConnectionResponse,
519
+ DisconnectConnectionResponses,
495
520
  DisconnectGithubOrganizationData,
496
521
  DisconnectGithubOrganizationError,
497
522
  DisconnectGithubOrganizationErrors,
498
523
  DisconnectGithubOrganizationResponse,
499
524
  DisconnectGithubOrganizationResponses,
525
+ DiscoverConnectionData,
526
+ DiscoverConnectionError,
527
+ DiscoverConnectionErrors,
528
+ DiscoverConnectionResponse,
529
+ DiscoverConnectionResponses,
500
530
  EnsureProjectDevShareLinkData,
501
531
  EnsureProjectDevShareLinkError,
502
532
  EnsureProjectDevShareLinkErrors,
@@ -545,6 +575,11 @@ export type {
545
575
  GetCloudflareDnsAuthorizationStatusErrors,
546
576
  GetCloudflareDnsAuthorizationStatusResponse,
547
577
  GetCloudflareDnsAuthorizationStatusResponses,
578
+ GetConnectionRequestData,
579
+ GetConnectionRequestError,
580
+ GetConnectionRequestErrors,
581
+ GetConnectionRequestResponse,
582
+ GetConnectionRequestResponses,
548
583
  GetCurrentIdentityData,
549
584
  GetCurrentIdentityError,
550
585
  GetCurrentIdentityErrors,
@@ -763,6 +798,16 @@ export type {
763
798
  ListAuditEventsErrors,
764
799
  ListAuditEventsResponse,
765
800
  ListAuditEventsResponses,
801
+ ListConnectionProvidersData,
802
+ ListConnectionProvidersError,
803
+ ListConnectionProvidersErrors,
804
+ ListConnectionProvidersResponse,
805
+ ListConnectionProvidersResponses,
806
+ ListConnectionsData,
807
+ ListConnectionsError,
808
+ ListConnectionsErrors,
809
+ ListConnectionsResponse,
810
+ ListConnectionsResponses,
766
811
  ListDeploymentsData,
767
812
  ListDeploymentsError,
768
813
  ListDeploymentsErrors,
@@ -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,
@@ -218,6 +227,10 @@ import type {
218
227
  LinkProjectSourceResponses,
219
228
  ListAuditEventsErrors,
220
229
  ListAuditEventsResponses,
230
+ ListConnectionProvidersErrors,
231
+ ListConnectionProvidersResponses,
232
+ ListConnectionsErrors,
233
+ ListConnectionsResponses,
221
234
  ListDeploymentsErrors,
222
235
  ListDeploymentsResponses,
223
236
  ListEnvironmentSecretsErrors,
@@ -577,6 +590,256 @@ export const rotateProjectPreviewToken = <ThrowOnError extends boolean = true>(
577
590
  });
578
591
  };
579
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
+
580
843
  /**
581
844
  * Read Native Auth configuration
582
845
  *