@agroshine/ags-web-http 1.12.6 → 1.13.1

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 (88) hide show
  1. package/dist/auth/index.cjs +1 -1
  2. package/dist/auth/index.d.cts +17 -9
  3. package/dist/auth/index.d.ts +17 -9
  4. package/dist/auth/index.js +1 -1
  5. package/dist/chunk-L3X36QYE.js +1 -0
  6. package/dist/chunk-SR3MULQZ.js +1 -0
  7. package/dist/chunk-WHWGZZOX.js +1 -0
  8. package/dist/crops/index.cjs +1 -1
  9. package/dist/crops/index.d.cts +7 -4
  10. package/dist/crops/index.d.ts +7 -4
  11. package/dist/crops/index.js +1 -1
  12. package/dist/{customer-CgeUUBHe.d.cts → customer.entities-C2iGl9KF.d.cts} +62 -62
  13. package/dist/{customer-CgeUUBHe.d.ts → customer.entities-C2iGl9KF.d.ts} +62 -62
  14. package/dist/customers/index.cjs +1 -1
  15. package/dist/customers/index.d.cts +51 -32
  16. package/dist/customers/index.d.ts +51 -32
  17. package/dist/customers/index.js +1 -1
  18. package/dist/group.interface-BbQHuhIW.d.cts +15 -0
  19. package/dist/group.interface-BbQHuhIW.d.ts +15 -0
  20. package/dist/groups/index.cjs +1 -1
  21. package/dist/groups/index.d.cts +8 -4
  22. package/dist/groups/index.d.ts +8 -4
  23. package/dist/groups/index.js +1 -1
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.d.cts +13 -12
  26. package/dist/index.d.ts +13 -12
  27. package/dist/index.js +1 -1
  28. package/dist/{indicator-BI8cP2F2.d.cts → indicator.entities-C-qukE1L.d.cts} +2 -0
  29. package/dist/{indicator-BI8cP2F2.d.ts → indicator.entities-C-qukE1L.d.ts} +2 -0
  30. package/dist/indicators/index.cjs +1 -1
  31. package/dist/indicators/index.d.cts +19 -9
  32. package/dist/indicators/index.d.ts +19 -9
  33. package/dist/indicators/index.js +1 -1
  34. package/dist/layer/index.cjs +1 -1
  35. package/dist/layer/index.d.cts +8 -7
  36. package/dist/layer/index.d.ts +8 -7
  37. package/dist/layer/index.js +1 -1
  38. package/dist/{layer-C4sBuqRI.d.cts → layer.entities-MszDgJAM.d.cts} +3 -1
  39. package/dist/{layer-C4sBuqRI.d.ts → layer.entities-MszDgJAM.d.ts} +3 -1
  40. package/dist/module.interface-B2SHWtNv.d.cts +8 -0
  41. package/dist/module.interface-B2SHWtNv.d.ts +8 -0
  42. package/dist/modules/index.cjs +1 -1
  43. package/dist/modules/index.d.cts +2 -2
  44. package/dist/modules/index.d.ts +2 -2
  45. package/dist/modules/index.js +1 -1
  46. package/dist/permissions/index.cjs +1 -1
  47. package/dist/permissions/index.d.cts +7 -4
  48. package/dist/permissions/index.d.ts +7 -4
  49. package/dist/permissions/index.js +1 -1
  50. package/dist/roles/index.cjs +1 -1
  51. package/dist/roles/index.d.cts +7 -4
  52. package/dist/roles/index.d.ts +7 -4
  53. package/dist/roles/index.js +1 -1
  54. package/dist/structure/index.cjs +1 -1
  55. package/dist/structure/index.d.cts +157 -112
  56. package/dist/structure/index.d.ts +157 -112
  57. package/dist/structure/index.js +1 -1
  58. package/dist/user-create.dto-BJuUsn3F.d.cts +11 -0
  59. package/dist/user-create.dto-BJuUsn3F.d.ts +11 -0
  60. package/dist/user.entities-89r-QDXP.d.cts +21 -0
  61. package/dist/user.entities-89r-QDXP.d.ts +21 -0
  62. package/dist/users/index.cjs +1 -1
  63. package/dist/users/index.d.cts +11 -6
  64. package/dist/users/index.d.ts +11 -6
  65. package/dist/users/index.js +1 -1
  66. package/dist/varieties/index.cjs +1 -1
  67. package/dist/varieties/index.d.cts +15 -9
  68. package/dist/varieties/index.d.ts +15 -9
  69. package/dist/varieties/index.js +1 -1
  70. package/dist/{variety-nx4Q5Ncw.d.cts → variety.entities-l3C00KaA.d.cts} +1 -0
  71. package/dist/{variety-nx4Q5Ncw.d.ts → variety.entities-l3C00KaA.d.ts} +1 -0
  72. package/dist/{structure-CNfJ_8fX.d.cts → version.entities-Bvum0lG8.d.cts} +254 -94
  73. package/dist/{structure-CNfJ_8fX.d.ts → version.entities-Bvum0lG8.d.ts} +254 -94
  74. package/package.json +6 -1
  75. package/dist/chunk-ACO6G7O2.js +0 -1
  76. package/dist/chunk-DJ5M3T5L.js +0 -1
  77. package/dist/group-CnJEil9u.d.cts +0 -14
  78. package/dist/group-CnJEil9u.d.ts +0 -14
  79. package/dist/login-Dq5rerGn.d.cts +0 -6
  80. package/dist/login-Dq5rerGn.d.ts +0 -6
  81. package/dist/user-FIov3LUo.d.cts +0 -29
  82. package/dist/user-FIov3LUo.d.ts +0 -29
  83. /package/dist/{crop-Dd6QL8u1.d.cts → crop.entities-Dd6QL8u1.d.cts} +0 -0
  84. /package/dist/{crop-Dd6QL8u1.d.ts → crop.entities-Dd6QL8u1.d.ts} +0 -0
  85. /package/dist/{permission-Dxx9IAbQ.d.cts → permission.entities-Dxx9IAbQ.d.cts} +0 -0
  86. /package/dist/{permission-Dxx9IAbQ.d.ts → permission.entities-Dxx9IAbQ.d.ts} +0 -0
  87. /package/dist/{role-Bimwb-vf.d.cts → role.entities-Bimwb-vf.d.cts} +0 -0
  88. /package/dist/{role-Bimwb-vf.d.ts → role.entities-Bimwb-vf.d.ts} +0 -0
