@distilled.cloud/supabase 0.8.0 → 0.10.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.
Files changed (94) hide show
  1. package/lib/credentials.d.ts +2 -2
  2. package/lib/credentials.d.ts.map +1 -1
  3. package/lib/credentials.js +2 -2
  4. package/lib/credentials.js.map +1 -1
  5. package/lib/errors.d.ts +2 -2
  6. package/lib/operations/index.d.ts +3 -0
  7. package/lib/operations/index.d.ts.map +1 -1
  8. package/lib/operations/index.js +3 -0
  9. package/lib/operations/index.js.map +1 -1
  10. package/lib/operations/v1ApplyAMigration.d.ts +1 -1
  11. package/lib/operations/v1ApplyAMigration.js +1 -1
  12. package/lib/operations/v1CreateRestorePoint.d.ts +1 -0
  13. package/lib/operations/v1CreateRestorePoint.d.ts.map +1 -1
  14. package/lib/operations/v1CreateRestorePoint.js +1 -0
  15. package/lib/operations/v1CreateRestorePoint.js.map +1 -1
  16. package/lib/operations/v1DeleteABranch.d.ts +1 -1
  17. package/lib/operations/v1DeleteABranch.js +1 -1
  18. package/lib/operations/v1DiffABranch.d.ts +1 -1
  19. package/lib/operations/v1DiffABranch.js +1 -1
  20. package/lib/operations/v1GetABranchConfig.d.ts +1 -1
  21. package/lib/operations/v1GetABranchConfig.js +1 -1
  22. package/lib/operations/v1GetAMigration.d.ts +1 -1
  23. package/lib/operations/v1GetAMigration.js +1 -1
  24. package/lib/operations/v1GetAuthServiceConfig.d.ts +4 -0
  25. package/lib/operations/v1GetAuthServiceConfig.d.ts.map +1 -1
  26. package/lib/operations/v1GetAuthServiceConfig.js +4 -0
  27. package/lib/operations/v1GetAuthServiceConfig.js.map +1 -1
  28. package/lib/operations/v1GetDatabaseOpenapi.d.ts +18 -0
  29. package/lib/operations/v1GetDatabaseOpenapi.d.ts.map +1 -0
  30. package/lib/operations/v1GetDatabaseOpenapi.js +26 -0
  31. package/lib/operations/v1GetDatabaseOpenapi.js.map +1 -0
  32. package/lib/operations/v1GetOrganizationEntitlements.d.ts +26 -0
  33. package/lib/operations/v1GetOrganizationEntitlements.d.ts.map +1 -0
  34. package/lib/operations/v1GetOrganizationEntitlements.js +92 -0
  35. package/lib/operations/v1GetOrganizationEntitlements.js.map +1 -0
  36. package/lib/operations/v1GetProfile.d.ts +14 -0
  37. package/lib/operations/v1GetProfile.d.ts.map +1 -0
  38. package/lib/operations/v1GetProfile.js +20 -0
  39. package/lib/operations/v1GetProfile.js.map +1 -0
  40. package/lib/operations/v1GetRestorePoint.d.ts +1 -0
  41. package/lib/operations/v1GetRestorePoint.d.ts.map +1 -1
  42. package/lib/operations/v1GetRestorePoint.js +1 -0
  43. package/lib/operations/v1GetRestorePoint.js.map +1 -1
  44. package/lib/operations/v1ListMigrationHistory.d.ts +1 -1
  45. package/lib/operations/v1ListMigrationHistory.js +1 -1
  46. package/lib/operations/v1MergeABranch.d.ts +1 -1
  47. package/lib/operations/v1MergeABranch.js +1 -1
  48. package/lib/operations/v1PatchAMigration.d.ts +1 -1
  49. package/lib/operations/v1PatchAMigration.js +1 -1
  50. package/lib/operations/v1PushABranch.d.ts +1 -1
  51. package/lib/operations/v1PushABranch.js +1 -1
  52. package/lib/operations/v1ResetABranch.d.ts +1 -1
  53. package/lib/operations/v1ResetABranch.js +1 -1
  54. package/lib/operations/v1RestoreABranch.d.ts +1 -1
  55. package/lib/operations/v1RestoreABranch.js +1 -1
  56. package/lib/operations/v1RollbackMigrations.d.ts +1 -1
  57. package/lib/operations/v1RollbackMigrations.js +1 -1
  58. package/lib/operations/v1UpdateABranchConfig.d.ts +1 -1
  59. package/lib/operations/v1UpdateABranchConfig.js +1 -1
  60. package/lib/operations/v1UpdateAuthServiceConfig.d.ts +8 -0
  61. package/lib/operations/v1UpdateAuthServiceConfig.d.ts.map +1 -1
  62. package/lib/operations/v1UpdateAuthServiceConfig.js +8 -0
  63. package/lib/operations/v1UpdateAuthServiceConfig.js.map +1 -1
  64. package/lib/operations/v1UpsertAMigration.d.ts +1 -1
  65. package/lib/operations/v1UpsertAMigration.js +1 -1
  66. package/lib/retry.d.ts +2 -2
  67. package/lib/retry.d.ts.map +1 -1
  68. package/lib/retry.js +2 -2
  69. package/lib/retry.js.map +1 -1
  70. package/package.json +4 -4
  71. package/src/credentials.ts +2 -2
  72. package/src/operations/index.ts +3 -0
  73. package/src/operations/v1ApplyAMigration.ts +1 -1
  74. package/src/operations/v1CreateRestorePoint.ts +1 -0
  75. package/src/operations/v1DeleteABranch.ts +1 -1
  76. package/src/operations/v1DiffABranch.ts +1 -1
  77. package/src/operations/v1GetABranchConfig.ts +1 -1
  78. package/src/operations/v1GetAMigration.ts +1 -1
  79. package/src/operations/v1GetAuthServiceConfig.ts +4 -0
  80. package/src/operations/v1GetDatabaseOpenapi.ts +34 -0
  81. package/src/operations/v1GetOrganizationEntitlements.ts +102 -0
  82. package/src/operations/v1GetProfile.ts +26 -0
  83. package/src/operations/v1GetRestorePoint.ts +1 -0
  84. package/src/operations/v1ListMigrationHistory.ts +1 -1
  85. package/src/operations/v1MergeABranch.ts +1 -1
  86. package/src/operations/v1PatchAMigration.ts +1 -1
  87. package/src/operations/v1PushABranch.ts +1 -1
  88. package/src/operations/v1ResetABranch.ts +1 -1
  89. package/src/operations/v1RestoreABranch.ts +1 -1
  90. package/src/operations/v1RollbackMigrations.ts +1 -1
  91. package/src/operations/v1UpdateABranchConfig.ts +1 -1
  92. package/src/operations/v1UpdateAuthServiceConfig.ts +8 -0
  93. package/src/operations/v1UpsertAMigration.ts +1 -1
  94. package/src/retry.ts +2 -4
