repzo 1.0.196 → 1.0.198

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
@@ -103,6 +103,9 @@ export declare const end_points: {
103
103
  readonly REPORT_FILTER: "report-filter";
104
104
  readonly SAFE_CRUD: "safe-crud";
105
105
  readonly PAYMENT_METHOD: "payment-method";
106
+ readonly REPORT_VIEW: "report-view";
107
+ readonly REPORT_VIEW_DEFAULT: "report-view-default";
108
+ readonly REPORT_VIEW_FAVORITE: "report-view-favorite";
106
109
  };
107
110
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
108
111
  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", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "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"];
@@ -217,6 +220,9 @@ export default class Repzo {
217
220
  readonly REPORT_FILTER: "report-filter";
218
221
  readonly SAFE_CRUD: "safe-crud";
219
222
  readonly PAYMENT_METHOD: "payment-method";
223
+ readonly REPORT_VIEW: "report-view";
224
+ readonly REPORT_VIEW_DEFAULT: "report-view-default";
225
+ readonly REPORT_VIEW_FAVORITE: "report-view-favorite";
220
226
  };
221
227
  private _fetch;
222
228
  private _create;
@@ -1032,4 +1038,26 @@ export default class Repzo {
1032
1038
  update: (id: Service.PaymentMethod.Update.ID, body: Service.PaymentMethod.Update.Body) => Promise<Service.PaymentMethod.Update.Result>;
1033
1039
  remove: (id: Service.PaymentMethod.Update.ID, params: Service.PaymentMethod.Remove.Params) => Promise<Service.PaymentMethod.Remove.Result>;
1034
1040
  };
1041
+ reportView: {
1042
+ _path: "report-view";
1043
+ find: (params?: Service.ReportView.Find.Params) => Promise<Service.ReportView.Find.Result>;
1044
+ get: (id: Service.ReportView.Get.ID, params?: Service.ReportView.Get.Params) => Promise<Service.ReportView.Get.Result>;
1045
+ create: (body: Service.ReportView.Create.Body) => Promise<Service.ReportView.Create.Result>;
1046
+ update: (id: Service.ReportView.Update.ID, body: Service.ReportView.Update.Body) => Promise<Service.ReportView.Update.Result>;
1047
+ remove: (id: Service.ReportView.Remove.ID, params: Service.ReportView.Remove.Params) => Promise<Service.ReportView.Remove.Result>;
1048
+ };
1049
+ reportViewFavorite: {
1050
+ _path: "report-view-favorite";
1051
+ find: (params?: Service.ReportViewFavorite.Find.Params) => Promise<Service.ReportViewFavorite.Find.Result>;
1052
+ get: (id: Service.ReportViewFavorite.Get.ID, params?: Service.ReportViewFavorite.Get.Params) => Promise<Service.ReportViewFavorite.Get.Result>;
1053
+ create: (body: Service.ReportViewFavorite.Create.Body) => Promise<Service.ReportViewFavorite.Create.Result>;
1054
+ remove: (id: Service.ReportViewFavorite.Remove.ID, params: Service.ReportViewFavorite.Remove.Params) => Promise<Service.ReportViewFavorite.Remove.Result>;
1055
+ };
1056
+ reportViewDefault: {
1057
+ _path: "report-view-default";
1058
+ find: (params?: Service.ReportViewDefault.Find.Params) => Promise<Service.ReportViewDefault.Find.Result>;
1059
+ get: (id: Service.ReportViewDefault.Get.ID, params?: Service.ReportViewDefault.Get.Params) => Promise<Service.ReportViewDefault.Get.Result>;
1060
+ create: (body: Service.ReportViewDefault.Create.Body) => Promise<Service.ReportViewDefault.Create.Result>;
1061
+ remove: (id: Service.ReportViewDefault.Remove.ID, params: Service.ReportViewDefault.Remove.Params) => Promise<Service.ReportViewDefault.Remove.Result>;
1062
+ };
1035
1063
  }
package/lib/index.js CHANGED
@@ -104,6 +104,9 @@ export const end_points = {
104
104
  REPORT_FILTER: "report-filter",
105
105
  SAFE_CRUD: "safe-crud",
106
106
  PAYMENT_METHOD: "payment-method",
107
+ REPORT_VIEW: "report-view",
108
+ REPORT_VIEW_DEFAULT: "report-view-default",
109
+ REPORT_VIEW_FAVORITE: "report-view-favorite",
107
110
  };
108
111
  export const availableService = [
109
112
  "client",
@@ -2119,6 +2122,64 @@ class Repzo {
2119
2122
  return res;
2120
2123
  },
2121
2124
  };
