repzo 1.0.163 → 1.0.165

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.
@@ -0,0 +1,260 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Repzo API - Workorder Agenda
4
+ version: 1.0.0
5
+ description: OpenAPI specification for Repzo Workorder Agenda endpoints.
6
+ servers:
7
+ - url: https://sv.api.repzo.me
8
+ paths:
9
+ /workorder-agenda:
10
+ get:
11
+ summary: Find workorder agenda
12
+ operationId: findWorkorderAgenda
13
+ parameters:
14
+ - in: query
15
+ name: from_due_date
16
+ required: true
17
+ schema:
18
+ type: integer
19
+ description: Start timestamp for filtering workorders
20
+ - in: query
21
+ name: to_due_date
22
+ required: true
23
+ schema:
24
+ type: integer
25
+ description: End timestamp for filtering workorders
26
+ - in: query
27
+ name: client
28
+ schema:
29
+ type: array
30
+ items:
31
+ type: string
32
+ description: Filter by client IDs
33
+ - in: query
34
+ name: disabled
35
+ required: true
36
+ schema:
37
+ type: boolean
38
+ description: Include disabled workorders
39
+ - in: query
40
+ name: day_per_page
41
+ schema:
42
+ type: integer
43
+ description: Number of days per page
44
+ - in: query
45
+ name: day_page
46
+ schema:
47
+ type: integer
48
+ description: Day page number
49
+ - in: query
50
+ name: day
51
+ schema:
52
+ type: string
53
+ description: Filter by specific day (YYYY-MM-DD format)
54
+ - in: query
55
+ name: client_location
56
+ schema:
57
+ type: array
58
+ items:
59
+ type: string
60
+ description: Filter by client location IDs
61
+ - in: query
62
+ name: workorder_categories
63
+ schema:
64
+ type: array
65
+ items:
66
+ type: string
67
+ description: Filter by workorder category IDs
68
+ - in: query
69
+ name: status
70
+ schema:
71
+ oneOf:
72
+ - type: string
73
+ - type: array
74
+ items:
75
+ type: string
76
+ description: Filter by workorder status
77
+ - in: query
78
+ name: priority_human
79
+ schema:
80
+ oneOf:
81
+ - type: string
82
+ - type: array
83
+ items:
84
+ type: string
85
+ description: Filter by workorder priority
86
+ - in: query
87
+ name: assets
88
+ schema:
89
+ type: array
90
+ items:
91
+ type: string
92
+ description: Filter by asset IDs
93
+ - in: query
94
+ name: asset_units
95
+ schema:
96
+ type: array
97
+ items:
98
+ type: string
99
+ description: Filter by asset unit IDs
100
+ - in: query
101
+ name: contract
102
+ schema:
103
+ type: array
104
+ items:
105
+ type: string
106
+ description: Filter by contract IDs
107
+ - in: query
108
+ name: assigned_to
109
+ schema:
110
+ type: array
111
+ items:
112
+ type: string
113
+ description: Filter by assigned user IDs
114
+ - in: query
115
+ name: from_createdAt
116
+ schema:
117
+ type: integer
118
+ description: Filter from creation timestamp
119
+ - in: query
120
+ name: to_createdAt
121
+ schema:
122
+ type: integer
123
+ description: Filter to creation timestamp
124
+ - in: query
125
+ name: _id
126
+ required: true
127
+ schema:
128
+ oneOf:
129
+ - type: string
130
+ - type: array
131
+ items:
132
+ type: string
133
+ description: Workorder ID(s)
134
+ - in: query
135
+ name: page
136
+ schema:
137
+ type: integer
138
+ default: 1
139
+ description: Page number
140
+ - in: query
141
+ name: per_page
142
+ schema:
143
+ type: integer
144
+ default: 50
145
+ description: Items per page
146
+ responses:
147
+ "200":
148
+ description: Workorder agenda data
149
+ content:
150
+ application/json:
151
+ schema:
152
+ $ref: "#/components/schemas/WorkorderAgendaFindResult"
153
+ components:
154
+ schemas:
155
+ WorkorderAgendaFindResult:
156
+ type: object
157
+ properties:
158
+ data:
159
+ type: array
160
+ items:
161
+ $ref: "#/components/schemas/WorkorderAgendaData"
162
+ meta:
163
+ type: object
164
+ properties:
165
+ day_current_page:
166
+ type: integer
167
+ day_per_page:
168
+ type: integer
169
+ total_result:
170
+ type: integer
171
+ current_count:
172
+ type: integer
173
+ total_pages:
174
+ type: integer
175
+ WorkorderAgendaData:
176
+ type: object
177
+ properties:
178
+ day:
179
+ type: string
180
+ description: Date in YYYY-MM-DD format
181
+ day_total_result:
182
+ type: integer
183
+ description: Total number of workorders for this day
184
+ day_current_count:
185
+ type: integer
186
+ description: Current count of workorders shown for this day
187
+ day_total_pages:
188
+ type: integer
189
+ description: Total number of pages for this day
190
+ workorders:
191
+ type: array
192
+ items:
193
+ oneOf:
194
+ - $ref: "#/components/schemas/OriginWorkorder"
195
+ - $ref: "#/components/schemas/PlanedWorkorder"
196
+ BaseWorkorder:
197
+ type: object
198
+ properties:
199
+ name:
200
+ type: string
201
+ description: Workorder name
202
+ client:
203
+ type: string
204
+ description: Client ID
205
+ client_populated:
206
+ type: object
207
+ properties:
208
+ _id:
209
+ type: string
210
+ name:
211
+ type: string
212
+ local_name:
213
+ type: string
214
+ client_code:
215
+ type: string
216
+ createdAt:
217
+ type: string
218
+ format: date-time
219
+ description: Creation timestamp
220
+ OriginWorkorder:
221
+ allOf:
222
+ - $ref: "#/components/schemas/BaseWorkorder"
223
+ - type: object
224
+ properties:
225
+ _id:
226
+ type: string
227
+ description: Workorder ID
228
+ status:
229
+ type: string
230
+ description: Workorder status
231
+ is_planed:
232
+ type: boolean
233
+ enum: [false]
234
+ due_date:
235
+ type: integer
236
+ description: Due date timestamp
237
+ start_date:
238
+ type: integer
239
+ description: Start date timestamp
240
+ parent_workorder:
241
+ type: "null"
242
+ PlanedWorkorder:
243
+ allOf:
244
+ - $ref: "#/components/schemas/BaseWorkorder"
245
+ - type: object
246
+ properties:
247
+ _id:
248
+ type: "null"
249
+ status:
250
+ type: "null"
251
+ is_planed:
252
+ type: boolean
253
+ enum: [true]
254
+ due_date:
255
+ type: "null"
256
+ start_date:
257
+ type: "null"
258
+ parent_workorder:
259
+ type: string
260
+ description: Parent workorder ID
@@ -199,6 +199,12 @@ export interface DefaultPaginationResult {
199
199
  path: string;
200
200
  data: any[];
201
201
  }
