@vendasta/iam 2.2.2 → 2.3.0

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 (119) hide show
  1. package/esm2020/lib/_generated/host.service.mjs +25 -0
  2. package/esm2020/lib/_generated/index.mjs +2 -0
  3. package/esm2020/lib/_internal/enums/api.enum.mjs +22 -0
  4. package/esm2020/lib/_internal/enums/index.mjs +12 -0
  5. package/esm2020/lib/_internal/enums/policies.enum.mjs +18 -0
  6. package/esm2020/lib/_internal/enums/resources.enum.mjs +14 -0
  7. package/esm2020/lib/_internal/enums/subjects.enum.mjs +17 -0
  8. package/esm2020/lib/_internal/enums/users.enum.mjs +13 -0
  9. package/esm2020/lib/_internal/iam.api.service.mjs +189 -0
  10. package/esm2020/lib/_internal/index.mjs +12 -0
  11. package/esm2020/lib/_internal/interfaces/annotations.interface.mjs +8 -0
  12. package/esm2020/lib/_internal/interfaces/api.interface.mjs +2 -0
  13. package/esm2020/lib/_internal/interfaces/attributes.interface.mjs +8 -0
  14. package/esm2020/lib/_internal/interfaces/field-mask.interface.mjs +8 -0
  15. package/esm2020/lib/_internal/interfaces/index.mjs +2 -0
  16. package/esm2020/lib/_internal/interfaces/policies.interface.mjs +3 -0
  17. package/esm2020/lib/_internal/interfaces/resources.interface.mjs +2 -0
  18. package/esm2020/lib/_internal/interfaces/security-logs.interface.mjs +8 -0
  19. package/esm2020/lib/_internal/interfaces/subjects.interface.mjs +2 -0
  20. package/esm2020/lib/_internal/interfaces/users.interface.mjs +2 -0
  21. package/esm2020/lib/_internal/objects/annotations.mjs +30 -0
  22. package/esm2020/lib/_internal/objects/api.mjs +1846 -0
  23. package/esm2020/lib/_internal/objects/attributes.mjs +158 -0
  24. package/esm2020/lib/_internal/objects/field-mask.mjs +27 -0
  25. package/esm2020/lib/_internal/objects/index.mjs +16 -0
  26. package/esm2020/lib/_internal/objects/policies.mjs +264 -0
  27. package/esm2020/lib/_internal/objects/resources.mjs +168 -0
  28. package/esm2020/lib/_internal/objects/security-logs.mjs +42 -0
  29. package/esm2020/lib/_internal/objects/subjects.mjs +352 -0
  30. package/esm2020/lib/_internal/objects/users.mjs +168 -0
  31. package/esm2020/lib/_internal/user-iam.api.service.mjs +65 -0
  32. package/esm2020/lib/http/http.interface.mjs +2 -0
  33. package/esm2020/lib/http/http.mjs +104 -0
  34. package/esm2020/lib/http/iam.http.api.service.mjs +67 -0
  35. package/esm2020/lib/iam.service.mjs +155 -0
  36. package/esm2020/lib/index.mjs +7 -0
  37. package/esm2020/lib/personas/account-group.mjs +9 -0
  38. package/esm2020/lib/personas/base-personas.mjs +93 -0
  39. package/esm2020/lib/personas/developer.mjs +9 -0
  40. package/esm2020/lib/personas/digital-agent.mjs +9 -0
  41. package/esm2020/lib/personas/index.mjs +12 -0
  42. package/esm2020/lib/personas/partner-app.mjs +9 -0
  43. package/esm2020/lib/personas/partner.mjs +25 -0
  44. package/esm2020/lib/personas/persona-type.enum.mjs +13 -0
  45. package/esm2020/lib/personas/personas.mjs +57 -0
  46. package/esm2020/lib/personas/salesperson.mjs +15 -0
  47. package/esm2020/lib/personas/smb.mjs +10 -0
  48. package/esm2020/lib/personas/success.mjs +9 -0
  49. package/esm2020/lib/personas/vendor.mjs +9 -0
  50. package/esm2020/public_api.mjs +2 -0
  51. package/esm2020/vendasta-iam.mjs +5 -0
  52. package/fesm2015/{vendasta-iam.js → vendasta-iam.mjs} +362 -386
  53. package/fesm2015/vendasta-iam.mjs.map +1 -0
  54. package/fesm2020/vendasta-iam.mjs +3937 -0
  55. package/fesm2020/vendasta-iam.mjs.map +1 -0
  56. package/lib/_generated/host.service.d.ts +4 -11
  57. package/lib/_internal/iam.api.service.d.ts +3 -2
  58. package/lib/_internal/user-iam.api.service.d.ts +3 -2
  59. package/lib/http/iam.http.api.service.d.ts +3 -2
  60. package/lib/iam.service.d.ts +2 -2
  61. package/package.json +27 -16
  62. package/{README.md → src/README.md} +0 -0
  63. package/CHANGELOG.md +0 -101
  64. package/bundles/vendasta-iam.umd.js +0 -4531
  65. package/bundles/vendasta-iam.umd.js.map +0 -1
  66. package/bundles/vendasta-iam.umd.min.js +0 -16
  67. package/bundles/vendasta-iam.umd.min.js.map +0 -1
  68. package/esm2015/lib/_generated/host.service.js +0 -64
  69. package/esm2015/lib/_generated/index.js +0 -2
  70. package/esm2015/lib/_internal/enums/api.enum.js +0 -22
  71. package/esm2015/lib/_internal/enums/index.js +0 -12
  72. package/esm2015/lib/_internal/enums/policies.enum.js +0 -18
  73. package/esm2015/lib/_internal/enums/resources.enum.js +0 -14
  74. package/esm2015/lib/_internal/enums/subjects.enum.js +0 -17
  75. package/esm2015/lib/_internal/enums/users.enum.js +0 -13
  76. package/esm2015/lib/_internal/iam.api.service.js +0 -188
  77. package/esm2015/lib/_internal/index.js +0 -12
  78. package/esm2015/lib/_internal/interfaces/annotations.interface.js +0 -8
  79. package/esm2015/lib/_internal/interfaces/api.interface.js +0 -2
  80. package/esm2015/lib/_internal/interfaces/attributes.interface.js +0 -8
  81. package/esm2015/lib/_internal/interfaces/field-mask.interface.js +0 -8
  82. package/esm2015/lib/_internal/interfaces/index.js +0 -2
  83. package/esm2015/lib/_internal/interfaces/policies.interface.js +0 -3
  84. package/esm2015/lib/_internal/interfaces/resources.interface.js +0 -2
  85. package/esm2015/lib/_internal/interfaces/security-logs.interface.js +0 -8
  86. package/esm2015/lib/_internal/interfaces/subjects.interface.js +0 -2
  87. package/esm2015/lib/_internal/interfaces/users.interface.js +0 -2
  88. package/esm2015/lib/_internal/objects/annotations.js +0 -30
  89. package/esm2015/lib/_internal/objects/api.js +0 -1846
  90. package/esm2015/lib/_internal/objects/attributes.js +0 -158
  91. package/esm2015/lib/_internal/objects/field-mask.js +0 -27
  92. package/esm2015/lib/_internal/objects/index.js +0 -16
  93. package/esm2015/lib/_internal/objects/policies.js +0 -264
  94. package/esm2015/lib/_internal/objects/resources.js +0 -168
  95. package/esm2015/lib/_internal/objects/security-logs.js +0 -42
  96. package/esm2015/lib/_internal/objects/subjects.js +0 -352
  97. package/esm2015/lib/_internal/objects/users.js +0 -168
  98. package/esm2015/lib/_internal/user-iam.api.service.js +0 -64
  99. package/esm2015/lib/http/http.interface.js +0 -2
  100. package/esm2015/lib/http/http.js +0 -102
  101. package/esm2015/lib/http/iam.http.api.service.js +0 -65
  102. package/esm2015/lib/iam.service.js +0 -152
  103. package/esm2015/lib/index.js +0 -7
  104. package/esm2015/lib/personas/account-group.js +0 -9
  105. package/esm2015/lib/personas/base-personas.js +0 -89
  106. package/esm2015/lib/personas/developer.js +0 -9
  107. package/esm2015/lib/personas/digital-agent.js +0 -9
  108. package/esm2015/lib/personas/index.js +0 -12
  109. package/esm2015/lib/personas/partner-app.js +0 -9
  110. package/esm2015/lib/personas/partner.js +0 -25
  111. package/esm2015/lib/personas/persona-type.enum.js +0 -13
  112. package/esm2015/lib/personas/personas.js +0 -57
  113. package/esm2015/lib/personas/salesperson.js +0 -15
  114. package/esm2015/lib/personas/smb.js +0 -10
  115. package/esm2015/lib/personas/success.js +0 -9
  116. package/esm2015/lib/personas/vendor.js +0 -9
  117. package/esm2015/public_api.js +0 -2
  118. package/esm2015/vendasta-iam.js +0 -5
  119. package/fesm2015/vendasta-iam.js.map +0 -1