@@ -1,16 +1,39 @@
1
+ type BulkCaptureStatus = 'captured' | 'processing' | 'ready' | 'failed' | 'partial';
2
+
3
+ type CommitChangeLevel = 'BLOCK' | 'NAVE' | 'BED' | 'SQUARE' | 'CELL';
4
+ type CommitChangeAction = 'CREATE' | 'UPDATE' | 'DELETE' | 'ACTIVATE' | 'DEACTIVATE';
5
+
6
+ type FarmSize = 'small' | 'medium' | 'large';
7
+ type FarmStateConfig = 'draft' | 'finished';
8
+ type FarmType = 'test' | 'production';
9
+
10
+ type GeoUnitType = 'NAVE' | 'BED' | 'SQUARE' | 'CELL';
11
+ type IdentityQuality = 'authoritative' | 'derived' | 'unavailable';
12
+ type GeoUnitGranularity = 'squares' | 'cells' | 'lines';
13
+
14
+ type LineageClassification = 'SAFE_CANDIDATE' | 'QUARANTINE';
15
+ type LineageConfidence = 'HIGH' | 'MEDIUM' | 'LOW';
16
+
17
+ type ObservationStatus = 'open' | 'in_progress' | 'resolved' | 'dismissed';
18
+
19
+ type PlantingBatchCode = 'VALID_EXACT' | 'VALID_LATEST_EQUIVALENT' | 'STRUCTURE_VERSION_OUTDATED_BUT_EQUIVALENT' | 'STRUCTURE_VERSION_OUTDATED_AND_CHANGED' | 'STRUCTURE_NOT_FOUND' | 'STRUCTURE_VERSION_NOT_FOUND' | 'GEO_UNIT_NOT_FOUND' | 'GEO_UNIT_NOT_IN_STRUCTURE' | 'GEO_UNIT_INACTIVE' | 'INVALID_GEO_UNIT_TYPE' | 'AS_OF_DATE_OUT_OF_RANGE';
20
+
21
+ type IStructureLocationLevel = 'BLOCK' | 'NAVE' | 'BED' | 'SQUARE' | 'CELL';
22
+
1
23
  type Square = number | null;