@@ -27,7 +27,7 @@ export type V1GetAMigrationOutput = typeof V1GetAMigrationOutput.Type;
27
27
 
28
28
  // The operation
29
29
  /**
30
- * [Beta] Fetch an existing entry from migration history
30
+ * Fetch an existing entry from migration history
31
31
  *
32
32
  * Only available to selected partner OAuth apps
33
33
  *
@@ -209,6 +209,10 @@ export const V1GetAuthServiceConfigOutput =
209
209
  mfa_phone_verify_enabled: Schema.NullOr(Schema.Boolean),
210
210
  mfa_web_authn_enroll_enabled: Schema.NullOr(Schema.Boolean),
211
211
  mfa_web_authn_verify_enabled: Schema.NullOr(Schema.Boolean),
212
+ passkey_enabled: Schema.Boolean,
213
+ webauthn_rp_display_name: Schema.NullOr(Schema.String),
214
+ webauthn_rp_id: Schema.NullOr(Schema.String),
215
+ webauthn_rp_origins: Schema.NullOr(Schema.String),
212
216
  mfa_phone_otp_length: Schema.Number,
213
217
  mfa_phone_template: Schema.NullOr(Schema.String),
214
218
  mfa_phone_max_frequency: Schema.NullOr(Schema.Number),
@@ -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 V1GetDatabaseOpenapiInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ ref: Schema.String.pipe(T.PathParam()),
9
+ schema: Schema.optional(Schema.String),
10
+ }).pipe(
11
+ T.Http({ method: "GET", path: "/v1/projects/{ref}/database/openapi" }),
12
+ );
13
+ export type V1GetDatabaseOpenapiInput = typeof V1GetDatabaseOpenapiInput.Type;
14
+
15
+ // Output Schema
16
+ export const V1GetDatabaseOpenapiOutput =
17
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Unknown;
18
+ export type V1GetDatabaseOpenapiOutput = typeof V1GetDatabaseOpenapiOutput.Type;
19
+
20
+ // The operation
21
+ /**
22
+ * Get PostgREST OpenAPI spec
23
+ *
24
+ * Returns the PostgREST OpenAPI specification for the project. This is the replacement for querying `/rest/v1/` directly with the anon key.
25
+ *
26
+ * @param ref - Project ref
27
+ * @param schema - The database schema to generate the OpenAPI spec for
28
+ */
29
+ export const v1GetDatabaseOpenapi = /*@__PURE__*/ /*#__PURE__*/ API.make(
30
+ () => ({
31
+ inputSchema: V1GetDatabaseOpenapiInput,
32
+ outputSchema: V1GetDatabaseOpenapiOutput,
33
+ }),
34
+ );
@@ -0,0 +1,102 @@
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 V1GetOrganizationEntitlementsInput =
7
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
8
+ slug: Schema.String.pipe(T.PathParam()),
9
+ }).pipe(
10
+ T.Http({ method: "GET", path: "/v1/organizations/{slug}/entitlements" }),
11
+ );
12
+ export type V1GetOrganizationEntitlementsInput =
13
+ typeof V1GetOrganizationEntitlementsInput.Type;
14
+
15
+ // Output Schema
16
+ export const V1GetOrganizationEntitlementsOutput =
17
+ /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
18
+ entitlements: Schema.Array(
19
+ Schema.Struct({
20
+ feature: Schema.Struct({
21
+ key: Schema.Literals([
22
+ "instances.compute_update_available_sizes",
23
+ "instances.read_replicas",
24
+ "instances.disk_modifications",
25
+ "instances.high_availability",
26
+ "instances.orioledb",
27
+ "replication.etl",
28
+ "storage.max_file_size",
29
+ "storage.max_file_size.configurable",
30
+ "storage.image_transformations",
31
+ "storage.vector_buckets",
32
+ "storage.iceberg_catalog",
33
+ "security.audit_logs_days",
34
+ "security.questionnaire",
35
+ "security.soc2_report",
36
+ "security.private_link",
37
+ "security.enforce_mfa",
38
+ "log.retention_days",
39
+ "custom_domain",
40
+ "vanity_subdomain",
41
+ "ipv4",
42
+ "pitr.available_variants",
43
+ "log_drains",
44
+ "branching_limit",
45
+ "branching_persistent",
46
+ "auth.mfa_phone",
47
+ "auth.mfa_web_authn",
48
+ "auth.mfa_enhanced_security",
49
+ "auth.hooks",
50
+ "auth.platform.sso",
51
+ "auth.custom_jwt_template",
52
+ "auth.saml_2",
53
+ "auth.user_sessions",
54
+ "auth.leaked_password_protection",
55
+ "auth.advanced_auth_settings",
56
+ "auth.performance_settings",
57
+ "auth.password_hibp",
58
+ "backup.retention_days",
59
+ "backup.restore_to_new_project",
60
+ "function.max_count",
61
+ "function.size_limit_mb",
62
+ "realtime.max_concurrent_users",
63
+ "realtime.max_events_per_second",
64
+ "realtime.max_joins_per_second",
65
+ "realtime.max_channels_per_client",
66
+ "realtime.max_bytes_per_second",
67
+ "realtime.max_presence_events_per_second",
68
+ "realtime.max_payload_size_in_kb",
69
+ "project_scoped_roles",
70
+ "security.member_roles",
71
+ "project_pausing",
72
+ "project_cloning",
73
+ "project_restore_after_expiry",
74
+ "assistant.advance_model",
75
+ "integrations.github_connections",
76
+ "dedicated_pooler",
77
+ "observability.dashboard_advanced_metrics",
78
+ ]),
79
+ type: Schema.Literals(["boolean", "numeric", "set"]),
80
+ }),
81
+ hasAccess: Schema.Boolean,
82
+ type: Schema.Literals(["boolean", "numeric", "set"]),
83
+ config: Schema.Unknown,
84
+ }),
85
+ ),
86
+ });
87
+ export type V1GetOrganizationEntitlementsOutput =
88
+ typeof V1GetOrganizationEntitlementsOutput.Type;
89
+
90
+ // The operation
91
+ /**
92
+ * Get entitlements for an organization
93
+ *
94
+ * Returns the entitlements available to the organization based on their plan and any overrides.
95
+ *
96
+ * @param slug - Organization slug
97
+ */
98
+ export const v1GetOrganizationEntitlements =
99
+ /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
100
+ inputSchema: V1GetOrganizationEntitlementsInput,
101
+ outputSchema: V1GetOrganizationEntitlementsOutput,
102
+ }));
@@ -0,0 +1,26 @@
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 V1GetProfileInput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct(
7
+ {},
8
+ ).pipe(T.Http({ method: "GET", path: "/v1/profile" }));
9
+ export type V1GetProfileInput = typeof V1GetProfileInput.Type;
10
+
11
+ // Output Schema
12
+ export const V1GetProfileOutput = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
13
+ gotrue_id: Schema.String,
14
+ primary_email: Schema.String,
15
+ username: Schema.String,
16
+ });
17
+ export type V1GetProfileOutput = typeof V1GetProfileOutput.Type;
18
+
19
+ // The operation
20
+ /**
21
+ * Gets the user's profile
22
+ */
23
+ export const v1GetProfile = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
24
+ inputSchema: V1GetProfileInput,
25
+ outputSchema: V1GetProfileOutput,
26
+ }));
@@ -21,6 +21,7 @@ export const V1GetRestorePointOutput =
21
21
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
22
22
  name: Schema.String,
