repzo 1.0.285 → 1.0.286

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
@@ -12,6 +12,7 @@ export declare const end_points: {
12
12
  readonly MEASUREUNIT_FAMILY: "measureunit-family";
13
13
  readonly MEDIA: "media";
14
14
  readonly CYCLES: "cycles";
15
+ readonly CYCLE_REPORT: "cycle-report";
15
16
  readonly PRICELIST: "pricelists";
16
17
  readonly PRICELIST_ITEM: "pricelistsitems";
17
18
  readonly TEAM: "teams";
@@ -172,6 +173,7 @@ export default class Repzo {
172
173
  readonly MEASUREUNIT_FAMILY: "measureunit-family";
173
174
  readonly MEDIA: "media";
174
175
  readonly CYCLES: "cycles";
176
+ readonly CYCLE_REPORT: "cycle-report";
175
177
  readonly PRICELIST: "pricelists";
176
178
  readonly PRICELIST_ITEM: "pricelistsitems";
177
179
  readonly TEAM: "teams";
@@ -1207,6 +1209,10 @@ export default class Repzo {
1207
1209
  find: (params?: Service.Cycle.Find.Params) => Promise<Service.Cycle.Find.Result>;
1208
1210
  get: (id: Service.Cycle.Get.ID, params?: Service.Cycle.Get.Params) => Promise<Service.Cycle.Get.Result>;
1209
1211
  };
1212
+ cycleReport: {
1213
+ _path: "cycle-report";
1214
+ find: (params?: Service.CycleReport.Find.Params) => Promise<Service.CycleReport.Find.Result>;
1215
+ };
1210
1216
  promotions: {
1211
1217
  _path: "promotions";
1212
1218
  find: (params?: Service.Promotion.Find.Params) => Promise<Service.Promotion.Find.Result>;
package/lib/index.js CHANGED
@@ -14,6 +14,7 @@ export const end_points = {
14
14
  MEASUREUNIT_FAMILY: "measureunit-family",
15
15
  MEDIA: "media",
16
16
  CYCLES: "cycles",
17
+ CYCLE_REPORT: "cycle-report",
17
18
  PRICELIST: "pricelists",
18
19
  PRICELIST_ITEM: "pricelistsitems",
19
20
  TEAM: "teams",
@@ -2400,6 +2401,13 @@ class Repzo {
2400
2401
  return await this._fetch(this.svAPIEndpoint, this.cycle._path + `/${id}`, params);
2401
2402
  },
2402
2403
  };
2404
+ this.cycleReport = {
2405
+ _path: Repzo._end_points.CYCLE_REPORT,
2406
+ find: async (params) => {
2407
+ let res = await this._fetch(this.svAPIEndpoint, this.cycleReport._path, params);
2408
+ return res;
2409
+ },
2410
+ };
2403
2411
  this.promotions = {
2404
2412
  _path: Repzo._end_points.PROMOTIONS,
2405
2413
  find: async (params) => {
@@ -6877,6 +6877,8 @@ export declare namespace Service {
6877
6877
  signature?: StringId;
6878
6878
  bypass_freshness_window_code_entered?: boolean;
6879
6879
  promotion_freshness_window_exceeded?: boolean;
6880
+ total_word?: string;
6881
+ total_local_word?: string;
6880
6882
  createdAt: string;
6881
6883
  updatedAt: string;
6882
6884
  __v: number;
@@ -8135,6 +8137,7 @@ export declare namespace Service {
8135
8137
  teams: string[] | Team.TeamSchema[];
8136
8138
  items_count?: number;
8137
8139
  total_items_base_unit_qty?: number;
8140
+ total_measure_unit_qty?: number;
8138
8141
  company_namespace: string[];
8139
8142
  transaction_processed: boolean;
8140
8143
  status: "pending" | "approved" | "processing" | "rejected" | "processed";
@@ -8572,6 +8575,114 @@ export declare namespace Service {
8572
8575
  }
8573
8576
  export {};
8574
8577
  }
8578
+ namespace CycleReport {
8579
+ type CycleStatus = "pending" | "approved" | "processing" | "rejected";
8580
+ type ProformaDoc = Pick<Proforma.Data, "_id" | "class" | "serial_number" | "return_serial_number" | "client_name" | "client_id" | "issue_date" | "creator" | "time" | "createdAt" | "currency" | "teams" | "total_word" | "total_local_word" | "total">;
8581
+ type TransferDoc = Pick<Transfer.Data, "_id" | "serial_number" | "type" | "time" | "createdAt" | "from" | "to" | "items_count" | "total_items_base_unit_qty" | "total_measure_unit_qty"> & {
8582
+ from_name?: string;
8583
+ to_name?: string;
8584
+ };
8585
+ type ApprovalRequestDoc = Pick<ApprovalRequest.Data, "_id" | "serial_number" | "type" | "subtype" | "time" | "createdAt" | "creator" | "reference_name" | "reference_local_name">;
8586
+ type ReceivingMaterialDoc = Pick<ReceivingMaterial.Data, "_id" | "to" | "serial_number" | "time" | "createdAt" | "from" | "items_count" | "total_items_base_unit_qty" | "total_measure_unit_qty"> & {
8587
+ to_name?: string;
8588
+ };
8589
+ type AssetPartTransferDoc = Pick<AssetPartTransfer.Data, "_id" | "type" | "from_name" | "to_name" | "creator" | "serial_number" | "asset_part_units_count" | "total_asset_part_units_qty" | "time" | "createdAt" | "from" | "to">;
8590
+ type AdjustInventoryDoc = Pick<AdjustInventory.Data, "_id">;
8591
+ type ReturnAssetPartUnitDoc = Pick<ReturnAssetPartUnit.Data, "_id" | "warehouse" | "warehouse_name" | "creator" | "serial_number" | "asset_part_units_count" | "total_asset_part_units_qty" | "time" | "createdAt" | "client" | "client_name">;
8592
+ type StoreAssetPartUnitDoc = Pick<StoreAssetPartUnit.Data, "_id" | "warehouse" | "warehouse_name" | "creator" | "serial_number" | "asset_part_units_count" | "total_asset_part_units_qty" | "time" | "createdAt">;
8593
+ type ActivityFormV2ResultDoc = Pick<ActivityFormV2Result.Data, "_id" | "client" | "client_name" | "creator" | "serial_number" | "time" | "createdAt" | "form_id"> & {
8594
+ form_name?: string;
8595
+ };
8596
+ interface SchemaBase {
8597
+ _id: string;
8598
+ document_id: string;
8599
+ status: CycleStatus;
8600
+ node?: AdminCreator | RepCreator | ClientCreator;
8601
+ creator?: AdminCreator | RepCreator | ClientCreator;
8602
+ current_nodes: (AdminCreator | RepCreator | ClientCreator)[];
8603
+ stage?: number;
8604
+ stageName?: string;
8605
+ company_namespace: string[];
8606
+ note?: string;
8607
+ serial_number: SerialNumber;
8608
+ version: number;
8609
+ createdAt: string;
8610
+ updatedAt: string;
8611
+ __v: number;
8612
+ }
8613
+ export type Schema = (SchemaBase & {
8614
+ document_type: "proforma";
8615
+ document: ProformaDoc;
8616
+ }) | (SchemaBase & {
8617
+ document_type: "transfer";
8618
+ document: TransferDoc;
8619
+ }) | (SchemaBase & {
8620
+ document_type: "approval-request";
8621
+ document: ApprovalRequestDoc;
8622
+ }) | (SchemaBase & {
8623
+ document_type: "receiving-material";
8624
+ document: ReceivingMaterialDoc;
8625
+ }) | (SchemaBase & {
8626
+ document_type: "asset-part-transfer";
8627
+ document: AssetPartTransferDoc;
8628
+ }) | (SchemaBase & {
8629
+ document_type: "adjust-inventory";
8630
+ document: AdjustInventoryDoc;
8631
+ }) | (SchemaBase & {
8632
+ document_type: "return-asset-part-unit";
8633
+ document: ReturnAssetPartUnitDoc;
8634
+ }) | (SchemaBase & {
8635
+ document_type: "store-asset-part-unit";
8636
+ document: StoreAssetPartUnitDoc;
8637
+ }) | (SchemaBase & {
8638
+ document_type: "activity-form-v2-result";
8639
+ document: ActivityFormV2ResultDoc;
8640
+ });
8641
+ export type Data = Schema;
8642
+ interface Totals {
8643
+ "approval-request"?: number;
8644
+ "receiving-material"?: number;
8645
+ "store-asset-part-unit"?: number;
8646
+ "return-asset-part-unit"?: number;
8647
+ transfer?: number;
8648
+ proforma?: number;
8649
+ "adjust-inventory"?: number;
8650
+ "activity-form-v2-result"?: number;
8651
+ "asset-part-transfer"?: number;
8652
+ }
8653
+ export namespace Find {
8654
+ type Params = DefaultPaginationQueryParams & {
8655
+ sortBy?: {
8656
+ field: "_id";
8657
+ type: "asc" | "desc";
8658
+ }[];
8659
+ _id?: StringId | StringId[];
8660
+ document_id?: StringId | StringId[];
8661
+ document_type?: Schema["document_type"] | Schema["document_type"][];
8662
+ status?: CycleStatus | CycleStatus[];
8663
+ "creator._id"?: StringId | StringId[];
8664
+ disabled?: boolean;
8665
+ from?: number;
8666
+ to?: number;
8667
+ from_updatedAt?: number;
8668
+ to_updatedAt?: number;
8669
+ from_createdAt?: number;
8670
+ to_createdAt?: number;
8671
+ from__id?: StringId;
8672
+ to__id?: StringId;
8673
+ approval?: StringId | StringId[];
8674
+ "current_nodes.type"?: string | string[];
8675
+ "current_nodes.rep"?: StringId | StringId[];
8676
+ "current_nodes.admin"?: StringId | StringId[];
8677
+ [key: string]: any;
8678
+ };
8679
+ interface Result extends DefaultPaginationResult {
8680
+ data: Schema[];
8681
+ totals?: Totals;
8682
+ }
8683
+ }
8684
+ export {};
8685
+ }
8575
8686
  namespace Transfer {
8576
8687
  export interface VariantTransfer {
8577
8688
  variant_id: string;
@@ -8940,6 +9051,7 @@ export declare namespace Service {
8940
9051
  updatedAt: string;
8941
9052
  __v: number;
8942
9053
  }
9054
+ export type Data = Schema;
8943
9055
  export interface PopulatedData {
8944
9056
  _id: StringId;
8945
9057
  serial_number: SerialNumber;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.285",
3
+ "version": "1.0.286",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -24,6 +24,7 @@ export const end_points = {
24
24
  MEASUREUNIT_FAMILY: "measureunit-family",
25
25
  MEDIA: "media",
26
26
  CYCLES: "cycles",
27
+ CYCLE_REPORT: "cycle-report",
27
28
  PRICELIST: "pricelists",
28
29
  PRICELIST_ITEM: "pricelistsitems",
29
30
  TEAM: "teams",
@@ -6032,6 +6033,20 @@ export default class Repzo {
6032
6033
  },
6033
6034
  };
6034
6035
 
6036
+ cycleReport = {
6037
+ _path: Repzo._end_points.CYCLE_REPORT,
6038
+ find: async (
6039
+ params?: Service.CycleReport.Find.Params,
6040
+ ): Promise<Service.CycleReport.Find.Result> => {
6041
+ let res: Service.CycleReport.Find.Result = await this._fetch(
6042
+ this.svAPIEndpoint,
6043
+ this.cycleReport._path,
6044
+ params,
6045
+ );
6046
+ return res;
6047
+ },
6048
+ };
6049
+
6035
6050
  promotions = {
6036
6051
  _path: Repzo._end_points.PROMOTIONS,
6037
6052
  find: async (
@@ -7484,6 +7484,8 @@ export namespace Service {
7484
7484
  signature?: StringId;
7485
7485
  bypass_freshness_window_code_entered?: boolean;
7486
7486
  promotion_freshness_window_exceeded?: boolean;
7487
+ total_word?: string;
7488
+ total_local_word?: string;
7487
7489
  createdAt: string;
7488
7490
  updatedAt: string;
7489
7491
  __v: number;
@@ -8706,6 +8708,7 @@ export namespace Service {
8706
8708
  teams: string[] | Team.TeamSchema[];
8707
8709
  items_count?: number;
8708
8710
  total_items_base_unit_qty?: number;
8711
+ total_measure_unit_qty?: number;
8709
8712
  company_namespace: string[];
8710
8713
  transaction_processed: boolean;
8711
8714
  status: "pending" | "approved" | "processing" | "rejected" | "processed";
@@ -9152,6 +9155,210 @@ export namespace Service {
9152
9155
  }
9153
9156
  }
9154
9157
 
9158
+ export namespace CycleReport {
9159
+ type CycleStatus = "pending" | "approved" | "processing" | "rejected";
9160
+ type ProformaDoc = Pick<
9161
+ Proforma.Data,
9162
+ | "_id"
9163
+ | "class"
9164
+ | "serial_number"
9165
+ | "return_serial_number"
9166
+ | "client_name"
9167
+ | "client_id"
9168
+ | "issue_date"
9169
+ | "creator"
9170
+ | "time"
9171
+ | "createdAt"
9172
+ | "currency"
9173
+ | "teams"
9174
+ | "total_word"
9175
+ | "total_local_word"
9176
+ | "total"
9177
+ >;
9178
+ type TransferDoc = Pick<
9179
+ Transfer.Data,
9180
+ | "_id"
9181
+ | "serial_number"
9182
+ | "type"
9183
+ | "time"
9184
+ | "createdAt"
9185
+ | "from"
9186
+ | "to"
9187
+ | "items_count"
9188
+ | "total_items_base_unit_qty"
9189
+ | "total_measure_unit_qty"
9190
+ > & { from_name?: string; to_name?: string };
9191
+ type ApprovalRequestDoc = Pick<
9192
+ ApprovalRequest.Data,
9193
+ | "_id"
9194
+ | "serial_number"
9195
+ | "type"
9196
+ | "subtype"
9197
+ | "time"
9198
+ | "createdAt"
9199
+ | "creator"
9200
+ | "reference_name"
9201
+ | "reference_local_name"
9202
+ >;
9203
+ type ReceivingMaterialDoc = Pick<
9204
+ ReceivingMaterial.Data,
9205
+ | "_id"
9206
+ | "to"
9207
+ | "serial_number"
9208
+ | "time"
9209
+ | "createdAt"
9210
+ | "from"
9211
+ | "items_count"
9212
+ | "total_items_base_unit_qty"
9213
+ | "total_measure_unit_qty"
9214
+ > & { to_name?: string };
9215
+ type AssetPartTransferDoc = Pick<
9216
+ AssetPartTransfer.Data,
9217
+ | "_id"
9218
+ | "type"
9219
+ | "from_name"
9220
+ | "to_name"
9221
+ | "creator"
9222
+ | "serial_number"
9223
+ | "asset_part_units_count"
9224
+ | "total_asset_part_units_qty"
9225
+ | "time"
9226
+ | "createdAt"
9227
+ | "from"
9228
+ | "to"
9229
+ >;
9230
+ type AdjustInventoryDoc = Pick<AdjustInventory.Data, "_id">;
9231
+ type ReturnAssetPartUnitDoc = Pick<
9232
+ ReturnAssetPartUnit.Data,
9233
+ | "_id"
9234
+ | "warehouse"
9235
+ | "warehouse_name"
9236
+ | "creator"
9237
+ | "serial_number"
9238
+ | "asset_part_units_count"
9239
+ | "total_asset_part_units_qty"
9240
+ | "time"
9241
+ | "createdAt"
9242
+ | "client"
9243
+ | "client_name"
9244
+ >;
9245
+ type StoreAssetPartUnitDoc = Pick<
9246
+ StoreAssetPartUnit.Data,
9247
+ | "_id"
9248
+ | "warehouse"
9249
+ | "warehouse_name"
9250
+ | "creator"
9251
+ | "serial_number"
9252
+ | "asset_part_units_count"
9253
+ | "total_asset_part_units_qty"
9254
+ | "time"
9255
+ | "createdAt"
9256
+ >;
9257
+ type ActivityFormV2ResultDoc = Pick<
9258
+ ActivityFormV2Result.Data,
9259
+ | "_id"
9260
+ | "client"
9261
+ | "client_name"
9262
+ | "creator"
9263
+ | "serial_number"
9264
+ | "time"
9265
+ | "createdAt"
9266
+ | "form_id"
9267
+ > & {
9268
+ form_name?: string;
9269
+ };
9270
+ interface SchemaBase {
9271
+ _id: string;
9272
+ document_id: string;
9273
+ status: CycleStatus;
9274
+ node?: AdminCreator | RepCreator | ClientCreator;
9275
+ creator?: AdminCreator | RepCreator | ClientCreator;
9276
+ current_nodes: (AdminCreator | RepCreator | ClientCreator)[];
9277
+ stage?: number;
9278
+ stageName?: string;
9279
+ company_namespace: string[];
9280
+ note?: string;
9281
+ serial_number: SerialNumber;
9282
+ version: number;
9283
+ createdAt: string;
9284
+ updatedAt: string;
9285
+ __v: number;
9286
+ }
9287
+ export type Schema =
9288
+ | (SchemaBase & { document_type: "proforma"; document: ProformaDoc })
9289
+ | (SchemaBase & { document_type: "transfer"; document: TransferDoc })
9290
+ | (SchemaBase & {
9291
+ document_type: "approval-request";
9292
+ document: ApprovalRequestDoc;
9293
+ })
9294
+ | (SchemaBase & {
9295
+ document_type: "receiving-material";
9296
+ document: ReceivingMaterialDoc;
9297
+ })
9298
+ | (SchemaBase & {
9299
+ document_type: "asset-part-transfer";
9300
+ document: AssetPartTransferDoc;
9301
+ })
9302
+ | (SchemaBase & {
9303
+ document_type: "adjust-inventory";
9304
+ document: AdjustInventoryDoc;
9305
+ })
9306
+ | (SchemaBase & {
9307
+ document_type: "return-asset-part-unit";
9308
+ document: ReturnAssetPartUnitDoc;
9309
+ })
9310
+ | (SchemaBase & {
9311
+ document_type: "store-asset-part-unit";
9312
+ document: StoreAssetPartUnitDoc;
9313
+ })
9314
+ | (SchemaBase & {
9315
+ document_type: "activity-form-v2-result";
9316
+ document: ActivityFormV2ResultDoc;
9317
+ });
9318
+ export type Data = Schema;
9319
+
9320
+ interface Totals {
9321
+ "approval-request"?: number;
9322
+ "receiving-material"?: number;
9323
+ "store-asset-part-unit"?: number;
9324
+ "return-asset-part-unit"?: number;
9325
+ transfer?: number;
9326
+ proforma?: number;
9327
+ "adjust-inventory"?: number;
9328
+ "activity-form-v2-result"?: number;
9329
+ "asset-part-transfer"?: number;
9330
+ }
9331
+
9332
+ export namespace Find {
9333
+ export type Params = DefaultPaginationQueryParams & {
9334
+ sortBy?: { field: "_id"; type: "asc" | "desc" }[];
9335
+ _id?: StringId | StringId[];
9336
+ document_id?: StringId | StringId[];
9337
+ document_type?: Schema["document_type"] | Schema["document_type"][];
9338
+ status?: CycleStatus | CycleStatus[];
9339
+ "creator._id"?: StringId | StringId[];
9340
+ disabled?: boolean;
9341
+ from?: number;
9342
+ to?: number;
9343
+ from_updatedAt?: number;
9344
+ to_updatedAt?: number;
9345
+ from_createdAt?: number;
9346
+ to_createdAt?: number;
9347
+ from__id?: StringId;
9348
+ to__id?: StringId;
9349
+ approval?: StringId | StringId[];
9350
+ "current_nodes.type"?: string | string[];
9351
+ "current_nodes.rep"?: StringId | StringId[];
9352
+ "current_nodes.admin"?: StringId | StringId[];
9353
+ [key: string]: any;
9354
+ };
9355
+ export interface Result extends DefaultPaginationResult {
9356
+ data: Schema[];
9357
+ totals?: Totals;
9358
+ }
9359
+ }
9360
+ }
9361
+
9155
9362
  export namespace Transfer {
9156
9363
  export interface VariantTransfer {
9157
9364
  variant_id: string;
@@ -9535,6 +9742,7 @@ export namespace Service {
9535
9742
  updatedAt: string;
9536
9743
  __v: number;
9537
9744
  }
9745
+ export type Data = Schema;
9538
9746
  export interface PopulatedData {
9539
9747
  _id: StringId;
9540
9748
  serial_number: SerialNumber;