@vendasta/iam 2.0.1 → 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 (135) 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} +683 -1244
  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 +5 -9
  57. package/lib/_internal/enums/index.d.ts +2 -1
  58. package/lib/_internal/enums/policies.enum.d.ts +9 -0
  59. package/lib/_internal/enums/resources.enum.d.ts +0 -9
  60. package/lib/_internal/iam.api.service.d.ts +4 -0
  61. package/lib/_internal/index.d.ts +0 -1
  62. package/lib/_internal/interfaces/annotations.interface.d.ts +4 -0
  63. package/lib/_internal/interfaces/api.interface.d.ts +5 -17
  64. package/lib/_internal/interfaces/attributes.interface.d.ts +26 -0
  65. package/lib/_internal/interfaces/index.d.ts +6 -3
  66. package/lib/_internal/interfaces/policies.interface.d.ts +42 -0
  67. package/lib/_internal/interfaces/resources.interface.d.ts +2 -41
  68. package/lib/_internal/interfaces/subjects.interface.d.ts +1 -26
  69. package/lib/_internal/objects/annotations.d.ts +9 -0
  70. package/lib/_internal/objects/api.d.ts +5 -23
  71. package/lib/_internal/objects/attributes.d.ts +43 -0
  72. package/lib/_internal/objects/index.d.ts +6 -3
  73. package/lib/_internal/objects/policies.d.ts +68 -0
  74. package/lib/_internal/objects/resources.d.ts +2 -65
  75. package/lib/_internal/objects/subjects.d.ts +1 -41
  76. package/lib/_internal/user-iam.api.service.d.ts +4 -0
  77. package/lib/http/iam.http.api.service.d.ts +4 -0
  78. package/lib/iam.service.d.ts +3 -0
  79. package/lib/personas/base-personas.d.ts +1 -1
  80. package/lib/personas/partner.d.ts +1 -0
  81. package/package.json +29 -16
  82. package/src/README.md +113 -0
  83. package/vendasta-iam.d.ts +1 -0
  84. package/bundles/vendasta-iam.umd.js +0 -5067
  85. package/bundles/vendasta-iam.umd.js.map +0 -1
  86. package/bundles/vendasta-iam.umd.min.js +0 -16
  87. package/bundles/vendasta-iam.umd.min.js.map +0 -1
  88. package/esm2015/lib/_generated/host.service.js +0 -65
  89. package/esm2015/lib/_generated/index.js +0 -2
  90. package/esm2015/lib/_internal/enums/api.enum.js +0 -22
  91. package/esm2015/lib/_internal/enums/index.js +0 -11
  92. package/esm2015/lib/_internal/enums/resources.enum.js +0 -25
  93. package/esm2015/lib/_internal/enums/subjects.enum.js +0 -17
  94. package/esm2015/lib/_internal/enums/users.enum.js +0 -13
  95. package/esm2015/lib/_internal/iam-sso.api.service.js +0 -42
  96. package/esm2015/lib/_internal/iam.api.service.js +0 -190
  97. package/esm2015/lib/_internal/index.js +0 -13
  98. package/esm2015/lib/_internal/interfaces/api.interface.js +0 -2
  99. package/esm2015/lib/_internal/interfaces/field-mask.interface.js +0 -8
  100. package/esm2015/lib/_internal/interfaces/index.js +0 -2
  101. package/esm2015/lib/_internal/interfaces/resources.interface.js +0 -2
  102. package/esm2015/lib/_internal/interfaces/security-logs.interface.js +0 -8
  103. package/esm2015/lib/_internal/interfaces/subjects.interface.js +0 -8
  104. package/esm2015/lib/_internal/interfaces/users.interface.js +0 -2
  105. package/esm2015/lib/_internal/objects/api.js +0 -2212
  106. package/esm2015/lib/_internal/objects/field-mask.js +0 -30
  107. package/esm2015/lib/_internal/objects/index.js +0 -13
  108. package/esm2015/lib/_internal/objects/resources.js +0 -483
  109. package/esm2015/lib/_internal/objects/security-logs.js +0 -49
  110. package/esm2015/lib/_internal/objects/subjects.js +0 -582
  111. package/esm2015/lib/_internal/objects/users.js +0 -199
  112. package/esm2015/lib/_internal/user-iam.api.service.js +0 -66
  113. package/esm2015/lib/http/http.interface.js +0 -2
  114. package/esm2015/lib/http/http.js +0 -102
  115. package/esm2015/lib/http/iam.http.api.service.js +0 -68
  116. package/esm2015/lib/iam.service.js +0 -156
  117. package/esm2015/lib/index.js +0 -7
  118. package/esm2015/lib/personas/account-group.js +0 -9
  119. package/esm2015/lib/personas/base-personas.js +0 -89
  120. package/esm2015/lib/personas/developer.js +0 -9
  121. package/esm2015/lib/personas/digital-agent.js +0 -9
  122. package/esm2015/lib/personas/index.js +0 -12
  123. package/esm2015/lib/personas/partner-app.js +0 -9
  124. package/esm2015/lib/personas/partner.js +0 -24
  125. package/esm2015/lib/personas/persona-type.enum.js +0 -13
  126. package/esm2015/lib/personas/personas.js +0 -57
  127. package/esm2015/lib/personas/salesperson.js +0 -15
  128. package/esm2015/lib/personas/smb.js +0 -10
  129. package/esm2015/lib/personas/success.js +0 -9
  130. package/esm2015/lib/personas/vendor.js +0 -9
  131. package/esm2015/public_api.js +0 -2
  132. package/esm2015/vendasta-iam.js +0 -5
  133. package/fesm2015/vendasta-iam.js.map +0 -1
  134. package/lib/_internal/iam-sso.api.service.d.ts +0 -12
  135. package/vendasta-iam.metadata.json +0 -1
