repzo 1.0.137 → 1.0.139

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.
File without changes
package/lib/index.d.ts CHANGED
@@ -95,6 +95,7 @@ export declare const end_points: {
95
95
  readonly WORKORDER_CATEGORY: "workorder-category";
96
96
  readonly CONTRACT: "contract";
97
97
  readonly CONTRACT_INSTALLMENT: "contract-installment";
98
+ readonly WORKORDER_PORTAL_LINK: "workorder-portal-link";
98
99
  };
99
100
  export type EndPoints = typeof end_points[keyof typeof end_points];
100
101
  export default class Repzo {
@@ -191,6 +192,7 @@ export default class Repzo {
191
192
  readonly WORKORDER_CATEGORY: "workorder-category";
192
193
  readonly CONTRACT: "contract";
193
194
  readonly CONTRACT_INSTALLMENT: "contract-installment";
195
+ readonly WORKORDER_PORTAL_LINK: "workorder-portal-link";
194
196
  };
195
197
  private _fetch;
196
198
  private _create;
@@ -1710,4 +1712,28 @@ export default class Repzo {
1710
1712
  params: Service.RepBalanceSummary.Find.Params
1711
1713
  ) => Promise<Service.RepBalanceSummary.Find.Result>;
1712
1714
  };
1715
+ workorderPortalLink: {
1716
+ _path: "workorder-portal-link";
1717
+ find: (
1718
+ params?: Service.WorkorderPortalLink.Find.Params
1719
+ ) => Promise<Service.WorkorderPortalLink.Find.Result>;
1720
+ get: (
1721
+ id: Service.WorkorderPortalLink.Get.ID,
1722
+ params?: Service.WorkorderPortalLink.Get.Params
1723
+ ) => Promise<Service.WorkorderPortalLink.Get.Result>;
1724
+ create: (
1725
+ body: Service.WorkorderPortalLink.Create.Body
1726
+ ) => Promise<Service.WorkorderPortalLink.Create.Result>;
1727
+ update: (
1728
+ id: Service.WorkorderPortalLink.Update.ID,
1729
+ body: Service.WorkorderPortalLink.Update.Body
1730
+ ) => Promise<Service.WorkorderPortalLink.Update.Result>;
1731
+ patch: (
1732
+ id: Service.WorkorderPortalLink.Patch.ID,
1733
+ body: Service.WorkorderPortalLink.Patch.Body
1734
+ ) => Promise<Service.WorkorderPortalLink.Patch.Result>;
1735
+ remove: (
1736
+ id: Service.WorkorderPortalLink.Remove.ID
1737
+ ) => Promise<Service.WorkorderPortalLink.Remove.Result>;
1738
+ };
1713
1739
  }
package/lib/index.js CHANGED
@@ -88,6 +88,7 @@ export const end_points = {
88
88
  WORKORDER_CATEGORY: "workorder-category",
89
89
  CONTRACT: "contract",
90
90
  CONTRACT_INSTALLMENT: "contract-installment",
91
+ WORKORDER_PORTAL_LINK: "workorder-portal-link",
91
92
  };
