@parra/parra-js-sdk 0.0.26 → 0.2.6

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.
Files changed (73) hide show
  1. package/dist/AccessToken.d.ts +1 -0
  2. package/dist/AccessToken.js +63 -0
  3. package/dist/ParraAPI.d.ts +184 -767
  4. package/dist/ParraAPI.js +46 -571
  5. package/dist/index.d.ts +3 -5
  6. package/dist/index.js +5 -7
  7. package/package.json +6 -2
  8. package/dist/AuthInterceptor.d.ts +0 -13
  9. package/dist/AuthInterceptor.js +0 -99
  10. package/dist/HTTPClient.d.ts +0 -30
  11. package/dist/HTTPClient.js +0 -158
  12. package/dist/HTTPInterceptor.d.ts +0 -5
  13. package/dist/HTTPInterceptor.js +0 -2
  14. package/dist/URLBuilder.d.ts +0 -7
  15. package/dist/URLBuilder.js +0 -24
  16. package/dist/models/AdminUser.d.ts +0 -12
  17. package/dist/models/AdminUser.js +0 -2
  18. package/dist/models/Business.d.ts +0 -23
  19. package/dist/models/Business.js +0 -2
  20. package/dist/models/BusinessProfile.d.ts +0 -10
  21. package/dist/models/BusinessProfile.js +0 -2
  22. package/dist/models/Category.d.ts +0 -18
  23. package/dist/models/Category.js +0 -2
  24. package/dist/models/City.d.ts +0 -7
  25. package/dist/models/City.js +0 -2
  26. package/dist/models/CollectionResponse.d.ts +0 -6
  27. package/dist/models/CollectionResponse.js +0 -2
  28. package/dist/models/Coordinate.d.ts +0 -4
  29. package/dist/models/Coordinate.js +0 -2
  30. package/dist/models/Employee.d.ts +0 -22
  31. package/dist/models/Employee.js +0 -2
  32. package/dist/models/EmployeeProfile.d.ts +0 -6
  33. package/dist/models/EmployeeProfile.js +0 -2
  34. package/dist/models/Entity.d.ts +0 -6
  35. package/dist/models/Entity.js +0 -2
  36. package/dist/models/Feature.d.ts +0 -7
  37. package/dist/models/Feature.js +0 -2
  38. package/dist/models/ImageAsset.d.ts +0 -10
  39. package/dist/models/ImageAsset.js +0 -2
  40. package/dist/models/Industry.d.ts +0 -9
  41. package/dist/models/Industry.js +0 -2
  42. package/dist/models/Location.d.ts +0 -39
  43. package/dist/models/Location.js +0 -2
  44. package/dist/models/LocationAddress.d.ts +0 -17
  45. package/dist/models/LocationAddress.js +0 -2
  46. package/dist/models/LocationPhoto.d.ts +0 -10
  47. package/dist/models/LocationPhoto.js +0 -2
  48. package/dist/models/LocationProfile.d.ts +0 -12
  49. package/dist/models/LocationProfile.js +0 -2
  50. package/dist/models/LocationRating.d.ts +0 -10
  51. package/dist/models/LocationRating.js +0 -2
  52. package/dist/models/LocationReview.d.ts +0 -22
  53. package/dist/models/LocationReview.js +0 -2
  54. package/dist/models/LocationReviewSource.d.ts +0 -5
  55. package/dist/models/LocationReviewSource.js +0 -2
  56. package/dist/models/LocationReviewer.d.ts +0 -4
  57. package/dist/models/LocationReviewer.js +0 -2
  58. package/dist/models/LocationService.d.ts +0 -9
  59. package/dist/models/LocationService.js +0 -2
  60. package/dist/models/LocationServiceArea.d.ts +0 -11
  61. package/dist/models/LocationServiceArea.js +0 -2
  62. package/dist/models/Pagination.d.ts +0 -2
  63. package/dist/models/Pagination.js +0 -2
  64. package/dist/models/Query.d.ts +0 -9
  65. package/dist/models/Query.js +0 -2
  66. package/dist/models/StripeAccountLink.d.ts +0 -10
  67. package/dist/models/StripeAccountLink.js +0 -2
  68. package/dist/models/Tag.d.ts +0 -11
  69. package/dist/models/Tag.js +0 -2
  70. package/dist/models/User.d.ts +0 -12
  71. package/dist/models/User.js +0 -2
  72. package/dist/models/index.d.ts +0 -8
  73. package/dist/models/index.js +0 -20
