repzo 1.0.276 → 1.0.277

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?: {
@@ -15099,7 +15104,8 @@ export declare namespace Service {
15099
15104
  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
15105
  feed_back_option?: StringId;
15101
15106
  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">;
15107
+ visit_reason_name?: string;
15108
+ } & 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
15109
  export type CLMFeedbackActivity = {
15104
15110
  activity_type: "clm-feedback-activity";
15105
15111
  activity_id: StringId;
@@ -19092,6 +19098,108 @@ export declare namespace Service {
19092
19098
  type Result = Data;
19093
19099
  }
19094
19100
  }
19101
+ namespace BulkImport {
19102
+ 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";
19103
+ interface ToBeInserted {
19104
+ model: Model;
19105
+ method?: "set" | "push";
19106
+ __ref_doc?: boolean;
19107
+ handleSpecialProcess?: boolean;
19108
+ insertedDocs?: {
19109
+ [key: string]: any;
19110
+ }[];
19111
+ docs: {
19112
+ [key: string]: any;
19113
+ }[];
19114
+ }
19115
+ interface ToBeUpdated {
19116
+ model: Model;
19117
+ method?: "set" | "push";
19118
+ __ref_doc?: boolean;
19119
+ key?: string;
19120
+ handleSpecialProcess?: boolean;
19121
+ docs: {
19122
+ [key: string]: any;
19123
+ }[];
19124
+ }
19125
+ interface ToBeDeleted {
19126
+ model: Model;
19127
+ method?: "set" | "push";
19128
+ __ref_doc: boolean;
19129
+ handleSpecialProcess?: boolean;
19130
+ docs: {
19131
+ [key: string]: any;
19132
+ }[];
19133
+ }
19134
+ export interface Data {
19135
+ messages: string[];
19136
+ _errors: string[];
19137
+ _warnings: string[];
19138
+ data: object;
19139
+ success: boolean;
19140
+ processed?: boolean;
19141
+ type: BulkImportType;
19142
+ creator: AdminOrRepOrTenantOrClient;
19143
+ editor?: AdminOrRepOrTenantOrClient;
19144
+ company_namespace: string[];
19145
+ toBeInserted: ToBeInserted[];
19146
+ toBeUpdated: ToBeUpdated[];
19147
+ toBeDeleted: ToBeDeleted[];
19148
+ second_phase_status?: "success" | "failed" | "partial";
19149
+ status: "building_report_in_progress" | "building_report_completed" | "building_report_failed" | "in_progress" | "success" | "failed" | "partial";
19150
+ media?: StringId[];
19151
+ _id: StringId;
19152
+ teams: string[];
19153
+ createdAt: Date;
19154
+ updatedAt: Date;
19155
+ }
19156
+ export type CreateBody = FormData;
19157
+ export interface UpdateBody {
19158
+ company_namespace?: string[];
19159
+ name?: string;
19160
+ disabled?: boolean;
19161
+ }
19162
+ export type PopulatedDoc = Data & {
19163
+ media?: StringId[] | MediaDoc[];
19164
+ };
19165
+ type PopulatedKeys = "media";
19166
+ export namespace Find {
19167
+ type Params = DefaultPaginationQueryParams & {
19168
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
19169
+ processed?: boolean;
19170
+ success?: boolean;
19171
+ from_updatedAt?: number;
19172
+ to_updatedAt?: number;
19173
+ creator?: StringId | StringId[];
19174
+ "creator._id"?: StringId | StringId[];
19175
+ from_time?: number;
19176
+ to_time?: number;
19177
+ second_phase_status: Data["second_phase_status"] | Data["second_phase_status"][];
19178
+ status?: Data["status"] | Data["status"][];
19179
+ type?: Data["type"] | Data["type"][];
19180
+ };
19181
+ interface Result extends DefaultPaginationResult {
19182
+ data: PopulatedDoc[];
19183
+ }
19184
+ }
19185
+ export namespace Get {
19186
+ type ID = StringId;
19187
+ type Result = PopulatedDoc;
19188
+ }
19189
+ export namespace Create {
19190
+ type Params = {
19191
+ type: Data["type"];
19192
+ [key: string]: any;
19193
+ };
19194
+ type Body = CreateBody;
19195
+ type Result = Data;
19196
+ }
19197
+ export namespace Update {
19198
+ type ID = StringId;
19199
+ type Result = Data;
19200
+ }
19201
+ export {};
19202
+ }
19095
19203
  }
