@webstudio-is/trpc-interface 0.91.0 → 0.260.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.
Files changed (61) hide show
  1. package/package.json +26 -25
  2. package/src/authorize/project.server.test.ts +443 -0
  3. package/src/authorize/project.server.ts +309 -121
  4. package/src/authorize/role.ts +18 -0
  5. package/src/context/context.server.ts +59 -24
  6. package/src/context/errors.server.ts +16 -0
  7. package/src/context/router.server.ts +19 -0
  8. package/src/index.server.ts +15 -3
  9. package/src/shared/client.ts +0 -2
  10. package/src/shared/deployment.ts +23 -6
  11. package/src/shared/domain.ts +3 -3
  12. package/src/shared/plan-client.server.ts +7 -0
  13. package/src/shared/plan-features.ts +7 -0
  14. package/src/shared/shared-router.ts +0 -2
  15. package/src/shared/trpc.ts +5 -1
  16. package/src/trpc-caller-link.test.ts +1 -1
  17. package/src/trpc-caller-link.ts +1 -2
  18. package/tsconfig.json +3 -0
  19. package/lib/authorize/authorization-token.server.js +0 -72
  20. package/lib/authorize/project.server.js +0 -103
  21. package/lib/cjs/authorize/authorization-token.server.js +0 -92
  22. package/lib/cjs/authorize/project.server.js +0 -123
  23. package/lib/cjs/context/context.server.js +0 -16
  24. package/lib/cjs/context/errors.server.js +0 -29
  25. package/lib/cjs/index.js +0 -18
  26. package/lib/cjs/index.server.js +0 -40
  27. package/lib/cjs/package.json +0 -1
  28. package/lib/cjs/shared/authorization-router.js +0 -184
  29. package/lib/cjs/shared/client.js +0 -63
  30. package/lib/cjs/shared/deployment.js +0 -51
  31. package/lib/cjs/shared/domain.js +0 -98
  32. package/lib/cjs/shared/shared-router.js +0 -32
  33. package/lib/cjs/shared/trpc.js +0 -31
  34. package/lib/cjs/trpc-caller-link.js +0 -46
  35. package/lib/context/context.server.js +0 -0
  36. package/lib/context/errors.server.js +0 -9
  37. package/lib/index.js +0 -1
  38. package/lib/index.server.js +0 -10
  39. package/lib/shared/authorization-router.js +0 -164
  40. package/lib/shared/client.js +0 -35
  41. package/lib/shared/deployment.js +0 -31
  42. package/lib/shared/domain.js +0 -78
  43. package/lib/shared/shared-router.js +0 -12
  44. package/lib/shared/trpc.js +0 -11
  45. package/lib/trpc-caller-link.js +0 -26
  46. package/lib/types/authorize/authorization-token.server.d.ts +0 -21
  47. package/lib/types/authorize/project.server.d.ts +0 -25
  48. package/lib/types/context/context.server.d.ts +0 -53
  49. package/lib/types/context/errors.server.d.ts +0 -1
  50. package/lib/types/index.d.ts +0 -1
  51. package/lib/types/index.server.d.ts +0 -7
  52. package/lib/types/shared/authorization-router.d.ts +0 -276
  53. package/lib/types/shared/client.d.ts +0 -8
  54. package/lib/types/shared/deployment.d.ts +0 -45
  55. package/lib/types/shared/domain.d.ts +0 -119
  56. package/lib/types/shared/shared-router.d.ts +0 -415
  57. package/lib/types/shared/trpc.d.ts +0 -48
  58. package/lib/types/trpc-caller-link.d.ts +0 -16
  59. package/lib/types/trpc-caller-link.test.d.ts +0 -49
  60. package/src/authorize/authorization-token.server.ts +0 -106
  61. package/src/shared/authorization-router.ts +0 -198
