pistils-chat-cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +110 -0
- package/dist/agent-client.d.ts +77 -0
- package/dist/agent-client.js +155 -0
- package/dist/agenttalk.d.ts +2 -0
- package/dist/agenttalk.js +682 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/dist/module_bindings/channel_member_table.d.ts +15 -0
- package/dist/module_bindings/channel_member_table.js +13 -0
- package/dist/module_bindings/channel_table.d.ts +14 -0
- package/dist/module_bindings/channel_table.js +14 -0
- package/dist/module_bindings/create_channel_reducer.d.ts +5 -0
- package/dist/module_bindings/create_channel_reducer.js +11 -0
- package/dist/module_bindings/create_thread_reducer.d.ts +6 -0
- package/dist/module_bindings/create_thread_reducer.js +12 -0
- package/dist/module_bindings/index.d.ts +339 -0
- package/dist/module_bindings/index.js +122 -0
- package/dist/module_bindings/join_channel_reducer.d.ts +4 -0
- package/dist/module_bindings/join_channel_reducer.js +10 -0
- package/dist/module_bindings/leave_channel_reducer.d.ts +4 -0
- package/dist/module_bindings/leave_channel_reducer.js +10 -0
- package/dist/module_bindings/message_table.d.ts +23 -0
- package/dist/module_bindings/message_table.js +17 -0
- package/dist/module_bindings/send_thread_message_reducer.d.ts +5 -0
- package/dist/module_bindings/send_thread_message_reducer.js +11 -0
- package/dist/module_bindings/set_profile_reducer.d.ts +6 -0
- package/dist/module_bindings/set_profile_reducer.js +12 -0
- package/dist/module_bindings/thread_table.d.ts +19 -0
- package/dist/module_bindings/thread_table.js +15 -0
- package/dist/module_bindings/types/procedures.d.ts +1 -0
- package/dist/module_bindings/types/procedures.js +5 -0
- package/dist/module_bindings/types/reducers.d.ts +13 -0
- package/dist/module_bindings/types/reducers.js +4 -0
- package/dist/module_bindings/types.d.ts +45 -0
- package/dist/module_bindings/types.js +47 -0
- package/dist/module_bindings/user_table.d.ts +13 -0
- package/dist/module_bindings/user_table.js +15 -0
- package/package.json +62 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
|
3
|
+
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
const spacetimedb_1 = require("spacetimedb");
|
|
8
|
+
exports.default = spacetimedb_1.t.row({
|
|
9
|
+
id: spacetimedb_1.t.u64().primaryKey(),
|
|
10
|
+
channelId: spacetimedb_1.t.u64().name("channel_id"),
|
|
11
|
+
memberIdentity: spacetimedb_1.t.identity().name("member_identity"),
|
|
12
|
+
joinedAt: spacetimedb_1.t.timestamp().name("joined_at"),
|
|
13
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: import("spacetimedb").RowBuilder<{
|
|
2
|
+
id: import("spacetimedb").U64ColumnBuilder<{
|
|
3
|
+
isPrimaryKey: true;
|
|
4
|
+
}>;
|
|
5
|
+
name: import("spacetimedb").StringBuilder;
|
|
6
|
+
topic: import("spacetimedb").StringBuilder;
|
|
7
|
+
createdBy: import("spacetimedb").OptionColumnBuilder<import("spacetimedb").IdentityBuilder, {
|
|
8
|
+
name: "created_by";
|
|
9
|
+
}>;
|
|
10
|
+
createdAt: import("spacetimedb").TimestampColumnBuilder<{
|
|
11
|
+
name: "created_at";
|
|
12
|
+
}>;
|
|
13
|
+
}>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
|
3
|
+
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
const spacetimedb_1 = require("spacetimedb");
|
|
8
|
+
exports.default = spacetimedb_1.t.row({
|
|
9
|
+
id: spacetimedb_1.t.u64().primaryKey(),
|
|
10
|
+
name: spacetimedb_1.t.string(),
|
|
11
|
+
topic: spacetimedb_1.t.string(),
|
|
12
|
+
createdBy: spacetimedb_1.t.option(spacetimedb_1.t.identity()).name("created_by"),
|
|
13
|
+
createdAt: spacetimedb_1.t.timestamp().name("created_at"),
|
|
14
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
|
3
|
+
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
const spacetimedb_1 = require("spacetimedb");
|
|
8
|
+
exports.default = {
|
|
9
|
+
name: spacetimedb_1.t.string(),
|
|
10
|
+
topic: spacetimedb_1.t.string(),
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
|
3
|
+
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
const spacetimedb_1 = require("spacetimedb");
|
|
8
|
+
exports.default = {
|
|
9
|
+
channelId: spacetimedb_1.t.u64(),
|
|
10
|
+
title: spacetimedb_1.t.string(),
|
|
11
|
+
openingMessage: spacetimedb_1.t.string(),
|
|
12
|
+
};
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { DbConnectionBuilder as __DbConnectionBuilder, DbConnectionImpl as __DbConnectionImpl, SubscriptionBuilderImpl as __SubscriptionBuilderImpl, type ErrorContextInterface as __ErrorContextInterface, type EventContextInterface as __EventContextInterface, type QueryBuilder as __QueryBuilder, type ReducerEventContextInterface as __ReducerEventContextInterface, type SubscriptionEventContextInterface as __SubscriptionEventContextInterface, type SubscriptionHandleImpl as __SubscriptionHandleImpl } from "spacetimedb";
|
|
2
|
+
/** Type-only namespace exports for generated type groups. */
|
|
3
|
+
/** The schema information for all tables in this module. This is defined the same was as the tables would have been defined in the server. */
|
|
4
|
+
declare const tablesSchema: {
|
|
5
|
+
readonly schemaType: import("spacetimedb/dist/lib/schema").TablesToSchema<{
|
|
6
|
+
readonly channel: import("spacetimedb/dist/lib/table_schema").TableSchema<import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
7
|
+
id: import("spacetimedb").U64ColumnBuilder<{
|
|
8
|
+
isPrimaryKey: true;
|
|
9
|
+
}>;
|
|
10
|
+
name: import("spacetimedb").StringBuilder;
|
|
11
|
+
topic: import("spacetimedb").StringBuilder;
|
|
12
|
+
createdBy: import("spacetimedb").OptionColumnBuilder<import("spacetimedb").IdentityBuilder, {
|
|
13
|
+
name: "created_by";
|
|
14
|
+
}>;
|
|
15
|
+
createdAt: import("spacetimedb").TimestampColumnBuilder<{
|
|
16
|
+
name: "created_at";
|
|
17
|
+
}>;
|
|
18
|
+
}>, [{
|
|
19
|
+
readonly name: "id";
|
|
20
|
+
readonly algorithm: "btree";
|
|
21
|
+
readonly columns: readonly ["id"];
|
|
22
|
+
}]>;
|
|
23
|
+
readonly channelMember: import("spacetimedb/dist/lib/table_schema").TableSchema<import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
24
|
+
id: import("spacetimedb").U64ColumnBuilder<{
|
|
25
|
+
isPrimaryKey: true;
|
|
26
|
+
}>;
|
|
27
|
+
channelId: import("spacetimedb").U64ColumnBuilder<{
|
|
28
|
+
name: "channel_id";
|
|
29
|
+
}>;
|
|
30
|
+
memberIdentity: import("spacetimedb").IdentityColumnBuilder<{
|
|
31
|
+
name: "member_identity";
|
|
32
|
+
}>;
|
|
33
|
+
joinedAt: import("spacetimedb").TimestampColumnBuilder<{
|
|
34
|
+
name: "joined_at";
|
|
35
|
+
}>;
|
|
36
|
+
}>, [{
|
|
37
|
+
readonly name: "id";
|
|
38
|
+
readonly algorithm: "btree";
|
|
39
|
+
readonly columns: readonly ["id"];
|
|
40
|
+
}]>;
|
|
41
|
+
readonly message: import("spacetimedb/dist/lib/table_schema").TableSchema<import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
42
|
+
id: import("spacetimedb").U64ColumnBuilder<{
|
|
43
|
+
isPrimaryKey: true;
|
|
44
|
+
}>;
|
|
45
|
+
channelId: import("spacetimedb").U64ColumnBuilder<{
|
|
46
|
+
name: "channel_id";
|
|
47
|
+
}>;
|
|
48
|
+
threadId: import("spacetimedb").U64ColumnBuilder<{
|
|
49
|
+
name: "thread_id";
|
|
50
|
+
}>;
|
|
51
|
+
authorIdentity: import("spacetimedb").OptionColumnBuilder<import("spacetimedb").IdentityBuilder, {
|
|
52
|
+
name: "author_identity";
|
|
53
|
+
}>;
|
|
54
|
+
authorLabel: import("spacetimedb").StringColumnBuilder<{
|
|
55
|
+
name: "author_label";
|
|
56
|
+
}>;
|
|
57
|
+
authorKind: import("spacetimedb").StringColumnBuilder<{
|
|
58
|
+
name: "author_kind";
|
|
59
|
+
}>;
|
|
60
|
+
text: import("spacetimedb").StringBuilder;
|
|
61
|
+
sent: import("spacetimedb").TimestampBuilder;
|
|
62
|
+
}>, [{
|
|
63
|
+
readonly name: "id";
|
|
64
|
+
readonly algorithm: "btree";
|
|
65
|
+
readonly columns: readonly ["id"];
|
|
66
|
+
}]>;
|
|
67
|
+
readonly thread: import("spacetimedb/dist/lib/table_schema").TableSchema<import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
68
|
+
id: import("spacetimedb").U64ColumnBuilder<{
|
|
69
|
+
isPrimaryKey: true;
|
|
70
|
+
}>;
|
|
71
|
+
channelId: import("spacetimedb").U64ColumnBuilder<{
|
|
72
|
+
name: "channel_id";
|
|
73
|
+
}>;
|
|
74
|
+
title: import("spacetimedb").StringBuilder;
|
|
75
|
+
createdBy: import("spacetimedb").OptionColumnBuilder<import("spacetimedb").IdentityBuilder, {
|
|
76
|
+
name: "created_by";
|
|
77
|
+
}>;
|
|
78
|
+
createdAt: import("spacetimedb").TimestampColumnBuilder<{
|
|
79
|
+
name: "created_at";
|
|
80
|
+
}>;
|
|
81
|
+
lastActivity: import("spacetimedb").TimestampColumnBuilder<{
|
|
82
|
+
name: "last_activity";
|
|
83
|
+
}>;
|
|
84
|
+
}>, [{
|
|
85
|
+
readonly name: "id";
|
|
86
|
+
readonly algorithm: "btree";
|
|
87
|
+
readonly columns: readonly ["id"];
|
|
88
|
+
}]>;
|
|
89
|
+
readonly user: import("spacetimedb/dist/lib/table_schema").TableSchema<import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
90
|
+
identity: import("spacetimedb").IdentityColumnBuilder<{
|
|
91
|
+
isPrimaryKey: true;
|
|
92
|
+
}>;
|
|
93
|
+
name: import("spacetimedb").OptionBuilder<import("spacetimedb").StringBuilder>;
|
|
94
|
+
role: import("spacetimedb").StringBuilder;
|
|
95
|
+
bio: import("spacetimedb").OptionBuilder<import("spacetimedb").StringBuilder>;
|
|
96
|
+
online: import("spacetimedb").BoolBuilder;
|
|
97
|
+
lastSeen: import("spacetimedb").TimestampColumnBuilder<{
|
|
98
|
+
name: "last_seen";
|
|
99
|
+
}>;
|
|
100
|
+
}>, [{
|
|
101
|
+
readonly name: "identity";
|
|
102
|
+
readonly algorithm: "btree";
|
|
103
|
+
readonly columns: readonly ["identity"];
|
|
104
|
+
}]>;
|
|
105
|
+
}>;
|
|
106
|
+
};
|
|
107
|
+
/** The remote SpacetimeDB module schema, both runtime and type information. */
|
|
108
|
+
declare const REMOTE_MODULE: {
|
|
109
|
+
procedures: readonly [];
|
|
110
|
+
versionInfo: {
|
|
111
|
+
cliVersion: "2.0.1";
|
|
112
|
+
};
|
|
113
|
+
tables: {
|
|
114
|
+
readonly channel: import("spacetimedb/dist/lib/schema").TableToSchema<"channel", import("spacetimedb/dist/lib/table_schema").TableSchema<import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
115
|
+
id: import("spacetimedb").U64ColumnBuilder<{
|
|
116
|
+
isPrimaryKey: true;
|
|
117
|
+
}>;
|
|
118
|
+
name: import("spacetimedb").StringBuilder;
|
|
119
|
+
topic: import("spacetimedb").StringBuilder;
|
|
120
|
+
createdBy: import("spacetimedb").OptionColumnBuilder<import("spacetimedb").IdentityBuilder, {
|
|
121
|
+
name: "created_by";
|
|
122
|
+
}>;
|
|
123
|
+
createdAt: import("spacetimedb").TimestampColumnBuilder<{
|
|
124
|
+
name: "created_at";
|
|
125
|
+
}>;
|
|
126
|
+
}>, [{
|
|
127
|
+
readonly name: "id";
|
|
128
|
+
readonly algorithm: "btree";
|
|
129
|
+
readonly columns: readonly ["id"];
|
|
130
|
+
}]>>;
|
|
131
|
+
readonly channelMember: import("spacetimedb/dist/lib/schema").TableToSchema<"channelMember", import("spacetimedb/dist/lib/table_schema").TableSchema<import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
132
|
+
id: import("spacetimedb").U64ColumnBuilder<{
|
|
133
|
+
isPrimaryKey: true;
|
|
134
|
+
}>;
|
|
135
|
+
channelId: import("spacetimedb").U64ColumnBuilder<{
|
|
136
|
+
name: "channel_id";
|
|
137
|
+
}>;
|
|
138
|
+
memberIdentity: import("spacetimedb").IdentityColumnBuilder<{
|
|
139
|
+
name: "member_identity";
|
|
140
|
+
}>;
|
|
141
|
+
joinedAt: import("spacetimedb").TimestampColumnBuilder<{
|
|
142
|
+
name: "joined_at";
|
|
143
|
+
}>;
|
|
144
|
+
}>, [{
|
|
145
|
+
readonly name: "id";
|
|
146
|
+
readonly algorithm: "btree";
|
|
147
|
+
readonly columns: readonly ["id"];
|
|
148
|
+
}]>>;
|
|
149
|
+
readonly message: import("spacetimedb/dist/lib/schema").TableToSchema<"message", import("spacetimedb/dist/lib/table_schema").TableSchema<import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
150
|
+
id: import("spacetimedb").U64ColumnBuilder<{
|
|
151
|
+
isPrimaryKey: true;
|
|
152
|
+
}>;
|
|
153
|
+
channelId: import("spacetimedb").U64ColumnBuilder<{
|
|
154
|
+
name: "channel_id";
|
|
155
|
+
}>;
|
|
156
|
+
threadId: import("spacetimedb").U64ColumnBuilder<{
|
|
157
|
+
name: "thread_id";
|
|
158
|
+
}>;
|
|
159
|
+
authorIdentity: import("spacetimedb").OptionColumnBuilder<import("spacetimedb").IdentityBuilder, {
|
|
160
|
+
name: "author_identity";
|
|
161
|
+
}>;
|
|
162
|
+
authorLabel: import("spacetimedb").StringColumnBuilder<{
|
|
163
|
+
name: "author_label";
|
|
164
|
+
}>;
|
|
165
|
+
authorKind: import("spacetimedb").StringColumnBuilder<{
|
|
166
|
+
name: "author_kind";
|
|
167
|
+
}>;
|
|
168
|
+
text: import("spacetimedb").StringBuilder;
|
|
169
|
+
sent: import("spacetimedb").TimestampBuilder;
|
|
170
|
+
}>, [{
|
|
171
|
+
readonly name: "id";
|
|
172
|
+
readonly algorithm: "btree";
|
|
173
|
+
readonly columns: readonly ["id"];
|
|
174
|
+
}]>>;
|
|
175
|
+
readonly thread: import("spacetimedb/dist/lib/schema").TableToSchema<"thread", import("spacetimedb/dist/lib/table_schema").TableSchema<import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
176
|
+
id: import("spacetimedb").U64ColumnBuilder<{
|
|
177
|
+
isPrimaryKey: true;
|
|
178
|
+
}>;
|
|
179
|
+
channelId: import("spacetimedb").U64ColumnBuilder<{
|
|
180
|
+
name: "channel_id";
|
|
181
|
+
}>;
|
|
182
|
+
title: import("spacetimedb").StringBuilder;
|
|
183
|
+
createdBy: import("spacetimedb").OptionColumnBuilder<import("spacetimedb").IdentityBuilder, {
|
|
184
|
+
name: "created_by";
|
|
185
|
+
}>;
|
|
186
|
+
createdAt: import("spacetimedb").TimestampColumnBuilder<{
|
|
187
|
+
name: "created_at";
|
|
188
|
+
}>;
|
|
189
|
+
lastActivity: import("spacetimedb").TimestampColumnBuilder<{
|
|
190
|
+
name: "last_activity";
|
|
191
|
+
}>;
|
|
192
|
+
}>, [{
|
|
193
|
+
readonly name: "id";
|
|
194
|
+
readonly algorithm: "btree";
|
|
195
|
+
readonly columns: readonly ["id"];
|
|
196
|
+
}]>>;
|
|
197
|
+
readonly user: import("spacetimedb/dist/lib/schema").TableToSchema<"user", import("spacetimedb/dist/lib/table_schema").TableSchema<import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
198
|
+
identity: import("spacetimedb").IdentityColumnBuilder<{
|
|
199
|
+
isPrimaryKey: true;
|
|
200
|
+
}>;
|
|
201
|
+
name: import("spacetimedb").OptionBuilder<import("spacetimedb").StringBuilder>;
|
|
202
|
+
role: import("spacetimedb").StringBuilder;
|
|
203
|
+
bio: import("spacetimedb").OptionBuilder<import("spacetimedb").StringBuilder>;
|
|
204
|
+
online: import("spacetimedb").BoolBuilder;
|
|
205
|
+
lastSeen: import("spacetimedb").TimestampColumnBuilder<{
|
|
206
|
+
name: "last_seen";
|
|
207
|
+
}>;
|
|
208
|
+
}>, [{
|
|
209
|
+
readonly name: "identity";
|
|
210
|
+
readonly algorithm: "btree";
|
|
211
|
+
readonly columns: readonly ["identity"];
|
|
212
|
+
}]>>;
|
|
213
|
+
};
|
|
214
|
+
reducers: readonly [{
|
|
215
|
+
name: "create_channel";
|
|
216
|
+
accessorName: "createChannel";
|
|
217
|
+
params: import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
218
|
+
name: import("spacetimedb").StringBuilder;
|
|
219
|
+
topic: import("spacetimedb").StringBuilder;
|
|
220
|
+
}>;
|
|
221
|
+
paramsType: import("spacetimedb").ProductTypeType;
|
|
222
|
+
}, {
|
|
223
|
+
name: "create_thread";
|
|
224
|
+
accessorName: "createThread";
|
|
225
|
+
params: import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
226
|
+
channelId: import("spacetimedb").U64Builder;
|
|
227
|
+
title: import("spacetimedb").StringBuilder;
|
|
228
|
+
openingMessage: import("spacetimedb").StringBuilder;
|
|
229
|
+
}>;
|
|
230
|
+
paramsType: import("spacetimedb").ProductTypeType;
|
|
231
|
+
}, {
|
|
232
|
+
name: "join_channel";
|
|
233
|
+
accessorName: "joinChannel";
|
|
234
|
+
params: import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
235
|
+
channelId: import("spacetimedb").U64Builder;
|
|
236
|
+
}>;
|
|
237
|
+
paramsType: import("spacetimedb").ProductTypeType;
|
|
238
|
+
}, {
|
|
239
|
+
name: "leave_channel";
|
|
240
|
+
accessorName: "leaveChannel";
|
|
241
|
+
params: import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
242
|
+
channelId: import("spacetimedb").U64Builder;
|
|
243
|
+
}>;
|
|
244
|
+
paramsType: import("spacetimedb").ProductTypeType;
|
|
245
|
+
}, {
|
|
246
|
+
name: "send_thread_message";
|
|
247
|
+
accessorName: "sendThreadMessage";
|
|
248
|
+
params: import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
249
|
+
threadId: import("spacetimedb").U64Builder;
|
|
250
|
+
text: import("spacetimedb").StringBuilder;
|
|
251
|
+
}>;
|
|
252
|
+
paramsType: import("spacetimedb").ProductTypeType;
|
|
253
|
+
}, {
|
|
254
|
+
name: "set_profile";
|
|
255
|
+
accessorName: "setProfile";
|
|
256
|
+
params: import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
257
|
+
name: import("spacetimedb").StringBuilder;
|
|
258
|
+
role: import("spacetimedb").StringBuilder;
|
|
259
|
+
bio: import("spacetimedb").StringBuilder;
|
|
260
|
+
}>;
|
|
261
|
+
paramsType: import("spacetimedb").ProductTypeType;
|
|
262
|
+
}];
|
|
263
|
+
};
|
|
264
|
+
/** The tables available in this remote SpacetimeDB module. Each table reference doubles as a query builder. */
|
|
265
|
+
export declare const tables: __QueryBuilder<typeof tablesSchema.schemaType>;
|
|
266
|
+
/** The reducers available in this remote SpacetimeDB module. */
|
|
267
|
+
export declare const reducers: import("spacetimedb/dist/sdk/schema").ConvertToAccessorMap<readonly [{
|
|
268
|
+
name: "create_channel";
|
|
269
|
+
accessorName: "createChannel";
|
|
270
|
+
params: import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
271
|
+
name: import("spacetimedb").StringBuilder;
|
|
272
|
+
topic: import("spacetimedb").StringBuilder;
|
|
273
|
+
}>;
|
|
274
|
+
paramsType: import("spacetimedb").ProductTypeType;
|
|
275
|
+
}, {
|
|
276
|
+
name: "create_thread";
|
|
277
|
+
accessorName: "createThread";
|
|
278
|
+
params: import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
279
|
+
channelId: import("spacetimedb").U64Builder;
|
|
280
|
+
title: import("spacetimedb").StringBuilder;
|
|
281
|
+
openingMessage: import("spacetimedb").StringBuilder;
|
|
282
|
+
}>;
|
|
283
|
+
paramsType: import("spacetimedb").ProductTypeType;
|
|
284
|
+
}, {
|
|
285
|
+
name: "join_channel";
|
|
286
|
+
accessorName: "joinChannel";
|
|
287
|
+
params: import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
288
|
+
channelId: import("spacetimedb").U64Builder;
|
|
289
|
+
}>;
|
|
290
|
+
paramsType: import("spacetimedb").ProductTypeType;
|
|
291
|
+
}, {
|
|
292
|
+
name: "leave_channel";
|
|
293
|
+
accessorName: "leaveChannel";
|
|
294
|
+
params: import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
295
|
+
channelId: import("spacetimedb").U64Builder;
|
|
296
|
+
}>;
|
|
297
|
+
paramsType: import("spacetimedb").ProductTypeType;
|
|
298
|
+
}, {
|
|
299
|
+
name: "send_thread_message";
|
|
300
|
+
accessorName: "sendThreadMessage";
|
|
301
|
+
params: import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
302
|
+
threadId: import("spacetimedb").U64Builder;
|
|
303
|
+
text: import("spacetimedb").StringBuilder;
|
|
304
|
+
}>;
|
|
305
|
+
paramsType: import("spacetimedb").ProductTypeType;
|
|
306
|
+
}, {
|
|
307
|
+
name: "set_profile";
|
|
308
|
+
accessorName: "setProfile";
|
|
309
|
+
params: import("spacetimedb/dist/lib/table").CoerceRow<{
|
|
310
|
+
name: import("spacetimedb").StringBuilder;
|
|
311
|
+
role: import("spacetimedb").StringBuilder;
|
|
312
|
+
bio: import("spacetimedb").StringBuilder;
|
|
313
|
+
}>;
|
|
314
|
+
paramsType: import("spacetimedb").ProductTypeType;
|
|
315
|
+
}]>;
|
|
316
|
+
/** The context type returned in callbacks for all possible events. */
|
|
317
|
+
export type EventContext = __EventContextInterface<typeof REMOTE_MODULE>;
|
|
318
|
+
/** The context type returned in callbacks for reducer events. */
|
|
319
|
+
export type ReducerEventContext = __ReducerEventContextInterface<typeof REMOTE_MODULE>;
|
|
320
|
+
/** The context type returned in callbacks for subscription events. */
|
|
321
|
+
export type SubscriptionEventContext = __SubscriptionEventContextInterface<typeof REMOTE_MODULE>;
|
|
322
|
+
/** The context type returned in callbacks for error events. */
|
|
323
|
+
export type ErrorContext = __ErrorContextInterface<typeof REMOTE_MODULE>;
|
|
324
|
+
/** The subscription handle type to manage active subscriptions created from a {@link SubscriptionBuilder}. */
|
|
325
|
+
export type SubscriptionHandle = __SubscriptionHandleImpl<typeof REMOTE_MODULE>;
|
|
326
|
+
/** Builder class to configure a new subscription to the remote SpacetimeDB instance. */
|
|
327
|
+
export declare class SubscriptionBuilder extends __SubscriptionBuilderImpl<typeof REMOTE_MODULE> {
|
|
328
|
+
}
|
|
329
|
+
/** Builder class to configure a new database connection to the remote SpacetimeDB instance. */
|
|
330
|
+
export declare class DbConnectionBuilder extends __DbConnectionBuilder<DbConnection> {
|
|
331
|
+
}
|
|
332
|
+
/** The typed database connection to manage connections to the remote SpacetimeDB instance. This class has type information specific to the generated module. */
|
|
333
|
+
export declare class DbConnection extends __DbConnectionImpl<typeof REMOTE_MODULE> {
|
|
334
|
+
/** Creates a new {@link DbConnectionBuilder} to configure and connect to the remote SpacetimeDB instance. */
|
|
335
|
+
static builder: () => DbConnectionBuilder;
|
|
336
|
+
/** Creates a new {@link SubscriptionBuilder} to configure a subscription to the remote SpacetimeDB instance. */
|
|
337
|
+
subscriptionBuilder: () => SubscriptionBuilder;
|
|
338
|
+
}
|
|
339
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
|
3
|
+
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
|
4
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6
|
+
};
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.DbConnection = exports.DbConnectionBuilder = exports.SubscriptionBuilder = exports.reducers = exports.tables = void 0;
|
|
9
|
+
// This was generated using spacetimedb cli version 2.0.1 (commit a4d29daec8ed35ce4913a335b7210b9ae3933d00).
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
/* tslint:disable */
|
|
12
|
+
const spacetimedb_1 = require("spacetimedb");
|
|
13
|
+
// Import all reducer arg schemas
|
|
14
|
+
const create_channel_reducer_1 = __importDefault(require("./create_channel_reducer"));
|
|
15
|
+
const create_thread_reducer_1 = __importDefault(require("./create_thread_reducer"));
|
|
16
|
+
const join_channel_reducer_1 = __importDefault(require("./join_channel_reducer"));
|
|
17
|
+
const leave_channel_reducer_1 = __importDefault(require("./leave_channel_reducer"));
|
|
18
|
+
const send_thread_message_reducer_1 = __importDefault(require("./send_thread_message_reducer"));
|
|
19
|
+
const set_profile_reducer_1 = __importDefault(require("./set_profile_reducer"));
|
|
20
|
+
// Import all procedure arg schemas
|
|
21
|
+
// Import all table schema definitions
|
|
22
|
+
const channel_table_1 = __importDefault(require("./channel_table"));
|
|
23
|
+
const channel_member_table_1 = __importDefault(require("./channel_member_table"));
|
|
24
|
+
const message_table_1 = __importDefault(require("./message_table"));
|
|
25
|
+
const thread_table_1 = __importDefault(require("./thread_table"));
|
|
26
|
+
const user_table_1 = __importDefault(require("./user_table"));
|
|
27
|
+
/** Type-only namespace exports for generated type groups. */
|
|
28
|
+
/** The schema information for all tables in this module. This is defined the same was as the tables would have been defined in the server. */
|
|
29
|
+
const tablesSchema = (0, spacetimedb_1.schema)({
|
|
30
|
+
channel: (0, spacetimedb_1.table)({
|
|
31
|
+
name: 'channel',
|
|
32
|
+
indexes: [
|
|
33
|
+
{ name: 'id', algorithm: 'btree', columns: [
|
|
34
|
+
'id',
|
|
35
|
+
] },
|
|
36
|
+
],
|
|
37
|
+
constraints: [
|
|
38
|
+
{ name: 'channel_id_key', constraint: 'unique', columns: ['id'] },
|
|
39
|
+
],
|
|
40
|
+
}, channel_table_1.default),
|
|
41
|
+
channelMember: (0, spacetimedb_1.table)({
|
|
42
|
+
name: 'channel_member',
|
|
43
|
+
indexes: [
|
|
44
|
+
{ name: 'id', algorithm: 'btree', columns: [
|
|
45
|
+
'id',
|
|
46
|
+
] },
|
|
47
|
+
],
|
|
48
|
+
constraints: [
|
|
49
|
+
{ name: 'channel_member_id_key', constraint: 'unique', columns: ['id'] },
|
|
50
|
+
],
|
|
51
|
+
}, channel_member_table_1.default),
|
|
52
|
+
message: (0, spacetimedb_1.table)({
|
|
53
|
+
name: 'message',
|
|
54
|
+
indexes: [
|
|
55
|
+
{ name: 'id', algorithm: 'btree', columns: [
|
|
56
|
+
'id',
|
|
57
|
+
] },
|
|
58
|
+
],
|
|
59
|
+
constraints: [
|
|
60
|
+
{ name: 'message_id_key', constraint: 'unique', columns: ['id'] },
|
|
61
|
+
],
|
|
62
|
+
}, message_table_1.default),
|
|
63
|
+
thread: (0, spacetimedb_1.table)({
|
|
64
|
+
name: 'thread',
|
|
65
|
+
indexes: [
|
|
66
|
+
{ name: 'id', algorithm: 'btree', columns: [
|
|
67
|
+
'id',
|
|
68
|
+
] },
|
|
69
|
+
],
|
|
70
|
+
constraints: [
|
|
71
|
+
{ name: 'thread_id_key', constraint: 'unique', columns: ['id'] },
|
|
72
|
+
],
|
|
73
|
+
}, thread_table_1.default),
|
|
74
|
+
user: (0, spacetimedb_1.table)({
|
|
75
|
+
name: 'user',
|
|
76
|
+
indexes: [
|
|
77
|
+
{ name: 'identity', algorithm: 'btree', columns: [
|
|
78
|
+
'identity',
|
|
79
|
+
] },
|
|
80
|
+
],
|
|
81
|
+
constraints: [
|
|
82
|
+
{ name: 'user_identity_key', constraint: 'unique', columns: ['identity'] },
|
|
83
|
+
],
|
|
84
|
+
}, user_table_1.default),
|
|
85
|
+
});
|
|
86
|
+
/** The schema information for all reducers in this module. This is defined the same way as the reducers would have been defined in the server, except the body of the reducer is omitted in code generation. */
|
|
87
|
+
const reducersSchema = (0, spacetimedb_1.reducers)((0, spacetimedb_1.reducerSchema)("create_channel", create_channel_reducer_1.default), (0, spacetimedb_1.reducerSchema)("create_thread", create_thread_reducer_1.default), (0, spacetimedb_1.reducerSchema)("join_channel", join_channel_reducer_1.default), (0, spacetimedb_1.reducerSchema)("leave_channel", leave_channel_reducer_1.default), (0, spacetimedb_1.reducerSchema)("send_thread_message", send_thread_message_reducer_1.default), (0, spacetimedb_1.reducerSchema)("set_profile", set_profile_reducer_1.default));
|
|
88
|
+
/** The schema information for all procedures in this module. This is defined the same way as the procedures would have been defined in the server. */
|
|
89
|
+
const proceduresSchema = (0, spacetimedb_1.procedures)();
|
|
90
|
+
/** The remote SpacetimeDB module schema, both runtime and type information. */
|
|
91
|
+
const REMOTE_MODULE = {
|
|
92
|
+
versionInfo: {
|
|
93
|
+
cliVersion: "2.0.1",
|
|
94
|
+
},
|
|
95
|
+
tables: tablesSchema.schemaType.tables,
|
|
96
|
+
reducers: reducersSchema.reducersType.reducers,
|
|
97
|
+
...proceduresSchema,
|
|
98
|
+
};
|
|
99
|
+
/** The tables available in this remote SpacetimeDB module. Each table reference doubles as a query builder. */
|
|
100
|
+
exports.tables = (0, spacetimedb_1.makeQueryBuilder)(tablesSchema.schemaType);
|
|
101
|
+
/** The reducers available in this remote SpacetimeDB module. */
|
|
102
|
+
exports.reducers = (0, spacetimedb_1.convertToAccessorMap)(reducersSchema.reducersType.reducers);
|
|
103
|
+
/** Builder class to configure a new subscription to the remote SpacetimeDB instance. */
|
|
104
|
+
class SubscriptionBuilder extends spacetimedb_1.SubscriptionBuilderImpl {
|
|
105
|
+
}
|
|
106
|
+
exports.SubscriptionBuilder = SubscriptionBuilder;
|
|
107
|
+
/** Builder class to configure a new database connection to the remote SpacetimeDB instance. */
|
|
108
|
+
class DbConnectionBuilder extends spacetimedb_1.DbConnectionBuilder {
|
|
109
|
+
}
|
|
110
|
+
exports.DbConnectionBuilder = DbConnectionBuilder;
|
|
111
|
+
/** The typed database connection to manage connections to the remote SpacetimeDB instance. This class has type information specific to the generated module. */
|
|
112
|
+
class DbConnection extends spacetimedb_1.DbConnectionImpl {
|
|
113
|
+
/** Creates a new {@link DbConnectionBuilder} to configure and connect to the remote SpacetimeDB instance. */
|
|
114
|
+
static builder = () => {
|
|
115
|
+
return new DbConnectionBuilder(REMOTE_MODULE, (config) => new DbConnection(config));
|
|
116
|
+
};
|
|
117
|
+
/** Creates a new {@link SubscriptionBuilder} to configure a subscription to the remote SpacetimeDB instance. */
|
|
118
|
+
subscriptionBuilder = () => {
|
|
119
|
+
return new SubscriptionBuilder(this);
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
exports.DbConnection = DbConnection;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
|
3
|
+
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
const spacetimedb_1 = require("spacetimedb");
|
|
8
|
+
exports.default = {
|
|
9
|
+
channelId: spacetimedb_1.t.u64(),
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
|
3
|
+
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
const spacetimedb_1 = require("spacetimedb");
|
|
8
|
+
exports.default = {
|
|
9
|
+
channelId: spacetimedb_1.t.u64(),
|
|
10
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const _default: import("spacetimedb").RowBuilder<{
|
|
2
|
+
id: import("spacetimedb").U64ColumnBuilder<{
|
|
3
|
+
isPrimaryKey: true;
|
|
4
|
+
}>;
|
|
5
|
+
channelId: import("spacetimedb").U64ColumnBuilder<{
|
|
6
|
+
name: "channel_id";
|
|
7
|
+
}>;
|
|
8
|
+
threadId: import("spacetimedb").U64ColumnBuilder<{
|
|
9
|
+
name: "thread_id";
|
|
10
|
+
}>;
|
|
11
|
+
authorIdentity: import("spacetimedb").OptionColumnBuilder<import("spacetimedb").IdentityBuilder, {
|
|
12
|
+
name: "author_identity";
|
|
13
|
+
}>;
|
|
14
|
+
authorLabel: import("spacetimedb").StringColumnBuilder<{
|
|
15
|
+
name: "author_label";
|
|
16
|
+
}>;
|
|
17
|
+
authorKind: import("spacetimedb").StringColumnBuilder<{
|
|
18
|
+
name: "author_kind";
|
|
19
|
+
}>;
|
|
20
|
+
text: import("spacetimedb").StringBuilder;
|
|
21
|
+
sent: import("spacetimedb").TimestampBuilder;
|
|
22
|
+
}>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
|
3
|
+
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
const spacetimedb_1 = require("spacetimedb");
|
|
8
|
+
exports.default = spacetimedb_1.t.row({
|
|
9
|
+
id: spacetimedb_1.t.u64().primaryKey(),
|
|
10
|
+
channelId: spacetimedb_1.t.u64().name("channel_id"),
|
|
11
|
+
threadId: spacetimedb_1.t.u64().name("thread_id"),
|
|
12
|
+
authorIdentity: spacetimedb_1.t.option(spacetimedb_1.t.identity()).name("author_identity"),
|
|
13
|
+
authorLabel: spacetimedb_1.t.string().name("author_label"),
|
|
14
|
+
authorKind: spacetimedb_1.t.string().name("author_kind"),
|
|
15
|
+
text: spacetimedb_1.t.string(),
|
|
16
|
+
sent: spacetimedb_1.t.timestamp(),
|
|
17
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
|
3
|
+
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
const spacetimedb_1 = require("spacetimedb");
|
|
8
|
+
exports.default = {
|
|
9
|
+
threadId: spacetimedb_1.t.u64(),
|
|
10
|
+
text: spacetimedb_1.t.string(),
|
|
11
|
+
};
|