@deepintel-ltd/farmpro-contracts 1.5.8 → 1.5.10

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 (57) hide show
  1. package/dist/index.js +50 -92
  2. package/dist/routes/admin.routes.js +13 -16
  3. package/dist/routes/agent-workflows.routes.js +81 -84
  4. package/dist/routes/agents.routes.js +29 -32
  5. package/dist/routes/analytics.routes.js +11 -14
  6. package/dist/routes/auth.routes.js +55 -58
  7. package/dist/routes/categories.routes.js +23 -26
  8. package/dist/routes/documents.routes.js +67 -70
  9. package/dist/routes/equipment.routes.js +55 -58
  10. package/dist/routes/farms.routes.js +32 -35
  11. package/dist/routes/field-monitoring.routes.d.ts +8 -1
  12. package/dist/routes/field-monitoring.routes.d.ts.map +1 -1
  13. package/dist/routes/field-monitoring.routes.js +77 -74
  14. package/dist/routes/field-observations.routes.js +41 -44
  15. package/dist/routes/fields.routes.js +44 -47
  16. package/dist/routes/finance.routes.js +121 -124
  17. package/dist/routes/harvest.routes.js +46 -49
  18. package/dist/routes/health.routes.js +6 -9
  19. package/dist/routes/index.js +51 -54
  20. package/dist/routes/input-usage.routes.js +14 -17
  21. package/dist/routes/inventory.routes.js +57 -60
  22. package/dist/routes/seasonal-plans.routes.js +14 -17
  23. package/dist/routes/soil-tests.routes.js +45 -48
  24. package/dist/routes/suppliers.routes.js +70 -73
  25. package/dist/routes/tasks.routes.js +65 -68
  26. package/dist/routes/team.routes.d.ts +306 -0
  27. package/dist/routes/team.routes.d.ts.map +1 -1
  28. package/dist/routes/team.routes.js +79 -60
  29. package/dist/routes/users.routes.js +13 -16
  30. package/dist/routes/weather.routes.js +10 -13
  31. package/dist/schemas/admin.schemas.js +43 -46
  32. package/dist/schemas/agent-workflows.schemas.js +34 -37
  33. package/dist/schemas/agents.schemas.js +46 -49
  34. package/dist/schemas/analytics.schemas.js +51 -54
  35. package/dist/schemas/auth.schemas.js +96 -99
  36. package/dist/schemas/categories.schemas.js +27 -30
  37. package/dist/schemas/common.schemas.js +89 -95
  38. package/dist/schemas/documents.schemas.js +59 -62
  39. package/dist/schemas/equipment.schemas.js +86 -89
  40. package/dist/schemas/farms.schemas.js +40 -43
  41. package/dist/schemas/field-monitoring.schemas.js +207 -210
  42. package/dist/schemas/field-observations.schemas.js +93 -96
  43. package/dist/schemas/fields.schemas.js +82 -85
  44. package/dist/schemas/finance.schemas.js +134 -137
  45. package/dist/schemas/harvest.schemas.js +46 -49
  46. package/dist/schemas/health.schemas.js +14 -17
  47. package/dist/schemas/input-usage.schemas.js +21 -24
  48. package/dist/schemas/inventory.schemas.js +58 -61
  49. package/dist/schemas/recommendations.schemas.js +22 -25
  50. package/dist/schemas/seasonal-plans.schemas.js +21 -24
  51. package/dist/schemas/soil-tests.schemas.js +70 -73
  52. package/dist/schemas/suppliers.schemas.js +90 -93
  53. package/dist/schemas/tasks.schemas.js +93 -96
  54. package/dist/schemas/team.schemas.js +35 -38
  55. package/dist/schemas/users.schemas.js +19 -22
  56. package/dist/schemas/weather.schemas.js +32 -35
  57. package/package.json +9 -1
@@ -2549,5 +2549,311 @@ export declare const teamRouter: {
2549
2549
  }>;
2550
2550
  };
2551
2551
  };