23
23
  status: Schema.Literals(["AVAILABLE", "PENDING", "REMOVED", "FAILED"]),
24
+ completed_on: Schema.NullOr(Schema.String),
24
25
  });
25
26
  export type V1GetRestorePointOutput = typeof V1GetRestorePointOutput.Type;
26
27
 
@@ -25,7 +25,7 @@ export type V1ListMigrationHistoryOutput =
25
25
 
26
26
  // The operation
27
27
  /**
28
- * [Beta] List applied migration versions
28
+ * List applied migration versions
29
29
  *
30
30
  * Only available to selected partner OAuth apps
31
31
  *
@@ -24,7 +24,7 @@ export type V1MergeABranchOutput = typeof V1MergeABranchOutput.Type;
24
24
  *
25
25
  * Merges the specified database branch
26
26
  *
27
- * @param branch_id_or_ref - Branch ID
27
+ * @param branch_id_or_ref - Branch ref or deprecated branch ID
28
28
  */
29
29
  export const v1MergeABranch = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
30
30
  inputSchema: V1MergeABranchInput,
@@ -24,7 +24,7 @@ export type V1PatchAMigrationOutput = typeof V1PatchAMigrationOutput.Type;
24
24
 
25
25
  // The operation
26
26
  /**
27
- * [Beta] Patch an existing entry in migration history
27
+ * Patch an existing entry in migration history
28
28
  *
29
29
  * Only available to selected partner OAuth apps
30
30
  *
@@ -24,7 +24,7 @@ export type V1PushABranchOutput = typeof V1PushABranchOutput.Type;
24
24
  *
25
25
  * Pushes the specified database branch
26
26
  *
27
- * @param branch_id_or_ref - Branch ID
27
+ * @param branch_id_or_ref - Branch ref or deprecated branch ID
28
28
  */
