repzo 1.0.83 → 1.0.85
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 -1
- package/lib/index.d.ts +122 -105
- package/lib/index.js +49 -7
- package/lib/types/index.d.ts +390 -37
- package/package.json +1 -1
- package/src/index.ts +77 -22
- package/src/types/index.ts +367 -37
package/src/types/index.ts
CHANGED
|
@@ -1713,7 +1713,8 @@ export namespace Service {
|
|
|
1713
1713
|
| "doc"
|
|
1714
1714
|
| "docx"
|
|
1715
1715
|
| "images"
|
|
1716
|
-
| "zip"
|
|
1716
|
+
| "zip"
|
|
1717
|
+
| "pt";
|
|
1717
1718
|
|
|
1718
1719
|
type ParentDocumentType =
|
|
1719
1720
|
| "clients"
|
|
@@ -1765,7 +1766,14 @@ export namespace Service {
|
|
|
1765
1766
|
| "contract"
|
|
1766
1767
|
| "contractInstallment"
|
|
1767
1768
|
| "form"
|
|
1768
|
-
| "paymentMethod"
|
|
1769
|
+
| "paymentMethod"
|
|
1770
|
+
| "aiObjectDetectionModelVersion"
|
|
1771
|
+
| "aiObjectDetectionTask"
|
|
1772
|
+
| "assetPart"
|
|
1773
|
+
| "assetPartReceival"
|
|
1774
|
+
| "assetPartUnit"
|
|
1775
|
+
| "returnAssetPartUnit"
|
|
1776
|
+
| "storeAssetPartUnit";
|
|
1769
1777
|
|
|
1770
1778
|
type SourceEnums =
|
|
1771
1779
|
| "product"
|
|
@@ -1808,6 +1816,26 @@ export namespace Service {
|
|
|
1808
1816
|
createdAt: string;
|
|
1809
1817
|
updatedAt: string;
|
|
1810
1818
|
}
|
|
1819
|
+
export interface Thumbnail {
|
|
1820
|
+
_id: StringId;
|
|
1821
|
+
ContentLength?: number;
|
|
1822
|
+
ETag?: string;
|
|
1823
|
+
ContentType?: string;
|
|
1824
|
+
Metadata?: { [key: string]: any };
|
|
1825
|
+
key?: string;
|
|
1826
|
+
file_name: string;
|
|
1827
|
+
mime_type?: string;
|
|
1828
|
+
publicUrl?: string;
|
|
1829
|
+
type_name?: "FileAttachment" | "ImageAttachment";
|
|
1830
|
+
width?: number;
|
|
1831
|
+
height?: number;
|
|
1832
|
+
extension?: string;
|
|
1833
|
+
bucket_name?: string;
|
|
1834
|
+
region?: string;
|
|
1835
|
+
company_namespace: string[];
|
|
1836
|
+
createdAt: string;
|
|
1837
|
+
updatedAt: string;
|
|
1838
|
+
}
|
|
1811
1839
|
export interface CreateBody {
|
|
1812
1840
|
ContentLength?: number;
|
|
1813
1841
|
ETag?: string;
|
|
@@ -3543,7 +3571,13 @@ export namespace Service {
|
|
|
3543
3571
|
| "proformas"
|
|
3544
3572
|
| "fullinvoices"
|
|
3545
3573
|
| "transfers"
|
|
3546
|
-
| "payments"
|
|
3574
|
+
| "payments"
|
|
3575
|
+
| "workorder"
|
|
3576
|
+
| "assetPartReceival"
|
|
3577
|
+
| "assetPartUnit"
|
|
3578
|
+
| "assetPartTransfer"
|
|
3579
|
+
| "returnAssetPartUnit"
|
|
3580
|
+
| "storeAssetPartUnit";
|
|
3547
3581
|
export interface CustomStatusSchema {
|
|
3548
3582
|
_id: string;
|
|
3549
3583
|
name: string;
|
|
@@ -7930,7 +7964,6 @@ export namespace Service {
|
|
|
7930
7964
|
search?: string;
|
|
7931
7965
|
name?: string[] | string;
|
|
7932
7966
|
color?: string[] | string;
|
|
7933
|
-
local_name?: string[] | string;
|
|
7934
7967
|
disabled?: boolean;
|
|
7935
7968
|
from_updatedAt?: number;
|
|
7936
7969
|
to_updatedAt?: number;
|
|
@@ -8006,8 +8039,8 @@ export namespace Service {
|
|
|
8006
8039
|
customFields?: { [key: string]: string | number | boolean };
|
|
8007
8040
|
disabled: boolean;
|
|
8008
8041
|
integration_meta?: { [key: string]: any };
|
|
8009
|
-
media?: StringId[]
|
|
8010
|
-
cover_photo?: StringId
|
|
8042
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
8043
|
+
cover_photo?: StringId | PopulatedMediaStorage;
|
|
8011
8044
|
company_namespace: string[];
|
|
8012
8045
|
createdAt: Date;
|
|
8013
8046
|
updatedAt: Date;
|
|
@@ -8063,9 +8096,28 @@ export namespace Service {
|
|
|
8063
8096
|
disabled?: boolean;
|
|
8064
8097
|
from_updatedAt?: number;
|
|
8065
8098
|
to_updatedAt?: number;
|
|
8099
|
+
from_createdAt?: number;
|
|
8100
|
+
to_createdAt?: number;
|
|
8066
8101
|
asset_part_types?: string[] | string;
|
|
8067
8102
|
assets?: string[] | string;
|
|
8068
8103
|
asset_units?: string[] | string;
|
|
8104
|
+
populatesKeys?: (
|
|
8105
|
+
| "asset_part_types"
|
|
8106
|
+
| "assets"
|
|
8107
|
+
| "asset_units"
|
|
8108
|
+
| "media"
|
|
8109
|
+
| "cover_photo"
|
|
8110
|
+
)[];
|
|
8111
|
+
sortBy: {
|
|
8112
|
+
field:
|
|
8113
|
+
| "_id"
|
|
8114
|
+
| "name"
|
|
8115
|
+
| "barcode"
|
|
8116
|
+
| "model"
|
|
8117
|
+
| "createdAt"
|
|
8118
|
+
| "updatedAt";
|
|
8119
|
+
type: "asc" | "desc";
|
|
8120
|
+
}[];
|
|
8069
8121
|
[key: string]: any; // integration_meta.
|
|
8070
8122
|
};
|
|
8071
8123
|
export interface Result extends DefaultPaginationResult {
|
|
@@ -8152,10 +8204,13 @@ export namespace Service {
|
|
|
8152
8204
|
qty: number;
|
|
8153
8205
|
custom_status?:
|
|
8154
8206
|
| StringId
|
|
8155
|
-
| Pick<
|
|
8207
|
+
| Pick<
|
|
8208
|
+
CustomStatus.CustomStatusSchema,
|
|
8209
|
+
"_id" | "name" | "local_name" | "code" | "color"
|
|
8210
|
+
>;
|
|
8156
8211
|
receival_comment?: string;
|
|
8157
8212
|
comment?: string;
|
|
8158
|
-
media?: StringId[];
|
|
8213
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
8159
8214
|
teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
|
|
8160
8215
|
integration_meta?: { [key: string]: any };
|
|
8161
8216
|
company_namespace: string[];
|
|
@@ -8207,11 +8262,27 @@ export namespace Service {
|
|
|
8207
8262
|
to_qty?: number;
|
|
8208
8263
|
qty?: number;
|
|
8209
8264
|
custom_status?: StringId[] | StringId;
|
|
8265
|
+
directional_status?:
|
|
8266
|
+
| Data["directional_status"]
|
|
8267
|
+
| Data["directional_status"][];
|
|
8210
8268
|
teams?: StringId[] | StringId;
|
|
8211
8269
|
from_updatedAt?: number;
|
|
8212
8270
|
to_updatedAt?: number;
|
|
8213
8271
|
from_createdAt?: number;
|
|
8214
8272
|
to_createdAt?: number;
|
|
8273
|
+
populatesKeys?: (
|
|
8274
|
+
| "asset_part_receival"
|
|
8275
|
+
| "asset_part"
|
|
8276
|
+
| "client"
|
|
8277
|
+
| "warehouse"
|
|
8278
|
+
| "teams"
|
|
8279
|
+
| "custom_status"
|
|
8280
|
+
| "media"
|
|
8281
|
+
)[];
|
|
8282
|
+
sortBy: {
|
|
8283
|
+
field: "_id" | "asset_part_index" | "createdAt" | "updatedAt";
|
|
8284
|
+
type: "asc" | "desc";
|
|
8285
|
+
}[];
|
|
8215
8286
|
[key: string]: any; // integration_meta.
|
|
8216
8287
|
};
|
|
8217
8288
|
export interface Result extends DefaultPaginationResult {
|
|
@@ -8250,7 +8321,6 @@ export namespace Service {
|
|
|
8250
8321
|
signature?: StringId;
|
|
8251
8322
|
media?: StringId[];
|
|
8252
8323
|
asset_parts: {
|
|
8253
|
-
_id: StringId;
|
|
8254
8324
|
asset_part: StringId;
|
|
8255
8325
|
asset_part_name: string;
|
|
8256
8326
|
qty: number;
|
|
@@ -8285,9 +8355,12 @@ export namespace Service {
|
|
|
8285
8355
|
description?: string;
|
|
8286
8356
|
custom_status?:
|
|
8287
8357
|
| StringId
|
|
8288
|
-
| Pick<
|
|
8289
|
-
|
|
8290
|
-
|
|
8358
|
+
| Pick<
|
|
8359
|
+
CustomStatus.CustomStatusSchema,
|
|
8360
|
+
"_id" | "name" | "local_name" | "code" | "color"
|
|
8361
|
+
>;
|
|
8362
|
+
signature?: StringId | PopulatedMediaStorage;
|
|
8363
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
8291
8364
|
asset_parts: {
|
|
8292
8365
|
_id: StringId;
|
|
8293
8366
|
asset_part: StringId | AssetPart.Data;
|
|
@@ -8332,6 +8405,7 @@ export namespace Service {
|
|
|
8332
8405
|
company_namespace: string[];
|
|
8333
8406
|
}
|
|
8334
8407
|
export interface UpdateBody {
|
|
8408
|
+
editor?: AdminOrRep;
|
|
8335
8409
|
description?: string;
|
|
8336
8410
|
custom_status?: StringId;
|
|
8337
8411
|
media?: StringId[];
|
|
@@ -8361,6 +8435,19 @@ export namespace Service {
|
|
|
8361
8435
|
to_createdAt?: number;
|
|
8362
8436
|
from_updatedAt?: number;
|
|
8363
8437
|
to_updatedAt?: number;
|
|
8438
|
+
populatesKeys?: (
|
|
8439
|
+
| "asset_part"
|
|
8440
|
+
| "client"
|
|
8441
|
+
| "warehouse"
|
|
8442
|
+
| "teams"
|
|
8443
|
+
| "custom_status"
|
|
8444
|
+
| "media"
|
|
8445
|
+
| "signature"
|
|
8446
|
+
)[];
|
|
8447
|
+
sortBy: {
|
|
8448
|
+
field: "_id" | "time" | "createdAt" | "updatedAt";
|
|
8449
|
+
type: "asc" | "desc";
|
|
8450
|
+
}[];
|
|
8364
8451
|
[key: string]: any; // integration_meta.
|
|
8365
8452
|
};
|
|
8366
8453
|
export interface Result extends DefaultPaginationResult {
|
|
@@ -8414,6 +8501,7 @@ export namespace Service {
|
|
|
8414
8501
|
asset_part_units: {
|
|
8415
8502
|
asset_part_unit: StringId;
|
|
8416
8503
|
qty: number;
|
|
8504
|
+
asset_part?: StringId;
|
|
8417
8505
|
asset_part_name?: string;
|
|
8418
8506
|
note?: string;
|
|
8419
8507
|
splitted_from?: StringId;
|
|
@@ -8458,6 +8546,7 @@ export namespace Service {
|
|
|
8458
8546
|
asset_part_units: {
|
|
8459
8547
|
asset_part_unit: StringId | AssetPartUnit.Data;
|
|
8460
8548
|
qty: number;
|
|
8549
|
+
asset_part?: StringId | AssetPart.Data;
|
|
8461
8550
|
asset_part_name?: string;
|
|
8462
8551
|
note?: string;
|
|
8463
8552
|
splitted_from?: StringId | AssetPartUnit.Data;
|
|
@@ -8468,7 +8557,10 @@ export namespace Service {
|
|
|
8468
8557
|
total_asset_part_units_qty?: number;
|
|
8469
8558
|
custom_status?:
|
|
8470
8559
|
| StringId
|
|
8471
|
-
| Pick<
|
|
8560
|
+
| Pick<
|
|
8561
|
+
CustomStatus.CustomStatusSchema,
|
|
8562
|
+
"_id" | "name" | "local_name" | "code" | "color"
|
|
8563
|
+
>;
|
|
8472
8564
|
description?: string;
|
|
8473
8565
|
process_time?: number;
|
|
8474
8566
|
visit_id?: string;
|
|
@@ -8492,6 +8584,7 @@ export namespace Service {
|
|
|
8492
8584
|
asset_part_units: {
|
|
8493
8585
|
asset_part_unit: StringId;
|
|
8494
8586
|
qty: number;
|
|
8587
|
+
asset_part?: StringId;
|
|
8495
8588
|
asset_part_name?: string;
|
|
8496
8589
|
note?: string;
|
|
8497
8590
|
}[];
|
|
@@ -8544,6 +8637,9 @@ export namespace Service {
|
|
|
8544
8637
|
company_namespace?: string[];
|
|
8545
8638
|
createdAt?: Date;
|
|
8546
8639
|
updatedAt?: Date;
|
|
8640
|
+
isResubmitted?: boolean;
|
|
8641
|
+
note?: string;
|
|
8642
|
+
stage?: number;
|
|
8547
8643
|
}
|
|
8548
8644
|
|
|
8549
8645
|
export namespace Find {
|
|
@@ -8551,23 +8647,37 @@ export namespace Service {
|
|
|
8551
8647
|
nodeCycles?: StringId[] | StringId;
|
|
8552
8648
|
_id?: StringId[] | StringId;
|
|
8553
8649
|
search?: string; // serial_number.formatted
|
|
8650
|
+
serial_number?: string[] | string;
|
|
8554
8651
|
"serial_number.formatted"?: string[] | string;
|
|
8555
8652
|
sync_id?: string[] | string;
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8653
|
+
creator?: StringId[] | StringId;
|
|
8654
|
+
creator_type?: Data["creator"]["type"] | Data["creator"]["type"][];
|
|
8655
|
+
"creator._id"?: StringId[] | StringId;
|
|
8656
|
+
type?: Data["type"][] | Data["type"];
|
|
8657
|
+
from?: StringId[] | StringId;
|
|
8658
|
+
to?: StringId[] | StringId;
|
|
8659
|
+
teams?: StringId[] | StringId;
|
|
8561
8660
|
visit_id?: string[] | string;
|
|
8562
|
-
custom_status?:
|
|
8661
|
+
custom_status?: StringId[] | StringId;
|
|
8563
8662
|
transaction_processed?: boolean;
|
|
8564
|
-
|
|
8663
|
+
asset_part_unit?: StringId[] | StringId;
|
|
8664
|
+
"asset_part_units.asset_part_unit"?: StringId[] | StringId;
|
|
8565
8665
|
from_time?: number;
|
|
8566
8666
|
to_time?: number;
|
|
8567
8667
|
from_createdAt?: number;
|
|
8568
8668
|
to_createdAt?: number;
|
|
8569
8669
|
from_updatedAt?: number;
|
|
8570
8670
|
to_updatedAt?: number;
|
|
8671
|
+
populatesKeys?: (
|
|
8672
|
+
| "asset_part_unit"
|
|
8673
|
+
| "warehouse"
|
|
8674
|
+
| "teams"
|
|
8675
|
+
| "custom_status"
|
|
8676
|
+
)[];
|
|
8677
|
+
sortBy: {
|
|
8678
|
+
field: "_id" | "time" | "createdAt" | "updatedAt";
|
|
8679
|
+
type: "asc" | "desc";
|
|
8680
|
+
}[];
|
|
8571
8681
|
[key: string]: any; // integration_meta.
|
|
8572
8682
|
};
|
|
8573
8683
|
export interface Result extends DefaultPaginationResult {
|
|
@@ -8597,14 +8707,13 @@ export namespace Service {
|
|
|
8597
8707
|
}
|
|
8598
8708
|
}
|
|
8599
8709
|
|
|
8600
|
-
export namespace
|
|
8710
|
+
export namespace ReturnAssetPartUnit {
|
|
8601
8711
|
export interface Data {
|
|
8602
8712
|
_id: StringId;
|
|
8603
8713
|
creator: AdminOrRep;
|
|
8604
8714
|
editor?: AdminOrRep;
|
|
8605
8715
|
sync_id: string;
|
|
8606
8716
|
transaction_processed: boolean;
|
|
8607
|
-
type: "returned" | "stored";
|
|
8608
8717
|
client: StringId;
|
|
8609
8718
|
client_name: string;
|
|
8610
8719
|
warehouse: StringId;
|
|
@@ -8619,7 +8728,7 @@ export namespace Service {
|
|
|
8619
8728
|
signature?: StringId;
|
|
8620
8729
|
media?: StringId[];
|
|
8621
8730
|
asset_part_units: {
|
|
8622
|
-
_id
|
|
8731
|
+
_id?: StringId;
|
|
8623
8732
|
asset_part_unit: StringId;
|
|
8624
8733
|
qty: number;
|
|
8625
8734
|
asset_part?: StringId;
|
|
@@ -8640,7 +8749,6 @@ export namespace Service {
|
|
|
8640
8749
|
editor?: AdminOrRep;
|
|
8641
8750
|
sync_id: string;
|
|
8642
8751
|
transaction_processed: boolean;
|
|
8643
|
-
type: "returned" | "stored";
|
|
8644
8752
|
client:
|
|
8645
8753
|
| StringId
|
|
8646
8754
|
| Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
|
|
@@ -8657,9 +8765,12 @@ export namespace Service {
|
|
|
8657
8765
|
description?: string;
|
|
8658
8766
|
custom_status?:
|
|
8659
8767
|
| StringId
|
|
8660
|
-
| Pick<
|
|
8661
|
-
|
|
8662
|
-
|
|
8768
|
+
| Pick<
|
|
8769
|
+
CustomStatus.CustomStatusSchema,
|
|
8770
|
+
"_id" | "name" | "local_name" | "code" | "color"
|
|
8771
|
+
>;
|
|
8772
|
+
signature?: StringId | PopulatedMediaStorage;
|
|
8773
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
8663
8774
|
asset_part_units: {
|
|
8664
8775
|
_id: StringId;
|
|
8665
8776
|
asset_part_unit: StringId | AssetPartUnit.Data;
|
|
@@ -8667,6 +8778,7 @@ export namespace Service {
|
|
|
8667
8778
|
asset_part?: StringId | AssetPart.Data;
|
|
8668
8779
|
asset_part_name?: string;
|
|
8669
8780
|
comment?: string;
|
|
8781
|
+
splitted_from?: StringId | AssetPartUnit.Data;
|
|
8670
8782
|
}[];
|
|
8671
8783
|
asset_part_units_count?: number;
|
|
8672
8784
|
total_asset_part_units_qty?: number;
|
|
@@ -8678,23 +8790,200 @@ export namespace Service {
|
|
|
8678
8790
|
export interface CreateBody {
|
|
8679
8791
|
creator?: AdminOrRep;
|
|
8680
8792
|
editor?: AdminOrRep;
|
|
8681
|
-
type: "returned" | "stored";
|
|
8682
8793
|
sync_id: string;
|
|
8683
|
-
transaction_processed:
|
|
8794
|
+
transaction_processed: boolean;
|
|
8684
8795
|
serial_number?: SerialNumber;
|
|
8685
8796
|
client: StringId;
|
|
8686
|
-
client_name
|
|
8797
|
+
client_name?: string;
|
|
8798
|
+
warehouse: StringId;
|
|
8799
|
+
warehouse_name?: string;
|
|
8800
|
+
teams?: StringId[];
|
|
8801
|
+
time: number;
|
|
8802
|
+
business_day?: string;
|
|
8803
|
+
visit_id?: string;
|
|
8804
|
+
description?: string;
|
|
8805
|
+
custom_status?: StringId;
|
|
8806
|
+
signature?: StringId;
|
|
8807
|
+
media?: StringId[];
|
|
8808
|
+
asset_part_units: {
|
|
8809
|
+
_id?: StringId;
|
|
8810
|
+
asset_part_unit: StringId;
|
|
8811
|
+
qty: number;
|
|
8812
|
+
asset_part?: StringId;
|
|
8813
|
+
asset_part_name?: string;
|
|
8814
|
+
comment?: string;
|
|
8815
|
+
}[];
|
|
8816
|
+
integration_meta?: { [key: string]: any };
|
|
8817
|
+
asset_part_units_count?: number;
|
|
8818
|
+
total_asset_part_units_qty?: number;
|
|
8819
|
+
company_namespace: string[];
|
|
8820
|
+
}
|
|
8821
|
+
export interface UpdateBody {
|
|
8822
|
+
editor?: AdminOrRep;
|
|
8823
|
+
description?: string;
|
|
8824
|
+
custom_status?: StringId;
|
|
8825
|
+
media?: StringId[];
|
|
8826
|
+
integration_meta?: { [key: string]: any };
|
|
8827
|
+
}
|
|
8828
|
+
|
|
8829
|
+
export namespace Find {
|
|
8830
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
8831
|
+
_id?: StringId[] | StringId;
|
|
8832
|
+
search?: string; // serial_number.formatted
|
|
8833
|
+
serial_number?: string[] | string;
|
|
8834
|
+
"serial_number.formatted"?: string[] | string;
|
|
8835
|
+
sync_id?: string[] | string;
|
|
8836
|
+
client?: StringId[] | StringId;
|
|
8837
|
+
warehouse?: StringId[] | StringId;
|
|
8838
|
+
"creator._id"?: StringId[] | StringId;
|
|
8839
|
+
"creator.type"?: string[] | string;
|
|
8840
|
+
creator?: StringId[] | StringId;
|
|
8841
|
+
creator_type?: string[] | string;
|
|
8842
|
+
teams?: StringId[] | StringId;
|
|
8843
|
+
visit_id?: string[] | string;
|
|
8844
|
+
custom_status?: StringId[] | StringId;
|
|
8845
|
+
asset_part_unit?: StringId[] | StringId;
|
|
8846
|
+
"asset_part_units.asset_part_unit"?: StringId[] | StringId;
|
|
8847
|
+
from_time?: number;
|
|
8848
|
+
to_time?: number;
|
|
8849
|
+
from_createdAt?: number;
|
|
8850
|
+
to_createdAt?: number;
|
|
8851
|
+
from_updatedAt?: number;
|
|
8852
|
+
to_updatedAt?: number;
|
|
8853
|
+
populatesKeys?: (
|
|
8854
|
+
| "client"
|
|
8855
|
+
| "asset_part_unit"
|
|
8856
|
+
| "warehouse"
|
|
8857
|
+
| "teams"
|
|
8858
|
+
| "custom_status"
|
|
8859
|
+
| "meadia"
|
|
8860
|
+
| "signature"
|
|
8861
|
+
)[];
|
|
8862
|
+
sortBy: {
|
|
8863
|
+
field: "_id" | "time" | "createdAt" | "updatedAt";
|
|
8864
|
+
type: "asc" | "desc";
|
|
8865
|
+
}[];
|
|
8866
|
+
[key: string]: any; // integration_meta.
|
|
8867
|
+
};
|
|
8868
|
+
export interface Result extends DefaultPaginationResult {
|
|
8869
|
+
data: Data[] | PopulatedDoc[];
|
|
8870
|
+
}
|
|
8871
|
+
}
|
|
8872
|
+
export namespace Get {
|
|
8873
|
+
export type ID = string;
|
|
8874
|
+
export type Result = Data | PopulatedDoc;
|
|
8875
|
+
}
|
|
8876
|
+
export namespace Create {
|
|
8877
|
+
export type Body = CreateBody;
|
|
8878
|
+
export type Result = Data;
|
|
8879
|
+
}
|
|
8880
|
+
export namespace Update {
|
|
8881
|
+
export type ID = string;
|
|
8882
|
+
export type Body = UpdateBody;
|
|
8883
|
+
export type Result = Data;
|
|
8884
|
+
}
|
|
8885
|
+
export namespace Patch {
|
|
8886
|
+
export type Params = { updateStatus: true };
|
|
8887
|
+
export type Body = {
|
|
8888
|
+
readQuery: [{ key: "_id"; operator: "in"; value: StringId[] }];
|
|
8889
|
+
writeQuery: { key: "custom_status"; command: "set"; value: StringId };
|
|
8890
|
+
};
|
|
8891
|
+
export type Result = { nFound: number; nModified: number };
|
|
8892
|
+
}
|
|
8893
|
+
}
|
|
8894
|
+
|
|
8895
|
+
export namespace StoreAssetPartUnit {
|
|
8896
|
+
export interface Data {
|
|
8897
|
+
_id: StringId;
|
|
8898
|
+
creator: AdminOrRep;
|
|
8899
|
+
editor?: AdminOrRep;
|
|
8900
|
+
sync_id: string;
|
|
8901
|
+
transaction_processed: boolean;
|
|
8687
8902
|
warehouse: StringId;
|
|
8688
8903
|
warehouse_name: string;
|
|
8689
8904
|
teams?: StringId[];
|
|
8690
8905
|
time: number;
|
|
8691
8906
|
business_day?: string;
|
|
8692
8907
|
visit_id?: string;
|
|
8908
|
+
serial_number: SerialNumber;
|
|
8693
8909
|
description?: string;
|
|
8694
8910
|
custom_status?: StringId;
|
|
8695
8911
|
signature?: StringId;
|
|
8696
8912
|
media?: StringId[];
|
|
8697
8913
|
asset_part_units: {
|
|
8914
|
+
_id?: StringId;
|
|
8915
|
+
asset_part_unit: StringId;
|
|
8916
|
+
qty: number;
|
|
8917
|
+
asset_part?: StringId;
|
|
8918
|
+
asset_part_name?: string;
|
|
8919
|
+
comment?: string;
|
|
8920
|
+
splitted_from?: StringId;
|
|
8921
|
+
}[];
|
|
8922
|
+
asset_part_units_count?: number;
|
|
8923
|
+
total_asset_part_units_qty?: number;
|
|
8924
|
+
integration_meta?: { [key: string]: any };
|
|
8925
|
+
company_namespace: string[];
|
|
8926
|
+
createdAt: Date;
|
|
8927
|
+
updatedAt: Date;
|
|
8928
|
+
}
|
|
8929
|
+
export interface PopulatedDoc {
|
|
8930
|
+
_id: StringId;
|
|
8931
|
+
creator: AdminOrRep;
|
|
8932
|
+
editor?: AdminOrRep;
|
|
8933
|
+
sync_id: string;
|
|
8934
|
+
transaction_processed: boolean;
|
|
8935
|
+
warehouse:
|
|
8936
|
+
| StringId
|
|
8937
|
+
| Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
|
|
8938
|
+
warehouse_name: string;
|
|
8939
|
+
teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
|
|
8940
|
+
time: number;
|
|
8941
|
+
business_day?: string;
|
|
8942
|
+
visit_id?: string;
|
|
8943
|
+
serial_number: SerialNumber;
|
|
8944
|
+
description?: string;
|
|
8945
|
+
custom_status?:
|
|
8946
|
+
| StringId
|
|
8947
|
+
| Pick<
|
|
8948
|
+
CustomStatus.CustomStatusSchema,
|
|
8949
|
+
"_id" | "name" | "local_name" | "code" | "color"
|
|
8950
|
+
>;
|
|
8951
|
+
signature?: StringId | PopulatedMediaStorage;
|
|
8952
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
8953
|
+
asset_part_units: {
|
|
8954
|
+
_id: StringId;
|
|
8955
|
+
asset_part_unit: StringId | AssetPartUnit.Data;
|
|
8956
|
+
qty: number;
|
|
8957
|
+
asset_part?: StringId | AssetPart.Data;
|
|
8958
|
+
asset_part_name?: string;
|
|
8959
|
+
comment?: string;
|
|
8960
|
+
splitted_from?: StringId | AssetPartUnit.Data;
|
|
8961
|
+
}[];
|
|
8962
|
+
asset_part_units_count?: number;
|
|
8963
|
+
total_asset_part_units_qty?: number;
|
|
8964
|
+
integration_meta?: { [key: string]: any };
|
|
8965
|
+
company_namespace: string[];
|
|
8966
|
+
createdAt: Date;
|
|
8967
|
+
updatedAt: Date;
|
|
8968
|
+
}
|
|
8969
|
+
export interface CreateBody {
|
|
8970
|
+
creator?: AdminOrRep;
|
|
8971
|
+
editor?: AdminOrRep;
|
|
8972
|
+
sync_id: string;
|
|
8973
|
+
transaction_processed: boolean;
|
|
8974
|
+
serial_number?: SerialNumber;
|
|
8975
|
+
warehouse: StringId;
|
|
8976
|
+
warehouse_name?: string;
|
|
8977
|
+
teams?: StringId[];
|
|
8978
|
+
time: number;
|
|
8979
|
+
business_day?: string;
|
|
8980
|
+
visit_id?: string;
|
|
8981
|
+
description?: string;
|
|
8982
|
+
custom_status?: StringId;
|
|
8983
|
+
signature?: StringId;
|
|
8984
|
+
media?: StringId[];
|
|
8985
|
+
asset_part_units: {
|
|
8986
|
+
_id?: StringId;
|
|
8698
8987
|
asset_part_unit: StringId;
|
|
8699
8988
|
qty: number;
|
|
8700
8989
|
asset_part?: StringId;
|
|
@@ -8707,6 +8996,7 @@ export namespace Service {
|
|
|
8707
8996
|
company_namespace: string[];
|
|
8708
8997
|
}
|
|
8709
8998
|
export interface UpdateBody {
|
|
8999
|
+
editor?: AdminOrRep;
|
|
8710
9000
|
description?: string;
|
|
8711
9001
|
custom_status?: StringId;
|
|
8712
9002
|
media?: StringId[];
|
|
@@ -8717,22 +9007,37 @@ export namespace Service {
|
|
|
8717
9007
|
export type Params = DefaultPaginationQueryParams & {
|
|
8718
9008
|
_id?: StringId[] | StringId;
|
|
8719
9009
|
search?: string; // serial_number.formatted
|
|
9010
|
+
serial_number?: string[] | string;
|
|
8720
9011
|
"serial_number.formatted"?: string[] | string;
|
|
8721
9012
|
sync_id?: string[] | string;
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
9013
|
+
warehouse?: StringId[] | StringId;
|
|
9014
|
+
creator?: StringId[] | StringId;
|
|
9015
|
+
creator_type?: string[] | string;
|
|
9016
|
+
"creator._id"?: StringId[] | StringId;
|
|
9017
|
+
"creator.type"?: string[] | string;
|
|
9018
|
+
teams?: StringId[] | StringId;
|
|
8726
9019
|
visit_id?: string[] | string;
|
|
8727
|
-
custom_status?:
|
|
8728
|
-
"
|
|
8729
|
-
|
|
9020
|
+
custom_status?: StringId[] | StringId;
|
|
9021
|
+
"asset_part_units.asset_part_unit"?: StringId[] | StringId;
|
|
9022
|
+
asset_part_unit?: StringId[] | StringId;
|
|
8730
9023
|
from_time?: number;
|
|
8731
9024
|
to_time?: number;
|
|
8732
9025
|
from_createdAt?: number;
|
|
8733
9026
|
to_createdAt?: number;
|
|
8734
9027
|
from_updatedAt?: number;
|
|
8735
9028
|
to_updatedAt?: number;
|
|
9029
|
+
populatesKeys?: (
|
|
9030
|
+
| "asset_part_unit"
|
|
9031
|
+
| "warehouse"
|
|
9032
|
+
| "teams"
|
|
9033
|
+
| "custom_status"
|
|
9034
|
+
| "meadia"
|
|
9035
|
+
| "signature"
|
|
9036
|
+
)[];
|
|
9037
|
+
sortBy: {
|
|
9038
|
+
field: "_id" | "time" | "createdAt" | "updatedAt";
|
|
9039
|
+
type: "asc" | "desc";
|
|
9040
|
+
}[];
|
|
8736
9041
|
[key: string]: any; // integration_meta.
|
|
8737
9042
|
};
|
|
8738
9043
|
export interface Result extends DefaultPaginationResult {
|
|
@@ -8772,3 +9077,28 @@ export interface AdminOrRep {
|
|
|
8772
9077
|
admin?: StringId;
|
|
8773
9078
|
rep?: StringId;
|
|
8774
9079
|
}
|
|
9080
|
+
type PopulatedMediaStorage = Pick<
|
|
9081
|
+
Service.MediaStorage.MediaStorageSchema,
|
|
9082
|
+
| "_id"
|
|
9083
|
+
| "createdAt"
|
|
9084
|
+
| "ContentType"
|
|
9085
|
+
| "media_type"
|
|
9086
|
+
| "mime_type"
|
|
9087
|
+
| "publicUrl"
|
|
9088
|
+
| "type_name"
|
|
9089
|
+
| "file_name"
|
|
9090
|
+
| "media_id"
|
|
9091
|
+
| "thumbnails"
|
|
9092
|
+
| "createdAt"
|
|
9093
|
+
> & {
|
|
9094
|
+
thumbnails: Pick<
|
|
9095
|
+
Service.MediaStorage.Thumbnail,
|
|
9096
|
+
| "_id"
|
|
9097
|
+
| "ContentType"
|
|
9098
|
+
| "mime_type"
|
|
9099
|
+
| "publicUrl"
|
|
9100
|
+
| "type_name"
|
|
9101
|
+
| "file_name"
|
|
9102
|
+
| "createdAt"
|
|
9103
|
+
>[];
|
|
9104
|
+
};
|