@@ -1,88 +1,11 @@
1
- import { ɵɵdefineInjectable, ɵɵinject, 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
- // *********************************
7
- // Code generated by sdkgen
8
- // DO NOT EDIT!.
9
- //
10
- // Enums.
11
- // *********************************
12
- var AlgorithmType;
13
- (function (AlgorithmType) {
14
- AlgorithmType[AlgorithmType["ALGORITHM_TYPE_ES256"] = 0] = "ALGORITHM_TYPE_ES256";
15
- AlgorithmType[AlgorithmType["ALGORITHM_TYPE_RS256"] = 1] = "ALGORITHM_TYPE_RS256";
16
- })(AlgorithmType || (AlgorithmType = {}));
17
- var OrderByDirection;
18
- (function (OrderByDirection) {
19
- OrderByDirection[OrderByDirection["ASCENDING"] = 0] = "ASCENDING";
20
- OrderByDirection[OrderByDirection["DESCENDING"] = 1] = "DESCENDING";
21
- })(OrderByDirection || (OrderByDirection = {}));
22
-
23
- // *********************************
24
- // Code generated by sdkgen
25
- // DO NOT EDIT!.
26
- //
27
- // Enums.
28
- // *********************************
29
- var AccessScope;
30
- (function (AccessScope) {
31
- AccessScope[AccessScope["READ"] = 0] = "READ";
32
- AccessScope[AccessScope["WRITE"] = 1] = "WRITE";
33
- AccessScope[AccessScope["DELETE"] = 2] = "DELETE";
34
- AccessScope[AccessScope["LIST"] = 3] = "LIST";
35
- })(AccessScope || (AccessScope = {}));
36
- var BooleanOperator;
37
- (function (BooleanOperator) {
38
- BooleanOperator[BooleanOperator["AND"] = 0] = "AND";
39
- BooleanOperator[BooleanOperator["OR"] = 1] = "OR";
40
- BooleanOperator[BooleanOperator["NOT"] = 2] = "NOT";
41
- })(BooleanOperator || (BooleanOperator = {}));
42
- var ForOperator;
43
- (function (ForOperator) {
44
- ForOperator[ForOperator["ANY"] = 0] = "ANY";
45
- ForOperator[ForOperator["ALL"] = 1] = "ALL";
46
- })(ForOperator || (ForOperator = {}));
47
-
48
- // *********************************
49
- // Code generated by sdkgen
50
- // DO NOT EDIT!.
51
- //
52
- // Enums.
53
- // *********************************
54
- var RestrictionType;
55
- (function (RestrictionType) {
56
- RestrictionType[RestrictionType["RESTRICTION_TYPE_UNSET"] = 0] = "RESTRICTION_TYPE_UNSET";
57
- RestrictionType[RestrictionType["RESTRICTION_TYPE_RESET_PASSWORD_BEFORE_LOGIN"] = 1] = "RESTRICTION_TYPE_RESET_PASSWORD_BEFORE_LOGIN";
58
- RestrictionType[RestrictionType["RESTRICTION_TYPE_FROZEN"] = 2] = "RESTRICTION_TYPE_FROZEN";
59
- })(RestrictionType || (RestrictionType = {}));
60
-
61
- // *********************************
62
- // Code generated by sdkgen
63
- // DO NOT EDIT!.
64
- //
65
- // Enums.
66
- // *********************************
67
- var SortDirection;
68
- (function (SortDirection) {
69
- SortDirection[SortDirection["SORT_DIRECTION_INVALID"] = 0] = "SORT_DIRECTION_INVALID";
70
- SortDirection[SortDirection["SORT_DIRECTION_ASCENDING"] = 1] = "SORT_DIRECTION_ASCENDING";
71
- SortDirection[SortDirection["SORT_DIRECTION_DESCENDING"] = 2] = "SORT_DIRECTION_DESCENDING";
72
- })(SortDirection || (SortDirection = {}));
73
- var UserSortField;
74
- (function (UserSortField) {
75
- UserSortField[UserSortField["USER_SORT_FIELD_INVALID"] = 0] = "USER_SORT_FIELD_INVALID";
76
- UserSortField[UserSortField["USER_SORT_FIELD_CREATED"] = 1] = "USER_SORT_FIELD_CREATED";
77
- UserSortField[UserSortField["USER_SORT_FIELD_FIRST_NAME"] = 2] = "USER_SORT_FIELD_FIRST_NAME";
78
- UserSortField[UserSortField["USER_SORT_FIELD_LAST_NAME"] = 3] = "USER_SORT_FIELD_LAST_NAME";
79
- UserSortField[UserSortField["USER_SORT_FIELD_EMAIL"] = 4] = "USER_SORT_FIELD_EMAIL";
80
- UserSortField[UserSortField["USER_SORT_FIELD_LAST_LOGIN"] = 5] = "USER_SORT_FIELD_LAST_LOGIN";
81
- })(UserSortField || (UserSortField = {}));
82
-
83
- // *********************************
84
-
85
- function enumStringToValue(enumRef, value) {
8
+ function enumStringToValue$8(enumRef, value) {
86
9
  if (typeof value === 'number') {
87
10
  return value;
88
11
  }
@@ -116,16 +39,6 @@ class Attribute {
116
39
  return m;
117
40
  }
118
41
  toApiJson() {
119
- if (typeof this.intAttribute === 'undefined' &&
120
- typeof this.doubleAttribute === 'undefined' &&
121
- typeof this.stringAttribute === 'undefined' &&
122
- typeof this.boolAttribute === 'undefined' &&
123
- typeof this.structAttribute === 'undefined' &&
124
- typeof this.listAttribute === 'undefined' &&
125
- typeof this.timestampAttribute === 'undefined' &&
126
- typeof this.geopointAttribute === 'undefined') {
127
- return {};
128
- }
129
42
  const toReturn = {};
130
43
  if (typeof this.intAttribute !== 'undefined') {
131
44
  toReturn['intAttribute'] = this.intAttribute;
@@ -170,10 +83,6 @@ class StructAttributeAttributesEntry {
170
83
  return m;
171
84
  }
172
85
  toApiJson() {
173
- if (typeof this.key === 'undefined' &&
174
- typeof this.value === 'undefined') {
175
- return {};
176
- }
177
86
  const toReturn = {};
178
87
  if (typeof this.key !== 'undefined') {
179
88
  toReturn['key'] = this.key;
@@ -184,7 +93,7 @@ class StructAttributeAttributesEntry {
184
93
  return toReturn;
185
94
  }
186
95
  }
187
- class Context {
96
+ class GeoPointAttribute {
188
97
  constructor(kwargs) {
189
98
  if (!kwargs) {
190
99
  return;
@@ -192,32 +101,22 @@ class Context {
192
101
  Object.assign(this, kwargs);
193
102
  }
194
103
  static fromProto(proto) {
195
- let m = new Context();
104
+ let m = new GeoPointAttribute();
196
105
  m = Object.assign(m, proto);
197
- if (proto.namespaced) {
198
- m.namespaced = NamespacedContext.fromProto(proto.namespaced);
199
- }
200
- if (proto.typed) {
201
- m.typed = TypedContext.fromProto(proto.typed);
202
- }
203
106
  return m;
204
107
  }
205
108
  toApiJson() {
206
- if (typeof this.namespaced === 'undefined' &&
207
- typeof this.typed === 'undefined') {
208
- return {};
209
- }
210
109
  const toReturn = {};
211
- if (typeof this.namespaced !== 'undefined' && this.namespaced !== null) {
212
- toReturn['namespaced'] = 'toApiJson' in this.namespaced ? this.namespaced.toApiJson() : this.namespaced;
110
+ if (typeof this.latitude !== 'undefined') {
111
+ toReturn['latitude'] = this.latitude;
213
112
  }
214
- if (typeof this.typed !== 'undefined' && this.typed !== null) {
215
- toReturn['typed'] = 'toApiJson' in this.typed ? this.typed.toApiJson() : this.typed;
113
+ if (typeof this.longitude !== 'undefined') {
114
+ toReturn['longitude'] = this.longitude;
216
115
  }
217
116
  return toReturn;
218
117
  }
219
118
  }
220
- class GeoPointAttribute {
119
+ class ListAttribute {
221
120
  constructor(kwargs) {
222
121
  if (!kwargs) {
223
122
  return;
@@ -225,26 +124,22 @@ class GeoPointAttribute {
225
124
  Object.assign(this, kwargs);
226
125
  }
227
126
  static fromProto(proto) {
228
- let m = new GeoPointAttribute();
127
+ let m = new ListAttribute();
229
128
  m = Object.assign(m, proto);
129
+ if (proto.attributes) {
130
+ m.attributes = proto.attributes.map(Attribute.fromProto);
131
+ }
230
132
  return m;
231
133
  }
232
134
  toApiJson() {
233
- if (typeof this.latitude === 'undefined' &&
234
- typeof this.longitude === 'undefined') {
235
- return {};
236
- }
237
135
  const toReturn = {};
238
- if (typeof this.latitude !== 'undefined') {
239
- toReturn['latitude'] = this.latitude;
240
- }
241
- if (typeof this.longitude !== 'undefined') {
242
- toReturn['longitude'] = this.longitude;
136
+ if (typeof this.attributes !== 'undefined' && this.attributes !== null) {
137
+ toReturn['attributes'] = 'toApiJson' in this.attributes ? this.attributes.toApiJson() : this.attributes;
243
138
  }
244
139
  return toReturn;
245
140
  }
246
141
  }
247
- class ListAttribute {
142
+ class StructAttribute {
248
143
  constructor(kwargs) {
249
144
  if (!kwargs) {
250
145
  return;
@@ -252,17 +147,14 @@ class ListAttribute {
252
147
  Object.assign(this, kwargs);
253
148
  }
254
149
  static fromProto(proto) {
255
- let m = new ListAttribute();
150
+ let m = new StructAttribute();
256
151
  m = Object.assign(m, proto);
257
152
  if (proto.attributes) {
258
- m.attributes = proto.attributes.map(Attribute.fromProto);
153
+ m.attributes = Object.keys(proto.attributes).reduce((obj, k) => { obj[k] = Attribute.fromProto(proto.attributes[k]); return obj; }, {});
259
154
  }
260
155
  return m;
261
156
  }
262
157
  toApiJson() {
263
- if (typeof this.attributes === 'undefined') {
264
- return {};
265
- }
266
158
  const toReturn = {};
267
159
  if (typeof this.attributes !== 'undefined' && this.attributes !== null) {
268
160
  toReturn['attributes'] = 'toApiJson' in this.attributes ? this.attributes.toApiJson() : this.attributes;
@@ -270,6 +162,128 @@ class ListAttribute {
270
162
  return toReturn;
271
163
  }
272
164
  }
165
+
166
+ // *********************************
167
+ // Code generated by sdkgen
168
+ // DO NOT EDIT!.
169
+ //
170
+ // Enums.
171
+ // *********************************
172
+ var BooleanOperator;
173
+ (function (BooleanOperator) {
174
+ BooleanOperator[BooleanOperator["AND"] = 0] = "AND";
175
+ BooleanOperator[BooleanOperator["OR"] = 1] = "OR";
176
+ BooleanOperator[BooleanOperator["NOT"] = 2] = "NOT";
177
+ })(BooleanOperator || (BooleanOperator = {}));
178
+ var ForOperator;
179
+ (function (ForOperator) {
180
+ ForOperator[ForOperator["ANY"] = 0] = "ANY";
181
+ ForOperator[ForOperator["ALL"] = 1] = "ALL";
182
+ })(ForOperator || (ForOperator = {}));
183
+
184
+ // *********************************
185
+ // Code generated by sdkgen
186
+ // DO NOT EDIT!.
187
+ //
188
+ // Enums.
189
+ // *********************************
190
+ var AccessScope;
191
+ (function (AccessScope) {
192
+ AccessScope[AccessScope["READ"] = 0] = "READ";
193
+ AccessScope[AccessScope["WRITE"] = 1] = "WRITE";
194
+ AccessScope[AccessScope["DELETE"] = 2] = "DELETE";
195
+ AccessScope[AccessScope["LIST"] = 3] = "LIST";
196
+ })(AccessScope || (AccessScope = {}));
197
+
198
+ // *********************************
199
+ // Code generated by sdkgen
200
+ // DO NOT EDIT!.
201
+ //
202
+ // Enums.
203
+ // *********************************
204
+ var AlgorithmType;
205
+ (function (AlgorithmType) {
206
+ AlgorithmType[AlgorithmType["ALGORITHM_TYPE_ES256"] = 0] = "ALGORITHM_TYPE_ES256";
207
+ AlgorithmType[AlgorithmType["ALGORITHM_TYPE_RS256"] = 1] = "ALGORITHM_TYPE_RS256";
208
+ })(AlgorithmType || (AlgorithmType = {}));
209
+ var OrderByDirection;
210
+ (function (OrderByDirection) {
211
+ OrderByDirection[OrderByDirection["ASCENDING"] = 0] = "ASCENDING";
212
+ OrderByDirection[OrderByDirection["DESCENDING"] = 1] = "DESCENDING";
213
+ })(OrderByDirection || (OrderByDirection = {}));
214
+
215
+ // *********************************
216
+ // Code generated by sdkgen
217
+ // DO NOT EDIT!.
218
+ //
219
+ // Enums.
220
+ // *********************************
221
+ var RestrictionType;
222
+ (function (RestrictionType) {
223
+ RestrictionType[RestrictionType["RESTRICTION_TYPE_UNSET"] = 0] = "RESTRICTION_TYPE_UNSET";
224
+ RestrictionType[RestrictionType["RESTRICTION_TYPE_RESET_PASSWORD_BEFORE_LOGIN"] = 1] = "RESTRICTION_TYPE_RESET_PASSWORD_BEFORE_LOGIN";
225
+ RestrictionType[RestrictionType["RESTRICTION_TYPE_FROZEN"] = 2] = "RESTRICTION_TYPE_FROZEN";
226
+ })(RestrictionType || (RestrictionType = {}));
227
+
228
+ // *********************************
229
+ // Code generated by sdkgen
230
+ // DO NOT EDIT!.
231
+ //
232
+ // Enums.
233
+ // *********************************
234
+ var SortDirection;
235
+ (function (SortDirection) {
236
+ SortDirection[SortDirection["SORT_DIRECTION_INVALID"] = 0] = "SORT_DIRECTION_INVALID";
237
+ SortDirection[SortDirection["SORT_DIRECTION_ASCENDING"] = 1] = "SORT_DIRECTION_ASCENDING";
238
+ SortDirection[SortDirection["SORT_DIRECTION_DESCENDING"] = 2] = "SORT_DIRECTION_DESCENDING";
239
+ })(SortDirection || (SortDirection = {}));
240
+ var UserSortField;
241
+ (function (UserSortField) {
242
+ UserSortField[UserSortField["USER_SORT_FIELD_INVALID"] = 0] = "USER_SORT_FIELD_INVALID";
243
+ UserSortField[UserSortField["USER_SORT_FIELD_CREATED"] = 1] = "USER_SORT_FIELD_CREATED";
244
+ UserSortField[UserSortField["USER_SORT_FIELD_FIRST_NAME"] = 2] = "USER_SORT_FIELD_FIRST_NAME";
245
+ UserSortField[UserSortField["USER_SORT_FIELD_LAST_NAME"] = 3] = "USER_SORT_FIELD_LAST_NAME";
246
+ UserSortField[UserSortField["USER_SORT_FIELD_EMAIL"] = 4] = "USER_SORT_FIELD_EMAIL";
247
+ UserSortField[UserSortField["USER_SORT_FIELD_LAST_LOGIN"] = 5] = "USER_SORT_FIELD_LAST_LOGIN";
248
+ })(UserSortField || (UserSortField = {}));
249
+
250
+ // *********************************
251
+
252
+ function enumStringToValue$7(enumRef, value) {
253
+ if (typeof value === 'number') {
254
+ return value;
255
+ }
256
+ return enumRef[value];
257
+ }
258
+ class Context {
259
+ constructor(kwargs) {
260
+ if (!kwargs) {
261
+ return;
262
+ }
263
+ Object.assign(this, kwargs);
264
+ }
265
+ static fromProto(proto) {
266
+ let m = new Context();
267
+ m = Object.assign(m, proto);
268
+ if (proto.namespaced) {
269
+ m.namespaced = NamespacedContext.fromProto(proto.namespaced);
270
+ }
271
+ if (proto.typed) {
272
+ m.typed = TypedContext.fromProto(proto.typed);
273
+ }
274
+ return m;
275
+ }
276
+ toApiJson() {
277
+ const toReturn = {};
278
+ if (typeof this.namespaced !== 'undefined' && this.namespaced !== null) {
279
+ toReturn['namespaced'] = 'toApiJson' in this.namespaced ? this.namespaced.toApiJson() : this.namespaced;
280
+ }
281
+ if (typeof this.typed !== 'undefined' && this.typed !== null) {
282
+ toReturn['typed'] = 'toApiJson' in this.typed ? this.typed.toApiJson() : this.typed;
283
+ }
284
+ return toReturn;
285
+ }
286
+ }
273
287
  class MultiValueAttribute {
274
288
  constructor(kwargs) {
275
289
  if (!kwargs) {
@@ -283,10 +297,6 @@ class MultiValueAttribute {
283
297
  return m;
284
298
  }
285
299
  toApiJson() {
286
- if (typeof this.key === 'undefined' &&
287
- typeof this.values === 'undefined') {
288
- return {};
289
- }
290
300
  const toReturn = {};
291
301
  if (typeof this.key !== 'undefined') {
292
302
  toReturn['key'] = this.key;
@@ -328,15 +338,6 @@ class Mutation {
328
338
  return m;
329
339
  }
330
340
  toApiJson() {
331
- if (typeof this.add === 'undefined' &&
332
- typeof this.replace === 'undefined' &&
333
- typeof this.remove === 'undefined' &&
334
- typeof this.dropKey === 'undefined' &&
335
- typeof this.replaceAttributes === 'undefined' &&
336
- typeof this.addAttributes === 'undefined' &&
337
- typeof this.removeAttributes === 'undefined') {
338
- return {};
339
- }
340
341
  const toReturn = {};
341
342
  if (typeof this.add !== 'undefined' && this.add !== null) {
342
343
  toReturn['add'] = 'toApiJson' in this.add ? this.add.toApiJson() : this.add;
@@ -375,10 +376,6 @@ class NamespacedContext {
375
376
  return m;
376
377
  }
377
378
  toApiJson() {
378
- if (typeof this.namespace === 'undefined' &&
379
- typeof this.type === 'undefined') {
380
- return {};
381
- }
382
379
  const toReturn = {};
383
380
  if (typeof this.namespace !== 'undefined') {
384
381
  toReturn['namespace'] = this.namespace;
@@ -408,10 +405,6 @@ class Persona {
408
405
  return m;
409
406
  }
410
407
  toApiJson() {
411
- if (typeof this.subject === 'undefined' &&
412
- typeof this.context === 'undefined') {
413
- return {};
414
- }
415
408
  const toReturn = {};
416
409
  if (typeof this.subject !== 'undefined' && this.subject !== null) {
417
410
  toReturn['subject'] = 'toApiJson' in this.subject ? this.subject.toApiJson() : this.subject;
@@ -433,16 +426,11 @@ class PublicKey {
433
426
  let m = new PublicKey();
434
427
  m = Object.assign(m, proto);
435
428
  if (proto.algorithmType) {
436
- m.algorithmType = enumStringToValue(AlgorithmType, proto.algorithmType);
429
+ m.algorithmType = enumStringToValue$7(AlgorithmType, proto.algorithmType);
437
430
  }
438
431
  return m;
439
432
  }
440
433
  toApiJson() {
441
- if (typeof this.key === 'undefined' &&
442
- typeof this.id === 'undefined' &&
443
- typeof this.algorithmType === 'undefined') {
444
- return {};
445
- }
446
434
  const toReturn = {};
447
435
  if (typeof this.key !== 'undefined') {
448
436
  toReturn['key'] = this.key;
@@ -469,10 +457,6 @@ class Query {
469
457
  return m;
470
458
  }
471
459
  toApiJson() {
472
- if (typeof this.searchTerm === 'undefined' &&
473
- typeof this.attributeKeys === 'undefined') {
474
- return {};
475
- }
476
460
  const toReturn = {};
477
461
  if (typeof this.searchTerm !== 'undefined') {
478
462
  toReturn['searchTerm'] = this.searchTerm;
@@ -496,10 +480,6 @@ class SingleValueAttribute {
496
480
  return m;
497
481
  }
498
482
  toApiJson() {
499
- if (typeof this.key === 'undefined' &&
500
- typeof this.value === 'undefined') {
501
- return {};
502
- }
503
483
  const toReturn = {};
504
484
  if (typeof this.key !== 'undefined') {
505
485
  toReturn['key'] = this.key;
@@ -510,32 +490,6 @@ class SingleValueAttribute {
510
490
  return toReturn;
511
491
  }
512
492
  }
513
- class StructAttribute {
514
- constructor(kwargs) {
515
- if (!kwargs) {
516
- return;
517
- }
518
- Object.assign(this, kwargs);
519
- }
520
- static fromProto(proto) {
521
- let m = new StructAttribute();
522
- m = Object.assign(m, proto);
523
- if (proto.attributes) {
524
- m.attributes = Object.keys(proto.attributes).reduce((obj, k) => { obj[k] = Attribute.fromProto(proto.attributes[k]); return obj; }, {});
525
- }
526
- return m;
527
- }
528
- toApiJson() {
529
- if (typeof this.attributes === 'undefined') {
530
- return {};
531
- }
532
- const toReturn = {};
533
- if (typeof this.attributes !== 'undefined' && this.attributes !== null) {
534
- toReturn['attributes'] = 'toApiJson' in this.attributes ? this.attributes.toApiJson() : this.attributes;
535
- }
536
- return toReturn;
537
- }
538
- }
539
493
  class Subject {
540
494
  constructor(kwargs) {
541
495
  if (!kwargs) {
@@ -567,18 +521,6 @@ class Subject {
567
521
  return m;
568
522
  }
569
523
  toApiJson() {
570
- if (typeof this.subjectId === 'undefined' &&
571
- typeof this.email === 'undefined' &&
572
- typeof this.userId === 'undefined' &&
573
- typeof this.partnerId === 'undefined' &&
574
- typeof this.attributes === 'undefined' &&
575
- typeof this.created === 'undefined' &&
576
- typeof this.updated === 'undefined' &&
577
- typeof this.lastLogin === 'undefined' &&
578
- typeof this.publicKeys === 'undefined' &&
579
- typeof this.structAttributes === 'undefined') {
580
- return {};
581
- }
582
524
  const toReturn = {};
583
525
  if (typeof this.subjectId !== 'undefined') {
584
526
  toReturn['subjectId'] = this.subjectId;
@@ -629,9 +571,6 @@ class SubjectResult {
629
571
  return m;
630
572
  }
631
573
  toApiJson() {
632
- if (typeof this.subject === 'undefined') {
633
- return {};
634
- }
635
574
  const toReturn = {};
636
575
  if (typeof this.subject !== 'undefined' && this.subject !== null) {
637
576
  toReturn['subject'] = 'toApiJson' in this.subject ? this.subject.toApiJson() : this.subject;
@@ -652,9 +591,6 @@ class TypedContext {
652
591
  return m;
653
592
  }
654
593
  toApiJson() {
655
- if (typeof this.type === 'undefined') {
656
- return {};
657
- }
658
594
  const toReturn = {};
659
595
  if (typeof this.type !== 'undefined') {
660
596
  toReturn['type'] = this.type;
@@ -663,7 +599,7 @@ class TypedContext {
663
599
  }
664
600
  }
665
601
 
666
- function enumStringToValue$1(enumRef, value) {
602
+ function enumStringToValue$6(enumRef, value) {
667
603
  if (typeof value === 'number') {
668
604
  return value;
669
605
  }
@@ -682,9 +618,6 @@ class FieldMask {
682
618
  return m;
683
619
  }
684
620
  toApiJson() {
685
- if (typeof this.paths === 'undefined') {
686
- return {};
687
- }
688
621
  const toReturn = {};
689
622
  if (typeof this.paths !== 'undefined') {
690
623
  toReturn['paths'] = this.paths;
@@ -693,68 +626,13 @@ class FieldMask {
693
626
  }
694
627
  }
695
628
 
696
- function enumStringToValue$2(enumRef, value) {
629
+ // NOTE: THIS HAS BEEN MANUALLY EDITED. PLEASE SEE THE BELOW COMMENTS TO SEE WHERE IT HAS BEEN EDITED
630
+ function enumStringToValue$5(enumRef, value) {
697
631
  if (typeof value === 'number') {
698
632
  return value;
699
633
  }
700
634
  return enumRef[value];
701
635
  }
702
- class AccessCheckFailures {
703
- constructor(kwargs) {
704
- if (!kwargs) {
705
- return;
706
- }
707
- Object.assign(this, kwargs);
708
- }
709
- static fromProto(proto) {
710
- let m = new AccessCheckFailures();
711
- m = Object.assign(m, proto);
712
- if (proto.failures) {
713
- m.failures = proto.failures.map(ResourceIdentifier.fromProto);
714
- }
715
- return m;
716
- }
717
- toApiJson() {
718
- if (typeof this.failures === 'undefined') {
719
- return {};
720
- }
721
- const toReturn = {};
722
- if (typeof this.failures !== 'undefined' && this.failures !== null) {
723
- toReturn['failures'] = 'toApiJson' in this.failures ? this.failures.toApiJson() : this.failures;
724
- }
725
- return toReturn;
726
- }
727
- }
728
- class ResourceIdentifierIdentifiersEntry {
729
- constructor(kwargs) {
730
- if (!kwargs) {
731
- return;
732
- }
733
- Object.assign(this, kwargs);
734
- }
735
- static fromProto(proto) {
736
- let m = new ResourceIdentifierIdentifiersEntry();
737
- m = Object.assign(m, proto);
738
- if (proto.value) {
739
- m.value = ValueList.fromProto(proto.value);
740
- }
741
- return m;
742
- }
743
- toApiJson() {
744
- if (typeof this.key === 'undefined' &&
745
- typeof this.value === 'undefined') {
746
- return {};
747
- }
748
- const toReturn = {};
749
- if (typeof this.key !== 'undefined') {
750
- toReturn['key'] = this.key;
751
- }
752
- if (typeof this.value !== 'undefined' && this.value !== null) {
753
- toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
754
- }
755
- return toReturn;
756
- }
757
- }
758
636
  class IfClause {
759
637
  constructor(kwargs) {
760
638
  if (!kwargs) {
@@ -777,12 +655,6 @@ class IfClause {
777
655
  return m;
778
656
  }
779
657
  toApiJson() {
780
- if (typeof this.resourceAttributeName === 'undefined' &&
781
- typeof this.resourceAttributeValue === 'undefined' &&
782
- typeof this.thenPolicy === 'undefined' &&
783
- typeof this.elsePolicy === 'undefined') {
784
- return {};
785
- }
786
658
  const toReturn = {};
787
659
  if (typeof this.resourceAttributeName !== 'undefined') {
788
660
  toReturn['resourceAttributeName'] = this.resourceAttributeName;
@@ -809,8 +681,9 @@ class Operator {
809
681
  static fromProto(proto) {
810
682
  let m = new Operator();
811
683
  m = Object.assign(m, proto);
684
+ // Edited from e.policiesBooleanOperator to e.BooleanOperator
812
685
  if (proto.operator) {
813
- m.operator = enumStringToValue$2(BooleanOperator, proto.operator);
686
+ m.operator = enumStringToValue$5(BooleanOperator, proto.operator);
814
687
  }
815
688
  if (proto.children) {
816
689
  m.children = proto.children.map(PolicyNode.fromProto);
@@ -818,10 +691,6 @@ class Operator {
818
691
  return m;
819
692
  }
820
693
  toApiJson() {
821
- if (typeof this.operator === 'undefined' &&
822
- typeof this.children === 'undefined') {
823
- return {};
824
- }
825
694
  const toReturn = {};
826
695
  if (typeof this.operator !== 'undefined') {
827
696
  toReturn['operator'] = this.operator;
@@ -832,55 +701,6 @@ class Operator {
832
701
  return toReturn;
833
702
  }
834
703
  }
835
- class Policy {
836
- constructor(kwargs) {
837
- if (!kwargs) {
838
- return;
839
- }
840
- Object.assign(this, kwargs);
841
- }
842
- static fromProto(proto) {
843
- let m = new Policy();
844
- m = Object.assign(m, proto);
845
- if (proto.operations) {
846
- m.operations = proto.operations.map((v) => enumStringToValue$2(AccessScope, v));
847
- }
848
- if (proto.policy) {
849
- m.policy = PolicyNode.fromProto(proto.policy);
850
- }
851
- return m;
852
- }
853
- toApiJson() {
854
- if (typeof this.appId === 'undefined' &&
855
- typeof this.resourceId === 'undefined' &&
856
- typeof this.policyId === 'undefined' &&
857
- typeof this.policyName === 'undefined' &&
858
- typeof this.operations === 'undefined' &&
859
- typeof this.policy === 'undefined') {
860
- return {};
861
- }
862
- const toReturn = {};
863
- if (typeof this.appId !== 'undefined') {
864
- toReturn['appId'] = this.appId;
865
- }
866
- if (typeof this.resourceId !== 'undefined') {
867
- toReturn['resourceId'] = this.resourceId;
868
- }
869
- if (typeof this.policyId !== 'undefined') {
870
- toReturn['policyId'] = this.policyId;
871
- }
872
- if (typeof this.policyName !== 'undefined') {
873
- toReturn['policyName'] = this.policyName;
874
- }
875
- if (typeof this.operations !== 'undefined') {
876
- toReturn['operations'] = this.operations;
877
- }
878
- if (typeof this.policy !== 'undefined' && this.policy !== null) {
879
- toReturn['policy'] = 'toApiJson' in this.policy ? this.policy.toApiJson() : this.policy;
880
- }
881
- return toReturn;
882
- }
883
- }
884
704
  class PolicyNode {
885
705
  constructor(kwargs) {
886
706
  if (!kwargs) {
@@ -915,15 +735,6 @@ class PolicyNode {
915
735
  return m;
916
736
  }
917
737
  toApiJson() {
918
- if (typeof this.subjectResourceIntersection === 'undefined' &&
919
- typeof this.operator === 'undefined' &&
920
- typeof this.subjectValueIntersection === 'undefined' &&
921
- typeof this.subjectMissingValue === 'undefined' &&
922
- typeof this.subjectResourceSubset === 'undefined' &&
923
- typeof this.subjectResourceFor === 'undefined' &&
924
- typeof this.ifClause === 'undefined') {
925
- return {};
926
- }
927
738
  const toReturn = {};
928
739
  if (typeof this.subjectResourceIntersection !== 'undefined' && this.subjectResourceIntersection !== null) {
929
740
  toReturn['subjectResourceIntersection'] = 'toApiJson' in this.subjectResourceIntersection ? this.subjectResourceIntersection.toApiJson() : this.subjectResourceIntersection;
@@ -949,7 +760,7 @@ class PolicyNode {
949
760
  return toReturn;
950
761
  }
951
762
  }
952
- class ResourceIdentifier {
763
+ class SubjectMissingValueClause {
953
764
  constructor(kwargs) {
954
765
  if (!kwargs) {
955
766
  return;
@@ -957,25 +768,74 @@ class ResourceIdentifier {
957
768
  Object.assign(this, kwargs);
958
769
  }
959
770
  static fromProto(proto) {
960
- let m = new ResourceIdentifier();
771
+ let m = new SubjectMissingValueClause();
961
772
  m = Object.assign(m, proto);
962
- if (proto.identifiers) {
963
- m.identifiers = Object.keys(proto.identifiers).reduce((obj, k) => { obj[k] = ValueList.fromProto(proto.identifiers[k]); return obj; }, {});
773
+ return m;
774
+ }
775
+ toApiJson() {
776
+ const toReturn = {};
777
+ if (typeof this.attributeName !== 'undefined') {
778
+ toReturn['attributeName'] = this.attributeName;
779
+ }
780
+ return toReturn;
781
+ }
782
+ }
783
+ class SubjectResourceForClause {
784
+ constructor(kwargs) {
785
+ if (!kwargs) {
786
+ return;
787
+ }
788
+ Object.assign(this, kwargs);
789
+ }
790
+ static fromProto(proto) {
791
+ let m = new SubjectResourceForClause();
792
+ m = Object.assign(m, proto);
793
+ if (proto.operator) {
794
+ m.operator = enumStringToValue$5(ForOperator, proto.operator);
795
+ }
796
+ if (proto.rules) {
797
+ m.rules = PolicyNode.fromProto(proto.rules);
964
798
  }
965
799
  return m;
966
800
  }
967
801
  toApiJson() {
968
- if (typeof this.identifiers === 'undefined') {
969
- return {};
802
+ const toReturn = {};
803
+ if (typeof this.attributeName !== 'undefined') {
804
+ toReturn['attributeName'] = this.attributeName;
805
+ }
806
+ if (typeof this.operator !== 'undefined') {
807
+ toReturn['operator'] = this.operator;
808
+ }
809
+ if (typeof this.rules !== 'undefined' && this.rules !== null) {
810
+ toReturn['rules'] = 'toApiJson' in this.rules ? this.rules.toApiJson() : this.rules;
811
+ }
812
+ return toReturn;
813
+ }
814
+ }
815
+ class SubjectResourceIntersectionClause {
816
+ constructor(kwargs) {
817
+ if (!kwargs) {
818
+ return;
970
819
  }
820
+ Object.assign(this, kwargs);
821
+ }
822
+ static fromProto(proto) {
823
+ let m = new SubjectResourceIntersectionClause();
824
+ m = Object.assign(m, proto);
825
+ return m;
826
+ }
827
+ toApiJson() {
971
828
  const toReturn = {};
972
- if (typeof this.identifiers !== 'undefined' && this.identifiers !== null) {
973
- toReturn['identifiers'] = 'toApiJson' in this.identifiers ? this.identifiers.toApiJson() : this.identifiers;
829
+ if (typeof this.attributeName !== 'undefined') {
830
+ toReturn['attributeName'] = this.attributeName;
831
+ }
832
+ if (typeof this.resourceAttributeName !== 'undefined') {
833
+ toReturn['resourceAttributeName'] = this.resourceAttributeName;
974
834
  }
975
835
  return toReturn;
976
836
  }
977
837
  }
978
- class ResourceOwner {
838
+ class SubjectResourceSubsetClause {
979
839
  constructor(kwargs) {
980
840
  if (!kwargs) {
981
841
  return;
@@ -983,26 +843,58 @@ class ResourceOwner {
983
843
  Object.assign(this, kwargs);
984
844
  }
985
845
  static fromProto(proto) {
986
- let m = new ResourceOwner();
846
+ let m = new SubjectResourceSubsetClause();
987
847
  m = Object.assign(m, proto);
988
848
  return m;
989
849
  }
990
850
  toApiJson() {
991
- if (typeof this.appId === 'undefined' &&
992
- typeof this.appName === 'undefined') {
993
- return {};
851
+ const toReturn = {};
852
+ if (typeof this.attributeName !== 'undefined') {
853
+ toReturn['attributeName'] = this.attributeName;
854
+ }
855
+ if (typeof this.resourceAttributeName !== 'undefined') {
856
+ toReturn['resourceAttributeName'] = this.resourceAttributeName;
857
+ }
858
+ return toReturn;
859
+ }
860
+ }
861
+ class SubjectValueIntersectionClause {
862
+ constructor(kwargs) {
863
+ if (!kwargs) {
864
+ return;
994
865
  }
866
+ Object.assign(this, kwargs);
867
+ }
868
+ static fromProto(proto) {
869
+ let m = new SubjectValueIntersectionClause();
870
+ m = Object.assign(m, proto);
871
+ if (proto.structuredAttributeValue) {
872
+ m.structuredAttributeValue = Attribute.fromProto(proto.structuredAttributeValue);
873
+ }
874
+ return m;
875
+ }
876
+ toApiJson() {
995
877
  const toReturn = {};
996
- if (typeof this.appId !== 'undefined') {
997
- toReturn['appId'] = this.appId;
878
+ if (typeof this.attributeName !== 'undefined') {
879
+ toReturn['attributeName'] = this.attributeName;
998
880
  }
999
- if (typeof this.appName !== 'undefined') {
1000
- toReturn['appName'] = this.appName;
881
+ if (typeof this.attributeValue !== 'undefined') {
882
+ toReturn['attributeValue'] = this.attributeValue;
883
+ }
884
+ if (typeof this.structuredAttributeValue !== 'undefined' && this.structuredAttributeValue !== null) {
885
+ toReturn['structuredAttributeValue'] = 'toApiJson' in this.structuredAttributeValue ? this.structuredAttributeValue.toApiJson() : this.structuredAttributeValue;
1001
886
  }
1002
887
  return toReturn;
1003
888
  }
1004
889
  }
1005
- class SubjectMissingValueClause {
890
+
891
+ function enumStringToValue$4(enumRef, value) {
892
+ if (typeof value === 'number') {
893
+ return value;
894
+ }
895
+ return enumRef[value];
896
+ }
897
+ class AccessCheckFailures {
1006
898
  constructor(kwargs) {
1007
899
  if (!kwargs) {
1008
900
  return;
@@ -1010,22 +902,22 @@ class SubjectMissingValueClause {
1010
902
  Object.assign(this, kwargs);
1011
903
  }
1012
904
  static fromProto(proto) {
1013
- let m = new SubjectMissingValueClause();
905
+ let m = new AccessCheckFailures();
1014
906
  m = Object.assign(m, proto);
907
+ if (proto.failures) {
908
+ m.failures = proto.failures.map(ResourceIdentifier.fromProto);
909
+ }
1015
910
  return m;
1016
911
  }
1017
912
  toApiJson() {
1018
- if (typeof this.attributeName === 'undefined') {
1019
- return {};
1020
- }
1021
913
  const toReturn = {};
1022
- if (typeof this.attributeName !== 'undefined') {
1023
- toReturn['attributeName'] = this.attributeName;
914
+ if (typeof this.failures !== 'undefined' && this.failures !== null) {
915
+ toReturn['failures'] = 'toApiJson' in this.failures ? this.failures.toApiJson() : this.failures;
1024
916
  }
1025
917
  return toReturn;
1026
918
  }
1027
919
  }
1028
- class SubjectResourceForClause {
920
+ class ResourceIdentifierIdentifiersEntry {
1029
921
  constructor(kwargs) {
1030
922
  if (!kwargs) {
1031
923
  return;
@@ -1033,36 +925,25 @@ class SubjectResourceForClause {
1033
925
  Object.assign(this, kwargs);
1034
926
  }
1035
927
  static fromProto(proto) {
1036
- let m = new SubjectResourceForClause();
928
+ let m = new ResourceIdentifierIdentifiersEntry();
1037
929
  m = Object.assign(m, proto);
1038
- if (proto.operator) {
1039
- m.operator = enumStringToValue$2(ForOperator, proto.operator);
1040
- }
1041
- if (proto.rules) {
1042
- m.rules = PolicyNode.fromProto(proto.rules);
930
+ if (proto.value) {
931
+ m.value = ValueList.fromProto(proto.value);
1043
932
  }
1044
933
  return m;
1045
934
  }
1046
935
  toApiJson() {
1047
- if (typeof this.attributeName === 'undefined' &&
1048
- typeof this.operator === 'undefined' &&
1049
- typeof this.rules === 'undefined') {
1050
- return {};
1051
- }
1052
936
  const toReturn = {};
1053
- if (typeof this.attributeName !== 'undefined') {
1054
- toReturn['attributeName'] = this.attributeName;
1055
- }
1056
- if (typeof this.operator !== 'undefined') {
1057
- toReturn['operator'] = this.operator;
937
+ if (typeof this.key !== 'undefined') {
938
+ toReturn['key'] = this.key;
1058
939
  }
1059
- if (typeof this.rules !== 'undefined' && this.rules !== null) {
1060
- toReturn['rules'] = 'toApiJson' in this.rules ? this.rules.toApiJson() : this.rules;
940
+ if (typeof this.value !== 'undefined' && this.value !== null) {
941
+ toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
1061
942
  }
1062
943
  return toReturn;
1063
944
  }
1064
945
  }
1065
- class SubjectResourceIntersectionClause {
946
+ class Policy {
1066
947
  constructor(kwargs) {
1067
948
  if (!kwargs) {
1068
949
  return;
@@ -1070,26 +951,43 @@ class SubjectResourceIntersectionClause {
1070
951
  Object.assign(this, kwargs);
1071
952
  }
1072
953
  static fromProto(proto) {
1073
- let m = new SubjectResourceIntersectionClause();
954
+ let m = new Policy();
1074
955
  m = Object.assign(m, proto);
956
+ if (proto.operations) {
957
+ m.operations = proto.operations.map((v) => enumStringToValue$4(AccessScope, v));
958
+ }
959
+ if (proto.policy) {
960
+ m.policy = PolicyNode.fromProto(proto.policy);
961
+ }
1075
962
  return m;
1076
963
  }
1077
964
  toApiJson() {
1078
- if (typeof this.attributeName === 'undefined' &&
1079
- typeof this.resourceAttributeName === 'undefined') {
1080
- return {};
1081
- }
1082
965
  const toReturn = {};
1083
- if (typeof this.attributeName !== 'undefined') {
1084
- toReturn['attributeName'] = this.attributeName;
966
+ if (typeof this.appId !== 'undefined') {
967
+ toReturn['appId'] = this.appId;
1085
968
  }
1086
- if (typeof this.resourceAttributeName !== 'undefined') {
1087
- toReturn['resourceAttributeName'] = this.resourceAttributeName;
969
+ if (typeof this.resourceId !== 'undefined') {
970
+ toReturn['resourceId'] = this.resourceId;
971
+ }
972
+ if (typeof this.policyId !== 'undefined') {
973
+ toReturn['policyId'] = this.policyId;
974
+ }
975
+ if (typeof this.policyName !== 'undefined') {
976
+ toReturn['policyName'] = this.policyName;
977
+ }
978
+ if (typeof this.operations !== 'undefined') {
979
+ toReturn['operations'] = this.operations;
980
+ }
981
+ if (typeof this.actions !== 'undefined') {
982
+ toReturn['actions'] = this.actions;
983
+ }
984
+ if (typeof this.policy !== 'undefined' && this.policy !== null) {
985
+ toReturn['policy'] = 'toApiJson' in this.policy ? this.policy.toApiJson() : this.policy;
1088
986
  }
1089
987
  return toReturn;
1090
988
  }
1091
989
  }
1092
- class SubjectResourceSubsetClause {
990
+ class ResourceIdentifier {
1093
991
  constructor(kwargs) {
1094
992
  if (!kwargs) {
1095
993
  return;
@@ -1097,26 +995,22 @@ class SubjectResourceSubsetClause {
1097
995
  Object.assign(this, kwargs);
1098
996
  }
1099
997
  static fromProto(proto) {
1100
- let m = new SubjectResourceSubsetClause();
998
+ let m = new ResourceIdentifier();
1101
999
  m = Object.assign(m, proto);
1000
+ if (proto.identifiers) {
1001
+ m.identifiers = Object.keys(proto.identifiers).reduce((obj, k) => { obj[k] = ValueList.fromProto(proto.identifiers[k]); return obj; }, {});
1002
+ }
1102
1003
  return m;
1103
1004
  }
1104
1005
  toApiJson() {
1105
- if (typeof this.attributeName === 'undefined' &&
1106
- typeof this.resourceAttributeName === 'undefined') {
1107
- return {};
1108
- }
1109
1006
  const toReturn = {};
1110
- if (typeof this.attributeName !== 'undefined') {
1111
- toReturn['attributeName'] = this.attributeName;
1112
- }
1113
- if (typeof this.resourceAttributeName !== 'undefined') {
1114
- toReturn['resourceAttributeName'] = this.resourceAttributeName;
1007
+ if (typeof this.identifiers !== 'undefined' && this.identifiers !== null) {
1008
+ toReturn['identifiers'] = 'toApiJson' in this.identifiers ? this.identifiers.toApiJson() : this.identifiers;
1115
1009
  }
1116
1010
  return toReturn;
1117
1011
  }
1118
1012
  }
1119
- class SubjectValueIntersectionClause {
1013
+ class ResourceOwner {
1120
1014
  constructor(kwargs) {
1121
1015
  if (!kwargs) {
1122
1016
  return;
@@ -1124,28 +1018,17 @@ class SubjectValueIntersectionClause {
1124
1018
  Object.assign(this, kwargs);
1125
1019
  }
1126
1020
  static fromProto(proto) {
1127
- let m = new SubjectValueIntersectionClause();
1021
+ let m = new ResourceOwner();
1128
1022
  m = Object.assign(m, proto);
1129
- if (proto.structuredAttributeValue) {
1130
- m.structuredAttributeValue = Attribute.fromProto(proto.structuredAttributeValue);
1131
- }
1132
1023
  return m;
1133
1024
  }
1134
1025
  toApiJson() {
1135
- if (typeof this.attributeName === 'undefined' &&
1136
- typeof this.attributeValue === 'undefined' &&
1137
- typeof this.structuredAttributeValue === 'undefined') {
1138
- return {};
1139
- }
1140
1026
  const toReturn = {};
1141
- if (typeof this.attributeName !== 'undefined') {
1142
- toReturn['attributeName'] = this.attributeName;
1143
- }
1144
- if (typeof this.attributeValue !== 'undefined') {
1145
- toReturn['attributeValue'] = this.attributeValue;
1027
+ if (typeof this.appId !== 'undefined') {
1028
+ toReturn['appId'] = this.appId;
1146
1029
  }
1147
- if (typeof this.structuredAttributeValue !== 'undefined' && this.structuredAttributeValue !== null) {
1148
- toReturn['structuredAttributeValue'] = 'toApiJson' in this.structuredAttributeValue ? this.structuredAttributeValue.toApiJson() : this.structuredAttributeValue;
1030
+ if (typeof this.appName !== 'undefined') {
1031
+ toReturn['appName'] = this.appName;
1149
1032
  }
1150
1033
  return toReturn;
1151
1034
  }
@@ -1163,9 +1046,6 @@ class ValueList {
1163
1046
  return m;
1164
1047
  }
1165
1048
  toApiJson() {
1166
- if (typeof this.values === 'undefined') {
1167
- return {};
1168
- }
1169
1049
  const toReturn = {};
1170
1050
  if (typeof this.values !== 'undefined') {
1171
1051
  toReturn['values'] = this.values;
@@ -1196,13 +1076,6 @@ class SecurityLog {
1196
1076
  return m;
1197
1077
  }
1198
1078
  toApiJson() {
1199
- if (typeof this.userId === 'undefined' &&
1200
- typeof this.actionId === 'undefined' &&
1201
- typeof this.logId === 'undefined' &&
1202
- typeof this.description === 'undefined' &&
1203
- typeof this.created === 'undefined') {
1204
- return {};
1205
- }
1206
1079
  const toReturn = {};
1207
1080
  if (typeof this.userId !== 'undefined') {
1208
1081
  toReturn['userId'] = this.userId;
@@ -1223,7 +1096,7 @@ class SecurityLog {
1223
1096
  }
1224
1097
  }
1225
1098
 
1226
- function enumStringToValue$4(enumRef, value) {
1099
+ function enumStringToValue$2(enumRef, value) {
1227
1100
  if (typeof value === 'number') {
1228
1101
  return value;
1229
1102
  }
@@ -1242,10 +1115,6 @@ class Identifier {
1242
1115
  return m;
1243
1116
  }
1244
1117
  toApiJson() {
1245
- if (typeof this.subjectId === 'undefined' &&
1246
- typeof this.userId === 'undefined') {
1247
- return {};
1248
- }
1249
1118
  const toReturn = {};
1250
1119
  if (typeof this.subjectId !== 'undefined') {
1251
1120
  toReturn['subjectId'] = this.subjectId;
@@ -1269,10 +1138,6 @@ class NamespacedEmail {
1269
1138
  return m;
1270
1139
  }
1271
1140
  toApiJson() {
1272
- if (typeof this.namespace === 'undefined' &&
1273
- typeof this.email === 'undefined') {
1274
- return {};
1275
- }
1276
1141
  const toReturn = {};
1277
1142
  if (typeof this.namespace !== 'undefined') {
1278
1143
  toReturn['namespace'] = this.namespace;
@@ -1296,10 +1161,6 @@ class NamespacedSession {
1296
1161
  return m;
1297
1162
  }
1298
1163
  toApiJson() {
1299
- if (typeof this.namespace === 'undefined' &&
1300
- typeof this.session === 'undefined') {
1301
- return {};
1302
- }
1303
1164
  const toReturn = {};
1304
1165
  if (typeof this.namespace !== 'undefined') {
1305
1166
  toReturn['namespace'] = this.namespace;
@@ -1323,10 +1184,6 @@ class TypedExternalIdentifier {
1323
1184
  return m;
1324
1185
  }
1325
1186
  toApiJson() {
1326
- if (typeof this.externalIdType === 'undefined' &&
1327
- typeof this.externalId === 'undefined') {
1328
- return {};
1329
- }
1330
1187
  const toReturn = {};
1331
1188
  if (typeof this.externalIdType !== 'undefined') {
1332
1189
  toReturn['externalIdType'] = this.externalIdType;
@@ -1362,21 +1219,6 @@ class User {
1362
1219
  return m;
1363
1220
  }
1364
1221
  toApiJson() {
1365
- if (typeof this.userId === 'undefined' &&
1366
- typeof this.namespace === 'undefined' &&
1367
- typeof this.email === 'undefined' &&
1368
- typeof this.created === 'undefined' &&
1369
- typeof this.updated === 'undefined' &&
1370
- typeof this.firstName === 'undefined' &&
1371
- typeof this.greetingName === 'undefined' &&
1372
- typeof this.lastName === 'undefined' &&
1373
- typeof this.languageCode === 'undefined' &&
1374
- typeof this.emailVerified === 'undefined' &&
1375
- typeof this.roles === 'undefined' &&
1376
- typeof this.lastLogin === 'undefined' &&
1377
- typeof this.publicKeys === 'undefined') {
1378
- return {};
1379
- }
1380
1222
  const toReturn = {};
1381
1223
  if (typeof this.userId !== 'undefined') {
1382
1224
  toReturn['userId'] = this.userId;
@@ -1421,7 +1263,7 @@ class User {
1421
1263
  }
1422
1264
  }
1423
1265
 
1424
- function enumStringToValue$5(enumRef, value) {
1266
+ function enumStringToValue$1(enumRef, value) {
1425
1267
  if (typeof value === 'number') {
1426
1268
  return value;
1427
1269
  }
@@ -1444,7 +1286,7 @@ class AccessResourceRequest {
1444
1286
  m.resourceEntityIdentifier = Object.keys(proto.resourceEntityIdentifier).reduce((obj, k) => { obj[k] = ValueList.fromProto(proto.resourceEntityIdentifier[k]); return obj; }, {});
1445
1287
  }
1446
1288
  if (proto.accessScope) {
1447
- m.accessScope = proto.accessScope.map((v) => enumStringToValue$5(AccessScope, v));
1289
+ m.accessScope = proto.accessScope.map((v) => enumStringToValue$1(AccessScope, v));
1448
1290
  }
1449
1291
  if (proto.resourceEntityIdentifiers) {
1450
1292
  m.resourceEntityIdentifiers = proto.resourceEntityIdentifiers.map(ResourceIdentifier.fromProto);
@@ -1455,19 +1297,6 @@ class AccessResourceRequest {
1455
1297
  return m;
1456
1298
  }
1457
1299
  toApiJson() {
1458
- if (typeof this.context === 'undefined' &&
1459
- typeof this.subjectId === 'undefined' &&
1460
- typeof this.email === 'undefined' &&
1461
- typeof this.userId === 'undefined' &&
1462
- typeof this.session === 'undefined' &&
1463
- typeof this.ownerId === 'undefined' &&
1464
- typeof this.resourceId === 'undefined' &&
1465
- typeof this.resourceEntityIdentifier === 'undefined' &&
1466
- typeof this.accessScope === 'undefined' &&
1467
- typeof this.resourceEntityIdentifiers === 'undefined' &&
1468
- typeof this.resourceAttributes === 'undefined') {
1469
- return {};
1470
- }
1471
1300
  const toReturn = {};
1472
1301
  if (typeof this.context !== 'undefined' && this.context !== null) {
1473
1302
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -1496,6 +1325,9 @@ class AccessResourceRequest {
1496
1325
  if (typeof this.accessScope !== 'undefined') {
1497
1326
  toReturn['accessScope'] = this.accessScope;
1498
1327
  }
1328
+ if (typeof this.actions !== 'undefined') {
1329
+ toReturn['actions'] = this.actions;
1330
+ }
1499
1331
  if (typeof this.resourceEntityIdentifiers !== 'undefined' && this.resourceEntityIdentifiers !== null) {
1500
1332
  toReturn['resourceEntityIdentifiers'] = 'toApiJson' in this.resourceEntityIdentifiers ? this.resourceEntityIdentifiers.toApiJson() : this.resourceEntityIdentifiers;
1501
1333
  }
@@ -1519,7 +1351,7 @@ class AddKeyRequest {
1519
1351
  m.context = Context.fromProto(proto.context);
1520
1352
  }
1521
1353
  if (proto.algorithmType) {
1522
- m.algorithmType = enumStringToValue$5(AlgorithmType, proto.algorithmType);
1354
+ m.algorithmType = enumStringToValue$1(AlgorithmType, proto.algorithmType);
1523
1355
  }
1524
1356
  if (proto.userIdentifier) {
1525
1357
  m.userIdentifier = UserIdentifier.fromProto(proto.userIdentifier);
@@ -1527,12 +1359,6 @@ class AddKeyRequest {
1527
1359
  return m;
1528
1360
  }
1529
1361
  toApiJson() {
1530
- if (typeof this.email === 'undefined' &&
1531
- typeof this.context === 'undefined' &&
1532
- typeof this.algorithmType === 'undefined' &&
1533
- typeof this.userIdentifier === 'undefined') {
1534
- return {};
1535
- }
1536
1362
  const toReturn = {};
1537
1363
  if (typeof this.email !== 'undefined') {
1538
1364
  toReturn['email'] = this.email;
@@ -1562,10 +1388,6 @@ class AddKeyResponse {
1562
1388
  return m;
1563
1389
  }
1564
1390
  toApiJson() {
1565
- if (typeof this.privateKey === 'undefined' &&
1566
- typeof this.keyId === 'undefined') {
1567
- return {};
1568
- }
1569
1391
  const toReturn = {};
1570
1392
  if (typeof this.privateKey !== 'undefined') {
1571
1393
  toReturn['privateKey'] = this.privateKey;
@@ -1590,15 +1412,11 @@ class AddMultiUserRestrictionRequest {
1590
1412
  m.userIdentifiers = proto.userIdentifiers.map(UserIdentifier.fromProto);
1591
1413
  }
1592
1414
  if (proto.restrictionType) {
1593
- m.restrictionType = enumStringToValue$5(RestrictionType, proto.restrictionType);
1415
+ m.restrictionType = enumStringToValue$1(RestrictionType, proto.restrictionType);
1594
1416
  }
1595
1417
  return m;
1596
1418
  }
1597
1419
  toApiJson() {
1598
- if (typeof this.userIdentifiers === 'undefined' &&
1599
- typeof this.restrictionType === 'undefined') {
1600
- return {};
1601
- }
1602
1420
  const toReturn = {};
1603
1421
  if (typeof this.userIdentifiers !== 'undefined' && this.userIdentifiers !== null) {
1604
1422
  toReturn['userIdentifiers'] = 'toApiJson' in this.userIdentifiers ? this.userIdentifiers.toApiJson() : this.userIdentifiers;
@@ -1625,11 +1443,6 @@ class AuthenticateSubjectRequest {
1625
1443
  return m;
1626
1444
  }
1627
1445
  toApiJson() {
1628
- if (typeof this.context === 'undefined' &&
1629
- typeof this.email === 'undefined' &&
1630
- typeof this.password === 'undefined') {
1631
- return {};
1632
- }
1633
1446
  const toReturn = {};
1634
1447
  if (typeof this.context !== 'undefined' && this.context !== null) {
1635
1448
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -1659,11 +1472,6 @@ class ChangeSubjectEmailRequest {
1659
1472
  return m;
1660
1473
  }
1661
1474
  toApiJson() {
1662
- if (typeof this.context === 'undefined' &&
1663
- typeof this.subjectId === 'undefined' &&
1664
- typeof this.newEmail === 'undefined') {
1665
- return {};
1666
- }
1667
1475
  const toReturn = {};
1668
1476
  if (typeof this.context !== 'undefined' && this.context !== null) {
1669
1477
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -1696,10 +1504,6 @@ class CreateExternalIDRequest {
1696
1504
  return m;
1697
1505
  }
1698
1506
  toApiJson() {
1699
- if (typeof this.userIdentifier === 'undefined' &&
1700
- typeof this.typedExternalIdentifier === 'undefined') {
1701
- return {};
1702
- }
1703
1507
  const toReturn = {};
1704
1508
  if (typeof this.userIdentifier !== 'undefined' && this.userIdentifier !== null) {
1705
1509
  toReturn['userIdentifier'] = 'toApiJson' in this.userIdentifier ? this.userIdentifier.toApiJson() : this.userIdentifier;
@@ -1732,11 +1536,6 @@ class CreateSessionRequest {
1732
1536
  return m;
1733
1537
  }
1734
1538
  toApiJson() {
1735
- if (typeof this.context === 'undefined' &&
1736
- typeof this.oauthCredentials === 'undefined' &&
1737
- typeof this.subjectCredentials === 'undefined') {
1738
- return {};
1739
- }
1740
1539
  const toReturn = {};
1741
1540
  if (typeof this.context !== 'undefined' && this.context !== null) {
1742
1541
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -1763,9 +1562,6 @@ class CreateSessionResponse {
1763
1562
  return m;
1764
1563
  }
1765
1564
  toApiJson() {
1766
- if (typeof this.session === 'undefined') {
1767
- return {};
1768
- }
1769
1565
  const toReturn = {};
1770
1566
  if (typeof this.session !== 'undefined') {
1771
1567
  toReturn['session'] = this.session;
@@ -1792,11 +1588,6 @@ class CreateTemporarySubjectRequest {
1792
1588
  return m;
1793
1589
  }
1794
1590
  toApiJson() {
1795
- if (typeof this.context === 'undefined' &&
1796
- typeof this.subject === 'undefined' &&
1797
- typeof this.attributes === 'undefined') {
1798
- return {};
1799
- }
1800
1591
  const toReturn = {};
1801
1592
  if (typeof this.context !== 'undefined' && this.context !== null) {
1802
1593
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -1823,9 +1614,6 @@ class CreateTemporarySubjectResponse {
1823
1614
  return m;
1824
1615
  }
1825
1616
  toApiJson() {
1826
- if (typeof this.session === 'undefined') {
1827
- return {};
1828
- }
1829
1617
  const toReturn = {};
1830
1618
  if (typeof this.session !== 'undefined') {
1831
1619
  toReturn['session'] = this.session;
@@ -1849,10 +1637,6 @@ class DeleteSubjectRequest {
1849
1637
  return m;
1850
1638
  }
1851
1639
  toApiJson() {
1852
- if (typeof this.context === 'undefined' &&
1853
- typeof this.subjectId === 'undefined') {
1854
- return {};
1855
- }
1856
1640
  const toReturn = {};
1857
1641
  if (typeof this.context !== 'undefined' && this.context !== null) {
1858
1642
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -1879,9 +1663,6 @@ class DeleteUserRequest {
1879
1663
  return m;
1880
1664
  }
1881
1665
  toApiJson() {
1882
- if (typeof this.userIdentifier === 'undefined') {
1883
- return {};
1884
- }
1885
1666
  const toReturn = {};
1886
1667
  if (typeof this.userIdentifier !== 'undefined' && this.userIdentifier !== null) {
1887
1668
  toReturn['userIdentifier'] = 'toApiJson' in this.userIdentifier ? this.userIdentifier.toApiJson() : this.userIdentifier;
@@ -1902,9 +1683,6 @@ class ListSecurityLogsRequestFilters {
1902
1683
  return m;
1903
1684
  }
1904
1685
  toApiJson() {
1905
- if (typeof this.actionId === 'undefined') {
1906
- return {};
1907
- }
1908
1686
  const toReturn = {};
1909
1687
  if (typeof this.actionId !== 'undefined') {
1910
1688
  toReturn['actionId'] = this.actionId;
@@ -1931,10 +1709,6 @@ class GetImpersonationTokenRequest {
1931
1709
  return m;
1932
1710
  }
1933
1711
  toApiJson() {
1934
- if (typeof this.impersonatee === 'undefined' &&
1935
- typeof this.impersonator === 'undefined') {
1936
- return {};
1937
- }
1938
1712
  const toReturn = {};
1939
1713
  if (typeof this.impersonatee !== 'undefined' && this.impersonatee !== null) {
1940
1714
  toReturn['impersonatee'] = 'toApiJson' in this.impersonatee ? this.impersonatee.toApiJson() : this.impersonatee;
@@ -1958,9 +1732,6 @@ class GetImpersonationTokenResponse {
1958
1732
  return m;
1959
1733
  }
1960
1734
  toApiJson() {
1961
- if (typeof this.token === 'undefined') {
1962
- return {};
1963
- }
1964
1735
  const toReturn = {};
1965
1736
  if (typeof this.token !== 'undefined') {
1966
1737
  toReturn['token'] = this.token;
@@ -1984,10 +1755,6 @@ class GetMultiExternalIDRequest {
1984
1755
  return m;
1985
1756
  }
1986
1757
  toApiJson() {
1987
- if (typeof this.userIdentifiers === 'undefined' &&
1988
- typeof this.externalIdType === 'undefined') {
1989
- return {};
1990
- }
1991
1758
  const toReturn = {};
1992
1759
  if (typeof this.userIdentifiers !== 'undefined' && this.userIdentifiers !== null) {
1993
1760
  toReturn['userIdentifiers'] = 'toApiJson' in this.userIdentifiers ? this.userIdentifiers.toApiJson() : this.userIdentifiers;
@@ -2011,9 +1778,6 @@ class GetMultiExternalIDResponse {
2011
1778
  return m;
2012
1779
  }
2013
1780
  toApiJson() {
2014
- if (typeof this.externalIds === 'undefined') {
2015
- return {};
2016
- }
2017
1781
  const toReturn = {};
2018
1782
  if (typeof this.externalIds !== 'undefined') {
2019
1783
  toReturn['externalIds'] = this.externalIds;
@@ -2037,9 +1801,6 @@ class GetMultiUsersRequest {
2037
1801
  return m;
2038
1802
  }
2039
1803
  toApiJson() {
2040
- if (typeof this.userIdentifiers === 'undefined') {
2041
- return {};
2042
- }
2043
1804
  const toReturn = {};
2044
1805
  if (typeof this.userIdentifiers !== 'undefined' && this.userIdentifiers !== null) {
2045
1806
  toReturn['userIdentifiers'] = 'toApiJson' in this.userIdentifiers ? this.userIdentifiers.toApiJson() : this.userIdentifiers;
@@ -2063,9 +1824,6 @@ class GetMultiUsersResponse {
2063
1824
  return m;
2064
1825
  }
2065
1826
  toApiJson() {
2066
- if (typeof this.users === 'undefined') {
2067
- return {};
2068
- }
2069
1827
  const toReturn = {};
2070
1828
  if (typeof this.users !== 'undefined' && this.users !== null) {
2071
1829
  toReturn['users'] = 'toApiJson' in this.users ? this.users.toApiJson() : this.users;
@@ -2086,13 +1844,12 @@ class GetResetPasswordTokenRequest {
2086
1844
  if (proto.context) {
2087
1845
  m.context = Context.fromProto(proto.context);
2088
1846
  }
1847
+ if (proto.userIdentifier) {
1848
+ m.userIdentifier = UserIdentifier.fromProto(proto.userIdentifier);
1849
+ }
2089
1850
  return m;
2090
1851
  }
2091
1852
  toApiJson() {
2092
- if (typeof this.context === 'undefined' &&
2093
- typeof this.email === 'undefined') {
2094
- return {};
2095
- }
2096
1853
  const toReturn = {};
2097
1854
  if (typeof this.context !== 'undefined' && this.context !== null) {
2098
1855
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -2100,91 +1857,8 @@ class GetResetPasswordTokenRequest {
2100
1857
  if (typeof this.email !== 'undefined') {
2101
1858
  toReturn['email'] = this.email;
2102
1859
  }
2103
- return toReturn;
2104
- }
2105
- }
2106
- class GetSessionForUserRequest {
2107
- constructor(kwargs) {
2108
- if (!kwargs) {
2109
- return;
2110
- }
2111
- Object.assign(this, kwargs);
2112
- }
2113
- static fromProto(proto) {
2114
- let m = new GetSessionForUserRequest();
2115
- m = Object.assign(m, proto);
2116
- return m;
2117
- }
2118
- toApiJson() {
2119
- if (typeof this.subjectId === 'undefined' &&
2120
- typeof this.email === 'undefined' &&
2121
- typeof this.userId === 'undefined' &&
2122
- typeof this.refreshToken === 'undefined' &&
2123
- typeof this.clientAssertion === 'undefined' &&
2124
- typeof this.federatedIdentityProvider === 'undefined' &&
2125
- typeof this.scopes === 'undefined' &&
2126
- typeof this.clientId === 'undefined' &&
2127
- typeof this.nonce === 'undefined') {
2128
- return {};
2129
- }
2130
- const toReturn = {};
2131
- if (typeof this.subjectId !== 'undefined') {
2132
- toReturn['subjectId'] = this.subjectId;
2133
- }
2134
- if (typeof this.email !== 'undefined') {
2135
- toReturn['email'] = this.email;
2136
- }
2137
- if (typeof this.userId !== 'undefined') {
2138
- toReturn['userId'] = this.userId;
2139
- }
2140
- if (typeof this.refreshToken !== 'undefined') {
2141
- toReturn['refreshToken'] = this.refreshToken;
2142
- }
2143
- if (typeof this.clientAssertion !== 'undefined') {
2144
- toReturn['clientAssertion'] = this.clientAssertion;
2145
- }
2146
- if (typeof this.federatedIdentityProvider !== 'undefined') {
2147
- toReturn['federatedIdentityProvider'] = this.federatedIdentityProvider;
2148
- }
2149
- if (typeof this.scopes !== 'undefined') {
2150
- toReturn['scopes'] = this.scopes;
2151
- }
2152
- if (typeof this.clientId !== 'undefined') {
2153
- toReturn['clientId'] = this.clientId;
2154
- }
2155
- if (typeof this.nonce !== 'undefined') {
2156
- toReturn['nonce'] = this.nonce;
2157
- }
2158
- return toReturn;
2159
- }
2160
- }
2161
- class GetSessionForUserResponse {
2162
- constructor(kwargs) {
2163
- if (!kwargs) {
2164
- return;
2165
- }
2166
- Object.assign(this, kwargs);
2167
- }
2168
- static fromProto(proto) {
2169
- let m = new GetSessionForUserResponse();
2170
- m = Object.assign(m, proto);
2171
- return m;
2172
- }
2173
- toApiJson() {
2174
- if (typeof this.session === 'undefined' &&
2175
- typeof this.accessToken === 'undefined' &&
2176
- typeof this.refreshToken === 'undefined') {
2177
- return {};
2178
- }
2179
- const toReturn = {};
2180
- if (typeof this.session !== 'undefined') {
2181
- toReturn['session'] = this.session;
2182
- }
2183
- if (typeof this.accessToken !== 'undefined') {
2184
- toReturn['accessToken'] = this.accessToken;
2185
- }
2186
- if (typeof this.refreshToken !== 'undefined') {
2187
- toReturn['refreshToken'] = this.refreshToken;
1860
+ if (typeof this.userIdentifier !== 'undefined' && this.userIdentifier !== null) {
1861
+ toReturn['userIdentifier'] = 'toApiJson' in this.userIdentifier ? this.userIdentifier.toApiJson() : this.userIdentifier;
2188
1862
  }
2189
1863
  return toReturn;
2190
1864
  }
@@ -2202,9 +1876,6 @@ class GetSessionTokenRequest {
2202
1876
  return m;
2203
1877
  }
2204
1878
  toApiJson() {
2205
- if (typeof this.token === 'undefined') {
2206
- return {};
2207
- }
2208
1879
  const toReturn = {};
2209
1880
  if (typeof this.token !== 'undefined') {
2210
1881
  toReturn['token'] = this.token;
@@ -2228,10 +1899,6 @@ class GetShortLivedTokenRequest {
2228
1899
  return m;
2229
1900
  }
2230
1901
  toApiJson() {
2231
- if (typeof this.context === 'undefined' &&
2232
- typeof this.email === 'undefined') {
2233
- return {};
2234
- }
2235
1902
  const toReturn = {};
2236
1903
  if (typeof this.context !== 'undefined' && this.context !== null) {
2237
1904
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -2258,10 +1925,6 @@ class GetSubjectBySessionRequest {
2258
1925
  return m;
2259
1926
  }
2260
1927
  toApiJson() {
2261
- if (typeof this.session === 'undefined' &&
2262
- typeof this.context === 'undefined') {
2263
- return {};
2264
- }
2265
1928
  const toReturn = {};
2266
1929
  if (typeof this.session !== 'undefined') {
2267
1930
  toReturn['session'] = this.session;
@@ -2285,9 +1948,6 @@ class GetSubjectContextRequest {
2285
1948
  return m;
2286
1949
  }
2287
1950
  toApiJson() {
2288
- if (typeof this.subjectId === 'undefined') {
2289
- return {};
2290
- }
2291
1951
  const toReturn = {};
2292
1952
  if (typeof this.subjectId !== 'undefined') {
2293
1953
  toReturn['subjectId'] = this.subjectId;
@@ -2311,9 +1971,6 @@ class GetSubjectContextResponse {
2311
1971
  return m;
2312
1972
  }
2313
1973
  toApiJson() {
2314
- if (typeof this.context === 'undefined') {
2315
- return {};
2316
- }
2317
1974
  const toReturn = {};
2318
1975
  if (typeof this.context !== 'undefined' && this.context !== null) {
2319
1976
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -2337,9 +1994,6 @@ class GetSubjectResponse {
2337
1994
  return m;
2338
1995
  }
2339
1996
  toApiJson() {
2340
- if (typeof this.subject === 'undefined') {
2341
- return {};
2342
- }
2343
1997
  const toReturn = {};
2344
1998
  if (typeof this.subject !== 'undefined' && this.subject !== null) {
2345
1999
  toReturn['subject'] = 'toApiJson' in this.subject ? this.subject.toApiJson() : this.subject;
@@ -2366,11 +2020,6 @@ class GetSubjectsByEmailRequest {
2366
2020
  return m;
2367
2021
  }
2368
2022
  toApiJson() {
2369
- if (typeof this.context === 'undefined' &&
2370
- typeof this.emails === 'undefined' &&
2371
- typeof this.fieldMask === 'undefined') {
2372
- return {};
2373
- }
2374
2023
  const toReturn = {};
2375
2024
  if (typeof this.context !== 'undefined' && this.context !== null) {
2376
2025
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -2406,12 +2055,6 @@ class GetSubjectsRequest {
2406
2055
  return m;
2407
2056
  }
2408
2057
  toApiJson() {
2409
- if (typeof this.context === 'undefined' &&
2410
- typeof this.subjectIds === 'undefined' &&
2411
- typeof this.fieldMask === 'undefined' &&
2412
- typeof this.identifiers === 'undefined') {
2413
- return {};
2414
- }
2415
2058
  const toReturn = {};
2416
2059
  if (typeof this.context !== 'undefined' && this.context !== null) {
2417
2060
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -2444,9 +2087,6 @@ class GetSubjectsResponse {
2444
2087
  return m;
2445
2088
  }
2446
2089
  toApiJson() {
2447
- if (typeof this.subjects === 'undefined') {
2448
- return {};
2449
- }
2450
2090
  const toReturn = {};
2451
2091
  if (typeof this.subjects !== 'undefined' && this.subjects !== null) {
2452
2092
  toReturn['subjects'] = 'toApiJson' in this.subjects ? this.subjects.toApiJson() : this.subjects;
@@ -2484,9 +2124,6 @@ class GetTokenResponse {
2484
2124
  return m;
2485
2125
  }
2486
2126
  toApiJson() {
2487
- if (typeof this.token === 'undefined') {
2488
- return {};
2489
- }
2490
2127
  const toReturn = {};
2491
2128
  if (typeof this.token !== 'undefined') {
2492
2129
  toReturn['token'] = this.token;
@@ -2513,13 +2150,6 @@ class IAMListPersonasRequest {
2513
2150
  return m;
2514
2151
  }
2515
2152
  toApiJson() {
2516
- if (typeof this.userIdentifier === 'undefined' &&
2517
- typeof this.cursor === 'undefined' &&
2518
- typeof this.pageSize === 'undefined' &&
2519
- typeof this.type === 'undefined' &&
2520
- typeof this.namespace === 'undefined') {
2521
- return {};
2522
- }
2523
2153
  const toReturn = {};
2524
2154
  if (typeof this.userIdentifier !== 'undefined' && this.userIdentifier !== null) {
2525
2155
  toReturn['userIdentifier'] = 'toApiJson' in this.userIdentifier ? this.userIdentifier.toApiJson() : this.userIdentifier;
@@ -2536,6 +2166,9 @@ class IAMListPersonasRequest {
2536
2166
  if (typeof this.namespace !== 'undefined') {
2537
2167
  toReturn['namespace'] = this.namespace;
2538
2168
  }
2169
+ if (typeof this.alwaysIncludeSuperadmin !== 'undefined') {
2170
+ toReturn['alwaysIncludeSuperadmin'] = this.alwaysIncludeSuperadmin;
2171
+ }
2539
2172
  return toReturn;
2540
2173
  }
2541
2174
  }
@@ -2555,13 +2188,6 @@ class ListPersonasByEmailRequest {
2555
2188
  return m;
2556
2189
  }
2557
2190
  toApiJson() {
2558
- if (typeof this.email === 'undefined' &&
2559
- typeof this.cursor === 'undefined' &&
2560
- typeof this.pageSize === 'undefined' &&
2561
- typeof this.type === 'undefined' &&
2562
- typeof this.namespace === 'undefined') {
2563
- return {};
2564
- }
2565
2191
  const toReturn = {};
2566
2192
  if (typeof this.email !== 'undefined') {
2567
2193
  toReturn['email'] = this.email;
@@ -2597,13 +2223,6 @@ class ListPersonasRequest {
2597
2223
  return m;
2598
2224
  }
2599
2225
  toApiJson() {
2600
- if (typeof this.session === 'undefined' &&
2601
- typeof this.cursor === 'undefined' &&
2602
- typeof this.pageSize === 'undefined' &&
2603
- typeof this.type === 'undefined' &&
2604
- typeof this.namespace === 'undefined') {
2605
- return {};
2606
- }
2607
2226
  const toReturn = {};
2608
2227
  if (typeof this.session !== 'undefined') {
2609
2228
  toReturn['session'] = this.session;
@@ -2639,11 +2258,6 @@ class ListPersonasResponse {
2639
2258
  return m;
2640
2259
  }
2641
2260
  toApiJson() {
2642
- if (typeof this.personas === 'undefined' &&
2643
- typeof this.nextCursor === 'undefined' &&
2644
- typeof this.hasMore === 'undefined') {
2645
- return {};
2646
- }
2647
2261
  const toReturn = {};
2648
2262
  if (typeof this.personas !== 'undefined' && this.personas !== null) {
2649
2263
  toReturn['personas'] = 'toApiJson' in this.personas ? this.personas.toApiJson() : this.personas;
@@ -2676,12 +2290,6 @@ class ListSecurityLogsRequest {
2676
2290
  return m;
2677
2291
  }
2678
2292
  toApiJson() {
2679
- if (typeof this.userId === 'undefined' &&
2680
- typeof this.filters === 'undefined' &&
2681
- typeof this.pageSize === 'undefined' &&
2682
- typeof this.cursor === 'undefined') {
2683
- return {};
2684
- }
2685
2293
  const toReturn = {};
2686
2294
  if (typeof this.userId !== 'undefined') {
2687
2295
  toReturn['userId'] = this.userId;
@@ -2714,11 +2322,6 @@ class ListSecurityLogsResponse {
2714
2322
  return m;
2715
2323
  }
2716
2324
  toApiJson() {
2717
- if (typeof this.logs === 'undefined' &&
2718
- typeof this.nextCursor === 'undefined' &&
2719
- typeof this.hasMore === 'undefined') {
2720
- return {};
2721
- }
2722
2325
  const toReturn = {};
2723
2326
  if (typeof this.logs !== 'undefined' && this.logs !== null) {
2724
2327
  toReturn['logs'] = 'toApiJson' in this.logs ? this.logs.toApiJson() : this.logs;
@@ -2754,14 +2357,6 @@ class ListUsersRequest {
2754
2357
  return m;
2755
2358
  }
2756
2359
  toApiJson() {
2757
- if (typeof this.namespace === 'undefined' &&
2758
- typeof this.email === 'undefined' &&
2759
- typeof this.cursor === 'undefined' &&
2760
- typeof this.pageSize === 'undefined' &&
2761
- typeof this.userFilter === 'undefined' &&
2762
- typeof this.sortOptions === 'undefined') {
2763
- return {};
2764
- }
2765
2360
  const toReturn = {};
2766
2361
  if (typeof this.namespace !== 'undefined') {
2767
2362
  toReturn['namespace'] = this.namespace;
@@ -2800,11 +2395,6 @@ class ListUsersResponse {
2800
2395
  return m;
2801
2396
  }
2802
2397
  toApiJson() {
2803
- if (typeof this.users === 'undefined' &&
2804
- typeof this.nextCursor === 'undefined' &&
2805
- typeof this.hasMore === 'undefined') {
2806
- return {};
2807
- }
2808
2398
  const toReturn = {};
2809
2399
  if (typeof this.users !== 'undefined' && this.users !== null) {
2810
2400
  toReturn['users'] = 'toApiJson' in this.users ? this.users.toApiJson() : this.users;
@@ -2837,11 +2427,6 @@ class MutateAttributesRequest {
2837
2427
  return m;
2838
2428
  }
2839
2429
  toApiJson() {
2840
- if (typeof this.context === 'undefined' &&
2841
- typeof this.subjectId === 'undefined' &&
2842
- typeof this.mutations === 'undefined') {
2843
- return {};
2844
- }
2845
2430
  const toReturn = {};
2846
2431
  if (typeof this.context !== 'undefined' && this.context !== null) {
2847
2432
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -2868,11 +2453,6 @@ class OAuthCredentials {
2868
2453
  return m;
2869
2454
  }
2870
2455
  toApiJson() {
2871
- if (typeof this.provider === 'undefined' &&
2872
- typeof this.idToken === 'undefined' &&
2873
- typeof this.accessToken === 'undefined') {
2874
- return {};
2875
- }
2876
2456
  const toReturn = {};
2877
2457
  if (typeof this.provider !== 'undefined') {
2878
2458
  toReturn['provider'] = this.provider;
@@ -2899,12 +2479,6 @@ class UpdateUserRequestOperation {
2899
2479
  return m;
2900
2480
  }
2901
2481
  toApiJson() {
2902
- if (typeof this.firstName === 'undefined' &&
2903
- typeof this.greetingName === 'undefined' &&
2904
- typeof this.lastName === 'undefined' &&
2905
- typeof this.languageCode === 'undefined') {
2906
- return {};
2907
- }
2908
2482
  const toReturn = {};
2909
2483
  if (typeof this.firstName !== 'undefined') {
2910
2484
  toReturn['firstName'] = this.firstName;
@@ -2937,9 +2511,6 @@ class RegisterPolicyRequest {
2937
2511
  return m;
2938
2512
  }
2939
2513
  toApiJson() {
2940
- if (typeof this.policy === 'undefined') {
2941
- return {};
2942
- }
2943
2514
  const toReturn = {};
2944
2515
  if (typeof this.policy !== 'undefined' && this.policy !== null) {
2945
2516
  toReturn['policy'] = 'toApiJson' in this.policy ? this.policy.toApiJson() : this.policy;
@@ -2963,9 +2534,6 @@ class RegisterResourceOwnerRequest {
2963
2534
  return m;
2964
2535
  }
2965
2536
  toApiJson() {
2966
- if (typeof this.owner === 'undefined') {
2967
- return {};
2968
- }
2969
2537
  const toReturn = {};
2970
2538
  if (typeof this.owner !== 'undefined' && this.owner !== null) {
2971
2539
  toReturn['owner'] = 'toApiJson' in this.owner ? this.owner.toApiJson() : this.owner;
@@ -2986,14 +2554,6 @@ class RegisterResourceRequest {
2986
2554
  return m;
2987
2555
  }
2988
2556
  toApiJson() {
2989
- if (typeof this.appId === 'undefined' &&
2990
- typeof this.resourceId === 'undefined' &&
2991
- typeof this.resourceName === 'undefined' &&
2992
- typeof this.resourceOwnerServiceUrl === 'undefined' &&
2993
- typeof this.requiredResourceParams === 'undefined' &&
2994
- typeof this.resourceOwnerAudience === 'undefined') {
2995
- return {};
2996
- }
2997
2557
  const toReturn = {};
2998
2558
  if (typeof this.appId !== 'undefined') {
2999
2559
  toReturn['appId'] = this.appId;
@@ -3038,13 +2598,6 @@ class RegisterSubjectRequest {
3038
2598
  return m;
3039
2599
  }
3040
2600
  toApiJson() {
3041
- if (typeof this.context === 'undefined' &&
3042
- typeof this.email === 'undefined' &&
3043
- typeof this.password === 'undefined' &&
3044
- typeof this.attributes === 'undefined' &&
3045
- typeof this.structAttributes === 'undefined') {
3046
- return {};
3047
- }
3048
2601
  const toReturn = {};
3049
2602
  if (typeof this.context !== 'undefined' && this.context !== null) {
3050
2603
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -3077,9 +2630,6 @@ class RegisterSubjectResponse {
3077
2630
  return m;
3078
2631
  }
3079
2632
  toApiJson() {
3080
- if (typeof this.subjectId === 'undefined') {
3081
- return {};
3082
- }
3083
2633
  const toReturn = {};
3084
2634
  if (typeof this.subjectId !== 'undefined') {
3085
2635
  toReturn['subjectId'] = this.subjectId;
@@ -3106,12 +2656,6 @@ class RemoveKeyRequest {
3106
2656
  return m;
3107
2657
  }
3108
2658
  toApiJson() {
3109
- if (typeof this.email === 'undefined' &&
3110
- typeof this.context === 'undefined' &&
3111
- typeof this.keyId === 'undefined' &&
3112
- typeof this.userIdentifier === 'undefined') {
3113
- return {};
3114
- }
3115
2659
  const toReturn = {};
3116
2660
  if (typeof this.email !== 'undefined') {
3117
2661
  toReturn['email'] = this.email;
@@ -3142,15 +2686,11 @@ class RemoveMultiUserRestrictionRequest {
3142
2686
  m.userIdentifiers = proto.userIdentifiers.map(UserIdentifier.fromProto);
3143
2687
  }
3144
2688
  if (proto.restrictionType) {
3145
- m.restrictionType = enumStringToValue$5(RestrictionType, proto.restrictionType);
2689
+ m.restrictionType = enumStringToValue$1(RestrictionType, proto.restrictionType);
3146
2690
  }
3147
2691
  return m;
3148
2692
  }
3149
2693
  toApiJson() {
3150
- if (typeof this.userIdentifiers === 'undefined' &&
3151
- typeof this.restrictionType === 'undefined') {
3152
- return {};
3153
- }
3154
2694
  const toReturn = {};
3155
2695
  if (typeof this.userIdentifiers !== 'undefined' && this.userIdentifiers !== null) {
3156
2696
  toReturn['userIdentifiers'] = 'toApiJson' in this.userIdentifiers ? this.userIdentifiers.toApiJson() : this.userIdentifiers;
@@ -3174,9 +2714,6 @@ class ResetPasswordTokenResponse {
3174
2714
  return m;
3175
2715
  }
3176
2716
  toApiJson() {
3177
- if (typeof this.token === 'undefined') {
3178
- return {};
3179
- }
3180
2717
  const toReturn = {};
3181
2718
  if (typeof this.token !== 'undefined') {
3182
2719
  toReturn['token'] = this.token;
@@ -3197,10 +2734,6 @@ class ResetPasswordWithTokenRequest {
3197
2734
  return m;
3198
2735
  }
3199
2736
  toApiJson() {
3200
- if (typeof this.token === 'undefined' &&
3201
- typeof this.password === 'undefined') {
3202
- return {};
3203
- }
3204
2737
  const toReturn = {};
3205
2738
  if (typeof this.token !== 'undefined') {
3206
2739
  toReturn['token'] = this.token;
@@ -3227,11 +2760,6 @@ class ResetSubjectPasswordRequest {
3227
2760
  return m;
3228
2761
  }
3229
2762
  toApiJson() {
3230
- if (typeof this.context === 'undefined' &&
3231
- typeof this.subjectId === 'undefined' &&
3232
- typeof this.newPassword === 'undefined') {
3233
- return {};
3234
- }
3235
2763
  const toReturn = {};
3236
2764
  if (typeof this.context !== 'undefined' && this.context !== null) {
3237
2765
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -3261,10 +2789,6 @@ class AccessResourceRequestResourceEntityIdentifierEntry {
3261
2789
  return m;
3262
2790
  }
3263
2791
  toApiJson() {
3264
- if (typeof this.key === 'undefined' &&
3265
- typeof this.value === 'undefined') {
3266
- return {};
3267
- }
3268
2792
  const toReturn = {};
3269
2793
  if (typeof this.key !== 'undefined') {
3270
2794
  toReturn['key'] = this.key;
@@ -3295,7 +2819,7 @@ class SearchSubjectRequest {
3295
2819
  m.filters = proto.filters.map(SingleValueAttribute.fromProto);
3296
2820
  }
3297
2821
  if (proto.orderByDirection) {
3298
- m.orderByDirection = enumStringToValue$5(OrderByDirection, proto.orderByDirection);
2822
+ m.orderByDirection = enumStringToValue$1(OrderByDirection, proto.orderByDirection);
3299
2823
  }
3300
2824
  if (proto.pageSize) {
3301
2825
  m.pageSize = parseInt(proto.pageSize, 10);
@@ -3306,16 +2830,6 @@ class SearchSubjectRequest {
3306
2830
  return m;
3307
2831
  }
3308
2832
  toApiJson() {
3309
- if (typeof this.context === 'undefined' &&
3310
- typeof this.query === 'undefined' &&
3311
- typeof this.filters === 'undefined' &&
3312
- typeof this.orderBy === 'undefined' &&
3313
- typeof this.orderByDirection === 'undefined' &&
3314
- typeof this.cursor === 'undefined' &&
3315
- typeof this.pageSize === 'undefined' &&
3316
- typeof this.fieldMask === 'undefined') {
3317
- return {};
3318
- }
3319
2833
  const toReturn = {};
3320
2834
  if (typeof this.context !== 'undefined' && this.context !== null) {
3321
2835
  toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
@@ -3363,12 +2877,6 @@ class SearchSubjectResponse {
3363
2877
  return m;
3364
2878
  }
3365
2879
  toApiJson() {
3366
- if (typeof this.result === 'undefined' &&
3367
- typeof this.nextCursor === 'undefined' &&
3368
- typeof this.hasMore === 'undefined' &&
3369
- typeof this.totalResults === 'undefined') {
3370
- return {};
3371
- }
3372
2880
  const toReturn = {};
3373
2881
  if (typeof this.result !== 'undefined' && this.result !== null) {
3374
2882
  toReturn['result'] = 'toApiJson' in this.result ? this.result.toApiJson() : this.result;
@@ -3398,9 +2906,6 @@ class SendEmailVerificationRequest {
3398
2906
  return m;
3399
2907
  }
3400
2908
  toApiJson() {
3401
- if (typeof this.userId === 'undefined') {
3402
- return {};
3403
- }
3404
2909
  const toReturn = {};
3405
2910
  if (typeof this.userId !== 'undefined') {
3406
2911
  toReturn['userId'] = this.userId;
@@ -3421,10 +2926,6 @@ class SubjectCredentials {
3421
2926
  return m;
3422
2927
  }
3423
2928
  toApiJson() {
3424
- if (typeof this.email === 'undefined' &&
3425
- typeof this.password === 'undefined') {
3426
- return {};
3427
- }
3428
2929
  const toReturn = {};
3429
2930
  if (typeof this.email !== 'undefined') {
3430
2931
  toReturn['email'] = this.email;
@@ -3451,10 +2952,6 @@ class UpdateUserRequest {
3451
2952
  return m;
3452
2953
  }
3453
2954
  toApiJson() {
3454
- if (typeof this.userId === 'undefined' &&
3455
- typeof this.operations === 'undefined') {
3456
- return {};
3457
- }
3458
2955
  const toReturn = {};
3459
2956
  if (typeof this.userId !== 'undefined') {
3460
2957
  toReturn['userId'] = this.userId;
@@ -3481,9 +2978,6 @@ class GetMultiUsersResponseUserContainer {
3481
2978
  return m;
3482
2979
  }
3483
2980
  toApiJson() {
3484
- if (typeof this.user === 'undefined') {
3485
- return {};
3486
- }
3487
2981
  const toReturn = {};
3488
2982
  if (typeof this.user !== 'undefined' && this.user !== null) {
3489
2983
  toReturn['user'] = 'toApiJson' in this.user ? this.user.toApiJson() : this.user;
@@ -3504,10 +2998,6 @@ class UserFilter {
3504
2998
  return m;
3505
2999
  }
3506
3000
  toApiJson() {
3507
- if (typeof this.subjectTypes === 'undefined' &&
3508
- typeof this.searchTerms === 'undefined') {
3509
- return {};
3510
- }
3511
3001
  const toReturn = {};
3512
3002
  if (typeof this.subjectTypes !== 'undefined') {
3513
3003
  toReturn['subjectTypes'] = this.subjectTypes;
@@ -3540,14 +3030,6 @@ class UserIdentifier {
3540
3030
  return m;
3541
3031
  }
3542
3032
  toApiJson() {
3543
- if (typeof this.userId === 'undefined' &&
3544
- typeof this.namespacedEmail === 'undefined' &&
3545
- typeof this.namespacedSession === 'undefined' &&
3546
- typeof this.token === 'undefined' &&
3547
- typeof this.typedExternalIdentifier === 'undefined' &&
3548
- typeof this.subjectId === 'undefined') {
3549
- return {};
3550
- }
3551
3033
  const toReturn = {};
3552
3034
  if (typeof this.userId !== 'undefined') {
3553
3035
  toReturn['userId'] = this.userId;
@@ -3581,329 +3063,44 @@ class UserSortOptions {
3581
3063
  let m = new UserSortOptions();
3582
3064
  m = Object.assign(m, proto);
3583
3065
  if (proto.direction) {
3584
- m.direction = enumStringToValue$5(SortDirection, proto.direction);
3066
+ m.direction = enumStringToValue$1(SortDirection, proto.direction);
3585
3067
  }
3586
3068
  if (proto.field) {
3587
- m.field = enumStringToValue$5(UserSortField, proto.field);
3069
+ m.field = enumStringToValue$1(UserSortField, proto.field);
3588
3070
  }
3589
3071
  return m;
3590
3072
  }
3591
3073
  toApiJson() {
3592
- if (typeof this.direction === 'undefined' &&
3593
- typeof this.field === 'undefined') {
3594
- return {};
3595
- }
3596
3074
  const toReturn = {};
3597
3075
  if (typeof this.direction !== 'undefined') {
3598
3076
  toReturn['direction'] = this.direction;
3599
3077
  }
3600
3078
  if (typeof this.field !== 'undefined') {
3601
3079
  toReturn['field'] = this.field;
3602
- }
3603
- return toReturn;
3604
- }
3605
- }
3606
- class VerifyEmailRequest {
3607
- constructor(kwargs) {
3608
- if (!kwargs) {
3609
- return;
3610
- }
3611
- Object.assign(this, kwargs);
3612
- }
3613
- static fromProto(proto) {
3614
- let m = new VerifyEmailRequest();
3615
- m = Object.assign(m, proto);
3616
- return m;
3617
- }
3618
- toApiJson() {
3619
- if (typeof this.token === 'undefined') {
3620
- return {};
3621
- }
3622
- const toReturn = {};
3623
- if (typeof this.token !== 'undefined') {
3624
- toReturn['token'] = this.token;
3625
- }
3626
- return toReturn;
3627
- }
3628
- }
3629
-
3630
- // *********************************
3631
-
3632
- class HostService {
3633
- constructor(environmentService) {
3634
- this.environmentService = environmentService;
3635
- }
3636
- host() {
3637
- if (this._host) {
3638
- return this._host;
3639
- }
3640
- switch (this.environmentService.getEnvironment()) {
3641
- case Environment.LOCAL:
3642
- this._host = 'iam.vendasta-local.com';
3643
- break;
3644
- case Environment.TEST:
3645
- this._host = '';
3646
- break;
3647
- case Environment.DEMO:
3648
- this._host = 'iam-api-demo.apigateway.co';
3649
- break;
3650
- case Environment.PROD:
3651
- this._host = 'iam-api-prod.apigateway.co';
3652
- break;
3653
- }
3654
- return this._host;
3655
- }
3656
- httpsHost() {
3657
- if (this._httpsHost) {
3658
- return this._httpsHost;
3659
- }
3660
- switch (this.environmentService.getEnvironment()) {
3661
- case Environment.LOCAL:
3662
- this._httpsHost = 'iam.vendasta-local.com';
3663
- break;
3664
- case Environment.TEST:
3665
- this._httpsHost = '';
3666
- break;
3667
- case Environment.DEMO:
3668
- this._httpsHost = 'iam-demo.apigateway.co';
3669
- break;
3670
- case Environment.PROD:
3671
- this._httpsHost = 'iam-prod.apigateway.co';
3672
- break;
3673
- }
3674
- return this._httpsHost;
3675
- }
3676
- hostWithScheme() {
3677
- const scheme = this.environmentService.getEnvironment() === Environment.LOCAL ? 'http://' : 'https://';
3678
- return scheme + this.host();
3679
- }
3680
- httpsHostWithScheme() {
3681
- const scheme = this.environmentService.getEnvironment() === Environment.LOCAL ? 'http://' : 'https://';
3682
- return scheme + this.httpsHost();
3683
- }
3684
- }
3685
- HostService.ɵprov = ɵɵdefineInjectable({ factory: function HostService_Factory() { return new HostService(ɵɵinject(EnvironmentService)); }, token: HostService, providedIn: "root" });
3686
- HostService.decorators = [
3687
- { type: Injectable, args: [{ providedIn: 'root' },] }
3688
- ];
3689
- HostService.ctorParameters = () => [
3690
- { type: EnvironmentService }
3691
- ];
3692
-
3693
- // *********************************
3694
- class UserIAMApiService {
3695
- constructor(http, hostService) {
3696
- this.http = http;
3697
- this.hostService = hostService;
3698
- }
3699
- apiOptions() {
3700
- return {
3701
- headers: new HttpHeaders({
3702
- 'Content-Type': 'application/json'
3703
- }),
3704
- withCredentials: true
3705
- };
3706
- }
3707
- getSubjectBySession(r) {
3708
- const request = (r.toApiJson) ? r : new GetSubjectBySessionRequest(r);
3709
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/GetSubjectBySession", request.toApiJson(), this.apiOptions())
3710
- .pipe(map(resp => GetSubjectResponse.fromProto(resp)), share());
3711
- }
3712
- listPersonas(r) {
3713
- const request = (r.toApiJson) ? r : new ListPersonasRequest(r);
3714
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/ListPersonas", request.toApiJson(), this.apiOptions())
3715
- .pipe(map(resp => ListPersonasResponse.fromProto(resp)), share());
3716
- }
3717
- getToken(r) {
3718
- const request = (r.toApiJson) ? r : new GetTokenRequest(r);
3719
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/GetToken", request.toApiJson(), this.apiOptions())
3720
- .pipe(map(resp => GetTokenResponse.fromProto(resp)), share());
3721
- }
3722
- getSessionToken(r) {
3723
- const request = (r.toApiJson) ? r : new GetSessionTokenRequest(r);
3724
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/GetSessionToken", request.toApiJson(), this.apiOptions())
3725
- .pipe(map(resp => GetTokenResponse.fromProto(resp)), share());
3726
- }
3727
- resetPasswordWithToken(r) {
3728
- const request = (r.toApiJson) ? r : new ResetPasswordWithTokenRequest(r);
3729
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/ResetPasswordWithToken", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
3730
- }
3731
- getImpersonationToken(r) {
3732
- const request = (r.toApiJson) ? r : new GetImpersonationTokenRequest(r);
3733
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/GetImpersonationToken", request.toApiJson(), this.apiOptions())
3734
- .pipe(map(resp => GetImpersonationTokenResponse.fromProto(resp)), share());
3735
- }
3736
- }
3737
- UserIAMApiService.ɵprov = ɵɵdefineInjectable({ factory: function UserIAMApiService_Factory() { return new UserIAMApiService(ɵɵinject(HttpClient), ɵɵinject(HostService)); }, token: UserIAMApiService, providedIn: "root" });
3738
- UserIAMApiService.decorators = [
3739
- { type: Injectable, args: [{ providedIn: 'root' },] }
3740
- ];
3741
- UserIAMApiService.ctorParameters = () => [
3742
- { type: HttpClient },
3743
- { type: HostService }
3744
- ];
3745
-
3746
- class LoginRequest {
3747
- constructor(kwargs) {
3748
- if (!kwargs) {
3749
- return;
3750
- }
3751
- Object.assign(this, kwargs);
3752
- }
3753
- static fromProto(proto) {
3754
- if (!proto) {
3755
- return new LoginRequest();
3756
- }
3757
- let m = new LoginRequest();
3758
- m = Object.assign(m, proto);
3759
- return m;
3760
- }
3761
- toApiJson() {
3762
- if (typeof this.namespace === 'undefined' &&
3763
- typeof this.type === 'undefined' &&
3764
- typeof this.email === 'undefined' &&
3765
- typeof this.password === 'undefined' &&
3766
- typeof this.providerIdToken === 'undefined' &&
3767
- typeof this.provider === 'undefined') {
3768
- return {};
3769
- }
3770
- return {
3771
- 'namespace': (typeof this.namespace !== 'undefined') ? this.namespace : null,
3772
- 'type': (typeof this.type !== 'undefined') ? this.type : null,
3773
- 'email': (typeof this.email !== 'undefined') ? this.email : null,
3774
- 'password': (typeof this.password !== 'undefined') ? this.password : null,
3775
- 'provider_id_token': (typeof this.providerIdToken !== 'undefined') ? this.providerIdToken : null,
3776
- 'provider': (typeof this.provider !== 'undefined') ? this.provider : null
3777
- };
3778
- }
3779
- }
3780
- class LoginResponse {
3781
- constructor(kwargs) {
3782
- if (!kwargs) {
3783
- return;
3784
- }
3785
- Object.assign(this, kwargs);
3786
- }
3787
- static fromProto(proto) {
3788
- const m = new LoginResponse();
3789
- m.sessionId = proto['session_id'];
3790
- return m;
3791
- }
3792
- toApiJson() {
3793
- if (typeof this.sessionId === 'undefined') {
3794
- return {};
3795
- }
3796
- return {
3797
- 'sessionId': (typeof this.sessionId !== 'undefined') ? this.sessionId : null
3798
- };
3799
- }
3800
- }
3801
- class LogoutResponse {
3802
- constructor(kwargs) {
3803
- if (!kwargs) {
3804
- return;
3805
- }
3806
- Object.assign(this, kwargs);
3807
- }
3808
- static fromProto(proto) {
3809
- let m = new LogoutResponse();
3810
- m = Object.assign(m, proto);
3811
- return m;
3812
- }
3813
- toApiJson() {
3814
- if (typeof this.success === 'undefined') {
3815
- return {};
3816
- }
3817
- return {
3818
- 'success': (typeof this.success !== 'undefined') ? this.success : null
3819
- };
3820
- }
3821
- }
3822
- class SSOLoginRequest {
3823
- constructor(kwargs) {
3824
- if (!kwargs) {
3825
- return;
3826
- }
3827
- Object.assign(this, kwargs);
3828
- }
3829
- static fromProto(proto) {
3830
- let m = new SSOLoginRequest();
3831
- m = Object.assign(m, proto);
3832
- return m;
3833
- }
3834
- toApiJson() {
3835
- if (typeof this.nextUrl === 'undefined' &&
3836
- typeof this.namespace === 'undefined' &&
3837
- typeof this.type === 'undefined') {
3838
- return null;
3839
- }
3840
- return {
3841
- 'next_url': (typeof this.nextUrl !== 'undefined') ? this.nextUrl : null,
3842
- 'namespace': (typeof this.namespace !== 'undefined') ? this.namespace : null,
3843
- 'type': (typeof this.type !== 'undefined') ? this.type : null
3844
- };
3845
- }
3846
- }
3847
-
3848
- class IamHttpApiService {
3849
- constructor(http, hostService) {
3850
- this.http = http;
3851
- this.hostService = hostService;
3852
- }
3853
- apiOptions(includeCredentials) {
3854
- if (includeCredentials) {
3855
- return {
3856
- headers: new HttpHeaders({
3857
- 'Content-Type': 'application/x-www-form-urlencoded'
3858
- }),
3859
- withCredentials: true
3860
- };
3861
- }
3862
- return {
3863
- headers: new HttpHeaders({
3864
- 'Content-Type': 'application/x-www-form-urlencoded'
3865
- })
3866
- };
3080
+ }
3081
+ return toReturn;
3867
3082
  }
3868
- login(r) {
3869
- const request = (r.toApiJson) ? r : new LoginRequest(r);
3870
- return this.http
3871
- .post(this.hostService.httpsHostWithScheme() + '/_ajax/v1/login', request.toApiJson(), this.apiOptions())
3872
- .pipe(map((resp) => LoginResponse.fromProto(resp)), share());
3083
+ }
3084
+ class VerifyEmailRequest {
3085
+ constructor(kwargs) {
3086
+ if (!kwargs) {
3087
+ return;
3088
+ }
3089
+ Object.assign(this, kwargs);
3873
3090
  }
3874
- logout() {
3875
- return this.http
3876
- .post(this.hostService.httpsHostWithScheme() + '/_ajax/v1/logout', {}, this.apiOptions(true))
3877
- .pipe(map(resp => LogoutResponse.fromProto(resp)), share());
3091
+ static fromProto(proto) {
3092
+ let m = new VerifyEmailRequest();
3093
+ m = Object.assign(m, proto);
3094
+ return m;
3878
3095
  }
3879
- ssoLogin(r) {
3880
- const request = (r.toApiJson) ? r : new SSOLoginRequest(r);
3881
- let params = '';
3882
- const apiJson = request.toApiJson();
3883
- for (const key in apiJson) {
3884
- if (!apiJson.hasOwnProperty(key)) {
3885
- continue;
3886
- }
3887
- const value = apiJson[key];
3888
- if (value === null) {
3889
- continue;
3890
- }
3891
- if (params.length > 0) {
3892
- params += '&';
3893
- }
3894
- params += `${key}=${value}`;
3096
+ toApiJson() {
3097
+ const toReturn = {};
3098
+ if (typeof this.token !== 'undefined') {
3099
+ toReturn['token'] = this.token;
3895
3100
  }
3896
- window.location.href = `${this.hostService.httpsHostWithScheme()}/sso-login${params.length > 0 ? '?' : ''}${params}`;
3101
+ return toReturn;
3897
3102
  }
3898
3103
  }
3899
- IamHttpApiService.ɵprov = ɵɵdefineInjectable({ factory: function IamHttpApiService_Factory() { return new IamHttpApiService(ɵɵinject(HttpClient), ɵɵinject(HostService)); }, token: IamHttpApiService, providedIn: "root" });
3900
- IamHttpApiService.decorators = [
3901
- { type: Injectable, args: [{ providedIn: 'root' },] }
3902
- ];
3903
- IamHttpApiService.ctorParameters = () => [
3904
- { type: HttpClient },
3905
- { type: HostService }
3906
- ];
3907
3104
 
3908
3105
  var PersonaType;
3909
3106
  (function (PersonaType) {
@@ -3933,6 +3130,7 @@ class BasePersona {
3933
3130
  if (!attributes) {
3934
3131
  return this;
3935
3132
  }
3133
+ /* eslint-disable @typescript-eslint/no-unsafe-assignment */
3936
3134
  const attrs = getValueFromAttribute({ structAttribute: { attributes: attributes.attributes } });
3937
3135
  Object.assign(this, attrs);
3938
3136
  return this;
@@ -3968,7 +3166,9 @@ function getValueFromAttribute(attr) {
3968
3166
  }
3969
3167
  else if (typeof attr.listAttribute !== 'undefined') {
3970
3168
  const vals = [];
3169
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
3971
3170
  if (typeof attr.listAttribute.attributes === 'undefined') {
3171
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
3972
3172
  return vals;
3973
3173
  }
3974
3174
  for (const val of attr.listAttribute.attributes) {
@@ -3988,6 +3188,7 @@ function getValueFromAttribute(attr) {
3988
3188
  if (!attr.structAttribute.attributes.hasOwnProperty(a)) {
3989
3189
  continue;
3990
3190
  }
3191
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
3991
3192
  result[CamelCase(a)] = getValueFromAttribute(attr.structAttribute.attributes[a]);
3992
3193
  }
3993
3194
  return result;
@@ -4033,6 +3234,7 @@ class PartnerPersona extends TypedPersona {
4033
3234
  this.canAccessAutomations = false;
4034
3235
  this.canAccessMarketplace = false;
4035
3236
  this.canEnableApps = false;
3237
+ this.canAccessRetailBilling = false;
4036
3238
  }
4037
3239
  }
4038
3240
 
@@ -4139,11 +3341,283 @@ function getPersonaFromType(personaType) {
4139
3341
  }[personaType]();
4140
3342
  }
4141
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
+
4142
3615
  // *********************************
4143
3616
  class IAMApiService {
4144
3617
  constructor(http, hostService) {
4145
3618
  this.http = http;
4146
3619
  this.hostService = hostService;
3620
+ this._host = this.hostService.hostWithScheme;
4147
3621
  }
4148
3622
  apiOptions() {
4149
3623
  return {
@@ -4155,166 +3629,164 @@ class IAMApiService {
4155
3629
  }
4156
3630
  registerSubject(r) {
4157
3631
  const request = (r.toApiJson) ? r : new RegisterSubjectRequest(r);
4158
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RegisterSubject", request.toApiJson(), this.apiOptions())
4159
- .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)));
4160
3634
  }
4161
3635
  authenticateSubject(r) {
4162
3636
  const request = (r.toApiJson) ? r : new AuthenticateSubjectRequest(r);
4163
- 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' }));
4164
3638
  }
4165
3639
  getSubjects(r) {
4166
3640
  const request = (r.toApiJson) ? r : new GetSubjectsRequest(r);
4167
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetSubjects", request.toApiJson(), this.apiOptions())
4168
- .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)));
4169
3643
  }
4170
3644
  getSubjectsByEmail(r) {
4171
3645
  const request = (r.toApiJson) ? r : new GetSubjectsByEmailRequest(r);
4172
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetSubjectsByEmail", request.toApiJson(), this.apiOptions())
4173
- .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)));
4174
3648
  }
4175
3649
  mutateAttributes(r) {
4176
3650
  const request = (r.toApiJson) ? r : new MutateAttributesRequest(r);
4177
- 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' }));
4178
3652
  }
4179
3653
  resetSubjectPassword(r) {
4180
3654
  const request = (r.toApiJson) ? r : new ResetSubjectPasswordRequest(r);
4181
- 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' }));
4182
3656
  }
4183
3657
  changeSubjectEmail(r) {
4184
3658
  const request = (r.toApiJson) ? r : new ChangeSubjectEmailRequest(r);
4185
- 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' }));
4186
3660
  }
4187
3661
  deleteSubject(r) {
4188
3662
  const request = (r.toApiJson) ? r : new DeleteSubjectRequest(r);
4189
- 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' }));
4190
3664
  }
4191
3665
  searchSubject(r) {
4192
3666
  const request = (r.toApiJson) ? r : new SearchSubjectRequest(r);
4193
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/SearchSubject", request.toApiJson(), this.apiOptions())
4194
- .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)));
4195
3669
  }
4196
3670
  getSubjectContext(r) {
4197
3671
  const request = (r.toApiJson) ? r : new GetSubjectContextRequest(r);
4198
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetSubjectContext", request.toApiJson(), this.apiOptions())
4199
- .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)));
4200
3674
  }
4201
3675
  registerResourceOwner(r) {
4202
3676
  const request = (r.toApiJson) ? r : new RegisterResourceOwnerRequest(r);
4203
- 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' }));
4204
3678
  }
4205
3679
  registerResource(r) {
4206
3680
  const request = (r.toApiJson) ? r : new RegisterResourceRequest(r);
4207
- 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' }));
4208
3682
  }
4209
3683
  registerPolicy(r) {
4210
3684
  const request = (r.toApiJson) ? r : new RegisterPolicyRequest(r);
4211
- 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' }));
4212
3686
  }
4213
3687
  accessResource(r) {
4214
3688
  const request = (r.toApiJson) ? r : new AccessResourceRequest(r);
4215
- 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' }));
4216
3690
  }
4217
3691
  getShortLivedToken(r) {
4218
3692
  const request = (r.toApiJson) ? r : new GetShortLivedTokenRequest(r);
4219
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetShortLivedToken", request.toApiJson(), this.apiOptions())
4220
- .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)));
4221
3695
  }
4222
3696
  getSessionToken(r) {
4223
3697
  const request = (r.toApiJson) ? r : new GetSessionTokenRequest(r);
4224
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetSessionToken", request.toApiJson(), this.apiOptions())
4225
- .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)));
4226
3700
  }
4227
3701
  addKey(r) {
4228
3702
  const request = (r.toApiJson) ? r : new AddKeyRequest(r);
4229
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/AddKey", request.toApiJson(), this.apiOptions())
4230
- .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)));
4231
3705
  }
4232
3706
  removeKey(r) {
4233
3707
  const request = (r.toApiJson) ? r : new RemoveKeyRequest(r);
4234
- 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' }));
4235
3709
  }
4236
3710
  createSession(r) {
4237
3711
  const request = (r.toApiJson) ? r : new CreateSessionRequest(r);
4238
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/CreateSession", request.toApiJson(), this.apiOptions())
4239
- .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)));
4240
3714
  }
4241
3715
  getResetPasswordToken(r) {
4242
3716
  const request = (r.toApiJson) ? r : new GetResetPasswordTokenRequest(r);
4243
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetResetPasswordToken", request.toApiJson(), this.apiOptions())
4244
- .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)));
4245
3719
  }
4246
3720
  listPersonasByEmail(r) {
4247
3721
  const request = (r.toApiJson) ? r : new ListPersonasByEmailRequest(r);
4248
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ListPersonasByEmail", request.toApiJson(), this.apiOptions())
4249
- .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)));
4250
3724
  }
4251
3725
  listPersonas(r) {
4252
3726
  const request = (r.toApiJson) ? r : new IAMListPersonasRequest(r);
4253
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ListPersonas", request.toApiJson(), this.apiOptions())
4254
- .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)));
4255
3729
  }
4256
3730
  createTemporarySubject(r) {
4257
3731
  const request = (r.toApiJson) ? r : new CreateTemporarySubjectRequest(r);
4258
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/CreateTemporarySubject", request.toApiJson(), this.apiOptions())
4259
- .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)));
4260
3734
  }
4261
3735
  getMultiUsers(r) {
4262
3736
  const request = (r.toApiJson) ? r : new GetMultiUsersRequest(r);
4263
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetMultiUsers", request.toApiJson(), this.apiOptions())
4264
- .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)));
4265
3739
  }
4266
3740
  listUsers(r) {
4267
3741
  const request = (r.toApiJson) ? r : new ListUsersRequest(r);
4268
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ListUsers", request.toApiJson(), this.apiOptions())
4269
- .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)));
4270
3744
  }
4271
3745
  updateUser(r) {
4272
3746
  const request = (r.toApiJson) ? r : new UpdateUserRequest(r);
4273
- 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' }));
4274
3748
  }
4275
3749
  deleteUser(r) {
4276
3750
  const request = (r.toApiJson) ? r : new DeleteUserRequest(r);
4277
- 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' }));
4278
3752
  }
4279
3753
  listSecurityLogs(r) {
4280
3754
  const request = (r.toApiJson) ? r : new ListSecurityLogsRequest(r);
4281
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ListSecurityLogs", request.toApiJson(), this.apiOptions())
4282
- .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)));
4283
3757
  }
4284
3758
  verifyEmail(r) {
4285
3759
  const request = (r.toApiJson) ? r : new VerifyEmailRequest(r);
4286
- 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' }));
4287
3761
  }
4288
3762
  sendEmailVerification(r) {
4289
3763
  const request = (r.toApiJson) ? r : new SendEmailVerificationRequest(r);
4290
- 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' }));
4291
3765
  }
4292
3766
  getMultiExternalId(r) {
4293
3767
  const request = (r.toApiJson) ? r : new GetMultiExternalIDRequest(r);
4294
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetMultiExternalID", request.toApiJson(), this.apiOptions())
4295
- .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)));
4296
3770
  }
4297
3771
  createExternalId(r) {
4298
3772
  const request = (r.toApiJson) ? r : new CreateExternalIDRequest(r);
4299
- 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' }));
4300
3774
  }
4301
3775
  addMultiUserRestriction(r) {
4302
3776
  const request = (r.toApiJson) ? r : new AddMultiUserRestrictionRequest(r);
4303
- 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' }));
4304
3778
  }
4305
3779
  removeMultiUserRestriction(r) {
4306
3780
  const request = (r.toApiJson) ? r : new RemoveMultiUserRestrictionRequest(r);
4307
- 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' }));
4308
3782
  }
4309
3783
  }
4310
- IAMApiService.ɵprov = ɵɵdefineInjectable({ factory: function IAMApiService_Factory() { return new IAMApiService(ɵɵinject(HttpClient), ɵɵinject(HostService)); }, token: IAMApiService, providedIn: "root" });
4311
- IAMApiService.decorators = [
4312
- { type: Injectable, args: [{ providedIn: 'root' },] }
4313
- ];
4314
- IAMApiService.ctorParameters = () => [
4315
- { type: HttpClient },
4316
- { type: HostService }
4317
- ];
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 }]; } });
4318
3790
 
4319
3791
  class IAMService {
4320
3792
  constructor(api, httpApi, sessionService, iamApi) {
@@ -4446,45 +3918,12 @@ class IAMService {
4446
3918
  });
4447
3919
  }
4448
3920
  }
4449
- IAMService.ɵprov = ɵɵdefineInjectable({ factory: function IAMService_Factory() { return new IAMService(ɵɵinject(UserIAMApiService), ɵɵinject(IamHttpApiService), ɵɵinject(SessionService), ɵɵinject(IAMApiService)); }, token: IAMService, providedIn: "root" });
4450
- IAMService.decorators = [
4451
- { type: Injectable, args: [{ providedIn: 'root' },] }
4452
- ];
4453
- IAMService.ctorParameters = () => [
4454
- { type: UserIAMApiService },
4455
- { type: IamHttpApiService },
4456
- { type: SessionService },
4457
- { type: IAMApiService }
4458
- ];
4459
-
4460
- // *********************************
4461
- class IAMSsoApiService {
4462
- constructor(http, hostService) {
4463
- this.http = http;
4464
- this.hostService = hostService;
4465
- }
4466
- apiOptions() {
4467
- return {
4468
- headers: new HttpHeaders({
4469
- 'Content-Type': 'application/json'
4470
- }),
4471
- withCredentials: true
4472
- };
4473
- }
4474
- getSessionForUser(r) {
4475
- const request = (r.toApiJson) ? r : new GetSessionForUserRequest(r);
4476
- return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAMSso/GetSessionForUser", request.toApiJson(), this.apiOptions())
4477
- .pipe(map(resp => GetSessionForUserResponse.fromProto(resp)), share());
4478
- }
4479
- }
4480
- IAMSsoApiService.ɵprov = ɵɵdefineInjectable({ factory: function IAMSsoApiService_Factory() { return new IAMSsoApiService(ɵɵinject(HttpClient), ɵɵinject(HostService)); }, token: IAMSsoApiService, providedIn: "root" });
4481
- IAMSsoApiService.decorators = [
4482
- { type: Injectable, args: [{ providedIn: 'root' },] }
4483
- ];
4484
- IAMSsoApiService.ctorParameters = () => [
4485
- { type: HttpClient },
4486
- { type: HostService }
4487
- ];
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 }]; } });
4488
3927
 
4489
3928
  // *********************************
4490
3929
 
@@ -4492,5 +3931,5 @@ IAMSsoApiService.ctorParameters = () => [
4492
3931
  * Generated bundle index. Do not edit.
4493
3932
  */
4494
3933
 
4495
- export { 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, GetSessionForUserRequest, GetSessionForUserResponse, GetSessionTokenRequest, GetShortLivedTokenRequest, GetSubjectBySessionRequest, GetSubjectContextRequest, GetSubjectContextResponse, GetSubjectResponse, GetSubjectsByEmailRequest, GetSubjectsRequest, GetSubjectsResponse, GetTokenRequest, GetTokenResponse, HostService, IAMApiService, IAMListPersonasRequest, IAMService, IAMSsoApiService, 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 };
4496
- //# sourceMappingURL=vendasta-iam.js.map
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 };
3935
+ //# sourceMappingURL=vendasta-iam.mjs.map