@middlewr/contracts 0.0.35 → 0.0.37

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsDxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAE9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AAGpC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAU7B,CAAC;AAGF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYzB,CAAC;AAGF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM3B,CAAC;AAGF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAepC,CAAC;AAGF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwD9B,CAAC;AAGF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWpB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC;AACvC,MAAM,MAAM,MAAM,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC"}
package/dist/esm/index.js CHANGED
@@ -335,6 +335,7 @@ var LinkSchema = z8.object({
335
335
  created_at: z8.coerce.date(),
336
336
  updated_at: z8.coerce.date().nullable(),
337
337
  qr_code_settings: QrCodeSettingsSchema.nullable(),
338
+ qr_logo_key: z8.string().nullable(),
338
339
  link_type: z8.enum(["redirect", "rules"]).default("redirect"),
339
340
  rule_graph: RuleGraphSchema.optional(),
340
341
  tags: z8.array(TagSchema)
@@ -511,6 +512,9 @@ var CreateInvitationInputSchema = z10.object({
511
512
  email: z10.string().email(),
512
513
  permissions: z10.number().int().min(1)
513
514
  });
515
+ var WorkspaceStatsSchema = z10.object({
516
+ links_count: z10.number().int()
517
+ });
514
518
  var WorkspaceRoleSchema = z10.object({
515
519
  name: z10.string(),
516
520
  description: z10.string(),
@@ -544,6 +548,7 @@ var workspacesContract = {
544
548
  update: oc.route({ method: "PATCH", path: "/api/workspaces/{workspace_id}" }).input(WorkspaceIdParamSchema.merge(UpdateWorkspaceInputSchema)).output(WorkspaceSchema),
545
549
  delete: oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}" }).input(WorkspaceIdParamSchema).output(z11.void()),
546
550
  transfer: oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/transfer" }).input(WorkspaceIdParamSchema.merge(TransferOwnershipInputSchema)).output(z11.void()),
551
+ stats: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/stats" }).input(WorkspaceIdParamSchema).output(WorkspaceStatsSchema),
547
552
  // Roles
548
553
  listRoles: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/roles" }).input(WorkspaceIdParamSchema).output(z11.array(WorkspaceRoleSchema)),
549
554
  // Members
@@ -568,6 +573,8 @@ var linksContract = {
568
573
  delete: oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}/links/{link_id}" }).input(LinkIdParamSchema).output(z11.void()),
569
574
  edgeSync: oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/links/{link_id}/edge/sync" }).input(LinkIdParamSchema).output(z11.void()),
570
575
  edgeStatus: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/links/{link_id}/edge/status" }).input(LinkIdParamSchema).output(z11.object({ synced: z11.boolean() })),
576
+ uploadLogo: oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/links/{link_id}/logo" }).input(LinkIdParamSchema.merge(z11.object({ file: z11.file().mime(["image/png", "image/jpeg", "image/svg+xml", "image/webp"]) }))).output(LinkSchema),
577
+ deleteLogo: oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}/links/{link_id}/logo" }).input(LinkIdParamSchema).output(LinkSchema),
571
578
  getJob: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/jobs/{job_id}" }).input(LinkJobIdParamSchema).output(LinkJobSchema),
572
579
  jobResults: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/jobs/{job_id}/results" }).input(LinkJobIdParamSchema).output(z11.object({ url: z11.string() }))
573
580
  };
@@ -662,6 +669,7 @@ export {
662
669
  WorkspaceMemberUserSchema,
663
670
  WorkspaceRoleSchema,
664
671
  WorkspaceSchema,
672
+ WorkspaceStatsSchema,
665
673
  WorkspaceWithCountSchema,
666
674
  analyticsContract,
667
675
  apiKeysContract,
@@ -73,6 +73,7 @@ export declare const LinkSchema: z.ZodObject<{
73
73
  frame_color: z.ZodString;
74
74
  frame_text_color: z.ZodString;
75
75
  }, z.core.$strip>>;
76
+ qr_logo_key: z.ZodNullable<z.ZodString>;
76
77
  link_type: z.ZodDefault<z.ZodEnum<{
77
78
  redirect: "redirect";
78
79
  rules: "rules";
@@ -523,6 +524,7 @@ export declare const PaginatedLinksSchema: z.ZodObject<{
523
524
  frame_color: z.ZodString;
524
525
  frame_text_color: z.ZodString;
525
526
  }, z.core.$strip>>;
527
+ qr_logo_key: z.ZodNullable<z.ZodString>;
526
528
  link_type: z.ZodDefault<z.ZodEnum<{
527
529
  redirect: "redirect";
528
530
  rules: "rules";
@@ -1 +1 @@
1
- {"version":3,"file":"links.schema.d.ts","sourceRoot":"","sources":["../../src/links.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;iBAU/B,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4BrB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiC5B,CAAC;AAEP,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkC5B,CAAC;AAMP,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe5B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAyD,CAAC;AAE/F,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM/B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;iBAYxB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC"}
@@ -70,6 +70,9 @@ export declare const CreateInvitationInputSchema: z.ZodObject<{
70
70
  email: z.ZodString;
71
71
  permissions: z.ZodNumber;
72
72
  }, z.core.$strip>;
73
+ export declare const WorkspaceStatsSchema: z.ZodObject<{
74
+ links_count: z.ZodNumber;
75
+ }, z.core.$strip>;
73
76
  export declare const WorkspaceRoleSchema: z.ZodObject<{
74
77
  name: z.ZodString;
75
78
  description: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"workspaces.schema.d.ts","sourceRoot":"","sources":["../../src/workspaces.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe;;;;;;;;;;iBAU1B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;iBAEnC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;iBAErC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AAGH,eAAO,MAAM,yBAAyB;;;;;iBAKpC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;iBAShC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AAGH,eAAO,MAAM,yBAAyB;;;;;;;;;iBASpC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC;AAGH,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC"}
1
+ {"version":3,"file":"workspaces.schema.d.ts","sourceRoot":"","sources":["../../src/workspaces.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,eAAe;;;;;;;;;;iBAU1B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;iBAEnC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;iBAErC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;iBAGrC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AAGH,eAAO,MAAM,yBAAyB;;;;;iBAKpC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;iBAShC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;iBAElC,CAAC;AAGH,eAAO,MAAM,yBAAyB;;;;;;;;;iBASpC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC;AAGH,eAAO,MAAM,oBAAoB;;iBAE/B,CAAC;AAGH,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middlewr/contracts",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "type": "module",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
package/src/index.ts CHANGED
@@ -51,6 +51,7 @@ import {
51
51
  WorkspaceMemberSchema,
52
52
  WorkspaceRoleSchema,
53
53
  WorkspaceSchema,
54
+ WorkspaceStatsSchema,
54
55
  WorkspaceWithCountSchema,
55
56
  } from './workspaces.schema';
56
57
 
@@ -141,6 +142,11 @@ export const workspacesContract = {
141
142
  .input(WorkspaceIdParamSchema.merge(TransferOwnershipInputSchema))
142
143
  .output(z.void()),
143
144
 
145
+ stats: oc
146
+ .route({ method: 'GET', path: '/api/workspaces/{workspace_id}/stats' })
147
+ .input(WorkspaceIdParamSchema)
148
+ .output(WorkspaceStatsSchema),
149
+
144
150
  // Roles
145
151
  listRoles: oc
146
152
  .route({ method: 'GET', path: '/api/workspaces/{workspace_id}/roles' })
@@ -226,6 +232,16 @@ export const linksContract = {
226
232
  .input(LinkIdParamSchema)
227
233
  .output(z.object({ synced: z.boolean() })),
228
234
 
235
+ uploadLogo: oc
236
+ .route({ method: 'POST', path: '/api/workspaces/{workspace_id}/links/{link_id}/logo' })
237
+ .input(LinkIdParamSchema.merge(z.object({ file: z.file().mime(['image/png', 'image/jpeg', 'image/svg+xml', 'image/webp']) })))
238
+ .output(LinkSchema),
239
+
240
+ deleteLogo: oc
241
+ .route({ method: 'DELETE', path: '/api/workspaces/{workspace_id}/links/{link_id}/logo' })
242
+ .input(LinkIdParamSchema)
243
+ .output(LinkSchema),
244
+
229
245
  getJob: oc
230
246
  .route({ method: 'GET', path: '/api/workspaces/{workspace_id}/jobs/{job_id}' })
231
247
  .input(LinkJobIdParamSchema)
@@ -44,6 +44,7 @@ export const LinkSchema = z.object({
44
44
  created_at: z.coerce.date(),
45
45
  updated_at: z.coerce.date().nullable(),
46
46
  qr_code_settings: QrCodeSettingsSchema.nullable(),
47
+ qr_logo_key: z.string().nullable(),
47
48
  link_type: z.enum(['redirect', 'rules']).default('redirect'),
48
49
  rule_graph: RuleGraphSchema.optional(),
49
50
  tags: z.array(TagSchema),
@@ -69,6 +69,11 @@ export const CreateInvitationInputSchema = z.object({
69
69
  permissions: z.number().int().min(1),
70
70
  });
71
71
 
72
+ // Workspace stats schemas
73
+ export const WorkspaceStatsSchema = z.object({
74
+ links_count: z.number().int(),
75
+ });
76
+
72
77
  // Role schemas
73
78
  export const WorkspaceRoleSchema = z.object({
74
79
  name: z.string(),