@@ -1,9 +1,11 @@
1
- import { ɵɵinject, ɵɵdefineInjectable, ɵsetClassMetadata, Injectable } from '@angular/core';
2
- import { Environment, EnvironmentService, SessionService } from '@vendasta/core';
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable } from '@angular/core';
3
3
  import { map, share, switchMap } from 'rxjs/operators';
4
- import { HttpHeaders, HttpClient } from '@angular/common/http';
4
+ import * as i1 from '@angular/common/http';
5
+ import { HttpHeaders } from '@angular/common/http';
6
+ import * as i3 from '@vendasta/core';
5
7
 
6
- function enumStringToValue(enumRef, value) {
8
+ function enumStringToValue$8(enumRef, value) {
7
9
  if (typeof value === 'number') {
8
10
  return value;
9
11
  }
@@ -247,7 +249,7 @@ var UserSortField;
247
249
 
248
250
  // *********************************
249
251
 
250
- function enumStringToValue$1(enumRef, value) {
252
+ function enumStringToValue$7(enumRef, value) {
251
253
  if (typeof value === 'number') {
252
254
  return value;
253
255
  }
@@ -424,7 +426,7 @@ class PublicKey {
424
426
  let m = new PublicKey();
425
427
  m = Object.assign(m, proto);
426
428
  if (proto.algorithmType) {
427
- m.algorithmType = enumStringToValue$1(AlgorithmType, proto.algorithmType);
429
+ m.algorithmType = enumStringToValue$7(AlgorithmType, proto.algorithmType);
428
430
  }
429
431
  return m;
430
432
  }
@@ -597,7 +599,7 @@ class TypedContext {
597
599
  }
598
600
  }
599
601
 
600
- function enumStringToValue$2(enumRef, value) {
602
+ function enumStringToValue$6(enumRef, value) {
601
603
  if (typeof value === 'number') {
602
604
  return value;
603
605
  }
@@ -625,7 +627,7 @@ class FieldMask {
625
627
  }
626
628
 
627
629
  // NOTE: THIS HAS BEEN MANUALLY EDITED. PLEASE SEE THE BELOW COMMENTS TO SEE WHERE IT HAS BEEN EDITED
628
- function enumStringToValue$3(enumRef, value) {
630
+ function enumStringToValue$5(enumRef, value) {
629
631
  if (typeof value === 'number') {
630
632
  return value;
631
633
  }
@@ -681,7 +683,7 @@ class Operator {
681
683
  m = Object.assign(m, proto);
682
684
  // Edited from e.policiesBooleanOperator to e.BooleanOperator
683
685
  if (proto.operator) {
684
- m.operator = enumStringToValue$3(BooleanOperator, proto.operator);
686
+ m.operator = enumStringToValue$5(BooleanOperator, proto.operator);
685
687
  }
686
688
  if (proto.children) {
687
689
  m.children = proto.children.map(PolicyNode.fromProto);
@@ -789,7 +791,7 @@ class SubjectResourceForClause {
789
791
  let m = new SubjectResourceForClause();
790
792
  m = Object.assign(m, proto);
791
793
  if (proto.operator) {
792
- m.operator = enumStringToValue$3(ForOperator, proto.operator);
794
+ m.operator = enumStringToValue$5(ForOperator, proto.operator);
793
795
  }
794
796
  if (proto.rules) {
795
797
  m.rules = PolicyNode.fromProto(proto.rules);
@@ -1052,7 +1054,7 @@ class ValueList {
1052
1054
  }
1053
1055
  }
1054
1056
 
1055
- function enumStringToValue$5(enumRef, value) {
1057
+ function enumStringToValue$3(enumRef, value) {
1056
1058
  if (typeof value === 'number') {
1057
1059
  return value;
1058
1060
  }
@@ -1094,7 +1096,7 @@ class SecurityLog {
1094
1096
  }
1095
1097
  }
1096
1098
 
1097
- function enumStringToValue$6(enumRef, value) {
1099
+ function enumStringToValue$2(enumRef, value) {
1098
1100
  if (typeof value === 'number') {
1099
1101
  return value;
1100
1102
  }
@@ -1261,7 +1263,7 @@ class User {
1261
1263
  }
1262
1264
  }
1263
1265
 
1264
- function enumStringToValue$7(enumRef, value) {
1266
+ function enumStringToValue$1(enumRef, value) {
1265
1267
  if (typeof value === 'number') {
1266
1268
  return value;
1267
1269
  }
@@ -1284,7 +1286,7 @@ class AccessResourceRequest {
1284
1286
  m.resourceEntityIdentifier = Object.keys(proto.resourceEntityIdentifier).reduce((obj, k) => { obj[k] = ValueList.fromProto(proto.resourceEntityIdentifier[k]); return obj; }, {});
1285
1287
  }
1286
1288
  if (proto.accessScope) {
1287
- m.accessScope = proto.accessScope.map((v) => enumStringToValue$7(AccessScope, v));
1289
+ m.accessScope = proto.accessScope.map((v) => enumStringToValue$1(AccessScope, v));
1288
1290
  }
1289
1291
  if (proto.resourceEntityIdentifiers) {
1290
1292
  m.resourceEntityIdentifiers = proto.resourceEntityIdentifiers.map(ResourceIdentifier.fromProto);
@@ -1349,7 +1351,7 @@ class AddKeyRequest {
1349
1351
  m.context = Context.fromProto(proto.context);
1350
1352
  }
1351
1353
  if (proto.algorithmType) {
1352
- m.algorithmType = enumStringToValue$7(AlgorithmType, proto.algorithmType);
1354
+ m.algorithmType = enumStringToValue$1(AlgorithmType, proto.algorithmType);
1353
1355
  }
1354
1356
  if (proto.userIdentifier) {
1355
1357
  m.userIdentifier = UserIdentifier.fromProto(proto.userIdentifier);
@@ -1410,7 +1412,7 @@ class AddMultiUserRestrictionRequest {
1410
1412
  m.userIdentifiers = proto.userIdentifiers.map(UserIdentifier.fromProto);
1411
1413
  }
1412
1414
  if (proto.restrictionType) {
1413
- m.restrictionType = enumStringToValue$7(RestrictionType, proto.restrictionType);
1415
+ m.restrictionType = enumStringToValue$1(RestrictionType, proto.restrictionType);
1414
1416
  }
1415
1417
  return m;
1416
1418
  }
@@ -2684,7 +2686,7 @@ class RemoveMultiUserRestrictionRequest {
2684
2686
  m.userIdentifiers = proto.userIdentifiers.map(UserIdentifier.fromProto);
2685
2687
  }
2686
2688
  if (proto.restrictionType) {
2687
- m.restrictionType = enumStringToValue$7(RestrictionType, proto.restrictionType);
2689
+ m.restrictionType = enumStringToValue$1(RestrictionType, proto.restrictionType);
2688
2690
  }
2689
2691
  return m;
2690
2692
  }
@@ -2817,7 +2819,7 @@ class SearchSubjectRequest {
2817
2819
  m.filters = proto.filters.map(SingleValueAttribute.fromProto);
2818
2820
  }
2819
2821
  if (proto.orderByDirection) {
2820
- m.orderByDirection = enumStringToValue$7(OrderByDirection, proto.orderByDirection);
2822
+ m.orderByDirection = enumStringToValue$1(OrderByDirection, proto.orderByDirection);
2821
2823
  }
2822
2824
  if (proto.pageSize) {
2823
2825
  m.pageSize = parseInt(proto.pageSize, 10);
@@ -3061,10 +3063,10 @@ class UserSortOptions {
3061
3063
  let m = new UserSortOptions();
3062
3064
  m = Object.assign(m, proto);
3063
3065
  if (proto.direction) {
3064
- m.direction = enumStringToValue$7(SortDirection, proto.direction);
3066
+ m.direction = enumStringToValue$1(SortDirection, proto.direction);
3065
3067
  }
3066
3068
  if (proto.field) {
3067
- m.field = enumStringToValue$7(UserSortField, proto.field);
3069
+ m.field = enumStringToValue$1(UserSortField, proto.field);
3068
3070
  }
3069
3071
  return m;
3070
3072
  }
@@ -3100,308 +3102,6 @@ class VerifyEmailRequest {
3100
3102
  }
3101
3103
  }
3102
3104
 
3103
- function enumStringToValue$8(enumRef, value) {
3104
- if (typeof value === 'number') {
3105
- return value;
3106
- }
3107
- return enumRef[value];
3108
- }
3109
- class Access {
3110
- constructor(kwargs) {
3111
- if (!kwargs) {
3112
- return;
3113
- }
3114
- Object.assign(this, kwargs);
3115
- }
3116
- static fromProto(proto) {
3117
- let m = new Access();
3118
- m = Object.assign(m, proto);
3119
- return m;
3120
- }
3121
- toApiJson() {
3122
- const toReturn = {};
3123
- if (typeof this.scope !== 'undefined') {
3124
- toReturn['scope'] = this.scope;
3125
- }
3126
- if (typeof this.public !== 'undefined') {
3127
- toReturn['public'] = this.public;
3128
- }
3129
- return toReturn;
3130
- }
3131
- }
3132
-
3133
- // *********************************
3134
-
3135
- class HostService {
3136
- constructor(environmentService) {
3137
- this.environmentService = environmentService;
3138
- }
3139
- host() {
3140
- if (this._host) {
3141
- return this._host;
3142
- }
3143
- switch (this.environmentService.getEnvironment()) {
3144
- case Environment.LOCAL:
3145
- this._host = 'iam.vendasta-local.com';
3146
- break;
3147
- case Environment.TEST:
3148
- this._host = '';
3149
- break;
3150
- case Environment.DEMO:
3151
- this._host = 'iam-api-demo.apigateway.co';
3152
- break;
3153
- case Environment.PROD:
3154
- this._host = 'iam-api-prod.apigateway.co';
3155
- break;
3156
- }
3157
- return this._host;
3158
- }
3159
- httpsHost() {
3160
- if (this._httpsHost) {
3161
- return this._httpsHost;
3162
- }
3163
- switch (this.environmentService.getEnvironment()) {
3164
- case Environment.LOCAL:
3165
- this._httpsHost = 'iam.vendasta-local.com';
3166
- break;
3167
- case Environment.TEST:
3168
- this._httpsHost = '';
3169
- break;
3170
- case Environment.DEMO:
3171
- this._httpsHost = 'iam-demo.apigateway.co';
3172
- break;
3173
- case Environment.PROD:
3174
- this._httpsHost = 'iam-prod.apigateway.co';
3175
- break;
3176
- }
3177
- return this._httpsHost;
3178
- }
3179
- hostWithScheme() {
3180
- const scheme = this.environmentService.getEnvironment() === Environment.LOCAL ? 'http://' : 'https://';
3181
- return scheme + this.host();
3182
- }
3183
- httpsHostWithScheme() {
3184
- const scheme = this.environmentService.getEnvironment() === Environment.LOCAL ? 'http://' : 'https://';
3185
- return scheme + this.httpsHost();
3186
- }
3187
- }
3188
- HostService.ɵfac = function HostService_Factory(t) { return new (t || HostService)(ɵɵinject(EnvironmentService)); };
3189
- HostService.ɵprov = ɵɵdefineInjectable({ token: HostService, factory: HostService.ɵfac, providedIn: 'root' });
3190
- /*@__PURE__*/ (function () { ɵsetClassMetadata(HostService, [{
3191
- type: Injectable,
3192
- args: [{ providedIn: 'root' }]
3193
- }], function () { return [{ type: EnvironmentService }]; }, null); })();
3194
-
3195
- // *********************************
3196
- class UserIAMApiService {
3197
- constructor(http, hostService) {
3198
- this.http = http;
3199
- this.hostService = hostService;
3200
- }
3201
- apiOptions() {
3202
- return {
3203
- headers: new HttpHeaders({
3204
- 'Content-Type': 'application/json'
3205
- }),
3206
- withCredentials: true
3207
- };
3208
- }
3209
- getSubjectBySession(r) {
3210
- const request = (r.toApiJson) ? r : new GetSubjectBySessionRequest(r);
3211
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/GetSubjectBySession", request.toApiJson(), this.apiOptions())
3212
- .pipe(map(resp => GetSubjectResponse.fromProto(resp)), share());
3213
- }
3214
- listPersonas(r) {
3215
- const request = (r.toApiJson) ? r : new ListPersonasRequest(r);
3216
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/ListPersonas", request.toApiJson(), this.apiOptions())
3217
- .pipe(map(resp => ListPersonasResponse.fromProto(resp)), share());
3218
- }
3219
- getToken(r) {
3220
- const request = (r.toApiJson) ? r : new GetTokenRequest(r);
3221
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/GetToken", request.toApiJson(), this.apiOptions())
3222
- .pipe(map(resp => GetTokenResponse.fromProto(resp)), share());
3223
- }
3224
- getSessionToken(r) {
3225
- const request = (r.toApiJson) ? r : new GetSessionTokenRequest(r);
3226
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/GetSessionToken", request.toApiJson(), this.apiOptions())
3227
- .pipe(map(resp => GetTokenResponse.fromProto(resp)), share());
3228
- }
3229
- resetPasswordWithToken(r) {
3230
- const request = (r.toApiJson) ? r : new ResetPasswordWithTokenRequest(r);
3231
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/ResetPasswordWithToken", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3232
- }
3233
- getImpersonationToken(r) {
3234
- const request = (r.toApiJson) ? r : new GetImpersonationTokenRequest(r);
3235
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/GetImpersonationToken", request.toApiJson(), this.apiOptions())
3236
- .pipe(map(resp => GetImpersonationTokenResponse.fromProto(resp)), share());
3237
- }
3238
- }
3239
- UserIAMApiService.ɵfac = function UserIAMApiService_Factory(t) { return new (t || UserIAMApiService)(ɵɵinject(HttpClient), ɵɵinject(HostService)); };
3240
- UserIAMApiService.ɵprov = ɵɵdefineInjectable({ token: UserIAMApiService, factory: UserIAMApiService.ɵfac, providedIn: 'root' });
3241
- /*@__PURE__*/ (function () { ɵsetClassMetadata(UserIAMApiService, [{
3242
- type: Injectable,
3243
- args: [{ providedIn: 'root' }]
3244
- }], function () { return [{ type: HttpClient }, { type: HostService }]; }, null); })();
3245
-
3246
- class LoginRequest {
3247
- constructor(kwargs) {
3248
- if (!kwargs) {
3249
- return;
3250
- }
3251
- Object.assign(this, kwargs);
3252
- }
3253
- static fromProto(proto) {
3254
- if (!proto) {
3255
- return new LoginRequest();
3256
- }
3257
- let m = new LoginRequest();
3258
- m = Object.assign(m, proto);
3259
- return m;
3260
- }
3261
- toApiJson() {
3262
- if (typeof this.namespace === 'undefined' &&
3263
- typeof this.type === 'undefined' &&
3264
- typeof this.email === 'undefined' &&
3265
- typeof this.password === 'undefined' &&
3266
- typeof this.providerIdToken === 'undefined' &&
3267
- typeof this.provider === 'undefined') {
3268
- return {};
3269
- }
3270
- return {
3271
- 'namespace': (typeof this.namespace !== 'undefined') ? this.namespace : null,
3272
- 'type': (typeof this.type !== 'undefined') ? this.type : null,
3273
- 'email': (typeof this.email !== 'undefined') ? this.email : null,
3274
- 'password': (typeof this.password !== 'undefined') ? this.password : null,
3275
- 'provider_id_token': (typeof this.providerIdToken !== 'undefined') ? this.providerIdToken : null,
3276
- 'provider': (typeof this.provider !== 'undefined') ? this.provider : null
3277
- };
3278
- }
3279
- }
3280
- class LoginResponse {
3281
- constructor(kwargs) {
3282
- if (!kwargs) {
3283
- return;
3284
- }
3285
- Object.assign(this, kwargs);
3286
- }
3287
- static fromProto(proto) {
3288
- const m = new LoginResponse();
3289
- m.sessionId = proto['session_id'];
3290
- return m;
3291
- }
3292
- toApiJson() {
3293
- if (typeof this.sessionId === 'undefined') {
3294
- return {};
3295
- }
3296
- return {
3297
- 'sessionId': (typeof this.sessionId !== 'undefined') ? this.sessionId : null
3298
- };
3299
- }
3300
- }
3301
- class LogoutResponse {
3302
- constructor(kwargs) {
3303
- if (!kwargs) {
3304
- return;
3305
- }
3306
- Object.assign(this, kwargs);
3307
- }
3308
- static fromProto(proto) {
3309
- let m = new LogoutResponse();
3310
- m = Object.assign(m, proto);
3311
- return m;
3312
- }
3313
- toApiJson() {
3314
- if (typeof this.success === 'undefined') {
3315
- return {};
3316
- }
3317
- return {
3318
- 'success': (typeof this.success !== 'undefined') ? this.success : null
3319
- };
3320
- }
3321
- }
3322
- class SSOLoginRequest {
3323
- constructor(kwargs) {
3324
- if (!kwargs) {
3325
- return;
3326
- }
3327
- Object.assign(this, kwargs);
3328
- }
3329
- static fromProto(proto) {
3330
- let m = new SSOLoginRequest();
3331
- m = Object.assign(m, proto);
3332
- return m;
3333
- }
3334
- toApiJson() {
3335
- if (typeof this.nextUrl === 'undefined' &&
3336
- typeof this.namespace === 'undefined' &&
3337
- typeof this.type === 'undefined') {
3338
- return null;
3339
- }
3340
- return {
3341
- 'next_url': (typeof this.nextUrl !== 'undefined') ? this.nextUrl : null,
3342
- 'namespace': (typeof this.namespace !== 'undefined') ? this.namespace : null,
3343
- 'type': (typeof this.type !== 'undefined') ? this.type : null
3344
- };
3345
- }
3346
- }
3347
-
3348
- class IamHttpApiService {
3349
- constructor(http, hostService) {
3350
- this.http = http;
3351
- this.hostService = hostService;
3352
- }
3353
- apiOptions(includeCredentials) {
3354
- if (includeCredentials) {
3355
- return {
3356
- headers: new HttpHeaders({
3357
- 'Content-Type': 'application/x-www-form-urlencoded',
3358
- }),
3359
- withCredentials: true,
3360
- };
3361
- }
3362
- return {
3363
- headers: new HttpHeaders({
3364
- 'Content-Type': 'application/x-www-form-urlencoded',
3365
- }),
3366
- };
3367
- }
3368
- login(r) {
3369
- const toApiJson = r.toApiJson;
3370
- const request = typeof toApiJson !== 'undefined' ? r : new LoginRequest(r);
3371
- return this.http
3372
- .post(this.hostService.httpsHostWithScheme() + '/_ajax/v1/login', request.toApiJson(), this.apiOptions())
3373
- .pipe(map((resp) => LoginResponse.fromProto(resp)), share());
3374
- }
3375
- logout() {
3376
- return this.http
3377
- .post(this.hostService.httpsHostWithScheme() + '/_ajax/v1/logout', {}, this.apiOptions(true))
3378
- .pipe(map((resp) => LogoutResponse.fromProto(resp)), share());
3379
- }
3380
- ssoLogin(r) {
3381
- const toApiJson = r.toApiJson;
3382
- const request = typeof toApiJson !== 'undefined' ? r : new SSOLoginRequest(r);
3383
- const params = new URLSearchParams();
3384
- const apiJson = request.toApiJson();
3385
- for (const key in apiJson) {
3386
- if (!apiJson.hasOwnProperty(key)) {
3387
- continue;
3388
- }
3389
- const value = apiJson[key];
3390
- if (value === null) {
3391
- continue;
3392
- }
3393
- params.append(key, value);
3394
- }
3395
- window.location.href = `${this.hostService.httpsHostWithScheme()}/sso-login?${params.toString()}`;
3396
- }
3397
- }
3398
- IamHttpApiService.ɵfac = function IamHttpApiService_Factory(t) { return new (t || IamHttpApiService)(ɵɵinject(HttpClient), ɵɵinject(HostService)); };
3399
- IamHttpApiService.ɵprov = ɵɵdefineInjectable({ token: IamHttpApiService, factory: IamHttpApiService.ɵfac, providedIn: 'root' });
3400
- /*@__PURE__*/ (function () { ɵsetClassMetadata(IamHttpApiService, [{
3401
- type: Injectable,
3402
- args: [{ providedIn: 'root' }]
3403
- }], function () { return [{ type: HttpClient }, { type: HostService }]; }, null); })();
3404
-
3405
3105
  var PersonaType;
3406
3106
  (function (PersonaType) {
3407
3107
  PersonaType["partner"] = "partner";
@@ -3430,6 +3130,7 @@ class BasePersona {
3430
3130
  if (!attributes) {
3431
3131
  return this;
3432
3132
  }
3133
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
3433
3134
  const attrs = getValueFromAttribute({ structAttribute: { attributes: attributes.attributes } });
3434
3135
  Object.assign(this, attrs);
3435
3136
  return this;
@@ -3465,7 +3166,9 @@ function getValueFromAttribute(attr) {
3465
3166
  }
3466
3167
  else if (typeof attr.listAttribute !== 'undefined') {
3467
3168
  const vals = [];
3169
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
3468
3170
  if (typeof attr.listAttribute.attributes === 'undefined') {
3171
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
3469
3172
  return vals;
3470
3173
  }
3471
3174
  for (const val of attr.listAttribute.attributes) {
@@ -3485,6 +3188,7 @@ function getValueFromAttribute(attr) {
3485
3188
  if (!attr.structAttribute.attributes.hasOwnProperty(a)) {
3486
3189
  continue;
3487
3190
  }
3191
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
3488
3192
  result[CamelCase(a)] = getValueFromAttribute(attr.structAttribute.attributes[a]);
3489
3193
  }
3490
3194
  return result;
@@ -3637,11 +3341,283 @@ function getPersonaFromType(personaType) {
3637
3341
  }[personaType]();
3638
3342
  }
3639
3343
 
3344
+ function enumStringToValue(enumRef, value) {
3345
+ if (typeof value === 'number') {
3346
+ return value;
3347
+ }
3348
+ return enumRef[value];
3349
+ }
3350
+ class Access {
3351
+ constructor(kwargs) {
3352
+ if (!kwargs) {
3353
+ return;
3354
+ }
3355
+ Object.assign(this, kwargs);
3356
+ }
3357
+ static fromProto(proto) {
3358
+ let m = new Access();
3359
+ m = Object.assign(m, proto);
3360
+ return m;
3361
+ }
3362
+ toApiJson() {
3363
+ const toReturn = {};
3364
+ if (typeof this.scope !== 'undefined') {
3365
+ toReturn['scope'] = this.scope;
3366
+ }
3367
+ if (typeof this.public !== 'undefined') {
3368
+ toReturn['public'] = this.public;
3369
+ }
3370
+ return toReturn;
3371
+ }
3372
+ }
3373
+
3374
+ // *********************************
3375
+
3376
+ var _a;
3377
+ const environment = (_a = (window ? window['environment'] : 'prod')) !== null && _a !== void 0 ? _a : 'prod';
3378
+ const hostMap = {
3379
+ 'local': 'iam.vendasta-local.com',
3380
+ 'test': '',
3381
+ 'demo': 'iam-api-demo.apigateway.co',
3382
+ 'prod': 'iam-api-prod.apigateway.co',
3383
+ 'production': 'iam-api-prod.apigateway.co',
3384
+ };
3385
+ class HostService {
3386
+ get host() {
3387
+ return hostMap[environment.toLowerCase()];
3388
+ }
3389
+ get hostWithScheme() {
3390
+ return 'https://' + this.host;
3391
+ }
3392
+ }
3393
+ HostService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: HostService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3394
+ HostService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: HostService, providedIn: 'root' });
3395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: HostService, decorators: [{
3396
+ type: Injectable,
3397
+ args: [{ providedIn: 'root' }]
3398
+ }] });
3399
+
3400
+ // *********************************
3401
+ class UserIAMApiService {
3402
+ constructor(http, hostService) {
3403
+ this.http = http;
3404
+ this.hostService = hostService;
3405
+ this._host = this.hostService.hostWithScheme;
3406
+ }
3407
+ apiOptions() {
3408
+ return {
3409
+ headers: new HttpHeaders({
3410
+ 'Content-Type': 'application/json'
3411
+ }),
3412
+ withCredentials: true
3413
+ };
3414
+ }
3415
+ getSubjectBySession(r) {
3416
+ const request = (r.toApiJson) ? r : new GetSubjectBySessionRequest(r);
3417
+ return this.http.post(this._host + "/iam.v1.UserIAM/GetSubjectBySession", request.toApiJson(), this.apiOptions())
3418
+ .pipe(map(resp => GetSubjectResponse.fromProto(resp)));
3419
+ }
3420
+ listPersonas(r) {
3421
+ const request = (r.toApiJson) ? r : new ListPersonasRequest(r);
3422
+ return this.http.post(this._host + "/iam.v1.UserIAM/ListPersonas", request.toApiJson(), this.apiOptions())
3423
+ .pipe(map(resp => ListPersonasResponse.fromProto(resp)));
3424
+ }
3425
+ getToken(r) {
3426
+ const request = (r.toApiJson) ? r : new GetTokenRequest(r);
3427
+ return this.http.post(this._host + "/iam.v1.UserIAM/GetToken", request.toApiJson(), this.apiOptions())
3428
+ .pipe(map(resp => GetTokenResponse.fromProto(resp)));
3429
+ }
3430
+ getSessionToken(r) {
3431
+ const request = (r.toApiJson) ? r : new GetSessionTokenRequest(r);
3432
+ return this.http.post(this._host + "/iam.v1.UserIAM/GetSessionToken", request.toApiJson(), this.apiOptions())
3433
+ .pipe(map(resp => GetTokenResponse.fromProto(resp)));
3434
+ }
3435
+ resetPasswordWithToken(r) {
3436
+ const request = (r.toApiJson) ? r : new ResetPasswordWithTokenRequest(r);
3437
+ return this.http.post(this._host + "/iam.v1.UserIAM/ResetPasswordWithToken", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3438
+ }
3439
+ getImpersonationToken(r) {
3440
+ const request = (r.toApiJson) ? r : new GetImpersonationTokenRequest(r);
3441
+ return this.http.post(this._host + "/iam.v1.UserIAM/GetImpersonationToken", request.toApiJson(), this.apiOptions())
3442
+ .pipe(map(resp => GetImpersonationTokenResponse.fromProto(resp)));
3443
+ }
3444
+ }
3445
+ UserIAMApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: UserIAMApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
3446
+ UserIAMApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: UserIAMApiService, providedIn: 'root' });
3447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: UserIAMApiService, decorators: [{
3448
+ type: Injectable,
3449
+ args: [{ providedIn: 'root' }]
3450
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
3451
+
3452
+ class LoginRequest {
3453
+ constructor(kwargs) {
3454
+ if (!kwargs) {
3455
+ return;
3456
+ }
3457
+ Object.assign(this, kwargs);
3458
+ }
3459
+ static fromProto(proto) {
3460
+ if (!proto) {
3461
+ return new LoginRequest();
3462
+ }
3463
+ let m = new LoginRequest();
3464
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
3465
+ m = Object.assign(m, proto);
3466
+ return m;
3467
+ }
3468
+ toApiJson() {
3469
+ if (typeof this.namespace === 'undefined' &&
3470
+ typeof this.type === 'undefined' &&
3471
+ typeof this.email === 'undefined' &&
3472
+ typeof this.password === 'undefined' &&
3473
+ typeof this.providerIdToken === 'undefined' &&
3474
+ typeof this.provider === 'undefined') {
3475
+ return {};
3476
+ }
3477
+ return {
3478
+ 'namespace': (typeof this.namespace !== 'undefined') ? this.namespace : null,
3479
+ 'type': (typeof this.type !== 'undefined') ? this.type : null,
3480
+ 'email': (typeof this.email !== 'undefined') ? this.email : null,
3481
+ 'password': (typeof this.password !== 'undefined') ? this.password : null,
3482
+ 'provider_id_token': (typeof this.providerIdToken !== 'undefined') ? this.providerIdToken : null,
3483
+ 'provider': (typeof this.provider !== 'undefined') ? this.provider : null
3484
+ };
3485
+ }
3486
+ }
3487
+ class LoginResponse {
3488
+ constructor(kwargs) {
3489
+ if (!kwargs) {
3490
+ return;
3491
+ }
3492
+ Object.assign(this, kwargs);
3493
+ }
3494
+ static fromProto(proto) {
3495
+ /* eslint-disable */
3496
+ const m = new LoginResponse();
3497
+ m.sessionId = proto['session_id'];
3498
+ return m;
3499
+ }
3500
+ toApiJson() {
3501
+ if (typeof this.sessionId === 'undefined') {
3502
+ return {};
3503
+ }
3504
+ return {
3505
+ 'sessionId': (typeof this.sessionId !== 'undefined') ? this.sessionId : null
3506
+ };
3507
+ }
3508
+ }
3509
+ class LogoutResponse {
3510
+ constructor(kwargs) {
3511
+ if (!kwargs) {
3512
+ return;
3513
+ }
3514
+ Object.assign(this, kwargs);
3515
+ }
3516
+ static fromProto(proto) {
3517
+ let m = new LogoutResponse();
3518
+ m = Object.assign(m, proto);
3519
+ return m;
3520
+ }
3521
+ toApiJson() {
3522
+ if (typeof this.success === 'undefined') {
3523
+ return {};
3524
+ }
3525
+ return {
3526
+ 'success': (typeof this.success !== 'undefined') ? this.success : null
3527
+ };
3528
+ }
3529
+ }
3530
+ class SSOLoginRequest {
3531
+ constructor(kwargs) {
3532
+ if (!kwargs) {
3533
+ return;
3534
+ }
3535
+ Object.assign(this, kwargs);
3536
+ }
3537
+ static fromProto(proto) {
3538
+ let m = new SSOLoginRequest();
3539
+ m = Object.assign(m, proto);
3540
+ return m;
3541
+ }
3542
+ toApiJson() {
3543
+ if (typeof this.nextUrl === 'undefined' &&
3544
+ typeof this.namespace === 'undefined' &&
3545
+ typeof this.type === 'undefined') {
3546
+ return null;
3547
+ }
3548
+ return {
3549
+ 'next_url': (typeof this.nextUrl !== 'undefined') ? this.nextUrl : null,
3550
+ 'namespace': (typeof this.namespace !== 'undefined') ? this.namespace : null,
3551
+ 'type': (typeof this.type !== 'undefined') ? this.type : null
3552
+ };
3553
+ }
3554
+ }
3555
+
3556
+ /* eslint-disable */
3557
+ class IamHttpApiService {
3558
+ constructor(http, hostService) {
3559
+ this.http = http;
3560
+ this.hostService = hostService;
3561
+ this._host = this.hostService.hostWithScheme;
3562
+ }
3563
+ apiOptions(includeCredentials) {
3564
+ if (includeCredentials) {
3565
+ return {
3566
+ headers: new HttpHeaders({
3567
+ 'Content-Type': 'application/x-www-form-urlencoded',
3568
+ }),
3569
+ withCredentials: true,
3570
+ };
3571
+ }
3572
+ return {
3573
+ headers: new HttpHeaders({
3574
+ 'Content-Type': 'application/x-www-form-urlencoded',
3575
+ }),
3576
+ };
3577
+ }
3578
+ login(r) {
3579
+ const toApiJson = r.toApiJson;
3580
+ const request = typeof toApiJson !== 'undefined' ? r : new LoginRequest(r);
3581
+ return this.http
3582
+ .post(this._host + '/_ajax/v1/login', request.toApiJson(), this.apiOptions())
3583
+ .pipe(map((resp) => LoginResponse.fromProto(resp)), share());
3584
+ }
3585
+ logout() {
3586
+ return this.http
3587
+ .post(this._host + '/_ajax/v1/logout', {}, this.apiOptions(true))
3588
+ .pipe(map((resp) => LogoutResponse.fromProto(resp)), share());
3589
+ }
3590
+ ssoLogin(r) {
3591
+ const toApiJson = r.toApiJson;
3592
+ const request = typeof toApiJson !== 'undefined' ? r : new SSOLoginRequest(r);
3593
+ const params = new URLSearchParams();
3594
+ const apiJson = request.toApiJson();
3595
+ for (const key in apiJson) {
3596
+ if (!apiJson.hasOwnProperty(key)) {
3597
+ continue;
3598
+ }
3599
+ const value = apiJson[key];
3600
+ if (value === null) {
3601
+ continue;
3602
+ }
3603
+ params.append(key, value);
3604
+ }
3605
+ window.location.href = `${this._host}/sso-login?${params.toString()}`;
3606
+ }
3607
+ }
3608
+ IamHttpApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: IamHttpApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
3609
+ IamHttpApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: IamHttpApiService, providedIn: 'root' });
3610
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: IamHttpApiService, decorators: [{
3611
+ type: Injectable,
3612
+ args: [{ providedIn: 'root' }]
3613
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
3614
+
3640
3615
  // *********************************
3641
3616
  class IAMApiService {
3642
3617
  constructor(http, hostService) {
3643
3618
  this.http = http;
3644
3619
  this.hostService = hostService;
3620
+ this._host = this.hostService.hostWithScheme;
3645
3621
  }
3646
3622
  apiOptions() {
3647
3623
  return {
@@ -3653,164 +3629,164 @@ class IAMApiService {
3653
3629
  }
3654
3630
  registerSubject(r) {
3655
3631
  const request = (r.toApiJson) ? r : new RegisterSubjectRequest(r);
3656
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RegisterSubject", request.toApiJson(), this.apiOptions())
3657
- .pipe(map(resp => RegisterSubjectResponse.fromProto(resp)), share());
3632
+ return this.http.post(this._host + "/iam.v1.IAM/RegisterSubject", request.toApiJson(), this.apiOptions())
3633
+ .pipe(map(resp => RegisterSubjectResponse.fromProto(resp)));
3658
3634
  }
3659
3635
  authenticateSubject(r) {
3660
3636
  const request = (r.toApiJson) ? r : new AuthenticateSubjectRequest(r);
3661
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/AuthenticateSubject", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3637
+ return this.http.post(this._host + "/iam.v1.IAM/AuthenticateSubject", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3662
3638
  }
3663
3639
  getSubjects(r) {
3664
3640
  const request = (r.toApiJson) ? r : new GetSubjectsRequest(r);
3665
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetSubjects", request.toApiJson(), this.apiOptions())
3666
- .pipe(map(resp => GetSubjectsResponse.fromProto(resp)), share());
3641
+ return this.http.post(this._host + "/iam.v1.IAM/GetSubjects", request.toApiJson(), this.apiOptions())
3642
+ .pipe(map(resp => GetSubjectsResponse.fromProto(resp)));
3667
3643
  }
3668
3644
  getSubjectsByEmail(r) {
3669
3645
  const request = (r.toApiJson) ? r : new GetSubjectsByEmailRequest(r);
3670
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetSubjectsByEmail", request.toApiJson(), this.apiOptions())
3671
- .pipe(map(resp => GetSubjectsResponse.fromProto(resp)), share());
3646
+ return this.http.post(this._host + "/iam.v1.IAM/GetSubjectsByEmail", request.toApiJson(), this.apiOptions())
3647
+ .pipe(map(resp => GetSubjectsResponse.fromProto(resp)));
3672
3648
  }
3673
3649
  mutateAttributes(r) {
3674
3650
  const request = (r.toApiJson) ? r : new MutateAttributesRequest(r);
3675
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/MutateAttributes", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3651
+ return this.http.post(this._host + "/iam.v1.IAM/MutateAttributes", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3676
3652
  }
3677
3653
  resetSubjectPassword(r) {
3678
3654
  const request = (r.toApiJson) ? r : new ResetSubjectPasswordRequest(r);
3679
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ResetSubjectPassword", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3655
+ return this.http.post(this._host + "/iam.v1.IAM/ResetSubjectPassword", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3680
3656
  }
3681
3657
  changeSubjectEmail(r) {
3682
3658
  const request = (r.toApiJson) ? r : new ChangeSubjectEmailRequest(r);
3683
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ChangeSubjectEmail", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3659
+ return this.http.post(this._host + "/iam.v1.IAM/ChangeSubjectEmail", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3684
3660
  }
3685
3661
  deleteSubject(r) {
3686
3662
  const request = (r.toApiJson) ? r : new DeleteSubjectRequest(r);
3687
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/DeleteSubject", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3663
+ return this.http.post(this._host + "/iam.v1.IAM/DeleteSubject", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3688
3664
  }
3689
3665
  searchSubject(r) {
3690
3666
  const request = (r.toApiJson) ? r : new SearchSubjectRequest(r);
3691
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/SearchSubject", request.toApiJson(), this.apiOptions())
3692
- .pipe(map(resp => SearchSubjectResponse.fromProto(resp)), share());
3667
+ return this.http.post(this._host + "/iam.v1.IAM/SearchSubject", request.toApiJson(), this.apiOptions())
3668
+ .pipe(map(resp => SearchSubjectResponse.fromProto(resp)));
3693
3669
  }
3694
3670
  getSubjectContext(r) {
3695
3671
  const request = (r.toApiJson) ? r : new GetSubjectContextRequest(r);
3696
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetSubjectContext", request.toApiJson(), this.apiOptions())
3697
- .pipe(map(resp => GetSubjectContextResponse.fromProto(resp)), share());
3672
+ return this.http.post(this._host + "/iam.v1.IAM/GetSubjectContext", request.toApiJson(), this.apiOptions())
3673
+ .pipe(map(resp => GetSubjectContextResponse.fromProto(resp)));
3698
3674
  }
3699
3675
  registerResourceOwner(r) {
3700
3676
  const request = (r.toApiJson) ? r : new RegisterResourceOwnerRequest(r);
3701
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RegisterResourceOwner", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3677
+ return this.http.post(this._host + "/iam.v1.IAM/RegisterResourceOwner", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3702
3678
  }
3703
3679
  registerResource(r) {
3704
3680
  const request = (r.toApiJson) ? r : new RegisterResourceRequest(r);
3705
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RegisterResource", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3681
+ return this.http.post(this._host + "/iam.v1.IAM/RegisterResource", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3706
3682
  }
3707
3683
  registerPolicy(r) {
3708
3684
  const request = (r.toApiJson) ? r : new RegisterPolicyRequest(r);
3709
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RegisterPolicy", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3685
+ return this.http.post(this._host + "/iam.v1.IAM/RegisterPolicy", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3710
3686
  }
3711
3687
  accessResource(r) {
3712
3688
  const request = (r.toApiJson) ? r : new AccessResourceRequest(r);
3713
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/AccessResource", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3689
+ return this.http.post(this._host + "/iam.v1.IAM/AccessResource", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3714
3690
  }
3715
3691
  getShortLivedToken(r) {
3716
3692
  const request = (r.toApiJson) ? r : new GetShortLivedTokenRequest(r);
3717
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetShortLivedToken", request.toApiJson(), this.apiOptions())
3718
- .pipe(map(resp => GetTokenResponse.fromProto(resp)), share());
3693
+ return this.http.post(this._host + "/iam.v1.IAM/GetShortLivedToken", request.toApiJson(), this.apiOptions())
3694
+ .pipe(map(resp => GetTokenResponse.fromProto(resp)));
3719
3695
  }
3720
3696
  getSessionToken(r) {
3721
3697
  const request = (r.toApiJson) ? r : new GetSessionTokenRequest(r);
3722
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetSessionToken", request.toApiJson(), this.apiOptions())
3723
- .pipe(map(resp => GetTokenResponse.fromProto(resp)), share());
3698
+ return this.http.post(this._host + "/iam.v1.IAM/GetSessionToken", request.toApiJson(), this.apiOptions())
3699
+ .pipe(map(resp => GetTokenResponse.fromProto(resp)));
3724
3700
  }
3725
3701
  addKey(r) {
3726
3702
  const request = (r.toApiJson) ? r : new AddKeyRequest(r);
3727
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/AddKey", request.toApiJson(), this.apiOptions())
3728
- .pipe(map(resp => AddKeyResponse.fromProto(resp)), share());
3703
+ return this.http.post(this._host + "/iam.v1.IAM/AddKey", request.toApiJson(), this.apiOptions())
3704
+ .pipe(map(resp => AddKeyResponse.fromProto(resp)));
3729
3705
  }
3730
3706
  removeKey(r) {
3731
3707
  const request = (r.toApiJson) ? r : new RemoveKeyRequest(r);
3732
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RemoveKey", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3708
+ return this.http.post(this._host + "/iam.v1.IAM/RemoveKey", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3733
3709
  }
3734
3710
  createSession(r) {
3735
3711
  const request = (r.toApiJson) ? r : new CreateSessionRequest(r);
3736
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/CreateSession", request.toApiJson(), this.apiOptions())
3737
- .pipe(map(resp => CreateSessionResponse.fromProto(resp)), share());
3712
+ return this.http.post(this._host + "/iam.v1.IAM/CreateSession", request.toApiJson(), this.apiOptions())
3713
+ .pipe(map(resp => CreateSessionResponse.fromProto(resp)));
3738
3714
  }
3739
3715
  getResetPasswordToken(r) {
3740
3716
  const request = (r.toApiJson) ? r : new GetResetPasswordTokenRequest(r);
3741
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetResetPasswordToken", request.toApiJson(), this.apiOptions())
3742
- .pipe(map(resp => ResetPasswordTokenResponse.fromProto(resp)), share());
3717
+ return this.http.post(this._host + "/iam.v1.IAM/GetResetPasswordToken", request.toApiJson(), this.apiOptions())
3718
+ .pipe(map(resp => ResetPasswordTokenResponse.fromProto(resp)));
3743
3719
  }
3744
3720
  listPersonasByEmail(r) {
3745
3721
  const request = (r.toApiJson) ? r : new ListPersonasByEmailRequest(r);
3746
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ListPersonasByEmail", request.toApiJson(), this.apiOptions())
3747
- .pipe(map(resp => ListPersonasResponse.fromProto(resp)), share());
3722
+ return this.http.post(this._host + "/iam.v1.IAM/ListPersonasByEmail", request.toApiJson(), this.apiOptions())
3723
+ .pipe(map(resp => ListPersonasResponse.fromProto(resp)));
3748
3724
  }
3749
3725
  listPersonas(r) {
3750
3726
  const request = (r.toApiJson) ? r : new IAMListPersonasRequest(r);
3751
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ListPersonas", request.toApiJson(), this.apiOptions())
3752
- .pipe(map(resp => ListPersonasResponse.fromProto(resp)), share());
3727
+ return this.http.post(this._host + "/iam.v1.IAM/ListPersonas", request.toApiJson(), this.apiOptions())
3728
+ .pipe(map(resp => ListPersonasResponse.fromProto(resp)));
3753
3729
  }
3754
3730
  createTemporarySubject(r) {
3755
3731
  const request = (r.toApiJson) ? r : new CreateTemporarySubjectRequest(r);
3756
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/CreateTemporarySubject", request.toApiJson(), this.apiOptions())
3757
- .pipe(map(resp => CreateTemporarySubjectResponse.fromProto(resp)), share());
3732
+ return this.http.post(this._host + "/iam.v1.IAM/CreateTemporarySubject", request.toApiJson(), this.apiOptions())
3733
+ .pipe(map(resp => CreateTemporarySubjectResponse.fromProto(resp)));
3758
3734
  }
3759
3735
  getMultiUsers(r) {
3760
3736
  const request = (r.toApiJson) ? r : new GetMultiUsersRequest(r);
3761
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetMultiUsers", request.toApiJson(), this.apiOptions())
3762
- .pipe(map(resp => GetMultiUsersResponse.fromProto(resp)), share());
3737
+ return this.http.post(this._host + "/iam.v1.IAM/GetMultiUsers", request.toApiJson(), this.apiOptions())
3738
+ .pipe(map(resp => GetMultiUsersResponse.fromProto(resp)));
3763
3739
  }
3764
3740
  listUsers(r) {
3765
3741
  const request = (r.toApiJson) ? r : new ListUsersRequest(r);
3766
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ListUsers", request.toApiJson(), this.apiOptions())
3767
- .pipe(map(resp => ListUsersResponse.fromProto(resp)), share());
3742
+ return this.http.post(this._host + "/iam.v1.IAM/ListUsers", request.toApiJson(), this.apiOptions())
3743
+ .pipe(map(resp => ListUsersResponse.fromProto(resp)));
3768
3744
  }
3769
3745
  updateUser(r) {
3770
3746
  const request = (r.toApiJson) ? r : new UpdateUserRequest(r);
3771
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/UpdateUser", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3747
+ return this.http.post(this._host + "/iam.v1.IAM/UpdateUser", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3772
3748
  }
3773
3749
  deleteUser(r) {
3774
3750
  const request = (r.toApiJson) ? r : new DeleteUserRequest(r);
3775
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/DeleteUser", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3751
+ return this.http.post(this._host + "/iam.v1.IAM/DeleteUser", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3776
3752
  }
3777
3753
  listSecurityLogs(r) {
3778
3754
  const request = (r.toApiJson) ? r : new ListSecurityLogsRequest(r);
3779
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ListSecurityLogs", request.toApiJson(), this.apiOptions())
3780
- .pipe(map(resp => ListSecurityLogsResponse.fromProto(resp)), share());
3755
+ return this.http.post(this._host + "/iam.v1.IAM/ListSecurityLogs", request.toApiJson(), this.apiOptions())
3756
+ .pipe(map(resp => ListSecurityLogsResponse.fromProto(resp)));
3781
3757
  }
3782
3758
  verifyEmail(r) {
3783
3759
  const request = (r.toApiJson) ? r : new VerifyEmailRequest(r);
3784
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/VerifyEmail", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3760
+ return this.http.post(this._host + "/iam.v1.IAM/VerifyEmail", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3785
3761
  }
3786
3762
  sendEmailVerification(r) {
3787
3763
  const request = (r.toApiJson) ? r : new SendEmailVerificationRequest(r);
3788
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/SendEmailVerification", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3764
+ return this.http.post(this._host + "/iam.v1.IAM/SendEmailVerification", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3789
3765
  }
3790
3766
  getMultiExternalId(r) {
3791
3767
  const request = (r.toApiJson) ? r : new GetMultiExternalIDRequest(r);
3792
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetMultiExternalID", request.toApiJson(), this.apiOptions())
3793
- .pipe(map(resp => GetMultiExternalIDResponse.fromProto(resp)), share());
3768
+ return this.http.post(this._host + "/iam.v1.IAM/GetMultiExternalID", request.toApiJson(), this.apiOptions())
3769
+ .pipe(map(resp => GetMultiExternalIDResponse.fromProto(resp)));
3794
3770
  }
3795
3771
  createExternalId(r) {
3796
3772
  const request = (r.toApiJson) ? r : new CreateExternalIDRequest(r);
3797
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/CreateExternalID", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3773
+ return this.http.post(this._host + "/iam.v1.IAM/CreateExternalID", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3798
3774
  }
3799
3775
  addMultiUserRestriction(r) {
3800
3776
  const request = (r.toApiJson) ? r : new AddMultiUserRestrictionRequest(r);
3801
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/AddMultiUserRestriction", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3777
+ return this.http.post(this._host + "/iam.v1.IAM/AddMultiUserRestriction", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3802
3778
  }
3803
3779
  removeMultiUserRestriction(r) {
3804
3780
  const request = (r.toApiJson) ? r : new RemoveMultiUserRestrictionRequest(r);
3805
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RemoveMultiUserRestriction", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3781
+ return this.http.post(this._host + "/iam.v1.IAM/RemoveMultiUserRestriction", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3806
3782
  }
3807
3783
  }
3808
- IAMApiService.ɵfac = function IAMApiService_Factory(t) { return new (t || IAMApiService)(ɵɵinject(HttpClient), ɵɵinject(HostService)); };
3809
- IAMApiService.ɵprov = ɵɵdefineInjectable({ token: IAMApiService, factory: IAMApiService.ɵfac, providedIn: 'root' });
3810
- /*@__PURE__*/ (function () { ɵsetClassMetadata(IAMApiService, [{
3811
- type: Injectable,
3812
- args: [{ providedIn: 'root' }]
3813
- }], function () { return [{ type: HttpClient }, { type: HostService }]; }, null); })();
3784
+ IAMApiService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: IAMApiService, deps: [{ token: i1.HttpClient }, { token: HostService }], target: i0.ɵɵFactoryTarget.Injectable });
3785
+ IAMApiService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: IAMApiService, providedIn: 'root' });
3786
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: IAMApiService, decorators: [{
3787
+ type: Injectable,
3788
+ args: [{ providedIn: 'root' }]
3789
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: HostService }]; } });
3814
3790
 
3815
3791
  class IAMService {
3816
3792
  constructor(api, httpApi, sessionService, iamApi) {
@@ -3942,12 +3918,12 @@ class IAMService {
3942
3918
  });
3943
3919
  }
3944
3920
  }
3945
- IAMService.ɵfac = function IAMService_Factory(t) { return new (t || IAMService)(ɵɵinject(UserIAMApiService), ɵɵinject(IamHttpApiService), ɵɵinject(SessionService), ɵɵinject(IAMApiService)); };
3946
- IAMService.ɵprov = ɵɵdefineInjectable({ token: IAMService, factory: IAMService.ɵfac, providedIn: 'root' });
3947
- /*@__PURE__*/ (function () { ɵsetClassMetadata(IAMService, [{
3948
- type: Injectable,
3949
- args: [{ providedIn: 'root' }]
3950
- }], function () { return [{ type: UserIAMApiService }, { type: IamHttpApiService }, { type: SessionService }, { type: IAMApiService }]; }, null); })();
3921
+ IAMService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: IAMService, deps: [{ token: UserIAMApiService }, { token: IamHttpApiService }, { token: i3.SessionService }, { token: IAMApiService }], target: i0.ɵɵFactoryTarget.Injectable });
3922
+ IAMService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: IAMService, providedIn: 'root' });
3923
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.0", ngImport: i0, type: IAMService, decorators: [{
3924
+ type: Injectable,
3925
+ args: [{ providedIn: 'root' }]
3926
+ }], ctorParameters: function () { return [{ type: UserIAMApiService }, { type: IamHttpApiService }, { type: i3.SessionService }, { type: IAMApiService }]; } });
3951
3927
 
3952
3928
  // *********************************
3953
3929
 
@@ -3956,4 +3932,4 @@ IAMService.ɵprov = ɵɵdefineInjectable({ token: IAMService, factory: IAMServic
3956
3932
  */
3957
3933
 
3958
3934
  export { Access, AccessCheckFailures, AccessResourceRequest, AccessResourceRequestResourceEntityIdentifierEntry, AccessScope, AddKeyRequest, AddKeyResponse, AddMultiUserRestrictionRequest, AlgorithmType, Attribute, AuthenticateSubjectRequest, BasePersona, BooleanOperator, ChangeSubjectEmailRequest, Context, CreateExternalIDRequest, CreateSessionRequest, CreateSessionResponse, CreateTemporarySubjectRequest, CreateTemporarySubjectResponse, DeleteSubjectRequest, DeleteUserRequest, DeveloperPersona, DigitalAgentPersona, FieldMask, ForOperator, GeoPointAttribute, GetImpersonationTokenRequest, GetImpersonationTokenResponse, GetMultiExternalIDRequest, GetMultiExternalIDResponse, GetMultiUsersRequest, GetMultiUsersResponse, GetMultiUsersResponseUserContainer, GetResetPasswordTokenRequest, GetSessionTokenRequest, GetShortLivedTokenRequest, GetSubjectBySessionRequest, GetSubjectContextRequest, GetSubjectContextResponse, GetSubjectResponse, GetSubjectsByEmailRequest, GetSubjectsRequest, GetSubjectsResponse, GetTokenRequest, GetTokenResponse, HostService, IAMApiService, IAMListPersonasRequest, IAMService, Identifier, IfClause, ListAttribute, ListPersonasByEmailRequest, ListPersonasRequest, ListPersonasResponse, ListSecurityLogsRequest, ListSecurityLogsRequestFilters, ListSecurityLogsResponse, ListUsersRequest, ListUsersResponse, MultiValueAttribute, MutateAttributesRequest, Mutation, NamespacedContext, NamespacedEmail, NamespacedPersona, NamespacedSession, OAuthCredentials, Operator, OrderByDirection, PartnerAppPersona, PartnerPersona, Persona, PersonaType, Policy, PolicyNode, PublicKey, Query, RegisterPolicyRequest, RegisterResourceOwnerRequest, RegisterResourceRequest, RegisterSubjectRequest, RegisterSubjectResponse, RemoveKeyRequest, RemoveMultiUserRestrictionRequest, ResetPasswordTokenResponse, ResetPasswordWithTokenRequest, ResetSubjectPasswordRequest, ResourceIdentifier, ResourceIdentifierIdentifiersEntry, ResourceOwner, RestrictionType, SMBPersona, SalespersonPersona, SearchSubjectRequest, SearchSubjectResponse, SecurityLog, SendEmailVerificationRequest, SingleValueAttribute, SortDirection, StructAttribute, StructAttributeAttributesEntry, Subject, SubjectCredentials, SubjectMissingValueClause, SubjectResourceForClause, SubjectResourceIntersectionClause, SubjectResourceSubsetClause, SubjectResult, SubjectValueIntersectionClause, TypedContext, TypedExternalIdentifier, TypedPersona, UpdateUserRequest, UpdateUserRequestOperation, User, UserFilter, UserIAMApiService, UserIdentifier, UserSortField, UserSortOptions, ValueList, VendorPersona, VerifyEmailRequest, fromPersona };
3959
- //# sourceMappingURL=vendasta-iam.js.map
3935
+ //# sourceMappingURL=vendasta-iam.mjs.map