@erxes/core-contract 0.1.0-v2.1 → 0.1.0-v2.3

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 (77) hide show
  1. package/dist/activities.d.ts +1387 -139
  2. package/dist/activities.js +90 -30
  3. package/dist/audit.d.ts +1081 -33
  4. package/dist/audit.js +28 -14
  5. package/dist/auth.d.ts +2834 -26
  6. package/dist/auth.js +47 -18
  7. package/dist/automationRuns.d.ts +7 -9
  8. package/dist/automationRuns.js +12 -13
  9. package/dist/automations.d.ts +2443 -61
  10. package/dist/automations.js +41 -21
  11. package/dist/client.d.ts +30704 -0
  12. package/dist/client.js +62 -0
  13. package/dist/common.d.ts +0 -13
  14. package/dist/common.js +1 -13
  15. package/dist/companies.d.ts +1120 -10
  16. package/dist/companies.js +27 -12
  17. package/dist/contract/routes.json.js +17 -1
  18. package/dist/customerAuth.d.ts +1456 -17
  19. package/dist/customerAuth.js +33 -16
  20. package/dist/customers.d.ts +1232 -11
  21. package/dist/customers.js +28 -13
  22. package/dist/{automationDefinition.d.ts → db/src/automationDefinition.d.ts} +2 -2
  23. package/dist/{automationDefinition.js → db/src/automationDefinition.js} +2 -2
  24. package/dist/db/src/enums.js +1 -3
  25. package/dist/db/src/schema/automations.d.ts +1 -0
  26. package/dist/db/src/schema/automations.js +3 -3
  27. package/dist/db/src/schema/index.d.ts +3 -0
  28. package/dist/db/src/schema/index.js +3 -2
  29. package/dist/db/src/schema/leads.js +2 -2
  30. package/dist/db/src/schema/notes.js +92 -0
  31. package/dist/db/src/schema/payments.js +2 -2
  32. package/dist/db/src/schema/platform.js +0 -5
  33. package/dist/db/src/schema/plugins.js +7 -2
  34. package/dist/db/src/schema/transfer.js +2 -2
  35. package/dist/errors.d.ts +516 -0
  36. package/dist/errors.js +218 -0
  37. package/dist/events.d.ts +570 -121
  38. package/dist/events.js +41 -24
  39. package/dist/fields.d.ts +1456 -16
  40. package/dist/fields.js +27 -19
  41. package/dist/files.d.ts +761 -62
  42. package/dist/files.js +32 -21
  43. package/dist/index.d.ts +25187 -618
  44. package/dist/index.js +8 -7
  45. package/dist/leads.d.ts +1105 -21
  46. package/dist/leads.js +31 -13
  47. package/dist/notifications.d.ts +689 -48
  48. package/dist/notifications.js +38 -18
  49. package/dist/organizations.d.ts +260 -2
  50. package/dist/organizations.js +21 -2
  51. package/dist/payments.d.ts +1766 -62
  52. package/dist/payments.js +48 -26
  53. package/dist/platform.d.ts +12 -21
  54. package/dist/platform.js +7 -17
  55. package/dist/plugins.d.ts +802 -71
  56. package/dist/plugins.js +48 -27
  57. package/dist/products.d.ts +1380 -17
  58. package/dist/products.js +32 -16
  59. package/dist/roles.d.ts +560 -5
  60. package/dist/roles.js +20 -6
  61. package/dist/saas.d.ts +164 -2
  62. package/dist/saas.js +9 -2
  63. package/dist/tags.d.ts +340 -4
  64. package/dist/tags.js +14 -6
  65. package/dist/transfer.d.ts +1299 -12
  66. package/dist/transfer.js +32 -13
  67. package/dist/trash.d.ts +278 -21
  68. package/dist/trash.js +23 -16
  69. package/dist/users.d.ts +1206 -18
  70. package/dist/users.js +35 -13
  71. package/dist/values.d.ts +0 -9
  72. package/dist/values.js +2 -7
  73. package/dist/views.d.ts +396 -5
  74. package/dist/views.js +10 -7
  75. package/dist/webhooks.d.ts +765 -9
  76. package/dist/webhooks.js +18 -10
  77. package/package.json +6 -2
