repzo 1.0.282 → 1.0.284

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.
@@ -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: {
@@ -8486,10 +8513,7 @@ export declare namespace Service {
8486
8513
  status: CycleStatus;
8487
8514
  node?: AdminCreator | RepCreator | ClientCreator;
8488
8515
  creator?: AdminCreator | RepCreator | ClientCreator;
8489
- current_nodes: {
8490
- admin: string;
8491
- admin_name: string;
8492
- }[];
8516
+ current_nodes: (AdminCreator | RepCreator | ClientCreator)[];
8493
8517
  stage?: number;
8494
8518
  stageName?: string;
8495
8519
  company_namespace: string[];
@@ -8515,6 +8539,37 @@ export declare namespace Service {
8515
8539
  __v: number;
8516
8540
  }
8517
8541
  export type Data = Schema;
8542
+ export namespace Find {
8543
+ type Params = DefaultPaginationQueryParams & {
8544
+ sortBy?: {
8545
+ field: "_id";
8546
+ type: "asc" | "desc";
8547
+ }[];
8548
+ _id?: string | string[];
8549
+ document_id?: string | string[];
8550
+ document_type?: Schema["document_type"] | Schema["document_type"][];
8551
+ status?: CycleStatus | CycleStatus[];
8552
+ "creator._id"?: string | string[];
8553
+ disabled?: boolean;
8554
+ from_updatedAt?: number;
8555
+ to_updatedAt?: number;
8556
+ from_createdAt?: number;
8557
+ to_createdAt?: number;
8558
+ from__id?: string;
8559
+ to__id?: string;
8560
+ [key: string]: any;
8561
+ };
8562
+ interface Result extends DefaultPaginationResult {
8563
+ data: Schema[];
8564
+ }
8565
+ }
8566
+ export namespace Get {
8567
+ type ID = string;
8568
+ type Params = {
8569
+ [key: string]: any;
8570
+ };
8571
+ type Result = Schema;
8572
+ }
8518
8573
  export {};
8519
8574
  }
8520
8575
  namespace Transfer {
@@ -16902,6 +16957,8 @@ export declare namespace Service {
16902
16957
  to_updatedAt?: number;
16903
16958
  from_createdAt?: number;
16904
16959
  to_createdAt?: number;
16960
+ from__id?: StringId;
16961
+ to__id?: StringId;
16905
16962
  with_counts?: boolean;
16906
16963
  with_cover?: boolean;
16907
16964
  };
@@ -16977,6 +17034,8 @@ export declare namespace Service {
16977
17034
  to_updatedAt?: number;
16978
17035
  from_createdAt?: number;
16979
17036
  to_createdAt?: number;
17037
+ from__id?: StringId;
17038
+ to__id?: StringId;
16980
17039
  };
16981
17040
  interface Result extends DefaultPaginationResult {
16982
17041
  data: PopulatedDoc[];
@@ -17058,6 +17117,8 @@ export declare namespace Service {
17058
17117
  to_updatedAt?: number;
17059
17118
  from_createdAt?: number;
17060
17119
  to_createdAt?: number;
17120
+ from__id?: StringId;
17121
+ to__id?: StringId;
17061
17122
  is_cover?: boolean;
17062
17123
  };
17063
17124
  interface Result extends DefaultPaginationResult {
@@ -17250,6 +17311,14 @@ export declare namespace Service {
17250
17311
  visit_id?: string | string[];
17251
17312
  visit?: StringId | StringId[];
17252
17313
  sync_id?: string | string[];
17314
+ from_updatedAt?: number;
17315
+ to_updatedAt?: number;
17316
+ from__id?: StringId;
17317
+ to__id?: StringId;
17318
+ sortBy?: {
17319
+ field: "_id";
17320
+ type: "asc" | "desc";
17321
+ }[];
17253
17322
  };
17254
17323
  interface Result extends DefaultPaginationResult {
17255
17324
  data: PopulatedDoc[];
@@ -19680,6 +19749,352 @@ export declare namespace Service {
19680
19749
  }
19681
19750
  export {};
19682
19751
  }
19752
+ namespace DeliveryNote {
19753
+ interface User {
19754
+ _id: string;
19755
+ name?: string;
19756
+ type: "admin" | "rep";
19757
+ admin?: string;
19758
+ rep?: string;
19759
+ }
19760
+ type DeliveryNoteItem = {
19761
+ item_index: number;
19762
+ variant: {
19763
+ product_id: StringId;
19764
+ product_name: string;
19765
+ variant_id: StringId | (Pick<Variant.Data, "_id" | "name" | "local_name" | "sku" | "barcode"> & {
19766
+ product: Pick<Product.Data, "_id" | "name" | "local_name" | "sku" | "barcode">;
19767
+ });
19768
+ variant_name: string;
19769
+ variant_local_name?: string;
19770
+ variant_img?: string;
19771
+ variant_cover_photo?: StringId;
19772
+ product_local_name?: string;
19773
+ product_img?: string;
19774
+ product_cover_photo?: StringId;
19775
+ product_sku?: string;
19776
+ product_barcode?: string;
19777
+ variant_sku?: string;
19778
+ variant_barcode?: string;
19779
+ };
19780
+ } & Pick<Item.Data, "_id" | "qty" | "measureunit" | "base_unit_qty" | "modifiers_groups" | "company_namespace" | "variant_batches">;
19781
+ export interface Data {
19782
+ _id: StringId;
19783
+ company_namespace: string[];
19784
+ serial_number: SerialNumber;
19785
+ status: "pending" | "processing" | "approved" | "rejected" | "canceled" | "failed";
19786
+ transaction_processed: boolean;
19787
+ qty_reserved: boolean;
19788
+ client_id: StringId;
19789
+ client_name: string;
19790
+ warehouse_id: StringId;
19791
+ warehouse_name: string;
19792
+ creator: User;
19793
+ editor?: User;
19794
+ implemented_by?: User;
19795
+ time?: number;
19796
+ teams: StringId[];
19797
+ assigned_to: StringId[];
19798
+ sync_id: string;
19799
+ visit_id?: string;
19800
+ client_geo_location?: {
19801
+ lat: number;
19802
+ lng: number;
19803
+ };
19804
+ network_state?: number;
19805
+ platform?: string;
19806
+ version_name?: string;
19807
+ battery_level?: number;
19808
+ time_zone?: string;
19809
+ identifier?: number;
19810
+ device_id?: string;
19811
+ device_unique_id?: string;
19812
+ invoice_id?: StringId;
19813
+ invoice_serial_number?: SerialNumber;
19814
+ proforma_id?: StringId;
19815
+ proforma_serial_number?: SerialNumber;
19816
+ active_transfer_id?: StringId;
19817
+ active_transfer_serial_number?: SerialNumber;
19818
+ items_count?: number;
19819
+ total_items_base_unit_qty?: number;
19820
+ total_measure_unit_qty?: number;
19821
+ items: DeliveryNoteItem[];
19822
+ process_time?: number;
19823
+ failed_reasons?: {
19824
+ code: string;
19825
+ message: string;
19826
+ }[];
19827
+ signature?: StringId;
19828
+ note?: string;
19829
+ media?: StringId[];
19830
+ integration_meta?: Record<string, any>;
19831
+ create_transfer?: boolean;
19832
+ to_warehouse?: StringId;
19833
+ createdAt: Date;
19834
+ updatedAt: Date;
19835
+ }
19836
+ export interface CreateBody {
19837
+ company_namespace: string[];
19838
+ serial_number?: SerialNumber;
19839
+ status?: "pending" | "approved" | "rejected";
19840
+ transaction_processed?: boolean;
19841
+ qty_reserved?: boolean;
19842
+ client_id: StringId;
19843
+ client_name: string;
19844
+ warehouse_id: StringId;
19845
+ warehouse_name: string;
19846
+ creator?: User;
19847
+ implemented_by?: User;
19848
+ time?: number;
19849
+ teams?: StringId[];
19850
+ assigned_to?: StringId[];
19851
+ sync_id: string;
19852
+ visit_id?: string;
19853
+ client_geo_location?: {
19854
+ lat: number;
19855
+ lng: number;
19856
+ };
19857
+ network_state?: number;
19858
+ platform?: string;
19859
+ version_name?: string;
19860
+ battery_level?: number;
19861
+ time_zone?: string;
19862
+ identifier?: number;
19863
+ device_id?: string;
19864
+ device_unique_id?: string;
19865
+ invoice_id?: StringId;
19866
+ invoice_serial_number?: SerialNumber;
19867
+ proforma_id?: StringId;
19868
+ proforma_serial_number?: SerialNumber;
19869
+ active_transfer_id?: StringId;
19870
+ active_transfer_serial_number?: SerialNumber;
19871
+ items_count?: number;
19872
+ total_items_base_unit_qty?: number;
19873
+ total_measure_unit_qty?: number;
19874
+ items: DeliveryNoteItem[];
19875
+ integration_meta?: Record<string, any>;
19876
+ create_transfer?: boolean;
19877
+ to_warehouse?: StringId;
19878
+ }
19879
+ export type UpdateBody = Partial<Data>;
19880
+ export type PopulatedDoc = Data & {
19881
+ client_populated?: Pick<Client.Data, "_id" | "name" | "client_code" | "local_name">[];
19882
+ warehouse_populated?: Pick<Warehouse.Data, "_id" | "name" | "code">[];
19883
+ assigned_to_populated?: Pick<Rep.Data, "_id" | "name">[];
19884
+ teams_populated?: Pick<Team.Data, "_id" | "name">[];
19885
+ invoice_id_populated?: Pick<FullInvoice.Data, "_id" | "serial_number" | "return_serial_number" | "external_serial_number" | "advanced_serial_number">[];
19886
+ proforma_id_populated?: Pick<Proforma.Data, "_id" | "serial_number" | "return_serial_number" | "external_serial_number">[];
19887
+ active_transfer_id_populated?: Pick<Transfer.Data, "_id" | "serial_number" | "status">[];
19888
+ media_populated?: PopulatedMediaStorage[];
19889
+ signature_populated?: PopulatedMediaStorage;
19890
+ cycle?: Cycle.Schema & {
19891
+ approval?: string | Approval.Data;
19892
+ };
19893
+ };
19894
+ type PopulatedKeys = "variant_id" | "client_id" | "warehouse_id" | "assigned_to" | "teams" | "invoice_id" | "proforma_id" | "active_transfer_id" | "media" | "signature";
19895
+ type SortingKeys = "_id" | "createdAt" | "updatedAt" | "time";
19896
+ export namespace Find {
19897
+ type Params = DefaultPaginationQueryParams & {
19898
+ sortBy?: {
19899
+ field: SortingKeys;
19900
+ type: "asc" | "desc";
19901
+ }[];
19902
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
19903
+ _id?: StringId | StringId[];
19904
+ withCycle?: boolean;
19905
+ status?: Data["status"] | Data["status"][];
19906
+ client_id?: StringId | StringId[];
19907
+ warehouse_id?: StringId | StringId[];
19908
+ teams?: StringId | StringId[];
19909
+ assigned_to?: StringId | StringId[];
19910
+ sync_id?: string | string[];
19911
+ "serial_number.formatted"?: string | string[];
19912
+ transaction_processed?: boolean;
19913
+ qty_reserved?: boolean;
19914
+ invoice_id?: StringId | StringId[];
19915
+ proforma_id?: StringId | StringId[];
19916
+ active_transfer_id?: StringId | StringId[];
19917
+ from_updatedAt?: number;
19918
+ to_updatedAt?: number;
19919
+ from_createdAt?: number;
19920
+ to_createdAt?: number;
19921
+ from_time?: number;
19922
+ to_time?: number;
19923
+ "creator._id"?: StringId | StringId[];
19924
+ "creator.type"?: User["type"] | User["type"][];
19925
+ "items.variant.product_id"?: StringId | StringId[];
19926
+ "items.variant.variant_id"?: StringId | StringId[];
19927
+ };
19928
+ interface Result extends DefaultPaginationResult {
19929
+ data: PopulatedDoc[];
19930
+ }
19931
+ }
19932
+ export namespace Get {
19933
+ type ID = string;
19934
+ type Params = {
19935
+ populatedKeys?: PopulatedKeys[];
19936
+ withCycle?: boolean;
19937
+ };
19938
+ type Result = PopulatedDoc;
19939
+ }
19940
+ export namespace Create {
19941
+ type Body = CreateBody;
19942
+ type Result = Data;
19943
+ }
19944
+ export namespace Update {
19945
+ type ID = StringId;
19946
+ type Body = UpdateBody;
19947
+ type Result = Data;
19948
+ }
19949
+ export {};
19950
+ }
19951
+ namespace Reservation {
19952
+ interface User {
19953
+ _id: StringId;
19954
+ name?: string;
19955
+ type: "admin" | "rep";
19956
+ admin?: StringId;
19957
+ rep?: StringId;
19958
+ }
19959
+ interface Source {
19960
+ _id: StringId;
19961
+ type: "proforma" | "invoice";
19962
+ serial_number: SerialNumber;
19963
+ invoice?: StringId;
19964
+ proforma?: StringId;
19965
+ }
19966
+ interface Item {
19967
+ item_index: number;
19968
+ _id: StringId;
19969
+ variant: {
19970
+ product_id: StringId | Product.Data;
19971
+ product_name: string;
19972
+ variant_id: StringId | Variant.Data;
19973
+ variant_name: string;
19974
+ variant_local_name?: string;
19975
+ variant_img?: string;
19976
+ variant_cover_photo?: StringId;
19977
+ product_local_name?: string;
19978
+ product_img?: string;
19979
+ product_cover_photo?: StringId;
19980
+ product_sku?: string;
19981
+ product_barcode?: string;
19982
+ variant_sku?: string;
19983
+ variant_barcode?: string;
19984
+ };
19985
+ measureunit: {
19986
+ _id: StringId;
19987
+ parent: StringId;
19988
+ name: string;
19989
+ factor: number;
19990
+ disabled: boolean;
19991
+ company_namespace: string[];
19992
+ };
19993
+ qty: number;
19994
+ base_unit_qty?: number;
19995
+ }
19996
+ export interface Data {
19997
+ _id: StringId;
19998
+ company_namespace: string[];
19999
+ serial_number: SerialNumber;
20000
+ qty_reserved: boolean;
20001
+ warehouse_id: StringId;
20002
+ warehouse_name: string;
20003
+ client_id?: StringId;
20004
+ client_name?: string;
20005
+ creator: User;
20006
+ editor?: User;
20007
+ time?: number;
20008
+ teams?: StringId[];
20009
+ sync_id: string;
20010
+ type: "free" | "automated";
20011
+ status: "active" | "revoked" | "cancelled";
20012
+ source?: Source;
20013
+ items_count?: number;
20014
+ total_items_base_unit_qty?: number;
20015
+ total_measure_unit_qty?: number;
20016
+ items: Item[];
20017
+ createdAt: Date;
20018
+ updatedAt: Date;
20019
+ }
20020
+ export interface CreateBody {
20021
+ company_namespace: string[];
20022
+ serial_number?: SerialNumber;
20023
+ qty_reserved?: boolean;
20024
+ warehouse_id: StringId;
20025
+ warehouse_name: string;
20026
+ client_id?: StringId;
20027
+ client_name?: string;
20028
+ creator?: User;
20029
+ time?: number;
20030
+ teams?: StringId[];
20031
+ sync_id: string;
20032
+ type: "free" | "automated";
20033
+ status?: "active" | "revoked" | "cancelled";
20034
+ source?: Source;
20035
+ items_count?: number;
20036
+ total_items_base_unit_qty?: number;
20037
+ total_measure_unit_qty?: number;
20038
+ items: Item[];
20039
+ }
20040
+ export type UpdateBody = Partial<Data>;
20041
+ export type PopulatedDoc = Data & {
20042
+ client_populated?: Pick<Client.Data, "_id" | "name" | "client_code" | "local_name">[];
20043
+ warehouse_populated?: Pick<Warehouse.Data, "_id" | "name" | "code">[];
20044
+ teams_populated?: Pick<Team.Data, "_id" | "name">[];
20045
+ };
20046
+ type PopulatedKeys = "client_id" | "warehouse_id" | "teams";
20047
+ type SortingKeys = "_id";
20048
+ export namespace Find {
20049
+ type Params = DefaultPaginationQueryParams & {
20050
+ sortBy?: {
20051
+ field: SortingKeys;
20052
+ type: "asc" | "desc";
20053
+ }[];
20054
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
20055
+ _id?: StringId | StringId[];
20056
+ status?: Data["status"] | Data["status"][];
20057
+ client_id?: StringId | StringId[];
20058
+ warehouse_id?: StringId | StringId[];
20059
+ teams?: StringId | StringId[];
20060
+ sync_id?: string | string[];
20061
+ "serial_number.formatted"?: string | string[];
20062
+ from_updatedAt?: number;
20063
+ to_updatedAt?: number;
20064
+ from_createdAt?: number;
20065
+ to_createdAt?: number;
20066
+ "creator._id"?: StringId | StringId[];
20067
+ "creator.type"?: User["type"] | User["type"][];
20068
+ "items.variant.product_id"?: StringId | StringId[];
20069
+ "items.variant.variant_id"?: StringId | StringId[];
20070
+ type?: Data["type"] | Data["type"][];
20071
+ "source.type"?: Source["type"] | Source["type"][];
20072
+ "source._id"?: StringId | StringId[];
20073
+ "source.serial_number.formatted"?: string | string[];
20074
+ };
20075
+ interface Result extends DefaultPaginationResult {
20076
+ data: PopulatedDoc[];
20077
+ }
20078
+ }
20079
+ export namespace Get {
20080
+ type ID = string;
20081
+ type Params = {
20082
+ populatedKeys?: PopulatedKeys[];
20083
+ withCycle?: boolean;
20084
+ };
20085
+ type Result = PopulatedDoc;
20086
+ }
20087
+ export namespace Create {
20088
+ type Body = CreateBody;
20089
+ type Result = Data;
20090
+ }
20091
+ export namespace Update {
20092
+ type ID = StringId;
20093
+ type Body = UpdateBody;
20094
+ type Result = Data;
20095
+ }
20096
+ export {};
20097
+ }
19683
20098
  }
19684
20099
  export type StringId = string;
19685
20100
  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.284",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",