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.
@@ -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: {
@@ -9070,7 +9097,7 @@ export namespace Service {
9070
9097
  status: CycleStatus;
9071
9098
  node?: AdminCreator | RepCreator | ClientCreator;
9072
9099
  creator?: AdminCreator | RepCreator | ClientCreator;
9073
- current_nodes: { admin: string; admin_name: string }[];
9100
+ current_nodes: (AdminCreator | RepCreator | ClientCreator)[];
9074
9101
  stage?: number;
9075
9102
  stageName?: string;
9076
9103
  company_namespace: string[];
@@ -9096,6 +9123,33 @@ export namespace Service {
9096
9123
  __v: number;
9097
9124
  }
9098
9125
  export type Data = Schema;
9126
+
9127
+ export namespace Find {
9128
+ export type Params = DefaultPaginationQueryParams & {
9129
+ sortBy?: { field: "_id"; type: "asc" | "desc" }[];
9130
+ _id?: string | string[];
9131
+ document_id?: string | string[];
9132
+ document_type?: Schema["document_type"] | Schema["document_type"][];
9133
+ status?: CycleStatus | CycleStatus[];
9134
+ "creator._id"?: string | string[];
9135
+ disabled?: boolean;
9136
+ from_updatedAt?: number;
9137
+ to_updatedAt?: number;
9138
+ from_createdAt?: number;
9139
+ to_createdAt?: number;
9140
+ from__id?: string;
9141
+ to__id?: string;
9142
+ [key: string]: any;
9143
+ };
9144
+ export interface Result extends DefaultPaginationResult {
9145
+ data: Schema[];
9146
+ }
9147
+ }
9148
+ export namespace Get {
9149
+ export type ID = string;
9150
+ export type Params = { [key: string]: any };
9151
+ export type Result = Schema;
9152
+ }
9099
9153
  }
9100
9154
 
9101
9155
  export namespace Transfer {
@@ -18746,6 +18800,8 @@ export namespace Service {
18746
18800
  to_updatedAt?: number;
18747
18801
  from_createdAt?: number;
18748
18802
  to_createdAt?: number;
18803
+ from__id?: StringId;
18804
+ to__id?: StringId;
18749
18805
  with_counts?: boolean;
18750
18806
  with_cover?: boolean;
18751
18807
  };
@@ -18824,6 +18880,8 @@ export namespace Service {
18824
18880
  to_updatedAt?: number;
18825
18881
  from_createdAt?: number;
18826
18882
  to_createdAt?: number;
18883
+ from__id?: StringId;
18884
+ to__id?: StringId;
18827
18885
  };
18828
18886
  export interface Result extends DefaultPaginationResult {
18829
18887
  data: PopulatedDoc[];
@@ -18906,6 +18964,8 @@ export namespace Service {
18906
18964
  to_updatedAt?: number;
18907
18965
  from_createdAt?: number;
18908
18966
  to_createdAt?: number;
18967
+ from__id?: StringId;
18968
+ to__id?: StringId;
18909
18969
  is_cover?: boolean;
18910
18970
  };
18911
18971
  export interface Result extends DefaultPaginationResult {
@@ -19116,6 +19176,11 @@ export namespace Service {
19116
19176
  visit_id?: string | string[];
19117
19177
  visit?: StringId | StringId[];
19118
19178
  sync_id?: string | string[];
19179
+ from_updatedAt?: number;
19180
+ to_updatedAt?: number;
19181
+ from__id?: StringId;
19182
+ to__id?: StringId;
19183
+ sortBy?: { field: "_id"; type: "asc" | "desc" }[];
19119
19184
  };
19120
19185
  export interface Result extends DefaultPaginationResult {
19121
19186
  data: PopulatedDoc[];
@@ -22035,6 +22100,402 @@ export namespace Service {
22035
22100
  export type Result = Data;
22036
22101
  }
22037
22102
  }
22103
+
22104
+ export namespace DeliveryNote {
22105
+ interface User {
22106
+ _id: string;
22107
+ name?: string;
22108
+ type: "admin" | "rep";
22109
+ admin?: string;
22110
+ rep?: string;
22111
+ }
22112
+
22113
+ type DeliveryNoteItem = {
22114
+ item_index: number;
22115
+ variant: {
22116
+ product_id: StringId;
22117
+ product_name: string;
22118
+ variant_id:
22119
+ | StringId
22120
+ | (Pick<
22121
+ Variant.Data,
22122
+ "_id" | "name" | "local_name" | "sku" | "barcode"
22123
+ > & {
22124
+ product: Pick<
22125
+ Product.Data,
22126
+ "_id" | "name" | "local_name" | "sku" | "barcode"
22127
+ >;
22128
+ });
22129
+ variant_name: string;
22130
+ variant_local_name?: string;
22131
+ variant_img?: string;
22132
+ variant_cover_photo?: StringId;
22133
+ product_local_name?: string;
22134
+ product_img?: string;
22135
+ product_cover_photo?: StringId;
22136
+ product_sku?: string;
22137
+ product_barcode?: string;
22138
+ variant_sku?: string;
22139
+ variant_barcode?: string;
22140
+ };
22141
+ } & Pick<
22142
+ Item.Data,
22143
+ | "_id"
22144
+ | "qty"
22145
+ | "measureunit"
22146
+ | "base_unit_qty"
22147
+ | "modifiers_groups"
22148
+ | "company_namespace"
22149
+ | "variant_batches"
22150
+ >;
22151
+
22152
+ export interface Data {
22153
+ _id: StringId;
22154
+ company_namespace: string[];
22155
+ serial_number: SerialNumber;
22156
+ status:
22157
+ | "pending" // when create
22158
+ | "processing" // after first transfer
22159
+ | "approved" // action from client
22160
+ | "rejected" // action from client
22161
+ | "canceled" // action from rep/admin to disabled the delivery note
22162
+ | "failed"; // when create but the items was reserved to another delivery-notes
22163
+ transaction_processed: boolean;
22164
+ qty_reserved: boolean;
22165
+ client_id: StringId;
22166
+ client_name: string;
22167
+ warehouse_id: StringId;
22168
+ warehouse_name: string;
22169
+ creator: User;
22170
+ editor?: User;
22171
+ implemented_by?: User;
22172
+ time?: number;
22173
+ teams: StringId[];
22174
+ assigned_to: StringId[];
22175
+ sync_id: string;
22176
+ visit_id?: string;
22177
+ client_geo_location?: { lat: number; lng: number };
22178
+ network_state?: number;
22179
+ platform?: string;
22180
+ version_name?: string;
22181
+ battery_level?: number;
22182
+ time_zone?: string;
22183
+ identifier?: number;
22184
+ device_id?: string;
22185
+ device_unique_id?: string;
22186
+ invoice_id?: StringId;
22187
+ invoice_serial_number?: SerialNumber;
22188
+ proforma_id?: StringId;
22189
+ proforma_serial_number?: SerialNumber;
22190
+ active_transfer_id?: StringId;
22191
+ active_transfer_serial_number?: SerialNumber;
22192
+ items_count?: number;
22193
+ total_items_base_unit_qty?: number;
22194
+ total_measure_unit_qty?: number;
22195
+ items: DeliveryNoteItem[];
22196
+ process_time?: number;
22197
+ failed_reasons?: { code: string; message: string }[];
22198
+ signature?: StringId;
22199
+ note?: string;
22200
+ media?: StringId[];
22201
+ integration_meta?: Record<string, any>;
22202
+ create_transfer?: boolean;
22203
+ to_warehouse?: StringId;
22204
+ createdAt: Date;
22205
+ updatedAt: Date;
22206
+ }
22207
+ export interface CreateBody {
22208
+ company_namespace: string[];
22209
+ serial_number?: SerialNumber;
22210
+ status?: "pending" | "approved" | "rejected";
22211
+ transaction_processed?: boolean;
22212
+ qty_reserved?: boolean;
22213
+ client_id: StringId;
22214
+ client_name: string;
22215
+ warehouse_id: StringId;
22216
+ warehouse_name: string;
22217
+ creator?: User;
22218
+ implemented_by?: User;
22219
+ time?: number;
22220
+ teams?: StringId[];
22221
+ assigned_to?: StringId[];
22222
+ sync_id: string;
22223
+ visit_id?: string;
22224
+ client_geo_location?: { lat: number; lng: number };
22225
+ network_state?: number;
22226
+ platform?: string;
22227
+ version_name?: string;
22228
+ battery_level?: number;
22229
+ time_zone?: string;
22230
+ identifier?: number;
22231
+ device_id?: string;
22232
+ device_unique_id?: string;
22233
+ invoice_id?: StringId;
22234
+ invoice_serial_number?: SerialNumber;
22235
+ proforma_id?: StringId;
22236
+ proforma_serial_number?: SerialNumber;
22237
+ active_transfer_id?: StringId;
22238
+ active_transfer_serial_number?: SerialNumber;
22239
+ items_count?: number;
22240
+ total_items_base_unit_qty?: number;
22241
+ total_measure_unit_qty?: number;
22242
+ items: DeliveryNoteItem[];
22243
+ integration_meta?: Record<string, any>;
22244
+ create_transfer?: boolean;
22245
+ to_warehouse?: StringId;
22246
+ }
22247
+ export type UpdateBody = Partial<Data>;
22248
+
22249
+ export type PopulatedDoc = Data & {
22250
+ client_populated?: Pick<
22251
+ Client.Data,
22252
+ "_id" | "name" | "client_code" | "local_name"
22253
+ >[];
22254
+ warehouse_populated?: Pick<Warehouse.Data, "_id" | "name" | "code">[];
22255
+ assigned_to_populated?: Pick<Rep.Data, "_id" | "name">[];
22256
+ teams_populated?: Pick<Team.Data, "_id" | "name">[];
22257
+ invoice_id_populated?: Pick<
22258
+ FullInvoice.Data,
22259
+ | "_id"
22260
+ | "serial_number"
22261
+ | "return_serial_number"
22262
+ | "external_serial_number"
22263
+ | "advanced_serial_number"
22264
+ >[];
22265
+ proforma_id_populated?: Pick<
22266
+ Proforma.Data,
22267
+ | "_id"
22268
+ | "serial_number"
22269
+ | "return_serial_number"
22270
+ | "external_serial_number"
22271
+ >[];
22272
+ active_transfer_id_populated?: Pick<
22273
+ Transfer.Data,
22274
+ "_id" | "serial_number" | "status"
22275
+ >[];
22276
+ media_populated?: PopulatedMediaStorage[];
22277
+ signature_populated?: PopulatedMediaStorage;
22278
+ cycle?: Cycle.Schema & { approval?: string | Approval.Data };
22279
+ };
22280
+
22281
+ type PopulatedKeys =
22282
+ | "variant_id"
22283
+ | "client_id"
22284
+ | "warehouse_id"
22285
+ | "assigned_to"
22286
+ | "teams"
22287
+ | "invoice_id"
22288
+ | "proforma_id"
22289
+ | "active_transfer_id"
22290
+ | "media"
22291
+ | "signature";
22292
+ type SortingKeys = "_id" | "createdAt" | "updatedAt" | "time";
22293
+
22294
+ export namespace Find {
22295
+ export type Params = DefaultPaginationQueryParams & {
22296
+ sortBy?: { field: SortingKeys; type: "asc" | "desc" }[];
22297
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
22298
+ _id?: StringId | StringId[];
22299
+ withCycle?: boolean;
22300
+ status?: Data["status"] | Data["status"][];
22301
+ client_id?: StringId | StringId[];
22302
+ warehouse_id?: StringId | StringId[];
22303
+ teams?: StringId | StringId[];
22304
+ assigned_to?: StringId | StringId[];
22305
+ sync_id?: string | string[];
22306
+ "serial_number.formatted"?: string | string[];
22307
+ transaction_processed?: boolean;
22308
+ qty_reserved?: boolean;
22309
+ invoice_id?: StringId | StringId[];
22310
+ proforma_id?: StringId | StringId[];
22311
+ active_transfer_id?: StringId | StringId[];
22312
+ from_updatedAt?: number;
22313
+ to_updatedAt?: number;
22314
+ from_createdAt?: number;
22315
+ to_createdAt?: number;
22316
+ from_time?: number;
22317
+ to_time?: number;
22318
+ "creator._id"?: StringId | StringId[];
22319
+ "creator.type"?: User["type"] | User["type"][];
22320
+ "items.variant.product_id"?: StringId | StringId[];
22321
+ "items.variant.variant_id"?: StringId | StringId[];
22322
+ };
22323
+ export interface Result extends DefaultPaginationResult {
22324
+ data: PopulatedDoc[];
22325
+ }
22326
+ }
22327
+ export namespace Get {
22328
+ export type ID = string;
22329
+ export type Params = {
22330
+ populatedKeys?: PopulatedKeys[];
22331
+ withCycle?: boolean;
22332
+ };
22333
+ export type Result = PopulatedDoc;
22334
+ }
22335
+ export namespace Create {
22336
+ export type Body = CreateBody;
22337
+ export type Result = Data;
22338
+ }
22339
+ export namespace Update {
22340
+ export type ID = StringId;
22341
+ export type Body = UpdateBody;
22342
+ export type Result = Data;
22343
+ }
22344
+ }
22345
+
22346
+ export namespace Reservation {
22347
+ interface User {
22348
+ _id: StringId;
22349
+ name?: string;
22350
+ type: "admin" | "rep";
22351
+ admin?: StringId;
22352
+ rep?: StringId;
22353
+ }
22354
+
22355
+ interface Source {
22356
+ _id: StringId;
22357
+ type: "proforma" | "invoice";
22358
+ serial_number: SerialNumber;
22359
+ invoice?: StringId;
22360
+ proforma?: StringId;
22361
+ }
22362
+
22363
+ interface Item {
22364
+ item_index: number;
22365
+ _id: StringId;
22366
+ variant: {
22367
+ product_id: StringId | Product.Data;
22368
+ product_name: string;
22369
+ variant_id: StringId | Variant.Data;
22370
+ variant_name: string;
22371
+ variant_local_name?: string;
22372
+ variant_img?: string;
22373
+ variant_cover_photo?: StringId;
22374
+ product_local_name?: string;
22375
+ product_img?: string;
22376
+ product_cover_photo?: StringId;
22377
+ product_sku?: string;
22378
+ product_barcode?: string;
22379
+ variant_sku?: string;
22380
+ variant_barcode?: string;
22381
+ };
22382
+ measureunit: {
22383
+ _id: StringId;
22384
+ parent: StringId;
22385
+ name: string;
22386
+ factor: number;
22387
+ disabled: boolean;
22388
+ company_namespace: string[];
22389
+ };
22390
+ qty: number;
22391
+ base_unit_qty?: number;
22392
+ }
22393
+
22394
+ export interface Data {
22395
+ _id: StringId;
22396
+ company_namespace: string[];
22397
+ serial_number: SerialNumber;
22398
+ qty_reserved: boolean;
22399
+ warehouse_id: StringId;
22400
+ warehouse_name: string;
22401
+ client_id?: StringId;
22402
+ client_name?: string;
22403
+ creator: User;
22404
+ editor?: User;
22405
+ time?: number;
22406
+ teams?: StringId[];
22407
+ sync_id: string;
22408
+ type: "free" | "automated";
22409
+ status: "active" | "revoked" | "cancelled";
22410
+ source?: Source;
22411
+ items_count?: number;
22412
+ total_items_base_unit_qty?: number;
22413
+ total_measure_unit_qty?: number;
22414
+ items: Item[];
22415
+ createdAt: Date;
22416
+ updatedAt: Date;
22417
+ }
22418
+
22419
+ export interface CreateBody {
22420
+ company_namespace: string[];
22421
+ serial_number?: SerialNumber;
22422
+ qty_reserved?: boolean;
22423
+ warehouse_id: StringId;
22424
+ warehouse_name: string;
22425
+ client_id?: StringId;
22426
+ client_name?: string;
22427
+ creator?: User;
22428
+ time?: number;
22429
+ teams?: StringId[];
22430
+ sync_id: string;
22431
+ type: "free" | "automated";
22432
+ status?: "active" | "revoked" | "cancelled";
22433
+ source?: Source;
22434
+ items_count?: number;
22435
+ total_items_base_unit_qty?: number;
22436
+ total_measure_unit_qty?: number;
22437
+ items: Item[];
22438
+ }
22439
+ export type UpdateBody = Partial<Data>;
22440
+
22441
+ export type PopulatedDoc = Data & {
22442
+ client_populated?: Pick<
22443
+ Client.Data,
22444
+ "_id" | "name" | "client_code" | "local_name"
22445
+ >[];
22446
+ warehouse_populated?: Pick<Warehouse.Data, "_id" | "name" | "code">[];
22447
+ teams_populated?: Pick<Team.Data, "_id" | "name">[];
22448
+ };
22449
+
22450
+ type PopulatedKeys = "client_id" | "warehouse_id" | "teams"; // | "variant_id"
22451
+ type SortingKeys = "_id";
22452
+
22453
+ export namespace Find {
22454
+ export type Params = DefaultPaginationQueryParams & {
22455
+ sortBy?: { field: SortingKeys; type: "asc" | "desc" }[];
22456
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
22457
+ _id?: StringId | StringId[];
22458
+ status?: Data["status"] | Data["status"][];
22459
+ client_id?: StringId | StringId[];
22460
+ warehouse_id?: StringId | StringId[];
22461
+ teams?: StringId | StringId[];
22462
+ sync_id?: string | string[];
22463
+ "serial_number.formatted"?: string | string[];
22464
+ from_updatedAt?: number;
22465
+ to_updatedAt?: number;
22466
+ from_createdAt?: number;
22467
+ to_createdAt?: number;
22468
+ "creator._id"?: StringId | StringId[];
22469
+ "creator.type"?: User["type"] | User["type"][];
22470
+ "items.variant.product_id"?: StringId | StringId[];
22471
+ "items.variant.variant_id"?: StringId | StringId[];
22472
+ type?: Data["type"] | Data["type"][];
22473
+ "source.type"?: Source["type"] | Source["type"][];
22474
+ "source._id"?: StringId | StringId[];
22475
+ "source.serial_number.formatted"?: string | string[];
22476
+ };
22477
+ export interface Result extends DefaultPaginationResult {
22478
+ data: PopulatedDoc[];
22479
+ }
22480
+ }
22481
+ export namespace Get {
22482
+ export type ID = string;
22483
+ export type Params = {
22484
+ populatedKeys?: PopulatedKeys[];
22485
+ withCycle?: boolean;
22486
+ };
22487
+ export type Result = PopulatedDoc;
22488
+ }
22489
+ export namespace Create {
22490
+ export type Body = CreateBody;
22491
+ export type Result = Data;
22492
+ }
22493
+ export namespace Update {
22494
+ export type ID = StringId;
22495
+ export type Body = UpdateBody;
22496
+ export type Result = Data;
22497
+ }
22498
+ }
22038
22499
  }
22039
22500
 
22040
22501
  export type StringId = string;