@@ -6,28 +6,22 @@ export declare const Notification: z.ZodObject<{
6
6
  title: z.ZodString;
7
7
  body: z.ZodNullable<z.ZodString>;
8
8
  link: z.ZodNullable<z.ZodString>;
9
+ entityType: z.ZodNullable<z.ZodString>;
10
+ entityId: z.ZodNullable<z.ZodString>;
9
11
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
10
12
  priority: z.ZodEnum<{
11
13
  high: "high";
12
14
  normal: "normal";
13
15
  }>;
16
+ actorType: z.ZodEnum<{
17
+ customer: "customer";
18
+ plugin: "plugin";
19
+ system: "system";
20
+ user: "user";
21
+ }>;
22
+ actorId: z.ZodNullable<z.ZodString>;
23
+ readAt: z.ZodNullable<z.ZodCodec<z.ZodDate, z.ZodISODateTime>>;
14
24
  createdAt: z.ZodCodec<z.ZodDate, z.ZodISODateTime>;
15
- entity: z.ZodNullable<z.ZodObject<{
16
- type: z.ZodString;
17
- id: z.ZodString;
18
- }, z.core.$strip>>;
19
- actor: z.ZodObject<{
20
- type: z.ZodEnum<{
21
- customer: "customer";
22
- plugin: "plugin";
23
- system: "system";
24
- user: "user";
25
- }>;
26
- id: z.ZodNullable<z.ZodString>;
27
- name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
- avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
29
- }, z.core.$strip>;
30
- read: z.ZodBoolean;
31
25
  }, {
32
26
  out: {};
33
27
  in: {};
@@ -38,6 +32,8 @@ export declare const NotificationInput: z.ZodObject<{
38
32
  title: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
39
33
  body: z.ZodOptional<z.ZodString>;
40
34
  link: z.ZodOptional<z.ZodString>;
35
+ entityType: z.ZodOptional<z.ZodString>;
36
+ entityId: z.ZodOptional<z.ZodString>;
41
37
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
42
38
  priority: z.ZodDefault<z.ZodEnum<{
43
39
  high: "high";
@@ -45,10 +41,6 @@ export declare const NotificationInput: z.ZodObject<{
45
41
  }>>;
46
42
  dedupeKey: z.ZodOptional<z.ZodString>;
47
43
  userIds: z.ZodArray<z.ZodString>;
48
- entity: z.ZodOptional<z.ZodObject<{
49
- type: z.ZodString;
50
- id: z.ZodString;
51
- }, z.core.$strip>>;
52
44
  actorUserId: z.ZodOptional<z.ZodString>;
53
45
  }, {
54
46
  out: {};
@@ -88,7 +80,6 @@ export declare const NotificationSettings: z.ZodObject<{
88
80
  browser: z.ZodBoolean;
89
81
  }, z.core.$strip>;
90
82
  export type NotificationSettings = z.infer<typeof NotificationSettings>;
91
- /** The signed-in member's inbox. Plugins create notifications with `create`. */
92
83
  export declare const notificationsContract: {
93
84
  list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
94
85
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -119,28 +110,22 @@ export declare const notificationsContract: {
119
110
  title: z.ZodString;
120
111
  body: z.ZodNullable<z.ZodString>;
121
112
  link: z.ZodNullable<z.ZodString>;
113
+ entityType: z.ZodNullable<z.ZodString>;
114
+ entityId: z.ZodNullable<z.ZodString>;
122
115
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
123
116
  priority: z.ZodEnum<{
124
117
  high: "high";
125
118
  normal: "normal";
126
119
  }>;
120
+ actorType: z.ZodEnum<{
121
+ customer: "customer";
122
+ plugin: "plugin";
123
+ system: "system";
124
+ user: "user";
125
+ }>;
126
+ actorId: z.ZodNullable<z.ZodString>;
127
+ readAt: z.ZodNullable<z.ZodCodec<z.ZodDate, z.ZodISODateTime>>;
127
128
  createdAt: z.ZodCodec<z.ZodDate, z.ZodISODateTime>;
128
- entity: z.ZodNullable<z.ZodObject<{
129
- type: z.ZodString;
130
- id: z.ZodString;
131
- }, z.core.$strip>>;
132
- actor: z.ZodObject<{
133
- type: z.ZodEnum<{
134
- customer: "customer";
135
- plugin: "plugin";
136
- system: "system";
137
- user: "user";
138
- }>;
139
- id: z.ZodNullable<z.ZodString>;
140
- name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
141
- avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
142
- }, z.core.$strip>;
143
- read: z.ZodBoolean;
144
129
  }, {
145
130
  out: {};
146
131
  in: {};
@@ -153,25 +138,401 @@ export declare const notificationsContract: {
153
138
  }, z.core.$strip>;
154
139
  totalCount: z.ZodInt;
155
140
  totalCapped: z.ZodOptional<z.ZodBoolean>;
156
- }, z.core.$strip>, Record<never, never>, Record<never, never>>;
141
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
142
+ UNAUTHORIZED: {
143
+ status: number;
144
+ };
145
+ NOT_ALLOWED: {
146
+ status: number;
147
+ data: z.ZodOptional<z.ZodObject<{
148
+ permission: z.ZodString;
149
+ }, z.core.$strip>>;
150
+ };
151
+ PLUGIN_ONLY: {
152
+ status: number;
153
+ };
154
+ MEMBERS_ONLY: {
155
+ status: number;
156
+ };
157
+ ORG_REQUIRED: {
158
+ status: number;
159
+ };
160
+ SCOPE_REQUIRED: {
161
+ status: number;
162
+ };
163
+ SERVICE_TOKEN_REQUIRED: {
164
+ status: number;
165
+ };
166
+ ORGANIZATION_DISABLED: {
167
+ status: number;
168
+ data: z.ZodObject<{
169
+ manageUrl: z.ZodNullable<z.ZodString>;
170
+ }, z.core.$strip>;
171
+ };
172
+ NOT_IN_PLAN: {
173
+ status: number;
174
+ data: z.ZodOptional<z.ZodObject<{
175
+ manageUrl: z.ZodNullable<z.ZodString>;
176
+ }, z.core.$strip>>;
177
+ };
178
+ READ_ONLY: {
179
+ status: number;
180
+ };
181
+ TOO_MANY_REQUESTS: {
182
+ status: number;
183
+ };
184
+ INVALID_INPUT: {
185
+ status: number;
186
+ data: z.ZodObject<{
187
+ issues: z.ZodArray<z.ZodObject<{
188
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
189
+ message: z.ZodString;
190
+ }, z.core.$strip>>;
191
+ }, z.core.$strip>;
192
+ };
193
+ NOT_FOUND: {
194
+ status: number;
195
+ };
196
+ TAKEN: {
197
+ status: number;
198
+ data: z.ZodObject<{
199
+ field: z.ZodString;
200
+ id: z.ZodOptional<z.ZodString>;
201
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
202
+ }, z.core.$strip>;
203
+ };
204
+ INVALID_CURSOR: {
205
+ status: number;
206
+ };
207
+ INVALID_REFERENCE: {
208
+ status: number;
209
+ data: z.ZodObject<{
210
+ field: z.ZodString;
211
+ }, z.core.$strip>;
212
+ };
213
+ INVALID_FILTER: {
214
+ status: number;
215
+ };
216
+ FILTER_TOO_SLOW: {
217
+ status: number;
218
+ };
219
+ /** The signed-in member's inbox. Plugins create notifications with `create`. */
220
+ ALWAYS_ON: {
221
+ status: number;
222
+ };
223
+ INVALID_ACTOR: {
224
+ status: number;
225
+ };
226
+ INVALID_OWNER: {
227
+ status: number;
228
+ };
229
+ INVALID_RECIPIENT: {
230
+ status: number;
231
+ };
232
+ INVALID_TYPE: {
233
+ status: number;
234
+ };
235
+ }>, Record<never, never>>;
157
236
  unreadCount: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
158
237
  source: z.ZodOptional<z.ZodString>;
159
238
  }, z.core.$strip>, z.ZodObject<{
160
239
  count: z.ZodInt;
161
240
  bySource: z.ZodRecord<z.ZodString, z.ZodInt>;
162
- }, z.core.$strip>, Record<never, never>, Record<never, never>>;
241
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
242
+ UNAUTHORIZED: {
243
+ status: number;
244
+ };
245
+ NOT_ALLOWED: {
246
+ status: number;
247
+ data: z.ZodOptional<z.ZodObject<{
248
+ permission: z.ZodString;
249
+ }, z.core.$strip>>;
250
+ };
251
+ PLUGIN_ONLY: {
252
+ status: number;
253
+ };
254
+ MEMBERS_ONLY: {
255
+ status: number;
256
+ };
257
+ ORG_REQUIRED: {
258
+ status: number;
259
+ };
260
+ SCOPE_REQUIRED: {
261
+ status: number;
262
+ };
263
+ SERVICE_TOKEN_REQUIRED: {
264
+ status: number;
265
+ };
266
+ ORGANIZATION_DISABLED: {
267
+ status: number;
268
+ data: z.ZodObject<{
269
+ manageUrl: z.ZodNullable<z.ZodString>;
270
+ }, z.core.$strip>;
271
+ };
272
+ NOT_IN_PLAN: {
273
+ status: number;
274
+ data: z.ZodOptional<z.ZodObject<{
275
+ manageUrl: z.ZodNullable<z.ZodString>;
276
+ }, z.core.$strip>>;
277
+ };
278
+ READ_ONLY: {
279
+ status: number;
280
+ };
281
+ TOO_MANY_REQUESTS: {
282
+ status: number;
283
+ };
284
+ INVALID_INPUT: {
285
+ status: number;
286
+ data: z.ZodObject<{
287
+ issues: z.ZodArray<z.ZodObject<{
288
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
289
+ message: z.ZodString;
290
+ }, z.core.$strip>>;
291
+ }, z.core.$strip>;
292
+ };
293
+ NOT_FOUND: {
294
+ status: number;
295
+ };
296
+ TAKEN: {
297
+ status: number;
298
+ data: z.ZodObject<{
299
+ field: z.ZodString;
300
+ id: z.ZodOptional<z.ZodString>;
301
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
302
+ }, z.core.$strip>;
303
+ };
304
+ INVALID_CURSOR: {
305
+ status: number;
306
+ };
307
+ INVALID_REFERENCE: {
308
+ status: number;
309
+ data: z.ZodObject<{
310
+ field: z.ZodString;
311
+ }, z.core.$strip>;
312
+ };
313
+ INVALID_FILTER: {
314
+ status: number;
315
+ };
316
+ FILTER_TOO_SLOW: {
317
+ status: number;
318
+ };
319
+ /** The signed-in member's inbox. Plugins create notifications with `create`. */
320
+ ALWAYS_ON: {
321
+ status: number;
322
+ };
323
+ INVALID_ACTOR: {
324
+ status: number;
325
+ };
326
+ INVALID_OWNER: {
327
+ status: number;
328
+ };
329
+ INVALID_RECIPIENT: {
330
+ status: number;
331
+ };
332
+ INVALID_TYPE: {
333
+ status: number;
334
+ };
335
+ }>, Record<never, never>>;
163
336
  markRead: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
164
337
  ids: z.ZodOptional<z.ZodArray<z.ZodString>>;
165
338
  source: z.ZodOptional<z.ZodString>;
166
339
  read: z.ZodDefault<z.ZodBoolean>;
167
340
  }, z.core.$strip>, z.ZodObject<{
168
341
  updated: z.ZodInt;
169
- }, z.core.$strip>, Record<never, never>, Record<never, never>>;
342
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
343
+ UNAUTHORIZED: {
344
+ status: number;
345
+ };
346
+ NOT_ALLOWED: {
347
+ status: number;
348
+ data: z.ZodOptional<z.ZodObject<{
349
+ permission: z.ZodString;
350
+ }, z.core.$strip>>;
351
+ };
352
+ PLUGIN_ONLY: {
353
+ status: number;
354
+ };
355
+ MEMBERS_ONLY: {
356
+ status: number;
357
+ };
358
+ ORG_REQUIRED: {
359
+ status: number;
360
+ };
361
+ SCOPE_REQUIRED: {
362
+ status: number;
363
+ };
364
+ SERVICE_TOKEN_REQUIRED: {
365
+ status: number;
366
+ };
367
+ ORGANIZATION_DISABLED: {
368
+ status: number;
369
+ data: z.ZodObject<{
370
+ manageUrl: z.ZodNullable<z.ZodString>;
371
+ }, z.core.$strip>;
372
+ };
373
+ NOT_IN_PLAN: {
374
+ status: number;
375
+ data: z.ZodOptional<z.ZodObject<{
376
+ manageUrl: z.ZodNullable<z.ZodString>;
377
+ }, z.core.$strip>>;
378
+ };
379
+ READ_ONLY: {
380
+ status: number;
381
+ };
382
+ TOO_MANY_REQUESTS: {
383
+ status: number;
384
+ };
385
+ INVALID_INPUT: {
386
+ status: number;
387
+ data: z.ZodObject<{
388
+ issues: z.ZodArray<z.ZodObject<{
389
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
390
+ message: z.ZodString;
391
+ }, z.core.$strip>>;
392
+ }, z.core.$strip>;
393
+ };
394
+ NOT_FOUND: {
395
+ status: number;
396
+ };
397
+ TAKEN: {
398
+ status: number;
399
+ data: z.ZodObject<{
400
+ field: z.ZodString;
401
+ id: z.ZodOptional<z.ZodString>;
402
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
403
+ }, z.core.$strip>;
404
+ };
405
+ INVALID_CURSOR: {
406
+ status: number;
407
+ };
408
+ INVALID_REFERENCE: {
409
+ status: number;
410
+ data: z.ZodObject<{
411
+ field: z.ZodString;
412
+ }, z.core.$strip>;
413
+ };
414
+ INVALID_FILTER: {
415
+ status: number;
416
+ };
417
+ FILTER_TOO_SLOW: {
418
+ status: number;
419
+ };
420
+ /** The signed-in member's inbox. Plugins create notifications with `create`. */
421
+ ALWAYS_ON: {
422
+ status: number;
423
+ };
424
+ INVALID_ACTOR: {
425
+ status: number;
426
+ };
427
+ INVALID_OWNER: {
428
+ status: number;
429
+ };
430
+ INVALID_RECIPIENT: {
431
+ status: number;
432
+ };
433
+ INVALID_TYPE: {
434
+ status: number;
435
+ };
436
+ }>, Record<never, never>>;
170
437
  remove: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