202
+ export interface AgendaPaginationResult extends DefaultPaginationResult {
203
+ meta?: {
204
+ day_current_page: number;
205
+ day_per_page: number;
206
+ };
207
+ }
202
208
  export interface List {
203
209
  client: string | { _id: string };
204
210
  note?: string;
@@ -11200,6 +11206,8 @@ export namespace Service {
11200
11206
  returned_to?: string;
11201
11207
  returned_from_serial_number?: SerialNumber;
11202
11208
  returned_to_serial_number?: SerialNumber;
11209
+ partiall_returned_from?: string;
11210
+ partiall_returned_from_serial_number?: SerialNumber;
11203
11211
  due_date?: string;
11204
11212
  return_serial_number?: SerialNumber;
11205
11213
  origin_warehouse?: string;
@@ -11376,6 +11384,8 @@ export namespace Service {
11376
11384
  returned_to?: string;
11377
11385
  returned_from_serial_number?: SerialNumber;
11378
11386
  returned_to_serial_number?: SerialNumber;
11387
+ partiall_returned_from?: string;
11388
+ partiall_returned_from_serial_number?: SerialNumber;
11379
11389
  due_date?: string;
11380
11390
  return_serial_number?: SerialNumber;
11381
11391
  origin_warehouse?: string;
@@ -16949,6 +16959,8 @@ export namespace Service {
16949
16959
  | ReturnWholeInvoiceVisitDetails
16950
16960
  | VoidInvoiceVisitDetails
16951
16961
  )[];
16962
+ feed_back_option?: StringId;
16963
+ feed_back_option_label?: string;
16952
16964
  } & Pick<
16953
16965
  Visit.Data,
16954
16966
  | "closed_by_system"
@@ -17633,6 +17645,203 @@ export namespace Service {
17633
17645
  }
17634
17646
  }
17635
17647
  }
