repzo 1.0.84 → 1.0.86
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 +378 -34
- package/package.json +1 -1
- package/src/index.ts +77 -22
- package/src/types/index.ts +355 -34
package/lib/index.js
CHANGED
|
@@ -2077,12 +2077,12 @@ export default class Repzo {
|
|
|
2077
2077
|
return res;
|
|
2078
2078
|
},
|
|
2079
2079
|
};
|
|
2080
|
-
this.
|
|
2081
|
-
_path: "/return-
|
|
2080
|
+
this.returnAssetPartUnit = {
|
|
2081
|
+
_path: "/return-asset-part-unit",
|
|
2082
2082
|
find: async (params) => {
|
|
2083
2083
|
let res = await this._fetch(
|
|
2084
2084
|
this.svAPIEndpoint,
|
|
2085
|
-
this.
|
|
2085
|
+
this.returnAssetPartUnit._path,
|
|
2086
2086
|
params
|
|
2087
2087
|
);
|
|
2088
2088
|
return res;
|
|
@@ -2090,13 +2090,13 @@ export default class Repzo {
|
|
|
2090
2090
|
get: async (id) => {
|
|
2091
2091
|
return await this._fetch(
|
|
2092
2092
|
this.svAPIEndpoint,
|
|
2093
|
-
this.
|
|
2093
|
+
this.returnAssetPartUnit._path + `/${id}`
|
|
2094
2094
|
);
|
|
2095
2095
|
},
|
|
2096
2096
|
create: async (body) => {
|
|
2097
2097
|
let res = await this._create(
|
|
2098
2098
|
this.svAPIEndpoint,
|
|
2099
|
-
this.
|
|
2099
|
+
this.returnAssetPartUnit._path,
|
|
2100
2100
|
body
|
|
2101
2101
|
);
|
|
2102
2102
|
return res;
|
|
@@ -2104,7 +2104,7 @@ export default class Repzo {
|
|
|
2104
2104
|
update: async (id, body) => {
|
|
2105
2105
|
let res = await this._update(
|
|
2106
2106
|
this.svAPIEndpoint,
|
|
2107
|
-
this.
|
|
2107
|
+
this.returnAssetPartUnit._path + `/${id}`,
|
|
2108
2108
|
body
|
|
2109
2109
|
);
|
|
2110
2110
|
return res;
|
|
@@ -2112,7 +2112,49 @@ export default class Repzo {
|
|
|
2112
2112
|
patch: async (params, body) => {
|
|
2113
2113
|
let res = await this._patch(
|
|
2114
2114
|
this.svAPIEndpoint,
|
|
2115
|
-
this.
|
|
2115
|
+
this.returnAssetPartUnit._path,
|
|
2116
|
+
body,
|
|
2117
|
+
params
|
|
2118
|
+
);
|
|
2119
|
+
return res;
|
|
2120
|
+
},
|
|
2121
|
+
};
|
|
2122
|
+
this.storeAssetPartUnit = {
|
|
2123
|
+
_path: "/store-asset-part-unit",
|
|
2124
|
+
find: async (params) => {
|
|
2125
|
+
let res = await this._fetch(
|
|
2126
|
+
this.svAPIEndpoint,
|
|
2127
|
+
this.storeAssetPartUnit._path,
|
|
2128
|
+
params
|
|
2129
|
+
);
|
|
2130
|
+
return res;
|
|
2131
|
+
},
|
|
2132
|
+
get: async (id) => {
|
|
2133
|
+
return await this._fetch(
|
|
2134
|
+
this.svAPIEndpoint,
|
|
2135
|
+
this.storeAssetPartUnit._path + `/${id}`
|
|
2136
|
+
);
|
|
2137
|
+
},
|
|
2138
|
+
create: async (body) => {
|
|
2139
|
+
let res = await this._create(
|
|
2140
|
+
this.svAPIEndpoint,
|
|
2141
|
+
this.storeAssetPartUnit._path,
|
|
2142
|
+
body
|
|
2143
|
+
);
|
|
2144
|
+
return res;
|
|
2145
|
+
},
|
|
2146
|
+
update: async (id, body) => {
|
|
2147
|
+
let res = await this._update(
|
|
2148
|
+
this.svAPIEndpoint,
|
|
2149
|
+
this.storeAssetPartUnit._path + `/${id}`,
|
|
2150
|
+
body
|
|
2151
|
+
);
|
|
2152
|
+
return res;
|
|
2153
|
+
},
|
|
2154
|
+
patch: async (params, body) => {
|
|
2155
|
+
let res = await this._patch(
|
|
2156
|
+
this.svAPIEndpoint,
|
|
2157
|
+
this.storeAssetPartUnit._path,
|
|
2116
2158
|
body,
|
|
2117
2159
|
params
|
|
2118
2160
|
);
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1680,7 +1680,8 @@ export declare namespace Service {
|
|
|
1680
1680
|
| "doc"
|
|
1681
1681
|
| "docx"
|
|
1682
1682
|
| "images"
|
|
1683
|
-
| "zip"
|
|
1683
|
+
| "zip"
|
|
1684
|
+
| "pt";
|
|
1684
1685
|
type ParentDocumentType =
|
|
1685
1686
|
| "clients"
|
|
1686
1687
|
| "asset"
|
|
@@ -1731,7 +1732,14 @@ export declare namespace Service {
|
|
|
1731
1732
|
| "contract"
|
|
1732
1733
|
| "contractInstallment"
|
|
1733
1734
|
| "form"
|
|
1734
|
-
| "paymentMethod"
|
|
1735
|
+
| "paymentMethod"
|
|
1736
|
+
| "aiObjectDetectionModelVersion"
|
|
1737
|
+
| "aiObjectDetectionTask"
|
|
1738
|
+
| "assetPart"
|
|
1739
|
+
| "assetPartReceival"
|
|
1740
|
+
| "assetPartUnit"
|
|
1741
|
+
| "returnAssetPartUnit"
|
|
1742
|
+
| "storeAssetPartUnit";
|
|
1735
1743
|
type SourceEnums =
|
|
1736
1744
|
| "product"
|
|
1737
1745
|
| "variant"
|
|
@@ -1773,6 +1781,28 @@ export declare namespace Service {
|
|
|
1773
1781
|
createdAt: string;
|
|
1774
1782
|
updatedAt: string;
|
|
1775
1783
|
}
|
|
1784
|
+
export interface Thumbnail {
|
|
1785
|
+
_id: StringId;
|
|
1786
|
+
ContentLength?: number;
|
|
1787
|
+
ETag?: string;
|
|
1788
|
+
ContentType?: string;
|
|
1789
|
+
Metadata?: {
|
|
1790
|
+
[key: string]: any;
|
|
1791
|
+
};
|
|
1792
|
+
key?: string;
|
|
1793
|
+
file_name: string;
|
|
1794
|
+
mime_type?: string;
|
|
1795
|
+
publicUrl?: string;
|
|
1796
|
+
type_name?: "FileAttachment" | "ImageAttachment";
|
|
1797
|
+
width?: number;
|
|
1798
|
+
height?: number;
|
|
1799
|
+
extension?: string;
|
|
1800
|
+
bucket_name?: string;
|
|
1801
|
+
region?: string;
|
|
1802
|
+
company_namespace: string[];
|
|
1803
|
+
createdAt: string;
|
|
1804
|
+
updatedAt: string;
|
|
1805
|
+
}
|
|
1776
1806
|
export interface CreateBody {
|
|
1777
1807
|
ContentLength?: number;
|
|
1778
1808
|
ETag?: string;
|
|
@@ -3487,7 +3517,13 @@ export declare namespace Service {
|
|
|
3487
3517
|
| "proformas"
|
|
3488
3518
|
| "fullinvoices"
|
|
3489
3519
|
| "transfers"
|
|
3490
|
-
| "payments"
|
|
3520
|
+
| "payments"
|
|
3521
|
+
| "workorder"
|
|
3522
|
+
| "assetPartReceival"
|
|
3523
|
+
| "assetPartUnit"
|
|
3524
|
+
| "assetPartTransfer"
|
|
3525
|
+
| "returnAssetPartUnit"
|
|
3526
|
+
| "storeAssetPartUnit";
|
|
3491
3527
|
export interface CustomStatusSchema {
|
|
3492
3528
|
_id: string;
|
|
3493
3529
|
name: string;
|
|
@@ -7981,7 +8017,6 @@ export declare namespace Service {
|
|
|
7981
8017
|
search?: string;
|
|
7982
8018
|
name?: string[] | string;
|
|
7983
8019
|
color?: string[] | string;
|
|
7984
|
-
local_name?: string[] | string;
|
|
7985
8020
|
disabled?: boolean;
|
|
7986
8021
|
from_updatedAt?: number;
|
|
7987
8022
|
to_updatedAt?: number;
|
|
@@ -8060,8 +8095,8 @@ export declare namespace Service {
|
|
|
8060
8095
|
integration_meta?: {
|
|
8061
8096
|
[key: string]: any;
|
|
8062
8097
|
};
|
|
8063
|
-
media?: StringId[];
|
|
8064
|
-
cover_photo?: StringId;
|
|
8098
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
8099
|
+
cover_photo?: StringId | PopulatedMediaStorage;
|
|
8065
8100
|
company_namespace: string[];
|
|
8066
8101
|
createdAt: Date;
|
|
8067
8102
|
updatedAt: Date;
|
|
@@ -8124,9 +8159,28 @@ export declare namespace Service {
|
|
|
8124
8159
|
disabled?: boolean;
|
|
8125
8160
|
from_updatedAt?: number;
|
|
8126
8161
|
to_updatedAt?: number;
|
|
8162
|
+
from_createdAt?: number;
|
|
8163
|
+
to_createdAt?: number;
|
|
8127
8164
|
asset_part_types?: string[] | string;
|
|
8128
8165
|
assets?: string[] | string;
|
|
8129
8166
|
asset_units?: string[] | string;
|
|
8167
|
+
populatesKeys?: (
|
|
8168
|
+
| "asset_part_types"
|
|
8169
|
+
| "assets"
|
|
8170
|
+
| "asset_units"
|
|
8171
|
+
| "media"
|
|
8172
|
+
| "cover_photo"
|
|
8173
|
+
)[];
|
|
8174
|
+
sortBy?: {
|
|
8175
|
+
field:
|
|
8176
|
+
| "_id"
|
|
8177
|
+
| "name"
|
|
8178
|
+
| "barcode"
|
|
8179
|
+
| "model"
|
|
8180
|
+
| "createdAt"
|
|
8181
|
+
| "updatedAt";
|
|
8182
|
+
type: "asc" | "desc";
|
|
8183
|
+
}[];
|
|
8130
8184
|
[key: string]: any;
|
|
8131
8185
|
};
|
|
8132
8186
|
interface Result extends DefaultPaginationResult {
|
|
@@ -8214,10 +8268,13 @@ export declare namespace Service {
|
|
|
8214
8268
|
qty: number;
|
|
8215
8269
|
custom_status?:
|
|
8216
8270
|
| StringId
|
|
8217
|
-
| Pick<
|
|
8271
|
+
| Pick<
|
|
8272
|
+
CustomStatus.CustomStatusSchema,
|
|
8273
|
+
"_id" | "name" | "local_name" | "code" | "color"
|
|
8274
|
+
>;
|
|
8218
8275
|
receival_comment?: string;
|
|
8219
8276
|
comment?: string;
|
|
8220
|
-
media?: StringId[];
|
|
8277
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
8221
8278
|
teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
|
|
8222
8279
|
integration_meta?: {
|
|
8223
8280
|
[key: string]: any;
|
|
@@ -8272,11 +8329,27 @@ export declare namespace Service {
|
|
|
8272
8329
|
to_qty?: number;
|
|
8273
8330
|
qty?: number;
|
|
8274
8331
|
custom_status?: StringId[] | StringId;
|
|
8332
|
+
directional_status?:
|
|
8333
|
+
| Data["directional_status"]
|
|
8334
|
+
| Data["directional_status"][];
|
|
8275
8335
|
teams?: StringId[] | StringId;
|
|
8276
8336
|
from_updatedAt?: number;
|
|
8277
8337
|
to_updatedAt?: number;
|
|
8278
8338
|
from_createdAt?: number;
|
|
8279
8339
|
to_createdAt?: number;
|
|
8340
|
+
populatesKeys?: (
|
|
8341
|
+
| "asset_part_receival"
|
|
8342
|
+
| "asset_part"
|
|
8343
|
+
| "client"
|
|
8344
|
+
| "warehouse"
|
|
8345
|
+
| "teams"
|
|
8346
|
+
| "custom_status"
|
|
8347
|
+
| "media"
|
|
8348
|
+
)[];
|
|
8349
|
+
sortBy?: {
|
|
8350
|
+
field: "_id" | "asset_part_index" | "createdAt" | "updatedAt";
|
|
8351
|
+
type: "asc" | "desc";
|
|
8352
|
+
}[];
|
|
8280
8353
|
[key: string]: any;
|
|
8281
8354
|
};
|
|
8282
8355
|
interface Result extends DefaultPaginationResult {
|
|
@@ -8314,7 +8387,6 @@ export declare namespace Service {
|
|
|
8314
8387
|
signature?: StringId;
|
|
8315
8388
|
media?: StringId[];
|
|
8316
8389
|
asset_parts: {
|
|
8317
|
-
_id: StringId;
|
|
8318
8390
|
asset_part: StringId;
|
|
8319
8391
|
asset_part_name: string;
|
|
8320
8392
|
qty: number;
|
|
@@ -8351,9 +8423,12 @@ export declare namespace Service {
|
|
|
8351
8423
|
description?: string;
|
|
8352
8424
|
custom_status?:
|
|
8353
8425
|
| StringId
|
|
8354
|
-
| Pick<
|
|
8355
|
-
|
|
8356
|
-
|
|
8426
|
+
| Pick<
|
|
8427
|
+
CustomStatus.CustomStatusSchema,
|
|
8428
|
+
"_id" | "name" | "local_name" | "code" | "color"
|
|
8429
|
+
>;
|
|
8430
|
+
signature?: StringId | PopulatedMediaStorage;
|
|
8431
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
8357
8432
|
asset_parts: {
|
|
8358
8433
|
_id: StringId;
|
|
8359
8434
|
asset_part: StringId | AssetPart.Data;
|
|
@@ -8402,6 +8477,7 @@ export declare namespace Service {
|
|
|
8402
8477
|
company_namespace: string[];
|
|
8403
8478
|
}
|
|
8404
8479
|
interface UpdateBody {
|
|
8480
|
+
editor?: AdminOrRep;
|
|
8405
8481
|
description?: string;
|
|
8406
8482
|
custom_status?: StringId;
|
|
8407
8483
|
media?: StringId[];
|
|
@@ -8432,6 +8508,19 @@ export declare namespace Service {
|
|
|
8432
8508
|
to_createdAt?: number;
|
|
8433
8509
|
from_updatedAt?: number;
|
|
8434
8510
|
to_updatedAt?: number;
|
|
8511
|
+
populatesKeys?: (
|
|
8512
|
+
| "asset_part"
|
|
8513
|
+
| "client"
|
|
8514
|
+
| "warehouse"
|
|
8515
|
+
| "teams"
|
|
8516
|
+
| "custom_status"
|
|
8517
|
+
| "media"
|
|
8518
|
+
| "signature"
|
|
8519
|
+
)[];
|
|
8520
|
+
sortBy?: {
|
|
8521
|
+
field: "_id" | "time" | "createdAt" | "updatedAt";
|
|
8522
|
+
type: "asc" | "desc";
|
|
8523
|
+
}[];
|
|
8435
8524
|
[key: string]: any;
|
|
8436
8525
|
};
|
|
8437
8526
|
interface Result extends DefaultPaginationResult {
|
|
@@ -8557,7 +8646,10 @@ export declare namespace Service {
|
|
|
8557
8646
|
total_asset_part_units_qty?: number;
|
|
8558
8647
|
custom_status?:
|
|
8559
8648
|
| StringId
|
|
8560
|
-
| Pick<
|
|
8649
|
+
| Pick<
|
|
8650
|
+
CustomStatus.CustomStatusSchema,
|
|
8651
|
+
"_id" | "name" | "local_name" | "code" | "color"
|
|
8652
|
+
>;
|
|
8561
8653
|
description?: string;
|
|
8562
8654
|
process_time?: number;
|
|
8563
8655
|
visit_id?: string;
|
|
@@ -8649,23 +8741,37 @@ export declare namespace Service {
|
|
|
8649
8741
|
nodeCycles?: StringId[] | StringId;
|
|
8650
8742
|
_id?: StringId[] | StringId;
|
|
8651
8743
|
search?: string;
|
|
8744
|
+
serial_number?: string[] | string;
|
|
8652
8745
|
"serial_number.formatted"?: string[] | string;
|
|
8653
8746
|
sync_id?: string[] | string;
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8747
|
+
creator?: StringId[] | StringId;
|
|
8748
|
+
creator_type?: Data["creator"]["type"] | Data["creator"]["type"][];
|
|
8749
|
+
"creator._id"?: StringId[] | StringId;
|
|
8750
|
+
type?: Data["type"][] | Data["type"];
|
|
8751
|
+
from?: StringId[] | StringId;
|
|
8752
|
+
to?: StringId[] | StringId;
|
|
8753
|
+
teams?: StringId[] | StringId;
|
|
8659
8754
|
visit_id?: string[] | string;
|
|
8660
|
-
custom_status?:
|
|
8755
|
+
custom_status?: StringId[] | StringId;
|
|
8661
8756
|
transaction_processed?: boolean;
|
|
8662
|
-
|
|
8757
|
+
asset_part_unit?: StringId[] | StringId;
|
|
8758
|
+
"asset_part_units.asset_part_unit"?: StringId[] | StringId;
|
|
8663
8759
|
from_time?: number;
|
|
8664
8760
|
to_time?: number;
|
|
8665
8761
|
from_createdAt?: number;
|
|
8666
8762
|
to_createdAt?: number;
|
|
8667
8763
|
from_updatedAt?: number;
|
|
8668
8764
|
to_updatedAt?: number;
|
|
8765
|
+
populatesKeys?: (
|
|
8766
|
+
| "asset_part_unit"
|
|
8767
|
+
| "warehouse"
|
|
8768
|
+
| "teams"
|
|
8769
|
+
| "custom_status"
|
|
8770
|
+
)[];
|
|
8771
|
+
sortBy?: {
|
|
8772
|
+
field: "_id" | "time" | "createdAt" | "updatedAt";
|
|
8773
|
+
type: "asc" | "desc";
|
|
8774
|
+
}[];
|
|
8669
8775
|
[key: string]: any;
|
|
8670
8776
|
};
|
|
8671
8777
|
interface Result extends DefaultPaginationResult {
|
|
@@ -8709,14 +8815,13 @@ export declare namespace Service {
|
|
|
8709
8815
|
};
|
|
8710
8816
|
}
|
|
8711
8817
|
}
|
|
8712
|
-
namespace
|
|
8818
|
+
namespace ReturnAssetPartUnit {
|
|
8713
8819
|
interface Data {
|
|
8714
8820
|
_id: StringId;
|
|
8715
8821
|
creator: AdminOrRep;
|
|
8716
8822
|
editor?: AdminOrRep;
|
|
8717
8823
|
sync_id: string;
|
|
8718
8824
|
transaction_processed: boolean;
|
|
8719
|
-
type: "returned" | "stored";
|
|
8720
8825
|
client: StringId;
|
|
8721
8826
|
client_name: string;
|
|
8722
8827
|
warehouse: StringId;
|
|
@@ -8754,7 +8859,6 @@ export declare namespace Service {
|
|
|
8754
8859
|
editor?: AdminOrRep;
|
|
8755
8860
|
sync_id: string;
|
|
8756
8861
|
transaction_processed: boolean;
|
|
8757
|
-
type: "returned" | "stored";
|
|
8758
8862
|
client:
|
|
8759
8863
|
| StringId
|
|
8760
8864
|
| Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
|
|
@@ -8771,9 +8875,12 @@ export declare namespace Service {
|
|
|
8771
8875
|
description?: string;
|
|
8772
8876
|
custom_status?:
|
|
8773
8877
|
| StringId
|
|
8774
|
-
| Pick<
|
|
8775
|
-
|
|
8776
|
-
|
|
8878
|
+
| Pick<
|
|
8879
|
+
CustomStatus.CustomStatusSchema,
|
|
8880
|
+
"_id" | "name" | "local_name" | "code" | "color"
|
|
8881
|
+
>;
|
|
8882
|
+
signature?: StringId | PopulatedMediaStorage;
|
|
8883
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
8777
8884
|
asset_part_units: {
|
|
8778
8885
|
_id: StringId;
|
|
8779
8886
|
asset_part_unit: StringId | AssetPartUnit.Data;
|
|
@@ -8795,7 +8902,6 @@ export declare namespace Service {
|
|
|
8795
8902
|
interface CreateBody {
|
|
8796
8903
|
creator?: AdminOrRep;
|
|
8797
8904
|
editor?: AdminOrRep;
|
|
8798
|
-
type: "returned" | "stored";
|
|
8799
8905
|
sync_id: string;
|
|
8800
8906
|
transaction_processed: boolean;
|
|
8801
8907
|
serial_number?: SerialNumber;
|
|
@@ -8839,22 +8945,235 @@ export declare namespace Service {
|
|
|
8839
8945
|
type Params = DefaultPaginationQueryParams & {
|
|
8840
8946
|
_id?: StringId[] | StringId;
|
|
8841
8947
|
search?: string;
|
|
8948
|
+
serial_number?: string[] | string;
|
|
8842
8949
|
"serial_number.formatted"?: string[] | string;
|
|
8843
8950
|
sync_id?: string[] | string;
|
|
8844
|
-
client?:
|
|
8845
|
-
warehouse?:
|
|
8846
|
-
"creator._id"?:
|
|
8847
|
-
|
|
8951
|
+
client?: StringId[] | StringId;
|
|
8952
|
+
warehouse?: StringId[] | StringId;
|
|
8953
|
+
"creator._id"?: StringId[] | StringId;
|
|
8954
|
+
"creator.type"?: string[] | string;
|
|
8955
|
+
creator?: StringId[] | StringId;
|
|
8956
|
+
creator_type?: string[] | string;
|
|
8957
|
+
teams?: StringId[] | StringId;
|
|
8848
8958
|
visit_id?: string[] | string;
|
|
8849
|
-
custom_status?:
|
|
8850
|
-
|
|
8851
|
-
"
|
|
8959
|
+
custom_status?: StringId[] | StringId;
|
|
8960
|
+
asset_part_unit?: StringId[] | StringId;
|
|
8961
|
+
"asset_part_units.asset_part_unit"?: StringId[] | StringId;
|
|
8852
8962
|
from_time?: number;
|
|
8853
8963
|
to_time?: number;
|
|
8854
8964
|
from_createdAt?: number;
|
|
8855
8965
|
to_createdAt?: number;
|
|
8856
8966
|
from_updatedAt?: number;
|
|
8857
8967
|
to_updatedAt?: number;
|
|
8968
|
+
populatesKeys?: (
|
|
8969
|
+
| "client"
|
|
8970
|
+
| "asset_part_unit"
|
|
8971
|
+
| "warehouse"
|
|
8972
|
+
| "teams"
|
|
8973
|
+
| "custom_status"
|
|
8974
|
+
| "meadia"
|
|
8975
|
+
| "signature"
|
|
8976
|
+
)[];
|
|
8977
|
+
sortBy?: {
|
|
8978
|
+
field: "_id" | "time" | "createdAt" | "updatedAt";
|
|
8979
|
+
type: "asc" | "desc";
|
|
8980
|
+
}[];
|
|
8981
|
+
[key: string]: any;
|
|
8982
|
+
};
|
|
8983
|
+
interface Result extends DefaultPaginationResult {
|
|
8984
|
+
data: Data[] | PopulatedDoc[];
|
|
8985
|
+
}
|
|
8986
|
+
}
|
|
8987
|
+
namespace Get {
|
|
8988
|
+
type ID = string;
|
|
8989
|
+
type Result = Data | PopulatedDoc;
|
|
8990
|
+
}
|
|
8991
|
+
namespace Create {
|
|
8992
|
+
type Body = CreateBody;
|
|
8993
|
+
type Result = Data;
|
|
8994
|
+
}
|
|
8995
|
+
namespace Update {
|
|
8996
|
+
type ID = string;
|
|
8997
|
+
type Body = UpdateBody;
|
|
8998
|
+
type Result = Data;
|
|
8999
|
+
}
|
|
9000
|
+
namespace Patch {
|
|
9001
|
+
type Params = {
|
|
9002
|
+
updateStatus: true;
|
|
9003
|
+
};
|
|
9004
|
+
type Body = {
|
|
9005
|
+
readQuery: [
|
|
9006
|
+
{
|
|
9007
|
+
key: "_id";
|
|
9008
|
+
operator: "in";
|
|
9009
|
+
value: StringId[];
|
|
9010
|
+
}
|
|
9011
|
+
];
|
|
9012
|
+
writeQuery: {
|
|
9013
|
+
key: "custom_status";
|
|
9014
|
+
command: "set";
|
|
9015
|
+
value: StringId;
|
|
9016
|
+
};
|
|
9017
|
+
};
|
|
9018
|
+
type Result = {
|
|
9019
|
+
nFound: number;
|
|
9020
|
+
nModified: number;
|
|
9021
|
+
};
|
|
9022
|
+
}
|
|
9023
|
+
}
|
|
9024
|
+
namespace StoreAssetPartUnit {
|
|
9025
|
+
interface Data {
|
|
9026
|
+
_id: StringId;
|
|
9027
|
+
creator: AdminOrRep;
|
|
9028
|
+
editor?: AdminOrRep;
|
|
9029
|
+
sync_id: string;
|
|
9030
|
+
transaction_processed: boolean;
|
|
9031
|
+
warehouse: StringId;
|
|
9032
|
+
warehouse_name: string;
|
|
9033
|
+
teams?: StringId[];
|
|
9034
|
+
time: number;
|
|
9035
|
+
business_day?: string;
|
|
9036
|
+
visit_id?: string;
|
|
9037
|
+
serial_number: SerialNumber;
|
|
9038
|
+
description?: string;
|
|
9039
|
+
custom_status?: StringId;
|
|
9040
|
+
signature?: StringId;
|
|
9041
|
+
media?: StringId[];
|
|
9042
|
+
asset_part_units: {
|
|
9043
|
+
_id?: StringId;
|
|
9044
|
+
asset_part_unit: StringId;
|
|
9045
|
+
qty: number;
|
|
9046
|
+
asset_part?: StringId;
|
|
9047
|
+
asset_part_name?: string;
|
|
9048
|
+
comment?: string;
|
|
9049
|
+
splitted_from?: StringId;
|
|
9050
|
+
}[];
|
|
9051
|
+
asset_part_units_count?: number;
|
|
9052
|
+
total_asset_part_units_qty?: number;
|
|
9053
|
+
integration_meta?: {
|
|
9054
|
+
[key: string]: any;
|
|
9055
|
+
};
|
|
9056
|
+
company_namespace: string[];
|
|
9057
|
+
createdAt: Date;
|
|
9058
|
+
updatedAt: Date;
|
|
9059
|
+
}
|
|
9060
|
+
interface PopulatedDoc {
|
|
9061
|
+
_id: StringId;
|
|
9062
|
+
creator: AdminOrRep;
|
|
9063
|
+
editor?: AdminOrRep;
|
|
9064
|
+
sync_id: string;
|
|
9065
|
+
transaction_processed: boolean;
|
|
9066
|
+
warehouse:
|
|
9067
|
+
| StringId
|
|
9068
|
+
| Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
|
|
9069
|
+
warehouse_name: string;
|
|
9070
|
+
teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
|
|
9071
|
+
time: number;
|
|
9072
|
+
business_day?: string;
|
|
9073
|
+
visit_id?: string;
|
|
9074
|
+
serial_number: SerialNumber;
|
|
9075
|
+
description?: string;
|
|
9076
|
+
custom_status?:
|
|
9077
|
+
| StringId
|
|
9078
|
+
| Pick<
|
|
9079
|
+
CustomStatus.CustomStatusSchema,
|
|
9080
|
+
"_id" | "name" | "local_name" | "code" | "color"
|
|
9081
|
+
>;
|
|
9082
|
+
signature?: StringId | PopulatedMediaStorage;
|
|
9083
|
+
media?: StringId[] | PopulatedMediaStorage[];
|
|
9084
|
+
asset_part_units: {
|
|
9085
|
+
_id: StringId;
|
|
9086
|
+
asset_part_unit: StringId | AssetPartUnit.Data;
|
|
9087
|
+
qty: number;
|
|
9088
|
+
asset_part?: StringId | AssetPart.Data;
|
|
9089
|
+
asset_part_name?: string;
|
|
9090
|
+
comment?: string;
|
|
9091
|
+
splitted_from?: StringId | AssetPartUnit.Data;
|
|
9092
|
+
}[];
|
|
9093
|
+
asset_part_units_count?: number;
|
|
9094
|
+
total_asset_part_units_qty?: number;
|
|
9095
|
+
integration_meta?: {
|
|
9096
|
+
[key: string]: any;
|
|
9097
|
+
};
|
|
9098
|
+
company_namespace: string[];
|
|
9099
|
+
createdAt: Date;
|
|
9100
|
+
updatedAt: Date;
|
|
9101
|
+
}
|
|
9102
|
+
interface CreateBody {
|
|
9103
|
+
creator?: AdminOrRep;
|
|
9104
|
+
editor?: AdminOrRep;
|
|
9105
|
+
sync_id: string;
|
|
9106
|
+
transaction_processed: boolean;
|
|
9107
|
+
serial_number?: SerialNumber;
|
|
9108
|
+
warehouse: StringId;
|
|
9109
|
+
warehouse_name?: string;
|
|
9110
|
+
teams?: StringId[];
|
|
9111
|
+
time: number;
|
|
9112
|
+
business_day?: string;
|
|
9113
|
+
visit_id?: string;
|
|
9114
|
+
description?: string;
|
|
9115
|
+
custom_status?: StringId;
|
|
9116
|
+
signature?: StringId;
|
|
9117
|
+
media?: StringId[];
|
|
9118
|
+
asset_part_units: {
|
|
9119
|
+
_id?: StringId;
|
|
9120
|
+
asset_part_unit: StringId;
|
|
9121
|
+
qty: number;
|
|
9122
|
+
asset_part?: StringId;
|
|
9123
|
+
asset_part_name?: string;
|
|
9124
|
+
comment?: string;
|
|
9125
|
+
}[];
|
|
9126
|
+
integration_meta?: {
|
|
9127
|
+
[key: string]: any;
|
|
9128
|
+
};
|
|
9129
|
+
asset_part_units_count?: number;
|
|
9130
|
+
total_asset_part_units_qty?: number;
|
|
9131
|
+
company_namespace: string[];
|
|
9132
|
+
}
|
|
9133
|
+
interface UpdateBody {
|
|
9134
|
+
editor?: AdminOrRep;
|
|
9135
|
+
description?: string;
|
|
9136
|
+
custom_status?: StringId;
|
|
9137
|
+
media?: StringId[];
|
|
9138
|
+
integration_meta?: {
|
|
9139
|
+
[key: string]: any;
|
|
9140
|
+
};
|
|
9141
|
+
}
|
|
9142
|
+
namespace Find {
|
|
9143
|
+
type Params = DefaultPaginationQueryParams & {
|
|
9144
|
+
_id?: StringId[] | StringId;
|
|
9145
|
+
search?: string;
|
|
9146
|
+
serial_number?: string[] | string;
|
|
9147
|
+
"serial_number.formatted"?: string[] | string;
|
|
9148
|
+
sync_id?: string[] | string;
|
|
9149
|
+
warehouse?: StringId[] | StringId;
|
|
9150
|
+
creator?: StringId[] | StringId;
|
|
9151
|
+
creator_type?: string[] | string;
|
|
9152
|
+
"creator._id"?: StringId[] | StringId;
|
|
9153
|
+
"creator.type"?: string[] | string;
|
|
9154
|
+
teams?: StringId[] | StringId;
|
|
9155
|
+
visit_id?: string[] | string;
|
|
9156
|
+
custom_status?: StringId[] | StringId;
|
|
9157
|
+
"asset_part_units.asset_part_unit"?: StringId[] | StringId;
|
|
9158
|
+
asset_part_unit?: StringId[] | StringId;
|
|
9159
|
+
from_time?: number;
|
|
9160
|
+
to_time?: number;
|
|
9161
|
+
from_createdAt?: number;
|
|
9162
|
+
to_createdAt?: number;
|
|
9163
|
+
from_updatedAt?: number;
|
|
9164
|
+
to_updatedAt?: number;
|
|
9165
|
+
populatesKeys?: (
|
|
9166
|
+
| "asset_part_unit"
|
|
9167
|
+
| "warehouse"
|
|
9168
|
+
| "teams"
|
|
9169
|
+
| "custom_status"
|
|
9170
|
+
| "meadia"
|
|
9171
|
+
| "signature"
|
|
9172
|
+
)[];
|
|
9173
|
+
sortBy?: {
|
|
9174
|
+
field: "_id" | "time" | "createdAt" | "updatedAt";
|
|
9175
|
+
type: "asc" | "desc";
|
|
9176
|
+
}[];
|
|
8858
9177
|
[key: string]: any;
|
|
8859
9178
|
};
|
|
8860
9179
|
interface Result extends DefaultPaginationResult {
|
|
@@ -8908,4 +9227,29 @@ export interface AdminOrRep {
|
|
|
8908
9227
|
admin?: StringId;
|
|
8909
9228
|
rep?: StringId;
|
|
8910
9229
|
}
|
|
9230
|
+
declare type PopulatedMediaStorage = Pick<
|
|
9231
|
+
Service.MediaStorage.MediaStorageSchema,
|
|
9232
|
+
| "_id"
|
|
9233
|
+
| "createdAt"
|
|
9234
|
+
| "ContentType"
|
|
9235
|
+
| "media_type"
|
|
9236
|
+
| "mime_type"
|
|
9237
|
+
| "publicUrl"
|
|
9238
|
+
| "type_name"
|
|
9239
|
+
| "file_name"
|
|
9240
|
+
| "media_id"
|
|
9241
|
+
| "thumbnails"
|
|
9242
|
+
| "createdAt"
|
|
9243
|
+
> & {
|
|
9244
|
+
thumbnails: Pick<
|
|
9245
|
+
Service.MediaStorage.Thumbnail,
|
|
9246
|
+
| "_id"
|
|
9247
|
+
| "ContentType"
|
|
9248
|
+
| "mime_type"
|
|
9249
|
+
| "publicUrl"
|
|
9250
|
+
| "type_name"
|
|
9251
|
+
| "file_name"
|
|
9252
|
+
| "createdAt"
|
|
9253
|
+
>[];
|
|
9254
|
+
};
|
|
8911
9255
|
export {};
|