@iblai/data-layer 1.19.1 → 1.20.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.
@@ -0,0 +1,32 @@
1
+ import { SERVICES } from '@data-layer/constants';
2
+ export declare const HOSTING_REDUCER_PATH = "hostingApiSlice";
3
+ export declare const HOSTING_ENDPOINTS: {
4
+ GET_HOSTING_PROJECTS: {
5
+ service: SERVICES;
6
+ path: (org: string, username: string) => string;
7
+ };
8
+ GET_HOSTING_PROJECT_DOMAINS: {
9
+ service: SERVICES;
10
+ path: (org: string, username: string) => string;
11
+ };
12
+ CREATE_HOSTING_PROJECT_DOMAIN: {
13
+ service: SERVICES;
14
+ path: (org: string, username: string) => string;
15
+ };
16
+ DELETE_HOSTING_PROJECT_DOMAIN: {
17
+ service: SERVICES;
18
+ path: (org: string, username: string) => string;
19
+ };
20
+ UPDATE_HOSTING_DOMAIN: {
21
+ service: SERVICES;
22
+ path: (org: string, domainId: number) => string;
23
+ };
24
+ DELETE_HOSTING_DOMAIN: {
25
+ service: SERVICES;
26
+ path: (org: string, domainId: number) => string;
27
+ };
28
+ };
29
+ export declare const HOSTING_QUERY_KEYS: {
30
+ readonly HOSTING_PROJECTS: "HOSTING_PROJECTS";
31
+ readonly HOSTING_PROJECT_DOMAINS: "HOSTING_PROJECT_DOMAINS";
32
+ };
@@ -0,0 +1,3 @@
1
+ export * from './api-slice';
2
+ export * from './types';
3
+ export * from './constants';
@@ -0,0 +1,90 @@
1
+ import type { DomainRecord } from '@data-layer/features/custom-domain/types';
2
+ export type { DomainRecord };
3
+ /**
4
+ * A deployed app. `site_url` is the address to show the user and is final as
5
+ * soon as the deploy is accepted — never build a host from `name`.
6
+ * `shared_domain` is that same host on its own when the platform assigned it
7
+ * automatically, and empty when the app is served at a custom domain.
8
+ */
9
+ export interface HostingProject {
10
+ id: number;
11
+ name: string;
12
+ vercel_project_name?: string;
13
+ site_url?: string | null;
14
+ shared_domain?: string;
15
+ site_domain_error?: string;
16
+ url?: string | null;
17
+ vercel_alias?: string | null;
18
+ push_state?: string;
19
+ push_error?: string;
20
+ last_ready_state?: string;
21
+ username?: string;
22
+ user_email?: string;
23
+ user_full_name?: string;
24
+ }
25
+ /**
26
+ * `stale: true` means Vercel was unreachable and the cached state is being
27
+ * served — the rows are still real, their deployment state may lag.
28
+ */
29
+ export interface HostingProjectListResponse {
30
+ projects: HostingProject[];
31
+ stale: boolean;
32
+ upstream_error?: unknown;
33
+ }
34
+ /**
35
+ * `verified` and `misconfigured` answer different questions: `verified` is
36
+ * "has the organization proved it owns this name", `misconfigured` is "is DNS
37
+ * pointing here right now". A domain can be verified and still misconfigured.
38
+ *
39
+ * `verified: false` on a freshly attached domain is normal, not an error — it
40
+ * means the records in `required_records` are not visible in DNS yet.
41
+ */
42
+ export interface HostingDomain {
43
+ name: string;
44
+ apex_name?: string | null;
45
+ verified: boolean | null;
46
+ verification?: unknown[];
47
+ misconfigured?: boolean | null;
48
+ configured_by?: string | null;
49
+ required_records: DomainRecord[];
50
+ /** Only the org-scoped re-verify route returns this; it mirrors `required_records`. */
51
+ records?: DomainRecord[];
52
+ /** Set when a reclaim was refused because another organization still serves it. */
53
+ detail?: string;
54
+ }
55
+ export interface GetHostingProjectsArgs {
56
+ org: string;
57
+ username: string;
58
+ }
59
+ export interface GetHostingProjectDomainsArgs {
60
+ org: string;
61
+ username: string;
62
+ project: number;
63
+ /** Omit for the project's whole list; pass one name for its full record. */
64
+ domain?: string;
65
+ }
66
+ export interface CreateHostingProjectDomainArgs {
67
+ org: string;
68
+ username: string;
69
+ project: number;
70
+ /**
71
+ * Omit to have the platform assign a subdomain of its shared zone. That path
72
+ * answers 503 on an instance where no shared zone is configured.
73
+ */
74
+ domain?: string;
75
+ }
76
+ export interface DeleteHostingProjectDomainArgs {
77
+ org: string;
78
+ username: string;
79
+ project: number;
80
+ domain: string;
81
+ }
82
+ export interface UpdateHostingDomainArgs {
83
+ org: string;
84
+ /** The `id` from the /api/custom-domains/ listing — not a project id. */
85
+ domainId: number;
86
+ }
87
+ export interface DeleteHostingDomainArgs {
88
+ org: string;
89
+ domainId: number;
90
+ }
@@ -94,6 +94,9 @@ export * from './features/constants';
94
94
  export * from './features/custom-domain/api-slice';
95
95
  export * from './features/custom-domain/types';
96
96
  export * from './features/custom-domain/constants';
97
+ export * from './features/hosting/api-slice';
98
+ export * from './features/hosting/types';
99
+ export * from './features/hosting/constants';
97
100
  export * from './features/platform/custom-api-slice';
98
101
  export * from './features/platform/constants';
99
102
  export * from './features/platform/types';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};