@distilled.cloud/turso 0.30.2 → 1.0.0-rc.1
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/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +8 -0
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts +24 -3
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +13 -4
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +8 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -6
- package/lib/index.js.map +1 -1
- package/lib/protocol.d.ts +18 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +46 -0
- package/lib/protocol.js.map +1 -0
- package/lib/retry.d.ts +4 -4
- package/lib/retry.js +4 -4
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +3 -0
- package/lib/services/index.js.map +1 -0
- package/lib/services/turso.d.ts +1280 -0
- package/lib/services/turso.d.ts.map +1 -0
- package/lib/services/turso.js +1463 -0
- package/lib/services/turso.js.map +1 -0
- package/lib/traits.d.ts +10 -2
- package/lib/traits.d.ts.map +1 -1
- package/lib/traits.js +10 -2
- package/lib/traits.js.map +1 -1
- package/package.json +31 -37
- package/src/credentials.ts +8 -0
- package/src/errors.ts +42 -5
- package/src/index.ts +12 -6
- package/src/protocol.ts +68 -0
- package/src/retry.ts +4 -4
- package/src/services/index.ts +2 -0
- package/src/services/turso.ts +3426 -0
- package/src/traits.ts +44 -2
- package/README.md +0 -36
- package/lib/category.d.ts +0 -5
- package/lib/category.d.ts.map +0 -1
- package/lib/category.js +0 -5
- package/lib/category.js.map +0 -1
- package/lib/client.d.ts +0 -11
- package/lib/client.d.ts.map +0 -1
- package/lib/client.js +0 -59
- package/lib/client.js.map +0 -1
- package/lib/operations/addLocationToGroup.d.ts +0 -30
- package/lib/operations/addLocationToGroup.d.ts.map +0 -1
- package/lib/operations/addLocationToGroup.js +0 -40
- package/lib/operations/addLocationToGroup.js.map +0 -1
- package/lib/operations/addOrganizationMember.d.ts +0 -22
- package/lib/operations/addOrganizationMember.d.ts.map +0 -1
- package/lib/operations/addOrganizationMember.js +0 -32
- package/lib/operations/addOrganizationMember.js.map +0 -1
- package/lib/operations/createAPIToken.d.ts +0 -28
- package/lib/operations/createAPIToken.d.ts.map +0 -1
- package/lib/operations/createAPIToken.js +0 -44
- package/lib/operations/createAPIToken.js.map +0 -1
- package/lib/operations/createDatabase.d.ts +0 -35
- package/lib/operations/createDatabase.d.ts.map +0 -1
- package/lib/operations/createDatabase.js +0 -53
- package/lib/operations/createDatabase.js.map +0 -1
- package/lib/operations/createDatabaseToken.d.ts +0 -30
- package/lib/operations/createDatabaseToken.d.ts.map +0 -1
- package/lib/operations/createDatabaseToken.js +0 -40
- package/lib/operations/createDatabaseToken.js.map +0 -1
- package/lib/operations/createGroup.d.ts +0 -29
- package/lib/operations/createGroup.d.ts.map +0 -1
- package/lib/operations/createGroup.js +0 -51
- package/lib/operations/createGroup.js.map +0 -1
- package/lib/operations/createGroupToken.d.ts +0 -30
- package/lib/operations/createGroupToken.d.ts.map +0 -1
- package/lib/operations/createGroupToken.js +0 -38
- package/lib/operations/createGroupToken.js.map +0 -1
- package/lib/operations/deleteDatabase.d.ts +0 -21
- package/lib/operations/deleteDatabase.d.ts.map +0 -1
- package/lib/operations/deleteDatabase.js +0 -29
- package/lib/operations/deleteDatabase.js.map +0 -1
- package/lib/operations/deleteGroup.d.ts +0 -28
- package/lib/operations/deleteGroup.d.ts.map +0 -1
- package/lib/operations/deleteGroup.js +0 -36
- package/lib/operations/deleteGroup.js.map +0 -1
- package/lib/operations/deleteOrganizationInviteByEmail.d.ts +0 -21
- package/lib/operations/deleteOrganizationInviteByEmail.d.ts.map +0 -1
- package/lib/operations/deleteOrganizationInviteByEmail.js +0 -30
- package/lib/operations/deleteOrganizationInviteByEmail.js.map +0 -1
- package/lib/operations/deleteOrganizationInviteByEmailV2.d.ts +0 -18
- package/lib/operations/deleteOrganizationInviteByEmailV2.d.ts.map +0 -1
- package/lib/operations/deleteOrganizationInviteByEmailV2.js +0 -29
- package/lib/operations/deleteOrganizationInviteByEmailV2.js.map +0 -1
- package/lib/operations/getCurrentUser.d.ts +0 -23
- package/lib/operations/getCurrentUser.d.ts.map +0 -1
- package/lib/operations/getCurrentUser.js +0 -26
- package/lib/operations/getCurrentUser.js.map +0 -1
- package/lib/operations/getDatabase.d.ts +0 -36
- package/lib/operations/getDatabase.d.ts.map +0 -1
- package/lib/operations/getDatabase.js +0 -44
- package/lib/operations/getDatabase.js.map +0 -1
- package/lib/operations/getDatabaseConfiguration.d.ts +0 -27
- package/lib/operations/getDatabaseConfiguration.d.ts.map +0 -1
- package/lib/operations/getDatabaseConfiguration.js +0 -37
- package/lib/operations/getDatabaseConfiguration.js.map +0 -1
- package/lib/operations/getDatabaseInstance.d.ts +0 -29
- package/lib/operations/getDatabaseInstance.d.ts.map +0 -1
- package/lib/operations/getDatabaseInstance.js +0 -39
- package/lib/operations/getDatabaseInstance.js.map +0 -1
- package/lib/operations/getDatabaseStats.d.ts +0 -25
- package/lib/operations/getDatabaseStats.d.ts.map +0 -1
- package/lib/operations/getDatabaseStats.js +0 -33
- package/lib/operations/getDatabaseStats.js.map +0 -1
- package/lib/operations/getDatabaseUsage.d.ts +0 -42
- package/lib/operations/getDatabaseUsage.d.ts.map +0 -1
- package/lib/operations/getDatabaseUsage.js +0 -50
- package/lib/operations/getDatabaseUsage.js.map +0 -1
- package/lib/operations/getGroup.d.ts +0 -28
- package/lib/operations/getGroup.d.ts.map +0 -1
- package/lib/operations/getGroup.js +0 -36
- package/lib/operations/getGroup.js.map +0 -1
- package/lib/operations/getGroupConfiguration.d.ts +0 -21
- package/lib/operations/getGroupConfiguration.d.ts.map +0 -1
- package/lib/operations/getGroupConfiguration.js +0 -31
- package/lib/operations/getGroupConfiguration.js.map +0 -1
- package/lib/operations/getOrganization.d.ts +0 -30
- package/lib/operations/getOrganization.d.ts.map +0 -1
- package/lib/operations/getOrganization.js +0 -35
- package/lib/operations/getOrganization.js.map +0 -1
- package/lib/operations/getOrganizationMember.d.ts +0 -25
- package/lib/operations/getOrganizationMember.d.ts.map +0 -1
- package/lib/operations/getOrganizationMember.js +0 -35
- package/lib/operations/getOrganizationMember.js.map +0 -1
- package/lib/operations/getOrganizationSubscription.d.ts +0 -23
- package/lib/operations/getOrganizationSubscription.d.ts.map +0 -1
- package/lib/operations/getOrganizationSubscription.js +0 -32
- package/lib/operations/getOrganizationSubscription.js.map +0 -1
- package/lib/operations/getOrganizationUsage.d.ts +0 -47
- package/lib/operations/getOrganizationUsage.d.ts.map +0 -1
- package/lib/operations/getOrganizationUsage.js +0 -56
- package/lib/operations/getOrganizationUsage.js.map +0 -1
- package/lib/operations/index.d.ts +0 -50
- package/lib/operations/index.d.ts.map +0 -1
- package/lib/operations/index.js +0 -50
- package/lib/operations/index.js.map +0 -1
- package/lib/operations/invalidateDatabaseTokens.d.ts +0 -19
- package/lib/operations/invalidateDatabaseTokens.d.ts.map +0 -1
- package/lib/operations/invalidateDatabaseTokens.js +0 -29
- package/lib/operations/invalidateDatabaseTokens.js.map +0 -1
- package/lib/operations/invalidateGroupTokens.d.ts +0 -19
- package/lib/operations/invalidateGroupTokens.d.ts.map +0 -1
- package/lib/operations/invalidateGroupTokens.js +0 -29
- package/lib/operations/invalidateGroupTokens.js.map +0 -1
- package/lib/operations/inviteOrganizationMember.d.ts +0 -69
- package/lib/operations/inviteOrganizationMember.d.ts.map +0 -1
- package/lib/operations/inviteOrganizationMember.js +0 -54
- package/lib/operations/inviteOrganizationMember.js.map +0 -1
- package/lib/operations/inviteOrganizationMemberV2.d.ts +0 -25
- package/lib/operations/inviteOrganizationMemberV2.d.ts.map +0 -1
- package/lib/operations/inviteOrganizationMemberV2.js +0 -34
- package/lib/operations/inviteOrganizationMemberV2.js.map +0 -1
- package/lib/operations/listAPITokens.d.ts +0 -22
- package/lib/operations/listAPITokens.d.ts.map +0 -1
- package/lib/operations/listAPITokens.js +0 -25
- package/lib/operations/listAPITokens.js.map +0 -1
- package/lib/operations/listDatabaseInstances.d.ts +0 -27
- package/lib/operations/listDatabaseInstances.d.ts.map +0 -1
- package/lib/operations/listDatabaseInstances.js +0 -37
- package/lib/operations/listDatabaseInstances.js.map +0 -1
- package/lib/operations/listDatabases.d.ts +0 -39
- package/lib/operations/listDatabases.d.ts.map +0 -1
- package/lib/operations/listDatabases.js +0 -46
- package/lib/operations/listDatabases.js.map +0 -1
- package/lib/operations/listGroups.d.ts +0 -25
- package/lib/operations/listGroups.d.ts.map +0 -1
- package/lib/operations/listGroups.js +0 -32
- package/lib/operations/listGroups.js.map +0 -1
- package/lib/operations/listLocations.d.ts +0 -15
- package/lib/operations/listLocations.d.ts.map +0 -1
- package/lib/operations/listLocations.js +0 -18
- package/lib/operations/listLocations.js.map +0 -1
- package/lib/operations/listOrganizationAPITokens.d.ts +0 -33
- package/lib/operations/listOrganizationAPITokens.d.ts.map +0 -1
- package/lib/operations/listOrganizationAPITokens.js +0 -42
- package/lib/operations/listOrganizationAPITokens.js.map +0 -1
- package/lib/operations/listOrganizationAuditLogs.d.ts +0 -35
- package/lib/operations/listOrganizationAuditLogs.d.ts.map +0 -1
- package/lib/operations/listOrganizationAuditLogs.js +0 -69
- package/lib/operations/listOrganizationAuditLogs.js.map +0 -1
- package/lib/operations/listOrganizationInvites.d.ts +0 -64
- package/lib/operations/listOrganizationInvites.d.ts.map +0 -1
- package/lib/operations/listOrganizationInvites.js +0 -50
- package/lib/operations/listOrganizationInvites.js.map +0 -1
- package/lib/operations/listOrganizationInvitesV2.d.ts +0 -23
- package/lib/operations/listOrganizationInvitesV2.d.ts.map +0 -1
- package/lib/operations/listOrganizationInvitesV2.js +0 -32
- package/lib/operations/listOrganizationInvitesV2.js.map +0 -1
- package/lib/operations/listOrganizationInvoices.d.ts +0 -27
- package/lib/operations/listOrganizationInvoices.d.ts.map +0 -1
- package/lib/operations/listOrganizationInvoices.js +0 -36
- package/lib/operations/listOrganizationInvoices.js.map +0 -1
- package/lib/operations/listOrganizationMembers.d.ts +0 -22
- package/lib/operations/listOrganizationMembers.d.ts.map +0 -1
- package/lib/operations/listOrganizationMembers.js +0 -31
- package/lib/operations/listOrganizationMembers.js.map +0 -1
- package/lib/operations/listOrganizationPlans.d.ts +0 -34
- package/lib/operations/listOrganizationPlans.d.ts.map +0 -1
- package/lib/operations/listOrganizationPlans.js +0 -43
- package/lib/operations/listOrganizationPlans.js.map +0 -1
- package/lib/operations/listOrganizations.d.ts +0 -24
- package/lib/operations/listOrganizations.d.ts.map +0 -1
- package/lib/operations/listOrganizations.js +0 -27
- package/lib/operations/listOrganizations.js.map +0 -1
- package/lib/operations/removeLocationFromGroup.d.ts +0 -30
- package/lib/operations/removeLocationFromGroup.d.ts.map +0 -1
- package/lib/operations/removeLocationFromGroup.js +0 -40
- package/lib/operations/removeLocationFromGroup.js.map +0 -1
- package/lib/operations/removeOrganizationMember.d.ts +0 -21
- package/lib/operations/removeOrganizationMember.d.ts.map +0 -1
- package/lib/operations/removeOrganizationMember.js +0 -31
- package/lib/operations/removeOrganizationMember.js.map +0 -1
- package/lib/operations/revokeAPIToken.d.ts +0 -19
- package/lib/operations/revokeAPIToken.d.ts.map +0 -1
- package/lib/operations/revokeAPIToken.js +0 -24
- package/lib/operations/revokeAPIToken.js.map +0 -1
- package/lib/operations/revokeOrganizationAPIToken.d.ts +0 -25
- package/lib/operations/revokeOrganizationAPIToken.d.ts.map +0 -1
- package/lib/operations/revokeOrganizationAPIToken.js +0 -34
- package/lib/operations/revokeOrganizationAPIToken.js.map +0 -1
- package/lib/operations/transferGroup.d.ts +0 -27
- package/lib/operations/transferGroup.d.ts.map +0 -1
- package/lib/operations/transferGroup.js +0 -35
- package/lib/operations/transferGroup.js.map +0 -1
- package/lib/operations/unarchiveGroup.d.ts +0 -28
- package/lib/operations/unarchiveGroup.d.ts.map +0 -1
- package/lib/operations/unarchiveGroup.js +0 -36
- package/lib/operations/unarchiveGroup.js.map +0 -1
- package/lib/operations/updateDatabaseConfiguration.d.ts +0 -34
- package/lib/operations/updateDatabaseConfiguration.d.ts.map +0 -1
- package/lib/operations/updateDatabaseConfiguration.js +0 -44
- package/lib/operations/updateDatabaseConfiguration.js.map +0 -1
- package/lib/operations/updateGroupConfiguration.d.ts +0 -22
- package/lib/operations/updateGroupConfiguration.d.ts.map +0 -1
- package/lib/operations/updateGroupConfiguration.js +0 -32
- package/lib/operations/updateGroupConfiguration.js.map +0 -1
- package/lib/operations/updateGroupDatabases.d.ts +0 -19
- package/lib/operations/updateGroupDatabases.d.ts.map +0 -1
- package/lib/operations/updateGroupDatabases.js +0 -29
- package/lib/operations/updateGroupDatabases.js.map +0 -1
- package/lib/operations/updateMemberRole.d.ts +0 -26
- package/lib/operations/updateMemberRole.d.ts.map +0 -1
- package/lib/operations/updateMemberRole.js +0 -34
- package/lib/operations/updateMemberRole.js.map +0 -1
- package/lib/operations/updateOrganization.d.ts +0 -31
- package/lib/operations/updateOrganization.d.ts.map +0 -1
- package/lib/operations/updateOrganization.js +0 -37
- package/lib/operations/updateOrganization.js.map +0 -1
- package/lib/operations/validateAPIToken.d.ts +0 -15
- package/lib/operations/validateAPIToken.d.ts.map +0 -1
- package/lib/operations/validateAPIToken.js +0 -18
- package/lib/operations/validateAPIToken.js.map +0 -1
- package/lib/sensitive.d.ts +0 -5
- package/lib/sensitive.d.ts.map +0 -1
- package/lib/sensitive.js +0 -5
- package/lib/sensitive.js.map +0 -1
- package/src/category.ts +0 -4
- package/src/client.ts +0 -74
- package/src/operations/addLocationToGroup.ts +0 -63
- package/src/operations/addOrganizationMember.ts +0 -49
- package/src/operations/createAPIToken.ts +0 -77
- package/src/operations/createDatabase.ts +0 -94
- package/src/operations/createDatabaseToken.ts +0 -62
- package/src/operations/createGroup.ts +0 -92
- package/src/operations/createGroupToken.ts +0 -58
- package/src/operations/deleteDatabase.ts +0 -42
- package/src/operations/deleteGroup.ts +0 -58
- package/src/operations/deleteOrganizationInviteByEmail.ts +0 -38
- package/src/operations/deleteOrganizationInviteByEmailV2.ts +0 -40
- package/src/operations/getCurrentUser.ts +0 -46
- package/src/operations/getDatabase.ts +0 -74
- package/src/operations/getDatabaseConfiguration.ts +0 -56
- package/src/operations/getDatabaseInstance.ts +0 -61
- package/src/operations/getDatabaseStats.ts +0 -54
- package/src/operations/getDatabaseUsage.ts +0 -92
- package/src/operations/getGroup.ts +0 -58
- package/src/operations/getGroupConfiguration.ts +0 -44
- package/src/operations/getOrganization.ts +0 -60
- package/src/operations/getOrganizationMember.ts +0 -56
- package/src/operations/getOrganizationSubscription.ts +0 -51
- package/src/operations/getOrganizationUsage.ts +0 -113
- package/src/operations/index.ts +0 -49
- package/src/operations/invalidateDatabaseTokens.ts +0 -40
- package/src/operations/invalidateGroupTokens.ts +0 -40
- package/src/operations/inviteOrganizationMember.ts +0 -66
- package/src/operations/inviteOrganizationMemberV2.ts +0 -55
- package/src/operations/listAPITokens.ts +0 -46
- package/src/operations/listDatabaseInstances.ts +0 -60
- package/src/operations/listDatabases.ts +0 -80
- package/src/operations/listGroups.ts +0 -55
- package/src/operations/listLocations.ts +0 -28
- package/src/operations/listOrganizationAPITokens.ts +0 -68
- package/src/operations/listOrganizationAuditLogs.ts +0 -128
- package/src/operations/listOrganizationInvites.ts +0 -64
- package/src/operations/listOrganizationInvitesV2.ts +0 -53
- package/src/operations/listOrganizationInvoices.ts +0 -60
- package/src/operations/listOrganizationMembers.ts +0 -53
- package/src/operations/listOrganizationPlans.ts +0 -78
- package/src/operations/listOrganizations.ts +0 -48
- package/src/operations/removeLocationFromGroup.ts +0 -63
- package/src/operations/removeOrganizationMember.ts +0 -44
- package/src/operations/revokeAPIToken.ts +0 -36
- package/src/operations/revokeOrganizationAPIToken.ts +0 -47
- package/src/operations/transferGroup.ts +0 -54
- package/src/operations/unarchiveGroup.ts +0 -58
- package/src/operations/updateDatabaseConfiguration.ts +0 -70
- package/src/operations/updateGroupConfiguration.ts +0 -46
- package/src/operations/updateGroupDatabases.ts +0 -40
- package/src/operations/updateMemberRole.ts +0 -54
- package/src/operations/updateOrganization.ts +0 -64
- package/src/operations/validateAPIToken.ts +0 -28
- package/src/sensitive.ts +0 -4
package/src/traits.ts
CHANGED
|
@@ -1,4 +1,46 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Turso SDK trait surface — hand-written.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the generic protocol traits from core so generated operations
|
|
5
|
+
* import everything from one place (`import * as T from "../traits.ts"`).
|
|
6
|
+
* The Turso platform API is plain bearer-REST with no response envelope, so
|
|
7
|
+
* there are no Turso-specific traits — the REST-protocol traits
|
|
8
|
+
* (`SensitiveValue` / `RawResponse` / `RawResponseRoot`) come from
|
|
9
|
+
* `core/protocol-rest`.
|
|
3
10
|
*/
|
|
4
|
-
export
|
|
11
|
+
export {
|
|
12
|
+
SensitiveValue,
|
|
13
|
+
RawResponse,
|
|
14
|
+
RawResponseRoot,
|
|
15
|
+
sensitiveValueSymbol,
|
|
16
|
+
rawResponseSymbol,
|
|
17
|
+
rawResponseRootSymbol,
|
|
18
|
+
} from "@distilled.cloud/core/protocol-rest";
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
Body,
|
|
22
|
+
Header,
|
|
23
|
+
Query,
|
|
24
|
+
Label,
|
|
25
|
+
Http,
|
|
26
|
+
ResponseCode,
|
|
27
|
+
HttpBody,
|
|
28
|
+
FormDataFile,
|
|
29
|
+
KeyDictionary,
|
|
30
|
+
UnionCases,
|
|
31
|
+
applyErrorMatchers,
|
|
32
|
+
getErrorMatchers,
|
|
33
|
+
type HttpTrait,
|
|
34
|
+
type ErrorMatcher,
|
|
35
|
+
bodySymbol,
|
|
36
|
+
headerSymbol,
|
|
37
|
+
querySymbol,
|
|
38
|
+
labelSymbol,
|
|
39
|
+
httpSymbol,
|
|
40
|
+
responseCodeSymbol,
|
|
41
|
+
httpBodySymbol,
|
|
42
|
+
formDataFileSymbol,
|
|
43
|
+
keyDictionarySymbol,
|
|
44
|
+
unionCasesSymbol,
|
|
45
|
+
errorMatchersSymbol,
|
|
46
|
+
} from "@distilled.cloud/core/trait";
|
package/README.md
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# @distilled.cloud/turso
|
|
2
|
-
|
|
3
|
-
Effect-native Turso SDK generated from the [Turso API documentation](https://docs.turso.tech/api-reference). Manage databases, organizations, and groups with exhaustive error typing.
|
|
4
|
-
|
|
5
|
-
> **Note:** This SDK is a stub -- operations have not yet been generated. Run `bun run generate` after fetching specs to populate the operations.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @distilled.cloud/turso effect
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Quick Start
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import { Effect, Layer } from "effect";
|
|
17
|
-
import * as Stream from "effect/Stream";
|
|
18
|
-
import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
|
|
19
|
-
import { CredentialsFromEnv } from "@distilled.cloud/turso";
|
|
20
|
-
|
|
21
|
-
const TursoLive = Layer.mergeAll(FetchHttpClient.layer, CredentialsFromEnv);
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Configuration
|
|
25
|
-
|
|
26
|
-
Set the following environment variable:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
TURSO_API_KEY=your-api-token
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Create an API token with `turso auth api-tokens mint` or in the [Turso dashboard](https://app.turso.tech/) under **Settings > API Tokens**.
|
|
33
|
-
|
|
34
|
-
## License
|
|
35
|
-
|
|
36
|
-
MIT
|
package/lib/category.d.ts
DELETED
package/lib/category.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../src/category.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gCAAgC,CAAC"}
|
package/lib/category.js
DELETED
package/lib/category.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"category.js","sourceRoot":"","sources":["../src/category.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,gCAAgC,CAAC"}
|
package/lib/client.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
export { UnknownTursoError } from "./errors.ts";
|
|
3
|
-
import { Credentials } from "./credentials.ts";
|
|
4
|
-
/**
|
|
5
|
-
* Turso API client.
|
|
6
|
-
*/
|
|
7
|
-
export declare const API: {
|
|
8
|
-
make: <I extends Schema.Top, O extends Schema.Top, const E extends readonly import("@distilled.cloud/core/client").ApiErrorClass[] = readonly []>(configFn: () => import("@distilled.cloud/core/client").OperationConfig<I, O, E>) => import("@distilled.cloud/core/client").OperationMethod<Schema.Schema.Type<I>, Schema.Schema.Type<O>, InstanceType<E[number]>, Credentials, never>;
|
|
9
|
-
makePaginated: <I extends Schema.Top, O extends Schema.Top, const E extends readonly import("@distilled.cloud/core/client").ApiErrorClass[] = readonly []>(configFn: () => import("@distilled.cloud/core/client").PaginatedOperationConfig<I, O, E>, paginateFn?: import("@distilled.cloud/core/pagination").PaginationStrategy) => import("@distilled.cloud/core/client").PaginatedOperationMethod<Schema.Schema.Type<I>, Schema.Schema.Type<O>, InstanceType<E[number]>, Credentials, never>;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=client.d.ts.map
|
package/lib/client.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAWxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAyC/C;;GAEG;AACH,eAAO,MAAM,GAAG;;;CASd,CAAC"}
|
package/lib/client.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Turso API Client.
|
|
3
|
-
*
|
|
4
|
-
* Wraps the shared REST client from sdk-core with Turso-specific
|
|
5
|
-
* error matching and credential handling.
|
|
6
|
-
*/
|
|
7
|
-
import * as Effect from "effect/Effect";
|
|
8
|
-
import * as Redacted from "effect/Redacted";
|
|
9
|
-
import * as Schema from "effect/Schema";
|
|
10
|
-
import { makeAPI } from "@distilled.cloud/core/client";
|
|
11
|
-
import { parseRetryAfterForStatus } from "@distilled.cloud/core/retry-after";
|
|
12
|
-
import { Retry } from "./retry.js";
|
|
13
|
-
import { HTTP_STATUS_MAP, UnknownTursoError, TursoParseError, } from "./errors.js";
|
|
14
|
-
// Re-export for backwards compatibility
|
|
15
|
-
export { UnknownTursoError } from "./errors.js";
|
|
16
|
-
import { Credentials } from "./credentials.js";
|
|
17
|
-
// API Error Response Schema
|
|
18
|
-
// Turso returns { error: string, code?: string }
|
|
19
|
-
const ApiErrorResponse = Schema.Struct({
|
|
20
|
-
error: Schema.String,
|
|
21
|
-
code: Schema.optional(Schema.String),
|
|
22
|
-
});
|
|
23
|
-
/**
|
|
24
|
-
* Match a Turso API error response to the appropriate error class based on HTTP status.
|
|
25
|
-
*/
|
|
26
|
-
const matchError = (status, errorBody, _errors, headers) => {
|
|
27
|
-
try {
|
|
28
|
-
const parsed = Schema.decodeUnknownSync(ApiErrorResponse)(errorBody);
|
|
29
|
-
const ErrorClass = HTTP_STATUS_MAP[status];
|
|
30
|
-
if (ErrorClass) {
|
|
31
|
-
return Effect.fail(new ErrorClass({
|
|
32
|
-
message: parsed.error,
|
|
33
|
-
retryAfter: parseRetryAfterForStatus(status, headers),
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
return Effect.fail(new UnknownTursoError({
|
|
37
|
-
code: parsed.code,
|
|
38
|
-
message: parsed.error,
|
|
39
|
-
body: errorBody,
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
return Effect.fail(new UnknownTursoError({ body: errorBody }));
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Turso API client.
|
|
48
|
-
*/
|
|
49
|
-
export const API = makeAPI({
|
|
50
|
-
credentials: Credentials,
|
|
51
|
-
getBaseUrl: (creds) => creds.apiBaseUrl,
|
|
52
|
-
getAuthHeaders: (creds) => ({
|
|
53
|
-
Authorization: `Bearer ${Redacted.value(creds.apiKey)}`,
|
|
54
|
-
}),
|
|
55
|
-
matchError,
|
|
56
|
-
ParseError: TursoParseError,
|
|
57
|
-
retry: Retry,
|
|
58
|
-
});
|
|
59
|
-
//# sourceMappingURL=client.js.map
|
package/lib/client.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,eAAe,GAChB,MAAM,aAAa,CAAC;AAErB,wCAAwC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,4BAA4B;AAC5B,iDAAiD;AACjD,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;CACrC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,GAAG,CACjB,MAAc,EACd,SAAkB,EAClB,OAA4B,EAC5B,OAA4C,EACb,EAAE;IACjC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC;QACrE,MAAM,UAAU,GAAI,eAAuB,CAAC,MAAM,CAAC,CAAC;QACpD,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,MAAM,CAAC,IAAI,CAChB,IAAI,UAAU,CAAC;gBACb,OAAO,EAAE,MAAM,CAAC,KAAK;gBACrB,UAAU,EAAE,wBAAwB,CAAC,MAAM,EAAE,OAAO,CAAC;aACtD,CAAC,CACH,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAChB,IAAI,iBAAiB,CAAC;YACpB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,OAAO,EAAE,MAAM,CAAC,KAAK;YACrB,IAAI,EAAE,SAAS;SAChB,CAAC,CACH,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC;AACH,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,OAAO,CAAc;IACtC,WAAW,EAAE,WAAkB;IAC/B,UAAU,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU;IAC5C,cAAc,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC;QAC/B,aAAa,EAAE,UAAU,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;KACxD,CAAC;IACF,UAAU;IACV,UAAU,EAAE,eAAsB;IAClC,KAAK,EAAE,KAAY;CACpB,CAAC,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { BadRequest, NotFound } from "../errors.ts";
|
|
3
|
-
export interface AddLocationToGroupInput {
|
|
4
|
-
organizationSlug: string;
|
|
5
|
-
groupName: string;
|
|
6
|
-
location: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const AddLocationToGroupInput: Schema.Codec<AddLocationToGroupInput>;
|
|
9
|
-
export interface AddLocationToGroupOutput {
|
|
10
|
-
group?: {
|
|
11
|
-
name?: string;
|
|
12
|
-
version?: string;
|
|
13
|
-
uuid?: string;
|
|
14
|
-
locations?: string[];
|
|
15
|
-
primary?: string;
|
|
16
|
-
delete_protection?: boolean;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export declare const AddLocationToGroupOutput: Schema.Codec<AddLocationToGroupOutput>;
|
|
20
|
-
/**
|
|
21
|
-
* Add Location to Group
|
|
22
|
-
*
|
|
23
|
-
* Adds a location to the specified group.
|
|
24
|
-
*
|
|
25
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
26
|
-
* @param groupName - The name of the group.
|
|
27
|
-
* @param location - The location code to add to the group.
|
|
28
|
-
*/
|
|
29
|
-
export declare const addLocationToGroup: import("@distilled.cloud/core/client").OperationMethod<AddLocationToGroupInput, AddLocationToGroupOutput, BadRequest | NotFound, import("../credentials.ts").Credentials, never>;
|
|
30
|
-
//# sourceMappingURL=addLocationToGroup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addLocationToGroup.d.ts","sourceRoot":"","sources":["../../src/operations/addLocationToGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,WAAW,uBAAuB;IACtC,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AACD,eAAO,MAAM,uBAAuB,EAUlB,MAAM,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;AAGxD,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;CACH;AACD,eAAO,MAAM,wBAAwB,EAYlB,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;AAG1D;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,kLAI5B,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.js";
|
|
3
|
-
import * as T from "../traits.js";
|
|
4
|
-
import { BadRequest, NotFound } from "../errors.js";
|
|
5
|
-
export const AddLocationToGroupInput =
|
|
6
|
-
/*@__PURE__*/ Schema.Struct({
|
|
7
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
8
|
-
groupName: Schema.String.pipe(T.PathParam()),
|
|
9
|
-
location: Schema.String.pipe(T.PathParam()),
|
|
10
|
-
}).pipe(T.Http({
|
|
11
|
-
method: "POST",
|
|
12
|
-
path: "/v1/organizations/{organizationSlug}/groups/{groupName}/locations/{location}",
|
|
13
|
-
}));
|
|
14
|
-
export const AddLocationToGroupOutput =
|
|
15
|
-
/*@__PURE__*/ Schema.Struct({
|
|
16
|
-
group: Schema.optional(Schema.Struct({
|
|
17
|
-
name: Schema.optional(Schema.String),
|
|
18
|
-
version: Schema.optional(Schema.String),
|
|
19
|
-
uuid: Schema.optional(Schema.String),
|
|
20
|
-
locations: Schema.optional(Schema.Array(Schema.String)),
|
|
21
|
-
primary: Schema.optional(Schema.String),
|
|
22
|
-
delete_protection: Schema.optional(Schema.Boolean),
|
|
23
|
-
})),
|
|
24
|
-
});
|
|
25
|
-
// The operation
|
|
26
|
-
/**
|
|
27
|
-
* Add Location to Group
|
|
28
|
-
*
|
|
29
|
-
* Adds a location to the specified group.
|
|
30
|
-
*
|
|
31
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
32
|
-
* @param groupName - The name of the group.
|
|
33
|
-
* @param location - The location code to add to the group.
|
|
34
|
-
*/
|
|
35
|
-
export const addLocationToGroup = /*@__PURE__*/ API.make(() => ({
|
|
36
|
-
inputSchema: AddLocationToGroupInput,
|
|
37
|
-
outputSchema: AddLocationToGroupOutput,
|
|
38
|
-
errors: [BadRequest, NotFound],
|
|
39
|
-
}));
|
|
40
|
-
//# sourceMappingURL=addLocationToGroup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addLocationToGroup.js","sourceRoot":"","sources":["../../src/operations/addLocationToGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAQpD,MAAM,CAAC,MAAM,uBAAuB;AAClC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IACnD,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC5C,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;CAC5C,CAAC,CAAC,IAAI,CACL,CAAC,CAAC,IAAI,CAAC;IACL,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,8EAA8E;CACrF,CAAC,CACiD,CAAC;AAaxD,MAAM,CAAC,MAAM,wBAAwB;AACnC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC,QAAQ,CACpB,MAAM,CAAC,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;QACpC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;QACvC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;QACpC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACvD,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;QACvC,iBAAiB,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;KACnD,CAAC,CACH;CACF,CAAsD,CAAC;AAE1D,gBAAgB;AAChB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC9D,WAAW,EAAE,uBAAuB;IACpC,YAAY,EAAE,wBAAwB;IACtC,MAAM,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAU;CACxC,CAAC,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { BadRequest, NotFound, Conflict } from "../errors.ts";
|
|
3
|
-
export interface AddOrganizationMemberInput {
|
|
4
|
-
organizationSlug: string;
|
|
5
|
-
username?: string;
|
|
6
|
-
role?: "admin" | "member" | "viewer";
|
|
7
|
-
}
|
|
8
|
-
export declare const AddOrganizationMemberInput: Schema.Codec<AddOrganizationMemberInput>;
|
|
9
|
-
export interface AddOrganizationMemberOutput {
|
|
10
|
-
member?: string;
|
|
11
|
-
role?: "owner" | "admin" | "member" | "viewer";
|
|
12
|
-
}
|
|
13
|
-
export declare const AddOrganizationMemberOutput: Schema.Codec<AddOrganizationMemberOutput>;
|
|
14
|
-
/**
|
|
15
|
-
* Add Member
|
|
16
|
-
*
|
|
17
|
-
* Add an existing Turso user to an organization.
|
|
18
|
-
*
|
|
19
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
20
|
-
*/
|
|
21
|
-
export declare const addOrganizationMember: import("@distilled.cloud/core/client").OperationMethod<AddOrganizationMemberInput, AddOrganizationMemberOutput, BadRequest | Conflict | NotFound, import("../credentials.ts").Credentials, never>;
|
|
22
|
-
//# sourceMappingURL=addOrganizationMember.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addOrganizationMember.d.ts","sourceRoot":"","sources":["../../src/operations/addOrganizationMember.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG9D,MAAM,WAAW,0BAA0B;IACzC,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;CACtC;AACD,eAAO,MAAM,0BAA0B,EAUrB,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;AAG3D,MAAM,WAAW,2BAA2B;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;CAChD;AACD,eAAO,MAAM,2BAA2B,EAMrB,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAG7D;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,mMAI/B,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.js";
|
|
3
|
-
import * as T from "../traits.js";
|
|
4
|
-
import { BadRequest, NotFound, Conflict } from "../errors.js";
|
|
5
|
-
export const AddOrganizationMemberInput =
|
|
6
|
-
/*@__PURE__*/ Schema.Struct({
|
|
7
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
8
|
-
username: Schema.optional(Schema.String),
|
|
9
|
-
role: Schema.optional(Schema.Literals(["admin", "member", "viewer"])),
|
|
10
|
-
}).pipe(T.Http({
|
|
11
|
-
method: "POST",
|
|
12
|
-
path: "/v1/organizations/{organizationSlug}/members",
|
|
13
|
-
}));
|
|
14
|
-
export const AddOrganizationMemberOutput =
|
|
15
|
-
/*@__PURE__*/ Schema.Struct({
|
|
16
|
-
member: Schema.optional(Schema.String),
|
|
17
|
-
role: Schema.optional(Schema.Literals(["owner", "admin", "member", "viewer"])),
|
|
18
|
-
});
|
|
19
|
-
// The operation
|
|
20
|
-
/**
|
|
21
|
-
* Add Member
|
|
22
|
-
*
|
|
23
|
-
* Add an existing Turso user to an organization.
|
|
24
|
-
*
|
|
25
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
26
|
-
*/
|
|
27
|
-
export const addOrganizationMember = /*@__PURE__*/ API.make(() => ({
|
|
28
|
-
inputSchema: AddOrganizationMemberInput,
|
|
29
|
-
outputSchema: AddOrganizationMemberOutput,
|
|
30
|
-
errors: [BadRequest, NotFound, Conflict],
|
|
31
|
-
}));
|
|
32
|
-
//# sourceMappingURL=addOrganizationMember.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"addOrganizationMember.js","sourceRoot":"","sources":["../../src/operations/addOrganizationMember.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAQ9D,MAAM,CAAC,MAAM,0BAA0B;AACrC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IACnD,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACxC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;CACtE,CAAC,CAAC,IAAI,CACL,CAAC,CAAC,IAAI,CAAC;IACL,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,8CAA8C;CACrD,CAAC,CACoD,CAAC;AAO3D,MAAM,CAAC,MAAM,2BAA2B;AACtC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC,QAAQ,CACnB,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CACxD;CACF,CAAyD,CAAC;AAE7D,gBAAgB;AAChB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACjE,WAAW,EAAE,0BAA0B;IACvC,YAAY,EAAE,2BAA2B;IACzC,MAAM,EAAE,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAU;CAClD,CAAC,CAAC,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
export interface CreateAPITokenInput {
|
|
3
|
-
tokenName: string;
|
|
4
|
-
organization?: string;
|
|
5
|
-
group?: string;
|
|
6
|
-
scopes?: ("read" | "db:create" | "db:delete" | "db:configure" | "db:mint-token" | "db:rotate-creds" | "group:configure" | "group:mint-token" | "group:rotate-creds" | "read-only" | "full-access")[];
|
|
7
|
-
}
|
|
8
|
-
export declare const CreateAPITokenInput: Schema.Codec<CreateAPITokenInput>;
|
|
9
|
-
export interface CreateAPITokenOutput {
|
|
10
|
-
name?: string;
|
|
11
|
-
id?: string;
|
|
12
|
-
token?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare const CreateAPITokenOutput: Schema.Codec<CreateAPITokenOutput>;
|
|
15
|
-
/**
|
|
16
|
-
* Create API Token
|
|
17
|
-
*
|
|
18
|
-
* Returns a new API token belonging to a user.
|
|
19
|
-
* The token can be minted at three levels of restriction, in increasing order of narrowness:
|
|
20
|
-
* - **Organization-scoped** — pass `organization`. The token can only act on resources inside that organization.
|
|
21
|
-
* - **Group-scoped** — pass `organization`, `group`, and `scopes`. The token is pinned to a single group inside the organization and only the operations listed in `scopes` are allowed. The caller must be an admin or owner of the organization.
|
|
22
|
-
* - **Unrestricted** *(deprecated)* — no request body. The token can act on every organization the caller belongs to. **Unrestricted tokens are deprecated and will be removed in a future release.** Always pass `organization` for new tokens and rotate existing unrestricted tokens to scoped tokens.
|
|
23
|
-
* Group-scoped tokens are designed for automations that should be able to provision and manage databases inside a single group without being able to touch the rest of the organization.
|
|
24
|
-
*
|
|
25
|
-
* @param tokenName - The name of the api token.
|
|
26
|
-
*/
|
|
27
|
-
export declare const createAPIToken: import("@distilled.cloud/core/client").OperationMethod<CreateAPITokenInput, CreateAPITokenOutput, never, import("../credentials.ts").Credentials, never>;
|
|
28
|
-
//# sourceMappingURL=createAPIToken.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createAPIToken.d.ts","sourceRoot":"","sources":["../../src/operations/createAPIToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,CACL,MAAM,GACN,WAAW,GACX,WAAW,GACX,cAAc,GACd,eAAe,GACf,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,GAClB,oBAAoB,GACpB,WAAW,GACX,aAAa,CAChB,EAAE,CAAC;CACL;AACD,eAAO,MAAM,mBAAmB,EAuBhB,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;AAGlD,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,eAAO,MAAM,oBAAoB,EAIhB,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;AAGpD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,0JAGxB,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.js";
|
|
3
|
-
import * as T from "../traits.js";
|
|
4
|
-
export const CreateAPITokenInput = /*@__PURE__*/ Schema.Struct({
|
|
5
|
-
tokenName: Schema.String.pipe(T.PathParam()),
|
|
6
|
-
organization: Schema.optional(Schema.String),
|
|
7
|
-
group: Schema.optional(Schema.String),
|
|
8
|
-
scopes: Schema.optional(Schema.Array(Schema.Literals([
|
|
9
|
-
"read",
|
|
10
|
-
"db:create",
|
|
11
|
-
"db:delete",
|
|
12
|
-
"db:configure",
|
|
13
|
-
"db:mint-token",
|
|
14
|
-
"db:rotate-creds",
|
|
15
|
-
"group:configure",
|
|
16
|
-
"group:mint-token",
|
|
17
|
-
"group:rotate-creds",
|
|
18
|
-
"read-only",
|
|
19
|
-
"full-access",
|
|
20
|
-
]))),
|
|
21
|
-
}).pipe(T.Http({ method: "POST", path: "/v1/auth/api-tokens/{tokenName}" }));
|
|
22
|
-
export const CreateAPITokenOutput = /*@__PURE__*/ Schema.Struct({
|
|
23
|
-
name: Schema.optional(Schema.String),
|
|
24
|
-
id: Schema.optional(Schema.String),
|
|
25
|
-
token: Schema.optional(Schema.String),
|
|
26
|
-
});
|
|
27
|
-
// The operation
|
|
28
|
-
/**
|
|
29
|
-
* Create API Token
|
|
30
|
-
*
|
|
31
|
-
* Returns a new API token belonging to a user.
|
|
32
|
-
* The token can be minted at three levels of restriction, in increasing order of narrowness:
|
|
33
|
-
* - **Organization-scoped** — pass `organization`. The token can only act on resources inside that organization.
|
|
34
|
-
* - **Group-scoped** — pass `organization`, `group`, and `scopes`. The token is pinned to a single group inside the organization and only the operations listed in `scopes` are allowed. The caller must be an admin or owner of the organization.
|
|
35
|
-
* - **Unrestricted** *(deprecated)* — no request body. The token can act on every organization the caller belongs to. **Unrestricted tokens are deprecated and will be removed in a future release.** Always pass `organization` for new tokens and rotate existing unrestricted tokens to scoped tokens.
|
|
36
|
-
* Group-scoped tokens are designed for automations that should be able to provision and manage databases inside a single group without being able to touch the rest of the organization.
|
|
37
|
-
*
|
|
38
|
-
* @param tokenName - The name of the api token.
|
|
39
|
-
*/
|
|
40
|
-
export const createAPIToken = /*@__PURE__*/ API.make(() => ({
|
|
41
|
-
inputSchema: CreateAPITokenInput,
|
|
42
|
-
outputSchema: CreateAPITokenOutput,
|
|
43
|
-
}));
|
|
44
|
-
//# sourceMappingURL=createAPIToken.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createAPIToken.js","sourceRoot":"","sources":["../../src/operations/createAPIToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAqBlC,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC5C,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IAC5C,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC,QAAQ,CACrB,MAAM,CAAC,KAAK,CACV,MAAM,CAAC,QAAQ,CAAC;QACd,MAAM;QACN,WAAW;QACX,WAAW;QACX,cAAc;QACd,eAAe;QACf,iBAAiB;QACjB,iBAAiB;QACjB,kBAAkB;QAClB,oBAAoB;QACpB,WAAW;QACX,aAAa;KACd,CAAC,CACH,CACF;CACF,CAAC,CAAC,IAAI,CACL,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,iCAAiC,EAAE,CAAC,CACpB,CAAC;AAQlD,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IAC9D,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;CACtC,CAAkD,CAAC;AAEpD,gBAAgB;AAChB;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC1D,WAAW,EAAE,mBAAmB;IAChC,YAAY,EAAE,oBAAoB;CACnC,CAAC,CAAC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { BadRequest, Conflict } from "../errors.ts";
|
|
3
|
-
export interface CreateDatabaseInput {
|
|
4
|
-
organizationSlug: string;
|
|
5
|
-
name: string;
|
|
6
|
-
group: string;
|
|
7
|
-
seed?: {
|
|
8
|
-
type?: "database" | "database_upload";
|
|
9
|
-
name?: string;
|
|
10
|
-
timestamp?: string;
|
|
11
|
-
};
|
|
12
|
-
size_limit?: string;
|
|
13
|
-
remote_encryption?: {
|
|
14
|
-
encryption_key?: string;
|
|
15
|
-
encryption_cipher?: "aes256gcm" | "aes128gcm" | "chacha20poly1305" | "aegis128l" | "aegis128x2" | "aegis128x4" | "aegis256" | "aegis256x2" | "aegis256x4";
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export declare const CreateDatabaseInput: Schema.Codec<CreateDatabaseInput>;
|
|
19
|
-
export interface CreateDatabaseOutput {
|
|
20
|
-
database?: {
|
|
21
|
-
DbId?: string;
|
|
22
|
-
Hostname?: string;
|
|
23
|
-
Name?: string;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export declare const CreateDatabaseOutput: Schema.Codec<CreateDatabaseOutput>;
|
|
27
|
-
/**
|
|
28
|
-
* Create Database
|
|
29
|
-
*
|
|
30
|
-
* Creates a new database in a group for the organization or user.
|
|
31
|
-
*
|
|
32
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
33
|
-
*/
|
|
34
|
-
export declare const createDatabase: import("@distilled.cloud/core/client").OperationMethod<CreateDatabaseInput, CreateDatabaseOutput, BadRequest | Conflict, import("../credentials.ts").Credentials, never>;
|
|
35
|
-
//# sourceMappingURL=createDatabase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createDatabase.d.ts","sourceRoot":"","sources":["../../src/operations/createDatabase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,WAAW,mBAAmB;IAClC,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE;QACL,IAAI,CAAC,EAAE,UAAU,GAAG,iBAAiB,CAAC;QACtC,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE;QAClB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,iBAAiB,CAAC,EACd,WAAW,GACX,WAAW,GACX,kBAAkB,GAClB,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,YAAY,GACZ,YAAY,CAAC;KAClB,CAAC;CACH;AACD,eAAO,MAAM,mBAAmB,EAmChB,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;AAGlD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAChE;AACD,eAAO,MAAM,oBAAoB,EAQhB,MAAM,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;AAGpD;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,0KAIxB,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.js";
|
|
3
|
-
import * as T from "../traits.js";
|
|
4
|
-
import { BadRequest, Conflict } from "../errors.js";
|
|
5
|
-
export const CreateDatabaseInput = /*@__PURE__*/ Schema.Struct({
|
|
6
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
7
|
-
name: Schema.String,
|
|
8
|
-
group: Schema.String,
|
|
9
|
-
seed: Schema.optional(Schema.Struct({
|
|
10
|
-
type: Schema.optional(Schema.Literals(["database", "database_upload"])),
|
|
11
|
-
name: Schema.optional(Schema.String),
|
|
12
|
-
timestamp: Schema.optional(Schema.String),
|
|
13
|
-
})),
|
|
14
|
-
size_limit: Schema.optional(Schema.String),
|
|
15
|
-
remote_encryption: Schema.optional(Schema.Struct({
|
|
16
|
-
encryption_key: Schema.optional(Schema.String),
|
|
17
|
-
encryption_cipher: Schema.optional(Schema.Literals([
|
|
18
|
-
"aes256gcm",
|
|
19
|
-
"aes128gcm",
|
|
20
|
-
"chacha20poly1305",
|
|
21
|
-
"aegis128l",
|
|
22
|
-
"aegis128x2",
|
|
23
|
-
"aegis128x4",
|
|
24
|
-
"aegis256",
|
|
25
|
-
"aegis256x2",
|
|
26
|
-
"aegis256x4",
|
|
27
|
-
])),
|
|
28
|
-
})),
|
|
29
|
-
}).pipe(T.Http({
|
|
30
|
-
method: "POST",
|
|
31
|
-
path: "/v1/organizations/{organizationSlug}/databases",
|
|
32
|
-
}));
|
|
33
|
-
export const CreateDatabaseOutput = /*@__PURE__*/ Schema.Struct({
|
|
34
|
-
database: Schema.optional(Schema.Struct({
|
|
35
|
-
DbId: Schema.optional(Schema.String),
|
|
36
|
-
Hostname: Schema.optional(Schema.String),
|
|
37
|
-
Name: Schema.optional(Schema.String),
|
|
38
|
-
})),
|
|
39
|
-
});
|
|
40
|
-
// The operation
|
|
41
|
-
/**
|
|
42
|
-
* Create Database
|
|
43
|
-
*
|
|
44
|
-
* Creates a new database in a group for the organization or user.
|
|
45
|
-
*
|
|
46
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
47
|
-
*/
|
|
48
|
-
export const createDatabase = /*@__PURE__*/ API.make(() => ({
|
|
49
|
-
inputSchema: CreateDatabaseInput,
|
|
50
|
-
outputSchema: CreateDatabaseOutput,
|
|
51
|
-
errors: [BadRequest, Conflict],
|
|
52
|
-
}));
|
|
53
|
-
//# sourceMappingURL=createDatabase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createDatabase.js","sourceRoot":"","sources":["../../src/operations/createDatabase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AA2BpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IAC7D,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IACnD,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,IAAI,EAAE,MAAM,CAAC,QAAQ,CACnB,MAAM,CAAC,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC;QACvE,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;QACpC,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;KAC1C,CAAC,CACH;IACD,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IAC1C,iBAAiB,EAAE,MAAM,CAAC,QAAQ,CAChC,MAAM,CAAC,MAAM,CAAC;QACZ,cAAc,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;QAC9C,iBAAiB,EAAE,MAAM,CAAC,QAAQ,CAChC,MAAM,CAAC,QAAQ,CAAC;YACd,WAAW;YACX,WAAW;YACX,kBAAkB;YAClB,WAAW;YACX,YAAY;YACZ,YAAY;YACZ,UAAU;YACV,YAAY;YACZ,YAAY;SACb,CAAC,CACH;KACF,CAAC,CACH;CACF,CAAC,CAAC,IAAI,CACL,CAAC,CAAC,IAAI,CAAC;IACL,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,gDAAgD;CACvD,CAAC,CAC6C,CAAC;AAMlD,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IAC9D,QAAQ,EAAE,MAAM,CAAC,QAAQ,CACvB,MAAM,CAAC,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;QACpC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;QACxC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;KACrC,CAAC,CACH;CACF,CAAkD,CAAC;AAEpD,gBAAgB;AAChB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC1D,WAAW,EAAE,mBAAmB;IAChC,YAAY,EAAE,oBAAoB;IAClC,MAAM,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAU;CACxC,CAAC,CAAC,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { BadRequest, NotFound } from "../errors.ts";
|
|
3
|
-
export interface CreateDatabaseTokenInput {
|
|
4
|
-
organizationSlug: string;
|
|
5
|
-
databaseName: string;
|
|
6
|
-
expiration?: string;
|
|
7
|
-
authorization?: "full-access" | "read-only";
|
|
8
|
-
permissions?: {
|
|
9
|
-
read_attach?: {
|
|
10
|
-
databases?: string[];
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export declare const CreateDatabaseTokenInput: Schema.Codec<CreateDatabaseTokenInput>;
|
|
15
|
-
export interface CreateDatabaseTokenOutput {
|
|
16
|
-
jwt?: string;
|
|
17
|
-
}
|
|
18
|
-
export declare const CreateDatabaseTokenOutput: Schema.Codec<CreateDatabaseTokenOutput>;
|
|
19
|
-
/**
|
|
20
|
-
* Generate Database Auth Token
|
|
21
|
-
*
|
|
22
|
-
* Generates an authorization token for the specified database.
|
|
23
|
-
*
|
|
24
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
25
|
-
* @param databaseName - The name of the database.
|
|
26
|
-
* @param expiration - Expiration time for the token (e.g., 2w1d30m).
|
|
27
|
-
* @param authorization - Authorization level for the token (full-access or read-only).
|
|
28
|
-
*/
|
|
29
|
-
export declare const createDatabaseToken: import("@distilled.cloud/core/client").OperationMethod<CreateDatabaseTokenInput, CreateDatabaseTokenOutput, BadRequest | NotFound, import("../credentials.ts").Credentials, never>;
|
|
30
|
-
//# sourceMappingURL=createDatabaseToken.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createDatabaseToken.d.ts","sourceRoot":"","sources":["../../src/operations/createDatabaseToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,WAAW,wBAAwB;IACvC,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,GAAG,WAAW,CAAC;IAC5C,WAAW,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE;YAAE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE,CAAA;KAAE,CAAC;CAC1D;AACD,eAAO,MAAM,wBAAwB,EAsBnB,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;AAGzD,MAAM,WAAW,yBAAyB;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AACD,eAAO,MAAM,yBAAyB,EAGnB,MAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAG3D;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,oLAI7B,CAAC"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { API } from "../client.js";
|
|
3
|
-
import * as T from "../traits.js";
|
|
4
|
-
import { BadRequest, NotFound } from "../errors.js";
|
|
5
|
-
export const CreateDatabaseTokenInput =
|
|
6
|
-
/*@__PURE__*/ Schema.Struct({
|
|
7
|
-
organizationSlug: Schema.String.pipe(T.PathParam()),
|
|
8
|
-
databaseName: Schema.String.pipe(T.PathParam()),
|
|
9
|
-
expiration: Schema.optional(Schema.String),
|
|
10
|
-
authorization: Schema.optional(Schema.Literals(["full-access", "read-only"])),
|
|
11
|
-
permissions: Schema.optional(Schema.Struct({
|
|
12
|
-
read_attach: Schema.optional(Schema.Struct({
|
|
13
|
-
databases: Schema.optional(Schema.Array(Schema.String)),
|
|
14
|
-
})),
|
|
15
|
-
})),
|
|
16
|
-
}).pipe(T.Http({
|
|
17
|
-
method: "POST",
|
|
18
|
-
path: "/v1/organizations/{organizationSlug}/databases/{databaseName}/auth/tokens",
|
|
19
|
-
}));
|
|
20
|
-
export const CreateDatabaseTokenOutput =
|
|
21
|
-
/*@__PURE__*/ Schema.Struct({
|
|
22
|
-
jwt: Schema.optional(Schema.String),
|
|
23
|
-
});
|
|
24
|
-
// The operation
|
|
25
|
-
/**
|
|
26
|
-
* Generate Database Auth Token
|
|
27
|
-
*
|
|
28
|
-
* Generates an authorization token for the specified database.
|
|
29
|
-
*
|
|
30
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
31
|
-
* @param databaseName - The name of the database.
|
|
32
|
-
* @param expiration - Expiration time for the token (e.g., 2w1d30m).
|
|
33
|
-
* @param authorization - Authorization level for the token (full-access or read-only).
|
|
34
|
-
*/
|
|
35
|
-
export const createDatabaseToken = /*@__PURE__*/ API.make(() => ({
|
|
36
|
-
inputSchema: CreateDatabaseTokenInput,
|
|
37
|
-
outputSchema: CreateDatabaseTokenOutput,
|
|
38
|
-
errors: [BadRequest, NotFound],
|
|
39
|
-
}));
|
|
40
|
-
//# sourceMappingURL=createDatabaseToken.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createDatabaseToken.js","sourceRoot":"","sources":["../../src/operations/createDatabaseToken.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAUpD,MAAM,CAAC,MAAM,wBAAwB;AACnC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IACnD,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IAC1C,aAAa,EAAE,MAAM,CAAC,QAAQ,CAC5B,MAAM,CAAC,QAAQ,CAAC,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAC9C;IACD,WAAW,EAAE,MAAM,CAAC,QAAQ,CAC1B,MAAM,CAAC,MAAM,CAAC;QACZ,WAAW,EAAE,MAAM,CAAC,QAAQ,CAC1B,MAAM,CAAC,MAAM,CAAC;YACZ,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SACxD,CAAC,CACH;KACF,CAAC,CACH;CACF,CAAC,CAAC,IAAI,CACL,CAAC,CAAC,IAAI,CAAC;IACL,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,2EAA2E;CAClF,CAAC,CACkD,CAAC;AAMzD,MAAM,CAAC,MAAM,yBAAyB;AACpC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;CACpC,CAAuD,CAAC;AAE3D,gBAAgB;AAChB;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC/D,WAAW,EAAE,wBAAwB;IACrC,YAAY,EAAE,yBAAyB;IACvC,MAAM,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAU;CACxC,CAAC,CAAC,CAAC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
import { BadRequest, Conflict } from "../errors.ts";
|
|
3
|
-
export interface CreateGroupInput {
|
|
4
|
-
organizationSlug: string;
|
|
5
|
-
name: string;
|
|
6
|
-
location: string;
|
|
7
|
-
extensions?: "all" | ("vector" | "crypto" | "fuzzy" | "math" | "stats" | "text" | "unicode" | "uuid" | "regexp" | "vec")[];
|
|
8
|
-
}
|
|
9
|
-
export declare const CreateGroupInput: Schema.Codec<CreateGroupInput>;
|
|
10
|
-
export interface CreateGroupOutput {
|
|
11
|
-
group?: {
|
|
12
|
-
name?: string;
|
|
13
|
-
version?: string;
|
|
14
|
-
uuid?: string;
|
|
15
|
-
locations?: string[];
|
|
16
|
-
primary?: string;
|
|
17
|
-
delete_protection?: boolean;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export declare const CreateGroupOutput: Schema.Codec<CreateGroupOutput>;
|
|
21
|
-
/**
|
|
22
|
-
* Create Group
|
|
23
|
-
*
|
|
24
|
-
* Creates a new group for the organization or user.
|
|
25
|
-
*
|
|
26
|
-
* @param organizationSlug - The slug of the organization or user account.
|
|
27
|
-
*/
|
|
28
|
-
export declare const createGroup: import("@distilled.cloud/core/client").OperationMethod<CreateGroupInput, CreateGroupOutput, BadRequest | Conflict, import("../credentials.ts").Credentials, never>;
|
|
29
|
-
//# sourceMappingURL=createGroup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createGroup.d.ts","sourceRoot":"","sources":["../../src/operations/createGroup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,WAAW,gBAAgB;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EACP,KAAK,GACL,CACI,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,MAAM,GACN,OAAO,GACP,MAAM,GACN,SAAS,GACT,MAAM,GACN,QAAQ,GACR,KAAK,CACR,EAAE,CAAC;CACT;AACD,eAAO,MAAM,gBAAgB,EA4Bb,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;AAG/C,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC7B,CAAC;CACH;AACD,eAAO,MAAM,iBAAiB,EAWb,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAGjD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,oKAIrB,CAAC"}
|