171
438
  id: z.ZodString;
172
439
  }, z.core.$strip>, z.ZodObject<{
173
440
  ok: z.ZodLiteral<true>;
174
- }, z.core.$strip>, Record<never, never>, Record<never, never>>;
441
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
442
+ UNAUTHORIZED: {
443
+ status: number;
444
+ };
445
+ NOT_ALLOWED: {
446
+ status: number;
447
+ data: z.ZodOptional<z.ZodObject<{
448
+ permission: z.ZodString;
449
+ }, z.core.$strip>>;
450
+ };
451
+ PLUGIN_ONLY: {
452
+ status: number;
453
+ };
454
+ MEMBERS_ONLY: {
455
+ status: number;
456
+ };
457
+ ORG_REQUIRED: {
458
+ status: number;
459
+ };
460
+ SCOPE_REQUIRED: {
461
+ status: number;
462
+ };
463
+ SERVICE_TOKEN_REQUIRED: {
464
+ status: number;
465
+ };
466
+ ORGANIZATION_DISABLED: {
467
+ status: number;
468
+ data: z.ZodObject<{
469
+ manageUrl: z.ZodNullable<z.ZodString>;
470
+ }, z.core.$strip>;
471
+ };
472
+ NOT_IN_PLAN: {
473
+ status: number;
474
+ data: z.ZodOptional<z.ZodObject<{
475
+ manageUrl: z.ZodNullable<z.ZodString>;
476
+ }, z.core.$strip>>;
477
+ };
478
+ READ_ONLY: {
479
+ status: number;
480
+ };
481
+ TOO_MANY_REQUESTS: {
482
+ status: number;
483
+ };
484
+ INVALID_INPUT: {
485
+ status: number;
486
+ data: z.ZodObject<{
487
+ issues: z.ZodArray<z.ZodObject<{
488
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
489
+ message: z.ZodString;
490
+ }, z.core.$strip>>;
491
+ }, z.core.$strip>;
492
+ };
493
+ NOT_FOUND: {
494
+ status: number;
495
+ };
496
+ TAKEN: {
497
+ status: number;
498
+ data: z.ZodObject<{
499
+ field: z.ZodString;
500
+ id: z.ZodOptional<z.ZodString>;
501
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
502
+ }, z.core.$strip>;
503
+ };
504
+ INVALID_CURSOR: {
505
+ status: number;
506
+ };
507
+ INVALID_REFERENCE: {
508
+ status: number;
509
+ data: z.ZodObject<{
510
+ field: z.ZodString;
511
+ }, z.core.$strip>;
512
+ };
513
+ INVALID_FILTER: {
514
+ status: number;
515
+ };
516
+ FILTER_TOO_SLOW: {
517
+ status: number;
518
+ };
519
+ /** The signed-in member's inbox. Plugins create notifications with `create`. */
520
+ ALWAYS_ON: {
521
+ status: number;
522
+ };
523
+ INVALID_ACTOR: {
524
+ status: number;
525
+ };
526
+ INVALID_OWNER: {
527
+ status: number;
528
+ };
529
+ INVALID_RECIPIENT: {
530
+ status: number;
531
+ };
532
+ INVALID_TYPE: {
533
+ status: number;
534
+ };
535
+ }>, Record<never, never>>;
175
536
  settings: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
