@vendasta/business-center 0.6.2 → 0.7.2

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 (77) hide show
  1. package/esm2020/lib/_generated/host.service.mjs +25 -0
  2. package/esm2020/lib/_internal/account.api.service.mjs +41 -0
  3. package/esm2020/lib/_internal/get-started.api.service.mjs +46 -0
  4. package/esm2020/lib/_internal/index.mjs +12 -0
  5. package/esm2020/lib/_internal/interfaces/annotations.interface.mjs +8 -0
  6. package/esm2020/lib/_internal/interfaces/api.interface.mjs +8 -0
  7. package/esm2020/lib/_internal/interfaces/index.mjs +2 -0
  8. package/esm2020/lib/_internal/objects/annotations.mjs +24 -0
  9. package/esm2020/lib/_internal/objects/api.mjs +357 -0
  10. package/esm2020/lib/_internal/objects/index.mjs +9 -0
  11. package/esm2020/lib/_internal/user.api.service.mjs +45 -0
  12. package/esm2020/lib/account.service.mjs +38 -0
  13. package/esm2020/lib/getStarted.service.mjs +44 -0
  14. package/esm2020/lib/index.mjs +5 -0
  15. package/esm2020/lib/user.service.mjs +35 -0
  16. package/esm2020/public_api.mjs +2 -0
  17. package/esm2020/vendasta-business-center.mjs +5 -0
  18. package/fesm2015/vendasta-business-center.mjs +603 -0
  19. package/fesm2015/vendasta-business-center.mjs.map +1 -0
  20. package/fesm2020/vendasta-business-center.mjs +602 -0
  21. package/fesm2020/vendasta-business-center.mjs.map +1 -0
  22. package/lib/_generated/host.service.d.ts +5 -9
  23. package/lib/_internal/account.api.service.d.ts +4 -0
  24. package/lib/_internal/get-started.api.service.d.ts +4 -0
  25. package/lib/_internal/interfaces/api.interface.d.ts +2 -0
  26. package/lib/_internal/objects/api.d.ts +2 -0
  27. package/lib/_internal/user.api.service.d.ts +4 -0
  28. package/lib/account.service.d.ts +3 -0
  29. package/lib/getStarted.service.d.ts +3 -0
  30. package/lib/user.service.d.ts +4 -1
  31. package/package.json +27 -19
  32. package/public_api.d.ts +1 -1
  33. package/src/README.md +1 -0
  34. package/vendasta-business-center.d.ts +1 -0
  35. package/bundles/vendasta-business-center.umd.js +0 -1131
  36. package/bundles/vendasta-business-center.umd.js.map +0 -1
  37. package/bundles/vendasta-business-center.umd.min.js +0 -2
  38. package/bundles/vendasta-business-center.umd.min.js.map +0 -1
  39. package/esm2015/lib/_generated/host.service.js +0 -104
  40. package/esm2015/lib/_internal/account.api.service.js +0 -76
  41. package/esm2015/lib/_internal/get-started.api.service.js +0 -90
  42. package/esm2015/lib/_internal/index.js +0 -16
  43. package/esm2015/lib/_internal/interfaces/annotations.interface.js +0 -21
  44. package/esm2015/lib/_internal/interfaces/api.interface.js +0 -167
  45. package/esm2015/lib/_internal/interfaces/index.js +0 -5
  46. package/esm2015/lib/_internal/objects/annotations.js +0 -46
  47. package/esm2015/lib/_internal/objects/api.js +0 -615
  48. package/esm2015/lib/_internal/objects/index.js +0 -13
  49. package/esm2015/lib/_internal/user.api.service.js +0 -85
  50. package/esm2015/lib/account.service.js +0 -90
  51. package/esm2015/lib/getStarted.service.js +0 -93
  52. package/esm2015/lib/index.js +0 -9
  53. package/esm2015/lib/user.service.js +0 -75
  54. package/esm2015/public_api.js +0 -6
  55. package/esm2015/vendasta-business-center.js +0 -9
  56. package/esm5/lib/_generated/host.service.js +0 -115
  57. package/esm5/lib/_internal/account.api.service.js +0 -82
  58. package/esm5/lib/_internal/get-started.api.service.js +0 -100
  59. package/esm5/lib/_internal/index.js +0 -16
  60. package/esm5/lib/_internal/interfaces/annotations.interface.js +0 -21
  61. package/esm5/lib/_internal/interfaces/api.interface.js +0 -167
  62. package/esm5/lib/_internal/interfaces/index.js +0 -5
  63. package/esm5/lib/_internal/objects/annotations.js +0 -52
  64. package/esm5/lib/_internal/objects/api.js +0 -693
  65. package/esm5/lib/_internal/objects/index.js +0 -13
  66. package/esm5/lib/_internal/user.api.service.js +0 -96
  67. package/esm5/lib/account.service.js +0 -97
  68. package/esm5/lib/getStarted.service.js +0 -101
  69. package/esm5/lib/index.js +0 -9
  70. package/esm5/lib/user.service.js +0 -78
  71. package/esm5/public_api.js +0 -6
  72. package/esm5/vendasta-business-center.js +0 -9
  73. package/fesm2015/vendasta-business-center.js +0 -979
  74. package/fesm2015/vendasta-business-center.js.map +0 -1
  75. package/fesm5/vendasta-business-center.js +0 -1093
  76. package/fesm5/vendasta-business-center.js.map +0 -1
  77. package/vendasta-business-center.metadata.json +0 -1
