repzo 1.0.282 → 1.0.283

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/lib/index.d.ts CHANGED
@@ -142,6 +142,8 @@ export declare const end_points: {
142
142
  readonly CALENDAR: "calendar";
143
143
  readonly LINE_TARGET: "line-target";
144
144
  readonly BULK_IMPORT: "bulk-import";
145
+ readonly DELIVERY_NOTE: "delivery-note";
146
+ readonly RESERVATION: "reservation";
145
147
  };
146
148
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
147
149
  export declare const availableService: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport"];
@@ -299,6 +301,8 @@ export default class Repzo {
299
301
  readonly CALENDAR: "calendar";
300
302
  readonly LINE_TARGET: "line-target";
301
303
  readonly BULK_IMPORT: "bulk-import";
304
+ readonly DELIVERY_NOTE: "delivery-note";
305
+ readonly RESERVATION: "reservation";
302
306
  };
303
307
  private _retryRequest;
304
308
  private _fetch;
@@ -1393,4 +1397,18 @@ export default class Repzo {
1393
1397
  create: (params: Service.BulkImport.Create.Params, body: Service.BulkImport.Create.Body) => Promise<Service.BulkImport.Create.Result>;
1394
1398
  update: (id: Service.BulkImport.Update.ID) => Promise<Service.BulkImport.Update.Result>;
1395
1399
  };
1400
+ deliveryNote: {
1401
+ _path: "delivery-note";
1402
+ find: (params?: Service.DeliveryNote.Find.Params) => Promise<Service.DeliveryNote.Find.Result>;
1403
+ get: (id: Service.DeliveryNote.Get.ID, params?: Service.DeliveryNote.Get.Params) => Promise<Service.DeliveryNote.Get.Result>;
1404
+ create: (body: Service.DeliveryNote.Create.Body) => Promise<Service.DeliveryNote.Create.Result>;
1405
+ update: (id: Service.DeliveryNote.Update.ID, body: Service.DeliveryNote.Update.Body) => Promise<Service.DeliveryNote.Update.Result>;
1406
+ };
1407
+ reservation: {
1408
+ _path: "reservation";
1409
+ find: (params?: Service.Reservation.Find.Params) => Promise<Service.Reservation.Find.Result>;
1410
+ get: (id: Service.Reservation.Get.ID, params?: Service.Reservation.Get.Params) => Promise<Service.Reservation.Get.Result>;
1411
+ create: (body: Service.Reservation.Create.Body) => Promise<Service.Reservation.Create.Result>;
1412
+ update: (id: Service.Reservation.Update.ID, body: Service.Reservation.Update.Body) => Promise<Service.Reservation.Update.Result>;
1413
+ };
1396
1414
  }
package/lib/index.js CHANGED
@@ -144,6 +144,8 @@ export const end_points = {
144
144
  CALENDAR: "calendar",
145
145
  LINE_TARGET: "line-target",
146
146
  BULK_IMPORT: "bulk-import",
147
+ DELIVERY_NOTE: "delivery-note",
148
+ RESERVATION: "reservation",
147
149
  };
148
150
  export const availableService = [
149
151
  "client",
@@ -2910,6 +2912,42 @@ class Repzo {
2910
2912
  return res;
2911
2913
  },
2912
2914
  };
2915
+ this.deliveryNote = {
2916
+ _path: Repzo._end_points.DELIVERY_NOTE,
2917
+ find: async (params) => {
2918
+ let res = await this._fetch(this.svAPIEndpoint, this.deliveryNote._path, params);
2919
+ return res;
2920
+ },
2921
+ get: async (id, params) => {
2922
+ return await this._fetch(this.svAPIEndpoint, this.deliveryNote._path + `/${id}`, params);
2923
+ },
2924
+ create: async (body) => {
2925
+ let res = await this._create(this.svAPIEndpoint, this.deliveryNote._path, body);
2926
+ return res;
2927
+ },
2928
+ update: async (id, body) => {
2929
+ let res = await this._update(this.svAPIEndpoint, this.deliveryNote._path + `/${id}`, body);
2930
+ return res;
2931
+ },
2932
+ };
2933
+ this.reservation = {
2934
+ _path: Repzo._end_points.RESERVATION,
2935
+ find: async (params) => {
2936
+ let res = await this._fetch(this.svAPIEndpoint, this.reservation._path, params);
2937
+ return res;
2938
+ },
2939
+ get: async (id, params) => {
2940
+ return await this._fetch(this.svAPIEndpoint, this.reservation._path + `/${id}`, params);
2941
+ },
2942
+ create: async (body) => {
2943
+ let res = await this._create(this.svAPIEndpoint, this.reservation._path, body);
2944
+ return res;
2945
+ },
2946
+ update: async (id, body) => {
2947
+ let res = await this._update(this.svAPIEndpoint, this.reservation._path + `/${id}`, body);
2948
+ return res;
2949
+ },
2950
+ };
2913
2951
  this.svAPIEndpoint =
2914
2952
  !options?.env || options?.env == "production"
2915
2953
  ? "https://sv.api.repzo.me"
@@ -896,6 +896,7 @@ export declare namespace Service {
896
896
  updatedAt: string;
897
897
  __v: number;
898
898
  }
