repzo 1.0.193 → 1.0.195

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
@@ -102,10 +102,11 @@ export declare const end_points: {
102
102
  readonly REPORT_SORT: "report-sort";
103
103
  readonly REPORT_FILTER: "report-filter";
104
104
  readonly SAFE_CRUD: "safe-crud";
105
+ readonly PAYMENT_METHOD: "payment-method";
105
106
  };
106
- export type EndPoints = typeof end_points[keyof typeof end_points];
107
+ export type EndPoints = (typeof end_points)[keyof typeof end_points];
107
108
  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"];
108
- export type AvailableService = typeof availableService[number];
109
+ export type AvailableService = (typeof availableService)[number];
109
110
  export default class Repzo {
110
111
  private svAPIEndpoint;
111
112
  headers: Headers;
@@ -215,6 +216,7 @@ export default class Repzo {
215
216
  readonly REPORT_SORT: "report-sort";
216
217
  readonly REPORT_FILTER: "report-filter";
217
218
  readonly SAFE_CRUD: "safe-crud";
219
+ readonly PAYMENT_METHOD: "payment-method";
218
220
  };
219
221
  private _fetch;
220
222
  private _create;
@@ -1022,4 +1024,12 @@ export default class Repzo {
1022
1024
  _path: "safe-crud";
1023
1025
  create: (body: Service.SafeCrud.Create.Body) => Promise<Service.SafeCrud.Create.Result>;
1024
1026
  };
1027
+ paymentMethod: {
1028
+ _path: "payment-method";
1029
+ find: (params?: Service.PaymentMethod.Find.Params) => Promise<Service.PaymentMethod.Find.Result>;
1030
+ get: (id: Service.PaymentMethod.Get.ID, params?: Service.PaymentMethod.Get.Params) => Promise<Service.PaymentMethod.Get.Result>;
1031
+ create: (body: Service.PaymentMethod.Create.Body) => Promise<Service.PaymentMethod.Create.Result>;
1032
+ update: (id: Service.PaymentMethod.Update.ID, body: Service.PaymentMethod.Update.Body) => Promise<Service.PaymentMethod.Update.Result>;
1033
+ remove: (id: Service.PaymentMethod.Update.ID, params: Service.PaymentMethod.Remove.Params) => Promise<Service.PaymentMethod.Remove.Result>;
1034
+ };
1025
1035
  }
package/lib/index.js CHANGED
@@ -103,6 +103,7 @@ export const end_points = {
103
103
  REPORT_SORT: "report-sort",
104
104
  REPORT_FILTER: "report-filter",
105
105
  SAFE_CRUD: "safe-crud",
106
+ PAYMENT_METHOD: "payment-method",
106
107
  };
107
108
  export const availableService = [
108
109
  "client",
@@ -2096,6 +2097,28 @@ class Repzo {
2096
2097
  return res;
2097
2098
  },
2098
2099
  };
2100
+ this.paymentMethod = {
2101
+ _path: Repzo._end_points.PAYMENT_METHOD,
2102
+ find: async (params) => {
2103
+ let res = await this._fetch(this.svAPIEndpoint, this.paymentMethod._path, params);
2104
+ return res;
2105
+ },
2106
+ get: async (id, params) => {
2107
+ return await this._fetch(this.svAPIEndpoint, this.paymentMethod._path + `/${id}`, params);
2108
+ },
2109
+ create: async (body) => {
2110
+ let res = await this._create(this.svAPIEndpoint, this.paymentMethod._path, body);
2111
+ return res;
2112
+ },
2113
+ update: async (id, body) => {
2114
+ let res = await this._update(this.svAPIEndpoint, this.paymentMethod._path + `/${id}`, body);
2115
+ return res;
2116
+ },
2117
+ remove: async (id, params) => {
2118
+ let res = await this._delete(this.svAPIEndpoint, this.paymentMethod._path + `/${id}`, params);
2119
+ return res;
2120
+ },
2121
+ };
2099
2122
  this.svAPIEndpoint =
