repzo 1.0.125 → 1.0.126
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/lib/index.d.ts +36 -0
- package/lib/index.js +70 -0
- package/lib/types/index.d.ts +120 -0
- package/package.json +1 -1
- package/src/index.ts +94 -0
- package/src/oas/brand.yaml +246 -0
- package/src/oas/category.yaml +285 -0
- package/src/oas/client.yaml +669 -0
- package/src/oas/measureunit-family.yaml +354 -0
- package/src/oas/measureunit.yaml +366 -0
- package/src/oas/media.yaml +345 -0
- package/src/oas/pricelist-item.yaml +369 -0
- package/src/oas/pricelist.yaml +287 -0
- package/src/oas/product-group.yaml +278 -0
- package/src/oas/product.yaml +578 -0
- package/src/oas/rep.yaml +410 -0
- package/src/oas/return-reason.yaml +286 -0
- package/src/oas/route.yaml +337 -0
- package/src/oas/subcategory.yaml +355 -0
- package/src/oas/tag.yaml +272 -0
- package/src/oas/tax.yaml +303 -0
- package/src/oas/team.yaml +268 -0
- package/src/oas/variant.yaml +373 -0
- package/src/oas/warehouse.yaml +311 -0
- package/src/types/index.ts +127 -0
- package/test.ts +2 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
openapi: 3.0.3
|
|
2
|
+
info:
|
|
3
|
+
title: Repzo API - Warehouse
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
description: OpenAPI specification for Repzo Warehouse endpoints.
|
|
6
|
+
servers:
|
|
7
|
+
- url: https://sv.api.repzo.me
|
|
8
|
+
paths:
|
|
9
|
+
/warehouse:
|
|
10
|
+
get:
|
|
11
|
+
summary: Find warehouses
|
|
12
|
+
operationId: findWarehouses
|
|
13
|
+
parameters:
|
|
14
|
+
- in: query
|
|
15
|
+
name: params
|
|
16
|
+
schema:
|
|
17
|
+
type: object
|
|
18
|
+
properties:
|
|
19
|
+
_id:
|
|
20
|
+
oneOf:
|
|
21
|
+
- type: array
|
|
22
|
+
items:
|
|
23
|
+
type: string
|
|
24
|
+
- type: string
|
|
25
|
+
search:
|
|
26
|
+
type: string
|
|
27
|
+
name:
|
|
28
|
+
oneOf:
|
|
29
|
+
- type: array
|
|
30
|
+
items:
|
|
31
|
+
type: string
|
|
32
|
+
- type: string
|
|
33
|
+
disabled:
|
|
34
|
+
type: boolean
|
|
35
|
+
from_updatedAt:
|
|
36
|
+
type: number
|
|
37
|
+
from__id:
|
|
38
|
+
type: string
|
|
39
|
+
to__id:
|
|
40
|
+
type: string
|
|
41
|
+
sortBy:
|
|
42
|
+
type: array
|
|
43
|
+
items:
|
|
44
|
+
type: object
|
|
45
|
+
properties:
|
|
46
|
+
field:
|
|
47
|
+
type: string
|
|
48
|
+
enum: [_id]
|
|
49
|
+
type:
|
|
50
|
+
type: string
|
|
51
|
+
enum: [asc, desc]
|
|
52
|
+
description: Query parameters for filtering warehouses
|
|
53
|
+
responses:
|
|
54
|
+
'200':
|
|
55
|
+
description: A list of warehouses
|
|
56
|
+
content:
|
|
57
|
+
application/json:
|
|
58
|
+
schema:
|
|
59
|
+
$ref: '#/components/schemas/WarehouseFindResult'
|
|
60
|
+
post:
|
|
61
|
+
summary: Create a warehouse
|
|
62
|
+
operationId: createWarehouse
|
|
63
|
+
requestBody:
|
|
64
|
+
required: true
|
|
65
|
+
content:
|
|
66
|
+
application/json:
|
|
67
|
+
schema:
|
|
68
|
+
$ref: '#/components/schemas/WarehouseCreateBody'
|
|
69
|
+
responses:
|
|
70
|
+
'201':
|
|
71
|
+
description: Warehouse created
|
|
72
|
+
content:
|
|
73
|
+
application/json:
|
|
74
|
+
schema:
|
|
75
|
+
$ref: '#/components/schemas/WarehouseCreateResult'
|
|
76
|
+
/warehouse/{id}:
|
|
77
|
+
get:
|
|
78
|
+
summary: Get a warehouse by ID
|
|
79
|
+
operationId: getWarehouse
|
|
80
|
+
parameters:
|
|
81
|
+
- in: path
|
|
82
|
+
name: id
|
|
83
|
+
required: true
|
|
84
|
+
schema:
|
|
85
|
+
type: string
|
|
86
|
+
responses:
|
|
87
|
+
'200':
|
|
88
|
+
description: Warehouse details
|
|
89
|
+
content:
|
|
90
|
+
application/json:
|
|
91
|
+
schema:
|
|
92
|
+
$ref: '#/components/schemas/WarehouseGetResult'
|
|
93
|
+
put:
|
|
94
|
+
summary: Update a warehouse
|
|
95
|
+
operationId: updateWarehouse
|
|
96
|
+
parameters:
|
|
97
|
+
- in: path
|
|
98
|
+
name: id
|
|
99
|
+
required: true
|
|
100
|
+
schema:
|
|
101
|
+
type: string
|
|
102
|
+
requestBody:
|
|
103
|
+
required: true
|
|
104
|
+
content:
|
|
105
|
+
application/json:
|
|
106
|
+
schema:
|
|
107
|
+
$ref: '#/components/schemas/WarehouseUpdateBody'
|
|
108
|
+
responses:
|
|
109
|
+
'200':
|
|
110
|
+
description: Warehouse updated
|
|
111
|
+
content:
|
|
112
|
+
application/json:
|
|
113
|
+
schema:
|
|
114
|
+
$ref: '#/components/schemas/WarehouseUpdateResult'
|
|
115
|
+
delete:
|
|
116
|
+
summary: Remove a warehouse
|
|
117
|
+
operationId: removeWarehouse
|
|
118
|
+
parameters:
|
|
119
|
+
- in: path
|
|
120
|
+
name: id
|
|
121
|
+
required: true
|
|
122
|
+
schema:
|
|
123
|
+
type: string
|
|
124
|
+
responses:
|
|
125
|
+
'200':
|
|
126
|
+
description: Warehouse removed
|
|
127
|
+
content:
|
|
128
|
+
application/json:
|
|
129
|
+
schema:
|
|
130
|
+
$ref: '#/components/schemas/WarehouseRemoveResult'
|
|
131
|
+
components:
|
|
132
|
+
schemas:
|
|
133
|
+
WarehouseFindResult:
|
|
134
|
+
type: object
|
|
135
|
+
description: Result of finding warehouses
|
|
136
|
+
properties:
|
|
137
|
+
data:
|
|
138
|
+
type: array
|
|
139
|
+
items:
|
|
140
|
+
$ref: '#/components/schemas/WarehouseSchema'
|
|
141
|
+
total_result:
|
|
142
|
+
type: number
|
|
143
|
+
description: Total number of warehouses
|
|
144
|
+
current_count:
|
|
145
|
+
type: number
|
|
146
|
+
description: Count of warehouses in current page
|
|
147
|
+
total_pages:
|
|
148
|
+
type: number
|
|
149
|
+
description: Total number of pages
|
|
150
|
+
current_page:
|
|
151
|
+
type: number
|
|
152
|
+
description: Current page number
|
|
153
|
+
per_page:
|
|
154
|
+
type: number
|
|
155
|
+
description: Number of warehouses per page
|
|
156
|
+
first_page_url:
|
|
157
|
+
type: string
|
|
158
|
+
description: URL for the first page
|
|
159
|
+
last_page_url:
|
|
160
|
+
type: string
|
|
161
|
+
description: URL for the last page
|
|
162
|
+
next_page_url:
|
|
163
|
+
type: string
|
|
164
|
+
nullable: true
|
|
165
|
+
description: URL for the next page
|
|
166
|
+
prev_page_url:
|
|
167
|
+
type: string
|
|
168
|
+
nullable: true
|
|
169
|
+
description: URL for the previous page
|
|
170
|
+
path:
|
|
171
|
+
type: string
|
|
172
|
+
description: Base URL path
|
|
173
|
+
WarehouseSchema:
|
|
174
|
+
type: object
|
|
175
|
+
description: Warehouse schema
|
|
176
|
+
properties:
|
|
177
|
+
_id:
|
|
178
|
+
type: string
|
|
179
|
+
description: Unique identifier for the warehouse
|
|
180
|
+
name:
|
|
181
|
+
type: string
|
|
182
|
+
description: Name of the warehouse
|
|
183
|
+
location:
|
|
184
|
+
type: object
|
|
185
|
+
description: Geographic location of the warehouse
|
|
186
|
+
properties:
|
|
187
|
+
type:
|
|
188
|
+
type: string
|
|
189
|
+
enum: [Point]
|
|
190
|
+
description: Type of geolocation
|
|
191
|
+
coordinates:
|
|
192
|
+
type: array
|
|
193
|
+
items:
|
|
194
|
+
type: number
|
|
195
|
+
description: Coordinates [longitude, latitude]
|
|
196
|
+
disabled:
|
|
197
|
+
type: boolean
|
|
198
|
+
description: Whether the warehouse is disabled
|
|
199
|
+
integration_meta:
|
|
200
|
+
type: object
|
|
201
|
+
additionalProperties: true
|
|
202
|
+
description: Integration metadata
|
|
203
|
+
company_namespace:
|
|
204
|
+
type: array
|
|
205
|
+
items:
|
|
206
|
+
type: string
|
|
207
|
+
description: Company namespaces
|
|
208
|
+
createdAt:
|
|
209
|
+
type: string
|
|
210
|
+
format: date-time
|
|
211
|
+
description: Creation timestamp
|
|
212
|
+
updatedAt:
|
|
213
|
+
type: string
|
|
214
|
+
format: date-time
|
|
215
|
+
description: Last update timestamp
|
|
216
|
+
__v:
|
|
217
|
+
type: number
|
|
218
|
+
description: Version number
|
|
219
|
+
WarehouseCreateBody:
|
|
220
|
+
type: object
|
|
221
|
+
description: Body for creating a warehouse
|
|
222
|
+
required:
|
|
223
|
+
- name
|
|
224
|
+
- company_namespace
|
|
225
|
+
properties:
|
|
226
|
+
name:
|
|
227
|
+
type: string
|
|
228
|
+
description: Name of the warehouse
|
|
229
|
+
location:
|
|
230
|
+
type: object
|
|
231
|
+
description: Geographic location of the warehouse
|
|
232
|
+
properties:
|
|
233
|
+
type:
|
|
234
|
+
type: string
|
|
235
|
+
enum: [Point]
|
|
236
|
+
description: Type of geolocation
|
|
237
|
+
coordinates:
|
|
238
|
+
type: array
|
|
239
|
+
items:
|
|
240
|
+
type: number
|
|
241
|
+
description: Coordinates [longitude, latitude]
|
|
242
|
+
disabled:
|
|
243
|
+
type: boolean
|
|
244
|
+
description: Whether the warehouse is disabled
|
|
245
|
+
integration_meta:
|
|
246
|
+
type: object
|
|
247
|
+
additionalProperties: true
|
|
248
|
+
description: Integration metadata
|
|
249
|
+
company_namespace:
|
|
250
|
+
type: array
|
|
251
|
+
items:
|
|
252
|
+
type: string
|
|
253
|
+
description: Company namespaces
|
|
254
|
+
WarehouseCreateResult:
|
|
255
|
+
$ref: '#/components/schemas/WarehouseSchema'
|
|
256
|
+
description: Result of creating a warehouse
|
|
257
|
+
WarehouseGetResult:
|
|
258
|
+
$ref: '#/components/schemas/WarehouseSchema'
|
|
259
|
+
description: Result of getting a warehouse
|
|
260
|
+
WarehouseUpdateBody:
|
|
261
|
+
type: object
|
|
262
|
+
description: Body for updating a warehouse
|
|
263
|
+
properties:
|
|
264
|
+
name:
|
|
265
|
+
type: string
|
|
266
|
+
description: Name of the warehouse
|
|
267
|
+
location:
|
|
268
|
+
type: object
|
|
269
|
+
description: Geographic location of the warehouse
|
|
270
|
+
properties:
|
|
271
|
+
type:
|
|
272
|
+
type: string
|
|
273
|
+
enum: [Point]
|
|
274
|
+
description: Type of geolocation
|
|
275
|
+
coordinates:
|
|
276
|
+
type: array
|
|
277
|
+
items:
|
|
278
|
+
type: number
|
|
279
|
+
description: Coordinates [longitude, latitude]
|
|
280
|
+
disabled:
|
|
281
|
+
type: boolean
|
|
282
|
+
description: Whether the warehouse is disabled
|
|
283
|
+
integration_meta:
|
|
284
|
+
type: object
|
|
285
|
+
additionalProperties: true
|
|
286
|
+
description: Integration metadata
|
|
287
|
+
company_namespace:
|
|
288
|
+
type: array
|
|
289
|
+
items:
|
|
290
|
+
type: string
|
|
291
|
+
description: Company namespaces
|
|
292
|
+
_id:
|
|
293
|
+
type: string
|
|
294
|
+
description: Unique identifier for the warehouse
|
|
295
|
+
createdAt:
|
|
296
|
+
type: string
|
|
297
|
+
format: date-time
|
|
298
|
+
description: Creation timestamp
|
|
299
|
+
updatedAt:
|
|
300
|
+
type: string
|
|
301
|
+
format: date-time
|
|
302
|
+
description: Last update timestamp
|
|
303
|
+
__v:
|
|
304
|
+
type: number
|
|
305
|
+
description: Version number
|
|
306
|
+
WarehouseUpdateResult:
|
|
307
|
+
$ref: '#/components/schemas/WarehouseSchema'
|
|
308
|
+
description: Result of updating a warehouse
|
|
309
|
+
WarehouseRemoveResult:
|
|
310
|
+
$ref: '#/components/schemas/WarehouseSchema'
|
|
311
|
+
description: Result of removing a warehouse
|
package/src/types/index.ts
CHANGED
|
@@ -4950,6 +4950,133 @@ export namespace Service {
|
|
|
4950
4950
|
export type Result = ActivityFeedbackSchema;
|
|
4951
4951
|
}
|
|
4952
4952
|
}
|
|
4953
|
+
|
|
4954
|
+
export namespace ActivityFeedbackV2 {
|
|
4955
|
+
export interface ActivityFeedbackV2Schema {
|
|
4956
|
+
_id: string;
|
|
4957
|
+
route?: string;
|
|
4958
|
+
visit_id: string;
|
|
4959
|
+
visit_UUID: string;
|
|
4960
|
+
teams?: string[];
|
|
4961
|
+
company_namespace: string[];
|
|
4962
|
+
createdAt: Date;
|
|
4963
|
+
updatedAt: Date;
|
|
4964
|
+
}
|
|
4965
|
+
export interface CreateBody {
|
|
4966
|
+
route?: string;
|
|
4967
|
+
visit_id: string;
|
|
4968
|
+
visit_UUID: string;
|
|
4969
|
+
teams?: string[];
|
|
4970
|
+
}
|
|
4971
|
+
export interface UpdateBody {
|
|
4972
|
+
route?: string;
|
|
4973
|
+
visit_id?: string;
|
|
4974
|
+
visit_UUID?: string;
|
|
4975
|
+
teams?: string[];
|
|
4976
|
+
}
|
|
4977
|
+
export type PopulatedKeys =
|
|
4978
|
+
| "teams"
|
|
4979
|
+
| "route"
|
|
4980
|
+
| "visit_id"
|
|
4981
|
+
| "feed_back_option";
|
|
4982
|
+
|
|
4983
|
+
type ActivityFeedbackV2SchemaWithPopulatedKeys = ActivityFeedbackV2Schema & {
|
|
4984
|
+
teams?: string[] | Team.TeamSchema[];
|
|
4985
|
+
route?: string | Route.RouteSchema;
|
|
4986
|
+
visit_id?: string | Visit.VisitSchema;
|
|
4987
|
+
feed_back_option?: string;
|
|
4988
|
+
};
|
|
4989
|
+
|
|
4990
|
+
export namespace Find {
|
|
4991
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
4992
|
+
route?: string;
|
|
4993
|
+
teams?: string[];
|
|
4994
|
+
visit_id?: string;
|
|
4995
|
+
from_createdAt?: number;
|
|
4996
|
+
to_createdAt?: number;
|
|
4997
|
+
from__id?: string;
|
|
4998
|
+
to__id?: string;
|
|
4999
|
+
populatedKeys?: PopulatedKeys | PopulatedKeys[];
|
|
5000
|
+
[key: string]: any; // integration_meta.
|
|
5001
|
+
sortBy?: {
|
|
5002
|
+
field: "_id";
|
|
5003
|
+
type: "asc" | "desc";
|
|
5004
|
+
}[];
|
|
5005
|
+
};
|
|
5006
|
+
export interface Result extends DefaultPaginationResult {
|
|
5007
|
+
data: ActivityFeedbackV2SchemaWithPopulatedKeys[];
|
|
5008
|
+
absolute_total: number;
|
|
5009
|
+
page_total: number;
|
|
5010
|
+
}
|
|
5011
|
+
}
|
|
5012
|
+
|
|
5013
|
+
export namespace Create {
|
|
5014
|
+
export type Body = CreateBody;
|
|
5015
|
+
export type Result = ActivityFeedbackV2Schema;
|
|
5016
|
+
}
|
|
5017
|
+
export namespace Get {
|
|
5018
|
+
export type ID = string;
|
|
5019
|
+
export interface Params {}
|
|
5020
|
+
export type Result = ActivityFeedbackV2SchemaWithPopulatedKeys;
|
|
5021
|
+
}
|
|
5022
|
+
export namespace Update {
|
|
5023
|
+
export type ID = string;
|
|
5024
|
+
export type Body = UpdateBody;
|
|
5025
|
+
export type Result = ActivityFeedbackV2Schema;
|
|
5026
|
+
}
|
|
5027
|
+
}
|
|
5028
|
+
|
|
5029
|
+
export namespace FeedbackOption {
|
|
5030
|
+
export interface FeedbackOptionSchema {
|
|
5031
|
+
_id: string;
|
|
5032
|
+
label: string;
|
|
5033
|
+
score?: number;
|
|
5034
|
+
disabled: boolean;
|
|
5035
|
+
company_namespace: string[];
|
|
5036
|
+
createdAt: Date;
|
|
5037
|
+
updatedAt: Date;
|
|
5038
|
+
}
|
|
5039
|
+
export interface CreateBody {
|
|
5040
|
+
label: string;
|
|
5041
|
+
score?: number;
|
|
5042
|
+
}
|
|
5043
|
+
export interface UpdateBody {
|
|
5044
|
+
label: string;
|
|
5045
|
+
score?: number;
|
|
5046
|
+
disabled?: boolean;
|
|
5047
|
+
}
|
|
5048
|
+
|
|
5049
|
+
export namespace Find {
|
|
5050
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
5051
|
+
label?: string;
|
|
5052
|
+
score?: number;
|
|
5053
|
+
deleted_at?: number;
|
|
5054
|
+
disabled?: boolean;
|
|
5055
|
+
[key: string]: any; // integration_meta.
|
|
5056
|
+
};
|
|
5057
|
+
export interface Result extends DefaultPaginationResult {
|
|
5058
|
+
data: FeedbackOptionSchema[];
|
|
5059
|
+
absolute_total: number;
|
|
5060
|
+
page_total: number;
|
|
5061
|
+
}
|
|
5062
|
+
}
|
|
5063
|
+
|
|
5064
|
+
export namespace Create {
|
|
5065
|
+
export type Body = CreateBody;
|
|
5066
|
+
export type Result = FeedbackOptionSchema;
|
|
5067
|
+
}
|
|
5068
|
+
export namespace Get {
|
|
5069
|
+
export type ID = string;
|
|
5070
|
+
export interface Params {}
|
|
5071
|
+
export type Result = FeedbackOptionSchema;
|
|
5072
|
+
}
|
|
5073
|
+
export namespace Update {
|
|
5074
|
+
export type ID = string;
|
|
5075
|
+
export type Body = UpdateBody;
|
|
5076
|
+
export type Result = FeedbackOptionSchema;
|
|
5077
|
+
}
|
|
5078
|
+
}
|
|
5079
|
+
|
|
4953
5080
|
export namespace Workorder {
|
|
4954
5081
|
export interface WorkorderSchema {
|
|
4955
5082
|
_id: StringId;
|