repzo 1.0.276 → 1.0.278

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
@@ -137,6 +137,7 @@ export declare const end_points: {
137
137
  readonly JOB_CATEGORY: "job-category";
138
138
  readonly JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze";
139
139
  readonly VISIT_REASON: "visit-reason";
140
+ readonly BULK_IMPORT: "bulk-import";
140
141
  };
141
142
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
142
143
  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"];
@@ -289,6 +290,7 @@ export default class Repzo {
289
290
  readonly JOB_CATEGORY: "job-category";
290
291
  readonly JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze";
291
292
  readonly VISIT_REASON: "visit-reason";
293
+ readonly BULK_IMPORT: "bulk-import";
292
294
  };
293
295
  private _retryRequest;
294
296
  private _fetch;
@@ -1344,4 +1346,11 @@ export default class Repzo {
1344
1346
  update: (id: Service.VisitReason.Update.ID, body: Service.VisitReason.Update.Body) => Promise<Service.VisitReason.Update.Result>;
1345
1347
  remove: (id: Service.VisitReason.Remove.ID) => Promise<Service.VisitReason.Remove.Result>;
1346
1348
  };
1349
+ bulkImport: {
1350
+ _path: "bulk-import";
1351
+ find: (params?: Service.BulkImport.Find.Params) => Promise<Service.BulkImport.Find.Result>;
1352
+ get: (id: Service.BulkImport.Get.ID) => Promise<Service.BulkImport.Get.Result>;
1353
+ create: (params: Service.BulkImport.Create.Params, body: Service.BulkImport.Create.Body) => Promise<Service.BulkImport.Create.Result>;
1354
+ update: (id: Service.BulkImport.Update.ID) => Promise<Service.BulkImport.Update.Result>;
1355
+ };
1347
1356
  }
package/lib/index.js CHANGED
@@ -139,6 +139,7 @@ export const end_points = {
139
139
  JOB_CATEGORY: "job-category",
140
140
  JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze",
141
141
  VISIT_REASON: "visit-reason",
142
+ BULK_IMPORT: "bulk-import",
142
143
  };
143
144
  export const availableService = [
144
145
  "client",
@@ -2794,6 +2795,24 @@ class Repzo {
2794
2795
  return res;
2795
2796
  },
2796
2797
  };
2798
+ this.bulkImport = {
2799
+ _path: Repzo._end_points.BULK_IMPORT,
2800
+ find: async (params) => {
2801
+ let res = await this._fetch(this.svAPIEndpoint, this.bulkImport._path, params);
2802
+ return res;
2803
+ },
2804
+ get: async (id) => {
2805
+ return await this._fetch(this.svAPIEndpoint, this.bulkImport._path + `/${id}`);
2806
+ },
2807
+ create: async (params, body) => {
2808
+ let res = await this._create(this.svAPIEndpoint, this.bulkImport._path, body, params);
2809
+ return res;
2810
+ },
2811
+ update: async (id) => {
2812
+ let res = await this._update(this.svAPIEndpoint, this.bulkImport._path + `/${id}`, {});
2813
+ return res;
2814
+ },
2815
+ };
2797
2816
  this.svAPIEndpoint =
2798
2817
  !options?.env || options?.env == "production"
2799
2818
  ? "https://sv.api.repzo.me"
@@ -2951,6 +2951,7 @@ export declare namespace Service {
2951
2951
  skip_if_calendar_day_is_more_than?: number;
2952
2952
  enable_auto_skip_activity_existence?: boolean;
2953
2953
  auto_skip_activity_slugs?: AutoSkipActivitySlugs[];
2954
+ auto_skip_activity_slugs_operator?: "and" | "or";
2954
2955
  };
2955
2956
  createdAt: string;
2956
2957
  updatedAt: string;
@@ -4569,6 +4570,8 @@ export declare namespace Service {
4569
4570
  extra?: {};
4570
4571
  };
4571
4572
  delayed?: boolean;
