repzo 1.0.119 → 1.0.121
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/changelog.md +1 -0
- package/lib/index.d.ts +108 -0
- package/lib/index.js +213 -0
- package/lib/types/index.d.ts +698 -0
- package/package.json +1 -1
- package/src/index.ts +277 -0
- package/src/types/index.ts +666 -0
package/lib/types/index.d.ts
CHANGED
|
@@ -90,11 +90,15 @@ interface Check {
|
|
|
90
90
|
disabled?: boolean;
|
|
91
91
|
}
|
|
92
92
|
interface AssetUnitsPopulated {
|
|
93
|
+
_id: StringId;
|
|
93
94
|
name: string;
|
|
95
|
+
local_name?: string;
|
|
94
96
|
cover_photo: MediaPopulated;
|
|
95
97
|
}
|
|
96
98
|
interface AssetsPopulated {
|
|
99
|
+
_id: StringId;
|
|
97
100
|
name: string;
|
|
101
|
+
local_name?: string;
|
|
98
102
|
cover_photo: MediaPopulated;
|
|
99
103
|
}
|
|
100
104
|
interface RepresentativesPopulated {
|
|
@@ -102,7 +106,9 @@ interface RepresentativesPopulated {
|
|
|
102
106
|
_id: string;
|
|
103
107
|
}
|
|
104
108
|
interface ClientLocationPopulated {
|
|
109
|
+
_id: StringId;
|
|
105
110
|
name: string;
|
|
111
|
+
local_name?: string;
|
|
106
112
|
}
|
|
107
113
|
interface FormPopulated {
|
|
108
114
|
name: string;
|
|
@@ -171,7 +177,9 @@ export interface DefaultPaginationQueryParams {
|
|
|
171
177
|
sortPageOrder?: "asc" | "dsc";
|
|
172
178
|
}
|
|
173
179
|
interface WorkorderCategoryPopulated {
|
|
180
|
+
_id: StringId;
|
|
174
181
|
name: string;
|
|
182
|
+
local_name?: string;
|
|
175
183
|
}
|
|
176
184
|
export interface DefaultPaginationResult {
|
|
177
185
|
total_result: number;
|
|
@@ -5220,6 +5228,192 @@ export declare namespace Service {
|
|
|
5220
5228
|
}
|
|
5221
5229
|
export {};
|
|
5222
5230
|
}
|
|
5231
|
+
namespace WorkorderRequest {
|
|
5232
|
+
export type Status = "pending" | "rejected" | "approved";
|
|
5233
|
+
export interface Data {
|
|
5234
|
+
_id: StringId;
|
|
5235
|
+
name: string;
|
|
5236
|
+
disabled: boolean;
|
|
5237
|
+
client?: StringId;
|
|
5238
|
+
client_location?: StringId;
|
|
5239
|
+
workorder_categories?: StringId[];
|
|
5240
|
+
workorder?: StringId;
|
|
5241
|
+
contract?: StringId;
|
|
5242
|
+
status: Status;
|
|
5243
|
+
customFields?: {
|
|
5244
|
+
[key: string]: any;
|
|
5245
|
+
};
|
|
5246
|
+
media?: StringId[];
|
|
5247
|
+
workorder_portal?: StringId;
|
|
5248
|
+
workorder_portal_link?: StringId;
|
|
5249
|
+
creator: AdminCreator | RepCreator | ClientCreator;
|
|
5250
|
+
editor?: AdminCreator | RepCreator | ClientCreator;
|
|
5251
|
+
teams?: StringId[];
|
|
5252
|
+
sync_id: string;
|
|
5253
|
+
description?: string;
|
|
5254
|
+
assets?: StringId[];
|
|
5255
|
+
asset_units?: StringId[];
|
|
5256
|
+
priority?: Priority;
|
|
5257
|
+
priority_human?: Priority_human;
|
|
5258
|
+
company_namespace: string[];
|
|
5259
|
+
createdAt: Date;
|
|
5260
|
+
updatedAt: Date;
|
|
5261
|
+
}
|
|
5262
|
+
export interface PopulatedData {
|
|
5263
|
+
_id: StringId;
|
|
5264
|
+
name: string;
|
|
5265
|
+
disabled: boolean;
|
|
5266
|
+
client?: StringId;
|
|
5267
|
+
client_location?: StringId;
|
|
5268
|
+
workorder_categories?: StringId[];
|
|
5269
|
+
workorder?: StringId;
|
|
5270
|
+
contract?: StringId;
|
|
5271
|
+
status: Status;
|
|
5272
|
+
customFields?: {
|
|
5273
|
+
[key: string]: any;
|
|
5274
|
+
};
|
|
5275
|
+
media?: StringId[];
|
|
5276
|
+
workorder_portal?: StringId;
|
|
5277
|
+
workorder_portal_link?: StringId;
|
|
5278
|
+
creator: AdminCreator | RepCreator | ClientCreator;
|
|
5279
|
+
editor?: AdminCreator | RepCreator | ClientCreator;
|
|
5280
|
+
teams?: StringId[];
|
|
5281
|
+
sync_id: string;
|
|
5282
|
+
description?: string;
|
|
5283
|
+
assets?: StringId[];
|
|
5284
|
+
asset_units?: StringId[];
|
|
5285
|
+
priority?: Priority;
|
|
5286
|
+
priority_human?: Priority_human;
|
|
5287
|
+
company_namespace: string[];
|
|
5288
|
+
createdAt: Date;
|
|
5289
|
+
updatedAt: Date;
|
|
5290
|
+
client_populated?: Pick<
|
|
5291
|
+
Client.ClientSchema,
|
|
5292
|
+
"client_code" | "name" | "_id"
|
|
5293
|
+
>;
|
|
5294
|
+
asset_units_populated?: AssetUnitsPopulated[];
|
|
5295
|
+
assets_populated?: AssetsPopulated[];
|
|
5296
|
+
client_location_populated?: ClientLocationPopulated;
|
|
5297
|
+
workorder_categories_populated?: WorkorderCategoryPopulated[];
|
|
5298
|
+
media_populated?: MediaPopulated;
|
|
5299
|
+
workorder_populated?: Workorder.WorkorderSchema;
|
|
5300
|
+
}
|
|
5301
|
+
export interface CreateBody {
|
|
5302
|
+
name: string;
|
|
5303
|
+
disabled?: boolean;
|
|
5304
|
+
client?: StringId;
|
|
5305
|
+
client_location?: StringId;
|
|
5306
|
+
workorder_categories?: StringId[];
|
|
5307
|
+
workorder?: StringId;
|
|
5308
|
+
contract?: StringId;
|
|
5309
|
+
status?: Status;
|
|
5310
|
+
customFields?: {
|
|
5311
|
+
[key: string]: any;
|
|
5312
|
+
};
|
|
5313
|
+
media?: StringId[];
|
|
5314
|
+
workorder_portal?: StringId;
|
|
5315
|
+
workorder_portal_link?: StringId;
|
|
5316
|
+
creator?: AdminCreator | RepCreator | ClientCreator;
|
|
5317
|
+
teams?: StringId[];
|
|
5318
|
+
sync_id: string;
|
|
5319
|
+
description?: string;
|
|
5320
|
+
assets?: StringId[];
|
|
5321
|
+
asset_units?: StringId[];
|
|
5322
|
+
priority?: Priority;
|
|
5323
|
+
priority_human?: Priority_human;
|
|
5324
|
+
company_namespace?: string[];
|
|
5325
|
+
}
|
|
5326
|
+
export interface UpdateBody {
|
|
5327
|
+
_id?: StringId;
|
|
5328
|
+
name?: string;
|
|
5329
|
+
disabled?: boolean;
|
|
5330
|
+
client?: StringId;
|
|
5331
|
+
client_location?: StringId;
|
|
5332
|
+
workorder_categories?: StringId[];
|
|
5333
|
+
workorder?: StringId;
|
|
5334
|
+
contract?: StringId;
|
|
5335
|
+
status?: Status;
|
|
5336
|
+
customFields?: {
|
|
5337
|
+
[key: string]: any;
|
|
5338
|
+
};
|
|
5339
|
+
media?: StringId[];
|
|
5340
|
+
workorder_portal?: StringId;
|
|
5341
|
+
workorder_portal_link?: StringId;
|
|
5342
|
+
creator?: AdminCreator | RepCreator | ClientCreator;
|
|
5343
|
+
editor?: AdminCreator | RepCreator | ClientCreator;
|
|
5344
|
+
teams?: StringId[];
|
|
5345
|
+
sync_id?: string;
|
|
5346
|
+
description?: string;
|
|
5347
|
+
assets?: StringId[];
|
|
5348
|
+
asset_units?: StringId[];
|
|
5349
|
+
priority?: Priority;
|
|
5350
|
+
priority_human?: Priority_human;
|
|
5351
|
+
company_namespace?: string[];
|
|
5352
|
+
createdAt?: Date;
|
|
5353
|
+
updatedAt?: Date;
|
|
5354
|
+
}
|
|
5355
|
+
type SortingKeys = "priority" | "updatedAt" | "createdAt" | "_id";
|
|
5356
|
+
type PopulatedKeys =
|
|
5357
|
+
| "client"
|
|
5358
|
+
| "client_location"
|
|
5359
|
+
| "asset_units"
|
|
5360
|
+
| "assets"
|
|
5361
|
+
| "workorder_categories"
|
|
5362
|
+
| "media"
|
|
5363
|
+
| "workorder";
|
|
5364
|
+
export namespace Find {
|
|
5365
|
+
type Params = DefaultPaginationQueryParams & {
|
|
5366
|
+
name?: string | string[];
|
|
5367
|
+
_id?: StringId | StringId[];
|
|
5368
|
+
priority?: Priority | Priority[];
|
|
5369
|
+
priority_human?: Priority_human | Priority_human[];
|
|
5370
|
+
status?: Status | Status[];
|
|
5371
|
+
workorder_categories?: StringId | StringId[];
|
|
5372
|
+
client_location?: StringId | StringId[];
|
|
5373
|
+
client?: StringId | StringId[];
|
|
5374
|
+
assets?: StringId | StringId[];
|
|
5375
|
+
asset_units?: StringId | StringId[];
|
|
5376
|
+
from_createdAt?: number;
|
|
5377
|
+
to_createdAt?: number;
|
|
5378
|
+
from_updatedAt?: number;
|
|
5379
|
+
to_updatedAt?: number;
|
|
5380
|
+
teams?: StringId | StringId[];
|
|
5381
|
+
"creator._id"?: StringId | StringId[];
|
|
5382
|
+
search?: string;
|
|
5383
|
+
populatedKeys?: PopulatedKeys | PopulatedKeys[];
|
|
5384
|
+
sortBy?: {
|
|
5385
|
+
field: SortingKeys;
|
|
5386
|
+
type: "asc" | "desc";
|
|
5387
|
+
}[];
|
|
5388
|
+
[key: string]: any;
|
|
5389
|
+
};
|
|
5390
|
+
interface Result extends DefaultPaginationResult {
|
|
5391
|
+
data: Data[] | PopulatedData[];
|
|
5392
|
+
}
|
|
5393
|
+
}
|
|
5394
|
+
export namespace Get {
|
|
5395
|
+
type ID = string;
|
|
5396
|
+
interface Params {
|
|
5397
|
+
populatedKeys?: PopulatedKeys[];
|
|
5398
|
+
[key: string]: any;
|
|
5399
|
+
}
|
|
5400
|
+
type Result = Data | PopulatedData;
|
|
5401
|
+
}
|
|
5402
|
+
export namespace Create {
|
|
5403
|
+
type Body = CreateBody;
|
|
5404
|
+
type Result = Data;
|
|
5405
|
+
}
|
|
5406
|
+
export namespace Update {
|
|
5407
|
+
type ID = string;
|
|
5408
|
+
type Body = UpdateBody;
|
|
5409
|
+
type Result = Data;
|
|
5410
|
+
}
|
|
5411
|
+
export namespace Remove {
|
|
5412
|
+
type ID = string;
|
|
5413
|
+
type Result = Data;
|
|
5414
|
+
}
|
|
5415
|
+
export {};
|
|
5416
|
+
}
|
|
5223
5417
|
namespace QuickConvertToPdf {
|
|
5224
5418
|
export interface QuickConvertToPdfSchema {
|
|
5225
5419
|
_id?: string;
|
|
@@ -5288,6 +5482,7 @@ export declare namespace Service {
|
|
|
5288
5482
|
qr_code_tlv?: string;
|
|
5289
5483
|
processable?: boolean;
|
|
5290
5484
|
client_id: string;
|
|
5485
|
+
client_balance?: number;
|
|
5291
5486
|
client_name: string;
|
|
5292
5487
|
comment?: string;
|
|
5293
5488
|
return_comment?: string;
|
|
@@ -5886,6 +6081,7 @@ export declare namespace Service {
|
|
|
5886
6081
|
qr_code_tlv?: string;
|
|
5887
6082
|
processable?: boolean;
|
|
5888
6083
|
client_name: string;
|
|
6084
|
+
client_balance?: number;
|
|
5889
6085
|
comment?: string;
|
|
5890
6086
|
return_comment?: string;
|
|
5891
6087
|
creator: AdminCreator | RepCreator | ClientCreator;
|
|
@@ -12748,6 +12944,508 @@ export declare namespace Service {
|
|
|
12748
12944
|
type Result = Settings.Data;
|
|
12749
12945
|
}
|
|
12750
12946
|
}
|
|
12947
|
+
namespace ClientLocation {
|
|
12948
|
+
export interface Data {
|
|
12949
|
+
_id: StringId;
|
|
12950
|
+
creator: AdminOrRep;
|
|
12951
|
+
editor?: AdminOrRep;
|
|
12952
|
+
name: string;
|
|
12953
|
+
local_name?: string;
|
|
12954
|
+
client: StringId;
|
|
12955
|
+
description?: string;
|
|
12956
|
+
address?: string;
|
|
12957
|
+
contacts?: StringId[];
|
|
12958
|
+
disabled: boolean;
|
|
12959
|
+
customFields?: {};
|
|
12960
|
+
media?: StringId[];
|
|
12961
|
+
cover_photo?: StringId;
|
|
12962
|
+
integration_meta?: {
|
|
12963
|
+
[key: string]: any;
|
|
12964
|
+
};
|
|
12965
|
+
company_namespace: string[];
|
|
12966
|
+
geoPoint?: GeoPoint;
|
|
12967
|
+
createdAt: string;
|
|
12968
|
+
updatedAt: string;
|
|
12969
|
+
}
|
|
12970
|
+
export interface CreateBody {
|
|
12971
|
+
creator?: AdminOrRep;
|
|
12972
|
+
name: string;
|
|
12973
|
+
local_name?: string;
|
|
12974
|
+
client: StringId;
|
|
12975
|
+
description?: string;
|
|
12976
|
+
address?: string;
|
|
12977
|
+
contacts?: StringId[];
|
|
12978
|
+
disabled: boolean;
|
|
12979
|
+
customFields?: {};
|
|
12980
|
+
media?: StringId[];
|
|
12981
|
+
cover_photo?: StringId;
|
|
12982
|
+
integration_meta?: {
|
|
12983
|
+
[key: string]: any;
|
|
12984
|
+
};
|
|
12985
|
+
geoPoint?: GeoPoint;
|
|
12986
|
+
}
|
|
12987
|
+
export interface UpdateBody {
|
|
12988
|
+
editor?: AdminOrRep;
|
|
12989
|
+
name?: string;
|
|
12990
|
+
local_name?: string;
|
|
12991
|
+
client?: StringId;
|
|
12992
|
+
description?: string;
|
|
12993
|
+
address?: string;
|
|
12994
|
+
contacts?: StringId[];
|
|
12995
|
+
customFields?: {};
|
|
12996
|
+
media?: StringId[];
|
|
12997
|
+
cover_photo?: StringId;
|
|
12998
|
+
integration_meta?: {
|
|
12999
|
+
[key: string]: any;
|
|
13000
|
+
};
|
|
13001
|
+
geoPoint?: GeoPoint;
|
|
13002
|
+
}
|
|
13003
|
+
export interface PopulatedDoc {
|
|
13004
|
+
_id: StringId;
|
|
13005
|
+
creator: AdminOrRep;
|
|
13006
|
+
editor?: AdminOrRep;
|
|
13007
|
+
local_name?: string;
|
|
13008
|
+
name: string;
|
|
13009
|
+
client:
|
|
13010
|
+
| StringId
|
|
13011
|
+
| (Pick<Client.ClientSchema, "name" | "client_code" | "contacts"> & {
|
|
13012
|
+
contacts:
|
|
13013
|
+
| StringId[]
|
|
13014
|
+
| Pick<ClientContact.ClientContactSchema, "name">[];
|
|
13015
|
+
});
|
|
13016
|
+
description?: string;
|
|
13017
|
+
address?: string;
|
|
13018
|
+
contacts?: StringId[] | ClientContact.ClientContactSchema[];
|
|
13019
|
+
disabled: boolean;
|
|
13020
|
+
customFields?: {};
|
|
13021
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
13022
|
+
cover_photo?: StringId | PopulatedMediaStorage;
|
|
13023
|
+
integration_meta?: {
|
|
13024
|
+
[key: string]: any;
|
|
13025
|
+
};
|
|
13026
|
+
company_namespace: string[];
|
|
13027
|
+
geoPoint?: GeoPoint;
|
|
13028
|
+
createdAt: string;
|
|
13029
|
+
updatedAt: string;
|
|
13030
|
+
}
|
|
13031
|
+
type PopulatedKeys =
|
|
13032
|
+
| "client"
|
|
13033
|
+
| "contacts"
|
|
13034
|
+
| "media"
|
|
13035
|
+
| "cover_photo"
|
|
13036
|
+
| "customFields";
|
|
13037
|
+
export namespace Find {
|
|
13038
|
+
type Params = DefaultPaginationQueryParams & {
|
|
13039
|
+
name?: string | string[];
|
|
13040
|
+
client?: StringId | StringId[];
|
|
13041
|
+
_id?: StringId | StringId[];
|
|
13042
|
+
from_updatedAt?: number;
|
|
13043
|
+
to_updatedAt?: number;
|
|
13044
|
+
from_createdAt?: number;
|
|
13045
|
+
to_createdAt?: number;
|
|
13046
|
+
search?: string;
|
|
13047
|
+
sortBy?: {
|
|
13048
|
+
field: "name" | "client";
|
|
13049
|
+
type: "asc" | "desc";
|
|
13050
|
+
}[];
|
|
13051
|
+
populatedKeys?: PopulatedKeys[];
|
|
13052
|
+
};
|
|
13053
|
+
interface Result extends DefaultPaginationResult {
|
|
13054
|
+
data: Data[] & PopulatedDoc[];
|
|
13055
|
+
}
|
|
13056
|
+
}
|
|
13057
|
+
export namespace Get {
|
|
13058
|
+
type ID = string;
|
|
13059
|
+
type Params = {
|
|
13060
|
+
populatedKeys?: PopulatedKeys[];
|
|
13061
|
+
};
|
|
13062
|
+
type Result = Data & PopulatedDoc;
|
|
13063
|
+
}
|
|
13064
|
+
export namespace Update {
|
|
13065
|
+
type ID = StringId;
|
|
13066
|
+
type Body = UpdateBody;
|
|
13067
|
+
type Result = Data;
|
|
13068
|
+
}
|
|
13069
|
+
export namespace Create {
|
|
13070
|
+
type Body = CreateBody;
|
|
13071
|
+
type Result = Data;
|
|
13072
|
+
}
|
|
13073
|
+
export namespace Remove {
|
|
13074
|
+
type ID = string;
|
|
13075
|
+
type Params = {};
|
|
13076
|
+
type Result = Data;
|
|
13077
|
+
}
|
|
13078
|
+
export {};
|
|
13079
|
+
}
|
|
13080
|
+
namespace AssetType {
|
|
13081
|
+
interface Data {
|
|
13082
|
+
_id: StringId;
|
|
13083
|
+
creator: AdminOrRep;
|
|
13084
|
+
editor?: AdminOrRep;
|
|
13085
|
+
name: string;
|
|
13086
|
+
color: string;
|
|
13087
|
+
local_name?: string;
|
|
13088
|
+
disabled: boolean;
|
|
13089
|
+
integration_meta?: {
|
|
13090
|
+
[key: string]: any;
|
|
13091
|
+
};
|
|
13092
|
+
company_namespace: string[];
|
|
13093
|
+
createdAt: string;
|
|
13094
|
+
updatedAt: string;
|
|
13095
|
+
}
|
|
13096
|
+
interface CreateBody {
|
|
13097
|
+
creator?: AdminOrRep;
|
|
13098
|
+
name: string;
|
|
13099
|
+
local_name?: string;
|
|
13100
|
+
color: string;
|
|
13101
|
+
disabled?: boolean;
|
|
13102
|
+
integration_meta?: {
|
|
13103
|
+
[key: string]: any;
|
|
13104
|
+
};
|
|
13105
|
+
}
|
|
13106
|
+
interface UpdateBody {
|
|
13107
|
+
editor?: AdminOrRep;
|
|
13108
|
+
name?: string;
|
|
13109
|
+
local_name?: string;
|
|
13110
|
+
color?: string;
|
|
13111
|
+
disabled?: boolean;
|
|
13112
|
+
integration_meta?: {
|
|
13113
|
+
[key: string]: any;
|
|
13114
|
+
};
|
|
13115
|
+
}
|
|
13116
|
+
namespace Find {
|
|
13117
|
+
type Params = DefaultPaginationQueryParams & {
|
|
13118
|
+
_id?: StringId | StringId[];
|
|
13119
|
+
search?: string;
|
|
13120
|
+
name?: string | string[];
|
|
13121
|
+
from_updatedAt?: number;
|
|
13122
|
+
to_updatedAt?: number;
|
|
13123
|
+
sortBy?: {
|
|
13124
|
+
field: "color" | "name";
|
|
13125
|
+
type: "asc" | "desc";
|
|
13126
|
+
}[];
|
|
13127
|
+
};
|
|
13128
|
+
interface Result extends DefaultPaginationResult {
|
|
13129
|
+
data: Data[];
|
|
13130
|
+
}
|
|
13131
|
+
}
|
|
13132
|
+
namespace Get {
|
|
13133
|
+
type ID = string;
|
|
13134
|
+
type Result = Data;
|
|
13135
|
+
}
|
|
13136
|
+
namespace Update {
|
|
13137
|
+
type ID = StringId;
|
|
13138
|
+
type Body = UpdateBody;
|
|
13139
|
+
type Result = Data;
|
|
13140
|
+
}
|
|
13141
|
+
namespace Create {
|
|
13142
|
+
type Body = CreateBody;
|
|
13143
|
+
type Result = Data;
|
|
13144
|
+
}
|
|
13145
|
+
namespace Remove {
|
|
13146
|
+
type ID = string;
|
|
13147
|
+
type Params = {};
|
|
13148
|
+
type Result = Data;
|
|
13149
|
+
}
|
|
13150
|
+
}
|
|
13151
|
+
namespace Asset {
|
|
13152
|
+
export interface Data {
|
|
13153
|
+
_id: StringId;
|
|
13154
|
+
creator: AdminCreator;
|
|
13155
|
+
editor?: AdminCreator;
|
|
13156
|
+
name: string;
|
|
13157
|
+
local_name?: string;
|
|
13158
|
+
description?: string;
|
|
13159
|
+
barcode?: string;
|
|
13160
|
+
model?: string;
|
|
13161
|
+
manufacturer?: string;
|
|
13162
|
+
year?: string;
|
|
13163
|
+
asset_types: StringId[];
|
|
13164
|
+
location: StringId;
|
|
13165
|
+
customFields?: {
|
|
13166
|
+
[key: string]: string | number | boolean;
|
|
13167
|
+
};
|
|
13168
|
+
disabled: boolean;
|
|
13169
|
+
integration_meta?: {
|
|
13170
|
+
[key: string]: any;
|
|
13171
|
+
};
|
|
13172
|
+
media?: StringId[];
|
|
13173
|
+
cover_photo?: StringId;
|
|
13174
|
+
company_namespace: string[];
|
|
13175
|
+
createdAt: string;
|
|
13176
|
+
updatedAt: string;
|
|
13177
|
+
}
|
|
13178
|
+
export interface CreateBody {
|
|
13179
|
+
creator?: AdminCreator;
|
|
13180
|
+
name: string;
|
|
13181
|
+
local_name?: string;
|
|
13182
|
+
description?: string;
|
|
13183
|
+
barcode?: string;
|
|
13184
|
+
model?: string;
|
|
13185
|
+
manufacturer?: string;
|
|
13186
|
+
year?: string;
|
|
13187
|
+
asset_types: StringId[];
|
|
13188
|
+
location: StringId;
|
|
13189
|
+
customFields?: {};
|
|
13190
|
+
disabled?: boolean;
|
|
13191
|
+
media?: StringId[];
|
|
13192
|
+
cover_photo?: StringId;
|
|
13193
|
+
integration_meta?: {
|
|
13194
|
+
[key: string]: any;
|
|
13195
|
+
};
|
|
13196
|
+
}
|
|
13197
|
+
export interface UpdateBody {
|
|
13198
|
+
editor?: AdminCreator;
|
|
13199
|
+
name?: string;
|
|
13200
|
+
local_name?: string;
|
|
13201
|
+
description?: string;
|
|
13202
|
+
barcode?: string;
|
|
13203
|
+
model?: string;
|
|
13204
|
+
manufacturer?: string;
|
|
13205
|
+
year?: string;
|
|
13206
|
+
asset_types?: StringId[];
|
|
13207
|
+
location?: StringId;
|
|
13208
|
+
customFields?: {};
|
|
13209
|
+
disabled?: boolean;
|
|
13210
|
+
media?: StringId[];
|
|
13211
|
+
cover_photo?: StringId;
|
|
13212
|
+
integration_meta?: {
|
|
13213
|
+
[key: string]: any;
|
|
13214
|
+
};
|
|
13215
|
+
}
|
|
13216
|
+
export interface PopulatedDoc {
|
|
13217
|
+
_id: StringId;
|
|
13218
|
+
creator: AdminCreator;
|
|
13219
|
+
editor?: AdminCreator;
|
|
13220
|
+
name: string;
|
|
13221
|
+
local_name?: string;
|
|
13222
|
+
description?: string;
|
|
13223
|
+
barcode?: string;
|
|
13224
|
+
model?: string;
|
|
13225
|
+
manufacturer?: string;
|
|
13226
|
+
year?: string;
|
|
13227
|
+
asset_types: StringId[] | AssetType.Data[];
|
|
13228
|
+
location:
|
|
13229
|
+
| StringId
|
|
13230
|
+
| ClientLocation.Data
|
|
13231
|
+
| (ClientLocation.Data & {
|
|
13232
|
+
client?: Pick<
|
|
13233
|
+
Client.ClientSchema,
|
|
13234
|
+
"name" | "_id" | "client_code" | "local_name"
|
|
13235
|
+
>;
|
|
13236
|
+
});
|
|
13237
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
13238
|
+
cover_photo?: StringId | PopulatedMediaStorage;
|
|
13239
|
+
customFields?: {
|
|
13240
|
+
[key: string]: string | number | boolean;
|
|
13241
|
+
};
|
|
13242
|
+
disabled: boolean;
|
|
13243
|
+
integration_meta?: {
|
|
13244
|
+
[key: string]: any;
|
|
13245
|
+
};
|
|
13246
|
+
company_namespace: string[];
|
|
13247
|
+
createdAt: string;
|
|
13248
|
+
updatedAt: string;
|
|
13249
|
+
}
|
|
13250
|
+
type PopulatedKeys =
|
|
13251
|
+
| "asset_types"
|
|
13252
|
+
| "location"
|
|
13253
|
+
| "media"
|
|
13254
|
+
| "cover_photo"
|
|
13255
|
+
| "locationClient"
|
|
13256
|
+
| "customFields";
|
|
13257
|
+
export namespace Find {
|
|
13258
|
+
type Params = DefaultPaginationQueryParams & {
|
|
13259
|
+
name?: string | string[];
|
|
13260
|
+
_id?: StringId | StringId[];
|
|
13261
|
+
from_updatedAt?: number;
|
|
13262
|
+
to_updatedAt?: number;
|
|
13263
|
+
asset_types?: StringId | StringId[];
|
|
13264
|
+
location?: StringId | StringId[];
|
|
13265
|
+
from_createdAt?: number;
|
|
13266
|
+
to_createdAt?: number;
|
|
13267
|
+
search?: string;
|
|
13268
|
+
sortBy?: {
|
|
13269
|
+
field: "barcode" | "name" | "model";
|
|
13270
|
+
type: "asc" | "desc";
|
|
13271
|
+
}[];
|
|
13272
|
+
populatedKeys?: PopulatedKeys[];
|
|
13273
|
+
};
|
|
13274
|
+
interface Result extends DefaultPaginationResult {
|
|
13275
|
+
data: Data[] & PopulatedDoc[];
|
|
13276
|
+
}
|
|
13277
|
+
}
|
|
13278
|
+
export namespace Get {
|
|
13279
|
+
type ID = string;
|
|
13280
|
+
type Params = {
|
|
13281
|
+
populatedKeys?: PopulatedKeys[];
|
|
13282
|
+
};
|
|
13283
|
+
type Result = Data & PopulatedDoc;
|
|
13284
|
+
}
|
|
13285
|
+
export namespace Update {
|
|
13286
|
+
type ID = StringId;
|
|
13287
|
+
type Body = UpdateBody;
|
|
13288
|
+
type Result = Data;
|
|
13289
|
+
}
|
|
13290
|
+
export namespace Create {
|
|
13291
|
+
type Body = CreateBody;
|
|
13292
|
+
type Result = Data;
|
|
13293
|
+
}
|
|
13294
|
+
export namespace Remove {
|
|
13295
|
+
type ID = string;
|
|
13296
|
+
type Params = {};
|
|
13297
|
+
type Result = Data;
|
|
13298
|
+
}
|
|
13299
|
+
export {};
|
|
13300
|
+
}
|
|
13301
|
+
namespace AssetUnit {
|
|
13302
|
+
export interface Data {
|
|
13303
|
+
_id: StringId;
|
|
13304
|
+
creator: AdminOrRep;
|
|
13305
|
+
editor?: AdminOrRep;
|
|
13306
|
+
name: string;
|
|
13307
|
+
asset: StringId;
|
|
13308
|
+
location?: StringId;
|
|
13309
|
+
local_name?: string;
|
|
13310
|
+
description?: string;
|
|
13311
|
+
serial_nu?: string;
|
|
13312
|
+
customFields?: {};
|
|
13313
|
+
disabled: boolean;
|
|
13314
|
+
integration_meta?: {
|
|
13315
|
+
[key: string]: any;
|
|
13316
|
+
};
|
|
13317
|
+
media?: StringId[];
|
|
13318
|
+
cover_photo?: StringId;
|
|
13319
|
+
comany_namespace: string[];
|
|
13320
|
+
createdAt: string;
|
|
13321
|
+
updatedAt: string;
|
|
13322
|
+
}
|
|
13323
|
+
export interface CreateBody {
|
|
13324
|
+
creator?: AdminOrRep;
|
|
13325
|
+
name: string;
|
|
13326
|
+
asset: StringId;
|
|
13327
|
+
location?: StringId;
|
|
13328
|
+
local_name?: string;
|
|
13329
|
+
description?: string;
|
|
13330
|
+
serial_nu?: string;
|
|
13331
|
+
customFields?: {};
|
|
13332
|
+
integration_meta?: {
|
|
13333
|
+
[key: string]: any;
|
|
13334
|
+
};
|
|
13335
|
+
media?: StringId[];
|
|
13336
|
+
cover_photo?: StringId;
|
|
13337
|
+
}
|
|
13338
|
+
export interface UpdateBody {
|
|
13339
|
+
editor?: AdminOrRep;
|
|
13340
|
+
name?: string;
|
|
13341
|
+
asset?: StringId;
|
|
13342
|
+
location?: StringId;
|
|
13343
|
+
local_name?: string;
|
|
13344
|
+
description?: string;
|
|
13345
|
+
serial_nu?: string;
|
|
13346
|
+
customFields?: {};
|
|
13347
|
+
integration_meta?: {
|
|
13348
|
+
[key: string]: any;
|
|
13349
|
+
};
|
|
13350
|
+
media?: StringId[] | string[];
|
|
13351
|
+
cover_photo?: StringId;
|
|
13352
|
+
}
|
|
13353
|
+
type assetPopulated =
|
|
13354
|
+
| StringId
|
|
13355
|
+
| Asset.Data
|
|
13356
|
+
| (Asset.Data & {
|
|
13357
|
+
location?: ClientLocation.Data;
|
|
13358
|
+
})
|
|
13359
|
+
| (Asset.Data & {
|
|
13360
|
+
location?:
|
|
13361
|
+
| ClientLocation.Data
|
|
13362
|
+
| (ClientLocation.Data & {
|
|
13363
|
+
client: Pick<
|
|
13364
|
+
Client.ClientSchema,
|
|
13365
|
+
"name" | "client_code" | "_id"
|
|
13366
|
+
>;
|
|
13367
|
+
});
|
|
13368
|
+
});
|
|
13369
|
+
type locationPopulated =
|
|
13370
|
+
| StringId
|
|
13371
|
+
| ClientLocation.Data
|
|
13372
|
+
| (ClientLocation.Data & {
|
|
13373
|
+
client: Pick<Client.ClientSchema, "name" | "_id" | "client_code">;
|
|
13374
|
+
});
|
|
13375
|
+
export interface PopulatedDoc {
|
|
13376
|
+
_id: StringId;
|
|
13377
|
+
creator: AdminOrRep;
|
|
13378
|
+
editor?: AdminOrRep;
|
|
13379
|
+
name: string;
|
|
13380
|
+
asset: assetPopulated;
|
|
13381
|
+
location?: locationPopulated;
|
|
13382
|
+
local_name?: string;
|
|
13383
|
+
description?: string;
|
|
13384
|
+
serial_nu?: string;
|
|
13385
|
+
customFields?: {};
|
|
13386
|
+
disabled: boolean;
|
|
13387
|
+
integration_meta?: {
|
|
13388
|
+
[key: string]: any;
|
|
13389
|
+
};
|
|
13390
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
13391
|
+
cover_photo?: StringId | PopulatedMediaStorage;
|
|
13392
|
+
comany_namespace: string[];
|
|
13393
|
+
createdAt: string;
|
|
13394
|
+
updatedAt: string;
|
|
13395
|
+
}
|
|
13396
|
+
type PopulatedKeys =
|
|
13397
|
+
| "asset"
|
|
13398
|
+
| "location"
|
|
13399
|
+
| "locationClient"
|
|
13400
|
+
| "assetLocation"
|
|
13401
|
+
| "assetLocationClient"
|
|
13402
|
+
| "media"
|
|
13403
|
+
| "cover_photo"
|
|
13404
|
+
| "customFields";
|
|
13405
|
+
export namespace Find {
|
|
13406
|
+
type Params = DefaultPaginationQueryParams & {
|
|
13407
|
+
name?: string | string[];
|
|
13408
|
+
_id?: StringId | StringId[];
|
|
13409
|
+
from_updatedAt?: number;
|
|
13410
|
+
to_updatedAt?: number;
|
|
13411
|
+
asset?: StringId | StringId[];
|
|
13412
|
+
location?: StringId | StringId[];
|
|
13413
|
+
from_createdAt?: number;
|
|
13414
|
+
to_createdAt?: number;
|
|
13415
|
+
search?: string;
|
|
13416
|
+
sortBy?: {
|
|
13417
|
+
field: "asset" | "name";
|
|
13418
|
+
type: "asc" | "desc";
|
|
13419
|
+
}[];
|
|
13420
|
+
populatedKeys?: PopulatedKeys[];
|
|
13421
|
+
};
|
|
13422
|
+
interface Result extends DefaultPaginationResult {
|
|
13423
|
+
data: Data[] & PopulatedDoc[];
|
|
13424
|
+
}
|
|
13425
|
+
}
|
|
13426
|
+
export namespace Get {
|
|
13427
|
+
type ID = string;
|
|
13428
|
+
type Params = {
|
|
13429
|
+
populatedKeys?: PopulatedKeys[];
|
|
13430
|
+
};
|
|
13431
|
+
type Result = Data & PopulatedDoc;
|
|
13432
|
+
}
|
|
13433
|
+
export namespace Update {
|
|
13434
|
+
type ID = StringId;
|
|
13435
|
+
type Body = UpdateBody;
|
|
13436
|
+
type Result = Data;
|
|
13437
|
+
}
|
|
13438
|
+
export namespace Create {
|
|
13439
|
+
type Body = CreateBody;
|
|
13440
|
+
type Result = Data;
|
|
13441
|
+
}
|
|
13442
|
+
export namespace Remove {
|
|
13443
|
+
type ID = string;
|
|
13444
|
+
type Params = {};
|
|
13445
|
+
type Result = Data;
|
|
13446
|
+
}
|
|
13447
|
+
export {};
|
|
13448
|
+
}
|
|
12751
13449
|
}
|
|
12752
13450
|
export type StringId = string;
|
|
12753
13451
|
export type NameSpaces = string[];
|