@voltro/plugin-guilds 0.89.2 → 0.90.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/CHANGELOG.md +1822 -0
- package/README.md +16 -156
- package/dist/index.d.ts +68 -2
- package/dist/index.js +143 -83
- package/dist/inspect.js +25 -24
- package/dist/port.d.ts +37 -0
- package/dist/port.js +4 -3
- package/dist/rpc.js +68 -68
- package/dist/service.js +514 -457
- package/dist/strategies.js +21 -21
- package/dist/testing.d.ts +80 -0
- package/dist/testing.js +55 -20
- package/dist/unavailable.server.js +5 -0
- package/dist/web.d.ts +12 -0
- package/dist/web.js +7 -6
- package/package.json +9 -9
package/dist/rpc.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { GuildsError as e } from "./errors.js";
|
|
2
|
+
import { ANNOUNCEMENTS_TABLE as t, APPLICATIONS_TABLE as n, GUILDS_TABLE as r, GuildAnnouncementSchema as i, GuildApplicationSchema as a, GuildInviteSchema as o, GuildLogSchema as s, GuildMemberSchema as c, GuildRoleSchema as l, GuildSchema as u, GuildSummarySchema as d, INVITES_TABLE as f, LOG_TABLE as p, MEMBERS_TABLE as m, ROLES_TABLE as h } from "./contract.js";
|
|
3
3
|
import { Schema as g } from "effect";
|
|
4
4
|
import { defineAction as _, defineQuery as v } from "@voltro/protocol";
|
|
5
5
|
// src/rpc.ts
|
|
@@ -7,13 +7,13 @@ var y = "@voltro/plugin-guilds", b = "The server verifies trusted human/guest id
|
|
|
7
7
|
guildId: x,
|
|
8
8
|
subjectId: x
|
|
9
9
|
}), T = [
|
|
10
|
-
|
|
11
|
-
p,
|
|
10
|
+
r,
|
|
12
11
|
m,
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
h,
|
|
13
|
+
n,
|
|
15
14
|
f,
|
|
16
|
-
|
|
15
|
+
p,
|
|
16
|
+
t
|
|
17
17
|
], E = _({
|
|
18
18
|
name: "guilds.create",
|
|
19
19
|
input: g.Struct({
|
|
@@ -29,22 +29,22 @@ var y = "@voltro/plugin-guilds", b = "The server verifies trusted human/guest id
|
|
|
29
29
|
region: g.optional(x),
|
|
30
30
|
language: g.optional(x)
|
|
31
31
|
}),
|
|
32
|
-
output:
|
|
33
|
-
error:
|
|
32
|
+
output: u,
|
|
33
|
+
error: e,
|
|
34
34
|
openAccess: b
|
|
35
35
|
}), D = v({
|
|
36
36
|
name: "guilds.mine",
|
|
37
37
|
input: g.Struct({}),
|
|
38
|
-
output: g.Array(
|
|
38
|
+
output: g.Array(u),
|
|
39
39
|
source: T,
|
|
40
|
-
error:
|
|
40
|
+
error: e,
|
|
41
41
|
openAccess: b
|
|
42
42
|
}), O = v({
|
|
43
43
|
name: "guilds.get",
|
|
44
44
|
input: C,
|
|
45
|
-
output:
|
|
45
|
+
output: u,
|
|
46
46
|
source: T,
|
|
47
|
-
error:
|
|
47
|
+
error: e,
|
|
48
48
|
openAccess: b
|
|
49
49
|
}), k = v({
|
|
50
50
|
name: "guilds.search",
|
|
@@ -54,43 +54,43 @@ var y = "@voltro/plugin-guilds", b = "The server verifies trusted human/guest id
|
|
|
54
54
|
region: g.optional(x),
|
|
55
55
|
language: g.optional(x)
|
|
56
56
|
}),
|
|
57
|
-
output: g.Array(
|
|
58
|
-
source: [
|
|
59
|
-
error:
|
|
57
|
+
output: g.Array(d),
|
|
58
|
+
source: [r],
|
|
59
|
+
error: e,
|
|
60
60
|
openAccess: b
|
|
61
61
|
}), A = v({
|
|
62
62
|
name: "guilds.members",
|
|
63
63
|
input: C,
|
|
64
|
-
output: g.Array(
|
|
64
|
+
output: g.Array(c),
|
|
65
65
|
source: [
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
r,
|
|
67
|
+
m,
|
|
68
|
+
h
|
|
69
69
|
],
|
|
70
|
-
error:
|
|
70
|
+
error: e,
|
|
71
71
|
openAccess: b
|
|
72
72
|
}), j = v({
|
|
73
73
|
name: "guilds.roles",
|
|
74
74
|
input: C,
|
|
75
|
-
output: g.Array(
|
|
75
|
+
output: g.Array(l),
|
|
76
76
|
source: [
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
r,
|
|
78
|
+
m,
|
|
79
|
+
h
|
|
80
80
|
],
|
|
81
|
-
error:
|
|
81
|
+
error: e,
|
|
82
82
|
openAccess: b
|
|
83
83
|
}), M = _({
|
|
84
84
|
name: "guilds.join",
|
|
85
85
|
input: C,
|
|
86
|
-
output:
|
|
87
|
-
error:
|
|
86
|
+
output: c,
|
|
87
|
+
error: e,
|
|
88
88
|
openAccess: b
|
|
89
89
|
}), N = _({
|
|
90
90
|
name: "guilds.leave",
|
|
91
91
|
input: C,
|
|
92
92
|
output: g.Void,
|
|
93
|
-
error:
|
|
93
|
+
error: e,
|
|
94
94
|
openAccess: b
|
|
95
95
|
}), P = _({
|
|
96
96
|
name: "guilds.apply",
|
|
@@ -99,20 +99,20 @@ var y = "@voltro/plugin-guilds", b = "The server verifies trusted human/guest id
|
|
|
99
99
|
requestId: x,
|
|
100
100
|
message: g.String
|
|
101
101
|
}),
|
|
102
|
-
output:
|
|
103
|
-
error:
|
|
102
|
+
output: a,
|
|
103
|
+
error: e,
|
|
104
104
|
openAccess: b
|
|
105
105
|
}), F = v({
|
|
106
106
|
name: "guilds.applications",
|
|
107
107
|
input: C,
|
|
108
|
-
output: g.Array(
|
|
108
|
+
output: g.Array(a),
|
|
109
109
|
source: [
|
|
110
|
-
|
|
111
|
-
p,
|
|
110
|
+
r,
|
|
112
111
|
m,
|
|
113
|
-
|
|
112
|
+
h,
|
|
113
|
+
n
|
|
114
114
|
],
|
|
115
|
-
error:
|
|
115
|
+
error: e,
|
|
116
116
|
openAccess: b
|
|
117
117
|
}), I = _({
|
|
118
118
|
name: "guilds.decideApplication",
|
|
@@ -120,8 +120,8 @@ var y = "@voltro/plugin-guilds", b = "The server verifies trusted human/guest id
|
|
|
120
120
|
applicationId: x,
|
|
121
121
|
accept: g.Boolean
|
|
122
122
|
}),
|
|
123
|
-
output:
|
|
124
|
-
error:
|
|
123
|
+
output: a,
|
|
124
|
+
error: e,
|
|
125
125
|
openAccess: b
|
|
126
126
|
}), L = _({
|
|
127
127
|
name: "guilds.invite",
|
|
@@ -130,19 +130,19 @@ var y = "@voltro/plugin-guilds", b = "The server verifies trusted human/guest id
|
|
|
130
130
|
subjectId: x,
|
|
131
131
|
requestId: x
|
|
132
132
|
}),
|
|
133
|
-
output:
|
|
134
|
-
error:
|
|
133
|
+
output: o,
|
|
134
|
+
error: e,
|
|
135
135
|
openAccess: b
|
|
136
136
|
}), R = v({
|
|
137
137
|
name: "guilds.invites",
|
|
138
138
|
input: g.Struct({}),
|
|
139
|
-
output: g.Array(
|
|
139
|
+
output: g.Array(o),
|
|
140
140
|
source: [
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
f,
|
|
142
|
+
m,
|
|
143
|
+
r
|
|
144
144
|
],
|
|
145
|
-
error:
|
|
145
|
+
error: e,
|
|
146
146
|
openAccess: b
|
|
147
147
|
}), z = _({
|
|
148
148
|
name: "guilds.decideInvite",
|
|
@@ -150,14 +150,14 @@ var y = "@voltro/plugin-guilds", b = "The server verifies trusted human/guest id
|
|
|
150
150
|
inviteId: x,
|
|
151
151
|
accept: g.Boolean
|
|
152
152
|
}),
|
|
153
|
-
output:
|
|
154
|
-
error:
|
|
153
|
+
output: o,
|
|
154
|
+
error: e,
|
|
155
155
|
openAccess: b
|
|
156
156
|
}), B = _({
|
|
157
157
|
name: "guilds.kick",
|
|
158
158
|
input: w,
|
|
159
159
|
output: g.Void,
|
|
160
|
-
error:
|
|
160
|
+
error: e,
|
|
161
161
|
openAccess: b
|
|
162
162
|
}), V = _({
|
|
163
163
|
name: "guilds.setRole",
|
|
@@ -166,8 +166,8 @@ var y = "@voltro/plugin-guilds", b = "The server verifies trusted human/guest id
|
|
|
166
166
|
subjectId: x,
|
|
167
167
|
roleId: x
|
|
168
168
|
}),
|
|
169
|
-
output:
|
|
170
|
-
error:
|
|
169
|
+
output: c,
|
|
170
|
+
error: e,
|
|
171
171
|
openAccess: b
|
|
172
172
|
}), H = _({
|
|
173
173
|
name: "guilds.configureRole",
|
|
@@ -178,14 +178,14 @@ var y = "@voltro/plugin-guilds", b = "The server verifies trusted human/guest id
|
|
|
178
178
|
rank: S,
|
|
179
179
|
permissions: S
|
|
180
180
|
}),
|
|
181
|
-
output:
|
|
182
|
-
error:
|
|
181
|
+
output: l,
|
|
182
|
+
error: e,
|
|
183
183
|
openAccess: b
|
|
184
184
|
}), U = _({
|
|
185
185
|
name: "guilds.transferOwner",
|
|
186
186
|
input: w,
|
|
187
|
-
output:
|
|
188
|
-
error:
|
|
187
|
+
output: u,
|
|
188
|
+
error: e,
|
|
189
189
|
openAccess: b
|
|
190
190
|
}), W = _({
|
|
191
191
|
name: "guilds.updateProfile",
|
|
@@ -201,8 +201,8 @@ var y = "@voltro/plugin-guilds", b = "The server verifies trusted human/guest id
|
|
|
201
201
|
region: g.optional(g.NullOr(x)),
|
|
202
202
|
language: g.optional(g.NullOr(x))
|
|
203
203
|
}),
|
|
204
|
-
output:
|
|
205
|
-
error:
|
|
204
|
+
output: u,
|
|
205
|
+
error: e,
|
|
206
206
|
openAccess: b
|
|
207
207
|
}), G = _({
|
|
208
208
|
name: "guilds.announce",
|
|
@@ -212,30 +212,30 @@ var y = "@voltro/plugin-guilds", b = "The server verifies trusted human/guest id
|
|
|
212
212
|
body: x,
|
|
213
213
|
pinned: g.optional(g.Boolean)
|
|
214
214
|
}),
|
|
215
|
-
output:
|
|
216
|
-
error:
|
|
215
|
+
output: i,
|
|
216
|
+
error: e,
|
|
217
217
|
openAccess: b
|
|
218
218
|
}), K = v({
|
|
219
219
|
name: "guilds.announcements",
|
|
220
220
|
input: C,
|
|
221
|
-
output: g.Array(
|
|
221
|
+
output: g.Array(i),
|
|
222
222
|
source: [
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
r,
|
|
224
|
+
m,
|
|
225
|
+
t
|
|
226
226
|
],
|
|
227
|
-
error:
|
|
227
|
+
error: e,
|
|
228
228
|
openAccess: b
|
|
229
229
|
}), q = v({
|
|
230
230
|
name: "guilds.log",
|
|
231
231
|
input: C,
|
|
232
|
-
output: g.Array(
|
|
232
|
+
output: g.Array(s),
|
|
233
233
|
source: [
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
r,
|
|
235
|
+
m,
|
|
236
|
+
p
|
|
237
237
|
],
|
|
238
|
-
error:
|
|
238
|
+
error: e,
|
|
239
239
|
openAccess: b
|
|
240
240
|
}), J = [...[
|
|
241
241
|
"create",
|