176
537
  groups: z.ZodArray<z.ZodObject<{
177
538
  key: z.ZodString;
@@ -186,7 +547,101 @@ export declare const notificationsContract: {
186
547
  }, z.core.$strip>>;
187
548
  email: z.ZodBoolean;
188
549
  browser: z.ZodBoolean;
189
- }, z.core.$strip>, Record<never, never>, Record<never, never>>;
550
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
551
+ UNAUTHORIZED: {
552
+ status: number;
553
+ };
554
+ NOT_ALLOWED: {
555
+ status: number;
556
+ data: z.ZodOptional<z.ZodObject<{
557
+ permission: z.ZodString;
558
+ }, z.core.$strip>>;
559
+ };
560
+ PLUGIN_ONLY: {
561
+ status: number;
562
+ };
563
+ MEMBERS_ONLY: {
564
+ status: number;
565
+ };
566
+ ORG_REQUIRED: {
567
+ status: number;
568
+ };
569
+ SCOPE_REQUIRED: {
570
+ status: number;
571
+ };
572
+ SERVICE_TOKEN_REQUIRED: {
573
+ status: number;
574
+ };
575
+ ORGANIZATION_DISABLED: {
576
+ status: number;
577
+ data: z.ZodObject<{
578
+ manageUrl: z.ZodNullable<z.ZodString>;
579
+ }, z.core.$strip>;
580
+ };
581
+ NOT_IN_PLAN: {
582
+ status: number;
583
+ data: z.ZodOptional<z.ZodObject<{
584
+ manageUrl: z.ZodNullable<z.ZodString>;
585
+ }, z.core.$strip>>;
586
+ };
587
+ READ_ONLY: {
588
+ status: number;
589
+ };
590
+ TOO_MANY_REQUESTS: {
591
+ status: number;
592
+ };
593
+ INVALID_INPUT: {
594
+ status: number;
595
+ data: z.ZodObject<{
596
+ issues: z.ZodArray<z.ZodObject<{
597
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
598
+ message: z.ZodString;
599
+ }, z.core.$strip>>;
600
+ }, z.core.$strip>;
601
+ };
602
+ NOT_FOUND: {
603
+ status: number;
604
+ };
605
+ TAKEN: {
606
+ status: number;
607
+ data: z.ZodObject<{
608
+ field: z.ZodString;
609
+ id: z.ZodOptional<z.ZodString>;
610
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
611
+ }, z.core.$strip>;
612
+ };
613
+ INVALID_CURSOR: {
614
+ status: number;
615
+ };
616
+ INVALID_REFERENCE: {
617
+ status: number;
618
+ data: z.ZodObject<{
619
+ field: z.ZodString;
620
+ }, z.core.$strip>;
621
+ };
622
+ INVALID_FILTER: {
623
+ status: number;
624
+ };
625
+ FILTER_TOO_SLOW: {
626
+ status: number;
627
+ };
628
+ /** The signed-in member's inbox. Plugins create notifications with `create`. */
629
+ ALWAYS_ON: {
630
+ status: number;
631
+ };
632
+ INVALID_ACTOR: {
633
+ status: number;
634
+ };
635
+ INVALID_OWNER: {
636
+ status: number;
637
+ };
638
+ INVALID_RECIPIENT: {
639
+ status: number;
640
+ };
641
+ INVALID_TYPE: {
642
+ status: number;
643
+ };
644
+ }>, Record<never, never>>;
190
645
  updateSettings: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
