@distilled.cloud/prisma-postgres 0.0.0 → 0.2.5-alpha2

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.
Files changed (205) hide show
  1. package/README.md +47 -6
  2. package/lib/category.d.ts +5 -0
  3. package/lib/category.d.ts.map +1 -0
  4. package/lib/category.js +5 -0
  5. package/lib/category.js.map +1 -0
  6. package/lib/client.d.ts +17 -0
  7. package/lib/client.d.ts.map +1 -0
  8. package/lib/client.js +55 -0
  9. package/lib/client.js.map +1 -0
  10. package/lib/credentials.d.ts +14 -0
  11. package/lib/credentials.d.ts.map +1 -0
  12. package/lib/credentials.js +17 -0
  13. package/lib/credentials.js.map +1 -0
  14. package/lib/errors.d.ts +32 -0
  15. package/lib/errors.d.ts.map +1 -0
  16. package/lib/errors.js +24 -0
  17. package/lib/errors.js.map +1 -0
  18. package/lib/index.d.ts +16 -0
  19. package/lib/index.d.ts.map +1 -0
  20. package/lib/index.js +16 -0
  21. package/lib/index.js.map +1 -0
  22. package/lib/operations/deleteV1ConnectionsById.d.ts +14 -0
  23. package/lib/operations/deleteV1ConnectionsById.d.ts.map +1 -0
  24. package/lib/operations/deleteV1ConnectionsById.js +22 -0
  25. package/lib/operations/deleteV1ConnectionsById.js.map +1 -0
  26. package/lib/operations/deleteV1DatabasesByDatabaseId.d.ts +14 -0
  27. package/lib/operations/deleteV1DatabasesByDatabaseId.d.ts.map +1 -0
  28. package/lib/operations/deleteV1DatabasesByDatabaseId.js +23 -0
  29. package/lib/operations/deleteV1DatabasesByDatabaseId.js.map +1 -0
  30. package/lib/operations/deleteV1IntegrationsById.d.ts +14 -0
  31. package/lib/operations/deleteV1IntegrationsById.d.ts.map +1 -0
  32. package/lib/operations/deleteV1IntegrationsById.js +22 -0
  33. package/lib/operations/deleteV1IntegrationsById.js.map +1 -0
  34. package/lib/operations/deleteV1ProjectsById.d.ts +14 -0
  35. package/lib/operations/deleteV1ProjectsById.d.ts.map +1 -0
  36. package/lib/operations/deleteV1ProjectsById.js +22 -0
  37. package/lib/operations/deleteV1ProjectsById.js.map +1 -0
  38. package/lib/operations/deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId.d.ts +15 -0
  39. package/lib/operations/deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId.d.ts.map +1 -0
  40. package/lib/operations/deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId.js +27 -0
  41. package/lib/operations/deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId.js.map +1 -0
  42. package/lib/operations/getV1Connections.d.ts +53 -0
  43. package/lib/operations/getV1Connections.d.ts.map +1 -0
  44. package/lib/operations/getV1Connections.js +59 -0
  45. package/lib/operations/getV1Connections.js.map +1 -0
  46. package/lib/operations/getV1ConnectionsById.d.ts +47 -0
  47. package/lib/operations/getV1ConnectionsById.d.ts.map +1 -0
  48. package/lib/operations/getV1ConnectionsById.js +55 -0
  49. package/lib/operations/getV1ConnectionsById.js.map +1 -0
  50. package/lib/operations/getV1Databases.d.ts +72 -0
  51. package/lib/operations/getV1Databases.d.ts.map +1 -0
  52. package/lib/operations/getV1Databases.js +83 -0
  53. package/lib/operations/getV1Databases.js.map +1 -0
  54. package/lib/operations/getV1DatabasesByDatabaseId.d.ts +66 -0
  55. package/lib/operations/getV1DatabasesByDatabaseId.d.ts.map +1 -0
  56. package/lib/operations/getV1DatabasesByDatabaseId.js +79 -0
  57. package/lib/operations/getV1DatabasesByDatabaseId.js.map +1 -0
  58. package/lib/operations/getV1DatabasesByDatabaseIdBackups.d.ts +31 -0
  59. package/lib/operations/getV1DatabasesByDatabaseIdBackups.d.ts.map +1 -0
  60. package/lib/operations/getV1DatabasesByDatabaseIdBackups.js +40 -0
  61. package/lib/operations/getV1DatabasesByDatabaseIdBackups.js.map +1 -0
  62. package/lib/operations/getV1DatabasesByDatabaseIdConnections.d.ts +53 -0
  63. package/lib/operations/getV1DatabasesByDatabaseIdConnections.d.ts.map +1 -0
  64. package/lib/operations/getV1DatabasesByDatabaseIdConnections.js +62 -0
  65. package/lib/operations/getV1DatabasesByDatabaseIdConnections.js.map +1 -0
  66. package/lib/operations/getV1DatabasesByDatabaseIdUsage.d.ts +32 -0
  67. package/lib/operations/getV1DatabasesByDatabaseIdUsage.d.ts.map +1 -0
  68. package/lib/operations/getV1DatabasesByDatabaseIdUsage.js +41 -0
  69. package/lib/operations/getV1DatabasesByDatabaseIdUsage.js.map +1 -0
  70. package/lib/operations/getV1Integrations.d.ts +37 -0
  71. package/lib/operations/getV1Integrations.d.ts.map +1 -0
  72. package/lib/operations/getV1Integrations.js +44 -0
  73. package/lib/operations/getV1Integrations.js.map +1 -0
  74. package/lib/operations/getV1IntegrationsById.d.ts +31 -0
  75. package/lib/operations/getV1IntegrationsById.d.ts.map +1 -0
  76. package/lib/operations/getV1IntegrationsById.js +39 -0
  77. package/lib/operations/getV1IntegrationsById.js.map +1 -0
  78. package/lib/operations/getV1Projects.d.ts +33 -0
  79. package/lib/operations/getV1Projects.d.ts.map +1 -0
  80. package/lib/operations/getV1Projects.js +39 -0
  81. package/lib/operations/getV1Projects.js.map +1 -0
  82. package/lib/operations/getV1ProjectsById.d.ts +28 -0
  83. package/lib/operations/getV1ProjectsById.d.ts.map +1 -0
  84. package/lib/operations/getV1ProjectsById.js +35 -0
  85. package/lib/operations/getV1ProjectsById.js.map +1 -0
  86. package/lib/operations/getV1ProjectsByProjectIdDatabases.d.ts +72 -0
  87. package/lib/operations/getV1ProjectsByProjectIdDatabases.d.ts.map +1 -0
  88. package/lib/operations/getV1ProjectsByProjectIdDatabases.js +86 -0
  89. package/lib/operations/getV1ProjectsByProjectIdDatabases.js.map +1 -0
  90. package/lib/operations/getV1Regions.d.ts +22 -0
  91. package/lib/operations/getV1Regions.d.ts.map +1 -0
  92. package/lib/operations/getV1Regions.js +28 -0
  93. package/lib/operations/getV1Regions.js.map +1 -0
  94. package/lib/operations/getV1RegionsAccelerate.d.ts +18 -0
  95. package/lib/operations/getV1RegionsAccelerate.d.ts.map +1 -0
  96. package/lib/operations/getV1RegionsAccelerate.js +26 -0
  97. package/lib/operations/getV1RegionsAccelerate.js.map +1 -0
  98. package/lib/operations/getV1RegionsPostgres.d.ts +19 -0
  99. package/lib/operations/getV1RegionsPostgres.d.ts.map +1 -0
  100. package/lib/operations/getV1RegionsPostgres.js +27 -0
  101. package/lib/operations/getV1RegionsPostgres.js.map +1 -0
  102. package/lib/operations/getV1Workspaces.d.ts +27 -0
  103. package/lib/operations/getV1Workspaces.d.ts.map +1 -0
  104. package/lib/operations/getV1Workspaces.js +33 -0
  105. package/lib/operations/getV1Workspaces.js.map +1 -0
  106. package/lib/operations/getV1WorkspacesById.d.ts +22 -0
  107. package/lib/operations/getV1WorkspacesById.d.ts.map +1 -0
  108. package/lib/operations/getV1WorkspacesById.js +30 -0
  109. package/lib/operations/getV1WorkspacesById.js.map +1 -0
  110. package/lib/operations/getV1WorkspacesByWorkspaceIdIntegrations.d.ts +37 -0
  111. package/lib/operations/getV1WorkspacesByWorkspaceIdIntegrations.d.ts.map +1 -0
  112. package/lib/operations/getV1WorkspacesByWorkspaceIdIntegrations.js +49 -0
  113. package/lib/operations/getV1WorkspacesByWorkspaceIdIntegrations.js.map +1 -0
  114. package/lib/operations/index.d.ts +32 -0
  115. package/lib/operations/index.d.ts.map +1 -0
  116. package/lib/operations/index.js +32 -0
  117. package/lib/operations/index.js.map +1 -0
  118. package/lib/operations/patchV1DatabasesByDatabaseId.d.ts +67 -0
  119. package/lib/operations/patchV1DatabasesByDatabaseId.d.ts.map +1 -0
  120. package/lib/operations/patchV1DatabasesByDatabaseId.js +81 -0
  121. package/lib/operations/patchV1DatabasesByDatabaseId.js.map +1 -0
  122. package/lib/operations/patchV1ProjectsById.d.ts +30 -0
  123. package/lib/operations/patchV1ProjectsById.d.ts.map +1 -0
  124. package/lib/operations/patchV1ProjectsById.js +38 -0
  125. package/lib/operations/patchV1ProjectsById.js.map +1 -0
  126. package/lib/operations/postV1Connections.d.ts +52 -0
  127. package/lib/operations/postV1Connections.d.ts.map +1 -0
  128. package/lib/operations/postV1Connections.js +59 -0
  129. package/lib/operations/postV1Connections.js.map +1 -0
  130. package/lib/operations/postV1Databases.d.ts +69 -0
  131. package/lib/operations/postV1Databases.d.ts.map +1 -0
  132. package/lib/operations/postV1Databases.js +83 -0
  133. package/lib/operations/postV1Databases.js.map +1 -0
  134. package/lib/operations/postV1DatabasesByDatabaseIdConnections.d.ts +55 -0
  135. package/lib/operations/postV1DatabasesByDatabaseIdConnections.d.ts.map +1 -0
  136. package/lib/operations/postV1DatabasesByDatabaseIdConnections.js +64 -0
  137. package/lib/operations/postV1DatabasesByDatabaseIdConnections.js.map +1 -0
  138. package/lib/operations/postV1Projects.d.ts +113 -0
  139. package/lib/operations/postV1Projects.d.ts.map +1 -0
  140. package/lib/operations/postV1Projects.js +126 -0
  141. package/lib/operations/postV1Projects.js.map +1 -0
  142. package/lib/operations/postV1ProjectsByIdTransfer.d.ts +15 -0
  143. package/lib/operations/postV1ProjectsByIdTransfer.d.ts.map +1 -0
  144. package/lib/operations/postV1ProjectsByIdTransfer.js +23 -0
  145. package/lib/operations/postV1ProjectsByIdTransfer.js.map +1 -0
  146. package/lib/operations/postV1ProjectsByProjectIdDatabases.d.ts +110 -0
  147. package/lib/operations/postV1ProjectsByProjectIdDatabases.d.ts.map +1 -0
  148. package/lib/operations/postV1ProjectsByProjectIdDatabases.js +127 -0
  149. package/lib/operations/postV1ProjectsByProjectIdDatabases.js.map +1 -0
  150. package/lib/retry.d.ts +22 -0
  151. package/lib/retry.d.ts.map +1 -0
  152. package/lib/retry.js +21 -0
  153. package/lib/retry.js.map +1 -0
  154. package/lib/sensitive.d.ts +5 -0
  155. package/lib/sensitive.d.ts.map +1 -0
  156. package/lib/sensitive.js +5 -0
  157. package/lib/sensitive.js.map +1 -0
  158. package/lib/traits.d.ts +5 -0
  159. package/lib/traits.d.ts.map +1 -0
  160. package/lib/traits.js +5 -0
  161. package/lib/traits.js.map +1 -0
  162. package/package.json +80 -9
  163. package/src/category.ts +4 -0
  164. package/src/client.ts +68 -0
  165. package/src/credentials.ts +30 -0
  166. package/src/errors.ts +48 -0
  167. package/src/index.ts +15 -0
  168. package/src/operations/deleteV1ConnectionsById.ts +30 -0
  169. package/src/operations/deleteV1DatabasesByDatabaseId.ts +29 -0
  170. package/src/operations/deleteV1IntegrationsById.ts +30 -0
  171. package/src/operations/deleteV1ProjectsById.ts +28 -0
  172. package/src/operations/deleteV1WorkspacesByWorkspaceIdIntegrationsByClientId.ts +35 -0
  173. package/src/operations/getV1Connections.ts +77 -0
  174. package/src/operations/getV1ConnectionsById.ts +71 -0
  175. package/src/operations/getV1Databases.ts +103 -0
  176. package/src/operations/getV1DatabasesByDatabaseId.ts +101 -0
  177. package/src/operations/getV1DatabasesByDatabaseIdBackups.ts +50 -0
  178. package/src/operations/getV1DatabasesByDatabaseIdConnections.ts +82 -0
  179. package/src/operations/getV1DatabasesByDatabaseIdUsage.ts +47 -0
  180. package/src/operations/getV1Integrations.ts +52 -0
  181. package/src/operations/getV1IntegrationsById.ts +46 -0
  182. package/src/operations/getV1Projects.ts +45 -0
  183. package/src/operations/getV1ProjectsById.ts +41 -0
  184. package/src/operations/getV1ProjectsByProjectIdDatabases.ts +110 -0
  185. package/src/operations/getV1Regions.ts +34 -0
  186. package/src/operations/getV1RegionsAccelerate.ts +38 -0
  187. package/src/operations/getV1RegionsPostgres.ts +37 -0
  188. package/src/operations/getV1Workspaces.ts +39 -0
  189. package/src/operations/getV1WorkspacesById.ts +34 -0
  190. package/src/operations/getV1WorkspacesByWorkspaceIdIntegrations.ts +59 -0
  191. package/src/operations/index.ts +31 -0
  192. package/src/operations/patchV1DatabasesByDatabaseId.ts +101 -0
  193. package/src/operations/patchV1ProjectsById.ts +42 -0
  194. package/src/operations/postV1Connections.ts +75 -0
  195. package/src/operations/postV1Databases.ts +103 -0
  196. package/src/operations/postV1DatabasesByDatabaseIdConnections.ts +82 -0
  197. package/src/operations/postV1Projects.ts +160 -0
  198. package/src/operations/postV1ProjectsByIdTransfer.ts +31 -0
  199. package/src/operations/postV1ProjectsByProjectIdDatabases.ts +165 -0
  200. package/src/retry.ts +37 -0
  201. package/src/sensitive.ts +4 -0
  202. package/src/traits.ts +4 -0
  203. package/bun.lock +0 -26
  204. package/index.ts +0 -1
  205. package/tsconfig.json +0 -29