2552
+ resendInvitation: {
2553
+ pathParams: z.ZodObject<{
2554
+ farmId: z.ZodString;
2555
+ id: z.ZodString;
2556
+ }, "strip", z.ZodTypeAny, {
2557
+ id: string;
2558
+ farmId: string;
2559
+ }, {
2560
+ id: string;
2561
+ farmId: string;
2562
+ }>;
2563
+ summary: "Resend team invitation";
2564
+ description: "Resend invitation email to a team member who has not yet accepted";
2565
+ method: "POST";
2566
+ body: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
2567
+ path: "/farms/:farmId/team/:id/resend-invitation";
2568
+ responses: {
2569
+ 200: z.ZodObject<{} & {
2570
+ meta: z.ZodObject<{
2571
+ message: z.ZodString;
2572
+ }, "strip", z.ZodTypeAny, {
2573
+ message: string;
2574
+ }, {
2575
+ message: string;
2576
+ }>;
2577
+ }, "strip", z.ZodTypeAny, {
2578
+ meta: {
2579
+ message: string;
2580
+ };
2581
+ }, {
2582
+ meta: {
2583
+ message: string;
2584
+ };
2585
+ }>;
2586
+ 400: z.ZodObject<{
2587
+ errors: z.ZodArray<z.ZodObject<{
2588
+ id: z.ZodOptional<z.ZodString>;
2589
+ links: z.ZodOptional<z.ZodObject<{
2590
+ about: z.ZodOptional<z.ZodString>;
2591
+ }, "strip", z.ZodTypeAny, {
2592
+ about?: string | undefined;
2593
+ }, {
2594
+ about?: string | undefined;
2595
+ }>>;
2596
+ status: z.ZodOptional<z.ZodString>;
2597
+ code: z.ZodOptional<z.ZodString>;
2598
+ title: z.ZodOptional<z.ZodString>;
2599
+ detail: z.ZodOptional<z.ZodString>;
2600
+ source: z.ZodOptional<z.ZodObject<{
2601
+ pointer: z.ZodOptional<z.ZodString>;
2602
+ parameter: z.ZodOptional<z.ZodString>;
2603
+ }, "strip", z.ZodTypeAny, {
2604
+ pointer?: string | undefined;
2605
+ parameter?: string | undefined;
2606
+ }, {
2607
+ pointer?: string | undefined;
2608
+ parameter?: string | undefined;
2609
+ }>>;
2610
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2611
+ }, "strip", z.ZodTypeAny, {
2612
+ status?: string | undefined;
2613
+ code?: string | undefined;
2614
+ id?: string | undefined;
2615
+ links?: {
2616
+ about?: string | undefined;
2617
+ } | undefined;
2618
+ meta?: Record<string, unknown> | undefined;
2619
+ title?: string | undefined;
2620
+ detail?: string | undefined;
2621
+ source?: {
2622
+ pointer?: string | undefined;
2623
+ parameter?: string | undefined;
2624
+ } | undefined;
2625
+ }, {
2626
+ status?: string | undefined;
2627
+ code?: string | undefined;
2628
+ id?: string | undefined;
2629
+ links?: {
2630
+ about?: string | undefined;
2631
+ } | undefined;
2632
+ meta?: Record<string, unknown> | undefined;
2633
+ title?: string | undefined;
2634
+ detail?: string | undefined;
2635
+ source?: {
2636
+ pointer?: string | undefined;
2637
+ parameter?: string | undefined;
2638
+ } | undefined;
2639
+ }>, "many">;
2640
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2641
+ }, "strip", z.ZodTypeAny, {
2642
+ errors: {
2643
+ status?: string | undefined;
2644
+ code?: string | undefined;
2645
+ id?: string | undefined;
2646
+ links?: {
2647
+ about?: string | undefined;
2648
+ } | undefined;
2649
+ meta?: Record<string, unknown> | undefined;
2650
+ title?: string | undefined;
2651
+ detail?: string | undefined;
2652
+ source?: {
2653
+ pointer?: string | undefined;
2654
+ parameter?: string | undefined;
2655
+ } | undefined;
2656
+ }[];
2657
+ meta?: Record<string, unknown> | undefined;
2658
+ }, {
2659
+ errors: {
2660
+ status?: string | undefined;
2661
+ code?: string | undefined;
2662
+ id?: string | undefined;
2663
+ links?: {
2664
+ about?: string | undefined;
2665
+ } | undefined;
2666
+ meta?: Record<string, unknown> | undefined;
2667
+ title?: string | undefined;
2668
+ detail?: string | undefined;
2669
+ source?: {
2670
+ pointer?: string | undefined;
2671
+ parameter?: string | undefined;
2672
+ } | undefined;
2673
+ }[];
2674
+ meta?: Record<string, unknown> | undefined;
2675
+ }>;
2676
+ 404: z.ZodObject<{
2677
+ errors: z.ZodArray<z.ZodObject<{
2678
+ id: z.ZodOptional<z.ZodString>;
2679
+ links: z.ZodOptional<z.ZodObject<{
2680
+ about: z.ZodOptional<z.ZodString>;
2681
+ }, "strip", z.ZodTypeAny, {
2682
+ about?: string | undefined;
2683
+ }, {
2684
+ about?: string | undefined;
2685
+ }>>;
2686
+ status: z.ZodOptional<z.ZodString>;
2687
+ code: z.ZodOptional<z.ZodString>;
2688
+ title: z.ZodOptional<z.ZodString>;
2689
+ detail: z.ZodOptional<z.ZodString>;
2690
+ source: z.ZodOptional<z.ZodObject<{
2691
+ pointer: z.ZodOptional<z.ZodString>;
2692
+ parameter: z.ZodOptional<z.ZodString>;
2693
+ }, "strip", z.ZodTypeAny, {
2694
+ pointer?: string | undefined;
2695
+ parameter?: string | undefined;
2696
+ }, {
2697
+ pointer?: string | undefined;
2698
+ parameter?: string | undefined;
2699
+ }>>;
2700
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2701
+ }, "strip", z.ZodTypeAny, {
2702
+ status?: string | undefined;
2703
+ code?: string | undefined;
2704
+ id?: string | undefined;
2705
+ links?: {
2706
+ about?: string | undefined;
2707
+ } | undefined;
2708
+ meta?: Record<string, unknown> | undefined;
2709
+ title?: string | undefined;
2710
+ detail?: string | undefined;
2711
+ source?: {
2712
+ pointer?: string | undefined;
2713
+ parameter?: string | undefined;
2714
+ } | undefined;
2715
+ }, {
2716
+ status?: string | undefined;
2717
+ code?: string | undefined;
2718
+ id?: string | undefined;
2719
+ links?: {
2720
+ about?: string | undefined;
2721
+ } | undefined;
2722
+ meta?: Record<string, unknown> | undefined;
2723
+ title?: string | undefined;
2724
+ detail?: string | undefined;
2725
+ source?: {
2726
+ pointer?: string | undefined;
2727
+ parameter?: string | undefined;
2728
+ } | undefined;
2729
+ }>, "many">;
2730
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2731
+ }, "strip", z.ZodTypeAny, {
2732
+ errors: {
2733
+ status?: string | undefined;
2734
+ code?: string | undefined;
2735
+ id?: string | undefined;
2736
+ links?: {
2737
+ about?: string | undefined;
2738
+ } | undefined;
2739
+ meta?: Record<string, unknown> | undefined;
2740
+ title?: string | undefined;
2741
+ detail?: string | undefined;
2742
+ source?: {
2743
+ pointer?: string | undefined;
2744
+ parameter?: string | undefined;
2745
+ } | undefined;
2746
+ }[];
2747
+ meta?: Record<string, unknown> | undefined;
2748
+ }, {
2749
+ errors: {
2750
+ status?: string | undefined;
2751
+ code?: string | undefined;
2752
+ id?: string | undefined;
2753
+ links?: {
2754
+ about?: string | undefined;
2755
+ } | undefined;
2756
+ meta?: Record<string, unknown> | undefined;
2757
+ title?: string | undefined;
2758
+ detail?: string | undefined;
2759
+ source?: {
2760
+ pointer?: string | undefined;
2761
+ parameter?: string | undefined;
2762
+ } | undefined;
2763
+ }[];
2764
+ meta?: Record<string, unknown> | undefined;
2765
+ }>;
2766
+ 401: z.ZodObject<{
2767
+ errors: z.ZodArray<z.ZodObject<{
2768
+ id: z.ZodOptional<z.ZodString>;
2769
+ links: z.ZodOptional<z.ZodObject<{
2770
+ about: z.ZodOptional<z.ZodString>;
2771
+ }, "strip", z.ZodTypeAny, {
2772
+ about?: string | undefined;
2773
+ }, {
2774
+ about?: string | undefined;
2775
+ }>>;
2776
+ status: z.ZodOptional<z.ZodString>;
2777
+ code: z.ZodOptional<z.ZodString>;
2778
+ title: z.ZodOptional<z.ZodString>;
2779
+ detail: z.ZodOptional<z.ZodString>;
2780
+ source: z.ZodOptional<z.ZodObject<{
2781
+ pointer: z.ZodOptional<z.ZodString>;
2782
+ parameter: z.ZodOptional<z.ZodString>;
2783
+ }, "strip", z.ZodTypeAny, {
2784
+ pointer?: string | undefined;
2785
+ parameter?: string | undefined;
2786
+ }, {
2787
+ pointer?: string | undefined;
2788
+ parameter?: string | undefined;
2789
+ }>>;
2790
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2791
+ }, "strip", z.ZodTypeAny, {
2792
+ status?: string | undefined;
2793
+ code?: string | undefined;
2794
+ id?: string | undefined;
2795
+ links?: {
2796
+ about?: string | undefined;
2797
+ } | undefined;
2798
+ meta?: Record<string, unknown> | undefined;
2799
+ title?: string | undefined;
2800
+ detail?: string | undefined;
2801
+ source?: {
2802
+ pointer?: string | undefined;
2803
+ parameter?: string | undefined;
2804
+ } | undefined;
2805
+ }, {
2806
+ status?: string | undefined;
2807
+ code?: string | undefined;
2808
+ id?: string | undefined;
2809
+ links?: {
2810
+ about?: string | undefined;
2811
+ } | undefined;
2812
+ meta?: Record<string, unknown> | undefined;
2813
+ title?: string | undefined;
2814
+ detail?: string | undefined;
2815
+ source?: {
2816
+ pointer?: string | undefined;
2817
+ parameter?: string | undefined;
2818
+ } | undefined;
2819
+ }>, "many">;
2820
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2821
+ }, "strip", z.ZodTypeAny, {
2822
+ errors: {
2823
+ status?: string | undefined;
2824
+ code?: string | undefined;
2825
+ id?: string | undefined;
2826
+ links?: {
2827
+ about?: string | undefined;
2828
+ } | undefined;
2829
+ meta?: Record<string, unknown> | undefined;
2830
+ title?: string | undefined;
2831
+ detail?: string | undefined;
2832
+ source?: {
2833
+ pointer?: string | undefined;
2834
+ parameter?: string | undefined;
2835
+ } | undefined;
2836
+ }[];
2837
+ meta?: Record<string, unknown> | undefined;
2838
+ }, {
2839
+ errors: {
2840
+ status?: string | undefined;
2841
+ code?: string | undefined;
2842
+ id?: string | undefined;
2843
+ links?: {
2844
+ about?: string | undefined;
2845
+ } | undefined;
2846
+ meta?: Record<string, unknown> | undefined;
2847
+ title?: string | undefined;
2848
+ detail?: string | undefined;
2849
+ source?: {
2850
+ pointer?: string | undefined;
2851
+ parameter?: string | undefined;
2852
+ } | undefined;
2853
+ }[];
2854
+ meta?: Record<string, unknown> | undefined;
2855
+ }>;
2856
+ };
2857
+ };
2552
2858
  };