4573
+ visit_reason?: StringId;
4574
+ visit_note?: string;
4572
4575
  createdAt: Date;
4573
4576
  updatedAt: Date;
4574
4577
  }
@@ -4796,8 +4799,9 @@ export declare namespace Service {
4796
4799
  user?: string | Rep.RepSchema;
4797
4800
  client?: string | Client.ClientSchema;
4798
4801
  route?: string | Route.RouteSchema;
4802
+ visit_reason?: StringId | Pick<VisitReason.Data, "_id" | "name">;
4799
4803
  };
4800
- export type PopulatedKeys = "notes" | "tasks" | "photos" | "forms" | "audits" | "tags" | "availability" | "teams" | "client" | "user" | "route";
4804
+ export type PopulatedKeys = "notes" | "tasks" | "photos" | "forms" | "audits" | "tags" | "availability" | "teams" | "client" | "user" | "route" | "visit_reason";
4801
4805
  export namespace Find {
4802
4806
  type Params = DefaultPaginationQueryParams & {
4803
4807
  user?: string;
@@ -4818,6 +4822,7 @@ export declare namespace Service {
4818
4822
  from_updatedAt?: number;
4819
4823
  from__id?: string;
4820
4824
  to__id?: string;
4825
+ visit_reason?: StringId | StringId[];
4821
4826
  [key: string]: any;
4822
4827
  populatedKeys?: PopulatedKeys[];
4823
4828
  sortBy?: {
@@ -8531,6 +8536,7 @@ export declare namespace Service {
8531
8536
  variants: VariantTransfer[];
8532
8537
  items_count?: number;
8533
8538
  total_items_base_unit_qty?: number;
8539
+ total_measure_unit_qty?: number;
8534
8540
  teams?: string[];
8535
8541
  custom_status?: string;
8536
8542
  sync_id: string;
@@ -8597,6 +8603,7 @@ export declare namespace Service {
8597
8603
  })[];
8598
8604
  items_count?: number;
8599
8605
  total_items_base_unit_qty?: number;
8606
+ total_measure_unit_qty?: number;
8600
8607
  teams?: string[];
8601
8608
  custom_status?: string;
8602
8609
  sync_id?: string;
@@ -15099,7 +15106,8 @@ export declare namespace Service {
15099
15106
  activities: (ActivityAuditVisitDetails | ActivityPhotoVisitDetails | ActivityAvailabilityVisitDetails | ActivityNoteVisitDetails | ActivityTaskVisitDetails | ActivityPlanogramVisitDetails | ActivityShelfshareVisitDetails | ActivitySecondaryDisplayVisitDetails | ActivityCheckoutDisplayVisitDetails | ActivityItemStatusVisitDetails | ActivityFormResultVisitDetails | ActivityFormV2ResultVisitDetails | ActivityStorecheckVisitDetails | ActivityFeedbackVisitDetails | ApprovalRequestVisitDetails | AssetPartReceivalVisitDetails | AssetPartTransferVisitDetails | ReturnAssetPartUnitVisitDetails | StoreAssetPartUnitVisitDetails | PaymentVisitDetails | RefundVisitDetails | ConvertProformaVisitDetails | FullInvoiceVisitDetails | ProformaVisitDetails | ReturnWholeInvoiceVisitDetails | VoidInvoiceVisitDetails | CLMFeedbackActivityVisitDetails)[];
15100
15107
  feed_back_option?: StringId;
15101
15108
  feed_back_option_label?: string;
15102
- } & Pick<Visit.Data, "closed_by_system" | "geoPoint" | "start_time" | "end_time" | "total_time" | "start_out_of_geofence" | "end_out_of_geofence" | "auto_closed_by_geofence" | "auto_closed_by_geofence_reason" | "client_geo_location" | "delta_distance">;
15109
+ visit_reason_name?: string;
15110
+ } & Pick<Visit.Data, "closed_by_system" | "geoPoint" | "start_time" | "end_time" | "total_time" | "start_out_of_geofence" | "end_out_of_geofence" | "auto_closed_by_geofence" | "auto_closed_by_geofence_reason" | "client_geo_location" | "delta_distance" | "visit_reason" | "visit_note">;
15103
15111
  export type CLMFeedbackActivity = {
15104
15112
  activity_type: "clm-feedback-activity";
15105
15113
  activity_id: StringId;
@@ -19092,6 +19100,108 @@ export declare namespace Service {
19092
19100
  type Result = Data;
19093
19101
  }
19094
19102
  }
19103
+ namespace BulkImport {
19104
+ type BulkImportType = "insertTags" | "insertClients" | "insertReps" | "updateReps" | "updateClients" | "insertProducts" | "insertVariants" | "updateProducts" | "updateVariants" | "updateCategories" | "updateSubCategories" | "insertCategories" | "insertSubCategories" | "insertAvailabilityMsl" | "updateAvailabilityMsl" | "updateAvailabilityMslWithProducts" | "updateMslWithVariants" | "insertJobCategories" | "updateJobCategories" | "updateJobs" | "insertJobs" | "updateTags" | "insertRoutes" | "updateRoutes" | "updateRoutesWithClients" | "insertPlans" | "updatePlans" | "updatePlansWithRules" | "weeklyGroupRules" | "weeklyRules" | "updateRulesWithRoutes" | "updateTargetRulesWithClients" | "updateTargetRulesWithReps" | "insertTransfers" | "adjustAccounts" | "insertRules" | "updateRules" | "insertInvoices" | "insertWarehouses" | "updateWarehouses" | "insertProductGroups" | "updateProductGroups" | "updatePriceListItems" | "updateMeasureunit" | "insertMeasureunit" | "insertMeasureunitFamily" | "updateMeasureunitFamily" | "insertLineTarget" | "clientLineClassification" | "updateLineTarget" | "insertReceivingMaterials" | "insertRetailExecutionPresets" | "updateRetailExecutionPresets" | "insertCustomListItems" | "updateCustomListItems" | "insertAssets" | "updateAssets" | "insertAssetUnits" | "updateAssetUnits" | "insertSpeciality" | "updateSpeciality" | "insertClientLocation" | "updateClientLocation" | "deleteLineTarget" | "updatePromotions" | "insertReminders" | "updateReminders" | "insertVariantBatch" | "updateVariantBatch" | "insertSettlements" | "updateClientUblInfo" | "insertSuppliers" | "updateSuppliers" | "insertTargetRules" | "insertContractInstallments" | "updateContractInstallments" | "insertContracts" | "updateContracts" | "insertAssetPartTypes" | "updateAssetPartTypes" | "insertAssetParts" | "updateAssetParts";
19105
+ interface ToBeInserted {
19106
+ model: Model;
19107
+ method?: "set" | "push";
19108
+ __ref_doc?: boolean;
19109
+ handleSpecialProcess?: boolean;
19110
+ insertedDocs?: {
19111
+ [key: string]: any;
19112
+ }[];
19113
+ docs: {
19114
+ [key: string]: any;
19115
+ }[];
19116
+ }
19117
+ interface ToBeUpdated {
19118
+ model: Model;
19119
+ method?: "set" | "push";
19120
+ __ref_doc?: boolean;
19121
+ key?: string;
19122
+ handleSpecialProcess?: boolean;
19123
+ docs: {
19124
+ [key: string]: any;
19125
+ }[];
19126
+ }
19127
+ interface ToBeDeleted {
19128
+ model: Model;
19129
+ method?: "set" | "push";
19130
+ __ref_doc: boolean;
19131
+ handleSpecialProcess?: boolean;
19132
+ docs: {
19133
+ [key: string]: any;
19134
+ }[];
19135
+ }
19136
+ export interface Data {
19137
+ messages: string[];
19138
+ _errors: string[];
19139
+ _warnings: string[];
19140
+ data: object;
19141
+ success: boolean;
19142
+ processed?: boolean;
19143
+ type: BulkImportType;
19144
+ creator: AdminOrRepOrTenantOrClient;
19145
+ editor?: AdminOrRepOrTenantOrClient;
19146
+ company_namespace: string[];
19147
+ toBeInserted: ToBeInserted[];
19148
+ toBeUpdated: ToBeUpdated[];
19149
+ toBeDeleted: ToBeDeleted[];
19150
+ second_phase_status?: "success" | "failed" | "partial";
19151
+ status: "building_report_in_progress" | "building_report_completed" | "building_report_failed" | "in_progress" | "success" | "failed" | "partial";
19152
+ media?: StringId[];
19153
+ _id: StringId;
19154
+ teams: string[];
19155
+ createdAt: Date;
19156
+ updatedAt: Date;
19157
+ }
19158
+ export type CreateBody = FormData;
19159
+ export interface UpdateBody {
19160
+ company_namespace?: string[];
19161
+ name?: string;
19162
+ disabled?: boolean;
19163
+ }
19164
+ export type PopulatedDoc = Data & {
19165
+ media?: StringId[] | MediaDoc[];
19166
+ };
19167
+ type PopulatedKeys = "media";
19168
+ export namespace Find {
19169
+ type Params = DefaultPaginationQueryParams & {
19170
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
19171
+ processed?: boolean;
19172
+ success?: boolean;
19173
+ from_updatedAt?: number;
19174
+ to_updatedAt?: number;
19175
+ creator?: StringId | StringId[];
19176
+ "creator._id"?: StringId | StringId[];
19177
+ from_time?: number;
19178
+ to_time?: number;
19179
+ second_phase_status: Data["second_phase_status"] | Data["second_phase_status"][];
19180
+ status?: Data["status"] | Data["status"][];
19181
+ type?: Data["type"] | Data["type"][];
19182
+ };
19183
+ interface Result extends DefaultPaginationResult {
19184
+ data: PopulatedDoc[];
19185
+ }
19186
+ }
19187
+ export namespace Get {
19188
+ type ID = StringId;
19189
+ type Result = PopulatedDoc;
19190
+ }
19191
+ export namespace Create {
19192
+ type Params = {
19193
+ type: Data["type"];
19194
+ [key: string]: any;
19195
+ };
19196
+ type Body = CreateBody;
19197
+ type Result = Data;
19198
+ }
19199
+ export namespace Update {
19200
+ type ID = StringId;
19201
+ type Result = Data;
19202
+ }
19203
+ export {};
19204
+ }
19095
19205
  }
19096
19206
  export type StringId = string;
19097
19207
  export type NameSpaces = string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.276",
3
+ "version": "1.0.278",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -149,6 +149,7 @@ export const end_points = {
149
149
  JOB_CATEGORY: "job-category",
150
150
  JOB_CATEGORY_AUTOSKIP_ANALYZE: "job-category-autoskip-analyze",
151
151
  VISIT_REASON: "visit-reason",
152
+ BULK_IMPORT: "bulk-import",
152
153
  } as const;
153
154
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
154
155
 
@@ -7005,6 +7006,50 @@ export default class Repzo {
7005
7006
  return res;
7006
7007
  },
7007
7008
  };
7009
+
7010
+ bulkImport = {
7011
+ _path: Repzo._end_points.BULK_IMPORT,
7012
+ find: async (
7013
+ params?: Service.BulkImport.Find.Params,
7014
+ ): Promise<Service.BulkImport.Find.Result> => {
7015
+ let res: Service.BulkImport.Find.Result = await this._fetch(
7016
+ this.svAPIEndpoint,
7017
+ this.bulkImport._path,
7018
+ params,
7019
+ );
7020
+ return res;
7021
+ },
7022
+ get: async (
7023
+ id: Service.BulkImport.Get.ID,
7024
+ ): Promise<Service.BulkImport.Get.Result> => {
7025
+ return await this._fetch(
7026
+ this.svAPIEndpoint,
7027
+ this.bulkImport._path + `/${id}`,
7028
+ );
7029
+ },
7030
+ create: async (
7031
+ params: Service.BulkImport.Create.Params,
7032
+ body: Service.BulkImport.Create.Body,
7033
+ ): Promise<Service.BulkImport.Create.Result> => {
7034
+ let res = await this._create(
7035
+ this.svAPIEndpoint,
7036
+ this.bulkImport._path,
7037
+ body,
7038
+ params,
7039
+ );
7040
+ return res;
7041
+ },
7042
+ update: async (
7043
+ id: Service.BulkImport.Update.ID,
7044
+ ): Promise<Service.BulkImport.Update.Result> => {
7045
+ let res: Service.BulkImport.Update.Result = await this._update(
7046
+ this.svAPIEndpoint,
7047
+ this.bulkImport._path + `/${id}`,
7048
+ {},
7049
+ );
7050
+ return res;
7051
+ },
7052
+ };
7008
7053
  }
