@powersync/service-types 0.0.2
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 +7 -0
- package/LICENSE +67 -0
- package/dist/config/PowerSyncConfig.d.ts +230 -0
- package/dist/config/PowerSyncConfig.js +141 -0
- package/dist/config/PowerSyncConfig.js.map +1 -0
- package/dist/config/normalize.d.ts +32 -0
- package/dist/config/normalize.js +111 -0
- package/dist/config/normalize.js.map +1 -0
- package/dist/definitions.d.ts +138 -0
- package/dist/definitions.js +114 -0
- package/dist/definitions.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/routes.d.ts +241 -0
- package/dist/routes.js +93 -0
- package/dist/routes.js.map +1 -0
- package/package.json +19 -0
- package/src/config/PowerSyncConfig.ts +147 -0
- package/src/config/normalize.ts +114 -0
- package/src/definitions.ts +117 -0
- package/src/index.ts +6 -0
- package/src/routes.ts +94 -0
- package/tsconfig.json +10 -0
- package/tsconfig.tsbuildinfo +1 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import * as t from 'ts-codec';
|
|
2
|
+
export declare const ReplicationError: t.ObjectCodec<{
|
|
3
|
+
/** Warning: Could indicate an issue. Fatal: Prevents replicating. */
|
|
4
|
+
level: t.Union<t.Codec<"warning", "warning", string, t.CodecProps>, t.LiteralCodec<"fatal">>;
|
|
5
|
+
message: t.IdentityCodec<t.CodecType.String>;
|
|
6
|
+
}>;
|
|
7
|
+
export type ReplicationError = t.Encoded<typeof ReplicationError>;
|
|
8
|
+
export declare const TableInfo: t.ObjectCodec<{
|
|
9
|
+
schema: t.IdentityCodec<t.CodecType.String>;
|
|
10
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
11
|
+
/** Specified if this table is part of a wildcard pattern. */
|
|
12
|
+
pattern: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
13
|
+
/** Usually just ['id'] */
|
|
14
|
+
replication_id: t.ArrayCodec<t.IdentityCodec<t.CodecType.String>>;
|
|
15
|
+
/** Used in data replication */
|
|
16
|
+
data_queries: t.IdentityCodec<t.CodecType.Boolean>;
|
|
17
|
+
/** Used for parameter query replication */
|
|
18
|
+
parameter_queries: t.IdentityCodec<t.CodecType.Boolean>;
|
|
19
|
+
/** Also included in the global errors array. */
|
|
20
|
+
errors: t.ArrayCodec<t.ObjectCodec<{
|
|
21
|
+
/** Warning: Could indicate an issue. Fatal: Prevents replicating. */
|
|
22
|
+
level: t.Union<t.Codec<"warning", "warning", string, t.CodecProps>, t.LiteralCodec<"fatal">>;
|
|
23
|
+
message: t.IdentityCodec<t.CodecType.String>;
|
|
24
|
+
}>>;
|
|
25
|
+
}>;
|
|
26
|
+
export type TableInfo = t.Encoded<typeof TableInfo>;
|
|
27
|
+
export declare const SyncRulesStatus: t.ObjectCodec<{
|
|
28
|
+
content: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
29
|
+
connections: t.ArrayCodec<t.ObjectCodec<{
|
|
30
|
+
id: t.IdentityCodec<t.CodecType.String>;
|
|
31
|
+
tag: t.IdentityCodec<t.CodecType.String>;
|
|
32
|
+
/**
|
|
33
|
+
* PostgreSQL logical replication slot name.
|
|
34
|
+
*/
|
|
35
|
+
slot_name: t.IdentityCodec<t.CodecType.String>;
|
|
36
|
+
/**
|
|
37
|
+
* Once initial replication is done, this moves over to
|
|
38
|
+
* logical replication.
|
|
39
|
+
*/
|
|
40
|
+
initial_replication_done: t.IdentityCodec<t.CodecType.Boolean>;
|
|
41
|
+
/**
|
|
42
|
+
* The last LSN that has been replicated. This may be in the middle of a transaction.
|
|
43
|
+
*/
|
|
44
|
+
last_lsn: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
45
|
+
/**
|
|
46
|
+
* The last time any replication activity was recorded.
|
|
47
|
+
*
|
|
48
|
+
* This is typically (but not always) updated together with last_lsn
|
|
49
|
+
*/
|
|
50
|
+
last_keepalive_ts: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
51
|
+
/**
|
|
52
|
+
* The last time we created a new checkpoint. In other words, a transaction
|
|
53
|
+
* was successfully replicated.
|
|
54
|
+
*/
|
|
55
|
+
last_checkpoint_ts: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
56
|
+
/** Replication lag in bytes. undefined if we cannot calculate this. */
|
|
57
|
+
replication_lag_bytes: t.OptionalCodec<t.Codec<number, number, string, t.CodecProps>>;
|
|
58
|
+
tables: t.ArrayCodec<t.ObjectCodec<{
|
|
59
|
+
schema: t.IdentityCodec<t.CodecType.String>;
|
|
60
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
61
|
+
/** Specified if this table is part of a wildcard pattern. */
|
|
62
|
+
pattern: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
63
|
+
/** Usually just ['id'] */
|
|
64
|
+
replication_id: t.ArrayCodec<t.IdentityCodec<t.CodecType.String>>;
|
|
65
|
+
/** Used in data replication */
|
|
66
|
+
data_queries: t.IdentityCodec<t.CodecType.Boolean>;
|
|
67
|
+
/** Used for parameter query replication */
|
|
68
|
+
parameter_queries: t.IdentityCodec<t.CodecType.Boolean>;
|
|
69
|
+
/** Also included in the global errors array. */
|
|
70
|
+
errors: t.ArrayCodec<t.ObjectCodec<{
|
|
71
|
+
/** Warning: Could indicate an issue. Fatal: Prevents replicating. */
|
|
72
|
+
level: t.Union<t.Codec<"warning", "warning", string, t.CodecProps>, t.LiteralCodec<"fatal">>;
|
|
73
|
+
message: t.IdentityCodec<t.CodecType.String>;
|
|
74
|
+
}>>;
|
|
75
|
+
}>>;
|
|
76
|
+
}>>;
|
|
77
|
+
/** Sync-rule-level errors */
|
|
78
|
+
errors: t.ArrayCodec<t.ObjectCodec<{
|
|
79
|
+
/** Warning: Could indicate an issue. Fatal: Prevents replicating. */
|
|
80
|
+
level: t.Union<t.Codec<"warning", "warning", string, t.CodecProps>, t.LiteralCodec<"fatal">>;
|
|
81
|
+
message: t.IdentityCodec<t.CodecType.String>;
|
|
82
|
+
}>>;
|
|
83
|
+
}>;
|
|
84
|
+
export type SyncRulesStatus = t.Encoded<typeof SyncRulesStatus>;
|
|
85
|
+
export declare const ConnectionStatus: t.ObjectCodec<{
|
|
86
|
+
id: t.IdentityCodec<t.CodecType.String>;
|
|
87
|
+
postgres_uri: t.IdentityCodec<t.CodecType.String>;
|
|
88
|
+
connected: t.IdentityCodec<t.CodecType.Boolean>;
|
|
89
|
+
/** Connection-level errors */
|
|
90
|
+
errors: t.ArrayCodec<t.ObjectCodec<{
|
|
91
|
+
/** Warning: Could indicate an issue. Fatal: Prevents replicating. */
|
|
92
|
+
level: t.Union<t.Codec<"warning", "warning", string, t.CodecProps>, t.LiteralCodec<"fatal">>;
|
|
93
|
+
message: t.IdentityCodec<t.CodecType.String>;
|
|
94
|
+
}>>;
|
|
95
|
+
}>;
|
|
96
|
+
export type ConnectionStatus = t.Encoded<typeof ConnectionStatus>;
|
|
97
|
+
export declare const DatabaseSchema: t.ObjectCodec<{
|
|
98
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
99
|
+
tables: t.ArrayCodec<t.ObjectCodec<{
|
|
100
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
101
|
+
columns: t.ArrayCodec<t.ObjectCodec<{
|
|
102
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
103
|
+
/**
|
|
104
|
+
* Full type name, e.g. "character varying(255)[]"
|
|
105
|
+
*/
|
|
106
|
+
type: t.IdentityCodec<t.CodecType.String>;
|
|
107
|
+
/**
|
|
108
|
+
* Internal postgres type, e.g. "varchar[]".
|
|
109
|
+
*/
|
|
110
|
+
pg_type: t.IdentityCodec<t.CodecType.String>;
|
|
111
|
+
}>>;
|
|
112
|
+
}>>;
|
|
113
|
+
}>;
|
|
114
|
+
export type DatabaseSchema = t.Encoded<typeof DatabaseSchema>;
|
|
115
|
+
export declare const InstanceSchema: t.ObjectCodec<{
|
|
116
|
+
connections: t.ArrayCodec<t.ObjectCodec<{
|
|
117
|
+
id: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
118
|
+
tag: t.IdentityCodec<t.CodecType.String>;
|
|
119
|
+
schemas: t.ArrayCodec<t.ObjectCodec<{
|
|
120
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
121
|
+
tables: t.ArrayCodec<t.ObjectCodec<{
|
|
122
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
123
|
+
columns: t.ArrayCodec<t.ObjectCodec<{
|
|
124
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
125
|
+
/**
|
|
126
|
+
* Full type name, e.g. "character varying(255)[]"
|
|
127
|
+
*/
|
|
128
|
+
type: t.IdentityCodec<t.CodecType.String>;
|
|
129
|
+
/**
|
|
130
|
+
* Internal postgres type, e.g. "varchar[]".
|
|
131
|
+
*/
|
|
132
|
+
pg_type: t.IdentityCodec<t.CodecType.String>;
|
|
133
|
+
}>>;
|
|
134
|
+
}>>;
|
|
135
|
+
}>>;
|
|
136
|
+
}>>;
|
|
137
|
+
}>;
|
|
138
|
+
export type InstanceSchema = t.Encoded<typeof InstanceSchema>;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.InstanceSchema = exports.DatabaseSchema = exports.ConnectionStatus = exports.SyncRulesStatus = exports.TableInfo = exports.ReplicationError = void 0;
|
|
27
|
+
const t = __importStar(require("ts-codec"));
|
|
28
|
+
exports.ReplicationError = t.object({
|
|
29
|
+
/** Warning: Could indicate an issue. Fatal: Prevents replicating. */
|
|
30
|
+
level: t.literal('warning').or(t.literal('fatal')),
|
|
31
|
+
message: t.string
|
|
32
|
+
});
|
|
33
|
+
exports.TableInfo = t.object({
|
|
34
|
+
schema: t.string,
|
|
35
|
+
name: t.string,
|
|
36
|
+
/** Specified if this table is part of a wildcard pattern. */
|
|
37
|
+
pattern: t.string.optional(),
|
|
38
|
+
/** Usually just ['id'] */
|
|
39
|
+
replication_id: t.array(t.string),
|
|
40
|
+
/** Used in data replication */
|
|
41
|
+
data_queries: t.boolean,
|
|
42
|
+
/** Used for parameter query replication */
|
|
43
|
+
parameter_queries: t.boolean,
|
|
44
|
+
/** Also included in the global errors array. */
|
|
45
|
+
errors: t.array(exports.ReplicationError)
|
|
46
|
+
});
|
|
47
|
+
exports.SyncRulesStatus = t.object({
|
|
48
|
+
content: t.string.optional(),
|
|
49
|
+
connections: t.array(t.object({
|
|
50
|
+
id: t.string,
|
|
51
|
+
tag: t.string,
|
|
52
|
+
/**
|
|
53
|
+
* PostgreSQL logical replication slot name.
|
|
54
|
+
*/
|
|
55
|
+
slot_name: t.string,
|
|
56
|
+
/**
|
|
57
|
+
* Once initial replication is done, this moves over to
|
|
58
|
+
* logical replication.
|
|
59
|
+
*/
|
|
60
|
+
initial_replication_done: t.boolean,
|
|
61
|
+
/**
|
|
62
|
+
* The last LSN that has been replicated. This may be in the middle of a transaction.
|
|
63
|
+
*/
|
|
64
|
+
last_lsn: t.string.optional(),
|
|
65
|
+
/**
|
|
66
|
+
* The last time any replication activity was recorded.
|
|
67
|
+
*
|
|
68
|
+
* This is typically (but not always) updated together with last_lsn
|
|
69
|
+
*/
|
|
70
|
+
last_keepalive_ts: t.string.optional(),
|
|
71
|
+
/**
|
|
72
|
+
* The last time we created a new checkpoint. In other words, a transaction
|
|
73
|
+
* was successfully replicated.
|
|
74
|
+
*/
|
|
75
|
+
last_checkpoint_ts: t.string.optional(),
|
|
76
|
+
/** Replication lag in bytes. undefined if we cannot calculate this. */
|
|
77
|
+
replication_lag_bytes: t.number.optional(),
|
|
78
|
+
tables: t.array(exports.TableInfo)
|
|
79
|
+
})),
|
|
80
|
+
/** Sync-rule-level errors */
|
|
81
|
+
errors: t.array(exports.ReplicationError)
|
|
82
|
+
});
|
|
83
|
+
exports.ConnectionStatus = t.object({
|
|
84
|
+
id: t.string,
|
|
85
|
+
postgres_uri: t.string,
|
|
86
|
+
connected: t.boolean,
|
|
87
|
+
/** Connection-level errors */
|
|
88
|
+
errors: t.array(exports.ReplicationError)
|
|
89
|
+
});
|
|
90
|
+
exports.DatabaseSchema = t.object({
|
|
91
|
+
name: t.string,
|
|
92
|
+
tables: t.array(t.object({
|
|
93
|
+
name: t.string,
|
|
94
|
+
columns: t.array(t.object({
|
|
95
|
+
name: t.string,
|
|
96
|
+
/**
|
|
97
|
+
* Full type name, e.g. "character varying(255)[]"
|
|
98
|
+
*/
|
|
99
|
+
type: t.string,
|
|
100
|
+
/**
|
|
101
|
+
* Internal postgres type, e.g. "varchar[]".
|
|
102
|
+
*/
|
|
103
|
+
pg_type: t.string
|
|
104
|
+
}))
|
|
105
|
+
}))
|
|
106
|
+
});
|
|
107
|
+
exports.InstanceSchema = t.object({
|
|
108
|
+
connections: t.array(t.object({
|
|
109
|
+
id: t.string.optional(),
|
|
110
|
+
tag: t.string,
|
|
111
|
+
schemas: t.array(exports.DatabaseSchema)
|
|
112
|
+
}))
|
|
113
|
+
});
|
|
114
|
+
//# sourceMappingURL=definitions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../src/definitions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA8B;AAEjB,QAAA,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,qEAAqE;IACrE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,OAAO,EAAE,CAAC,CAAC,MAAM;CAClB,CAAC,CAAC;AAGU,QAAA,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,MAAM,EAAE,CAAC,CAAC,MAAM;IAChB,IAAI,EAAE,CAAC,CAAC,MAAM;IAEd,6DAA6D;IAC7D,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;IAE5B,0BAA0B;IAC1B,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;IACjC,+BAA+B;IAC/B,YAAY,EAAE,CAAC,CAAC,OAAO;IACvB,2CAA2C;IAC3C,iBAAiB,EAAE,CAAC,CAAC,OAAO;IAE5B,gDAAgD;IAChD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAgB,CAAC;CAClC,CAAC,CAAC;AAGU,QAAA,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;IAC5B,WAAW,EAAE,CAAC,CAAC,KAAK,CAClB,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM;QACZ,GAAG,EAAE,CAAC,CAAC,MAAM;QAEb;;WAEG;QACH,SAAS,EAAE,CAAC,CAAC,MAAM;QAEnB;;;WAGG;QACH,wBAAwB,EAAE,CAAC,CAAC,OAAO;QAEnC;;WAEG;QACH,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;QAE7B;;;;WAIG;QACH,iBAAiB,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;QAEtC;;;WAGG;QACH,kBAAkB,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;QAEvC,uEAAuE;QACvE,qBAAqB,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;QAE1C,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAS,CAAC;KAC3B,CAAC,CACH;IACD,6BAA6B;IAC7B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAgB,CAAC;CAClC,CAAC,CAAC;AAGU,QAAA,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,CAAC,CAAC,MAAM;IACZ,YAAY,EAAE,CAAC,CAAC,MAAM;IACtB,SAAS,EAAE,CAAC,CAAC,OAAO;IACpB,8BAA8B;IAC9B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,wBAAgB,CAAC;CAClC,CAAC,CAAC;AAGU,QAAA,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,CAAC,CAAC,MAAM;IACd,MAAM,EAAE,CAAC,CAAC,KAAK,CACb,CAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,MAAM;QACd,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,CAAC,CAAC,MAAM,CAAC;YACP,IAAI,EAAE,CAAC,CAAC,MAAM;YACd;;eAEG;YACH,IAAI,EAAE,CAAC,CAAC,MAAM;YACd;;eAEG;YACH,OAAO,EAAE,CAAC,CAAC,MAAM;SAClB,CAAC,CACH;KACF,CAAC,CACH;CACF,CAAC,CAAC;AAGU,QAAA,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,WAAW,EAAE,CAAC,CAAC,KAAK,CAClB,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;QACvB,GAAG,EAAE,CAAC,CAAC,MAAM;QACb,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAc,CAAC;KACjC,CAAC,CACH;CACF,CAAC,CAAC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.internal_routes = exports.configFile = void 0;
|
|
30
|
+
exports.configFile = __importStar(require("./config/PowerSyncConfig.js"));
|
|
31
|
+
__exportStar(require("./definitions.js"), exports);
|
|
32
|
+
__exportStar(require("./config/normalize.js"), exports);
|
|
33
|
+
exports.internal_routes = __importStar(require("./routes.js"));
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0EAA0D;AAG1D,mDAAiC;AACjC,wDAAsC;AACtC,+DAA+C"}
|
package/dist/routes.d.ts
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import * as t from 'ts-codec';
|
|
2
|
+
export declare const GetSchemaRequest: t.ObjectCodec<{}>;
|
|
3
|
+
export type GetSchemaRequest = t.Encoded<typeof GetSchemaRequest>;
|
|
4
|
+
export declare const GetSchemaResponse: t.ObjectCodec<{
|
|
5
|
+
connections: t.ArrayCodec<t.ObjectCodec<{
|
|
6
|
+
id: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
7
|
+
tag: t.IdentityCodec<t.CodecType.String>;
|
|
8
|
+
schemas: t.ArrayCodec<t.ObjectCodec<{
|
|
9
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
10
|
+
tables: t.ArrayCodec<t.ObjectCodec<{
|
|
11
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
12
|
+
columns: t.ArrayCodec<t.ObjectCodec<{
|
|
13
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
14
|
+
type: t.IdentityCodec<t.CodecType.String>;
|
|
15
|
+
pg_type: t.IdentityCodec<t.CodecType.String>;
|
|
16
|
+
}>>;
|
|
17
|
+
}>>;
|
|
18
|
+
}>>;
|
|
19
|
+
}>>;
|
|
20
|
+
}>;
|
|
21
|
+
export type GetSchemaResponse = t.Encoded<typeof GetSchemaResponse>;
|
|
22
|
+
export declare const ExecuteSqlRequest: t.ObjectCodec<{
|
|
23
|
+
connection_id: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
24
|
+
sql: t.ObjectCodec<{
|
|
25
|
+
query: t.IdentityCodec<t.CodecType.String>;
|
|
26
|
+
args: t.ArrayCodec<t.Union<t.Codec<string | number, string | number, string, t.CodecProps>, t.IdentityCodec<t.CodecType.Boolean>>>;
|
|
27
|
+
}>;
|
|
28
|
+
}>;
|
|
29
|
+
export type ExecuteSqlRequest = t.Encoded<typeof ExecuteSqlRequest>;
|
|
30
|
+
export declare const ExecuteSqlResponse: t.ObjectCodec<{
|
|
31
|
+
success: t.IdentityCodec<t.CodecType.Boolean>;
|
|
32
|
+
results: t.ObjectCodec<{
|
|
33
|
+
columns: t.ArrayCodec<t.IdentityCodec<t.CodecType.String>>;
|
|
34
|
+
rows: t.ArrayCodec<t.ArrayCodec<t.Union<t.Codec<string | number | boolean, string | number | boolean, string, t.CodecProps>, t.Codec<null, null, t.CodecType.Null, t.CodecProps>>>>;
|
|
35
|
+
}>;
|
|
36
|
+
/** Set if success = false */
|
|
37
|
+
error: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
38
|
+
}>;
|
|
39
|
+
export type ExecuteSqlResponse = t.Encoded<typeof ExecuteSqlResponse>;
|
|
40
|
+
export declare const DemoCredentialsRequest: t.ObjectCodec<{
|
|
41
|
+
connection_id: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
42
|
+
}>;
|
|
43
|
+
export type DemoCredentialsRequest = t.Encoded<typeof DemoCredentialsRequest>;
|
|
44
|
+
export declare const DemoCredentialsResponse: t.ObjectCodec<{
|
|
45
|
+
/** If this instance has a demo database, this contains the credentials. */
|
|
46
|
+
credentials: t.OptionalCodec<t.Codec<{
|
|
47
|
+
postgres_uri: string;
|
|
48
|
+
}, {
|
|
49
|
+
postgres_uri: string;
|
|
50
|
+
}, string, t.CodecProps>>;
|
|
51
|
+
}>;
|
|
52
|
+
export type DemoCredentialsResponse = t.Encoded<typeof DemoCredentialsResponse>;
|
|
53
|
+
export declare const DiagnosticsRequest: t.ObjectCodec<{
|
|
54
|
+
sync_rules_content: t.OptionalCodec<t.Codec<boolean, boolean, string, t.CodecProps>>;
|
|
55
|
+
}>;
|
|
56
|
+
export type DiagnosticsRequest = t.Encoded<typeof DiagnosticsRequest>;
|
|
57
|
+
export declare const DiagnosticsResponse: t.ObjectCodec<{
|
|
58
|
+
/**
|
|
59
|
+
* Connection-level errors are listed here.
|
|
60
|
+
*/
|
|
61
|
+
connections: t.ArrayCodec<t.ObjectCodec<{
|
|
62
|
+
id: t.IdentityCodec<t.CodecType.String>;
|
|
63
|
+
postgres_uri: t.IdentityCodec<t.CodecType.String>;
|
|
64
|
+
connected: t.IdentityCodec<t.CodecType.Boolean>;
|
|
65
|
+
errors: t.ArrayCodec<t.ObjectCodec<{
|
|
66
|
+
level: t.Union<t.Codec<"warning", "warning", string, t.CodecProps>, t.LiteralCodec<"fatal">>;
|
|
67
|
+
message: t.IdentityCodec<t.CodecType.String>;
|
|
68
|
+
}>>;
|
|
69
|
+
}>>;
|
|
70
|
+
/**
|
|
71
|
+
* Present if there are fully-deployed sync rules.
|
|
72
|
+
*
|
|
73
|
+
* Sync-rule-level errors are listed here.
|
|
74
|
+
*/
|
|
75
|
+
active_sync_rules: t.OptionalCodec<t.Codec<{
|
|
76
|
+
errors: {
|
|
77
|
+
level: "warning" | "fatal";
|
|
78
|
+
message: string;
|
|
79
|
+
}[];
|
|
80
|
+
connections: {
|
|
81
|
+
id: string;
|
|
82
|
+
tag: string;
|
|
83
|
+
slot_name: string;
|
|
84
|
+
initial_replication_done: boolean;
|
|
85
|
+
tables: {
|
|
86
|
+
schema: string;
|
|
87
|
+
name: string;
|
|
88
|
+
replication_id: string[];
|
|
89
|
+
data_queries: boolean;
|
|
90
|
+
parameter_queries: boolean;
|
|
91
|
+
errors: {
|
|
92
|
+
level: "warning" | "fatal";
|
|
93
|
+
message: string;
|
|
94
|
+
}[];
|
|
95
|
+
pattern?: string | undefined;
|
|
96
|
+
}[];
|
|
97
|
+
last_lsn?: string | undefined;
|
|
98
|
+
last_keepalive_ts?: string | undefined;
|
|
99
|
+
last_checkpoint_ts?: string | undefined;
|
|
100
|
+
replication_lag_bytes?: number | undefined;
|
|
101
|
+
}[];
|
|
102
|
+
content?: string | undefined;
|
|
103
|
+
}, {
|
|
104
|
+
errors: {
|
|
105
|
+
level: "warning" | "fatal";
|
|
106
|
+
message: string;
|
|
107
|
+
}[];
|
|
108
|
+
connections: {
|
|
109
|
+
id: string;
|
|
110
|
+
tag: string;
|
|
111
|
+
slot_name: string;
|
|
112
|
+
initial_replication_done: boolean;
|
|
113
|
+
tables: {
|
|
114
|
+
schema: string;
|
|
115
|
+
name: string;
|
|
116
|
+
replication_id: string[];
|
|
117
|
+
data_queries: boolean;
|
|
118
|
+
parameter_queries: boolean;
|
|
119
|
+
errors: {
|
|
120
|
+
level: "warning" | "fatal";
|
|
121
|
+
message: string;
|
|
122
|
+
}[];
|
|
123
|
+
pattern?: string | undefined;
|
|
124
|
+
}[];
|
|
125
|
+
last_lsn?: string | undefined;
|
|
126
|
+
last_keepalive_ts?: string | undefined;
|
|
127
|
+
last_checkpoint_ts?: string | undefined;
|
|
128
|
+
replication_lag_bytes?: number | undefined;
|
|
129
|
+
}[];
|
|
130
|
+
content?: string | undefined;
|
|
131
|
+
}, string, t.CodecProps>>;
|
|
132
|
+
/**
|
|
133
|
+
* Present if there are sync rules in the process of being deployed / initial replication.
|
|
134
|
+
*
|
|
135
|
+
* Once initial replication is done, this will be placed in `active_sync_rules`.
|
|
136
|
+
*
|
|
137
|
+
* Sync-rule-level errors are listed here.
|
|
138
|
+
*/
|
|
139
|
+
deploying_sync_rules: t.OptionalCodec<t.Codec<{
|
|
140
|
+
errors: {
|
|
141
|
+
level: "warning" | "fatal";
|
|
142
|
+
message: string;
|
|
143
|
+
}[];
|
|
144
|
+
connections: {
|
|
145
|
+
id: string;
|
|
146
|
+
tag: string;
|
|
147
|
+
slot_name: string;
|
|
148
|
+
initial_replication_done: boolean;
|
|
149
|
+
tables: {
|
|
150
|
+
schema: string;
|
|
151
|
+
name: string;
|
|
152
|
+
replication_id: string[];
|
|
153
|
+
data_queries: boolean;
|
|
154
|
+
parameter_queries: boolean;
|
|
155
|
+
errors: {
|
|
156
|
+
level: "warning" | "fatal";
|
|
157
|
+
message: string;
|
|
158
|
+
}[];
|
|
159
|
+
pattern?: string | undefined;
|
|
160
|
+
}[];
|
|
161
|
+
last_lsn?: string | undefined;
|
|
162
|
+
last_keepalive_ts?: string | undefined;
|
|
163
|
+
last_checkpoint_ts?: string | undefined;
|
|
164
|
+
replication_lag_bytes?: number | undefined;
|
|
165
|
+
}[];
|
|
166
|
+
content?: string | undefined;
|
|
167
|
+
}, {
|
|
168
|
+
errors: {
|
|
169
|
+
level: "warning" | "fatal";
|
|
170
|
+
message: string;
|
|
171
|
+
}[];
|
|
172
|
+
connections: {
|
|
173
|
+
id: string;
|
|
174
|
+
tag: string;
|
|
175
|
+
slot_name: string;
|
|
176
|
+
initial_replication_done: boolean;
|
|
177
|
+
tables: {
|
|
178
|
+
schema: string;
|
|
179
|
+
name: string;
|
|
180
|
+
replication_id: string[];
|
|
181
|
+
data_queries: boolean;
|
|
182
|
+
parameter_queries: boolean;
|
|
183
|
+
errors: {
|
|
184
|
+
level: "warning" | "fatal";
|
|
185
|
+
message: string;
|
|
186
|
+
}[];
|
|
187
|
+
pattern?: string | undefined;
|
|
188
|
+
}[];
|
|
189
|
+
last_lsn?: string | undefined;
|
|
190
|
+
last_keepalive_ts?: string | undefined;
|
|
191
|
+
last_checkpoint_ts?: string | undefined;
|
|
192
|
+
replication_lag_bytes?: number | undefined;
|
|
193
|
+
}[];
|
|
194
|
+
content?: string | undefined;
|
|
195
|
+
}, string, t.CodecProps>>;
|
|
196
|
+
}>;
|
|
197
|
+
export type DiagnosticsResponse = t.Encoded<typeof DiagnosticsResponse>;
|
|
198
|
+
export declare const ReprocessRequest: t.ObjectCodec<{}>;
|
|
199
|
+
export type ReprocessRequest = t.Encoded<typeof ReprocessRequest>;
|
|
200
|
+
export declare const ReprocessResponse: t.ObjectCodec<{
|
|
201
|
+
connections: t.ArrayCodec<t.ObjectCodec<{
|
|
202
|
+
id: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
203
|
+
tag: t.IdentityCodec<t.CodecType.String>;
|
|
204
|
+
slot_name: t.IdentityCodec<t.CodecType.String>;
|
|
205
|
+
}>>;
|
|
206
|
+
}>;
|
|
207
|
+
export type ReprocessResponse = t.Encoded<typeof ReprocessResponse>;
|
|
208
|
+
export declare const ValidateRequest: t.ObjectCodec<{
|
|
209
|
+
sync_rules: t.IdentityCodec<t.CodecType.String>;
|
|
210
|
+
}>;
|
|
211
|
+
export type ValidateRequest = t.Encoded<typeof ValidateRequest>;
|
|
212
|
+
export declare const ValidateResponse: t.ObjectCodec<{
|
|
213
|
+
content: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
214
|
+
connections: t.ArrayCodec<t.ObjectCodec<{
|
|
215
|
+
id: t.IdentityCodec<t.CodecType.String>;
|
|
216
|
+
tag: t.IdentityCodec<t.CodecType.String>;
|
|
217
|
+
slot_name: t.IdentityCodec<t.CodecType.String>;
|
|
218
|
+
initial_replication_done: t.IdentityCodec<t.CodecType.Boolean>;
|
|
219
|
+
last_lsn: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
220
|
+
last_keepalive_ts: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
221
|
+
last_checkpoint_ts: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
222
|
+
replication_lag_bytes: t.OptionalCodec<t.Codec<number, number, string, t.CodecProps>>;
|
|
223
|
+
tables: t.ArrayCodec<t.ObjectCodec<{
|
|
224
|
+
schema: t.IdentityCodec<t.CodecType.String>;
|
|
225
|
+
name: t.IdentityCodec<t.CodecType.String>;
|
|
226
|
+
pattern: t.OptionalCodec<t.Codec<string, string, string, t.CodecProps>>;
|
|
227
|
+
replication_id: t.ArrayCodec<t.IdentityCodec<t.CodecType.String>>;
|
|
228
|
+
data_queries: t.IdentityCodec<t.CodecType.Boolean>;
|
|
229
|
+
parameter_queries: t.IdentityCodec<t.CodecType.Boolean>;
|
|
230
|
+
errors: t.ArrayCodec<t.ObjectCodec<{
|
|
231
|
+
level: t.Union<t.Codec<"warning", "warning", string, t.CodecProps>, t.LiteralCodec<"fatal">>;
|
|
232
|
+
message: t.IdentityCodec<t.CodecType.String>;
|
|
233
|
+
}>>;
|
|
234
|
+
}>>;
|
|
235
|
+
}>>;
|
|
236
|
+
errors: t.ArrayCodec<t.ObjectCodec<{
|
|
237
|
+
level: t.Union<t.Codec<"warning", "warning", string, t.CodecProps>, t.LiteralCodec<"fatal">>;
|
|
238
|
+
message: t.IdentityCodec<t.CodecType.String>;
|
|
239
|
+
}>>;
|
|
240
|
+
}>;
|
|
241
|
+
export type ValidateResponse = t.Encoded<typeof ValidateResponse>;
|
package/dist/routes.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.ValidateResponse = exports.ValidateRequest = exports.ReprocessResponse = exports.ReprocessRequest = exports.DiagnosticsResponse = exports.DiagnosticsRequest = exports.DemoCredentialsResponse = exports.DemoCredentialsRequest = exports.ExecuteSqlResponse = exports.ExecuteSqlRequest = exports.GetSchemaResponse = exports.GetSchemaRequest = void 0;
|
|
27
|
+
const t = __importStar(require("ts-codec"));
|
|
28
|
+
const definitions_1 = require("./definitions");
|
|
29
|
+
exports.GetSchemaRequest = t.object({});
|
|
30
|
+
exports.GetSchemaResponse = definitions_1.InstanceSchema;
|
|
31
|
+
exports.ExecuteSqlRequest = t.object({
|
|
32
|
+
connection_id: t.string.optional(),
|
|
33
|
+
sql: t.object({
|
|
34
|
+
query: t.string,
|
|
35
|
+
args: t.array(t.string.or(t.number).or(t.boolean))
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
exports.ExecuteSqlResponse = t.object({
|
|
39
|
+
success: t.boolean,
|
|
40
|
+
results: t.object({
|
|
41
|
+
columns: t.array(t.string),
|
|
42
|
+
rows: t.array(t.array(t.string.or(t.number).or(t.boolean).or(t.Null)))
|
|
43
|
+
}),
|
|
44
|
+
/** Set if success = false */
|
|
45
|
+
error: t.string.optional()
|
|
46
|
+
});
|
|
47
|
+
exports.DemoCredentialsRequest = t.object({
|
|
48
|
+
connection_id: t.string.optional()
|
|
49
|
+
});
|
|
50
|
+
exports.DemoCredentialsResponse = t.object({
|
|
51
|
+
/** If this instance has a demo database, this contains the credentials. */
|
|
52
|
+
credentials: t
|
|
53
|
+
.object({
|
|
54
|
+
postgres_uri: t.string
|
|
55
|
+
})
|
|
56
|
+
.optional()
|
|
57
|
+
});
|
|
58
|
+
exports.DiagnosticsRequest = t.object({
|
|
59
|
+
sync_rules_content: t.boolean.optional()
|
|
60
|
+
});
|
|
61
|
+
exports.DiagnosticsResponse = t.object({
|
|
62
|
+
/**
|
|
63
|
+
* Connection-level errors are listed here.
|
|
64
|
+
*/
|
|
65
|
+
connections: t.array(definitions_1.ConnectionStatus),
|
|
66
|
+
/**
|
|
67
|
+
* Present if there are fully-deployed sync rules.
|
|
68
|
+
*
|
|
69
|
+
* Sync-rule-level errors are listed here.
|
|
70
|
+
*/
|
|
71
|
+
active_sync_rules: definitions_1.SyncRulesStatus.optional(),
|
|
72
|
+
/**
|
|
73
|
+
* Present if there are sync rules in the process of being deployed / initial replication.
|
|
74
|
+
*
|
|
75
|
+
* Once initial replication is done, this will be placed in `active_sync_rules`.
|
|
76
|
+
*
|
|
77
|
+
* Sync-rule-level errors are listed here.
|
|
78
|
+
*/
|
|
79
|
+
deploying_sync_rules: definitions_1.SyncRulesStatus.optional()
|
|
80
|
+
});
|
|
81
|
+
exports.ReprocessRequest = t.object({});
|
|
82
|
+
exports.ReprocessResponse = t.object({
|
|
83
|
+
connections: t.array(t.object({
|
|
84
|
+
id: t.string.optional(),
|
|
85
|
+
tag: t.string,
|
|
86
|
+
slot_name: t.string
|
|
87
|
+
}))
|
|
88
|
+
});
|
|
89
|
+
exports.ValidateRequest = t.object({
|
|
90
|
+
sync_rules: t.string
|
|
91
|
+
});
|
|
92
|
+
exports.ValidateResponse = definitions_1.SyncRulesStatus;
|
|
93
|
+
//# sourceMappingURL=routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA8B;AAC9B,+CAAkF;AAErE,QAAA,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAGhC,QAAA,iBAAiB,GAAG,4BAAc,CAAC;AAGnC,QAAA,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;IAClC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC;QACZ,KAAK,EAAE,CAAC,CAAC,MAAM;QACf,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;KACnD,CAAC;CACH,CAAC,CAAC;AAGU,QAAA,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,CAAC,CAAC,OAAO;IAClB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QAC1B,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;KACvE,CAAC;IACF,6BAA6B;IAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;CAC3B,CAAC,CAAC;AAGU,QAAA,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC;AAGU,QAAA,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,2EAA2E;IAC3E,WAAW,EAAE,CAAC;SACX,MAAM,CAAC;QACN,YAAY,EAAE,CAAC,CAAC,MAAM;KACvB,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC;AAGU,QAAA,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAGU,QAAA,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C;;OAEG;IACH,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,8BAAgB,CAAC;IAEtC;;;;OAIG;IACH,iBAAiB,EAAE,6BAAe,CAAC,QAAQ,EAAE;IAE7C;;;;;;OAMG;IACH,oBAAoB,EAAE,6BAAe,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC;AAGU,QAAA,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAGhC,QAAA,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,WAAW,EAAE,CAAC,CAAC,KAAK,CAClB,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE;QACvB,GAAG,EAAE,CAAC,CAAC,MAAM;QACb,SAAS,EAAE,CAAC,CAAC,MAAM;KACpB,CAAC,CACH;CACF,CAAC,CAAC;AAGU,QAAA,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,UAAU,EAAE,CAAC,CAAC,MAAM;CACrB,CAAC,CAAC;AAGU,QAAA,gBAAgB,GAAG,6BAAe,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@powersync/service-types",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"repository": "https://github.com/powersync-ja/powersync-service",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"ts-codec": "^1.2.2",
|
|
13
|
+
"uri-js": "^4.4.1"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"clean": "rm -r ./dist && tsc -b --clean",
|
|
17
|
+
"build": "tsc -b"
|
|
18
|
+
}
|
|
19
|
+
}
|