@middlewr/contracts 0.0.26 → 0.0.27
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.
- package/dist/cjs/index.d.ts +54 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +24 -1
- package/dist/cjs/links.schema.d.ts +22 -0
- package/dist/cjs/links.schema.d.ts.map +1 -1
- package/dist/esm/index.d.ts +54 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +22 -1
- package/dist/esm/links.schema.d.ts +22 -0
- package/dist/esm/links.schema.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +19 -1
- package/src/links.schema.ts +19 -0
package/dist/cjs/index.d.ts
CHANGED
|
@@ -712,6 +712,33 @@ export declare const linksContract: {
|
|
|
712
712
|
}, z.core.$strip>, z.ZodObject<{
|
|
713
713
|
synced: z.ZodBoolean;
|
|
714
714
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
715
|
+
getJob: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
716
|
+
workspace_id: z.ZodString;
|
|
717
|
+
job_id: z.ZodString;
|
|
718
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
719
|
+
id: z.ZodString;
|
|
720
|
+
workspace_id: z.ZodString;
|
|
721
|
+
type: z.ZodString;
|
|
722
|
+
status: z.ZodEnum<{
|
|
723
|
+
pending: "pending";
|
|
724
|
+
processing: "processing";
|
|
725
|
+
completed: "completed";
|
|
726
|
+
failed: "failed";
|
|
727
|
+
}>;
|
|
728
|
+
total_rows: z.ZodNumber;
|
|
729
|
+
succeeded_count: z.ZodNumber;
|
|
730
|
+
failed_count: z.ZodNumber;
|
|
731
|
+
error: z.ZodNullable<z.ZodString>;
|
|
732
|
+
created_by_id: z.ZodString;
|
|
733
|
+
created_at: z.ZodDate;
|
|
734
|
+
completed_at: z.ZodNullable<z.ZodDate>;
|
|
735
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
736
|
+
jobResults: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
737
|
+
workspace_id: z.ZodString;
|
|
738
|
+
job_id: z.ZodString;
|
|
739
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
740
|
+
url: z.ZodString;
|
|
741
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
715
742
|
};
|
|
716
743
|
export declare const tagsContract: {
|
|
717
744
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
@@ -1610,6 +1637,33 @@ export declare const contract: {
|
|
|
1610
1637
|
}, z.core.$strip>, z.ZodObject<{
|
|
1611
1638
|
synced: z.ZodBoolean;
|
|
1612
1639
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1640
|
+
getJob: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1641
|
+
workspace_id: z.ZodString;
|
|
1642
|
+
job_id: z.ZodString;
|
|
1643
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1644
|
+
id: z.ZodString;
|
|
1645
|
+
workspace_id: z.ZodString;
|
|
1646
|
+
type: z.ZodString;
|
|
1647
|
+
status: z.ZodEnum<{
|
|
1648
|
+
pending: "pending";
|
|
1649
|
+
processing: "processing";
|
|
1650
|
+
completed: "completed";
|
|
1651
|
+
failed: "failed";
|
|
1652
|
+
}>;
|
|
1653
|
+
total_rows: z.ZodNumber;
|
|
1654
|
+
succeeded_count: z.ZodNumber;
|
|
1655
|
+
failed_count: z.ZodNumber;
|
|
1656
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1657
|
+
created_by_id: z.ZodString;
|
|
1658
|
+
created_at: z.ZodDate;
|
|
1659
|
+
completed_at: z.ZodNullable<z.ZodDate>;
|
|
1660
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1661
|
+
jobResults: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1662
|
+
workspace_id: z.ZodString;
|
|
1663
|
+
job_id: z.ZodString;
|
|
1664
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1665
|
+
url: z.ZodString;
|
|
1666
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1613
1667
|
};
|
|
1614
1668
|
tags: {
|
|
1615
1669
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -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;
|
|
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;AAwCxB,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,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,CAA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index_exports, {
|
|
|
43
43
|
LinkAnalyticsQuerySchema: () => LinkAnalyticsQuerySchema,
|
|
44
44
|
LinkFiltersSchema: () => LinkFiltersSchema,
|
|
45
45
|
LinkIdParamSchema: () => LinkIdParamSchema,
|
|
46
|
+
LinkJobIdParamSchema: () => LinkJobIdParamSchema,
|
|
47
|
+
LinkJobSchema: () => LinkJobSchema,
|
|
46
48
|
LinkSchema: () => LinkSchema,
|
|
47
49
|
MemberIdParamSchema: () => MemberIdParamSchema,
|
|
48
50
|
PaginatedLinksSchema: () => PaginatedLinksSchema,
|
|
@@ -351,6 +353,23 @@ var PaginatedLinksSchema = import_zod7.z.object({
|
|
|
351
353
|
per_page: import_zod7.z.number().int(),
|
|
352
354
|
total_pages: import_zod7.z.number().int()
|
|
353
355
|
});
|
|
356
|
+
var LinkJobSchema = import_zod7.z.object({
|
|
357
|
+
id: import_zod7.z.string().uuid(),
|
|
358
|
+
workspace_id: import_zod7.z.string().uuid(),
|
|
359
|
+
type: import_zod7.z.string(),
|
|
360
|
+
status: import_zod7.z.enum(["pending", "processing", "completed", "failed"]),
|
|
361
|
+
total_rows: import_zod7.z.number().int(),
|
|
362
|
+
succeeded_count: import_zod7.z.number().int(),
|
|
363
|
+
failed_count: import_zod7.z.number().int(),
|
|
364
|
+
error: import_zod7.z.string().nullable(),
|
|
365
|
+
created_by_id: import_zod7.z.string().uuid(),
|
|
366
|
+
created_at: import_zod7.z.date(),
|
|
367
|
+
completed_at: import_zod7.z.date().nullable()
|
|
368
|
+
});
|
|
369
|
+
var LinkJobIdParamSchema = import_zod7.z.object({
|
|
370
|
+
workspace_id: import_zod7.z.string().uuid(),
|
|
371
|
+
job_id: import_zod7.z.string().uuid()
|
|
372
|
+
});
|
|
354
373
|
|
|
355
374
|
// src/users.schema.ts
|
|
356
375
|
var import_zod8 = require("zod");
|
|
@@ -482,7 +501,9 @@ var linksContract = {
|
|
|
482
501
|
update: import_contract.oc.route({ method: "PATCH", path: "/api/workspaces/{workspace_id}/links/{link_id}" }).input(LinkIdParamSchema.merge(UpdateLinkInputSchema)).output(LinkSchema),
|
|
483
502
|
delete: import_contract.oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}/links/{link_id}" }).input(LinkIdParamSchema).output(import_zod10.z.void()),
|
|
484
503
|
edgeSync: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/links/{link_id}/edge/sync" }).input(LinkIdParamSchema).output(import_zod10.z.void()),
|
|
485
|
-
edgeStatus: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/links/{link_id}/edge/status" }).input(LinkIdParamSchema).output(import_zod10.z.object({ synced: import_zod10.z.boolean() }))
|
|
504
|
+
edgeStatus: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/links/{link_id}/edge/status" }).input(LinkIdParamSchema).output(import_zod10.z.object({ synced: import_zod10.z.boolean() })),
|
|
505
|
+
getJob: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/jobs/{job_id}" }).input(LinkJobIdParamSchema).output(LinkJobSchema),
|
|
506
|
+
jobResults: import_contract.oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/jobs/{job_id}/results" }).input(LinkJobIdParamSchema).output(import_zod10.z.object({ url: import_zod10.z.string() }))
|
|
486
507
|
};
|
|
487
508
|
var tagsContract = {
|
|
488
509
|
create: import_contract.oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/tags" }).input(WorkspaceIdParamSchema.merge(CreateTagInputSchema)).output(TagSchema),
|
|
@@ -540,6 +561,8 @@ var contract = {
|
|
|
540
561
|
LinkAnalyticsQuerySchema,
|
|
541
562
|
LinkFiltersSchema,
|
|
542
563
|
LinkIdParamSchema,
|
|
564
|
+
LinkJobIdParamSchema,
|
|
565
|
+
LinkJobSchema,
|
|
543
566
|
LinkSchema,
|
|
544
567
|
MemberIdParamSchema,
|
|
545
568
|
PaginatedLinksSchema,
|
|
@@ -266,4 +266,26 @@ export declare const PaginatedLinksSchema: z.ZodObject<{
|
|
|
266
266
|
per_page: z.ZodNumber;
|
|
267
267
|
total_pages: z.ZodNumber;
|
|
268
268
|
}, z.core.$strip>;
|
|
269
|
+
export declare const LinkJobSchema: z.ZodObject<{
|
|
270
|
+
id: z.ZodString;
|
|
271
|
+
workspace_id: z.ZodString;
|
|
272
|
+
type: z.ZodString;
|
|
273
|
+
status: z.ZodEnum<{
|
|
274
|
+
pending: "pending";
|
|
275
|
+
processing: "processing";
|
|
276
|
+
completed: "completed";
|
|
277
|
+
failed: "failed";
|
|
278
|
+
}>;
|
|
279
|
+
total_rows: z.ZodNumber;
|
|
280
|
+
succeeded_count: z.ZodNumber;
|
|
281
|
+
failed_count: z.ZodNumber;
|
|
282
|
+
error: z.ZodNullable<z.ZodString>;
|
|
283
|
+
created_by_id: z.ZodString;
|
|
284
|
+
created_at: z.ZodDate;
|
|
285
|
+
completed_at: z.ZodNullable<z.ZodDate>;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
export declare const LinkJobIdParamSchema: z.ZodObject<{
|
|
288
|
+
workspace_id: z.ZodString;
|
|
289
|
+
job_id: z.ZodString;
|
|
290
|
+
}, z.core.$strip>;
|
|
269
291
|
//# sourceMappingURL=links.schema.d.ts.map
|
|
@@ -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;AAQxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;iBAU/B,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BrB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BhC,CAAC;AAMH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe5B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM/B,CAAC"}
|
|
1
|
+
{"version":3,"file":"links.schema.d.ts","sourceRoot":"","sources":["../../src/links.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;iBAU/B,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BrB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BhC,CAAC;AAMH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe5B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM/B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;iBAYxB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -712,6 +712,33 @@ export declare const linksContract: {
|
|
|
712
712
|
}, z.core.$strip>, z.ZodObject<{
|
|
713
713
|
synced: z.ZodBoolean;
|
|
714
714
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
715
|
+
getJob: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
716
|
+
workspace_id: z.ZodString;
|
|
717
|
+
job_id: z.ZodString;
|
|
718
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
719
|
+
id: z.ZodString;
|
|
720
|
+
workspace_id: z.ZodString;
|
|
721
|
+
type: z.ZodString;
|
|
722
|
+
status: z.ZodEnum<{
|
|
723
|
+
pending: "pending";
|
|
724
|
+
processing: "processing";
|
|
725
|
+
completed: "completed";
|
|
726
|
+
failed: "failed";
|
|
727
|
+
}>;
|
|
728
|
+
total_rows: z.ZodNumber;
|
|
729
|
+
succeeded_count: z.ZodNumber;
|
|
730
|
+
failed_count: z.ZodNumber;
|
|
731
|
+
error: z.ZodNullable<z.ZodString>;
|
|
732
|
+
created_by_id: z.ZodString;
|
|
733
|
+
created_at: z.ZodDate;
|
|
734
|
+
completed_at: z.ZodNullable<z.ZodDate>;
|
|
735
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
736
|
+
jobResults: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
737
|
+
workspace_id: z.ZodString;
|
|
738
|
+
job_id: z.ZodString;
|
|
739
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
740
|
+
url: z.ZodString;
|
|
741
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
715
742
|
};
|
|
716
743
|
export declare const tagsContract: {
|
|
717
744
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
@@ -1610,6 +1637,33 @@ export declare const contract: {
|
|
|
1610
1637
|
}, z.core.$strip>, z.ZodObject<{
|
|
1611
1638
|
synced: z.ZodBoolean;
|
|
1612
1639
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1640
|
+
getJob: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1641
|
+
workspace_id: z.ZodString;
|
|
1642
|
+
job_id: z.ZodString;
|
|
1643
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1644
|
+
id: z.ZodString;
|
|
1645
|
+
workspace_id: z.ZodString;
|
|
1646
|
+
type: z.ZodString;
|
|
1647
|
+
status: z.ZodEnum<{
|
|
1648
|
+
pending: "pending";
|
|
1649
|
+
processing: "processing";
|
|
1650
|
+
completed: "completed";
|
|
1651
|
+
failed: "failed";
|
|
1652
|
+
}>;
|
|
1653
|
+
total_rows: z.ZodNumber;
|
|
1654
|
+
succeeded_count: z.ZodNumber;
|
|
1655
|
+
failed_count: z.ZodNumber;
|
|
1656
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1657
|
+
created_by_id: z.ZodString;
|
|
1658
|
+
created_at: z.ZodDate;
|
|
1659
|
+
completed_at: z.ZodNullable<z.ZodDate>;
|
|
1660
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1661
|
+
jobResults: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
1662
|
+
workspace_id: z.ZodString;
|
|
1663
|
+
job_id: z.ZodString;
|
|
1664
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1665
|
+
url: z.ZodString;
|
|
1666
|
+
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
1613
1667
|
};
|
|
1614
1668
|
tags: {
|
|
1615
1669
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;A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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUpB,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
|
@@ -270,6 +270,23 @@ var PaginatedLinksSchema = z7.object({
|
|
|
270
270
|
per_page: z7.number().int(),
|
|
271
271
|
total_pages: z7.number().int()
|
|
272
272
|
});
|
|
273
|
+
var LinkJobSchema = z7.object({
|
|
274
|
+
id: z7.string().uuid(),
|
|
275
|
+
workspace_id: z7.string().uuid(),
|
|
276
|
+
type: z7.string(),
|
|
277
|
+
status: z7.enum(["pending", "processing", "completed", "failed"]),
|
|
278
|
+
total_rows: z7.number().int(),
|
|
279
|
+
succeeded_count: z7.number().int(),
|
|
280
|
+
failed_count: z7.number().int(),
|
|
281
|
+
error: z7.string().nullable(),
|
|
282
|
+
created_by_id: z7.string().uuid(),
|
|
283
|
+
created_at: z7.date(),
|
|
284
|
+
completed_at: z7.date().nullable()
|
|
285
|
+
});
|
|
286
|
+
var LinkJobIdParamSchema = z7.object({
|
|
287
|
+
workspace_id: z7.string().uuid(),
|
|
288
|
+
job_id: z7.string().uuid()
|
|
289
|
+
});
|
|
273
290
|
|
|
274
291
|
// src/users.schema.ts
|
|
275
292
|
import { z as z8 } from "zod";
|
|
@@ -401,7 +418,9 @@ var linksContract = {
|
|
|
401
418
|
update: oc.route({ method: "PATCH", path: "/api/workspaces/{workspace_id}/links/{link_id}" }).input(LinkIdParamSchema.merge(UpdateLinkInputSchema)).output(LinkSchema),
|
|
402
419
|
delete: oc.route({ method: "DELETE", path: "/api/workspaces/{workspace_id}/links/{link_id}" }).input(LinkIdParamSchema).output(z10.void()),
|
|
403
420
|
edgeSync: oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/links/{link_id}/edge/sync" }).input(LinkIdParamSchema).output(z10.void()),
|
|
404
|
-
edgeStatus: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/links/{link_id}/edge/status" }).input(LinkIdParamSchema).output(z10.object({ synced: z10.boolean() }))
|
|
421
|
+
edgeStatus: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/links/{link_id}/edge/status" }).input(LinkIdParamSchema).output(z10.object({ synced: z10.boolean() })),
|
|
422
|
+
getJob: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/jobs/{job_id}" }).input(LinkJobIdParamSchema).output(LinkJobSchema),
|
|
423
|
+
jobResults: oc.route({ method: "GET", path: "/api/workspaces/{workspace_id}/jobs/{job_id}/results" }).input(LinkJobIdParamSchema).output(z10.object({ url: z10.string() }))
|
|
405
424
|
};
|
|
406
425
|
var tagsContract = {
|
|
407
426
|
create: oc.route({ method: "POST", path: "/api/workspaces/{workspace_id}/tags" }).input(WorkspaceIdParamSchema.merge(CreateTagInputSchema)).output(TagSchema),
|
|
@@ -458,6 +477,8 @@ export {
|
|
|
458
477
|
LinkAnalyticsQuerySchema,
|
|
459
478
|
LinkFiltersSchema,
|
|
460
479
|
LinkIdParamSchema,
|
|
480
|
+
LinkJobIdParamSchema,
|
|
481
|
+
LinkJobSchema,
|
|
461
482
|
LinkSchema,
|
|
462
483
|
MemberIdParamSchema,
|
|
463
484
|
PaginatedLinksSchema,
|
|
@@ -266,4 +266,26 @@ export declare const PaginatedLinksSchema: z.ZodObject<{
|
|
|
266
266
|
per_page: z.ZodNumber;
|
|
267
267
|
total_pages: z.ZodNumber;
|
|
268
268
|
}, z.core.$strip>;
|
|
269
|
+
export declare const LinkJobSchema: z.ZodObject<{
|
|
270
|
+
id: z.ZodString;
|
|
271
|
+
workspace_id: z.ZodString;
|
|
272
|
+
type: z.ZodString;
|
|
273
|
+
status: z.ZodEnum<{
|
|
274
|
+
pending: "pending";
|
|
275
|
+
processing: "processing";
|
|
276
|
+
completed: "completed";
|
|
277
|
+
failed: "failed";
|
|
278
|
+
}>;
|
|
279
|
+
total_rows: z.ZodNumber;
|
|
280
|
+
succeeded_count: z.ZodNumber;
|
|
281
|
+
failed_count: z.ZodNumber;
|
|
282
|
+
error: z.ZodNullable<z.ZodString>;
|
|
283
|
+
created_by_id: z.ZodString;
|
|
284
|
+
created_at: z.ZodDate;
|
|
285
|
+
completed_at: z.ZodNullable<z.ZodDate>;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
export declare const LinkJobIdParamSchema: z.ZodObject<{
|
|
288
|
+
workspace_id: z.ZodString;
|
|
289
|
+
job_id: z.ZodString;
|
|
290
|
+
}, z.core.$strip>;
|
|
269
291
|
//# sourceMappingURL=links.schema.d.ts.map
|
|
@@ -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;AAQxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;iBAU/B,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BrB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BhC,CAAC;AAMH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe5B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM/B,CAAC"}
|
|
1
|
+
{"version":3,"file":"links.schema.d.ts","sourceRoot":"","sources":["../../src/links.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;iBAU/B,CAAC;AAEH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BrB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0BhC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2BhC,CAAC;AAMH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAe5B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAM/B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;iBAYxB,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;iBAG/B,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -16,7 +16,15 @@ import {
|
|
|
16
16
|
WorkspaceIdParamSchema,
|
|
17
17
|
} from './common.schema';
|
|
18
18
|
import { CreateDomainInputSchema, DomainSchema, UpdateDomainInputSchema } from './domains.schema';
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
CreateLinkInputSchema,
|
|
21
|
+
LinkFiltersSchema,
|
|
22
|
+
LinkJobIdParamSchema,
|
|
23
|
+
LinkJobSchema,
|
|
24
|
+
LinkSchema,
|
|
25
|
+
PaginatedLinksSchema,
|
|
26
|
+
UpdateLinkInputSchema,
|
|
27
|
+
} from './links.schema';
|
|
20
28
|
import { CreateTagInputSchema, TagSchema, UpdateTagInputSchema } from './tags.schema';
|
|
21
29
|
import { SignInInputSchema, UpdateUserInputSchema, UserSchema } from './users.schema';
|
|
22
30
|
import {
|
|
@@ -179,6 +187,16 @@ export const linksContract = {
|
|
|
179
187
|
.route({ method: 'GET', path: '/api/workspaces/{workspace_id}/links/{link_id}/edge/status' })
|
|
180
188
|
.input(LinkIdParamSchema)
|
|
181
189
|
.output(z.object({ synced: z.boolean() })),
|
|
190
|
+
|
|
191
|
+
getJob: oc
|
|
192
|
+
.route({ method: 'GET', path: '/api/workspaces/{workspace_id}/jobs/{job_id}' })
|
|
193
|
+
.input(LinkJobIdParamSchema)
|
|
194
|
+
.output(LinkJobSchema),
|
|
195
|
+
|
|
196
|
+
jobResults: oc
|
|
197
|
+
.route({ method: 'GET', path: '/api/workspaces/{workspace_id}/jobs/{job_id}/results' })
|
|
198
|
+
.input(LinkJobIdParamSchema)
|
|
199
|
+
.output(z.object({ url: z.string() })),
|
|
182
200
|
};
|
|
183
201
|
|
|
184
202
|
// Tags contract
|
package/src/links.schema.ts
CHANGED
|
@@ -131,3 +131,22 @@ export const PaginatedLinksSchema = z.object({
|
|
|
131
131
|
per_page: z.number().int(),
|
|
132
132
|
total_pages: z.number().int(),
|
|
133
133
|
});
|
|
134
|
+
|
|
135
|
+
export const LinkJobSchema = z.object({
|
|
136
|
+
id: z.string().uuid(),
|
|
137
|
+
workspace_id: z.string().uuid(),
|
|
138
|
+
type: z.string(),
|
|
139
|
+
status: z.enum(['pending', 'processing', 'completed', 'failed']),
|
|
140
|
+
total_rows: z.number().int(),
|
|
141
|
+
succeeded_count: z.number().int(),
|
|
142
|
+
failed_count: z.number().int(),
|
|
143
|
+
error: z.string().nullable(),
|
|
144
|
+
created_by_id: z.string().uuid(),
|
|
145
|
+
created_at: z.date(),
|
|
146
|
+
completed_at: z.date().nullable(),
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
export const LinkJobIdParamSchema = z.object({
|
|
150
|
+
workspace_id: z.string().uuid(),
|
|
151
|
+
job_id: z.string().uuid(),
|
|
152
|
+
});
|