7009
7054
 
7010
7055
  function normalizeParams(params: Params): { [key: string]: any } {
@@ -3502,6 +3502,7 @@ export namespace Service {
3502
3502
  skip_if_calendar_day_is_more_than?: number; // (1-31)
3503
3503
  enable_auto_skip_activity_existence?: boolean;
3504
3504
  auto_skip_activity_slugs?: AutoSkipActivitySlugs[];
3505
+ auto_skip_activity_slugs_operator?: "and" | "or";
3505
3506
  };
3506
3507
  createdAt: string;
3507
3508
  updatedAt: string;
@@ -5229,6 +5230,8 @@ export namespace Service {
5229
5230
  extra?: {};
5230
5231
  };
5231
5232
  delayed?: boolean;
5233
+ visit_reason?: StringId;
5234
+ visit_note?: string;
5232
5235
  createdAt: Date;
5233
5236
  updatedAt: Date;
5234
5237
  }
@@ -5457,6 +5460,7 @@ export namespace Service {
5457
5460
  user?: string | Rep.RepSchema;
5458
5461
  client?: string | Client.ClientSchema;
5459
5462
  route?: string | Route.RouteSchema;
5463
+ visit_reason?: StringId | Pick<VisitReason.Data, "_id" | "name">;
5460
5464
  };
