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