package/dist/ParraAPI.js CHANGED
@@ -1,184 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccountLinkType = exports.BusinessType = void 0;
4
- var BusinessType;
5
- (function (BusinessType) {
6
- BusinessType["individual"] = "individual";
7
- BusinessType["company"] = "company";
8
- BusinessType["nonProfit"] = "non_profit";
9
- BusinessType["governmentEntity"] = "government_entity";
10
- })(BusinessType = exports.BusinessType || (exports.BusinessType = {}));
11
- var AccountLinkType;
12
- (function (AccountLinkType) {
13
- AccountLinkType["accountOnboarding"] = "account_onboarding";
14
- AccountLinkType["accountUpdate"] = "account_update";
15
- })(AccountLinkType = exports.AccountLinkType || (exports.AccountLinkType = {}));
3
+ exports.QuestionKind = exports.QuestionType = void 0;
4
+ var QuestionType;
5
+ (function (QuestionType) {
6
+ QuestionType["choice"] = "choice";
7
+ })(QuestionType = exports.QuestionType || (exports.QuestionType = {}));
8
+ var QuestionKind;
9
+ (function (QuestionKind) {
10
+ QuestionKind["radio"] = "radio";
11
+ QuestionKind["checkbox"] = "checkbox";
12
+ })(QuestionKind = exports.QuestionKind || (exports.QuestionKind = {}));
16
13
  var ParraAPI = /** @class */ (function () {
17
14
  function ParraAPI(http, options) {
18
15
  var _this = this;
19
16
  this.http = http;
20
17
  this.options = options;
21
- this.getAppStatus = function () {
22
- return _this.http.execute(_this.options.baseUrl + "/apps/v1/status", {
18
+ this.getTenantById = function (tenant_id) {
19
+ return _this.http.execute(_this.options.baseUrl + "/v1/tenants/" + tenant_id, {
23
20
  method: "get",
24
21
  });
25
22
  };
26
- this.searchCategories = function (query) {
27
- return _this.http.execute(_this.options.baseUrl + "/search/v1/categories", {
28
- method: "get",
29
- query: query,
30
- });
31
- };
32
- this.searchLocations = function (query) {
33
- return _this.http.execute(_this.options.baseUrl + "/search/v1/locations", {
34
- method: "get",
35
- query: query,
36
- });
37
- };
38
- this.createBusiness = function (body) {
39
- return _this.http.execute(_this.options.baseUrl + "/v1/businesses", {
40
- method: "post",
41
- body: JSON.stringify(body),
42
- headers: {
43
- "content-type": "application/json",
44
- },
45
- });
46
- };
47
- this.listBusinesses = function (query) {
48
- return _this.http.execute(_this.options.baseUrl + "/v1/businesses", {
49
- method: "get",
50
- query: query,
51
- });
52
- };
53
- this.getBusinessById = function (businessId) {
54
- return _this.http.execute(_this.options.baseUrl + "/v1/businesses/" + businessId, {
55
- method: "get",
56
- });
57
- };
58
- this.updateBusinessById = function (businessId, body) {
59
- return _this.http.execute(_this.options.baseUrl + "/v1/businesses/" + businessId, {
60
- method: "put",
61
- body: JSON.stringify(body),
62
- headers: {
63
- "content-type": "application/json",
64
- },
65
- });
66
- };
67
- this.deleteBusinessById = function (businessId) {
68
- return _this.http.execute(_this.options.baseUrl + "/v1/businesses/" + businessId, {
69
- method: "delete",
70
- });
71
- };
72
- this.updateProfileForBusinessById = function (businessId, body) {
73
- return _this.http.execute(_this.options.baseUrl + "/v1/businesses/" + businessId + "/profile", {
74
- method: "put",
75
- body: JSON.stringify(body),
76
- headers: {
77
- "content-type": "application/json",
78
- },
79
- });
80
- };
81
- this.updateVerificationForBusinessById = function (businessId, body) {
82
- return _this.http.execute(_this.options.baseUrl + "/v1/businesses/" + businessId + "/verification", {
83
- method: "put",
84
- body: JSON.stringify(body),
85
- headers: {
86
- "content-type": "application/json",
87
- },
88
- });
89
- };
90
- this.createEmployeeForBusinessById = function (businessId, body) {
91
- return _this.http.execute(_this.options.baseUrl + "/v1/businesses/" + businessId + "/employees", {
92
- method: "post",
93
- body: JSON.stringify(body),
94
- headers: {
95
- "content-type": "application/json",
96
- },
97
- });
98
- };
99
- this.getEmployeesForBusinessById = function (businessId) {
100
- return _this.http.execute(_this.options.baseUrl + "/v1/businesses/" + businessId + "/employees", {
101
- method: "get",
102
- });
103
- };
104
- this.createLocationForBusinessById = function (businessId, body) {
105
- return _this.http.execute(_this.options.baseUrl + "/v1/businesses/" + businessId + "/locations", {
106
- method: "post",
107
- body: JSON.stringify(body),
108
- headers: {
109
- "content-type": "application/json",
110
- },
111
- });
112
- };
113
- this.getLocationsForBusinessById = function (businessId) {
114
- return _this.http.execute(_this.options.baseUrl + "/v1/businesses/" + businessId + "/locations", {
115
- method: "get",
116
- });
117
- };
118
- this.createStripeAccountLinkForBusinessById = function (businessId, body) {
119
- return _this.http.execute(_this.options.baseUrl + "/v1/businesses/" + businessId + "/stripe/account-links", {
120
- method: "post",
121
- body: JSON.stringify(body),
122
- headers: {
123
- "content-type": "application/json",
124
- },
125
- });
126
- };
127
- this.createCategory = function (body) {
128
- return _this.http.execute(_this.options.baseUrl + "/v1/categories", {
129
- method: "post",
130
- body: JSON.stringify(body),
131
- headers: {
132
- "content-type": "application/json",
133
- },
134
- });
135
- };
136
- this.listCategories = function (query) {
137
- return _this.http.execute(_this.options.baseUrl + "/v1/categories", {
138
- method: "get",
139
- query: query,
140
- });
141
- };
142
- this.getCategoryById = function (categoryId) {
143
- return _this.http.execute(_this.options.baseUrl + "/v1/categories/" + categoryId, {
144
- method: "get",
145
- });
146
- };
147
- this.updateCategoryById = function (categoryId, body) {
148
- return _this.http.execute(_this.options.baseUrl + "/v1/categories/" + categoryId, {
149
- method: "put",
150
- body: JSON.stringify(body),
151
- headers: {
152
- "content-type": "application/json",
153
- },
154
- });
155
- };
156
- this.deleteCategoryById = function (categoryId) {
157
- return _this.http.execute(_this.options.baseUrl + "/v1/categories/" + categoryId, {
158
- method: "delete",
159
- });
160
- };
161
- this.uploadIconForCategoryById = function (categoryId, body) {
162
- var formData = new FormData();
163
- Object.entries(body || {}).forEach(function (_a) {
164
- var key = _a[0], value = _a[1];
165
- formData.append(key, value);
166
- });
167
- return _this.http.execute(_this.options.baseUrl + "/v1/categories/" + categoryId + "/icon", {
168
- method: "post",
169
- body: formData,
170
- headers: {
171
- "content-type": "multipart/form-data",
172
- },
173
- });
174
- };
175
- this.listTagsForCategoryById = function (categoryId) {
176
- return _this.http.execute(_this.options.baseUrl + "/v1/categories/" + categoryId + "/tags", {
177
- method: "get",
178
- });
179
- };
180
- this.createCity = function (body) {
181
- return _this.http.execute(_this.options.baseUrl + "/v1/cities", {
23
+ this.createTenantForUserById = function (user_id, body) {
24
+ return _this.http.execute(_this.options.baseUrl + "/v1/users/" + user_id + "/tenants", {
182
25
  method: "post",
183
26
  body: JSON.stringify(body),
184
27
  headers: {
@@ -186,39 +29,18 @@ var ParraAPI = /** @class */ (function () {
186
29
  },
187
30
  });
188
31
  };
189
- this.listCities = function (query) {
190
- return _this.http.execute(_this.options.baseUrl + "/v1/cities", {
32
+ this.getTenantsForUserById = function (user_id) {
33
+ return _this.http.execute(_this.options.baseUrl + "/v1/users/" + user_id + "/tenants", {
191
34
  method: "get",
192
- query: query,
193
35
  });
194
36
  };
195
- this.getCityById = function (cityId) {
196
- return _this.http.execute(_this.options.baseUrl + "/v1/cities/" + cityId, {
37
+ this.getTenantByUserIdAndTenantId = function (user_id, tenant_id) {
38
+ return _this.http.execute(_this.options.baseUrl + "/v1/users/" + user_id + "/tenants/" + tenant_id, {
197
39
  method: "get",
198
40
  });
199
41
  };
200
- this.updateCityById = function (cityId, body) {
201
- return _this.http.execute(_this.options.baseUrl + "/v1/cities/" + cityId, {
202
- method: "put",
203
- body: JSON.stringify(body),
204
- headers: {
205
- "content-type": "application/json",
206
- },
207
- });
208
- };
209
- this.deleteCityById = function (cityId) {
210
- return _this.http.execute(_this.options.baseUrl + "/v1/cities/" + cityId, {
211
- method: "delete",
212
- });
213
- };
214
- this.listFeaturesForCityById = function (cityId, query) {
215
- return _this.http.execute(_this.options.baseUrl + "/v1/cities/" + cityId + "/features", {
216
- method: "get",
217
- query: query,
218
- });
219
- };
220
- this.createIndustry = function (body) {
221
- return _this.http.execute(_this.options.baseUrl + "/v1/industries", {
42
+ this.createApiKeyForTenantById = function (tenant_id, body) {
43
+ return _this.http.execute(_this.options.baseUrl + "/v1/tenants/" + tenant_id + "/api-keys", {
222
44
  method: "post",
223
45
  body: JSON.stringify(body),
224
46
  headers: {
@@ -226,95 +48,28 @@ var ParraAPI = /** @class */ (function () {
226
48
  },
227
49
  });
228
50
  };
229
- this.listIndustries = function (query) {
230
- return _this.http.execute(_this.options.baseUrl + "/v1/industries", {
231
- method: "get",
232
- query: query,
233
- });
234
- };
235
- this.getIndustryById = function (industryId) {
236
- return _this.http.execute(_this.options.baseUrl + "/v1/industries/" + industryId, {
51
+ this.getApiKeysForTenantById = function (tenant_id) {
52
+ return _this.http.execute(_this.options.baseUrl + "/v1/tenants/" + tenant_id + "/api-keys", {
237
53
  method: "get",
238
54
  });
239
55
  };
240
- this.updateIndustryById = function (industryId, body) {
241
- return _this.http.execute(_this.options.baseUrl + "/v1/industries/" + industryId, {
242
- method: "put",
243
- body: JSON.stringify(body),
244
- headers: {
245
- "content-type": "application/json",
246
- },
247
- });
248
- };
249
- this.deleteIndustryById = function (industryId) {
250
- return _this.http.execute(_this.options.baseUrl + "/v1/industries/" + industryId, {
56
+ this.deleteApiKeyForTenantById = function (tenant_id, api_key_id) {
57
+ return _this.http.execute(_this.options.baseUrl + "/v1/tenants/" + tenant_id + "/api-keys/" + api_key_id, {
251
58
  method: "delete",
252
59
  });
253
60
  };
254
- this.createLocation = function (body) {
255
- return _this.http.execute(_this.options.baseUrl + "/v1/locations", {
256
- method: "post",
257
- body: JSON.stringify(body),
258
- headers: {
259
- "content-type": "application/json",
260
- },
261
- });
262
- };
263
- this.listLocations = function (query) {
264
- return _this.http.execute(_this.options.baseUrl + "/v1/locations", {
61
+ this.getTenantForApiKeyById = function (api_key_id) {
62
+ return _this.http.execute(_this.options.baseUrl + "/v1/api-keys/" + api_key_id + "/tenant", {
265
63
  method: "get",
266
- query: query,
267
64
  });
268
65
  };
269
- this.getLocationById = function (locationId) {
270
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId, {
66
+ this.getCards = function () {
67
+ return _this.http.execute(_this.options.baseUrl + "/v1/cards", {
271
68
  method: "get",
272
69
  });
273
70
  };
274
- this.updateLocationById = function (locationId, body) {
275
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId, {
276
- method: "put",
277
- body: JSON.stringify(body),
278
- headers: {
279
- "content-type": "application/json",
280
- },
281
- });
282
- };
283
- this.deleteLocationById = function (locationId) {
284
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId, {
285
- method: "delete",
286
- });
287
- };
288
- this.updateAddressForLocationById = function (locationId, body) {
289
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/address", {
290
- method: "put",
291
- body: JSON.stringify(body),
292
- headers: {
293
- "content-type": "application/json",
294
- },
295
- });
296
- };
297
- this.getAddressForLocationById = function (locationId) {
298
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/address", {
299
- method: "get",
300
- });
301
- };
302
- this.uploadAvatarForLocationById = function (locationId, body) {
303
- var formData = new FormData();
304
- Object.entries(body || {}).forEach(function (_a) {
305
- var key = _a[0], value = _a[1];
306
- formData.append(key, value);
307
- });
308
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/avatar", {
309
- method: "post",
310
- body: formData,
311
- headers: {
312
- "content-type": "multipart/form-data",
313
- },
314
- });
315
- };
316
- this.createCategoryForLocationById = function (locationId, body) {
317
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/categories", {
71
+ this.createQuestion = function (body) {
72
+ return _this.http.execute(_this.options.baseUrl + "/v1/questions", {
318
73
  method: "post",
319
74
  body: JSON.stringify(body),
320
75
  headers: {
@@ -322,28 +77,13 @@ var ParraAPI = /** @class */ (function () {
322
77
  },
323
78
  });
324
79
  };
325
- this.listCategoriesForLocationById = function (locationId, query) {
326
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/categories", {
80
+ this.getQuestionById = function (question_id) {
81
+ return _this.http.execute(_this.options.baseUrl + "/v1/questions/" + question_id, {
327
82
  method: "get",
328
- query: query,
329
- });
330
- };
331
- this.removeCategoryFromLocationById = function (locationId, categoryId) {
332
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/categories/" + categoryId, {
333
- method: "delete",
334
83
  });
335
84
  };
336
- this.updateTagsForLocationCategoryByIds = function (locationId, categoryId, body) {
337
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/categories/" + categoryId + "/tags", {
338
- method: "patch",
339
- body: JSON.stringify(body),
340
- headers: {
341
- "content-type": "application/json",
342
- },
343
- });
344
- };
345
- this.updateProfileForLocationById = function (locationId, body) {
346
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/profile", {
85
+ this.answerQuestionById = function (question_id, body) {
86
+ return _this.http.execute(_this.options.baseUrl + "/v1/questions/" + question_id + "/answer", {
347
87
  method: "put",
348
88
  body: JSON.stringify(body),
349
89
  headers: {
@@ -351,227 +91,6 @@ var ParraAPI = /** @class */ (function () {
351
91
  },
352
92
  });
353
93
  };
354
- this.getProfileForLocationById = function (locationId) {
355
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/profile", {
356
- method: "get",
357
- });
358
- };
359
- this.getRatingForLocationById = function (locationId) {
360
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/rating", {
361
- method: "get",
362
- });
363
- };
364
- this.listReviewsForLocationById = function (locationId, query) {
365
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/reviews", {
366
- method: "get",
367
- query: query,
368
- });
369
- };
370
- this.listPhotosForLocationById = function (locationId) {
371
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/photos", {
372
- method: "get",
373
- });
374
- };
375
- this.uploadPhotoForLocationById = function (locationId, body) {
376
- var formData = new FormData();
377
- Object.entries(body || {}).forEach(function (_a) {
378
- var key = _a[0], value = _a[1];
379
- formData.append(key, value);
380
- });
381
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/photos", {
382
- method: "post",
383
- body: formData,
384
- headers: {
385
- "content-type": "multipart/form-data",
386
- },
387
- });
388
- };
389
- this.createServiceAreaForLocationById = function (locationId, body) {
390
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/service-areas", {
391
- method: "post",
392
- body: JSON.stringify(body),
393
- headers: {
394
- "content-type": "application/json",
395
- },
396
- });
397
- };
398
- this.listServiceAreasForLocationById = function (locationId) {
399
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/service-areas", {
400
- method: "get",
401
- });
402
- };
403
- this.deleteServiceAreaForLocationById = function (locationId, serviceAreaId) {
404
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/service-areas/" + serviceAreaId, {
405
- method: "delete",
406
- });
407
- };
408
- this.deletePhotoForLocationById = function (locationId, photoId) {
409
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/photos/" + photoId, {
410
- method: "delete",
411
- });
412
- };
413
- this.createTagForLocationById = function (locationId, body) {
414
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/tags", {
415
- method: "post",
416
- body: JSON.stringify(body),
417
- headers: {
418
- "content-type": "application/json",
419
- },
420
- });
421
- };
422
- this.listTagsForLocationById = function (locationId, query) {
423
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/tags", {
424
- method: "get",
425
- query: query,
426
- });
427
- };
428
- this.removeTagFromLocationById = function (locationId, tagId) {
429
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/tags/" + tagId, {
430
- method: "delete",
431
- });
432
- };
433
- this.getVerificationForLocationById = function (locationId) {
434
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/verification", {
435
- method: "get",
436
- });
437
- };
438
- this.updateVerificationForLocationById = function (locationId, body) {
439
- return _this.http.execute(_this.options.baseUrl + "/v1/locations/" + locationId + "/verification", {
440
- method: "put",
441
- body: JSON.stringify(body),
442
- headers: {
443
- "content-type": "application/json",
444
- },
445
- });
446
- };
447
- this.listLocationReviewSources = function () {
448
- return _this.http.execute(_this.options.baseUrl + "/v1/location-review-sources", {
449
- method: "get",
450
- });
451
- };
452
- this.createLocationReview = function (body) {
453
- return _this.http.execute(_this.options.baseUrl + "/v1/location-reviews", {
454
- method: "post",
455
- body: JSON.stringify(body),
456
- headers: {
457
- "content-type": "application/json",
458
- },
459
- });
460
- };
461
- this.deleteLocationReviewById = function (locationReviewId) {
462
- return _this.http.execute(_this.options.baseUrl + "/v1/location-reviews/" + locationReviewId, {
463
- method: "delete",
464
- });
465
- };
466
- this.inviteEmployee = function (body) {
467
- return _this.http.execute(_this.options.baseUrl + "/v1/employees", {
468
- method: "post",
469
- body: JSON.stringify(body),
470
- headers: {
471
- "content-type": "application/json",
472
- },
473
- });
474
- };
475
- this.listEmployees = function (query) {
476
- return _this.http.execute(_this.options.baseUrl + "/v1/employees", {
477
- method: "get",
478
- query: query,
479
- });
480
- };
481
- this.getEmployeeById = function (employeeId) {
482
- return _this.http.execute(_this.options.baseUrl + "/v1/employees/" + employeeId, {
483
- method: "get",
484
- });
485
- };
486
- this.updateEmployeeById = function (employeeId, body) {
487
- return _this.http.execute(_this.options.baseUrl + "/v1/employees/" + employeeId, {
488
- method: "put",
489
- body: JSON.stringify(body),
490
- headers: {
491
- "content-type": "application/json",
492
- },
493
- });
494
- };
495
- this.deleteEmployeeById = function (employeeId) {
496
- return _this.http.execute(_this.options.baseUrl + "/v1/employees/" + employeeId, {
497
- method: "delete",
498
- });
499
- };
500
- this.createBusinessForEmployeeById = function (employeeId, body) {
501
- return _this.http.execute(_this.options.baseUrl + "/v1/employees/" + employeeId + "/business", {
502
- method: "post",
503
- body: JSON.stringify(body),
504
- headers: {
505
- "content-type": "application/json",
506
- },
507
- });
508
- };
509
- this.updateProfileForEmployeeById = function (employeeId, body) {
510
- return _this.http.execute(_this.options.baseUrl + "/v1/employees/" + employeeId + "/profile", {
511
- method: "put",
512
- body: JSON.stringify(body),
513
- headers: {
514
- "content-type": "application/json",
515
- },
516
- });
517
- };
518
- this.tipEmployeeById = function (employeeId, body) {
519
- return _this.http.execute(_this.options.baseUrl + "/v1/employees/" + employeeId + "/tips", {
520
- method: "post",
521
- body: JSON.stringify(body),
522
- headers: {
523
- "content-type": "application/json",
524
- },
525
- });
526
- };
527
- this.getVerificationForEmployeeById = function (employeeId) {
528
- return _this.http.execute(_this.options.baseUrl + "/v1/employees/" + employeeId + "/verification", {
529
- method: "get",
530
- });
531
- };
532
- this.updateVerificationForEmployeeById = function (employeeId, body) {
533
- return _this.http.execute(_this.options.baseUrl + "/v1/employees/" + employeeId + "/verification", {
534
- method: "put",
535
- body: JSON.stringify(body),
536
- headers: {
537
- "content-type": "application/json",
538
- },
539
- });
540
- };
541
- this.createTag = function (body) {
542
- return _this.http.execute(_this.options.baseUrl + "/v1/tags", {
543
- method: "post",
544
- body: JSON.stringify(body),
545
- headers: {
546
- "content-type": "application/json",
547
- },
548
- });
549
- };
550
- this.listTags = function (query) {
551
- return _this.http.execute(_this.options.baseUrl + "/v1/tags", {
552
- method: "get",
553
- query: query,
554
- });
555
- };
556
- this.getTagById = function (tagId) {
557
- return _this.http.execute(_this.options.baseUrl + "/v1/tags/" + tagId, {
558
- method: "get",
559
- });
560
- };
561
- this.updateTagById = function (tagId, body) {
562
- return _this.http.execute(_this.options.baseUrl + "/v1/tags/" + tagId, {
563
- method: "put",
564
- body: JSON.stringify(body),
565
- headers: {
566
- "content-type": "application/json",
567
- },
568
- });
569
- };
570
- this.deleteTagById = function (tagId) {
571
- return _this.http.execute(_this.options.baseUrl + "/v1/tags/" + tagId, {
572
- method: "delete",
573
- });
574
- };
575
94
  this.createUser = function (body) {
576
95
  return _this.http.execute(_this.options.baseUrl + "/v1/users", {
577
96
  method: "post",
@@ -587,13 +106,13 @@ var ParraAPI = /** @class */ (function () {
587
106
  query: query,
588
107
  });
589
108
  };
590
- this.getUserById = function (id) {
591
- return _this.http.execute(_this.options.baseUrl + "/v1/users/" + id, {
109
+ this.getUserById = function (user_id) {
110
+ return _this.http.execute(_this.options.baseUrl + "/v1/users/" + user_id, {
592
111
  method: "get",
593
112
  });
594
113
  };
595
- this.updateUserById = function (id, body) {
596
- return _this.http.execute(_this.options.baseUrl + "/v1/users/" + id, {
114
+ this.updateUserById = function (user_id, body) {
115
+ return _this.http.execute(_this.options.baseUrl + "/v1/users/" + user_id, {
597
116
  method: "put",
598
117
  body: JSON.stringify(body),
599
118
  headers: {
@@ -601,13 +120,13 @@ var ParraAPI = /** @class */ (function () {
601
120
  },
602
121
  });
603
122
  };
604
- this.deleteUserById = function (id) {
605
- return _this.http.execute(_this.options.baseUrl + "/v1/users/" + id, {
123
+ this.deleteUserById = function (user_id) {
124
+ return _this.http.execute(_this.options.baseUrl + "/v1/users/" + user_id, {
606
125
  method: "delete",
607
126
  });
608
127
  };
609
- this.createIdentityForUserById = function (id, body) {
610
- return _this.http.execute(_this.options.baseUrl + "/v1/users/" + id + "/identities", {
128
+ this.createIdentityForUserById = function (user_id, body) {
129
+ return _this.http.execute(_this.options.baseUrl + "/v1/users/" + user_id + "/identities", {
611
130
  method: "post",
612
131
  body: JSON.stringify(body),
613
132
  headers: {
@@ -615,60 +134,16 @@ var ParraAPI = /** @class */ (function () {
615
134
  },
616
135
  });
617
136
  };
618
- this.listIdentitiesForUserById = function (id) {
619
- return _this.http.execute(_this.options.baseUrl + "/v1/users/" + id + "/identities", {
620
- method: "get",
621
- });
622
- };
623
- this.listCustomerPaymentMethodsForUserById = function (id) {
624
- return _this.http.execute(_this.options.baseUrl + "/v1/users/" + id + "/customer/payment-methods", {
137
+ this.listIdentitiesForUserById = function (user_id) {
138
+ return _this.http.execute(_this.options.baseUrl + "/v1/users/" + user_id + "/identities", {
625
139
  method: "get",
626
140
  });
627
141
  };
628
- this.attachPaymentMethodToCustomerForUserById = function (id, body) {
629
- return _this.http.execute(_this.options.baseUrl + "/v1/users/" + id + "/customer/payment-methods", {
630
- method: "post",
631
- body: JSON.stringify(body),
632
- headers: {
633
- "content-type": "application/json",
634
- },
635
- });
636
- };
637
- this.detachPaymentMethodFromCustomerForUserById = function (id, paymentMethodId) {
638
- return _this.http.execute(_this.options.baseUrl + "/v1/users/" + id + "/customer/payment-methods/" + paymentMethodId, {
639
- method: "delete",
640
- });
641
- };
642
- this.createCustomerEphemeralKeyForUserById = function (id, query) {
643
- return _this.http.execute(_this.options.baseUrl + "/v1/users/" + id + "/customer/ephemeral-keys", {
644
- method: "post",
645
- query: query,
646
- });
647
- };
648
- this.getUserByProviderAndProviderUserId = function (provider, providerUserId) {
649
- return _this.http.execute(_this.options.baseUrl + "/v1/providers/" + provider + "/identities/" + providerUserId + "/user", {
142
+ this.getUserByProviderAndProviderUserId = function (provider, provider_user_id) {
143
+ return _this.http.execute(_this.options.baseUrl + "/v1/providers/" + provider + "/identities/" + provider_user_id + "/user", {
650
144
  method: "get",
651
145
  });
652
146
  };
653
- this.submitContactRequest = function (body, query) {
654
- return _this.http.execute(_this.options.baseUrl + "/v1/support/contact", {
655
- method: "post",
656
- query: query,
657
- body: JSON.stringify(body),
658
- headers: {
659
- "content-type": "application/json",
660
- },
661
- });
662
- };
663
- this.submitProSignUpRequest = function (body) {
664
- return _this.http.execute(_this.options.baseUrl + "/v1/support/pro/sign-up", {
665
- method: "post",
666
- body: JSON.stringify(body),
667
- headers: {
668
- "content-type": "application/json",
669
- },
670
- });
671
- };
672
147
  this.getUserInfo = function () {
673
148
  return _this.http.execute(_this.options.baseUrl + "/v1/user-info", {
674
149
  method: "get",