191
646
  groups: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
192
647
  email: "email";
@@ -209,12 +664,108 @@ export declare const notificationsContract: {
209
664
  }, z.core.$strip>>;
210
665
  email: z.ZodBoolean;
211
666
  browser: z.ZodBoolean;
212
- }, z.core.$strip>, Record<never, never>, Record<never, never>>;
667
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
668
+ UNAUTHORIZED: {
669
+ status: number;
670
+ };
671
+ NOT_ALLOWED: {
672
+ status: number;
673
+ data: z.ZodOptional<z.ZodObject<{
674
+ permission: z.ZodString;
675
+ }, z.core.$strip>>;
676
+ };
677
+ PLUGIN_ONLY: {
678
+ status: number;
679
+ };
680
+ MEMBERS_ONLY: {
681
+ status: number;
682
+ };
683
+ ORG_REQUIRED: {
684
+ status: number;
685
+ };
686
+ SCOPE_REQUIRED: {
687
+ status: number;
688
+ };
689
+ SERVICE_TOKEN_REQUIRED: {
690
+ status: number;
691
+ };
692
+ ORGANIZATION_DISABLED: {
693
+ status: number;
694
+ data: z.ZodObject<{
695
+ manageUrl: z.ZodNullable<z.ZodString>;
696
+ }, z.core.$strip>;
697
+ };
698
+ NOT_IN_PLAN: {
699
+ status: number;
700
+ data: z.ZodOptional<z.ZodObject<{
701
+ manageUrl: z.ZodNullable<z.ZodString>;
702
+ }, z.core.$strip>>;
703
+ };
704
+ READ_ONLY: {
705
+ status: number;
706
+ };
707
+ TOO_MANY_REQUESTS: {
708
+ status: number;
709
+ };
710
+ INVALID_INPUT: {
711
+ status: number;
712
+ data: z.ZodObject<{
713
+ issues: z.ZodArray<z.ZodObject<{
714
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
715
+ message: z.ZodString;
716
+ }, z.core.$strip>>;
717
+ }, z.core.$strip>;
718
+ };
719
+ NOT_FOUND: {
720
+ status: number;
721
+ };
722
+ TAKEN: {
723
+ status: number;
724
+ data: z.ZodObject<{
725
+ field: z.ZodString;
726
+ id: z.ZodOptional<z.ZodString>;
727
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
728
+ }, z.core.$strip>;
729
+ };
730
+ INVALID_CURSOR: {
731
+ status: number;
732
+ };
733
+ INVALID_REFERENCE: {
734
+ status: number;
735
+ data: z.ZodObject<{
736
+ field: z.ZodString;
737
+ }, z.core.$strip>;
738
+ };
739
+ INVALID_FILTER: {
740
+ status: number;
741
+ };
742
+ FILTER_TOO_SLOW: {
743
+ status: number;
744
+ };
745
+ /** The signed-in member's inbox. Plugins create notifications with `create`. */
746
+ ALWAYS_ON: {
747
+ status: number;
748
+ };
749
+ INVALID_ACTOR: {
750
+ status: number;
751
+ };
752
+ INVALID_OWNER: {
753
+ status: number;
754
+ };
755
+ INVALID_RECIPIENT: {
756
+ status: number;
757
+ };
758
+ INVALID_TYPE: {
759
+ status: number;
760
+ };
761
+ }>, Record<never, never>>;
213
762
  create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
