@mestra-dev/contract 0.0.103 → 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 +50 -23
  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";
@@ -7688,7 +7711,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
7688
7711
  "Payments"
7689
7712
  ];
7690
7713
  readonly summary: "Create a plan-change or seat-change invoice";
7691
- readonly description: "Before the first payment, owners can correct a plan or seat count up or down. After any payment, only a higher plan and/or more seats is accepted. The selected change takes effect only after the new invoice is paid.";
7714
+ readonly description: "Before the first payment, owners can correct a plan or seat count up or down. After any payment, only a higher plan and/or more seats is accepted. The selected plan must fit the workspace's current tasks, comments, customers, services, storage usage, and active collaborator count; otherwise delete data or select a larger plan before retrying. The selected change takes effect only after the new invoice is paid.";
7692
7715
  readonly security: readonly [
7693
7716
  never
7694
7717
  ];
@@ -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
  ];
@@ -8268,7 +8291,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
8268
8291
  "Tasks"
8269
8292
  ];
8270
8293
  readonly summary: "Delete a task";
8271
- readonly description: "Deletes a task from the specified workspace. Requires workspace access and write access to crm::tasks resource.";
8294
+ readonly description: "Deletes a task from the specified workspace. Requires workspace access and write access to crm::tasks resource. This deletion remains available for a frozen Free-trial workspace so it can reduce usage before selecting a paid plan.";
8272
8295
  readonly security: readonly [
8273
8296
  never
8274
8297
  ];
@@ -8988,7 +9011,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
8988
9011
  "Comments"
8989
9012
  ];
8990
9013
  readonly summary: "Delete a comment";
8991
- readonly description: "Deletes a comment from a task in the specified workspace. Requires workspace access and write access to crm::tasks resource.";
9014
+ readonly description: "Deletes a comment from a task in the specified workspace. Requires workspace access and write access to crm::tasks resource. This deletion remains available for a frozen Free-trial workspace so it can reduce usage before selecting a paid plan.";
8992
9015
  readonly security: readonly [
8993
9016
  never
8994
9017
  ];
@@ -9842,7 +9865,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
9842
9865
  "Customers"
9843
9866
  ];
9844
9867
  readonly summary: "Delete a customer";
9845
- readonly description: "Deletes a customer in the specified workspace. Real-estate workspaces remove a lead from customer_real_estates. Requires workspace access and write access to crm::customers resource.";
9868
+ readonly description: "Deletes a customer in the specified workspace. Real-estate workspaces remove a lead from customer_real_estates. Requires workspace access and write access to crm::customers resource. This deletion remains available for a frozen Free-trial workspace so it can reduce usage before selecting a paid plan.";
9846
9869
  readonly security: readonly [
9847
9870
  never
9848
9871
  ];
@@ -10649,7 +10672,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10649
10672
  "Services"
10650
10673
  ];
10651
10674
  readonly summary: "Delete a service";
10652
- readonly description: "Deletes a service in the specified workspace. Requires workspace access and write access to crm::services resource.";
10675
+ readonly description: "Deletes a service in the specified workspace. Requires workspace access and write access to crm::services resource. This deletion remains available for a frozen Free-trial workspace so it can reduce usage before selecting a paid plan.";
10653
10676
  readonly security: readonly [
10654
10677
  never
10655
10678
  ];
@@ -12608,7 +12631,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
12608
12631
  "Files"
12609
12632
  ];
12610
12633
  readonly summary: "Delete an S3 folder and its contents";
12611
- readonly description: "Deletes all objects under `{workspace}/folders/{name}/` in paginated batches. `name` may be nested. Requires workspace access.";
12634
+ readonly description: "Deletes all objects under `{workspace}/folders/{name}/` in paginated batches. `name` may be nested. Requires workspace access and file write access. This deletion remains available for a frozen Free-trial workspace so it can reduce storage before selecting a paid plan.";
12612
12635
  readonly security: readonly [
12613
12636
  never
12614
12637
  ];
@@ -12983,7 +13006,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
12983
13006
  "Files"
12984
13007
  ];
12985
13008
  readonly summary: "Delete a file by workspace-relative path";
12986
- readonly description: "Deletes the S3 object at `{workspace}/{path}`. Verifies the object exists before deletion and confirms removal afterward. Requires workspace access.";
13009
+ readonly description: "Deletes the S3 object at `{workspace}/{path}`. Verifies the object exists before deletion and confirms removal afterward. Requires workspace access and file write access. This deletion remains available for a frozen Free-trial workspace so it can reduce storage before selecting a paid plan.";
12987
13010
  readonly security: readonly [
12988
13011
  never
12989
13012
  ];
@@ -13513,7 +13536,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
13513
13536
  "Files"
13514
13537
  ];
13515
13538
  readonly summary: "Delete a service file";
13516
- readonly description: "Deletes the S3 object at `{workspace}_services/{serviceId}/{filename}`. Verifies the object exists before deletion and confirms removal afterward. Requires workspace access, write access to crm::services, and an active billing grant.";
13539
+ readonly description: "Deletes the S3 object at `{workspace}_services/{serviceId}/{filename}`. Verifies the object exists before deletion and confirms removal afterward. Requires workspace access and write access to crm::services. This deletion remains available for a frozen Free-trial workspace so it can reduce storage before selecting a paid plan.";
13517
13540
  readonly security: readonly [
13518
13541
  never
13519
13542
  ];
@@ -13751,7 +13774,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
13751
13774
  "Files"
13752
13775
  ];
13753
13776
  readonly summary: "Delete a customer file";
13754
- readonly description: "Deletes `{workspace}_customers/{customerId}/{filename}`. Requires workspace access, write access to crm::customers, and billing access.";
13777
+ readonly description: "Deletes `{workspace}_customers/{customerId}/{filename}`. Requires workspace access and write access to crm::customers. This deletion remains available for a frozen Free-trial workspace so it can reduce storage before selecting a paid plan.";
13755
13778
  readonly security: readonly [
13756
13779
  never
13757
13780
  ];
@@ -13795,7 +13818,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
13795
13818
  "Files"
13796
13819
  ];
13797
13820
  readonly summary: "Delete a comment attachment";
13798
- readonly description: "Deletes the S3 object at `{workspace}_comments/{taskId}/{commentId}/{filename}`. Verifies the object exists before deletion and confirms removal afterward. Requires workspace access and write access to crm::tasks.";
13821
+ readonly description: "Deletes the S3 object at `{workspace}_comments/{taskId}/{commentId}/{filename}`. Verifies the object exists before deletion and confirms removal afterward. Requires workspace access and write access to crm::tasks. This deletion remains available for a frozen Free-trial workspace so it can reduce storage before selecting a paid plan.";
13799
13822
  readonly security: readonly [
13800
13823
  never
13801
13824
  ];
@@ -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.103",
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,