2
- interface Bed {
24
+ interface IBed {
3
25
  name: string;
4
26
  active: boolean;
5
27
  squares: Square[];
6
28
  }
7
- interface Nave {
29
+ interface INave {
8
30
  name: string;
9
31
  maxSquares: number;
10
32
  leftPath: boolean;
11
33
  active: boolean;
12
- beds: Bed[];
34
+ beds: IBed[];
13
35
  }
36
+
14
37
  interface IStructure {
15
38
  _id?: string;
16
39
  farmId?: string;
@@ -27,40 +50,29 @@ interface IStructure {
27
50
  pointB?: [number, number];
28
51
  startPoint?: [number, number];
29
52
  implemented?: number;
30
- alignment?: Nave[][];
53
+ alignment?: INave[][];
31
54
  draft?: boolean;
32
55
  version?: number | null;
33
56
  }
34
- type ObservationStatus = 'open' | 'in_progress' | 'resolved' | 'dismissed';
35
- interface INote {
36
- id: string;
37
- blockId: string;
38
- level: string;
39
- entityId?: string | null;
40
- message: string;
41
- status: ObservationStatus;
42
- createdBy?: string | null;
43
- createdAt: string;
57
+
58
+ interface IBulkCaptureItem {
59
+ index: number;
60
+ blockName: string;
61
+ captureId: string;
62
+ status: BulkCaptureStatus;
63
+ draftBlockId?: string;
64
+ error?: string;
44
65
  }
45
- interface IObservationTask {
46
- id: string;
47
- blockId: string;
48
- level: string;
49
- message: string;
50
- status: ObservationStatus;
51
- entityId?: string;
52
- createdAt: string;
66
+ interface IBulkCaptureResponse {
67
+ jobId: string;
68
+ status: BulkCaptureStatus;
69
+ items: IBulkCaptureItem[];
53
70
  }
54
- interface IDraftReadiness {
55
- blockId: string;
56
- readyToConfirm: boolean;
57
- openCount: number;
58
- orphanCount: number;
59
- bulkState?: string | null;
60
- bulkFailureCount?: number;
71
+ interface IBulkCaptureInput {
72
+ structure: Partial<IStructure>;
73
+ idempotencyKey?: string;
61
74
  }
62
- type CommitChangeLevel = 'BLOCK' | 'NAVE' | 'BED' | 'SQUARE' | 'CELL';
63
- type CommitChangeAction = 'CREATE' | 'UPDATE' | 'DELETE' | 'ACTIVATE' | 'DEACTIVATE';
75
+
64
76
  interface ICommitChange {
65
77
  id: string;
66
78
  commitId: string;
@@ -87,46 +99,104 @@ interface ICommitListResponse {
87
99
  limit: number;
88
100
  offset: number;
89
101
  }
90
- interface IVersionSummary {
102
+
103
+ interface IDraftReadiness {
104
+ blockId: string;
105
+ readyToConfirm: boolean;
106
+ openCount: number;
107
+ orphanCount: number;
108
+ bulkState?: string | null;
109
+ bulkFailureCount?: number;
110
+ }
111
+
112
+ interface IGeoLocation {
113
+ latitude: string;
114
+ longitude: string;
115
+ }
116
+ interface IFarmCell {
91
117
  id: string;
92
- lineageId: string;
93
- blockName: string;
94
- version: number;
95
- draft: boolean;
96
- implementedAt: string | null;
97
- implemented: number | null;
118
+ lineageId?: string | null;
119
+ lineNumber: number;
120
+ rowNumber: number;
121
+ colNumber: number;
122
+ active: boolean;
123
+ geomJson: unknown | null;
98
124
  createdAt: string;
99
125
  updatedAt: string;
100
126
  }
101
- type IVersionDetail = IStructure & {
102
- version: number;
103
- implementedAt: string | null;
104
- };
105
- type LineageClassification = 'SAFE_CANDIDATE' | 'QUARANTINE';
106
- type LineageConfidence = 'HIGH' | 'MEDIUM' | 'LOW';
107
- interface ILineageEntry {
108
- lineageId: string;
109
- blockName: string;
110
- latestVersion: number;
111
- implementedAt: string | null;
112
- implemented: number | null;
113
- draft: boolean;
114
- totalVersions: number;
115
- classification?: LineageClassification;
116
- confidence?: LineageConfidence;
117
- reason_codes?: string[];
118
- rule_ids?: string[];
119
- evidence?: Record<string, unknown>;
127
+ interface IFarmSquare {
128
+ id: string;
129
+ lineageId?: string | null;
130
+ bedId: string;
131
+ number: number;
132
+ active: boolean;
133
+ orderIndex: number;
134
+ createdAt: string;
135
+ updatedAt: string;
136
+ cells: IFarmCell[];
120
137
  }
121
- interface ILineageAuditResponse {
122
- items: ILineageEntry[];
123
- total: number;
138
+ interface IFarmBed {
139
+ id: string;
140
+ lineageId?: string | null;
141
+ naveId: string;
142
+ externalCode: string | null;
143
+ name: string;
144
+ active: boolean;
145
+ orderIndex: number;
146
+ createdAt: string;
147
+ updatedAt: string;
148
+ squares: IFarmSquare[];
149
+ }
150
+ interface IFarmNaveAlignment {
151
+ id?: string;
152
+ lineageId?: string | null;
153
+ name: string;
154
+ maxSquares: number;
155
+ leftPath: boolean;
156
+ active: boolean;
157
+ createdAt?: string;
158
+ updatedAt?: string;
159
+ beds: IFarmBed[];
160
+ }
161
+ interface IFarmBlock {
162
+ _id: string;
124
163
  farmId: string;
125
- mode: 'block' | 'leaf';
164
+ blockName: string;
165
+ sides: number;
166
+ bedsNave: number;
167
+ maxTotalBeds: number;
168
+ maxTotalNaves: number;
169
+ centralRoadSize: number;
170
+ widthBed: number;
171
+ lengthBed: number;
172
+ bedRoadSize: number;
173
+ pointA: [number, number];
174
+ pointB: [number, number];
175
+ startPoint: [number, number];
176
+ alignment: IFarmNaveAlignment[][];
126
177
  }
127
- type GeoUnitType = 'NAVE' | 'BED' | 'SQUARE' | 'CELL';
128
- type IdentityQuality = 'authoritative' | 'derived' | 'unavailable';
129
- type GeoUnitGranularity = 'squares' | 'cells' | 'lines';
178
+ interface IFarm {
179
+ _id: string;
180
+ name: string;
181
+ localidad: number;
182
+ geolocation: IGeoLocation;
183
+ modules: unknown[];
184
+ users: string[];
185
+ active: boolean;
186
+ owner_name: string;
187
+ mapId: string;
188
+ total_area: number;
189
+ group_id: string | null;
190
+ weekly_start: number;
191
+ indicator_measurement: string;
192
+ severity_color_map: string;
193
+ size: FarmSize;
194
+ state_config: FarmStateConfig;
195
+ farm_type: FarmType;
196
+ blocks: IFarmBlock[];
197
+ }
198
+ type IFarmsResponse = IFarm[];
199
+
130
200
  interface IGeoUnit {
131
201
  farmId: string;
132
202
  structureId: string;
@@ -146,39 +216,48 @@ interface IGeoUnitsResponse {
146
216
  limit: number;
147
217
  nextCursor: string | null;
148
218
  }
149
- interface IRuntimeSurfaceSnapshot {
150
- canonicalCount: number;
151
- fallbackCount: number;
152
- incoherentCount: number;
153
- total: number;
154
- fallbackRate: number;
155
- mismatchRate: number;
156
- warningCodes: Record<string, number>;
157
- }
158
- interface IRuntimeBoundaryReadiness {
159
- observations: IRuntimeSurfaceSnapshot;
160
- layers: IRuntimeSurfaceSnapshot;
161
- blocks: IRuntimeSurfaceSnapshot;
162
- }
163
- type BulkCaptureStatus = 'captured' | 'processing' | 'ready' | 'failed' | 'partial';
164
- interface IBulkCaptureItem {
165
- index: number;
219
+
220
+ interface ILineageEntry {
221
+ lineageId: string;
166
222
  blockName: string;
167
- captureId: string;
168
- status: BulkCaptureStatus;
169
- draftBlockId?: string;
170
- error?: string;
223
+ latestVersion: number;
224
+ implementedAt: string | null;
225
+ implemented: number | null;
226
+ draft: boolean;
227
+ totalVersions: number;
228
+ classification?: LineageClassification;
229
+ confidence?: LineageConfidence;
230
+ reason_codes?: string[];
231
+ rule_ids?: string[];
232
+ evidence?: Record<string, unknown>;
171
233
  }
172
- interface IBulkCaptureResponse {
173
- jobId: string;
174
- status: BulkCaptureStatus;
175
- items: IBulkCaptureItem[];
234
+ interface ILineageAuditResponse {
235
+ items: ILineageEntry[];
236
+ total: number;
237
+ farmId: string;
238
+ mode: 'block' | 'leaf';
176
239
  }
177
- interface IBulkCaptureInput {
178
- structure: Partial<IStructure>;
179
- idempotencyKey?: string;
240
+
241
+ interface INote {
242
+ id: string;
243
+ blockId: string;
244
+ level: string;
245
+ entityId?: string | null;
246
+ message: string;
247
+ status: ObservationStatus;
248
+ createdBy?: string | null;
249
+ createdAt: string;
180
250
  }
181
- type PlantingBatchCode = 'VALID_EXACT' | 'VALID_LATEST_EQUIVALENT' | 'STRUCTURE_VERSION_OUTDATED_BUT_EQUIVALENT' | 'STRUCTURE_VERSION_OUTDATED_AND_CHANGED' | 'STRUCTURE_NOT_FOUND' | 'STRUCTURE_VERSION_NOT_FOUND' | 'GEO_UNIT_NOT_FOUND' | 'GEO_UNIT_NOT_IN_STRUCTURE' | 'GEO_UNIT_INACTIVE' | 'INVALID_GEO_UNIT_TYPE' | 'AS_OF_DATE_OUT_OF_RANGE';
251
+ interface IObservationTask {
252
+ id: string;
253
+ blockId: string;
254
+ level: string;
255
+ message: string;
256
+ status: ObservationStatus;
257
+ entityId?: string;
258
+ createdAt: string;
259
+ }
260
+
182
261
  interface IPlantingValidationResponse {
183
262
  farmId: string;
184
263
  squareId: string;
@@ -215,4 +294,85 @@ interface IPlantingBatchResponse {
215
294
  items: IPlantingBatchItemResult[];
216
295
  }
217
296
 
218
- export type { Bed as B, CommitChangeAction as C, GeoUnitGranularity as G, IBulkCaptureInput as I, LineageClassification as L, Nave as N, ObservationStatus as O, PlantingBatchCode as P, Square as S, BulkCaptureStatus as a, GeoUnitType as b, IBulkCaptureItem as c, IBulkCaptureResponse as d, ICommit as e, ICommitListResponse as f, IDraftReadiness as g, IGeoUnit as h, IGeoUnitsResponse as i, ILineageAuditResponse as j, ILineageEntry as k, INote as l, IObservationTask as m, IPlantingBatchItem as n, IPlantingBatchItemResult as o, IPlantingBatchResponse as p, IPlantingValidationResponse as q, IRuntimeBoundaryReadiness as r, IRuntimeSurfaceSnapshot as s, IStructure as t, IVersionDetail as u, IVersionSummary as v, IdentityQuality as w, LineageConfidence as x };
297
+ interface IRuntimeSurfaceSnapshot {
298
+ canonicalCount: number;
299
+ fallbackCount: number;
300
+ incoherentCount: number;
301
+ total: number;
302
+ fallbackRate: number;
303
+ mismatchRate: number;
304
+ warningCodes: Record<string, number>;
305
+ }
306
+ interface IRuntimeBoundaryReadiness {
307
+ observations: IRuntimeSurfaceSnapshot;
308
+ layers: IRuntimeSurfaceSnapshot;
309
+ blocks: IRuntimeSurfaceSnapshot;
310
+ }
311
+
312
+ interface IStructureObservationPayload {
313
+ farmId: string;
314
+ blockId: string;
315
+ level: IStructureLocationLevel;
316
+ entityId?: string;
317
+ message: string;
318
+ status?: string;
319
+ createdBy?: string;
320
+ }
321
+ interface IStructureBlockPayload {
322
+ id: string;
323
+ farmId: string;
324
+ blockName: string;
325
+ sides: number;
326
+ bedsNave: number;
327
+ maxTotalBeds: number;
328
+ maxTotalNaves: number;
329
+ centralRoadSize: number;
330
+ widthBed: number;
331
+ lengthBed: number;
332
+ bedRoadSize: number;
333
+ pointA: [number, number];
334
+ pointB: [number, number];
335
+ startPoint?: [number, number];
336
+ implemented: number;
337
+ granularity: 'squares' | 'cells' | 'lines';
338
+ squaresPerBed?: number;
339
+ cellsPerLine?: number;
340
+ cols?: number;
341
+ linesPerSquare?: number;
342
+ rows?: number;
343
+ blockApp: boolean;
344
+ }
345
+ interface IStructureUploadRequest {
346
+ observations: IStructureObservationPayload;
347
+ blocks: IStructureBlockPayload[];
348
+ }
349
+ interface IStructureUploadResponse {
350
+ id: string;
351
+ farmId: string;
352
+ blockId: string;
353
+ level: IStructureLocationLevel;
354
+ entityId?: string | null;
355
+ message: string;
356
+ status: string;
357
+ createdBy?: string | null;
358
+ createdAt: string;
359
+ updatedAt: string;
360
+ }
361
+
362
+ interface IVersionSummary {
363
+ id: string;
364
+ lineageId: string;
365
+ blockName: string;
366
+ version: number;
367
+ draft: boolean;
368
+ implementedAt: string | null;
369
+ implemented: number | null;
370
+ createdAt: string;
371
+ updatedAt: string;
372
+ }
373
+ type IVersionDetail = IStructure & {
374
+ version: number;
375
+ implementedAt: string | null;
376
+ };
377
+
378
+ export type { IPlantingBatchItemResult as A, BulkCaptureStatus as B, CommitChangeAction as C, IPlantingBatchResponse as D, IPlantingValidationResponse as E, FarmSize as F, GeoUnitGranularity as G, IRuntimeBoundaryReadiness as H, IBed as I, IRuntimeSurfaceSnapshot as J, IStructure as K, IStructureBlockPayload as L, IStructureLocationLevel as M, IStructureObservationPayload as N, IStructureUploadRequest as O, IStructureUploadResponse as P, IVersionDetail as Q, IVersionSummary as R, IdentityQuality as S, LineageClassification as T, LineageConfidence as U, INave as V, ObservationStatus as W, PlantingBatchCode as X, Square as Y, CommitChangeLevel as a, FarmStateConfig as b, FarmType as c, GeoUnitType as d, IBulkCaptureInput as e, IBulkCaptureItem as f, IBulkCaptureResponse as g, ICommit as h, ICommitChange as i, ICommitListResponse as j, IDraftReadiness as k, IFarm as l, IFarmBed as m, IFarmBlock as n, IFarmCell as o, IFarmNaveAlignment as p, IFarmSquare as q, IFarmsResponse as r, IGeoLocation as s, IGeoUnit as t, IGeoUnitsResponse as u, ILineageAuditResponse as v, ILineageEntry as w, INote as x, IObservationTask as y, IPlantingBatchItem as z };