@@ -0,0 +1,50 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1DatabasesByDatabaseIdBackupsInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ databaseId: Schema.String.pipe(T.PathParam()),
9
+ limit: Schema.optional(Schema.Number),
10
+ }).pipe(
11
+ T.Http({ method: "GET", path: "/v1/databases/{databaseId}/backups" }),
12
+ );
13
+ export type GetV1DatabasesByDatabaseIdBackupsInput =
14
+ typeof GetV1DatabasesByDatabaseIdBackupsInput.Type;
15
+
16
+ // Output Schema
17
+ export const GetV1DatabasesByDatabaseIdBackupsOutput =
18
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
19
+ data: Schema.Array(
20
+ Schema.Struct({
21
+ id: Schema.String,
22
+ backupType: Schema.Literals(["full", "incremental"]),
23
+ createdAt: Schema.String,
24
+ size: Schema.optional(Schema.Number),
25
+ status: Schema.Literals(["running", "completed", "failed", "unknown"]),
26
+ type: Schema.optional(Schema.String),
27
+ }),
28
+ ),
29
+ meta: Schema.Struct({
30
+ backupRetentionDays: Schema.Number,
31
+ }),
32
+ pagination: Schema.Struct({
33
+ hasMore: Schema.Boolean,
34
+ limit: Schema.Unknown,
35
+ }),
36
+ });
37
+ export type GetV1DatabasesByDatabaseIdBackupsOutput =
38
+ typeof GetV1DatabasesByDatabaseIdBackupsOutput.Type;
39
+
40
+ // The operation
41
+ /**
42
+ * Get list of backups
43
+ *
44
+ * Returns backups for the specified database.
45
+ */
46
+ export const getV1DatabasesByDatabaseIdBackups =
47
+ /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
48
+ inputSchema: GetV1DatabasesByDatabaseIdBackupsInput,
49
+ outputSchema: GetV1DatabasesByDatabaseIdBackupsOutput,
50
+ }));
@@ -0,0 +1,82 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1DatabasesByDatabaseIdConnectionsInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ databaseId: Schema.String.pipe(T.PathParam()),
9
+ cursor: Schema.optional(Schema.String),
10
+ limit: Schema.optional(Schema.Number),
11
+ }).pipe(
12
+ T.Http({ method: "GET", path: "/v1/databases/{databaseId}/connections" }),
13
+ );
14
+ export type GetV1DatabasesByDatabaseIdConnectionsInput =
15
+ typeof GetV1DatabasesByDatabaseIdConnectionsInput.Type;
16
+
17
+ // Output Schema
18
+ export const GetV1DatabasesByDatabaseIdConnectionsOutput =
19
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
20
+ data: Schema.Array(
21
+ Schema.Struct({
22
+ id: Schema.String,
23
+ type: Schema.String,
24
+ url: Schema.String,
25
+ name: Schema.String,
26
+ createdAt: Schema.String,
27
+ kind: Schema.Literals(["postgres", "accelerate"]),
28
+ endpoints: Schema.Struct({
29
+ direct: Schema.optional(
30
+ Schema.Struct({
31
+ host: Schema.String,
32
+ port: Schema.Number,
33
+ }),
34
+ ),
35
+ pooled: Schema.optional(
36
+ Schema.Struct({
37
+ host: Schema.String,
38
+ port: Schema.Number,
39
+ }),
40
+ ),
41
+ accelerate: Schema.optional(
42
+ Schema.Struct({
43
+ host: Schema.String,
44
+ port: Schema.Number,
45
+ }),
46
+ ),
47
+ }),
48
+ directConnection: Schema.optional(
49
+ Schema.NullOr(
50
+ Schema.Struct({
51
+ host: Schema.String,
52
+ pass: Schema.String,
53
+ user: Schema.String,
54
+ }),
55
+ ),
56
+ ),
57
+ database: Schema.Struct({
58
+ id: Schema.String,
59
+ url: Schema.String,
60
+ name: Schema.String,
61
+ }),
62
+ }),
63
+ ),
64
+ pagination: Schema.Struct({
65
+ nextCursor: Schema.NullOr(Schema.String),
66
+ hasMore: Schema.Boolean,
67
+ }),
68
+ });
69
+ export type GetV1DatabasesByDatabaseIdConnectionsOutput =
70
+ typeof GetV1DatabasesByDatabaseIdConnectionsOutput.Type;
71
+
72
+ // The operation
73
+ /**
74
+ * Get list of database connections
75
+ *
76
+ * Returns all connections for the given database.
77
+ */
78
+ export const getV1DatabasesByDatabaseIdConnections =
79
+ /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
80
+ inputSchema: GetV1DatabasesByDatabaseIdConnectionsInput,
81
+ outputSchema: GetV1DatabasesByDatabaseIdConnectionsOutput,
82
+ }));
@@ -0,0 +1,47 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1DatabasesByDatabaseIdUsageInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ databaseId: Schema.String.pipe(T.PathParam()),
9
+ startDate: Schema.optional(Schema.String),
10
+ endDate: Schema.optional(Schema.String),
11
+ }).pipe(T.Http({ method: "GET", path: "/v1/databases/{databaseId}/usage" }));
12
+ export type GetV1DatabasesByDatabaseIdUsageInput =
13
+ typeof GetV1DatabasesByDatabaseIdUsageInput.Type;
14
+
15
+ // Output Schema
16
+ export const GetV1DatabasesByDatabaseIdUsageOutput =
17
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
18
+ period: Schema.Struct({
19
+ start: Schema.String,
20
+ end: Schema.String,
21
+ }),
22
+ metrics: Schema.Struct({
23
+ operations: Schema.Struct({
24
+ used: Schema.Number,
25
+ unit: Schema.String,
26
+ }),
27
+ storage: Schema.Struct({
28
+ used: Schema.Number,
29
+ unit: Schema.String,
30
+ }),
31
+ }),
32
+ generatedAt: Schema.String,
33
+ });
34
+ export type GetV1DatabasesByDatabaseIdUsageOutput =
35
+ typeof GetV1DatabasesByDatabaseIdUsageOutput.Type;
36
+
37
+ // The operation
38
+ /**
39
+ * Get database usage metrics
40
+ *
41
+ * Returns usage metrics for the specified database.
42
+ */
43
+ export const getV1DatabasesByDatabaseIdUsage =
44
+ /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
45
+ inputSchema: GetV1DatabasesByDatabaseIdUsageInput,
46
+ outputSchema: GetV1DatabasesByDatabaseIdUsageOutput,
47
+ }));
@@ -0,0 +1,52 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1IntegrationsInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
7
+ {
8
+ cursor: Schema.optional(Schema.String),
9
+ limit: Schema.optional(Schema.Number),
10
+ workspaceId: Schema.String,
11
+ },
12
+ ).pipe(T.Http({ method: "GET", path: "/v1/integrations" }));
13
+ export type GetV1IntegrationsInput = typeof GetV1IntegrationsInput.Type;
14
+
15
+ // Output Schema
16
+ export const GetV1IntegrationsOutput =
17
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
18
+ data: Schema.Array(
19
+ Schema.Struct({
20
+ id: Schema.String,
21
+ url: Schema.String,
22
+ createdAt: Schema.String,
23
+ scopes: Schema.Array(Schema.String),
24
+ client: Schema.Struct({
25
+ id: Schema.String,
26
+ name: Schema.String,
27
+ createdAt: Schema.String,
28
+ }),
29
+ createdByUser: Schema.Struct({
30
+ id: Schema.String,
31
+ email: Schema.String,
32
+ displayName: Schema.NullOr(Schema.String),
33
+ }),
34
+ }),
35
+ ),
36
+ pagination: Schema.Struct({
37
+ nextCursor: Schema.NullOr(Schema.String),
38
+ hasMore: Schema.Boolean,
39
+ }),
40
+ });
41
+ export type GetV1IntegrationsOutput = typeof GetV1IntegrationsOutput.Type;
42
+
43
+ // The operation
44
+ /**
45
+ * Get list of integrations
46
+ *
47
+ * Returns integrations filtered by workspace ID.
48
+ */
49
+ export const getV1Integrations = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
50
+ inputSchema: GetV1IntegrationsInput,
51
+ outputSchema: GetV1IntegrationsOutput,
52
+ }));
@@ -0,0 +1,46 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1IntegrationsByIdInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ id: Schema.String.pipe(T.PathParam()),
9
+ }).pipe(T.Http({ method: "GET", path: "/v1/integrations/{id}" }));
10
+ export type GetV1IntegrationsByIdInput = typeof GetV1IntegrationsByIdInput.Type;
11
+
12
+ // Output Schema
13
+ export const GetV1IntegrationsByIdOutput =
14
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
15
+ data: Schema.Struct({
16
+ id: Schema.String,
17
+ url: Schema.String,
18
+ createdAt: Schema.String,
19
+ scopes: Schema.Array(Schema.String),
20
+ client: Schema.Struct({
21
+ id: Schema.String,
22
+ name: Schema.String,
23
+ createdAt: Schema.String,
24
+ }),
25
+ createdByUser: Schema.Struct({
26
+ id: Schema.String,
27
+ email: Schema.String,
28
+ displayName: Schema.NullOr(Schema.String),
29
+ }),
30
+ }),
31
+ });
32
+ export type GetV1IntegrationsByIdOutput =
33
+ typeof GetV1IntegrationsByIdOutput.Type;
34
+
35
+ // The operation
36
+ /**
37
+ * Get integration by ID
38
+ *
39
+ * Returns a single integration by its ID.
40
+ */
41
+ export const getV1IntegrationsById = /*@__PURE__*/ /*#__PURE__*/ API.make(
42
+ () => ({
43
+ inputSchema: GetV1IntegrationsByIdInput,
44
+ outputSchema: GetV1IntegrationsByIdOutput,
45
+ }),
46
+ );
@@ -0,0 +1,45 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1ProjectsInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
7
+ cursor: Schema.optional(Schema.String),
8
+ limit: Schema.optional(Schema.Number),
9
+ }).pipe(T.Http({ method: "GET", path: "/v1/projects" }));
10
+ export type GetV1ProjectsInput = typeof GetV1ProjectsInput.Type;
11
+
12
+ // Output Schema
13
+ export const GetV1ProjectsOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
14
+ data: Schema.Array(
15
+ Schema.Struct({
16
+ id: Schema.String,
17
+ type: Schema.String,
18
+ url: Schema.String,
19
+ name: Schema.String,
20
+ createdAt: Schema.String,
21
+ defaultRegion: Schema.NullOr(Schema.String),
22
+ workspace: Schema.Struct({
23
+ id: Schema.String,
24
+ url: Schema.String,
25
+ name: Schema.String,
26
+ }),
27
+ }),
28
+ ),
29
+ pagination: Schema.Struct({
30
+ nextCursor: Schema.NullOr(Schema.String),
31
+ hasMore: Schema.Boolean,
32
+ }),
33
+ });
34
+ export type GetV1ProjectsOutput = typeof GetV1ProjectsOutput.Type;
35
+
36
+ // The operation
37
+ /**
38
+ * Get list of projects
39
+ *
40
+ * Returns the list of projects the token has access to.
41
+ */
42
+ export const getV1Projects = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
43
+ inputSchema: GetV1ProjectsInput,
44
+ outputSchema: GetV1ProjectsOutput,
45
+ }));
@@ -0,0 +1,41 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1ProjectsByIdInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
7
+ {
8
+ id: Schema.String.pipe(T.PathParam()),
9
+ },
10
+ ).pipe(T.Http({ method: "GET", path: "/v1/projects/{id}" }));
11
+ export type GetV1ProjectsByIdInput = typeof GetV1ProjectsByIdInput.Type;
12
+
13
+ // Output Schema
14
+ export const GetV1ProjectsByIdOutput =
15
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
16
+ data: Schema.Struct({
17
+ id: Schema.String,
18
+ type: Schema.String,
19
+ url: Schema.String,
20
+ name: Schema.String,
21
+ createdAt: Schema.String,
22
+ defaultRegion: Schema.NullOr(Schema.String),
23
+ workspace: Schema.Struct({
24
+ id: Schema.String,
25
+ url: Schema.String,
26
+ name: Schema.String,
27
+ }),
28
+ }),
29
+ });
30
+ export type GetV1ProjectsByIdOutput = typeof GetV1ProjectsByIdOutput.Type;
31
+
32
+ // The operation
33
+ /**
34
+ * Get project
35
+ *
36
+ * Returns the project with the given ID.
37
+ */
38
+ export const getV1ProjectsById = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
39
+ inputSchema: GetV1ProjectsByIdInput,
40
+ outputSchema: GetV1ProjectsByIdOutput,
41
+ }));
@@ -0,0 +1,110 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1ProjectsByProjectIdDatabasesInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ projectId: Schema.String.pipe(T.PathParam()),
9
+ cursor: Schema.optional(Schema.String),
10
+ limit: Schema.optional(Schema.Number),
11
+ }).pipe(
12
+ T.Http({ method: "GET", path: "/v1/projects/{projectId}/databases" }),
13
+ );
14
+ export type GetV1ProjectsByProjectIdDatabasesInput =
15
+ typeof GetV1ProjectsByProjectIdDatabasesInput.Type;
16
+
17
+ // Output Schema
18
+ export const GetV1ProjectsByProjectIdDatabasesOutput =
19
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
20
+ data: Schema.Array(
21
+ Schema.Struct({
22
+ id: Schema.String,
23
+ type: Schema.String,
24
+ url: Schema.String,
25
+ name: Schema.String,
26
+ status: Schema.Literals([
27
+ "failure",
28
+ "provisioning",
29
+ "ready",
30
+ "recovering",
31
+ ]),
32
+ createdAt: Schema.String,
33
+ isDefault: Schema.Boolean,
34
+ defaultConnectionId: Schema.NullOr(Schema.String),
35
+ connections: Schema.Array(
36
+ Schema.Struct({
37
+ id: Schema.String,
38
+ type: Schema.String,
39
+ url: Schema.String,
40
+ name: Schema.String,
41
+ createdAt: Schema.String,
42
+ kind: Schema.Literals(["postgres", "accelerate"]),
43
+ endpoints: Schema.Struct({
44
+ direct: Schema.optional(
45
+ Schema.Struct({
46
+ host: Schema.String,
47
+ port: Schema.Number,
48
+ }),
49
+ ),
50
+ pooled: Schema.optional(
51
+ Schema.Struct({
52
+ host: Schema.String,
53
+ port: Schema.Number,
54
+ }),
55
+ ),
56
+ accelerate: Schema.optional(
57
+ Schema.Struct({
58
+ host: Schema.String,
59
+ port: Schema.Number,
60
+ }),
61
+ ),
62
+ }),
63
+ directConnection: Schema.optional(
64
+ Schema.NullOr(
65
+ Schema.Struct({
66
+ host: Schema.String,
67
+ pass: Schema.String,
68
+ user: Schema.String,
69
+ }),
70
+ ),
71
+ ),
72
+ database: Schema.Struct({
73
+ id: Schema.String,
74
+ url: Schema.String,
75
+ name: Schema.String,
76
+ }),
77
+ }),
78
+ ),
79
+ project: Schema.Struct({
80
+ id: Schema.String,
81
+ url: Schema.String,
82
+ name: Schema.String,
83
+ }),
84
+ region: Schema.NullOr(
85
+ Schema.Struct({
86
+ id: Schema.String,
87
+ name: Schema.String,
88
+ }),
89
+ ),
90
+ }),
91
+ ),
92
+ pagination: Schema.Struct({
93
+ nextCursor: Schema.NullOr(Schema.String),
94
+ hasMore: Schema.Boolean,
95
+ }),
96
+ });
97
+ export type GetV1ProjectsByProjectIdDatabasesOutput =
98
+ typeof GetV1ProjectsByProjectIdDatabasesOutput.Type;
99
+
100
+ // The operation
101
+ /**
102
+ * Get list of databases
103
+ *
104
+ * Returns databases for the given project.
105
+ */
106
+ export const getV1ProjectsByProjectIdDatabases =
107
+ /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
108
+ inputSchema: GetV1ProjectsByProjectIdDatabasesInput,
109
+ outputSchema: GetV1ProjectsByProjectIdDatabasesOutput,
110
+ }));
@@ -0,0 +1,34 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1RegionsInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
7
+ product: Schema.optional(Schema.Literals(["postgres", "accelerate"])),
8
+ }).pipe(T.Http({ method: "GET", path: "/v1/regions" }));
9
+ export type GetV1RegionsInput = typeof GetV1RegionsInput.Type;
10
+
11
+ // Output Schema
12
+ export const GetV1RegionsOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
13
+ data: Schema.Array(
14
+ Schema.Struct({
15
+ id: Schema.String,
16
+ type: Schema.String,
17
+ name: Schema.String,
18
+ product: Schema.Literals(["postgres", "accelerate"]),
19
+ status: Schema.optional(Schema.Literals(["available", "unavailable"])),
20
+ }),
21
+ ),
22
+ });
23
+ export type GetV1RegionsOutput = typeof GetV1RegionsOutput.Type;
24
+
25
+ // The operation
26
+ /**
27
+ * Get all regions
28
+ *
29
+ * Returns all available regions across products. Optionally filter by product.
30
+ */
31
+ export const getV1Regions = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
32
+ inputSchema: GetV1RegionsInput,
33
+ outputSchema: GetV1RegionsOutput,
34
+ }));
@@ -0,0 +1,38 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1RegionsAccelerateInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(
8
+ T.Http({ method: "GET", path: "/v1/regions/accelerate" }),
9
+ );
10
+ export type GetV1RegionsAccelerateInput =
11
+ typeof GetV1RegionsAccelerateInput.Type;
12
+
13
+ // Output Schema
14
+ export const GetV1RegionsAccelerateOutput =
15
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
16
+ data: Schema.Array(
17
+ Schema.Struct({
18
+ id: Schema.String,
19
+ type: Schema.String,
20
+ name: Schema.String,
21
+ }),
22
+ ),
23
+ });
24
+ export type GetV1RegionsAccelerateOutput =
25
+ typeof GetV1RegionsAccelerateOutput.Type;
26
+
27
+ // The operation
28
+ /**
29
+ * Get Prisma Accelerate regions
30
+ *
31
+ * Returns all available regions for Prisma Accelerate.
32
+ */
33
+ export const getV1RegionsAccelerate = /*@__PURE__*/ /*#__PURE__*/ API.make(
34
+ () => ({
35
+ inputSchema: GetV1RegionsAccelerateInput,
36
+ outputSchema: GetV1RegionsAccelerateOutput,
37
+ }),
38
+ );
@@ -0,0 +1,37 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1RegionsPostgresInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({}).pipe(
8
+ T.Http({ method: "GET", path: "/v1/regions/postgres" }),
9
+ );
10
+ export type GetV1RegionsPostgresInput = typeof GetV1RegionsPostgresInput.Type;
11
+
12
+ // Output Schema
13
+ export const GetV1RegionsPostgresOutput =
14
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
15
+ data: Schema.Array(
16
+ Schema.Struct({
17
+ id: Schema.String,
18
+ type: Schema.String,
19
+ name: Schema.String,
20
+ status: Schema.Literals(["available", "unavailable"]),
21
+ }),
22
+ ),
23
+ });
24
+ export type GetV1RegionsPostgresOutput = typeof GetV1RegionsPostgresOutput.Type;
25
+
26
+ // The operation
27
+ /**
28
+ * Get Prisma Postgres regions
29
+ *
30
+ * Returns all available regions for Prisma Postgres.
31
+ */
32
+ export const getV1RegionsPostgres = /*@__PURE__*/ /*#__PURE__*/ API.make(
33
+ () => ({
34
+ inputSchema: GetV1RegionsPostgresInput,
35
+ outputSchema: GetV1RegionsPostgresOutput,
36
+ }),
37
+ );
@@ -0,0 +1,39 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1WorkspacesInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
7
+ cursor: Schema.optional(Schema.String),
8
+ limit: Schema.optional(Schema.Number),
9
+ }).pipe(T.Http({ method: "GET", path: "/v1/workspaces" }));
10
+ export type GetV1WorkspacesInput = typeof GetV1WorkspacesInput.Type;
11
+
12
+ // Output Schema
13
+ export const GetV1WorkspacesOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
14
+ data: Schema.Array(
15
+ Schema.Struct({
16
+ id: Schema.String,
17
+ type: Schema.String,
18
+ url: Schema.String,
19
+ name: Schema.String,
20
+ createdAt: Schema.String,
21
+ }),
22
+ ),
23
+ pagination: Schema.Struct({
24
+ nextCursor: Schema.NullOr(Schema.String),
25
+ hasMore: Schema.Boolean,
26
+ }),
27
+ });
28
+ export type GetV1WorkspacesOutput = typeof GetV1WorkspacesOutput.Type;
29
+
30
+ // The operation
31
+ /**
32
+ * Get list of workspaces
33
+ *
34
+ * Returns the list of workspaces the current token can access.
35
+ */
36
+ export const getV1Workspaces = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
37
+ inputSchema: GetV1WorkspacesInput,
38
+ outputSchema: GetV1WorkspacesOutput,
39
+ }));
@@ -0,0 +1,34 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { API } from "../client";
3
+ import * as T from "../traits";
4
+
5
+ // Input Schema
6
+ export const GetV1WorkspacesByIdInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ id: Schema.String.pipe(T.PathParam()),
9
+ }).pipe(T.Http({ method: "GET", path: "/v1/workspaces/{id}" }));
10
+ export type GetV1WorkspacesByIdInput = typeof GetV1WorkspacesByIdInput.Type;
11
+
12
+ // Output Schema
13
+ export const GetV1WorkspacesByIdOutput =
14
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
15
+ data: Schema.Struct({
16
+ id: Schema.String,
17
+ type: Schema.String,
18
+ url: Schema.String,
19
+ name: Schema.String,
20
+ createdAt: Schema.String,
21
+ }),
22
+ });
23
+ export type GetV1WorkspacesByIdOutput = typeof GetV1WorkspacesByIdOutput.Type;
24
+
25
+ // The operation
26
+ /**
27
+ * Get workspace
28
+ *
29
+ * Returns the workspace with the given ID.
30
+ */
31
+ export const getV1WorkspacesById = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
32
+ inputSchema: GetV1WorkspacesByIdInput,
33
+ outputSchema: GetV1WorkspacesByIdOutput,
34
+ }));