19096
19204
  export type StringId = string;
19097
19205
  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.277",
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?: {
@@ -16702,6 +16708,7 @@ export namespace Service {
16702
16708
  )[];
16703
16709
  feed_back_option?: StringId;
16704
16710
  feed_back_option_label?: string;
16711
+ visit_reason_name?: string;
16705
16712
  } & Pick<
16706
16713
  Visit.Data,
16707
16714
  | "closed_by_system"
@@ -16715,6 +16722,8 @@ export namespace Service {
16715
16722
  | "auto_closed_by_geofence_reason"
16716
16723
  | "client_geo_location"
16717
16724
  | "delta_distance"
16725
+ | "visit_reason"
16726
+ | "visit_note"
16718
16727
  >;
16719
16728
 
16720
16729
  // CLMFeedbackActivity ********************************************************************
@@ -21468,6 +21477,193 @@ export namespace Service {
21468
21477
  export type Result = Data;
21469
21478
  }
21470
21479
  }
21480
+
21481
+ export namespace BulkImport {
21482
+ type BulkImportType =
21483
+ | "insertTags"
21484
+ | "insertClients"
21485
+ | "insertReps"
21486
+ | "updateReps"
21487
+ | "updateClients"
21488
+ | "insertProducts"
21489
+ | "insertVariants"
21490
+ | "updateProducts"
21491
+ | "updateVariants"
21492
+ | "updateCategories"
21493
+ | "updateSubCategories"
21494
+ | "insertCategories"
21495
+ | "insertSubCategories"
21496
+ | "insertAvailabilityMsl"
21497
+ | "updateAvailabilityMsl"
21498
+ | "updateAvailabilityMslWithProducts"
21499
+ | "updateMslWithVariants"
21500
+ | "insertJobCategories"
21501
+ | "updateJobCategories"
21502
+ | "updateJobs"
21503
+ | "insertJobs"
21504
+ | "updateTags"
21505
+ | "insertRoutes"
21506
+ | "updateRoutes"
21507
+ | "updateRoutesWithClients"
21508
+ | "insertPlans"
21509
+ | "updatePlans"
21510
+ | "updatePlansWithRules"
21511
+ | "weeklyGroupRules"
21512
+ | "weeklyRules"
21513
+ | "updateRulesWithRoutes"
21514
+ | "updateTargetRulesWithClients"
21515
+ | "updateTargetRulesWithReps"
21516
+ | "insertTransfers"
21517
+ | "adjustAccounts"
21518
+ | "insertRules"
21519
+ | "updateRules"
21520
+ | "insertInvoices"
21521
+ | "insertWarehouses"
21522
+ | "updateWarehouses"
21523
+ | "insertProductGroups"
21524
+ | "updateProductGroups"
21525
+ | "updatePriceListItems"
21526
+ | "updateMeasureunit"
21527
+ | "insertMeasureunit"
21528
+ | "insertMeasureunitFamily"
21529
+ | "updateMeasureunitFamily"
21530
+ | "insertLineTarget"
21531
+ | "clientLineClassification"
21532
+ | "updateLineTarget"
21533
+ | "insertReceivingMaterials"
21534
+ | "insertRetailExecutionPresets"
21535
+ | "updateRetailExecutionPresets"
21536
+ | "insertCustomListItems"
21537
+ | "updateCustomListItems"
21538
+ | "insertAssets"
21539
+ | "updateAssets"
21540
+ | "insertAssetUnits"
21541
+ | "updateAssetUnits"
21542
+ | "insertSpeciality"
21543
+ | "updateSpeciality"
21544
+ | "insertClientLocation"
21545
+ | "updateClientLocation"
21546
+ | "deleteLineTarget"
21547
+ | "updatePromotions"
21548
+ | "insertReminders"
21549
+ | "updateReminders"
21550
+ | "insertVariantBatch"
21551
+ | "updateVariantBatch"
21552
+ | "insertSettlements"
21553
+ | "updateClientUblInfo"
21554
+ | "insertSuppliers"
21555
+ | "updateSuppliers"
21556
+ | "insertTargetRules"
21557
+ | "insertContractInstallments"
21558
+ | "updateContractInstallments"
21559
+ | "insertContracts"
21560
+ | "updateContracts"
21561
+ | "insertAssetPartTypes"
21562
+ | "updateAssetPartTypes"
21563
+ | "insertAssetParts"
21564
+ | "updateAssetParts";
21565
+
21566
+ interface ToBeInserted {
21567
+ model: Model;
21568
+ method?: "set" | "push";
21569
+ __ref_doc?: boolean;
21570
+ handleSpecialProcess?: boolean;
21571
+ insertedDocs?: { [key: string]: any }[];
21572
+ docs: { [key: string]: any }[];
21573
+ }
21574
+ interface ToBeUpdated {
21575
+ model: Model;
21576
+ method?: "set" | "push";
21577
+ __ref_doc?: boolean;
21578
+ key?: string;
21579
+ handleSpecialProcess?: boolean;
21580
+ docs: { [key: string]: any }[];
21581
+ }
21582
+ interface ToBeDeleted {
21583
+ model: Model;
21584
+ method?: "set" | "push";
21585
+ __ref_doc: boolean;
21586
+ handleSpecialProcess?: boolean;
21587
+ docs: { [key: string]: any }[];
21588
+ }
21589
+
21590
+ export interface Data {
21591
+ messages: string[];
21592
+ _errors: string[];
21593
+ _warnings: string[];
21594
+ data: object;
21595
+ success: boolean;
21596
+ processed?: boolean;
21597
+ type: BulkImportType;
21598
+ creator: AdminOrRepOrTenantOrClient;
21599
+ editor?: AdminOrRepOrTenantOrClient;
21600
+ company_namespace: string[];
21601
+ toBeInserted: ToBeInserted[];
21602
+ toBeUpdated: ToBeUpdated[];
21603
+ toBeDeleted: ToBeDeleted[];
21604
+ second_phase_status?: "success" | "failed" | "partial";
21605
+ status:
21606
+ | "building_report_in_progress"
21607
+ | "building_report_completed"
21608
+ | "building_report_failed"
21609
+ | "in_progress"
21610
+ | "success"
21611
+ | "failed"
21612
+ | "partial";
21613
+ media?: StringId[];
21614
+ _id: StringId;
21615
+ teams: string[];
21616
+ createdAt: Date;
21617
+ updatedAt: Date;
21618
+ }
21619
+ export type CreateBody = FormData;
21620
+ export interface UpdateBody {
21621
+ company_namespace?: string[];
21622
+ name?: string;
21623
+ disabled?: boolean;
21624
+ }
21625
+
21626
+ export type PopulatedDoc = Data & {
21627
+ media?: StringId[] | MediaDoc[];
21628
+ };
21629
+
21630
+ type PopulatedKeys = "media";
21631
+
21632
+ export namespace Find {
21633
+ export type Params = DefaultPaginationQueryParams & {
21634
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
21635
+ processed?: boolean;
21636
+ success?: boolean;
21637
+ from_updatedAt?: number;
21638
+ to_updatedAt?: number;
21639
+ creator?: StringId | StringId[];
21640
+ "creator._id"?: StringId | StringId[];
21641
+ from_time?: number;
21642
+ to_time?: number;
21643
+ second_phase_status:
21644
+ | Data["second_phase_status"]
21645
+ | Data["second_phase_status"][];
21646
+ status?: Data["status"] | Data["status"][];
21647
+ type?: Data["type"] | Data["type"][];
21648
+ };
21649
+ export interface Result extends DefaultPaginationResult {
21650
+ data: PopulatedDoc[];
21651
+ }
21652
+ }
21653
+ export namespace Get {
21654
+ export type ID = StringId;
21655
+ export type Result = PopulatedDoc;
21656
+ }
21657
+ export namespace Create {
21658
+ export type Params = { type: Data["type"]; [key: string]: any };
21659
+ export type Body = CreateBody;
21660
+ export type Result = Data;
21661
+ }
21662
+ export namespace Update {
21663
+ export type ID = StringId;
21664
+ export type Result = Data;
21665
+ }
21666
+ }
21471
21667
  }
21472
21668
 
21473
21669
  export type StringId = string;