2553
2859
  //# sourceMappingURL=team.routes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"team.routes.d.ts","sourceRoot":"","sources":["../../src/routes/team.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmJrB,CAAC"}
@@ -1,28 +1,25 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.teamRouter = void 0;
4
- const core_1 = require("@ts-rest/core");
5
- const zod_1 = require("zod");
6
- const team_schemas_1 = require("../schemas/team.schemas");
7
- const common_schemas_1 = require("../schemas/common.schemas");
8
- const c = (0, core_1.initContract)();
9
- exports.teamRouter = c.router({
1
+ import { initContract } from '@ts-rest/core';
2
+ import { z } from 'zod';
3
+ import { createTeamMemberSchema, updateTeamMemberSchema, teamMemberResponseSchema, teamMemberListResponseSchema, teamMemberRoleSchema, } from '../schemas/team.schemas';
4
+ import { jsonApiErrorResponseSchema, jsonApiSuccessResponseSchema, jsonApiPaginationQuerySchema, jsonApiSortQuerySchema, jsonApiIncludeQuerySchema, jsonApiFilterQuerySchema } from '../schemas/common.schemas';
5
+ const c = initContract();
6
+ export const teamRouter = c.router({
10
7
  // List team members for a farm
11
8
  listTeamMembers: {
12
9
  method: 'GET',
13
10
  path: '/farms/:farmId/team',
14
- pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
15
- query: common_schemas_1.jsonApiPaginationQuerySchema
16
- .merge(common_schemas_1.jsonApiSortQuerySchema)
17
- .merge(common_schemas_1.jsonApiIncludeQuerySchema)
18
- .merge(common_schemas_1.jsonApiFilterQuerySchema)
19
- .merge(zod_1.z.object({
20
- 'filter[role]': team_schemas_1.teamMemberRoleSchema.optional(),
11
+ pathParams: z.object({ farmId: z.string().uuid() }),
12
+ query: jsonApiPaginationQuerySchema
13
+ .merge(jsonApiSortQuerySchema)
14
+ .merge(jsonApiIncludeQuerySchema)
15
+ .merge(jsonApiFilterQuerySchema)
16
+ .merge(z.object({
17
+ 'filter[role]': teamMemberRoleSchema.optional(),
21
18
  })),
22
19
  responses: {
23
- 200: team_schemas_1.teamMemberListResponseSchema,
24
- 404: common_schemas_1.jsonApiErrorResponseSchema,
25
- 401: common_schemas_1.jsonApiErrorResponseSchema,
20
+ 200: teamMemberListResponseSchema,
21
+ 404: jsonApiErrorResponseSchema,
22
+ 401: jsonApiErrorResponseSchema,
26
23
  },
27
24
  summary: 'List team members',
28
25
  description: 'Get all team members for a farm with optional filtering',
@@ -31,14 +28,14 @@ exports.teamRouter = c.router({
31
28
  createTeamMember: {
32
29
  method: 'POST',
33
30
  path: '/farms/:farmId/team',
34
- pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
35
- body: zod_1.z.object({ data: team_schemas_1.createTeamMemberSchema }),
31
+ pathParams: z.object({ farmId: z.string().uuid() }),
32
+ body: z.object({ data: createTeamMemberSchema }),
36
33
  responses: {
37
- 201: team_schemas_1.teamMemberResponseSchema,
38
- 400: common_schemas_1.jsonApiErrorResponseSchema,
39
- 404: common_schemas_1.jsonApiErrorResponseSchema,
40
- 401: common_schemas_1.jsonApiErrorResponseSchema,
41
- 422: common_schemas_1.jsonApiErrorResponseSchema,
34
+ 201: teamMemberResponseSchema,
35
+ 400: jsonApiErrorResponseSchema,
36
+ 404: jsonApiErrorResponseSchema,
37
+ 401: jsonApiErrorResponseSchema,
38
+ 422: jsonApiErrorResponseSchema,
42
39
  },
43
40
  summary: 'Create team member',
44
41
  description: 'Add a new team member to the farm',
@@ -47,15 +44,15 @@ exports.teamRouter = c.router({
47
44
  getTeamMember: {
48
45
  method: 'GET',
49
46
  path: '/farms/:farmId/team/:id',
50
- pathParams: zod_1.z.object({
51
- farmId: zod_1.z.string().uuid(),
52
- id: zod_1.z.string().uuid(),
47
+ pathParams: z.object({
48
+ farmId: z.string().uuid(),
49
+ id: z.string().uuid(),
53
50
  }),
54
- query: common_schemas_1.jsonApiIncludeQuerySchema,
51
+ query: jsonApiIncludeQuerySchema,
55
52
  responses: {
56
- 200: team_schemas_1.teamMemberResponseSchema,
57
- 404: common_schemas_1.jsonApiErrorResponseSchema,
58
- 401: common_schemas_1.jsonApiErrorResponseSchema,
53
+ 200: teamMemberResponseSchema,
54
+ 404: jsonApiErrorResponseSchema,
55
+ 401: jsonApiErrorResponseSchema,
59
56
  },
60
57
  summary: 'Get team member by ID',
61
58
  description: 'Get detailed information about a team member',
@@ -64,17 +61,17 @@ exports.teamRouter = c.router({
64
61
  updateTeamMember: {
65
62
  method: 'PATCH',
66
63
  path: '/farms/:farmId/team/:id',
67
- pathParams: zod_1.z.object({
68
- farmId: zod_1.z.string().uuid(),
69
- id: zod_1.z.string().uuid(),
64
+ pathParams: z.object({
65
+ farmId: z.string().uuid(),
66
+ id: z.string().uuid(),
70
67
  }),
71
- body: zod_1.z.object({ data: team_schemas_1.updateTeamMemberSchema }),
68
+ body: z.object({ data: updateTeamMemberSchema }),
72
69
  responses: {
73
- 200: team_schemas_1.teamMemberResponseSchema,
74
- 400: common_schemas_1.jsonApiErrorResponseSchema,
75
- 404: common_schemas_1.jsonApiErrorResponseSchema,
76
- 401: common_schemas_1.jsonApiErrorResponseSchema,
77
- 422: common_schemas_1.jsonApiErrorResponseSchema,
70
+ 200: teamMemberResponseSchema,
71
+ 400: jsonApiErrorResponseSchema,
72
+ 404: jsonApiErrorResponseSchema,
73
+ 401: jsonApiErrorResponseSchema,
74
+ 422: jsonApiErrorResponseSchema,
78
75
  },
79
76
  summary: 'Update team member',
80
77
  description: 'Update team member information',
@@ -83,14 +80,14 @@ exports.teamRouter = c.router({
83
80
  deleteTeamMember: {
84
81
  method: 'DELETE',
85
82
  path: '/farms/:farmId/team/:id',
86
- pathParams: zod_1.z.object({
87
- farmId: zod_1.z.string().uuid(),
88
- id: zod_1.z.string().uuid(),
83
+ pathParams: z.object({
84
+ farmId: z.string().uuid(),
85
+ id: z.string().uuid(),
89
86
  }),
90
87
  responses: {
91
- 204: common_schemas_1.jsonApiSuccessResponseSchema,
92
- 404: common_schemas_1.jsonApiErrorResponseSchema,
93
- 401: common_schemas_1.jsonApiErrorResponseSchema,
88
+ 204: jsonApiSuccessResponseSchema,
89
+ 404: jsonApiErrorResponseSchema,
90
+ 401: jsonApiErrorResponseSchema,
94
91
  },
95
92
  summary: 'Delete team member',
96
93
  description: 'Remove a team member from the farm',
@@ -99,26 +96,48 @@ exports.teamRouter = c.router({
99
96
  acceptInvitation: {
100
97
  method: 'POST',
101
98
  path: '/team/invitations/accept',
102
- body: zod_1.z.object({
103
- data: zod_1.z.object({
104
- attributes: zod_1.z.object({
105
- token: zod_1.z.string().min(1),
99
+ body: z.object({
100
+ data: z.object({
101
+ attributes: z.object({
102
+ token: z.string().min(1),
106
103
  }),
107
104
  }),
108
105
  }),
109
106
  responses: {
110
- 200: common_schemas_1.jsonApiSuccessResponseSchema.merge(zod_1.z.object({
111
- meta: zod_1.z.object({
112
- message: zod_1.z.string(),
113
- farmId: zod_1.z.string().uuid(),
114
- memberId: zod_1.z.string().uuid(),
107
+ 200: jsonApiSuccessResponseSchema.merge(z.object({
108
+ meta: z.object({
109
+ message: z.string(),
110
+ farmId: z.string().uuid(),
111
+ memberId: z.string().uuid(),
115
112
  }),
116
113
  })),
117
- 400: common_schemas_1.jsonApiErrorResponseSchema,
118
- 401: common_schemas_1.jsonApiErrorResponseSchema,
119
- 404: common_schemas_1.jsonApiErrorResponseSchema,
114
+ 400: jsonApiErrorResponseSchema,
115
+ 401: jsonApiErrorResponseSchema,
116
+ 404: jsonApiErrorResponseSchema,
120
117
  },
121
118
  summary: 'Accept team invitation',
122
119
  description: 'Accept a team invitation by token and link to user account',
123
120
  },
121
+ // Resend team invitation
122
+ resendInvitation: {
123
+ method: 'POST',
124
+ path: '/farms/:farmId/team/:id/resend-invitation',
125
+ pathParams: z.object({
126
+ farmId: z.string().uuid(),
127
+ id: z.string().uuid(),
128
+ }),
129
+ body: z.object({}),
130
+ responses: {
131
+ 200: jsonApiSuccessResponseSchema.merge(z.object({
132
+ meta: z.object({
133
+ message: z.string(),
134
+ }),
135
+ })),
136
+ 400: jsonApiErrorResponseSchema,
137
+ 404: jsonApiErrorResponseSchema,
138
+ 401: jsonApiErrorResponseSchema,
139
+ },
140
+ summary: 'Resend team invitation',
141
+ description: 'Resend invitation email to a team member who has not yet accepted',
142
+ },
124
143
  });
@@ -1,19 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.usersRouter = void 0;
4
- const core_1 = require("@ts-rest/core");
5
- const zod_1 = require("zod");
6
- const users_schemas_1 = require("../schemas/users.schemas");
7
- const common_schemas_1 = require("../schemas/common.schemas");
8
- const c = (0, core_1.initContract)();
9
- exports.usersRouter = c.router({
1
+ import { initContract } from '@ts-rest/core';
2
+ import { z } from 'zod';
3
+ import { updateProfileSchema, userResponseSchema } from '../schemas/users.schemas';
4
+ import { jsonApiErrorResponseSchema } from '../schemas/common.schemas';
5
+ const c = initContract();
6
+ export const usersRouter = c.router({
10
7
  // Get current user profile
11
8
  getProfile: {
12
9
  method: 'GET',
13
10
  path: '/user/profile',
14
11
  responses: {
15
- 200: users_schemas_1.userResponseSchema,
16
- 401: common_schemas_1.jsonApiErrorResponseSchema,
12
+ 200: userResponseSchema,
13
+ 401: jsonApiErrorResponseSchema,
17
14
  },
18
15
  summary: 'Get current user profile',
19
16
  description: 'Get authenticated user profile information',
@@ -22,12 +19,12 @@ exports.usersRouter = c.router({
22
19
  updateProfile: {
23
20
  method: 'PATCH',
24
21
  path: '/user/profile',
25
- body: zod_1.z.object({ data: users_schemas_1.updateProfileSchema }),
22
+ body: z.object({ data: updateProfileSchema }),
26
23
  responses: {
27
- 200: users_schemas_1.userResponseSchema,
28
- 400: common_schemas_1.jsonApiErrorResponseSchema,
29
- 401: common_schemas_1.jsonApiErrorResponseSchema,
30
- 422: common_schemas_1.jsonApiErrorResponseSchema,
24
+ 200: userResponseSchema,
25
+ 400: jsonApiErrorResponseSchema,
26
+ 401: jsonApiErrorResponseSchema,
27
+ 422: jsonApiErrorResponseSchema,
31
28
  },
32
29
  summary: 'Update user profile',
33
30
  description: 'Update authenticated user profile information',
@@ -1,21 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.weatherRouter = void 0;
4
- const core_1 = require("@ts-rest/core");
5
- const zod_1 = require("zod");
6
- const weather_schemas_1 = require("../schemas/weather.schemas");
7
- const common_schemas_1 = require("../schemas/common.schemas");
8
- const c = (0, core_1.initContract)();
9
- exports.weatherRouter = c.router({
1
+ import { initContract } from '@ts-rest/core';
2
+ import { z } from 'zod';
3
+ import { weatherResponseSchema } from '../schemas/weather.schemas';
4
+ import { jsonApiErrorResponseSchema } from '../schemas/common.schemas';
5
+ const c = initContract();
6
+ export const weatherRouter = c.router({
10
7
  // Get weather for a farm
11
8
  getWeather: {
12
9
  method: 'GET',
13
10
  path: '/farms/:farmId/weather',
14
- pathParams: zod_1.z.object({ farmId: zod_1.z.string().uuid() }),
11
+ pathParams: z.object({ farmId: z.string().uuid() }),
15
12
  responses: {
16
- 200: weather_schemas_1.weatherResponseSchema,
17
- 404: common_schemas_1.jsonApiErrorResponseSchema,
18
- 401: common_schemas_1.jsonApiErrorResponseSchema,
13
+ 200: weatherResponseSchema,
14
+ 404: jsonApiErrorResponseSchema,
15
+ 401: jsonApiErrorResponseSchema,
19
16
  },
20
17
  summary: 'Get weather data',
21
18
  description: 'Get current weather, forecast, and alerts for a farm',