92
93
  export default class Repzo {
93
94
  constructor(apiKey, options) {
@@ -3018,6 +3019,55 @@ export default class Repzo {
3018
3019
  return res;
3019
3020
  },
3020
3021
  };
3022
+ this.workorderPortalLink = {
3023
+ _path: Repzo._end_points.WORKORDER_PORTAL_LINK,
3024
+ find: async (params) => {
3025
+ let res = await this._fetch(
3026
+ this.svAPIEndpoint,
3027
+ this.workorderPortalLink._path,
3028
+ params
3029
+ );
3030
+ return res;
3031
+ },
3032
+ get: async (id, params) => {
3033
+ return await this._fetch(
3034
+ this.svAPIEndpoint,
3035
+ this.workorderPortalLink._path + `/${id}`,
3036
+ params
3037
+ );
3038
+ },
3039
+ create: async (body) => {
3040
+ let res = await this._create(
3041
+ this.svAPIEndpoint,
3042
+ this.workorderPortalLink._path,
3043
+ body
3044
+ );
3045
+ return res;
3046
+ },
3047
+ update: async (id, body) => {
3048
+ let res = await this._update(
3049
+ this.svAPIEndpoint,
3050
+ this.workorderPortalLink._path + `/${id}`,
3051
+ body
3052
+ );
3053
+ return res;
3054
+ },
3055
+ patch: async (id, body) => {
3056
+ let res = await this._patch(
3057
+ this.svAPIEndpoint,
3058
+ this.workorderPortalLink._path + `/${id}`,
3059
+ body
3060
+ );
3061
+ return res;
3062
+ },
3063
+ remove: async (id) => {
3064
+ let res = await this._delete(
3065
+ this.svAPIEndpoint,
3066
+ this.workorderPortalLink._path + `/${id}`
3067
+ );
3068
+ return res;
3069
+ },
3070
+ };
3021
3071
  this.svAPIEndpoint =
3022
3072
  !options?.env || options?.env == "production"
3023
3073
  ? "https://sv.api.repzo.me"
@@ -13691,7 +13691,10 @@ export declare namespace Service {
13691
13691
  name: string;
13692
13692
  client:
13693
13693
  | StringId
13694
- | (Pick<Client.ClientSchema, "name" | "client_code" | "contacts"> & {
13694
+ | (Pick<
13695
+ Client.ClientSchema,
13696
+ "name" | "client_code" | "contacts" | "_id"
13697
+ > & {
13695
13698
  contacts:
13696
13699
  | StringId[]
13697
13700
  | Pick<ClientContact.ClientContactSchema, "name">[];
@@ -13760,6 +13763,145 @@ export declare namespace Service {
13760
13763
  }
13761
13764
  export {};
13762
13765
  }
13766
+ namespace WorkorderPortalLink {
13767
+ export interface Data {
13768
+ _id: StringId;
13769
+ name?: string;
13770
+ group_code?: string;
13771
+ description?: string;
13772
+ workorder_portal?: StringId;
13773
+ assets?: StringId[];
13774
+ asset_units?: StringId[];
13775
+ client?: StringId;
13776
+ client_location?: StringId;
13777
+ creator: AdminOrRep;
13778
+ editor?: AdminOrRep;
13779
+ teams?: StringId[];
13780
+ disabled: boolean;
13781
+ company_namespace: string[];
13782
+ createdAt: string;
13783
+ updatedAt: string;
13784
+ }
13785
+ export interface CreateBody {
13786
+ name?: string;
13787
+ group_code?: string;
13788
+ description?: string;
13789
+ workorder_portal?: StringId;
13790
+ assets?: StringId[];
13791
+ asset_units?: StringId[];
13792
+ client?: StringId;
13793
+ client_location?: StringId;
13794
+ creator: AdminOrRep;
13795
+ teams?: StringId[];
13796
+ disabled?: boolean;
13797
+ }
13798
+ export interface PatchBody {
13799
+ count: number;
13800
+ name?: string;
13801
+ group_code?: string;
13802
+ company_namespace: string[];
13803
+ }
13804
+ export interface UpdateBody {
13805
+ name?: string;
13806
+ group_code?: string;
13807
+ description?: string;
13808
+ workorder_portal?: StringId;
13809
+ assets?: StringId[];
13810
+ asset_units?: StringId[];
13811
+ client?: StringId;
13812
+ client_location?: StringId;
13813
+ editor?: AdminOrRep;
13814
+ teams?: StringId[];
13815
+ disabled?: boolean;
13816
+ }
13817
+ export interface PopulatedDoc {
13818
+ _id: StringId;
13819
+ name?: string;
13820
+ group_code?: string;
13821
+ description?: string;
13822
+ workorder_portal?: StringId;
13823
+ workorder_portal_populated?: WorkorderPortal.PopulatedDoc;
13824
+ assets?: StringId[];
13825
+ assets_populated?: Asset.Data[];
13826
+ asset_units?: StringId[];
13827
+ asset_units_populated?: AssetUnit.Data[];
13828
+ client?: StringId;
13829
+ client_populated?: Client.ClientSchema;
13830
+ client_location?: ClientLocation.Data;
13831
+ client_location_populated?: ClientLocation.Data;
13832
+ creator: AdminOrRep;
13833
+ editor?: AdminOrRep;
13834
+ teams?: Team.TeamSchema[];
13835
+ teams_populated?: Team.TeamSchema[];
13836
+ disabled: boolean;
13837
+ company_namespace: string[];
13838
+ createdAt: string;
13839
+ updatedAt: string;
13840
+ }
13841
+ type PopulatedKeys =
13842
+ | "workorder_portal"
13843
+ | "assets"
13844
+ | "asset_units"
13845
+ | "client"
13846
+ | "client_location"
13847
+ | "teams";
13848
+ export namespace Find {
13849
+ type Params = DefaultPaginationQueryParams & {
13850
+ _id?: StringId | StringId[];
13851
+ name?: string | string[];
13852
+ group_code?: string | string[];
13853
+ workorder_portal?: StringId | StringId[];
13854
+ assets?: StringId | StringId[];
13855
+ asset_units?: StringId | StringId[];
13856
+ client?: StringId | StringId[];
13857
+ client_location?: StringId | StringId[];
13858
+ teams?: StringId | StringId[];
13859
+ disabled?: boolean;
13860
+ from_updatedAt?: number;
13861
+ to_updatedAt?: number;
13862
+ from_createdAt?: number;
13863
+ to_createdAt?: number;
13864
+ search?: string;
13865
+ from__id?: StringId;
13866
+ to__id?: StringId;
13867
+ sortBy?: {
13868
+ field: "link_id" | "createdAt" | "updatedAt" | "_id";
13869
+ type: "asc" | "desc";
13870
+ }[];
13871
+ populatedKeys?: PopulatedKeys[];
13872
+ };
13873
+ interface Result extends DefaultPaginationResult {
13874
+ data: Data[] & PopulatedDoc[];
13875
+ }
13876
+ }
13877
+ export namespace Get {
13878
+ type ID = string;
13879
+ type Params = {
13880
+ populatedKeys?: PopulatedKeys[];
13881
+ };
13882
+ type Result = Data & PopulatedDoc;
13883
+ }
13884
+ export namespace Create {
13885
+ type Body = CreateBody;
13886
+ type Result = Data;
13887
+ }
13888
+ export namespace Update {
13889
+ type ID = StringId;
13890
+ type Body = UpdateBody;
13891
+ type Result = Data;
13892
+ }
13893
+ export namespace Patch {
13894
+ type ID = StringId;
13895
+ type Body = PatchBody;
13896
+ type Result = Data[];
13897
+ }
13898
+ export namespace Remove {
13899
+ type ID = string;
13900
+ type Params = {};
13901
+ type Result = Data;
13902
+ }
13903
+ export {};
13904
+ }
13763
13905
  namespace AssetType {
13764
13906
  interface Data {
13765
13907
  _id: StringId;
@@ -13836,8 +13978,8 @@ export declare namespace Service {
13836
13978
  namespace Asset {
13837
13979
  export interface Data {
13838
13980
  _id: StringId;
13839
- creator: AdminCreator;
13840
- editor?: AdminCreator;
13981
+ creator: AdminOrRep;
13982
+ editor?: AdminOrRep;
13841
13983
  name: string;
13842
13984
  local_name?: string;
13843
13985
  description?: string;
@@ -13861,7 +14003,7 @@ export declare namespace Service {
13861
14003
  updatedAt: string;
13862
14004
  }
13863
14005
  export interface CreateBody {
13864
- creator?: AdminCreator;
14006
+ creator?: AdminOrRep;
13865
14007
  name: string;
13866
14008
  local_name?: string;
13867
14009
  description?: string;
@@ -13880,7 +14022,7 @@ export declare namespace Service {
13880
14022
  };
13881
14023
  }
13882
14024
  export interface UpdateBody {
13883
- editor?: AdminCreator;
14025
+ editor?: AdminOrRep;
13884
14026
  name?: string;
13885
14027
  local_name?: string;
13886
14028
  description?: string;
@@ -13900,8 +14042,8 @@ export declare namespace Service {
13900
14042
  }
13901
14043
  export interface PopulatedDoc {
13902
14044
  _id: StringId;
13903
- creator: AdminCreator;
13904
- editor?: AdminCreator;
14045
+ creator: AdminOrRep;
14046
+ editor?: AdminOrRep;
13905
14047
  name: string;
13906
14048
  local_name?: string;
13907
14049
  description?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.137",
3
+ "version": "1.0.139",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -98,6 +98,7 @@ export const end_points = {
98
98
  WORKORDER_CATEGORY: "workorder-category",
99
99
  CONTRACT: "contract",
100
100
  CONTRACT_INSTALLMENT: "contract-installment",
101
+ WORKORDER_PORTAL_LINK: "workorder-portal-link",
101
102
  } as const;
102
103
  export type EndPoints = typeof end_points[keyof typeof end_points];
103
104
 
@@ -4529,6 +4530,75 @@ export default class Repzo {
4529
4530
  return res;
4530
4531
  },
4531
4532
  };
4533
+
4534
+ workorderPortalLink = {
4535
+ _path: Repzo._end_points.WORKORDER_PORTAL_LINK,
4536
+ find: async (
4537
+ params?: Service.WorkorderPortalLink.Find.Params
4538
+ ): Promise<Service.WorkorderPortalLink.Find.Result> => {
4539
+ let res: Service.WorkorderPortalLink.Find.Result = await this._fetch(
4540
+ this.svAPIEndpoint,
4541
+ this.workorderPortalLink._path,
4542
+ params
4543
+ );
4544
+ return res;
4545
+ },
4546
+ get: async (
4547
+ id: Service.WorkorderPortalLink.Get.ID,
4548
+ params?: Service.WorkorderPortalLink.Get.Params
4549
+ ): Promise<Service.WorkorderPortalLink.Get.Result> => {
4550
+ return await this._fetch(
4551
+ this.svAPIEndpoint,
4552
+ this.workorderPortalLink._path + `/${id}`,
4553
+ params
4554
+ );
4555
+ },
4556
+
4557
+ create: async (
4558
+ body: Service.WorkorderPortalLink.Create.Body
4559
+ ): Promise<Service.WorkorderPortalLink.Create.Result> => {
4560
+ let res = await this._create(
4561
+ this.svAPIEndpoint,
4562
+ this.workorderPortalLink._path,
4563
+ body
4564
+ );
4565
+ return res;
4566
+ },
4567
+
4568
+ update: async (
4569
+ id: Service.WorkorderPortalLink.Update.ID,
4570
+ body: Service.WorkorderPortalLink.Update.Body
4571
+ ): Promise<Service.WorkorderPortalLink.Update.Result> => {
4572
+ let res: Service.WorkorderPortalLink.Update.Result = await this._update(
4573
+ this.svAPIEndpoint,
4574
+ this.workorderPortalLink._path + `/${id}`,
4575
+ body
4576
+ );
4577
+ return res;
4578
+ },
4579
+
4580
+ patch: async (
4581
+ id: Service.WorkorderPortalLink.Patch.ID,
4582
+ body: Service.WorkorderPortalLink.Patch.Body
4583
+ ): Promise<Service.WorkorderPortalLink.Patch.Result> => {
4584
+ let res: Service.WorkorderPortalLink.Patch.Result = await this._patch(
4585
+ this.svAPIEndpoint,
4586
+ this.workorderPortalLink._path + `/${id}`,
4587
+ body
4588
+ );
4589
+ return res;
4590
+ },
4591
+
4592
+ remove: async (
4593
+ id: Service.WorkorderPortalLink.Remove.ID
4594
+ ): Promise<Service.WorkorderPortalLink.Remove.Result> => {
4595
+ let res: Service.WorkorderPortalLink.Remove.Result = await this._delete(
4596
+ this.svAPIEndpoint,
4597
+ this.workorderPortalLink._path + `/${id}`
4598
+ );
4599
+ return res;
4600
+ },
4601
+ };
4532
4602
  }
4533
4603
  function normalizeParams(params: Params): { [key: string]: any } {
4534
4604
  const normalized: Record<string, any> = {};
@@ -13184,7 +13184,10 @@ export namespace Service {
13184
13184
  name: string;
13185
13185
  client:
13186
13186
  | StringId
13187
- | (Pick<Client.ClientSchema, "name" | "client_code" | "contacts"> & {
13187
+ | (Pick<
13188
+ Client.ClientSchema,
13189
+ "name" | "client_code" | "contacts" | "_id"
13190
+ > & {
13188
13191
  contacts:
13189
13192
  | StringId[]
13190
13193
  | Pick<ClientContact.ClientContactSchema, "name">[];
@@ -13253,6 +13256,155 @@ export namespace Service {
13253
13256
  }
13254
13257
  }
13255
13258
 
13259
+ export namespace WorkorderPortalLink {
13260
+ export interface Data {
13261
+ _id: StringId;
13262
+ name?: string;
13263
+ group_code?: string;
13264
+ description?: string;
13265
+ workorder_portal?: StringId;
13266
+ assets?: StringId[];
13267
+ asset_units?: StringId[];
13268
+ client?: StringId;
13269
+ client_location?: StringId;
13270
+ creator: AdminOrRep;
13271
+ editor?: AdminOrRep;
13272
+ teams?: StringId[];
13273
+ disabled: boolean;
13274
+ company_namespace: string[];
13275
+ createdAt: string;
13276
+ updatedAt: string;
13277
+ }
13278
+
13279
+ export interface CreateBody {
13280
+ name?: string;
13281
+ group_code?: string;
13282
+ description?: string;
13283
+ workorder_portal?: StringId;
13284
+ assets?: StringId[];
13285
+ asset_units?: StringId[];
13286
+ client?: StringId;
13287
+ client_location?: StringId;
13288
+ creator: AdminOrRep;
13289
+ teams?: StringId[];
13290
+ disabled?: boolean;
13291
+ }
13292
+
13293
+ export interface PatchBody {
13294
+ count: number;
13295
+ name?: string;
13296
+ group_code?: string;
13297
+ company_namespace: string[];
13298
+ }
13299
+
13300
+ export interface UpdateBody {
13301
+ name?: string;
13302
+ group_code?: string;
13303
+ description?: string;
13304
+ workorder_portal?: StringId;
13305
+ assets?: StringId[];
13306
+ asset_units?: StringId[];
13307
+ client?: StringId;
13308
+ client_location?: StringId;
13309
+ editor?: AdminOrRep;
13310
+ teams?: StringId[];
13311
+ disabled?: boolean;
13312
+ }
13313
+
13314
+ export interface PopulatedDoc {
13315
+ _id: StringId;
13316
+ name?: string;
13317
+ group_code?: string;
13318
+ description?: string;
13319
+ workorder_portal?: StringId;
13320
+ workorder_portal_populated?: WorkorderPortal.PopulatedDoc;
13321
+ assets?: StringId[];
13322
+ assets_populated?: Asset.Data[];
13323
+ asset_units?: StringId[];
13324
+ asset_units_populated?: AssetUnit.Data[];
13325
+ client?: StringId;
13326
+ client_populated?: Client.ClientSchema;
13327
+ client_location?: ClientLocation.Data;
13328
+ client_location_populated?: ClientLocation.Data;
13329
+ creator: AdminOrRep;
13330
+ editor?: AdminOrRep;
13331
+ teams?: Team.TeamSchema[];
13332
+ teams_populated?: Team.TeamSchema[];
13333
+ disabled: boolean;
13334
+ company_namespace: string[];
13335
+ createdAt: string;
13336
+ updatedAt: string;
13337
+ }
13338
+
13339
+ type PopulatedKeys =
13340
+ | "workorder_portal"
13341
+ | "assets"
13342
+ | "asset_units"
13343
+ | "client"
13344
+ | "client_location"
13345
+ | "teams";
13346
+
13347
+ export namespace Find {
13348
+ export type Params = DefaultPaginationQueryParams & {
13349
+ _id?: StringId | StringId[];
13350
+ name?: string | string[];
13351
+ group_code?: string | string[];
13352
+ workorder_portal?: StringId | StringId[];
13353
+ assets?: StringId | StringId[];
13354
+ asset_units?: StringId | StringId[];
13355
+ client?: StringId | StringId[];
13356
+ client_location?: StringId | StringId[];
13357
+ teams?: StringId | StringId[];
13358
+ disabled?: boolean;
13359
+ from_updatedAt?: number;
13360
+ to_updatedAt?: number;
13361
+ from_createdAt?: number;
13362
+ to_createdAt?: number;
13363
+ search?: string;
13364
+ from__id?: StringId;
13365
+ to__id?: StringId;
13366
+ sortBy?: {
13367
+ field: "link_id" | "createdAt" | "updatedAt" | "_id";
13368
+ type: "asc" | "desc";
13369
+ }[];
13370
+ populatedKeys?: PopulatedKeys[];
13371
+ };
13372
+ export interface Result extends DefaultPaginationResult {
13373
+ data: Data[] & PopulatedDoc[];
13374
+ }
13375
+ }
13376
+
13377
+ export namespace Get {
13378
+ export type ID = string;
13379
+ export type Params = {
13380
+ populatedKeys?: PopulatedKeys[];
13381
+ };
13382
+ export type Result = Data & PopulatedDoc;
13383
+ }
13384
+
13385
+ export namespace Create {
13386
+ export type Body = CreateBody;
13387
+ export type Result = Data;
13388
+ }
13389
+
13390
+ export namespace Update {
13391
+ export type ID = StringId;
13392
+ export type Body = UpdateBody;
13393
+ export type Result = Data;
13394
+ }
13395
+ export namespace Patch {
13396
+ export type ID = StringId;
13397
+ export type Body = PatchBody;
13398
+ export type Result = Data[];
13399
+ }
13400
+
13401
+ export namespace Remove {
13402
+ export type ID = string;
13403
+ export type Params = {};
13404
+ export type Result = Data;
13405
+ }
13406
+ }
13407
+
13256
13408
  export namespace AssetType {
13257
13409
  export interface Data {
13258
13410
  _id: StringId;
@@ -13323,8 +13475,8 @@ export namespace Service {
13323
13475
  export namespace Asset {
13324
13476
  export interface Data {
13325
13477
  _id: StringId;
13326
- creator: AdminCreator;
13327
- editor?: AdminCreator;
13478
+ creator: AdminOrRep;
13479
+ editor?: AdminOrRep;
13328
13480
  name: string;
13329
13481
  local_name?: string;
13330
13482
  description?: string;
@@ -13345,7 +13497,7 @@ export namespace Service {
13345
13497
  }
13346
13498
 
13347
13499
  export interface CreateBody {
13348
- creator?: AdminCreator;
13500
+ creator?: AdminOrRep;
13349
13501
  name: string;
13350
13502
  local_name?: string;
13351
13503
  description?: string;
@@ -13362,7 +13514,7 @@ export namespace Service {
13362
13514
  integration_meta?: { [key: string]: any };
13363
13515
  }
13364
13516
  export interface UpdateBody {
13365
- editor?: AdminCreator;
13517
+ editor?: AdminOrRep;
13366
13518
  name?: string;
13367
13519
  local_name?: string;
13368
13520
  description?: string;
@@ -13381,8 +13533,8 @@ export namespace Service {
13381
13533
 
13382
13534
  export interface PopulatedDoc {
13383
13535
  _id: StringId;
13384
- creator: AdminCreator;
13385
- editor?: AdminCreator;
13536
+ creator: AdminOrRep;
13537
+ editor?: AdminOrRep;
13386
13538
  name: string;
13387
13539
  local_name?: string;
13388
13540
  description?: string;