@mestra-dev/contract 0.0.104 → 0.0.106

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 (2) hide show
  1. package/dist/index.d.ts +73 -13
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -284,8 +284,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
284
284
  readonly required: readonly [
285
285
  "id",
286
286
  "userId",
287
- "title",
288
- "message",
287
+ "key",
288
+ "data",
289
289
  "type",
290
290
  "read",
291
291
  "archive",
@@ -306,13 +306,36 @@ declare const routes: import("hono/hono-base").HonoBase<{
306
306
  readonly nullable: true;
307
307
  readonly description: "Workspace this notification belongs to. Null for account-level notices (e.g. first registration).";
308
308
  };
309
+ readonly key: {
310
+ readonly type: "string";
311
+ readonly enum: readonly [
312
+ "account.welcome",
313
+ "workspace.created",
314
+ "workspace.left",
315
+ "workspace.removed",
316
+ "workspace.joined",
317
+ "task.assigned",
318
+ "task.unassigned",
319
+ "legacy.custom"
320
+ ];
321
+ readonly description: "Locale-neutral notification event key. Clients render it from their translation catalog.";
322
+ };
323
+ readonly data: {
324
+ readonly type: "object";
325
+ readonly additionalProperties: true;
326
+ readonly description: "Interpolation data for the notification key, such as `taskSubject`.";
327
+ };
309
328
  readonly title: {
310
329
  readonly type: "string";
311
330
  readonly maxLength: 256;
331
+ readonly nullable: true;
332
+ readonly description: "Legacy pre-rendered title. Use only when key is `legacy.custom`.";
312
333
  };
313
334
  readonly message: {
314
335
  readonly type: "string";
315
336
  readonly maxLength: 256;
337
+ readonly nullable: true;
338
+ readonly description: "Legacy pre-rendered message. Use only when key is `legacy.custom`.";
316
339
  };
317
340
  readonly type: {
318
341
  readonly $ref: "#/components/schemas/NotificationType";
@@ -7824,7 +7847,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
7824
7847
  "Tasks"
7825
7848
  ];
7826
7849
  readonly summary: "Create a new task";
7827
- readonly description: "Creates a task in the specified workspace. When `assignees` is provided, each listed collaborator is assigned to the task and the assigned user receives an in-app \"New task assigned\" notification; collaborator IDs that don't belong to the workspace are skipped. Requires workspace access and write access to crm::tasks resource.";
7850
+ readonly description: "Creates a task in the specified workspace. Collaborator IDs that don't belong to the workspace are skipped. Requires workspace access and write access to crm::tasks resource.";
7828
7851
  readonly security: readonly [
7829
7852
  never
7830
7853
  ];
@@ -7886,7 +7909,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
7886
7909
  readonly format: "uuid";
7887
7910
  };
7888
7911
  readonly nullable: true;
7889
- readonly description: "Collaborator IDs to assign to the task. Each assigned user gets an in-app \"New task assigned\" notification. IDs outside the workspace are skipped.";
7912
+ readonly description: "Collaborator IDs to assign to the task. IDs outside the workspace are skipped.";
7890
7913
  };
7891
7914
  readonly comments: {
7892
7915
  readonly type: "array";
@@ -8120,7 +8143,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
8120
8143
  "Tasks"
8121
8144
  ];
8122
8145
  readonly summary: "Update a task";
8123
- readonly description: "Updates a task in the specified workspace. When `assignees` is provided it is treated as the full desired set of assigned collaborators: collaborators missing from the list are unassigned (their user gets a \"Removed from task\" notification) and newly listed collaborators are assigned (their user gets a \"New task assigned\" notification). Omit the field to leave assignments untouched. Only the task creator can update the task. Requires workspace access and write access to crm::tasks resource.";
8146
+ readonly description: "Updates a task in the specified workspace. When assignees are notified, the sync response exposes the locale-neutral `task.assigned` key with interpolation data rather than pre-rendered copy. Omit the field to leave assignments untouched. Only the task creator can update the task. Requires workspace access and write access to crm::tasks resource.";
8124
8147
  readonly security: readonly [
8125
8148
  never
8126
8149
  ];
@@ -16017,6 +16040,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16017
16040
  created_at: string;
16018
16041
  id: string;
16019
16042
  workspaceId: string;
16043
+ created_by: string | null;
16020
16044
  type: string | null;
16021
16045
  name: string;
16022
16046
  companyName: string | null;
@@ -16185,8 +16209,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
16185
16209
  success: true;