2100
2123
  !options?.env || options?.env == "production"
2101
2124
  ? "https://sv.api.repzo.me"
@@ -6978,22 +6978,23 @@ export declare namespace Service {
6978
6978
  }
6979
6979
  namespace Payment {
6980
6980
  export interface PaymentSchema {
6981
- _id: string;
6981
+ _id: StringId;
6982
6982
  status: PaymentStatus;
6983
6983
  remainder: number;
6984
6984
  amount: number;
6985
- client_id: string;
6985
+ client_id: StringId;
6986
6986
  client_name: string;
6987
6987
  creator: AdminCreator | RepCreator;
6988
6988
  implemented_by?: AdminCreator | RepCreator;
6989
6989
  transaction_processed: boolean;
6990
6990
  time?: number;
6991
6991
  serial_number: SerialNumber;
6992
- route?: string;
6992
+ route?: StringId;
6993
6993
  paytime: string;
6994
6994
  note?: string;
6995
6995
  currency: string;
6996
6996
  payment_type: PaymentType;
6997
+ payment_method?: StringId;
6997
6998
  check?: Check;
6998
6999
  LinkedTxn?: {
6999
7000
  Txn_serial_number: SerialNumber;
@@ -7009,18 +7010,28 @@ export declare namespace Service {
7009
7010
  [key: string]: any;
7010
7011
  };
7011
7012
  sync_id: string;
7012
- custom_status?: string;
7013
+ custom_status?: StringId;
7013
7014
  visit_id?: string;
7014
- teams?: string[];
7015
+ teams?: StringId[];
7015
7016
  paymentsData: {
7016
7017
  amount: number;
7017
7018
  paid: number;
7018
7019
  balance: number;
7019
7020
  payments: PaymentData[];
7020
7021
  };
7022
+ reference?: string;
7023
+ media?: StringId[];
7024
+ network_state?: number;
7025
+ platform?: string;
7026
+ version_name?: string;
7027
+ battery_level?: number;
7028
+ time_zone?: string;
7029
+ identifier?: number;
7030
+ device_id?: string;
7031
+ device_unique_id?: string;
7032
+ ending_balance?: number;
7021
7033
  createdAt: string;
7022
7034
  updatedAt: string;
7023
- ending_balance?: number;
7024
7035
  __v: number;
7025
7036
  }
7026
7037
  export type Data = PaymentSchema;
@@ -7035,6 +7046,7 @@ export declare namespace Service {
7035
7046
  note?: string;
7036
7047
  currency: string;
7037
7048
  payment_type: PaymentType;
7049
+ payment_method?: StringId;
7038
7050
  transaction_processed: boolean;
7039
7051
  check?: Check;
7040
7052
  LinkedTxn?: {
@@ -7054,6 +7066,8 @@ export declare namespace Service {
7054
7066
  custom_status?: string;
7055
7067
  visit_id?: string;
7056
7068
  teams?: string[];
7069
+ reference?: string;
7070
+ media?: StringId[];
7057
7071
  }
7058
7072
  export interface UpdateBody {
7059
7073
  integration_meta?: {
@@ -7073,11 +7087,13 @@ export declare namespace Service {
7073
7087
  original_amount: number;
7074
7088
  payment: number;
7075
7089
  };
7076
- teams?: string[] | Team.TeamSchema[];
7077
- route?: string | Route.RouteSchema;
7090
+ teams?: StringId[] | Team.TeamSchema[];
7091
+ route?: StringId | Route.RouteSchema;
7092
+ payment_method?: StringId | PaymentMethod.Data;
7093
+ media?: (StringId | PopulatedMediaStorage)[];
7078
7094
  };
7079
7095
  type PaymentType = "check" | "cash";
7080
- type PopulatedKeys = "custom_status" | "teams" | "route";
7096
+ type PopulatedKeys = "custom_status" | "teams" | "route" | "payment_method";
7081
7097
  type PaymentStatus = "consumed" | "unconsumed" | "partially_consumed";
7082
7098
  export namespace Find {
7083
7099
  type Params = DefaultPaginationQueryParams & {
@@ -16077,8 +16093,7 @@ export declare namespace Service {
16077
16093
  disabled?: boolean;
16078
16094
  position?: number;
16079
16095
  report_types?: ReportType | ReportType[];
16080
- from_createdAt?: Date;
16081
- to_updatedAt?: Date;
16096
+ search?: string;
16082
16097
  };
16083
16098
  interface Result extends DefaultPaginationResult {
16084
16099
  data: Data[];
@@ -16150,11 +16165,13 @@ export declare namespace Service {
16150
16165
  disabled?: boolean;
16151
16166
  position?: number;
16152
16167
  report_types?: ReportType | ReportType[];
16153
- from_createdAt?: Date;
16154
- to_updatedAt?: Date;
16168
+ column_group?: StringId | StringId[];
16169
+ populatedKeys?: "column_group"[];
16155
16170
  };
16156
16171
  interface Result extends DefaultPaginationResult {
16157
- data: Data[];
16172
+ data: (Data & {
16173
+ column_group_populated?: ReportColumnGroup.Data;
16174
+ })[];
16158
16175
  }
16159
16176
  }
16160
16177
  namespace Get {
@@ -16278,6 +16295,7 @@ export declare namespace Service {
16278
16295
  endpoint?: string;
16279
16296
  static_data?: StaticData[];
16280
16297
  group_data: GroupData[];
16298
+ filter_group: StringId;
16281
16299
  createdAt?: Date;
16282
16300
  updatedAt?: Date;
16283
16301
  }
@@ -16287,6 +16305,7 @@ export declare namespace Service {
16287
16305
  render_key: string;
16288
16306
  filter_key: string;
16289
16307
  report_types: ReportType[];
16308
+ filter_group: StringId;
16290
16309
  type: DataType;
16291
16310
  input_type: InputType;
16292
16311
  is_multi_select?: boolean;
@@ -16303,6 +16322,7 @@ export declare namespace Service {
16303
16322
  key?: string;
16304
16323
  render_key?: string;
16305
16324
  filter_key?: string;
16325
+ filter_group?: StringId;
16306
16326
  report_types?: ReportType[];
16307
16327
  type?: DataType;
16308
16328
  input_type?: InputType;
@@ -16321,9 +16341,12 @@ export declare namespace Service {
16321
16341
  from_createdAt?: Date;
16322
16342
  to_updatedAt?: Date;
16323
16343
  search?: string;
16344
+ populatedKeys?: ["filter_group"];
16324
16345
  };
16325
16346
  interface Result extends DefaultPaginationResult {
16326
- data: Data[];
16347
+ data: (Data & {
16348
+ filter_group_populated?: ReportFilterGroup.Data;
16349
+ })[];
16327
16350
  }
16328
16351
  }
16329
16352
  namespace Get {
@@ -16368,6 +16391,147 @@ export declare namespace Service {
16368
16391
  }
16369
16392
  export {};
16370
16393
  }
16394
+ namespace PaymentMethod {
16395
+ export type PaymentMethodType = "online" | "offline";
16396
+ export type PaymentMethodAccountType = "cash";
16397
+ export interface Data {
16398
+ _id: StringId;
16399
+ name: string;
16400
+ local_name?: string;
16401
+ type: PaymentMethodType;
16402
+ account_type: PaymentMethodAccountType;
16403
+ fee?: number;
16404
+ rate?: number;
16405
+ disabled: boolean;
16406
+ logo?: StringId;
16407
+ rep_auto_settled?: boolean;
16408
+ creator: Admin;
16409
+ editor?: Admin;
16410
+ company_namespace: string[];
16411
+ createdAt: string;
16412
+ updatedAt: string;
16413
+ }
16414
+ export interface CreateBody {
16415
+ name: string;
16416
+ local_name?: string;
16417
+ type: PaymentMethodType;
16418
+ account_type: PaymentMethodAccountType;
16419
+ fee?: number;
16420
+ rate?: number;
16421
+ disabled?: boolean;
16422
+ logo?: StringId;
16423
+ rep_auto_settled?: boolean;
16424
+ creator?: Admin;
16425
+ company_namespace?: string[];
16426
+ }
16427
+ export interface UpdateBody {
16428
+ _id?: StringId;
16429
+ name?: string;
16430
+ local_name?: string;
16431
+ type?: PaymentMethodType;
16432
+ account_type?: PaymentMethodAccountType;
16433
+ fee?: number;
16434
+ rate?: number;
16435
+ disabled?: boolean;
16436
+ logo?: StringId;
16437
+ rep_auto_settled?: boolean;
16438
+ creator?: Admin;
16439
+ editor?: Admin;
16440
+ company_namespace?: string[];
16441
+ createdAt?: string;
16442
+ updatedAt?: string;
16443
+ }
16444
+ export type PopulatedDoc = Data & {
16445
+ logo_populated?: PopulatedMediaStorage;
16446
+ };
16447
+ type PopulatedKeys = "logo";
16448
+ export namespace Find {
16449
+ type Params = DefaultPaginationQueryParams & {
16450
+ _id?: StringId | StringId[];
16451
+ search?: string;
16452
+ name?: string | string[];
16453
+ disabled?: boolean;
16454
+ };
16455
+ interface Result extends DefaultPaginationResult {
16456
+ data: PopulatedDoc[];
16457
+ }
16458
+ }
16459
+ export namespace Get {
16460
+ type ID = string;
16461
+ type Params = {
16462
+ populatedKeys?: PopulatedKeys[];
16463
+ };
16464
+ type Result = PopulatedDoc;
16465
+ }
16466
+ export namespace Create {
16467
+ type Body = CreateBody;
16468
+ type Result = Data;
16469
+ }
16470
+ export namespace Update {
16471
+ type ID = StringId;
16472
+ type Body = UpdateBody;
16473
+ type Result = Data;
16474
+ }
16475
+ export namespace Remove {
16476
+ type ID = string;
16477
+ type Params = {};
16478
+ type Result = Data;
16479
+ }
16480
+ export {};
16481
+ }
16482
+ namespace ReportFilterGroup {
16483
+ interface Data {
16484
+ _id: StringId;
16485
+ name: string;
16486
+ position: number;
16487
+ disabled: boolean;
16488
+ report_types: ReportType[];
16489
+ createdAt: string;
16490
+ updatedAt?: string;
16491
+ }
16492
+ interface CreateBody {
16493
+ name: string;
16494
+ position?: number;
16495
+ report_types: ReportType[];
16496
+ }
16497
+ interface UpdateBody {
16498
+ name?: string;
16499
+ position?: number;
16500
+ report_types?: ReportType[];
16501
+ }
16502
+ namespace Find {
16503
+ type Params = DefaultPaginationQueryParams & {
16504
+ _id?: StringId | StringId[];
16505
+ name?: string | string[];
16506
+ disabled?: boolean;
16507
+ position?: number;
16508
+ search?: string;
16509
+ report_types?: ReportType | ReportType[];
16510
+ };
16511
+ interface Result extends DefaultPaginationResult {
16512
+ data: Data[];
16513
+ }
16514
+ }
16515
+ namespace Get {
16516
+ type ID = StringId;
16517
+ type Params = {};
16518
+ type Result = Data;
16519
+ }
16520
+ namespace Create {
16521
+ type Body = CreateBody;
16522
+ type Result = Data;
16523
+ }
16524
+ namespace Update {
16525
+ type ID = StringId;
16526
+ type Body = UpdateBody;
16527
+ type Result = Data;
16528
+ }
16529
+ namespace Remove {
16530
+ type ID = StringId;
16531
+ type Params = {};
16532
+ type Result = Data;
16533
+ }
16534
+ }
16371
16535
  }
16372
16536
  export type StringId = string;
16373
16537
  export type NameSpaces = string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.193",
3
+ "version": "1.0.195",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -113,6 +113,7 @@ export const end_points = {
113
113
  REPORT_SORT: "report-sort",
114
114
  REPORT_FILTER: "report-filter",
115
115
  SAFE_CRUD: "safe-crud",
116
+ PAYMENT_METHOD: "payment-method",
116
117
  } as const;
117
118
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
118
119
 
@@ -5342,6 +5343,62 @@ export default class Repzo {
5342
5343
  return res;
5343
5344
  },
5344
5345
  };
5346
+
5347
+ paymentMethod = {
5348
+ _path: Repzo._end_points.PAYMENT_METHOD,
5349
+ find: async (
5350
+ params?: Service.PaymentMethod.Find.Params,
5351
+ ): Promise<Service.PaymentMethod.Find.Result> => {
5352
+ let res: Service.PaymentMethod.Find.Result = await this._fetch(
5353
+ this.svAPIEndpoint,
5354
+ this.paymentMethod._path,
5355
+ params,
5356
+ );
5357
+ return res;
5358
+ },
5359
+ get: async (
5360
+ id: Service.PaymentMethod.Get.ID,
5361
+ params?: Service.PaymentMethod.Get.Params,
5362
+ ): Promise<Service.PaymentMethod.Get.Result> => {
5363
+ return await this._fetch(
5364
+ this.svAPIEndpoint,
5365
+ this.paymentMethod._path + `/${id}`,
5366
+ params,
5367
+ );
5368
+ },
5369
+ create: async (
5370
+ body: Service.PaymentMethod.Create.Body,
5371
+ ): Promise<Service.PaymentMethod.Create.Result> => {
5372
+ let res = await this._create(
5373
+ this.svAPIEndpoint,
5374
+ this.paymentMethod._path,
5375
+ body,
5376
+ );
5377
+ return res;
5378
+ },
5379
+ update: async (
5380
+ id: Service.PaymentMethod.Update.ID,
5381
+ body: Service.PaymentMethod.Update.Body,
5382
+ ): Promise<Service.PaymentMethod.Update.Result> => {
5383
+ let res: Service.PaymentMethod.Update.Result = await this._update(
5384
+ this.svAPIEndpoint,
5385
+ this.paymentMethod._path + `/${id}`,
5386
+ body,
5387
+ );
5388
+ return res;
5389
+ },
5390
+ remove: async (
5391
+ id: Service.PaymentMethod.Update.ID,
5392
+ params: Service.PaymentMethod.Remove.Params,
5393
+ ): Promise<Service.PaymentMethod.Remove.Result> => {
5394
+ let res: Service.PaymentMethod.Remove.Result = await this._delete(
5395
+ this.svAPIEndpoint,
5396
+ this.paymentMethod._path + `/${id}`,
5397
+ params,
5398
+ );
5399
+ return res;
5400
+ },
5401
+ };
5345
5402
  }
5346
5403
 
5347
5404
  function normalizeParams(params: Params): { [key: string]: any } {
@@ -7502,22 +7502,23 @@ export namespace Service {
7502
7502
 
7503
7503
  export namespace Payment {
7504
7504
  export interface PaymentSchema {
7505
- _id: string;
7505
+ _id: StringId;
7506
7506
  status: PaymentStatus;
7507
7507
  remainder: number;
7508
7508
  amount: number;
7509
- client_id: string;
7509
+ client_id: StringId;
7510
7510
  client_name: string;
7511
7511
  creator: AdminCreator | RepCreator;
7512
7512
  implemented_by?: AdminCreator | RepCreator;
7513
7513
  transaction_processed: boolean;
7514
7514
  time?: number;
7515
7515
  serial_number: SerialNumber;
7516
- route?: string;
7516
+ route?: StringId;
7517
7517
  paytime: string;
7518
7518
  note?: string;
7519
7519
  currency: string;
7520
7520
  payment_type: PaymentType;
7521
+ payment_method?: StringId;
7521
7522
  check?: Check;
7522
7523
  LinkedTxn?: {
7523
7524
  Txn_serial_number: SerialNumber;
@@ -7531,18 +7532,28 @@ export namespace Service {
7531
7532
  company_namespace: string[];
7532
7533
  integration_meta?: { [key: string]: any };
7533
7534
  sync_id: string;
7534
- custom_status?: string;
7535
+ custom_status?: StringId;
7535
7536
  visit_id?: string;
7536
- teams?: string[];
7537
+ teams?: StringId[];
7537
7538
  paymentsData: {
7538
7539
  amount: number;
7539
7540
  paid: number;
7540
7541
  balance: number;
7541
7542
  payments: PaymentData[];
7542
7543
  };
7544
+ reference?: string;
7545
+ media?: StringId[];
7546
+ network_state?: number;
7547
+ platform?: string;
7548
+ version_name?: string;
7549
+ battery_level?: number;
7550
+ time_zone?: string;
7551
+ identifier?: number;
7552
+ device_id?: string;
7553
+ device_unique_id?: string;
7554
+ ending_balance?: number;
7543
7555
  createdAt: string;
7544
7556
  updatedAt: string;
7545
- ending_balance?: number;
7546
7557
  __v: number;
7547
7558
  }
7548
7559
  export type Data = PaymentSchema;
@@ -7557,6 +7568,7 @@ export namespace Service {
7557
7568
  note?: string;
7558
7569
  currency: string;
7559
7570
  payment_type: PaymentType;
7571
+ payment_method?: StringId;
7560
7572
  transaction_processed: boolean;
7561
7573
  check?: Check;
7562
7574
  LinkedTxn?: {
@@ -7574,6 +7586,8 @@ export namespace Service {
7574
7586
  custom_status?: string;
7575
7587
  visit_id?: string;
7576
7588
  teams?: string[];
7589
+ reference?: string;
7590
+ media?: StringId[];
7577
7591
  }
7578
7592
  export interface UpdateBody {
7579
7593
  integration_meta?: { [key: string]: any };
@@ -7590,11 +7604,13 @@ export namespace Service {
7590
7604
  original_amount: number;
7591
7605
  payment: number;
7592
7606
  };
7593
- teams?: string[] | Team.TeamSchema[];
7594
- route?: string | Route.RouteSchema;
7607
+ teams?: StringId[] | Team.TeamSchema[];
7608
+ route?: StringId | Route.RouteSchema;
7609
+ payment_method?: StringId | PaymentMethod.Data;
7610
+ media?: (StringId | PopulatedMediaStorage)[];
7595
7611
  };
7596
7612
  type PaymentType = "check" | "cash";
7597
- type PopulatedKeys = "custom_status" | "teams" | "route";
7613
+ type PopulatedKeys = "custom_status" | "teams" | "route" | "payment_method";
7598
7614
  type PaymentStatus = "consumed" | "unconsumed" | "partially_consumed";
7599
7615
  export namespace Find {
7600
7616
  export type Params = DefaultPaginationQueryParams & {
@@ -7614,10 +7630,7 @@ export namespace Service {
7614
7630
  populatedKeys?: PopulatedKeys[];
7615
7631
  from__id?: string;
7616
7632
  to__id?: string;
7617
- sortBy?: {
7618
- field: "_id";
7619
- type: "asc" | "desc";
7620
- }[];
7633
+ sortBy?: { field: "_id"; type: "asc" | "desc" }[];
7621
7634
  };
7622
7635
  export interface Result extends DefaultPaginationResult {
7623
7636
  data: PaymentSchemaWithPopulatedKeys[];
@@ -18233,8 +18246,7 @@ export namespace Service {
18233
18246
  disabled?: boolean;
18234
18247
  position?: number;
18235
18248
  report_types?: ReportType | ReportType[];
18236
- from_createdAt?: Date;
18237
- to_updatedAt?: Date;
18249
+ search?: string;
18238
18250
  };
18239
18251
 
18240
18252
  export interface Result extends DefaultPaginationResult {
@@ -18315,12 +18327,12 @@ export namespace Service {
18315
18327
  disabled?: boolean;
18316
18328
  position?: number;
18317
18329
  report_types?: ReportType | ReportType[];
18318
- from_createdAt?: Date;
18319
- to_updatedAt?: Date;
18330
+ column_group?: StringId | StringId[];
18331
+ populatedKeys?: "column_group"[];
18320
18332
  };
18321
18333
 
18322
18334
  export interface Result extends DefaultPaginationResult {
18323
- data: Data[];
18335
+ data: (Data & { column_group_populated?: ReportColumnGroup.Data })[];
18324
18336
  }
18325
18337
  }
18326
18338
 
@@ -18513,6 +18525,7 @@ export namespace Service {
18513
18525
  endpoint?: string;
18514
18526
  static_data?: StaticData[];
18515
18527
  group_data: GroupData[];
18528
+ filter_group: StringId;
18516
18529
  createdAt?: Date;
18517
18530
  updatedAt?: Date;
18518
18531
  }
@@ -18523,6 +18536,7 @@ export namespace Service {
18523
18536
  render_key: string;
18524
18537
  filter_key: string;
18525
18538
  report_types: ReportType[];
18539
+ filter_group: StringId;
18526
18540
  type: DataType;
18527
18541
  input_type: InputType;
18528
18542
  is_multi_select?: boolean;
@@ -18540,6 +18554,7 @@ export namespace Service {
18540
18554
  key?: string;
18541
18555
  render_key?: string;
18542
18556
  filter_key?: string;
18557
+ filter_group?: StringId;
18543
18558
  report_types?: ReportType[];
18544
18559
  type?: DataType;
18545
18560
  input_type?: InputType;
@@ -18559,10 +18574,11 @@ export namespace Service {
18559
18574
  from_createdAt?: Date;
18560
18575
  to_updatedAt?: Date;
18561
18576
  search?: string;
18577
+ populatedKeys?: ["filter_group"];
18562
18578
  };
18563
18579
 
18564
18580
  export interface Result extends DefaultPaginationResult {
18565
- data: Data[];
18581
+ data: (Data & { filter_group_populated?: ReportFilterGroup.Data })[];
18566
18582
  }
18567
18583
  }
18568
18584
 
@@ -18606,6 +18622,155 @@ export namespace Service {
18606
18622
  }
18607
18623
  }
18608
18624
  }
18625
+
18626
+ export namespace PaymentMethod {
18627
+ export type PaymentMethodType = "online" | "offline";
18628
+ export type PaymentMethodAccountType = "cash";
18629
+ export interface Data {
18630
+ _id: StringId;
18631
+ name: string;
18632
+ local_name?: string;
18633
+ type: PaymentMethodType;
18634
+ account_type: PaymentMethodAccountType;
18635
+ fee?: number;
18636
+ rate?: number;
18637
+ disabled: boolean;
18638
+ logo?: StringId;
18639
+ rep_auto_settled?: boolean;
18640
+ creator: Admin;
18641
+ editor?: Admin;
18642
+ company_namespace: string[];
18643
+ createdAt: string;
18644
+ updatedAt: string;
18645
+ }
18646
+ export interface CreateBody {
18647
+ name: string;
18648
+ local_name?: string;
18649
+ type: PaymentMethodType;
18650
+ account_type: PaymentMethodAccountType;
18651
+ fee?: number;
18652
+ rate?: number;
18653
+ disabled?: boolean;
18654
+ logo?: StringId;
18655
+ rep_auto_settled?: boolean;
18656
+ creator?: Admin;
18657
+ company_namespace?: string[];
18658
+ }
18659
+ export interface UpdateBody {
18660
+ _id?: StringId;
18661
+ name?: string;
18662
+ local_name?: string;
18663
+ type?: PaymentMethodType;
18664
+ account_type?: PaymentMethodAccountType;
18665
+ fee?: number;
18666
+ rate?: number;
18667
+ disabled?: boolean;
18668
+ logo?: StringId;
18669
+ rep_auto_settled?: boolean;
18670
+ creator?: Admin;
18671
+ editor?: Admin;
18672
+ company_namespace?: string[];
18673
+ createdAt?: string;
18674
+ updatedAt?: string;
18675
+ }
18676
+ export type PopulatedDoc = Data & {
18677
+ logo_populated?: PopulatedMediaStorage;
18678
+ };
18679
+
18680
+ type PopulatedKeys = "logo";
18681
+
18682
+ export namespace Find {
18683
+ export type Params = DefaultPaginationQueryParams & {
18684
+ _id?: StringId | StringId[];
18685
+ search?: string;
18686
+ name?: string | string[];
18687
+ disabled?: boolean;
18688
+ };
18689
+ export interface Result extends DefaultPaginationResult {
18690
+ data: PopulatedDoc[];
18691
+ }
18692
+ }
18693
+ export namespace Get {
18694
+ export type ID = string;
18695
+ export type Params = { populatedKeys?: PopulatedKeys[] };
18696
+ export type Result = PopulatedDoc;
18697
+ }
18698
+ export namespace Create {
18699
+ export type Body = CreateBody;
18700
+ export type Result = Data;
18701
+ }
18702
+ export namespace Update {
18703
+ export type ID = StringId;
18704
+ export type Body = UpdateBody;
18705
+ export type Result = Data;
18706
+ }
18707
+ export namespace Remove {
18708
+ export type ID = string;
18709
+ export type Params = {};
18710
+ export type Result = Data;
18711
+ }
18712
+ }
18713
+
18714
+ export namespace ReportFilterGroup {
18715
+ export interface Data {
18716
+ _id: StringId;
18717
+ name: string;
18718
+ position: number;
18719
+ disabled: boolean;
18720
+ report_types: ReportType[];
18721
+ createdAt: string;
18722
+ updatedAt?: string;
18723
+ }
18724
+
18725
+ export interface CreateBody {
18726
+ name: string;
18727
+ position?: number;
18728
+ report_types: ReportType[];
18729
+ }
18730
+
18731
+ export interface UpdateBody {
18732
+ name?: string;
18733
+ position?: number;
18734
+ report_types?: ReportType[];
18735
+ }
18736
+
18737
+ export namespace Find {
18738
+ export type Params = DefaultPaginationQueryParams & {
18739
+ _id?: StringId | StringId[];
18740
+ name?: string | string[];
18741
+ disabled?: boolean;
18742
+ position?: number;
18743
+ search?: string;
18744
+ report_types?: ReportType | ReportType[];
18745
+ };
18746
+ export interface Result extends DefaultPaginationResult {
18747
+ data: Data[];
18748
+ }
18749
+ }
18750
+
18751
+ export namespace Get {
18752
+ export type ID = StringId;
18753
+ export type Params = {};
18754
+ export type Result = Data;
18755
+ }
18756
+
18757
+ export namespace Create {
18758
+ export type Body = CreateBody;
18759
+ export type Result = Data;
18760
+ }
18761
+
18762
+ export namespace Update {
18763
+ export type ID = StringId;
18764
+ export type Body = UpdateBody;
18765
+ export type Result = Data;
18766
+ }
18767
+
18768
+ export namespace Remove {
18769
+ export type ID = StringId;
18770
+ export type Params = {};
18771
+ export type Result = Data;
18772
+ }
18773
+ }
18609
18774
  }
18610
18775
 
18611
18776
  export type StringId = string;