17648
+
17649
+ export namespace WorkorderAgenda {
17650
+ export interface Workorder {
17651
+ name: string;
17652
+ client: string;
17653
+ client_populated: {
17654
+ _id: string;
17655
+ name: string;
17656
+ local_name: string;
17657
+ client_code: string;
17658
+ };
17659
+ createdAt: Date;
17660
+ }
17661
+ export interface PlanedWorkorder extends Workorder {
17662
+ _id: null;
17663
+ status: null;
17664
+ is_planed: true;
17665
+ due_date: null;
17666
+ start_date: null;
17667
+ parent_workorder: string;
17668
+ }
17669
+
17670
+ export interface OriginWorkorder extends Workorder {
17671
+ _id: string;
17672
+ status: Workorder.Data["status"];
17673
+ is_planed: false;
17674
+ due_date: number;
17675
+ start_date: number;
17676
+ parent_workorder: null;
17677
+ }
17678
+ export interface Data {
17679
+ day: string;
17680
+ day_total_result: number;
17681
+ day_current_count: number;
17682
+ day_total_pages: number;
17683
+ workorders: (OriginWorkorder | PlanedWorkorder)[];
17684
+ }
17685
+
17686
+ export namespace Find {
17687
+ export type Params = DefaultPaginationQueryParams & {
17688
+ from_due_date: number;
17689
+ to_due_date: number;
17690
+ client?: StringId[];
17691
+ disabled: boolean;
17692
+ day_per_page?: number;
17693
+ day_page?: number;
17694
+ day?: string;
17695
+ client_location?: StringId[];
17696
+ workorder_categories?: StringId[];
17697
+ status?: Workorder.Data["status"] | Workorder.Data["status"][];
17698
+ priority_human?:
17699
+ | Workorder.Data["priority_human"]
17700
+ | Workorder.Data["priority_human"][];
17701
+ assets?: StringId[];
17702
+ asset_units?: StringId[];
17703
+ contract?: StringId[];
17704
+ assigned_to?: StringId[];
17705
+ from_createdAt?: number;
17706
+ to_createdAt?: number;
17707
+ _id: StringId | StringId[];
17708
+ };
17709
+ export interface Result extends AgendaPaginationResult {
17710
+ data: Data[];
17711
+ }
17712
+ }
17713
+ }
17714
+
17715
+ export namespace ModuleCustomValidator {
17716
+ export interface NumberValidation {
17717
+ data_type?: "number";
17718
+ regex?: string;
17719
+ required?: boolean;
17720
+ min?: number;
17721
+ max?: number;
17722
+ precision?: number;
17723
+ enum?: number[];
17724
+ division_factor?: number;
17725
+ multiply_factor?: number;
17726
+ none_zero?: boolean;
17727
+ is_timestamp?: boolean;
17728
+ }
17729
+ export interface ReferenceValidation {
17730
+ data_type?: "reference";
17731
+ is_array?: false;
17732
+ required?: boolean;
17733
+ }
17734
+ export interface ArrayReferenceValidation {
17735
+ data_type?: "reference";
17736
+ is_array?: true;
17737
+ required?: boolean;
17738
+ array_min_length?: number;
17739
+ array_max_length?: number;
17740
+ }
17741
+ export interface TextValidation {
17742
+ data_type?: "text";
17743
+ regex?: string;
17744
+ required?: boolean;
17745
+ min?: number;
17746
+ max?: number;
17747
+ enum?: string[];
17748
+ }
17749
+ interface BasicData {
17750
+ creator: AdminCreator;
17751
+ editor?: AdminCreator;
17752
+ _id?: string;
17753
+ module: Model;
17754
+ key: string;
17755
+ origin_type: "system_field" | "custom_field";
17756
+ disabled: boolean;
17757
+ scope: "all" | "rep" | "admin";
17758
+ ai_custom_error?: string;
17759
+ custom_error?: string;
17760
+ teams?: string[];
17761
+ full_key_path?: string;
17762
+ company_namespace: string[];
17763
+ }
17764
+
17765
+ type NumberData = BasicData & {
17766
+ data_type: "number";
17767
+ validation: NumberValidation;
17768
+ };
17769
+ type TextData = BasicData & {
17770
+ data_type: "text";
17771
+ validation: TextValidation;
17772
+ };
17773
+
17774
+ type ReferenceData = BasicData & {
17775
+ data_type: "reference";
17776
+ reference_module: string;
17777
+ validation: ArrayReferenceValidation | ReferenceValidation;
17778
+ };
17779
+ export type Data = ReferenceData | NumberData | TextData;
17780
+
17781
+ export interface BasicCreateBody {
17782
+ creator: AdminCreator;
17783
+ module: Model;
17784
+ key: string;
17785
+ origin_type: "system_field" | "custom_field";
17786
+ scope: "all" | "rep" | "admin";
17787
+ ai_custom_error?: string;
17788
+ custom_error?: string;
17789
+ teams?: string[];
17790
+ }
17791
+
17792
+ export type CreateBody = BasicCreateBody &
17793
+ (ReferenceData | NumberData | TextData);
17794
+
17795
+ export interface BasicUpdateBody {
17796
+ editor?: AdminCreator;
17797
+ module?: Model;
17798
+ key?: string;
17799
+ origin_type?: "system_field" | "custom_field";
17800
+ scope?: "all" | "rep" | "admin";
17801
+ ai_custom_error?: string;
17802
+ custom_error?: string;
17803
+ teams?: string[];
17804
+ }
17805
+
17806
+ export type UpdateBody = BasicCreateBody &
17807
+ (ReferenceData | NumberData | TextData);
17808
+
17809
+ export namespace Find {
17810
+ export type Params = DefaultPaginationQueryParams & {
17811
+ module?: RepzoModel | RepzoModel[];
17812
+ key?: string | string[];
17813
+ data_type?: Data["data_type"] | Data["data_type"][];
17814
+ origin_type?: Data["origin_type"] | Data["origin_type"][];
17815
+ scope?: Data["scope"] | Data["scope"][];
17816
+ disabled?: boolean;
17817
+ _id?: StringId | StringId[];
17818
+ teams?: StringId | StringId[];
17819
+ reference_module?: RepzoModel | RepzoModel[];
17820
+ };
17821
+ export interface Result extends DefaultPaginationResult {
17822
+ data: Data[];
17823
+ }
17824
+ }
17825
+ export namespace Get {
17826
+ export type ID = string;
17827
+ export type Result = Data;
17828
+ }
17829
+ export namespace Create {
17830
+ export type Body = CreateBody;
17831
+ export type Result = Data;
17832
+ }
17833
+ export namespace Update {
17834
+ export type ID = string;
17835
+ export type Body = UpdateBody;
17836
+ export type Result = Data;
17837
+ }
17838
+
17839
+ export namespace Remove {
17840
+ export type ID = string;
17841
+ export type Params = {};
17842
+ export type Result = Data;
17843
+ }
17844
+ }
17636
17845
  }
17637
17846
 
17638
17847
  export type StringId = string;