29
29
  export const v1PushABranch = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
30
30
  inputSchema: V1PushABranchInput,
@@ -24,7 +24,7 @@ export type V1ResetABranchOutput = typeof V1ResetABranchOutput.Type;
24
24
  *
25
25
  * Resets the specified database branch
26
26
  *
27
- * @param branch_id_or_ref - Branch ID
27
+ * @param branch_id_or_ref - Branch ref or deprecated branch ID
28
28
  */
29
29
  export const v1ResetABranch = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
30
30
  inputSchema: V1ResetABranchInput,
@@ -24,7 +24,7 @@ export type V1RestoreABranchOutput = typeof V1RestoreABranchOutput.Type;
24
24
  *
25
25
  * Cancels scheduled deletion and restores the branch to active state
26
26
  *
27
- * @param branch_id_or_ref - Branch ID
27
+ * @param branch_id_or_ref - Branch ref or deprecated branch ID
28
28
  */
29
29
  export const v1RestoreABranch = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
30
30
  inputSchema: V1RestoreABranchInput,
@@ -22,7 +22,7 @@ export type V1RollbackMigrationsOutput = typeof V1RollbackMigrationsOutput.Type;
22
22
 
23
23
  // The operation
24
24
  /**
25
- * [Beta] Rollback database migrations and remove them from history table
25
+ * Rollback database migrations and remove them from history table
26
26
  *
27
27
  * Only available to selected partner OAuth apps
28
28
  *
@@ -80,7 +80,7 @@ export type V1UpdateABranchConfigOutput =
80
80
  *
81
81
  * Updates the configuration of the specified database branch
82
82
  *
83
- * @param branch_id_or_ref - Branch ID
83
+ * @param branch_id_or_ref - Branch ref or deprecated branch ID
84
84
  */
