@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.
@@ -4,6 +4,72 @@ export type ClientOptions = {
4
4
  baseUrl: "https://app.ohmyho.st" | "https://dev.app.ohmyho.st" | (string & {});
5
5
  };
6
6
 
7
+ export type Preview = {
8
+ id: Ulid;
9
+ project_id: Ulid;
10
+ environment: "dev" | "prod";
11
+ status: "cold" | "starting" | "ready" | "sleeping";
12
+ /**
13
+ * Stable private capability URL without an expiration time.
14
+ */
15
+ url: string;
16
+ source: null | {
17
+ sequence: number;
18
+ commit_sha: string;
19
+ };
20
+ };
21
+
22
+ export type ConnectionBegin = {
23
+ provider: "make";
24
+ project_id: Ulid;
25
+ environment_id: Ulid;
26
+ };
27
+
28
+ export type ConnectionHandoff = {
29
+ request_id: string;
30
+ url: string;
31
+ expires_at: string;
32
+ };
33
+
34
+ export type ConnectionRequestStatus = {
35
+ state: "pending" | "consumed" | "expired";
36
+ expires_at: string;
37
+ };
38
+
39
+ export type ConnectionDisconnection = {
40
+ state: "disconnected" | "revocation_pending";
41
+ };
42
+
43
+ export type ConnectionGrant = {
44
+ id: Ulid;
45
+ provider: "make";
46
+ state: "active" | "refreshing" | "reconnect_required" | "disconnecting" | "disconnected";
47
+ created_at: string;
48
+ };
49
+
50
+ export type ConnectionGrantList = {
51
+ connections: Array<ConnectionGrant>;
52
+ };
53
+
54
+ export type ConnectionProviders = {
55
+ providers: Array<{
56
+ provider: "make";
57
+ status: "available" | "unavailable";
58
+ }>;
59
+ catalog_available: boolean;
60
+ };
61
+
62
+ export type ConnectionDiscoveryItem = {
63
+ id: number;
64
+ name: string;
65
+ };
66
+
67
+ export type ConnectionDiscovery = {
68
+ organizations: Array<ConnectionDiscoveryItem>;
69
+ teams: Array<ConnectionDiscoveryItem>;
70
+ connections: Array<ConnectionDiscoveryItem>;
71
+ };
72
+
7
73
  export type NativeAuthConfiguration = {
8
74
  /**
9
75
  * Persistent Owner setting; source deployment cannot clear a pause.
@@ -2294,6 +2360,11 @@ export type DeploymentPlanWritable = {
2294
2360
  expires_at: string;
2295
2361
  };
2296
2362
 
2363
+ /**
2364
+ * The concrete project environment to preview.
2365
+ */
2366
+ export type PreviewEnvironment = "dev" | "prod";
2367
+
2297
2368
  /**
2298
2369
  * Opaque continuation cursor returned by the preceding page.
2299
2370
  */
@@ -2444,6 +2515,580 @@ export type ProjectFilter = Ulid;
2444
2515
  */
2445
2516
  export type OperationFilter = Ulid;
2446
2517
 
2518
+ export type StopProjectPreviewData = {
2519
+ body?: never;
2520
+ headers: {
2521
+ /**
2522
+ * Optional caller-provided correlation identifier.
2523
+ */
2524
+ "X-Request-Id"?: string;
2525
+ /**
2526
+ * Identifies one mutation and its canonical request payload.
2527
+ */
2528
+ "Idempotency-Key": string;
2529
+ };
2530
+ path: {
2531
+ /**
2532
+ * Project identifier.
2533
+ */
2534
+ project_id: Ulid;
2535
+ };
2536
+ query: {
2537
+ /**
2538
+ * The concrete project environment to preview.
2539
+ */
2540
+ environment: "dev" | "prod";
2541
+ };
2542
+ url: "/v1/projects/{project_id}/preview";
2543
+ };
2544
+
2545
+ export type StopProjectPreviewErrors = {
2546
+ /**
2547
+ * The request failed.
2548
+ */
2549
+ 400: ProblemDetails;
2550
+ /**
2551
+ * The request failed.
2552
+ */
2553
+ 401: ProblemDetails;
2554
+ /**
2555
+ * The resource does not exist or is not visible to the authenticated principal.
2556
+ */
2557
+ 404: ProblemDetails;
2558
+ /**
2559
+ * The request failed.
2560
+ */
2561
+ 409: ProblemDetails;
2562
+ /**
2563
+ * The request failed.
2564
+ */
2565
+ 429: ProblemDetails;
2566
+ /**
2567
+ * The request failed.
2568
+ */
2569
+ 503: ProblemDetails;
2570
+ };
2571
+
2572
+ export type StopProjectPreviewError = StopProjectPreviewErrors[keyof StopProjectPreviewErrors];
2573
+
2574
+ export type StopProjectPreviewResponses = {
2575
+ /**
2576
+ * The authorized preview and its private capability URL. Do not cache or publish the URL.
2577
+ */
2578
+ 200: Preview;
2579
+ };
2580
+
2581
+ export type StopProjectPreviewResponse =
2582
+ StopProjectPreviewResponses[keyof StopProjectPreviewResponses];
2583
+
2584
+ export type GetProjectPreviewData = {
2585
+ body?: never;
2586
+ headers?: {
2587
+ /**
2588
+ * Optional caller-provided correlation identifier.
2589
+ */
2590
+ "X-Request-Id"?: string;
2591
+ };
2592
+ path: {
2593
+ /**
2594
+ * Project identifier.
2595
+ */
2596
+ project_id: Ulid;
2597
+ };
2598
+ query: {
2599
+ /**
2600
+ * The concrete project environment to preview.
2601
+ */
2602
+ environment: "dev" | "prod";
2603
+ };
2604
+ url: "/v1/projects/{project_id}/preview";
2605
+ };
2606
+
2607
+ export type GetProjectPreviewErrors = {
2608
+ /**
2609
+ * The request failed.
2610
+ */
2611
+ 400: ProblemDetails;
2612
+ /**
2613
+ * The request failed.
2614
+ */
2615
+ 401: ProblemDetails;
2616
+ /**
2617
+ * The resource does not exist or is not visible to the authenticated principal.
2618
+ */
2619
+ 404: ProblemDetails;
2620
+ /**
2621
+ * The request failed.
2622
+ */
2623
+ 429: ProblemDetails;
2624
+ /**
2625
+ * The request failed.
2626
+ */
2627
+ 503: ProblemDetails;
2628
+ };
2629
+
2630
+ export type GetProjectPreviewError = GetProjectPreviewErrors[keyof GetProjectPreviewErrors];
2631
+
2632
+ export type GetProjectPreviewResponses = {
2633
+ /**
2634
+ * The authorized preview and its private capability URL. Do not cache or publish the URL.
2635
+ */
2636
+ 200: Preview;
2637
+ };
2638
+
2639
+ export type GetProjectPreviewResponse =
2640
+ GetProjectPreviewResponses[keyof GetProjectPreviewResponses];
2641
+
2642
+ export type OpenProjectPreviewData = {
2643
+ body?: never;
2644
+ headers?: {
2645
+ /**
2646
+ * Optional caller-provided correlation identifier.
2647
+ */
2648
+ "X-Request-Id"?: string;
2649
+ };
2650
+ path: {
2651
+ /**
2652
+ * Project identifier.
2653
+ */
2654
+ project_id: Ulid;
2655
+ };
2656
+ query: {
2657
+ /**
2658
+ * The concrete project environment to preview.
2659
+ */
2660
+ environment: "dev" | "prod";
2661
+ };
2662
+ url: "/v1/projects/{project_id}/preview";
2663
+ };
2664
+
2665
+ export type OpenProjectPreviewErrors = {
2666
+ /**
2667
+ * The request failed.
2668
+ */
2669
+ 400: ProblemDetails;
2670
+ /**
2671
+ * The request failed.
2672
+ */
2673
+ 401: ProblemDetails;
2674
+ /**
2675
+ * The resource does not exist or is not visible to the authenticated principal.
2676
+ */
2677
+ 404: ProblemDetails;
2678
+ /**
2679
+ * The request failed.
2680
+ */
2681
+ 429: ProblemDetails;
2682
+ /**
2683
+ * The request failed.
2684
+ */
2685
+ 503: ProblemDetails;
2686
+ };
2687
+
2688
+ export type OpenProjectPreviewError = OpenProjectPreviewErrors[keyof OpenProjectPreviewErrors];
2689
+
2690
+ export type OpenProjectPreviewResponses = {
2691
+ /**
2692
+ * The authorized preview and its private capability URL. Do not cache or publish the URL.
2693
+ */
2694
+ 200: Preview;
2695
+ };
2696
+
2697
+ export type OpenProjectPreviewResponse =
2698
+ OpenProjectPreviewResponses[keyof OpenProjectPreviewResponses];
2699
+
2700
+ export type RotateProjectPreviewTokenData = {
2701
+ body?: never;
2702
+ headers: {
2703
+ /**
2704
+ * Optional caller-provided correlation identifier.
2705
+ */
2706
+ "X-Request-Id"?: string;
2707
+ /**
2708
+ * Identifies one mutation and its canonical request payload.
2709
+ */
2710
+ "Idempotency-Key": string;
2711
+ };
2712
+ path: {
2713
+ /**
2714
+ * Project identifier.
2715
+ */
2716
+ project_id: Ulid;
2717
+ };
2718
+ query: {
2719
+ /**
2720
+ * The concrete project environment to preview.
2721
+ */
2722
+ environment: "dev" | "prod";
2723
+ };
2724
+ url: "/v1/projects/{project_id}/preview/token";
2725
+ };
2726
+
2727
+ export type RotateProjectPreviewTokenErrors = {
2728
+ /**
2729
+ * The request failed.
2730
+ */
2731
+ 400: ProblemDetails;
2732
+ /**
2733
+ * The request failed.
2734
+ */
2735
+ 401: ProblemDetails;
2736
+ /**
2737
+ * The resource does not exist or is not visible to the authenticated principal.
2738
+ */
2739
+ 404: ProblemDetails;
2740
+ /**
2741
+ * The request failed.
2742
+ */
2743
+ 409: ProblemDetails;
2744
+ /**
2745
+ * The request failed.
2746
+ */
2747
+ 429: ProblemDetails;
2748
+ /**
2749
+ * The request failed.
2750
+ */
2751
+ 503: ProblemDetails;
2752
+ };
2753
+
2754
+ export type RotateProjectPreviewTokenError =
2755
+ RotateProjectPreviewTokenErrors[keyof RotateProjectPreviewTokenErrors];
2756
+
2757
+ export type RotateProjectPreviewTokenResponses = {
2758
+ /**
2759
+ * The authorized preview and its private capability URL. Do not cache or publish the URL.
2760
+ */
2761
+ 200: Preview;
2762
+ };
2763
+
2764
+ export type RotateProjectPreviewTokenResponse =
2765
+ RotateProjectPreviewTokenResponses[keyof RotateProjectPreviewTokenResponses];
2766
+
2767
+ export type ListConnectionsData = {
2768
+ body?: never;
2769
+ headers?: {
2770
+ /**
2771
+ * Optional caller-provided correlation identifier.
2772
+ */
2773
+ "X-Request-Id"?: string;
2774
+ };
2775
+ path: {
2776
+ organization_id: Ulid;
2777
+ };
2778
+ query?: never;
2779
+ url: "/v1/organizations/{organization_id}/connections";
2780
+ };
2781
+
2782
+ export type ListConnectionsErrors = {
2783
+ /**
2784
+ * The request failed.
2785
+ */
2786
+ 400: ProblemDetails;
2787
+ /**
2788
+ * The request failed.
2789
+ */
2790
+ 401: ProblemDetails;
2791
+ /**
2792
+ * The resource does not exist or is not visible to the authenticated principal.
2793
+ */
2794
+ 404: ProblemDetails;
2795
+ /**
2796
+ * The request failed.
2797
+ */
2798
+ 429: ProblemDetails;
2799
+ /**
2800
+ * The request failed.
2801
+ */
2802
+ 503: ProblemDetails;
2803
+ };
2804
+
2805
+ export type ListConnectionsError = ListConnectionsErrors[keyof ListConnectionsErrors];
2806
+
2807
+ export type ListConnectionsResponses = {
2808
+ /**
2809
+ * Connection result.
2810
+ */
2811
+ 200: ConnectionGrantList;
2812
+ };
2813
+
2814
+ export type ListConnectionsResponse = ListConnectionsResponses[keyof ListConnectionsResponses];
2815
+
2816
+ export type ListConnectionProvidersData = {
2817
+ body?: never;
2818
+ headers?: {
2819
+ /**
2820
+ * Optional caller-provided correlation identifier.
2821
+ */
2822
+ "X-Request-Id"?: string;
2823
+ };
2824
+ path: {
2825
+ organization_id: Ulid;
2826
+ };
2827
+ query?: never;
2828
+ url: "/v1/organizations/{organization_id}/connections/providers";
2829
+ };
2830
+
2831
+ export type ListConnectionProvidersErrors = {
2832
+ /**
2833
+ * The request failed.
2834
+ */
2835
+ 400: ProblemDetails;
2836
+ /**
2837
+ * The request failed.
2838
+ */
2839
+ 401: ProblemDetails;
2840
+ /**
2841
+ * The resource does not exist or is not visible to the authenticated principal.
2842
+ */
2843
+ 404: ProblemDetails;
2844
+ /**
2845
+ * The request failed.
2846
+ */
2847
+ 429: ProblemDetails;
2848
+ /**
2849
+ * The request failed.
2850
+ */
2851
+ 503: ProblemDetails;
2852
+ };
2853
+
2854
+ export type ListConnectionProvidersError =
2855
+ ListConnectionProvidersErrors[keyof ListConnectionProvidersErrors];
2856
+
2857
+ export type ListConnectionProvidersResponses = {
2858
+ /**
2859
+ * Connection result.
2860
+ */
2861
+ 200: ConnectionProviders;
2862
+ };
2863
+
2864
+ export type ListConnectionProvidersResponse =
2865
+ ListConnectionProvidersResponses[keyof ListConnectionProvidersResponses];
2866
+
2867
+ export type BeginConnectionData = {
2868
+ body: ConnectionBegin;
2869
+ headers: {
2870
+ /**
2871
+ * Optional caller-provided correlation identifier.
2872
+ */
2873
+ "X-Request-Id"?: string;
2874
+ /**
2875
+ * Identifies one mutation and its canonical request payload.
2876
+ */
2877
+ "Idempotency-Key": string;
2878
+ };
2879
+ path: {
2880
+ organization_id: Ulid;
2881
+ };
2882
+ query?: never;
2883
+ url: "/v1/organizations/{organization_id}/connections/begin";
2884
+ };
2885
+
2886
+ export type BeginConnectionErrors = {
2887
+ /**
2888
+ * The request failed.
2889
+ */
2890
+ 400: ProblemDetails;
2891
+ /**
2892
+ * The request failed.
2893
+ */
2894
+ 401: ProblemDetails;
2895
+ /**
2896
+ * The resource does not exist or is not visible to the authenticated principal.
2897
+ */
2898
+ 404: ProblemDetails;
2899
+ /**
2900
+ * The request failed.
2901
+ */
2902
+ 409: ProblemDetails;
2903
+ /**
2904
+ * The request failed.
2905
+ */
2906
+ 429: ProblemDetails;
2907
+ /**
2908
+ * The request failed.
2909
+ */
2910
+ 503: ProblemDetails;
2911
+ };
2912
+
2913
+ export type BeginConnectionError = BeginConnectionErrors[keyof BeginConnectionErrors];
2914
+
2915
+ export type BeginConnectionResponses = {
2916
+ /**
2917
+ * Connection result.
2918
+ */
2919
+ 201: ConnectionHandoff;
2920
+ };
2921
+
2922
+ export type BeginConnectionResponse = BeginConnectionResponses[keyof BeginConnectionResponses];
2923
+
2924
+ export type GetConnectionRequestData = {
2925
+ body?: never;
2926
+ headers?: {
2927
+ /**
2928
+ * Optional caller-provided correlation identifier.
2929
+ */
2930
+ "X-Request-Id"?: string;
2931
+ };
2932
+ path: {
2933
+ organization_id: Ulid;
2934
+ request_id: string;
2935
+ };
2936
+ query?: never;
2937
+ url: "/v1/organizations/{organization_id}/connections/requests/{request_id}";
2938
+ };
2939
+
2940
+ export type GetConnectionRequestErrors = {
2941
+ /**
2942
+ * The request failed.
2943
+ */
2944
+ 400: ProblemDetails;
2945
+ /**
2946
+ * The request failed.
2947
+ */
2948
+ 401: ProblemDetails;
2949
+ /**
2950
+ * The resource does not exist or is not visible to the authenticated principal.
2951
+ */
2952
+ 404: ProblemDetails;
2953
+ /**
2954
+ * The request failed.
2955
+ */
2956
+ 429: ProblemDetails;
2957
+ /**
2958
+ * The request failed.
2959
+ */
2960
+ 503: ProblemDetails;
2961
+ };
2962
+
2963
+ export type GetConnectionRequestError =
2964
+ GetConnectionRequestErrors[keyof GetConnectionRequestErrors];
2965
+
2966
+ export type GetConnectionRequestResponses = {
2967
+ /**
2968
+ * Connection result.
2969
+ */
2970
+ 200: ConnectionRequestStatus;
2971
+ };
2972
+
2973
+ export type GetConnectionRequestResponse =
2974
+ GetConnectionRequestResponses[keyof GetConnectionRequestResponses];
2975
+
2976
+ export type DiscoverConnectionData = {
2977
+ body?: never;
2978
+ headers?: {
2979
+ /**
2980
+ * Optional caller-provided correlation identifier.
2981
+ */
2982
+ "X-Request-Id"?: string;
2983
+ };
2984
+ path: {
2985
+ organization_id: Ulid;
2986
+ grant_id: string;
2987
+ };
2988
+ query: {
2989
+ project_id: Ulid;
2990
+ environment_id: Ulid;
2991
+ provider_organization_id?: number;
2992
+ team_id?: number;
2993
+ };
2994
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}/catalog";
2995
+ };
2996
+
2997
+ export type DiscoverConnectionErrors = {
2998
+ /**
2999
+ * The request failed.
3000
+ */
3001
+ 400: ProblemDetails;
3002
+ /**
3003
+ * The request failed.
3004
+ */
3005
+ 401: ProblemDetails;
3006
+ /**
3007
+ * The resource does not exist or is not visible to the authenticated principal.
3008
+ */
3009
+ 404: ProblemDetails;
3010
+ /**
3011
+ * The request failed.
3012
+ */
3013
+ 429: ProblemDetails;
3014
+ /**
3015
+ * The request failed.
3016
+ */
3017
+ 503: ProblemDetails;
3018
+ };
3019
+
3020
+ export type DiscoverConnectionError = DiscoverConnectionErrors[keyof DiscoverConnectionErrors];
3021
+
3022
+ export type DiscoverConnectionResponses = {
3023
+ /**
3024
+ * Connection result.
3025
+ */
3026
+ 200: ConnectionDiscovery;
3027
+ };
3028
+
3029
+ export type DiscoverConnectionResponse =
3030
+ DiscoverConnectionResponses[keyof DiscoverConnectionResponses];
3031
+
3032
+ export type DisconnectConnectionData = {
3033
+ body?: never;
3034
+ headers: {
3035
+ /**
3036
+ * Optional caller-provided correlation identifier.
3037
+ */
3038
+ "X-Request-Id"?: string;
3039
+ /**
3040
+ * Identifies one mutation and its canonical request payload.
3041
+ */
3042
+ "Idempotency-Key": string;
3043
+ };
3044
+ path: {
3045
+ organization_id: Ulid;
3046
+ grant_id: string;
3047
+ };
3048
+ query?: never;
3049
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}";
3050
+ };
3051
+
3052
+ export type DisconnectConnectionErrors = {
3053
+ /**
3054
+ * The request failed.
3055
+ */
3056
+ 400: ProblemDetails;
3057
+ /**
3058
+ * The request failed.
3059
+ */
3060
+ 401: ProblemDetails;
3061
+ /**
3062
+ * The resource does not exist or is not visible to the authenticated principal.
3063
+ */
3064
+ 404: ProblemDetails;
3065
+ /**
3066
+ * The request failed.
3067
+ */
3068
+ 409: ProblemDetails;
3069
+ /**
3070
+ * The request failed.
3071
+ */
3072
+ 429: ProblemDetails;
3073
+ /**
3074
+ * The request failed.
3075
+ */
3076
+ 503: ProblemDetails;
3077
+ };
3078
+
3079
+ export type DisconnectConnectionError =
3080
+ DisconnectConnectionErrors[keyof DisconnectConnectionErrors];
3081
+
3082
+ export type DisconnectConnectionResponses = {
3083
+ /**
3084
+ * Connection result.
3085
+ */
3086
+ 200: ConnectionDisconnection;
3087
+ };
3088
+
3089
+ export type DisconnectConnectionResponse =
3090
+ DisconnectConnectionResponses[keyof DisconnectConnectionResponses];
3091
+
2447
3092
  export type GetNativeAuthConfigurationData = {
2448
3093
  body?: never;
2449
3094
  headers?: {