repzo 1.0.82 → 1.0.84

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.
@@ -200,21 +200,21 @@ export interface Build {
200
200
  list: List[];
201
201
  start_date?: number | undefined;
202
202
  }
203
- export type Calendar = CalendarWeekly | CalendarWeeklyGroup;
203
+ export declare type Calendar = CalendarWeekly | CalendarWeeklyGroup;
204
204
  export interface Route {
205
205
  disabled: boolean;
206
206
  list: List[];
207
207
  _id: string;
208
208
  }
209
- export type Priority = 0 | 1 | 2 | 3;
210
- export type WorkorderStatus =
209
+ export declare type Priority = 0 | 1 | 2 | 3;
210
+ export declare type WorkorderStatus =
211
211
  | "open"
212
212
  | "done"
213
213
  | "cancelled"
214
214
  | "inprogress"
215
215
  | "onhold";
216
- export type Priority_human = "none" | "low" | "medium" | "high";
217
- export type Day =
216
+ export declare type Priority_human = "none" | "low" | "medium" | "high";
217
+ export declare type Day =
218
218
  | "Sun"
219
219
  | "Mon"
220
220
  | "Tue"
@@ -223,7 +223,7 @@ export type Day =
223
223
  | "Fri"
224
224
  | "Sat"
225
225
  | string;
226
- export type FieldType =
226
+ export declare type FieldType =
227
227
  | "Text"
228
228
  | "String"
229
229
  | "Date"
@@ -269,7 +269,7 @@ export interface CalendarWeeklyGroup {
269
269
  note?: string;
270
270
  _id: string;
271
271
  }
272
- export type Model =
272
+ export declare type Model =
273
273
  | "quickConvertToPdf"
274
274
  | "warehouses"
275
275
  | "transfers"
@@ -294,7 +294,7 @@ export type Model =
294
294
  | "activities"
295
295
  | "bigReports"
296
296
  | "admins";
297
- export type DocumentTypes =
297
+ export declare type DocumentTypes =
298
298
  | "form"
299
299
  | "quickConvertToPdf"
300
300
  | "clients"
@@ -338,7 +338,7 @@ export type DocumentTypes =
338
338
  | "retailExecutionPreset"
339
339
  | "paymentMethod"
340
340
  | "approvalRequest";
341
- export type PrintTypes = "workorder" | "form" | "invoice" | "proforma";
341
+ export declare type PrintTypes = "workorder" | "form" | "invoice" | "proforma";
342
342
  export interface MediaDoc {
343
343
  _id?: string;
344
344
  media_id: string;
@@ -7933,7 +7933,979 @@ export declare namespace Service {
7933
7933
  }
7934
7934
  }
7935
7935
  }