16186
16210
  template: {
16187
16211
  id: string;
16188
- title: string;
16189
16212
  created_at: string;
16213
+ title: string;
16190
16214
  workspaceId: string;
16191
16215
  created_by: string;
16192
16216
  content: string;
@@ -16243,13 +16267,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
16243
16267
  success: true;
16244
16268
  service: {
16245
16269
  id: string;
16246
- title: string;
16247
16270
  type: string | null;
16248
16271
  created_at: string;
16249
16272
  active: boolean | null;
16273
+ title: string;
16250
16274
  workspaceId: string;
16251
16275
  description: string | null;
16252
16276
  price: number | null;
16277
+ created_by: string | null;
16253
16278
  currency: string | null;
16254
16279
  updated_at: string | null;
16255
16280
  deleted_at: string | null;
@@ -16338,6 +16363,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16338
16363
  created_at: string;
16339
16364
  id: string;
16340
16365
  workspaceId: string;
16366
+ created_by: string | null;
16341
16367
  title: string;
16342
16368
  active: boolean | null;
16343
16369
  type: string | null;
@@ -16420,6 +16446,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
16420
16446
  output: {
16421
16447
  success: true;
16422
16448
  services: {
16449
+ createdBy: {
16450
+ id: string;
16451
+ firstName: string | null;
16452
+ lastName: string | null;
16453
+ profilePicture: string | null;
16454
+ } | null;
16423
16455
  updated_at: string | null;
16424
16456
  deleted_at: string | null;
16425
16457
  verified_at: string | null;
@@ -16427,6 +16459,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16427
16459
  created_at: string;
16428
16460
  id: string;
16429
16461
  workspaceId: string;
16462
+ created_by: string | null;
16430
16463
  title: string;
16431
16464
  active: boolean | null;
16432
16465
  type: string | null;
@@ -16527,6 +16560,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
16527
16560
  output: {
16528
16561
  success: true;
16529
16562
  service: {
16563
+ createdBy: {
16564
+ id: string;
16565
+ firstName: string | null;
16566
+ lastName: string | null;
16567
+ profilePicture: string | null;
16568
+ } | null;
16530
16569
  updated_at: string | null;
16531
16570
  deleted_at: string | null;
16532
16571
  verified_at: string | null;
@@ -16534,6 +16573,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16534
16573
  created_at: string;
16535
16574
  id: string;
16536
16575
  workspaceId: string;
16576
+ created_by: string | null;
16537
16577
  title: string;
16538
16578
  active: boolean | null;
16539
16579
  type: string | null;
@@ -16641,6 +16681,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16641
16681
  name: string;
16642
16682
  email: string | null;
16643
16683
  workspaceId: string;
16684
+ created_by: string | null;
16644
16685
  companyName: string | null;
16645
16686
  updated_at: string | null;
16646
16687
  deleted_at: string | null;
@@ -16699,6 +16740,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
16699
16740
  output: {
16700
16741
  success: true;
16701
16742
  customers: {
16743
+ createdBy: {
16744
+ id: string;
16745
+ firstName: string | null;
16746
+ lastName: string | null;
16747
+ profilePicture: string | null;
16748
+ } | null;
16702
16749
  updated_at: string | null;
16703
16750
  deleted_at: string | null;
16704
16751
  verified_at: string | null;
@@ -16706,6 +16753,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16706
16753
  created_at: string;
16707
16754
  id: string;
16708
16755
  workspaceId: string;
16756
+ created_by: string | null;
16709
16757
  type: string | null;
16710
16758
  name: string;
16711
16759
  companyName: string | null;
@@ -16779,6 +16827,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
16779
16827
  output: {
16780
16828
  success: true;
16781
16829
  customer: {
16830
+ createdBy: {
16831
+ id: string;
16832
+ firstName: string | null;
16833
+ lastName: string | null;
16834
+ profilePicture: string | null;
16835
+ } | null;
16782
16836
  updated_at: string | null;
16783
16837
  deleted_at: string | null;
16784
16838
  verified_at: string | null;
@@ -16786,6 +16840,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16786
16840
  created_at: string;
16787
16841
  id: string;
16788
16842
  workspaceId: string;
16843
+ created_by: string | null;
16789
16844
  type: string | null;
16790
16845
  name: string;
16791
16846
  companyName: string | null;
@@ -16891,6 +16946,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
16891
16946
  created_at: string;
16892
16947
  id: string;
16893
16948
  workspaceId: string;
16949
+ created_by: string | null;
16894
16950
  type: string | null;
16895
16951
  name: string;
16896
16952
  companyName: string | null;
@@ -18306,10 +18362,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
18306
18362
  "www-authenticate"?: string | undefined | undefined;
18307
18363
  ":status"?: number | undefined | undefined;
18308
18364
  };
18309
- readonly type: ResponseType;
18310
- readonly url: string;
18311
- readonly status: number;
18312
- readonly ok: boolean;
18313
18365
  data: {
18314
18366
  anyoneCanAddSelf?: boolean | null | undefined;
18315
18367
  attachments?: {
@@ -18484,6 +18536,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
18484
18536
  type?: string | null | undefined;
18485
18537
  } | undefined;
18486
18538
  };
18539
+ readonly type: ResponseType;
18540
+ readonly url: string;
18541
+ readonly status: number;
18542
+ readonly ok: boolean;
18487
18543
  config: {
18488
18544
  headers: {
18489
18545
  [x: string]: string;
@@ -21567,8 +21623,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
21567
21623
  id: string;
21568
21624
  userId: string;
21569
21625
  workspaceId: string | null;
21570
- title: string;
21571
- message: string;
21626
+ key: string;
21627
+ data: {
21628
+ [x: string]: import("hono/utils/types").JSONValue;
21629
+ };
21630
+ title: string | null;
21631
+ message: string | null;
21572
21632
  type: "success" | "info" | "warning" | "failure";
21573
21633
  read: boolean;
21574
21634
  archive: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.104",
3
+ "version": "0.0.106",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,