@powersync/management-types 0.0.0-dev.85b697f3
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/LICENSE +67 -0
- package/README.md +88 -0
- package/dist/config/HostedConfig.d.ts +1318 -0
- package/dist/config/HostedConfig.js +101 -0
- package/dist/config/HostedConfig.js.map +1 -0
- package/dist/config/HostedSecret.d.ts +18 -0
- package/dist/config/HostedSecret.js +12 -0
- package/dist/config/HostedSecret.js.map +1 -0
- package/dist/config/connections/ConnectionType.d.ts +6 -0
- package/dist/config/connections/ConnectionType.js +8 -0
- package/dist/config/connections/ConnectionType.js.map +1 -0
- package/dist/config/connections/HostedDatabaseSourceConfig.d.ts +23 -0
- package/dist/config/connections/HostedDatabaseSourceConfig.js +18 -0
- package/dist/config/connections/HostedDatabaseSourceConfig.js.map +1 -0
- package/dist/config/connections/HostedMSSQLConnection.d.ts +308 -0
- package/dist/config/connections/HostedMSSQLConnection.js +41 -0
- package/dist/config/connections/HostedMSSQLConnection.js.map +1 -0
- package/dist/config/connections/HostedMongoConnection.d.ts +33 -0
- package/dist/config/connections/HostedMongoConnection.js +10 -0
- package/dist/config/connections/HostedMongoConnection.js.map +1 -0
- package/dist/config/connections/HostedMySQLConnection.d.ts +46 -0
- package/dist/config/connections/HostedMySQLConnection.js +16 -0
- package/dist/config/connections/HostedMySQLConnection.js.map +1 -0
- package/dist/config/connections/HostedPostgresConnection.d.ts +52 -0
- package/dist/config/connections/HostedPostgresConnection.js +21 -0
- package/dist/config/connections/HostedPostgresConnection.js.map +1 -0
- package/dist/errors.d.ts +10 -0
- package/dist/errors.js +13 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/routes/dashboard-routes.d.ts +13 -0
- package/dist/routes/dashboard-routes.js +16 -0
- package/dist/routes/dashboard-routes.js.map +1 -0
- package/dist/routes/dev-routes.d.ts +588 -0
- package/dist/routes/dev-routes.js +97 -0
- package/dist/routes/dev-routes.js.map +1 -0
- package/dist/routes/general-routes.d.ts +78 -0
- package/dist/routes/general-routes.js +57 -0
- package/dist/routes/general-routes.js.map +1 -0
- package/dist/routes/index.d.ts +6 -0
- package/dist/routes/index.js +7 -0
- package/dist/routes/index.js.map +1 -0
- package/dist/routes/manage-routes.d.ts +1055 -0
- package/dist/routes/manage-routes.js +109 -0
- package/dist/routes/manage-routes.js.map +1 -0
- package/dist/routes/reporting-routes.d.ts +112 -0
- package/dist/routes/reporting-routes.js +61 -0
- package/dist/routes/reporting-routes.js.map +1 -0
- package/dist/routes/schema.d.ts +131 -0
- package/dist/routes/schema.js +71 -0
- package/dist/routes/schema.js.map +1 -0
- package/dist/scripts/compile-json-schema.d.ts +1 -0
- package/dist/scripts/compile-json-schema.js +15 -0
- package/dist/scripts/compile-json-schema.js.map +1 -0
- package/dist/shared.d.ts +17 -0
- package/dist/shared.js +17 -0
- package/dist/shared.js.map +1 -0
- package/dist/utils/pagination.d.ts +12 -0
- package/dist/utils/pagination.js +13 -0
- package/dist/utils/pagination.js.map +1 -0
- package/json-schema/powersync-config.json +880 -0
- package/package.json +44 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import 'bson';
|
|
2
|
+
import * as t from 'ts-codec';
|
|
3
|
+
export * from './schema.js';
|
|
4
|
+
export declare enum GENERAL_ROUTES {
|
|
5
|
+
/** GET */
|
|
6
|
+
LIST_REGIONS = "/api/v1/regions",
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated use LIST_VERSIONS_V2 instead
|
|
9
|
+
*/
|
|
10
|
+
LIST_VERSIONS = "/api/v1/channel-versions",
|
|
11
|
+
LIST_VERSIONS_V2 = "/api/v2/channel-versions"
|
|
12
|
+
}
|
|
13
|
+
export declare const ListRegionsRequest: t.ObjectCodec<{}>;
|
|
14
|
+
export type ListRegionsRequest = t.Encoded<typeof ListRegionsRequest>;
|
|
15
|
+
/**
|
|
16
|
+
* For IP whitelisting, we recommend just including IPs from all regions.
|
|
17
|
+
*
|
|
18
|
+
* An additional "dev" region is included, with IPs used for development purposes,
|
|
19
|
+
* e.g. "test connection".
|
|
20
|
+
*/
|
|
21
|
+
export declare const ListRegionsResponse: t.ObjectCodec<{
|
|
22
|
+
regions: t.ArrayCodec<t.ObjectCodec<{
|
|
23
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
24
|
+
/** false for "dev" region */
|
|
25
|
+
deployable: t.IdentityCodec<t.CodecType.Boolean>;
|
|
26
|
+
ips: t.ArrayCodec<t.IdentityCodec<t.CodecType.String>>;
|
|
27
|
+
}>>;
|
|
28
|
+
}>;
|
|
29
|
+
export type ListRegionsResponse = t.Encoded<typeof ListRegionsResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated
|
|
32
|
+
*/
|
|
33
|
+
export declare const ListVersionsRequest: t.Intersection<t.Codec<{
|
|
34
|
+
cursor?: string | undefined;
|
|
35
|
+
limit?: number | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
cursor?: string | undefined;
|
|
38
|
+
limit?: number | undefined;
|
|
39
|
+
}, string, t.CodecProps>, t.ObjectCodec<{
|
|
40
|
+
channel: t.IdentityCodec<t.CodecType.String>;
|
|
41
|
+
}>>;
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated
|
|
44
|
+
*/
|
|
45
|
+
export type ListVersionsRequest = t.Encoded<typeof ListVersionsRequest>;
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated
|
|
48
|
+
*/
|
|
49
|
+
export declare const ListVersionsResponse: t.ObjectCodec<{
|
|
50
|
+
total: t.IdentityCodec<t.CodecType.Number>;
|
|
51
|
+
count: t.IdentityCodec<t.CodecType.Number>;
|
|
52
|
+
more: t.IdentityCodec<t.CodecType.Boolean>;
|
|
53
|
+
cursor: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
54
|
+
items: t.ArrayCodec<t.IdentityCodec<t.CodecType.String>>;
|
|
55
|
+
}>;
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated
|
|
58
|
+
*/
|
|
59
|
+
export type ListVersionsResponse = t.Encoded<typeof ListVersionsResponse>;
|
|
60
|
+
export declare enum VersionStatus {
|
|
61
|
+
CURRENT = "current",
|
|
62
|
+
AVAILABLE = "available",
|
|
63
|
+
DEPRECATED = "deprecated"
|
|
64
|
+
}
|
|
65
|
+
export declare const Version: t.ObjectCodec<{
|
|
66
|
+
version: t.IdentityCodec<t.CodecType.String>;
|
|
67
|
+
status: t.EnumCodec<typeof VersionStatus>;
|
|
68
|
+
}>;
|
|
69
|
+
export type Version = t.Encoded<typeof Version>;
|
|
70
|
+
export declare const ListVersionsRequestV2: t.ObjectCodec<{
|
|
71
|
+
channel: t.IdentityCodec<t.CodecType.String>;
|
|
72
|
+
}>;
|
|
73
|
+
export type ListVersionsRequestV2 = t.Encoded<typeof ListVersionsRequestV2>;
|
|
74
|
+
export declare const ListVersionsResponseV2: t.ArrayCodec<t.ObjectCodec<{
|
|
75
|
+
version: t.IdentityCodec<t.CodecType.String>;
|
|
76
|
+
status: t.EnumCodec<typeof VersionStatus>;
|
|
77
|
+
}>>;
|
|
78
|
+
export type ListVersionsResponseV2 = t.Encoded<typeof ListVersionsResponseV2>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Required for the ObjectId codec
|
|
2
|
+
import 'bson';
|
|
3
|
+
import * as t from 'ts-codec';
|
|
4
|
+
import { PaginationRequest, PaginationResponse } from '../utils/pagination.js';
|
|
5
|
+
export * from './schema.js';
|
|
6
|
+
export var GENERAL_ROUTES;
|
|
7
|
+
(function (GENERAL_ROUTES) {
|
|
8
|
+
/** GET */
|
|
9
|
+
GENERAL_ROUTES["LIST_REGIONS"] = "/api/v1/regions";
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated use LIST_VERSIONS_V2 instead
|
|
12
|
+
*/
|
|
13
|
+
GENERAL_ROUTES["LIST_VERSIONS"] = "/api/v1/channel-versions";
|
|
14
|
+
GENERAL_ROUTES["LIST_VERSIONS_V2"] = "/api/v2/channel-versions";
|
|
15
|
+
})(GENERAL_ROUTES || (GENERAL_ROUTES = {}));
|
|
16
|
+
// GET /api/v1/regions
|
|
17
|
+
// Returns list of regions to whitelist on the database.
|
|
18
|
+
export const ListRegionsRequest = t.object({});
|
|
19
|
+
/**
|
|
20
|
+
* For IP whitelisting, we recommend just including IPs from all regions.
|
|
21
|
+
*
|
|
22
|
+
* An additional "dev" region is included, with IPs used for development purposes,
|
|
23
|
+
* e.g. "test connection".
|
|
24
|
+
*/
|
|
25
|
+
export const ListRegionsResponse = t.object({
|
|
26
|
+
regions: t.array(t.object({
|
|
27
|
+
name: t.string,
|
|
28
|
+
/** false for "dev" region */
|
|
29
|
+
deployable: t.boolean,
|
|
30
|
+
ips: t.array(t.string)
|
|
31
|
+
}))
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated
|
|
35
|
+
*/
|
|
36
|
+
export const ListVersionsRequest = PaginationRequest.and(t.object({
|
|
37
|
+
channel: t.string
|
|
38
|
+
}));
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated
|
|
41
|
+
*/
|
|
42
|
+
export const ListVersionsResponse = PaginationResponse(t.string);
|
|
43
|
+
export var VersionStatus;
|
|
44
|
+
(function (VersionStatus) {
|
|
45
|
+
VersionStatus["CURRENT"] = "current";
|
|
46
|
+
VersionStatus["AVAILABLE"] = "available";
|
|
47
|
+
VersionStatus["DEPRECATED"] = "deprecated";
|
|
48
|
+
})(VersionStatus || (VersionStatus = {}));
|
|
49
|
+
export const Version = t.object({
|
|
50
|
+
version: t.string,
|
|
51
|
+
status: t.Enum(VersionStatus)
|
|
52
|
+
});
|
|
53
|
+
export const ListVersionsRequestV2 = t.object({
|
|
54
|
+
channel: t.string
|
|
55
|
+
});
|
|
56
|
+
export const ListVersionsResponseV2 = t.array(Version);
|
|
57
|
+
//# sourceMappingURL=general-routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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