@@ -1,415 +0,0 @@
1
- import type { createTRPCProxyClient } from "@trpc/client";
2
- export declare const sharedRouter: import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
3
- ctx: {};
4
- meta: object;
5
- errorShape: import("@trpc/server").DefaultErrorShape;
6
- transformer: import("@trpc/server").DefaultDataTransformer;
7
- }>, {
8
- authorize: import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
9
- ctx: {};
10
- meta: object;
11
- errorShape: import("@trpc/server").DefaultErrorShape;
12
- transformer: import("@trpc/server").DefaultDataTransformer;
13
- }>, {
14
- expandLeafNodes: import("@trpc/server").BuildProcedure<"query", {
15
- _config: import("@trpc/server").RootConfig<{
16
- ctx: {};
17
- meta: object;
18
- errorShape: import("@trpc/server").DefaultErrorShape;
19
- transformer: import("@trpc/server").DefaultDataTransformer;
20
- }>;
21
- _meta: object;
22
- _ctx_out: {};
23
- _input_in: {
24
- id: string;
25
- namespace: "Project";
26
- };
27
- _input_out: {
28
- id: string;
29
- namespace: "Project";
30
- };
31
- _output_in: {
32
- id: string;
33
- relation: "viewers" | "editors" | "builders" | "owners";
34
- namespace: "User" | "Token" | "Email";
35
- }[];
36
- _output_out: {
37
- id: string;
38
- relation: "viewers" | "editors" | "builders" | "owners";
39
- namespace: "User" | "Token" | "Email";
40
- }[];
41
- }, unknown>;
42
- check: import("@trpc/server").BuildProcedure<"query", {
43
- _config: import("@trpc/server").RootConfig<{
44
- ctx: {};
45
- meta: object;
46
- errorShape: import("@trpc/server").DefaultErrorShape;
47
- transformer: import("@trpc/server").DefaultDataTransformer;
48
- }>;
49
- _meta: object;
50
- _ctx_out: {};
51
- _input_in: {
52
- id: string;
53
- namespace: "Project";
54
- subjectSet: {
55
- id: string;
56
- namespace: "User" | "Token";
57
- };
58
- permit: "build" | "view" | "edit" | "own";
59
- };
60
- _input_out: {
61
- id: string;
62
- namespace: "Project";
63
- subjectSet: {
64
- id: string;
65
- namespace: "User" | "Token";
66
- };
67
- permit: "build" | "view" | "edit" | "own";
68
- };
69
- _output_in: {
70
- allowed: boolean;
71
- };
72
- _output_out: {
73
- allowed: boolean;
74
- };
75
- }, unknown>;
76
- create: import("@trpc/server").BuildProcedure<"mutation", {
77
- _config: import("@trpc/server").RootConfig<{
78
- ctx: {};
79
- meta: object;
80
- errorShape: import("@trpc/server").DefaultErrorShape;
81
- transformer: import("@trpc/server").DefaultDataTransformer;
82
- }>;
83
- _meta: object;
84
- _ctx_out: {};
85
- _input_in: {
86
- id: string;
87
- relation: "viewers" | "editors" | "builders" | "owners";
88
- namespace: "Project";
89
- subjectSet: {
90
- id: string;
91
- namespace: "User";
92
- } | {
93
- id: string;
94
- namespace: "Token";
95
- } | {
96
- id: string;
97
- relation: "owners";
98
- namespace: "Email";
99
- };
100
- } | {
101
- id: string;
102
- relation: "owners";
103
- namespace: "Email";
104
- subjectSet: {
105
- id: string;
106
- namespace: "User";
107
- };
108
- };
109
- _input_out: {
110
- id: string;
111
- relation: "viewers" | "editors" | "builders" | "owners";
112
- namespace: "Project";
113
- subjectSet: {
114
- id: string;
115
- namespace: "User";
116
- } | {
117
- id: string;
118
- namespace: "Token";
119
- } | {
120
- id: string;
121
- relation: "owners";
122
- namespace: "Email";
123
- };
124
- } | {
125
- id: string;
126
- relation: "owners";
127
- namespace: "Email";
128
- subjectSet: {
129
- id: string;
130
- namespace: "User";
131
- };
132
- };
133
- _output_in: typeof import("@trpc/server").unsetMarker;
134
- _output_out: typeof import("@trpc/server").unsetMarker;
135
- }, void>;
136
- delete: import("@trpc/server").BuildProcedure<"mutation", {
137
- _config: import("@trpc/server").RootConfig<{
138
- ctx: {};
139
- meta: object;
140
- errorShape: import("@trpc/server").DefaultErrorShape;
141
- transformer: import("@trpc/server").DefaultDataTransformer;
142
- }>;
143
- _meta: object;
144
- _ctx_out: {};
145
- _input_in: {
146
- id: string;
147
- relation: "viewers" | "editors" | "builders" | "owners";
148
- namespace: "Project";
149
- subjectSet: {
150
- id: string;
151
- namespace: "User";
152
- } | {
153
- id: string;
154
- namespace: "Token";
155
- } | {
156
- id: string;
157
- relation: "owners";
158
- namespace: "Email";
159
- };
160
- } | {
161
- id: string;
162
- relation: "owners";
163
- namespace: "Email";
164
- subjectSet: {
165
- id: string;
166
- namespace: "User";
167
- };
168
- };
169
- _input_out: {
170
- id: string;
171
- relation: "viewers" | "editors" | "builders" | "owners";
172
- namespace: "Project";
173
- subjectSet: {
174
- id: string;
175
- namespace: "User";
176
- } | {
177
- id: string;
178
- namespace: "Token";
179
- } | {
180
- id: string;
181
- relation: "owners";
182
- namespace: "Email";
183
- };
184
- } | {
185
- id: string;
186
- relation: "owners";
187
- namespace: "Email";
188
- subjectSet: {
189
- id: string;
190
- namespace: "User";
191
- };
192
- };
193
- _output_in: typeof import("@trpc/server").unsetMarker;
194
- _output_out: typeof import("@trpc/server").unsetMarker;
195
- }, void>;
196
- patch: import("@trpc/server").BuildProcedure<"mutation", {
197
- _config: import("@trpc/server").RootConfig<{
198
- ctx: {};
199
- meta: object;
200
- errorShape: import("@trpc/server").DefaultErrorShape;
201
- transformer: import("@trpc/server").DefaultDataTransformer;
202
- }>;
203
- _meta: object;
204
- _ctx_out: {};
205
- _input_in: {
206
- action: "delete" | "insert";
207
- relationTuple: {
208
- id: string;
209
- relation: "viewers" | "editors" | "builders" | "owners";
210
- namespace: "Project";
211
- subjectSet: {
212
- id: string;
213
- namespace: "User";
214
- } | {
215
- id: string;
216
- namespace: "Token";
217
- } | {
218
- id: string;
219
- relation: "owners";
220
- namespace: "Email";
221
- };
222
- } | {
223
- id: string;
224
- relation: "owners";
225
- namespace: "Email";
226
- subjectSet: {
227
- id: string;
228
- namespace: "User";
229
- };
230
- };
231
- }[];
232
- _input_out: {
233
- action: "delete" | "insert";
234
- relationTuple: {
235
- id: string;
236
- relation: "viewers" | "editors" | "builders" | "owners";
237
- namespace: "Project";
238
- subjectSet: {
239
- id: string;
240
- namespace: "User";
241
- } | {
242
- id: string;
243
- namespace: "Token";
244
- } | {
245
- id: string;
246
- relation: "owners";
247
- namespace: "Email";
248
- };
249
- } | {
250
- id: string;
251
- relation: "owners";
252
- namespace: "Email";
253
- subjectSet: {
254
- id: string;
255
- namespace: "User";
256
- };
257
- };
258
- }[];
259
- _output_in: typeof import("@trpc/server").unsetMarker;
260
- _output_out: typeof import("@trpc/server").unsetMarker;
261
- }, void>;
262
- }>;
263
- domain: import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
264
- ctx: {};
265
- meta: object;
266
- errorShape: import("@trpc/server").DefaultErrorShape;
267
- transformer: import("@trpc/server").DefaultDataTransformer;
268
- }>, {
269
- create: import("@trpc/server").BuildProcedure<"mutation", {
270
- _config: import("@trpc/server").RootConfig<{
271
- ctx: {};
272
- meta: object;
273
- errorShape: import("@trpc/server").DefaultErrorShape;
274
- transformer: import("@trpc/server").DefaultDataTransformer;
275
- }>;
276
- _meta: object;
277
- _ctx_out: {};
278
- _input_in: {
279
- domain: string;
280
- txtRecord: string;
281
- };
282
- _input_out: {
283
- domain: string;
284
- txtRecord: string;
285
- };
286
- _output_in: {
287
- success: true;
288
- data?: undefined;
289
- } | {
290
- error: string;
291
- success: false;
292
- };
293
- _output_out: {
294
- success: true;
295
- data?: undefined;
296
- } | {
297
- error: string;
298
- success: false;
299
- };
300
- }, unknown>;
301
- refresh: import("@trpc/server").BuildProcedure<"mutation", {
302
- _config: import("@trpc/server").RootConfig<{
303
- ctx: {};
304
- meta: object;
305
- errorShape: import("@trpc/server").DefaultErrorShape;
306
- transformer: import("@trpc/server").DefaultDataTransformer;
307
- }>;
308
- _meta: object;
309
- _ctx_out: {};
310
- _input_in: {
311
- domain: string;
312
- };
313
- _input_out: {
314
- domain: string;
315
- };
316
- _output_in: {
317
- success: true;
318
- data?: undefined;
319
- } | {
320
- error: string;
321
- success: false;
322
- };
323
- _output_out: {
324
- success: true;
325
- data?: undefined;
326
- } | {
327
- error: string;
328
- success: false;
329
- };
330
- }, unknown>;
331
- getStatus: import("@trpc/server").BuildProcedure<"query", {
332
- _config: import("@trpc/server").RootConfig<{
333
- ctx: {};
334
- meta: object;
335
- errorShape: import("@trpc/server").DefaultErrorShape;
336
- transformer: import("@trpc/server").DefaultDataTransformer;
337
- }>;
338
- _meta: object;
339
- _ctx_out: {};
340
- _input_in: {
341
- domain: string;
342
- };
343
- _input_out: {
344
- domain: string;
345
- };
346
- _output_in: {
347
- data: {
348
- status: "active" | "pending";
349
- } | {
350
- error: string;
351
- status: "error";
352
- };
353
- success: true;
354
- } | {
355
- error: string;
356
- success: false;
357
- };
358
- _output_out: {
359
- data: {
360
- status: "active" | "pending";
361
- } | {
362
- error: string;
363
- status: "error";
364
- };
365
- success: true;
366
- } | {
367
- error: string;
368
- success: false;
369
- };
370
- }, unknown>;
371
- }>;
372
- deployment: import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
373
- ctx: {};
374
- meta: object;
375
- errorShape: import("@trpc/server").DefaultErrorShape;
376
- transformer: import("@trpc/server").DefaultDataTransformer;
377
- }>, {
378
- publish: import("@trpc/server").BuildProcedure<"mutation", {
379
- _config: import("@trpc/server").RootConfig<{
380
- ctx: {};
381
- meta: object;
382
- errorShape: import("@trpc/server").DefaultErrorShape;
383
- transformer: import("@trpc/server").DefaultDataTransformer;
384
- }>;
385
- _meta: object;
386
- _ctx_out: {};
387
- _input_in: {
388
- buildId: string;
389
- builderApiOrigin: string;
390
- branchName: string;
391
- projectDomainName: string;
392
- };
393
- _input_out: {
394
- buildId: string;
395
- builderApiOrigin: string;
396
- branchName: string;
397
- projectDomainName: string;
398
- };
399
- _output_in: {
400
- success: true;
401
- } | {
402
- error: string;
403
- success: false;
404
- };
405
- _output_out: {
406
- success: true;
407
- } | {
408
- error: string;
409
- success: false;
410
- };
411
- }, unknown>;
412
- }>;
413
- }>;
414
- export type SharedRouter = typeof sharedRouter;
415
- export type TrpcInterfaceClient = ReturnType<typeof createTRPCProxyClient<SharedRouter>>;
@@ -1,48 +0,0 @@
1
- import { type inferAsyncReturnType } from "@trpc/server";
2
- export declare const createContext: () => Promise<{}>;
3
- export type Context = inferAsyncReturnType<typeof createContext>;
4
- export declare const router: <TProcRouterRecord extends import("@trpc/server").ProcedureRouterRecord>(procedures: TProcRouterRecord) => import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
5
- ctx: {};
6
- meta: object;
7
- errorShape: import("@trpc/server").DefaultErrorShape;
8
- transformer: import("@trpc/server").DefaultDataTransformer;
9
- }>, TProcRouterRecord>, procedure: import("@trpc/server").ProcedureBuilder<{
10
- _config: import("@trpc/server").RootConfig<{
11
- ctx: {};
12
- meta: object;
13
- errorShape: import("@trpc/server").DefaultErrorShape;
14
- transformer: import("@trpc/server").DefaultDataTransformer;
15
- }>;
16
- _ctx_out: {};
17
- _input_in: typeof import("@trpc/server").unsetMarker;
18
- _input_out: typeof import("@trpc/server").unsetMarker;
19
- _output_in: typeof import("@trpc/server").unsetMarker;
20
- _output_out: typeof import("@trpc/server").unsetMarker;
21
- _meta: object;
22
- }>, middleware: <TNewParams extends import("@trpc/server").ProcedureParams<import("@trpc/server").AnyRootConfig, unknown, unknown, unknown, unknown, unknown, unknown>>(fn: import("@trpc/server").MiddlewareFunction<{
23
- _config: import("@trpc/server").RootConfig<{
24
- ctx: {};
25
- meta: object;
26
- errorShape: import("@trpc/server").DefaultErrorShape;
27
- transformer: import("@trpc/server").DefaultDataTransformer;
28
- }>;
29
- _ctx_out: {};
30
- _input_out: unknown;
31
- _input_in: unknown;
32
- _output_in: unknown;
33
- _output_out: unknown;
34
- _meta: object;
35
- }, TNewParams>) => import("@trpc/server").MiddlewareFunction<{
36
- _config: import("@trpc/server").RootConfig<{
37
- ctx: {};
38
- meta: object;
39
- errorShape: import("@trpc/server").DefaultErrorShape;
40
- transformer: import("@trpc/server").DefaultDataTransformer;
41
- }>;
42
- _ctx_out: {};
43
- _input_out: unknown;
44
- _input_in: unknown;
45
- _output_in: unknown;
46
- _output_out: unknown;
47
- _meta: object;
48
- }, TNewParams>;
@@ -1,16 +0,0 @@
1
- import type { AnyRouter } from "@trpc/server";
2
- import { type TRPCLink } from "@trpc/client";
3
- type MemoryLinkOptions<TemplateRouter extends AnyRouter> = {
4
- appRouter: TemplateRouter;
5
- createContext?: () => TemplateRouter["_def"]["_config"]["$types"]["ctx"];
6
- };
7
- /**
8
- * https://github.com/trpc/trpc/issues/3335
9
- *
10
- * createCaller and createTRPCProxyClient provides different interfaces,
11
- * here we provide callerLink which can be used as a [trpc client link](https://trpc.io/docs/links)
12
- * Allowing us to call router api without http but through createTRPCProxyClient interface
13
- * See trpc-caller-link.test.ts for details
14
- **/
15
- export declare const callerLink: <TemplateRouter extends AnyRouter>(opts: MemoryLinkOptions<TemplateRouter>) => TRPCLink<TemplateRouter>;
16
- export {};
@@ -1,49 +0,0 @@
1
- type Context = {
2
- someCtx: string;
3
- };
4
- export declare const router: <TProcRouterRecord extends import("@trpc/server").ProcedureRouterRecord>(procedures: TProcRouterRecord) => import("@trpc/server").CreateRouterInner<import("@trpc/server").RootConfig<{
5
- ctx: Context;
6
- meta: object;
7
- errorShape: import("@trpc/server").DefaultErrorShape;
8
- transformer: import("@trpc/server").DefaultDataTransformer;
9
- }>, TProcRouterRecord>, procedure: import("@trpc/server").ProcedureBuilder<{
10
- _config: import("@trpc/server").RootConfig<{
11
- ctx: Context;
12
- meta: object;
13
- errorShape: import("@trpc/server").DefaultErrorShape;
14
- transformer: import("@trpc/server").DefaultDataTransformer;
15
- }>;
16
- _ctx_out: Context;
17
- _input_in: typeof import("@trpc/server").unsetMarker;
18
- _input_out: typeof import("@trpc/server").unsetMarker;
19
- _output_in: typeof import("@trpc/server").unsetMarker;
20
- _output_out: typeof import("@trpc/server").unsetMarker;
21
- _meta: object;
22
- }>, middleware: <TNewParams extends import("@trpc/server").ProcedureParams<import("@trpc/server").AnyRootConfig, unknown, unknown, unknown, unknown, unknown, unknown>>(fn: import("@trpc/server").MiddlewareFunction<{
23
- _config: import("@trpc/server").RootConfig<{
24
- ctx: Context;
25
- meta: object;
26
- errorShape: import("@trpc/server").DefaultErrorShape;
27
- transformer: import("@trpc/server").DefaultDataTransformer;
28
- }>;
29
- _ctx_out: Context;
30
- _input_out: unknown;
31
- _input_in: unknown;
32
- _output_in: unknown;
33
- _output_out: unknown;
34
- _meta: object;
35
- }, TNewParams>) => import("@trpc/server").MiddlewareFunction<{
36
- _config: import("@trpc/server").RootConfig<{
37
- ctx: Context;
38
- meta: object;
39
- errorShape: import("@trpc/server").DefaultErrorShape;
40
- transformer: import("@trpc/server").DefaultDataTransformer;
41
- }>;
42
- _ctx_out: Context;
43
- _input_out: unknown;
44
- _input_in: unknown;
45
- _output_in: unknown;
46
- _output_out: unknown;
47
- _meta: object;
48
- }, TNewParams>;
49
- export {};
@@ -1,106 +0,0 @@
1
- import type { AppContext } from "../context/context.server";
2
-
3
- /**
4
- * For 3rd party authorization systems like Ory we need to register token for the project.
5
- *
6
- * We do that before the authorizationToken create (and out of the transaction),
7
- * so in case of an error we will have just stale records of non existed projects in authorization system.
8
- */
9
- export const registerToken = async (
10
- props: {
11
- projectId: string;
12
- tokenId: string;
13
- relation: "viewers" | "editors" | "builders";
14
- },
15
- context: AppContext
16
- ) => {
17
- const { authorization } = context;
18
- const { userId, authorizeTrpc } = authorization;
19
-
20
- if (userId === undefined) {
21
- throw new Error("The user must be authenticated to create a token");
22
- }
23
-
24
- await authorizeTrpc.create.mutate({
25
- namespace: "Project",
26
- id: props.projectId,
27
- relation: props.relation,
28
- subjectSet: {
29
- namespace: "Token",
30
- id: props.tokenId,
31
- },
32
- });
33
- };
34
-
35
- // Implement any update operations in the single transaction on authorization system
36
- export const patchToken = async (
37
- props: { projectId: string; tokenId: string },
38
-
39
- prevRelation: "viewers" | "editors" | "builders",
40
-
41
- nextRelation: "viewers" | "editors" | "builders",
42
-
43
- context: AppContext
44
- ) => {
45
- const { authorization } = context;
46
- const { userId, authorizeTrpc } = authorization;
47
-
48
- if (userId === undefined) {
49
- throw new Error("The user must be authenticated to delete a token");
50
- }
51
-
52
- if (prevRelation !== nextRelation) {
53
- await authorizeTrpc.patch.mutate([
54
- {
55
- action: "delete",
56
- relationTuple: {
57
- namespace: "Project",
58
- id: props.projectId,
59
- relation: prevRelation,
60
- subjectSet: {
61
- namespace: "Token",
62
- id: props.tokenId,
63
- },
64
- },
65
- },
66
- {
67
- action: "insert",
68
- relationTuple: {
69
- namespace: "Project",
70
- id: props.projectId,
71
- relation: nextRelation,
72
- subjectSet: {
73
- namespace: "Token",
74
- id: props.tokenId,
75
- },
76
- },
77
- },
78
- ]);
79
- }
80
- };
81
-
82
- export const unregisterToken = async (
83
- props: {
84
- projectId: string;
85
- tokenId: string;
86
- relation: "viewers" | "editors";
87
- },
88
- context: AppContext
89
- ) => {
90
- const { authorization } = context;
91
- const { userId, authorizeTrpc } = authorization;
92
-
93
- if (userId === undefined) {
94
- throw new Error("The user must be authenticated to delete a token");
95
- }
96
-
97
- await authorizeTrpc.delete.mutate({
98
- namespace: "Project",
99
- id: props.projectId,
100
- relation: props.relation,
101
- subjectSet: {
102
- namespace: "Token",
103
- id: props.tokenId,
104
- },
105
- });
106
- };