214
763
  kind: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
215
764
  title: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
216
765
  body: z.ZodOptional<z.ZodString>;
217
766
  link: z.ZodOptional<z.ZodString>;
767
+ entityType: z.ZodOptional<z.ZodString>;
768
+ entityId: z.ZodOptional<z.ZodString>;
218
769
  data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
219
770
  priority: z.ZodDefault<z.ZodEnum<{
220
771
  high: "high";
@@ -222,10 +773,6 @@ export declare const notificationsContract: {
222
773
  }>>;
223
774
  dedupeKey: z.ZodOptional<z.ZodString>;
224
775
  userIds: z.ZodArray<z.ZodString>;
225
- entity: z.ZodOptional<z.ZodObject<{
226
- type: z.ZodString;
227
- id: z.ZodString;
228
- }, z.core.$strip>>;
229
776
  actorUserId: z.ZodOptional<z.ZodString>;
230
777
  }, {
231
778
  out: {};
@@ -233,5 +780,99 @@ export declare const notificationsContract: {
233
780
  }>, z.ZodObject<{
234
781
  created: z.ZodInt;
235
782
  skipped: z.ZodInt;
236
- }, z.core.$strip>, Record<never, never>, Record<never, never>>;
783
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, {
784
+ UNAUTHORIZED: {
785
+ status: number;
786
+ };
787
+ NOT_ALLOWED: {
788
+ status: number;
789
+ data: z.ZodOptional<z.ZodObject<{
790
+ permission: z.ZodString;
791
+ }, z.core.$strip>>;
792
+ };
793
+ PLUGIN_ONLY: {
794
+ status: number;
795
+ };
796
+ MEMBERS_ONLY: {
797
+ status: number;
798
+ };
799
+ ORG_REQUIRED: {
800
+ status: number;
801
+ };
802
+ SCOPE_REQUIRED: {
803
+ status: number;
804
+ };
805
+ SERVICE_TOKEN_REQUIRED: {
806
+ status: number;
807
+ };
808
+ ORGANIZATION_DISABLED: {
809
+ status: number;
810
+ data: z.ZodObject<{
811
+ manageUrl: z.ZodNullable<z.ZodString>;
812
+ }, z.core.$strip>;
813
+ };
814
+ NOT_IN_PLAN: {
815
+ status: number;
816
+ data: z.ZodOptional<z.ZodObject<{
817
+ manageUrl: z.ZodNullable<z.ZodString>;
818
+ }, z.core.$strip>>;
819
+ };
820
+ READ_ONLY: {
821
+ status: number;
822
+ };
823
+ TOO_MANY_REQUESTS: {
824
+ status: number;
825
+ };
826
+ INVALID_INPUT: {
827
+ status: number;
828
+ data: z.ZodObject<{
829
+ issues: z.ZodArray<z.ZodObject<{
830
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
831
+ message: z.ZodString;
832
+ }, z.core.$strip>>;
833
+ }, z.core.$strip>;
834
+ };
835
+ NOT_FOUND: {
836
+ status: number;
837
+ };
838
+ TAKEN: {
839
+ status: number;
840
+ data: z.ZodObject<{
841
+ field: z.ZodString;
842
+ id: z.ZodOptional<z.ZodString>;
843
+ values: z.ZodOptional<z.ZodArray<z.ZodString>>;
844
+ }, z.core.$strip>;
845
+ };
846
+ INVALID_CURSOR: {
847
+ status: number;
848
+ };
849
+ INVALID_REFERENCE: {
850
+ status: number;
851
+ data: z.ZodObject<{
852
+ field: z.ZodString;
853
+ }, z.core.$strip>;
854
+ };
855
+ INVALID_FILTER: {
856
+ status: number;
857
+ };
858
+ FILTER_TOO_SLOW: {
859
+ status: number;
860
+ };
861
+ /** The signed-in member's inbox. Plugins create notifications with `create`. */
862
+ ALWAYS_ON: {
863
+ status: number;
864
+ };
865
+ INVALID_ACTOR: {
866
+ status: number;
867
+ };
868
+ INVALID_OWNER: {
869
+ status: number;
870
+ };
871
+ INVALID_RECIPIENT: {
872
+ status: number;
873
+ };
874
+ INVALID_TYPE: {
875
+ status: number;
876
+ };
877
+ }>, Record<never, never>>;
237
878
  };