@sylphx/cli 0.7.1 → 0.7.3
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/CHANGELOG.md +14 -0
- package/dist/main.js +1805 -1674
- package/dist/main.js.map +1 -1
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -15,7 +15,7 @@ var init_package = __esm({
|
|
|
15
15
|
"package.json"() {
|
|
16
16
|
package_default = {
|
|
17
17
|
name: "@sylphx/cli",
|
|
18
|
-
version: "0.7.
|
|
18
|
+
version: "0.7.3",
|
|
19
19
|
description: "Sylphx Platform CLI \u2014 deploy and manage your applications from the terminal. 63 commands across deployment, logs, env vars, domains, databases, storage, monitoring, self-service (user), admin (users/quotas/audit/invitations/jwt-keys/project-migrate), and more.",
|
|
20
20
|
type: "module",
|
|
21
21
|
homepage: "https://sylphx.com",
|
|
@@ -71,7 +71,7 @@ var init_package = __esm({
|
|
|
71
71
|
"@effect/cli": "0.75.1",
|
|
72
72
|
"@effect/platform": "0.96.0",
|
|
73
73
|
"@effect/platform-bun": "0.89.0",
|
|
74
|
-
"@sylphx/sdk": "0.10.
|
|
74
|
+
"@sylphx/sdk": "0.10.5",
|
|
75
75
|
chalk: "^5.3.0",
|
|
76
76
|
effect: "3.21.0",
|
|
77
77
|
eventsource: "^2.0.2",
|
|
@@ -4608,7 +4608,8 @@ var init_auth = __esm({
|
|
|
4608
4608
|
password: Schema38.String,
|
|
4609
4609
|
name: Schema38.optional(Schema38.String),
|
|
4610
4610
|
metadata: Schema38.optional(Schema38.Record({ key: Schema38.String, value: Schema38.Unknown })),
|
|
4611
|
-
invitationToken: Schema38.optional(Schema38.String)
|
|
4611
|
+
invitationToken: Schema38.optional(Schema38.String),
|
|
4612
|
+
captchaToken: Schema38.optional(Schema38.String)
|
|
4612
4613
|
});
|
|
4613
4614
|
RegisterResponse = Schema38.Struct({
|
|
4614
4615
|
requiresVerification: Schema38.optional(Schema38.Boolean),
|
|
@@ -5725,7 +5726,7 @@ var init_branch_databases = __esm({
|
|
|
5725
5726
|
params: ProjectEnvPath,
|
|
5726
5727
|
response: DestroyBranchDatabaseResult,
|
|
5727
5728
|
plane: "management",
|
|
5728
|
-
summary: "Schedule branch database teardown
|
|
5729
|
+
summary: "Schedule branch database teardown",
|
|
5729
5730
|
tags: ["branch-databases"]
|
|
5730
5731
|
})
|
|
5731
5732
|
};
|
|
@@ -6003,8 +6004,8 @@ var init_database = __esm({
|
|
|
6003
6004
|
directHost: Schema48.optional(Schema48.NullOr(Schema48.String)),
|
|
6004
6005
|
port: Schema48.optional(Schema48.Number),
|
|
6005
6006
|
publicPort: Schema48.optional(Schema48.NullOr(Schema48.Number)),
|
|
6006
|
-
dbUser: Schema48.
|
|
6007
|
-
dbName: Schema48.
|
|
6007
|
+
dbUser: Schema48.String,
|
|
6008
|
+
dbName: Schema48.String,
|
|
6008
6009
|
connectionString: Schema48.optional(Schema48.String),
|
|
6009
6010
|
storageGb: Schema48.optional(Schema48.Number),
|
|
6010
6011
|
env: Schema48.optional(Schema48.String),
|
|
@@ -6054,14 +6055,14 @@ var init_database = __esm({
|
|
|
6054
6055
|
|
|
6055
6056
|
// ../contract/dist/schemas/resources.js
|
|
6056
6057
|
import { Schema as Schema49 } from "effect";
|
|
6057
|
-
var ResourceTier, ResourceType, VolumeStatus,
|
|
6058
|
+
var ResourceTier, ResourceType, VolumeStatus, VolumeSharing, BindingRole, TierBadge, ResourcesOrgSlugParams, ResourcesResourceIdParams, DatabaseResource, CreateDatabaseResourceInput, UpdateDatabaseResourceInput, ListDatabaseResourcesResult, KvResource, CreateKvResourceInput, UpdateKvResourceInput, ListKvResourcesResult, BlobResource, CreateBlobResourceInput, UpdateBlobResourceInput, ListBlobResourcesResult, VolumeResource, CreateVolumeResourceInput, UpdateVolumeResourceInput, ListVolumeResourcesResult, ResourceBinding, CreateResourceBindingInput, ListResourceBindingsResult, SearchResource, SearchResourceWithApiKey, CreateSearchResourceInput, ListSearchResourcesResult, ManagedResource;
|
|
6058
6059
|
var init_resources = __esm({
|
|
6059
6060
|
"../contract/dist/schemas/resources.js"() {
|
|
6060
6061
|
"use strict";
|
|
6061
6062
|
ResourceTier = Schema49.Literal("standard");
|
|
6062
6063
|
ResourceType = Schema49.Literal("database", "kv", "blob", "volume", "search");
|
|
6063
6064
|
VolumeStatus = Schema49.Literal("provisioning", "active", "error");
|
|
6064
|
-
|
|
6065
|
+
VolumeSharing = Schema49.Literal("single-writer", "shared");
|
|
6065
6066
|
BindingRole = Schema49.Literal("primary", "replica", "analytics", "backup", "session");
|
|
6066
6067
|
TierBadge = Schema49.Struct({
|
|
6067
6068
|
tier: ResourceTier,
|
|
@@ -6079,8 +6080,8 @@ var init_resources = __esm({
|
|
|
6079
6080
|
/** Plaintext metadata — safe to return (not secret) */
|
|
6080
6081
|
host: Schema49.NullOr(Schema49.String),
|
|
6081
6082
|
port: Schema49.NullOr(Schema49.Number),
|
|
6082
|
-
dbUser: Schema49.
|
|
6083
|
-
dbName: Schema49.
|
|
6083
|
+
dbUser: Schema49.String,
|
|
6084
|
+
dbName: Schema49.String,
|
|
6084
6085
|
clusterName: Schema49.NullOr(Schema49.String),
|
|
6085
6086
|
branchName: Schema49.NullOr(Schema49.String),
|
|
6086
6087
|
bindingCount: Schema49.Number,
|
|
@@ -6181,9 +6182,8 @@ var init_resources = __esm({
|
|
|
6181
6182
|
orgId: Schema49.String,
|
|
6182
6183
|
name: Schema49.String,
|
|
6183
6184
|
tier: ResourceTier,
|
|
6184
|
-
|
|
6185
|
+
sharing: VolumeSharing,
|
|
6185
6186
|
/** Plaintext metadata — safe to return */
|
|
6186
|
-
hostPath: Schema49.NullOr(Schema49.String),
|
|
6187
6187
|
mountPath: Schema49.NullOr(Schema49.String),
|
|
6188
6188
|
sizeGb: Schema49.NullOr(Schema49.Number),
|
|
6189
6189
|
status: VolumeStatus,
|
|
@@ -6194,14 +6194,12 @@ var init_resources = __esm({
|
|
|
6194
6194
|
CreateVolumeResourceInput = Schema49.Struct({
|
|
6195
6195
|
name: Schema49.String,
|
|
6196
6196
|
tier: ResourceTier,
|
|
6197
|
-
|
|
6198
|
-
hostPath: Schema49.optional(Schema49.String),
|
|
6197
|
+
sharing: Schema49.optional(VolumeSharing),
|
|
6199
6198
|
mountPath: Schema49.optional(Schema49.String),
|
|
6200
6199
|
sizeGb: Schema49.optional(Schema49.Number)
|
|
6201
6200
|
});
|
|
6202
6201
|
UpdateVolumeResourceInput = Schema49.Struct({
|
|
6203
6202
|
name: Schema49.optional(Schema49.String),
|
|
6204
|
-
hostPath: Schema49.optional(Schema49.String),
|
|
6205
6203
|
mountPath: Schema49.optional(Schema49.String),
|
|
6206
6204
|
sizeGb: Schema49.optional(Schema49.Number)
|
|
6207
6205
|
});
|
|
@@ -6289,8 +6287,7 @@ var init_resources = __esm({
|
|
|
6289
6287
|
region: Schema49.optional(Schema49.NullOr(Schema49.String)),
|
|
6290
6288
|
prefix: Schema49.optional(Schema49.NullOr(Schema49.String)),
|
|
6291
6289
|
publicUrl: Schema49.optional(Schema49.NullOr(Schema49.String)),
|
|
6292
|
-
|
|
6293
|
-
hostPath: Schema49.optional(Schema49.NullOr(Schema49.String)),
|
|
6290
|
+
sharing: Schema49.optional(VolumeSharing),
|
|
6294
6291
|
mountPath: Schema49.optional(Schema49.NullOr(Schema49.String)),
|
|
6295
6292
|
sizeGb: Schema49.optional(Schema49.NullOr(Schema49.Number)),
|
|
6296
6293
|
memoryGb: Schema49.optional(Schema49.Number),
|
|
@@ -6299,7 +6296,6 @@ var init_resources = __esm({
|
|
|
6299
6296
|
message: Schema49.optional(Schema49.String),
|
|
6300
6297
|
provisioningError: Schema49.optional(Schema49.NullOr(Schema49.String)),
|
|
6301
6298
|
conditions: Schema49.optional(Schema49.Array(Schema49.Unknown)),
|
|
6302
|
-
config: Schema49.optional(Schema49.Record({ key: Schema49.String, value: Schema49.Unknown })),
|
|
6303
6299
|
createdAt: Schema49.optional(Schema49.String),
|
|
6304
6300
|
updatedAt: Schema49.optional(Schema49.String)
|
|
6305
6301
|
});
|
|
@@ -6332,7 +6328,7 @@ var init_databases = __esm({
|
|
|
6332
6328
|
region: Schema50.optional(Schema50.NullOr(Schema50.String)),
|
|
6333
6329
|
accessKeyEncrypted: Schema50.optional(Schema50.NullOr(Schema50.String)),
|
|
6334
6330
|
secretKeyEncrypted: Schema50.optional(Schema50.NullOr(Schema50.String)),
|
|
6335
|
-
|
|
6331
|
+
sharing: Schema50.optional(Schema50.Literal("single-writer", "shared")),
|
|
6336
6332
|
sizeGb: Schema50.optional(Schema50.NullOr(Schema50.Number)),
|
|
6337
6333
|
mountPath: Schema50.optional(Schema50.NullOr(Schema50.String)),
|
|
6338
6334
|
config: Schema50.optional(Schema50.Record({ key: Schema50.String, value: Schema50.Unknown }))
|
|
@@ -6860,7 +6856,7 @@ var init_deployments = __esm({
|
|
|
6860
6856
|
method: "GET",
|
|
6861
6857
|
path: "/deployments/status",
|
|
6862
6858
|
response: DeployServiceStatus,
|
|
6863
|
-
summary: "Deploy service readiness
|
|
6859
|
+
summary: "Deploy service readiness",
|
|
6864
6860
|
tags: ["deployments"]
|
|
6865
6861
|
}),
|
|
6866
6862
|
envScopedListAppDeployments: defineEndpoint({
|
|
@@ -8511,13 +8507,25 @@ var init_kv = __esm({
|
|
|
8511
8507
|
value: KvValue,
|
|
8512
8508
|
/** Expire in N seconds. */
|
|
8513
8509
|
ex: Schema67.optional(Schema67.Number),
|
|
8510
|
+
/** Expire in N milliseconds. */
|
|
8511
|
+
px: Schema67.optional(Schema67.Number),
|
|
8512
|
+
/** Unix timestamp (seconds) at which the key will expire. */
|
|
8513
|
+
exat: Schema67.optional(Schema67.Number),
|
|
8514
|
+
/** Unix timestamp (milliseconds) at which the key will expire. */
|
|
8515
|
+
pxat: Schema67.optional(Schema67.Number),
|
|
8514
8516
|
/** Only set if the key does not exist. */
|
|
8515
8517
|
nx: Schema67.optional(Schema67.Boolean),
|
|
8516
8518
|
/** Only set if the key exists. */
|
|
8517
8519
|
xx: Schema67.optional(Schema67.Boolean)
|
|
8518
8520
|
});
|
|
8519
|
-
KvSetResult = Schema67.Struct({
|
|
8520
|
-
|
|
8521
|
+
KvSetResult = Schema67.Struct({
|
|
8522
|
+
success: Schema67.Boolean,
|
|
8523
|
+
created: Schema67.optional(Schema67.Boolean)
|
|
8524
|
+
});
|
|
8525
|
+
KvGetResult = Schema67.Struct({
|
|
8526
|
+
value: Schema67.NullOr(KvValue),
|
|
8527
|
+
ttl: Schema67.NullOr(Schema67.Number)
|
|
8528
|
+
});
|
|
8521
8529
|
KvDeleteResult = Schema67.Struct({ deleted: Schema67.Number });
|
|
8522
8530
|
KvExistsResult = Schema67.Struct({ exists: Schema67.Boolean });
|
|
8523
8531
|
KvIncrInput = Schema67.Struct({
|
|
@@ -8530,9 +8538,9 @@ var init_kv = __esm({
|
|
|
8530
8538
|
seconds: Schema67.Number
|
|
8531
8539
|
});
|
|
8532
8540
|
KvRateLimitInput = Schema67.Struct({
|
|
8533
|
-
|
|
8541
|
+
key: Schema67.String,
|
|
8534
8542
|
limit: Schema67.Number,
|
|
8535
|
-
window: Schema67.
|
|
8543
|
+
window: Schema67.String
|
|
8536
8544
|
});
|
|
8537
8545
|
KvRateLimitResult = Schema67.Struct({
|
|
8538
8546
|
success: Schema67.Boolean,
|
|
@@ -9106,6 +9114,16 @@ var init_notifications = __esm({
|
|
|
9106
9114
|
messageId: Schema72.optional(Schema72.String),
|
|
9107
9115
|
/** Human-readable failure reason — present on `failed`. */
|
|
9108
9116
|
reason: Schema72.optional(Schema72.String),
|
|
9117
|
+
/** Canonical aggregate delivery count from the runtime API. */
|
|
9118
|
+
sent: Schema72.optional(Schema72.Number),
|
|
9119
|
+
/** Canonical aggregate failure count from the runtime API. */
|
|
9120
|
+
failed: Schema72.optional(Schema72.Number),
|
|
9121
|
+
/** Canonical per-platform success breakdown from the runtime API. */
|
|
9122
|
+
platforms: Schema72.optional(Schema72.Struct({
|
|
9123
|
+
web: Schema72.optional(Schema72.Number),
|
|
9124
|
+
ios: Schema72.optional(Schema72.Number),
|
|
9125
|
+
android: Schema72.optional(Schema72.Number)
|
|
9126
|
+
})),
|
|
9109
9127
|
/** Count of subscriptions the push was delivered to (SDK counter). */
|
|
9110
9128
|
sentTo: Schema72.optional(Schema72.Number),
|
|
9111
9129
|
/** Count of subscriptions that were pruned as expired (SDK counter). */
|
|
@@ -10822,10 +10840,11 @@ var init_privacy = __esm({
|
|
|
10822
10840
|
|
|
10823
10841
|
// ../contract/dist/schemas/project-manifest.js
|
|
10824
10842
|
import { Schema as Schema83 } from "effect";
|
|
10825
|
-
var Slug2, ManifestEnvName, ManifestRegion, MachineSize, BuildMachineSize, BuildpackName, BuildStrategy, ServiceType, DeployStrategy, WwwRedirect, ManifestProjectSection, ManifestBuildSection, ManifestDeploySection, ManifestServiceBuildSection, ManifestServiceHealthSection, ManifestServiceSection, ManifestMigrationEngine, ManifestMigrationDestructivePolicy, ManifestMigrationsSection, ManifestDatabaseSection, ManifestEnvValue, ManifestDomainSection, PostgresTier, PostgresVersion, SearchTier, ManifestDatabaseEngine, ManifestSearchEngine, ManifestDatabaseResource, ManifestSearchResource, ManifestResourcesSection, ManifestCiSection, ManifestServiceOverride, ManifestEnvironmentOverride, ManifestEnvironmentsMap, SylphxManifest;
|
|
10843
|
+
var Slug2, ManifestEnvName, ManifestRegion, MachineSize, BuildMachineSize, BuildpackName, BuildStrategy, ServiceType, DeployStrategy, WwwRedirect, ManifestProjectSection, ManifestBuildSection, ManifestDeploySection, ManifestServiceBuildSection, ManifestServiceHealthSection, ManifestServiceSection, ManifestMigrationEngine, ManifestMigrationDestructivePolicy, ManifestMigrationsSection, ManifestDatabaseSection, ManifestEnvValue, ManifestDomainSection, ManifestManagedResourceTier, PostgresTier, PostgresVersion, SearchTier, KvTier, ManifestVolumeTier, ManifestVolumeSharing, ManifestDatabaseEngine, ManifestKvEngine, ManifestSearchEngine, ManifestDatabaseResource, ManifestKvResource, ManifestSearchResource, ManifestVolumeResource, ManifestResourcesSection, ManifestCiSection, ManifestServiceOverride, ManifestEnvironmentOverride, ManifestEnvironmentsMap, SylphxManifest;
|
|
10826
10844
|
var init_project_manifest = __esm({
|
|
10827
10845
|
"../contract/dist/schemas/project-manifest.js"() {
|
|
10828
10846
|
"use strict";
|
|
10847
|
+
init_resources();
|
|
10829
10848
|
Slug2 = Schema83.String.pipe(Schema83.pattern(/^[a-z0-9]([-a-z0-9]*[a-z0-9])?$/), Schema83.minLength(3), Schema83.maxLength(63));
|
|
10830
10849
|
ManifestEnvName = Schema83.Literal("production", "staging", "preview", "development");
|
|
10831
10850
|
ManifestRegion = Schema83.Literal("fsn1", "nbg1", "hel1", "ash1", "hil1");
|
|
@@ -10877,10 +10896,10 @@ var init_project_manifest = __esm({
|
|
|
10877
10896
|
ManifestDeploySection = Schema83.Struct({
|
|
10878
10897
|
/**
|
|
10879
10898
|
* Command run before traffic cutover (DB migrations via expand-and-
|
|
10880
|
-
* contract). Runs
|
|
10899
|
+
* contract). Runs before the new release accepts traffic. ADR-066.2.
|
|
10881
10900
|
*/
|
|
10882
10901
|
release_command: Schema83.optional(Schema83.String),
|
|
10883
|
-
/** HTTP path
|
|
10902
|
+
/** HTTP readiness path. */
|
|
10884
10903
|
health_check_path: Schema83.optional(Schema83.String),
|
|
10885
10904
|
/** Timeout in seconds. */
|
|
10886
10905
|
health_check_timeout: Schema83.optional(Schema83.Number.pipe(Schema83.int(), Schema83.between(1, 300))),
|
|
@@ -10902,7 +10921,7 @@ var init_project_manifest = __esm({
|
|
|
10902
10921
|
command: Schema83.optional(Schema83.String)
|
|
10903
10922
|
});
|
|
10904
10923
|
ManifestServiceSection = Schema83.Struct({
|
|
10905
|
-
/** Service name — unique within project.
|
|
10924
|
+
/** Service name — unique within project. */
|
|
10906
10925
|
name: Slug2,
|
|
10907
10926
|
type: ServiceType,
|
|
10908
10927
|
/** Per-service build override. Root [build] remains the default. */
|
|
@@ -10920,21 +10939,17 @@ var init_project_manifest = __esm({
|
|
|
10920
10939
|
internal_port: Schema83.optional(Schema83.Number.pipe(Schema83.int(), Schema83.between(1, 65535))),
|
|
10921
10940
|
/** Replica count. Ignored for `cron`. */
|
|
10922
10941
|
replicas: Schema83.optional(Schema83.Number.pipe(Schema83.int(), Schema83.between(0, 100))),
|
|
10923
|
-
/** Compute size; maps to per-service
|
|
10942
|
+
/** Compute size; maps to per-service runtime resources. */
|
|
10924
10943
|
instance_type: Schema83.optional(MachineSize),
|
|
10925
10944
|
/** Required when type=cron. Standard 5-field cron expression. */
|
|
10926
10945
|
cron_schedule: Schema83.optional(Schema83.String),
|
|
10927
10946
|
/** Optional per-service region override. */
|
|
10928
10947
|
regions: Schema83.optional(Schema83.Array(ManifestRegion)),
|
|
10929
|
-
/**
|
|
10930
|
-
* Scale-to-zero (KEDA). `false` (default) = pinned at `min_replicas >= 1`;
|
|
10931
|
-
* `true` = the reconciler emits a KEDA ScaledObject and lets KEDA drive
|
|
10932
|
-
* the replica count from 0 → N on incoming traffic (docs/design/scale-to-zero.md).
|
|
10933
|
-
*/
|
|
10948
|
+
/** Scale-to-zero. `false` (default) = pinned at `min_replicas >= 1`. */
|
|
10934
10949
|
scale_to_zero: Schema83.optional(Schema83.Boolean),
|
|
10935
10950
|
/**
|
|
10936
|
-
* Seconds of no traffic before
|
|
10937
|
-
*
|
|
10951
|
+
* Seconds of no traffic before the platform scales the service down to 0.
|
|
10952
|
+
* Only meaningful when `scale_to_zero=true`.
|
|
10938
10953
|
* Range: 60s–3600s. Default: 300 (5 min).
|
|
10939
10954
|
*/
|
|
10940
10955
|
idle_timeout_seconds: Schema83.optional(Schema83.Number.pipe(Schema83.int(), Schema83.between(60, 3600))),
|
|
@@ -10976,10 +10991,15 @@ var init_project_manifest = __esm({
|
|
|
10976
10991
|
/** Alternate names (e.g. marketing domains pointing here). */
|
|
10977
10992
|
aliases: Schema83.optional(Schema83.Array(Schema83.String))
|
|
10978
10993
|
});
|
|
10979
|
-
|
|
10994
|
+
ManifestManagedResourceTier = Schema83.Literal("nano", "micro", "standard", "large", "xl", "hobby", "starter", "pro", "business", "enterprise", "enterprise-2x", "enterprise-4x");
|
|
10995
|
+
PostgresTier = ManifestManagedResourceTier;
|
|
10980
10996
|
PostgresVersion = Schema83.Literal("15", "16", "17");
|
|
10981
|
-
SearchTier =
|
|
10997
|
+
SearchTier = ManifestManagedResourceTier;
|
|
10998
|
+
KvTier = ManifestManagedResourceTier;
|
|
10999
|
+
ManifestVolumeTier = ManifestManagedResourceTier;
|
|
11000
|
+
ManifestVolumeSharing = VolumeSharing;
|
|
10982
11001
|
ManifestDatabaseEngine = Schema83.Literal("postgres");
|
|
11002
|
+
ManifestKvEngine = Schema83.Literal("valkey");
|
|
10983
11003
|
ManifestSearchEngine = Schema83.Literal("typesense");
|
|
10984
11004
|
ManifestDatabaseResource = Schema83.Struct({
|
|
10985
11005
|
/** Capability-specific engine. PostgreSQL is the first supported database engine. */
|
|
@@ -10993,6 +11013,12 @@ var init_project_manifest = __esm({
|
|
|
10993
11013
|
/** Branch-per-preview (P0 gap #4 sibling). */
|
|
10994
11014
|
branch_on_preview: Schema83.optional(Schema83.Boolean)
|
|
10995
11015
|
});
|
|
11016
|
+
ManifestKvResource = Schema83.Struct({
|
|
11017
|
+
/** Capability-specific engine. Valkey is the first supported KV engine. */
|
|
11018
|
+
engine: Schema83.optional(ManifestKvEngine),
|
|
11019
|
+
tier: KvTier,
|
|
11020
|
+
storage_gb: Schema83.optional(Schema83.Number.pipe(Schema83.int(), Schema83.between(1, 1e4)))
|
|
11021
|
+
});
|
|
10996
11022
|
ManifestSearchResource = Schema83.Struct({
|
|
10997
11023
|
/** Capability-specific engine. Typesense is the first supported search engine. */
|
|
10998
11024
|
engine: Schema83.optional(ManifestSearchEngine),
|
|
@@ -11000,9 +11026,30 @@ var init_project_manifest = __esm({
|
|
|
11000
11026
|
storage_gb: Schema83.optional(Schema83.Number.pipe(Schema83.int(), Schema83.between(1, 1e4))),
|
|
11001
11027
|
nodes: Schema83.optional(Schema83.Number.pipe(Schema83.int(), Schema83.between(1, 9)))
|
|
11002
11028
|
});
|
|
11029
|
+
ManifestVolumeResource = Schema83.Struct({
|
|
11030
|
+
tier: ManifestVolumeTier,
|
|
11031
|
+
storage_gb: Schema83.optional(Schema83.Number.pipe(Schema83.int(), Schema83.between(1, 1e4))),
|
|
11032
|
+
/**
|
|
11033
|
+
* Public sharing intent. The platform maps this to the best backend storage
|
|
11034
|
+
* class without exposing implementation details.
|
|
11035
|
+
*/
|
|
11036
|
+
sharing: Schema83.optional(ManifestVolumeSharing),
|
|
11037
|
+
/**
|
|
11038
|
+
* Optional env-facing path metadata. This does not mount the volume into an
|
|
11039
|
+
* app service by itself; service/task mounts stay explicit bindings.
|
|
11040
|
+
*/
|
|
11041
|
+
mount_path: Schema83.optional(Schema83.String.pipe(Schema83.pattern(/^\//))),
|
|
11042
|
+
/**
|
|
11043
|
+
* Binding role controls env var prefix. Example: role="workspace" emits
|
|
11044
|
+
* WORKSPACE_VOLUME_ID for a volume binding.
|
|
11045
|
+
*/
|
|
11046
|
+
role: Schema83.optional(Slug2)
|
|
11047
|
+
});
|
|
11003
11048
|
ManifestResourcesSection = Schema83.Struct({
|
|
11004
11049
|
database: Schema83.optional(ManifestDatabaseResource),
|
|
11005
|
-
|
|
11050
|
+
kv: Schema83.optional(ManifestKvResource),
|
|
11051
|
+
search: Schema83.optional(ManifestSearchResource),
|
|
11052
|
+
volume: Schema83.optional(ManifestVolumeResource)
|
|
11006
11053
|
});
|
|
11007
11054
|
ManifestCiSection = Schema83.Struct({
|
|
11008
11055
|
on_push: Schema83.optional(Schema83.Boolean),
|
|
@@ -11067,94 +11114,138 @@ var init_project_manifest = __esm({
|
|
|
11067
11114
|
}
|
|
11068
11115
|
});
|
|
11069
11116
|
|
|
11070
|
-
// ../contract/dist/
|
|
11117
|
+
// ../contract/dist/endpoints/project-manifest.js
|
|
11071
11118
|
import { Schema as Schema84 } from "effect";
|
|
11119
|
+
var IdPath2, ManifestGetResponse, ManifestPutResponse, projectManifestEndpoints;
|
|
11120
|
+
var init_project_manifest2 = __esm({
|
|
11121
|
+
"../contract/dist/endpoints/project-manifest.js"() {
|
|
11122
|
+
"use strict";
|
|
11123
|
+
init_endpoint();
|
|
11124
|
+
init_project_manifest();
|
|
11125
|
+
IdPath2 = Schema84.Struct({ id: Schema84.String });
|
|
11126
|
+
ManifestGetResponse = Schema84.Struct({
|
|
11127
|
+
manifest: Schema84.NullOr(SylphxManifest),
|
|
11128
|
+
version: Schema84.NullOr(Schema84.Number),
|
|
11129
|
+
updatedAt: Schema84.NullOr(Schema84.String)
|
|
11130
|
+
});
|
|
11131
|
+
ManifestPutResponse = Schema84.Struct({
|
|
11132
|
+
version: Schema84.Number,
|
|
11133
|
+
updatedAt: Schema84.String
|
|
11134
|
+
});
|
|
11135
|
+
projectManifestEndpoints = {
|
|
11136
|
+
get: defineEndpoint({
|
|
11137
|
+
method: "GET",
|
|
11138
|
+
path: "/projects/:id/manifest",
|
|
11139
|
+
params: IdPath2,
|
|
11140
|
+
response: ManifestGetResponse,
|
|
11141
|
+
summary: "Fetch the latest persisted sylphx.toml manifest for a project",
|
|
11142
|
+
description: "Returns the most recently pushed manifest. `manifest` is null when the project has not yet had `sylphx config push` invoked \u2014 callers should synthesise a starter from live state.",
|
|
11143
|
+
tags: ["projects", "manifest"],
|
|
11144
|
+
plane: "management"
|
|
11145
|
+
}),
|
|
11146
|
+
put: defineEndpoint({
|
|
11147
|
+
method: "PUT",
|
|
11148
|
+
path: "/projects/:id/manifest",
|
|
11149
|
+
params: IdPath2,
|
|
11150
|
+
body: SylphxManifest,
|
|
11151
|
+
response: ManifestPutResponse,
|
|
11152
|
+
summary: "Persist a new sylphx.toml manifest version for a project",
|
|
11153
|
+
description: "Inserts a new row in `project_manifests` with an incremented version. Never mutates prior versions \u2014 history + rollback come for free.",
|
|
11154
|
+
tags: ["projects", "manifest"],
|
|
11155
|
+
plane: "management"
|
|
11156
|
+
})
|
|
11157
|
+
};
|
|
11158
|
+
}
|
|
11159
|
+
});
|
|
11160
|
+
|
|
11161
|
+
// ../contract/dist/schemas/project.js
|
|
11162
|
+
import { Schema as Schema85 } from "effect";
|
|
11072
11163
|
var ProjectEnvironmentSummary, Project, CreateProjectResult, DeleteProjectResult, CreateProjectInput, UpdateProjectInput;
|
|
11073
11164
|
var init_project = __esm({
|
|
11074
11165
|
"../contract/dist/schemas/project.js"() {
|
|
11075
11166
|
"use strict";
|
|
11076
11167
|
init_ids();
|
|
11077
|
-
ProjectEnvironmentSummary =
|
|
11168
|
+
ProjectEnvironmentSummary = Schema85.Struct({
|
|
11078
11169
|
id: EnvironmentId,
|
|
11079
|
-
slug:
|
|
11080
|
-
name:
|
|
11081
|
-
envType:
|
|
11082
|
-
isActive:
|
|
11083
|
-
publicKey:
|
|
11084
|
-
secretKeyPrefix:
|
|
11085
|
-
deployAppId:
|
|
11086
|
-
namespace:
|
|
11087
|
-
githubRepo:
|
|
11088
|
-
githubBranch:
|
|
11089
|
-
customDomains:
|
|
11090
|
-
createdAt:
|
|
11091
|
-
updatedAt:
|
|
11092
|
-
});
|
|
11093
|
-
Project =
|
|
11170
|
+
slug: Schema85.optional(Schema85.String),
|
|
11171
|
+
name: Schema85.String,
|
|
11172
|
+
envType: Schema85.optional(Schema85.String),
|
|
11173
|
+
isActive: Schema85.optional(Schema85.Boolean),
|
|
11174
|
+
publicKey: Schema85.optional(Schema85.NullOr(Schema85.String)),
|
|
11175
|
+
secretKeyPrefix: Schema85.optional(Schema85.NullOr(Schema85.String)),
|
|
11176
|
+
deployAppId: Schema85.optional(Schema85.NullOr(Schema85.String)),
|
|
11177
|
+
namespace: Schema85.optional(Schema85.NullOr(Schema85.String)),
|
|
11178
|
+
githubRepo: Schema85.optional(Schema85.NullOr(Schema85.String)),
|
|
11179
|
+
githubBranch: Schema85.optional(Schema85.NullOr(Schema85.String)),
|
|
11180
|
+
customDomains: Schema85.optional(Schema85.NullOr(Schema85.Array(Schema85.String))),
|
|
11181
|
+
createdAt: Schema85.optional(Schema85.String),
|
|
11182
|
+
updatedAt: Schema85.optional(Schema85.String)
|
|
11183
|
+
});
|
|
11184
|
+
Project = Schema85.Struct({
|
|
11094
11185
|
id: ProjectId,
|
|
11095
|
-
slug:
|
|
11096
|
-
name:
|
|
11097
|
-
ref:
|
|
11098
|
-
description:
|
|
11099
|
-
orgId:
|
|
11100
|
-
isActive:
|
|
11101
|
-
sdkUrl:
|
|
11186
|
+
slug: Schema85.String,
|
|
11187
|
+
name: Schema85.String,
|
|
11188
|
+
ref: Schema85.optional(Schema85.String),
|
|
11189
|
+
description: Schema85.optional(Schema85.NullOr(Schema85.String)),
|
|
11190
|
+
orgId: Schema85.optional(OrgId),
|
|
11191
|
+
isActive: Schema85.optional(Schema85.Boolean),
|
|
11192
|
+
sdkUrl: Schema85.optional(Schema85.String),
|
|
11102
11193
|
/** Ephemeral status surfaced from POST /projects; resources are declared separately. */
|
|
11103
|
-
infraStatus:
|
|
11104
|
-
domains:
|
|
11105
|
-
webhookUrl:
|
|
11106
|
-
webhookEvents:
|
|
11107
|
-
enabledOAuthProviders:
|
|
11108
|
-
buildMachineType:
|
|
11109
|
-
settings:
|
|
11110
|
-
createdAt:
|
|
11111
|
-
updatedAt:
|
|
11112
|
-
environments:
|
|
11113
|
-
});
|
|
11114
|
-
CreateProjectResult =
|
|
11194
|
+
infraStatus: Schema85.optional(Schema85.String),
|
|
11195
|
+
domains: Schema85.optional(Schema85.NullOr(Schema85.Array(Schema85.String))),
|
|
11196
|
+
webhookUrl: Schema85.optional(Schema85.NullOr(Schema85.String)),
|
|
11197
|
+
webhookEvents: Schema85.optional(Schema85.NullOr(Schema85.Array(Schema85.String))),
|
|
11198
|
+
enabledOAuthProviders: Schema85.optional(Schema85.NullOr(Schema85.Array(Schema85.String))),
|
|
11199
|
+
buildMachineType: Schema85.optional(Schema85.String),
|
|
11200
|
+
settings: Schema85.optional(Schema85.NullOr(Schema85.Record({ key: Schema85.String, value: Schema85.Unknown }))),
|
|
11201
|
+
createdAt: Schema85.optional(Schema85.String),
|
|
11202
|
+
updatedAt: Schema85.optional(Schema85.String),
|
|
11203
|
+
environments: Schema85.optional(Schema85.Array(ProjectEnvironmentSummary))
|
|
11204
|
+
});
|
|
11205
|
+
CreateProjectResult = Schema85.Struct({
|
|
11115
11206
|
app: Project
|
|
11116
11207
|
});
|
|
11117
|
-
DeleteProjectResult =
|
|
11118
|
-
deleted:
|
|
11208
|
+
DeleteProjectResult = Schema85.Struct({
|
|
11209
|
+
deleted: Schema85.Boolean,
|
|
11119
11210
|
projectId: ProjectId,
|
|
11120
|
-
queued:
|
|
11121
|
-
warnings:
|
|
11211
|
+
queued: Schema85.Boolean,
|
|
11212
|
+
warnings: Schema85.optional(Schema85.Array(Schema85.String))
|
|
11122
11213
|
});
|
|
11123
|
-
CreateProjectInput =
|
|
11124
|
-
name:
|
|
11125
|
-
slug:
|
|
11126
|
-
description:
|
|
11127
|
-
gitRepository:
|
|
11128
|
-
gitBranch:
|
|
11129
|
-
buildPack:
|
|
11130
|
-
dockerImage:
|
|
11131
|
-
port:
|
|
11132
|
-
domain:
|
|
11214
|
+
CreateProjectInput = Schema85.Struct({
|
|
11215
|
+
name: Schema85.String,
|
|
11216
|
+
slug: Schema85.String,
|
|
11217
|
+
description: Schema85.optional(Schema85.String),
|
|
11218
|
+
gitRepository: Schema85.optional(Schema85.String),
|
|
11219
|
+
gitBranch: Schema85.optional(Schema85.String),
|
|
11220
|
+
buildPack: Schema85.optional(Schema85.String),
|
|
11221
|
+
dockerImage: Schema85.optional(Schema85.String),
|
|
11222
|
+
port: Schema85.optional(Schema85.Number),
|
|
11223
|
+
domain: Schema85.optional(Schema85.String)
|
|
11133
11224
|
});
|
|
11134
|
-
UpdateProjectInput =
|
|
11135
|
-
name:
|
|
11136
|
-
description:
|
|
11137
|
-
domains:
|
|
11138
|
-
webhookUrl:
|
|
11139
|
-
webhookEvents:
|
|
11140
|
-
enabledOAuthProviders:
|
|
11141
|
-
buildMachineType:
|
|
11225
|
+
UpdateProjectInput = Schema85.Struct({
|
|
11226
|
+
name: Schema85.optional(Schema85.String),
|
|
11227
|
+
description: Schema85.optional(Schema85.NullOr(Schema85.String)),
|
|
11228
|
+
domains: Schema85.optional(Schema85.Array(Schema85.String)),
|
|
11229
|
+
webhookUrl: Schema85.optional(Schema85.NullOr(Schema85.String)),
|
|
11230
|
+
webhookEvents: Schema85.optional(Schema85.Array(Schema85.String)),
|
|
11231
|
+
enabledOAuthProviders: Schema85.optional(Schema85.Array(Schema85.String)),
|
|
11232
|
+
buildMachineType: Schema85.optional(Schema85.Literal("standard", "large", "xlarge"))
|
|
11142
11233
|
});
|
|
11143
11234
|
}
|
|
11144
11235
|
});
|
|
11145
11236
|
|
|
11146
11237
|
// ../contract/dist/endpoints/projects.js
|
|
11147
|
-
import { Schema as
|
|
11148
|
-
var
|
|
11238
|
+
import { Schema as Schema86 } from "effect";
|
|
11239
|
+
var IdPath3, ListResponse, projectsEndpoints2;
|
|
11149
11240
|
var init_projects = __esm({
|
|
11150
11241
|
"../contract/dist/endpoints/projects.js"() {
|
|
11151
11242
|
"use strict";
|
|
11152
11243
|
init_endpoint();
|
|
11153
11244
|
init_project();
|
|
11154
|
-
|
|
11155
|
-
ListResponse =
|
|
11156
|
-
object:
|
|
11157
|
-
data:
|
|
11245
|
+
IdPath3 = Schema86.Struct({ id: Schema86.String });
|
|
11246
|
+
ListResponse = Schema86.Struct({
|
|
11247
|
+
object: Schema86.Literal("list"),
|
|
11248
|
+
data: Schema86.Array(Project)
|
|
11158
11249
|
});
|
|
11159
11250
|
projectsEndpoints2 = {
|
|
11160
11251
|
list: defineEndpoint({
|
|
@@ -11176,7 +11267,7 @@ var init_projects = __esm({
|
|
|
11176
11267
|
get: defineEndpoint({
|
|
11177
11268
|
method: "GET",
|
|
11178
11269
|
path: "/projects/:id",
|
|
11179
|
-
params:
|
|
11270
|
+
params: IdPath3,
|
|
11180
11271
|
response: Project,
|
|
11181
11272
|
summary: "Get project detail by id or slug",
|
|
11182
11273
|
tags: ["projects"]
|
|
@@ -11184,7 +11275,7 @@ var init_projects = __esm({
|
|
|
11184
11275
|
update: defineEndpoint({
|
|
11185
11276
|
method: "PATCH",
|
|
11186
11277
|
path: "/projects/:id",
|
|
11187
|
-
params:
|
|
11278
|
+
params: IdPath3,
|
|
11188
11279
|
body: UpdateProjectInput,
|
|
11189
11280
|
response: Project,
|
|
11190
11281
|
summary: "Update project metadata, webhooks, OAuth providers, or build machine tier",
|
|
@@ -11193,7 +11284,7 @@ var init_projects = __esm({
|
|
|
11193
11284
|
delete: defineEndpoint({
|
|
11194
11285
|
method: "DELETE",
|
|
11195
11286
|
path: "/projects/:id",
|
|
11196
|
-
params:
|
|
11287
|
+
params: IdPath3,
|
|
11197
11288
|
response: DeleteProjectResult,
|
|
11198
11289
|
summary: "Soft-delete a project \u2014 environments transition to `terminating`",
|
|
11199
11290
|
tags: ["projects"]
|
|
@@ -11203,440 +11294,440 @@ var init_projects = __esm({
|
|
|
11203
11294
|
});
|
|
11204
11295
|
|
|
11205
11296
|
// ../contract/dist/schemas/realtime.js
|
|
11206
|
-
import { Schema as
|
|
11297
|
+
import { Schema as Schema87 } from "effect";
|
|
11207
11298
|
var ChannelName, StreamMessageId, StreamMessage, RealtimeEmitInput, RealtimeEmitResult, RealtimeHistoryQuery, RealtimeHistoryResult;
|
|
11208
11299
|
var init_realtime = __esm({
|
|
11209
11300
|
"../contract/dist/schemas/realtime.js"() {
|
|
11210
11301
|
"use strict";
|
|
11211
|
-
ChannelName =
|
|
11212
|
-
StreamMessageId =
|
|
11213
|
-
StreamMessage =
|
|
11214
|
-
id:
|
|
11215
|
-
channel:
|
|
11216
|
-
event:
|
|
11217
|
-
data:
|
|
11218
|
-
timestamp:
|
|
11302
|
+
ChannelName = Schema87.String.pipe(Schema87.minLength(1), Schema87.brand("ChannelName"));
|
|
11303
|
+
StreamMessageId = Schema87.String.pipe(Schema87.brand("StreamMessageId"));
|
|
11304
|
+
StreamMessage = Schema87.Struct({
|
|
11305
|
+
id: Schema87.String,
|
|
11306
|
+
channel: Schema87.String,
|
|
11307
|
+
event: Schema87.String,
|
|
11308
|
+
data: Schema87.Unknown,
|
|
11309
|
+
timestamp: Schema87.Number
|
|
11219
11310
|
});
|
|
11220
|
-
RealtimeEmitInput =
|
|
11221
|
-
channel:
|
|
11222
|
-
event:
|
|
11223
|
-
data:
|
|
11311
|
+
RealtimeEmitInput = Schema87.Struct({
|
|
11312
|
+
channel: Schema87.String,
|
|
11313
|
+
event: Schema87.String,
|
|
11314
|
+
data: Schema87.Unknown
|
|
11224
11315
|
});
|
|
11225
|
-
RealtimeEmitResult =
|
|
11226
|
-
id:
|
|
11227
|
-
channel:
|
|
11316
|
+
RealtimeEmitResult = Schema87.Struct({
|
|
11317
|
+
id: Schema87.String,
|
|
11318
|
+
channel: Schema87.String
|
|
11228
11319
|
});
|
|
11229
|
-
RealtimeHistoryQuery =
|
|
11230
|
-
channel:
|
|
11231
|
-
limit:
|
|
11232
|
-
after:
|
|
11320
|
+
RealtimeHistoryQuery = Schema87.Struct({
|
|
11321
|
+
channel: Schema87.String,
|
|
11322
|
+
limit: Schema87.optional(Schema87.String),
|
|
11323
|
+
after: Schema87.optional(Schema87.String)
|
|
11233
11324
|
});
|
|
11234
|
-
RealtimeHistoryResult =
|
|
11235
|
-
messages:
|
|
11325
|
+
RealtimeHistoryResult = Schema87.Struct({
|
|
11326
|
+
messages: Schema87.Array(StreamMessage)
|
|
11236
11327
|
});
|
|
11237
11328
|
}
|
|
11238
11329
|
});
|
|
11239
11330
|
|
|
11240
11331
|
// ../contract/dist/schemas/realtime-admin.js
|
|
11241
|
-
import { Schema as
|
|
11332
|
+
import { Schema as Schema88 } from "effect";
|
|
11242
11333
|
var RealtimeAdminProjectIdQuery, RealtimeAdminChannelNameParams, RealtimeAdminStatusResult, RealtimeAdminChannel, RealtimeAdminListChannelsResult, RealtimeAdminCreateChannelInput, RealtimeAdminCreateChannelResult, RealtimeAdminDeleteChannelResult;
|
|
11243
11334
|
var init_realtime_admin = __esm({
|
|
11244
11335
|
"../contract/dist/schemas/realtime-admin.js"() {
|
|
11245
11336
|
"use strict";
|
|
11246
|
-
RealtimeAdminProjectIdQuery =
|
|
11247
|
-
RealtimeAdminChannelNameParams =
|
|
11248
|
-
RealtimeAdminStatusResult =
|
|
11249
|
-
available:
|
|
11250
|
-
provider:
|
|
11251
|
-
});
|
|
11252
|
-
RealtimeAdminChannel =
|
|
11253
|
-
name:
|
|
11254
|
-
activeConnections:
|
|
11255
|
-
messagesPerHour:
|
|
11256
|
-
status:
|
|
11257
|
-
});
|
|
11258
|
-
RealtimeAdminListChannelsResult =
|
|
11259
|
-
channels:
|
|
11260
|
-
count:
|
|
11261
|
-
});
|
|
11262
|
-
RealtimeAdminCreateChannelInput =
|
|
11263
|
-
projectId:
|
|
11264
|
-
name:
|
|
11337
|
+
RealtimeAdminProjectIdQuery = Schema88.Struct({ projectId: Schema88.String });
|
|
11338
|
+
RealtimeAdminChannelNameParams = Schema88.Struct({ channelName: Schema88.String });
|
|
11339
|
+
RealtimeAdminStatusResult = Schema88.Struct({
|
|
11340
|
+
available: Schema88.Boolean,
|
|
11341
|
+
provider: Schema88.String
|
|
11342
|
+
});
|
|
11343
|
+
RealtimeAdminChannel = Schema88.Struct({
|
|
11344
|
+
name: Schema88.String,
|
|
11345
|
+
activeConnections: Schema88.Number,
|
|
11346
|
+
messagesPerHour: Schema88.Number,
|
|
11347
|
+
status: Schema88.Literal("active", "empty")
|
|
11348
|
+
});
|
|
11349
|
+
RealtimeAdminListChannelsResult = Schema88.Struct({
|
|
11350
|
+
channels: Schema88.Array(RealtimeAdminChannel),
|
|
11351
|
+
count: Schema88.Number
|
|
11352
|
+
});
|
|
11353
|
+
RealtimeAdminCreateChannelInput = Schema88.Struct({
|
|
11354
|
+
projectId: Schema88.String,
|
|
11355
|
+
name: Schema88.String
|
|
11265
11356
|
});
|
|
11266
|
-
RealtimeAdminCreateChannelResult =
|
|
11267
|
-
RealtimeAdminDeleteChannelResult =
|
|
11357
|
+
RealtimeAdminCreateChannelResult = Schema88.Struct({ name: Schema88.String });
|
|
11358
|
+
RealtimeAdminDeleteChannelResult = Schema88.Struct({ success: Schema88.Boolean });
|
|
11268
11359
|
}
|
|
11269
11360
|
});
|
|
11270
11361
|
|
|
11271
11362
|
// ../contract/dist/schemas/referrals-admin.js
|
|
11272
|
-
import { Schema as
|
|
11363
|
+
import { Schema as Schema89 } from "effect";
|
|
11273
11364
|
var ReferralStatus, ReferralRewardType, ReferralUserRef, Referral, ReferralDetail, ListReferralsQuery, GetReferralQuery, CreateReferralInput, GetReferralStatsQuery, ExpireReferralInput, ListReferralsResult, CreateReferralResult, ExpireReferralResult, DailyTrendEntry, ByRewardTypeEntry, ByProjectEntry, TopReferrerEntry, GetReferralStatsResult;
|
|
11274
11365
|
var init_referrals_admin = __esm({
|
|
11275
11366
|
"../contract/dist/schemas/referrals-admin.js"() {
|
|
11276
11367
|
"use strict";
|
|
11277
|
-
ReferralStatus =
|
|
11278
|
-
ReferralRewardType =
|
|
11279
|
-
ReferralUserRef =
|
|
11280
|
-
id:
|
|
11281
|
-
email:
|
|
11282
|
-
name:
|
|
11283
|
-
});
|
|
11284
|
-
Referral =
|
|
11285
|
-
id:
|
|
11286
|
-
projectId:
|
|
11287
|
-
projectName:
|
|
11288
|
-
code:
|
|
11289
|
-
referrer:
|
|
11290
|
-
referredUser:
|
|
11368
|
+
ReferralStatus = Schema89.Literal("pending", "completed", "expired");
|
|
11369
|
+
ReferralRewardType = Schema89.Literal("points", "premium_trial", "discount", "credit");
|
|
11370
|
+
ReferralUserRef = Schema89.Struct({
|
|
11371
|
+
id: Schema89.String,
|
|
11372
|
+
email: Schema89.String,
|
|
11373
|
+
name: Schema89.NullOr(Schema89.String)
|
|
11374
|
+
});
|
|
11375
|
+
Referral = Schema89.Struct({
|
|
11376
|
+
id: Schema89.String,
|
|
11377
|
+
projectId: Schema89.String,
|
|
11378
|
+
projectName: Schema89.String,
|
|
11379
|
+
code: Schema89.String,
|
|
11380
|
+
referrer: Schema89.NullOr(ReferralUserRef),
|
|
11381
|
+
referredUser: Schema89.NullOr(ReferralUserRef),
|
|
11291
11382
|
status: ReferralStatus,
|
|
11292
11383
|
rewardType: ReferralRewardType,
|
|
11293
|
-
createdAt:
|
|
11294
|
-
completedAt:
|
|
11295
|
-
});
|
|
11296
|
-
ReferralDetail =
|
|
11297
|
-
id:
|
|
11298
|
-
projectId:
|
|
11299
|
-
projectName:
|
|
11300
|
-
code:
|
|
11301
|
-
referrer:
|
|
11302
|
-
referredUser:
|
|
11384
|
+
createdAt: Schema89.String,
|
|
11385
|
+
completedAt: Schema89.NullOr(Schema89.String)
|
|
11386
|
+
});
|
|
11387
|
+
ReferralDetail = Schema89.Struct({
|
|
11388
|
+
id: Schema89.String,
|
|
11389
|
+
projectId: Schema89.String,
|
|
11390
|
+
projectName: Schema89.String,
|
|
11391
|
+
code: Schema89.String,
|
|
11392
|
+
referrer: Schema89.NullOr(ReferralUserRef),
|
|
11393
|
+
referredUser: Schema89.NullOr(ReferralUserRef),
|
|
11303
11394
|
status: ReferralStatus,
|
|
11304
11395
|
rewardType: ReferralRewardType,
|
|
11305
|
-
createdAt:
|
|
11306
|
-
completedAt:
|
|
11307
|
-
metadata:
|
|
11308
|
-
});
|
|
11309
|
-
ListReferralsQuery =
|
|
11310
|
-
projectId:
|
|
11311
|
-
environmentId:
|
|
11312
|
-
limit:
|
|
11313
|
-
offset:
|
|
11314
|
-
});
|
|
11315
|
-
GetReferralQuery =
|
|
11316
|
-
projectId:
|
|
11317
|
-
});
|
|
11318
|
-
CreateReferralInput =
|
|
11319
|
-
projectId:
|
|
11320
|
-
referrerId:
|
|
11321
|
-
code:
|
|
11322
|
-
rewardType:
|
|
11323
|
-
});
|
|
11324
|
-
GetReferralStatsQuery =
|
|
11325
|
-
projectId:
|
|
11326
|
-
environmentId:
|
|
11327
|
-
days:
|
|
11328
|
-
});
|
|
11329
|
-
ExpireReferralInput =
|
|
11330
|
-
projectId:
|
|
11331
|
-
});
|
|
11332
|
-
ListReferralsResult =
|
|
11333
|
-
CreateReferralResult =
|
|
11334
|
-
id:
|
|
11335
|
-
code:
|
|
11336
|
-
});
|
|
11337
|
-
ExpireReferralResult =
|
|
11338
|
-
success:
|
|
11339
|
-
});
|
|
11340
|
-
DailyTrendEntry =
|
|
11341
|
-
date:
|
|
11342
|
-
created:
|
|
11343
|
-
completed:
|
|
11344
|
-
});
|
|
11345
|
-
ByRewardTypeEntry =
|
|
11396
|
+
createdAt: Schema89.String,
|
|
11397
|
+
completedAt: Schema89.NullOr(Schema89.String),
|
|
11398
|
+
metadata: Schema89.NullOr(Schema89.Record({ key: Schema89.String, value: Schema89.Unknown }))
|
|
11399
|
+
});
|
|
11400
|
+
ListReferralsQuery = Schema89.Struct({
|
|
11401
|
+
projectId: Schema89.optional(Schema89.String),
|
|
11402
|
+
environmentId: Schema89.optional(Schema89.String),
|
|
11403
|
+
limit: Schema89.optional(Schema89.String),
|
|
11404
|
+
offset: Schema89.optional(Schema89.String)
|
|
11405
|
+
});
|
|
11406
|
+
GetReferralQuery = Schema89.Struct({
|
|
11407
|
+
projectId: Schema89.String
|
|
11408
|
+
});
|
|
11409
|
+
CreateReferralInput = Schema89.Struct({
|
|
11410
|
+
projectId: Schema89.String,
|
|
11411
|
+
referrerId: Schema89.String,
|
|
11412
|
+
code: Schema89.optional(Schema89.String),
|
|
11413
|
+
rewardType: Schema89.optional(ReferralRewardType)
|
|
11414
|
+
});
|
|
11415
|
+
GetReferralStatsQuery = Schema89.Struct({
|
|
11416
|
+
projectId: Schema89.optional(Schema89.String),
|
|
11417
|
+
environmentId: Schema89.optional(Schema89.String),
|
|
11418
|
+
days: Schema89.optional(Schema89.String)
|
|
11419
|
+
});
|
|
11420
|
+
ExpireReferralInput = Schema89.Struct({
|
|
11421
|
+
projectId: Schema89.String
|
|
11422
|
+
});
|
|
11423
|
+
ListReferralsResult = Schema89.Array(Referral);
|
|
11424
|
+
CreateReferralResult = Schema89.Struct({
|
|
11425
|
+
id: Schema89.String,
|
|
11426
|
+
code: Schema89.String
|
|
11427
|
+
});
|
|
11428
|
+
ExpireReferralResult = Schema89.Struct({
|
|
11429
|
+
success: Schema89.Boolean
|
|
11430
|
+
});
|
|
11431
|
+
DailyTrendEntry = Schema89.Struct({
|
|
11432
|
+
date: Schema89.String,
|
|
11433
|
+
created: Schema89.Number,
|
|
11434
|
+
completed: Schema89.Number
|
|
11435
|
+
});
|
|
11436
|
+
ByRewardTypeEntry = Schema89.Struct({
|
|
11346
11437
|
rewardType: ReferralRewardType,
|
|
11347
|
-
total:
|
|
11348
|
-
completed:
|
|
11349
|
-
conversionRate:
|
|
11438
|
+
total: Schema89.Number,
|
|
11439
|
+
completed: Schema89.Number,
|
|
11440
|
+
conversionRate: Schema89.Number
|
|
11350
11441
|
});
|
|
11351
|
-
ByProjectEntry =
|
|
11352
|
-
projectId:
|
|
11353
|
-
total:
|
|
11354
|
-
completed:
|
|
11355
|
-
conversionRate:
|
|
11442
|
+
ByProjectEntry = Schema89.Struct({
|
|
11443
|
+
projectId: Schema89.String,
|
|
11444
|
+
total: Schema89.Number,
|
|
11445
|
+
completed: Schema89.Number,
|
|
11446
|
+
conversionRate: Schema89.Number
|
|
11356
11447
|
});
|
|
11357
|
-
TopReferrerEntry =
|
|
11358
|
-
referrerId:
|
|
11359
|
-
totalReferrals:
|
|
11360
|
-
completedReferrals:
|
|
11448
|
+
TopReferrerEntry = Schema89.Struct({
|
|
11449
|
+
referrerId: Schema89.String,
|
|
11450
|
+
totalReferrals: Schema89.Number,
|
|
11451
|
+
completedReferrals: Schema89.Number
|
|
11361
11452
|
});
|
|
11362
|
-
GetReferralStatsResult =
|
|
11363
|
-
overall:
|
|
11364
|
-
total:
|
|
11365
|
-
completed:
|
|
11366
|
-
pending:
|
|
11367
|
-
expired:
|
|
11368
|
-
conversionRate:
|
|
11453
|
+
GetReferralStatsResult = Schema89.Struct({
|
|
11454
|
+
overall: Schema89.Struct({
|
|
11455
|
+
total: Schema89.Number,
|
|
11456
|
+
completed: Schema89.Number,
|
|
11457
|
+
pending: Schema89.Number,
|
|
11458
|
+
expired: Schema89.Number,
|
|
11459
|
+
conversionRate: Schema89.Number
|
|
11369
11460
|
}),
|
|
11370
|
-
period:
|
|
11371
|
-
days:
|
|
11372
|
-
since:
|
|
11373
|
-
created:
|
|
11374
|
-
completed:
|
|
11375
|
-
conversionRate:
|
|
11461
|
+
period: Schema89.Struct({
|
|
11462
|
+
days: Schema89.Number,
|
|
11463
|
+
since: Schema89.String,
|
|
11464
|
+
created: Schema89.Number,
|
|
11465
|
+
completed: Schema89.Number,
|
|
11466
|
+
conversionRate: Schema89.Number
|
|
11376
11467
|
}),
|
|
11377
|
-
byRewardType:
|
|
11378
|
-
byProject:
|
|
11379
|
-
dailyTrend:
|
|
11380
|
-
topReferrers:
|
|
11468
|
+
byRewardType: Schema89.Array(ByRewardTypeEntry),
|
|
11469
|
+
byProject: Schema89.Array(ByProjectEntry),
|
|
11470
|
+
dailyTrend: Schema89.Array(DailyTrendEntry),
|
|
11471
|
+
topReferrers: Schema89.Array(TopReferrerEntry)
|
|
11381
11472
|
});
|
|
11382
11473
|
}
|
|
11383
11474
|
});
|
|
11384
11475
|
|
|
11385
11476
|
// ../contract/dist/schemas/refresh.js
|
|
11386
|
-
import { Schema as
|
|
11477
|
+
import { Schema as Schema90 } from "effect";
|
|
11387
11478
|
var RefreshTokenInput, RefreshTokenResult, LogoutInput, LogoutResult;
|
|
11388
11479
|
var init_refresh = __esm({
|
|
11389
11480
|
"../contract/dist/schemas/refresh.js"() {
|
|
11390
11481
|
"use strict";
|
|
11391
|
-
RefreshTokenInput =
|
|
11392
|
-
RefreshTokenResult =
|
|
11393
|
-
access_token:
|
|
11394
|
-
refresh_token:
|
|
11395
|
-
token_type:
|
|
11396
|
-
expires_in:
|
|
11397
|
-
refresh_expires_at:
|
|
11482
|
+
RefreshTokenInput = Schema90.Struct({ refresh_token: Schema90.String });
|
|
11483
|
+
RefreshTokenResult = Schema90.Struct({
|
|
11484
|
+
access_token: Schema90.String,
|
|
11485
|
+
refresh_token: Schema90.String,
|
|
11486
|
+
token_type: Schema90.Literal("Bearer"),
|
|
11487
|
+
expires_in: Schema90.Number,
|
|
11488
|
+
refresh_expires_at: Schema90.String
|
|
11398
11489
|
});
|
|
11399
|
-
LogoutInput =
|
|
11400
|
-
LogoutResult =
|
|
11490
|
+
LogoutInput = Schema90.Struct({ refresh_token: Schema90.String });
|
|
11491
|
+
LogoutResult = Schema90.Struct({ revoked: Schema90.Boolean });
|
|
11401
11492
|
}
|
|
11402
11493
|
});
|
|
11403
11494
|
|
|
11404
11495
|
// ../contract/dist/schemas/region.js
|
|
11405
|
-
import { Schema as
|
|
11496
|
+
import { Schema as Schema91 } from "effect";
|
|
11406
11497
|
var RegionStatus, Region, ListRegionsResult;
|
|
11407
11498
|
var init_region = __esm({
|
|
11408
11499
|
"../contract/dist/schemas/region.js"() {
|
|
11409
11500
|
"use strict";
|
|
11410
|
-
RegionStatus =
|
|
11411
|
-
Region =
|
|
11501
|
+
RegionStatus = Schema91.Literal("coming-soon", "active", "decommissioned");
|
|
11502
|
+
Region = Schema91.Struct({
|
|
11412
11503
|
/** Internal TypeID (rarely used by clients; slug is the canonical handle). */
|
|
11413
|
-
id:
|
|
11504
|
+
id: Schema91.String,
|
|
11414
11505
|
/** DNS-safe slug — e.g. `eu-north-1`. Globally unique, immutable. */
|
|
11415
|
-
slug:
|
|
11506
|
+
slug: Schema91.String,
|
|
11416
11507
|
/** Human-readable display name — e.g. `Europe (Hetzner Finland)`. */
|
|
11417
|
-
name:
|
|
11508
|
+
name: Schema91.String,
|
|
11418
11509
|
/**
|
|
11419
11510
|
* K8s API server endpoint for the region's cluster. NULL while
|
|
11420
11511
|
* `status='coming-soon'` — the region exists as a catalog placeholder.
|
|
11421
11512
|
* Always redacted to non-operators (the Management API may return
|
|
11422
11513
|
* `null` even for GA regions).
|
|
11423
11514
|
*/
|
|
11424
|
-
clusterEndpoint:
|
|
11515
|
+
clusterEndpoint: Schema91.NullOr(Schema91.String),
|
|
11425
11516
|
status: RegionStatus,
|
|
11426
11517
|
/** Data-center latitude for "nearest region" latency estimation. */
|
|
11427
|
-
locationLat:
|
|
11518
|
+
locationLat: Schema91.NullOr(Schema91.String),
|
|
11428
11519
|
/** Data-center longitude for "nearest region" latency estimation. */
|
|
11429
|
-
locationLng:
|
|
11520
|
+
locationLng: Schema91.NullOr(Schema91.String),
|
|
11430
11521
|
/** IPv4 CIDR range of the region's Gateway LB pool. Nullable. */
|
|
11431
|
-
gatewayIpRange:
|
|
11432
|
-
createdAt:
|
|
11522
|
+
gatewayIpRange: Schema91.NullOr(Schema91.String),
|
|
11523
|
+
createdAt: Schema91.String
|
|
11433
11524
|
});
|
|
11434
|
-
ListRegionsResult =
|
|
11435
|
-
regions:
|
|
11525
|
+
ListRegionsResult = Schema91.Struct({
|
|
11526
|
+
regions: Schema91.Array(Region)
|
|
11436
11527
|
});
|
|
11437
11528
|
}
|
|
11438
11529
|
});
|
|
11439
11530
|
|
|
11440
11531
|
// ../contract/dist/schemas/runners.js
|
|
11441
|
-
import { Schema as
|
|
11532
|
+
import { Schema as Schema92 } from "effect";
|
|
11442
11533
|
var RunnerPlatform, RunnerArch, Runner, RunnerJob, RunnerIdParams, CreateRunnerInput, ListRunnersResult, CreateRunnerResult, DeleteRunnerResult, ListRunnerJobsResult;
|
|
11443
11534
|
var init_runners = __esm({
|
|
11444
11535
|
"../contract/dist/schemas/runners.js"() {
|
|
11445
11536
|
"use strict";
|
|
11446
|
-
RunnerPlatform =
|
|
11447
|
-
RunnerArch =
|
|
11448
|
-
Runner =
|
|
11449
|
-
id:
|
|
11450
|
-
orgId:
|
|
11451
|
-
name:
|
|
11452
|
-
platform:
|
|
11453
|
-
arch:
|
|
11454
|
-
version:
|
|
11455
|
-
status:
|
|
11456
|
-
lastSeenAt:
|
|
11457
|
-
createdAt:
|
|
11537
|
+
RunnerPlatform = Schema92.Literal("linux", "macos", "windows");
|
|
11538
|
+
RunnerArch = Schema92.Literal("x64", "arm64");
|
|
11539
|
+
Runner = Schema92.Struct({
|
|
11540
|
+
id: Schema92.String,
|
|
11541
|
+
orgId: Schema92.String,
|
|
11542
|
+
name: Schema92.String,
|
|
11543
|
+
platform: Schema92.String,
|
|
11544
|
+
arch: Schema92.String,
|
|
11545
|
+
version: Schema92.NullOr(Schema92.String),
|
|
11546
|
+
status: Schema92.String,
|
|
11547
|
+
lastSeenAt: Schema92.NullOr(Schema92.String),
|
|
11548
|
+
createdAt: Schema92.String
|
|
11458
11549
|
});
|
|
11459
|
-
RunnerJob =
|
|
11460
|
-
id:
|
|
11461
|
-
runnerId:
|
|
11462
|
-
envId:
|
|
11463
|
-
orgId:
|
|
11464
|
-
status:
|
|
11465
|
-
platform:
|
|
11466
|
-
gitRepo:
|
|
11467
|
-
gitBranch:
|
|
11468
|
-
gitCommit:
|
|
11469
|
-
buildCommand:
|
|
11470
|
-
exitCode:
|
|
11471
|
-
startedAt:
|
|
11472
|
-
finishedAt:
|
|
11473
|
-
createdAt:
|
|
11550
|
+
RunnerJob = Schema92.Struct({
|
|
11551
|
+
id: Schema92.String,
|
|
11552
|
+
runnerId: Schema92.NullOr(Schema92.String),
|
|
11553
|
+
envId: Schema92.String,
|
|
11554
|
+
orgId: Schema92.String,
|
|
11555
|
+
status: Schema92.String,
|
|
11556
|
+
platform: Schema92.NullOr(Schema92.String),
|
|
11557
|
+
gitRepo: Schema92.String,
|
|
11558
|
+
gitBranch: Schema92.String,
|
|
11559
|
+
gitCommit: Schema92.NullOr(Schema92.String),
|
|
11560
|
+
buildCommand: Schema92.NullOr(Schema92.String),
|
|
11561
|
+
exitCode: Schema92.NullOr(Schema92.String),
|
|
11562
|
+
startedAt: Schema92.NullOr(Schema92.String),
|
|
11563
|
+
finishedAt: Schema92.NullOr(Schema92.String),
|
|
11564
|
+
createdAt: Schema92.String
|
|
11474
11565
|
});
|
|
11475
|
-
RunnerIdParams =
|
|
11476
|
-
CreateRunnerInput =
|
|
11477
|
-
name:
|
|
11566
|
+
RunnerIdParams = Schema92.Struct({ runnerId: Schema92.String });
|
|
11567
|
+
CreateRunnerInput = Schema92.Struct({
|
|
11568
|
+
name: Schema92.String,
|
|
11478
11569
|
platform: RunnerPlatform,
|
|
11479
11570
|
arch: RunnerArch
|
|
11480
11571
|
});
|
|
11481
|
-
ListRunnersResult =
|
|
11482
|
-
CreateRunnerResult =
|
|
11483
|
-
runnerId:
|
|
11484
|
-
registrationToken:
|
|
11572
|
+
ListRunnersResult = Schema92.Struct({ runners: Schema92.Array(Runner) });
|
|
11573
|
+
CreateRunnerResult = Schema92.Struct({
|
|
11574
|
+
runnerId: Schema92.String,
|
|
11575
|
+
registrationToken: Schema92.String
|
|
11485
11576
|
});
|
|
11486
|
-
DeleteRunnerResult =
|
|
11487
|
-
ListRunnerJobsResult =
|
|
11577
|
+
DeleteRunnerResult = Schema92.Struct({ success: Schema92.Boolean });
|
|
11578
|
+
ListRunnerJobsResult = Schema92.Struct({ jobs: Schema92.Array(RunnerJob) });
|
|
11488
11579
|
}
|
|
11489
11580
|
});
|
|
11490
11581
|
|
|
11491
11582
|
// ../contract/dist/schemas/saml.js
|
|
11492
|
-
import { Schema as
|
|
11583
|
+
import { Schema as Schema93 } from "effect";
|
|
11493
11584
|
var SAMLProviderType, SAMLNameIdFormat, SAMLSignatureAlgorithm, SAMLProviderStatus, SAMLAttributeMapping, SAMLProvider, SAMLAuthLog, SAMLIdPTemplate, SAMLNameIdFormatOption, SAMLSignatureAlgorithmOption, GetSAMLProviderQuery, GetSAMLMetadataQuery, GetSAMLLogsQuery, CreateSAMLProviderInput, UpdateSAMLProviderInput, SetSAMLProviderStatusInput, DeleteSAMLProviderInput, TestSAMLConfigInput, GetSAMLProviderResult, CreateSAMLProviderResult, UpdateSAMLProviderResult, SetSAMLProviderStatusResult, DeleteSAMLProviderResult, GetSAMLMetadataResult, GetSAMLLogsResult, TestSAMLConfigResult, ListSAMLIdPTemplatesResult, ListSAMLNameIdFormatsResult, ListSAMLSignatureAlgorithmsResult;
|
|
11494
11585
|
var init_saml = __esm({
|
|
11495
11586
|
"../contract/dist/schemas/saml.js"() {
|
|
11496
11587
|
"use strict";
|
|
11497
|
-
SAMLProviderType =
|
|
11498
|
-
SAMLNameIdFormat =
|
|
11499
|
-
SAMLSignatureAlgorithm =
|
|
11500
|
-
SAMLProviderStatus =
|
|
11501
|
-
SAMLAttributeMapping =
|
|
11502
|
-
email:
|
|
11503
|
-
firstName:
|
|
11504
|
-
lastName:
|
|
11505
|
-
displayName:
|
|
11506
|
-
groups:
|
|
11507
|
-
});
|
|
11508
|
-
SAMLProvider =
|
|
11509
|
-
id:
|
|
11510
|
-
name:
|
|
11588
|
+
SAMLProviderType = Schema93.Literal("okta", "azure_ad", "google_workspace", "onelogin", "ping_identity", "jumpcloud", "custom");
|
|
11589
|
+
SAMLNameIdFormat = Schema93.Literal("email", "persistent", "transient", "unspecified");
|
|
11590
|
+
SAMLSignatureAlgorithm = Schema93.Literal("rsa-sha256", "rsa-sha384", "rsa-sha512");
|
|
11591
|
+
SAMLProviderStatus = Schema93.Literal("pending", "active", "disabled", "error");
|
|
11592
|
+
SAMLAttributeMapping = Schema93.Struct({
|
|
11593
|
+
email: Schema93.optional(Schema93.String),
|
|
11594
|
+
firstName: Schema93.optional(Schema93.String),
|
|
11595
|
+
lastName: Schema93.optional(Schema93.String),
|
|
11596
|
+
displayName: Schema93.optional(Schema93.String),
|
|
11597
|
+
groups: Schema93.optional(Schema93.String)
|
|
11598
|
+
});
|
|
11599
|
+
SAMLProvider = Schema93.Struct({
|
|
11600
|
+
id: Schema93.String,
|
|
11601
|
+
name: Schema93.String,
|
|
11511
11602
|
type: SAMLProviderType,
|
|
11512
11603
|
status: SAMLProviderStatus,
|
|
11513
|
-
entityId:
|
|
11514
|
-
ssoUrl:
|
|
11515
|
-
sloUrl:
|
|
11604
|
+
entityId: Schema93.String,
|
|
11605
|
+
ssoUrl: Schema93.String,
|
|
11606
|
+
sloUrl: Schema93.NullOr(Schema93.String),
|
|
11516
11607
|
nameIdFormat: SAMLNameIdFormat,
|
|
11517
11608
|
signatureAlgorithm: SAMLSignatureAlgorithm,
|
|
11518
|
-
allowedDomains:
|
|
11519
|
-
enforceSSO:
|
|
11520
|
-
attributeMapping:
|
|
11521
|
-
spEntityId:
|
|
11522
|
-
spAcsUrl:
|
|
11523
|
-
certificateExpiresAt:
|
|
11524
|
-
lastLoginAt:
|
|
11525
|
-
loginCount:
|
|
11526
|
-
lastError:
|
|
11527
|
-
lastErrorAt:
|
|
11528
|
-
createdAt:
|
|
11529
|
-
updatedAt:
|
|
11530
|
-
});
|
|
11531
|
-
SAMLAuthLog = Schema92.Struct({
|
|
11532
|
-
id: Schema92.String,
|
|
11533
|
-
success: Schema92.Boolean,
|
|
11534
|
-
errorCode: Schema92.NullOr(Schema92.String),
|
|
11535
|
-
errorMessage: Schema92.NullOr(Schema92.String),
|
|
11536
|
-
nameId: Schema92.NullOr(Schema92.String),
|
|
11537
|
-
ipAddress: Schema92.NullOr(Schema92.String),
|
|
11538
|
-
createdAt: Schema92.String
|
|
11609
|
+
allowedDomains: Schema93.NullOr(Schema93.Array(Schema93.String)),
|
|
11610
|
+
enforceSSO: Schema93.Boolean,
|
|
11611
|
+
attributeMapping: Schema93.NullOr(SAMLAttributeMapping),
|
|
11612
|
+
spEntityId: Schema93.NullOr(Schema93.String),
|
|
11613
|
+
spAcsUrl: Schema93.NullOr(Schema93.String),
|
|
11614
|
+
certificateExpiresAt: Schema93.NullOr(Schema93.String),
|
|
11615
|
+
lastLoginAt: Schema93.NullOr(Schema93.String),
|
|
11616
|
+
loginCount: Schema93.Number,
|
|
11617
|
+
lastError: Schema93.NullOr(Schema93.String),
|
|
11618
|
+
lastErrorAt: Schema93.NullOr(Schema93.String),
|
|
11619
|
+
createdAt: Schema93.String,
|
|
11620
|
+
updatedAt: Schema93.NullOr(Schema93.String)
|
|
11539
11621
|
});
|
|
11540
|
-
|
|
11622
|
+
SAMLAuthLog = Schema93.Struct({
|
|
11623
|
+
id: Schema93.String,
|
|
11624
|
+
success: Schema93.Boolean,
|
|
11625
|
+
errorCode: Schema93.NullOr(Schema93.String),
|
|
11626
|
+
errorMessage: Schema93.NullOr(Schema93.String),
|
|
11627
|
+
nameId: Schema93.NullOr(Schema93.String),
|
|
11628
|
+
ipAddress: Schema93.NullOr(Schema93.String),
|
|
11629
|
+
createdAt: Schema93.String
|
|
11630
|
+
});
|
|
11631
|
+
SAMLIdPTemplate = Schema93.Struct({
|
|
11541
11632
|
type: SAMLProviderType,
|
|
11542
|
-
name:
|
|
11543
|
-
instructions:
|
|
11544
|
-
requiredFields:
|
|
11545
|
-
});
|
|
11546
|
-
SAMLNameIdFormatOption =
|
|
11547
|
-
key:
|
|
11548
|
-
value:
|
|
11549
|
-
description:
|
|
11550
|
-
});
|
|
11551
|
-
SAMLSignatureAlgorithmOption =
|
|
11552
|
-
key:
|
|
11553
|
-
value:
|
|
11554
|
-
recommended:
|
|
11555
|
-
});
|
|
11556
|
-
GetSAMLProviderQuery =
|
|
11557
|
-
organizationId:
|
|
11558
|
-
});
|
|
11559
|
-
GetSAMLMetadataQuery =
|
|
11560
|
-
organizationId:
|
|
11561
|
-
});
|
|
11562
|
-
GetSAMLLogsQuery =
|
|
11563
|
-
providerId:
|
|
11564
|
-
limit:
|
|
11565
|
-
});
|
|
11566
|
-
CreateSAMLProviderInput =
|
|
11567
|
-
organizationId:
|
|
11568
|
-
name:
|
|
11569
|
-
type:
|
|
11570
|
-
entityId:
|
|
11571
|
-
ssoUrl:
|
|
11572
|
-
sloUrl:
|
|
11573
|
-
certificate:
|
|
11574
|
-
nameIdFormat:
|
|
11575
|
-
signatureAlgorithm:
|
|
11576
|
-
allowedDomains:
|
|
11577
|
-
enforceSSO:
|
|
11578
|
-
attributeMapping:
|
|
11579
|
-
});
|
|
11580
|
-
UpdateSAMLProviderInput =
|
|
11581
|
-
providerId:
|
|
11582
|
-
name:
|
|
11583
|
-
entityId:
|
|
11584
|
-
ssoUrl:
|
|
11585
|
-
sloUrl:
|
|
11586
|
-
certificate:
|
|
11587
|
-
nameIdFormat:
|
|
11588
|
-
signatureAlgorithm:
|
|
11589
|
-
allowedDomains:
|
|
11590
|
-
enforceSSO:
|
|
11591
|
-
attributeMapping:
|
|
11592
|
-
});
|
|
11593
|
-
SetSAMLProviderStatusInput =
|
|
11594
|
-
providerId:
|
|
11595
|
-
enabled:
|
|
11596
|
-
});
|
|
11597
|
-
DeleteSAMLProviderInput =
|
|
11598
|
-
providerId:
|
|
11599
|
-
});
|
|
11600
|
-
TestSAMLConfigInput =
|
|
11601
|
-
entityId:
|
|
11602
|
-
ssoUrl:
|
|
11603
|
-
certificate:
|
|
11604
|
-
});
|
|
11605
|
-
GetSAMLProviderResult =
|
|
11606
|
-
CreateSAMLProviderResult =
|
|
11607
|
-
id:
|
|
11608
|
-
spEntityId:
|
|
11609
|
-
spAcsUrl:
|
|
11633
|
+
name: Schema93.String,
|
|
11634
|
+
instructions: Schema93.String,
|
|
11635
|
+
requiredFields: Schema93.Array(Schema93.String)
|
|
11636
|
+
});
|
|
11637
|
+
SAMLNameIdFormatOption = Schema93.Struct({
|
|
11638
|
+
key: Schema93.String,
|
|
11639
|
+
value: Schema93.String,
|
|
11640
|
+
description: Schema93.String
|
|
11641
|
+
});
|
|
11642
|
+
SAMLSignatureAlgorithmOption = Schema93.Struct({
|
|
11643
|
+
key: Schema93.String,
|
|
11644
|
+
value: Schema93.String,
|
|
11645
|
+
recommended: Schema93.Boolean
|
|
11646
|
+
});
|
|
11647
|
+
GetSAMLProviderQuery = Schema93.Struct({
|
|
11648
|
+
organizationId: Schema93.String
|
|
11649
|
+
});
|
|
11650
|
+
GetSAMLMetadataQuery = Schema93.Struct({
|
|
11651
|
+
organizationId: Schema93.String
|
|
11652
|
+
});
|
|
11653
|
+
GetSAMLLogsQuery = Schema93.Struct({
|
|
11654
|
+
providerId: Schema93.String,
|
|
11655
|
+
limit: Schema93.optional(Schema93.String)
|
|
11656
|
+
});
|
|
11657
|
+
CreateSAMLProviderInput = Schema93.Struct({
|
|
11658
|
+
organizationId: Schema93.String,
|
|
11659
|
+
name: Schema93.String,
|
|
11660
|
+
type: Schema93.optional(SAMLProviderType),
|
|
11661
|
+
entityId: Schema93.String,
|
|
11662
|
+
ssoUrl: Schema93.String,
|
|
11663
|
+
sloUrl: Schema93.optional(Schema93.String),
|
|
11664
|
+
certificate: Schema93.String,
|
|
11665
|
+
nameIdFormat: Schema93.optional(SAMLNameIdFormat),
|
|
11666
|
+
signatureAlgorithm: Schema93.optional(SAMLSignatureAlgorithm),
|
|
11667
|
+
allowedDomains: Schema93.optional(Schema93.Array(Schema93.String)),
|
|
11668
|
+
enforceSSO: Schema93.optional(Schema93.Boolean),
|
|
11669
|
+
attributeMapping: Schema93.optional(SAMLAttributeMapping)
|
|
11670
|
+
});
|
|
11671
|
+
UpdateSAMLProviderInput = Schema93.Struct({
|
|
11672
|
+
providerId: Schema93.String,
|
|
11673
|
+
name: Schema93.optional(Schema93.String),
|
|
11674
|
+
entityId: Schema93.optional(Schema93.String),
|
|
11675
|
+
ssoUrl: Schema93.optional(Schema93.String),
|
|
11676
|
+
sloUrl: Schema93.optional(Schema93.NullOr(Schema93.String)),
|
|
11677
|
+
certificate: Schema93.optional(Schema93.String),
|
|
11678
|
+
nameIdFormat: Schema93.optional(SAMLNameIdFormat),
|
|
11679
|
+
signatureAlgorithm: Schema93.optional(SAMLSignatureAlgorithm),
|
|
11680
|
+
allowedDomains: Schema93.optional(Schema93.Array(Schema93.String)),
|
|
11681
|
+
enforceSSO: Schema93.optional(Schema93.Boolean),
|
|
11682
|
+
attributeMapping: Schema93.optional(SAMLAttributeMapping)
|
|
11683
|
+
});
|
|
11684
|
+
SetSAMLProviderStatusInput = Schema93.Struct({
|
|
11685
|
+
providerId: Schema93.String,
|
|
11686
|
+
enabled: Schema93.Boolean
|
|
11687
|
+
});
|
|
11688
|
+
DeleteSAMLProviderInput = Schema93.Struct({
|
|
11689
|
+
providerId: Schema93.String
|
|
11690
|
+
});
|
|
11691
|
+
TestSAMLConfigInput = Schema93.Struct({
|
|
11692
|
+
entityId: Schema93.String,
|
|
11693
|
+
ssoUrl: Schema93.String,
|
|
11694
|
+
certificate: Schema93.String
|
|
11695
|
+
});
|
|
11696
|
+
GetSAMLProviderResult = Schema93.NullOr(SAMLProvider);
|
|
11697
|
+
CreateSAMLProviderResult = Schema93.Struct({
|
|
11698
|
+
id: Schema93.String,
|
|
11699
|
+
spEntityId: Schema93.NullOr(Schema93.String),
|
|
11700
|
+
spAcsUrl: Schema93.NullOr(Schema93.String)
|
|
11610
11701
|
});
|
|
11611
|
-
UpdateSAMLProviderResult =
|
|
11612
|
-
success:
|
|
11702
|
+
UpdateSAMLProviderResult = Schema93.Struct({
|
|
11703
|
+
success: Schema93.Boolean
|
|
11613
11704
|
});
|
|
11614
|
-
SetSAMLProviderStatusResult =
|
|
11615
|
-
success:
|
|
11705
|
+
SetSAMLProviderStatusResult = Schema93.Struct({
|
|
11706
|
+
success: Schema93.Boolean
|
|
11616
11707
|
});
|
|
11617
|
-
DeleteSAMLProviderResult =
|
|
11618
|
-
success:
|
|
11708
|
+
DeleteSAMLProviderResult = Schema93.Struct({
|
|
11709
|
+
success: Schema93.Boolean
|
|
11619
11710
|
});
|
|
11620
|
-
GetSAMLMetadataResult =
|
|
11621
|
-
metadata:
|
|
11622
|
-
spEntityId:
|
|
11623
|
-
spAcsUrl:
|
|
11711
|
+
GetSAMLMetadataResult = Schema93.Struct({
|
|
11712
|
+
metadata: Schema93.String,
|
|
11713
|
+
spEntityId: Schema93.NullOr(Schema93.String),
|
|
11714
|
+
spAcsUrl: Schema93.NullOr(Schema93.String)
|
|
11624
11715
|
});
|
|
11625
|
-
GetSAMLLogsResult =
|
|
11626
|
-
logs:
|
|
11716
|
+
GetSAMLLogsResult = Schema93.Struct({
|
|
11717
|
+
logs: Schema93.Array(SAMLAuthLog)
|
|
11627
11718
|
});
|
|
11628
|
-
TestSAMLConfigResult =
|
|
11629
|
-
valid:
|
|
11630
|
-
issues:
|
|
11719
|
+
TestSAMLConfigResult = Schema93.Struct({
|
|
11720
|
+
valid: Schema93.Boolean,
|
|
11721
|
+
issues: Schema93.Array(Schema93.String)
|
|
11631
11722
|
});
|
|
11632
|
-
ListSAMLIdPTemplatesResult =
|
|
11633
|
-
templates:
|
|
11723
|
+
ListSAMLIdPTemplatesResult = Schema93.Struct({
|
|
11724
|
+
templates: Schema93.Array(SAMLIdPTemplate)
|
|
11634
11725
|
});
|
|
11635
|
-
ListSAMLNameIdFormatsResult =
|
|
11636
|
-
formats:
|
|
11726
|
+
ListSAMLNameIdFormatsResult = Schema93.Struct({
|
|
11727
|
+
formats: Schema93.Array(SAMLNameIdFormatOption)
|
|
11637
11728
|
});
|
|
11638
|
-
ListSAMLSignatureAlgorithmsResult =
|
|
11639
|
-
algorithms:
|
|
11729
|
+
ListSAMLSignatureAlgorithmsResult = Schema93.Struct({
|
|
11730
|
+
algorithms: Schema93.Array(SAMLSignatureAlgorithmOption)
|
|
11640
11731
|
});
|
|
11641
11732
|
}
|
|
11642
11733
|
});
|
|
@@ -11751,145 +11842,145 @@ var init_saml2 = __esm({
|
|
|
11751
11842
|
});
|
|
11752
11843
|
|
|
11753
11844
|
// ../contract/dist/schemas/search.js
|
|
11754
|
-
import { Schema as
|
|
11845
|
+
import { Schema as Schema94 } from "effect";
|
|
11755
11846
|
var SearchProjectIdParams, SearchAnalyticsQuery, SearchListDocumentsQuery, SearchStatsQuery, SearchTopQuery, SearchAnalyticsResult, SearchNamespaceStats, SearchStatsResult, SearchDocumentItem, SearchListDocumentsResult;
|
|
11756
11847
|
var init_search = __esm({
|
|
11757
11848
|
"../contract/dist/schemas/search.js"() {
|
|
11758
11849
|
"use strict";
|
|
11759
|
-
SearchProjectIdParams =
|
|
11760
|
-
SearchAnalyticsQuery =
|
|
11761
|
-
namespace:
|
|
11762
|
-
dateFrom:
|
|
11763
|
-
dateTo:
|
|
11764
|
-
});
|
|
11765
|
-
SearchListDocumentsQuery =
|
|
11766
|
-
namespace:
|
|
11767
|
-
limit:
|
|
11768
|
-
offset:
|
|
11769
|
-
});
|
|
11770
|
-
SearchStatsQuery =
|
|
11771
|
-
SearchTopQuery =
|
|
11772
|
-
SearchAnalyticsResult =
|
|
11773
|
-
totalQueries:
|
|
11774
|
-
avgLatencyMs:
|
|
11775
|
-
clickThroughRate:
|
|
11776
|
-
topQueries:
|
|
11777
|
-
});
|
|
11778
|
-
SearchNamespaceStats =
|
|
11779
|
-
namespace:
|
|
11780
|
-
count:
|
|
11781
|
-
});
|
|
11782
|
-
SearchStatsResult =
|
|
11783
|
-
totalDocuments:
|
|
11784
|
-
documentsWithEmbedding:
|
|
11785
|
-
byNamespace:
|
|
11786
|
-
});
|
|
11787
|
-
SearchDocumentItem =
|
|
11788
|
-
id:
|
|
11789
|
-
namespace:
|
|
11790
|
-
externalId:
|
|
11791
|
-
title:
|
|
11792
|
-
contentPreview:
|
|
11793
|
-
url:
|
|
11794
|
-
category:
|
|
11795
|
-
type:
|
|
11796
|
-
tags:
|
|
11797
|
-
hasEmbedding:
|
|
11798
|
-
impressions:
|
|
11799
|
-
clicks:
|
|
11800
|
-
createdAt:
|
|
11801
|
-
updatedAt:
|
|
11850
|
+
SearchProjectIdParams = Schema94.Struct({ projectId: Schema94.String });
|
|
11851
|
+
SearchAnalyticsQuery = Schema94.Struct({
|
|
11852
|
+
namespace: Schema94.optional(Schema94.String),
|
|
11853
|
+
dateFrom: Schema94.optional(Schema94.String),
|
|
11854
|
+
dateTo: Schema94.optional(Schema94.String)
|
|
11855
|
+
});
|
|
11856
|
+
SearchListDocumentsQuery = Schema94.Struct({
|
|
11857
|
+
namespace: Schema94.optional(Schema94.String),
|
|
11858
|
+
limit: Schema94.optional(Schema94.String),
|
|
11859
|
+
offset: Schema94.optional(Schema94.String)
|
|
11860
|
+
});
|
|
11861
|
+
SearchStatsQuery = Schema94.Struct({ namespace: Schema94.optional(Schema94.String) });
|
|
11862
|
+
SearchTopQuery = Schema94.Struct({ query: Schema94.String, count: Schema94.Number });
|
|
11863
|
+
SearchAnalyticsResult = Schema94.Struct({
|
|
11864
|
+
totalQueries: Schema94.Number,
|
|
11865
|
+
avgLatencyMs: Schema94.Number,
|
|
11866
|
+
clickThroughRate: Schema94.Number,
|
|
11867
|
+
topQueries: Schema94.Array(SearchTopQuery)
|
|
11868
|
+
});
|
|
11869
|
+
SearchNamespaceStats = Schema94.Struct({
|
|
11870
|
+
namespace: Schema94.String,
|
|
11871
|
+
count: Schema94.Number
|
|
11872
|
+
});
|
|
11873
|
+
SearchStatsResult = Schema94.Struct({
|
|
11874
|
+
totalDocuments: Schema94.Number,
|
|
11875
|
+
documentsWithEmbedding: Schema94.Number,
|
|
11876
|
+
byNamespace: Schema94.Array(SearchNamespaceStats)
|
|
11877
|
+
});
|
|
11878
|
+
SearchDocumentItem = Schema94.Struct({
|
|
11879
|
+
id: Schema94.String,
|
|
11880
|
+
namespace: Schema94.String,
|
|
11881
|
+
externalId: Schema94.NullOr(Schema94.String),
|
|
11882
|
+
title: Schema94.NullOr(Schema94.String),
|
|
11883
|
+
contentPreview: Schema94.String,
|
|
11884
|
+
url: Schema94.NullOr(Schema94.String),
|
|
11885
|
+
category: Schema94.NullOr(Schema94.String),
|
|
11886
|
+
type: Schema94.NullOr(Schema94.String),
|
|
11887
|
+
tags: Schema94.NullOr(Schema94.Array(Schema94.String)),
|
|
11888
|
+
hasEmbedding: Schema94.Boolean,
|
|
11889
|
+
impressions: Schema94.Number,
|
|
11890
|
+
clicks: Schema94.Number,
|
|
11891
|
+
createdAt: Schema94.String,
|
|
11892
|
+
updatedAt: Schema94.String
|
|
11802
11893
|
});
|
|
11803
|
-
SearchListDocumentsResult =
|
|
11804
|
-
documents:
|
|
11805
|
-
total:
|
|
11806
|
-
hasMore:
|
|
11894
|
+
SearchListDocumentsResult = Schema94.Struct({
|
|
11895
|
+
documents: Schema94.Array(SearchDocumentItem),
|
|
11896
|
+
total: Schema94.Number,
|
|
11897
|
+
hasMore: Schema94.Boolean
|
|
11807
11898
|
});
|
|
11808
11899
|
}
|
|
11809
11900
|
});
|
|
11810
11901
|
|
|
11811
11902
|
// ../contract/dist/schemas/secret.js
|
|
11812
|
-
import { Schema as
|
|
11903
|
+
import { Schema as Schema95 } from "effect";
|
|
11813
11904
|
var SecretKey, SecretValue, EnvironmentRef2, SecretVersion, SecretListItem, SecretDetail, CreateSecretInput, CreateSecretResult, UpdateSecretInput, UpdateSecretResult, RollbackSecretInput, RollbackSecretResult;
|
|
11814
11905
|
var init_secret = __esm({
|
|
11815
11906
|
"../contract/dist/schemas/secret.js"() {
|
|
11816
11907
|
"use strict";
|
|
11817
11908
|
init_ids();
|
|
11818
|
-
SecretKey =
|
|
11819
|
-
SecretValue =
|
|
11820
|
-
EnvironmentRef2 =
|
|
11909
|
+
SecretKey = Schema95.String.pipe(Schema95.minLength(1), Schema95.maxLength(255), Schema95.pattern(/^[A-Z0-9_]+$/));
|
|
11910
|
+
SecretValue = Schema95.String.pipe(Schema95.minLength(1), Schema95.maxLength(65536));
|
|
11911
|
+
EnvironmentRef2 = Schema95.Struct({
|
|
11821
11912
|
id: EnvironmentId,
|
|
11822
|
-
name:
|
|
11913
|
+
name: Schema95.String
|
|
11823
11914
|
});
|
|
11824
|
-
SecretVersion =
|
|
11825
|
-
version:
|
|
11826
|
-
changeNote:
|
|
11827
|
-
createdAt:
|
|
11915
|
+
SecretVersion = Schema95.Struct({
|
|
11916
|
+
version: Schema95.String,
|
|
11917
|
+
changeNote: Schema95.NullOr(Schema95.String),
|
|
11918
|
+
createdAt: Schema95.String
|
|
11828
11919
|
});
|
|
11829
|
-
SecretListItem =
|
|
11920
|
+
SecretListItem = Schema95.Struct({
|
|
11830
11921
|
id: SecretId,
|
|
11831
11922
|
key: SecretKey,
|
|
11832
|
-
description:
|
|
11833
|
-
environment:
|
|
11834
|
-
isActive:
|
|
11835
|
-
version:
|
|
11836
|
-
createdAt:
|
|
11837
|
-
updatedAt:
|
|
11838
|
-
});
|
|
11839
|
-
SecretDetail =
|
|
11923
|
+
description: Schema95.NullOr(Schema95.String),
|
|
11924
|
+
environment: Schema95.NullOr(EnvironmentRef2),
|
|
11925
|
+
isActive: Schema95.Boolean,
|
|
11926
|
+
version: Schema95.String,
|
|
11927
|
+
createdAt: Schema95.String,
|
|
11928
|
+
updatedAt: Schema95.String
|
|
11929
|
+
});
|
|
11930
|
+
SecretDetail = Schema95.Struct({
|
|
11840
11931
|
id: SecretId,
|
|
11841
11932
|
key: SecretKey,
|
|
11842
11933
|
/** Plaintext — only populated when `reveal=true` was requested. */
|
|
11843
|
-
value:
|
|
11844
|
-
maskedValue:
|
|
11845
|
-
description:
|
|
11846
|
-
environment:
|
|
11847
|
-
isActive:
|
|
11848
|
-
version:
|
|
11849
|
-
versions:
|
|
11850
|
-
createdAt:
|
|
11851
|
-
updatedAt:
|
|
11852
|
-
});
|
|
11853
|
-
CreateSecretInput =
|
|
11934
|
+
value: Schema95.NullOr(Schema95.String),
|
|
11935
|
+
maskedValue: Schema95.String,
|
|
11936
|
+
description: Schema95.NullOr(Schema95.String),
|
|
11937
|
+
environment: Schema95.NullOr(EnvironmentRef2),
|
|
11938
|
+
isActive: Schema95.Boolean,
|
|
11939
|
+
version: Schema95.String,
|
|
11940
|
+
versions: Schema95.Array(SecretVersion),
|
|
11941
|
+
createdAt: Schema95.String,
|
|
11942
|
+
updatedAt: Schema95.String
|
|
11943
|
+
});
|
|
11944
|
+
CreateSecretInput = Schema95.Struct({
|
|
11854
11945
|
projectId: ProjectId,
|
|
11855
11946
|
key: SecretKey,
|
|
11856
11947
|
value: SecretValue,
|
|
11857
|
-
description:
|
|
11858
|
-
environmentId:
|
|
11948
|
+
description: Schema95.optional(Schema95.String),
|
|
11949
|
+
environmentId: Schema95.optional(EnvironmentId)
|
|
11859
11950
|
});
|
|
11860
|
-
CreateSecretResult =
|
|
11951
|
+
CreateSecretResult = Schema95.Struct({
|
|
11861
11952
|
id: SecretId,
|
|
11862
11953
|
key: SecretKey,
|
|
11863
|
-
version:
|
|
11954
|
+
version: Schema95.String
|
|
11864
11955
|
});
|
|
11865
|
-
UpdateSecretInput =
|
|
11956
|
+
UpdateSecretInput = Schema95.Struct({
|
|
11866
11957
|
id: SecretId,
|
|
11867
|
-
value:
|
|
11868
|
-
description:
|
|
11869
|
-
isActive:
|
|
11870
|
-
changeNote:
|
|
11958
|
+
value: Schema95.optional(SecretValue),
|
|
11959
|
+
description: Schema95.optional(Schema95.NullOr(Schema95.String)),
|
|
11960
|
+
isActive: Schema95.optional(Schema95.Boolean),
|
|
11961
|
+
changeNote: Schema95.optional(Schema95.String)
|
|
11871
11962
|
});
|
|
11872
|
-
UpdateSecretResult =
|
|
11963
|
+
UpdateSecretResult = Schema95.Struct({
|
|
11873
11964
|
id: SecretId,
|
|
11874
11965
|
key: SecretKey,
|
|
11875
|
-
version:
|
|
11966
|
+
version: Schema95.String
|
|
11876
11967
|
});
|
|
11877
|
-
RollbackSecretInput =
|
|
11968
|
+
RollbackSecretInput = Schema95.Struct({
|
|
11878
11969
|
id: SecretId,
|
|
11879
|
-
version:
|
|
11970
|
+
version: Schema95.String
|
|
11880
11971
|
});
|
|
11881
|
-
RollbackSecretResult =
|
|
11972
|
+
RollbackSecretResult = Schema95.Struct({
|
|
11882
11973
|
id: SecretId,
|
|
11883
11974
|
key: SecretKey,
|
|
11884
|
-
version:
|
|
11885
|
-
rolledBackFrom:
|
|
11886
|
-
rolledBackTo:
|
|
11975
|
+
version: Schema95.String,
|
|
11976
|
+
rolledBackFrom: Schema95.String,
|
|
11977
|
+
rolledBackTo: Schema95.String
|
|
11887
11978
|
});
|
|
11888
11979
|
}
|
|
11889
11980
|
});
|
|
11890
11981
|
|
|
11891
11982
|
// ../contract/dist/endpoints/secrets.js
|
|
11892
|
-
import { Schema as
|
|
11983
|
+
import { Schema as Schema96 } from "effect";
|
|
11893
11984
|
var ListQuery, DetailQuery, StatsQuery, DeleteBody, secretsEndpoints;
|
|
11894
11985
|
var init_secrets = __esm({
|
|
11895
11986
|
"../contract/dist/endpoints/secrets.js"() {
|
|
@@ -11897,23 +11988,23 @@ var init_secrets = __esm({
|
|
|
11897
11988
|
init_endpoint();
|
|
11898
11989
|
init_ids();
|
|
11899
11990
|
init_secret();
|
|
11900
|
-
ListQuery =
|
|
11991
|
+
ListQuery = Schema96.Struct({
|
|
11901
11992
|
projectId: ProjectId,
|
|
11902
|
-
environmentId:
|
|
11903
|
-
includeInactive:
|
|
11993
|
+
environmentId: Schema96.optional(EnvironmentId),
|
|
11994
|
+
includeInactive: Schema96.optional(Schema96.String)
|
|
11904
11995
|
});
|
|
11905
|
-
DetailQuery =
|
|
11996
|
+
DetailQuery = Schema96.Struct({
|
|
11906
11997
|
id: SecretId,
|
|
11907
|
-
reveal:
|
|
11998
|
+
reveal: Schema96.optional(Schema96.String)
|
|
11908
11999
|
});
|
|
11909
|
-
StatsQuery =
|
|
11910
|
-
DeleteBody =
|
|
12000
|
+
StatsQuery = Schema96.Struct({ projectId: ProjectId });
|
|
12001
|
+
DeleteBody = Schema96.Struct({ id: SecretId });
|
|
11911
12002
|
secretsEndpoints = {
|
|
11912
12003
|
list: defineEndpoint({
|
|
11913
12004
|
method: "GET",
|
|
11914
12005
|
path: "/secrets",
|
|
11915
12006
|
query: ListQuery,
|
|
11916
|
-
response:
|
|
12007
|
+
response: Schema96.Struct({ secrets: Schema96.Array(SecretListItem) }),
|
|
11917
12008
|
summary: "List secrets for a project (optionally scoped to an environment)",
|
|
11918
12009
|
tags: ["secrets"]
|
|
11919
12010
|
}),
|
|
@@ -11946,7 +12037,7 @@ var init_secrets = __esm({
|
|
|
11946
12037
|
method: "DELETE",
|
|
11947
12038
|
path: "/secrets",
|
|
11948
12039
|
body: DeleteBody,
|
|
11949
|
-
response:
|
|
12040
|
+
response: Schema96.Struct({ success: Schema96.Boolean }),
|
|
11950
12041
|
summary: "Delete a secret",
|
|
11951
12042
|
tags: ["secrets"]
|
|
11952
12043
|
}),
|
|
@@ -11962,10 +12053,10 @@ var init_secrets = __esm({
|
|
|
11962
12053
|
method: "GET",
|
|
11963
12054
|
path: "/secrets/stats",
|
|
11964
12055
|
query: StatsQuery,
|
|
11965
|
-
response:
|
|
11966
|
-
stats:
|
|
11967
|
-
environmentId:
|
|
11968
|
-
count:
|
|
12056
|
+
response: Schema96.Struct({
|
|
12057
|
+
stats: Schema96.Array(Schema96.Struct({
|
|
12058
|
+
environmentId: Schema96.NullOr(Schema96.String),
|
|
12059
|
+
count: Schema96.Number
|
|
11969
12060
|
}))
|
|
11970
12061
|
}),
|
|
11971
12062
|
summary: "Per-environment secret counts",
|
|
@@ -11976,210 +12067,210 @@ var init_secrets = __esm({
|
|
|
11976
12067
|
});
|
|
11977
12068
|
|
|
11978
12069
|
// ../contract/dist/schemas/security.js
|
|
11979
|
-
import { Schema as
|
|
12070
|
+
import { Schema as Schema97 } from "effect";
|
|
11980
12071
|
var SecuritySuccessResult, TwoFactorSetupResult, TwoFactorVerifyInput, TwoFactorVerifyResult, TwoFactorDisableResult, TwoFactorStatusResult, BackupCodesViewResult, BackupCodesRegenerateResult, EmailChangeRequestInput, EmailChangeRequestResult, EmailChangeConfirmInput, EmailChangeConfirmResult, OAuthAccount, GetOAuthProvidersResult, OAuthConnectInput, OAuthConnectResult, OAuthDisconnectInput, OAuthDisconnectResult, PasswordStatusResult, SetPasswordInput, SetPasswordResult, Passkey, PasskeyListResult, PasskeyRegisterStartResult, AuthenticatorAttestationResponse, RegistrationResponse, PasskeyRegisterVerifyInput, PasskeyRenameInput, PasskeyRenameResult, PasskeyDeleteInput, PasskeyDeleteResult, SecuritySession, GetSessionsResult, RevokeSessionInput, RevokeSessionResult, RevokeOtherSessionsResult, RenameSessionInput, RenameSessionResult, SecurityFactor, SecurityRecommendation, SecurityScoreResult, SecurityStatusQuickResult, SecurityAlertType, SecurityAlert, GetSecurityAlertsQuery, GetSecurityAlertsResult, UnreadAlertCountResult, MarkAlertReadInput, MarkAlertReadResult, MarkAllAlertsReadResult;
|
|
11981
12072
|
var init_security = __esm({
|
|
11982
12073
|
"../contract/dist/schemas/security.js"() {
|
|
11983
12074
|
"use strict";
|
|
11984
|
-
SecuritySuccessResult =
|
|
11985
|
-
success:
|
|
12075
|
+
SecuritySuccessResult = Schema97.Struct({
|
|
12076
|
+
success: Schema97.Boolean
|
|
11986
12077
|
});
|
|
11987
|
-
TwoFactorSetupResult =
|
|
11988
|
-
secret:
|
|
11989
|
-
uri:
|
|
11990
|
-
qrCode:
|
|
12078
|
+
TwoFactorSetupResult = Schema97.Struct({
|
|
12079
|
+
secret: Schema97.String,
|
|
12080
|
+
uri: Schema97.String,
|
|
12081
|
+
qrCode: Schema97.optional(Schema97.String)
|
|
11991
12082
|
});
|
|
11992
|
-
TwoFactorVerifyInput =
|
|
11993
|
-
code:
|
|
12083
|
+
TwoFactorVerifyInput = Schema97.Struct({
|
|
12084
|
+
code: Schema97.String
|
|
11994
12085
|
});
|
|
11995
|
-
TwoFactorVerifyResult =
|
|
11996
|
-
success:
|
|
11997
|
-
backupCodes:
|
|
12086
|
+
TwoFactorVerifyResult = Schema97.Struct({
|
|
12087
|
+
success: Schema97.Boolean,
|
|
12088
|
+
backupCodes: Schema97.Array(Schema97.String)
|
|
11998
12089
|
});
|
|
11999
12090
|
TwoFactorDisableResult = SecuritySuccessResult;
|
|
12000
|
-
TwoFactorStatusResult =
|
|
12001
|
-
enabled:
|
|
12002
|
-
backupCodesRemaining:
|
|
12091
|
+
TwoFactorStatusResult = Schema97.Struct({
|
|
12092
|
+
enabled: Schema97.Boolean,
|
|
12093
|
+
backupCodesRemaining: Schema97.Number
|
|
12003
12094
|
});
|
|
12004
|
-
BackupCodesViewResult =
|
|
12005
|
-
codes:
|
|
12006
|
-
remaining:
|
|
12095
|
+
BackupCodesViewResult = Schema97.Struct({
|
|
12096
|
+
codes: Schema97.Array(Schema97.String),
|
|
12097
|
+
remaining: Schema97.Number
|
|
12007
12098
|
});
|
|
12008
|
-
BackupCodesRegenerateResult =
|
|
12009
|
-
codes:
|
|
12099
|
+
BackupCodesRegenerateResult = Schema97.Struct({
|
|
12100
|
+
codes: Schema97.Array(Schema97.String)
|
|
12010
12101
|
});
|
|
12011
|
-
EmailChangeRequestInput =
|
|
12012
|
-
newEmail:
|
|
12102
|
+
EmailChangeRequestInput = Schema97.Struct({
|
|
12103
|
+
newEmail: Schema97.String
|
|
12013
12104
|
});
|
|
12014
|
-
EmailChangeRequestResult =
|
|
12015
|
-
success:
|
|
12016
|
-
message:
|
|
12017
|
-
expiresAt:
|
|
12105
|
+
EmailChangeRequestResult = Schema97.Struct({
|
|
12106
|
+
success: Schema97.Boolean,
|
|
12107
|
+
message: Schema97.String,
|
|
12108
|
+
expiresAt: Schema97.String
|
|
12018
12109
|
});
|
|
12019
|
-
EmailChangeConfirmInput =
|
|
12020
|
-
token:
|
|
12110
|
+
EmailChangeConfirmInput = Schema97.Struct({
|
|
12111
|
+
token: Schema97.String
|
|
12021
12112
|
});
|
|
12022
|
-
EmailChangeConfirmResult =
|
|
12023
|
-
success:
|
|
12024
|
-
newEmail:
|
|
12113
|
+
EmailChangeConfirmResult = Schema97.Struct({
|
|
12114
|
+
success: Schema97.Boolean,
|
|
12115
|
+
newEmail: Schema97.String
|
|
12025
12116
|
});
|
|
12026
|
-
OAuthAccount =
|
|
12027
|
-
provider:
|
|
12028
|
-
providerAccountId:
|
|
12029
|
-
email:
|
|
12030
|
-
connectedAt:
|
|
12117
|
+
OAuthAccount = Schema97.Struct({
|
|
12118
|
+
provider: Schema97.String,
|
|
12119
|
+
providerAccountId: Schema97.String,
|
|
12120
|
+
email: Schema97.NullOr(Schema97.String),
|
|
12121
|
+
connectedAt: Schema97.String
|
|
12031
12122
|
});
|
|
12032
|
-
GetOAuthProvidersResult =
|
|
12033
|
-
providers:
|
|
12123
|
+
GetOAuthProvidersResult = Schema97.Struct({
|
|
12124
|
+
providers: Schema97.Array(OAuthAccount)
|
|
12034
12125
|
});
|
|
12035
|
-
OAuthConnectInput =
|
|
12036
|
-
provider:
|
|
12126
|
+
OAuthConnectInput = Schema97.Struct({
|
|
12127
|
+
provider: Schema97.String
|
|
12037
12128
|
});
|
|
12038
|
-
OAuthConnectResult =
|
|
12039
|
-
url:
|
|
12129
|
+
OAuthConnectResult = Schema97.Struct({
|
|
12130
|
+
url: Schema97.String
|
|
12040
12131
|
});
|
|
12041
|
-
OAuthDisconnectInput =
|
|
12042
|
-
provider:
|
|
12132
|
+
OAuthDisconnectInput = Schema97.Struct({
|
|
12133
|
+
provider: Schema97.String
|
|
12043
12134
|
});
|
|
12044
12135
|
OAuthDisconnectResult = SecuritySuccessResult;
|
|
12045
|
-
PasswordStatusResult =
|
|
12046
|
-
hasPassword:
|
|
12136
|
+
PasswordStatusResult = Schema97.Struct({
|
|
12137
|
+
hasPassword: Schema97.Boolean
|
|
12047
12138
|
});
|
|
12048
|
-
SetPasswordInput =
|
|
12049
|
-
password:
|
|
12139
|
+
SetPasswordInput = Schema97.Struct({
|
|
12140
|
+
password: Schema97.String
|
|
12050
12141
|
});
|
|
12051
12142
|
SetPasswordResult = SecuritySuccessResult;
|
|
12052
|
-
Passkey =
|
|
12053
|
-
id:
|
|
12054
|
-
name:
|
|
12055
|
-
createdAt:
|
|
12056
|
-
lastUsedAt:
|
|
12057
|
-
});
|
|
12058
|
-
PasskeyListResult =
|
|
12059
|
-
passkeys:
|
|
12060
|
-
});
|
|
12061
|
-
PasskeyRegisterStartResult =
|
|
12062
|
-
challenge:
|
|
12063
|
-
rp:
|
|
12064
|
-
name:
|
|
12065
|
-
id:
|
|
12066
|
-
}),
|
|
12067
|
-
user:
|
|
12068
|
-
id:
|
|
12069
|
-
name:
|
|
12070
|
-
displayName:
|
|
12071
|
-
}),
|
|
12072
|
-
pubKeyCredParams:
|
|
12073
|
-
type:
|
|
12074
|
-
alg:
|
|
12143
|
+
Passkey = Schema97.Struct({
|
|
12144
|
+
id: Schema97.String,
|
|
12145
|
+
name: Schema97.NullOr(Schema97.String),
|
|
12146
|
+
createdAt: Schema97.String,
|
|
12147
|
+
lastUsedAt: Schema97.NullOr(Schema97.String)
|
|
12148
|
+
});
|
|
12149
|
+
PasskeyListResult = Schema97.Struct({
|
|
12150
|
+
passkeys: Schema97.Array(Passkey)
|
|
12151
|
+
});
|
|
12152
|
+
PasskeyRegisterStartResult = Schema97.Struct({
|
|
12153
|
+
challenge: Schema97.String,
|
|
12154
|
+
rp: Schema97.Struct({
|
|
12155
|
+
name: Schema97.String,
|
|
12156
|
+
id: Schema97.String
|
|
12157
|
+
}),
|
|
12158
|
+
user: Schema97.Struct({
|
|
12159
|
+
id: Schema97.String,
|
|
12160
|
+
name: Schema97.String,
|
|
12161
|
+
displayName: Schema97.String
|
|
12162
|
+
}),
|
|
12163
|
+
pubKeyCredParams: Schema97.Array(Schema97.Struct({
|
|
12164
|
+
type: Schema97.Literal("public-key"),
|
|
12165
|
+
alg: Schema97.Number
|
|
12075
12166
|
})),
|
|
12076
|
-
timeout:
|
|
12077
|
-
attestation:
|
|
12078
|
-
excludeCredentials:
|
|
12079
|
-
type:
|
|
12080
|
-
id:
|
|
12081
|
-
transports:
|
|
12167
|
+
timeout: Schema97.optional(Schema97.Number),
|
|
12168
|
+
attestation: Schema97.optional(Schema97.String),
|
|
12169
|
+
excludeCredentials: Schema97.optional(Schema97.Array(Schema97.Struct({
|
|
12170
|
+
type: Schema97.Literal("public-key"),
|
|
12171
|
+
id: Schema97.String,
|
|
12172
|
+
transports: Schema97.optional(Schema97.Array(Schema97.String))
|
|
12082
12173
|
}))),
|
|
12083
|
-
authenticatorSelection:
|
|
12084
|
-
authenticatorAttachment:
|
|
12085
|
-
requireResidentKey:
|
|
12086
|
-
residentKey:
|
|
12087
|
-
userVerification:
|
|
12174
|
+
authenticatorSelection: Schema97.optional(Schema97.Struct({
|
|
12175
|
+
authenticatorAttachment: Schema97.optional(Schema97.Literal("platform", "cross-platform")),
|
|
12176
|
+
requireResidentKey: Schema97.optional(Schema97.Boolean),
|
|
12177
|
+
residentKey: Schema97.optional(Schema97.Literal("discouraged", "preferred", "required")),
|
|
12178
|
+
userVerification: Schema97.optional(Schema97.Literal("discouraged", "preferred", "required"))
|
|
12088
12179
|
}))
|
|
12089
12180
|
});
|
|
12090
|
-
AuthenticatorAttestationResponse =
|
|
12091
|
-
key:
|
|
12092
|
-
value:
|
|
12181
|
+
AuthenticatorAttestationResponse = Schema97.Record({
|
|
12182
|
+
key: Schema97.String,
|
|
12183
|
+
value: Schema97.Unknown
|
|
12093
12184
|
});
|
|
12094
|
-
RegistrationResponse =
|
|
12095
|
-
key:
|
|
12096
|
-
value:
|
|
12185
|
+
RegistrationResponse = Schema97.Record({
|
|
12186
|
+
key: Schema97.String,
|
|
12187
|
+
value: Schema97.Unknown
|
|
12097
12188
|
});
|
|
12098
|
-
PasskeyRegisterVerifyInput =
|
|
12099
|
-
credential:
|
|
12100
|
-
deviceName:
|
|
12189
|
+
PasskeyRegisterVerifyInput = Schema97.Struct({
|
|
12190
|
+
credential: Schema97.Record({ key: Schema97.String, value: Schema97.Unknown }),
|
|
12191
|
+
deviceName: Schema97.optional(Schema97.String)
|
|
12101
12192
|
});
|
|
12102
|
-
PasskeyRenameInput =
|
|
12103
|
-
passkeyId:
|
|
12104
|
-
name:
|
|
12193
|
+
PasskeyRenameInput = Schema97.Struct({
|
|
12194
|
+
passkeyId: Schema97.String,
|
|
12195
|
+
name: Schema97.String
|
|
12105
12196
|
});
|
|
12106
12197
|
PasskeyRenameResult = SecuritySuccessResult;
|
|
12107
|
-
PasskeyDeleteInput =
|
|
12108
|
-
passkeyId:
|
|
12198
|
+
PasskeyDeleteInput = Schema97.Struct({
|
|
12199
|
+
passkeyId: Schema97.String
|
|
12109
12200
|
});
|
|
12110
12201
|
PasskeyDeleteResult = SecuritySuccessResult;
|
|
12111
|
-
SecuritySession =
|
|
12112
|
-
id:
|
|
12113
|
-
name:
|
|
12114
|
-
ipAddress:
|
|
12115
|
-
userAgent:
|
|
12116
|
-
createdAt:
|
|
12117
|
-
lastActiveAt:
|
|
12118
|
-
isCurrent:
|
|
12202
|
+
SecuritySession = Schema97.Struct({
|
|
12203
|
+
id: Schema97.String,
|
|
12204
|
+
name: Schema97.NullOr(Schema97.String),
|
|
12205
|
+
ipAddress: Schema97.NullOr(Schema97.String),
|
|
12206
|
+
userAgent: Schema97.NullOr(Schema97.String),
|
|
12207
|
+
createdAt: Schema97.String,
|
|
12208
|
+
lastActiveAt: Schema97.NullOr(Schema97.String),
|
|
12209
|
+
isCurrent: Schema97.Boolean
|
|
12119
12210
|
});
|
|
12120
|
-
GetSessionsResult =
|
|
12121
|
-
sessions:
|
|
12211
|
+
GetSessionsResult = Schema97.Struct({
|
|
12212
|
+
sessions: Schema97.Array(SecuritySession)
|
|
12122
12213
|
});
|
|
12123
|
-
RevokeSessionInput =
|
|
12124
|
-
sessionId:
|
|
12214
|
+
RevokeSessionInput = Schema97.Struct({
|
|
12215
|
+
sessionId: Schema97.String
|
|
12125
12216
|
});
|
|
12126
12217
|
RevokeSessionResult = SecuritySuccessResult;
|
|
12127
|
-
RevokeOtherSessionsResult =
|
|
12128
|
-
revokedCount:
|
|
12218
|
+
RevokeOtherSessionsResult = Schema97.Struct({
|
|
12219
|
+
revokedCount: Schema97.Number
|
|
12129
12220
|
});
|
|
12130
|
-
RenameSessionInput =
|
|
12131
|
-
sessionId:
|
|
12132
|
-
name:
|
|
12221
|
+
RenameSessionInput = Schema97.Struct({
|
|
12222
|
+
sessionId: Schema97.String,
|
|
12223
|
+
name: Schema97.String
|
|
12133
12224
|
});
|
|
12134
12225
|
RenameSessionResult = SecuritySuccessResult;
|
|
12135
|
-
SecurityFactor =
|
|
12136
|
-
name:
|
|
12137
|
-
enabled:
|
|
12138
|
-
points:
|
|
12139
|
-
maxPoints:
|
|
12140
|
-
});
|
|
12141
|
-
SecurityRecommendation =
|
|
12142
|
-
id:
|
|
12143
|
-
title:
|
|
12144
|
-
description:
|
|
12145
|
-
priority:
|
|
12146
|
-
action:
|
|
12147
|
-
});
|
|
12148
|
-
SecurityScoreResult =
|
|
12149
|
-
score:
|
|
12150
|
-
factors:
|
|
12151
|
-
recommendations:
|
|
12152
|
-
});
|
|
12153
|
-
SecurityStatusQuickResult =
|
|
12154
|
-
score:
|
|
12155
|
-
level:
|
|
12156
|
-
hasPassword:
|
|
12157
|
-
hasTwoFactor:
|
|
12158
|
-
hasPasskeys:
|
|
12159
|
-
sessionCount:
|
|
12160
|
-
});
|
|
12161
|
-
SecurityAlertType =
|
|
12162
|
-
SecurityAlert =
|
|
12163
|
-
id:
|
|
12226
|
+
SecurityFactor = Schema97.Struct({
|
|
12227
|
+
name: Schema97.String,
|
|
12228
|
+
enabled: Schema97.Boolean,
|
|
12229
|
+
points: Schema97.Number,
|
|
12230
|
+
maxPoints: Schema97.Number
|
|
12231
|
+
});
|
|
12232
|
+
SecurityRecommendation = Schema97.Struct({
|
|
12233
|
+
id: Schema97.String,
|
|
12234
|
+
title: Schema97.String,
|
|
12235
|
+
description: Schema97.String,
|
|
12236
|
+
priority: Schema97.Literal("low", "medium", "high"),
|
|
12237
|
+
action: Schema97.String
|
|
12238
|
+
});
|
|
12239
|
+
SecurityScoreResult = Schema97.Struct({
|
|
12240
|
+
score: Schema97.Number,
|
|
12241
|
+
factors: Schema97.Array(SecurityFactor),
|
|
12242
|
+
recommendations: Schema97.Array(SecurityRecommendation)
|
|
12243
|
+
});
|
|
12244
|
+
SecurityStatusQuickResult = Schema97.Struct({
|
|
12245
|
+
score: Schema97.Number,
|
|
12246
|
+
level: Schema97.Literal("low", "medium", "high", "excellent"),
|
|
12247
|
+
hasPassword: Schema97.Boolean,
|
|
12248
|
+
hasTwoFactor: Schema97.Boolean,
|
|
12249
|
+
hasPasskeys: Schema97.Boolean,
|
|
12250
|
+
sessionCount: Schema97.Number
|
|
12251
|
+
});
|
|
12252
|
+
SecurityAlertType = Schema97.Literal("password_changed", "email_changed", "two_factor_enabled", "two_factor_disabled", "new_device", "suspicious_login", "account_locked", "account_unlocked");
|
|
12253
|
+
SecurityAlert = Schema97.Struct({
|
|
12254
|
+
id: Schema97.String,
|
|
12164
12255
|
type: SecurityAlertType,
|
|
12165
|
-
title:
|
|
12166
|
-
description:
|
|
12167
|
-
metadata:
|
|
12168
|
-
read:
|
|
12169
|
-
createdAt:
|
|
12256
|
+
title: Schema97.String,
|
|
12257
|
+
description: Schema97.NullOr(Schema97.String),
|
|
12258
|
+
metadata: Schema97.NullOr(Schema97.Record({ key: Schema97.String, value: Schema97.Unknown })),
|
|
12259
|
+
read: Schema97.Boolean,
|
|
12260
|
+
createdAt: Schema97.String
|
|
12170
12261
|
});
|
|
12171
|
-
GetSecurityAlertsQuery =
|
|
12172
|
-
limit:
|
|
12173
|
-
unreadOnly:
|
|
12262
|
+
GetSecurityAlertsQuery = Schema97.Struct({
|
|
12263
|
+
limit: Schema97.optional(Schema97.String),
|
|
12264
|
+
unreadOnly: Schema97.optional(Schema97.String)
|
|
12174
12265
|
});
|
|
12175
|
-
GetSecurityAlertsResult =
|
|
12176
|
-
alerts:
|
|
12266
|
+
GetSecurityAlertsResult = Schema97.Struct({
|
|
12267
|
+
alerts: Schema97.Array(SecurityAlert)
|
|
12177
12268
|
});
|
|
12178
|
-
UnreadAlertCountResult =
|
|
12179
|
-
count:
|
|
12269
|
+
UnreadAlertCountResult = Schema97.Struct({
|
|
12270
|
+
count: Schema97.Number
|
|
12180
12271
|
});
|
|
12181
|
-
MarkAlertReadInput =
|
|
12182
|
-
alertId:
|
|
12272
|
+
MarkAlertReadInput = Schema97.Struct({
|
|
12273
|
+
alertId: Schema97.String
|
|
12183
12274
|
});
|
|
12184
12275
|
MarkAlertReadResult = SecuritySuccessResult;
|
|
12185
12276
|
MarkAllAlertsReadResult = SecuritySuccessResult;
|
|
@@ -12460,364 +12551,383 @@ var init_security2 = __esm({
|
|
|
12460
12551
|
});
|
|
12461
12552
|
|
|
12462
12553
|
// ../contract/dist/schemas/service-tokens.js
|
|
12463
|
-
import { Schema as
|
|
12554
|
+
import { Schema as Schema98 } from "effect";
|
|
12464
12555
|
var ResourceScope, ServiceTokenView, ServiceTokenRequestView, OrgIdParams, OrgTokenIdParams, OrgRequestIdParams, ListServiceTokensQuery, CreateServiceTokenInput, SubmitServiceTokenRequestInput, DenyServiceTokenRequestInput, CreateServiceTokenResult, ListServiceTokensResult, GetServiceTokenResult, RevokeServiceTokenResult, RotateServiceTokenResult, ListServiceTokenRequestsResult, ServiceTokenRequestResult, MintServiceTokenRequestResult;
|
|
12465
12556
|
var init_service_tokens = __esm({
|
|
12466
12557
|
"../contract/dist/schemas/service-tokens.js"() {
|
|
12467
12558
|
"use strict";
|
|
12468
|
-
ResourceScope =
|
|
12469
|
-
orgId:
|
|
12470
|
-
projectId:
|
|
12471
|
-
envIds:
|
|
12559
|
+
ResourceScope = Schema98.NullOr(Schema98.Struct({
|
|
12560
|
+
orgId: Schema98.optional(Schema98.String),
|
|
12561
|
+
projectId: Schema98.optional(Schema98.String),
|
|
12562
|
+
envIds: Schema98.optional(Schema98.Array(Schema98.String))
|
|
12472
12563
|
}));
|
|
12473
|
-
ServiceTokenView =
|
|
12474
|
-
id:
|
|
12475
|
-
orgId:
|
|
12476
|
-
name:
|
|
12477
|
-
tokenPrefix:
|
|
12478
|
-
projectId:
|
|
12479
|
-
environmentId:
|
|
12564
|
+
ServiceTokenView = Schema98.Struct({
|
|
12565
|
+
id: Schema98.String,
|
|
12566
|
+
orgId: Schema98.String,
|
|
12567
|
+
name: Schema98.String,
|
|
12568
|
+
tokenPrefix: Schema98.NullOr(Schema98.String),
|
|
12569
|
+
projectId: Schema98.NullOr(Schema98.String),
|
|
12570
|
+
environmentId: Schema98.NullOr(Schema98.String),
|
|
12480
12571
|
resourceScope: ResourceScope,
|
|
12481
|
-
scopes:
|
|
12482
|
-
ipAllowlist:
|
|
12483
|
-
createdBy:
|
|
12484
|
-
createdAt:
|
|
12485
|
-
expiresAt:
|
|
12486
|
-
lastUsedAt:
|
|
12487
|
-
revokedAt:
|
|
12488
|
-
revokedBy:
|
|
12489
|
-
useCount:
|
|
12572
|
+
scopes: Schema98.NullOr(Schema98.Array(Schema98.String)),
|
|
12573
|
+
ipAllowlist: Schema98.NullOr(Schema98.Array(Schema98.String)),
|
|
12574
|
+
createdBy: Schema98.NullOr(Schema98.String),
|
|
12575
|
+
createdAt: Schema98.String,
|
|
12576
|
+
expiresAt: Schema98.NullOr(Schema98.String),
|
|
12577
|
+
lastUsedAt: Schema98.NullOr(Schema98.String),
|
|
12578
|
+
revokedAt: Schema98.NullOr(Schema98.String),
|
|
12579
|
+
revokedBy: Schema98.NullOr(Schema98.String),
|
|
12580
|
+
useCount: Schema98.Number
|
|
12490
12581
|
});
|
|
12491
|
-
ServiceTokenRequestView =
|
|
12492
|
-
id:
|
|
12493
|
-
orgId:
|
|
12494
|
-
requestedBy:
|
|
12495
|
-
status:
|
|
12496
|
-
tokenName:
|
|
12497
|
-
scopes:
|
|
12498
|
-
projectId:
|
|
12499
|
-
environmentId:
|
|
12582
|
+
ServiceTokenRequestView = Schema98.Struct({
|
|
12583
|
+
id: Schema98.String,
|
|
12584
|
+
orgId: Schema98.String,
|
|
12585
|
+
requestedBy: Schema98.String,
|
|
12586
|
+
status: Schema98.Literal("pending", "approved", "denied", "minted", "cancelled"),
|
|
12587
|
+
tokenName: Schema98.String,
|
|
12588
|
+
scopes: Schema98.Array(Schema98.String),
|
|
12589
|
+
projectId: Schema98.NullOr(Schema98.String),
|
|
12590
|
+
environmentId: Schema98.NullOr(Schema98.String),
|
|
12500
12591
|
resourceScope: ResourceScope,
|
|
12501
|
-
ipAllowlist:
|
|
12502
|
-
expiresInDays:
|
|
12503
|
-
approvedBy:
|
|
12504
|
-
approvedAt:
|
|
12505
|
-
deniedReason:
|
|
12506
|
-
mintedTokenId:
|
|
12507
|
-
createdAt:
|
|
12508
|
-
updatedAt:
|
|
12509
|
-
});
|
|
12510
|
-
OrgIdParams = Schema97.Struct({ orgId: Schema97.String });
|
|
12511
|
-
OrgTokenIdParams = Schema97.Struct({ orgId: Schema97.String, tokenId: Schema97.String });
|
|
12512
|
-
OrgRequestIdParams = Schema97.Struct({ orgId: Schema97.String, id: Schema97.String });
|
|
12513
|
-
ListServiceTokensQuery = Schema97.Struct({
|
|
12514
|
-
includeRevoked: Schema97.optional(Schema97.Literal("true", "false"))
|
|
12592
|
+
ipAllowlist: Schema98.NullOr(Schema98.Array(Schema98.String)),
|
|
12593
|
+
expiresInDays: Schema98.NullOr(Schema98.Number),
|
|
12594
|
+
approvedBy: Schema98.NullOr(Schema98.String),
|
|
12595
|
+
approvedAt: Schema98.NullOr(Schema98.String),
|
|
12596
|
+
deniedReason: Schema98.NullOr(Schema98.String),
|
|
12597
|
+
mintedTokenId: Schema98.NullOr(Schema98.String),
|
|
12598
|
+
createdAt: Schema98.String,
|
|
12599
|
+
updatedAt: Schema98.String
|
|
12515
12600
|
});
|
|
12516
|
-
|
|
12517
|
-
|
|
12518
|
-
|
|
12519
|
-
|
|
12520
|
-
|
|
12521
|
-
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12525
|
-
|
|
12526
|
-
|
|
12527
|
-
|
|
12528
|
-
|
|
12529
|
-
|
|
12530
|
-
|
|
12531
|
-
|
|
12532
|
-
|
|
12533
|
-
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
|
|
12601
|
+
OrgIdParams = Schema98.Struct({ orgId: Schema98.String });
|
|
12602
|
+
OrgTokenIdParams = Schema98.Struct({ orgId: Schema98.String, tokenId: Schema98.String });
|
|
12603
|
+
OrgRequestIdParams = Schema98.Struct({ orgId: Schema98.String, id: Schema98.String });
|
|
12604
|
+
ListServiceTokensQuery = Schema98.Struct({
|
|
12605
|
+
includeRevoked: Schema98.optional(Schema98.Literal("true", "false"))
|
|
12606
|
+
});
|
|
12607
|
+
CreateServiceTokenInput = Schema98.Struct({
|
|
12608
|
+
name: Schema98.String,
|
|
12609
|
+
scopes: Schema98.Array(Schema98.String),
|
|
12610
|
+
projectId: Schema98.optional(Schema98.NullOr(Schema98.String)),
|
|
12611
|
+
environmentId: Schema98.optional(Schema98.NullOr(Schema98.String)),
|
|
12612
|
+
resourceScope: Schema98.optional(ResourceScope),
|
|
12613
|
+
ipAllowlist: Schema98.optional(Schema98.NullOr(Schema98.Array(Schema98.String))),
|
|
12614
|
+
expiresInDays: Schema98.optional(Schema98.NullOr(Schema98.Number))
|
|
12615
|
+
});
|
|
12616
|
+
SubmitServiceTokenRequestInput = Schema98.Struct({
|
|
12617
|
+
name: Schema98.String,
|
|
12618
|
+
scopes: Schema98.Array(Schema98.String),
|
|
12619
|
+
projectId: Schema98.optional(Schema98.NullOr(Schema98.String)),
|
|
12620
|
+
environmentId: Schema98.optional(Schema98.NullOr(Schema98.String)),
|
|
12621
|
+
resourceScope: Schema98.optional(ResourceScope),
|
|
12622
|
+
ipAllowlist: Schema98.optional(Schema98.NullOr(Schema98.Array(Schema98.String))),
|
|
12623
|
+
expiresInDays: Schema98.optional(Schema98.NullOr(Schema98.Number))
|
|
12624
|
+
});
|
|
12625
|
+
DenyServiceTokenRequestInput = Schema98.Struct({ reason: Schema98.String });
|
|
12626
|
+
CreateServiceTokenResult = Schema98.Struct({
|
|
12627
|
+
token: Schema98.String,
|
|
12537
12628
|
view: ServiceTokenView
|
|
12538
12629
|
});
|
|
12539
|
-
ListServiceTokensResult =
|
|
12540
|
-
GetServiceTokenResult =
|
|
12541
|
-
RevokeServiceTokenResult =
|
|
12542
|
-
RotateServiceTokenResult =
|
|
12543
|
-
token:
|
|
12630
|
+
ListServiceTokensResult = Schema98.Struct({ tokens: Schema98.Array(ServiceTokenView) });
|
|
12631
|
+
GetServiceTokenResult = Schema98.Struct({ view: ServiceTokenView });
|
|
12632
|
+
RevokeServiceTokenResult = Schema98.Struct({ view: ServiceTokenView });
|
|
12633
|
+
RotateServiceTokenResult = Schema98.Struct({
|
|
12634
|
+
token: Schema98.String,
|
|
12544
12635
|
oldView: ServiceTokenView,
|
|
12545
12636
|
newView: ServiceTokenView
|
|
12546
12637
|
});
|
|
12547
|
-
ListServiceTokenRequestsResult =
|
|
12548
|
-
requests:
|
|
12638
|
+
ListServiceTokenRequestsResult = Schema98.Struct({
|
|
12639
|
+
requests: Schema98.Array(ServiceTokenRequestView)
|
|
12549
12640
|
});
|
|
12550
|
-
ServiceTokenRequestResult =
|
|
12551
|
-
MintServiceTokenRequestResult =
|
|
12552
|
-
token:
|
|
12641
|
+
ServiceTokenRequestResult = Schema98.Struct({ request: ServiceTokenRequestView });
|
|
12642
|
+
MintServiceTokenRequestResult = Schema98.Struct({
|
|
12643
|
+
token: Schema98.String,
|
|
12553
12644
|
request: ServiceTokenRequestView
|
|
12554
12645
|
});
|
|
12555
12646
|
}
|
|
12556
12647
|
});
|
|
12557
12648
|
|
|
12558
12649
|
// ../contract/dist/schemas/session-replay.js
|
|
12559
|
-
import { Schema as
|
|
12650
|
+
import { Schema as Schema99 } from "effect";
|
|
12560
12651
|
var SessionMarker, RageClick, DeadClick, NetworkRequest, ConsoleLog, SessionReplaySummary, SessionReplayFull, ListSessionsQuery2, ListSessionsResult, SessionStatsResult, DeleteSessionResult;
|
|
12561
12652
|
var init_session_replay = __esm({
|
|
12562
12653
|
"../contract/dist/schemas/session-replay.js"() {
|
|
12563
12654
|
"use strict";
|
|
12564
|
-
SessionMarker =
|
|
12565
|
-
type:
|
|
12566
|
-
timestamp:
|
|
12567
|
-
payload:
|
|
12568
|
-
});
|
|
12569
|
-
RageClick =
|
|
12570
|
-
timestamp:
|
|
12571
|
-
element:
|
|
12572
|
-
selector:
|
|
12573
|
-
clickCount:
|
|
12574
|
-
duration:
|
|
12575
|
-
x:
|
|
12576
|
-
y:
|
|
12577
|
-
});
|
|
12578
|
-
DeadClick =
|
|
12579
|
-
timestamp:
|
|
12580
|
-
element:
|
|
12581
|
-
selector:
|
|
12582
|
-
expectedAction:
|
|
12583
|
-
x:
|
|
12584
|
-
y:
|
|
12585
|
-
waitTime:
|
|
12586
|
-
});
|
|
12587
|
-
NetworkRequest =
|
|
12588
|
-
timestamp:
|
|
12589
|
-
method:
|
|
12590
|
-
url:
|
|
12591
|
-
status:
|
|
12592
|
-
duration:
|
|
12593
|
-
});
|
|
12594
|
-
ConsoleLog =
|
|
12595
|
-
timestamp:
|
|
12596
|
-
level:
|
|
12597
|
-
message:
|
|
12598
|
-
stack:
|
|
12599
|
-
});
|
|
12600
|
-
SessionReplaySummary =
|
|
12601
|
-
id:
|
|
12602
|
-
sessionId:
|
|
12603
|
-
userId:
|
|
12604
|
-
url:
|
|
12605
|
-
userAgent:
|
|
12606
|
-
screenWidth:
|
|
12607
|
-
screenHeight:
|
|
12608
|
-
devicePixelRatio:
|
|
12609
|
-
timezone:
|
|
12610
|
-
language:
|
|
12611
|
-
duration:
|
|
12612
|
-
eventCount:
|
|
12613
|
-
bytesStored:
|
|
12614
|
-
hasErrors:
|
|
12615
|
-
errorIds:
|
|
12616
|
-
hasRageClicks:
|
|
12617
|
-
hasDeadClicks:
|
|
12618
|
-
rageClickCount:
|
|
12619
|
-
deadClickCount:
|
|
12620
|
-
networkRequestCount:
|
|
12621
|
-
consoleLogCount:
|
|
12622
|
-
markers:
|
|
12623
|
-
isComplete:
|
|
12624
|
-
startedAt:
|
|
12625
|
-
endedAt:
|
|
12626
|
-
createdAt:
|
|
12627
|
-
updatedAt:
|
|
12628
|
-
});
|
|
12629
|
-
SessionReplayFull =
|
|
12630
|
-
id:
|
|
12631
|
-
sessionId:
|
|
12632
|
-
userId:
|
|
12633
|
-
url:
|
|
12634
|
-
userAgent:
|
|
12635
|
-
screenWidth:
|
|
12636
|
-
screenHeight:
|
|
12637
|
-
devicePixelRatio:
|
|
12638
|
-
timezone:
|
|
12639
|
-
language:
|
|
12640
|
-
duration:
|
|
12641
|
-
eventCount:
|
|
12642
|
-
bytesStored:
|
|
12643
|
-
hasErrors:
|
|
12644
|
-
errorIds:
|
|
12645
|
-
hasRageClicks:
|
|
12646
|
-
hasDeadClicks:
|
|
12647
|
-
rageClickCount:
|
|
12648
|
-
deadClickCount:
|
|
12649
|
-
networkRequestCount:
|
|
12650
|
-
consoleLogCount:
|
|
12651
|
-
markers:
|
|
12652
|
-
isComplete:
|
|
12653
|
-
startedAt:
|
|
12654
|
-
endedAt:
|
|
12655
|
-
createdAt:
|
|
12656
|
-
updatedAt:
|
|
12657
|
-
events:
|
|
12658
|
-
rageClicks:
|
|
12659
|
-
deadClicks:
|
|
12660
|
-
networkRequests:
|
|
12661
|
-
consoleLogs:
|
|
12662
|
-
});
|
|
12663
|
-
ListSessionsQuery2 =
|
|
12664
|
-
hasErrors:
|
|
12665
|
-
hasRageClicks:
|
|
12666
|
-
hasDeadClicks:
|
|
12667
|
-
userId:
|
|
12668
|
-
startDate:
|
|
12669
|
-
endDate:
|
|
12670
|
-
limit:
|
|
12671
|
-
offset:
|
|
12672
|
-
});
|
|
12673
|
-
ListSessionsResult =
|
|
12674
|
-
sessions:
|
|
12675
|
-
total:
|
|
12676
|
-
hasMore:
|
|
12677
|
-
});
|
|
12678
|
-
SessionStatsResult =
|
|
12679
|
-
totalSessions:
|
|
12680
|
-
sessionsThisMonth:
|
|
12681
|
-
sessionsThisWeek:
|
|
12682
|
-
sessionsWithErrors:
|
|
12683
|
-
sessionsWithRageClicks:
|
|
12684
|
-
totalStorageBytes:
|
|
12685
|
-
});
|
|
12686
|
-
DeleteSessionResult =
|
|
12687
|
-
success:
|
|
12655
|
+
SessionMarker = Schema99.Struct({
|
|
12656
|
+
type: Schema99.String,
|
|
12657
|
+
timestamp: Schema99.Number,
|
|
12658
|
+
payload: Schema99.optional(Schema99.Record({ key: Schema99.String, value: Schema99.Unknown }))
|
|
12659
|
+
});
|
|
12660
|
+
RageClick = Schema99.Struct({
|
|
12661
|
+
timestamp: Schema99.Number,
|
|
12662
|
+
element: Schema99.String,
|
|
12663
|
+
selector: Schema99.optional(Schema99.String),
|
|
12664
|
+
clickCount: Schema99.Number,
|
|
12665
|
+
duration: Schema99.optional(Schema99.Number),
|
|
12666
|
+
x: Schema99.optional(Schema99.Number),
|
|
12667
|
+
y: Schema99.optional(Schema99.Number)
|
|
12668
|
+
});
|
|
12669
|
+
DeadClick = Schema99.Struct({
|
|
12670
|
+
timestamp: Schema99.Number,
|
|
12671
|
+
element: Schema99.String,
|
|
12672
|
+
selector: Schema99.optional(Schema99.String),
|
|
12673
|
+
expectedAction: Schema99.optional(Schema99.String),
|
|
12674
|
+
x: Schema99.optional(Schema99.Number),
|
|
12675
|
+
y: Schema99.optional(Schema99.Number),
|
|
12676
|
+
waitTime: Schema99.optional(Schema99.Number)
|
|
12677
|
+
});
|
|
12678
|
+
NetworkRequest = Schema99.Struct({
|
|
12679
|
+
timestamp: Schema99.Number,
|
|
12680
|
+
method: Schema99.String,
|
|
12681
|
+
url: Schema99.String,
|
|
12682
|
+
status: Schema99.Number,
|
|
12683
|
+
duration: Schema99.Number
|
|
12684
|
+
});
|
|
12685
|
+
ConsoleLog = Schema99.Struct({
|
|
12686
|
+
timestamp: Schema99.Number,
|
|
12687
|
+
level: Schema99.Literal("log", "info", "warn", "error"),
|
|
12688
|
+
message: Schema99.String,
|
|
12689
|
+
stack: Schema99.optional(Schema99.String)
|
|
12690
|
+
});
|
|
12691
|
+
SessionReplaySummary = Schema99.Struct({
|
|
12692
|
+
id: Schema99.String,
|
|
12693
|
+
sessionId: Schema99.String,
|
|
12694
|
+
userId: Schema99.NullOr(Schema99.String),
|
|
12695
|
+
url: Schema99.NullOr(Schema99.String),
|
|
12696
|
+
userAgent: Schema99.NullOr(Schema99.String),
|
|
12697
|
+
screenWidth: Schema99.NullOr(Schema99.Number),
|
|
12698
|
+
screenHeight: Schema99.NullOr(Schema99.Number),
|
|
12699
|
+
devicePixelRatio: Schema99.NullOr(Schema99.Number),
|
|
12700
|
+
timezone: Schema99.NullOr(Schema99.String),
|
|
12701
|
+
language: Schema99.NullOr(Schema99.String),
|
|
12702
|
+
duration: Schema99.NullOr(Schema99.Number),
|
|
12703
|
+
eventCount: Schema99.Number,
|
|
12704
|
+
bytesStored: Schema99.Number,
|
|
12705
|
+
hasErrors: Schema99.Boolean,
|
|
12706
|
+
errorIds: Schema99.Array(Schema99.String),
|
|
12707
|
+
hasRageClicks: Schema99.Boolean,
|
|
12708
|
+
hasDeadClicks: Schema99.Boolean,
|
|
12709
|
+
rageClickCount: Schema99.Number,
|
|
12710
|
+
deadClickCount: Schema99.Number,
|
|
12711
|
+
networkRequestCount: Schema99.Number,
|
|
12712
|
+
consoleLogCount: Schema99.Number,
|
|
12713
|
+
markers: Schema99.Array(SessionMarker),
|
|
12714
|
+
isComplete: Schema99.Boolean,
|
|
12715
|
+
startedAt: Schema99.String,
|
|
12716
|
+
endedAt: Schema99.NullOr(Schema99.String),
|
|
12717
|
+
createdAt: Schema99.String,
|
|
12718
|
+
updatedAt: Schema99.String
|
|
12719
|
+
});
|
|
12720
|
+
SessionReplayFull = Schema99.Struct({
|
|
12721
|
+
id: Schema99.String,
|
|
12722
|
+
sessionId: Schema99.String,
|
|
12723
|
+
userId: Schema99.NullOr(Schema99.String),
|
|
12724
|
+
url: Schema99.NullOr(Schema99.String),
|
|
12725
|
+
userAgent: Schema99.NullOr(Schema99.String),
|
|
12726
|
+
screenWidth: Schema99.NullOr(Schema99.Number),
|
|
12727
|
+
screenHeight: Schema99.NullOr(Schema99.Number),
|
|
12728
|
+
devicePixelRatio: Schema99.NullOr(Schema99.Number),
|
|
12729
|
+
timezone: Schema99.NullOr(Schema99.String),
|
|
12730
|
+
language: Schema99.NullOr(Schema99.String),
|
|
12731
|
+
duration: Schema99.NullOr(Schema99.Number),
|
|
12732
|
+
eventCount: Schema99.Number,
|
|
12733
|
+
bytesStored: Schema99.Number,
|
|
12734
|
+
hasErrors: Schema99.Boolean,
|
|
12735
|
+
errorIds: Schema99.Array(Schema99.String),
|
|
12736
|
+
hasRageClicks: Schema99.Boolean,
|
|
12737
|
+
hasDeadClicks: Schema99.Boolean,
|
|
12738
|
+
rageClickCount: Schema99.Number,
|
|
12739
|
+
deadClickCount: Schema99.Number,
|
|
12740
|
+
networkRequestCount: Schema99.Number,
|
|
12741
|
+
consoleLogCount: Schema99.Number,
|
|
12742
|
+
markers: Schema99.Array(SessionMarker),
|
|
12743
|
+
isComplete: Schema99.Boolean,
|
|
12744
|
+
startedAt: Schema99.String,
|
|
12745
|
+
endedAt: Schema99.NullOr(Schema99.String),
|
|
12746
|
+
createdAt: Schema99.String,
|
|
12747
|
+
updatedAt: Schema99.String,
|
|
12748
|
+
events: Schema99.Array(Schema99.Record({ key: Schema99.String, value: Schema99.Unknown })),
|
|
12749
|
+
rageClicks: Schema99.Array(RageClick),
|
|
12750
|
+
deadClicks: Schema99.Array(DeadClick),
|
|
12751
|
+
networkRequests: Schema99.Array(NetworkRequest),
|
|
12752
|
+
consoleLogs: Schema99.Array(ConsoleLog)
|
|
12753
|
+
});
|
|
12754
|
+
ListSessionsQuery2 = Schema99.Struct({
|
|
12755
|
+
hasErrors: Schema99.optional(Schema99.String),
|
|
12756
|
+
hasRageClicks: Schema99.optional(Schema99.String),
|
|
12757
|
+
hasDeadClicks: Schema99.optional(Schema99.String),
|
|
12758
|
+
userId: Schema99.optional(Schema99.String),
|
|
12759
|
+
startDate: Schema99.optional(Schema99.String),
|
|
12760
|
+
endDate: Schema99.optional(Schema99.String),
|
|
12761
|
+
limit: Schema99.optional(Schema99.String),
|
|
12762
|
+
offset: Schema99.optional(Schema99.String)
|
|
12763
|
+
});
|
|
12764
|
+
ListSessionsResult = Schema99.Struct({
|
|
12765
|
+
sessions: Schema99.Array(SessionReplaySummary),
|
|
12766
|
+
total: Schema99.Number,
|
|
12767
|
+
hasMore: Schema99.Boolean
|
|
12768
|
+
});
|
|
12769
|
+
SessionStatsResult = Schema99.Struct({
|
|
12770
|
+
totalSessions: Schema99.Number,
|
|
12771
|
+
sessionsThisMonth: Schema99.Number,
|
|
12772
|
+
sessionsThisWeek: Schema99.Number,
|
|
12773
|
+
sessionsWithErrors: Schema99.Number,
|
|
12774
|
+
sessionsWithRageClicks: Schema99.Number,
|
|
12775
|
+
totalStorageBytes: Schema99.Number
|
|
12776
|
+
});
|
|
12777
|
+
DeleteSessionResult = Schema99.Struct({
|
|
12778
|
+
success: Schema99.Boolean
|
|
12688
12779
|
});
|
|
12689
12780
|
}
|
|
12690
12781
|
});
|
|
12691
12782
|
|
|
12692
12783
|
// ../contract/dist/schemas/storage.js
|
|
12693
|
-
import { Schema as
|
|
12694
|
-
var FileId, UploadId, FileVersionId, FileVisibility, SignedUrlDisposition, UploadMethod, File, FileVersion, UploadCreateRequest, UploadPart, UploadCreateSinglePartResult, UploadCreateMultipartResult, UploadCreateResult, UploadPartPresignResult, UploadCompletePart, UploadCompleteRequest, UploadCompleteResult, ListFilesQuery, ListFilesResult, SoftDeleteFileResult, SignedUrlRequest, SignedUrlResult, CopyFileRequest, ListFileVersionsResult, RestoreVersionResult;
|
|
12784
|
+
import { Schema as Schema100 } from "effect";
|
|
12785
|
+
var FileId, UploadId, FileVersionId, FileVisibility, SignedUrlDisposition, UploadMethod, File, FileVersion, UploadCreateRequest, UploadPart, UploadCreateSinglePartResult, UploadCreateMultipartResult, UploadCreateResult, UploadPartPresignResult, UploadCompletePart, UploadCompleteRequest, UploadCompleteResult, ListFilesQuery, ListFilesResult, SoftDeleteFileResult, StorageTakedownReason, TakedownFileRequest, StorageTakedownRecord, TakedownFileResult, SignedUrlRequest, SignedUrlResult, CopyFileRequest, ListFileVersionsResult, RestoreVersionResult;
|
|
12695
12786
|
var init_storage = __esm({
|
|
12696
12787
|
"../contract/dist/schemas/storage.js"() {
|
|
12697
12788
|
"use strict";
|
|
12698
|
-
FileId =
|
|
12699
|
-
UploadId =
|
|
12700
|
-
FileVersionId =
|
|
12701
|
-
FileVisibility =
|
|
12702
|
-
SignedUrlDisposition =
|
|
12703
|
-
UploadMethod =
|
|
12704
|
-
File =
|
|
12789
|
+
FileId = Schema100.String.pipe(Schema100.brand("FileId"));
|
|
12790
|
+
UploadId = Schema100.String.pipe(Schema100.brand("UploadId"));
|
|
12791
|
+
FileVersionId = Schema100.String.pipe(Schema100.brand("FileVersionId"));
|
|
12792
|
+
FileVisibility = Schema100.Literal("public", "private");
|
|
12793
|
+
SignedUrlDisposition = Schema100.Literal("attachment", "inline");
|
|
12794
|
+
UploadMethod = Schema100.Literal("PUT", "MULTIPART");
|
|
12795
|
+
File = Schema100.Struct({
|
|
12705
12796
|
id: FileId,
|
|
12706
|
-
filename:
|
|
12707
|
-
contentType:
|
|
12708
|
-
size:
|
|
12709
|
-
checksumSha256:
|
|
12710
|
-
etag:
|
|
12797
|
+
filename: Schema100.String,
|
|
12798
|
+
contentType: Schema100.String,
|
|
12799
|
+
size: Schema100.Number,
|
|
12800
|
+
checksumSha256: Schema100.String,
|
|
12801
|
+
etag: Schema100.String,
|
|
12711
12802
|
visibility: FileVisibility,
|
|
12712
|
-
folder:
|
|
12713
|
-
metadata:
|
|
12803
|
+
folder: Schema100.NullOr(Schema100.String),
|
|
12804
|
+
metadata: Schema100.Record({ key: Schema100.String, value: Schema100.Unknown }),
|
|
12714
12805
|
/** Public URL when `visibility === 'public'`; `null` otherwise. Use `:signedUrl` for private files. */
|
|
12715
|
-
url:
|
|
12716
|
-
isDeleted:
|
|
12717
|
-
createdAt:
|
|
12718
|
-
updatedAt:
|
|
12806
|
+
url: Schema100.NullOr(Schema100.String),
|
|
12807
|
+
isDeleted: Schema100.Boolean,
|
|
12808
|
+
createdAt: Schema100.DateFromString,
|
|
12809
|
+
updatedAt: Schema100.DateFromString
|
|
12719
12810
|
});
|
|
12720
|
-
FileVersion =
|
|
12811
|
+
FileVersion = Schema100.Struct({
|
|
12721
12812
|
id: FileVersionId,
|
|
12722
12813
|
fileId: FileId,
|
|
12723
|
-
versionNumber:
|
|
12724
|
-
size:
|
|
12725
|
-
contentType:
|
|
12726
|
-
checksumSha256:
|
|
12727
|
-
etag:
|
|
12728
|
-
createdAt:
|
|
12729
|
-
createdBy:
|
|
12730
|
-
isCurrent:
|
|
12731
|
-
});
|
|
12732
|
-
UploadCreateRequest =
|
|
12733
|
-
filename:
|
|
12734
|
-
contentType:
|
|
12735
|
-
size:
|
|
12736
|
-
folder:
|
|
12737
|
-
visibility:
|
|
12738
|
-
metadata:
|
|
12814
|
+
versionNumber: Schema100.Number,
|
|
12815
|
+
size: Schema100.Number,
|
|
12816
|
+
contentType: Schema100.String,
|
|
12817
|
+
checksumSha256: Schema100.String,
|
|
12818
|
+
etag: Schema100.String,
|
|
12819
|
+
createdAt: Schema100.DateFromString,
|
|
12820
|
+
createdBy: Schema100.NullOr(Schema100.String),
|
|
12821
|
+
isCurrent: Schema100.Boolean
|
|
12822
|
+
});
|
|
12823
|
+
UploadCreateRequest = Schema100.Struct({
|
|
12824
|
+
filename: Schema100.String.pipe(Schema100.minLength(1)),
|
|
12825
|
+
contentType: Schema100.String.pipe(Schema100.minLength(1)),
|
|
12826
|
+
size: Schema100.Number.pipe(Schema100.greaterThanOrEqualTo(0)),
|
|
12827
|
+
folder: Schema100.optional(Schema100.String),
|
|
12828
|
+
visibility: Schema100.optional(FileVisibility),
|
|
12829
|
+
metadata: Schema100.optional(Schema100.Record({ key: Schema100.String, value: Schema100.Unknown })),
|
|
12739
12830
|
/** Pre-computed SHA-256 (hex); verified server-side on `:complete` (multipart) or after PUT (single). */
|
|
12740
|
-
checksumSha256:
|
|
12831
|
+
checksumSha256: Schema100.optional(Schema100.String),
|
|
12741
12832
|
/** S3-style precondition; if `'*'`, fail when a file already exists at (folder, filename). */
|
|
12742
|
-
ifNoneMatch:
|
|
12833
|
+
ifNoneMatch: Schema100.optional(Schema100.Literal("*"))
|
|
12743
12834
|
});
|
|
12744
|
-
UploadPart =
|
|
12745
|
-
partNumber:
|
|
12746
|
-
url:
|
|
12747
|
-
expiresAt:
|
|
12835
|
+
UploadPart = Schema100.Struct({
|
|
12836
|
+
partNumber: Schema100.Number.pipe(Schema100.greaterThanOrEqualTo(1)),
|
|
12837
|
+
url: Schema100.String,
|
|
12838
|
+
expiresAt: Schema100.DateFromString
|
|
12748
12839
|
});
|
|
12749
|
-
UploadCreateSinglePartResult =
|
|
12750
|
-
method:
|
|
12840
|
+
UploadCreateSinglePartResult = Schema100.Struct({
|
|
12841
|
+
method: Schema100.Literal("PUT"),
|
|
12751
12842
|
uploadId: UploadId,
|
|
12752
12843
|
fileId: FileId,
|
|
12753
|
-
url:
|
|
12754
|
-
headers:
|
|
12755
|
-
expiresAt:
|
|
12844
|
+
url: Schema100.String,
|
|
12845
|
+
headers: Schema100.Record({ key: Schema100.String, value: Schema100.String }),
|
|
12846
|
+
expiresAt: Schema100.DateFromString
|
|
12756
12847
|
});
|
|
12757
|
-
UploadCreateMultipartResult =
|
|
12758
|
-
method:
|
|
12848
|
+
UploadCreateMultipartResult = Schema100.Struct({
|
|
12849
|
+
method: Schema100.Literal("MULTIPART"),
|
|
12759
12850
|
uploadId: UploadId,
|
|
12760
12851
|
fileId: FileId,
|
|
12761
|
-
partSize:
|
|
12762
|
-
partCount:
|
|
12763
|
-
parts:
|
|
12764
|
-
expiresAt:
|
|
12852
|
+
partSize: Schema100.Number,
|
|
12853
|
+
partCount: Schema100.Number,
|
|
12854
|
+
parts: Schema100.Array(UploadPart),
|
|
12855
|
+
expiresAt: Schema100.DateFromString
|
|
12765
12856
|
});
|
|
12766
|
-
UploadCreateResult =
|
|
12767
|
-
UploadPartPresignResult =
|
|
12768
|
-
url:
|
|
12769
|
-
expiresAt:
|
|
12857
|
+
UploadCreateResult = Schema100.Union(UploadCreateSinglePartResult, UploadCreateMultipartResult);
|
|
12858
|
+
UploadPartPresignResult = Schema100.Struct({
|
|
12859
|
+
url: Schema100.String,
|
|
12860
|
+
expiresAt: Schema100.DateFromString
|
|
12770
12861
|
});
|
|
12771
|
-
UploadCompletePart =
|
|
12772
|
-
partNumber:
|
|
12773
|
-
etag:
|
|
12862
|
+
UploadCompletePart = Schema100.Struct({
|
|
12863
|
+
partNumber: Schema100.Number.pipe(Schema100.greaterThanOrEqualTo(1)),
|
|
12864
|
+
etag: Schema100.String.pipe(Schema100.minLength(1))
|
|
12774
12865
|
});
|
|
12775
|
-
UploadCompleteRequest =
|
|
12776
|
-
parts:
|
|
12866
|
+
UploadCompleteRequest = Schema100.Struct({
|
|
12867
|
+
parts: Schema100.Array(UploadCompletePart)
|
|
12777
12868
|
});
|
|
12778
|
-
UploadCompleteResult =
|
|
12869
|
+
UploadCompleteResult = Schema100.Struct({
|
|
12779
12870
|
fileId: FileId,
|
|
12780
|
-
url:
|
|
12781
|
-
size:
|
|
12782
|
-
etag:
|
|
12783
|
-
checksumSha256:
|
|
12871
|
+
url: Schema100.NullOr(Schema100.String),
|
|
12872
|
+
size: Schema100.Number,
|
|
12873
|
+
etag: Schema100.String,
|
|
12874
|
+
checksumSha256: Schema100.String
|
|
12784
12875
|
});
|
|
12785
|
-
ListFilesQuery =
|
|
12786
|
-
folder:
|
|
12787
|
-
cursor:
|
|
12876
|
+
ListFilesQuery = Schema100.Struct({
|
|
12877
|
+
folder: Schema100.optional(Schema100.String),
|
|
12878
|
+
cursor: Schema100.optional(Schema100.String),
|
|
12788
12879
|
/** Page size; clamped server-side to [1, 100]; default 25. */
|
|
12789
|
-
limit:
|
|
12790
|
-
includeDeleted:
|
|
12880
|
+
limit: Schema100.optional(Schema100.Number),
|
|
12881
|
+
includeDeleted: Schema100.optional(Schema100.Boolean)
|
|
12791
12882
|
});
|
|
12792
|
-
ListFilesResult =
|
|
12793
|
-
files:
|
|
12794
|
-
nextCursor:
|
|
12883
|
+
ListFilesResult = Schema100.Struct({
|
|
12884
|
+
files: Schema100.Array(File),
|
|
12885
|
+
nextCursor: Schema100.NullOr(Schema100.String)
|
|
12795
12886
|
});
|
|
12796
|
-
SoftDeleteFileResult =
|
|
12887
|
+
SoftDeleteFileResult = Schema100.Struct({
|
|
12797
12888
|
id: FileId,
|
|
12798
|
-
isDeleted:
|
|
12889
|
+
isDeleted: Schema100.Literal(true)
|
|
12890
|
+
});
|
|
12891
|
+
StorageTakedownReason = Schema100.Literal("dmca", "malware", "abuse", "legal");
|
|
12892
|
+
TakedownFileRequest = Schema100.Struct({
|
|
12893
|
+
reason: StorageTakedownReason,
|
|
12894
|
+
noticeId: Schema100.optional(Schema100.String),
|
|
12895
|
+
source: Schema100.optional(Schema100.String),
|
|
12896
|
+
description: Schema100.optional(Schema100.String)
|
|
12897
|
+
});
|
|
12898
|
+
StorageTakedownRecord = Schema100.Struct({
|
|
12899
|
+
reason: StorageTakedownReason,
|
|
12900
|
+
noticeId: Schema100.NullOr(Schema100.String),
|
|
12901
|
+
source: Schema100.NullOr(Schema100.String),
|
|
12902
|
+
description: Schema100.NullOr(Schema100.String),
|
|
12903
|
+
actedAt: Schema100.DateFromString
|
|
12904
|
+
});
|
|
12905
|
+
TakedownFileResult = Schema100.Struct({
|
|
12906
|
+
id: FileId,
|
|
12907
|
+
isDeleted: Schema100.Literal(true),
|
|
12908
|
+
takedown: StorageTakedownRecord
|
|
12799
12909
|
});
|
|
12800
|
-
SignedUrlRequest =
|
|
12801
|
-
expiresIn:
|
|
12802
|
-
disposition:
|
|
12910
|
+
SignedUrlRequest = Schema100.Struct({
|
|
12911
|
+
expiresIn: Schema100.optional(Schema100.Number.pipe(Schema100.greaterThanOrEqualTo(1))),
|
|
12912
|
+
disposition: Schema100.optional(SignedUrlDisposition),
|
|
12803
12913
|
/** Restrict the signed URL to a specific authenticated user (claim baked into the signature). */
|
|
12804
|
-
userId:
|
|
12914
|
+
userId: Schema100.optional(Schema100.String)
|
|
12805
12915
|
});
|
|
12806
|
-
SignedUrlResult =
|
|
12807
|
-
url:
|
|
12808
|
-
expiresAt:
|
|
12916
|
+
SignedUrlResult = Schema100.Struct({
|
|
12917
|
+
url: Schema100.String,
|
|
12918
|
+
expiresAt: Schema100.DateFromString,
|
|
12809
12919
|
file: File
|
|
12810
12920
|
});
|
|
12811
|
-
CopyFileRequest =
|
|
12812
|
-
folder:
|
|
12813
|
-
filename:
|
|
12814
|
-
visibility:
|
|
12815
|
-
metadata:
|
|
12921
|
+
CopyFileRequest = Schema100.Struct({
|
|
12922
|
+
folder: Schema100.optional(Schema100.String),
|
|
12923
|
+
filename: Schema100.optional(Schema100.String),
|
|
12924
|
+
visibility: Schema100.optional(FileVisibility),
|
|
12925
|
+
metadata: Schema100.optional(Schema100.Record({ key: Schema100.String, value: Schema100.Unknown }))
|
|
12816
12926
|
});
|
|
12817
|
-
ListFileVersionsResult =
|
|
12818
|
-
versions:
|
|
12927
|
+
ListFileVersionsResult = Schema100.Struct({
|
|
12928
|
+
versions: Schema100.Array(FileVersion)
|
|
12819
12929
|
});
|
|
12820
|
-
RestoreVersionResult =
|
|
12930
|
+
RestoreVersionResult = Schema100.Struct({
|
|
12821
12931
|
file: File,
|
|
12822
12932
|
version: FileVersion
|
|
12823
12933
|
});
|
|
@@ -12825,295 +12935,295 @@ var init_storage = __esm({
|
|
|
12825
12935
|
});
|
|
12826
12936
|
|
|
12827
12937
|
// ../contract/dist/schemas/storage-admin.js
|
|
12828
|
-
import { Schema as
|
|
12938
|
+
import { Schema as Schema101 } from "effect";
|
|
12829
12939
|
var StorageProjectIdParams, StorageProjectBucketParams, StorageProjectFileParams, StorageQuery, BucketAccessRuleType, BucketAccessPermission, BucketAccessRule, StorageProjectRef, StorageBucket, StorageBucketMinimal, BucketFile, StorageFile, StorageFolderInfo, CreateBucketInput, UpdateBucketInput, DeleteBucketInput, BulkDeleteBucketsInput, ListBucketsResult, GetBucketResult, DeleteBucketResult, BulkDeleteBucketsResult, ListBucketFilesResult, ListStorageFilesResult, StorageUploadByDay, StorageUploadByType, StorageRecentFile, StorageServiceDataResult, StorageAdminResult;
|
|
12830
12940
|
var init_storage_admin = __esm({
|
|
12831
12941
|
"../contract/dist/schemas/storage-admin.js"() {
|
|
12832
12942
|
"use strict";
|
|
12833
|
-
StorageProjectIdParams =
|
|
12834
|
-
StorageProjectBucketParams =
|
|
12835
|
-
projectId:
|
|
12836
|
-
bucketId:
|
|
12837
|
-
});
|
|
12838
|
-
StorageProjectFileParams = Schema100.Struct({
|
|
12839
|
-
projectId: Schema100.String,
|
|
12840
|
-
fileId: Schema100.String
|
|
12841
|
-
});
|
|
12842
|
-
StorageQuery = Schema100.Struct({
|
|
12843
|
-
limit: Schema100.optional(Schema100.String),
|
|
12844
|
-
offset: Schema100.optional(Schema100.String),
|
|
12845
|
-
prefix: Schema100.optional(Schema100.String),
|
|
12846
|
-
cursor: Schema100.optional(Schema100.String),
|
|
12847
|
-
path: Schema100.optional(Schema100.String),
|
|
12848
|
-
search: Schema100.optional(Schema100.String)
|
|
12943
|
+
StorageProjectIdParams = Schema101.Struct({ id: Schema101.String });
|
|
12944
|
+
StorageProjectBucketParams = Schema101.Struct({
|
|
12945
|
+
projectId: Schema101.String,
|
|
12946
|
+
bucketId: Schema101.String
|
|
12849
12947
|
});
|
|
12850
|
-
|
|
12851
|
-
|
|
12852
|
-
|
|
12948
|
+
StorageProjectFileParams = Schema101.Struct({
|
|
12949
|
+
projectId: Schema101.String,
|
|
12950
|
+
fileId: Schema101.String
|
|
12951
|
+
});
|
|
12952
|
+
StorageQuery = Schema101.Struct({
|
|
12953
|
+
limit: Schema101.optional(Schema101.String),
|
|
12954
|
+
offset: Schema101.optional(Schema101.String),
|
|
12955
|
+
prefix: Schema101.optional(Schema101.String),
|
|
12956
|
+
cursor: Schema101.optional(Schema101.String),
|
|
12957
|
+
path: Schema101.optional(Schema101.String),
|
|
12958
|
+
search: Schema101.optional(Schema101.String)
|
|
12959
|
+
});
|
|
12960
|
+
BucketAccessRuleType = Schema101.Literal("public", "authenticated", "owner_only", "admin_only");
|
|
12961
|
+
BucketAccessPermission = Schema101.Literal("read", "read-write", "full");
|
|
12962
|
+
BucketAccessRule = Schema101.Struct({
|
|
12853
12963
|
type: BucketAccessRuleType,
|
|
12854
12964
|
permission: BucketAccessPermission
|
|
12855
12965
|
});
|
|
12856
|
-
StorageProjectRef =
|
|
12857
|
-
id:
|
|
12858
|
-
name:
|
|
12859
|
-
slug:
|
|
12966
|
+
StorageProjectRef = Schema101.Struct({
|
|
12967
|
+
id: Schema101.String,
|
|
12968
|
+
name: Schema101.String,
|
|
12969
|
+
slug: Schema101.String
|
|
12860
12970
|
});
|
|
12861
|
-
StorageBucket =
|
|
12862
|
-
id:
|
|
12863
|
-
name:
|
|
12864
|
-
description:
|
|
12865
|
-
isPublic:
|
|
12866
|
-
fileCount:
|
|
12867
|
-
totalSize:
|
|
12868
|
-
createdAt:
|
|
12869
|
-
updatedAt:
|
|
12870
|
-
accessRules:
|
|
12871
|
-
corsEnabled:
|
|
12872
|
-
allowedOrigins:
|
|
12873
|
-
maxFileSize:
|
|
12874
|
-
allowedMimeTypes:
|
|
12875
|
-
});
|
|
12876
|
-
StorageBucketMinimal =
|
|
12877
|
-
id:
|
|
12878
|
-
name:
|
|
12879
|
-
description:
|
|
12880
|
-
isPublic:
|
|
12881
|
-
createdAt:
|
|
12882
|
-
updatedAt:
|
|
12883
|
-
accessRules:
|
|
12884
|
-
corsEnabled:
|
|
12885
|
-
allowedOrigins:
|
|
12886
|
-
maxFileSize:
|
|
12887
|
-
allowedMimeTypes:
|
|
12888
|
-
});
|
|
12889
|
-
BucketFile =
|
|
12890
|
-
id:
|
|
12891
|
-
filename:
|
|
12892
|
-
path:
|
|
12893
|
-
url:
|
|
12894
|
-
mimeType:
|
|
12895
|
-
size:
|
|
12896
|
-
formattedSize:
|
|
12897
|
-
createdAt:
|
|
12898
|
-
});
|
|
12899
|
-
StorageFile =
|
|
12900
|
-
id:
|
|
12901
|
-
name:
|
|
12902
|
-
path:
|
|
12903
|
-
mimeType:
|
|
12904
|
-
size:
|
|
12905
|
-
url:
|
|
12906
|
-
thumbnailUrl:
|
|
12907
|
-
createdAt:
|
|
12908
|
-
});
|
|
12909
|
-
StorageFolderInfo =
|
|
12910
|
-
name:
|
|
12911
|
-
fileCount:
|
|
12912
|
-
totalSize:
|
|
12913
|
-
});
|
|
12914
|
-
CreateBucketInput =
|
|
12915
|
-
projectId:
|
|
12916
|
-
environmentId:
|
|
12917
|
-
name:
|
|
12918
|
-
description:
|
|
12919
|
-
isPublic:
|
|
12920
|
-
accessRules:
|
|
12921
|
-
corsEnabled:
|
|
12922
|
-
allowedOrigins:
|
|
12923
|
-
maxFileSize:
|
|
12924
|
-
allowedMimeTypes:
|
|
12925
|
-
});
|
|
12926
|
-
UpdateBucketInput =
|
|
12927
|
-
name:
|
|
12928
|
-
description:
|
|
12929
|
-
isPublic:
|
|
12930
|
-
accessRules:
|
|
12931
|
-
corsEnabled:
|
|
12932
|
-
allowedOrigins:
|
|
12933
|
-
maxFileSize:
|
|
12934
|
-
allowedMimeTypes:
|
|
12935
|
-
});
|
|
12936
|
-
DeleteBucketInput =
|
|
12937
|
-
force:
|
|
12938
|
-
});
|
|
12939
|
-
BulkDeleteBucketsInput =
|
|
12940
|
-
projectId:
|
|
12941
|
-
bucketIds:
|
|
12942
|
-
});
|
|
12943
|
-
ListBucketsResult =
|
|
12971
|
+
StorageBucket = Schema101.Struct({
|
|
12972
|
+
id: Schema101.String,
|
|
12973
|
+
name: Schema101.String,
|
|
12974
|
+
description: Schema101.NullOr(Schema101.String),
|
|
12975
|
+
isPublic: Schema101.Boolean,
|
|
12976
|
+
fileCount: Schema101.Number,
|
|
12977
|
+
totalSize: Schema101.Number,
|
|
12978
|
+
createdAt: Schema101.String,
|
|
12979
|
+
updatedAt: Schema101.String,
|
|
12980
|
+
accessRules: Schema101.Array(BucketAccessRule),
|
|
12981
|
+
corsEnabled: Schema101.Boolean,
|
|
12982
|
+
allowedOrigins: Schema101.Array(Schema101.String),
|
|
12983
|
+
maxFileSize: Schema101.Number,
|
|
12984
|
+
allowedMimeTypes: Schema101.Array(Schema101.String)
|
|
12985
|
+
});
|
|
12986
|
+
StorageBucketMinimal = Schema101.Struct({
|
|
12987
|
+
id: Schema101.String,
|
|
12988
|
+
name: Schema101.String,
|
|
12989
|
+
description: Schema101.NullOr(Schema101.String),
|
|
12990
|
+
isPublic: Schema101.Boolean,
|
|
12991
|
+
createdAt: Schema101.String,
|
|
12992
|
+
updatedAt: Schema101.String,
|
|
12993
|
+
accessRules: Schema101.Array(BucketAccessRule),
|
|
12994
|
+
corsEnabled: Schema101.Boolean,
|
|
12995
|
+
allowedOrigins: Schema101.Array(Schema101.String),
|
|
12996
|
+
maxFileSize: Schema101.Number,
|
|
12997
|
+
allowedMimeTypes: Schema101.Array(Schema101.String)
|
|
12998
|
+
});
|
|
12999
|
+
BucketFile = Schema101.Struct({
|
|
13000
|
+
id: Schema101.String,
|
|
13001
|
+
filename: Schema101.String,
|
|
13002
|
+
path: Schema101.String,
|
|
13003
|
+
url: Schema101.NullOr(Schema101.String),
|
|
13004
|
+
mimeType: Schema101.String,
|
|
13005
|
+
size: Schema101.Number,
|
|
13006
|
+
formattedSize: Schema101.String,
|
|
13007
|
+
createdAt: Schema101.String
|
|
13008
|
+
});
|
|
13009
|
+
StorageFile = Schema101.Struct({
|
|
13010
|
+
id: Schema101.String,
|
|
13011
|
+
name: Schema101.String,
|
|
13012
|
+
path: Schema101.String,
|
|
13013
|
+
mimeType: Schema101.String,
|
|
13014
|
+
size: Schema101.Number,
|
|
13015
|
+
url: Schema101.String,
|
|
13016
|
+
thumbnailUrl: Schema101.NullOr(Schema101.String),
|
|
13017
|
+
createdAt: Schema101.String
|
|
13018
|
+
});
|
|
13019
|
+
StorageFolderInfo = Schema101.Struct({
|
|
13020
|
+
name: Schema101.String,
|
|
13021
|
+
fileCount: Schema101.Number,
|
|
13022
|
+
totalSize: Schema101.Number
|
|
13023
|
+
});
|
|
13024
|
+
CreateBucketInput = Schema101.Struct({
|
|
13025
|
+
projectId: Schema101.String,
|
|
13026
|
+
environmentId: Schema101.optional(Schema101.String),
|
|
13027
|
+
name: Schema101.String,
|
|
13028
|
+
description: Schema101.optional(Schema101.String),
|
|
13029
|
+
isPublic: Schema101.optional(Schema101.Boolean),
|
|
13030
|
+
accessRules: Schema101.optional(Schema101.Array(BucketAccessRule)),
|
|
13031
|
+
corsEnabled: Schema101.optional(Schema101.Boolean),
|
|
13032
|
+
allowedOrigins: Schema101.optional(Schema101.Array(Schema101.String)),
|
|
13033
|
+
maxFileSize: Schema101.optional(Schema101.Number),
|
|
13034
|
+
allowedMimeTypes: Schema101.optional(Schema101.Array(Schema101.String))
|
|
13035
|
+
});
|
|
13036
|
+
UpdateBucketInput = Schema101.Struct({
|
|
13037
|
+
name: Schema101.optional(Schema101.String),
|
|
13038
|
+
description: Schema101.optional(Schema101.NullOr(Schema101.String)),
|
|
13039
|
+
isPublic: Schema101.optional(Schema101.Boolean),
|
|
13040
|
+
accessRules: Schema101.optional(Schema101.Array(BucketAccessRule)),
|
|
13041
|
+
corsEnabled: Schema101.optional(Schema101.Boolean),
|
|
13042
|
+
allowedOrigins: Schema101.optional(Schema101.Array(Schema101.String)),
|
|
13043
|
+
maxFileSize: Schema101.optional(Schema101.Number),
|
|
13044
|
+
allowedMimeTypes: Schema101.optional(Schema101.Array(Schema101.String))
|
|
13045
|
+
});
|
|
13046
|
+
DeleteBucketInput = Schema101.Struct({
|
|
13047
|
+
force: Schema101.optional(Schema101.Boolean)
|
|
13048
|
+
});
|
|
13049
|
+
BulkDeleteBucketsInput = Schema101.Struct({
|
|
13050
|
+
projectId: Schema101.String,
|
|
13051
|
+
bucketIds: Schema101.Array(Schema101.String)
|
|
13052
|
+
});
|
|
13053
|
+
ListBucketsResult = Schema101.Struct({
|
|
12944
13054
|
app: StorageProjectRef,
|
|
12945
|
-
buckets:
|
|
12946
|
-
total:
|
|
12947
|
-
});
|
|
12948
|
-
GetBucketResult =
|
|
12949
|
-
DeleteBucketResult =
|
|
12950
|
-
success:
|
|
12951
|
-
filesDeleted:
|
|
12952
|
-
});
|
|
12953
|
-
BulkDeleteBucketsResult =
|
|
12954
|
-
deleted:
|
|
12955
|
-
filesDeleted:
|
|
12956
|
-
errors:
|
|
12957
|
-
id:
|
|
12958
|
-
error:
|
|
13055
|
+
buckets: Schema101.Array(StorageBucket),
|
|
13056
|
+
total: Schema101.Number
|
|
13057
|
+
});
|
|
13058
|
+
GetBucketResult = Schema101.extend(StorageBucket, Schema101.Struct({ formattedSize: Schema101.String }));
|
|
13059
|
+
DeleteBucketResult = Schema101.Struct({
|
|
13060
|
+
success: Schema101.Boolean,
|
|
13061
|
+
filesDeleted: Schema101.Number
|
|
13062
|
+
});
|
|
13063
|
+
BulkDeleteBucketsResult = Schema101.Struct({
|
|
13064
|
+
deleted: Schema101.Number,
|
|
13065
|
+
filesDeleted: Schema101.Number,
|
|
13066
|
+
errors: Schema101.optional(Schema101.Array(Schema101.Struct({
|
|
13067
|
+
id: Schema101.String,
|
|
13068
|
+
error: Schema101.String
|
|
12959
13069
|
})))
|
|
12960
13070
|
});
|
|
12961
|
-
ListBucketFilesResult =
|
|
12962
|
-
files:
|
|
12963
|
-
total:
|
|
12964
|
-
bucket:
|
|
12965
|
-
id:
|
|
12966
|
-
name:
|
|
13071
|
+
ListBucketFilesResult = Schema101.Struct({
|
|
13072
|
+
files: Schema101.Array(BucketFile),
|
|
13073
|
+
total: Schema101.Number,
|
|
13074
|
+
bucket: Schema101.Struct({
|
|
13075
|
+
id: Schema101.String,
|
|
13076
|
+
name: Schema101.String
|
|
12967
13077
|
})
|
|
12968
13078
|
});
|
|
12969
|
-
ListStorageFilesResult =
|
|
13079
|
+
ListStorageFilesResult = Schema101.Struct({
|
|
12970
13080
|
app: StorageProjectRef,
|
|
12971
|
-
files:
|
|
12972
|
-
folders:
|
|
12973
|
-
total:
|
|
12974
|
-
limit:
|
|
12975
|
-
offset:
|
|
12976
|
-
});
|
|
12977
|
-
StorageUploadByDay =
|
|
12978
|
-
date:
|
|
12979
|
-
count:
|
|
12980
|
-
bytes:
|
|
12981
|
-
});
|
|
12982
|
-
StorageUploadByType =
|
|
12983
|
-
mimeType:
|
|
12984
|
-
count:
|
|
12985
|
-
bytes:
|
|
12986
|
-
});
|
|
12987
|
-
StorageRecentFile = Schema100.Struct({
|
|
12988
|
-
id: Schema100.String,
|
|
12989
|
-
filename: Schema100.String,
|
|
12990
|
-
mimeType: Schema100.String,
|
|
12991
|
-
sizeBytes: Schema100.Number,
|
|
12992
|
-
createdAt: Schema100.String
|
|
13081
|
+
files: Schema101.Array(StorageFile),
|
|
13082
|
+
folders: Schema101.Array(StorageFolderInfo),
|
|
13083
|
+
total: Schema101.Number,
|
|
13084
|
+
limit: Schema101.Number,
|
|
13085
|
+
offset: Schema101.Number
|
|
13086
|
+
});
|
|
13087
|
+
StorageUploadByDay = Schema101.Struct({
|
|
13088
|
+
date: Schema101.String,
|
|
13089
|
+
count: Schema101.Number,
|
|
13090
|
+
bytes: Schema101.Number
|
|
13091
|
+
});
|
|
13092
|
+
StorageUploadByType = Schema101.Struct({
|
|
13093
|
+
mimeType: Schema101.String,
|
|
13094
|
+
count: Schema101.Number,
|
|
13095
|
+
bytes: Schema101.Number
|
|
12993
13096
|
});
|
|
12994
|
-
|
|
13097
|
+
StorageRecentFile = Schema101.Struct({
|
|
13098
|
+
id: Schema101.String,
|
|
13099
|
+
filename: Schema101.String,
|
|
13100
|
+
mimeType: Schema101.String,
|
|
13101
|
+
sizeBytes: Schema101.Number,
|
|
13102
|
+
createdAt: Schema101.String
|
|
13103
|
+
});
|
|
13104
|
+
StorageServiceDataResult = Schema101.Struct({
|
|
12995
13105
|
app: StorageProjectRef,
|
|
12996
|
-
totalStats:
|
|
12997
|
-
files:
|
|
12998
|
-
totalBytes:
|
|
13106
|
+
totalStats: Schema101.Struct({
|
|
13107
|
+
files: Schema101.Number,
|
|
13108
|
+
totalBytes: Schema101.Number
|
|
12999
13109
|
}),
|
|
13000
|
-
uploadsByDay:
|
|
13001
|
-
uploadsByType:
|
|
13002
|
-
recentFiles:
|
|
13003
|
-
uploadsThisMonth:
|
|
13110
|
+
uploadsByDay: Schema101.Array(StorageUploadByDay),
|
|
13111
|
+
uploadsByType: Schema101.Array(StorageUploadByType),
|
|
13112
|
+
recentFiles: Schema101.Array(StorageRecentFile),
|
|
13113
|
+
uploadsThisMonth: Schema101.Number
|
|
13004
13114
|
});
|
|
13005
|
-
StorageAdminResult =
|
|
13115
|
+
StorageAdminResult = Schema101.Unknown;
|
|
13006
13116
|
}
|
|
13007
13117
|
});
|
|
13008
13118
|
|
|
13009
13119
|
// ../contract/dist/schemas/tasks.js
|
|
13010
|
-
import { Schema as
|
|
13120
|
+
import { Schema as Schema102 } from "effect";
|
|
13011
13121
|
var TaskStatusEnum, TaskTypeEnum, TaskHttpMethod, Task, TaskIdParam, ScheduleIdParam, TasksProjectIdQuery, ListTasksQuery, ScheduleTaskInput, CreateCronTaskInput, CancelTaskInput, CronActionInput, DeleteCronInput, TasksStatusResult, ListTasksResult, GetTaskResult, ScheduleTaskResult, CreateCronTaskResult, CancelTaskResult, CronActionResult;
|
|
13012
13122
|
var init_tasks = __esm({
|
|
13013
13123
|
"../contract/dist/schemas/tasks.js"() {
|
|
13014
13124
|
"use strict";
|
|
13015
|
-
TaskStatusEnum =
|
|
13016
|
-
TaskTypeEnum =
|
|
13017
|
-
TaskHttpMethod =
|
|
13018
|
-
Task =
|
|
13019
|
-
id:
|
|
13020
|
-
name:
|
|
13125
|
+
TaskStatusEnum = Schema102.Literal("pending", "queued", "running", "completed", "failed", "scheduled", "paused", "cancelled", "deleted");
|
|
13126
|
+
TaskTypeEnum = Schema102.Literal("one-time", "cron");
|
|
13127
|
+
TaskHttpMethod = Schema102.Literal("GET", "POST", "PUT", "DELETE", "PATCH");
|
|
13128
|
+
Task = Schema102.Struct({
|
|
13129
|
+
id: Schema102.String,
|
|
13130
|
+
name: Schema102.NullOr(Schema102.String),
|
|
13021
13131
|
type: TaskTypeEnum,
|
|
13022
13132
|
status: TaskStatusEnum,
|
|
13023
|
-
callbackUrl:
|
|
13024
|
-
payload:
|
|
13025
|
-
method:
|
|
13026
|
-
headers:
|
|
13027
|
-
scheduledFor:
|
|
13028
|
-
startedAt:
|
|
13029
|
-
completedAt:
|
|
13030
|
-
failedAt:
|
|
13031
|
-
cronExpression:
|
|
13032
|
-
retries:
|
|
13033
|
-
maxRetries:
|
|
13034
|
-
lastError:
|
|
13035
|
-
qstashMessageId:
|
|
13036
|
-
qstashScheduleId:
|
|
13037
|
-
createdAt:
|
|
13038
|
-
});
|
|
13039
|
-
TaskIdParam =
|
|
13040
|
-
ScheduleIdParam =
|
|
13041
|
-
TasksProjectIdQuery =
|
|
13042
|
-
ListTasksQuery =
|
|
13043
|
-
projectId:
|
|
13044
|
-
status:
|
|
13045
|
-
type:
|
|
13046
|
-
limit:
|
|
13047
|
-
offset:
|
|
13048
|
-
});
|
|
13049
|
-
ScheduleTaskInput =
|
|
13050
|
-
projectId:
|
|
13051
|
-
environmentId:
|
|
13052
|
-
callbackUrl:
|
|
13053
|
-
payload:
|
|
13054
|
-
method:
|
|
13055
|
-
headers:
|
|
13056
|
-
delay:
|
|
13057
|
-
scheduledFor:
|
|
13058
|
-
retries:
|
|
13059
|
-
name:
|
|
13060
|
-
type:
|
|
13061
|
-
timeout:
|
|
13062
|
-
});
|
|
13063
|
-
CreateCronTaskInput =
|
|
13064
|
-
projectId:
|
|
13065
|
-
callbackUrl:
|
|
13066
|
-
cron:
|
|
13067
|
-
payload:
|
|
13068
|
-
method:
|
|
13069
|
-
headers:
|
|
13070
|
-
retries:
|
|
13071
|
-
name:
|
|
13072
|
-
type:
|
|
13073
|
-
paused:
|
|
13074
|
-
environmentId:
|
|
13075
|
-
taskName:
|
|
13076
|
-
handlerPath:
|
|
13077
|
-
});
|
|
13078
|
-
CancelTaskInput =
|
|
13079
|
-
CronActionInput =
|
|
13080
|
-
DeleteCronInput =
|
|
13081
|
-
TasksStatusResult =
|
|
13082
|
-
available:
|
|
13083
|
-
provider:
|
|
13084
|
-
});
|
|
13085
|
-
ListTasksResult =
|
|
13086
|
-
jobs:
|
|
13087
|
-
total:
|
|
13088
|
-
limit:
|
|
13089
|
-
offset:
|
|
13090
|
-
});
|
|
13091
|
-
GetTaskResult =
|
|
13092
|
-
ScheduleTaskResult =
|
|
13093
|
-
jobId:
|
|
13094
|
-
messageId:
|
|
13095
|
-
scheduledFor:
|
|
13096
|
-
});
|
|
13097
|
-
CreateCronTaskResult =
|
|
13098
|
-
jobId:
|
|
13099
|
-
scheduleId:
|
|
13100
|
-
cron:
|
|
13101
|
-
paused:
|
|
13102
|
-
});
|
|
13103
|
-
CancelTaskResult =
|
|
13104
|
-
CronActionResult =
|
|
13133
|
+
callbackUrl: Schema102.String,
|
|
13134
|
+
payload: Schema102.NullOr(Schema102.Record({ key: Schema102.String, value: Schema102.Unknown })),
|
|
13135
|
+
method: Schema102.NullOr(TaskHttpMethod),
|
|
13136
|
+
headers: Schema102.NullOr(Schema102.Record({ key: Schema102.String, value: Schema102.String })),
|
|
13137
|
+
scheduledFor: Schema102.NullOr(Schema102.String),
|
|
13138
|
+
startedAt: Schema102.NullOr(Schema102.String),
|
|
13139
|
+
completedAt: Schema102.NullOr(Schema102.String),
|
|
13140
|
+
failedAt: Schema102.NullOr(Schema102.String),
|
|
13141
|
+
cronExpression: Schema102.NullOr(Schema102.String),
|
|
13142
|
+
retries: Schema102.Number,
|
|
13143
|
+
maxRetries: Schema102.Number,
|
|
13144
|
+
lastError: Schema102.NullOr(Schema102.String),
|
|
13145
|
+
qstashMessageId: Schema102.NullOr(Schema102.String),
|
|
13146
|
+
qstashScheduleId: Schema102.NullOr(Schema102.String),
|
|
13147
|
+
createdAt: Schema102.String
|
|
13148
|
+
});
|
|
13149
|
+
TaskIdParam = Schema102.Struct({ jobId: Schema102.String });
|
|
13150
|
+
ScheduleIdParam = Schema102.Struct({ scheduleId: Schema102.String });
|
|
13151
|
+
TasksProjectIdQuery = Schema102.Struct({ projectId: Schema102.String });
|
|
13152
|
+
ListTasksQuery = Schema102.Struct({
|
|
13153
|
+
projectId: Schema102.String,
|
|
13154
|
+
status: Schema102.optional(Schema102.Literal("all", "pending", "queued", "running", "completed", "failed", "scheduled", "paused", "cancelled", "deleted")),
|
|
13155
|
+
type: Schema102.optional(Schema102.Literal("all", "one-time", "cron")),
|
|
13156
|
+
limit: Schema102.optional(Schema102.String),
|
|
13157
|
+
offset: Schema102.optional(Schema102.String)
|
|
13158
|
+
});
|
|
13159
|
+
ScheduleTaskInput = Schema102.Struct({
|
|
13160
|
+
projectId: Schema102.String,
|
|
13161
|
+
environmentId: Schema102.optional(Schema102.String),
|
|
13162
|
+
callbackUrl: Schema102.String,
|
|
13163
|
+
payload: Schema102.optional(Schema102.Record({ key: Schema102.String, value: Schema102.Unknown })),
|
|
13164
|
+
method: Schema102.optional(TaskHttpMethod),
|
|
13165
|
+
headers: Schema102.optional(Schema102.Record({ key: Schema102.String, value: Schema102.String })),
|
|
13166
|
+
delay: Schema102.optional(Schema102.Number),
|
|
13167
|
+
scheduledFor: Schema102.optional(Schema102.String),
|
|
13168
|
+
retries: Schema102.optional(Schema102.Number),
|
|
13169
|
+
name: Schema102.optional(Schema102.String),
|
|
13170
|
+
type: Schema102.optional(Schema102.String),
|
|
13171
|
+
timeout: Schema102.optional(Schema102.Number)
|
|
13172
|
+
});
|
|
13173
|
+
CreateCronTaskInput = Schema102.Struct({
|
|
13174
|
+
projectId: Schema102.String,
|
|
13175
|
+
callbackUrl: Schema102.String,
|
|
13176
|
+
cron: Schema102.String,
|
|
13177
|
+
payload: Schema102.optional(Schema102.Record({ key: Schema102.String, value: Schema102.Unknown })),
|
|
13178
|
+
method: Schema102.optional(TaskHttpMethod),
|
|
13179
|
+
headers: Schema102.optional(Schema102.Record({ key: Schema102.String, value: Schema102.String })),
|
|
13180
|
+
retries: Schema102.optional(Schema102.Number),
|
|
13181
|
+
name: Schema102.String,
|
|
13182
|
+
type: Schema102.optional(Schema102.String),
|
|
13183
|
+
paused: Schema102.optional(Schema102.Boolean),
|
|
13184
|
+
environmentId: Schema102.optional(Schema102.String),
|
|
13185
|
+
taskName: Schema102.optional(Schema102.String),
|
|
13186
|
+
handlerPath: Schema102.optional(Schema102.String)
|
|
13187
|
+
});
|
|
13188
|
+
CancelTaskInput = Schema102.Struct({ projectId: Schema102.String });
|
|
13189
|
+
CronActionInput = Schema102.Struct({ projectId: Schema102.String });
|
|
13190
|
+
DeleteCronInput = Schema102.Struct({ projectId: Schema102.String });
|
|
13191
|
+
TasksStatusResult = Schema102.Struct({
|
|
13192
|
+
available: Schema102.Boolean,
|
|
13193
|
+
provider: Schema102.String
|
|
13194
|
+
});
|
|
13195
|
+
ListTasksResult = Schema102.Struct({
|
|
13196
|
+
jobs: Schema102.Array(Task),
|
|
13197
|
+
total: Schema102.Number,
|
|
13198
|
+
limit: Schema102.Number,
|
|
13199
|
+
offset: Schema102.Number
|
|
13200
|
+
});
|
|
13201
|
+
GetTaskResult = Schema102.Struct({ job: Task });
|
|
13202
|
+
ScheduleTaskResult = Schema102.Struct({
|
|
13203
|
+
jobId: Schema102.String,
|
|
13204
|
+
messageId: Schema102.optional(Schema102.String),
|
|
13205
|
+
scheduledFor: Schema102.NullOr(Schema102.String)
|
|
13206
|
+
});
|
|
13207
|
+
CreateCronTaskResult = Schema102.Struct({
|
|
13208
|
+
jobId: Schema102.String,
|
|
13209
|
+
scheduleId: Schema102.String,
|
|
13210
|
+
cron: Schema102.String,
|
|
13211
|
+
paused: Schema102.Boolean
|
|
13212
|
+
});
|
|
13213
|
+
CancelTaskResult = Schema102.Struct({ success: Schema102.Boolean });
|
|
13214
|
+
CronActionResult = Schema102.Struct({ success: Schema102.Boolean });
|
|
13105
13215
|
}
|
|
13106
13216
|
});
|
|
13107
13217
|
|
|
13108
13218
|
// ../contract/dist/endpoints/users.js
|
|
13109
|
-
import { Schema as
|
|
13219
|
+
import { Schema as Schema103 } from "effect";
|
|
13110
13220
|
var SessionIdPath, usersEndpoints;
|
|
13111
13221
|
var init_users = __esm({
|
|
13112
13222
|
"../contract/dist/endpoints/users.js"() {
|
|
13113
13223
|
"use strict";
|
|
13114
13224
|
init_endpoint();
|
|
13115
13225
|
init_user();
|
|
13116
|
-
SessionIdPath =
|
|
13226
|
+
SessionIdPath = Schema103.Struct({ sessionId: Schema103.String });
|
|
13117
13227
|
usersEndpoints = {
|
|
13118
13228
|
whoami: defineEndpoint({
|
|
13119
13229
|
method: "GET",
|
|
@@ -13148,28 +13258,28 @@ var init_users = __esm({
|
|
|
13148
13258
|
method: "POST",
|
|
13149
13259
|
path: "/user/password",
|
|
13150
13260
|
body: ChangePasswordInput,
|
|
13151
|
-
response:
|
|
13261
|
+
response: Schema103.Struct({ success: Schema103.Boolean }),
|
|
13152
13262
|
summary: "Change password (requires current password)",
|
|
13153
13263
|
tags: ["users"]
|
|
13154
13264
|
}),
|
|
13155
13265
|
getConnectedAccounts: defineEndpoint({
|
|
13156
13266
|
method: "GET",
|
|
13157
13267
|
path: "/user/connected-accounts",
|
|
13158
|
-
response:
|
|
13268
|
+
response: Schema103.Array(ConnectedAccount),
|
|
13159
13269
|
summary: "List OAuth providers connected to the current account",
|
|
13160
13270
|
tags: ["users"]
|
|
13161
13271
|
}),
|
|
13162
13272
|
getLoginHistory: defineEndpoint({
|
|
13163
13273
|
method: "GET",
|
|
13164
13274
|
path: "/user/login-history",
|
|
13165
|
-
response:
|
|
13275
|
+
response: Schema103.Array(LoginHistoryEntry),
|
|
13166
13276
|
summary: "Get recent login attempts (last 20)",
|
|
13167
13277
|
tags: ["users"]
|
|
13168
13278
|
}),
|
|
13169
13279
|
getSessions: defineEndpoint({
|
|
13170
13280
|
method: "GET",
|
|
13171
13281
|
path: "/user/sessions",
|
|
13172
|
-
response:
|
|
13282
|
+
response: Schema103.Array(UserSession),
|
|
13173
13283
|
summary: "List active sessions",
|
|
13174
13284
|
tags: ["users"]
|
|
13175
13285
|
}),
|
|
@@ -13177,7 +13287,7 @@ var init_users = __esm({
|
|
|
13177
13287
|
method: "DELETE",
|
|
13178
13288
|
path: "/user/sessions/:sessionId",
|
|
13179
13289
|
params: SessionIdPath,
|
|
13180
|
-
response:
|
|
13290
|
+
response: Schema103.Struct({ success: Schema103.Boolean }),
|
|
13181
13291
|
summary: "Revoke a specific session",
|
|
13182
13292
|
tags: ["users"]
|
|
13183
13293
|
}),
|
|
@@ -13207,521 +13317,521 @@ var init_users = __esm({
|
|
|
13207
13317
|
});
|
|
13208
13318
|
|
|
13209
13319
|
// ../contract/dist/schemas/webhooks.js
|
|
13210
|
-
import { Schema as
|
|
13320
|
+
import { Schema as Schema104 } from "effect";
|
|
13211
13321
|
var WebhookStatus, WebhookPeriod, WebhookEnvironment, ProjectRef3, GetWebhookConfigResult, UpdateWebhookConfigInput, UpdateWebhookConfigResult, WebhookDelivery, WebhookDeliveryDetail, ListWebhookDeliveriesQuery, ListWebhookDeliveriesResult, ReplayDeliveryResult, FailedDeliveriesQuery, FailedDelivery, FailedDeliveriesResult, WebhookStatsQuery, WebhookStatsResult, WebhooksAdminOverviewResult, AdminProjectDeliveriesQuery, AdminProjectDeliveryItem, AdminProjectDeliveriesResult, BulkReplayInput, BulkReplayResult;
|
|
13212
13322
|
var init_webhooks = __esm({
|
|
13213
13323
|
"../contract/dist/schemas/webhooks.js"() {
|
|
13214
13324
|
"use strict";
|
|
13215
|
-
WebhookStatus =
|
|
13216
|
-
WebhookPeriod =
|
|
13217
|
-
WebhookEnvironment =
|
|
13218
|
-
id:
|
|
13219
|
-
name:
|
|
13220
|
-
webhookUrl:
|
|
13221
|
-
hasSecret:
|
|
13222
|
-
updatedAt:
|
|
13223
|
-
});
|
|
13224
|
-
ProjectRef3 =
|
|
13225
|
-
id:
|
|
13226
|
-
name:
|
|
13227
|
-
slug:
|
|
13228
|
-
});
|
|
13229
|
-
GetWebhookConfigResult =
|
|
13325
|
+
WebhookStatus = Schema104.Literal("pending", "queued", "delivered", "failed", "skipped");
|
|
13326
|
+
WebhookPeriod = Schema104.Literal("day", "week", "month");
|
|
13327
|
+
WebhookEnvironment = Schema104.Struct({
|
|
13328
|
+
id: Schema104.String,
|
|
13329
|
+
name: Schema104.String,
|
|
13330
|
+
webhookUrl: Schema104.NullOr(Schema104.String),
|
|
13331
|
+
hasSecret: Schema104.Boolean,
|
|
13332
|
+
updatedAt: Schema104.String
|
|
13333
|
+
});
|
|
13334
|
+
ProjectRef3 = Schema104.Struct({
|
|
13335
|
+
id: Schema104.String,
|
|
13336
|
+
name: Schema104.String,
|
|
13337
|
+
slug: Schema104.String
|
|
13338
|
+
});
|
|
13339
|
+
GetWebhookConfigResult = Schema104.Struct({
|
|
13230
13340
|
app: ProjectRef3,
|
|
13231
|
-
environments:
|
|
13232
|
-
supportedEvents:
|
|
13233
|
-
});
|
|
13234
|
-
UpdateWebhookConfigInput =
|
|
13235
|
-
environmentId:
|
|
13236
|
-
webhookUrl:
|
|
13237
|
-
regenerateSecret:
|
|
13238
|
-
});
|
|
13239
|
-
UpdateWebhookConfigResult =
|
|
13240
|
-
success:
|
|
13241
|
-
webhookUrl:
|
|
13242
|
-
secretGenerated:
|
|
13243
|
-
webhookSecretPrefix:
|
|
13244
|
-
});
|
|
13245
|
-
WebhookDelivery =
|
|
13246
|
-
id:
|
|
13247
|
-
event:
|
|
13248
|
-
url:
|
|
13341
|
+
environments: Schema104.Array(WebhookEnvironment),
|
|
13342
|
+
supportedEvents: Schema104.Array(Schema104.String)
|
|
13343
|
+
});
|
|
13344
|
+
UpdateWebhookConfigInput = Schema104.Struct({
|
|
13345
|
+
environmentId: Schema104.String,
|
|
13346
|
+
webhookUrl: Schema104.NullOr(Schema104.String),
|
|
13347
|
+
regenerateSecret: Schema104.optional(Schema104.Boolean)
|
|
13348
|
+
});
|
|
13349
|
+
UpdateWebhookConfigResult = Schema104.Struct({
|
|
13350
|
+
success: Schema104.Boolean,
|
|
13351
|
+
webhookUrl: Schema104.NullOr(Schema104.String),
|
|
13352
|
+
secretGenerated: Schema104.Boolean,
|
|
13353
|
+
webhookSecretPrefix: Schema104.optional(Schema104.String)
|
|
13354
|
+
});
|
|
13355
|
+
WebhookDelivery = Schema104.Struct({
|
|
13356
|
+
id: Schema104.String,
|
|
13357
|
+
event: Schema104.String,
|
|
13358
|
+
url: Schema104.String,
|
|
13249
13359
|
status: WebhookStatus,
|
|
13250
|
-
retryCount:
|
|
13251
|
-
responseStatus:
|
|
13252
|
-
error:
|
|
13253
|
-
createdAt:
|
|
13254
|
-
queuedAt:
|
|
13255
|
-
deliveredAt:
|
|
13256
|
-
failedAt:
|
|
13257
|
-
});
|
|
13258
|
-
WebhookDeliveryDetail =
|
|
13259
|
-
id:
|
|
13260
|
-
event:
|
|
13261
|
-
url:
|
|
13262
|
-
payload:
|
|
13360
|
+
retryCount: Schema104.Number,
|
|
13361
|
+
responseStatus: Schema104.NullOr(Schema104.Number),
|
|
13362
|
+
error: Schema104.NullOr(Schema104.String),
|
|
13363
|
+
createdAt: Schema104.String,
|
|
13364
|
+
queuedAt: Schema104.NullOr(Schema104.String),
|
|
13365
|
+
deliveredAt: Schema104.NullOr(Schema104.String),
|
|
13366
|
+
failedAt: Schema104.NullOr(Schema104.String)
|
|
13367
|
+
});
|
|
13368
|
+
WebhookDeliveryDetail = Schema104.Struct({
|
|
13369
|
+
id: Schema104.String,
|
|
13370
|
+
event: Schema104.String,
|
|
13371
|
+
url: Schema104.String,
|
|
13372
|
+
payload: Schema104.Record({ key: Schema104.String, value: Schema104.Unknown }),
|
|
13263
13373
|
status: WebhookStatus,
|
|
13264
|
-
messageId:
|
|
13265
|
-
responseStatus:
|
|
13266
|
-
error:
|
|
13267
|
-
retryCount:
|
|
13268
|
-
createdAt:
|
|
13269
|
-
queuedAt:
|
|
13270
|
-
deliveredAt:
|
|
13271
|
-
failedAt:
|
|
13272
|
-
});
|
|
13273
|
-
ListWebhookDeliveriesQuery =
|
|
13274
|
-
status:
|
|
13275
|
-
event:
|
|
13276
|
-
limit:
|
|
13277
|
-
offset:
|
|
13278
|
-
environmentId:
|
|
13279
|
-
});
|
|
13280
|
-
ListWebhookDeliveriesResult =
|
|
13281
|
-
deliveries:
|
|
13282
|
-
total:
|
|
13283
|
-
limit:
|
|
13284
|
-
offset:
|
|
13285
|
-
});
|
|
13286
|
-
ReplayDeliveryResult =
|
|
13287
|
-
success:
|
|
13288
|
-
newDeliveryId:
|
|
13289
|
-
messageId:
|
|
13290
|
-
});
|
|
13291
|
-
FailedDeliveriesQuery =
|
|
13292
|
-
limit:
|
|
13293
|
-
});
|
|
13294
|
-
FailedDelivery =
|
|
13295
|
-
id:
|
|
13296
|
-
event:
|
|
13297
|
-
url:
|
|
13298
|
-
error:
|
|
13299
|
-
retryCount:
|
|
13300
|
-
createdAt:
|
|
13301
|
-
failedAt:
|
|
13302
|
-
});
|
|
13303
|
-
FailedDeliveriesResult =
|
|
13304
|
-
deliveries:
|
|
13305
|
-
total:
|
|
13306
|
-
});
|
|
13307
|
-
WebhookStatsQuery =
|
|
13308
|
-
period:
|
|
13309
|
-
});
|
|
13310
|
-
WebhookStatsResult =
|
|
13374
|
+
messageId: Schema104.NullOr(Schema104.String),
|
|
13375
|
+
responseStatus: Schema104.NullOr(Schema104.Number),
|
|
13376
|
+
error: Schema104.NullOr(Schema104.String),
|
|
13377
|
+
retryCount: Schema104.Number,
|
|
13378
|
+
createdAt: Schema104.String,
|
|
13379
|
+
queuedAt: Schema104.NullOr(Schema104.String),
|
|
13380
|
+
deliveredAt: Schema104.NullOr(Schema104.String),
|
|
13381
|
+
failedAt: Schema104.NullOr(Schema104.String)
|
|
13382
|
+
});
|
|
13383
|
+
ListWebhookDeliveriesQuery = Schema104.Struct({
|
|
13384
|
+
status: Schema104.optional(WebhookStatus),
|
|
13385
|
+
event: Schema104.optional(Schema104.String),
|
|
13386
|
+
limit: Schema104.optional(Schema104.String),
|
|
13387
|
+
offset: Schema104.optional(Schema104.String),
|
|
13388
|
+
environmentId: Schema104.optional(Schema104.String)
|
|
13389
|
+
});
|
|
13390
|
+
ListWebhookDeliveriesResult = Schema104.Struct({
|
|
13391
|
+
deliveries: Schema104.Array(WebhookDelivery),
|
|
13392
|
+
total: Schema104.Number,
|
|
13393
|
+
limit: Schema104.Number,
|
|
13394
|
+
offset: Schema104.Number
|
|
13395
|
+
});
|
|
13396
|
+
ReplayDeliveryResult = Schema104.Struct({
|
|
13397
|
+
success: Schema104.Boolean,
|
|
13398
|
+
newDeliveryId: Schema104.NullOr(Schema104.String),
|
|
13399
|
+
messageId: Schema104.NullOr(Schema104.String)
|
|
13400
|
+
});
|
|
13401
|
+
FailedDeliveriesQuery = Schema104.Struct({
|
|
13402
|
+
limit: Schema104.optional(Schema104.String)
|
|
13403
|
+
});
|
|
13404
|
+
FailedDelivery = Schema104.Struct({
|
|
13405
|
+
id: Schema104.String,
|
|
13406
|
+
event: Schema104.String,
|
|
13407
|
+
url: Schema104.String,
|
|
13408
|
+
error: Schema104.NullOr(Schema104.String),
|
|
13409
|
+
retryCount: Schema104.Number,
|
|
13410
|
+
createdAt: Schema104.String,
|
|
13411
|
+
failedAt: Schema104.NullOr(Schema104.String)
|
|
13412
|
+
});
|
|
13413
|
+
FailedDeliveriesResult = Schema104.Struct({
|
|
13414
|
+
deliveries: Schema104.Array(FailedDelivery),
|
|
13415
|
+
total: Schema104.Number
|
|
13416
|
+
});
|
|
13417
|
+
WebhookStatsQuery = Schema104.Struct({
|
|
13418
|
+
period: Schema104.optional(WebhookPeriod)
|
|
13419
|
+
});
|
|
13420
|
+
WebhookStatsResult = Schema104.Struct({
|
|
13311
13421
|
period: WebhookPeriod,
|
|
13312
|
-
totals:
|
|
13313
|
-
total:
|
|
13314
|
-
delivered:
|
|
13315
|
-
failed:
|
|
13316
|
-
pending:
|
|
13317
|
-
deliveryRate:
|
|
13318
|
-
}),
|
|
13319
|
-
byEvent:
|
|
13320
|
-
event:
|
|
13321
|
-
count:
|
|
13422
|
+
totals: Schema104.Struct({
|
|
13423
|
+
total: Schema104.Number,
|
|
13424
|
+
delivered: Schema104.Number,
|
|
13425
|
+
failed: Schema104.Number,
|
|
13426
|
+
pending: Schema104.Number,
|
|
13427
|
+
deliveryRate: Schema104.Number
|
|
13428
|
+
}),
|
|
13429
|
+
byEvent: Schema104.Array(Schema104.Struct({
|
|
13430
|
+
event: Schema104.String,
|
|
13431
|
+
count: Schema104.Number
|
|
13322
13432
|
})),
|
|
13323
|
-
byStatus:
|
|
13433
|
+
byStatus: Schema104.Array(Schema104.Struct({
|
|
13324
13434
|
status: WebhookStatus,
|
|
13325
|
-
count:
|
|
13435
|
+
count: Schema104.Number
|
|
13326
13436
|
}))
|
|
13327
13437
|
});
|
|
13328
|
-
WebhooksAdminOverviewResult =
|
|
13438
|
+
WebhooksAdminOverviewResult = Schema104.Struct({
|
|
13329
13439
|
period: WebhookPeriod,
|
|
13330
|
-
totals:
|
|
13331
|
-
total:
|
|
13332
|
-
delivered:
|
|
13333
|
-
failed:
|
|
13334
|
-
pending:
|
|
13335
|
-
deliveryRate:
|
|
13336
|
-
}),
|
|
13337
|
-
byProject:
|
|
13338
|
-
projectId:
|
|
13339
|
-
projectName:
|
|
13340
|
-
total:
|
|
13341
|
-
delivered:
|
|
13342
|
-
failed:
|
|
13343
|
-
deliveryRate:
|
|
13440
|
+
totals: Schema104.Struct({
|
|
13441
|
+
total: Schema104.Number,
|
|
13442
|
+
delivered: Schema104.Number,
|
|
13443
|
+
failed: Schema104.Number,
|
|
13444
|
+
pending: Schema104.Number,
|
|
13445
|
+
deliveryRate: Schema104.Number
|
|
13446
|
+
}),
|
|
13447
|
+
byProject: Schema104.Array(Schema104.Struct({
|
|
13448
|
+
projectId: Schema104.String,
|
|
13449
|
+
projectName: Schema104.String,
|
|
13450
|
+
total: Schema104.Number,
|
|
13451
|
+
delivered: Schema104.Number,
|
|
13452
|
+
failed: Schema104.Number,
|
|
13453
|
+
deliveryRate: Schema104.Number
|
|
13344
13454
|
})),
|
|
13345
|
-
byEvent:
|
|
13346
|
-
event:
|
|
13347
|
-
count:
|
|
13455
|
+
byEvent: Schema104.Array(Schema104.Struct({
|
|
13456
|
+
event: Schema104.String,
|
|
13457
|
+
count: Schema104.Number
|
|
13348
13458
|
})),
|
|
13349
|
-
recentFailures:
|
|
13350
|
-
id:
|
|
13351
|
-
projectId:
|
|
13352
|
-
projectName:
|
|
13353
|
-
event:
|
|
13354
|
-
url:
|
|
13355
|
-
error:
|
|
13356
|
-
retryCount:
|
|
13357
|
-
responseStatus:
|
|
13358
|
-
timestamp:
|
|
13359
|
-
failedAt:
|
|
13459
|
+
recentFailures: Schema104.Array(Schema104.Struct({
|
|
13460
|
+
id: Schema104.String,
|
|
13461
|
+
projectId: Schema104.String,
|
|
13462
|
+
projectName: Schema104.String,
|
|
13463
|
+
event: Schema104.String,
|
|
13464
|
+
url: Schema104.String,
|
|
13465
|
+
error: Schema104.NullOr(Schema104.String),
|
|
13466
|
+
retryCount: Schema104.Number,
|
|
13467
|
+
responseStatus: Schema104.NullOr(Schema104.Number),
|
|
13468
|
+
timestamp: Schema104.String,
|
|
13469
|
+
failedAt: Schema104.NullOr(Schema104.String)
|
|
13360
13470
|
}))
|
|
13361
13471
|
});
|
|
13362
|
-
AdminProjectDeliveriesQuery =
|
|
13363
|
-
status:
|
|
13364
|
-
limit:
|
|
13472
|
+
AdminProjectDeliveriesQuery = Schema104.Struct({
|
|
13473
|
+
status: Schema104.optional(WebhookStatus),
|
|
13474
|
+
limit: Schema104.optional(Schema104.String)
|
|
13365
13475
|
});
|
|
13366
|
-
AdminProjectDeliveryItem =
|
|
13367
|
-
id:
|
|
13368
|
-
event:
|
|
13369
|
-
url:
|
|
13476
|
+
AdminProjectDeliveryItem = Schema104.Struct({
|
|
13477
|
+
id: Schema104.String,
|
|
13478
|
+
event: Schema104.String,
|
|
13479
|
+
url: Schema104.String,
|
|
13370
13480
|
status: WebhookStatus,
|
|
13371
|
-
retryCount:
|
|
13372
|
-
responseStatus:
|
|
13373
|
-
error:
|
|
13374
|
-
timestamp:
|
|
13375
|
-
queuedAt:
|
|
13376
|
-
deliveredAt:
|
|
13377
|
-
failedAt:
|
|
13378
|
-
});
|
|
13379
|
-
AdminProjectDeliveriesResult =
|
|
13380
|
-
BulkReplayInput =
|
|
13381
|
-
projectId:
|
|
13382
|
-
deliveryIds:
|
|
13383
|
-
limit:
|
|
13384
|
-
});
|
|
13385
|
-
BulkReplayResult =
|
|
13386
|
-
total:
|
|
13387
|
-
succeeded:
|
|
13388
|
-
failed:
|
|
13389
|
-
errors:
|
|
13390
|
-
deliveryId:
|
|
13391
|
-
error:
|
|
13481
|
+
retryCount: Schema104.Number,
|
|
13482
|
+
responseStatus: Schema104.NullOr(Schema104.Number),
|
|
13483
|
+
error: Schema104.NullOr(Schema104.String),
|
|
13484
|
+
timestamp: Schema104.String,
|
|
13485
|
+
queuedAt: Schema104.NullOr(Schema104.String),
|
|
13486
|
+
deliveredAt: Schema104.NullOr(Schema104.String),
|
|
13487
|
+
failedAt: Schema104.NullOr(Schema104.String)
|
|
13488
|
+
});
|
|
13489
|
+
AdminProjectDeliveriesResult = Schema104.Array(AdminProjectDeliveryItem);
|
|
13490
|
+
BulkReplayInput = Schema104.Struct({
|
|
13491
|
+
projectId: Schema104.String,
|
|
13492
|
+
deliveryIds: Schema104.optional(Schema104.Array(Schema104.String)),
|
|
13493
|
+
limit: Schema104.optional(Schema104.Number)
|
|
13494
|
+
});
|
|
13495
|
+
BulkReplayResult = Schema104.Struct({
|
|
13496
|
+
total: Schema104.Number,
|
|
13497
|
+
succeeded: Schema104.Number,
|
|
13498
|
+
failed: Schema104.Number,
|
|
13499
|
+
errors: Schema104.optional(Schema104.Array(Schema104.Struct({
|
|
13500
|
+
deliveryId: Schema104.String,
|
|
13501
|
+
error: Schema104.String
|
|
13392
13502
|
})))
|
|
13393
13503
|
});
|
|
13394
13504
|
}
|
|
13395
13505
|
});
|
|
13396
13506
|
|
|
13397
13507
|
// ../contract/dist/errors.js
|
|
13398
|
-
import { Schema as
|
|
13508
|
+
import { Schema as Schema105 } from "effect";
|
|
13399
13509
|
var BadRequestError, UnauthorizedError, ForbiddenError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitedError, InternalServerError, ApiError;
|
|
13400
13510
|
var init_errors = __esm({
|
|
13401
13511
|
"../contract/dist/errors.js"() {
|
|
13402
13512
|
"use strict";
|
|
13403
|
-
BadRequestError =
|
|
13404
|
-
_tag:
|
|
13405
|
-
code:
|
|
13406
|
-
message:
|
|
13407
|
-
details:
|
|
13513
|
+
BadRequestError = Schema105.Struct({
|
|
13514
|
+
_tag: Schema105.Literal("BadRequest"),
|
|
13515
|
+
code: Schema105.String,
|
|
13516
|
+
message: Schema105.String,
|
|
13517
|
+
details: Schema105.optional(Schema105.Unknown)
|
|
13408
13518
|
});
|
|
13409
|
-
UnauthorizedError =
|
|
13410
|
-
_tag:
|
|
13411
|
-
code:
|
|
13412
|
-
message:
|
|
13519
|
+
UnauthorizedError = Schema105.Struct({
|
|
13520
|
+
_tag: Schema105.Literal("Unauthorized"),
|
|
13521
|
+
code: Schema105.String,
|
|
13522
|
+
message: Schema105.String
|
|
13413
13523
|
});
|
|
13414
|
-
ForbiddenError =
|
|
13415
|
-
_tag:
|
|
13416
|
-
code:
|
|
13417
|
-
message:
|
|
13524
|
+
ForbiddenError = Schema105.Struct({
|
|
13525
|
+
_tag: Schema105.Literal("Forbidden"),
|
|
13526
|
+
code: Schema105.String,
|
|
13527
|
+
message: Schema105.String
|
|
13418
13528
|
});
|
|
13419
|
-
NotFoundError =
|
|
13420
|
-
_tag:
|
|
13421
|
-
code:
|
|
13422
|
-
message:
|
|
13529
|
+
NotFoundError = Schema105.Struct({
|
|
13530
|
+
_tag: Schema105.Literal("NotFound"),
|
|
13531
|
+
code: Schema105.String,
|
|
13532
|
+
message: Schema105.String
|
|
13423
13533
|
});
|
|
13424
|
-
ConflictError =
|
|
13425
|
-
_tag:
|
|
13426
|
-
code:
|
|
13427
|
-
message:
|
|
13534
|
+
ConflictError = Schema105.Struct({
|
|
13535
|
+
_tag: Schema105.Literal("Conflict"),
|
|
13536
|
+
code: Schema105.String,
|
|
13537
|
+
message: Schema105.String
|
|
13428
13538
|
});
|
|
13429
|
-
UnprocessableEntityError =
|
|
13430
|
-
_tag:
|
|
13431
|
-
code:
|
|
13432
|
-
message:
|
|
13433
|
-
details:
|
|
13539
|
+
UnprocessableEntityError = Schema105.Struct({
|
|
13540
|
+
_tag: Schema105.Literal("UnprocessableEntity"),
|
|
13541
|
+
code: Schema105.String,
|
|
13542
|
+
message: Schema105.String,
|
|
13543
|
+
details: Schema105.optional(Schema105.Unknown)
|
|
13434
13544
|
});
|
|
13435
|
-
RateLimitedError =
|
|
13436
|
-
_tag:
|
|
13437
|
-
code:
|
|
13438
|
-
message:
|
|
13439
|
-
retryAfterSeconds:
|
|
13545
|
+
RateLimitedError = Schema105.Struct({
|
|
13546
|
+
_tag: Schema105.Literal("RateLimited"),
|
|
13547
|
+
code: Schema105.String,
|
|
13548
|
+
message: Schema105.String,
|
|
13549
|
+
retryAfterSeconds: Schema105.optional(Schema105.Number)
|
|
13440
13550
|
});
|
|
13441
|
-
InternalServerError =
|
|
13442
|
-
_tag:
|
|
13443
|
-
code:
|
|
13444
|
-
message:
|
|
13551
|
+
InternalServerError = Schema105.Struct({
|
|
13552
|
+
_tag: Schema105.Literal("InternalServer"),
|
|
13553
|
+
code: Schema105.String,
|
|
13554
|
+
message: Schema105.String
|
|
13445
13555
|
});
|
|
13446
|
-
ApiError =
|
|
13556
|
+
ApiError = Schema105.Union(BadRequestError, UnauthorizedError, ForbiddenError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitedError, InternalServerError);
|
|
13447
13557
|
}
|
|
13448
13558
|
});
|
|
13449
13559
|
|
|
13450
13560
|
// ../contract/dist/schemas/ai.js
|
|
13451
|
-
import { Schema as
|
|
13561
|
+
import { Schema as Schema106 } from "effect";
|
|
13452
13562
|
var AIUsagePeriod, AIModelCapability, AIModel, GetModelsResponse, TokensBreakdown, CostBreakdown, ModelUsage, TypeUsage, GetUsageResponse, CurrentRateLimitUsage, GetRateLimitResponse;
|
|
13453
13563
|
var init_ai = __esm({
|
|
13454
13564
|
"../contract/dist/schemas/ai.js"() {
|
|
13455
13565
|
"use strict";
|
|
13456
|
-
AIUsagePeriod =
|
|
13457
|
-
AIModelCapability =
|
|
13458
|
-
AIModel =
|
|
13459
|
-
id:
|
|
13460
|
-
name:
|
|
13461
|
-
contextWindow:
|
|
13462
|
-
capabilities:
|
|
13463
|
-
inputCostPer1M:
|
|
13464
|
-
outputCostPer1M:
|
|
13465
|
-
description:
|
|
13466
|
-
});
|
|
13467
|
-
GetModelsResponse =
|
|
13468
|
-
models:
|
|
13469
|
-
nextCursor:
|
|
13470
|
-
hasMore:
|
|
13471
|
-
});
|
|
13472
|
-
TokensBreakdown =
|
|
13473
|
-
input:
|
|
13474
|
-
output:
|
|
13475
|
-
total:
|
|
13476
|
-
});
|
|
13477
|
-
CostBreakdown =
|
|
13478
|
-
microdollars:
|
|
13479
|
-
formatted:
|
|
13480
|
-
});
|
|
13481
|
-
ModelUsage =
|
|
13482
|
-
requests:
|
|
13483
|
-
tokens:
|
|
13484
|
-
cost:
|
|
13485
|
-
});
|
|
13486
|
-
TypeUsage =
|
|
13487
|
-
requests:
|
|
13488
|
-
tokens:
|
|
13489
|
-
});
|
|
13490
|
-
GetUsageResponse =
|
|
13566
|
+
AIUsagePeriod = Schema106.Literal("day", "week", "month");
|
|
13567
|
+
AIModelCapability = Schema106.Literal("chat", "vision", "tool", "embedding");
|
|
13568
|
+
AIModel = Schema106.Struct({
|
|
13569
|
+
id: Schema106.String,
|
|
13570
|
+
name: Schema106.String,
|
|
13571
|
+
contextWindow: Schema106.Number,
|
|
13572
|
+
capabilities: Schema106.Array(AIModelCapability),
|
|
13573
|
+
inputCostPer1M: Schema106.Number,
|
|
13574
|
+
outputCostPer1M: Schema106.Number,
|
|
13575
|
+
description: Schema106.optional(Schema106.String)
|
|
13576
|
+
});
|
|
13577
|
+
GetModelsResponse = Schema106.Struct({
|
|
13578
|
+
models: Schema106.Array(AIModel),
|
|
13579
|
+
nextCursor: Schema106.NullOr(Schema106.String),
|
|
13580
|
+
hasMore: Schema106.Boolean
|
|
13581
|
+
});
|
|
13582
|
+
TokensBreakdown = Schema106.Struct({
|
|
13583
|
+
input: Schema106.Number,
|
|
13584
|
+
output: Schema106.Number,
|
|
13585
|
+
total: Schema106.Number
|
|
13586
|
+
});
|
|
13587
|
+
CostBreakdown = Schema106.Struct({
|
|
13588
|
+
microdollars: Schema106.Number,
|
|
13589
|
+
formatted: Schema106.String
|
|
13590
|
+
});
|
|
13591
|
+
ModelUsage = Schema106.Struct({
|
|
13592
|
+
requests: Schema106.Number,
|
|
13593
|
+
tokens: Schema106.Number,
|
|
13594
|
+
cost: Schema106.Number
|
|
13595
|
+
});
|
|
13596
|
+
TypeUsage = Schema106.Struct({
|
|
13597
|
+
requests: Schema106.Number,
|
|
13598
|
+
tokens: Schema106.Number
|
|
13599
|
+
});
|
|
13600
|
+
GetUsageResponse = Schema106.Struct({
|
|
13491
13601
|
period: AIUsagePeriod,
|
|
13492
|
-
requests:
|
|
13602
|
+
requests: Schema106.Number,
|
|
13493
13603
|
tokens: TokensBreakdown,
|
|
13494
13604
|
cost: CostBreakdown,
|
|
13495
|
-
byModel:
|
|
13496
|
-
byType:
|
|
13497
|
-
});
|
|
13498
|
-
CurrentRateLimitUsage =
|
|
13499
|
-
requestsThisMinute:
|
|
13500
|
-
requestsToday:
|
|
13501
|
-
tokensThisMinute:
|
|
13502
|
-
tokensToday:
|
|
13503
|
-
costToday:
|
|
13504
|
-
});
|
|
13505
|
-
GetRateLimitResponse =
|
|
13506
|
-
requestsPerMinute:
|
|
13507
|
-
requestsPerDay:
|
|
13508
|
-
tokensPerMinute:
|
|
13509
|
-
tokensPerDay:
|
|
13510
|
-
costPerDayMicrodollars:
|
|
13605
|
+
byModel: Schema106.Record({ key: Schema106.String, value: ModelUsage }),
|
|
13606
|
+
byType: Schema106.Record({ key: Schema106.String, value: TypeUsage })
|
|
13607
|
+
});
|
|
13608
|
+
CurrentRateLimitUsage = Schema106.Struct({
|
|
13609
|
+
requestsThisMinute: Schema106.Number,
|
|
13610
|
+
requestsToday: Schema106.Number,
|
|
13611
|
+
tokensThisMinute: Schema106.Number,
|
|
13612
|
+
tokensToday: Schema106.Number,
|
|
13613
|
+
costToday: Schema106.Number
|
|
13614
|
+
});
|
|
13615
|
+
GetRateLimitResponse = Schema106.Struct({
|
|
13616
|
+
requestsPerMinute: Schema106.NullOr(Schema106.Number),
|
|
13617
|
+
requestsPerDay: Schema106.NullOr(Schema106.Number),
|
|
13618
|
+
tokensPerMinute: Schema106.NullOr(Schema106.Number),
|
|
13619
|
+
tokensPerDay: Schema106.NullOr(Schema106.Number),
|
|
13620
|
+
costPerDayMicrodollars: Schema106.NullOr(Schema106.Number),
|
|
13511
13621
|
current: CurrentRateLimitUsage
|
|
13512
13622
|
});
|
|
13513
13623
|
}
|
|
13514
13624
|
});
|
|
13515
13625
|
|
|
13516
13626
|
// ../contract/dist/schemas/billing.js
|
|
13517
|
-
import { Schema as
|
|
13627
|
+
import { Schema as Schema107 } from "effect";
|
|
13518
13628
|
var SdkBillingInterval, SdkBillingSubscriptionStatus, SdkBillingStatusLevel, SdkBillingType, SdkBillingTrustLevel, SdkBillingPlan, BillingPlansListResponse, SdkBillingSubscription, BillingSubscriptionResponse, BillingCheckoutRequest, BillingCheckoutResponse, BillingPortalRequest, BillingPortalResponse, SdkBillingBalanceInfo, SdkBillingStatusInfo, BillingBalanceResponse, SdkBillingUsagePeriod, SdkBillingUsageMetrics, BillingUsageResponse;
|
|
13519
13629
|
var init_billing = __esm({
|
|
13520
13630
|
"../contract/dist/schemas/billing.js"() {
|
|
13521
13631
|
"use strict";
|
|
13522
|
-
SdkBillingInterval =
|
|
13523
|
-
SdkBillingSubscriptionStatus =
|
|
13524
|
-
SdkBillingStatusLevel =
|
|
13525
|
-
SdkBillingType =
|
|
13526
|
-
SdkBillingTrustLevel =
|
|
13527
|
-
SdkBillingPlan =
|
|
13528
|
-
id:
|
|
13529
|
-
slug:
|
|
13530
|
-
name:
|
|
13531
|
-
description:
|
|
13532
|
-
features:
|
|
13533
|
-
monthlyPrice:
|
|
13534
|
-
annualPrice:
|
|
13535
|
-
lifetimePrice:
|
|
13536
|
-
isPopular:
|
|
13537
|
-
isActive:
|
|
13538
|
-
sortOrder:
|
|
13539
|
-
});
|
|
13540
|
-
BillingPlansListResponse =
|
|
13541
|
-
SdkBillingSubscription =
|
|
13542
|
-
id:
|
|
13543
|
-
userId:
|
|
13544
|
-
planId:
|
|
13545
|
-
planSlug:
|
|
13546
|
-
planName:
|
|
13632
|
+
SdkBillingInterval = Schema107.Literal("monthly", "annual", "lifetime");
|
|
13633
|
+
SdkBillingSubscriptionStatus = Schema107.Literal("active", "canceled", "past_due", "incomplete", "trialing", "paused");
|
|
13634
|
+
SdkBillingStatusLevel = Schema107.Literal("healthy", "low", "critical", "exhausted");
|
|
13635
|
+
SdkBillingType = Schema107.Literal("prepaid", "postpaid", "enterprise");
|
|
13636
|
+
SdkBillingTrustLevel = Schema107.Literal("new", "standard", "trusted", "enterprise");
|
|
13637
|
+
SdkBillingPlan = Schema107.Struct({
|
|
13638
|
+
id: Schema107.String,
|
|
13639
|
+
slug: Schema107.String,
|
|
13640
|
+
name: Schema107.String,
|
|
13641
|
+
description: Schema107.NullOr(Schema107.String),
|
|
13642
|
+
features: Schema107.Array(Schema107.String),
|
|
13643
|
+
monthlyPrice: Schema107.Number,
|
|
13644
|
+
annualPrice: Schema107.Number,
|
|
13645
|
+
lifetimePrice: Schema107.NullOr(Schema107.Number),
|
|
13646
|
+
isPopular: Schema107.Boolean,
|
|
13647
|
+
isActive: Schema107.Boolean,
|
|
13648
|
+
sortOrder: Schema107.Number
|
|
13649
|
+
});
|
|
13650
|
+
BillingPlansListResponse = Schema107.Array(SdkBillingPlan);
|
|
13651
|
+
SdkBillingSubscription = Schema107.Struct({
|
|
13652
|
+
id: Schema107.String,
|
|
13653
|
+
userId: Schema107.String,
|
|
13654
|
+
planId: Schema107.String,
|
|
13655
|
+
planSlug: Schema107.String,
|
|
13656
|
+
planName: Schema107.String,
|
|
13547
13657
|
status: SdkBillingSubscriptionStatus,
|
|
13548
13658
|
interval: SdkBillingInterval,
|
|
13549
|
-
currentPeriodStart:
|
|
13550
|
-
currentPeriodEnd:
|
|
13551
|
-
cancelAtPeriodEnd:
|
|
13552
|
-
trialEnd:
|
|
13553
|
-
});
|
|
13554
|
-
BillingSubscriptionResponse =
|
|
13555
|
-
BillingCheckoutRequest =
|
|
13556
|
-
userId:
|
|
13557
|
-
planSlug:
|
|
13659
|
+
currentPeriodStart: Schema107.NullOr(Schema107.String),
|
|
13660
|
+
currentPeriodEnd: Schema107.NullOr(Schema107.String),
|
|
13661
|
+
cancelAtPeriodEnd: Schema107.Boolean,
|
|
13662
|
+
trialEnd: Schema107.NullOr(Schema107.String)
|
|
13663
|
+
});
|
|
13664
|
+
BillingSubscriptionResponse = Schema107.NullOr(SdkBillingSubscription);
|
|
13665
|
+
BillingCheckoutRequest = Schema107.Struct({
|
|
13666
|
+
userId: Schema107.String,
|
|
13667
|
+
planSlug: Schema107.String,
|
|
13558
13668
|
interval: SdkBillingInterval,
|
|
13559
|
-
successUrl:
|
|
13560
|
-
cancelUrl:
|
|
13669
|
+
successUrl: Schema107.String,
|
|
13670
|
+
cancelUrl: Schema107.String
|
|
13561
13671
|
});
|
|
13562
|
-
BillingCheckoutResponse =
|
|
13563
|
-
checkoutUrl:
|
|
13564
|
-
sessionId:
|
|
13672
|
+
BillingCheckoutResponse = Schema107.Struct({
|
|
13673
|
+
checkoutUrl: Schema107.NullOr(Schema107.String),
|
|
13674
|
+
sessionId: Schema107.String
|
|
13565
13675
|
});
|
|
13566
|
-
BillingPortalRequest =
|
|
13567
|
-
userId:
|
|
13568
|
-
returnUrl:
|
|
13676
|
+
BillingPortalRequest = Schema107.Struct({
|
|
13677
|
+
userId: Schema107.String,
|
|
13678
|
+
returnUrl: Schema107.String
|
|
13569
13679
|
});
|
|
13570
|
-
BillingPortalResponse =
|
|
13571
|
-
portalUrl:
|
|
13680
|
+
BillingPortalResponse = Schema107.Struct({
|
|
13681
|
+
portalUrl: Schema107.String
|
|
13572
13682
|
});
|
|
13573
|
-
SdkBillingBalanceInfo =
|
|
13574
|
-
current:
|
|
13575
|
-
currentFormatted:
|
|
13683
|
+
SdkBillingBalanceInfo = Schema107.Struct({
|
|
13684
|
+
current: Schema107.Number,
|
|
13685
|
+
currentFormatted: Schema107.String
|
|
13576
13686
|
});
|
|
13577
|
-
SdkBillingStatusInfo =
|
|
13687
|
+
SdkBillingStatusInfo = Schema107.Struct({
|
|
13578
13688
|
level: SdkBillingStatusLevel,
|
|
13579
|
-
isHealthy:
|
|
13580
|
-
isLow:
|
|
13581
|
-
alertThreshold:
|
|
13689
|
+
isHealthy: Schema107.Boolean,
|
|
13690
|
+
isLow: Schema107.Boolean,
|
|
13691
|
+
alertThreshold: Schema107.Number
|
|
13582
13692
|
});
|
|
13583
|
-
BillingBalanceResponse =
|
|
13693
|
+
BillingBalanceResponse = Schema107.Struct({
|
|
13584
13694
|
balance: SdkBillingBalanceInfo,
|
|
13585
13695
|
status: SdkBillingStatusInfo,
|
|
13586
13696
|
billingType: SdkBillingType,
|
|
13587
13697
|
trustLevel: SdkBillingTrustLevel,
|
|
13588
|
-
spendingCap:
|
|
13589
|
-
currentMonthSpend:
|
|
13590
|
-
spendingCapPercent:
|
|
13591
|
-
gracePeriodEndsAt:
|
|
13592
|
-
isAdminOrg:
|
|
13593
|
-
});
|
|
13594
|
-
SdkBillingUsagePeriod =
|
|
13595
|
-
type:
|
|
13596
|
-
start:
|
|
13597
|
-
end:
|
|
13598
|
-
});
|
|
13599
|
-
SdkBillingUsageMetrics =
|
|
13600
|
-
aiCostMicrodollars:
|
|
13601
|
-
storageBytesUsed:
|
|
13602
|
-
storageEgressBytes:
|
|
13603
|
-
storageUploads:
|
|
13604
|
-
dbStorageBytes:
|
|
13605
|
-
dbComputeSeconds:
|
|
13606
|
-
emailSentCount:
|
|
13607
|
-
jobInvocationCount:
|
|
13608
|
-
cronActiveCount:
|
|
13609
|
-
notificationsSentCount:
|
|
13610
|
-
analyticsEventCount:
|
|
13611
|
-
webhookDeliveryCount:
|
|
13612
|
-
errorEventCount:
|
|
13613
|
-
authMau:
|
|
13614
|
-
});
|
|
13615
|
-
BillingUsageResponse =
|
|
13698
|
+
spendingCap: Schema107.NullOr(Schema107.Number),
|
|
13699
|
+
currentMonthSpend: Schema107.Number,
|
|
13700
|
+
spendingCapPercent: Schema107.NullOr(Schema107.Number),
|
|
13701
|
+
gracePeriodEndsAt: Schema107.NullOr(Schema107.String),
|
|
13702
|
+
isAdminOrg: Schema107.Boolean
|
|
13703
|
+
});
|
|
13704
|
+
SdkBillingUsagePeriod = Schema107.Struct({
|
|
13705
|
+
type: Schema107.Literal("month"),
|
|
13706
|
+
start: Schema107.String,
|
|
13707
|
+
end: Schema107.String
|
|
13708
|
+
});
|
|
13709
|
+
SdkBillingUsageMetrics = Schema107.Struct({
|
|
13710
|
+
aiCostMicrodollars: Schema107.Number,
|
|
13711
|
+
storageBytesUsed: Schema107.Number,
|
|
13712
|
+
storageEgressBytes: Schema107.Number,
|
|
13713
|
+
storageUploads: Schema107.Number,
|
|
13714
|
+
dbStorageBytes: Schema107.Number,
|
|
13715
|
+
dbComputeSeconds: Schema107.Number,
|
|
13716
|
+
emailSentCount: Schema107.Number,
|
|
13717
|
+
jobInvocationCount: Schema107.Number,
|
|
13718
|
+
cronActiveCount: Schema107.Number,
|
|
13719
|
+
notificationsSentCount: Schema107.Number,
|
|
13720
|
+
analyticsEventCount: Schema107.Number,
|
|
13721
|
+
webhookDeliveryCount: Schema107.Number,
|
|
13722
|
+
errorEventCount: Schema107.Number,
|
|
13723
|
+
authMau: Schema107.Number
|
|
13724
|
+
});
|
|
13725
|
+
BillingUsageResponse = Schema107.Struct({
|
|
13616
13726
|
period: SdkBillingUsagePeriod,
|
|
13617
|
-
metrics:
|
|
13727
|
+
metrics: Schema107.NullOr(SdkBillingUsageMetrics)
|
|
13618
13728
|
});
|
|
13619
13729
|
}
|
|
13620
13730
|
});
|
|
13621
13731
|
|
|
13622
13732
|
// ../contract/dist/schemas/consent.js
|
|
13623
|
-
import { Schema as
|
|
13733
|
+
import { Schema as Schema108 } from "effect";
|
|
13624
13734
|
var SdkConsentCategory, SdkConsentType, UserConsent, ConsentItem, SetConsentsRequest, SetConsentsResponse;
|
|
13625
13735
|
var init_consent = __esm({
|
|
13626
13736
|
"../contract/dist/schemas/consent.js"() {
|
|
13627
13737
|
"use strict";
|
|
13628
|
-
SdkConsentCategory =
|
|
13629
|
-
SdkConsentType =
|
|
13630
|
-
id:
|
|
13631
|
-
slug:
|
|
13738
|
+
SdkConsentCategory = Schema108.Literal("necessary", "analytics", "marketing", "preferences", "functional");
|
|
13739
|
+
SdkConsentType = Schema108.Struct({
|
|
13740
|
+
id: Schema108.String,
|
|
13741
|
+
slug: Schema108.String,
|
|
13632
13742
|
category: SdkConsentCategory,
|
|
13633
|
-
name:
|
|
13634
|
-
description:
|
|
13635
|
-
required:
|
|
13636
|
-
defaultEnabled:
|
|
13743
|
+
name: Schema108.String,
|
|
13744
|
+
description: Schema108.String,
|
|
13745
|
+
required: Schema108.Boolean,
|
|
13746
|
+
defaultEnabled: Schema108.Boolean
|
|
13637
13747
|
});
|
|
13638
|
-
UserConsent =
|
|
13639
|
-
slug:
|
|
13748
|
+
UserConsent = Schema108.Struct({
|
|
13749
|
+
slug: Schema108.String,
|
|
13640
13750
|
category: SdkConsentCategory,
|
|
13641
|
-
name:
|
|
13642
|
-
required:
|
|
13643
|
-
granted:
|
|
13644
|
-
grantedAt:
|
|
13645
|
-
version:
|
|
13751
|
+
name: Schema108.String,
|
|
13752
|
+
required: Schema108.Boolean,
|
|
13753
|
+
granted: Schema108.Boolean,
|
|
13754
|
+
grantedAt: Schema108.NullOr(Schema108.String),
|
|
13755
|
+
version: Schema108.NullOr(Schema108.Number)
|
|
13646
13756
|
});
|
|
13647
|
-
ConsentItem =
|
|
13648
|
-
slug:
|
|
13649
|
-
granted:
|
|
13757
|
+
ConsentItem = Schema108.Struct({
|
|
13758
|
+
slug: Schema108.String,
|
|
13759
|
+
granted: Schema108.Boolean
|
|
13650
13760
|
});
|
|
13651
|
-
SetConsentsRequest =
|
|
13652
|
-
userId:
|
|
13653
|
-
anonymousId:
|
|
13654
|
-
consents:
|
|
13655
|
-
source:
|
|
13656
|
-
userAgent:
|
|
13761
|
+
SetConsentsRequest = Schema108.Struct({
|
|
13762
|
+
userId: Schema108.optional(Schema108.String),
|
|
13763
|
+
anonymousId: Schema108.optional(Schema108.String),
|
|
13764
|
+
consents: Schema108.Array(ConsentItem),
|
|
13765
|
+
source: Schema108.optional(Schema108.Literal("banner", "settings", "api")),
|
|
13766
|
+
userAgent: Schema108.optional(Schema108.String)
|
|
13657
13767
|
});
|
|
13658
|
-
SetConsentsResponse =
|
|
13659
|
-
consents:
|
|
13768
|
+
SetConsentsResponse = Schema108.Struct({
|
|
13769
|
+
consents: Schema108.Array(ConsentItem)
|
|
13660
13770
|
});
|
|
13661
13771
|
}
|
|
13662
13772
|
});
|
|
13663
13773
|
|
|
13664
13774
|
// ../contract/dist/schemas/referrals.js
|
|
13665
|
-
import { Schema as
|
|
13775
|
+
import { Schema as Schema109 } from "effect";
|
|
13666
13776
|
var ReferralCodeStatus, ReferralLeaderboardPeriod, ReferralRewardKind, ReferralRewardConfig, ReferralRewardDefaults, GetCodeResponse, RegenerateCodeResponse, GetStatsResponse, RedeemRequest, RedeemResponse, ReferralLeaderboardEntry, ReferralLeaderboardResponse;
|
|
13667
13777
|
var init_referrals = __esm({
|
|
13668
13778
|
"../contract/dist/schemas/referrals.js"() {
|
|
13669
13779
|
"use strict";
|
|
13670
|
-
ReferralCodeStatus =
|
|
13671
|
-
ReferralLeaderboardPeriod =
|
|
13672
|
-
ReferralRewardKind =
|
|
13673
|
-
ReferralRewardConfig =
|
|
13780
|
+
ReferralCodeStatus = Schema109.Literal("pending", "completed", "expired");
|
|
13781
|
+
ReferralLeaderboardPeriod = Schema109.Literal("all", "month", "week");
|
|
13782
|
+
ReferralRewardKind = Schema109.Literal("points", "premium_trial", "discount", "credit");
|
|
13783
|
+
ReferralRewardConfig = Schema109.Struct({
|
|
13674
13784
|
type: ReferralRewardKind,
|
|
13675
|
-
points:
|
|
13676
|
-
days:
|
|
13677
|
-
discountPercent:
|
|
13678
|
-
creditCents:
|
|
13679
|
-
});
|
|
13680
|
-
ReferralRewardDefaults =
|
|
13681
|
-
referrerReward:
|
|
13682
|
-
refereeReward:
|
|
13683
|
-
doubleReward:
|
|
13684
|
-
minimumDaysBeforeReward:
|
|
13685
|
-
});
|
|
13686
|
-
GetCodeResponse =
|
|
13687
|
-
code:
|
|
13785
|
+
points: Schema109.optional(Schema109.Number),
|
|
13786
|
+
days: Schema109.optional(Schema109.Number),
|
|
13787
|
+
discountPercent: Schema109.optional(Schema109.Number),
|
|
13788
|
+
creditCents: Schema109.optional(Schema109.Number)
|
|
13789
|
+
});
|
|
13790
|
+
ReferralRewardDefaults = Schema109.Struct({
|
|
13791
|
+
referrerReward: Schema109.optional(ReferralRewardConfig),
|
|
13792
|
+
refereeReward: Schema109.optional(ReferralRewardConfig),
|
|
13793
|
+
doubleReward: Schema109.optional(Schema109.Boolean),
|
|
13794
|
+
minimumDaysBeforeReward: Schema109.optional(Schema109.Number)
|
|
13795
|
+
});
|
|
13796
|
+
GetCodeResponse = Schema109.Struct({
|
|
13797
|
+
code: Schema109.String,
|
|
13688
13798
|
status: ReferralCodeStatus
|
|
13689
13799
|
});
|
|
13690
|
-
RegenerateCodeResponse =
|
|
13691
|
-
code:
|
|
13692
|
-
totalReferrals:
|
|
13693
|
-
completedReferrals:
|
|
13694
|
-
pendingReferrals:
|
|
13695
|
-
});
|
|
13696
|
-
GetStatsResponse =
|
|
13697
|
-
totalReferrals:
|
|
13698
|
-
completedReferrals:
|
|
13699
|
-
pendingReferrals:
|
|
13700
|
-
});
|
|
13701
|
-
RedeemRequest =
|
|
13702
|
-
code:
|
|
13703
|
-
defaults:
|
|
13704
|
-
});
|
|
13705
|
-
RedeemResponse =
|
|
13706
|
-
success:
|
|
13707
|
-
rewardType:
|
|
13708
|
-
referredReward:
|
|
13709
|
-
referrerReward:
|
|
13710
|
-
});
|
|
13711
|
-
ReferralLeaderboardEntry =
|
|
13712
|
-
rank:
|
|
13713
|
-
userId:
|
|
13714
|
-
displayName:
|
|
13715
|
-
avatarUrl:
|
|
13716
|
-
value:
|
|
13717
|
-
isCurrentUser:
|
|
13718
|
-
metadata:
|
|
13719
|
-
submittedAt:
|
|
13720
|
-
});
|
|
13721
|
-
ReferralLeaderboardResponse =
|
|
13800
|
+
RegenerateCodeResponse = Schema109.Struct({
|
|
13801
|
+
code: Schema109.String,
|
|
13802
|
+
totalReferrals: Schema109.Number,
|
|
13803
|
+
completedReferrals: Schema109.Number,
|
|
13804
|
+
pendingReferrals: Schema109.Number
|
|
13805
|
+
});
|
|
13806
|
+
GetStatsResponse = Schema109.Struct({
|
|
13807
|
+
totalReferrals: Schema109.Number,
|
|
13808
|
+
completedReferrals: Schema109.Number,
|
|
13809
|
+
pendingReferrals: Schema109.Number
|
|
13810
|
+
});
|
|
13811
|
+
RedeemRequest = Schema109.Struct({
|
|
13812
|
+
code: Schema109.String,
|
|
13813
|
+
defaults: Schema109.optional(ReferralRewardDefaults)
|
|
13814
|
+
});
|
|
13815
|
+
RedeemResponse = Schema109.Struct({
|
|
13816
|
+
success: Schema109.Boolean,
|
|
13817
|
+
rewardType: Schema109.String,
|
|
13818
|
+
referredReward: Schema109.optional(Schema109.Record({ key: Schema109.String, value: Schema109.Unknown })),
|
|
13819
|
+
referrerReward: Schema109.optional(Schema109.Record({ key: Schema109.String, value: Schema109.Unknown }))
|
|
13820
|
+
});
|
|
13821
|
+
ReferralLeaderboardEntry = Schema109.Struct({
|
|
13822
|
+
rank: Schema109.Number,
|
|
13823
|
+
userId: Schema109.NullOr(Schema109.String),
|
|
13824
|
+
displayName: Schema109.String,
|
|
13825
|
+
avatarUrl: Schema109.NullOr(Schema109.String),
|
|
13826
|
+
value: Schema109.Number,
|
|
13827
|
+
isCurrentUser: Schema109.Boolean,
|
|
13828
|
+
metadata: Schema109.optional(Schema109.Record({ key: Schema109.String, value: Schema109.Unknown })),
|
|
13829
|
+
submittedAt: Schema109.String
|
|
13830
|
+
});
|
|
13831
|
+
ReferralLeaderboardResponse = Schema109.Struct({
|
|
13722
13832
|
period: ReferralLeaderboardPeriod,
|
|
13723
|
-
entries:
|
|
13724
|
-
currentUserRank:
|
|
13833
|
+
entries: Schema109.Array(ReferralLeaderboardEntry),
|
|
13834
|
+
currentUserRank: Schema109.NullOr(Schema109.Number)
|
|
13725
13835
|
});
|
|
13726
13836
|
}
|
|
13727
13837
|
});
|
|
@@ -13753,6 +13863,7 @@ var init_dist = __esm({
|
|
|
13753
13863
|
init_env_vars();
|
|
13754
13864
|
init_environments();
|
|
13755
13865
|
init_organizations();
|
|
13866
|
+
init_project_manifest2();
|
|
13756
13867
|
init_projects();
|
|
13757
13868
|
init_saml2();
|
|
13758
13869
|
init_secrets();
|
|
@@ -15288,9 +15399,11 @@ var projects_exports = {};
|
|
|
15288
15399
|
__export(projects_exports, {
|
|
15289
15400
|
create: () => create9,
|
|
15290
15401
|
delete: () => _delete8,
|
|
15291
|
-
|
|
15402
|
+
getManifest: () => getManifest,
|
|
15403
|
+
list: () => list14,
|
|
15404
|
+
putManifest: () => putManifest
|
|
15292
15405
|
});
|
|
15293
|
-
var orgHeaders6, list14, create9, _delete8;
|
|
15406
|
+
var orgHeaders6, list14, create9, _delete8, getManifest, putManifest;
|
|
15294
15407
|
var init_projects2 = __esm({
|
|
15295
15408
|
"../management/dist/projects.js"() {
|
|
15296
15409
|
"use strict";
|
|
@@ -15314,6 +15427,14 @@ var init_projects2 = __esm({
|
|
|
15314
15427
|
const { method, path: path6 } = projectsEndpoints2.delete;
|
|
15315
15428
|
return request(client, method, interpolatePath(path6, { id }));
|
|
15316
15429
|
};
|
|
15430
|
+
getManifest = (client, id) => {
|
|
15431
|
+
const { method, path: path6 } = projectManifestEndpoints.get;
|
|
15432
|
+
return request(client, method, interpolatePath(path6, { id }));
|
|
15433
|
+
};
|
|
15434
|
+
putManifest = (client, id, manifest) => {
|
|
15435
|
+
const { method, path: path6 } = projectManifestEndpoints.put;
|
|
15436
|
+
return request(client, method, interpolatePath(path6, { id }), { body: manifest });
|
|
15437
|
+
};
|
|
15317
15438
|
}
|
|
15318
15439
|
});
|
|
15319
15440
|
|
|
@@ -21333,7 +21454,7 @@ import { Console as Console12, Effect as Effect21 } from "effect";
|
|
|
21333
21454
|
|
|
21334
21455
|
// src/lib/manifest.ts
|
|
21335
21456
|
init_dist();
|
|
21336
|
-
import { Data as Data3, Effect as Effect20, Either, ParseResult, Schema as
|
|
21457
|
+
import { Data as Data3, Effect as Effect20, Either, ParseResult, Schema as Schema110 } from "effect";
|
|
21337
21458
|
var MANIFEST_FILENAME = "sylphx.toml";
|
|
21338
21459
|
var ManifestFileNotFoundError = class extends Data3.TaggedError("ManifestFileNotFoundError") {
|
|
21339
21460
|
get message() {
|
|
@@ -21397,7 +21518,7 @@ function parseTomlEffect(source, path6) {
|
|
|
21397
21518
|
});
|
|
21398
21519
|
}
|
|
21399
21520
|
function validateManifestEffect(parsed, path6) {
|
|
21400
|
-
const either =
|
|
21521
|
+
const either = Schema110.decodeUnknownEither(SylphxManifest, {
|
|
21401
21522
|
errors: "all",
|
|
21402
21523
|
// Reject typos + unknown keys so users catch mistakes locally rather
|
|
21403
21524
|
// than having the server silently drop fields on apply.
|
|
@@ -21479,11 +21600,21 @@ function renderManifestToml(manifest) {
|
|
|
21479
21600
|
parts.push(...kv(r.database));
|
|
21480
21601
|
parts.push("");
|
|
21481
21602
|
}
|
|
21603
|
+
if (r.kv) {
|
|
21604
|
+
parts.push("[resources.kv]");
|
|
21605
|
+
parts.push(...kv(r.kv));
|
|
21606
|
+
parts.push("");
|
|
21607
|
+
}
|
|
21482
21608
|
if (r.search) {
|
|
21483
21609
|
parts.push("[resources.search]");
|
|
21484
21610
|
parts.push(...kv(r.search));
|
|
21485
21611
|
parts.push("");
|
|
21486
21612
|
}
|
|
21613
|
+
if (r.volume) {
|
|
21614
|
+
parts.push("[resources.volume]");
|
|
21615
|
+
parts.push(...kv(r.volume));
|
|
21616
|
+
parts.push("");
|
|
21617
|
+
}
|
|
21487
21618
|
}
|
|
21488
21619
|
if (manifest.environments) {
|
|
21489
21620
|
for (const [envName, override] of Object.entries(manifest.environments)) {
|
|
@@ -33992,12 +34123,12 @@ function volumesCreateEffect(input) {
|
|
|
33992
34123
|
})
|
|
33993
34124
|
);
|
|
33994
34125
|
}
|
|
33995
|
-
if (!["
|
|
34126
|
+
if (!["single-writer", "shared"].includes(input.sharing)) {
|
|
33996
34127
|
return yield* Effect73.fail(
|
|
33997
34128
|
new CliArgError({
|
|
33998
34129
|
command: "volumes",
|
|
33999
|
-
argument: "--
|
|
34000
|
-
message: "--
|
|
34130
|
+
argument: "--sharing",
|
|
34131
|
+
message: "--sharing must be single-writer or shared"
|
|
34001
34132
|
})
|
|
34002
34133
|
);
|
|
34003
34134
|
}
|
|
@@ -34009,7 +34140,7 @@ function volumesCreateEffect(input) {
|
|
|
34009
34140
|
api2.createVolume(projectId, {
|
|
34010
34141
|
name: input.name,
|
|
34011
34142
|
sizeGb,
|
|
34012
|
-
|
|
34143
|
+
sharing: input.sharing,
|
|
34013
34144
|
mountPath: input.mount
|
|
34014
34145
|
})
|
|
34015
34146
|
);
|
|
@@ -34018,7 +34149,7 @@ function volumesCreateEffect(input) {
|
|
|
34018
34149
|
yield* Console63.log("");
|
|
34019
34150
|
yield* Console63.log(` ${chalk_default.dim("ID:")} ${vol.id}`);
|
|
34020
34151
|
yield* Console63.log(` ${chalk_default.dim("Size:")} ${vol.sizeGb}Gi`);
|
|
34021
|
-
yield* Console63.log(` ${chalk_default.dim("
|
|
34152
|
+
yield* Console63.log(` ${chalk_default.dim("Sharing:")} ${vol.sharing ?? "single-writer"}`);
|
|
34022
34153
|
yield* Console63.log("");
|
|
34023
34154
|
});
|
|
34024
34155
|
}
|
|
@@ -34068,9 +34199,9 @@ var createCmd14 = Command63.make(
|
|
|
34068
34199
|
Options63.withDescription("Size in GiB (default: 10)"),
|
|
34069
34200
|
Options63.withDefault("10")
|
|
34070
34201
|
),
|
|
34071
|
-
|
|
34072
|
-
Options63.withDescription("
|
|
34073
|
-
Options63.withDefault("
|
|
34202
|
+
sharing: Options63.text("sharing").pipe(
|
|
34203
|
+
Options63.withDescription("single-writer or shared (default: single-writer)"),
|
|
34204
|
+
Options63.withDefault("single-writer")
|
|
34074
34205
|
),
|
|
34075
34206
|
mount: Options63.text("mount").pipe(
|
|
34076
34207
|
Options63.withDescription("Default mount path (optional)"),
|
|
@@ -34079,10 +34210,10 @@ var createCmd14 = Command63.make(
|
|
|
34079
34210
|
project: projectOption37,
|
|
34080
34211
|
org: orgOption25
|
|
34081
34212
|
},
|
|
34082
|
-
({ name, size,
|
|
34213
|
+
({ name, size, sharing, mount, project, org }) => volumesCreateEffect({
|
|
34083
34214
|
name,
|
|
34084
34215
|
size,
|
|
34085
|
-
|
|
34216
|
+
sharing,
|
|
34086
34217
|
mount: mount._tag === "Some" ? mount.value : void 0,
|
|
34087
34218
|
project: project._tag === "Some" ? project.value : void 0,
|
|
34088
34219
|
org: org._tag === "Some" ? org.value : void 0
|