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/src/index.ts CHANGED
@@ -3294,54 +3294,109 @@ export default class Repzo {
3294
3294
  },
3295
3295
  };
3296
3296
 
3297
- returnStoreAssetPartUnit = {
3298
- _path: "/return-store-asset-part-unit",
3297
+ returnAssetPartUnit = {
3298
+ _path: "/return-asset-part-unit",
3299
3299
  find: async (
3300
- params?: Service.ReturnStoreAssetPartUnit.Find.Params
3301
- ): Promise<Service.ReturnStoreAssetPartUnit.Find.Result> => {
3302
- let res: Service.ReturnStoreAssetPartUnit.Find.Result = await this._fetch(
3300
+ params?: Service.ReturnAssetPartUnit.Find.Params
3301
+ ): Promise<Service.ReturnAssetPartUnit.Find.Result> => {
3302
+ let res: Service.ReturnAssetPartUnit.Find.Result = await this._fetch(
3303
3303
  this.svAPIEndpoint,
3304
- this.returnStoreAssetPartUnit._path,
3304
+ this.returnAssetPartUnit._path,
3305
3305
  params
3306
3306
  );
3307
3307
  return res;
3308
3308
  },
3309
3309
  get: async (
3310
- id: Service.ReturnStoreAssetPartUnit.Get.ID
3311
- ): Promise<Service.ReturnStoreAssetPartUnit.Get.Result> => {
3310
+ id: Service.ReturnAssetPartUnit.Get.ID
3311
+ ): Promise<Service.ReturnAssetPartUnit.Get.Result> => {
3312
3312
  return await this._fetch(
3313
3313
  this.svAPIEndpoint,
3314
- this.returnStoreAssetPartUnit._path + `/${id}`
3314
+ this.returnAssetPartUnit._path + `/${id}`
3315
3315
  );
3316
3316
  },
3317
3317
  create: async (
3318
- body: Service.ReturnStoreAssetPartUnit.Create.Body
3319
- ): Promise<Service.ReturnStoreAssetPartUnit.Create.Result> => {
3318
+ body: Service.ReturnAssetPartUnit.Create.Body
3319
+ ): Promise<Service.ReturnAssetPartUnit.Create.Result> => {
3320
3320
  let res = await this._create(
3321
3321
  this.svAPIEndpoint,
3322
- this.returnStoreAssetPartUnit._path,
3322
+ this.returnAssetPartUnit._path,
3323
3323
  body
3324
3324
  );
3325
3325
  return res;
3326
3326
  },
3327
3327
  update: async (
3328
- id: Service.ReturnStoreAssetPartUnit.Update.ID,
3329
- body: Service.ReturnStoreAssetPartUnit.Update.Body
3330
- ): Promise<Service.ReturnStoreAssetPartUnit.Update.Result> => {
3331
- let res: Service.ReturnStoreAssetPartUnit.Update.Result = await this._update(
3328
+ id: Service.ReturnAssetPartUnit.Update.ID,
3329
+ body: Service.ReturnAssetPartUnit.Update.Body
3330
+ ): Promise<Service.ReturnAssetPartUnit.Update.Result> => {
3331
+ let res: Service.ReturnAssetPartUnit.Update.Result = await this._update(
3332
3332
  this.svAPIEndpoint,
3333
- this.returnStoreAssetPartUnit._path + `/${id}`,
3333
+ this.returnAssetPartUnit._path + `/${id}`,
3334
3334
  body
3335
3335
  );
3336
3336
  return res;
3337
3337
  },
3338
3338
  patch: async (
3339
- params: Service.ReturnStoreAssetPartUnit.Patch.Params,
3340
- body: Service.ReturnStoreAssetPartUnit.Patch.Body
3341
- ): Promise<Service.ReturnStoreAssetPartUnit.Patch.Result> => {
3342
- let res: Service.ReturnStoreAssetPartUnit.Patch.Result = await this._patch(
3339
+ params: Service.ReturnAssetPartUnit.Patch.Params,
3340
+ body: Service.ReturnAssetPartUnit.Patch.Body
3341
+ ): Promise<Service.ReturnAssetPartUnit.Patch.Result> => {
3342
+ let res: Service.ReturnAssetPartUnit.Patch.Result = await this._patch(
3343
3343
  this.svAPIEndpoint,
3344
- this.returnStoreAssetPartUnit._path,
3344
+ this.returnAssetPartUnit._path,
3345
+ body,
3346
+ params
3347
+ );
3348
+ return res;
3349
+ },
3350
+ };
3351
+
3352
+ storeAssetPartUnit = {
3353
+ _path: "/store-asset-part-unit",
3354
+ find: async (
3355
+ params?: Service.StoreAssetPartUnit.Find.Params
3356
+ ): Promise<Service.StoreAssetPartUnit.Find.Result> => {
3357
+ let res: Service.StoreAssetPartUnit.Find.Result = await this._fetch(
3358
+ this.svAPIEndpoint,
3359
+ this.storeAssetPartUnit._path,
3360
+ params
3361
+ );
3362
+ return res;
3363
+ },
3364
+ get: async (
3365
+ id: Service.StoreAssetPartUnit.Get.ID
3366
+ ): Promise<Service.StoreAssetPartUnit.Get.Result> => {
3367
+ return await this._fetch(
3368
+ this.svAPIEndpoint,
3369
+ this.storeAssetPartUnit._path + `/${id}`
3370
+ );
3371
+ },
3372
+ create: async (
3373
+ body: Service.StoreAssetPartUnit.Create.Body
3374
+ ): Promise<Service.StoreAssetPartUnit.Create.Result> => {
3375
+ let res = await this._create(
3376
+ this.svAPIEndpoint,
3377
+ this.storeAssetPartUnit._path,
3378
+ body
3379
+ );
3380
+ return res;
3381
+ },
3382
+ update: async (
3383
+ id: Service.StoreAssetPartUnit.Update.ID,
3384
+ body: Service.StoreAssetPartUnit.Update.Body
3385
+ ): Promise<Service.StoreAssetPartUnit.Update.Result> => {
3386
+ let res: Service.StoreAssetPartUnit.Update.Result = await this._update(
3387
+ this.svAPIEndpoint,
3388
+ this.storeAssetPartUnit._path + `/${id}`,
3389
+ body
3390
+ );
3391
+ return res;
3392
+ },
3393
+ patch: async (
3394
+ params: Service.StoreAssetPartUnit.Patch.Params,
3395
+ body: Service.StoreAssetPartUnit.Patch.Body
3396
+ ): Promise<Service.StoreAssetPartUnit.Patch.Result> => {
3397
+ let res: Service.StoreAssetPartUnit.Patch.Result = await this._patch(
3398
+ this.svAPIEndpoint,
3399
+ this.storeAssetPartUnit._path,
3345
3400
  body,
3346
3401
  params
3347
3402
  );
@@ -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[]; // | Media[];
8010
- cover_photo?: StringId; // | Media;
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<CustomStatus.CustomStatusSchema, "_id" | "name" | "local_name">;
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<CustomStatus.CustomStatusSchema, "_id" | "name" | "local_name">;
8289
- signature?: StringId;
8290
- media?: StringId[];
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 {
@@ -8470,7 +8557,10 @@ export namespace Service {
8470
8557
  total_asset_part_units_qty?: number;
8471
8558
  custom_status?:
8472
8559
  | StringId
8473
- | Pick<CustomStatus.CustomStatusSchema, "_id" | "name" | "local_name">;
8560
+ | Pick<
8561
+ CustomStatus.CustomStatusSchema,
8562
+ "_id" | "name" | "local_name" | "code" | "color"
8563
+ >;
8474
8564
  description?: string;
8475
8565
  process_time?: number;
8476
8566
  visit_id?: string;
@@ -8557,23 +8647,37 @@ export namespace Service {
8557
8647
  nodeCycles?: StringId[] | StringId;
8558
8648
  _id?: StringId[] | StringId;
8559
8649
  search?: string; // serial_number.formatted
8650
+ serial_number?: string[] | string;
8560
8651
  "serial_number.formatted"?: string[] | string;
8561
8652
  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;
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;
8567
8660
  visit_id?: string[] | string;
8568
- custom_status?: string[] | string;
8661
+ custom_status?: StringId[] | StringId;
8569
8662
  transaction_processed?: boolean;
8570
- "asset_part_units.asset_part_unit"?: string[] | string;
8663
+ asset_part_unit?: StringId[] | StringId;
8664
+ "asset_part_units.asset_part_unit"?: StringId[] | StringId;
8571
8665
  from_time?: number;
8572
8666
  to_time?: number;
8573
8667
  from_createdAt?: number;
8574
8668
  to_createdAt?: number;
8575
8669
  from_updatedAt?: number;
8576
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
+ }[];
8577
8681
  [key: string]: any; // integration_meta.
8578
8682
  };
8579
8683
  export interface Result extends DefaultPaginationResult {
@@ -8603,14 +8707,13 @@ export namespace Service {
8603
8707
  }
8604
8708
  }
8605
8709
 
8606
- export namespace ReturnStoreAssetPartUnit {
8710
+ export namespace ReturnAssetPartUnit {
8607
8711
  export interface Data {
8608
8712
  _id: StringId;
8609
8713
  creator: AdminOrRep;
8610
8714
  editor?: AdminOrRep;
8611
8715
  sync_id: string;
8612
8716
  transaction_processed: boolean;
8613
- type: "returned" | "stored";
8614
8717
  client: StringId;
8615
8718
  client_name: string;
8616
8719
  warehouse: StringId;
@@ -8646,7 +8749,6 @@ export namespace Service {
8646
8749
  editor?: AdminOrRep;
8647
8750
  sync_id: string;
8648
8751
  transaction_processed: boolean;
8649
- type: "returned" | "stored";
8650
8752
  client:
8651
8753
  | StringId
8652
8754
  | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
@@ -8663,9 +8765,12 @@ export namespace Service {
8663
8765
  description?: string;
8664
8766
  custom_status?:
8665
8767
  | StringId
8666
- | Pick<CustomStatus.CustomStatusSchema, "_id" | "name" | "local_name">;
8667
- signature?: StringId;
8668
- media?: StringId[];
8768
+ | Pick<
8769
+ CustomStatus.CustomStatusSchema,
8770
+ "_id" | "name" | "local_name" | "code" | "color"
8771
+ >;
8772
+ signature?: StringId | PopulatedMediaStorage;
8773
+ media?: StringId[] | PopulatedMediaStorage[];
8669
8774
  asset_part_units: {
8670
8775
  _id: StringId;
8671
8776
  asset_part_unit: StringId | AssetPartUnit.Data;
@@ -8685,7 +8790,6 @@ export namespace Service {
8685
8790
  export interface CreateBody {
8686
8791
  creator?: AdminOrRep;
8687
8792
  editor?: AdminOrRep;
8688
- type: "returned" | "stored";
8689
8793
  sync_id: string;
8690
8794
  transaction_processed: boolean;
8691
8795
  serial_number?: SerialNumber;
@@ -8726,22 +8830,214 @@ export namespace Service {
8726
8830
  export type Params = DefaultPaginationQueryParams & {
8727
8831
  _id?: StringId[] | StringId;
8728
8832
  search?: string; // serial_number.formatted
8833
+ serial_number?: string[] | string;
8729
8834
  "serial_number.formatted"?: string[] | string;
8730
8835
  sync_id?: string[] | string;
8731
- client?: string[] | string;
8732
- warehouse?: string[] | string;
8733
- "creator._id"?: string[] | string;
8734
- teams?: 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;
8735
8843
  visit_id?: string[] | string;
8736
- custom_status?: string[] | string;
8737
- "asset_parts.asset_part"?: string[] | string;
8738
- "asset_parts.asset_part_unit"?: 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;
8902
+ warehouse: StringId;
8903
+ warehouse_name: string;
8904
+ teams?: StringId[];
8905
+ time: number;
8906
+ business_day?: string;
8907
+ visit_id?: string;
8908
+ serial_number: SerialNumber;
8909
+ description?: string;
8910
+ custom_status?: StringId;
8911
+ signature?: StringId;
8912
+ media?: StringId[];
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;
8987
+ asset_part_unit: StringId;
8988
+ qty: number;
8989
+ asset_part?: StringId;
8990
+ asset_part_name?: string;
8991
+ comment?: string;
8992
+ }[];
8993
+ integration_meta?: { [key: string]: any };
8994
+ asset_part_units_count?: number;
8995
+ total_asset_part_units_qty?: number;
8996
+ company_namespace: string[];
8997
+ }
8998
+ export interface UpdateBody {
8999
+ editor?: AdminOrRep;
9000
+ description?: string;
9001
+ custom_status?: StringId;
9002
+ media?: StringId[];
9003
+ integration_meta?: { [key: string]: any };
9004
+ }
9005
+
9006
+ export namespace Find {
9007
+ export type Params = DefaultPaginationQueryParams & {
9008
+ _id?: StringId[] | StringId;
9009
+ search?: string; // serial_number.formatted
9010
+ serial_number?: string[] | string;
9011
+ "serial_number.formatted"?: string[] | string;
9012
+ sync_id?: string[] | string;
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;
9019
+ visit_id?: string[] | string;
9020
+ custom_status?: StringId[] | StringId;
9021
+ "asset_part_units.asset_part_unit"?: StringId[] | StringId;
9022
+ asset_part_unit?: StringId[] | StringId;
8739
9023
  from_time?: number;
8740
9024
  to_time?: number;
8741
9025
  from_createdAt?: number;
8742
9026
  to_createdAt?: number;
8743
9027
  from_updatedAt?: number;
8744
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
+ }[];
8745
9041
  [key: string]: any; // integration_meta.
8746
9042
  };
8747
9043
  export interface Result extends DefaultPaginationResult {
@@ -8781,3 +9077,28 @@ export interface AdminOrRep {
8781
9077
  admin?: StringId;
8782
9078
  rep?: StringId;
8783
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
+ };