5461
5465
  export type PopulatedKeys =
5462
5466
  | "notes"
@@ -5469,7 +5473,8 @@ export namespace Service {
5469
5473
  | "teams"
5470
5474
  | "client"
5471
5475
  | "user"
5472
- | "route";
5476
+ | "route"
5477
+ | "visit_reason";
5473
5478
  export namespace Find {
5474
5479
  export type Params = DefaultPaginationQueryParams & {
5475
5480
  user?: string;
@@ -5490,6 +5495,7 @@ export namespace Service {
5490
5495
  from_updatedAt?: number;
5491
5496
  from__id?: string;
5492
5497
  to__id?: string;
5498
+ visit_reason?: StringId | StringId[];
5493
5499
  [key: string]: any; // integration_meta.
5494
5500
  populatedKeys?: PopulatedKeys[];
5495
5501
  sortBy?: {
@@ -9194,6 +9200,7 @@ export namespace Service {
9194
9200
  variants: VariantTransfer[];
9195
9201
  items_count?: number;
9196
9202
  total_items_base_unit_qty?: number;
9203
+ total_measure_unit_qty?: number;
9197
9204
  teams?: string[];
9198
9205
  custom_status?: string;
9199
9206
  sync_id: string;
@@ -9260,6 +9267,7 @@ export namespace Service {
9260
9267
  )[];
9261
9268
  items_count?: number;
9262
9269
  total_items_base_unit_qty?: number;
9270
+ total_measure_unit_qty?: number;
9263
9271
  teams?: string[];
9264
9272
  custom_status?: string;
9265
9273
  sync_id?: string;
@@ -16702,6 +16710,7 @@ export namespace Service {
16702
16710
  )[];
16703
16711
  feed_back_option?: StringId;
16704
16712
  feed_back_option_label?: string;
16713
+ visit_reason_name?: string;
16705
16714
  } & Pick<
16706
16715
  Visit.Data,
16707
16716
  | "closed_by_system"
@@ -16715,6 +16724,8 @@ export namespace Service {
16715
16724
  | "auto_closed_by_geofence_reason"
16716
16725
  | "client_geo_location"
16717
16726
  | "delta_distance"
16727
+ | "visit_reason"
16728
+ | "visit_note"
16718
16729
  >;
16719
16730
 
16720
16731
  // CLMFeedbackActivity ********************************************************************
@@ -21468,6 +21479,193 @@ export namespace Service {
21468
21479
  export type Result = Data;
21469
21480
  }
21470
21481
  }
21482
+
21483
+ export namespace BulkImport {
21484
+ type BulkImportType =
21485
+ | "insertTags"
21486
+ | "insertClients"
21487
+ | "insertReps"
21488
+ | "updateReps"
21489
+ | "updateClients"
21490
+ | "insertProducts"
21491
+ | "insertVariants"
21492
+ | "updateProducts"
21493
+ | "updateVariants"
21494
+ | "updateCategories"
21495
+ | "updateSubCategories"
21496
+ | "insertCategories"
21497
+ | "insertSubCategories"
21498
+ | "insertAvailabilityMsl"
21499
+ | "updateAvailabilityMsl"
21500
+ | "updateAvailabilityMslWithProducts"
21501
+ | "updateMslWithVariants"
21502
+ | "insertJobCategories"
21503
+ | "updateJobCategories"
21504
+ | "updateJobs"
21505
+ | "insertJobs"
21506
+ | "updateTags"
21507
+ | "insertRoutes"
21508
+ | "updateRoutes"
21509
+ | "updateRoutesWithClients"
21510
+ | "insertPlans"
21511
+ | "updatePlans"
21512
+ | "updatePlansWithRules"
21513
+ | "weeklyGroupRules"
21514
+ | "weeklyRules"
21515
+ | "updateRulesWithRoutes"
21516
+ | "updateTargetRulesWithClients"
21517
+ | "updateTargetRulesWithReps"
21518
+ | "insertTransfers"
21519
+ | "adjustAccounts"
21520
+ | "insertRules"
21521
+ | "updateRules"
21522
+ | "insertInvoices"
21523
+ | "insertWarehouses"
21524
+ | "updateWarehouses"
21525
+ | "insertProductGroups"
21526
+ | "updateProductGroups"
21527
+ | "updatePriceListItems"
21528
+ | "updateMeasureunit"
21529
+ | "insertMeasureunit"
21530
+ | "insertMeasureunitFamily"
21531
+ | "updateMeasureunitFamily"
21532
+ | "insertLineTarget"
21533
+ | "clientLineClassification"
21534
+ | "updateLineTarget"
21535
+ | "insertReceivingMaterials"
21536
+ | "insertRetailExecutionPresets"
21537
+ | "updateRetailExecutionPresets"
21538
+ | "insertCustomListItems"
21539
+ | "updateCustomListItems"
21540
+ | "insertAssets"
21541
+ | "updateAssets"
21542
+ | "insertAssetUnits"
21543
+ | "updateAssetUnits"
21544
+ | "insertSpeciality"
21545
+ | "updateSpeciality"
21546
+ | "insertClientLocation"
21547
+ | "updateClientLocation"
21548
+ | "deleteLineTarget"
21549
+ | "updatePromotions"
21550
+ | "insertReminders"
21551
+ | "updateReminders"
21552
+ | "insertVariantBatch"
21553
+ | "updateVariantBatch"
21554
+ | "insertSettlements"
21555
+ | "updateClientUblInfo"
21556
+ | "insertSuppliers"
21557
+ | "updateSuppliers"
21558
+ | "insertTargetRules"
21559
+ | "insertContractInstallments"
21560
+ | "updateContractInstallments"
21561
+ | "insertContracts"
21562
+ | "updateContracts"
21563
+ | "insertAssetPartTypes"
21564
+ | "updateAssetPartTypes"
21565
+ | "insertAssetParts"
21566
+ | "updateAssetParts";
21567
+
21568
+ interface ToBeInserted {
21569
+ model: Model;
21570
+ method?: "set" | "push";
21571
+ __ref_doc?: boolean;
21572
+ handleSpecialProcess?: boolean;
21573
+ insertedDocs?: { [key: string]: any }[];
21574
+ docs: { [key: string]: any }[];
21575
+ }
21576
+ interface ToBeUpdated {
21577
+ model: Model;
21578
+ method?: "set" | "push";
21579
+ __ref_doc?: boolean;
21580
+ key?: string;
21581
+ handleSpecialProcess?: boolean;
21582
+ docs: { [key: string]: any }[];
21583
+ }
21584
+ interface ToBeDeleted {
21585
+ model: Model;
21586
+ method?: "set" | "push";
21587
+ __ref_doc: boolean;
21588
+ handleSpecialProcess?: boolean;
21589
+ docs: { [key: string]: any }[];
21590
+ }
21591
+
21592
+ export interface Data {
21593
+ messages: string[];
21594
+ _errors: string[];
21595
+ _warnings: string[];
21596
+ data: object;
21597
+ success: boolean;
21598
+ processed?: boolean;
21599
+ type: BulkImportType;
21600
+ creator: AdminOrRepOrTenantOrClient;
21601
+ editor?: AdminOrRepOrTenantOrClient;
21602
+ company_namespace: string[];
21603
+ toBeInserted: ToBeInserted[];
21604
+ toBeUpdated: ToBeUpdated[];
21605
+ toBeDeleted: ToBeDeleted[];
21606
+ second_phase_status?: "success" | "failed" | "partial";
21607
+ status:
21608
+ | "building_report_in_progress"
21609
+ | "building_report_completed"
21610
+ | "building_report_failed"
21611
+ | "in_progress"
21612
+ | "success"
21613
+ | "failed"
21614
+ | "partial";
21615
+ media?: StringId[];
21616
+ _id: StringId;
21617
+ teams: string[];
21618
+ createdAt: Date;
21619
+ updatedAt: Date;
21620
+ }
21621
+ export type CreateBody = FormData;
21622
+ export interface UpdateBody {
21623
+ company_namespace?: string[];
21624
+ name?: string;
21625
+ disabled?: boolean;
21626
+ }
21627
+
21628
+ export type PopulatedDoc = Data & {
21629
+ media?: StringId[] | MediaDoc[];
21630
+ };
21631
+
21632
+ type PopulatedKeys = "media";
21633
+
21634
+ export namespace Find {
21635
+ export type Params = DefaultPaginationQueryParams & {
21636
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
21637
+ processed?: boolean;
21638
+ success?: boolean;
21639
+ from_updatedAt?: number;
21640
+ to_updatedAt?: number;
21641
+ creator?: StringId | StringId[];
21642
+ "creator._id"?: StringId | StringId[];
21643
+ from_time?: number;
21644
+ to_time?: number;
21645
+ second_phase_status:
21646
+ | Data["second_phase_status"]
21647
+ | Data["second_phase_status"][];
21648
+ status?: Data["status"] | Data["status"][];
21649
+ type?: Data["type"] | Data["type"][];
21650
+ };
21651
+ export interface Result extends DefaultPaginationResult {
21652
+ data: PopulatedDoc[];
21653
+ }
21654
+ }
21655
+ export namespace Get {
21656
+ export type ID = StringId;
21657
+ export type Result = PopulatedDoc;
21658
+ }
21659
+ export namespace Create {
21660
+ export type Params = { type: Data["type"]; [key: string]: any };
21661
+ export type Body = CreateBody;
21662
+ export type Result = Data;
21663
+ }
21664
+ export namespace Update {
21665
+ export type ID = StringId;
21666
+ export type Result = Data;
21667
+ }
21668
+ }
21471
21669
  }
21472
21670
 
21473
21671
  export type StringId = string;