2125
+ this.reportView = {
2126
+ _path: Repzo._end_points.REPORT_VIEW,
2127
+ find: async (params) => {
2128
+ let res = await this._fetch(this.svAPIEndpoint, this.reportView._path, params);
2129
+ return res;
2130
+ },
2131
+ get: async (id, params) => {
2132
+ return await this._fetch(this.svAPIEndpoint, this.reportView._path + `/${id}`, params);
2133
+ },
2134
+ create: async (body) => {
2135
+ let res = await this._create(this.svAPIEndpoint, this.reportView._path, body);
2136
+ return res;
2137
+ },
2138
+ update: async (id, body) => {
2139
+ let res = await this._update(this.svAPIEndpoint, this.reportView._path + `/${id}`, body);
2140
+ return res;
2141
+ },
2142
+ remove: async (id, params) => {
2143
+ let res = await this._delete(this.svAPIEndpoint, this.reportView._path + `/${id}`, params);
2144
+ return res;
2145
+ },
2146
+ };
2147
+ this.reportViewFavorite = {
2148
+ _path: Repzo._end_points.REPORT_VIEW_FAVORITE,
2149
+ find: async (params) => {
2150
+ let res = await this._fetch(this.svAPIEndpoint, this.reportViewFavorite._path, params);
2151
+ return res;
2152
+ },
2153
+ get: async (id, params) => {
2154
+ return await this._fetch(this.svAPIEndpoint, this.reportViewFavorite._path + `/${id}`, params);
2155
+ },
2156
+ create: async (body) => {
2157
+ let res = await this._create(this.svAPIEndpoint, this.reportViewFavorite._path, body);
2158
+ return res;
2159
+ },
2160
+ remove: async (id, params) => {
2161
+ let res = await this._delete(this.svAPIEndpoint, this.reportViewFavorite._path + `/${id}`, params);
2162
+ return res;
2163
+ },
2164
+ };
2165
+ this.reportViewDefault = {
2166
+ _path: Repzo._end_points.REPORT_VIEW_DEFAULT,
2167
+ find: async (params) => {
2168
+ let res = await this._fetch(this.svAPIEndpoint, this.reportViewDefault._path, params);
2169
+ return res;
2170
+ },
2171
+ get: async (id, params) => {
2172
+ return await this._fetch(this.svAPIEndpoint, this.reportViewDefault._path + `/${id}`, params);
2173
+ },
2174
+ create: async (body) => {
2175
+ let res = await this._create(this.svAPIEndpoint, this.reportViewDefault._path, body);
2176
+ return res;
2177
+ },
2178
+ remove: async (id, params) => {
2179
+ let res = await this._delete(this.svAPIEndpoint, this.reportViewDefault._path + `/${id}`, params);
2180
+ return res;
2181
+ },
2182
+ };
2122
2183
  this.svAPIEndpoint =
2123
2184
  !options?.env || options?.env == "production"
2124
2185
  ? "https://sv.api.repzo.me"
@@ -16296,6 +16296,7 @@ export declare namespace Service {
16296
16296
  static_data?: StaticData[];
16297
16297
  group_data: GroupData[];
16298
16298
  filter_group: StringId;
16299
+ is_popular?: boolean;
16299
16300
  createdAt?: Date;
16300
16301
  updatedAt?: Date;
16301
16302
  }
@@ -16316,6 +16317,7 @@ export declare namespace Service {
16316
16317
  endpoint?: string;
16317
16318
  static_data?: StaticData[];
16318
16319
  group_data: GroupData[];
16320
+ is_popular?: boolean;
16319
16321
  }
