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.
- package/changelog.md +12 -0
- package/lib/index.d.ts +199 -84
- package/lib/index.js +238 -0
- package/lib/types/index.d.ts +983 -11
- package/package.json +2 -2
- package/src/index.ts +316 -0
- package/src/types/index.ts +891 -0
package/src/types/index.ts
CHANGED
|
@@ -7886,7 +7886,898 @@ export namespace Service {
|
|
|
7886
7886
|
}
|
|
7887
7887
|
}
|
|
7888
7888
|
}
|
|
7889
|
+
|
|
7890
|
+
export namespace AssetPartType {
|
|
7891
|
+
export interface Data {
|
|
7892
|
+
_id: StringId;
|
|
7893
|
+
creator: AdminOrRep;
|
|
7894
|
+
editor?: AdminOrRep;
|
|
7895
|
+
name: string;
|
|
7896
|
+
color: string;
|
|
7897
|
+
local_name?: string;
|
|
7898
|
+
disabled: boolean;
|
|
7899
|
+
integration_meta?: { [key: string]: any };
|
|
7900
|
+
company_namespace: string[];
|
|
7901
|
+
createdAt: Date;
|
|
7902
|
+
updatedAt: Date;
|
|
7903
|
+
}
|
|
7904
|
+
export interface CreateBody {
|
|
7905
|
+
creator?: AdminOrRep;
|
|
7906
|
+
name: string;
|
|
7907
|
+
color: string;
|
|
7908
|
+
local_name?: string;
|
|
7909
|
+
disabled?: boolean;
|
|
7910
|
+
integration_meta?: { [key: string]: any };
|
|
7911
|
+
company_namespace?: string[];
|
|
7912
|
+
}
|
|
7913
|
+
export interface UpdateBody {
|
|
7914
|
+
_id?: StringId;
|
|
7915
|
+
creator?: AdminOrRep;
|
|
7916
|
+
editor?: AdminOrRep;
|
|
7917
|
+
name?: string;
|
|
7918
|
+
local_name?: string;
|
|
7919
|
+
color?: string;
|
|
7920
|
+
disabled?: boolean;
|
|
7921
|
+
integration_meta?: { [key: string]: any };
|
|
7922
|
+
company_namespace?: string[];
|
|
7923
|
+
createdAt?: Date;
|
|
7924
|
+
updatedAt?: Date;
|
|
7925
|
+
}
|
|
7926
|
+
|
|
7927
|
+
export namespace Find {
|
|
7928
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
7929
|
+
_id?: StringId[] | StringId;
|
|
7930
|
+
search?: string;
|
|
7931
|
+
name?: string[] | string;
|
|
7932
|
+
color?: string[] | string;
|
|
7933
|
+
local_name?: string[] | string;
|
|
7934
|
+
disabled?: boolean;
|
|
7935
|
+
from_updatedAt?: number;
|
|
7936
|
+
to_updatedAt?: number;
|
|
7937
|
+
[key: string]: any; // integration_meta.
|
|
7938
|
+
};
|
|
7939
|
+
export interface Result extends DefaultPaginationResult {
|
|
7940
|
+
data: Data[];
|
|
7941
|
+
}
|
|
7942
|
+
}
|
|
7943
|
+
|
|
7944
|
+
export namespace Get {
|
|
7945
|
+
export type ID = string;
|
|
7946
|
+
export type Result = Data;
|
|
7947
|
+
}
|
|
7948
|
+
|
|
7949
|
+
export namespace Create {
|
|
7950
|
+
export type Body = CreateBody;
|
|
7951
|
+
export type Result = Data;
|
|
7952
|
+
}
|
|
7953
|
+
|
|
7954
|
+
export namespace Update {
|
|
7955
|
+
export type ID = string;
|
|
7956
|
+
export type Body = UpdateBody;
|
|
7957
|
+
export type Result = Data;
|
|
7958
|
+
}
|
|
7959
|
+
|
|
7960
|
+
export namespace Remove {
|
|
7961
|
+
export type ID = string;
|
|
7962
|
+
export type Result = Data;
|
|
7963
|
+
}
|
|
7964
|
+
}
|
|
7965
|
+
|
|
7966
|
+
export namespace AssetPart {
|
|
7967
|
+
export interface Data {
|
|
7968
|
+
_id: StringId;
|
|
7969
|
+
creator: AdminOrRep;
|
|
7970
|
+
editor?: AdminOrRep;
|
|
7971
|
+
name: string;
|
|
7972
|
+
local_name?: string;
|
|
7973
|
+
description?: string;
|
|
7974
|
+
barcode?: string;
|
|
7975
|
+
model?: string;
|
|
7976
|
+
manufacturer?: string;
|
|
7977
|
+
year?: string;
|
|
7978
|
+
asset_part_types: StringId[];
|
|
7979
|
+
assets?: StringId[];
|
|
7980
|
+
asset_units?: StringId[];
|
|
7981
|
+
customFields?: { [key: string]: string | number | boolean };
|
|
7982
|
+
disabled: boolean;
|
|
7983
|
+
integration_meta?: { [key: string]: any };
|
|
7984
|
+
media?: StringId[];
|
|
7985
|
+
cover_photo?: StringId;
|
|
7986
|
+
company_namespace: string[];
|
|
7987
|
+
createdAt: Date;
|
|
7988
|
+
updatedAt: Date;
|
|
7989
|
+
}
|
|
7990
|
+
export interface PopulatedDoc {
|
|
7991
|
+
_id: StringId;
|
|
7992
|
+
creator: AdminOrRep;
|
|
7993
|
+
editor?: AdminOrRep;
|
|
7994
|
+
name: string;
|
|
7995
|
+
local_name?: string;
|
|
7996
|
+
description?: string;
|
|
7997
|
+
barcode?: string;
|
|
7998
|
+
model?: string;
|
|
7999
|
+
manufacturer?: string;
|
|
8000
|
+
year?: string;
|
|
8001
|
+
asset_part_types:
|
|
8002
|
+
| StringId[]
|
|
8003
|
+
| Pick<AssetPartType.Data, "_id" | "color" | "name" | "local_name">[];
|
|
8004
|
+
assets?: StringId[]; // | Asset[];
|
|
8005
|
+
asset_units?: StringId[]; // | AssetUnit[];
|
|
8006
|
+
customFields?: { [key: string]: string | number | boolean };
|
|
8007
|
+
disabled: boolean;
|
|
8008
|
+
integration_meta?: { [key: string]: any };
|
|
8009
|
+
media?: StringId[]; // | Media[];
|
|
8010
|
+
cover_photo?: StringId; // | Media;
|
|
8011
|
+
company_namespace: string[];
|
|
8012
|
+
createdAt: Date;
|
|
8013
|
+
updatedAt: Date;
|
|
8014
|
+
}
|
|
8015
|
+
export interface CreateBody {
|
|
8016
|
+
name: string;
|
|
8017
|
+
asset_part_types: StringId[];
|
|
8018
|
+
creator?: AdminOrRep;
|
|
8019
|
+
local_name?: string;
|
|
8020
|
+
description?: string;
|
|
8021
|
+
barcode?: string;
|
|
8022
|
+
model?: string;
|
|
8023
|
+
manufacturer?: string;
|
|
8024
|
+
year?: string;
|
|
8025
|
+
assets?: StringId[];
|
|
8026
|
+
asset_units?: StringId[];
|
|
8027
|
+
customFields?: { [key: string]: string | number | boolean };
|
|
8028
|
+
media?: StringId[];
|
|
8029
|
+
cover_photo?: StringId;
|
|
8030
|
+
disabled?: boolean;
|
|
8031
|
+
integration_meta?: { [key: string]: any };
|
|
8032
|
+
company_namespace?: string[];
|
|
8033
|
+
}
|
|
8034
|
+
export interface UpdateBody {
|
|
8035
|
+
_id?: StringId;
|
|
8036
|
+
creator?: AdminOrRep;
|
|
8037
|
+
editor?: AdminOrRep;
|
|
8038
|
+
name?: string;
|
|
8039
|
+
local_name?: string;
|
|
8040
|
+
description?: string;
|
|
8041
|
+
barcode?: string;
|
|
8042
|
+
model?: string;
|
|
8043
|
+
manufacturer?: string;
|
|
8044
|
+
year?: string;
|
|
8045
|
+
asset_part_types?: StringId[];
|
|
8046
|
+
assets?: StringId[];
|
|
8047
|
+
asset_units?: StringId[];
|
|
8048
|
+
customFields?: { [key: string]: string | number | boolean };
|
|
8049
|
+
disabled?: boolean;
|
|
8050
|
+
integration_meta?: { [key: string]: any };
|
|
8051
|
+
media?: StringId[];
|
|
8052
|
+
cover_photo?: StringId;
|
|
8053
|
+
company_namespace?: string[];
|
|
8054
|
+
createdAt?: Date;
|
|
8055
|
+
updatedAt?: Date;
|
|
8056
|
+
}
|
|
8057
|
+
|
|
8058
|
+
export namespace Find {
|
|
8059
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
8060
|
+
_id?: StringId[] | StringId;
|
|
8061
|
+
search?: string;
|
|
8062
|
+
name?: string[] | string;
|
|
8063
|
+
disabled?: boolean;
|
|
8064
|
+
from_updatedAt?: number;
|
|
8065
|
+
to_updatedAt?: number;
|
|
8066
|
+
asset_part_types?: string[] | string;
|
|
8067
|
+
assets?: string[] | string;
|
|
8068
|
+
asset_units?: string[] | string;
|
|
8069
|
+
[key: string]: any; // integration_meta.
|
|
8070
|
+
};
|
|
8071
|
+
export interface Result extends DefaultPaginationResult {
|
|
8072
|
+
data: Data[] | PopulatedDoc[];
|
|
8073
|
+
}
|
|
8074
|
+
}
|
|
8075
|
+
export namespace Get {
|
|
8076
|
+
export type ID = string;
|
|
8077
|
+
export type Result = Data | PopulatedDoc;
|
|
8078
|
+
}
|
|
8079
|
+
export namespace Create {
|
|
8080
|
+
export type Body = CreateBody;
|
|
8081
|
+
export type Result = Data;
|
|
8082
|
+
}
|
|
8083
|
+
export namespace Update {
|
|
8084
|
+
export type ID = string;
|
|
8085
|
+
export type Body = UpdateBody;
|
|
8086
|
+
export type Result = Data;
|
|
8087
|
+
}
|
|
8088
|
+
export namespace Remove {
|
|
8089
|
+
export type ID = string;
|
|
8090
|
+
export type Result = Data;
|
|
8091
|
+
}
|
|
8092
|
+
}
|
|
8093
|
+
|
|
8094
|
+
export namespace AssetPartUnit {
|
|
8095
|
+
export interface Data {
|
|
8096
|
+
_id: StringId;
|
|
8097
|
+
creator: AdminOrRep;
|
|
8098
|
+
editor?: AdminOrRep;
|
|
8099
|
+
directional_status:
|
|
8100
|
+
| "received"
|
|
8101
|
+
| "handed"
|
|
8102
|
+
| "picked"
|
|
8103
|
+
| "returned"
|
|
8104
|
+
| "stored";
|
|
8105
|
+
asset_part_receival: StringId;
|
|
8106
|
+
asset_part_index: number;
|
|
8107
|
+
splitted_from?: StringId;
|
|
8108
|
+
client: StringId;
|
|
8109
|
+
client_name: string;
|
|
8110
|
+
warehouse: StringId;
|
|
8111
|
+
warehouse_name: string;
|
|
8112
|
+
receival_warehouse: string;
|
|
8113
|
+
receival_warehouse_name: string;
|
|
8114
|
+
asset_part: StringId;
|
|
8115
|
+
asset_part_name: string;
|
|
8116
|
+
qty: number;
|
|
8117
|
+
custom_status?: StringId;
|
|
8118
|
+
receival_comment?: string;
|
|
8119
|
+
comment?: string;
|
|
8120
|
+
media?: StringId[];
|
|
8121
|
+
teams?: StringId[];
|
|
8122
|
+
integration_meta?: { [key: string]: any };
|
|
8123
|
+
company_namespace: string[];
|
|
8124
|
+
createdAt: Date;
|
|
8125
|
+
updatedAt: Date;
|
|
8126
|
+
}
|
|
8127
|
+
export interface PopulatedDoc {
|
|
8128
|
+
_id: StringId;
|
|
8129
|
+
creator: AdminOrRep;
|
|
8130
|
+
editor?: AdminOrRep;
|
|
8131
|
+
directional_status:
|
|
8132
|
+
| "received"
|
|
8133
|
+
| "handed"
|
|
8134
|
+
| "picked"
|
|
8135
|
+
| "returned"
|
|
8136
|
+
| "stored";
|
|
8137
|
+
asset_part_receival: StringId | AssetPartReceival.Data;
|
|
8138
|
+
asset_part_index: number;
|
|
8139
|
+
splitted_from?: StringId | Data;
|
|
8140
|
+
client:
|
|
8141
|
+
| StringId
|
|
8142
|
+
| Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
|
|
8143
|
+
client_name: string;
|
|
8144
|
+
warehouse:
|
|
8145
|
+
| StringId
|
|
8146
|
+
| Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
|
|
8147
|
+
receival_warehouse:
|
|
8148
|
+
| string
|
|
8149
|
+
| Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
|
|
8150
|
+
asset_part: StringId | AssetPart.Data;
|
|
8151
|
+
asset_part_name: string;
|
|
8152
|
+
qty: number;
|
|
8153
|
+
custom_status?:
|
|
8154
|
+
| StringId
|
|
8155
|
+
| Pick<CustomStatus.CustomStatusSchema, "_id" | "name" | "local_name">;
|
|
8156
|
+
receival_comment?: string;
|
|
8157
|
+
comment?: string;
|
|
8158
|
+
media?: StringId[];
|
|
8159
|
+
teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
|
|
8160
|
+
integration_meta?: { [key: string]: any };
|
|
8161
|
+
company_namespace: string[];
|
|
8162
|
+
createdAt: Date;
|
|
8163
|
+
updatedAt: Date;
|
|
8164
|
+
}
|
|
8165
|
+
export interface CreateBody {
|
|
8166
|
+
creator?: AdminOrRep;
|
|
8167
|
+
directional_status:
|
|
8168
|
+
| "received"
|
|
8169
|
+
| "handed"
|
|
8170
|
+
| "picked"
|
|
8171
|
+
| "returned"
|
|
8172
|
+
| "stored";
|
|
8173
|
+
asset_part_receival: StringId;
|
|
8174
|
+
asset_part_index: number;
|
|
8175
|
+
splitted_from?: StringId;
|
|
8176
|
+
client: StringId;
|
|
8177
|
+
client_name: string;
|
|
8178
|
+
warehouse: StringId;
|
|
8179
|
+
receival_warehouse: string;
|
|
8180
|
+
asset_part: StringId;
|
|
8181
|
+
asset_part_name: string;
|
|
8182
|
+
qty: number;
|
|
8183
|
+
custom_status?: StringId;
|
|
8184
|
+
receival_comment?: string;
|
|
8185
|
+
comment?: string;
|
|
8186
|
+
media?: StringId[];
|
|
8187
|
+
teams?: StringId[];
|
|
8188
|
+
integration_meta?: { [key: string]: any };
|
|
8189
|
+
company_namespace?: string[];
|
|
8190
|
+
}
|
|
8191
|
+
export interface UpdateBody {
|
|
8192
|
+
custom_status?: StringId;
|
|
8193
|
+
comment?: string;
|
|
8194
|
+
media?: StringId[];
|
|
8195
|
+
editor?: AdminOrRep;
|
|
8196
|
+
}
|
|
8197
|
+
|
|
8198
|
+
export namespace Find {
|
|
8199
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
8200
|
+
_id?: StringId[] | StringId;
|
|
8201
|
+
asset_part_receival?: StringId[] | StringId;
|
|
8202
|
+
client?: StringId[] | StringId;
|
|
8203
|
+
warehouse?: StringId[] | StringId;
|
|
8204
|
+
receival_warehouse?: StringId[] | StringId;
|
|
8205
|
+
asset_part?: StringId[] | StringId;
|
|
8206
|
+
from_qty?: number;
|
|
8207
|
+
to_qty?: number;
|
|
8208
|
+
qty?: number;
|
|
8209
|
+
custom_status?: StringId[] | StringId;
|
|
8210
|
+
teams?: StringId[] | StringId;
|
|
8211
|
+
from_updatedAt?: number;
|
|
8212
|
+
to_updatedAt?: number;
|
|
8213
|
+
from_createdAt?: number;
|
|
8214
|
+
to_createdAt?: number;
|
|
8215
|
+
[key: string]: any; // integration_meta.
|
|
8216
|
+
};
|
|
8217
|
+
export interface Result extends DefaultPaginationResult {
|
|
8218
|
+
data: Data[] | PopulatedDoc[];
|
|
8219
|
+
}
|
|
8220
|
+
}
|
|
8221
|
+
export namespace Get {
|
|
8222
|
+
export type ID = string;
|
|
8223
|
+
export type Result = Data | PopulatedDoc;
|
|
8224
|
+
}
|
|
8225
|
+
export namespace Update {
|
|
8226
|
+
export type ID = string;
|
|
8227
|
+
export type Body = UpdateBody;
|
|
8228
|
+
export type Result = Data;
|
|
8229
|
+
}
|
|
8230
|
+
}
|
|
8231
|
+
|
|
8232
|
+
export namespace AssetPartReceival {
|
|
8233
|
+
export interface Data {
|
|
8234
|
+
_id: StringId;
|
|
8235
|
+
creator: AdminOrRep;
|
|
8236
|
+
editor?: AdminOrRep;
|
|
8237
|
+
sync_id: string;
|
|
8238
|
+
transaction_processed: boolean;
|
|
8239
|
+
client: StringId;
|
|
8240
|
+
client_name: string;
|
|
8241
|
+
warehouse: StringId;
|
|
8242
|
+
warehouse_name: string;
|
|
8243
|
+
teams?: StringId[];
|
|
8244
|
+
time: number;
|
|
8245
|
+
business_day?: string;
|
|
8246
|
+
visit_id?: string;
|
|
8247
|
+
serial_number: SerialNumber;
|
|
8248
|
+
description?: string;
|
|
8249
|
+
custom_status?: StringId;
|
|
8250
|
+
signature?: StringId;
|
|
8251
|
+
media?: StringId[];
|
|
8252
|
+
asset_parts: {
|
|
8253
|
+
_id: StringId;
|
|
8254
|
+
asset_part: StringId;
|
|
8255
|
+
asset_part_name: string;
|
|
8256
|
+
qty: number;
|
|
8257
|
+
comment?: string;
|
|
8258
|
+
}[];
|
|
8259
|
+
asset_parts_count?: number;
|
|
8260
|
+
total_asset_parts_qty?: number;
|
|
8261
|
+
integration_meta?: { [key: string]: any };
|
|
8262
|
+
company_namespace: string[];
|
|
8263
|
+
createdAt: Date;
|
|
8264
|
+
updatedAt: Date;
|
|
8265
|
+
}
|
|
8266
|
+
export interface PopulatedDoc {
|
|
8267
|
+
_id: StringId;
|
|
8268
|
+
creator: AdminOrRep;
|
|
8269
|
+
editor?: AdminOrRep;
|
|
8270
|
+
sync_id: string;
|
|
8271
|
+
transaction_processed: boolean;
|
|
8272
|
+
client:
|
|
8273
|
+
| StringId
|
|
8274
|
+
| Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
|
|
8275
|
+
client_name: string;
|
|
8276
|
+
warehouse:
|
|
8277
|
+
| StringId
|
|
8278
|
+
| Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
|
|
8279
|
+
warehouse_name: string;
|
|
8280
|
+
teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
|
|
8281
|
+
time: number;
|
|
8282
|
+
business_day?: string;
|
|
8283
|
+
visit_id?: string;
|
|
8284
|
+
serial_number: SerialNumber;
|
|
8285
|
+
description?: string;
|
|
8286
|
+
custom_status?:
|
|
8287
|
+
| StringId
|
|
8288
|
+
| Pick<CustomStatus.CustomStatusSchema, "_id" | "name" | "local_name">;
|
|
8289
|
+
signature?: StringId;
|
|
8290
|
+
media?: StringId[];
|
|
8291
|
+
asset_parts: {
|
|
8292
|
+
_id: StringId;
|
|
8293
|
+
asset_part: StringId | AssetPart.Data;
|
|
8294
|
+
asset_part_name: string;
|
|
8295
|
+
qty: number;
|
|
8296
|
+
comment?: string;
|
|
8297
|
+
}[];
|
|
8298
|
+
asset_parts_count?: number;
|
|
8299
|
+
total_asset_parts_qty?: number;
|
|
8300
|
+
integration_meta?: { [key: string]: any };
|
|
8301
|
+
company_namespace: string[];
|
|
8302
|
+
createdAt: Date;
|
|
8303
|
+
updatedAt: Date;
|
|
8304
|
+
}
|
|
8305
|
+
export interface CreateBody {
|
|
8306
|
+
creator?: AdminOrRep;
|
|
8307
|
+
editor?: AdminOrRep;
|
|
8308
|
+
sync_id: string;
|
|
8309
|
+
transaction_processed: false;
|
|
8310
|
+
serial_number?: SerialNumber;
|
|
8311
|
+
client: StringId;
|
|
8312
|
+
client_name: string;
|
|
8313
|
+
warehouse: StringId;
|
|
8314
|
+
warehouse_name: string;
|
|
8315
|
+
teams?: StringId[];
|
|
8316
|
+
time: number;
|
|
8317
|
+
business_day?: string;
|
|
8318
|
+
visit_id?: string;
|
|
8319
|
+
description?: string;
|
|
8320
|
+
custom_status?: StringId;
|
|
8321
|
+
signature?: StringId;
|
|
8322
|
+
media?: StringId[];
|
|
8323
|
+
asset_parts: {
|
|
8324
|
+
asset_part: StringId;
|
|
8325
|
+
asset_part_name: string;
|
|
8326
|
+
qty: number;
|
|
8327
|
+
comment?: string;
|
|
8328
|
+
}[];
|
|
8329
|
+
integration_meta?: { [key: string]: any };
|
|
8330
|
+
asset_parts_count?: number;
|
|
8331
|
+
total_asset_parts_qty?: number;
|
|
8332
|
+
company_namespace: string[];
|
|
8333
|
+
}
|
|
8334
|
+
export interface UpdateBody {
|
|
8335
|
+
description?: string;
|
|
8336
|
+
custom_status?: StringId;
|
|
8337
|
+
media?: StringId[];
|
|
8338
|
+
integration_meta?: { [key: string]: any };
|
|
8339
|
+
}
|
|
8340
|
+
|
|
8341
|
+
export namespace Find {
|
|
8342
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
8343
|
+
_id?: StringId[] | StringId;
|
|
8344
|
+
search?: string; // serial_number.formatted
|
|
8345
|
+
serial_number?: string[] | string;
|
|
8346
|
+
"serial_number.formatted"?: string[] | string;
|
|
8347
|
+
sync_id?: string[] | string;
|
|
8348
|
+
client?: string[] | string;
|
|
8349
|
+
warehouse?: string[] | string;
|
|
8350
|
+
creator?: string | string[];
|
|
8351
|
+
"creator._id"?: string[] | string;
|
|
8352
|
+
creator_type?: string | string[];
|
|
8353
|
+
teams?: string[] | string;
|
|
8354
|
+
visit_id?: string[] | string;
|
|
8355
|
+
custom_status?: string[] | string;
|
|
8356
|
+
asset_part?: string[] | string;
|
|
8357
|
+
"asset_parts.asset_part"?: string[] | string;
|
|
8358
|
+
from_time?: number;
|
|
8359
|
+
to_time?: number;
|
|
8360
|
+
from_createdAt?: number;
|
|
8361
|
+
to_createdAt?: number;
|
|
8362
|
+
from_updatedAt?: number;
|
|
8363
|
+
to_updatedAt?: number;
|
|
8364
|
+
[key: string]: any; // integration_meta.
|
|
8365
|
+
};
|
|
8366
|
+
export interface Result extends DefaultPaginationResult {
|
|
8367
|
+
data: Data[] | PopulatedDoc[];
|
|
8368
|
+
}
|
|
8369
|
+
}
|
|
8370
|
+
export namespace Get {
|
|
8371
|
+
export type ID = string;
|
|
8372
|
+
export type Result = Data | PopulatedDoc;
|
|
8373
|
+
}
|
|
8374
|
+
export namespace Create {
|
|
8375
|
+
export type Body = CreateBody;
|
|
8376
|
+
export type Result = Data;
|
|
8377
|
+
}
|
|
8378
|
+
export namespace Update {
|
|
8379
|
+
export type ID = string;
|
|
8380
|
+
export type Body = UpdateBody;
|
|
8381
|
+
export type Result = Data;
|
|
8382
|
+
}
|
|
8383
|
+
export namespace Patch {
|
|
8384
|
+
export type Params = { updateStatus: true };
|
|
8385
|
+
export type Body = {
|
|
8386
|
+
readQuery: [{ key: "_id"; operator: "in"; value: StringId[] }];
|
|
8387
|
+
writeQuery: { key: "custom_status"; command: "set"; value: StringId };
|
|
8388
|
+
};
|
|
8389
|
+
export type Result = { nFound: number; nModified: number };
|
|
8390
|
+
}
|
|
8391
|
+
}
|
|
8392
|
+
|
|
8393
|
+
export namespace AssetPartTransfer {
|
|
8394
|
+
export interface Data {
|
|
8395
|
+
_id: StringId;
|
|
8396
|
+
creator: AdminOrRep;
|
|
8397
|
+
editor?: AdminOrRep;
|
|
8398
|
+
transaction_processed: boolean;
|
|
8399
|
+
serial_number: SerialNumber;
|
|
8400
|
+
type: "load" | "unload";
|
|
8401
|
+
from: StringId;
|
|
8402
|
+
to: StringId;
|
|
8403
|
+
from_name?: string;
|
|
8404
|
+
to_name?: string;
|
|
8405
|
+
time: number;
|
|
8406
|
+
status:
|
|
8407
|
+
| "pending"
|
|
8408
|
+
| "approved"
|
|
8409
|
+
| "processing"
|
|
8410
|
+
| "rejected"
|
|
8411
|
+
| "processed"
|
|
8412
|
+
| "failed";
|
|
8413
|
+
sync_id: string;
|
|
8414
|
+
asset_part_units: {
|
|
8415
|
+
asset_part_unit: StringId;
|
|
8416
|
+
qty: number;
|
|
8417
|
+
asset_part?: StringId;
|
|
8418
|
+
asset_part_name?: string;
|
|
8419
|
+
note?: string;
|
|
8420
|
+
splitted_from?: StringId;
|
|
8421
|
+
}[];
|
|
8422
|
+
teams?: StringId[];
|
|
8423
|
+
business_day?: string;
|
|
8424
|
+
asset_part_units_count?: number;
|
|
8425
|
+
total_asset_part_units_qty?: number;
|
|
8426
|
+
custom_status?: StringId;
|
|
8427
|
+
description?: string;
|
|
8428
|
+
process_time?: number;
|
|
8429
|
+
visit_id?: string;
|
|
8430
|
+
integration_meta?: { [key: string]: any };
|
|
8431
|
+
company_namespace: string[];
|
|
8432
|
+
createdAt: Date;
|
|
8433
|
+
updatedAt: Date;
|
|
8434
|
+
}
|
|
8435
|
+
export interface PopulatedDoc {
|
|
8436
|
+
_id: StringId;
|
|
8437
|
+
creator: AdminOrRep;
|
|
8438
|
+
editor?: AdminOrRep;
|
|
8439
|
+
transaction_processed: boolean;
|
|
8440
|
+
serial_number: SerialNumber;
|
|
8441
|
+
type: "load" | "unload";
|
|
8442
|
+
from:
|
|
8443
|
+
| StringId
|
|
8444
|
+
| Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
|
|
8445
|
+
to:
|
|
8446
|
+
| StringId
|
|
8447
|
+
| Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
|
|
8448
|
+
from_name?: string;
|
|
8449
|
+
to_name?: string;
|
|
8450
|
+
time: number;
|
|
8451
|
+
status:
|
|
8452
|
+
| "pending"
|
|
8453
|
+
| "approved"
|
|
8454
|
+
| "processing"
|
|
8455
|
+
| "rejected"
|
|
8456
|
+
| "processed"
|
|
8457
|
+
| "failed";
|
|
8458
|
+
sync_id: string;
|
|
8459
|
+
asset_part_units: {
|
|
8460
|
+
asset_part_unit: StringId | AssetPartUnit.Data;
|
|
8461
|
+
qty: number;
|
|
8462
|
+
asset_part?: StringId | AssetPart.Data;
|
|
8463
|
+
asset_part_name?: string;
|
|
8464
|
+
note?: string;
|
|
8465
|
+
splitted_from?: StringId | AssetPartUnit.Data;
|
|
8466
|
+
}[];
|
|
8467
|
+
teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
|
|
8468
|
+
business_day?: string;
|
|
8469
|
+
asset_part_units_count?: number;
|
|
8470
|
+
total_asset_part_units_qty?: number;
|
|
8471
|
+
custom_status?:
|
|
8472
|
+
| StringId
|
|
8473
|
+
| Pick<CustomStatus.CustomStatusSchema, "_id" | "name" | "local_name">;
|
|
8474
|
+
description?: string;
|
|
8475
|
+
process_time?: number;
|
|
8476
|
+
visit_id?: string;
|
|
8477
|
+
integration_meta?: { [key: string]: any };
|
|
8478
|
+
company_namespace: string[];
|
|
8479
|
+
createdAt: Date;
|
|
8480
|
+
updatedAt: Date;
|
|
8481
|
+
}
|
|
8482
|
+
export interface CreateBody {
|
|
8483
|
+
creator?: AdminOrRep;
|
|
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
|
+
transaction_processed?: false;
|
|
8492
|
+
status?: "pending";
|
|
8493
|
+
sync_id: string;
|
|
8494
|
+
asset_part_units: {
|
|
8495
|
+
asset_part_unit: StringId;
|
|
8496
|
+
qty: number;
|
|
8497
|
+
asset_part?: StringId;
|
|
8498
|
+
asset_part_name?: string;
|
|
8499
|
+
note?: string;
|
|
8500
|
+
}[];
|
|
8501
|
+
teams?: StringId[];
|
|
8502
|
+
business_day?: string;
|
|
8503
|
+
asset_part_units_count?: number;
|
|
8504
|
+
total_asset_part_units_qty?: number;
|
|
8505
|
+
custom_status?: StringId;
|
|
8506
|
+
description?: string;
|
|
8507
|
+
visit_id?: string;
|
|
8508
|
+
integration_meta?: { [key: string]: any };
|
|
8509
|
+
company_namespace: string[];
|
|
8510
|
+
}
|
|
8511
|
+
export interface UpdateBody {
|
|
8512
|
+
_id?: StringId;
|
|
8513
|
+
creator?: AdminOrRep;
|
|
8514
|
+
editor?: AdminOrRep;
|
|
8515
|
+
transaction_processed?: boolean;
|
|
8516
|
+
serial_number?: SerialNumber;
|
|
8517
|
+
type?: "load" | "unload";
|
|
8518
|
+
from?: StringId;
|
|
8519
|
+
to?: StringId;
|
|
8520
|
+
from_name?: string;
|
|
8521
|
+
to_name?: string;
|
|
8522
|
+
time?: number;
|
|
8523
|
+
status?:
|
|
8524
|
+
| "pending"
|
|
8525
|
+
| "approved"
|
|
8526
|
+
| "processing"
|
|
8527
|
+
| "rejected"
|
|
8528
|
+
| "processed"
|
|
8529
|
+
| "failed";
|
|
8530
|
+
sync_id?: string;
|
|
8531
|
+
asset_part_units?: {
|
|
8532
|
+
asset_part_unit: StringId;
|
|
8533
|
+
qty: number;
|
|
8534
|
+
asset_part_name?: string;
|
|
8535
|
+
note?: string;
|
|
8536
|
+
splitted_from?: StringId;
|
|
8537
|
+
}[];
|
|
8538
|
+
teams?: StringId[];
|
|
8539
|
+
business_day?: string;
|
|
8540
|
+
asset_part_units_count?: number;
|
|
8541
|
+
total_asset_part_units_qty?: number;
|
|
8542
|
+
custom_status?: StringId;
|
|
8543
|
+
description?: string;
|
|
8544
|
+
process_time?: number;
|
|
8545
|
+
visit_id?: string;
|
|
8546
|
+
integration_meta?: { [key: string]: any };
|
|
8547
|
+
company_namespace?: string[];
|
|
8548
|
+
createdAt?: Date;
|
|
8549
|
+
updatedAt?: Date;
|
|
8550
|
+
isResubmitted?: boolean;
|
|
8551
|
+
note?: string;
|
|
8552
|
+
stage?: number;
|
|
8553
|
+
}
|
|
8554
|
+
|
|
8555
|
+
export namespace Find {
|
|
8556
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
8557
|
+
nodeCycles?: StringId[] | StringId;
|
|
8558
|
+
_id?: StringId[] | StringId;
|
|
8559
|
+
search?: string; // serial_number.formatted
|
|
8560
|
+
"serial_number.formatted"?: string[] | string;
|
|
8561
|
+
sync_id?: string[] | string;
|
|
8562
|
+
"creator._id"?: string[] | string;
|
|
8563
|
+
type?: string[] | string;
|
|
8564
|
+
from?: string[] | string;
|
|
8565
|
+
to?: string[] | string;
|
|
8566
|
+
teams?: string[] | string;
|
|
8567
|
+
visit_id?: string[] | string;
|
|
8568
|
+
custom_status?: string[] | string;
|
|
8569
|
+
transaction_processed?: boolean;
|
|
8570
|
+
"asset_part_units.asset_part_unit"?: string[] | string;
|
|
8571
|
+
from_time?: number;
|
|
8572
|
+
to_time?: number;
|
|
8573
|
+
from_createdAt?: number;
|
|
8574
|
+
to_createdAt?: number;
|
|
8575
|
+
from_updatedAt?: number;
|
|
8576
|
+
to_updatedAt?: number;
|
|
8577
|
+
[key: string]: any; // integration_meta.
|
|
8578
|
+
};
|
|
8579
|
+
export interface Result extends DefaultPaginationResult {
|
|
8580
|
+
data: Data[] | PopulatedDoc[];
|
|
8581
|
+
}
|
|
8582
|
+
}
|
|
8583
|
+
export namespace Get {
|
|
8584
|
+
export type ID = StringId;
|
|
8585
|
+
export type Result = Data | PopulatedDoc;
|
|
8586
|
+
}
|
|
8587
|
+
export namespace Create {
|
|
8588
|
+
export type Body = CreateBody;
|
|
8589
|
+
export type Result = Data;
|
|
8590
|
+
}
|
|
8591
|
+
export namespace Update {
|
|
8592
|
+
export type ID = StringId;
|
|
8593
|
+
export type Body = UpdateBody;
|
|
8594
|
+
export type Result = Data;
|
|
8595
|
+
}
|
|
8596
|
+
export namespace Patch {
|
|
8597
|
+
export type Params = { updateStatus: true };
|
|
8598
|
+
export type Body = {
|
|
8599
|
+
readQuery: [{ key: "_id"; operator: "in"; value: StringId[] }];
|
|
8600
|
+
writeQuery: { key: "custom_status"; command: "set"; value: StringId };
|
|
8601
|
+
};
|
|
8602
|
+
export type Result = { nFound: number; nModified: number };
|
|
8603
|
+
}
|
|
8604
|
+
}
|
|
8605
|
+
|
|
8606
|
+
export namespace ReturnStoreAssetPartUnit {
|
|
8607
|
+
export interface Data {
|
|
8608
|
+
_id: StringId;
|
|
8609
|
+
creator: AdminOrRep;
|
|
8610
|
+
editor?: AdminOrRep;
|
|
8611
|
+
sync_id: string;
|
|
8612
|
+
transaction_processed: boolean;
|
|
8613
|
+
type: "returned" | "stored";
|
|
8614
|
+
client: StringId;
|
|
8615
|
+
client_name: string;
|
|
8616
|
+
warehouse: StringId;
|
|
8617
|
+
warehouse_name: string;
|
|
8618
|
+
teams?: StringId[];
|
|
8619
|
+
time: number;
|
|
8620
|
+
business_day?: string;
|
|
8621
|
+
visit_id?: string;
|
|
8622
|
+
serial_number: SerialNumber;
|
|
8623
|
+
description?: string;
|
|
8624
|
+
custom_status?: StringId;
|
|
8625
|
+
signature?: StringId;
|
|
8626
|
+
media?: StringId[];
|
|
8627
|
+
asset_part_units: {
|
|
8628
|
+
_id?: StringId;
|
|
8629
|
+
asset_part_unit: StringId;
|
|
8630
|
+
qty: number;
|
|
8631
|
+
asset_part?: StringId;
|
|
8632
|
+
asset_part_name?: string;
|
|
8633
|
+
comment?: string;
|
|
8634
|
+
splitted_from?: StringId;
|
|
8635
|
+
}[];
|
|
8636
|
+
asset_part_units_count?: number;
|
|
8637
|
+
total_asset_part_units_qty?: number;
|
|
8638
|
+
integration_meta?: { [key: string]: any };
|
|
8639
|
+
company_namespace: string[];
|
|
8640
|
+
createdAt: Date;
|
|
8641
|
+
updatedAt: Date;
|
|
8642
|
+
}
|
|
8643
|
+
export interface PopulatedDoc {
|
|
8644
|
+
_id: StringId;
|
|
8645
|
+
creator: AdminOrRep;
|
|
8646
|
+
editor?: AdminOrRep;
|
|
8647
|
+
sync_id: string;
|
|
8648
|
+
transaction_processed: boolean;
|
|
8649
|
+
type: "returned" | "stored";
|
|
8650
|
+
client:
|
|
8651
|
+
| StringId
|
|
8652
|
+
| Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
|
|
8653
|
+
client_name: string;
|
|
8654
|
+
warehouse:
|
|
8655
|
+
| StringId
|
|
8656
|
+
| Pick<Warehouse.WarehouseSchema, "_id" | "code" | "type" | "name">;
|
|
8657
|
+
warehouse_name: string;
|
|
8658
|
+
teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
|
|
8659
|
+
time: number;
|
|
8660
|
+
business_day?: string;
|
|
8661
|
+
visit_id?: string;
|
|
8662
|
+
serial_number: SerialNumber;
|
|
8663
|
+
description?: string;
|
|
8664
|
+
custom_status?:
|
|
8665
|
+
| StringId
|
|
8666
|
+
| Pick<CustomStatus.CustomStatusSchema, "_id" | "name" | "local_name">;
|
|
8667
|
+
signature?: StringId;
|
|
8668
|
+
media?: StringId[];
|
|
8669
|
+
asset_part_units: {
|
|
8670
|
+
_id: StringId;
|
|
8671
|
+
asset_part_unit: StringId | AssetPartUnit.Data;
|
|
8672
|
+
qty: number;
|
|
8673
|
+
asset_part?: StringId | AssetPart.Data;
|
|
8674
|
+
asset_part_name?: string;
|
|
8675
|
+
comment?: string;
|
|
8676
|
+
splitted_from?: StringId | AssetPartUnit.Data;
|
|
8677
|
+
}[];
|
|
8678
|
+
asset_part_units_count?: number;
|
|
8679
|
+
total_asset_part_units_qty?: number;
|
|
8680
|
+
integration_meta?: { [key: string]: any };
|
|
8681
|
+
company_namespace: string[];
|
|
8682
|
+
createdAt: Date;
|
|
8683
|
+
updatedAt: Date;
|
|
8684
|
+
}
|
|
8685
|
+
export interface CreateBody {
|
|
8686
|
+
creator?: AdminOrRep;
|
|
8687
|
+
editor?: AdminOrRep;
|
|
8688
|
+
type: "returned" | "stored";
|
|
8689
|
+
sync_id: string;
|
|
8690
|
+
transaction_processed: boolean;
|
|
8691
|
+
serial_number?: SerialNumber;
|
|
8692
|
+
client: StringId;
|
|
8693
|
+
client_name?: string;
|
|
8694
|
+
warehouse: StringId;
|
|
8695
|
+
warehouse_name?: string;
|
|
8696
|
+
teams?: StringId[];
|
|
8697
|
+
time: number;
|
|
8698
|
+
business_day?: string;
|
|
8699
|
+
visit_id?: string;
|
|
8700
|
+
description?: string;
|
|
8701
|
+
custom_status?: StringId;
|
|
8702
|
+
signature?: StringId;
|
|
8703
|
+
media?: StringId[];
|
|
8704
|
+
asset_part_units: {
|
|
8705
|
+
_id?: StringId;
|
|
8706
|
+
asset_part_unit: StringId;
|
|
8707
|
+
qty: number;
|
|
8708
|
+
asset_part?: StringId;
|
|
8709
|
+
asset_part_name?: string;
|
|
8710
|
+
comment?: string;
|
|
8711
|
+
}[];
|
|
8712
|
+
integration_meta?: { [key: string]: any };
|
|
8713
|
+
asset_part_units_count?: number;
|
|
8714
|
+
total_asset_part_units_qty?: number;
|
|
8715
|
+
company_namespace: string[];
|
|
8716
|
+
}
|
|
8717
|
+
export interface UpdateBody {
|
|
8718
|
+
editor?: AdminOrRep;
|
|
8719
|
+
description?: string;
|
|
8720
|
+
custom_status?: StringId;
|
|
8721
|
+
media?: StringId[];
|
|
8722
|
+
integration_meta?: { [key: string]: any };
|
|
8723
|
+
}
|
|
8724
|
+
|
|
8725
|
+
export namespace Find {
|
|
8726
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
8727
|
+
_id?: StringId[] | StringId;
|
|
8728
|
+
search?: string; // serial_number.formatted
|
|
8729
|
+
"serial_number.formatted"?: string[] | string;
|
|
8730
|
+
sync_id?: string[] | string;
|
|
8731
|
+
client?: string[] | string;
|
|
8732
|
+
warehouse?: string[] | string;
|
|
8733
|
+
"creator._id"?: string[] | string;
|
|
8734
|
+
teams?: string[] | string;
|
|
8735
|
+
visit_id?: string[] | string;
|
|
8736
|
+
custom_status?: string[] | string;
|
|
8737
|
+
"asset_parts.asset_part"?: string[] | string;
|
|
8738
|
+
"asset_parts.asset_part_unit"?: string[] | string;
|
|
8739
|
+
from_time?: number;
|
|
8740
|
+
to_time?: number;
|
|
8741
|
+
from_createdAt?: number;
|
|
8742
|
+
to_createdAt?: number;
|
|
8743
|
+
from_updatedAt?: number;
|
|
8744
|
+
to_updatedAt?: number;
|
|
8745
|
+
[key: string]: any; // integration_meta.
|
|
8746
|
+
};
|
|
8747
|
+
export interface Result extends DefaultPaginationResult {
|
|
8748
|
+
data: Data[] | PopulatedDoc[];
|
|
8749
|
+
}
|
|
8750
|
+
}
|
|
8751
|
+
export namespace Get {
|
|
8752
|
+
export type ID = string;
|
|
8753
|
+
export type Result = Data | PopulatedDoc;
|
|
8754
|
+
}
|
|
8755
|
+
export namespace Create {
|
|
8756
|
+
export type Body = CreateBody;
|
|
8757
|
+
export type Result = Data;
|
|
8758
|
+
}
|
|
8759
|
+
export namespace Update {
|
|
8760
|
+
export type ID = string;
|
|
8761
|
+
export type Body = UpdateBody;
|
|
8762
|
+
export type Result = Data;
|
|
8763
|
+
}
|
|
8764
|
+
export namespace Patch {
|
|
8765
|
+
export type Params = { updateStatus: true };
|
|
8766
|
+
export type Body = {
|
|
8767
|
+
readQuery: [{ key: "_id"; operator: "in"; value: StringId[] }];
|
|
8768
|
+
writeQuery: { key: "custom_status"; command: "set"; value: StringId };
|
|
8769
|
+
};
|
|
8770
|
+
export type Result = { nFound: number; nModified: number };
|
|
8771
|
+
}
|
|
8772
|
+
}
|
|
7889
8773
|
}
|
|
7890
8774
|
|
|
7891
8775
|
export type StringId = string;
|
|
7892
8776
|
export type NameSpaces = string[];
|
|
8777
|
+
export interface AdminOrRep {
|
|
8778
|
+
_id: StringId;
|
|
8779
|
+
name?: string;
|
|
8780
|
+
type: "admin" | "rep";
|
|
8781
|
+
admin?: StringId;
|
|
8782
|
+
rep?: StringId;
|
|
8783
|
+
}
|