7936
+ namespace AssetPartType {
7937
+ interface Data {
7938
+ _id: StringId;
7939
+ creator: AdminOrRep;
7940
+ editor?: AdminOrRep;
7941
+ name: string;
7942
+ color: string;
7943
+ local_name?: string;
7944
+ disabled: boolean;
7945
+ integration_meta?: {
7946
+ [key: string]: any;
7947
+ };
7948
+ company_namespace: string[];
7949
+ createdAt: Date;
7950
+ updatedAt: Date;
7951
+ }
7952
+ interface CreateBody {
7953
+ creator?: AdminOrRep;
7954
+ name: string;
7955
+ color: string;
7956
+ local_name?: string;
7957
+ disabled?: boolean;
7958
+ integration_meta?: {
7959
+ [key: string]: any;
7960
+ };
7961
+ company_namespace?: string[];
7962
+ }
7963
+ interface UpdateBody {
7964
+ _id?: StringId;
7965
+ creator?: AdminOrRep;
7966
+ editor?: AdminOrRep;
7967
+ name?: string;
7968
+ local_name?: string;
7969
+ color?: string;
7970
+ disabled?: boolean;
7971
+ integration_meta?: {
7972
+ [key: string]: any;
7973
+ };
7974
+ company_namespace?: string[];
7975
+ createdAt?: Date;
7976
+ updatedAt?: Date;
7977
+ }
7978
+ namespace Find {
7979
+ type Params = DefaultPaginationQueryParams & {
7980
+ _id?: StringId[] | StringId;
7981
+ search?: string;
7982
+ name?: string[] | string;
7983
+ color?: string[] | string;
7984
+ local_name?: string[] | string;
7985
+ disabled?: boolean;
7986
+ from_updatedAt?: number;
7987
+ to_updatedAt?: number;
7988
+ [key: string]: any;
7989
+ };
7990
+ interface Result extends DefaultPaginationResult {
7991
+ data: Data[];
7992
+ }
7993
+ }
7994
+ namespace Get {
7995
+ type ID = string;
7996
+ type Result = Data;
7997
+ }
7998
+ namespace Create {
7999
+ type Body = CreateBody;
8000
+ type Result = Data;
8001
+ }
8002
+ namespace Update {
8003
+ type ID = string;
8004
+ type Body = UpdateBody;
8005
+ type Result = Data;
8006
+ }
8007
+ namespace Remove {
8008
+ type ID = string;
8009
+ type Result = Data;
8010
+ }
8011
+ }
8012
+ namespace AssetPart {
8013
+ interface Data {
8014
+ _id: StringId;
8015
+ creator: AdminOrRep;
8016
+ editor?: AdminOrRep;
8017
+ name: string;
8018
+ local_name?: string;
8019
+ description?: string;
8020
+ barcode?: string;
8021
+ model?: string;
8022
+ manufacturer?: string;
8023
+ year?: string;
8024
+ asset_part_types: StringId[];
8025
+ assets?: StringId[];
8026
+ asset_units?: StringId[];
8027
+ customFields?: {
8028
+ [key: string]: string | number | boolean;
8029
+ };
8030
+ disabled: boolean;
8031
+ integration_meta?: {
8032
+ [key: string]: any;
8033
+ };
8034
+ media?: StringId[];
8035
+ cover_photo?: StringId;
8036
+ company_namespace: string[];
8037
+ createdAt: Date;
8038
+ updatedAt: Date;
8039
+ }
8040
+ interface PopulatedDoc {
8041
+ _id: StringId;
8042
+ creator: AdminOrRep;
8043
+ editor?: AdminOrRep;
8044
+ name: string;
8045
+ local_name?: string;
8046
+ description?: string;
8047
+ barcode?: string;
8048
+ model?: string;
8049
+ manufacturer?: string;
8050
+ year?: string;
8051
+ asset_part_types:
8052
+ | StringId[]
8053
+ | Pick<AssetPartType.Data, "_id" | "color" | "name" | "local_name">[];
8054
+ assets?: StringId[];
8055
+ asset_units?: StringId[];
8056
+ customFields?: {
8057
+ [key: string]: string | number | boolean;
8058
+ };
8059
+ disabled: boolean;
8060
+ integration_meta?: {
8061
+ [key: string]: any;
8062
+ };
8063
+ media?: StringId[];
8064
+ cover_photo?: StringId;
8065
+ company_namespace: string[];
8066
+ createdAt: Date;
8067
+ updatedAt: Date;
8068
+ }
8069
+ interface CreateBody {
8070
+ name: string;
8071
+ asset_part_types: StringId[];
8072
+ creator?: AdminOrRep;
8073
+ local_name?: string;
8074
+ description?: string;
8075
+ barcode?: string;
8076
+ model?: string;
8077
+ manufacturer?: string;
8078
+ year?: string;
8079
+ assets?: StringId[];
8080
+ asset_units?: StringId[];
8081
+ customFields?: {
8082
+ [key: string]: string | number | boolean;
8083
+ };
8084
+ media?: StringId[];
8085
+ cover_photo?: StringId;
8086
+ disabled?: boolean;
8087
+ integration_meta?: {
8088
+ [key: string]: any;
8089
+ };
8090
+ company_namespace?: string[];
8091
+ }
8092
+ interface UpdateBody {
8093
+ _id?: StringId;
8094
+ creator?: AdminOrRep;
8095
+ editor?: AdminOrRep;
8096
+ name?: string;
8097
+ local_name?: string;
8098
+ description?: string;
8099
+ barcode?: string;
8100
+ model?: string;
8101
+ manufacturer?: string;
8102
+ year?: string;
8103
+ asset_part_types?: StringId[];
8104
+ assets?: StringId[];
8105
+ asset_units?: StringId[];
8106
+ customFields?: {
8107
+ [key: string]: string | number | boolean;
8108
+ };
8109
+ disabled?: boolean;
8110
+ integration_meta?: {
8111
+ [key: string]: any;
8112
+ };
8113
+ media?: StringId[];
8114
+ cover_photo?: StringId;
8115
+ company_namespace?: string[];
8116
+ createdAt?: Date;
8117
+ updatedAt?: Date;
8118
+ }
8119
+ namespace Find {
8120
+ type Params = DefaultPaginationQueryParams & {
8121
+ _id?: StringId[] | StringId;
8122
+ search?: string;
8123
+ name?: string[] | string;
8124
+ disabled?: boolean;
8125
+ from_updatedAt?: number;
8126
+ to_updatedAt?: number;
8127
+ asset_part_types?: string[] | string;
8128
+ assets?: string[] | string;
8129
+ asset_units?: string[] | string;
8130
+ [key: string]: any;
8131
+ };
8132
+ interface Result extends DefaultPaginationResult {
8133
+ data: Data[] | PopulatedDoc[];
8134
+ }
8135
+ }
8136
+ namespace Get {
8137
+ type ID = string;
8138
+ type Result = Data | PopulatedDoc;
8139
+ }
8140
+ namespace Create {
8141
+ type Body = CreateBody;
8142
+ type Result = Data;
8143
+ }
8144
+ namespace Update {
8145
+ type ID = string;
8146
+ type Body = UpdateBody;
8147
+ type Result = Data;
8148
+ }
8149
+ namespace Remove {
8150
+ type ID = string;
8151
+ type Result = Data;
8152
+ }
8153
+ }
8154
+ namespace AssetPartUnit {
8155
+ interface Data {
8156
+ _id: StringId;
8157
+ creator: AdminOrRep;
8158
+ editor?: AdminOrRep;
8159
+ directional_status:
8160
+ | "received"
8161
+ | "handed"
8162
+ | "picked"
8163
+ | "returned"
8164
+ | "stored";
8165
+ asset_part_receival: StringId;
8166
+ asset_part_index: number;
8167
+ splitted_from?: StringId;
8168
+ client: StringId;
8169
+ client_name: string;
8170
+ warehouse: StringId;
8171
+ warehouse_name: string;
8172
+ receival_warehouse: string;
8173
+ receival_warehouse_name: string;
8174
+ asset_part: StringId;
8175
+ asset_part_name: string;
8176
+ qty: number;
8177
+ custom_status?: StringId;
8178
+ receival_comment?: string;
8179
+ comment?: string;
8180
+ media?: StringId[];
8181
+ teams?: StringId[];
8182
+ integration_meta?: {
8183
+ [key: string]: any;
8184
+ };
8185
+ company_namespace: string[];
8186
+ createdAt: Date;
8187
+ updatedAt: Date;
8188
+ }
8189
+ interface PopulatedDoc {
8190
+ _id: StringId;
8191
+ creator: AdminOrRep;
8192
+ editor?: AdminOrRep;
8193
+ directional_status:
8194
+ | "received"
8195
+ | "handed"
8196
+ | "picked"
8197
+ | "returned"
8198
+ | "stored";
8199
+ asset_part_receival: StringId | AssetPartReceival.Data;
8200
+ asset_part_index: number;
8201
+ splitted_from?: StringId | Data;
8202
+ client:
8203
+ | StringId
8204
+ | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
8205
+ client_name: string;
8206
+ warehouse:
8207
+ | StringId
8208
+ | Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
8209
+ receival_warehouse:
8210
+ | string
8211
+ | Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
8212
+ asset_part: StringId | AssetPart.Data;
8213
+ asset_part_name: string;
8214
+ qty: number;
8215
+ custom_status?:
8216
+ | StringId
8217
+ | Pick<CustomStatus.CustomStatusSchema, "_id" | "name" | "local_name">;
8218
+ receival_comment?: string;
8219
+ comment?: string;
8220
+ media?: StringId[];
8221
+ teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
8222
+ integration_meta?: {
8223
+ [key: string]: any;
8224
+ };
8225
+ company_namespace: string[];
8226
+ createdAt: Date;
8227
+ updatedAt: Date;
8228
+ }
8229
+ interface CreateBody {
8230
+ creator?: AdminOrRep;
8231
+ directional_status:
8232
+ | "received"
8233
+ | "handed"
8234
+ | "picked"
8235
+ | "returned"
8236
+ | "stored";
8237
+ asset_part_receival: StringId;
8238
+ asset_part_index: number;
8239
+ splitted_from?: StringId;
8240
+ client: StringId;
8241
+ client_name: string;
8242
+ warehouse: StringId;
8243
+ receival_warehouse: string;
8244
+ asset_part: StringId;
8245
+ asset_part_name: string;
8246
+ qty: number;
8247
+ custom_status?: StringId;
8248
+ receival_comment?: string;
8249
+ comment?: string;
8250
+ media?: StringId[];
8251
+ teams?: StringId[];
8252
+ integration_meta?: {
8253
+ [key: string]: any;
8254
+ };
8255
+ company_namespace?: string[];
8256
+ }
8257
+ interface UpdateBody {
8258
+ custom_status?: StringId;
8259
+ comment?: string;
8260
+ media?: StringId[];
8261
+ editor?: AdminOrRep;
8262
+ }
8263
+ namespace Find {
8264
+ type Params = DefaultPaginationQueryParams & {
8265
+ _id?: StringId[] | StringId;
8266
+ asset_part_receival?: StringId[] | StringId;
8267
+ client?: StringId[] | StringId;
8268
+ warehouse?: StringId[] | StringId;
8269
+ receival_warehouse?: StringId[] | StringId;
8270
+ asset_part?: StringId[] | StringId;
8271
+ from_qty?: number;
8272
+ to_qty?: number;
8273
+ qty?: number;
8274
+ custom_status?: StringId[] | StringId;
8275
+ teams?: StringId[] | StringId;
8276
+ from_updatedAt?: number;
8277
+ to_updatedAt?: number;
8278
+ from_createdAt?: number;
8279
+ to_createdAt?: number;
8280
+ [key: string]: any;
8281
+ };
8282
+ interface Result extends DefaultPaginationResult {
8283
+ data: Data[] | PopulatedDoc[];
8284
+ }
8285
+ }
8286
+ namespace Get {
8287
+ type ID = string;
8288
+ type Result = Data | PopulatedDoc;
8289
+ }
8290
+ namespace Update {
8291
+ type ID = string;
8292
+ type Body = UpdateBody;
8293
+ type Result = Data;
8294
+ }
8295
+ }
8296
+ namespace AssetPartReceival {
8297
+ interface Data {
8298
+ _id: StringId;
8299
+ creator: AdminOrRep;
8300
+ editor?: AdminOrRep;
8301
+ sync_id: string;
8302
+ transaction_processed: boolean;
8303
+ client: StringId;
8304
+ client_name: string;
8305
+ warehouse: StringId;
8306
+ warehouse_name: string;
8307
+ teams?: StringId[];
8308
+ time: number;
8309
+ business_day?: string;
8310
+ visit_id?: string;
8311
+ serial_number: SerialNumber;
8312
+ description?: string;
8313
+ custom_status?: StringId;
8314
+ signature?: StringId;
8315
+ media?: StringId[];
8316
+ asset_parts: {
8317
+ _id: StringId;
8318
+ asset_part: StringId;
8319
+ asset_part_name: string;
8320
+ qty: number;
8321
+ comment?: string;
8322
+ }[];
8323
+ asset_parts_count?: number;
8324
+ total_asset_parts_qty?: number;
8325
+ integration_meta?: {
8326
+ [key: string]: any;
8327
+ };
8328
+ company_namespace: string[];
8329
+ createdAt: Date;
8330
+ updatedAt: Date;
8331
+ }
8332
+ interface PopulatedDoc {
8333
+ _id: StringId;
8334
+ creator: AdminOrRep;
8335
+ editor?: AdminOrRep;
8336
+ sync_id: string;
8337
+ transaction_processed: boolean;
8338
+ client:
8339
+ | StringId
8340
+ | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
8341
+ client_name: string;
8342
+ warehouse:
8343
+ | StringId
8344
+ | Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
8345
+ warehouse_name: string;
8346
+ teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
8347
+ time: number;
8348
+ business_day?: string;
8349
+ visit_id?: string;
8350
+ serial_number: SerialNumber;
8351
+ description?: string;
8352
+ custom_status?:
8353
+ | StringId
8354
+ | Pick<CustomStatus.CustomStatusSchema, "_id" | "name" | "local_name">;
8355
+ signature?: StringId;
8356
+ media?: StringId[];
8357
+ asset_parts: {
8358
+ _id: StringId;
8359
+ asset_part: StringId | AssetPart.Data;
8360
+ asset_part_name: string;
8361
+ qty: number;
8362
+ comment?: string;
8363
+ }[];
8364
+ asset_parts_count?: number;
8365
+ total_asset_parts_qty?: number;
8366
+ integration_meta?: {
8367
+ [key: string]: any;
8368
+ };
8369
+ company_namespace: string[];
8370
+ createdAt: Date;
8371
+ updatedAt: Date;
8372
+ }
8373
+ interface CreateBody {
8374
+ creator?: AdminOrRep;
8375
+ editor?: AdminOrRep;
8376
+ sync_id: string;
8377
+ transaction_processed: false;
8378
+ serial_number?: SerialNumber;
8379
+ client: StringId;
8380
+ client_name: string;
8381
+ warehouse: StringId;
8382
+ warehouse_name: string;
8383
+ teams?: StringId[];
8384
+ time: number;
8385
+ business_day?: string;
8386
+ visit_id?: string;
8387
+ description?: string;
8388
+ custom_status?: StringId;
8389
+ signature?: StringId;
8390
+ media?: StringId[];
8391
+ asset_parts: {
8392
+ asset_part: StringId;
8393
+ asset_part_name: string;
8394
+ qty: number;
8395
+ comment?: string;
8396
+ }[];
8397
+ integration_meta?: {
8398
+ [key: string]: any;
8399
+ };
8400
+ asset_parts_count?: number;
8401
+ total_asset_parts_qty?: number;
8402
+ company_namespace: string[];
8403
+ }
8404
+ interface UpdateBody {
8405
+ description?: string;
8406
+ custom_status?: StringId;
8407
+ media?: StringId[];
8408
+ integration_meta?: {
8409
+ [key: string]: any;
8410
+ };
8411
+ }
8412
+ namespace Find {
8413
+ type Params = DefaultPaginationQueryParams & {
8414
+ _id?: StringId[] | StringId;
8415
+ search?: string;
8416
+ serial_number?: string[] | string;
8417
+ "serial_number.formatted"?: string[] | string;
8418
+ sync_id?: string[] | string;
8419
+ client?: string[] | string;
8420
+ warehouse?: string[] | string;
8421
+ creator?: string | string[];
8422
+ "creator._id"?: string[] | string;
8423
+ creator_type?: string | string[];
8424
+ teams?: string[] | string;
8425
+ visit_id?: string[] | string;
8426
+ custom_status?: string[] | string;
8427
+ asset_part?: string[] | string;
8428
+ "asset_parts.asset_part"?: string[] | string;
8429
+ from_time?: number;
8430
+ to_time?: number;
8431
+ from_createdAt?: number;
8432
+ to_createdAt?: number;
8433
+ from_updatedAt?: number;
8434
+ to_updatedAt?: number;
8435
+ [key: string]: any;
8436
+ };
8437
+ interface Result extends DefaultPaginationResult {
8438
+ data: Data[] | PopulatedDoc[];
8439
+ }
8440
+ }
8441
+ namespace Get {
8442
+ type ID = string;
8443
+ type Result = Data | PopulatedDoc;
8444
+ }
8445
+ namespace Create {
8446
+ type Body = CreateBody;
8447
+ type Result = Data;
8448
+ }
8449
+ namespace Update {
8450
+ type ID = string;
8451
+ type Body = UpdateBody;
8452
+ type Result = Data;
8453
+ }
8454
+ namespace Patch {
8455
+ type Params = {
8456
+ updateStatus: true;
8457
+ };
8458
+ type Body = {
8459
+ readQuery: [
8460
+ {
8461
+ key: "_id";
8462
+ operator: "in";
8463
+ value: StringId[];
8464
+ }
8465
+ ];
8466
+ writeQuery: {
8467
+ key: "custom_status";
8468
+ command: "set";
8469
+ value: StringId;
8470
+ };
8471
+ };
8472
+ type Result = {
8473
+ nFound: number;
8474
+ nModified: number;
8475
+ };
8476
+ }
8477
+ }
8478
+ namespace AssetPartTransfer {
8479
+ interface Data {
8480
+ _id: StringId;
8481
+ creator: AdminOrRep;
8482
+ editor?: AdminOrRep;
8483
+ transaction_processed: boolean;
8484
+ serial_number: SerialNumber;
8485
+ type: "load" | "unload";
8486
+ from: StringId;
8487
+ to: StringId;
8488
+ from_name?: string;
8489
+ to_name?: string;
8490
+ time: number;
8491
+ status:
8492
+ | "pending"
8493
+ | "approved"
8494
+ | "processing"
8495
+ | "rejected"
8496
+ | "processed"
8497
+ | "failed";
8498
+ sync_id: string;
8499
+ asset_part_units: {
8500
+ asset_part_unit: StringId;
8501
+ qty: number;
8502
+ asset_part?: StringId;
8503
+ asset_part_name?: string;
8504
+ note?: string;
8505
+ splitted_from?: StringId;
8506
+ }[];
8507
+ teams?: StringId[];
8508
+ business_day?: string;
8509
+ asset_part_units_count?: number;
8510
+ total_asset_part_units_qty?: number;
8511
+ custom_status?: StringId;
8512
+ description?: string;
8513
+ process_time?: number;
8514
+ visit_id?: string;
8515
+ integration_meta?: {
8516
+ [key: string]: any;
8517
+ };
8518
+ company_namespace: string[];
8519
+ createdAt: Date;
8520
+ updatedAt: Date;
8521
+ }
8522
+ interface PopulatedDoc {
8523
+ _id: StringId;
8524
+ creator: AdminOrRep;
8525
+ editor?: AdminOrRep;
8526
+ transaction_processed: boolean;
8527
+ serial_number: SerialNumber;
8528
+ type: "load" | "unload";
8529
+ from:
8530
+ | StringId
8531
+ | Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
8532
+ to:
8533
+ | StringId
8534
+ | Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
8535
+ from_name?: string;
8536
+ to_name?: string;
8537
+ time: number;
8538
+ status:
8539
+ | "pending"
8540
+ | "approved"
8541
+ | "processing"
8542
+ | "rejected"
8543
+ | "processed"
8544
+ | "failed";
8545
+ sync_id: string;
8546
+ asset_part_units: {
8547
+ asset_part_unit: StringId | AssetPartUnit.Data;
8548
+ qty: number;
8549
+ asset_part?: StringId | AssetPart.Data;
8550
+ asset_part_name?: string;
8551
+ note?: string;
8552
+ splitted_from?: StringId | AssetPartUnit.Data;
8553
+ }[];
8554
+ teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
8555
+ business_day?: string;
8556
+ asset_part_units_count?: number;
8557
+ total_asset_part_units_qty?: number;
8558
+ custom_status?:
8559
+ | StringId
8560
+ | Pick<CustomStatus.CustomStatusSchema, "_id" | "name" | "local_name">;
8561
+ description?: string;
8562
+ process_time?: number;
8563
+ visit_id?: string;
8564
+ integration_meta?: {
8565
+ [key: string]: any;
8566
+ };
8567
+ company_namespace: string[];
8568
+ createdAt: Date;
8569
+ updatedAt: Date;
8570
+ }
8571
+ interface CreateBody {
8572
+ creator?: AdminOrRep;
8573
+ serial_number: SerialNumber;
8574
+ type: "load" | "unload";
8575
+ from: StringId;
8576
+ to: StringId;
8577
+ from_name?: string;
8578
+ to_name?: string;
8579
+ time: number;
8580
+ transaction_processed?: false;
8581
+ status?: "pending";
8582
+ sync_id: string;
8583
+ asset_part_units: {
8584
+ asset_part_unit: StringId;
8585
+ qty: number;
8586
+ asset_part?: StringId;
8587
+ asset_part_name?: string;
8588
+ note?: string;
8589
+ }[];
8590
+ teams?: StringId[];
8591
+ business_day?: string;
8592
+ asset_part_units_count?: number;
8593
+ total_asset_part_units_qty?: number;
8594
+ custom_status?: StringId;
8595
+ description?: string;
8596
+ visit_id?: string;
8597
+ integration_meta?: {
8598
+ [key: string]: any;
8599
+ };
8600
+ company_namespace: string[];
8601
+ }
8602
+ interface UpdateBody {
8603
+ _id?: StringId;
8604
+ creator?: AdminOrRep;
8605
+ editor?: AdminOrRep;
8606
+ transaction_processed?: boolean;
8607
+ serial_number?: SerialNumber;
8608
+ type?: "load" | "unload";
8609
+ from?: StringId;
8610
+ to?: StringId;
8611
+ from_name?: string;
8612
+ to_name?: string;
8613
+ time?: number;
8614
+ status?:
8615
+ | "pending"
8616
+ | "approved"
8617
+ | "processing"
8618
+ | "rejected"
8619
+ | "processed"
8620
+ | "failed";
8621
+ sync_id?: string;
8622
+ asset_part_units?: {
8623
+ asset_part_unit: StringId;
8624
+ qty: number;
8625
+ asset_part_name?: string;
8626
+ note?: string;
8627
+ splitted_from?: StringId;
8628
+ }[];
8629
+ teams?: StringId[];
8630
+ business_day?: string;
8631
+ asset_part_units_count?: number;
8632
+ total_asset_part_units_qty?: number;
8633
+ custom_status?: StringId;
8634
+ description?: string;
8635
+ process_time?: number;
8636
+ visit_id?: string;
8637
+ integration_meta?: {
8638
+ [key: string]: any;
8639
+ };
8640
+ company_namespace?: string[];
8641
+ createdAt?: Date;
8642
+ updatedAt?: Date;
8643
+ isResubmitted?: boolean;
8644
+ note?: string;
8645
+ stage?: number;
8646
+ }
8647
+ namespace Find {
8648
+ type Params = DefaultPaginationQueryParams & {
8649
+ nodeCycles?: StringId[] | StringId;
8650
+ _id?: StringId[] | StringId;
8651
+ search?: string;
8652
+ "serial_number.formatted"?: string[] | string;
8653
+ sync_id?: string[] | string;
8654
+ "creator._id"?: string[] | string;
8655
+ type?: string[] | string;
8656
+ from?: string[] | string;
8657
+ to?: string[] | string;
8658
+ teams?: string[] | string;
8659
+ visit_id?: string[] | string;
8660
+ custom_status?: string[] | string;
8661
+ transaction_processed?: boolean;
8662
+ "asset_part_units.asset_part_unit"?: string[] | string;
8663
+ from_time?: number;
8664
+ to_time?: number;
8665
+ from_createdAt?: number;
8666
+ to_createdAt?: number;
8667
+ from_updatedAt?: number;
8668
+ to_updatedAt?: number;
8669
+ [key: string]: any;
8670
+ };
8671
+ interface Result extends DefaultPaginationResult {
8672
+ data: Data[] | PopulatedDoc[];
8673
+ }
8674
+ }
8675
+ namespace Get {
8676
+ type ID = StringId;
8677
+ type Result = Data | PopulatedDoc;
8678
+ }
8679
+ namespace Create {
8680
+ type Body = CreateBody;
8681
+ type Result = Data;
8682
+ }
8683
+ namespace Update {
8684
+ type ID = StringId;
8685
+ type Body = UpdateBody;
8686
+ type Result = Data;
8687
+ }
8688
+ namespace Patch {
8689
+ type Params = {
8690
+ updateStatus: true;
8691
+ };
8692
+ type Body = {
8693
+ readQuery: [
8694
+ {
8695
+ key: "_id";
8696
+ operator: "in";
8697
+ value: StringId[];
8698
+ }
8699
+ ];
8700
+ writeQuery: {
8701
+ key: "custom_status";
8702
+ command: "set";
8703
+ value: StringId;
8704
+ };
8705
+ };
8706
+ type Result = {
8707
+ nFound: number;
8708
+ nModified: number;
8709
+ };
8710
+ }
8711
+ }
8712
+ namespace ReturnStoreAssetPartUnit {
8713
+ interface Data {
8714
+ _id: StringId;
8715
+ creator: AdminOrRep;
8716
+ editor?: AdminOrRep;
8717
+ sync_id: string;
8718
+ transaction_processed: boolean;
8719
+ type: "returned" | "stored";
8720
+ client: StringId;
8721
+ client_name: string;
8722
+ warehouse: StringId;
8723
+ warehouse_name: string;
8724
+ teams?: StringId[];
8725
+ time: number;
8726
+ business_day?: string;
8727
+ visit_id?: string;
8728
+ serial_number: SerialNumber;
8729
+ description?: string;
8730
+ custom_status?: StringId;
8731
+ signature?: StringId;
8732
+ media?: StringId[];
8733
+ asset_part_units: {
8734
+ _id?: StringId;
8735
+ asset_part_unit: StringId;
8736
+ qty: number;
8737
+ asset_part?: StringId;
8738
+ asset_part_name?: string;
8739
+ comment?: string;
8740
+ splitted_from?: StringId;
8741
+ }[];
8742
+ asset_part_units_count?: number;
8743
+ total_asset_part_units_qty?: number;
8744
+ integration_meta?: {
8745
+ [key: string]: any;
8746
+ };
8747
+ company_namespace: string[];
8748
+ createdAt: Date;
8749
+ updatedAt: Date;
8750
+ }
8751
+ interface PopulatedDoc {
8752
+ _id: StringId;
8753
+ creator: AdminOrRep;
8754
+ editor?: AdminOrRep;
8755
+ sync_id: string;
8756
+ transaction_processed: boolean;
8757
+ type: "returned" | "stored";
8758
+ client:
8759
+ | StringId
8760
+ | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
8761
+ client_name: string;
8762
+ warehouse:
8763
+ | StringId
8764
+ | Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
8765
+ warehouse_name: string;
8766
+ teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
8767
+ time: number;
8768
+ business_day?: string;
8769
+ visit_id?: string;
8770
+ serial_number: SerialNumber;
8771
+ description?: string;
8772
+ custom_status?:
8773
+ | StringId
8774
+ | Pick<CustomStatus.CustomStatusSchema, "_id" | "name" | "local_name">;
8775
+ signature?: StringId;
8776
+ media?: StringId[];
8777
+ asset_part_units: {
8778
+ _id: StringId;
8779
+ asset_part_unit: StringId | AssetPartUnit.Data;
8780
+ qty: number;
8781
+ asset_part?: StringId | AssetPart.Data;
8782
+ asset_part_name?: string;
8783
+ comment?: string;
8784
+ splitted_from?: StringId | AssetPartUnit.Data;
8785
+ }[];
8786
+ asset_part_units_count?: number;
8787
+ total_asset_part_units_qty?: number;
8788
+ integration_meta?: {
8789
+ [key: string]: any;
8790
+ };
8791
+ company_namespace: string[];
8792
+ createdAt: Date;
8793
+ updatedAt: Date;
8794
+ }
8795
+ interface CreateBody {
8796
+ creator?: AdminOrRep;
8797
+ editor?: AdminOrRep;
8798
+ type: "returned" | "stored";
8799
+ sync_id: string;
8800
+ transaction_processed: boolean;
8801
+ serial_number?: SerialNumber;
8802
+ client: StringId;
8803
+ client_name?: string;
8804
+ warehouse: StringId;
8805
+ warehouse_name?: string;
8806
+ teams?: StringId[];
8807
+ time: number;
8808
+ business_day?: string;
8809
+ visit_id?: string;
8810
+ description?: string;
8811
+ custom_status?: StringId;
8812
+ signature?: StringId;
8813
+ media?: StringId[];
8814
+ asset_part_units: {
8815
+ _id?: StringId;
8816
+ asset_part_unit: StringId;
8817
+ qty: number;
8818
+ asset_part?: StringId;
8819
+ asset_part_name?: string;
8820
+ comment?: string;
8821
+ }[];
8822
+ integration_meta?: {
8823
+ [key: string]: any;
8824
+ };
8825
+ asset_part_units_count?: number;
8826
+ total_asset_part_units_qty?: number;
8827
+ company_namespace: string[];
8828
+ }
8829
+ interface UpdateBody {
8830
+ editor?: AdminOrRep;
8831
+ description?: string;
8832
+ custom_status?: StringId;
8833
+ media?: StringId[];
8834
+ integration_meta?: {
8835
+ [key: string]: any;
8836
+ };
8837
+ }
8838
+ namespace Find {
8839
+ type Params = DefaultPaginationQueryParams & {
8840
+ _id?: StringId[] | StringId;
8841
+ search?: string;
8842
+ "serial_number.formatted"?: string[] | string;
8843
+ sync_id?: string[] | string;
8844
+ client?: string[] | string;
8845
+ warehouse?: string[] | string;
8846
+ "creator._id"?: string[] | string;
8847
+ teams?: string[] | string;
8848
+ visit_id?: string[] | string;
8849
+ custom_status?: string[] | string;
8850
+ "asset_parts.asset_part"?: string[] | string;
8851
+ "asset_parts.asset_part_unit"?: string[] | string;
8852
+ from_time?: number;
8853
+ to_time?: number;
8854
+ from_createdAt?: number;
8855
+ to_createdAt?: number;
8856
+ from_updatedAt?: number;
8857
+ to_updatedAt?: number;
8858
+ [key: string]: any;
8859
+ };
8860
+ interface Result extends DefaultPaginationResult {
8861
+ data: Data[] | PopulatedDoc[];
8862
+ }
8863
+ }
8864
+ namespace Get {
8865
+ type ID = string;
8866
+ type Result = Data | PopulatedDoc;
8867
+ }
8868
+ namespace Create {
8869
+ type Body = CreateBody;
8870
+ type Result = Data;
8871
+ }
8872
+ namespace Update {
8873
+ type ID = string;
8874
+ type Body = UpdateBody;
8875
+ type Result = Data;
8876
+ }
8877
+ namespace Patch {
8878
+ type Params = {
8879
+ updateStatus: true;
8880
+ };
8881
+ type Body = {
8882
+ readQuery: [
8883
+ {
8884
+ key: "_id";
8885
+ operator: "in";
8886
+ value: StringId[];
8887
+ }
8888
+ ];
8889
+ writeQuery: {
8890
+ key: "custom_status";
8891
+ command: "set";
8892
+ value: StringId;
8893
+ };
8894
+ };
8895
+ type Result = {
8896
+ nFound: number;
8897
+ nModified: number;
8898
+ };
8899
+ }
8900
+ }
8901
+ }
8902
+ export declare type StringId = string;
8903
+ export declare type NameSpaces = string[];
8904
+ export interface AdminOrRep {
8905
+ _id: StringId;
8906
+ name?: string;
8907
+ type: "admin" | "rep";
8908
+ admin?: StringId;
8909
+ rep?: StringId;
7936
8910
  }
7937
- export type StringId = string;
7938
- export type NameSpaces = string[];
7939
8911
  export {};