899
+ export type Data = VariantSchema;
899
900
  export interface VariantBody {
900
901
  name?: string;
901
902
  product?: string;
@@ -2412,6 +2413,7 @@ export declare namespace Service {
2412
2413
  updatedAt: string;
2413
2414
  __v: number;
2414
2415
  }
2416
+ type Data = TeamSchema;
2415
2417
  interface TeamBody {
2416
2418
  name?: string;
2417
2419
  company_namespace?: string[];
@@ -3207,6 +3209,7 @@ export declare namespace Service {
3207
3209
  updatedAt: string;
3208
3210
  __v: number;
3209
3211
  }
3212
+ export type Data = WarehouseSchema;
3210
3213
  export interface WarehouseBody {
3211
3214
  name?: string;
3212
3215
  type?: "van" | "main";
@@ -4294,8 +4297,8 @@ export declare namespace Service {
4294
4297
  group_tax_total?: number;
4295
4298
  }
4296
4299
  export interface Item_Variant {
4297
- product_id: string | {
4298
- _id: string;
4300
+ product_id: StringId | {
4301
+ _id: StringId;
4299
4302
  name: string;
4300
4303
  local_name: string;
4301
4304
  barcode: string;
@@ -4304,8 +4307,8 @@ export declare namespace Service {
4304
4307
  };
4305
4308
  };
4306
4309
  product_name: string;
4307
- variant_id: string | {
4308
- _id: string;
4310
+ variant_id: StringId | {
4311
+ _id: StringId;
4309
4312
  name: string;
4310
4313
  local_name: string;
4311
4314
  sku: string;
@@ -4324,32 +4327,38 @@ export declare namespace Service {
4324
4327
  product_barcode?: string;
4325
4328
  variant_sku?: string;
4326
4329
  variant_barcode?: string;
4327
- _id: string;
4330
+ _id: StringId;
4328
4331
  }
4329
4332
  export interface Schema {
4330
- _id: string;
4333
+ _id: StringId;
4331
4334
  variant: Item_Variant;
4332
4335
  measureunit: {
4333
- _id: string;
4336
+ _id: StringId;
4334
4337
  name: string;
4335
4338
  factor: number;
4336
- parent?: string;
4339
+ parent?: StringId;
4337
4340
  disabled?: boolean;
4338
4341
  company_namespace: string[];
4339
4342
  };
4340
4343
  tax: {
4341
- _id: string;
4344
+ _id: StringId;
4342
4345
  name: string;
4343
4346
  rate: number;
4344
4347
  type: "inclusive" | "additive" | "N/A";
4348
+ ubl_tax_details?: {
4349
+ tax_code: "O" | "Z" | "E" | "S";
4350
+ reason: string;
4351
+ reason_code?: string;
4352
+ };
4345
4353
  disabled?: boolean;
4354
+ company_namespace?: string[];
4346
4355
  };
4347
4356
  promotions?: {
4348
4357
  isGet: boolean;
4349
4358
  taken: number;
4350
4359
  free: number;
4351
4360
  bookings?: {
4352
- promotion: string;
4361
+ promotion: StringId;
4353
4362
  type: "get" | "buy";
4354
4363
  count: number;
4355
4364
  round_id: number;
@@ -4364,22 +4373,23 @@ export declare namespace Service {
4364
4373
  [key: string]: any;
4365
4374
  };
4366
4375
  used_promotions?: {
4367
- id: string;
4376
+ id: StringId;
4368
4377
  name: string;
4369
4378
  ref?: string;
4370
4379
  }[];
4371
4380
  general_promotions?: {
4372
- id: string;
4381
+ id: StringId;
4373
4382
  name: string;
4374
4383
  ref?: string;
4375
4384
  }[];
4376
4385
  applicable_promotions?: {
4377
- id: string;
4386
+ id: StringId;
4378
4387
  name: string;
4379
4388
  ref?: string;
4380
4389
  }[];
4381
4390
  modifiers_groups: ModifierGroup[];
4382
4391
  isAdditional?: boolean;
4392
+ additional_on_promo?: string;
4383
4393
  qty: number;
4384
4394
  base_unit_qty?: number;
4385
4395
  overwritePrice?: number;
@@ -4407,7 +4417,24 @@ export declare namespace Service {
4407
4417
  class: "invoice" | "return";
4408
4418
  note?: string;
4409
4419
  return_reason?: string;
4420
+ variant_batches?: {
4421
+ _id: StringId;
4422
+ batch_number: string;
4423
+ expiry_date?: string;
4424
+ non_txn_quantity?: number;
4425
+ qty: number;
4426
+ base_unit_qty?: number;
4427
+ warehouse?: StringId;
4428
+ non_txn_quantity_in_measure_unit?: number;
4429
+ isSelected?: boolean;
4430
+ }[];
4431
+ delivery_tracking?: {
4432
+ free: number;
4433
+ noted_for_delivery: number;
4434
+ delivered: number;
4435
+ };
4410
4436
  }
4437
+ export type Data = Schema;
4411
4438
  export interface Body {
4412
4439
  variant: Item_Variant;
4413
4440
  measureunit: {
@@ -19680,6 +19707,352 @@ export declare namespace Service {
19680
19707
  }
19681
19708
  export {};
19682
19709
  }
19710
+ namespace DeliveryNote {
19711
+ interface User {
19712
+ _id: string;
19713
+ name?: string;
19714
+ type: "admin" | "rep";
19715
+ admin?: string;
19716
+ rep?: string;
19717
+ }
19718
+ type DeliveryNoteItem = {
19719
+ item_index: number;
19720
+ variant: {
19721
+ product_id: StringId;
19722
+ product_name: string;
19723
+ variant_id: StringId | (Pick<Variant.Data, "_id" | "name" | "local_name" | "sku" | "barcode"> & {
19724
+ product: Pick<Product.Data, "_id" | "name" | "local_name" | "sku" | "barcode">;
19725
+ });
19726
+ variant_name: string;
19727
+ variant_local_name?: string;
19728
+ variant_img?: string;
19729
+ variant_cover_photo?: StringId;
19730
+ product_local_name?: string;
19731
+ product_img?: string;
19732
+ product_cover_photo?: StringId;
19733
+ product_sku?: string;
19734
+ product_barcode?: string;
19735
+ variant_sku?: string;
19736
+ variant_barcode?: string;
19737
+ };
19738
+ } & Pick<Item.Data, "_id" | "qty" | "measureunit" | "base_unit_qty" | "modifiers_groups" | "company_namespace" | "variant_batches">;
19739
+ export interface Data {
19740
+ _id: StringId;
19741
+ company_namespace: string[];
19742
+ serial_number: SerialNumber;
19743
+ status: "pending" | "processing" | "approved" | "rejected" | "canceled" | "failed";
19744
+ transaction_processed: boolean;
19745
+ qty_reserved: boolean;
19746
+ client_id: StringId;
19747
+ client_name: string;
19748
+ warehouse_id: StringId;
19749
+ warehouse_name: string;
19750
+ creator: User;
19751
+ editor?: User;
19752
+ implemented_by?: User;
19753
+ time?: number;
19754
+ teams: StringId[];
19755
+ assigned_to: StringId[];
19756
+ sync_id: string;
19757
+ visit_id?: string;
19758
+ client_geo_location?: {
19759
+ lat: number;
19760
+ lng: number;
19761
+ };
19762
+ network_state?: number;
19763
+ platform?: string;
19764
+ version_name?: string;
19765
+ battery_level?: number;
19766
+ time_zone?: string;
19767
+ identifier?: number;
19768
+ device_id?: string;
19769
+ device_unique_id?: string;
19770
+ invoice_id?: StringId;
19771
+ invoice_serial_number?: SerialNumber;
19772
+ proforma_id?: StringId;
19773
+ proforma_serial_number?: SerialNumber;
19774
+ active_transfer_id?: StringId;
19775
+ active_transfer_serial_number?: SerialNumber;
19776
+ items_count?: number;
19777
+ total_items_base_unit_qty?: number;
19778
+ total_measure_unit_qty?: number;
19779
+ items: DeliveryNoteItem[];
19780
+ process_time?: number;
19781
+ failed_reasons?: {
19782
+ code: string;
19783
+ message: string;
19784
+ }[];
19785
+ signature?: StringId;
19786
+ note?: string;
19787
+ media?: StringId[];
19788
+ integration_meta?: Record<string, any>;
19789
+ create_transfer?: boolean;
19790
+ to_warehouse?: StringId;
19791
+ createdAt: Date;
19792
+ updatedAt: Date;
19793
+ }
19794
+ export interface CreateBody {
19795
+ company_namespace: string[];
19796
+ serial_number?: SerialNumber;
19797
+ status?: "pending" | "approved" | "rejected";
19798
+ transaction_processed?: boolean;
19799
+ qty_reserved?: boolean;
19800
+ client_id: StringId;
19801
+ client_name: string;
19802
+ warehouse_id: StringId;
19803
+ warehouse_name: string;
19804
+ creator?: User;
19805
+ implemented_by?: User;
19806
+ time?: number;
19807
+ teams?: StringId[];
19808
+ assigned_to?: StringId[];
19809
+ sync_id: string;
19810
+ visit_id?: string;
19811
+ client_geo_location?: {
19812
+ lat: number;
19813
+ lng: number;
19814
+ };
19815
+ network_state?: number;
19816
+ platform?: string;
19817
+ version_name?: string;
19818
+ battery_level?: number;
19819
+ time_zone?: string;
19820
+ identifier?: number;
19821
+ device_id?: string;
19822
+ device_unique_id?: string;
19823
+ invoice_id?: StringId;
19824
+ invoice_serial_number?: SerialNumber;
19825
+ proforma_id?: StringId;
19826
+ proforma_serial_number?: SerialNumber;
19827
+ active_transfer_id?: StringId;
19828
+ active_transfer_serial_number?: SerialNumber;
19829
+ items_count?: number;
19830
+ total_items_base_unit_qty?: number;
19831
+ total_measure_unit_qty?: number;
19832
+ items: DeliveryNoteItem[];
19833
+ integration_meta?: Record<string, any>;
19834
+ create_transfer?: boolean;
19835
+ to_warehouse?: StringId;
19836
+ }
19837
+ export type UpdateBody = Partial<Data>;
19838
+ export type PopulatedDoc = Data & {
19839
+ client_populated?: Pick<Client.Data, "_id" | "name" | "client_code" | "local_name">[];
19840
+ warehouse_populated?: Pick<Warehouse.Data, "_id" | "name" | "code">[];
19841
+ assigned_to_populated?: Pick<Rep.Data, "_id" | "name">[];
19842
+ teams_populated?: Pick<Team.Data, "_id" | "name">[];
19843
+ invoice_id_populated?: Pick<FullInvoice.Data, "_id" | "serial_number" | "return_serial_number" | "external_serial_number" | "advanced_serial_number">[];
19844
+ proforma_id_populated?: Pick<Proforma.Data, "_id" | "serial_number" | "return_serial_number" | "external_serial_number">[];
19845
+ active_transfer_id_populated?: Pick<Transfer.Data, "_id" | "serial_number" | "status">[];
19846
+ media_populated?: PopulatedMediaStorage[];
19847
+ signature_populated?: PopulatedMediaStorage;
19848
+ cycle?: Cycle.Schema & {
19849
+ approval?: string | Approval.Data;
19850
+ };
19851
+ };
19852
+ type PopulatedKeys = "variant_id" | "client_id" | "warehouse_id" | "assigned_to" | "teams" | "invoice_id" | "proforma_id" | "active_transfer_id" | "media" | "signature";
19853
+ type SortingKeys = "_id" | "createdAt" | "updatedAt" | "time";
19854
+ export namespace Find {
19855
+ type Params = DefaultPaginationQueryParams & {
19856
+ sortBy?: {
19857
+ field: SortingKeys;
19858
+ type: "asc" | "desc";
19859
+ }[];
19860
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
19861
+ _id?: StringId | StringId[];
19862
+ withCycle?: boolean;
19863
+ status?: Data["status"] | Data["status"][];
19864
+ client_id?: StringId | StringId[];
19865
+ warehouse_id?: StringId | StringId[];
19866
+ teams?: StringId | StringId[];
19867
+ assigned_to?: StringId | StringId[];
19868
+ sync_id?: string | string[];
19869
+ "serial_number.formatted"?: string | string[];
19870
+ transaction_processed?: boolean;
19871
+ qty_reserved?: boolean;
19872
+ invoice_id?: StringId | StringId[];
19873
+ proforma_id?: StringId | StringId[];
19874
+ active_transfer_id?: StringId | StringId[];
19875
+ from_updatedAt?: number;
19876
+ to_updatedAt?: number;
19877
+ from_createdAt?: number;
19878
+ to_createdAt?: number;
19879
+ from_time?: number;
19880
+ to_time?: number;
19881
+ "creator._id"?: StringId | StringId[];
19882
+ "creator.type"?: User["type"] | User["type"][];
19883
+ "items.variant.product_id"?: StringId | StringId[];
19884
+ "items.variant.variant_id"?: StringId | StringId[];
19885
+ };
19886
+ interface Result extends DefaultPaginationResult {
19887
+ data: PopulatedDoc[];
19888
+ }
19889
+ }
19890
+ export namespace Get {
19891
+ type ID = string;
19892
+ type Params = {
19893
+ populatedKeys?: PopulatedKeys[];
19894
+ withCycle?: boolean;
19895
+ };
19896
+ type Result = PopulatedDoc;
19897
+ }
19898
+ export namespace Create {
19899
+ type Body = CreateBody;
19900
+ type Result = Data;
19901
+ }
19902
+ export namespace Update {
19903
+ type ID = StringId;
19904
+ type Body = UpdateBody;
19905
+ type Result = Data;
19906
+ }
19907
+ export {};
19908
+ }
19909
+ namespace Reservation {
19910
+ interface User {
19911
+ _id: StringId;
19912
+ name?: string;
19913
+ type: "admin" | "rep";
19914
+ admin?: StringId;
19915
+ rep?: StringId;
19916
+ }
19917
+ interface Source {
19918
+ _id: StringId;
19919
+ type: "proforma" | "invoice";
19920
+ serial_number: SerialNumber;
19921
+ invoice?: StringId;
19922
+ proforma?: StringId;
19923
+ }
19924
+ interface Item {
19925
+ item_index: number;
19926
+ _id: StringId;
19927
+ variant: {
19928
+ product_id: StringId | Product.Data;
19929
+ product_name: string;
19930
+ variant_id: StringId | Variant.Data;
19931
+ variant_name: string;
19932
+ variant_local_name?: string;
19933
+ variant_img?: string;
19934
+ variant_cover_photo?: StringId;
19935
+ product_local_name?: string;
19936
+ product_img?: string;
19937
+ product_cover_photo?: StringId;
19938
+ product_sku?: string;
19939
+ product_barcode?: string;
19940
+ variant_sku?: string;
19941
+ variant_barcode?: string;
19942
+ };
19943
+ measureunit: {
19944
+ _id: StringId;
19945
+ parent: StringId;
19946
+ name: string;
19947
+ factor: number;
19948
+ disabled: boolean;
19949
+ company_namespace: string[];
19950
+ };
19951
+ qty: number;
19952
+ base_unit_qty?: number;
19953
+ }
19954
+ export interface Data {
19955
+ _id: StringId;
19956
+ company_namespace: string[];
19957
+ serial_number: SerialNumber;
19958
+ qty_reserved: boolean;
19959
+ warehouse_id: StringId;
19960
+ warehouse_name: string;
19961
+ client_id?: StringId;
19962
+ client_name?: string;
19963
+ creator: User;
19964
+ editor?: User;
19965
+ time?: number;
19966
+ teams?: StringId[];
19967
+ sync_id: string;
19968
+ type: "free" | "automated";
19969
+ status: "active" | "revoked" | "cancelled";
19970
+ source?: Source;
19971
+ items_count?: number;
19972
+ total_items_base_unit_qty?: number;
19973
+ total_measure_unit_qty?: number;
19974
+ items: Item[];
19975
+ createdAt: Date;
19976
+ updatedAt: Date;
19977
+ }
19978
+ export interface CreateBody {
19979
+ company_namespace: string[];
19980
+ serial_number?: SerialNumber;
19981
+ qty_reserved?: boolean;
19982
+ warehouse_id: StringId;
19983
+ warehouse_name: string;
19984
+ client_id?: StringId;
19985
+ client_name?: string;
19986
+ creator?: User;
19987
+ time?: number;
19988
+ teams?: StringId[];
19989
+ sync_id: string;
19990
+ type: "free" | "automated";
19991
+ status?: "active" | "revoked" | "cancelled";
19992
+ source?: Source;
19993
+ items_count?: number;
19994
+ total_items_base_unit_qty?: number;
19995
+ total_measure_unit_qty?: number;
19996
+ items: Item[];
19997
+ }
19998
+ export type UpdateBody = Partial<Data>;
19999
+ export type PopulatedDoc = Data & {
20000
+ client_populated?: Pick<Client.Data, "_id" | "name" | "client_code" | "local_name">[];
20001
+ warehouse_populated?: Pick<Warehouse.Data, "_id" | "name" | "code">[];
20002
+ teams_populated?: Pick<Team.Data, "_id" | "name">[];
20003
+ };
20004
+ type PopulatedKeys = "client_id" | "warehouse_id" | "teams";
20005
+ type SortingKeys = "_id";
20006
+ export namespace Find {
20007
+ type Params = DefaultPaginationQueryParams & {
20008
+ sortBy?: {
20009
+ field: SortingKeys;
20010
+ type: "asc" | "desc";
20011
+ }[];
20012
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
20013
+ _id?: StringId | StringId[];
20014
+ status?: Data["status"] | Data["status"][];
20015
+ client_id?: StringId | StringId[];
20016
+ warehouse_id?: StringId | StringId[];
20017
+ teams?: StringId | StringId[];
20018
+ sync_id?: string | string[];
20019
+ "serial_number.formatted"?: string | string[];
20020
+ from_updatedAt?: number;
20021
+ to_updatedAt?: number;
20022
+ from_createdAt?: number;
20023
+ to_createdAt?: number;
20024
+ "creator._id"?: StringId | StringId[];
20025
+ "creator.type"?: User["type"] | User["type"][];
20026
+ "items.variant.product_id"?: StringId | StringId[];
20027
+ "items.variant.variant_id"?: StringId | StringId[];
20028
+ type?: Data["type"] | Data["type"][];
20029
+ "source.type"?: Source["type"] | Source["type"][];
20030
+ "source._id"?: StringId | StringId[];
20031
+ "source.serial_number.formatted"?: string | string[];
20032
+ };
20033
+ interface Result extends DefaultPaginationResult {
20034
+ data: PopulatedDoc[];
20035
+ }
20036
+ }
20037
+ export namespace Get {
20038
+ type ID = string;
20039
+ type Params = {
20040
+ populatedKeys?: PopulatedKeys[];
20041
+ withCycle?: boolean;
20042
+ };
20043
+ type Result = PopulatedDoc;
20044
+ }
20045
+ export namespace Create {
20046
+ type Body = CreateBody;
20047
+ type Result = Data;
20048
+ }
20049
+ export namespace Update {
20050
+ type ID = StringId;
20051
+ type Body = UpdateBody;
20052
+ type Result = Data;
20053
+ }
20054
+ export {};
20055
+ }
19683
20056
  }
19684
20057
  export type StringId = string;
19685
20058
  export type NameSpaces = string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.282",
3
+ "version": "1.0.283",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -154,6 +154,8 @@ export const end_points = {
154
154
  CALENDAR: "calendar",
155
155
  LINE_TARGET: "line-target",
156
156
  BULK_IMPORT: "bulk-import",
157
+ DELIVERY_NOTE: "delivery-note",
158
+ RESERVATION: "reservation",
157
159
  } as const;
158
160
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
159
161
 
@@ -7273,6 +7275,96 @@ export default class Repzo {
7273
7275
  return res;
7274
7276
  },
7275
7277
  };
7278
+
7279
+ deliveryNote = {
7280
+ _path: Repzo._end_points.DELIVERY_NOTE,
7281
+ find: async (
7282
+ params?: Service.DeliveryNote.Find.Params,
7283
+ ): Promise<Service.DeliveryNote.Find.Result> => {
7284
+ let res: Service.DeliveryNote.Find.Result = await this._fetch(
7285
+ this.svAPIEndpoint,
7286
+ this.deliveryNote._path,
7287
+ params,
7288
+ );
7289
+ return res;
7290
+ },
7291
+ get: async (
7292
+ id: Service.DeliveryNote.Get.ID,
7293
+ params?: Service.DeliveryNote.Get.Params,
7294
+ ): Promise<Service.DeliveryNote.Get.Result> => {
7295
+ return await this._fetch(
7296
+ this.svAPIEndpoint,
7297
+ this.deliveryNote._path + `/${id}`,
7298
+ params,
7299
+ );
7300
+ },
7301
+ create: async (
7302
+ body: Service.DeliveryNote.Create.Body,
7303
+ ): Promise<Service.DeliveryNote.Create.Result> => {
7304
+ let res = await this._create(
7305
+ this.svAPIEndpoint,
7306
+ this.deliveryNote._path,
7307
+ body,
7308
+ );
7309
+ return res;
7310
+ },
7311
+ update: async (
7312
+ id: Service.DeliveryNote.Update.ID,
7313
+ body: Service.DeliveryNote.Update.Body,
7314
+ ): Promise<Service.DeliveryNote.Update.Result> => {
7315
+ let res: Service.DeliveryNote.Update.Result = await this._update(
7316
+ this.svAPIEndpoint,
7317
+ this.deliveryNote._path + `/${id}`,
7318
+ body,
7319
+ );
7320
+ return res;
7321
+ },
7322
+ };
7323
+
7324
+ reservation = {
7325
+ _path: Repzo._end_points.RESERVATION,
7326
+ find: async (
7327
+ params?: Service.Reservation.Find.Params,
7328
+ ): Promise<Service.Reservation.Find.Result> => {
7329
+ let res: Service.Reservation.Find.Result = await this._fetch(
7330
+ this.svAPIEndpoint,
7331
+ this.reservation._path,
7332
+ params,
7333
+ );
7334
+ return res;
7335
+ },
7336
+ get: async (
7337
+ id: Service.Reservation.Get.ID,
7338
+ params?: Service.Reservation.Get.Params,
7339
+ ): Promise<Service.Reservation.Get.Result> => {
7340
+ return await this._fetch(
7341
+ this.svAPIEndpoint,
7342
+ this.reservation._path + `/${id}`,
7343
+ params,
7344
+ );
7345
+ },
7346
+ create: async (
7347
+ body: Service.Reservation.Create.Body,
7348
+ ): Promise<Service.Reservation.Create.Result> => {
7349
+ let res = await this._create(
7350
+ this.svAPIEndpoint,
7351
+ this.reservation._path,
7352
+ body,
7353
+ );
7354
+ return res;
7355
+ },
7356
+ update: async (
7357
+ id: Service.Reservation.Update.ID,
7358
+ body: Service.Reservation.Update.Body,
7359
+ ): Promise<Service.Reservation.Update.Result> => {
7360
+ let res: Service.Reservation.Update.Result = await this._update(
7361
+ this.svAPIEndpoint,
7362
+ this.reservation._path + `/${id}`,
7363
+ body,
7364
+ );
7365
+ return res;
7366
+ },
7367
+ };
7276
7368
  }
7277
7369
 
7278
7370
  function normalizeParams(params: Params): { [key: string]: any } {
@@ -1168,6 +1168,7 @@ export namespace Service {
1168
1168
  updatedAt: string;
1169
1169
  __v: number;
1170
1170
  }
1171
+ export type Data = VariantSchema;
1171
1172
  export interface VariantBody {
1172
1173
  name?: string;
1173
1174
  product?: string;
@@ -2822,6 +2823,7 @@ export namespace Service {
2822
2823
  updatedAt: string;
2823
2824
  __v: number;
2824
2825
  }
2826
+ export type Data = TeamSchema;
2825
2827
  export interface TeamBody {
2826
2828
  name?: string;
2827
2829
  company_namespace?: string[];
@@ -3703,6 +3705,7 @@ export namespace Service {
3703
3705
  updatedAt: string;
3704
3706
  __v: number;
3705
3707
  }
3708
+ export type Data = WarehouseSchema;
3706
3709
  export interface WarehouseBody {
3707
3710
  name?: string;
3708
3711
  type?: "van" | "main";
@@ -4906,9 +4909,9 @@ export namespace Service {
4906
4909
  }
4907
4910
  export interface Item_Variant {
4908
4911
  product_id:
4909
- | string
4912
+ | StringId
4910
4913
  | {
4911
- _id: string;
4914
+ _id: StringId;
4912
4915
  name: string;
4913
4916
  local_name: string;
4914
4917
  barcode: string;
@@ -4916,9 +4919,9 @@ export namespace Service {
4916
4919
  };
4917
4920
  product_name: string;
4918
4921
  variant_id:
4919
- | string
4922
+ | StringId
4920
4923
  | {
4921
- _id: string;
4924
+ _id: StringId;
4922
4925
  name: string;
4923
4926
  local_name: string;
4924
4927
  sku: string;
@@ -4935,32 +4938,38 @@ export namespace Service {
4935
4938
  product_barcode?: string;
4936
4939
  variant_sku?: string;
4937
4940
  variant_barcode?: string;
4938
- _id: string;
4941
+ _id: StringId;
4939
4942
  }
4940
4943
  export interface Schema {
4941
- _id: string;
4944
+ _id: StringId;
4942
4945
  variant: Item_Variant;
4943
4946
  measureunit: {
4944
- _id: string;
4947
+ _id: StringId;
4945
4948
  name: string;
4946
4949
  factor: number;
4947
- parent?: string;
4950
+ parent?: StringId;
4948
4951
  disabled?: boolean;
4949
4952
  company_namespace: string[];
4950
4953
  };
4951
4954
  tax: {
4952
- _id: string;
4955
+ _id: StringId;
4953
4956
  name: string;
4954
4957
  rate: number;
4955
4958
  type: "inclusive" | "additive" | "N/A";
4959
+ ubl_tax_details?: {
4960
+ tax_code: "O" | "Z" | "E" | "S";
4961
+ reason: string;
4962
+ reason_code?: string;
4963
+ };
4956
4964
  disabled?: boolean;
4965
+ company_namespace?: string[];
4957
4966
  };
4958
4967
  promotions?: {
4959
4968
  isGet: boolean;
4960
4969
  taken: number;
4961
4970
  free: number;
4962
4971
  bookings?: {
4963
- promotion: string;
4972
+ promotion: StringId;
4964
4973
  type: "get" | "buy";
4965
4974
  count: number;
4966
4975
  round_id: number;
@@ -4974,11 +4983,12 @@ export namespace Service {
4974
4983
  highlight: boolean;
4975
4984
  [key: string]: any;
4976
4985
  };
4977
- used_promotions?: { id: string; name: string; ref?: string }[];
4978
- general_promotions?: { id: string; name: string; ref?: string }[];
4979
- applicable_promotions?: { id: string; name: string; ref?: string }[];
4986
+ used_promotions?: { id: StringId; name: string; ref?: string }[];
4987
+ general_promotions?: { id: StringId; name: string; ref?: string }[];
4988
+ applicable_promotions?: { id: StringId; name: string; ref?: string }[];
4980
4989
  modifiers_groups: ModifierGroup[];
4981
4990
  isAdditional?: boolean;
4991
+ additional_on_promo?: string;
4982
4992
  qty: number;
4983
4993
  base_unit_qty?: number;
4984
4994
  overwritePrice?: number;
@@ -5006,7 +5016,24 @@ export namespace Service {
5006
5016
  class: "invoice" | "return";
5007
5017
  note?: string;
5008
5018
  return_reason?: string;
5019
+ variant_batches?: {
5020
+ _id: StringId;
5021
+ batch_number: string;
5022
+ expiry_date?: string;
5023
+ non_txn_quantity?: number;
5024
+ qty: number;
5025
+ base_unit_qty?: number;
5026
+ warehouse?: StringId;
5027
+ non_txn_quantity_in_measure_unit?: number;
5028
+ isSelected?: boolean;
5029
+ }[];
5030
+ delivery_tracking?: {
5031
+ free: number;
5032
+ noted_for_delivery: number;
5033
+ delivered: number;
5034
+ };
5009
5035
  }
5036
+ export type Data = Schema;
5010
5037
  export interface Body {
5011
5038
  variant: Item_Variant;
5012
5039
  measureunit: {
@@ -22035,6 +22062,402 @@ export namespace Service {
22035
22062
  export type Result = Data;
22036
22063
  }
22037
22064
  }
22065
+
22066
+ export namespace DeliveryNote {
22067
+ interface User {
22068
+ _id: string;
22069
+ name?: string;
22070
+ type: "admin" | "rep";
22071
+ admin?: string;
22072
+ rep?: string;
22073
+ }
22074
+
22075
+ type DeliveryNoteItem = {
22076
+ item_index: number;
22077
+ variant: {
22078
+ product_id: StringId;
22079
+ product_name: string;
22080
+ variant_id:
22081
+ | StringId
22082
+ | (Pick<
22083
+ Variant.Data,
22084
+ "_id" | "name" | "local_name" | "sku" | "barcode"
22085
+ > & {
22086
+ product: Pick<
22087
+ Product.Data,
22088
+ "_id" | "name" | "local_name" | "sku" | "barcode"
22089
+ >;
22090
+ });
22091
+ variant_name: string;
22092
+ variant_local_name?: string;
22093
+ variant_img?: string;
22094
+ variant_cover_photo?: StringId;
22095
+ product_local_name?: string;
22096
+ product_img?: string;
22097
+ product_cover_photo?: StringId;
22098
+ product_sku?: string;
22099
+ product_barcode?: string;
22100
+ variant_sku?: string;
22101
+ variant_barcode?: string;
22102
+ };
22103
+ } & Pick<
22104
+ Item.Data,
22105
+ | "_id"
22106
+ | "qty"
22107
+ | "measureunit"
22108
+ | "base_unit_qty"
22109
+ | "modifiers_groups"
22110
+ | "company_namespace"
22111
+ | "variant_batches"
22112
+ >;
22113
+
22114
+ export interface Data {
22115
+ _id: StringId;
22116
+ company_namespace: string[];
22117
+ serial_number: SerialNumber;
22118
+ status:
22119
+ | "pending" // when create
22120
+ | "processing" // after first transfer
22121
+ | "approved" // action from client
22122
+ | "rejected" // action from client
22123
+ | "canceled" // action from rep/admin to disabled the delivery note
22124
+ | "failed"; // when create but the items was reserved to another delivery-notes
22125
+ transaction_processed: boolean;
22126
+ qty_reserved: boolean;
22127
+ client_id: StringId;
22128
+ client_name: string;
22129
+ warehouse_id: StringId;
22130
+ warehouse_name: string;
22131
+ creator: User;
22132
+ editor?: User;
22133
+ implemented_by?: User;
22134
+ time?: number;
22135
+ teams: StringId[];
22136
+ assigned_to: StringId[];
22137
+ sync_id: string;
22138
+ visit_id?: string;
22139
+ client_geo_location?: { lat: number; lng: number };
22140
+ network_state?: number;
22141
+ platform?: string;
22142
+ version_name?: string;
22143
+ battery_level?: number;
22144
+ time_zone?: string;
22145
+ identifier?: number;
22146
+ device_id?: string;
22147
+ device_unique_id?: string;
22148
+ invoice_id?: StringId;
22149
+ invoice_serial_number?: SerialNumber;
22150
+ proforma_id?: StringId;
22151
+ proforma_serial_number?: SerialNumber;
22152
+ active_transfer_id?: StringId;
22153
+ active_transfer_serial_number?: SerialNumber;
22154
+ items_count?: number;
22155
+ total_items_base_unit_qty?: number;
22156
+ total_measure_unit_qty?: number;
22157
+ items: DeliveryNoteItem[];
22158
+ process_time?: number;
22159
+ failed_reasons?: { code: string; message: string }[];
22160
+ signature?: StringId;
22161
+ note?: string;
22162
+ media?: StringId[];
22163
+ integration_meta?: Record<string, any>;
22164
+ create_transfer?: boolean;
22165
+ to_warehouse?: StringId;
22166
+ createdAt: Date;
22167
+ updatedAt: Date;
22168
+ }
22169
+ export interface CreateBody {
22170
+ company_namespace: string[];
22171
+ serial_number?: SerialNumber;
22172
+ status?: "pending" | "approved" | "rejected";
22173
+ transaction_processed?: boolean;
22174
+ qty_reserved?: boolean;
22175
+ client_id: StringId;
22176
+ client_name: string;
22177
+ warehouse_id: StringId;
22178
+ warehouse_name: string;
22179
+ creator?: User;
22180
+ implemented_by?: User;
22181
+ time?: number;
22182
+ teams?: StringId[];
22183
+ assigned_to?: StringId[];
22184
+ sync_id: string;
22185
+ visit_id?: string;
22186
+ client_geo_location?: { lat: number; lng: number };
22187
+ network_state?: number;
22188
+ platform?: string;
22189
+ version_name?: string;
22190
+ battery_level?: number;
22191
+ time_zone?: string;
22192
+ identifier?: number;
22193
+ device_id?: string;
22194
+ device_unique_id?: string;
22195
+ invoice_id?: StringId;
22196
+ invoice_serial_number?: SerialNumber;
22197
+ proforma_id?: StringId;
22198
+ proforma_serial_number?: SerialNumber;
22199
+ active_transfer_id?: StringId;
22200
+ active_transfer_serial_number?: SerialNumber;
22201
+ items_count?: number;
22202
+ total_items_base_unit_qty?: number;
22203
+ total_measure_unit_qty?: number;
22204
+ items: DeliveryNoteItem[];
22205
+ integration_meta?: Record<string, any>;
22206
+ create_transfer?: boolean;
22207
+ to_warehouse?: StringId;
22208
+ }
22209
+ export type UpdateBody = Partial<Data>;
22210
+
22211
+ export type PopulatedDoc = Data & {
22212
+ client_populated?: Pick<
22213
+ Client.Data,
22214
+ "_id" | "name" | "client_code" | "local_name"
22215
+ >[];
22216
+ warehouse_populated?: Pick<Warehouse.Data, "_id" | "name" | "code">[];
22217
+ assigned_to_populated?: Pick<Rep.Data, "_id" | "name">[];
22218
+ teams_populated?: Pick<Team.Data, "_id" | "name">[];
22219
+ invoice_id_populated?: Pick<
22220
+ FullInvoice.Data,
22221
+ | "_id"
22222
+ | "serial_number"
22223
+ | "return_serial_number"
22224
+ | "external_serial_number"
22225
+ | "advanced_serial_number"
22226
+ >[];
22227
+ proforma_id_populated?: Pick<
22228
+ Proforma.Data,
22229
+ | "_id"
22230
+ | "serial_number"
22231
+ | "return_serial_number"
22232
+ | "external_serial_number"
22233
+ >[];
22234
+ active_transfer_id_populated?: Pick<
22235
+ Transfer.Data,
22236
+ "_id" | "serial_number" | "status"
22237
+ >[];
22238
+ media_populated?: PopulatedMediaStorage[];
22239
+ signature_populated?: PopulatedMediaStorage;
22240
+ cycle?: Cycle.Schema & { approval?: string | Approval.Data };
22241
+ };
22242
+
22243
+ type PopulatedKeys =
22244
+ | "variant_id"
22245
+ | "client_id"
22246
+ | "warehouse_id"
22247
+ | "assigned_to"
22248
+ | "teams"
22249
+ | "invoice_id"
22250
+ | "proforma_id"
22251
+ | "active_transfer_id"
22252
+ | "media"
22253
+ | "signature";
22254
+ type SortingKeys = "_id" | "createdAt" | "updatedAt" | "time";
22255
+
22256
+ export namespace Find {
22257
+ export type Params = DefaultPaginationQueryParams & {
22258
+ sortBy?: { field: SortingKeys; type: "asc" | "desc" }[];
22259
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
22260
+ _id?: StringId | StringId[];
22261
+ withCycle?: boolean;
22262
+ status?: Data["status"] | Data["status"][];
22263
+ client_id?: StringId | StringId[];
22264
+ warehouse_id?: StringId | StringId[];
22265
+ teams?: StringId | StringId[];
22266
+ assigned_to?: StringId | StringId[];
22267
+ sync_id?: string | string[];
22268
+ "serial_number.formatted"?: string | string[];
22269
+ transaction_processed?: boolean;
22270
+ qty_reserved?: boolean;
22271
+ invoice_id?: StringId | StringId[];
22272
+ proforma_id?: StringId | StringId[];
22273
+ active_transfer_id?: StringId | StringId[];
22274
+ from_updatedAt?: number;
22275
+ to_updatedAt?: number;
22276
+ from_createdAt?: number;
22277
+ to_createdAt?: number;
22278
+ from_time?: number;
22279
+ to_time?: number;
22280
+ "creator._id"?: StringId | StringId[];
22281
+ "creator.type"?: User["type"] | User["type"][];
22282
+ "items.variant.product_id"?: StringId | StringId[];
22283
+ "items.variant.variant_id"?: StringId | StringId[];
22284
+ };
22285
+ export interface Result extends DefaultPaginationResult {
22286
+ data: PopulatedDoc[];
22287
+ }
22288
+ }
22289
+ export namespace Get {
22290
+ export type ID = string;
22291
+ export type Params = {
22292
+ populatedKeys?: PopulatedKeys[];
22293
+ withCycle?: boolean;
22294
+ };
22295
+ export type Result = PopulatedDoc;
22296
+ }
22297
+ export namespace Create {
22298
+ export type Body = CreateBody;
22299
+ export type Result = Data;
22300
+ }
22301
+ export namespace Update {
22302
+ export type ID = StringId;
22303
+ export type Body = UpdateBody;
22304
+ export type Result = Data;
22305
+ }
22306
+ }
22307
+
22308
+ export namespace Reservation {
22309
+ interface User {
22310
+ _id: StringId;
22311
+ name?: string;
22312
+ type: "admin" | "rep";
22313
+ admin?: StringId;
22314
+ rep?: StringId;
22315
+ }
22316
+
22317
+ interface Source {
22318
+ _id: StringId;
22319
+ type: "proforma" | "invoice";
22320
+ serial_number: SerialNumber;
22321
+ invoice?: StringId;
22322
+ proforma?: StringId;
22323
+ }
22324
+
22325
+ interface Item {
22326
+ item_index: number;
22327
+ _id: StringId;
22328
+ variant: {
22329
+ product_id: StringId | Product.Data;
22330
+ product_name: string;
22331
+ variant_id: StringId | Variant.Data;
22332
+ variant_name: string;
22333
+ variant_local_name?: string;
22334
+ variant_img?: string;
22335
+ variant_cover_photo?: StringId;
22336
+ product_local_name?: string;
22337
+ product_img?: string;
22338
+ product_cover_photo?: StringId;
22339
+ product_sku?: string;
22340
+ product_barcode?: string;
22341
+ variant_sku?: string;
22342
+ variant_barcode?: string;
22343
+ };
22344
+ measureunit: {
22345
+ _id: StringId;
22346
+ parent: StringId;
22347
+ name: string;
22348
+ factor: number;
22349
+ disabled: boolean;
22350
+ company_namespace: string[];
22351
+ };
22352
+ qty: number;
22353
+ base_unit_qty?: number;
22354
+ }
22355
+
22356
+ export interface Data {
22357
+ _id: StringId;
22358
+ company_namespace: string[];
22359
+ serial_number: SerialNumber;
22360
+ qty_reserved: boolean;
22361
+ warehouse_id: StringId;
22362
+ warehouse_name: string;
22363
+ client_id?: StringId;
22364
+ client_name?: string;
22365
+ creator: User;
22366
+ editor?: User;
22367
+ time?: number;
22368
+ teams?: StringId[];
22369
+ sync_id: string;
22370
+ type: "free" | "automated";
22371
+ status: "active" | "revoked" | "cancelled";
22372
+ source?: Source;
22373
+ items_count?: number;
22374
+ total_items_base_unit_qty?: number;
22375
+ total_measure_unit_qty?: number;
22376
+ items: Item[];
22377
+ createdAt: Date;
22378
+ updatedAt: Date;
22379
+ }
22380
+
22381
+ export interface CreateBody {
22382
+ company_namespace: string[];
22383
+ serial_number?: SerialNumber;
22384
+ qty_reserved?: boolean;
22385
+ warehouse_id: StringId;
22386
+ warehouse_name: string;
22387
+ client_id?: StringId;
22388
+ client_name?: string;
22389
+ creator?: User;
22390
+ time?: number;
22391
+ teams?: StringId[];
22392
+ sync_id: string;
22393
+ type: "free" | "automated";
22394
+ status?: "active" | "revoked" | "cancelled";
22395
+ source?: Source;
22396
+ items_count?: number;
22397
+ total_items_base_unit_qty?: number;
22398
+ total_measure_unit_qty?: number;
22399
+ items: Item[];
22400
+ }
22401
+ export type UpdateBody = Partial<Data>;
22402
+
22403
+ export type PopulatedDoc = Data & {
22404
+ client_populated?: Pick<
22405
+ Client.Data,
22406
+ "_id" | "name" | "client_code" | "local_name"
22407
+ >[];
22408
+ warehouse_populated?: Pick<Warehouse.Data, "_id" | "name" | "code">[];
22409
+ teams_populated?: Pick<Team.Data, "_id" | "name">[];
22410
+ };
22411
+
22412
+ type PopulatedKeys = "client_id" | "warehouse_id" | "teams"; // | "variant_id"
22413
+ type SortingKeys = "_id";
22414
+
22415
+ export namespace Find {
22416
+ export type Params = DefaultPaginationQueryParams & {
22417
+ sortBy?: { field: SortingKeys; type: "asc" | "desc" }[];
22418
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
22419
+ _id?: StringId | StringId[];
22420
+ status?: Data["status"] | Data["status"][];
22421
+ client_id?: StringId | StringId[];
22422
+ warehouse_id?: StringId | StringId[];
22423
+ teams?: StringId | StringId[];
22424
+ sync_id?: string | string[];
22425
+ "serial_number.formatted"?: string | string[];
22426
+ from_updatedAt?: number;
22427
+ to_updatedAt?: number;
22428
+ from_createdAt?: number;
22429
+ to_createdAt?: number;
22430
+ "creator._id"?: StringId | StringId[];
22431
+ "creator.type"?: User["type"] | User["type"][];
22432
+ "items.variant.product_id"?: StringId | StringId[];
22433
+ "items.variant.variant_id"?: StringId | StringId[];
22434
+ type?: Data["type"] | Data["type"][];
22435
+ "source.type"?: Source["type"] | Source["type"][];
22436
+ "source._id"?: StringId | StringId[];
22437
+ "source.serial_number.formatted"?: string | string[];
22438
+ };
22439
+ export interface Result extends DefaultPaginationResult {
22440
+ data: PopulatedDoc[];
22441
+ }
22442
+ }
22443
+ export namespace Get {
22444
+ export type ID = string;
22445
+ export type Params = {
22446
+ populatedKeys?: PopulatedKeys[];
22447
+ withCycle?: boolean;
22448
+ };
22449
+ export type Result = PopulatedDoc;
22450
+ }
22451
+ export namespace Create {
22452
+ export type Body = CreateBody;
22453
+ export type Result = Data;
22454
+ }
22455
+ export namespace Update {
22456
+ export type ID = StringId;
22457
+ export type Body = UpdateBody;
22458
+ export type Result = Data;
22459
+ }
22460
+ }
22038
22461
  }
22039
22462
 
22040
22463
  export type StringId = string;