16320
16322
  interface UpdateBody {
16321
16323
  label?: string;
@@ -16334,6 +16336,7 @@ export declare namespace Service {
16334
16336
  endpoint?: string;
16335
16337
  static_data?: StaticData[];
16336
16338
  group_data: GroupData[];
16339
+ is_popular?: boolean;
16337
16340
  }
16338
16341
  namespace Find {
16339
16342
  type Params = DefaultPaginationQueryParams & {
@@ -16341,6 +16344,7 @@ export declare namespace Service {
16341
16344
  from_createdAt?: Date;
16342
16345
  to_updatedAt?: Date;
16343
16346
  search?: string;
16347
+ is_popular?: boolean;
16344
16348
  populatedKeys?: ["filter_group"];
16345
16349
  };
16346
16350
  interface Result extends DefaultPaginationResult {
@@ -16532,6 +16536,285 @@ export declare namespace Service {
16532
16536
  type Result = Data;
16533
16537
  }
16534
16538
  }
16539
+ namespace ReportView {
16540
+ interface ColumnViewSettings {
16541
+ key: string;
16542
+ position: number;
16543
+ width: number;
16544
+ is_pinned: boolean;
16545
+ }
16546
+ interface Data {
16547
+ _id?: string;
16548
+ name: string;
16549
+ disabled: boolean;
16550
+ creator: Admin;
16551
+ editor: Admin;
16552
+ column_view_settings?: ColumnViewSettings[];
16553
+ position?: number;
16554
+ payload?: {
16555
+ maxAnyOfLength?: number;
16556
+ anyOf: {
16557
+ criteria: {
16558
+ key: string;
16559
+ operator: string;
16560
+ value: any;
16561
+ }[];
16562
+ }[];
16563
+ options?: {
16564
+ page?: number;
16565
+ limit?: number;
16566
+ sort?: {
16567
+ key: string;
16568
+ type: "asc" | "desc";
16569
+ }[];
16570
+ totals_summary?: "all" | "page" | "none";
16571
+ };
16572
+ group?: {
16573
+ _id: string;
16574
+ fields: {
16575
+ key: string;
16576
+ accumulator: "sum" | "min" | "max" | "avg" | "first" | "last" | "addToSet" | "push";
16577
+ }[];
16578
+ }[];
16579
+ columns?: ReportColumn.Data[];
16580
+ projection?: {
16581
+ key: string;
16582
+ label: string;
16583
+ }[];
16584
+ };
16585
+ is_public: boolean;
16586
+ report_view_type: "kanban" | "table" | "agenda";
16587
+ paramsQuery?: {
16588
+ [key: string]: any;
16589
+ };
16590
+ report_type: ReportType;
16591
+ company_namespace: string[];
16592
+ teams?: string[];
16593
+ createdAt?: Date;
16594
+ updatedAt?: Date;
16595
+ }
16596
+ interface CreateBody {
16597
+ name: string;
16598
+ column_view_settings?: ColumnViewSettings[];
16599
+ position?: number;
16600
+ payload?: {
16601
+ maxAnyOfLength?: number;
16602
+ anyOf: {
16603
+ criteria: {
16604
+ key: string;
16605
+ operator: string;
16606
+ value: any;
16607
+ }[];
16608
+ }[];
16609
+ options?: {
16610
+ page?: number;
16611
+ limit?: number;
16612
+ sort?: {
16613
+ key: string;
16614
+ type: "asc" | "desc";
16615
+ }[];
16616
+ totals_summary?: "all" | "page" | "none";
16617
+ };
16618
+ group?: {
16619
+ _id: string;
16620
+ fields: {
16621
+ key: string;
16622
+ accumulator: "sum" | "min" | "max" | "avg" | "first" | "last" | "addToSet" | "push";
16623
+ }[];
16624
+ }[];
16625
+ columns?: ReportColumn.Data[];
16626
+ projection?: {
16627
+ key: string;
16628
+ label: string;
16629
+ }[];
16630
+ };
16631
+ is_public?: boolean;
16632
+ report_view_type: "kanban" | "table" | "agenda";
16633
+ paramsQuery?: {
16634
+ [key: string]: any;
16635
+ };
16636
+ }
16637
+ interface UpdateBody {
16638
+ name?: string;
16639
+ column_view_settings?: ColumnViewSettings[];
16640
+ position?: number;
16641
+ payload?: {
16642
+ maxAnyOfLength?: number;
16643
+ anyOf: {
16644
+ criteria: {
16645
+ key: string;
16646
+ operator: string;
16647
+ value: any;
16648
+ }[];
16649
+ }[];
16650
+ options?: {
16651
+ page?: number;
16652
+ limit?: number;
16653
+ sort?: {
16654
+ key: string;
16655
+ type: "asc" | "desc";
16656
+ }[];
16657
+ totals_summary?: "all" | "page" | "none";
16658
+ };
16659
+ group?: {
16660
+ _id: string;
16661
+ fields: {
16662
+ key: string;
16663
+ accumulator: "sum" | "min" | "max" | "avg" | "first" | "last" | "addToSet" | "push";
16664
+ }[];
16665
+ }[];
16666
+ columns?: ReportColumn.Data[];
16667
+ projection?: {
16668
+ key: string;
16669
+ label: string;
16670
+ }[];
16671
+ };
16672
+ is_public?: boolean;
16673
+ report_view_type?: "kanban" | "table" | "agenda";
16674
+ paramsQuery?: {
16675
+ [key: string]: any;
16676
+ };
16677
+ }
16678
+ namespace Find {
16679
+ type Params = DefaultPaginationQueryParams & {
16680
+ _id?: StringId | StringId[];
16681
+ name?: string | string[];
16682
+ disabled?: boolean;
16683
+ is_public?: boolean;
16684
+ report_view_type?: ("kanban" | "table" | "agenda")[];
16685
+ report_type?: ReportType | ReportType[];
16686
+ mine_views?: boolean;
16687
+ teams?: StringId | StringId[];
16688
+ search?: string;
16689
+ };
16690
+ interface Result extends DefaultPaginationResult {
16691
+ data: Data[];
16692
+ }
16693
+ }
16694
+ namespace Get {
16695
+ type ID = StringId;
16696
+ type Params = {};
16697
+ type Result = Data;
16698
+ }
16699
+ namespace Create {
16700
+ type params = {
16701
+ add_to_favorite?: boolean;
16702
+ set_as_default?: boolean;
16703
+ };
16704
+ type Body = CreateBody;
16705
+ type Result = Data;
16706
+ }
16707
+ namespace Update {
16708
+ type ID = StringId;
16709
+ type Body = UpdateBody;
16710
+ type Result = Data;
16711
+ }
16712
+ namespace Remove {
16713
+ type ID = StringId;
16714
+ type Params = {};
16715
+ type Result = Data;
16716
+ }
16717
+ }
16718
+ namespace ReportViewFavorite {
16719
+ interface Data {
16720
+ _id?: string;
16721
+ user: Admin;
16722
+ report_view: StringId;
16723
+ report_type: ReportType;
16724
+ company_namespace: string[];
16725
+ createdAt?: Date;
16726
+ updatedAt?: Date;
16727
+ }
16728
+ interface CreateBody {
16729
+ user?: Admin;
16730
+ report_view: StringId;
16731
+ report_type?: ReportType;
16732
+ }
16733
+ type populateDoc = Data & {
16734
+ report_view_populated?: ReportView.Data;
16735
+ };
16736
+ namespace Find {
16737
+ type Params = DefaultPaginationQueryParams & {
16738
+ _id?: StringId | StringId[];
16739
+ "user._id"?: StringId | StringId[];
16740
+ report_view?: StringId | StringId[];
16741
+ report_type?: ReportType | ReportType[];
16742
+ populatedKeys?: "report_view"[];
16743
+ };
16744
+ interface Result extends DefaultPaginationResult {
16745
+ data: populateDoc[];
16746
+ }
16747
+ }
16748
+ namespace Get {
16749
+ type ID = StringId;
16750
+ type Params = {
16751
+ populatedKeys?: "report_view"[];
16752
+ };
16753
+ type Result = populateDoc;
16754
+ }
16755
+ namespace Create {
16756
+ type Body = CreateBody;
16757
+ type Result = Data;
16758
+ }
16759
+ namespace Remove {
16760
+ type ID = StringId;
16761
+ type Params = {};
16762
+ type Result = {
16763
+ acknowledged: boolean;
16764
+ deletedCount: number;
16765
+ };
16766
+ }
16767
+ }
16768
+ namespace ReportViewDefault {
16769
+ interface Data {
16770
+ _id?: string;
16771
+ user: Admin;
16772
+ report_view: StringId;
16773
+ report_type: ReportType;
16774
+ company_namespace: string[];
16775
+ createdAt?: Date;
16776
+ updatedAt?: Date;
16777
+ }
16778
+ interface CreateBody {
16779
+ user?: Admin;
16780
+ report_view: StringId;
16781
+ report_type?: ReportType;
16782
+ }
16783
+ type populateDoc = Data & {
16784
+ report_view_populated?: ReportView.Data;
16785
+ };
16786
+ namespace Find {
16787
+ type Params = DefaultPaginationQueryParams & {
16788
+ _id?: StringId | StringId[];
16789
+ "user._id"?: StringId | StringId[];
16790
+ report_view?: StringId | StringId[];
16791
+ report_type?: ReportType | ReportType[];
16792
+ populatedKeys?: "report_view"[];
16793
+ };
16794
+ interface Result extends DefaultPaginationResult {
16795
+ data: populateDoc[];
16796
+ }
16797
+ }
16798
+ namespace Get {
16799
+ type ID = StringId;
16800
+ type Params = {
16801
+ populatedKeys?: "report_view"[];
16802
+ };
16803
+ type Result = populateDoc;
16804
+ }
16805
+ namespace Create {
16806
+ type Body = CreateBody;
16807
+ type Result = Data;
16808
+ }
16809
+ namespace Remove {
16810
+ type ID = StringId;
16811
+ type Params = {};
16812
+ type Result = {
16813
+ acknowledged: boolean;
16814
+ deletedCount: number;
16815
+ };
16816
+ }
16817
+ }
16535
16818
  }
16536
16819
  export type StringId = string;
16537
16820
  export type NameSpaces = string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.196",
3
+ "version": "1.0.198",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -114,6 +114,9 @@ export const end_points = {
114
114
  REPORT_FILTER: "report-filter",
115
115
  SAFE_CRUD: "safe-crud",
116
116
  PAYMENT_METHOD: "payment-method",
117
+ REPORT_VIEW: "report-view",
118
+ REPORT_VIEW_DEFAULT: "report-view-default",
119
+ REPORT_VIEW_FAVORITE: "report-view-favorite",
117
120
  } as const;
118
121
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
119
122
 
@@ -5399,6 +5402,152 @@ export default class Repzo {
5399
5402
  return res;
5400
5403
  },
5401
5404
  };
5405
+
5406
+ reportView = {
5407
+ _path: Repzo._end_points.REPORT_VIEW,
5408
+ find: async (
5409
+ params?: Service.ReportView.Find.Params,
5410
+ ): Promise<Service.ReportView.Find.Result> => {
5411
+ let res: Service.ReportView.Find.Result = await this._fetch(
5412
+ this.svAPIEndpoint,
5413
+ this.reportView._path,
5414
+ params,
5415
+ );
5416
+ return res;
5417
+ },
5418
+ get: async (
5419
+ id: Service.ReportView.Get.ID,
5420
+ params?: Service.ReportView.Get.Params,
5421
+ ): Promise<Service.ReportView.Get.Result> => {
5422
+ return await this._fetch(
5423
+ this.svAPIEndpoint,
5424
+ this.reportView._path + `/${id}`,
5425
+ params,
5426
+ );
5427
+ },
5428
+ create: async (
5429
+ body: Service.ReportView.Create.Body,
5430
+ ): Promise<Service.ReportView.Create.Result> => {
5431
+ let res = await this._create(
5432
+ this.svAPIEndpoint,
5433
+ this.reportView._path,
5434
+ body,
5435
+ );
5436
+ return res;
5437
+ },
5438
+ update: async (
5439
+ id: Service.ReportView.Update.ID,
5440
+ body: Service.ReportView.Update.Body,
5441
+ ): Promise<Service.ReportView.Update.Result> => {
5442
+ let res: Service.ReportView.Update.Result = await this._update(
5443
+ this.svAPIEndpoint,
5444
+ this.reportView._path + `/${id}`,
5445
+ body,
5446
+ );
5447
+ return res;
5448
+ },
5449
+ remove: async (
5450
+ id: Service.ReportView.Remove.ID,
5451
+ params: Service.ReportView.Remove.Params,
5452
+ ): Promise<Service.ReportView.Remove.Result> => {
5453
+ let res: Service.ReportView.Remove.Result = await this._delete(
5454
+ this.svAPIEndpoint,
5455
+ this.reportView._path + `/${id}`,
5456
+ params,
5457
+ );
5458
+ return res;
5459
+ },
5460
+ };
5461
+
5462
+ reportViewFavorite = {
5463
+ _path: Repzo._end_points.REPORT_VIEW_FAVORITE,
5464
+ find: async (
5465
+ params?: Service.ReportViewFavorite.Find.Params,
5466
+ ): Promise<Service.ReportViewFavorite.Find.Result> => {
5467
+ let res: Service.ReportViewFavorite.Find.Result = await this._fetch(
5468
+ this.svAPIEndpoint,
5469
+ this.reportViewFavorite._path,
5470
+ params,
5471
+ );
5472
+ return res;
5473
+ },
5474
+ get: async (
5475
+ id: Service.ReportViewFavorite.Get.ID,
5476
+ params?: Service.ReportViewFavorite.Get.Params,
5477
+ ): Promise<Service.ReportViewFavorite.Get.Result> => {
5478
+ return await this._fetch(
5479
+ this.svAPIEndpoint,
5480
+ this.reportViewFavorite._path + `/${id}`,
5481
+ params,
5482
+ );
5483
+ },
5484
+ create: async (
5485
+ body: Service.ReportViewFavorite.Create.Body,
5486
+ ): Promise<Service.ReportViewFavorite.Create.Result> => {
5487
+ let res = await this._create(
5488
+ this.svAPIEndpoint,
5489
+ this.reportViewFavorite._path,
5490
+ body,
5491
+ );
5492
+ return res;
5493
+ },
5494
+ remove: async (
5495
+ id: Service.ReportViewFavorite.Remove.ID,
5496
+ params: Service.ReportViewFavorite.Remove.Params,
5497
+ ): Promise<Service.ReportViewFavorite.Remove.Result> => {
5498
+ let res: Service.ReportViewFavorite.Remove.Result = await this._delete(
5499
+ this.svAPIEndpoint,
5500
+ this.reportViewFavorite._path + `/${id}`,
5501
+ params,
5502
+ );
5503
+ return res;
5504
+ },
5505
+ };
5506
+
5507
+ reportViewDefault = {
5508
+ _path: Repzo._end_points.REPORT_VIEW_DEFAULT,
5509
+ find: async (
5510
+ params?: Service.ReportViewDefault.Find.Params,
5511
+ ): Promise<Service.ReportViewDefault.Find.Result> => {
5512
+ let res: Service.ReportViewDefault.Find.Result = await this._fetch(
5513
+ this.svAPIEndpoint,
5514
+ this.reportViewDefault._path,
5515
+ params,
5516
+ );
5517
+ return res;
5518
+ },
5519
+ get: async (
5520
+ id: Service.ReportViewDefault.Get.ID,
5521
+ params?: Service.ReportViewDefault.Get.Params,
5522
+ ): Promise<Service.ReportViewDefault.Get.Result> => {
5523
+ return await this._fetch(
5524
+ this.svAPIEndpoint,
5525
+ this.reportViewDefault._path + `/${id}`,
5526
+ params,
5527
+ );
5528
+ },
5529
+ create: async (
5530
+ body: Service.ReportViewDefault.Create.Body,
5531
+ ): Promise<Service.ReportViewDefault.Create.Result> => {
5532
+ let res = await this._create(
5533
+ this.svAPIEndpoint,
5534
+ this.reportViewDefault._path,
5535
+ body,
5536
+ );
5537
+ return res;
5538
+ },
5539
+ remove: async (
5540
+ id: Service.ReportViewDefault.Remove.ID,
5541
+ params: Service.ReportViewDefault.Remove.Params,
5542
+ ): Promise<Service.ReportViewDefault.Remove.Result> => {
5543
+ let res: Service.ReportViewDefault.Remove.Result = await this._delete(
5544
+ this.svAPIEndpoint,
5545
+ this.reportViewDefault._path + `/${id}`,
5546
+ params,
5547
+ );
5548
+ return res;
5549
+ },
5550
+ };
5402
5551
  }
