@mestra-dev/contract 0.0.104 → 0.0.105

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 +40 -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
  ];
@@ -16185,8 +16208,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
16185
16208
  success: true;
16186
16209
  template: {
16187
16210
  id: string;
16188
- title: string;
16189
16211
  created_at: string;
16212
+ title: string;
16190
16213
  workspaceId: string;
16191
16214
  created_by: string;
16192
16215
  content: string;
@@ -16243,10 +16266,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
16243
16266
  success: true;
16244
16267
  service: {
16245
16268
  id: string;
16246
- title: string;
16247
16269
  type: string | null;
16248
16270
  created_at: string;
16249
16271
  active: boolean | null;
16272
+ title: string;
16250
16273
  workspaceId: string;
16251
16274
  description: string | null;
16252
16275
  price: number | null;
@@ -18306,10 +18329,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
18306
18329
  "www-authenticate"?: string | undefined | undefined;
18307
18330
  ":status"?: number | undefined | undefined;
18308
18331
  };
18309
- readonly type: ResponseType;
18310
- readonly url: string;
18311
- readonly status: number;
18312
- readonly ok: boolean;
18313
18332
  data: {
18314
18333
  anyoneCanAddSelf?: boolean | null | undefined;
18315
18334
  attachments?: {
@@ -18484,6 +18503,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
18484
18503
  type?: string | null | undefined;
18485
18504
  } | undefined;
18486
18505
  };
18506
+ readonly type: ResponseType;
18507
+ readonly url: string;
18508
+ readonly status: number;
18509
+ readonly ok: boolean;
18487
18510
  config: {
18488
18511
  headers: {
18489
18512
  [x: string]: string;
@@ -21567,8 +21590,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
21567
21590
  id: string;
21568
21591
  userId: string;
21569
21592
  workspaceId: string | null;
21570
- title: string;
21571
- message: string;
21593
+ key: string;
21594
+ data: {
21595
+ [x: string]: import("hono/utils/types").JSONValue;
21596
+ };
21597
+ title: string | null;
21598
+ message: string | null;
21572
21599
  type: "success" | "info" | "warning" | "failure";
21573
21600
  read: boolean;
21574
21601
  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.105",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,