@@ -0,0 +1,602 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import { HttpHeaders } from '@angular/common/http';
5
+ import { map } from 'rxjs/operators';
6
+
7
+ const environment = (window ? window['environment'] : 'prod') ?? 'prod';
8
+ const hostMap = {
9
+ 'local': 'business-center-api.vendasta-local.com',
10
+ 'test': '',
11
+ 'demo': 'business-center-demo.apigateway.co',
12
+ 'prod': 'business-center-prod.apigateway.co',
13
+ 'production': 'business-center-prod.apigateway.co',
14
+ };
15
+ class HostService {
16
+ get host() {
17
+ return hostMap[environment.toLowerCase()];
18
+ }
19
+ get hostWithScheme() {
20
+ return 'https://' + this.host;
21
+ }
22
+ }
23
+ HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
24
+ HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: HostService, providedIn: 'root' });
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: HostService, decorators: [{
26
+ type: Injectable,
27
+ args: [{ providedIn: 'root' }]
28
+ }] });
29
+
30
+ class Access {
31
+ constructor(kwargs) {
32
+ if (!kwargs) {
33
+ return;
34
+ }
35
+ Object.assign(this, kwargs);
36
+ }
37
+ static fromProto(proto) {
38
+ let m = new Access();
39
+ m = Object.assign(m, proto);
40
+ return m;
41
+ }
42
+ toApiJson() {
43
+ const toReturn = {};
44
+ if (typeof this.scope !== 'undefined') {
45
+ toReturn['scope'] = this.scope;
46
+ }
47
+ if (typeof this.public !== 'undefined') {
48
+ toReturn['public'] = this.public;
49
+ }
50
+ return toReturn;
51
+ }
52
+ }
53
+
54
+ class Address {
55
+ constructor(kwargs) {
56
+ if (!kwargs) {
57
+ return;
58
+ }
59
+ Object.assign(this, kwargs);
60
+ }
61
+ static fromProto(proto) {
62
+ let m = new Address();
63
+ m = Object.assign(m, proto);
64
+ return m;
65
+ }
66
+ toApiJson() {
67
+ const toReturn = {};
68
+ if (typeof this.address !== 'undefined') {
69
+ toReturn['address'] = this.address;
70
+ }
71
+ if (typeof this.city !== 'undefined') {
72
+ toReturn['city'] = this.city;
73
+ }
74
+ if (typeof this.state !== 'undefined') {
75
+ toReturn['state'] = this.state;
76
+ }
77
+ if (typeof this.country !== 'undefined') {
78
+ toReturn['country'] = this.country;
79
+ }
80
+ if (typeof this.postalCode !== 'undefined') {
81
+ toReturn['postalCode'] = this.postalCode;
82
+ }
83
+ return toReturn;
84
+ }
85
+ }
86
+ class BusinessData {
87
+ constructor(kwargs) {
88
+ if (!kwargs) {
89
+ return;
90
+ }
91
+ Object.assign(this, kwargs);
92
+ }
93
+ static fromProto(proto) {
94
+ let m = new BusinessData();
95
+ m = Object.assign(m, proto);
96
+ if (proto.address) {
97
+ m.address = Address.fromProto(proto.address);
98
+ }
99
+ return m;
100
+ }
101
+ toApiJson() {
102
+ const toReturn = {};
103
+ if (typeof this.address !== 'undefined' && this.address !== null) {
104
+ toReturn['address'] = 'toApiJson' in this.address ? this.address.toApiJson() : this.address;
105
+ }
106
+ if (typeof this.businessCategory !== 'undefined') {
107
+ toReturn['businessCategory'] = this.businessCategory;
108
+ }
109
+ if (typeof this.phoneNumber !== 'undefined') {
110
+ toReturn['phoneNumber'] = this.phoneNumber;
111
+ }
112
+ if (typeof this.websiteUrl !== 'undefined') {
113
+ toReturn['websiteUrl'] = this.websiteUrl;
114
+ }
115
+ if (typeof this.facebookUrl !== 'undefined') {
116
+ toReturn['facebookUrl'] = this.facebookUrl;
117
+ }
118
+ if (typeof this.twitterUrl !== 'undefined') {
119
+ toReturn['twitterUrl'] = this.twitterUrl;
120
+ }
121
+ return toReturn;
122
+ }
123
+ }
124
+ class Contact {
125
+ constructor(kwargs) {
126
+ if (!kwargs) {
127
+ return;
128
+ }
129
+ Object.assign(this, kwargs);
130
+ }
131
+ static fromProto(proto) {
132
+ let m = new Contact();
133
+ m = Object.assign(m, proto);
134
+ return m;
135
+ }
136
+ toApiJson() {
137
+ const toReturn = {};
138
+ if (typeof this.firstName !== 'undefined') {
139
+ toReturn['firstName'] = this.firstName;
140
+ }
141
+ if (typeof this.lastName !== 'undefined') {
142
+ toReturn['lastName'] = this.lastName;
143
+ }
144
+ return toReturn;
145
+ }
146
+ }
147
+ class GetCreatePasswordUrlRequest {
148
+ constructor(kwargs) {
149
+ if (!kwargs) {
150
+ return;
151
+ }
152
+ Object.assign(this, kwargs);
153
+ }
154
+ static fromProto(proto) {
155
+ let m = new GetCreatePasswordUrlRequest();
156
+ m = Object.assign(m, proto);
157
+ return m;
158
+ }
159
+ toApiJson() {
160
+ const toReturn = {};
161
+ if (typeof this.userId !== 'undefined') {
162
+ toReturn['userId'] = this.userId;
163
+ }
164
+ if (typeof this.partnerId !== 'undefined') {
165
+ toReturn['partnerId'] = this.partnerId;
166
+ }
167
+ return toReturn;
168
+ }
169
+ }
170
+ class GetCreatePasswordUrlResponse {
171
+ constructor(kwargs) {
172
+ if (!kwargs) {
173
+ return;
174
+ }
175
+ Object.assign(this, kwargs);
176
+ }
177
+ static fromProto(proto) {
178
+ let m = new GetCreatePasswordUrlResponse();
179
+ m = Object.assign(m, proto);
180
+ return m;
181
+ }
182
+ toApiJson() {
183
+ const toReturn = {};
184
+ if (typeof this.url !== 'undefined') {
185
+ toReturn['url'] = this.url;
186
+ }
187
+ return toReturn;
188
+ }
189
+ }
190
+ class GetTrackerRequest {
191
+ constructor(kwargs) {
192
+ if (!kwargs) {
193
+ return;
194
+ }
195
+ Object.assign(this, kwargs);
196
+ }
197
+ static fromProto(proto) {
198
+ let m = new GetTrackerRequest();
199
+ m = Object.assign(m, proto);
200
+ return m;
201
+ }
202
+ toApiJson() {
203
+ const toReturn = {};
204
+ if (typeof this.partnerId !== 'undefined') {
205
+ toReturn['partnerId'] = this.partnerId;
206
+ }
207
+ if (typeof this.userId !== 'undefined') {
208
+ toReturn['userId'] = this.userId;
209
+ }
210
+ return toReturn;
211
+ }
212
+ }
213
+ class GetTrackerResponse {
214
+ constructor(kwargs) {
215
+ if (!kwargs) {
216
+ return;
217
+ }
218
+ Object.assign(this, kwargs);
219
+ }
220
+ static fromProto(proto) {
221
+ let m = new GetTrackerResponse();
222
+ m = Object.assign(m, proto);
223
+ if (proto.trackers) {
224
+ m.trackers = Trackers.fromProto(proto.trackers);
225
+ }
226
+ return m;
227
+ }
228
+ toApiJson() {
229
+ const toReturn = {};
230
+ if (typeof this.trackers !== 'undefined' && this.trackers !== null) {
231
+ toReturn['trackers'] = 'toApiJson' in this.trackers ? this.trackers.toApiJson() : this.trackers;
232
+ }
233
+ return toReturn;
234
+ }
235
+ }
236
+ class RegisterRequest {
237
+ constructor(kwargs) {
238
+ if (!kwargs) {
239
+ return;
240
+ }
241
+ Object.assign(this, kwargs);
242
+ }
243
+ static fromProto(proto) {
244
+ let m = new RegisterRequest();
245
+ m = Object.assign(m, proto);
246
+ if (proto.businessData) {
247
+ m.businessData = BusinessData.fromProto(proto.businessData);
248
+ }
249
+ if (proto.contact) {
250
+ m.contact = Contact.fromProto(proto.contact);
251
+ }
252
+ return m;
253
+ }
254
+ toApiJson() {
255
+ const toReturn = {};
256
+ if (typeof this.businessData !== 'undefined' && this.businessData !== null) {
257
+ toReturn['businessData'] = 'toApiJson' in this.businessData ? this.businessData.toApiJson() : this.businessData;
258
+ }
259
+ if (typeof this.contact !== 'undefined' && this.contact !== null) {
260
+ toReturn['contact'] = 'toApiJson' in this.contact ? this.contact.toApiJson() : this.contact;
261
+ }
262
+ if (typeof this.businessName !== 'undefined') {
263
+ toReturn['businessName'] = this.businessName;
264
+ }
265
+ if (typeof this.partnerId !== 'undefined') {
266
+ toReturn['partnerId'] = this.partnerId;
267
+ }
268
+ if (typeof this.marketId !== 'undefined') {
269
+ toReturn['marketId'] = this.marketId;
270
+ }
271
+ if (typeof this.email !== 'undefined') {
272
+ toReturn['email'] = this.email;
273
+ }
274
+ if (typeof this.placeId !== 'undefined') {
275
+ toReturn['placeId'] = this.placeId;
276
+ }
277
+ if (typeof this.salesPersonId !== 'undefined') {
278
+ toReturn['salesPersonId'] = this.salesPersonId;
279
+ }
280
+ if (typeof this.recaptcha !== 'undefined') {
281
+ toReturn['recaptcha'] = this.recaptcha;
282
+ }
283
+ return toReturn;
284
+ }
285
+ }
286
+ class RegisterResponse {
287
+ constructor(kwargs) {
288
+ if (!kwargs) {
289
+ return;
290
+ }
291
+ Object.assign(this, kwargs);
292
+ }
293
+ static fromProto(proto) {
294
+ let m = new RegisterResponse();
295
+ m = Object.assign(m, proto);
296
+ return m;
297
+ }
298
+ toApiJson() {
299
+ const toReturn = {};
300
+ if (typeof this.businessId !== 'undefined') {
301
+ toReturn['businessId'] = this.businessId;
302
+ }
303
+ if (typeof this.userId !== 'undefined') {
304
+ toReturn['userId'] = this.userId;
305
+ }
306
+ return toReturn;
307
+ }
308
+ }
309
+ class SendWelcomeEmailRequest {
310
+ constructor(kwargs) {
311
+ if (!kwargs) {
312
+ return;
313
+ }
314
+ Object.assign(this, kwargs);
315
+ }
316
+ static fromProto(proto) {
317
+ let m = new SendWelcomeEmailRequest();
318
+ m = Object.assign(m, proto);
319
+ return m;
320
+ }
321
+ toApiJson() {
322
+ const toReturn = {};
323
+ if (typeof this.partnerId !== 'undefined') {
324
+ toReturn['partnerId'] = this.partnerId;
325
+ }
326
+ if (typeof this.userId !== 'undefined') {
327
+ toReturn['userId'] = this.userId;
328
+ }
329
+ if (typeof this.loginUrl !== 'undefined') {
330
+ toReturn['loginUrl'] = this.loginUrl;
331
+ }
332
+ if (typeof this.usePlatformDefaultDomain !== 'undefined') {
333
+ toReturn['usePlatformDefaultDomain'] = this.usePlatformDefaultDomain;
334
+ }
335
+ if (typeof this.marketId !== 'undefined') {
336
+ toReturn['marketId'] = this.marketId;
337
+ }
338
+ return toReturn;
339
+ }
340
+ }
341
+ class SetTrackerRequest {
342
+ constructor(kwargs) {
343
+ if (!kwargs) {
344
+ return;
345
+ }
346
+ Object.assign(this, kwargs);
347
+ }
348
+ static fromProto(proto) {
349
+ let m = new SetTrackerRequest();
350
+ m = Object.assign(m, proto);
351
+ return m;
352
+ }
353
+ toApiJson() {
354
+ const toReturn = {};
355
+ if (typeof this.partnerId !== 'undefined') {
356
+ toReturn['partnerId'] = this.partnerId;
357
+ }
358
+ if (typeof this.userId !== 'undefined') {
359
+ toReturn['userId'] = this.userId;
360
+ }
361
+ if (typeof this.tracker !== 'undefined') {
362
+ toReturn['tracker'] = this.tracker;
363
+ }
364
+ return toReturn;
365
+ }
366
+ }
367
+ class SetTrackerResponse {
368
+ constructor(kwargs) {
369
+ if (!kwargs) {
370
+ return;
371
+ }
372
+ Object.assign(this, kwargs);
373
+ }
374
+ static fromProto(proto) {
375
+ let m = new SetTrackerResponse();
376
+ m = Object.assign(m, proto);
377
+ return m;
378
+ }
379
+ toApiJson() {
380
+ const toReturn = {};
381
+ if (typeof this.success !== 'undefined') {
382
+ toReturn['success'] = this.success;
383
+ }
384
+ return toReturn;
385
+ }
386
+ }
387
+ class Trackers {
388
+ constructor(kwargs) {
389
+ if (!kwargs) {
390
+ return;
391
+ }
392
+ Object.assign(this, kwargs);
393
+ }
394
+ static fromProto(proto) {
395
+ let m = new Trackers();
396
+ m = Object.assign(m, proto);
397
+ return m;
398
+ }
399
+ toApiJson() {
400
+ const toReturn = {};
401
+ if (typeof this.welcomeVideo !== 'undefined') {
402
+ toReturn['welcomeVideo'] = this.welcomeVideo;
403
+ }
404
+ if (typeof this.academy !== 'undefined') {
405
+ toReturn['academy'] = this.academy;
406
+ }
407
+ return toReturn;
408
+ }
409
+ }
410
+
411
+ // *********************************
412
+
413
+ // *********************************
414
+ class AccountApiService {
415
+ constructor(http, hostService) {
416
+ this.http = http;
417
+ this.hostService = hostService;
418
+ this._host = this.hostService.hostWithScheme;
419
+ }
420
+ apiOptions() {
421
+ return {
422
+ headers: new HttpHeaders({
423
+ 'Content-Type': 'application/json'
424
+ }),
425
+ withCredentials: true
426
+ };
427
+ }
428
+ register(r) {
429
+ const request = (r.toApiJson) ? r : new RegisterRequest(r);
430
+ return this.http.post(this._host + "/business_center.v1.Account/Register", request.toApiJson(), this.apiOptions())
431
+ .pipe(map(resp => RegisterResponse.fromProto(resp)));
432
+ }
433
+ }
434
+ AccountApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AccountApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
435
+ AccountApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AccountApiService, providedIn: 'root' });
436
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AccountApiService, decorators: [{
437
+ type: Injectable,
438
+ args: [{ providedIn: 'root' }]
439
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
440
+
441
+ class AccountService {
442
+ constructor(http, hostService, accountApiService) {
443
+ this.http = http;
444
+ this.hostService = hostService;
445
+ this.accountApiService = accountApiService;
446
+ }
447
+ register(businessData, contact, businessName, partnerId, marketId, email, recaptcha) {
448
+ // prepare request data
449
+ const requestData = {
450
+ businessData,
451
+ contact,
452
+ businessName,
453
+ partnerId,
454
+ marketId,
455
+ email,
456
+ recaptcha,
457
+ };
458
+ // http request call
459
+ const request = new RegisterRequest(requestData);
460
+ return this.accountApiService.register(request);
461
+ }
462
+ }
463
+ AccountService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AccountService, deps: [{ token: i1.HttpClient }, { token: HostService }, { token: AccountApiService }], target: i0.ɵɵFactoryTarget.Injectable });
464
+ AccountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AccountService, providedIn: 'root' });
465
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AccountService, decorators: [{
466
+ type: Injectable,
467
+ args: [{ providedIn: 'root' }]
468
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }, { type: AccountApiService }]; } });
469
+
470
+ // *********************************
471
+ class GetStartedApiService {
472
+ constructor(http, hostService) {
473
+ this.http = http;
474
+ this.hostService = hostService;
475
+ this._host = this.hostService.hostWithScheme;
476
+ }
477
+ apiOptions() {
478
+ return {
479
+ headers: new HttpHeaders({
480
+ 'Content-Type': 'application/json'
481
+ }),
482
+ withCredentials: true
483
+ };
484
+ }
485
+ getTracker(r) {
486
+ const request = (r.toApiJson) ? r : new GetTrackerRequest(r);
487
+ return this.http.post(this._host + "/business_center.v1.GetStarted/GetTracker", request.toApiJson(), this.apiOptions())
488
+ .pipe(map(resp => GetTrackerResponse.fromProto(resp)));
489
+ }
490
+ setTracker(r) {
491
+ const request = (r.toApiJson) ? r : new SetTrackerRequest(r);
492
+ return this.http.post(this._host + "/business_center.v1.GetStarted/SetTracker", request.toApiJson(), this.apiOptions())
493
+ .pipe(map(resp => SetTrackerResponse.fromProto(resp)));
494
+ }
495
+ }
496
+ GetStartedApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: GetStartedApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
497
+ GetStartedApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: GetStartedApiService, providedIn: 'root' });
498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: GetStartedApiService, decorators: [{
499
+ type: Injectable,
500
+ args: [{ providedIn: 'root' }]
501
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
502
+
503
+ class GetStartedService {
504
+ constructor(http, hostService, getStartedApiService) {
505
+ this.http = http;
506
+ this.hostService = hostService;
507
+ this.getStartedApiService = getStartedApiService;
508
+ }
509
+ setTracker(partnerId, userId, tracker) {
510
+ // prepare request data
511
+ const requestData = {
512
+ partnerId: partnerId,
513
+ userId: userId,
514
+ tracker: tracker
515
+ };
516
+ // http request call
517
+ const request = new SetTrackerRequest(requestData);
518
+ return this.getStartedApiService.setTracker(request);
519
+ }
520
+ getTracker(partnerId, userId) {
521
+ // prepare request data
522
+ const requestData = {
523
+ partnerId: partnerId,
524
+ userId: userId
525
+ };
526
+ // http request call
527
+ const request = new GetTrackerRequest(requestData);
528
+ return this.getStartedApiService.getTracker(request);
529
+ }
530
+ }
531
+ GetStartedService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: GetStartedService, deps: [{ token: i1.HttpClient }, { token: HostService }, { token: GetStartedApiService }], target: i0.ɵɵFactoryTarget.Injectable });
532
+ GetStartedService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: GetStartedService, providedIn: 'root' });
533
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: GetStartedService, decorators: [{
534
+ type: Injectable,
535
+ args: [{ providedIn: 'root' }]
536
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }, { type: GetStartedApiService }]; } });
537
+
538
+ // *********************************
539
+ class UserApiService {
540
+ constructor(http, hostService) {
541
+ this.http = http;
542
+ this.hostService = hostService;
543
+ this._host = this.hostService.hostWithScheme;
544
+ }
545
+ apiOptions() {
546
+ return {
547
+ headers: new HttpHeaders({
548
+ 'Content-Type': 'application/json'
549
+ }),
550
+ withCredentials: true
551
+ };
552
+ }
553
+ getCreatePasswordUrl(r) {
554
+ const request = (r.toApiJson) ? r : new GetCreatePasswordUrlRequest(r);
555
+ return this.http.post(this._host + "/business_center.v1.User/GetCreatePasswordUrl", request.toApiJson(), this.apiOptions())
556
+ .pipe(map(resp => GetCreatePasswordUrlResponse.fromProto(resp)));
557
+ }
558
+ sendWelcomeEmail(r) {
559
+ const request = (r.toApiJson) ? r : new SendWelcomeEmailRequest(r);
560
+ return this.http.post(this._host + "/business_center.v1.User/SendWelcomeEmail", request.toApiJson(), { ...this.apiOptions(), observe: 'response' });
561
+ }
562
+ }
563
+ UserApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: UserApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
564
+ UserApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: UserApiService, providedIn: 'root' });
565
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: UserApiService, decorators: [{
566
+ type: Injectable,
567
+ args: [{ providedIn: 'root' }]
568
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
569
+
570
+ // *********************************
571
+
572
+ class UserService {
573
+ constructor(http, hostService, userApiService) {
574
+ this.http = http;
575
+ this.hostService = hostService;
576
+ this.userApiService = userApiService;
577
+ }
578
+ sendWelcomeEmail(partnerId, userId, loginUrl, usePartnerDefaultDomain = false, marketId) {
579
+ const requestData = {
580
+ partnerId: partnerId,
581
+ userId: userId,
582
+ loginUrl: loginUrl,
583
+ usePlatformDefaultDomain: usePartnerDefaultDomain || false,
584
+ marketId: marketId
585
+ };
586
+ const request = new SendWelcomeEmailRequest(requestData);
587
+ return this.userApiService.sendWelcomeEmail(request).pipe(map(res => res.status === 200));
588
+ }
589
+ }
590
+ UserService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: UserService, deps: [{ token: i1.HttpClient }, { token: HostService }, { token: UserApiService }], target: i0.ɵɵFactoryTarget.Injectable });
591
+ UserService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: UserService, providedIn: 'root' });
592
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: UserService, decorators: [{
593
+ type: Injectable,
594
+ args: [{ providedIn: 'root' }]
595
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }, { type: UserApiService }]; } });
596
+
597
+ /**
598
+ * Generated bundle index. Do not edit.
599
+ */
600
+
601
+ export { AccountService, Address, BusinessData, Contact, GetStartedService, SendWelcomeEmailRequest, Trackers, UserService };
602
+ //# sourceMappingURL=vendasta-business-center.mjs.map