5403
5552
 
5404
5553
  function normalizeParams(params: Params): { [key: string]: any } {
@@ -18526,6 +18526,7 @@ export namespace Service {
18526
18526
  static_data?: StaticData[];
18527
18527
  group_data: GroupData[];
18528
18528
  filter_group: StringId;
18529
+ is_popular?: boolean;
18529
18530
  createdAt?: Date;
18530
18531
  updatedAt?: Date;
18531
18532
  }
@@ -18547,6 +18548,7 @@ export namespace Service {
18547
18548
  endpoint?: string;
18548
18549
  static_data?: StaticData[];
18549
18550
  group_data: GroupData[];
18551
+ is_popular?: boolean;
18550
18552
  }
18551
18553
 
18552
18554
  export interface UpdateBody {
@@ -18566,6 +18568,7 @@ export namespace Service {
18566
18568
  endpoint?: string;
18567
18569
  static_data?: StaticData[];
18568
18570
  group_data: GroupData[];
18571
+ is_popular?: boolean;
18569
18572
  }
18570
18573
 
18571
18574
  export namespace Find {
@@ -18574,6 +18577,7 @@ export namespace Service {
18574
18577
  from_createdAt?: Date;
18575
18578
  to_updatedAt?: Date;
18576
18579
  search?: string;
18580
+ is_popular?: boolean;
18577
18581
  populatedKeys?: ["filter_group"];
18578
18582
  };
18579
18583
 
@@ -18771,6 +18775,297 @@ export namespace Service {
18771
18775
  export type Result = Data;
18772
18776
  }
18773
18777
  }
18778
+
18779
+ export namespace ReportView {
18780
+ export interface ColumnViewSettings {
18781
+ key: string;
18782
+ position: number;
18783
+ width: number;
18784
+ is_pinned: boolean;
18785
+ }
18786
+ export interface Data {
18787
+ _id?: string;
18788
+ name: string;
18789
+ disabled: boolean;
18790
+ creator: Admin;
18791
+ editor: Admin;
18792
+ column_view_settings?: ColumnViewSettings[];
18793
+ position?: number;
18794
+ payload?: {
18795
+ maxAnyOfLength?: number;
18796
+ anyOf: {
18797
+ criteria: {
18798
+ key: string;
18799
+ operator: string;
18800
+ value: any;
18801
+ }[];
18802
+ }[];
18803
+ options?: {
18804
+ page?: number;
18805
+ limit?: number;
18806
+ sort?: { key: string; type: "asc" | "desc" }[];
18807
+ totals_summary?: "all" | "page" | "none";
18808
+ };
18809
+ group?: {
18810
+ _id: string;
18811
+ fields: {
18812
+ key: string;
18813
+ accumulator:
18814
+ | "sum"
18815
+ | "min"
18816
+ | "max"
18817
+ | "avg"
18818
+ | "first"
18819
+ | "last"
18820
+ | "addToSet"
18821
+ | "push";
18822
+ }[];
18823
+ }[];
18824
+ columns?: ReportColumn.Data[];
18825
+ projection?: { key: string; label: string }[];
18826
+ };
18827
+ is_public: boolean;
18828
+ report_view_type: "kanban" | "table" | "agenda";
18829
+ paramsQuery?: { [key: string]: any };
18830
+ report_type: ReportType;
18831
+ company_namespace: string[];
18832
+ teams?: string[];
18833
+ createdAt?: Date;
18834
+ updatedAt?: Date;
18835
+ }
18836
+
18837
+ export interface CreateBody {
18838
+ name: string;
18839
+ column_view_settings?: ColumnViewSettings[];
18840
+ position?: number;
18841
+ payload?: {
18842
+ maxAnyOfLength?: number;
18843
+ anyOf: {
18844
+ criteria: {
18845
+ key: string;
18846
+ operator: string;
18847
+ value: any;
18848
+ }[];
18849
+ }[];
18850
+ options?: {
18851
+ page?: number;
18852
+ limit?: number;
18853
+ sort?: { key: string; type: "asc" | "desc" }[];
18854
+ totals_summary?: "all" | "page" | "none";
18855
+ };
18856
+ group?: {
18857
+ _id: string;
18858
+ fields: {
18859
+ key: string;
18860
+ accumulator:
18861
+ | "sum"
18862
+ | "min"
18863
+ | "max"
18864
+ | "avg"
18865
+ | "first"
18866
+ | "last"
18867
+ | "addToSet"
18868
+ | "push";
18869
+ }[];
18870
+ }[];
18871
+ columns?: ReportColumn.Data[];
18872
+ projection?: { key: string; label: string }[];
18873
+ };
18874
+ is_public?: boolean;
18875
+ report_view_type: "kanban" | "table" | "agenda";
18876
+ paramsQuery?: { [key: string]: any };
18877
+ }
18878
+
18879
+ export interface UpdateBody {
18880
+ name?: string;
18881
+ column_view_settings?: ColumnViewSettings[];
18882
+ position?: number;
18883
+ payload?: {
18884
+ maxAnyOfLength?: number;
18885
+ anyOf: {
18886
+ criteria: {
18887
+ key: string;
18888
+ operator: string;
18889
+ value: any;
18890
+ }[];
18891
+ }[];
18892
+ options?: {
18893
+ page?: number;
18894
+ limit?: number;
18895
+ sort?: { key: string; type: "asc" | "desc" }[];
18896
+ totals_summary?: "all" | "page" | "none";
18897
+ };
18898
+ group?: {
18899
+ _id: string;
18900
+ fields: {
18901
+ key: string;
18902
+ accumulator:
18903
+ | "sum"
18904
+ | "min"
18905
+ | "max"
18906
+ | "avg"
18907
+ | "first"
18908
+ | "last"
18909
+ | "addToSet"
18910
+ | "push";
18911
+ }[];
18912
+ }[];
18913
+ columns?: ReportColumn.Data[];
18914
+ projection?: { key: string; label: string }[];
18915
+ };
18916
+ is_public?: boolean;
18917
+ report_view_type?: "kanban" | "table" | "agenda";
18918
+ paramsQuery?: { [key: string]: any };
18919
+ }
18920
+
18921
+ export namespace Find {
18922
+ export type Params = DefaultPaginationQueryParams & {
18923
+ _id?: StringId | StringId[];
18924
+ name?: string | string[];
18925
+ disabled?: boolean;
18926
+ is_public?: boolean;
18927
+ report_view_type?: ("kanban" | "table" | "agenda")[];
18928
+ report_type?: ReportType | ReportType[];
18929
+ mine_views?: boolean;
18930
+ teams?: StringId | StringId[];
18931
+ search?: string;
18932
+ };
18933
+ export interface Result extends DefaultPaginationResult {
18934
+ data: Data[];
18935
+ }
18936
+ }
18937
+
18938
+ export namespace Get {
18939
+ export type ID = StringId;
18940
+ export type Params = {};
18941
+ export type Result = Data;
18942
+ }
18943
+
18944
+ export namespace Create {
18945
+ export type params = {
18946
+ add_to_favorite?: boolean;
18947
+ set_as_default?: boolean;
18948
+ };
18949
+ export type Body = CreateBody;
18950
+ export type Result = Data;
18951
+ }
18952
+
18953
+ export namespace Update {
18954
+ export type ID = StringId;
18955
+ export type Body = UpdateBody;
18956
+ export type Result = Data;
18957
+ }
18958
+
18959
+ export namespace Remove {
18960
+ export type ID = StringId;
18961
+ export type Params = {};
18962
+ export type Result = Data;
18963
+ }
18964
+ }
18965
+
18966
+ export namespace ReportViewFavorite {
18967
+ export interface Data {
18968
+ _id?: string;
18969
+ user: Admin;
18970
+ report_view: StringId;
18971
+ report_type: ReportType;
18972
+ company_namespace: string[];
18973
+ createdAt?: Date;
18974
+ updatedAt?: Date;
18975
+ }
18976
+
18977
+ export interface CreateBody {
18978
+ user?: Admin;
18979
+ report_view: StringId;
18980
+ report_type?: ReportType;
18981
+ }
18982
+
18983
+ export type populateDoc = Data & {
18984
+ report_view_populated?: ReportView.Data;
18985
+ };
18986
+
18987
+ export namespace Find {
18988
+ export type Params = DefaultPaginationQueryParams & {
18989
+ _id?: StringId | StringId[];
18990
+ "user._id"?: StringId | StringId[];
18991
+ report_view?: StringId | StringId[];
18992
+ report_type?: ReportType | ReportType[];
18993
+ populatedKeys?: "report_view"[];
18994
+ };
18995
+ export interface Result extends DefaultPaginationResult {
18996
+ data: populateDoc[];
18997
+ }
18998
+ }
18999
+ export namespace Get {
19000
+ export type ID = StringId;
19001
+ export type Params = { populatedKeys?: "report_view"[] };
19002
+ export type Result = populateDoc;
19003
+ }
19004
+ export namespace Create {
19005
+ export type Body = CreateBody;
19006
+ export type Result = Data;
19007
+ }
19008
+ export namespace Remove {
19009
+ export type ID = StringId;
19010
+ export type Params = {};
19011
+ export type Result = {
19012
+ acknowledged: boolean;
19013
+ deletedCount: number;
19014
+ };
19015
+ }
19016
+ }
19017
+
19018
+ export namespace ReportViewDefault {
19019
+ export interface Data {
19020
+ _id?: string;
19021
+ user: Admin;
19022
+ report_view: StringId;
19023
+ report_type: ReportType;
19024
+ company_namespace: string[];
19025
+ createdAt?: Date;
19026
+ updatedAt?: Date;
19027
+ }
19028
+
19029
+ export interface CreateBody {
19030
+ user?: Admin;
19031
+ report_view: StringId;
19032
+ report_type?: ReportType;
19033
+ }
19034
+
19035
+ export type populateDoc = Data & {
19036
+ report_view_populated?: ReportView.Data;
19037
+ };
19038
+
19039
+ export namespace Find {
19040
+ export type Params = DefaultPaginationQueryParams & {
19041
+ _id?: StringId | StringId[];
19042
+ "user._id"?: StringId | StringId[];
19043
+ report_view?: StringId | StringId[];
19044
+ report_type?: ReportType | ReportType[];
19045
+ populatedKeys?: "report_view"[];
19046
+ };
19047
+ export interface Result extends DefaultPaginationResult {
19048
+ data: populateDoc[];
19049
+ }
19050
+ }
19051
+ export namespace Get {
19052
+ export type ID = StringId;
19053
+ export type Params = { populatedKeys?: "report_view"[] };
19054
+ export type Result = populateDoc;
19055
+ }
19056
+ export namespace Create {
19057
+ export type Body = CreateBody;
19058
+ export type Result = Data;
19059
+ }
19060
+ export namespace Remove {
19061
+ export type ID = StringId;
19062
+ export type Params = {};
19063
+ export type Result = {
19064
+ acknowledged: boolean;
19065
+ deletedCount: number;
19066
+ };
19067
+ }
19068
+ }
18774
19069
  }
18775
19070
 
18776
19071
  export type StringId = string;