85
85
  export const v1UpdateABranchConfig = /*@__PURE__*/ /*#__PURE__*/ API.make(
86
86
  () => ({
@@ -408,6 +408,10 @@ export const V1UpdateAuthServiceConfigInput =
408
408
  mfa_web_authn_verify_enabled: Schema.optional(
409
409
  Schema.NullOr(Schema.Boolean),
410
410
  ),
411
+ passkey_enabled: Schema.optional(Schema.Boolean),
412
+ webauthn_rp_display_name: Schema.optional(Schema.NullOr(Schema.String)),
413
+ webauthn_rp_id: Schema.optional(Schema.NullOr(Schema.String)),
414
+ webauthn_rp_origins: Schema.optional(Schema.NullOr(Schema.String)),
411
415
  mfa_phone_enroll_enabled: Schema.optional(Schema.NullOr(Schema.Boolean)),
412
416
  mfa_phone_verify_enabled: Schema.optional(Schema.NullOr(Schema.Boolean)),
413
417
  mfa_phone_max_frequency: Schema.optional(Schema.NullOr(Schema.Number)),
@@ -625,6 +629,10 @@ export const V1UpdateAuthServiceConfigOutput =
625
629
  mfa_phone_verify_enabled: Schema.NullOr(Schema.Boolean),
626
630
  mfa_web_authn_enroll_enabled: Schema.NullOr(Schema.Boolean),
627
631
  mfa_web_authn_verify_enabled: Schema.NullOr(Schema.Boolean),
632
+ passkey_enabled: Schema.Boolean,
633
+ webauthn_rp_display_name: Schema.NullOr(Schema.String),
634
+ webauthn_rp_id: Schema.NullOr(Schema.String),
635
+ webauthn_rp_origins: Schema.NullOr(Schema.String),
628
636
  mfa_phone_otp_length: Schema.Number,
629
637
  mfa_phone_template: Schema.NullOr(Schema.String),
630
638
  mfa_phone_max_frequency: Schema.NullOr(Schema.Number),
@@ -20,7 +20,7 @@ export type V1UpsertAMigrationOutput = typeof V1UpsertAMigrationOutput.Type;
20
20
 
21
21
  // The operation
22
22
  /**
23
- * [Beta] Upsert a database migration without applying
23
+ * Upsert a database migration without applying
24
24
  *
25
25
  * Only available to selected partner OAuth apps
26
26
  *
package/src/retry.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import * as Effect from "effect/Effect";
5
5
  import * as Layer from "effect/Layer";
6
- import * as ServiceMap from "effect/ServiceMap";
6
+ import * as Context from "effect/Context";
7
7
  export {
8
8
  type Options,
9
9
  type Factory,
@@ -19,9 +19,7 @@ import type { Policy } from "@distilled.cloud/core/retry";
19
19
  /**
20
20
  * Context tag for configuring retry behavior of Supabase API calls.
21
21
  */
22
- export class Retry extends ServiceMap.Service<Retry, Policy>()(
23
- "SupabaseRetry",
24
- ) {}
22
+ export class Retry extends Context.Service<Retry, Policy>()("SupabaseRetry") {}
25
23
 
26
24
  /**
27
25
  * Provides a custom retry policy to all Supabase API calls.