@vendasta/iam 2.2.2 → 2.3.1
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.
- package/esm2020/lib/_generated/host.service.mjs +25 -0
- package/esm2020/lib/_generated/index.mjs +2 -0
- package/esm2020/lib/_internal/enums/api.enum.mjs +22 -0
- package/esm2020/lib/_internal/enums/index.mjs +12 -0
- package/esm2020/lib/_internal/enums/policies.enum.mjs +18 -0
- package/esm2020/lib/_internal/enums/resources.enum.mjs +14 -0
- package/esm2020/lib/_internal/enums/subjects.enum.mjs +17 -0
- package/esm2020/lib/_internal/enums/users.enum.mjs +13 -0
- package/esm2020/lib/_internal/iam.api.service.mjs +189 -0
- package/esm2020/lib/_internal/index.mjs +12 -0
- package/esm2020/lib/_internal/interfaces/annotations.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/api.interface.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/attributes.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/field-mask.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/index.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/policies.interface.mjs +3 -0
- package/esm2020/lib/_internal/interfaces/resources.interface.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/security-logs.interface.mjs +8 -0
- package/esm2020/lib/_internal/interfaces/subjects.interface.mjs +2 -0
- package/esm2020/lib/_internal/interfaces/users.interface.mjs +2 -0
- package/esm2020/lib/_internal/objects/annotations.mjs +30 -0
- package/esm2020/lib/_internal/objects/api.mjs +1846 -0
- package/esm2020/lib/_internal/objects/attributes.mjs +158 -0
- package/esm2020/lib/_internal/objects/field-mask.mjs +27 -0
- package/esm2020/lib/_internal/objects/index.mjs +16 -0
- package/esm2020/lib/_internal/objects/policies.mjs +264 -0
- package/esm2020/lib/_internal/objects/resources.mjs +168 -0
- package/esm2020/lib/_internal/objects/security-logs.mjs +42 -0
- package/esm2020/lib/_internal/objects/subjects.mjs +352 -0
- package/esm2020/lib/_internal/objects/users.mjs +168 -0
- package/esm2020/lib/_internal/user-iam.api.service.mjs +65 -0
- package/esm2020/lib/http/http.interface.mjs +2 -0
- package/esm2020/lib/http/http.mjs +104 -0
- package/esm2020/lib/http/iam.http.api.service.mjs +67 -0
- package/esm2020/lib/iam.service.mjs +155 -0
- package/esm2020/lib/index.mjs +7 -0
- package/esm2020/lib/personas/account-group.mjs +9 -0
- package/esm2020/lib/personas/base-personas.mjs +93 -0
- package/esm2020/lib/personas/crm-role.mjs +9 -0
- package/esm2020/lib/personas/developer.mjs +9 -0
- package/esm2020/lib/personas/digital-agent.mjs +9 -0
- package/esm2020/lib/personas/index.mjs +13 -0
- package/esm2020/lib/personas/partner-app.mjs +9 -0
- package/esm2020/lib/personas/partner.mjs +25 -0
- package/esm2020/lib/personas/persona-type.enum.mjs +14 -0
- package/esm2020/lib/personas/personas.mjs +61 -0
- package/esm2020/lib/personas/salesperson.mjs +15 -0
- package/esm2020/lib/personas/smb.mjs +10 -0
- package/esm2020/lib/personas/success.mjs +9 -0
- package/esm2020/lib/personas/vendor.mjs +9 -0
- package/esm2020/public_api.mjs +2 -0
- package/esm2020/vendasta-iam.mjs +5 -0
- package/fesm2015/{vendasta-iam.js → vendasta-iam.mjs} +375 -388
- package/fesm2015/vendasta-iam.mjs.map +1 -0
- package/fesm2020/vendasta-iam.mjs +3948 -0
- package/fesm2020/vendasta-iam.mjs.map +1 -0
- package/lib/_generated/host.service.d.ts +4 -11
- package/lib/_internal/iam.api.service.d.ts +3 -2
- package/lib/_internal/user-iam.api.service.d.ts +3 -2
- package/lib/http/iam.http.api.service.d.ts +3 -2
- package/lib/iam.service.d.ts +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/personas/crm-role.d.ts +5 -0
- package/lib/personas/index.d.ts +1 -0
- package/lib/personas/persona-type.enum.d.ts +2 -1
- package/package.json +27 -16
- package/{README.md → src/README.md} +0 -0
- package/CHANGELOG.md +0 -101
- package/bundles/vendasta-iam.umd.js +0 -4531
- package/bundles/vendasta-iam.umd.js.map +0 -1
- package/bundles/vendasta-iam.umd.min.js +0 -16
- package/bundles/vendasta-iam.umd.min.js.map +0 -1
- package/esm2015/lib/_generated/host.service.js +0 -64
- package/esm2015/lib/_generated/index.js +0 -2
- package/esm2015/lib/_internal/enums/api.enum.js +0 -22
- package/esm2015/lib/_internal/enums/index.js +0 -12
- package/esm2015/lib/_internal/enums/policies.enum.js +0 -18
- package/esm2015/lib/_internal/enums/resources.enum.js +0 -14
- package/esm2015/lib/_internal/enums/subjects.enum.js +0 -17
- package/esm2015/lib/_internal/enums/users.enum.js +0 -13
- package/esm2015/lib/_internal/iam.api.service.js +0 -188
- package/esm2015/lib/_internal/index.js +0 -12
- package/esm2015/lib/_internal/interfaces/annotations.interface.js +0 -8
- package/esm2015/lib/_internal/interfaces/api.interface.js +0 -2
- package/esm2015/lib/_internal/interfaces/attributes.interface.js +0 -8
- package/esm2015/lib/_internal/interfaces/field-mask.interface.js +0 -8
- package/esm2015/lib/_internal/interfaces/index.js +0 -2
- package/esm2015/lib/_internal/interfaces/policies.interface.js +0 -3
- package/esm2015/lib/_internal/interfaces/resources.interface.js +0 -2
- package/esm2015/lib/_internal/interfaces/security-logs.interface.js +0 -8
- package/esm2015/lib/_internal/interfaces/subjects.interface.js +0 -2
- package/esm2015/lib/_internal/interfaces/users.interface.js +0 -2
- package/esm2015/lib/_internal/objects/annotations.js +0 -30
- package/esm2015/lib/_internal/objects/api.js +0 -1846
- package/esm2015/lib/_internal/objects/attributes.js +0 -158
- package/esm2015/lib/_internal/objects/field-mask.js +0 -27
- package/esm2015/lib/_internal/objects/index.js +0 -16
- package/esm2015/lib/_internal/objects/policies.js +0 -264
- package/esm2015/lib/_internal/objects/resources.js +0 -168
- package/esm2015/lib/_internal/objects/security-logs.js +0 -42
- package/esm2015/lib/_internal/objects/subjects.js +0 -352
- package/esm2015/lib/_internal/objects/users.js +0 -168
- package/esm2015/lib/_internal/user-iam.api.service.js +0 -64
- package/esm2015/lib/http/http.interface.js +0 -2
- package/esm2015/lib/http/http.js +0 -102
- package/esm2015/lib/http/iam.http.api.service.js +0 -65
- package/esm2015/lib/iam.service.js +0 -152
- package/esm2015/lib/index.js +0 -7
- package/esm2015/lib/personas/account-group.js +0 -9
- package/esm2015/lib/personas/base-personas.js +0 -89
- package/esm2015/lib/personas/developer.js +0 -9
- package/esm2015/lib/personas/digital-agent.js +0 -9
- package/esm2015/lib/personas/index.js +0 -12
- package/esm2015/lib/personas/partner-app.js +0 -9
- package/esm2015/lib/personas/partner.js +0 -25
- package/esm2015/lib/personas/persona-type.enum.js +0 -13
- package/esm2015/lib/personas/personas.js +0 -57
- package/esm2015/lib/personas/salesperson.js +0 -15
- package/esm2015/lib/personas/smb.js +0 -10
- package/esm2015/lib/personas/success.js +0 -9
- package/esm2015/lib/personas/vendor.js +0 -9
- package/esm2015/public_api.js +0 -2
- package/esm2015/vendasta-iam.js +0 -5
- package/fesm2015/vendasta-iam.js.map +0 -1
|
@@ -1,4531 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs/operators'), require('@angular/common/http'), require('@vendasta/core')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@vendasta/iam', ['exports', '@angular/core', 'rxjs/operators', '@angular/common/http', '@vendasta/core'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.vendasta = global.vendasta || {}, global.vendasta.iam = {}), global.ng.core, global.rxjs.operators, global.ng.common.http, global.i1));
|
|
5
|
-
}(this, (function (exports, i0, operators, i1$1, i1) { 'use strict';
|
|
6
|
-
|
|
7
|
-
/*! *****************************************************************************
|
|
8
|
-
Copyright (c) Microsoft Corporation.
|
|
9
|
-
|
|
10
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
-
purpose with or without fee is hereby granted.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
-
***************************************************************************** */
|
|
21
|
-
/* global Reflect, Promise */
|
|
22
|
-
var extendStatics = function (d, b) {
|
|
23
|
-
extendStatics = Object.setPrototypeOf ||
|
|
24
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
25
|
-
function (d, b) { for (var p in b)
|
|
26
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
27
|
-
d[p] = b[p]; };
|
|
28
|
-
return extendStatics(d, b);
|
|
29
|
-
};
|
|
30
|
-
function __extends(d, b) {
|
|
31
|
-
extendStatics(d, b);
|
|
32
|
-
function __() { this.constructor = d; }
|
|
33
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
34
|
-
}
|
|
35
|
-
var __assign = function () {
|
|
36
|
-
__assign = Object.assign || function __assign(t) {
|
|
37
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
38
|
-
s = arguments[i];
|
|
39
|
-
for (var p in s)
|
|
40
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
41
|
-
t[p] = s[p];
|
|
42
|
-
}
|
|
43
|
-
return t;
|
|
44
|
-
};
|
|
45
|
-
return __assign.apply(this, arguments);
|
|
46
|
-
};
|
|
47
|
-
function __rest(s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s)
|
|
50
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
51
|
-
t[p] = s[p];
|
|
52
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
53
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
54
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
55
|
-
t[p[i]] = s[p[i]];
|
|
56
|
-
}
|
|
57
|
-
return t;
|
|
58
|
-
}
|
|
59
|
-
function __decorate(decorators, target, key, desc) {
|
|
60
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
61
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
62
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
63
|
-
else
|
|
64
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
65
|
-
if (d = decorators[i])
|
|
66
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
67
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
68
|
-
}
|
|
69
|
-
function __param(paramIndex, decorator) {
|
|
70
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
71
|
-
}
|
|
72
|
-
function __metadata(metadataKey, metadataValue) {
|
|
73
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
74
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
75
|
-
}
|
|
76
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
77
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
78
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
79
|
-
function fulfilled(value) { try {
|
|
80
|
-
step(generator.next(value));
|
|
81
|
-
}
|
|
82
|
-
catch (e) {
|
|
83
|
-
reject(e);
|
|
84
|
-
} }
|
|
85
|
-
function rejected(value) { try {
|
|
86
|
-
step(generator["throw"](value));
|
|
87
|
-
}
|
|
88
|
-
catch (e) {
|
|
89
|
-
reject(e);
|
|
90
|
-
} }
|
|
91
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
92
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
function __generator(thisArg, body) {
|
|
96
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
97
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
98
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
99
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
100
|
-
function step(op) {
|
|
101
|
-
if (f)
|
|
102
|
-
throw new TypeError("Generator is already executing.");
|
|
103
|
-
while (_)
|
|
104
|
-
try {
|
|
105
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
106
|
-
return t;
|
|
107
|
-
if (y = 0, t)
|
|
108
|
-
op = [op[0] & 2, t.value];
|
|
109
|
-
switch (op[0]) {
|
|
110
|
-
case 0:
|
|
111
|
-
case 1:
|
|
112
|
-
t = op;
|
|
113
|
-
break;
|
|
114
|
-
case 4:
|
|
115
|
-
_.label++;
|
|
116
|
-
return { value: op[1], done: false };
|
|
117
|
-
case 5:
|
|
118
|
-
_.label++;
|
|
119
|
-
y = op[1];
|
|
120
|
-
op = [0];
|
|
121
|
-
continue;
|
|
122
|
-
case 7:
|
|
123
|
-
op = _.ops.pop();
|
|
124
|
-
_.trys.pop();
|
|
125
|
-
continue;
|
|
126
|
-
default:
|
|
127
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
128
|
-
_ = 0;
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
132
|
-
_.label = op[1];
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
135
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
136
|
-
_.label = t[1];
|
|
137
|
-
t = op;
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
if (t && _.label < t[2]) {
|
|
141
|
-
_.label = t[2];
|
|
142
|
-
_.ops.push(op);
|
|
143
|
-
break;
|
|
144
|
-
}
|
|
145
|
-
if (t[2])
|
|
146
|
-
_.ops.pop();
|
|
147
|
-
_.trys.pop();
|
|
148
|
-
continue;
|
|
149
|
-
}
|
|
150
|
-
op = body.call(thisArg, _);
|
|
151
|
-
}
|
|
152
|
-
catch (e) {
|
|
153
|
-
op = [6, e];
|
|
154
|
-
y = 0;
|
|
155
|
-
}
|
|
156
|
-
finally {
|
|
157
|
-
f = t = 0;
|
|
158
|
-
}
|
|
159
|
-
if (op[0] & 5)
|
|
160
|
-
throw op[1];
|
|
161
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
165
|
-
if (k2 === undefined)
|
|
166
|
-
k2 = k;
|
|
167
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
168
|
-
}) : (function (o, m, k, k2) {
|
|
169
|
-
if (k2 === undefined)
|
|
170
|
-
k2 = k;
|
|
171
|
-
o[k2] = m[k];
|
|
172
|
-
});
|
|
173
|
-
function __exportStar(m, o) {
|
|
174
|
-
for (var p in m)
|
|
175
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
176
|
-
__createBinding(o, m, p);
|
|
177
|
-
}
|
|
178
|
-
function __values(o) {
|
|
179
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
180
|
-
if (m)
|
|
181
|
-
return m.call(o);
|
|
182
|
-
if (o && typeof o.length === "number")
|
|
183
|
-
return {
|
|
184
|
-
next: function () {
|
|
185
|
-
if (o && i >= o.length)
|
|
186
|
-
o = void 0;
|
|
187
|
-
return { value: o && o[i++], done: !o };
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
191
|
-
}
|
|
192
|
-
function __read(o, n) {
|
|
193
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
194
|
-
if (!m)
|
|
195
|
-
return o;
|
|
196
|
-
var i = m.call(o), r, ar = [], e;
|
|
197
|
-
try {
|
|
198
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
199
|
-
ar.push(r.value);
|
|
200
|
-
}
|
|
201
|
-
catch (error) {
|
|
202
|
-
e = { error: error };
|
|
203
|
-
}
|
|
204
|
-
finally {
|
|
205
|
-
try {
|
|
206
|
-
if (r && !r.done && (m = i["return"]))
|
|
207
|
-
m.call(i);
|
|
208
|
-
}
|
|
209
|
-
finally {
|
|
210
|
-
if (e)
|
|
211
|
-
throw e.error;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
return ar;
|
|
215
|
-
}
|
|
216
|
-
function __spread() {
|
|
217
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
218
|
-
ar = ar.concat(__read(arguments[i]));
|
|
219
|
-
return ar;
|
|
220
|
-
}
|
|
221
|
-
function __spreadArrays() {
|
|
222
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
223
|
-
s += arguments[i].length;
|
|
224
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
225
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
226
|
-
r[k] = a[j];
|
|
227
|
-
return r;
|
|
228
|
-
}
|
|
229
|
-
;
|
|
230
|
-
function __await(v) {
|
|
231
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
232
|
-
}
|
|
233
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
234
|
-
if (!Symbol.asyncIterator)
|
|
235
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
236
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
237
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
238
|
-
function verb(n) { if (g[n])
|
|
239
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
240
|
-
function resume(n, v) { try {
|
|
241
|
-
step(g[n](v));
|
|
242
|
-
}
|
|
243
|
-
catch (e) {
|
|
244
|
-
settle(q[0][3], e);
|
|
245
|
-
} }
|
|
246
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
247
|
-
function fulfill(value) { resume("next", value); }
|
|
248
|
-
function reject(value) { resume("throw", value); }
|
|
249
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
250
|
-
resume(q[0][0], q[0][1]); }
|
|
251
|
-
}
|
|
252
|
-
function __asyncDelegator(o) {
|
|
253
|
-
var i, p;
|
|
254
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
255
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
256
|
-
}
|
|
257
|
-
function __asyncValues(o) {
|
|
258
|
-
if (!Symbol.asyncIterator)
|
|
259
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
260
|
-
var m = o[Symbol.asyncIterator], i;
|
|
261
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
262
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
263
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
264
|
-
}
|
|
265
|
-
function __makeTemplateObject(cooked, raw) {
|
|
266
|
-
if (Object.defineProperty) {
|
|
267
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
268
|
-
}
|
|
269
|
-
else {
|
|
270
|
-
cooked.raw = raw;
|
|
271
|
-
}
|
|
272
|
-
return cooked;
|
|
273
|
-
}
|
|
274
|
-
;
|
|
275
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
276
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
277
|
-
}) : function (o, v) {
|
|
278
|
-
o["default"] = v;
|
|
279
|
-
};
|
|
280
|
-
function __importStar(mod) {
|
|
281
|
-
if (mod && mod.__esModule)
|
|
282
|
-
return mod;
|
|
283
|
-
var result = {};
|
|
284
|
-
if (mod != null)
|
|
285
|
-
for (var k in mod)
|
|
286
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
287
|
-
__createBinding(result, mod, k);
|
|
288
|
-
__setModuleDefault(result, mod);
|
|
289
|
-
return result;
|
|
290
|
-
}
|
|
291
|
-
function __importDefault(mod) {
|
|
292
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
293
|
-
}
|
|
294
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
295
|
-
if (!privateMap.has(receiver)) {
|
|
296
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
297
|
-
}
|
|
298
|
-
return privateMap.get(receiver);
|
|
299
|
-
}
|
|
300
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
301
|
-
if (!privateMap.has(receiver)) {
|
|
302
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
303
|
-
}
|
|
304
|
-
privateMap.set(receiver, value);
|
|
305
|
-
return value;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
function enumStringToValue(enumRef, value) {
|
|
309
|
-
if (typeof value === 'number') {
|
|
310
|
-
return value;
|
|
311
|
-
}
|
|
312
|
-
return enumRef[value];
|
|
313
|
-
}
|
|
314
|
-
var Attribute = /** @class */ (function () {
|
|
315
|
-
function Attribute(kwargs) {
|
|
316
|
-
if (!kwargs) {
|
|
317
|
-
return;
|
|
318
|
-
}
|
|
319
|
-
Object.assign(this, kwargs);
|
|
320
|
-
}
|
|
321
|
-
Attribute.fromProto = function (proto) {
|
|
322
|
-
var m = new Attribute();
|
|
323
|
-
m = Object.assign(m, proto);
|
|
324
|
-
if (proto.intAttribute) {
|
|
325
|
-
m.intAttribute = parseInt(proto.intAttribute, 10);
|
|
326
|
-
}
|
|
327
|
-
if (proto.structAttribute) {
|
|
328
|
-
m.structAttribute = StructAttribute.fromProto(proto.structAttribute);
|
|
329
|
-
}
|
|
330
|
-
if (proto.listAttribute) {
|
|
331
|
-
m.listAttribute = ListAttribute.fromProto(proto.listAttribute);
|
|
332
|
-
}
|
|
333
|
-
if (proto.timestampAttribute) {
|
|
334
|
-
m.timestampAttribute = new Date(proto.timestampAttribute);
|
|
335
|
-
}
|
|
336
|
-
if (proto.geopointAttribute) {
|
|
337
|
-
m.geopointAttribute = GeoPointAttribute.fromProto(proto.geopointAttribute);
|
|
338
|
-
}
|
|
339
|
-
return m;
|
|
340
|
-
};
|
|
341
|
-
Attribute.prototype.toApiJson = function () {
|
|
342
|
-
var toReturn = {};
|
|
343
|
-
if (typeof this.intAttribute !== 'undefined') {
|
|
344
|
-
toReturn['intAttribute'] = this.intAttribute;
|
|
345
|
-
}
|
|
346
|
-
if (typeof this.doubleAttribute !== 'undefined') {
|
|
347
|
-
toReturn['doubleAttribute'] = this.doubleAttribute;
|
|
348
|
-
}
|
|
349
|
-
if (typeof this.stringAttribute !== 'undefined') {
|
|
350
|
-
toReturn['stringAttribute'] = this.stringAttribute;
|
|
351
|
-
}
|
|
352
|
-
if (typeof this.boolAttribute !== 'undefined') {
|
|
353
|
-
toReturn['boolAttribute'] = this.boolAttribute;
|
|
354
|
-
}
|
|
355
|
-
if (typeof this.structAttribute !== 'undefined' && this.structAttribute !== null) {
|
|
356
|
-
toReturn['structAttribute'] = 'toApiJson' in this.structAttribute ? this.structAttribute.toApiJson() : this.structAttribute;
|
|
357
|
-
}
|
|
358
|
-
if (typeof this.listAttribute !== 'undefined' && this.listAttribute !== null) {
|
|
359
|
-
toReturn['listAttribute'] = 'toApiJson' in this.listAttribute ? this.listAttribute.toApiJson() : this.listAttribute;
|
|
360
|
-
}
|
|
361
|
-
if (typeof this.timestampAttribute !== 'undefined' && this.timestampAttribute !== null) {
|
|
362
|
-
toReturn['timestampAttribute'] = 'toApiJson' in this.timestampAttribute ? this.timestampAttribute.toApiJson() : this.timestampAttribute;
|
|
363
|
-
}
|
|
364
|
-
if (typeof this.geopointAttribute !== 'undefined' && this.geopointAttribute !== null) {
|
|
365
|
-
toReturn['geopointAttribute'] = 'toApiJson' in this.geopointAttribute ? this.geopointAttribute.toApiJson() : this.geopointAttribute;
|
|
366
|
-
}
|
|
367
|
-
return toReturn;
|
|
368
|
-
};
|
|
369
|
-
return Attribute;
|
|
370
|
-
}());
|
|
371
|
-
var StructAttributeAttributesEntry = /** @class */ (function () {
|
|
372
|
-
function StructAttributeAttributesEntry(kwargs) {
|
|
373
|
-
if (!kwargs) {
|
|
374
|
-
return;
|
|
375
|
-
}
|
|
376
|
-
Object.assign(this, kwargs);
|
|
377
|
-
}
|
|
378
|
-
StructAttributeAttributesEntry.fromProto = function (proto) {
|
|
379
|
-
var m = new StructAttributeAttributesEntry();
|
|
380
|
-
m = Object.assign(m, proto);
|
|
381
|
-
if (proto.value) {
|
|
382
|
-
m.value = Attribute.fromProto(proto.value);
|
|
383
|
-
}
|
|
384
|
-
return m;
|
|
385
|
-
};
|
|
386
|
-
StructAttributeAttributesEntry.prototype.toApiJson = function () {
|
|
387
|
-
var toReturn = {};
|
|
388
|
-
if (typeof this.key !== 'undefined') {
|
|
389
|
-
toReturn['key'] = this.key;
|
|
390
|
-
}
|
|
391
|
-
if (typeof this.value !== 'undefined' && this.value !== null) {
|
|
392
|
-
toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
|
|
393
|
-
}
|
|
394
|
-
return toReturn;
|
|
395
|
-
};
|
|
396
|
-
return StructAttributeAttributesEntry;
|
|
397
|
-
}());
|
|
398
|
-
var GeoPointAttribute = /** @class */ (function () {
|
|
399
|
-
function GeoPointAttribute(kwargs) {
|
|
400
|
-
if (!kwargs) {
|
|
401
|
-
return;
|
|
402
|
-
}
|
|
403
|
-
Object.assign(this, kwargs);
|
|
404
|
-
}
|
|
405
|
-
GeoPointAttribute.fromProto = function (proto) {
|
|
406
|
-
var m = new GeoPointAttribute();
|
|
407
|
-
m = Object.assign(m, proto);
|
|
408
|
-
return m;
|
|
409
|
-
};
|
|
410
|
-
GeoPointAttribute.prototype.toApiJson = function () {
|
|
411
|
-
var toReturn = {};
|
|
412
|
-
if (typeof this.latitude !== 'undefined') {
|
|
413
|
-
toReturn['latitude'] = this.latitude;
|
|
414
|
-
}
|
|
415
|
-
if (typeof this.longitude !== 'undefined') {
|
|
416
|
-
toReturn['longitude'] = this.longitude;
|
|
417
|
-
}
|
|
418
|
-
return toReturn;
|
|
419
|
-
};
|
|
420
|
-
return GeoPointAttribute;
|
|
421
|
-
}());
|
|
422
|
-
var ListAttribute = /** @class */ (function () {
|
|
423
|
-
function ListAttribute(kwargs) {
|
|
424
|
-
if (!kwargs) {
|
|
425
|
-
return;
|
|
426
|
-
}
|
|
427
|
-
Object.assign(this, kwargs);
|
|
428
|
-
}
|
|
429
|
-
ListAttribute.fromProto = function (proto) {
|
|
430
|
-
var m = new ListAttribute();
|
|
431
|
-
m = Object.assign(m, proto);
|
|
432
|
-
if (proto.attributes) {
|
|
433
|
-
m.attributes = proto.attributes.map(Attribute.fromProto);
|
|
434
|
-
}
|
|
435
|
-
return m;
|
|
436
|
-
};
|
|
437
|
-
ListAttribute.prototype.toApiJson = function () {
|
|
438
|
-
var toReturn = {};
|
|
439
|
-
if (typeof this.attributes !== 'undefined' && this.attributes !== null) {
|
|
440
|
-
toReturn['attributes'] = 'toApiJson' in this.attributes ? this.attributes.toApiJson() : this.attributes;
|
|
441
|
-
}
|
|
442
|
-
return toReturn;
|
|
443
|
-
};
|
|
444
|
-
return ListAttribute;
|
|
445
|
-
}());
|
|
446
|
-
var StructAttribute = /** @class */ (function () {
|
|
447
|
-
function StructAttribute(kwargs) {
|
|
448
|
-
if (!kwargs) {
|
|
449
|
-
return;
|
|
450
|
-
}
|
|
451
|
-
Object.assign(this, kwargs);
|
|
452
|
-
}
|
|
453
|
-
StructAttribute.fromProto = function (proto) {
|
|
454
|
-
var m = new StructAttribute();
|
|
455
|
-
m = Object.assign(m, proto);
|
|
456
|
-
if (proto.attributes) {
|
|
457
|
-
m.attributes = Object.keys(proto.attributes).reduce(function (obj, k) { obj[k] = Attribute.fromProto(proto.attributes[k]); return obj; }, {});
|
|
458
|
-
}
|
|
459
|
-
return m;
|
|
460
|
-
};
|
|
461
|
-
StructAttribute.prototype.toApiJson = function () {
|
|
462
|
-
var toReturn = {};
|
|
463
|
-
if (typeof this.attributes !== 'undefined' && this.attributes !== null) {
|
|
464
|
-
toReturn['attributes'] = 'toApiJson' in this.attributes ? this.attributes.toApiJson() : this.attributes;
|
|
465
|
-
}
|
|
466
|
-
return toReturn;
|
|
467
|
-
};
|
|
468
|
-
return StructAttribute;
|
|
469
|
-
}());
|
|
470
|
-
|
|
471
|
-
// *********************************
|
|
472
|
-
(function (BooleanOperator) {
|
|
473
|
-
BooleanOperator[BooleanOperator["AND"] = 0] = "AND";
|
|
474
|
-
BooleanOperator[BooleanOperator["OR"] = 1] = "OR";
|
|
475
|
-
BooleanOperator[BooleanOperator["NOT"] = 2] = "NOT";
|
|
476
|
-
})(exports.BooleanOperator || (exports.BooleanOperator = {}));
|
|
477
|
-
(function (ForOperator) {
|
|
478
|
-
ForOperator[ForOperator["ANY"] = 0] = "ANY";
|
|
479
|
-
ForOperator[ForOperator["ALL"] = 1] = "ALL";
|
|
480
|
-
})(exports.ForOperator || (exports.ForOperator = {}));
|
|
481
|
-
|
|
482
|
-
// *********************************
|
|
483
|
-
(function (AccessScope) {
|
|
484
|
-
AccessScope[AccessScope["READ"] = 0] = "READ";
|
|
485
|
-
AccessScope[AccessScope["WRITE"] = 1] = "WRITE";
|
|
486
|
-
AccessScope[AccessScope["DELETE"] = 2] = "DELETE";
|
|
487
|
-
AccessScope[AccessScope["LIST"] = 3] = "LIST";
|
|
488
|
-
})(exports.AccessScope || (exports.AccessScope = {}));
|
|
489
|
-
|
|
490
|
-
// *********************************
|
|
491
|
-
(function (AlgorithmType) {
|
|
492
|
-
AlgorithmType[AlgorithmType["ALGORITHM_TYPE_ES256"] = 0] = "ALGORITHM_TYPE_ES256";
|
|
493
|
-
AlgorithmType[AlgorithmType["ALGORITHM_TYPE_RS256"] = 1] = "ALGORITHM_TYPE_RS256";
|
|
494
|
-
})(exports.AlgorithmType || (exports.AlgorithmType = {}));
|
|
495
|
-
(function (OrderByDirection) {
|
|
496
|
-
OrderByDirection[OrderByDirection["ASCENDING"] = 0] = "ASCENDING";
|
|
497
|
-
OrderByDirection[OrderByDirection["DESCENDING"] = 1] = "DESCENDING";
|
|
498
|
-
})(exports.OrderByDirection || (exports.OrderByDirection = {}));
|
|
499
|
-
|
|
500
|
-
// *********************************
|
|
501
|
-
(function (RestrictionType) {
|
|
502
|
-
RestrictionType[RestrictionType["RESTRICTION_TYPE_UNSET"] = 0] = "RESTRICTION_TYPE_UNSET";
|
|
503
|
-
RestrictionType[RestrictionType["RESTRICTION_TYPE_RESET_PASSWORD_BEFORE_LOGIN"] = 1] = "RESTRICTION_TYPE_RESET_PASSWORD_BEFORE_LOGIN";
|
|
504
|
-
RestrictionType[RestrictionType["RESTRICTION_TYPE_FROZEN"] = 2] = "RESTRICTION_TYPE_FROZEN";
|
|
505
|
-
})(exports.RestrictionType || (exports.RestrictionType = {}));
|
|
506
|
-
|
|
507
|
-
// *********************************
|
|
508
|
-
(function (SortDirection) {
|
|
509
|
-
SortDirection[SortDirection["SORT_DIRECTION_INVALID"] = 0] = "SORT_DIRECTION_INVALID";
|
|
510
|
-
SortDirection[SortDirection["SORT_DIRECTION_ASCENDING"] = 1] = "SORT_DIRECTION_ASCENDING";
|
|
511
|
-
SortDirection[SortDirection["SORT_DIRECTION_DESCENDING"] = 2] = "SORT_DIRECTION_DESCENDING";
|
|
512
|
-
})(exports.SortDirection || (exports.SortDirection = {}));
|
|
513
|
-
(function (UserSortField) {
|
|
514
|
-
UserSortField[UserSortField["USER_SORT_FIELD_INVALID"] = 0] = "USER_SORT_FIELD_INVALID";
|
|
515
|
-
UserSortField[UserSortField["USER_SORT_FIELD_CREATED"] = 1] = "USER_SORT_FIELD_CREATED";
|
|
516
|
-
UserSortField[UserSortField["USER_SORT_FIELD_FIRST_NAME"] = 2] = "USER_SORT_FIELD_FIRST_NAME";
|
|
517
|
-
UserSortField[UserSortField["USER_SORT_FIELD_LAST_NAME"] = 3] = "USER_SORT_FIELD_LAST_NAME";
|
|
518
|
-
UserSortField[UserSortField["USER_SORT_FIELD_EMAIL"] = 4] = "USER_SORT_FIELD_EMAIL";
|
|
519
|
-
UserSortField[UserSortField["USER_SORT_FIELD_LAST_LOGIN"] = 5] = "USER_SORT_FIELD_LAST_LOGIN";
|
|
520
|
-
})(exports.UserSortField || (exports.UserSortField = {}));
|
|
521
|
-
|
|
522
|
-
// *********************************
|
|
523
|
-
|
|
524
|
-
function enumStringToValue$1(enumRef, value) {
|
|
525
|
-
if (typeof value === 'number') {
|
|
526
|
-
return value;
|
|
527
|
-
}
|
|
528
|
-
return enumRef[value];
|
|
529
|
-
}
|
|
530
|
-
var Context = /** @class */ (function () {
|
|
531
|
-
function Context(kwargs) {
|
|
532
|
-
if (!kwargs) {
|
|
533
|
-
return;
|
|
534
|
-
}
|
|
535
|
-
Object.assign(this, kwargs);
|
|
536
|
-
}
|
|
537
|
-
Context.fromProto = function (proto) {
|
|
538
|
-
var m = new Context();
|
|
539
|
-
m = Object.assign(m, proto);
|
|
540
|
-
if (proto.namespaced) {
|
|
541
|
-
m.namespaced = NamespacedContext.fromProto(proto.namespaced);
|
|
542
|
-
}
|
|
543
|
-
if (proto.typed) {
|
|
544
|
-
m.typed = TypedContext.fromProto(proto.typed);
|
|
545
|
-
}
|
|
546
|
-
return m;
|
|
547
|
-
};
|
|
548
|
-
Context.prototype.toApiJson = function () {
|
|
549
|
-
var toReturn = {};
|
|
550
|
-
if (typeof this.namespaced !== 'undefined' && this.namespaced !== null) {
|
|
551
|
-
toReturn['namespaced'] = 'toApiJson' in this.namespaced ? this.namespaced.toApiJson() : this.namespaced;
|
|
552
|
-
}
|
|
553
|
-
if (typeof this.typed !== 'undefined' && this.typed !== null) {
|
|
554
|
-
toReturn['typed'] = 'toApiJson' in this.typed ? this.typed.toApiJson() : this.typed;
|
|
555
|
-
}
|
|
556
|
-
return toReturn;
|
|
557
|
-
};
|
|
558
|
-
return Context;
|
|
559
|
-
}());
|
|
560
|
-
var MultiValueAttribute = /** @class */ (function () {
|
|
561
|
-
function MultiValueAttribute(kwargs) {
|
|
562
|
-
if (!kwargs) {
|
|
563
|
-
return;
|
|
564
|
-
}
|
|
565
|
-
Object.assign(this, kwargs);
|
|
566
|
-
}
|
|
567
|
-
MultiValueAttribute.fromProto = function (proto) {
|
|
568
|
-
var m = new MultiValueAttribute();
|
|
569
|
-
m = Object.assign(m, proto);
|
|
570
|
-
return m;
|
|
571
|
-
};
|
|
572
|
-
MultiValueAttribute.prototype.toApiJson = function () {
|
|
573
|
-
var toReturn = {};
|
|
574
|
-
if (typeof this.key !== 'undefined') {
|
|
575
|
-
toReturn['key'] = this.key;
|
|
576
|
-
}
|
|
577
|
-
if (typeof this.values !== 'undefined') {
|
|
578
|
-
toReturn['values'] = this.values;
|
|
579
|
-
}
|
|
580
|
-
return toReturn;
|
|
581
|
-
};
|
|
582
|
-
return MultiValueAttribute;
|
|
583
|
-
}());
|
|
584
|
-
var Mutation = /** @class */ (function () {
|
|
585
|
-
function Mutation(kwargs) {
|
|
586
|
-
if (!kwargs) {
|
|
587
|
-
return;
|
|
588
|
-
}
|
|
589
|
-
Object.assign(this, kwargs);
|
|
590
|
-
}
|
|
591
|
-
Mutation.fromProto = function (proto) {
|
|
592
|
-
var m = new Mutation();
|
|
593
|
-
m = Object.assign(m, proto);
|
|
594
|
-
if (proto.add) {
|
|
595
|
-
m.add = SingleValueAttribute.fromProto(proto.add);
|
|
596
|
-
}
|
|
597
|
-
if (proto.replace) {
|
|
598
|
-
m.replace = MultiValueAttribute.fromProto(proto.replace);
|
|
599
|
-
}
|
|
600
|
-
if (proto.remove) {
|
|
601
|
-
m.remove = SingleValueAttribute.fromProto(proto.remove);
|
|
602
|
-
}
|
|
603
|
-
if (proto.replaceAttributes) {
|
|
604
|
-
m.replaceAttributes = StructAttribute.fromProto(proto.replaceAttributes);
|
|
605
|
-
}
|
|
606
|
-
if (proto.addAttributes) {
|
|
607
|
-
m.addAttributes = StructAttribute.fromProto(proto.addAttributes);
|
|
608
|
-
}
|
|
609
|
-
if (proto.removeAttributes) {
|
|
610
|
-
m.removeAttributes = StructAttribute.fromProto(proto.removeAttributes);
|
|
611
|
-
}
|
|
612
|
-
return m;
|
|
613
|
-
};
|
|
614
|
-
Mutation.prototype.toApiJson = function () {
|
|
615
|
-
var toReturn = {};
|
|
616
|
-
if (typeof this.add !== 'undefined' && this.add !== null) {
|
|
617
|
-
toReturn['add'] = 'toApiJson' in this.add ? this.add.toApiJson() : this.add;
|
|
618
|
-
}
|
|
619
|
-
if (typeof this.replace !== 'undefined' && this.replace !== null) {
|
|
620
|
-
toReturn['replace'] = 'toApiJson' in this.replace ? this.replace.toApiJson() : this.replace;
|
|
621
|
-
}
|
|
622
|
-
if (typeof this.remove !== 'undefined' && this.remove !== null) {
|
|
623
|
-
toReturn['remove'] = 'toApiJson' in this.remove ? this.remove.toApiJson() : this.remove;
|
|
624
|
-
}
|
|
625
|
-
if (typeof this.dropKey !== 'undefined') {
|
|
626
|
-
toReturn['dropKey'] = this.dropKey;
|
|
627
|
-
}
|
|
628
|
-
if (typeof this.replaceAttributes !== 'undefined' && this.replaceAttributes !== null) {
|
|
629
|
-
toReturn['replaceAttributes'] = 'toApiJson' in this.replaceAttributes ? this.replaceAttributes.toApiJson() : this.replaceAttributes;
|
|
630
|
-
}
|
|
631
|
-
if (typeof this.addAttributes !== 'undefined' && this.addAttributes !== null) {
|
|
632
|
-
toReturn['addAttributes'] = 'toApiJson' in this.addAttributes ? this.addAttributes.toApiJson() : this.addAttributes;
|
|
633
|
-
}
|
|
634
|
-
if (typeof this.removeAttributes !== 'undefined' && this.removeAttributes !== null) {
|
|
635
|
-
toReturn['removeAttributes'] = 'toApiJson' in this.removeAttributes ? this.removeAttributes.toApiJson() : this.removeAttributes;
|
|
636
|
-
}
|
|
637
|
-
return toReturn;
|
|
638
|
-
};
|
|
639
|
-
return Mutation;
|
|
640
|
-
}());
|
|
641
|
-
var NamespacedContext = /** @class */ (function () {
|
|
642
|
-
function NamespacedContext(kwargs) {
|
|
643
|
-
if (!kwargs) {
|
|
644
|
-
return;
|
|
645
|
-
}
|
|
646
|
-
Object.assign(this, kwargs);
|
|
647
|
-
}
|
|
648
|
-
NamespacedContext.fromProto = function (proto) {
|
|
649
|
-
var m = new NamespacedContext();
|
|
650
|
-
m = Object.assign(m, proto);
|
|
651
|
-
return m;
|
|
652
|
-
};
|
|
653
|
-
NamespacedContext.prototype.toApiJson = function () {
|
|
654
|
-
var toReturn = {};
|
|
655
|
-
if (typeof this.namespace !== 'undefined') {
|
|
656
|
-
toReturn['namespace'] = this.namespace;
|
|
657
|
-
}
|
|
658
|
-
if (typeof this.type !== 'undefined') {
|
|
659
|
-
toReturn['type'] = this.type;
|
|
660
|
-
}
|
|
661
|
-
return toReturn;
|
|
662
|
-
};
|
|
663
|
-
return NamespacedContext;
|
|
664
|
-
}());
|
|
665
|
-
var Persona = /** @class */ (function () {
|
|
666
|
-
function Persona(kwargs) {
|
|
667
|
-
if (!kwargs) {
|
|
668
|
-
return;
|
|
669
|
-
}
|
|
670
|
-
Object.assign(this, kwargs);
|
|
671
|
-
}
|
|
672
|
-
Persona.fromProto = function (proto) {
|
|
673
|
-
var m = new Persona();
|
|
674
|
-
m = Object.assign(m, proto);
|
|
675
|
-
if (proto.subject) {
|
|
676
|
-
m.subject = Subject.fromProto(proto.subject);
|
|
677
|
-
}
|
|
678
|
-
if (proto.context) {
|
|
679
|
-
m.context = Context.fromProto(proto.context);
|
|
680
|
-
}
|
|
681
|
-
return m;
|
|
682
|
-
};
|
|
683
|
-
Persona.prototype.toApiJson = function () {
|
|
684
|
-
var toReturn = {};
|
|
685
|
-
if (typeof this.subject !== 'undefined' && this.subject !== null) {
|
|
686
|
-
toReturn['subject'] = 'toApiJson' in this.subject ? this.subject.toApiJson() : this.subject;
|
|
687
|
-
}
|
|
688
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
689
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
690
|
-
}
|
|
691
|
-
return toReturn;
|
|
692
|
-
};
|
|
693
|
-
return Persona;
|
|
694
|
-
}());
|
|
695
|
-
var PublicKey = /** @class */ (function () {
|
|
696
|
-
function PublicKey(kwargs) {
|
|
697
|
-
if (!kwargs) {
|
|
698
|
-
return;
|
|
699
|
-
}
|
|
700
|
-
Object.assign(this, kwargs);
|
|
701
|
-
}
|
|
702
|
-
PublicKey.fromProto = function (proto) {
|
|
703
|
-
var m = new PublicKey();
|
|
704
|
-
m = Object.assign(m, proto);
|
|
705
|
-
if (proto.algorithmType) {
|
|
706
|
-
m.algorithmType = enumStringToValue$1(exports.AlgorithmType, proto.algorithmType);
|
|
707
|
-
}
|
|
708
|
-
return m;
|
|
709
|
-
};
|
|
710
|
-
PublicKey.prototype.toApiJson = function () {
|
|
711
|
-
var toReturn = {};
|
|
712
|
-
if (typeof this.key !== 'undefined') {
|
|
713
|
-
toReturn['key'] = this.key;
|
|
714
|
-
}
|
|
715
|
-
if (typeof this.id !== 'undefined') {
|
|
716
|
-
toReturn['id'] = this.id;
|
|
717
|
-
}
|
|
718
|
-
if (typeof this.algorithmType !== 'undefined') {
|
|
719
|
-
toReturn['algorithmType'] = this.algorithmType;
|
|
720
|
-
}
|
|
721
|
-
return toReturn;
|
|
722
|
-
};
|
|
723
|
-
return PublicKey;
|
|
724
|
-
}());
|
|
725
|
-
var Query = /** @class */ (function () {
|
|
726
|
-
function Query(kwargs) {
|
|
727
|
-
if (!kwargs) {
|
|
728
|
-
return;
|
|
729
|
-
}
|
|
730
|
-
Object.assign(this, kwargs);
|
|
731
|
-
}
|
|
732
|
-
Query.fromProto = function (proto) {
|
|
733
|
-
var m = new Query();
|
|
734
|
-
m = Object.assign(m, proto);
|
|
735
|
-
return m;
|
|
736
|
-
};
|
|
737
|
-
Query.prototype.toApiJson = function () {
|
|
738
|
-
var toReturn = {};
|
|
739
|
-
if (typeof this.searchTerm !== 'undefined') {
|
|
740
|
-
toReturn['searchTerm'] = this.searchTerm;
|
|
741
|
-
}
|
|
742
|
-
if (typeof this.attributeKeys !== 'undefined') {
|
|
743
|
-
toReturn['attributeKeys'] = this.attributeKeys;
|
|
744
|
-
}
|
|
745
|
-
return toReturn;
|
|
746
|
-
};
|
|
747
|
-
return Query;
|
|
748
|
-
}());
|
|
749
|
-
var SingleValueAttribute = /** @class */ (function () {
|
|
750
|
-
function SingleValueAttribute(kwargs) {
|
|
751
|
-
if (!kwargs) {
|
|
752
|
-
return;
|
|
753
|
-
}
|
|
754
|
-
Object.assign(this, kwargs);
|
|
755
|
-
}
|
|
756
|
-
SingleValueAttribute.fromProto = function (proto) {
|
|
757
|
-
var m = new SingleValueAttribute();
|
|
758
|
-
m = Object.assign(m, proto);
|
|
759
|
-
return m;
|
|
760
|
-
};
|
|
761
|
-
SingleValueAttribute.prototype.toApiJson = function () {
|
|
762
|
-
var toReturn = {};
|
|
763
|
-
if (typeof this.key !== 'undefined') {
|
|
764
|
-
toReturn['key'] = this.key;
|
|
765
|
-
}
|
|
766
|
-
if (typeof this.value !== 'undefined') {
|
|
767
|
-
toReturn['value'] = this.value;
|
|
768
|
-
}
|
|
769
|
-
return toReturn;
|
|
770
|
-
};
|
|
771
|
-
return SingleValueAttribute;
|
|
772
|
-
}());
|
|
773
|
-
var Subject = /** @class */ (function () {
|
|
774
|
-
function Subject(kwargs) {
|
|
775
|
-
if (!kwargs) {
|
|
776
|
-
return;
|
|
777
|
-
}
|
|
778
|
-
Object.assign(this, kwargs);
|
|
779
|
-
}
|
|
780
|
-
Subject.fromProto = function (proto) {
|
|
781
|
-
var m = new Subject();
|
|
782
|
-
m = Object.assign(m, proto);
|
|
783
|
-
if (proto.attributes) {
|
|
784
|
-
m.attributes = proto.attributes.map(MultiValueAttribute.fromProto);
|
|
785
|
-
}
|
|
786
|
-
if (proto.created) {
|
|
787
|
-
m.created = new Date(proto.created);
|
|
788
|
-
}
|
|
789
|
-
if (proto.updated) {
|
|
790
|
-
m.updated = new Date(proto.updated);
|
|
791
|
-
}
|
|
792
|
-
if (proto.lastLogin) {
|
|
793
|
-
m.lastLogin = new Date(proto.lastLogin);
|
|
794
|
-
}
|
|
795
|
-
if (proto.publicKeys) {
|
|
796
|
-
m.publicKeys = proto.publicKeys.map(PublicKey.fromProto);
|
|
797
|
-
}
|
|
798
|
-
if (proto.structAttributes) {
|
|
799
|
-
m.structAttributes = StructAttribute.fromProto(proto.structAttributes);
|
|
800
|
-
}
|
|
801
|
-
return m;
|
|
802
|
-
};
|
|
803
|
-
Subject.prototype.toApiJson = function () {
|
|
804
|
-
var toReturn = {};
|
|
805
|
-
if (typeof this.subjectId !== 'undefined') {
|
|
806
|
-
toReturn['subjectId'] = this.subjectId;
|
|
807
|
-
}
|
|
808
|
-
if (typeof this.email !== 'undefined') {
|
|
809
|
-
toReturn['email'] = this.email;
|
|
810
|
-
}
|
|
811
|
-
if (typeof this.userId !== 'undefined') {
|
|
812
|
-
toReturn['userId'] = this.userId;
|
|
813
|
-
}
|
|
814
|
-
if (typeof this.partnerId !== 'undefined') {
|
|
815
|
-
toReturn['partnerId'] = this.partnerId;
|
|
816
|
-
}
|
|
817
|
-
if (typeof this.attributes !== 'undefined' && this.attributes !== null) {
|
|
818
|
-
toReturn['attributes'] = 'toApiJson' in this.attributes ? this.attributes.toApiJson() : this.attributes;
|
|
819
|
-
}
|
|
820
|
-
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
821
|
-
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
822
|
-
}
|
|
823
|
-
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
824
|
-
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
825
|
-
}
|
|
826
|
-
if (typeof this.lastLogin !== 'undefined' && this.lastLogin !== null) {
|
|
827
|
-
toReturn['lastLogin'] = 'toApiJson' in this.lastLogin ? this.lastLogin.toApiJson() : this.lastLogin;
|
|
828
|
-
}
|
|
829
|
-
if (typeof this.publicKeys !== 'undefined' && this.publicKeys !== null) {
|
|
830
|
-
toReturn['publicKeys'] = 'toApiJson' in this.publicKeys ? this.publicKeys.toApiJson() : this.publicKeys;
|
|
831
|
-
}
|
|
832
|
-
if (typeof this.structAttributes !== 'undefined' && this.structAttributes !== null) {
|
|
833
|
-
toReturn['structAttributes'] = 'toApiJson' in this.structAttributes ? this.structAttributes.toApiJson() : this.structAttributes;
|
|
834
|
-
}
|
|
835
|
-
return toReturn;
|
|
836
|
-
};
|
|
837
|
-
return Subject;
|
|
838
|
-
}());
|
|
839
|
-
var SubjectResult = /** @class */ (function () {
|
|
840
|
-
function SubjectResult(kwargs) {
|
|
841
|
-
if (!kwargs) {
|
|
842
|
-
return;
|
|
843
|
-
}
|
|
844
|
-
Object.assign(this, kwargs);
|
|
845
|
-
}
|
|
846
|
-
SubjectResult.fromProto = function (proto) {
|
|
847
|
-
var m = new SubjectResult();
|
|
848
|
-
m = Object.assign(m, proto);
|
|
849
|
-
if (proto.subject) {
|
|
850
|
-
m.subject = Subject.fromProto(proto.subject);
|
|
851
|
-
}
|
|
852
|
-
return m;
|
|
853
|
-
};
|
|
854
|
-
SubjectResult.prototype.toApiJson = function () {
|
|
855
|
-
var toReturn = {};
|
|
856
|
-
if (typeof this.subject !== 'undefined' && this.subject !== null) {
|
|
857
|
-
toReturn['subject'] = 'toApiJson' in this.subject ? this.subject.toApiJson() : this.subject;
|
|
858
|
-
}
|
|
859
|
-
return toReturn;
|
|
860
|
-
};
|
|
861
|
-
return SubjectResult;
|
|
862
|
-
}());
|
|
863
|
-
var TypedContext = /** @class */ (function () {
|
|
864
|
-
function TypedContext(kwargs) {
|
|
865
|
-
if (!kwargs) {
|
|
866
|
-
return;
|
|
867
|
-
}
|
|
868
|
-
Object.assign(this, kwargs);
|
|
869
|
-
}
|
|
870
|
-
TypedContext.fromProto = function (proto) {
|
|
871
|
-
var m = new TypedContext();
|
|
872
|
-
m = Object.assign(m, proto);
|
|
873
|
-
return m;
|
|
874
|
-
};
|
|
875
|
-
TypedContext.prototype.toApiJson = function () {
|
|
876
|
-
var toReturn = {};
|
|
877
|
-
if (typeof this.type !== 'undefined') {
|
|
878
|
-
toReturn['type'] = this.type;
|
|
879
|
-
}
|
|
880
|
-
return toReturn;
|
|
881
|
-
};
|
|
882
|
-
return TypedContext;
|
|
883
|
-
}());
|
|
884
|
-
|
|
885
|
-
function enumStringToValue$2(enumRef, value) {
|
|
886
|
-
if (typeof value === 'number') {
|
|
887
|
-
return value;
|
|
888
|
-
}
|
|
889
|
-
return enumRef[value];
|
|
890
|
-
}
|
|
891
|
-
var FieldMask = /** @class */ (function () {
|
|
892
|
-
function FieldMask(kwargs) {
|
|
893
|
-
if (!kwargs) {
|
|
894
|
-
return;
|
|
895
|
-
}
|
|
896
|
-
Object.assign(this, kwargs);
|
|
897
|
-
}
|
|
898
|
-
FieldMask.fromProto = function (proto) {
|
|
899
|
-
var m = new FieldMask();
|
|
900
|
-
m = Object.assign(m, proto);
|
|
901
|
-
return m;
|
|
902
|
-
};
|
|
903
|
-
FieldMask.prototype.toApiJson = function () {
|
|
904
|
-
var toReturn = {};
|
|
905
|
-
if (typeof this.paths !== 'undefined') {
|
|
906
|
-
toReturn['paths'] = this.paths;
|
|
907
|
-
}
|
|
908
|
-
return toReturn;
|
|
909
|
-
};
|
|
910
|
-
return FieldMask;
|
|
911
|
-
}());
|
|
912
|
-
|
|
913
|
-
// NOTE: THIS HAS BEEN MANUALLY EDITED. PLEASE SEE THE BELOW COMMENTS TO SEE WHERE IT HAS BEEN EDITED
|
|
914
|
-
function enumStringToValue$3(enumRef, value) {
|
|
915
|
-
if (typeof value === 'number') {
|
|
916
|
-
return value;
|
|
917
|
-
}
|
|
918
|
-
return enumRef[value];
|
|
919
|
-
}
|
|
920
|
-
var IfClause = /** @class */ (function () {
|
|
921
|
-
function IfClause(kwargs) {
|
|
922
|
-
if (!kwargs) {
|
|
923
|
-
return;
|
|
924
|
-
}
|
|
925
|
-
Object.assign(this, kwargs);
|
|
926
|
-
}
|
|
927
|
-
IfClause.fromProto = function (proto) {
|
|
928
|
-
var m = new IfClause();
|
|
929
|
-
m = Object.assign(m, proto);
|
|
930
|
-
if (proto.resourceAttributeValue) {
|
|
931
|
-
m.resourceAttributeValue = Attribute.fromProto(proto.resourceAttributeValue);
|
|
932
|
-
}
|
|
933
|
-
if (proto.thenPolicy) {
|
|
934
|
-
m.thenPolicy = PolicyNode.fromProto(proto.thenPolicy);
|
|
935
|
-
}
|
|
936
|
-
if (proto.elsePolicy) {
|
|
937
|
-
m.elsePolicy = PolicyNode.fromProto(proto.elsePolicy);
|
|
938
|
-
}
|
|
939
|
-
return m;
|
|
940
|
-
};
|
|
941
|
-
IfClause.prototype.toApiJson = function () {
|
|
942
|
-
var toReturn = {};
|
|
943
|
-
if (typeof this.resourceAttributeName !== 'undefined') {
|
|
944
|
-
toReturn['resourceAttributeName'] = this.resourceAttributeName;
|
|
945
|
-
}
|
|
946
|
-
if (typeof this.resourceAttributeValue !== 'undefined' && this.resourceAttributeValue !== null) {
|
|
947
|
-
toReturn['resourceAttributeValue'] = 'toApiJson' in this.resourceAttributeValue ? this.resourceAttributeValue.toApiJson() : this.resourceAttributeValue;
|
|
948
|
-
}
|
|
949
|
-
if (typeof this.thenPolicy !== 'undefined' && this.thenPolicy !== null) {
|
|
950
|
-
toReturn['thenPolicy'] = 'toApiJson' in this.thenPolicy ? this.thenPolicy.toApiJson() : this.thenPolicy;
|
|
951
|
-
}
|
|
952
|
-
if (typeof this.elsePolicy !== 'undefined' && this.elsePolicy !== null) {
|
|
953
|
-
toReturn['elsePolicy'] = 'toApiJson' in this.elsePolicy ? this.elsePolicy.toApiJson() : this.elsePolicy;
|
|
954
|
-
}
|
|
955
|
-
return toReturn;
|
|
956
|
-
};
|
|
957
|
-
return IfClause;
|
|
958
|
-
}());
|
|
959
|
-
var Operator = /** @class */ (function () {
|
|
960
|
-
function Operator(kwargs) {
|
|
961
|
-
if (!kwargs) {
|
|
962
|
-
return;
|
|
963
|
-
}
|
|
964
|
-
Object.assign(this, kwargs);
|
|
965
|
-
}
|
|
966
|
-
Operator.fromProto = function (proto) {
|
|
967
|
-
var m = new Operator();
|
|
968
|
-
m = Object.assign(m, proto);
|
|
969
|
-
// Edited from e.policiesBooleanOperator to e.BooleanOperator
|
|
970
|
-
if (proto.operator) {
|
|
971
|
-
m.operator = enumStringToValue$3(exports.BooleanOperator, proto.operator);
|
|
972
|
-
}
|
|
973
|
-
if (proto.children) {
|
|
974
|
-
m.children = proto.children.map(PolicyNode.fromProto);
|
|
975
|
-
}
|
|
976
|
-
return m;
|
|
977
|
-
};
|
|
978
|
-
Operator.prototype.toApiJson = function () {
|
|
979
|
-
var toReturn = {};
|
|
980
|
-
if (typeof this.operator !== 'undefined') {
|
|
981
|
-
toReturn['operator'] = this.operator;
|
|
982
|
-
}
|
|
983
|
-
if (typeof this.children !== 'undefined' && this.children !== null) {
|
|
984
|
-
toReturn['children'] = 'toApiJson' in this.children ? this.children.toApiJson() : this.children;
|
|
985
|
-
}
|
|
986
|
-
return toReturn;
|
|
987
|
-
};
|
|
988
|
-
return Operator;
|
|
989
|
-
}());
|
|
990
|
-
var PolicyNode = /** @class */ (function () {
|
|
991
|
-
function PolicyNode(kwargs) {
|
|
992
|
-
if (!kwargs) {
|
|
993
|
-
return;
|
|
994
|
-
}
|
|
995
|
-
Object.assign(this, kwargs);
|
|
996
|
-
}
|
|
997
|
-
PolicyNode.fromProto = function (proto) {
|
|
998
|
-
var m = new PolicyNode();
|
|
999
|
-
m = Object.assign(m, proto);
|
|
1000
|
-
if (proto.subjectResourceIntersection) {
|
|
1001
|
-
m.subjectResourceIntersection = SubjectResourceIntersectionClause.fromProto(proto.subjectResourceIntersection);
|
|
1002
|
-
}
|
|
1003
|
-
if (proto.operator) {
|
|
1004
|
-
m.operator = Operator.fromProto(proto.operator);
|
|
1005
|
-
}
|
|
1006
|
-
if (proto.subjectValueIntersection) {
|
|
1007
|
-
m.subjectValueIntersection = SubjectValueIntersectionClause.fromProto(proto.subjectValueIntersection);
|
|
1008
|
-
}
|
|
1009
|
-
if (proto.subjectMissingValue) {
|
|
1010
|
-
m.subjectMissingValue = SubjectMissingValueClause.fromProto(proto.subjectMissingValue);
|
|
1011
|
-
}
|
|
1012
|
-
if (proto.subjectResourceSubset) {
|
|
1013
|
-
m.subjectResourceSubset = SubjectResourceSubsetClause.fromProto(proto.subjectResourceSubset);
|
|
1014
|
-
}
|
|
1015
|
-
if (proto.subjectResourceFor) {
|
|
1016
|
-
m.subjectResourceFor = SubjectResourceForClause.fromProto(proto.subjectResourceFor);
|
|
1017
|
-
}
|
|
1018
|
-
if (proto.ifClause) {
|
|
1019
|
-
m.ifClause = IfClause.fromProto(proto.ifClause);
|
|
1020
|
-
}
|
|
1021
|
-
return m;
|
|
1022
|
-
};
|
|
1023
|
-
PolicyNode.prototype.toApiJson = function () {
|
|
1024
|
-
var toReturn = {};
|
|
1025
|
-
if (typeof this.subjectResourceIntersection !== 'undefined' && this.subjectResourceIntersection !== null) {
|
|
1026
|
-
toReturn['subjectResourceIntersection'] = 'toApiJson' in this.subjectResourceIntersection ? this.subjectResourceIntersection.toApiJson() : this.subjectResourceIntersection;
|
|
1027
|
-
}
|
|
1028
|
-
if (typeof this.operator !== 'undefined' && this.operator !== null) {
|
|
1029
|
-
toReturn['operator'] = 'toApiJson' in this.operator ? this.operator.toApiJson() : this.operator;
|
|
1030
|
-
}
|
|
1031
|
-
if (typeof this.subjectValueIntersection !== 'undefined' && this.subjectValueIntersection !== null) {
|
|
1032
|
-
toReturn['subjectValueIntersection'] = 'toApiJson' in this.subjectValueIntersection ? this.subjectValueIntersection.toApiJson() : this.subjectValueIntersection;
|
|
1033
|
-
}
|
|
1034
|
-
if (typeof this.subjectMissingValue !== 'undefined' && this.subjectMissingValue !== null) {
|
|
1035
|
-
toReturn['subjectMissingValue'] = 'toApiJson' in this.subjectMissingValue ? this.subjectMissingValue.toApiJson() : this.subjectMissingValue;
|
|
1036
|
-
}
|
|
1037
|
-
if (typeof this.subjectResourceSubset !== 'undefined' && this.subjectResourceSubset !== null) {
|
|
1038
|
-
toReturn['subjectResourceSubset'] = 'toApiJson' in this.subjectResourceSubset ? this.subjectResourceSubset.toApiJson() : this.subjectResourceSubset;
|
|
1039
|
-
}
|
|
1040
|
-
if (typeof this.subjectResourceFor !== 'undefined' && this.subjectResourceFor !== null) {
|
|
1041
|
-
toReturn['subjectResourceFor'] = 'toApiJson' in this.subjectResourceFor ? this.subjectResourceFor.toApiJson() : this.subjectResourceFor;
|
|
1042
|
-
}
|
|
1043
|
-
if (typeof this.ifClause !== 'undefined' && this.ifClause !== null) {
|
|
1044
|
-
toReturn['ifClause'] = 'toApiJson' in this.ifClause ? this.ifClause.toApiJson() : this.ifClause;
|
|
1045
|
-
}
|
|
1046
|
-
return toReturn;
|
|
1047
|
-
};
|
|
1048
|
-
return PolicyNode;
|
|
1049
|
-
}());
|
|
1050
|
-
var SubjectMissingValueClause = /** @class */ (function () {
|
|
1051
|
-
function SubjectMissingValueClause(kwargs) {
|
|
1052
|
-
if (!kwargs) {
|
|
1053
|
-
return;
|
|
1054
|
-
}
|
|
1055
|
-
Object.assign(this, kwargs);
|
|
1056
|
-
}
|
|
1057
|
-
SubjectMissingValueClause.fromProto = function (proto) {
|
|
1058
|
-
var m = new SubjectMissingValueClause();
|
|
1059
|
-
m = Object.assign(m, proto);
|
|
1060
|
-
return m;
|
|
1061
|
-
};
|
|
1062
|
-
SubjectMissingValueClause.prototype.toApiJson = function () {
|
|
1063
|
-
var toReturn = {};
|
|
1064
|
-
if (typeof this.attributeName !== 'undefined') {
|
|
1065
|
-
toReturn['attributeName'] = this.attributeName;
|
|
1066
|
-
}
|
|
1067
|
-
return toReturn;
|
|
1068
|
-
};
|
|
1069
|
-
return SubjectMissingValueClause;
|
|
1070
|
-
}());
|
|
1071
|
-
var SubjectResourceForClause = /** @class */ (function () {
|
|
1072
|
-
function SubjectResourceForClause(kwargs) {
|
|
1073
|
-
if (!kwargs) {
|
|
1074
|
-
return;
|
|
1075
|
-
}
|
|
1076
|
-
Object.assign(this, kwargs);
|
|
1077
|
-
}
|
|
1078
|
-
SubjectResourceForClause.fromProto = function (proto) {
|
|
1079
|
-
var m = new SubjectResourceForClause();
|
|
1080
|
-
m = Object.assign(m, proto);
|
|
1081
|
-
if (proto.operator) {
|
|
1082
|
-
m.operator = enumStringToValue$3(exports.ForOperator, proto.operator);
|
|
1083
|
-
}
|
|
1084
|
-
if (proto.rules) {
|
|
1085
|
-
m.rules = PolicyNode.fromProto(proto.rules);
|
|
1086
|
-
}
|
|
1087
|
-
return m;
|
|
1088
|
-
};
|
|
1089
|
-
SubjectResourceForClause.prototype.toApiJson = function () {
|
|
1090
|
-
var toReturn = {};
|
|
1091
|
-
if (typeof this.attributeName !== 'undefined') {
|
|
1092
|
-
toReturn['attributeName'] = this.attributeName;
|
|
1093
|
-
}
|
|
1094
|
-
if (typeof this.operator !== 'undefined') {
|
|
1095
|
-
toReturn['operator'] = this.operator;
|
|
1096
|
-
}
|
|
1097
|
-
if (typeof this.rules !== 'undefined' && this.rules !== null) {
|
|
1098
|
-
toReturn['rules'] = 'toApiJson' in this.rules ? this.rules.toApiJson() : this.rules;
|
|
1099
|
-
}
|
|
1100
|
-
return toReturn;
|
|
1101
|
-
};
|
|
1102
|
-
return SubjectResourceForClause;
|
|
1103
|
-
}());
|
|
1104
|
-
var SubjectResourceIntersectionClause = /** @class */ (function () {
|
|
1105
|
-
function SubjectResourceIntersectionClause(kwargs) {
|
|
1106
|
-
if (!kwargs) {
|
|
1107
|
-
return;
|
|
1108
|
-
}
|
|
1109
|
-
Object.assign(this, kwargs);
|
|
1110
|
-
}
|
|
1111
|
-
SubjectResourceIntersectionClause.fromProto = function (proto) {
|
|
1112
|
-
var m = new SubjectResourceIntersectionClause();
|
|
1113
|
-
m = Object.assign(m, proto);
|
|
1114
|
-
return m;
|
|
1115
|
-
};
|
|
1116
|
-
SubjectResourceIntersectionClause.prototype.toApiJson = function () {
|
|
1117
|
-
var toReturn = {};
|
|
1118
|
-
if (typeof this.attributeName !== 'undefined') {
|
|
1119
|
-
toReturn['attributeName'] = this.attributeName;
|
|
1120
|
-
}
|
|
1121
|
-
if (typeof this.resourceAttributeName !== 'undefined') {
|
|
1122
|
-
toReturn['resourceAttributeName'] = this.resourceAttributeName;
|
|
1123
|
-
}
|
|
1124
|
-
return toReturn;
|
|
1125
|
-
};
|
|
1126
|
-
return SubjectResourceIntersectionClause;
|
|
1127
|
-
}());
|
|
1128
|
-
var SubjectResourceSubsetClause = /** @class */ (function () {
|
|
1129
|
-
function SubjectResourceSubsetClause(kwargs) {
|
|
1130
|
-
if (!kwargs) {
|
|
1131
|
-
return;
|
|
1132
|
-
}
|
|
1133
|
-
Object.assign(this, kwargs);
|
|
1134
|
-
}
|
|
1135
|
-
SubjectResourceSubsetClause.fromProto = function (proto) {
|
|
1136
|
-
var m = new SubjectResourceSubsetClause();
|
|
1137
|
-
m = Object.assign(m, proto);
|
|
1138
|
-
return m;
|
|
1139
|
-
};
|
|
1140
|
-
SubjectResourceSubsetClause.prototype.toApiJson = function () {
|
|
1141
|
-
var toReturn = {};
|
|
1142
|
-
if (typeof this.attributeName !== 'undefined') {
|
|
1143
|
-
toReturn['attributeName'] = this.attributeName;
|
|
1144
|
-
}
|
|
1145
|
-
if (typeof this.resourceAttributeName !== 'undefined') {
|
|
1146
|
-
toReturn['resourceAttributeName'] = this.resourceAttributeName;
|
|
1147
|
-
}
|
|
1148
|
-
return toReturn;
|
|
1149
|
-
};
|
|
1150
|
-
return SubjectResourceSubsetClause;
|
|
1151
|
-
}());
|
|
1152
|
-
var SubjectValueIntersectionClause = /** @class */ (function () {
|
|
1153
|
-
function SubjectValueIntersectionClause(kwargs) {
|
|
1154
|
-
if (!kwargs) {
|
|
1155
|
-
return;
|
|
1156
|
-
}
|
|
1157
|
-
Object.assign(this, kwargs);
|
|
1158
|
-
}
|
|
1159
|
-
SubjectValueIntersectionClause.fromProto = function (proto) {
|
|
1160
|
-
var m = new SubjectValueIntersectionClause();
|
|
1161
|
-
m = Object.assign(m, proto);
|
|
1162
|
-
if (proto.structuredAttributeValue) {
|
|
1163
|
-
m.structuredAttributeValue = Attribute.fromProto(proto.structuredAttributeValue);
|
|
1164
|
-
}
|
|
1165
|
-
return m;
|
|
1166
|
-
};
|
|
1167
|
-
SubjectValueIntersectionClause.prototype.toApiJson = function () {
|
|
1168
|
-
var toReturn = {};
|
|
1169
|
-
if (typeof this.attributeName !== 'undefined') {
|
|
1170
|
-
toReturn['attributeName'] = this.attributeName;
|
|
1171
|
-
}
|
|
1172
|
-
if (typeof this.attributeValue !== 'undefined') {
|
|
1173
|
-
toReturn['attributeValue'] = this.attributeValue;
|
|
1174
|
-
}
|
|
1175
|
-
if (typeof this.structuredAttributeValue !== 'undefined' && this.structuredAttributeValue !== null) {
|
|
1176
|
-
toReturn['structuredAttributeValue'] = 'toApiJson' in this.structuredAttributeValue ? this.structuredAttributeValue.toApiJson() : this.structuredAttributeValue;
|
|
1177
|
-
}
|
|
1178
|
-
return toReturn;
|
|
1179
|
-
};
|
|
1180
|
-
return SubjectValueIntersectionClause;
|
|
1181
|
-
}());
|
|
1182
|
-
|
|
1183
|
-
function enumStringToValue$4(enumRef, value) {
|
|
1184
|
-
if (typeof value === 'number') {
|
|
1185
|
-
return value;
|
|
1186
|
-
}
|
|
1187
|
-
return enumRef[value];
|
|
1188
|
-
}
|
|
1189
|
-
var AccessCheckFailures = /** @class */ (function () {
|
|
1190
|
-
function AccessCheckFailures(kwargs) {
|
|
1191
|
-
if (!kwargs) {
|
|
1192
|
-
return;
|
|
1193
|
-
}
|
|
1194
|
-
Object.assign(this, kwargs);
|
|
1195
|
-
}
|
|
1196
|
-
AccessCheckFailures.fromProto = function (proto) {
|
|
1197
|
-
var m = new AccessCheckFailures();
|
|
1198
|
-
m = Object.assign(m, proto);
|
|
1199
|
-
if (proto.failures) {
|
|
1200
|
-
m.failures = proto.failures.map(ResourceIdentifier.fromProto);
|
|
1201
|
-
}
|
|
1202
|
-
return m;
|
|
1203
|
-
};
|
|
1204
|
-
AccessCheckFailures.prototype.toApiJson = function () {
|
|
1205
|
-
var toReturn = {};
|
|
1206
|
-
if (typeof this.failures !== 'undefined' && this.failures !== null) {
|
|
1207
|
-
toReturn['failures'] = 'toApiJson' in this.failures ? this.failures.toApiJson() : this.failures;
|
|
1208
|
-
}
|
|
1209
|
-
return toReturn;
|
|
1210
|
-
};
|
|
1211
|
-
return AccessCheckFailures;
|
|
1212
|
-
}());
|
|
1213
|
-
var ResourceIdentifierIdentifiersEntry = /** @class */ (function () {
|
|
1214
|
-
function ResourceIdentifierIdentifiersEntry(kwargs) {
|
|
1215
|
-
if (!kwargs) {
|
|
1216
|
-
return;
|
|
1217
|
-
}
|
|
1218
|
-
Object.assign(this, kwargs);
|
|
1219
|
-
}
|
|
1220
|
-
ResourceIdentifierIdentifiersEntry.fromProto = function (proto) {
|
|
1221
|
-
var m = new ResourceIdentifierIdentifiersEntry();
|
|
1222
|
-
m = Object.assign(m, proto);
|
|
1223
|
-
if (proto.value) {
|
|
1224
|
-
m.value = ValueList.fromProto(proto.value);
|
|
1225
|
-
}
|
|
1226
|
-
return m;
|
|
1227
|
-
};
|
|
1228
|
-
ResourceIdentifierIdentifiersEntry.prototype.toApiJson = function () {
|
|
1229
|
-
var toReturn = {};
|
|
1230
|
-
if (typeof this.key !== 'undefined') {
|
|
1231
|
-
toReturn['key'] = this.key;
|
|
1232
|
-
}
|
|
1233
|
-
if (typeof this.value !== 'undefined' && this.value !== null) {
|
|
1234
|
-
toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
|
|
1235
|
-
}
|
|
1236
|
-
return toReturn;
|
|
1237
|
-
};
|
|
1238
|
-
return ResourceIdentifierIdentifiersEntry;
|
|
1239
|
-
}());
|
|
1240
|
-
var Policy = /** @class */ (function () {
|
|
1241
|
-
function Policy(kwargs) {
|
|
1242
|
-
if (!kwargs) {
|
|
1243
|
-
return;
|
|
1244
|
-
}
|
|
1245
|
-
Object.assign(this, kwargs);
|
|
1246
|
-
}
|
|
1247
|
-
Policy.fromProto = function (proto) {
|
|
1248
|
-
var m = new Policy();
|
|
1249
|
-
m = Object.assign(m, proto);
|
|
1250
|
-
if (proto.operations) {
|
|
1251
|
-
m.operations = proto.operations.map(function (v) { return enumStringToValue$4(exports.AccessScope, v); });
|
|
1252
|
-
}
|
|
1253
|
-
if (proto.policy) {
|
|
1254
|
-
m.policy = PolicyNode.fromProto(proto.policy);
|
|
1255
|
-
}
|
|
1256
|
-
return m;
|
|
1257
|
-
};
|
|
1258
|
-
Policy.prototype.toApiJson = function () {
|
|
1259
|
-
var toReturn = {};
|
|
1260
|
-
if (typeof this.appId !== 'undefined') {
|
|
1261
|
-
toReturn['appId'] = this.appId;
|
|
1262
|
-
}
|
|
1263
|
-
if (typeof this.resourceId !== 'undefined') {
|
|
1264
|
-
toReturn['resourceId'] = this.resourceId;
|
|
1265
|
-
}
|
|
1266
|
-
if (typeof this.policyId !== 'undefined') {
|
|
1267
|
-
toReturn['policyId'] = this.policyId;
|
|
1268
|
-
}
|
|
1269
|
-
if (typeof this.policyName !== 'undefined') {
|
|
1270
|
-
toReturn['policyName'] = this.policyName;
|
|
1271
|
-
}
|
|
1272
|
-
if (typeof this.operations !== 'undefined') {
|
|
1273
|
-
toReturn['operations'] = this.operations;
|
|
1274
|
-
}
|
|
1275
|
-
if (typeof this.actions !== 'undefined') {
|
|
1276
|
-
toReturn['actions'] = this.actions;
|
|
1277
|
-
}
|
|
1278
|
-
if (typeof this.policy !== 'undefined' && this.policy !== null) {
|
|
1279
|
-
toReturn['policy'] = 'toApiJson' in this.policy ? this.policy.toApiJson() : this.policy;
|
|
1280
|
-
}
|
|
1281
|
-
return toReturn;
|
|
1282
|
-
};
|
|
1283
|
-
return Policy;
|
|
1284
|
-
}());
|
|
1285
|
-
var ResourceIdentifier = /** @class */ (function () {
|
|
1286
|
-
function ResourceIdentifier(kwargs) {
|
|
1287
|
-
if (!kwargs) {
|
|
1288
|
-
return;
|
|
1289
|
-
}
|
|
1290
|
-
Object.assign(this, kwargs);
|
|
1291
|
-
}
|
|
1292
|
-
ResourceIdentifier.fromProto = function (proto) {
|
|
1293
|
-
var m = new ResourceIdentifier();
|
|
1294
|
-
m = Object.assign(m, proto);
|
|
1295
|
-
if (proto.identifiers) {
|
|
1296
|
-
m.identifiers = Object.keys(proto.identifiers).reduce(function (obj, k) { obj[k] = ValueList.fromProto(proto.identifiers[k]); return obj; }, {});
|
|
1297
|
-
}
|
|
1298
|
-
return m;
|
|
1299
|
-
};
|
|
1300
|
-
ResourceIdentifier.prototype.toApiJson = function () {
|
|
1301
|
-
var toReturn = {};
|
|
1302
|
-
if (typeof this.identifiers !== 'undefined' && this.identifiers !== null) {
|
|
1303
|
-
toReturn['identifiers'] = 'toApiJson' in this.identifiers ? this.identifiers.toApiJson() : this.identifiers;
|
|
1304
|
-
}
|
|
1305
|
-
return toReturn;
|
|
1306
|
-
};
|
|
1307
|
-
return ResourceIdentifier;
|
|
1308
|
-
}());
|
|
1309
|
-
var ResourceOwner = /** @class */ (function () {
|
|
1310
|
-
function ResourceOwner(kwargs) {
|
|
1311
|
-
if (!kwargs) {
|
|
1312
|
-
return;
|
|
1313
|
-
}
|
|
1314
|
-
Object.assign(this, kwargs);
|
|
1315
|
-
}
|
|
1316
|
-
ResourceOwner.fromProto = function (proto) {
|
|
1317
|
-
var m = new ResourceOwner();
|
|
1318
|
-
m = Object.assign(m, proto);
|
|
1319
|
-
return m;
|
|
1320
|
-
};
|
|
1321
|
-
ResourceOwner.prototype.toApiJson = function () {
|
|
1322
|
-
var toReturn = {};
|
|
1323
|
-
if (typeof this.appId !== 'undefined') {
|
|
1324
|
-
toReturn['appId'] = this.appId;
|
|
1325
|
-
}
|
|
1326
|
-
if (typeof this.appName !== 'undefined') {
|
|
1327
|
-
toReturn['appName'] = this.appName;
|
|
1328
|
-
}
|
|
1329
|
-
return toReturn;
|
|
1330
|
-
};
|
|
1331
|
-
return ResourceOwner;
|
|
1332
|
-
}());
|
|
1333
|
-
var ValueList = /** @class */ (function () {
|
|
1334
|
-
function ValueList(kwargs) {
|
|
1335
|
-
if (!kwargs) {
|
|
1336
|
-
return;
|
|
1337
|
-
}
|
|
1338
|
-
Object.assign(this, kwargs);
|
|
1339
|
-
}
|
|
1340
|
-
ValueList.fromProto = function (proto) {
|
|
1341
|
-
var m = new ValueList();
|
|
1342
|
-
m = Object.assign(m, proto);
|
|
1343
|
-
return m;
|
|
1344
|
-
};
|
|
1345
|
-
ValueList.prototype.toApiJson = function () {
|
|
1346
|
-
var toReturn = {};
|
|
1347
|
-
if (typeof this.values !== 'undefined') {
|
|
1348
|
-
toReturn['values'] = this.values;
|
|
1349
|
-
}
|
|
1350
|
-
return toReturn;
|
|
1351
|
-
};
|
|
1352
|
-
return ValueList;
|
|
1353
|
-
}());
|
|
1354
|
-
|
|
1355
|
-
function enumStringToValue$5(enumRef, value) {
|
|
1356
|
-
if (typeof value === 'number') {
|
|
1357
|
-
return value;
|
|
1358
|
-
}
|
|
1359
|
-
return enumRef[value];
|
|
1360
|
-
}
|
|
1361
|
-
var SecurityLog = /** @class */ (function () {
|
|
1362
|
-
function SecurityLog(kwargs) {
|
|
1363
|
-
if (!kwargs) {
|
|
1364
|
-
return;
|
|
1365
|
-
}
|
|
1366
|
-
Object.assign(this, kwargs);
|
|
1367
|
-
}
|
|
1368
|
-
SecurityLog.fromProto = function (proto) {
|
|
1369
|
-
var m = new SecurityLog();
|
|
1370
|
-
m = Object.assign(m, proto);
|
|
1371
|
-
if (proto.created) {
|
|
1372
|
-
m.created = new Date(proto.created);
|
|
1373
|
-
}
|
|
1374
|
-
return m;
|
|
1375
|
-
};
|
|
1376
|
-
SecurityLog.prototype.toApiJson = function () {
|
|
1377
|
-
var toReturn = {};
|
|
1378
|
-
if (typeof this.userId !== 'undefined') {
|
|
1379
|
-
toReturn['userId'] = this.userId;
|
|
1380
|
-
}
|
|
1381
|
-
if (typeof this.actionId !== 'undefined') {
|
|
1382
|
-
toReturn['actionId'] = this.actionId;
|
|
1383
|
-
}
|
|
1384
|
-
if (typeof this.logId !== 'undefined') {
|
|
1385
|
-
toReturn['logId'] = this.logId;
|
|
1386
|
-
}
|
|
1387
|
-
if (typeof this.description !== 'undefined') {
|
|
1388
|
-
toReturn['description'] = this.description;
|
|
1389
|
-
}
|
|
1390
|
-
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
1391
|
-
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
1392
|
-
}
|
|
1393
|
-
return toReturn;
|
|
1394
|
-
};
|
|
1395
|
-
return SecurityLog;
|
|
1396
|
-
}());
|
|
1397
|
-
|
|
1398
|
-
function enumStringToValue$6(enumRef, value) {
|
|
1399
|
-
if (typeof value === 'number') {
|
|
1400
|
-
return value;
|
|
1401
|
-
}
|
|
1402
|
-
return enumRef[value];
|
|
1403
|
-
}
|
|
1404
|
-
var Identifier = /** @class */ (function () {
|
|
1405
|
-
function Identifier(kwargs) {
|
|
1406
|
-
if (!kwargs) {
|
|
1407
|
-
return;
|
|
1408
|
-
}
|
|
1409
|
-
Object.assign(this, kwargs);
|
|
1410
|
-
}
|
|
1411
|
-
Identifier.fromProto = function (proto) {
|
|
1412
|
-
var m = new Identifier();
|
|
1413
|
-
m = Object.assign(m, proto);
|
|
1414
|
-
return m;
|
|
1415
|
-
};
|
|
1416
|
-
Identifier.prototype.toApiJson = function () {
|
|
1417
|
-
var toReturn = {};
|
|
1418
|
-
if (typeof this.subjectId !== 'undefined') {
|
|
1419
|
-
toReturn['subjectId'] = this.subjectId;
|
|
1420
|
-
}
|
|
1421
|
-
if (typeof this.userId !== 'undefined') {
|
|
1422
|
-
toReturn['userId'] = this.userId;
|
|
1423
|
-
}
|
|
1424
|
-
return toReturn;
|
|
1425
|
-
};
|
|
1426
|
-
return Identifier;
|
|
1427
|
-
}());
|
|
1428
|
-
var NamespacedEmail = /** @class */ (function () {
|
|
1429
|
-
function NamespacedEmail(kwargs) {
|
|
1430
|
-
if (!kwargs) {
|
|
1431
|
-
return;
|
|
1432
|
-
}
|
|
1433
|
-
Object.assign(this, kwargs);
|
|
1434
|
-
}
|
|
1435
|
-
NamespacedEmail.fromProto = function (proto) {
|
|
1436
|
-
var m = new NamespacedEmail();
|
|
1437
|
-
m = Object.assign(m, proto);
|
|
1438
|
-
return m;
|
|
1439
|
-
};
|
|
1440
|
-
NamespacedEmail.prototype.toApiJson = function () {
|
|
1441
|
-
var toReturn = {};
|
|
1442
|
-
if (typeof this.namespace !== 'undefined') {
|
|
1443
|
-
toReturn['namespace'] = this.namespace;
|
|
1444
|
-
}
|
|
1445
|
-
if (typeof this.email !== 'undefined') {
|
|
1446
|
-
toReturn['email'] = this.email;
|
|
1447
|
-
}
|
|
1448
|
-
return toReturn;
|
|
1449
|
-
};
|
|
1450
|
-
return NamespacedEmail;
|
|
1451
|
-
}());
|
|
1452
|
-
var NamespacedSession = /** @class */ (function () {
|
|
1453
|
-
function NamespacedSession(kwargs) {
|
|
1454
|
-
if (!kwargs) {
|
|
1455
|
-
return;
|
|
1456
|
-
}
|
|
1457
|
-
Object.assign(this, kwargs);
|
|
1458
|
-
}
|
|
1459
|
-
NamespacedSession.fromProto = function (proto) {
|
|
1460
|
-
var m = new NamespacedSession();
|
|
1461
|
-
m = Object.assign(m, proto);
|
|
1462
|
-
return m;
|
|
1463
|
-
};
|
|
1464
|
-
NamespacedSession.prototype.toApiJson = function () {
|
|
1465
|
-
var toReturn = {};
|
|
1466
|
-
if (typeof this.namespace !== 'undefined') {
|
|
1467
|
-
toReturn['namespace'] = this.namespace;
|
|
1468
|
-
}
|
|
1469
|
-
if (typeof this.session !== 'undefined') {
|
|
1470
|
-
toReturn['session'] = this.session;
|
|
1471
|
-
}
|
|
1472
|
-
return toReturn;
|
|
1473
|
-
};
|
|
1474
|
-
return NamespacedSession;
|
|
1475
|
-
}());
|
|
1476
|
-
var TypedExternalIdentifier = /** @class */ (function () {
|
|
1477
|
-
function TypedExternalIdentifier(kwargs) {
|
|
1478
|
-
if (!kwargs) {
|
|
1479
|
-
return;
|
|
1480
|
-
}
|
|
1481
|
-
Object.assign(this, kwargs);
|
|
1482
|
-
}
|
|
1483
|
-
TypedExternalIdentifier.fromProto = function (proto) {
|
|
1484
|
-
var m = new TypedExternalIdentifier();
|
|
1485
|
-
m = Object.assign(m, proto);
|
|
1486
|
-
return m;
|
|
1487
|
-
};
|
|
1488
|
-
TypedExternalIdentifier.prototype.toApiJson = function () {
|
|
1489
|
-
var toReturn = {};
|
|
1490
|
-
if (typeof this.externalIdType !== 'undefined') {
|
|
1491
|
-
toReturn['externalIdType'] = this.externalIdType;
|
|
1492
|
-
}
|
|
1493
|
-
if (typeof this.externalId !== 'undefined') {
|
|
1494
|
-
toReturn['externalId'] = this.externalId;
|
|
1495
|
-
}
|
|
1496
|
-
return toReturn;
|
|
1497
|
-
};
|
|
1498
|
-
return TypedExternalIdentifier;
|
|
1499
|
-
}());
|
|
1500
|
-
var User = /** @class */ (function () {
|
|
1501
|
-
function User(kwargs) {
|
|
1502
|
-
if (!kwargs) {
|
|
1503
|
-
return;
|
|
1504
|
-
}
|
|
1505
|
-
Object.assign(this, kwargs);
|
|
1506
|
-
}
|
|
1507
|
-
User.fromProto = function (proto) {
|
|
1508
|
-
var m = new User();
|
|
1509
|
-
m = Object.assign(m, proto);
|
|
1510
|
-
if (proto.created) {
|
|
1511
|
-
m.created = new Date(proto.created);
|
|
1512
|
-
}
|
|
1513
|
-
if (proto.updated) {
|
|
1514
|
-
m.updated = new Date(proto.updated);
|
|
1515
|
-
}
|
|
1516
|
-
if (proto.lastLogin) {
|
|
1517
|
-
m.lastLogin = new Date(proto.lastLogin);
|
|
1518
|
-
}
|
|
1519
|
-
if (proto.publicKeys) {
|
|
1520
|
-
m.publicKeys = proto.publicKeys.map(PublicKey.fromProto);
|
|
1521
|
-
}
|
|
1522
|
-
return m;
|
|
1523
|
-
};
|
|
1524
|
-
User.prototype.toApiJson = function () {
|
|
1525
|
-
var toReturn = {};
|
|
1526
|
-
if (typeof this.userId !== 'undefined') {
|
|
1527
|
-
toReturn['userId'] = this.userId;
|
|
1528
|
-
}
|
|
1529
|
-
if (typeof this.namespace !== 'undefined') {
|
|
1530
|
-
toReturn['namespace'] = this.namespace;
|
|
1531
|
-
}
|
|
1532
|
-
if (typeof this.email !== 'undefined') {
|
|
1533
|
-
toReturn['email'] = this.email;
|
|
1534
|
-
}
|
|
1535
|
-
if (typeof this.created !== 'undefined' && this.created !== null) {
|
|
1536
|
-
toReturn['created'] = 'toApiJson' in this.created ? this.created.toApiJson() : this.created;
|
|
1537
|
-
}
|
|
1538
|
-
if (typeof this.updated !== 'undefined' && this.updated !== null) {
|
|
1539
|
-
toReturn['updated'] = 'toApiJson' in this.updated ? this.updated.toApiJson() : this.updated;
|
|
1540
|
-
}
|
|
1541
|
-
if (typeof this.firstName !== 'undefined') {
|
|
1542
|
-
toReturn['firstName'] = this.firstName;
|
|
1543
|
-
}
|
|
1544
|
-
if (typeof this.greetingName !== 'undefined') {
|
|
1545
|
-
toReturn['greetingName'] = this.greetingName;
|
|
1546
|
-
}
|
|
1547
|
-
if (typeof this.lastName !== 'undefined') {
|
|
1548
|
-
toReturn['lastName'] = this.lastName;
|
|
1549
|
-
}
|
|
1550
|
-
if (typeof this.languageCode !== 'undefined') {
|
|
1551
|
-
toReturn['languageCode'] = this.languageCode;
|
|
1552
|
-
}
|
|
1553
|
-
if (typeof this.emailVerified !== 'undefined') {
|
|
1554
|
-
toReturn['emailVerified'] = this.emailVerified;
|
|
1555
|
-
}
|
|
1556
|
-
if (typeof this.roles !== 'undefined') {
|
|
1557
|
-
toReturn['roles'] = this.roles;
|
|
1558
|
-
}
|
|
1559
|
-
if (typeof this.lastLogin !== 'undefined' && this.lastLogin !== null) {
|
|
1560
|
-
toReturn['lastLogin'] = 'toApiJson' in this.lastLogin ? this.lastLogin.toApiJson() : this.lastLogin;
|
|
1561
|
-
}
|
|
1562
|
-
if (typeof this.publicKeys !== 'undefined' && this.publicKeys !== null) {
|
|
1563
|
-
toReturn['publicKeys'] = 'toApiJson' in this.publicKeys ? this.publicKeys.toApiJson() : this.publicKeys;
|
|
1564
|
-
}
|
|
1565
|
-
return toReturn;
|
|
1566
|
-
};
|
|
1567
|
-
return User;
|
|
1568
|
-
}());
|
|
1569
|
-
|
|
1570
|
-
function enumStringToValue$7(enumRef, value) {
|
|
1571
|
-
if (typeof value === 'number') {
|
|
1572
|
-
return value;
|
|
1573
|
-
}
|
|
1574
|
-
return enumRef[value];
|
|
1575
|
-
}
|
|
1576
|
-
var AccessResourceRequest = /** @class */ (function () {
|
|
1577
|
-
function AccessResourceRequest(kwargs) {
|
|
1578
|
-
if (!kwargs) {
|
|
1579
|
-
return;
|
|
1580
|
-
}
|
|
1581
|
-
Object.assign(this, kwargs);
|
|
1582
|
-
}
|
|
1583
|
-
AccessResourceRequest.fromProto = function (proto) {
|
|
1584
|
-
var m = new AccessResourceRequest();
|
|
1585
|
-
m = Object.assign(m, proto);
|
|
1586
|
-
if (proto.context) {
|
|
1587
|
-
m.context = Context.fromProto(proto.context);
|
|
1588
|
-
}
|
|
1589
|
-
if (proto.resourceEntityIdentifier) {
|
|
1590
|
-
m.resourceEntityIdentifier = Object.keys(proto.resourceEntityIdentifier).reduce(function (obj, k) { obj[k] = ValueList.fromProto(proto.resourceEntityIdentifier[k]); return obj; }, {});
|
|
1591
|
-
}
|
|
1592
|
-
if (proto.accessScope) {
|
|
1593
|
-
m.accessScope = proto.accessScope.map(function (v) { return enumStringToValue$7(exports.AccessScope, v); });
|
|
1594
|
-
}
|
|
1595
|
-
if (proto.resourceEntityIdentifiers) {
|
|
1596
|
-
m.resourceEntityIdentifiers = proto.resourceEntityIdentifiers.map(ResourceIdentifier.fromProto);
|
|
1597
|
-
}
|
|
1598
|
-
if (proto.resourceAttributes) {
|
|
1599
|
-
m.resourceAttributes = StructAttribute.fromProto(proto.resourceAttributes);
|
|
1600
|
-
}
|
|
1601
|
-
return m;
|
|
1602
|
-
};
|
|
1603
|
-
AccessResourceRequest.prototype.toApiJson = function () {
|
|
1604
|
-
var toReturn = {};
|
|
1605
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
1606
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
1607
|
-
}
|
|
1608
|
-
if (typeof this.subjectId !== 'undefined') {
|
|
1609
|
-
toReturn['subjectId'] = this.subjectId;
|
|
1610
|
-
}
|
|
1611
|
-
if (typeof this.email !== 'undefined') {
|
|
1612
|
-
toReturn['email'] = this.email;
|
|
1613
|
-
}
|
|
1614
|
-
if (typeof this.userId !== 'undefined') {
|
|
1615
|
-
toReturn['userId'] = this.userId;
|
|
1616
|
-
}
|
|
1617
|
-
if (typeof this.session !== 'undefined') {
|
|
1618
|
-
toReturn['session'] = this.session;
|
|
1619
|
-
}
|
|
1620
|
-
if (typeof this.ownerId !== 'undefined') {
|
|
1621
|
-
toReturn['ownerId'] = this.ownerId;
|
|
1622
|
-
}
|
|
1623
|
-
if (typeof this.resourceId !== 'undefined') {
|
|
1624
|
-
toReturn['resourceId'] = this.resourceId;
|
|
1625
|
-
}
|
|
1626
|
-
if (typeof this.resourceEntityIdentifier !== 'undefined' && this.resourceEntityIdentifier !== null) {
|
|
1627
|
-
toReturn['resourceEntityIdentifier'] = 'toApiJson' in this.resourceEntityIdentifier ? this.resourceEntityIdentifier.toApiJson() : this.resourceEntityIdentifier;
|
|
1628
|
-
}
|
|
1629
|
-
if (typeof this.accessScope !== 'undefined') {
|
|
1630
|
-
toReturn['accessScope'] = this.accessScope;
|
|
1631
|
-
}
|
|
1632
|
-
if (typeof this.actions !== 'undefined') {
|
|
1633
|
-
toReturn['actions'] = this.actions;
|
|
1634
|
-
}
|
|
1635
|
-
if (typeof this.resourceEntityIdentifiers !== 'undefined' && this.resourceEntityIdentifiers !== null) {
|
|
1636
|
-
toReturn['resourceEntityIdentifiers'] = 'toApiJson' in this.resourceEntityIdentifiers ? this.resourceEntityIdentifiers.toApiJson() : this.resourceEntityIdentifiers;
|
|
1637
|
-
}
|
|
1638
|
-
if (typeof this.resourceAttributes !== 'undefined' && this.resourceAttributes !== null) {
|
|
1639
|
-
toReturn['resourceAttributes'] = 'toApiJson' in this.resourceAttributes ? this.resourceAttributes.toApiJson() : this.resourceAttributes;
|
|
1640
|
-
}
|
|
1641
|
-
return toReturn;
|
|
1642
|
-
};
|
|
1643
|
-
return AccessResourceRequest;
|
|
1644
|
-
}());
|
|
1645
|
-
var AddKeyRequest = /** @class */ (function () {
|
|
1646
|
-
function AddKeyRequest(kwargs) {
|
|
1647
|
-
if (!kwargs) {
|
|
1648
|
-
return;
|
|
1649
|
-
}
|
|
1650
|
-
Object.assign(this, kwargs);
|
|
1651
|
-
}
|
|
1652
|
-
AddKeyRequest.fromProto = function (proto) {
|
|
1653
|
-
var m = new AddKeyRequest();
|
|
1654
|
-
m = Object.assign(m, proto);
|
|
1655
|
-
if (proto.context) {
|
|
1656
|
-
m.context = Context.fromProto(proto.context);
|
|
1657
|
-
}
|
|
1658
|
-
if (proto.algorithmType) {
|
|
1659
|
-
m.algorithmType = enumStringToValue$7(exports.AlgorithmType, proto.algorithmType);
|
|
1660
|
-
}
|
|
1661
|
-
if (proto.userIdentifier) {
|
|
1662
|
-
m.userIdentifier = UserIdentifier.fromProto(proto.userIdentifier);
|
|
1663
|
-
}
|
|
1664
|
-
return m;
|
|
1665
|
-
};
|
|
1666
|
-
AddKeyRequest.prototype.toApiJson = function () {
|
|
1667
|
-
var toReturn = {};
|
|
1668
|
-
if (typeof this.email !== 'undefined') {
|
|
1669
|
-
toReturn['email'] = this.email;
|
|
1670
|
-
}
|
|
1671
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
1672
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
1673
|
-
}
|
|
1674
|
-
if (typeof this.algorithmType !== 'undefined') {
|
|
1675
|
-
toReturn['algorithmType'] = this.algorithmType;
|
|
1676
|
-
}
|
|
1677
|
-
if (typeof this.userIdentifier !== 'undefined' && this.userIdentifier !== null) {
|
|
1678
|
-
toReturn['userIdentifier'] = 'toApiJson' in this.userIdentifier ? this.userIdentifier.toApiJson() : this.userIdentifier;
|
|
1679
|
-
}
|
|
1680
|
-
return toReturn;
|
|
1681
|
-
};
|
|
1682
|
-
return AddKeyRequest;
|
|
1683
|
-
}());
|
|
1684
|
-
var AddKeyResponse = /** @class */ (function () {
|
|
1685
|
-
function AddKeyResponse(kwargs) {
|
|
1686
|
-
if (!kwargs) {
|
|
1687
|
-
return;
|
|
1688
|
-
}
|
|
1689
|
-
Object.assign(this, kwargs);
|
|
1690
|
-
}
|
|
1691
|
-
AddKeyResponse.fromProto = function (proto) {
|
|
1692
|
-
var m = new AddKeyResponse();
|
|
1693
|
-
m = Object.assign(m, proto);
|
|
1694
|
-
return m;
|
|
1695
|
-
};
|
|
1696
|
-
AddKeyResponse.prototype.toApiJson = function () {
|
|
1697
|
-
var toReturn = {};
|
|
1698
|
-
if (typeof this.privateKey !== 'undefined') {
|
|
1699
|
-
toReturn['privateKey'] = this.privateKey;
|
|
1700
|
-
}
|
|
1701
|
-
if (typeof this.keyId !== 'undefined') {
|
|
1702
|
-
toReturn['keyId'] = this.keyId;
|
|
1703
|
-
}
|
|
1704
|
-
return toReturn;
|
|
1705
|
-
};
|
|
1706
|
-
return AddKeyResponse;
|
|
1707
|
-
}());
|
|
1708
|
-
var AddMultiUserRestrictionRequest = /** @class */ (function () {
|
|
1709
|
-
function AddMultiUserRestrictionRequest(kwargs) {
|
|
1710
|
-
if (!kwargs) {
|
|
1711
|
-
return;
|
|
1712
|
-
}
|
|
1713
|
-
Object.assign(this, kwargs);
|
|
1714
|
-
}
|
|
1715
|
-
AddMultiUserRestrictionRequest.fromProto = function (proto) {
|
|
1716
|
-
var m = new AddMultiUserRestrictionRequest();
|
|
1717
|
-
m = Object.assign(m, proto);
|
|
1718
|
-
if (proto.userIdentifiers) {
|
|
1719
|
-
m.userIdentifiers = proto.userIdentifiers.map(UserIdentifier.fromProto);
|
|
1720
|
-
}
|
|
1721
|
-
if (proto.restrictionType) {
|
|
1722
|
-
m.restrictionType = enumStringToValue$7(exports.RestrictionType, proto.restrictionType);
|
|
1723
|
-
}
|
|
1724
|
-
return m;
|
|
1725
|
-
};
|
|
1726
|
-
AddMultiUserRestrictionRequest.prototype.toApiJson = function () {
|
|
1727
|
-
var toReturn = {};
|
|
1728
|
-
if (typeof this.userIdentifiers !== 'undefined' && this.userIdentifiers !== null) {
|
|
1729
|
-
toReturn['userIdentifiers'] = 'toApiJson' in this.userIdentifiers ? this.userIdentifiers.toApiJson() : this.userIdentifiers;
|
|
1730
|
-
}
|
|
1731
|
-
if (typeof this.restrictionType !== 'undefined') {
|
|
1732
|
-
toReturn['restrictionType'] = this.restrictionType;
|
|
1733
|
-
}
|
|
1734
|
-
return toReturn;
|
|
1735
|
-
};
|
|
1736
|
-
return AddMultiUserRestrictionRequest;
|
|
1737
|
-
}());
|
|
1738
|
-
var AuthenticateSubjectRequest = /** @class */ (function () {
|
|
1739
|
-
function AuthenticateSubjectRequest(kwargs) {
|
|
1740
|
-
if (!kwargs) {
|
|
1741
|
-
return;
|
|
1742
|
-
}
|
|
1743
|
-
Object.assign(this, kwargs);
|
|
1744
|
-
}
|
|
1745
|
-
AuthenticateSubjectRequest.fromProto = function (proto) {
|
|
1746
|
-
var m = new AuthenticateSubjectRequest();
|
|
1747
|
-
m = Object.assign(m, proto);
|
|
1748
|
-
if (proto.context) {
|
|
1749
|
-
m.context = Context.fromProto(proto.context);
|
|
1750
|
-
}
|
|
1751
|
-
return m;
|
|
1752
|
-
};
|
|
1753
|
-
AuthenticateSubjectRequest.prototype.toApiJson = function () {
|
|
1754
|
-
var toReturn = {};
|
|
1755
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
1756
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
1757
|
-
}
|
|
1758
|
-
if (typeof this.email !== 'undefined') {
|
|
1759
|
-
toReturn['email'] = this.email;
|
|
1760
|
-
}
|
|
1761
|
-
if (typeof this.password !== 'undefined') {
|
|
1762
|
-
toReturn['password'] = this.password;
|
|
1763
|
-
}
|
|
1764
|
-
return toReturn;
|
|
1765
|
-
};
|
|
1766
|
-
return AuthenticateSubjectRequest;
|
|
1767
|
-
}());
|
|
1768
|
-
var ChangeSubjectEmailRequest = /** @class */ (function () {
|
|
1769
|
-
function ChangeSubjectEmailRequest(kwargs) {
|
|
1770
|
-
if (!kwargs) {
|
|
1771
|
-
return;
|
|
1772
|
-
}
|
|
1773
|
-
Object.assign(this, kwargs);
|
|
1774
|
-
}
|
|
1775
|
-
ChangeSubjectEmailRequest.fromProto = function (proto) {
|
|
1776
|
-
var m = new ChangeSubjectEmailRequest();
|
|
1777
|
-
m = Object.assign(m, proto);
|
|
1778
|
-
if (proto.context) {
|
|
1779
|
-
m.context = Context.fromProto(proto.context);
|
|
1780
|
-
}
|
|
1781
|
-
return m;
|
|
1782
|
-
};
|
|
1783
|
-
ChangeSubjectEmailRequest.prototype.toApiJson = function () {
|
|
1784
|
-
var toReturn = {};
|
|
1785
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
1786
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
1787
|
-
}
|
|
1788
|
-
if (typeof this.subjectId !== 'undefined') {
|
|
1789
|
-
toReturn['subjectId'] = this.subjectId;
|
|
1790
|
-
}
|
|
1791
|
-
if (typeof this.newEmail !== 'undefined') {
|
|
1792
|
-
toReturn['newEmail'] = this.newEmail;
|
|
1793
|
-
}
|
|
1794
|
-
return toReturn;
|
|
1795
|
-
};
|
|
1796
|
-
return ChangeSubjectEmailRequest;
|
|
1797
|
-
}());
|
|
1798
|
-
var CreateExternalIDRequest = /** @class */ (function () {
|
|
1799
|
-
function CreateExternalIDRequest(kwargs) {
|
|
1800
|
-
if (!kwargs) {
|
|
1801
|
-
return;
|
|
1802
|
-
}
|
|
1803
|
-
Object.assign(this, kwargs);
|
|
1804
|
-
}
|
|
1805
|
-
CreateExternalIDRequest.fromProto = function (proto) {
|
|
1806
|
-
var m = new CreateExternalIDRequest();
|
|
1807
|
-
m = Object.assign(m, proto);
|
|
1808
|
-
if (proto.userIdentifier) {
|
|
1809
|
-
m.userIdentifier = UserIdentifier.fromProto(proto.userIdentifier);
|
|
1810
|
-
}
|
|
1811
|
-
if (proto.typedExternalIdentifier) {
|
|
1812
|
-
m.typedExternalIdentifier = TypedExternalIdentifier.fromProto(proto.typedExternalIdentifier);
|
|
1813
|
-
}
|
|
1814
|
-
return m;
|
|
1815
|
-
};
|
|
1816
|
-
CreateExternalIDRequest.prototype.toApiJson = function () {
|
|
1817
|
-
var toReturn = {};
|
|
1818
|
-
if (typeof this.userIdentifier !== 'undefined' && this.userIdentifier !== null) {
|
|
1819
|
-
toReturn['userIdentifier'] = 'toApiJson' in this.userIdentifier ? this.userIdentifier.toApiJson() : this.userIdentifier;
|
|
1820
|
-
}
|
|
1821
|
-
if (typeof this.typedExternalIdentifier !== 'undefined' && this.typedExternalIdentifier !== null) {
|
|
1822
|
-
toReturn['typedExternalIdentifier'] = 'toApiJson' in this.typedExternalIdentifier ? this.typedExternalIdentifier.toApiJson() : this.typedExternalIdentifier;
|
|
1823
|
-
}
|
|
1824
|
-
return toReturn;
|
|
1825
|
-
};
|
|
1826
|
-
return CreateExternalIDRequest;
|
|
1827
|
-
}());
|
|
1828
|
-
var CreateSessionRequest = /** @class */ (function () {
|
|
1829
|
-
function CreateSessionRequest(kwargs) {
|
|
1830
|
-
if (!kwargs) {
|
|
1831
|
-
return;
|
|
1832
|
-
}
|
|
1833
|
-
Object.assign(this, kwargs);
|
|
1834
|
-
}
|
|
1835
|
-
CreateSessionRequest.fromProto = function (proto) {
|
|
1836
|
-
var m = new CreateSessionRequest();
|
|
1837
|
-
m = Object.assign(m, proto);
|
|
1838
|
-
if (proto.context) {
|
|
1839
|
-
m.context = Context.fromProto(proto.context);
|
|
1840
|
-
}
|
|
1841
|
-
if (proto.oauthCredentials) {
|
|
1842
|
-
m.oauthCredentials = OAuthCredentials.fromProto(proto.oauthCredentials);
|
|
1843
|
-
}
|
|
1844
|
-
if (proto.subjectCredentials) {
|
|
1845
|
-
m.subjectCredentials = SubjectCredentials.fromProto(proto.subjectCredentials);
|
|
1846
|
-
}
|
|
1847
|
-
return m;
|
|
1848
|
-
};
|
|
1849
|
-
CreateSessionRequest.prototype.toApiJson = function () {
|
|
1850
|
-
var toReturn = {};
|
|
1851
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
1852
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
1853
|
-
}
|
|
1854
|
-
if (typeof this.oauthCredentials !== 'undefined' && this.oauthCredentials !== null) {
|
|
1855
|
-
toReturn['oauthCredentials'] = 'toApiJson' in this.oauthCredentials ? this.oauthCredentials.toApiJson() : this.oauthCredentials;
|
|
1856
|
-
}
|
|
1857
|
-
if (typeof this.subjectCredentials !== 'undefined' && this.subjectCredentials !== null) {
|
|
1858
|
-
toReturn['subjectCredentials'] = 'toApiJson' in this.subjectCredentials ? this.subjectCredentials.toApiJson() : this.subjectCredentials;
|
|
1859
|
-
}
|
|
1860
|
-
return toReturn;
|
|
1861
|
-
};
|
|
1862
|
-
return CreateSessionRequest;
|
|
1863
|
-
}());
|
|
1864
|
-
var CreateSessionResponse = /** @class */ (function () {
|
|
1865
|
-
function CreateSessionResponse(kwargs) {
|
|
1866
|
-
if (!kwargs) {
|
|
1867
|
-
return;
|
|
1868
|
-
}
|
|
1869
|
-
Object.assign(this, kwargs);
|
|
1870
|
-
}
|
|
1871
|
-
CreateSessionResponse.fromProto = function (proto) {
|
|
1872
|
-
var m = new CreateSessionResponse();
|
|
1873
|
-
m = Object.assign(m, proto);
|
|
1874
|
-
return m;
|
|
1875
|
-
};
|
|
1876
|
-
CreateSessionResponse.prototype.toApiJson = function () {
|
|
1877
|
-
var toReturn = {};
|
|
1878
|
-
if (typeof this.session !== 'undefined') {
|
|
1879
|
-
toReturn['session'] = this.session;
|
|
1880
|
-
}
|
|
1881
|
-
return toReturn;
|
|
1882
|
-
};
|
|
1883
|
-
return CreateSessionResponse;
|
|
1884
|
-
}());
|
|
1885
|
-
var CreateTemporarySubjectRequest = /** @class */ (function () {
|
|
1886
|
-
function CreateTemporarySubjectRequest(kwargs) {
|
|
1887
|
-
if (!kwargs) {
|
|
1888
|
-
return;
|
|
1889
|
-
}
|
|
1890
|
-
Object.assign(this, kwargs);
|
|
1891
|
-
}
|
|
1892
|
-
CreateTemporarySubjectRequest.fromProto = function (proto) {
|
|
1893
|
-
var m = new CreateTemporarySubjectRequest();
|
|
1894
|
-
m = Object.assign(m, proto);
|
|
1895
|
-
if (proto.context) {
|
|
1896
|
-
m.context = Context.fromProto(proto.context);
|
|
1897
|
-
}
|
|
1898
|
-
if (proto.attributes) {
|
|
1899
|
-
m.attributes = StructAttribute.fromProto(proto.attributes);
|
|
1900
|
-
}
|
|
1901
|
-
return m;
|
|
1902
|
-
};
|
|
1903
|
-
CreateTemporarySubjectRequest.prototype.toApiJson = function () {
|
|
1904
|
-
var toReturn = {};
|
|
1905
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
1906
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
1907
|
-
}
|
|
1908
|
-
if (typeof this.subject !== 'undefined') {
|
|
1909
|
-
toReturn['subject'] = this.subject;
|
|
1910
|
-
}
|
|
1911
|
-
if (typeof this.attributes !== 'undefined' && this.attributes !== null) {
|
|
1912
|
-
toReturn['attributes'] = 'toApiJson' in this.attributes ? this.attributes.toApiJson() : this.attributes;
|
|
1913
|
-
}
|
|
1914
|
-
return toReturn;
|
|
1915
|
-
};
|
|
1916
|
-
return CreateTemporarySubjectRequest;
|
|
1917
|
-
}());
|
|
1918
|
-
var CreateTemporarySubjectResponse = /** @class */ (function () {
|
|
1919
|
-
function CreateTemporarySubjectResponse(kwargs) {
|
|
1920
|
-
if (!kwargs) {
|
|
1921
|
-
return;
|
|
1922
|
-
}
|
|
1923
|
-
Object.assign(this, kwargs);
|
|
1924
|
-
}
|
|
1925
|
-
CreateTemporarySubjectResponse.fromProto = function (proto) {
|
|
1926
|
-
var m = new CreateTemporarySubjectResponse();
|
|
1927
|
-
m = Object.assign(m, proto);
|
|
1928
|
-
return m;
|
|
1929
|
-
};
|
|
1930
|
-
CreateTemporarySubjectResponse.prototype.toApiJson = function () {
|
|
1931
|
-
var toReturn = {};
|
|
1932
|
-
if (typeof this.session !== 'undefined') {
|
|
1933
|
-
toReturn['session'] = this.session;
|
|
1934
|
-
}
|
|
1935
|
-
return toReturn;
|
|
1936
|
-
};
|
|
1937
|
-
return CreateTemporarySubjectResponse;
|
|
1938
|
-
}());
|
|
1939
|
-
var DeleteSubjectRequest = /** @class */ (function () {
|
|
1940
|
-
function DeleteSubjectRequest(kwargs) {
|
|
1941
|
-
if (!kwargs) {
|
|
1942
|
-
return;
|
|
1943
|
-
}
|
|
1944
|
-
Object.assign(this, kwargs);
|
|
1945
|
-
}
|
|
1946
|
-
DeleteSubjectRequest.fromProto = function (proto) {
|
|
1947
|
-
var m = new DeleteSubjectRequest();
|
|
1948
|
-
m = Object.assign(m, proto);
|
|
1949
|
-
if (proto.context) {
|
|
1950
|
-
m.context = Context.fromProto(proto.context);
|
|
1951
|
-
}
|
|
1952
|
-
return m;
|
|
1953
|
-
};
|
|
1954
|
-
DeleteSubjectRequest.prototype.toApiJson = function () {
|
|
1955
|
-
var toReturn = {};
|
|
1956
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
1957
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
1958
|
-
}
|
|
1959
|
-
if (typeof this.subjectId !== 'undefined') {
|
|
1960
|
-
toReturn['subjectId'] = this.subjectId;
|
|
1961
|
-
}
|
|
1962
|
-
return toReturn;
|
|
1963
|
-
};
|
|
1964
|
-
return DeleteSubjectRequest;
|
|
1965
|
-
}());
|
|
1966
|
-
var DeleteUserRequest = /** @class */ (function () {
|
|
1967
|
-
function DeleteUserRequest(kwargs) {
|
|
1968
|
-
if (!kwargs) {
|
|
1969
|
-
return;
|
|
1970
|
-
}
|
|
1971
|
-
Object.assign(this, kwargs);
|
|
1972
|
-
}
|
|
1973
|
-
DeleteUserRequest.fromProto = function (proto) {
|
|
1974
|
-
var m = new DeleteUserRequest();
|
|
1975
|
-
m = Object.assign(m, proto);
|
|
1976
|
-
if (proto.userIdentifier) {
|
|
1977
|
-
m.userIdentifier = UserIdentifier.fromProto(proto.userIdentifier);
|
|
1978
|
-
}
|
|
1979
|
-
return m;
|
|
1980
|
-
};
|
|
1981
|
-
DeleteUserRequest.prototype.toApiJson = function () {
|
|
1982
|
-
var toReturn = {};
|
|
1983
|
-
if (typeof this.userIdentifier !== 'undefined' && this.userIdentifier !== null) {
|
|
1984
|
-
toReturn['userIdentifier'] = 'toApiJson' in this.userIdentifier ? this.userIdentifier.toApiJson() : this.userIdentifier;
|
|
1985
|
-
}
|
|
1986
|
-
return toReturn;
|
|
1987
|
-
};
|
|
1988
|
-
return DeleteUserRequest;
|
|
1989
|
-
}());
|
|
1990
|
-
var ListSecurityLogsRequestFilters = /** @class */ (function () {
|
|
1991
|
-
function ListSecurityLogsRequestFilters(kwargs) {
|
|
1992
|
-
if (!kwargs) {
|
|
1993
|
-
return;
|
|
1994
|
-
}
|
|
1995
|
-
Object.assign(this, kwargs);
|
|
1996
|
-
}
|
|
1997
|
-
ListSecurityLogsRequestFilters.fromProto = function (proto) {
|
|
1998
|
-
var m = new ListSecurityLogsRequestFilters();
|
|
1999
|
-
m = Object.assign(m, proto);
|
|
2000
|
-
return m;
|
|
2001
|
-
};
|
|
2002
|
-
ListSecurityLogsRequestFilters.prototype.toApiJson = function () {
|
|
2003
|
-
var toReturn = {};
|
|
2004
|
-
if (typeof this.actionId !== 'undefined') {
|
|
2005
|
-
toReturn['actionId'] = this.actionId;
|
|
2006
|
-
}
|
|
2007
|
-
return toReturn;
|
|
2008
|
-
};
|
|
2009
|
-
return ListSecurityLogsRequestFilters;
|
|
2010
|
-
}());
|
|
2011
|
-
var GetImpersonationTokenRequest = /** @class */ (function () {
|
|
2012
|
-
function GetImpersonationTokenRequest(kwargs) {
|
|
2013
|
-
if (!kwargs) {
|
|
2014
|
-
return;
|
|
2015
|
-
}
|
|
2016
|
-
Object.assign(this, kwargs);
|
|
2017
|
-
}
|
|
2018
|
-
GetImpersonationTokenRequest.fromProto = function (proto) {
|
|
2019
|
-
var m = new GetImpersonationTokenRequest();
|
|
2020
|
-
m = Object.assign(m, proto);
|
|
2021
|
-
if (proto.impersonatee) {
|
|
2022
|
-
m.impersonatee = UserIdentifier.fromProto(proto.impersonatee);
|
|
2023
|
-
}
|
|
2024
|
-
if (proto.impersonator) {
|
|
2025
|
-
m.impersonator = UserIdentifier.fromProto(proto.impersonator);
|
|
2026
|
-
}
|
|
2027
|
-
return m;
|
|
2028
|
-
};
|
|
2029
|
-
GetImpersonationTokenRequest.prototype.toApiJson = function () {
|
|
2030
|
-
var toReturn = {};
|
|
2031
|
-
if (typeof this.impersonatee !== 'undefined' && this.impersonatee !== null) {
|
|
2032
|
-
toReturn['impersonatee'] = 'toApiJson' in this.impersonatee ? this.impersonatee.toApiJson() : this.impersonatee;
|
|
2033
|
-
}
|
|
2034
|
-
if (typeof this.impersonator !== 'undefined' && this.impersonator !== null) {
|
|
2035
|
-
toReturn['impersonator'] = 'toApiJson' in this.impersonator ? this.impersonator.toApiJson() : this.impersonator;
|
|
2036
|
-
}
|
|
2037
|
-
return toReturn;
|
|
2038
|
-
};
|
|
2039
|
-
return GetImpersonationTokenRequest;
|
|
2040
|
-
}());
|
|
2041
|
-
var GetImpersonationTokenResponse = /** @class */ (function () {
|
|
2042
|
-
function GetImpersonationTokenResponse(kwargs) {
|
|
2043
|
-
if (!kwargs) {
|
|
2044
|
-
return;
|
|
2045
|
-
}
|
|
2046
|
-
Object.assign(this, kwargs);
|
|
2047
|
-
}
|
|
2048
|
-
GetImpersonationTokenResponse.fromProto = function (proto) {
|
|
2049
|
-
var m = new GetImpersonationTokenResponse();
|
|
2050
|
-
m = Object.assign(m, proto);
|
|
2051
|
-
return m;
|
|
2052
|
-
};
|
|
2053
|
-
GetImpersonationTokenResponse.prototype.toApiJson = function () {
|
|
2054
|
-
var toReturn = {};
|
|
2055
|
-
if (typeof this.token !== 'undefined') {
|
|
2056
|
-
toReturn['token'] = this.token;
|
|
2057
|
-
}
|
|
2058
|
-
return toReturn;
|
|
2059
|
-
};
|
|
2060
|
-
return GetImpersonationTokenResponse;
|
|
2061
|
-
}());
|
|
2062
|
-
var GetMultiExternalIDRequest = /** @class */ (function () {
|
|
2063
|
-
function GetMultiExternalIDRequest(kwargs) {
|
|
2064
|
-
if (!kwargs) {
|
|
2065
|
-
return;
|
|
2066
|
-
}
|
|
2067
|
-
Object.assign(this, kwargs);
|
|
2068
|
-
}
|
|
2069
|
-
GetMultiExternalIDRequest.fromProto = function (proto) {
|
|
2070
|
-
var m = new GetMultiExternalIDRequest();
|
|
2071
|
-
m = Object.assign(m, proto);
|
|
2072
|
-
if (proto.userIdentifiers) {
|
|
2073
|
-
m.userIdentifiers = proto.userIdentifiers.map(UserIdentifier.fromProto);
|
|
2074
|
-
}
|
|
2075
|
-
return m;
|
|
2076
|
-
};
|
|
2077
|
-
GetMultiExternalIDRequest.prototype.toApiJson = function () {
|
|
2078
|
-
var toReturn = {};
|
|
2079
|
-
if (typeof this.userIdentifiers !== 'undefined' && this.userIdentifiers !== null) {
|
|
2080
|
-
toReturn['userIdentifiers'] = 'toApiJson' in this.userIdentifiers ? this.userIdentifiers.toApiJson() : this.userIdentifiers;
|
|
2081
|
-
}
|
|
2082
|
-
if (typeof this.externalIdType !== 'undefined') {
|
|
2083
|
-
toReturn['externalIdType'] = this.externalIdType;
|
|
2084
|
-
}
|
|
2085
|
-
return toReturn;
|
|
2086
|
-
};
|
|
2087
|
-
return GetMultiExternalIDRequest;
|
|
2088
|
-
}());
|
|
2089
|
-
var GetMultiExternalIDResponse = /** @class */ (function () {
|
|
2090
|
-
function GetMultiExternalIDResponse(kwargs) {
|
|
2091
|
-
if (!kwargs) {
|
|
2092
|
-
return;
|
|
2093
|
-
}
|
|
2094
|
-
Object.assign(this, kwargs);
|
|
2095
|
-
}
|
|
2096
|
-
GetMultiExternalIDResponse.fromProto = function (proto) {
|
|
2097
|
-
var m = new GetMultiExternalIDResponse();
|
|
2098
|
-
m = Object.assign(m, proto);
|
|
2099
|
-
return m;
|
|
2100
|
-
};
|
|
2101
|
-
GetMultiExternalIDResponse.prototype.toApiJson = function () {
|
|
2102
|
-
var toReturn = {};
|
|
2103
|
-
if (typeof this.externalIds !== 'undefined') {
|
|
2104
|
-
toReturn['externalIds'] = this.externalIds;
|
|
2105
|
-
}
|
|
2106
|
-
return toReturn;
|
|
2107
|
-
};
|
|
2108
|
-
return GetMultiExternalIDResponse;
|
|
2109
|
-
}());
|
|
2110
|
-
var GetMultiUsersRequest = /** @class */ (function () {
|
|
2111
|
-
function GetMultiUsersRequest(kwargs) {
|
|
2112
|
-
if (!kwargs) {
|
|
2113
|
-
return;
|
|
2114
|
-
}
|
|
2115
|
-
Object.assign(this, kwargs);
|
|
2116
|
-
}
|
|
2117
|
-
GetMultiUsersRequest.fromProto = function (proto) {
|
|
2118
|
-
var m = new GetMultiUsersRequest();
|
|
2119
|
-
m = Object.assign(m, proto);
|
|
2120
|
-
if (proto.userIdentifiers) {
|
|
2121
|
-
m.userIdentifiers = proto.userIdentifiers.map(UserIdentifier.fromProto);
|
|
2122
|
-
}
|
|
2123
|
-
return m;
|
|
2124
|
-
};
|
|
2125
|
-
GetMultiUsersRequest.prototype.toApiJson = function () {
|
|
2126
|
-
var toReturn = {};
|
|
2127
|
-
if (typeof this.userIdentifiers !== 'undefined' && this.userIdentifiers !== null) {
|
|
2128
|
-
toReturn['userIdentifiers'] = 'toApiJson' in this.userIdentifiers ? this.userIdentifiers.toApiJson() : this.userIdentifiers;
|
|
2129
|
-
}
|
|
2130
|
-
return toReturn;
|
|
2131
|
-
};
|
|
2132
|
-
return GetMultiUsersRequest;
|
|
2133
|
-
}());
|
|
2134
|
-
var GetMultiUsersResponse = /** @class */ (function () {
|
|
2135
|
-
function GetMultiUsersResponse(kwargs) {
|
|
2136
|
-
if (!kwargs) {
|
|
2137
|
-
return;
|
|
2138
|
-
}
|
|
2139
|
-
Object.assign(this, kwargs);
|
|
2140
|
-
}
|
|
2141
|
-
GetMultiUsersResponse.fromProto = function (proto) {
|
|
2142
|
-
var m = new GetMultiUsersResponse();
|
|
2143
|
-
m = Object.assign(m, proto);
|
|
2144
|
-
if (proto.users) {
|
|
2145
|
-
m.users = proto.users.map(GetMultiUsersResponseUserContainer.fromProto);
|
|
2146
|
-
}
|
|
2147
|
-
return m;
|
|
2148
|
-
};
|
|
2149
|
-
GetMultiUsersResponse.prototype.toApiJson = function () {
|
|
2150
|
-
var toReturn = {};
|
|
2151
|
-
if (typeof this.users !== 'undefined' && this.users !== null) {
|
|
2152
|
-
toReturn['users'] = 'toApiJson' in this.users ? this.users.toApiJson() : this.users;
|
|
2153
|
-
}
|
|
2154
|
-
return toReturn;
|
|
2155
|
-
};
|
|
2156
|
-
return GetMultiUsersResponse;
|
|
2157
|
-
}());
|
|
2158
|
-
var GetResetPasswordTokenRequest = /** @class */ (function () {
|
|
2159
|
-
function GetResetPasswordTokenRequest(kwargs) {
|
|
2160
|
-
if (!kwargs) {
|
|
2161
|
-
return;
|
|
2162
|
-
}
|
|
2163
|
-
Object.assign(this, kwargs);
|
|
2164
|
-
}
|
|
2165
|
-
GetResetPasswordTokenRequest.fromProto = function (proto) {
|
|
2166
|
-
var m = new GetResetPasswordTokenRequest();
|
|
2167
|
-
m = Object.assign(m, proto);
|
|
2168
|
-
if (proto.context) {
|
|
2169
|
-
m.context = Context.fromProto(proto.context);
|
|
2170
|
-
}
|
|
2171
|
-
if (proto.userIdentifier) {
|
|
2172
|
-
m.userIdentifier = UserIdentifier.fromProto(proto.userIdentifier);
|
|
2173
|
-
}
|
|
2174
|
-
return m;
|
|
2175
|
-
};
|
|
2176
|
-
GetResetPasswordTokenRequest.prototype.toApiJson = function () {
|
|
2177
|
-
var toReturn = {};
|
|
2178
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
2179
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
2180
|
-
}
|
|
2181
|
-
if (typeof this.email !== 'undefined') {
|
|
2182
|
-
toReturn['email'] = this.email;
|
|
2183
|
-
}
|
|
2184
|
-
if (typeof this.userIdentifier !== 'undefined' && this.userIdentifier !== null) {
|
|
2185
|
-
toReturn['userIdentifier'] = 'toApiJson' in this.userIdentifier ? this.userIdentifier.toApiJson() : this.userIdentifier;
|
|
2186
|
-
}
|
|
2187
|
-
return toReturn;
|
|
2188
|
-
};
|
|
2189
|
-
return GetResetPasswordTokenRequest;
|
|
2190
|
-
}());
|
|
2191
|
-
var GetSessionTokenRequest = /** @class */ (function () {
|
|
2192
|
-
function GetSessionTokenRequest(kwargs) {
|
|
2193
|
-
if (!kwargs) {
|
|
2194
|
-
return;
|
|
2195
|
-
}
|
|
2196
|
-
Object.assign(this, kwargs);
|
|
2197
|
-
}
|
|
2198
|
-
GetSessionTokenRequest.fromProto = function (proto) {
|
|
2199
|
-
var m = new GetSessionTokenRequest();
|
|
2200
|
-
m = Object.assign(m, proto);
|
|
2201
|
-
return m;
|
|
2202
|
-
};
|
|
2203
|
-
GetSessionTokenRequest.prototype.toApiJson = function () {
|
|
2204
|
-
var toReturn = {};
|
|
2205
|
-
if (typeof this.token !== 'undefined') {
|
|
2206
|
-
toReturn['token'] = this.token;
|
|
2207
|
-
}
|
|
2208
|
-
return toReturn;
|
|
2209
|
-
};
|
|
2210
|
-
return GetSessionTokenRequest;
|
|
2211
|
-
}());
|
|
2212
|
-
var GetShortLivedTokenRequest = /** @class */ (function () {
|
|
2213
|
-
function GetShortLivedTokenRequest(kwargs) {
|
|
2214
|
-
if (!kwargs) {
|
|
2215
|
-
return;
|
|
2216
|
-
}
|
|
2217
|
-
Object.assign(this, kwargs);
|
|
2218
|
-
}
|
|
2219
|
-
GetShortLivedTokenRequest.fromProto = function (proto) {
|
|
2220
|
-
var m = new GetShortLivedTokenRequest();
|
|
2221
|
-
m = Object.assign(m, proto);
|
|
2222
|
-
if (proto.context) {
|
|
2223
|
-
m.context = Context.fromProto(proto.context);
|
|
2224
|
-
}
|
|
2225
|
-
return m;
|
|
2226
|
-
};
|
|
2227
|
-
GetShortLivedTokenRequest.prototype.toApiJson = function () {
|
|
2228
|
-
var toReturn = {};
|
|
2229
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
2230
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
2231
|
-
}
|
|
2232
|
-
if (typeof this.email !== 'undefined') {
|
|
2233
|
-
toReturn['email'] = this.email;
|
|
2234
|
-
}
|
|
2235
|
-
return toReturn;
|
|
2236
|
-
};
|
|
2237
|
-
return GetShortLivedTokenRequest;
|
|
2238
|
-
}());
|
|
2239
|
-
var GetSubjectBySessionRequest = /** @class */ (function () {
|
|
2240
|
-
function GetSubjectBySessionRequest(kwargs) {
|
|
2241
|
-
if (!kwargs) {
|
|
2242
|
-
return;
|
|
2243
|
-
}
|
|
2244
|
-
Object.assign(this, kwargs);
|
|
2245
|
-
}
|
|
2246
|
-
GetSubjectBySessionRequest.fromProto = function (proto) {
|
|
2247
|
-
var m = new GetSubjectBySessionRequest();
|
|
2248
|
-
m = Object.assign(m, proto);
|
|
2249
|
-
if (proto.context) {
|
|
2250
|
-
m.context = Context.fromProto(proto.context);
|
|
2251
|
-
}
|
|
2252
|
-
return m;
|
|
2253
|
-
};
|
|
2254
|
-
GetSubjectBySessionRequest.prototype.toApiJson = function () {
|
|
2255
|
-
var toReturn = {};
|
|
2256
|
-
if (typeof this.session !== 'undefined') {
|
|
2257
|
-
toReturn['session'] = this.session;
|
|
2258
|
-
}
|
|
2259
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
2260
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
2261
|
-
}
|
|
2262
|
-
return toReturn;
|
|
2263
|
-
};
|
|
2264
|
-
return GetSubjectBySessionRequest;
|
|
2265
|
-
}());
|
|
2266
|
-
var GetSubjectContextRequest = /** @class */ (function () {
|
|
2267
|
-
function GetSubjectContextRequest(kwargs) {
|
|
2268
|
-
if (!kwargs) {
|
|
2269
|
-
return;
|
|
2270
|
-
}
|
|
2271
|
-
Object.assign(this, kwargs);
|
|
2272
|
-
}
|
|
2273
|
-
GetSubjectContextRequest.fromProto = function (proto) {
|
|
2274
|
-
var m = new GetSubjectContextRequest();
|
|
2275
|
-
m = Object.assign(m, proto);
|
|
2276
|
-
return m;
|
|
2277
|
-
};
|
|
2278
|
-
GetSubjectContextRequest.prototype.toApiJson = function () {
|
|
2279
|
-
var toReturn = {};
|
|
2280
|
-
if (typeof this.subjectId !== 'undefined') {
|
|
2281
|
-
toReturn['subjectId'] = this.subjectId;
|
|
2282
|
-
}
|
|
2283
|
-
return toReturn;
|
|
2284
|
-
};
|
|
2285
|
-
return GetSubjectContextRequest;
|
|
2286
|
-
}());
|
|
2287
|
-
var GetSubjectContextResponse = /** @class */ (function () {
|
|
2288
|
-
function GetSubjectContextResponse(kwargs) {
|
|
2289
|
-
if (!kwargs) {
|
|
2290
|
-
return;
|
|
2291
|
-
}
|
|
2292
|
-
Object.assign(this, kwargs);
|
|
2293
|
-
}
|
|
2294
|
-
GetSubjectContextResponse.fromProto = function (proto) {
|
|
2295
|
-
var m = new GetSubjectContextResponse();
|
|
2296
|
-
m = Object.assign(m, proto);
|
|
2297
|
-
if (proto.context) {
|
|
2298
|
-
m.context = Context.fromProto(proto.context);
|
|
2299
|
-
}
|
|
2300
|
-
return m;
|
|
2301
|
-
};
|
|
2302
|
-
GetSubjectContextResponse.prototype.toApiJson = function () {
|
|
2303
|
-
var toReturn = {};
|
|
2304
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
2305
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
2306
|
-
}
|
|
2307
|
-
return toReturn;
|
|
2308
|
-
};
|
|
2309
|
-
return GetSubjectContextResponse;
|
|
2310
|
-
}());
|
|
2311
|
-
var GetSubjectResponse = /** @class */ (function () {
|
|
2312
|
-
function GetSubjectResponse(kwargs) {
|
|
2313
|
-
if (!kwargs) {
|
|
2314
|
-
return;
|
|
2315
|
-
}
|
|
2316
|
-
Object.assign(this, kwargs);
|
|
2317
|
-
}
|
|
2318
|
-
GetSubjectResponse.fromProto = function (proto) {
|
|
2319
|
-
var m = new GetSubjectResponse();
|
|
2320
|
-
m = Object.assign(m, proto);
|
|
2321
|
-
if (proto.subject) {
|
|
2322
|
-
m.subject = SubjectResult.fromProto(proto.subject);
|
|
2323
|
-
}
|
|
2324
|
-
return m;
|
|
2325
|
-
};
|
|
2326
|
-
GetSubjectResponse.prototype.toApiJson = function () {
|
|
2327
|
-
var toReturn = {};
|
|
2328
|
-
if (typeof this.subject !== 'undefined' && this.subject !== null) {
|
|
2329
|
-
toReturn['subject'] = 'toApiJson' in this.subject ? this.subject.toApiJson() : this.subject;
|
|
2330
|
-
}
|
|
2331
|
-
return toReturn;
|
|
2332
|
-
};
|
|
2333
|
-
return GetSubjectResponse;
|
|
2334
|
-
}());
|
|
2335
|
-
var GetSubjectsByEmailRequest = /** @class */ (function () {
|
|
2336
|
-
function GetSubjectsByEmailRequest(kwargs) {
|
|
2337
|
-
if (!kwargs) {
|
|
2338
|
-
return;
|
|
2339
|
-
}
|
|
2340
|
-
Object.assign(this, kwargs);
|
|
2341
|
-
}
|
|
2342
|
-
GetSubjectsByEmailRequest.fromProto = function (proto) {
|
|
2343
|
-
var m = new GetSubjectsByEmailRequest();
|
|
2344
|
-
m = Object.assign(m, proto);
|
|
2345
|
-
if (proto.context) {
|
|
2346
|
-
m.context = Context.fromProto(proto.context);
|
|
2347
|
-
}
|
|
2348
|
-
if (proto.fieldMask) {
|
|
2349
|
-
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
2350
|
-
}
|
|
2351
|
-
return m;
|
|
2352
|
-
};
|
|
2353
|
-
GetSubjectsByEmailRequest.prototype.toApiJson = function () {
|
|
2354
|
-
var toReturn = {};
|
|
2355
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
2356
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
2357
|
-
}
|
|
2358
|
-
if (typeof this.emails !== 'undefined') {
|
|
2359
|
-
toReturn['emails'] = this.emails;
|
|
2360
|
-
}
|
|
2361
|
-
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
2362
|
-
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
2363
|
-
}
|
|
2364
|
-
return toReturn;
|
|
2365
|
-
};
|
|
2366
|
-
return GetSubjectsByEmailRequest;
|
|
2367
|
-
}());
|
|
2368
|
-
var GetSubjectsRequest = /** @class */ (function () {
|
|
2369
|
-
function GetSubjectsRequest(kwargs) {
|
|
2370
|
-
if (!kwargs) {
|
|
2371
|
-
return;
|
|
2372
|
-
}
|
|
2373
|
-
Object.assign(this, kwargs);
|
|
2374
|
-
}
|
|
2375
|
-
GetSubjectsRequest.fromProto = function (proto) {
|
|
2376
|
-
var m = new GetSubjectsRequest();
|
|
2377
|
-
m = Object.assign(m, proto);
|
|
2378
|
-
if (proto.context) {
|
|
2379
|
-
m.context = Context.fromProto(proto.context);
|
|
2380
|
-
}
|
|
2381
|
-
if (proto.fieldMask) {
|
|
2382
|
-
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
2383
|
-
}
|
|
2384
|
-
if (proto.identifiers) {
|
|
2385
|
-
m.identifiers = proto.identifiers.map(Identifier.fromProto);
|
|
2386
|
-
}
|
|
2387
|
-
return m;
|
|
2388
|
-
};
|
|
2389
|
-
GetSubjectsRequest.prototype.toApiJson = function () {
|
|
2390
|
-
var toReturn = {};
|
|
2391
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
2392
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
2393
|
-
}
|
|
2394
|
-
if (typeof this.subjectIds !== 'undefined') {
|
|
2395
|
-
toReturn['subjectIds'] = this.subjectIds;
|
|
2396
|
-
}
|
|
2397
|
-
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
2398
|
-
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
2399
|
-
}
|
|
2400
|
-
if (typeof this.identifiers !== 'undefined' && this.identifiers !== null) {
|
|
2401
|
-
toReturn['identifiers'] = 'toApiJson' in this.identifiers ? this.identifiers.toApiJson() : this.identifiers;
|
|
2402
|
-
}
|
|
2403
|
-
return toReturn;
|
|
2404
|
-
};
|
|
2405
|
-
return GetSubjectsRequest;
|
|
2406
|
-
}());
|
|
2407
|
-
var GetSubjectsResponse = /** @class */ (function () {
|
|
2408
|
-
function GetSubjectsResponse(kwargs) {
|
|
2409
|
-
if (!kwargs) {
|
|
2410
|
-
return;
|
|
2411
|
-
}
|
|
2412
|
-
Object.assign(this, kwargs);
|
|
2413
|
-
}
|
|
2414
|
-
GetSubjectsResponse.fromProto = function (proto) {
|
|
2415
|
-
var m = new GetSubjectsResponse();
|
|
2416
|
-
m = Object.assign(m, proto);
|
|
2417
|
-
if (proto.subjects) {
|
|
2418
|
-
m.subjects = proto.subjects.map(SubjectResult.fromProto);
|
|
2419
|
-
}
|
|
2420
|
-
return m;
|
|
2421
|
-
};
|
|
2422
|
-
GetSubjectsResponse.prototype.toApiJson = function () {
|
|
2423
|
-
var toReturn = {};
|
|
2424
|
-
if (typeof this.subjects !== 'undefined' && this.subjects !== null) {
|
|
2425
|
-
toReturn['subjects'] = 'toApiJson' in this.subjects ? this.subjects.toApiJson() : this.subjects;
|
|
2426
|
-
}
|
|
2427
|
-
return toReturn;
|
|
2428
|
-
};
|
|
2429
|
-
return GetSubjectsResponse;
|
|
2430
|
-
}());
|
|
2431
|
-
var GetTokenRequest = /** @class */ (function () {
|
|
2432
|
-
function GetTokenRequest(kwargs) {
|
|
2433
|
-
if (!kwargs) {
|
|
2434
|
-
return;
|
|
2435
|
-
}
|
|
2436
|
-
Object.assign(this, kwargs);
|
|
2437
|
-
}
|
|
2438
|
-
GetTokenRequest.fromProto = function (proto) {
|
|
2439
|
-
var m = new GetTokenRequest();
|
|
2440
|
-
m = Object.assign(m, proto);
|
|
2441
|
-
return m;
|
|
2442
|
-
};
|
|
2443
|
-
GetTokenRequest.prototype.toApiJson = function () {
|
|
2444
|
-
var toReturn = {};
|
|
2445
|
-
return toReturn;
|
|
2446
|
-
};
|
|
2447
|
-
return GetTokenRequest;
|
|
2448
|
-
}());
|
|
2449
|
-
var GetTokenResponse = /** @class */ (function () {
|
|
2450
|
-
function GetTokenResponse(kwargs) {
|
|
2451
|
-
if (!kwargs) {
|
|
2452
|
-
return;
|
|
2453
|
-
}
|
|
2454
|
-
Object.assign(this, kwargs);
|
|
2455
|
-
}
|
|
2456
|
-
GetTokenResponse.fromProto = function (proto) {
|
|
2457
|
-
var m = new GetTokenResponse();
|
|
2458
|
-
m = Object.assign(m, proto);
|
|
2459
|
-
return m;
|
|
2460
|
-
};
|
|
2461
|
-
GetTokenResponse.prototype.toApiJson = function () {
|
|
2462
|
-
var toReturn = {};
|
|
2463
|
-
if (typeof this.token !== 'undefined') {
|
|
2464
|
-
toReturn['token'] = this.token;
|
|
2465
|
-
}
|
|
2466
|
-
return toReturn;
|
|
2467
|
-
};
|
|
2468
|
-
return GetTokenResponse;
|
|
2469
|
-
}());
|
|
2470
|
-
var IAMListPersonasRequest = /** @class */ (function () {
|
|
2471
|
-
function IAMListPersonasRequest(kwargs) {
|
|
2472
|
-
if (!kwargs) {
|
|
2473
|
-
return;
|
|
2474
|
-
}
|
|
2475
|
-
Object.assign(this, kwargs);
|
|
2476
|
-
}
|
|
2477
|
-
IAMListPersonasRequest.fromProto = function (proto) {
|
|
2478
|
-
var m = new IAMListPersonasRequest();
|
|
2479
|
-
m = Object.assign(m, proto);
|
|
2480
|
-
if (proto.userIdentifier) {
|
|
2481
|
-
m.userIdentifier = UserIdentifier.fromProto(proto.userIdentifier);
|
|
2482
|
-
}
|
|
2483
|
-
if (proto.pageSize) {
|
|
2484
|
-
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2485
|
-
}
|
|
2486
|
-
return m;
|
|
2487
|
-
};
|
|
2488
|
-
IAMListPersonasRequest.prototype.toApiJson = function () {
|
|
2489
|
-
var toReturn = {};
|
|
2490
|
-
if (typeof this.userIdentifier !== 'undefined' && this.userIdentifier !== null) {
|
|
2491
|
-
toReturn['userIdentifier'] = 'toApiJson' in this.userIdentifier ? this.userIdentifier.toApiJson() : this.userIdentifier;
|
|
2492
|
-
}
|
|
2493
|
-
if (typeof this.cursor !== 'undefined') {
|
|
2494
|
-
toReturn['cursor'] = this.cursor;
|
|
2495
|
-
}
|
|
2496
|
-
if (typeof this.pageSize !== 'undefined') {
|
|
2497
|
-
toReturn['pageSize'] = this.pageSize;
|
|
2498
|
-
}
|
|
2499
|
-
if (typeof this.type !== 'undefined') {
|
|
2500
|
-
toReturn['type'] = this.type;
|
|
2501
|
-
}
|
|
2502
|
-
if (typeof this.namespace !== 'undefined') {
|
|
2503
|
-
toReturn['namespace'] = this.namespace;
|
|
2504
|
-
}
|
|
2505
|
-
if (typeof this.alwaysIncludeSuperadmin !== 'undefined') {
|
|
2506
|
-
toReturn['alwaysIncludeSuperadmin'] = this.alwaysIncludeSuperadmin;
|
|
2507
|
-
}
|
|
2508
|
-
return toReturn;
|
|
2509
|
-
};
|
|
2510
|
-
return IAMListPersonasRequest;
|
|
2511
|
-
}());
|
|
2512
|
-
var ListPersonasByEmailRequest = /** @class */ (function () {
|
|
2513
|
-
function ListPersonasByEmailRequest(kwargs) {
|
|
2514
|
-
if (!kwargs) {
|
|
2515
|
-
return;
|
|
2516
|
-
}
|
|
2517
|
-
Object.assign(this, kwargs);
|
|
2518
|
-
}
|
|
2519
|
-
ListPersonasByEmailRequest.fromProto = function (proto) {
|
|
2520
|
-
var m = new ListPersonasByEmailRequest();
|
|
2521
|
-
m = Object.assign(m, proto);
|
|
2522
|
-
if (proto.pageSize) {
|
|
2523
|
-
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2524
|
-
}
|
|
2525
|
-
return m;
|
|
2526
|
-
};
|
|
2527
|
-
ListPersonasByEmailRequest.prototype.toApiJson = function () {
|
|
2528
|
-
var toReturn = {};
|
|
2529
|
-
if (typeof this.email !== 'undefined') {
|
|
2530
|
-
toReturn['email'] = this.email;
|
|
2531
|
-
}
|
|
2532
|
-
if (typeof this.cursor !== 'undefined') {
|
|
2533
|
-
toReturn['cursor'] = this.cursor;
|
|
2534
|
-
}
|
|
2535
|
-
if (typeof this.pageSize !== 'undefined') {
|
|
2536
|
-
toReturn['pageSize'] = this.pageSize;
|
|
2537
|
-
}
|
|
2538
|
-
if (typeof this.type !== 'undefined') {
|
|
2539
|
-
toReturn['type'] = this.type;
|
|
2540
|
-
}
|
|
2541
|
-
if (typeof this.namespace !== 'undefined') {
|
|
2542
|
-
toReturn['namespace'] = this.namespace;
|
|
2543
|
-
}
|
|
2544
|
-
return toReturn;
|
|
2545
|
-
};
|
|
2546
|
-
return ListPersonasByEmailRequest;
|
|
2547
|
-
}());
|
|
2548
|
-
var ListPersonasRequest = /** @class */ (function () {
|
|
2549
|
-
function ListPersonasRequest(kwargs) {
|
|
2550
|
-
if (!kwargs) {
|
|
2551
|
-
return;
|
|
2552
|
-
}
|
|
2553
|
-
Object.assign(this, kwargs);
|
|
2554
|
-
}
|
|
2555
|
-
ListPersonasRequest.fromProto = function (proto) {
|
|
2556
|
-
var m = new ListPersonasRequest();
|
|
2557
|
-
m = Object.assign(m, proto);
|
|
2558
|
-
if (proto.pageSize) {
|
|
2559
|
-
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2560
|
-
}
|
|
2561
|
-
return m;
|
|
2562
|
-
};
|
|
2563
|
-
ListPersonasRequest.prototype.toApiJson = function () {
|
|
2564
|
-
var toReturn = {};
|
|
2565
|
-
if (typeof this.session !== 'undefined') {
|
|
2566
|
-
toReturn['session'] = this.session;
|
|
2567
|
-
}
|
|
2568
|
-
if (typeof this.cursor !== 'undefined') {
|
|
2569
|
-
toReturn['cursor'] = this.cursor;
|
|
2570
|
-
}
|
|
2571
|
-
if (typeof this.pageSize !== 'undefined') {
|
|
2572
|
-
toReturn['pageSize'] = this.pageSize;
|
|
2573
|
-
}
|
|
2574
|
-
if (typeof this.type !== 'undefined') {
|
|
2575
|
-
toReturn['type'] = this.type;
|
|
2576
|
-
}
|
|
2577
|
-
if (typeof this.namespace !== 'undefined') {
|
|
2578
|
-
toReturn['namespace'] = this.namespace;
|
|
2579
|
-
}
|
|
2580
|
-
return toReturn;
|
|
2581
|
-
};
|
|
2582
|
-
return ListPersonasRequest;
|
|
2583
|
-
}());
|
|
2584
|
-
var ListPersonasResponse = /** @class */ (function () {
|
|
2585
|
-
function ListPersonasResponse(kwargs) {
|
|
2586
|
-
if (!kwargs) {
|
|
2587
|
-
return;
|
|
2588
|
-
}
|
|
2589
|
-
Object.assign(this, kwargs);
|
|
2590
|
-
}
|
|
2591
|
-
ListPersonasResponse.fromProto = function (proto) {
|
|
2592
|
-
var m = new ListPersonasResponse();
|
|
2593
|
-
m = Object.assign(m, proto);
|
|
2594
|
-
if (proto.personas) {
|
|
2595
|
-
m.personas = proto.personas.map(Persona.fromProto);
|
|
2596
|
-
}
|
|
2597
|
-
return m;
|
|
2598
|
-
};
|
|
2599
|
-
ListPersonasResponse.prototype.toApiJson = function () {
|
|
2600
|
-
var toReturn = {};
|
|
2601
|
-
if (typeof this.personas !== 'undefined' && this.personas !== null) {
|
|
2602
|
-
toReturn['personas'] = 'toApiJson' in this.personas ? this.personas.toApiJson() : this.personas;
|
|
2603
|
-
}
|
|
2604
|
-
if (typeof this.nextCursor !== 'undefined') {
|
|
2605
|
-
toReturn['nextCursor'] = this.nextCursor;
|
|
2606
|
-
}
|
|
2607
|
-
if (typeof this.hasMore !== 'undefined') {
|
|
2608
|
-
toReturn['hasMore'] = this.hasMore;
|
|
2609
|
-
}
|
|
2610
|
-
return toReturn;
|
|
2611
|
-
};
|
|
2612
|
-
return ListPersonasResponse;
|
|
2613
|
-
}());
|
|
2614
|
-
var ListSecurityLogsRequest = /** @class */ (function () {
|
|
2615
|
-
function ListSecurityLogsRequest(kwargs) {
|
|
2616
|
-
if (!kwargs) {
|
|
2617
|
-
return;
|
|
2618
|
-
}
|
|
2619
|
-
Object.assign(this, kwargs);
|
|
2620
|
-
}
|
|
2621
|
-
ListSecurityLogsRequest.fromProto = function (proto) {
|
|
2622
|
-
var m = new ListSecurityLogsRequest();
|
|
2623
|
-
m = Object.assign(m, proto);
|
|
2624
|
-
if (proto.filters) {
|
|
2625
|
-
m.filters = ListSecurityLogsRequestFilters.fromProto(proto.filters);
|
|
2626
|
-
}
|
|
2627
|
-
if (proto.pageSize) {
|
|
2628
|
-
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2629
|
-
}
|
|
2630
|
-
return m;
|
|
2631
|
-
};
|
|
2632
|
-
ListSecurityLogsRequest.prototype.toApiJson = function () {
|
|
2633
|
-
var toReturn = {};
|
|
2634
|
-
if (typeof this.userId !== 'undefined') {
|
|
2635
|
-
toReturn['userId'] = this.userId;
|
|
2636
|
-
}
|
|
2637
|
-
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
2638
|
-
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
2639
|
-
}
|
|
2640
|
-
if (typeof this.pageSize !== 'undefined') {
|
|
2641
|
-
toReturn['pageSize'] = this.pageSize;
|
|
2642
|
-
}
|
|
2643
|
-
if (typeof this.cursor !== 'undefined') {
|
|
2644
|
-
toReturn['cursor'] = this.cursor;
|
|
2645
|
-
}
|
|
2646
|
-
return toReturn;
|
|
2647
|
-
};
|
|
2648
|
-
return ListSecurityLogsRequest;
|
|
2649
|
-
}());
|
|
2650
|
-
var ListSecurityLogsResponse = /** @class */ (function () {
|
|
2651
|
-
function ListSecurityLogsResponse(kwargs) {
|
|
2652
|
-
if (!kwargs) {
|
|
2653
|
-
return;
|
|
2654
|
-
}
|
|
2655
|
-
Object.assign(this, kwargs);
|
|
2656
|
-
}
|
|
2657
|
-
ListSecurityLogsResponse.fromProto = function (proto) {
|
|
2658
|
-
var m = new ListSecurityLogsResponse();
|
|
2659
|
-
m = Object.assign(m, proto);
|
|
2660
|
-
if (proto.logs) {
|
|
2661
|
-
m.logs = proto.logs.map(SecurityLog.fromProto);
|
|
2662
|
-
}
|
|
2663
|
-
return m;
|
|
2664
|
-
};
|
|
2665
|
-
ListSecurityLogsResponse.prototype.toApiJson = function () {
|
|
2666
|
-
var toReturn = {};
|
|
2667
|
-
if (typeof this.logs !== 'undefined' && this.logs !== null) {
|
|
2668
|
-
toReturn['logs'] = 'toApiJson' in this.logs ? this.logs.toApiJson() : this.logs;
|
|
2669
|
-
}
|
|
2670
|
-
if (typeof this.nextCursor !== 'undefined') {
|
|
2671
|
-
toReturn['nextCursor'] = this.nextCursor;
|
|
2672
|
-
}
|
|
2673
|
-
if (typeof this.hasMore !== 'undefined') {
|
|
2674
|
-
toReturn['hasMore'] = this.hasMore;
|
|
2675
|
-
}
|
|
2676
|
-
return toReturn;
|
|
2677
|
-
};
|
|
2678
|
-
return ListSecurityLogsResponse;
|
|
2679
|
-
}());
|
|
2680
|
-
var ListUsersRequest = /** @class */ (function () {
|
|
2681
|
-
function ListUsersRequest(kwargs) {
|
|
2682
|
-
if (!kwargs) {
|
|
2683
|
-
return;
|
|
2684
|
-
}
|
|
2685
|
-
Object.assign(this, kwargs);
|
|
2686
|
-
}
|
|
2687
|
-
ListUsersRequest.fromProto = function (proto) {
|
|
2688
|
-
var m = new ListUsersRequest();
|
|
2689
|
-
m = Object.assign(m, proto);
|
|
2690
|
-
if (proto.pageSize) {
|
|
2691
|
-
m.pageSize = parseInt(proto.pageSize, 10);
|
|
2692
|
-
}
|
|
2693
|
-
if (proto.userFilter) {
|
|
2694
|
-
m.userFilter = UserFilter.fromProto(proto.userFilter);
|
|
2695
|
-
}
|
|
2696
|
-
if (proto.sortOptions) {
|
|
2697
|
-
m.sortOptions = proto.sortOptions.map(UserSortOptions.fromProto);
|
|
2698
|
-
}
|
|
2699
|
-
return m;
|
|
2700
|
-
};
|
|
2701
|
-
ListUsersRequest.prototype.toApiJson = function () {
|
|
2702
|
-
var toReturn = {};
|
|
2703
|
-
if (typeof this.namespace !== 'undefined') {
|
|
2704
|
-
toReturn['namespace'] = this.namespace;
|
|
2705
|
-
}
|
|
2706
|
-
if (typeof this.email !== 'undefined') {
|
|
2707
|
-
toReturn['email'] = this.email;
|
|
2708
|
-
}
|
|
2709
|
-
if (typeof this.cursor !== 'undefined') {
|
|
2710
|
-
toReturn['cursor'] = this.cursor;
|
|
2711
|
-
}
|
|
2712
|
-
if (typeof this.pageSize !== 'undefined') {
|
|
2713
|
-
toReturn['pageSize'] = this.pageSize;
|
|
2714
|
-
}
|
|
2715
|
-
if (typeof this.userFilter !== 'undefined' && this.userFilter !== null) {
|
|
2716
|
-
toReturn['userFilter'] = 'toApiJson' in this.userFilter ? this.userFilter.toApiJson() : this.userFilter;
|
|
2717
|
-
}
|
|
2718
|
-
if (typeof this.sortOptions !== 'undefined' && this.sortOptions !== null) {
|
|
2719
|
-
toReturn['sortOptions'] = 'toApiJson' in this.sortOptions ? this.sortOptions.toApiJson() : this.sortOptions;
|
|
2720
|
-
}
|
|
2721
|
-
return toReturn;
|
|
2722
|
-
};
|
|
2723
|
-
return ListUsersRequest;
|
|
2724
|
-
}());
|
|
2725
|
-
var ListUsersResponse = /** @class */ (function () {
|
|
2726
|
-
function ListUsersResponse(kwargs) {
|
|
2727
|
-
if (!kwargs) {
|
|
2728
|
-
return;
|
|
2729
|
-
}
|
|
2730
|
-
Object.assign(this, kwargs);
|
|
2731
|
-
}
|
|
2732
|
-
ListUsersResponse.fromProto = function (proto) {
|
|
2733
|
-
var m = new ListUsersResponse();
|
|
2734
|
-
m = Object.assign(m, proto);
|
|
2735
|
-
if (proto.users) {
|
|
2736
|
-
m.users = proto.users.map(User.fromProto);
|
|
2737
|
-
}
|
|
2738
|
-
return m;
|
|
2739
|
-
};
|
|
2740
|
-
ListUsersResponse.prototype.toApiJson = function () {
|
|
2741
|
-
var toReturn = {};
|
|
2742
|
-
if (typeof this.users !== 'undefined' && this.users !== null) {
|
|
2743
|
-
toReturn['users'] = 'toApiJson' in this.users ? this.users.toApiJson() : this.users;
|
|
2744
|
-
}
|
|
2745
|
-
if (typeof this.nextCursor !== 'undefined') {
|
|
2746
|
-
toReturn['nextCursor'] = this.nextCursor;
|
|
2747
|
-
}
|
|
2748
|
-
if (typeof this.hasMore !== 'undefined') {
|
|
2749
|
-
toReturn['hasMore'] = this.hasMore;
|
|
2750
|
-
}
|
|
2751
|
-
return toReturn;
|
|
2752
|
-
};
|
|
2753
|
-
return ListUsersResponse;
|
|
2754
|
-
}());
|
|
2755
|
-
var MutateAttributesRequest = /** @class */ (function () {
|
|
2756
|
-
function MutateAttributesRequest(kwargs) {
|
|
2757
|
-
if (!kwargs) {
|
|
2758
|
-
return;
|
|
2759
|
-
}
|
|
2760
|
-
Object.assign(this, kwargs);
|
|
2761
|
-
}
|
|
2762
|
-
MutateAttributesRequest.fromProto = function (proto) {
|
|
2763
|
-
var m = new MutateAttributesRequest();
|
|
2764
|
-
m = Object.assign(m, proto);
|
|
2765
|
-
if (proto.context) {
|
|
2766
|
-
m.context = Context.fromProto(proto.context);
|
|
2767
|
-
}
|
|
2768
|
-
if (proto.mutations) {
|
|
2769
|
-
m.mutations = proto.mutations.map(Mutation.fromProto);
|
|
2770
|
-
}
|
|
2771
|
-
return m;
|
|
2772
|
-
};
|
|
2773
|
-
MutateAttributesRequest.prototype.toApiJson = function () {
|
|
2774
|
-
var toReturn = {};
|
|
2775
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
2776
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
2777
|
-
}
|
|
2778
|
-
if (typeof this.subjectId !== 'undefined') {
|
|
2779
|
-
toReturn['subjectId'] = this.subjectId;
|
|
2780
|
-
}
|
|
2781
|
-
if (typeof this.mutations !== 'undefined' && this.mutations !== null) {
|
|
2782
|
-
toReturn['mutations'] = 'toApiJson' in this.mutations ? this.mutations.toApiJson() : this.mutations;
|
|
2783
|
-
}
|
|
2784
|
-
return toReturn;
|
|
2785
|
-
};
|
|
2786
|
-
return MutateAttributesRequest;
|
|
2787
|
-
}());
|
|
2788
|
-
var OAuthCredentials = /** @class */ (function () {
|
|
2789
|
-
function OAuthCredentials(kwargs) {
|
|
2790
|
-
if (!kwargs) {
|
|
2791
|
-
return;
|
|
2792
|
-
}
|
|
2793
|
-
Object.assign(this, kwargs);
|
|
2794
|
-
}
|
|
2795
|
-
OAuthCredentials.fromProto = function (proto) {
|
|
2796
|
-
var m = new OAuthCredentials();
|
|
2797
|
-
m = Object.assign(m, proto);
|
|
2798
|
-
return m;
|
|
2799
|
-
};
|
|
2800
|
-
OAuthCredentials.prototype.toApiJson = function () {
|
|
2801
|
-
var toReturn = {};
|
|
2802
|
-
if (typeof this.provider !== 'undefined') {
|
|
2803
|
-
toReturn['provider'] = this.provider;
|
|
2804
|
-
}
|
|
2805
|
-
if (typeof this.idToken !== 'undefined') {
|
|
2806
|
-
toReturn['idToken'] = this.idToken;
|
|
2807
|
-
}
|
|
2808
|
-
if (typeof this.accessToken !== 'undefined') {
|
|
2809
|
-
toReturn['accessToken'] = this.accessToken;
|
|
2810
|
-
}
|
|
2811
|
-
return toReturn;
|
|
2812
|
-
};
|
|
2813
|
-
return OAuthCredentials;
|
|
2814
|
-
}());
|
|
2815
|
-
var UpdateUserRequestOperation = /** @class */ (function () {
|
|
2816
|
-
function UpdateUserRequestOperation(kwargs) {
|
|
2817
|
-
if (!kwargs) {
|
|
2818
|
-
return;
|
|
2819
|
-
}
|
|
2820
|
-
Object.assign(this, kwargs);
|
|
2821
|
-
}
|
|
2822
|
-
UpdateUserRequestOperation.fromProto = function (proto) {
|
|
2823
|
-
var m = new UpdateUserRequestOperation();
|
|
2824
|
-
m = Object.assign(m, proto);
|
|
2825
|
-
return m;
|
|
2826
|
-
};
|
|
2827
|
-
UpdateUserRequestOperation.prototype.toApiJson = function () {
|
|
2828
|
-
var toReturn = {};
|
|
2829
|
-
if (typeof this.firstName !== 'undefined') {
|
|
2830
|
-
toReturn['firstName'] = this.firstName;
|
|
2831
|
-
}
|
|
2832
|
-
if (typeof this.greetingName !== 'undefined') {
|
|
2833
|
-
toReturn['greetingName'] = this.greetingName;
|
|
2834
|
-
}
|
|
2835
|
-
if (typeof this.lastName !== 'undefined') {
|
|
2836
|
-
toReturn['lastName'] = this.lastName;
|
|
2837
|
-
}
|
|
2838
|
-
if (typeof this.languageCode !== 'undefined') {
|
|
2839
|
-
toReturn['languageCode'] = this.languageCode;
|
|
2840
|
-
}
|
|
2841
|
-
return toReturn;
|
|
2842
|
-
};
|
|
2843
|
-
return UpdateUserRequestOperation;
|
|
2844
|
-
}());
|
|
2845
|
-
var RegisterPolicyRequest = /** @class */ (function () {
|
|
2846
|
-
function RegisterPolicyRequest(kwargs) {
|
|
2847
|
-
if (!kwargs) {
|
|
2848
|
-
return;
|
|
2849
|
-
}
|
|
2850
|
-
Object.assign(this, kwargs);
|
|
2851
|
-
}
|
|
2852
|
-
RegisterPolicyRequest.fromProto = function (proto) {
|
|
2853
|
-
var m = new RegisterPolicyRequest();
|
|
2854
|
-
m = Object.assign(m, proto);
|
|
2855
|
-
if (proto.policy) {
|
|
2856
|
-
m.policy = Policy.fromProto(proto.policy);
|
|
2857
|
-
}
|
|
2858
|
-
return m;
|
|
2859
|
-
};
|
|
2860
|
-
RegisterPolicyRequest.prototype.toApiJson = function () {
|
|
2861
|
-
var toReturn = {};
|
|
2862
|
-
if (typeof this.policy !== 'undefined' && this.policy !== null) {
|
|
2863
|
-
toReturn['policy'] = 'toApiJson' in this.policy ? this.policy.toApiJson() : this.policy;
|
|
2864
|
-
}
|
|
2865
|
-
return toReturn;
|
|
2866
|
-
};
|
|
2867
|
-
return RegisterPolicyRequest;
|
|
2868
|
-
}());
|
|
2869
|
-
var RegisterResourceOwnerRequest = /** @class */ (function () {
|
|
2870
|
-
function RegisterResourceOwnerRequest(kwargs) {
|
|
2871
|
-
if (!kwargs) {
|
|
2872
|
-
return;
|
|
2873
|
-
}
|
|
2874
|
-
Object.assign(this, kwargs);
|
|
2875
|
-
}
|
|
2876
|
-
RegisterResourceOwnerRequest.fromProto = function (proto) {
|
|
2877
|
-
var m = new RegisterResourceOwnerRequest();
|
|
2878
|
-
m = Object.assign(m, proto);
|
|
2879
|
-
if (proto.owner) {
|
|
2880
|
-
m.owner = ResourceOwner.fromProto(proto.owner);
|
|
2881
|
-
}
|
|
2882
|
-
return m;
|
|
2883
|
-
};
|
|
2884
|
-
RegisterResourceOwnerRequest.prototype.toApiJson = function () {
|
|
2885
|
-
var toReturn = {};
|
|
2886
|
-
if (typeof this.owner !== 'undefined' && this.owner !== null) {
|
|
2887
|
-
toReturn['owner'] = 'toApiJson' in this.owner ? this.owner.toApiJson() : this.owner;
|
|
2888
|
-
}
|
|
2889
|
-
return toReturn;
|
|
2890
|
-
};
|
|
2891
|
-
return RegisterResourceOwnerRequest;
|
|
2892
|
-
}());
|
|
2893
|
-
var RegisterResourceRequest = /** @class */ (function () {
|
|
2894
|
-
function RegisterResourceRequest(kwargs) {
|
|
2895
|
-
if (!kwargs) {
|
|
2896
|
-
return;
|
|
2897
|
-
}
|
|
2898
|
-
Object.assign(this, kwargs);
|
|
2899
|
-
}
|
|
2900
|
-
RegisterResourceRequest.fromProto = function (proto) {
|
|
2901
|
-
var m = new RegisterResourceRequest();
|
|
2902
|
-
m = Object.assign(m, proto);
|
|
2903
|
-
return m;
|
|
2904
|
-
};
|
|
2905
|
-
RegisterResourceRequest.prototype.toApiJson = function () {
|
|
2906
|
-
var toReturn = {};
|
|
2907
|
-
if (typeof this.appId !== 'undefined') {
|
|
2908
|
-
toReturn['appId'] = this.appId;
|
|
2909
|
-
}
|
|
2910
|
-
if (typeof this.resourceId !== 'undefined') {
|
|
2911
|
-
toReturn['resourceId'] = this.resourceId;
|
|
2912
|
-
}
|
|
2913
|
-
if (typeof this.resourceName !== 'undefined') {
|
|
2914
|
-
toReturn['resourceName'] = this.resourceName;
|
|
2915
|
-
}
|
|
2916
|
-
if (typeof this.resourceOwnerServiceUrl !== 'undefined') {
|
|
2917
|
-
toReturn['resourceOwnerServiceUrl'] = this.resourceOwnerServiceUrl;
|
|
2918
|
-
}
|
|
2919
|
-
if (typeof this.requiredResourceParams !== 'undefined') {
|
|
2920
|
-
toReturn['requiredResourceParams'] = this.requiredResourceParams;
|
|
2921
|
-
}
|
|
2922
|
-
if (typeof this.resourceOwnerAudience !== 'undefined') {
|
|
2923
|
-
toReturn['resourceOwnerAudience'] = this.resourceOwnerAudience;
|
|
2924
|
-
}
|
|
2925
|
-
return toReturn;
|
|
2926
|
-
};
|
|
2927
|
-
return RegisterResourceRequest;
|
|
2928
|
-
}());
|
|
2929
|
-
var RegisterSubjectRequest = /** @class */ (function () {
|
|
2930
|
-
function RegisterSubjectRequest(kwargs) {
|
|
2931
|
-
if (!kwargs) {
|
|
2932
|
-
return;
|
|
2933
|
-
}
|
|
2934
|
-
Object.assign(this, kwargs);
|
|
2935
|
-
}
|
|
2936
|
-
RegisterSubjectRequest.fromProto = function (proto) {
|
|
2937
|
-
var m = new RegisterSubjectRequest();
|
|
2938
|
-
m = Object.assign(m, proto);
|
|
2939
|
-
if (proto.context) {
|
|
2940
|
-
m.context = Context.fromProto(proto.context);
|
|
2941
|
-
}
|
|
2942
|
-
if (proto.attributes) {
|
|
2943
|
-
m.attributes = proto.attributes.map(MultiValueAttribute.fromProto);
|
|
2944
|
-
}
|
|
2945
|
-
if (proto.structAttributes) {
|
|
2946
|
-
m.structAttributes = StructAttribute.fromProto(proto.structAttributes);
|
|
2947
|
-
}
|
|
2948
|
-
return m;
|
|
2949
|
-
};
|
|
2950
|
-
RegisterSubjectRequest.prototype.toApiJson = function () {
|
|
2951
|
-
var toReturn = {};
|
|
2952
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
2953
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
2954
|
-
}
|
|
2955
|
-
if (typeof this.email !== 'undefined') {
|
|
2956
|
-
toReturn['email'] = this.email;
|
|
2957
|
-
}
|
|
2958
|
-
if (typeof this.password !== 'undefined') {
|
|
2959
|
-
toReturn['password'] = this.password;
|
|
2960
|
-
}
|
|
2961
|
-
if (typeof this.attributes !== 'undefined' && this.attributes !== null) {
|
|
2962
|
-
toReturn['attributes'] = 'toApiJson' in this.attributes ? this.attributes.toApiJson() : this.attributes;
|
|
2963
|
-
}
|
|
2964
|
-
if (typeof this.structAttributes !== 'undefined' && this.structAttributes !== null) {
|
|
2965
|
-
toReturn['structAttributes'] = 'toApiJson' in this.structAttributes ? this.structAttributes.toApiJson() : this.structAttributes;
|
|
2966
|
-
}
|
|
2967
|
-
return toReturn;
|
|
2968
|
-
};
|
|
2969
|
-
return RegisterSubjectRequest;
|
|
2970
|
-
}());
|
|
2971
|
-
var RegisterSubjectResponse = /** @class */ (function () {
|
|
2972
|
-
function RegisterSubjectResponse(kwargs) {
|
|
2973
|
-
if (!kwargs) {
|
|
2974
|
-
return;
|
|
2975
|
-
}
|
|
2976
|
-
Object.assign(this, kwargs);
|
|
2977
|
-
}
|
|
2978
|
-
RegisterSubjectResponse.fromProto = function (proto) {
|
|
2979
|
-
var m = new RegisterSubjectResponse();
|
|
2980
|
-
m = Object.assign(m, proto);
|
|
2981
|
-
return m;
|
|
2982
|
-
};
|
|
2983
|
-
RegisterSubjectResponse.prototype.toApiJson = function () {
|
|
2984
|
-
var toReturn = {};
|
|
2985
|
-
if (typeof this.subjectId !== 'undefined') {
|
|
2986
|
-
toReturn['subjectId'] = this.subjectId;
|
|
2987
|
-
}
|
|
2988
|
-
return toReturn;
|
|
2989
|
-
};
|
|
2990
|
-
return RegisterSubjectResponse;
|
|
2991
|
-
}());
|
|
2992
|
-
var RemoveKeyRequest = /** @class */ (function () {
|
|
2993
|
-
function RemoveKeyRequest(kwargs) {
|
|
2994
|
-
if (!kwargs) {
|
|
2995
|
-
return;
|
|
2996
|
-
}
|
|
2997
|
-
Object.assign(this, kwargs);
|
|
2998
|
-
}
|
|
2999
|
-
RemoveKeyRequest.fromProto = function (proto) {
|
|
3000
|
-
var m = new RemoveKeyRequest();
|
|
3001
|
-
m = Object.assign(m, proto);
|
|
3002
|
-
if (proto.context) {
|
|
3003
|
-
m.context = Context.fromProto(proto.context);
|
|
3004
|
-
}
|
|
3005
|
-
if (proto.userIdentifier) {
|
|
3006
|
-
m.userIdentifier = UserIdentifier.fromProto(proto.userIdentifier);
|
|
3007
|
-
}
|
|
3008
|
-
return m;
|
|
3009
|
-
};
|
|
3010
|
-
RemoveKeyRequest.prototype.toApiJson = function () {
|
|
3011
|
-
var toReturn = {};
|
|
3012
|
-
if (typeof this.email !== 'undefined') {
|
|
3013
|
-
toReturn['email'] = this.email;
|
|
3014
|
-
}
|
|
3015
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
3016
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
3017
|
-
}
|
|
3018
|
-
if (typeof this.keyId !== 'undefined') {
|
|
3019
|
-
toReturn['keyId'] = this.keyId;
|
|
3020
|
-
}
|
|
3021
|
-
if (typeof this.userIdentifier !== 'undefined' && this.userIdentifier !== null) {
|
|
3022
|
-
toReturn['userIdentifier'] = 'toApiJson' in this.userIdentifier ? this.userIdentifier.toApiJson() : this.userIdentifier;
|
|
3023
|
-
}
|
|
3024
|
-
return toReturn;
|
|
3025
|
-
};
|
|
3026
|
-
return RemoveKeyRequest;
|
|
3027
|
-
}());
|
|
3028
|
-
var RemoveMultiUserRestrictionRequest = /** @class */ (function () {
|
|
3029
|
-
function RemoveMultiUserRestrictionRequest(kwargs) {
|
|
3030
|
-
if (!kwargs) {
|
|
3031
|
-
return;
|
|
3032
|
-
}
|
|
3033
|
-
Object.assign(this, kwargs);
|
|
3034
|
-
}
|
|
3035
|
-
RemoveMultiUserRestrictionRequest.fromProto = function (proto) {
|
|
3036
|
-
var m = new RemoveMultiUserRestrictionRequest();
|
|
3037
|
-
m = Object.assign(m, proto);
|
|
3038
|
-
if (proto.userIdentifiers) {
|
|
3039
|
-
m.userIdentifiers = proto.userIdentifiers.map(UserIdentifier.fromProto);
|
|
3040
|
-
}
|
|
3041
|
-
if (proto.restrictionType) {
|
|
3042
|
-
m.restrictionType = enumStringToValue$7(exports.RestrictionType, proto.restrictionType);
|
|
3043
|
-
}
|
|
3044
|
-
return m;
|
|
3045
|
-
};
|
|
3046
|
-
RemoveMultiUserRestrictionRequest.prototype.toApiJson = function () {
|
|
3047
|
-
var toReturn = {};
|
|
3048
|
-
if (typeof this.userIdentifiers !== 'undefined' && this.userIdentifiers !== null) {
|
|
3049
|
-
toReturn['userIdentifiers'] = 'toApiJson' in this.userIdentifiers ? this.userIdentifiers.toApiJson() : this.userIdentifiers;
|
|
3050
|
-
}
|
|
3051
|
-
if (typeof this.restrictionType !== 'undefined') {
|
|
3052
|
-
toReturn['restrictionType'] = this.restrictionType;
|
|
3053
|
-
}
|
|
3054
|
-
return toReturn;
|
|
3055
|
-
};
|
|
3056
|
-
return RemoveMultiUserRestrictionRequest;
|
|
3057
|
-
}());
|
|
3058
|
-
var ResetPasswordTokenResponse = /** @class */ (function () {
|
|
3059
|
-
function ResetPasswordTokenResponse(kwargs) {
|
|
3060
|
-
if (!kwargs) {
|
|
3061
|
-
return;
|
|
3062
|
-
}
|
|
3063
|
-
Object.assign(this, kwargs);
|
|
3064
|
-
}
|
|
3065
|
-
ResetPasswordTokenResponse.fromProto = function (proto) {
|
|
3066
|
-
var m = new ResetPasswordTokenResponse();
|
|
3067
|
-
m = Object.assign(m, proto);
|
|
3068
|
-
return m;
|
|
3069
|
-
};
|
|
3070
|
-
ResetPasswordTokenResponse.prototype.toApiJson = function () {
|
|
3071
|
-
var toReturn = {};
|
|
3072
|
-
if (typeof this.token !== 'undefined') {
|
|
3073
|
-
toReturn['token'] = this.token;
|
|
3074
|
-
}
|
|
3075
|
-
return toReturn;
|
|
3076
|
-
};
|
|
3077
|
-
return ResetPasswordTokenResponse;
|
|
3078
|
-
}());
|
|
3079
|
-
var ResetPasswordWithTokenRequest = /** @class */ (function () {
|
|
3080
|
-
function ResetPasswordWithTokenRequest(kwargs) {
|
|
3081
|
-
if (!kwargs) {
|
|
3082
|
-
return;
|
|
3083
|
-
}
|
|
3084
|
-
Object.assign(this, kwargs);
|
|
3085
|
-
}
|
|
3086
|
-
ResetPasswordWithTokenRequest.fromProto = function (proto) {
|
|
3087
|
-
var m = new ResetPasswordWithTokenRequest();
|
|
3088
|
-
m = Object.assign(m, proto);
|
|
3089
|
-
return m;
|
|
3090
|
-
};
|
|
3091
|
-
ResetPasswordWithTokenRequest.prototype.toApiJson = function () {
|
|
3092
|
-
var toReturn = {};
|
|
3093
|
-
if (typeof this.token !== 'undefined') {
|
|
3094
|
-
toReturn['token'] = this.token;
|
|
3095
|
-
}
|
|
3096
|
-
if (typeof this.password !== 'undefined') {
|
|
3097
|
-
toReturn['password'] = this.password;
|
|
3098
|
-
}
|
|
3099
|
-
return toReturn;
|
|
3100
|
-
};
|
|
3101
|
-
return ResetPasswordWithTokenRequest;
|
|
3102
|
-
}());
|
|
3103
|
-
var ResetSubjectPasswordRequest = /** @class */ (function () {
|
|
3104
|
-
function ResetSubjectPasswordRequest(kwargs) {
|
|
3105
|
-
if (!kwargs) {
|
|
3106
|
-
return;
|
|
3107
|
-
}
|
|
3108
|
-
Object.assign(this, kwargs);
|
|
3109
|
-
}
|
|
3110
|
-
ResetSubjectPasswordRequest.fromProto = function (proto) {
|
|
3111
|
-
var m = new ResetSubjectPasswordRequest();
|
|
3112
|
-
m = Object.assign(m, proto);
|
|
3113
|
-
if (proto.context) {
|
|
3114
|
-
m.context = Context.fromProto(proto.context);
|
|
3115
|
-
}
|
|
3116
|
-
return m;
|
|
3117
|
-
};
|
|
3118
|
-
ResetSubjectPasswordRequest.prototype.toApiJson = function () {
|
|
3119
|
-
var toReturn = {};
|
|
3120
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
3121
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
3122
|
-
}
|
|
3123
|
-
if (typeof this.subjectId !== 'undefined') {
|
|
3124
|
-
toReturn['subjectId'] = this.subjectId;
|
|
3125
|
-
}
|
|
3126
|
-
if (typeof this.newPassword !== 'undefined') {
|
|
3127
|
-
toReturn['newPassword'] = this.newPassword;
|
|
3128
|
-
}
|
|
3129
|
-
return toReturn;
|
|
3130
|
-
};
|
|
3131
|
-
return ResetSubjectPasswordRequest;
|
|
3132
|
-
}());
|
|
3133
|
-
var AccessResourceRequestResourceEntityIdentifierEntry = /** @class */ (function () {
|
|
3134
|
-
function AccessResourceRequestResourceEntityIdentifierEntry(kwargs) {
|
|
3135
|
-
if (!kwargs) {
|
|
3136
|
-
return;
|
|
3137
|
-
}
|
|
3138
|
-
Object.assign(this, kwargs);
|
|
3139
|
-
}
|
|
3140
|
-
AccessResourceRequestResourceEntityIdentifierEntry.fromProto = function (proto) {
|
|
3141
|
-
var m = new AccessResourceRequestResourceEntityIdentifierEntry();
|
|
3142
|
-
m = Object.assign(m, proto);
|
|
3143
|
-
if (proto.value) {
|
|
3144
|
-
m.value = ValueList.fromProto(proto.value);
|
|
3145
|
-
}
|
|
3146
|
-
return m;
|
|
3147
|
-
};
|
|
3148
|
-
AccessResourceRequestResourceEntityIdentifierEntry.prototype.toApiJson = function () {
|
|
3149
|
-
var toReturn = {};
|
|
3150
|
-
if (typeof this.key !== 'undefined') {
|
|
3151
|
-
toReturn['key'] = this.key;
|
|
3152
|
-
}
|
|
3153
|
-
if (typeof this.value !== 'undefined' && this.value !== null) {
|
|
3154
|
-
toReturn['value'] = 'toApiJson' in this.value ? this.value.toApiJson() : this.value;
|
|
3155
|
-
}
|
|
3156
|
-
return toReturn;
|
|
3157
|
-
};
|
|
3158
|
-
return AccessResourceRequestResourceEntityIdentifierEntry;
|
|
3159
|
-
}());
|
|
3160
|
-
var SearchSubjectRequest = /** @class */ (function () {
|
|
3161
|
-
function SearchSubjectRequest(kwargs) {
|
|
3162
|
-
if (!kwargs) {
|
|
3163
|
-
return;
|
|
3164
|
-
}
|
|
3165
|
-
Object.assign(this, kwargs);
|
|
3166
|
-
}
|
|
3167
|
-
SearchSubjectRequest.fromProto = function (proto) {
|
|
3168
|
-
var m = new SearchSubjectRequest();
|
|
3169
|
-
m = Object.assign(m, proto);
|
|
3170
|
-
if (proto.context) {
|
|
3171
|
-
m.context = Context.fromProto(proto.context);
|
|
3172
|
-
}
|
|
3173
|
-
if (proto.query) {
|
|
3174
|
-
m.query = Query.fromProto(proto.query);
|
|
3175
|
-
}
|
|
3176
|
-
if (proto.filters) {
|
|
3177
|
-
m.filters = proto.filters.map(SingleValueAttribute.fromProto);
|
|
3178
|
-
}
|
|
3179
|
-
if (proto.orderByDirection) {
|
|
3180
|
-
m.orderByDirection = enumStringToValue$7(exports.OrderByDirection, proto.orderByDirection);
|
|
3181
|
-
}
|
|
3182
|
-
if (proto.pageSize) {
|
|
3183
|
-
m.pageSize = parseInt(proto.pageSize, 10);
|
|
3184
|
-
}
|
|
3185
|
-
if (proto.fieldMask) {
|
|
3186
|
-
m.fieldMask = FieldMask.fromProto(proto.fieldMask);
|
|
3187
|
-
}
|
|
3188
|
-
return m;
|
|
3189
|
-
};
|
|
3190
|
-
SearchSubjectRequest.prototype.toApiJson = function () {
|
|
3191
|
-
var toReturn = {};
|
|
3192
|
-
if (typeof this.context !== 'undefined' && this.context !== null) {
|
|
3193
|
-
toReturn['context'] = 'toApiJson' in this.context ? this.context.toApiJson() : this.context;
|
|
3194
|
-
}
|
|
3195
|
-
if (typeof this.query !== 'undefined' && this.query !== null) {
|
|
3196
|
-
toReturn['query'] = 'toApiJson' in this.query ? this.query.toApiJson() : this.query;
|
|
3197
|
-
}
|
|
3198
|
-
if (typeof this.filters !== 'undefined' && this.filters !== null) {
|
|
3199
|
-
toReturn['filters'] = 'toApiJson' in this.filters ? this.filters.toApiJson() : this.filters;
|
|
3200
|
-
}
|
|
3201
|
-
if (typeof this.orderBy !== 'undefined') {
|
|
3202
|
-
toReturn['orderBy'] = this.orderBy;
|
|
3203
|
-
}
|
|
3204
|
-
if (typeof this.orderByDirection !== 'undefined') {
|
|
3205
|
-
toReturn['orderByDirection'] = this.orderByDirection;
|
|
3206
|
-
}
|
|
3207
|
-
if (typeof this.cursor !== 'undefined') {
|
|
3208
|
-
toReturn['cursor'] = this.cursor;
|
|
3209
|
-
}
|
|
3210
|
-
if (typeof this.pageSize !== 'undefined') {
|
|
3211
|
-
toReturn['pageSize'] = this.pageSize;
|
|
3212
|
-
}
|
|
3213
|
-
if (typeof this.fieldMask !== 'undefined' && this.fieldMask !== null) {
|
|
3214
|
-
toReturn['fieldMask'] = 'toApiJson' in this.fieldMask ? this.fieldMask.toApiJson() : this.fieldMask;
|
|
3215
|
-
}
|
|
3216
|
-
return toReturn;
|
|
3217
|
-
};
|
|
3218
|
-
return SearchSubjectRequest;
|
|
3219
|
-
}());
|
|
3220
|
-
var SearchSubjectResponse = /** @class */ (function () {
|
|
3221
|
-
function SearchSubjectResponse(kwargs) {
|
|
3222
|
-
if (!kwargs) {
|
|
3223
|
-
return;
|
|
3224
|
-
}
|
|
3225
|
-
Object.assign(this, kwargs);
|
|
3226
|
-
}
|
|
3227
|
-
SearchSubjectResponse.fromProto = function (proto) {
|
|
3228
|
-
var m = new SearchSubjectResponse();
|
|
3229
|
-
m = Object.assign(m, proto);
|
|
3230
|
-
if (proto.result) {
|
|
3231
|
-
m.result = proto.result.map(SubjectResult.fromProto);
|
|
3232
|
-
}
|
|
3233
|
-
if (proto.totalResults) {
|
|
3234
|
-
m.totalResults = parseInt(proto.totalResults, 10);
|
|
3235
|
-
}
|
|
3236
|
-
return m;
|
|
3237
|
-
};
|
|
3238
|
-
SearchSubjectResponse.prototype.toApiJson = function () {
|
|
3239
|
-
var toReturn = {};
|
|
3240
|
-
if (typeof this.result !== 'undefined' && this.result !== null) {
|
|
3241
|
-
toReturn['result'] = 'toApiJson' in this.result ? this.result.toApiJson() : this.result;
|
|
3242
|
-
}
|
|
3243
|
-
if (typeof this.nextCursor !== 'undefined') {
|
|
3244
|
-
toReturn['nextCursor'] = this.nextCursor;
|
|
3245
|
-
}
|
|
3246
|
-
if (typeof this.hasMore !== 'undefined') {
|
|
3247
|
-
toReturn['hasMore'] = this.hasMore;
|
|
3248
|
-
}
|
|
3249
|
-
if (typeof this.totalResults !== 'undefined') {
|
|
3250
|
-
toReturn['totalResults'] = this.totalResults;
|
|
3251
|
-
}
|
|
3252
|
-
return toReturn;
|
|
3253
|
-
};
|
|
3254
|
-
return SearchSubjectResponse;
|
|
3255
|
-
}());
|
|
3256
|
-
var SendEmailVerificationRequest = /** @class */ (function () {
|
|
3257
|
-
function SendEmailVerificationRequest(kwargs) {
|
|
3258
|
-
if (!kwargs) {
|
|
3259
|
-
return;
|
|
3260
|
-
}
|
|
3261
|
-
Object.assign(this, kwargs);
|
|
3262
|
-
}
|
|
3263
|
-
SendEmailVerificationRequest.fromProto = function (proto) {
|
|
3264
|
-
var m = new SendEmailVerificationRequest();
|
|
3265
|
-
m = Object.assign(m, proto);
|
|
3266
|
-
return m;
|
|
3267
|
-
};
|
|
3268
|
-
SendEmailVerificationRequest.prototype.toApiJson = function () {
|
|
3269
|
-
var toReturn = {};
|
|
3270
|
-
if (typeof this.userId !== 'undefined') {
|
|
3271
|
-
toReturn['userId'] = this.userId;
|
|
3272
|
-
}
|
|
3273
|
-
return toReturn;
|
|
3274
|
-
};
|
|
3275
|
-
return SendEmailVerificationRequest;
|
|
3276
|
-
}());
|
|
3277
|
-
var SubjectCredentials = /** @class */ (function () {
|
|
3278
|
-
function SubjectCredentials(kwargs) {
|
|
3279
|
-
if (!kwargs) {
|
|
3280
|
-
return;
|
|
3281
|
-
}
|
|
3282
|
-
Object.assign(this, kwargs);
|
|
3283
|
-
}
|
|
3284
|
-
SubjectCredentials.fromProto = function (proto) {
|
|
3285
|
-
var m = new SubjectCredentials();
|
|
3286
|
-
m = Object.assign(m, proto);
|
|
3287
|
-
return m;
|
|
3288
|
-
};
|
|
3289
|
-
SubjectCredentials.prototype.toApiJson = function () {
|
|
3290
|
-
var toReturn = {};
|
|
3291
|
-
if (typeof this.email !== 'undefined') {
|
|
3292
|
-
toReturn['email'] = this.email;
|
|
3293
|
-
}
|
|
3294
|
-
if (typeof this.password !== 'undefined') {
|
|
3295
|
-
toReturn['password'] = this.password;
|
|
3296
|
-
}
|
|
3297
|
-
return toReturn;
|
|
3298
|
-
};
|
|
3299
|
-
return SubjectCredentials;
|
|
3300
|
-
}());
|
|
3301
|
-
var UpdateUserRequest = /** @class */ (function () {
|
|
3302
|
-
function UpdateUserRequest(kwargs) {
|
|
3303
|
-
if (!kwargs) {
|
|
3304
|
-
return;
|
|
3305
|
-
}
|
|
3306
|
-
Object.assign(this, kwargs);
|
|
3307
|
-
}
|
|
3308
|
-
UpdateUserRequest.fromProto = function (proto) {
|
|
3309
|
-
var m = new UpdateUserRequest();
|
|
3310
|
-
m = Object.assign(m, proto);
|
|
3311
|
-
if (proto.operations) {
|
|
3312
|
-
m.operations = proto.operations.map(UpdateUserRequestOperation.fromProto);
|
|
3313
|
-
}
|
|
3314
|
-
return m;
|
|
3315
|
-
};
|
|
3316
|
-
UpdateUserRequest.prototype.toApiJson = function () {
|
|
3317
|
-
var toReturn = {};
|
|
3318
|
-
if (typeof this.userId !== 'undefined') {
|
|
3319
|
-
toReturn['userId'] = this.userId;
|
|
3320
|
-
}
|
|
3321
|
-
if (typeof this.operations !== 'undefined' && this.operations !== null) {
|
|
3322
|
-
toReturn['operations'] = 'toApiJson' in this.operations ? this.operations.toApiJson() : this.operations;
|
|
3323
|
-
}
|
|
3324
|
-
return toReturn;
|
|
3325
|
-
};
|
|
3326
|
-
return UpdateUserRequest;
|
|
3327
|
-
}());
|
|
3328
|
-
var GetMultiUsersResponseUserContainer = /** @class */ (function () {
|
|
3329
|
-
function GetMultiUsersResponseUserContainer(kwargs) {
|
|
3330
|
-
if (!kwargs) {
|
|
3331
|
-
return;
|
|
3332
|
-
}
|
|
3333
|
-
Object.assign(this, kwargs);
|
|
3334
|
-
}
|
|
3335
|
-
GetMultiUsersResponseUserContainer.fromProto = function (proto) {
|
|
3336
|
-
var m = new GetMultiUsersResponseUserContainer();
|
|
3337
|
-
m = Object.assign(m, proto);
|
|
3338
|
-
if (proto.user) {
|
|
3339
|
-
m.user = User.fromProto(proto.user);
|
|
3340
|
-
}
|
|
3341
|
-
return m;
|
|
3342
|
-
};
|
|
3343
|
-
GetMultiUsersResponseUserContainer.prototype.toApiJson = function () {
|
|
3344
|
-
var toReturn = {};
|
|
3345
|
-
if (typeof this.user !== 'undefined' && this.user !== null) {
|
|
3346
|
-
toReturn['user'] = 'toApiJson' in this.user ? this.user.toApiJson() : this.user;
|
|
3347
|
-
}
|
|
3348
|
-
return toReturn;
|
|
3349
|
-
};
|
|
3350
|
-
return GetMultiUsersResponseUserContainer;
|
|
3351
|
-
}());
|
|
3352
|
-
var UserFilter = /** @class */ (function () {
|
|
3353
|
-
function UserFilter(kwargs) {
|
|
3354
|
-
if (!kwargs) {
|
|
3355
|
-
return;
|
|
3356
|
-
}
|
|
3357
|
-
Object.assign(this, kwargs);
|
|
3358
|
-
}
|
|
3359
|
-
UserFilter.fromProto = function (proto) {
|
|
3360
|
-
var m = new UserFilter();
|
|
3361
|
-
m = Object.assign(m, proto);
|
|
3362
|
-
return m;
|
|
3363
|
-
};
|
|
3364
|
-
UserFilter.prototype.toApiJson = function () {
|
|
3365
|
-
var toReturn = {};
|
|
3366
|
-
if (typeof this.subjectTypes !== 'undefined') {
|
|
3367
|
-
toReturn['subjectTypes'] = this.subjectTypes;
|
|
3368
|
-
}
|
|
3369
|
-
if (typeof this.searchTerms !== 'undefined') {
|
|
3370
|
-
toReturn['searchTerms'] = this.searchTerms;
|
|
3371
|
-
}
|
|
3372
|
-
return toReturn;
|
|
3373
|
-
};
|
|
3374
|
-
return UserFilter;
|
|
3375
|
-
}());
|
|
3376
|
-
var UserIdentifier = /** @class */ (function () {
|
|
3377
|
-
function UserIdentifier(kwargs) {
|
|
3378
|
-
if (!kwargs) {
|
|
3379
|
-
return;
|
|
3380
|
-
}
|
|
3381
|
-
Object.assign(this, kwargs);
|
|
3382
|
-
}
|
|
3383
|
-
UserIdentifier.fromProto = function (proto) {
|
|
3384
|
-
var m = new UserIdentifier();
|
|
3385
|
-
m = Object.assign(m, proto);
|
|
3386
|
-
if (proto.namespacedEmail) {
|
|
3387
|
-
m.namespacedEmail = NamespacedEmail.fromProto(proto.namespacedEmail);
|
|
3388
|
-
}
|
|
3389
|
-
if (proto.namespacedSession) {
|
|
3390
|
-
m.namespacedSession = NamespacedSession.fromProto(proto.namespacedSession);
|
|
3391
|
-
}
|
|
3392
|
-
if (proto.typedExternalIdentifier) {
|
|
3393
|
-
m.typedExternalIdentifier = TypedExternalIdentifier.fromProto(proto.typedExternalIdentifier);
|
|
3394
|
-
}
|
|
3395
|
-
return m;
|
|
3396
|
-
};
|
|
3397
|
-
UserIdentifier.prototype.toApiJson = function () {
|
|
3398
|
-
var toReturn = {};
|
|
3399
|
-
if (typeof this.userId !== 'undefined') {
|
|
3400
|
-
toReturn['userId'] = this.userId;
|
|
3401
|
-
}
|
|
3402
|
-
if (typeof this.namespacedEmail !== 'undefined' && this.namespacedEmail !== null) {
|
|
3403
|
-
toReturn['namespacedEmail'] = 'toApiJson' in this.namespacedEmail ? this.namespacedEmail.toApiJson() : this.namespacedEmail;
|
|
3404
|
-
}
|
|
3405
|
-
if (typeof this.namespacedSession !== 'undefined' && this.namespacedSession !== null) {
|
|
3406
|
-
toReturn['namespacedSession'] = 'toApiJson' in this.namespacedSession ? this.namespacedSession.toApiJson() : this.namespacedSession;
|
|
3407
|
-
}
|
|
3408
|
-
if (typeof this.token !== 'undefined') {
|
|
3409
|
-
toReturn['token'] = this.token;
|
|
3410
|
-
}
|
|
3411
|
-
if (typeof this.typedExternalIdentifier !== 'undefined' && this.typedExternalIdentifier !== null) {
|
|
3412
|
-
toReturn['typedExternalIdentifier'] = 'toApiJson' in this.typedExternalIdentifier ? this.typedExternalIdentifier.toApiJson() : this.typedExternalIdentifier;
|
|
3413
|
-
}
|
|
3414
|
-
if (typeof this.subjectId !== 'undefined') {
|
|
3415
|
-
toReturn['subjectId'] = this.subjectId;
|
|
3416
|
-
}
|
|
3417
|
-
return toReturn;
|
|
3418
|
-
};
|
|
3419
|
-
return UserIdentifier;
|
|
3420
|
-
}());
|
|
3421
|
-
var UserSortOptions = /** @class */ (function () {
|
|
3422
|
-
function UserSortOptions(kwargs) {
|
|
3423
|
-
if (!kwargs) {
|
|
3424
|
-
return;
|
|
3425
|
-
}
|
|
3426
|
-
Object.assign(this, kwargs);
|
|
3427
|
-
}
|
|
3428
|
-
UserSortOptions.fromProto = function (proto) {
|
|
3429
|
-
var m = new UserSortOptions();
|
|
3430
|
-
m = Object.assign(m, proto);
|
|
3431
|
-
if (proto.direction) {
|
|
3432
|
-
m.direction = enumStringToValue$7(exports.SortDirection, proto.direction);
|
|
3433
|
-
}
|
|
3434
|
-
if (proto.field) {
|
|
3435
|
-
m.field = enumStringToValue$7(exports.UserSortField, proto.field);
|
|
3436
|
-
}
|
|
3437
|
-
return m;
|
|
3438
|
-
};
|
|
3439
|
-
UserSortOptions.prototype.toApiJson = function () {
|
|
3440
|
-
var toReturn = {};
|
|
3441
|
-
if (typeof this.direction !== 'undefined') {
|
|
3442
|
-
toReturn['direction'] = this.direction;
|
|
3443
|
-
}
|
|
3444
|
-
if (typeof this.field !== 'undefined') {
|
|
3445
|
-
toReturn['field'] = this.field;
|
|
3446
|
-
}
|
|
3447
|
-
return toReturn;
|
|
3448
|
-
};
|
|
3449
|
-
return UserSortOptions;
|
|
3450
|
-
}());
|
|
3451
|
-
var VerifyEmailRequest = /** @class */ (function () {
|
|
3452
|
-
function VerifyEmailRequest(kwargs) {
|
|
3453
|
-
if (!kwargs) {
|
|
3454
|
-
return;
|
|
3455
|
-
}
|
|
3456
|
-
Object.assign(this, kwargs);
|
|
3457
|
-
}
|
|
3458
|
-
VerifyEmailRequest.fromProto = function (proto) {
|
|
3459
|
-
var m = new VerifyEmailRequest();
|
|
3460
|
-
m = Object.assign(m, proto);
|
|
3461
|
-
return m;
|
|
3462
|
-
};
|
|
3463
|
-
VerifyEmailRequest.prototype.toApiJson = function () {
|
|
3464
|
-
var toReturn = {};
|
|
3465
|
-
if (typeof this.token !== 'undefined') {
|
|
3466
|
-
toReturn['token'] = this.token;
|
|
3467
|
-
}
|
|
3468
|
-
return toReturn;
|
|
3469
|
-
};
|
|
3470
|
-
return VerifyEmailRequest;
|
|
3471
|
-
}());
|
|
3472
|
-
|
|
3473
|
-
(function (PersonaType) {
|
|
3474
|
-
PersonaType["partner"] = "partner";
|
|
3475
|
-
PersonaType["partner_app"] = "partner_app";
|
|
3476
|
-
PersonaType["sales_person"] = "sales_person";
|
|
3477
|
-
PersonaType["smb"] = "smb";
|
|
3478
|
-
PersonaType["vendor"] = "vendor";
|
|
3479
|
-
PersonaType["digital_agent"] = "digital_agent";
|
|
3480
|
-
PersonaType["developer"] = "developer";
|
|
3481
|
-
PersonaType["success"] = "success";
|
|
3482
|
-
PersonaType["account_group"] = "account_group";
|
|
3483
|
-
})(exports.PersonaType || (exports.PersonaType = {}));
|
|
3484
|
-
|
|
3485
|
-
var BasePersona = /** @class */ (function () {
|
|
3486
|
-
function BasePersona() {
|
|
3487
|
-
}
|
|
3488
|
-
BasePersona.prototype.fromPersona = function (p) {
|
|
3489
|
-
var s = p.subject;
|
|
3490
|
-
this.subjectId = s.subjectId;
|
|
3491
|
-
this.email = s.email;
|
|
3492
|
-
this.created = s.created;
|
|
3493
|
-
this.updated = s.updated;
|
|
3494
|
-
this.lastLogin = s.lastLogin;
|
|
3495
|
-
this.userId = s.userId;
|
|
3496
|
-
return this.readAttributes(s.structAttributes);
|
|
3497
|
-
};
|
|
3498
|
-
BasePersona.prototype.readAttributes = function (attributes) {
|
|
3499
|
-
if (!attributes) {
|
|
3500
|
-
return this;
|
|
3501
|
-
}
|
|
3502
|
-
var attrs = getValueFromAttribute({ structAttribute: { attributes: attributes.attributes } });
|
|
3503
|
-
Object.assign(this, attrs);
|
|
3504
|
-
return this;
|
|
3505
|
-
};
|
|
3506
|
-
return BasePersona;
|
|
3507
|
-
}());
|
|
3508
|
-
var TypedPersona = /** @class */ (function (_super) {
|
|
3509
|
-
__extends(TypedPersona, _super);
|
|
3510
|
-
function TypedPersona() {
|
|
3511
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
3512
|
-
}
|
|
3513
|
-
return TypedPersona;
|
|
3514
|
-
}(BasePersona));
|
|
3515
|
-
var NamespacedPersona = /** @class */ (function (_super) {
|
|
3516
|
-
__extends(NamespacedPersona, _super);
|
|
3517
|
-
function NamespacedPersona() {
|
|
3518
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
3519
|
-
_this.partnerId = '';
|
|
3520
|
-
return _this;
|
|
3521
|
-
}
|
|
3522
|
-
NamespacedPersona.prototype.fromPersona = function (p) {
|
|
3523
|
-
this.partnerId = p.context.namespaced.namespace;
|
|
3524
|
-
return _super.prototype.fromPersona.call(this, p);
|
|
3525
|
-
};
|
|
3526
|
-
return NamespacedPersona;
|
|
3527
|
-
}(BasePersona));
|
|
3528
|
-
function getValueFromAttribute(attr) {
|
|
3529
|
-
var e_1, _a;
|
|
3530
|
-
if (typeof attr === 'undefined') {
|
|
3531
|
-
return null;
|
|
3532
|
-
}
|
|
3533
|
-
else if (typeof attr.stringAttribute !== 'undefined') {
|
|
3534
|
-
return attr.stringAttribute;
|
|
3535
|
-
}
|
|
3536
|
-
else if (typeof attr.intAttribute !== 'undefined') {
|
|
3537
|
-
return attr.intAttribute;
|
|
3538
|
-
}
|
|
3539
|
-
else if (typeof attr.doubleAttribute !== 'undefined') {
|
|
3540
|
-
return attr.doubleAttribute;
|
|
3541
|
-
}
|
|
3542
|
-
else if (typeof attr.boolAttribute !== 'undefined') {
|
|
3543
|
-
return attr.boolAttribute;
|
|
3544
|
-
}
|
|
3545
|
-
else if (typeof attr.listAttribute !== 'undefined') {
|
|
3546
|
-
var vals = [];
|
|
3547
|
-
if (typeof attr.listAttribute.attributes === 'undefined') {
|
|
3548
|
-
return vals;
|
|
3549
|
-
}
|
|
3550
|
-
try {
|
|
3551
|
-
for (var _b = __values(attr.listAttribute.attributes), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
3552
|
-
var val = _c.value;
|
|
3553
|
-
vals.push(getValueFromAttribute(val));
|
|
3554
|
-
}
|
|
3555
|
-
}
|
|
3556
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3557
|
-
finally {
|
|
3558
|
-
try {
|
|
3559
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
3560
|
-
}
|
|
3561
|
-
finally { if (e_1) throw e_1.error; }
|
|
3562
|
-
}
|
|
3563
|
-
return vals;
|
|
3564
|
-
}
|
|
3565
|
-
else if (typeof attr.timestampAttribute !== 'undefined') {
|
|
3566
|
-
return attr.timestampAttribute;
|
|
3567
|
-
}
|
|
3568
|
-
else if (typeof attr.geopointAttribute !== 'undefined') {
|
|
3569
|
-
return attr.geopointAttribute;
|
|
3570
|
-
}
|
|
3571
|
-
else if (typeof attr.structAttribute !== 'undefined') {
|
|
3572
|
-
var result = {};
|
|
3573
|
-
for (var a in attr.structAttribute.attributes) {
|
|
3574
|
-
if (!attr.structAttribute.attributes.hasOwnProperty(a)) {
|
|
3575
|
-
continue;
|
|
3576
|
-
}
|
|
3577
|
-
result[CamelCase(a)] = getValueFromAttribute(attr.structAttribute.attributes[a]);
|
|
3578
|
-
}
|
|
3579
|
-
return result;
|
|
3580
|
-
}
|
|
3581
|
-
}
|
|
3582
|
-
function CamelCase(str) {
|
|
3583
|
-
var result = '';
|
|
3584
|
-
for (var i = 0; i < str.length; i++) {
|
|
3585
|
-
if (str[i] === '_') {
|
|
3586
|
-
result += str[i + 1].toUpperCase();
|
|
3587
|
-
i++;
|
|
3588
|
-
}
|
|
3589
|
-
else {
|
|
3590
|
-
result += str[i];
|
|
3591
|
-
}
|
|
3592
|
-
}
|
|
3593
|
-
return result;
|
|
3594
|
-
}
|
|
3595
|
-
|
|
3596
|
-
var DeveloperPersona = /** @class */ (function (_super) {
|
|
3597
|
-
__extends(DeveloperPersona, _super);
|
|
3598
|
-
function DeveloperPersona() {
|
|
3599
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
3600
|
-
_this.type = exports.PersonaType.developer;
|
|
3601
|
-
return _this;
|
|
3602
|
-
}
|
|
3603
|
-
return DeveloperPersona;
|
|
3604
|
-
}(TypedPersona));
|
|
3605
|
-
|
|
3606
|
-
var PartnerPersona = /** @class */ (function (_super) {
|
|
3607
|
-
__extends(PartnerPersona, _super);
|
|
3608
|
-
function PartnerPersona() {
|
|
3609
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
3610
|
-
_this.type = exports.PersonaType.partner;
|
|
3611
|
-
_this.isSuperAdmin = false;
|
|
3612
|
-
_this.isAdmin = false;
|
|
3613
|
-
_this.canCustomizeWhitelabel = false;
|
|
3614
|
-
_this.canAccessBilling = false;
|
|
3615
|
-
_this.canAccessAccounts = false;
|
|
3616
|
-
_this.canAccessMarketing = false;
|
|
3617
|
-
_this.canAccessSales = false;
|
|
3618
|
-
_this.canAccessConcierge = false;
|
|
3619
|
-
_this.canAccessBrands = false;
|
|
3620
|
-
_this.canAccessDashboard = false;
|
|
3621
|
-
_this.canAccessOrders = false;
|
|
3622
|
-
_this.canAccessCompanyProfile = false;
|
|
3623
|
-
_this.canAccessAutomations = false;
|
|
3624
|
-
_this.canAccessMarketplace = false;
|
|
3625
|
-
_this.canEnableApps = false;
|
|
3626
|
-
_this.canAccessRetailBilling = false;
|
|
3627
|
-
return _this;
|
|
3628
|
-
}
|
|
3629
|
-
return PartnerPersona;
|
|
3630
|
-
}(TypedPersona));
|
|
3631
|
-
|
|
3632
|
-
var PartnerAppPersona = /** @class */ (function (_super) {
|
|
3633
|
-
__extends(PartnerAppPersona, _super);
|
|
3634
|
-
function PartnerAppPersona() {
|
|
3635
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
3636
|
-
_this.type = exports.PersonaType.partner_app;
|
|
3637
|
-
return _this;
|
|
3638
|
-
}
|
|
3639
|
-
return PartnerAppPersona;
|
|
3640
|
-
}(NamespacedPersona));
|
|
3641
|
-
|
|
3642
|
-
var TitleChoice = {
|
|
3643
|
-
PARTNER_FOR_SMB: 'partnerForSmb',
|
|
3644
|
-
REP_MAN_FOR_SMB: 'repManForSmb',
|
|
3645
|
-
MARKET_FOR_SMB: 'marketForSmb'
|
|
3646
|
-
};
|
|
3647
|
-
var SalespersonPersona = /** @class */ (function (_super) {
|
|
3648
|
-
__extends(SalespersonPersona, _super);
|
|
3649
|
-
function SalespersonPersona() {
|
|
3650
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
3651
|
-
_this.type = exports.PersonaType.sales_person;
|
|
3652
|
-
_this.titleChoice = TitleChoice.PARTNER_FOR_SMB;
|
|
3653
|
-
return _this;
|
|
3654
|
-
}
|
|
3655
|
-
return SalespersonPersona;
|
|
3656
|
-
}(NamespacedPersona));
|
|
3657
|
-
|
|
3658
|
-
var SMBPersona = /** @class */ (function (_super) {
|
|
3659
|
-
__extends(SMBPersona, _super);
|
|
3660
|
-
function SMBPersona() {
|
|
3661
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
3662
|
-
_this.type = exports.PersonaType.smb;
|
|
3663
|
-
_this.notificationsEnabled = true;
|
|
3664
|
-
return _this;
|
|
3665
|
-
}
|
|
3666
|
-
return SMBPersona;
|
|
3667
|
-
}(NamespacedPersona));
|
|
3668
|
-
|
|
3669
|
-
var VendorPersona = /** @class */ (function (_super) {
|
|
3670
|
-
__extends(VendorPersona, _super);
|
|
3671
|
-
function VendorPersona() {
|
|
3672
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
3673
|
-
_this.type = exports.PersonaType.vendor;
|
|
3674
|
-
return _this;
|
|
3675
|
-
}
|
|
3676
|
-
return VendorPersona;
|
|
3677
|
-
}(TypedPersona));
|
|
3678
|
-
|
|
3679
|
-
var DigitalAgentPersona = /** @class */ (function (_super) {
|
|
3680
|
-
__extends(DigitalAgentPersona, _super);
|
|
3681
|
-
function DigitalAgentPersona() {
|
|
3682
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
3683
|
-
_this.type = exports.PersonaType.digital_agent;
|
|
3684
|
-
return _this;
|
|
3685
|
-
}
|
|
3686
|
-
return DigitalAgentPersona;
|
|
3687
|
-
}(TypedPersona));
|
|
3688
|
-
|
|
3689
|
-
var SuccessPersona = /** @class */ (function (_super) {
|
|
3690
|
-
__extends(SuccessPersona, _super);
|
|
3691
|
-
function SuccessPersona() {
|
|
3692
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
3693
|
-
_this.type = exports.PersonaType.success;
|
|
3694
|
-
return _this;
|
|
3695
|
-
}
|
|
3696
|
-
return SuccessPersona;
|
|
3697
|
-
}(TypedPersona));
|
|
3698
|
-
|
|
3699
|
-
var AccountGroupPersona = /** @class */ (function (_super) {
|
|
3700
|
-
__extends(AccountGroupPersona, _super);
|
|
3701
|
-
function AccountGroupPersona() {
|
|
3702
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
3703
|
-
_this.type = exports.PersonaType.account_group;
|
|
3704
|
-
return _this;
|
|
3705
|
-
}
|
|
3706
|
-
return AccountGroupPersona;
|
|
3707
|
-
}(TypedPersona));
|
|
3708
|
-
|
|
3709
|
-
function fromPersona(persona) {
|
|
3710
|
-
var type = getTypeFromContext(persona.context);
|
|
3711
|
-
if (type === null) {
|
|
3712
|
-
return null;
|
|
3713
|
-
}
|
|
3714
|
-
var personaCls = getPersonaFromType(type);
|
|
3715
|
-
personaCls.fromPersona(persona);
|
|
3716
|
-
return personaCls;
|
|
3717
|
-
}
|
|
3718
|
-
function getTypeFromContext(ctx) {
|
|
3719
|
-
var type = (!!ctx.namespaced) ? ctx.namespaced.type : ctx.typed.type;
|
|
3720
|
-
switch (type) {
|
|
3721
|
-
case 'partner':
|
|
3722
|
-
return exports.PersonaType.partner;
|
|
3723
|
-
case 'partner_app':
|
|
3724
|
-
return exports.PersonaType.partner_app;
|
|
3725
|
-
case 'sales_person':
|
|
3726
|
-
return exports.PersonaType.sales_person;
|
|
3727
|
-
case 'smb':
|
|
3728
|
-
return exports.PersonaType.smb;
|
|
3729
|
-
case 'vendor':
|
|
3730
|
-
return exports.PersonaType.vendor;
|
|
3731
|
-
case 'digital_agent':
|
|
3732
|
-
return exports.PersonaType.digital_agent;
|
|
3733
|
-
case 'developer':
|
|
3734
|
-
return exports.PersonaType.developer;
|
|
3735
|
-
case 'success':
|
|
3736
|
-
return exports.PersonaType.success;
|
|
3737
|
-
case 'account_group':
|
|
3738
|
-
return exports.PersonaType.account_group;
|
|
3739
|
-
}
|
|
3740
|
-
return null;
|
|
3741
|
-
}
|
|
3742
|
-
function getPersonaFromType(personaType) {
|
|
3743
|
-
return new {
|
|
3744
|
-
'partner': PartnerPersona,
|
|
3745
|
-
'partner_app': PartnerAppPersona,
|
|
3746
|
-
'sales_person': SalespersonPersona,
|
|
3747
|
-
'smb': SMBPersona,
|
|
3748
|
-
'vendor': VendorPersona,
|
|
3749
|
-
'digital_agent': DigitalAgentPersona,
|
|
3750
|
-
'developer': DeveloperPersona,
|
|
3751
|
-
'success': SuccessPersona,
|
|
3752
|
-
'account_group': AccountGroupPersona
|
|
3753
|
-
}[personaType]();
|
|
3754
|
-
}
|
|
3755
|
-
|
|
3756
|
-
function enumStringToValue$8(enumRef, value) {
|
|
3757
|
-
if (typeof value === 'number') {
|
|
3758
|
-
return value;
|
|
3759
|
-
}
|
|
3760
|
-
return enumRef[value];
|
|
3761
|
-
}
|
|
3762
|
-
var Access = /** @class */ (function () {
|
|
3763
|
-
function Access(kwargs) {
|
|
3764
|
-
if (!kwargs) {
|
|
3765
|
-
return;
|
|
3766
|
-
}
|
|
3767
|
-
Object.assign(this, kwargs);
|
|
3768
|
-
}
|
|
3769
|
-
Access.fromProto = function (proto) {
|
|
3770
|
-
var m = new Access();
|
|
3771
|
-
m = Object.assign(m, proto);
|
|
3772
|
-
return m;
|
|
3773
|
-
};
|
|
3774
|
-
Access.prototype.toApiJson = function () {
|
|
3775
|
-
var toReturn = {};
|
|
3776
|
-
if (typeof this.scope !== 'undefined') {
|
|
3777
|
-
toReturn['scope'] = this.scope;
|
|
3778
|
-
}
|
|
3779
|
-
if (typeof this.public !== 'undefined') {
|
|
3780
|
-
toReturn['public'] = this.public;
|
|
3781
|
-
}
|
|
3782
|
-
return toReturn;
|
|
3783
|
-
};
|
|
3784
|
-
return Access;
|
|
3785
|
-
}());
|
|
3786
|
-
|
|
3787
|
-
// *********************************
|
|
3788
|
-
|
|
3789
|
-
var HostService = /** @class */ (function () {
|
|
3790
|
-
function HostService(environmentService) {
|
|
3791
|
-
this.environmentService = environmentService;
|
|
3792
|
-
}
|
|
3793
|
-
HostService.prototype.host = function () {
|
|
3794
|
-
if (this._host) {
|
|
3795
|
-
return this._host;
|
|
3796
|
-
}
|
|
3797
|
-
switch (this.environmentService.getEnvironment()) {
|
|
3798
|
-
case i1.Environment.LOCAL:
|
|
3799
|
-
this._host = 'iam.vendasta-local.com';
|
|
3800
|
-
break;
|
|
3801
|
-
case i1.Environment.TEST:
|
|
3802
|
-
this._host = '';
|
|
3803
|
-
break;
|
|
3804
|
-
case i1.Environment.DEMO:
|
|
3805
|
-
this._host = 'iam-api-demo.apigateway.co';
|
|
3806
|
-
break;
|
|
3807
|
-
case i1.Environment.PROD:
|
|
3808
|
-
this._host = 'iam-api-prod.apigateway.co';
|
|
3809
|
-
break;
|
|
3810
|
-
}
|
|
3811
|
-
return this._host;
|
|
3812
|
-
};
|
|
3813
|
-
HostService.prototype.httpsHost = function () {
|
|
3814
|
-
if (this._httpsHost) {
|
|
3815
|
-
return this._httpsHost;
|
|
3816
|
-
}
|
|
3817
|
-
switch (this.environmentService.getEnvironment()) {
|
|
3818
|
-
case i1.Environment.LOCAL:
|
|
3819
|
-
this._httpsHost = 'iam.vendasta-local.com';
|
|
3820
|
-
break;
|
|
3821
|
-
case i1.Environment.TEST:
|
|
3822
|
-
this._httpsHost = '';
|
|
3823
|
-
break;
|
|
3824
|
-
case i1.Environment.DEMO:
|
|
3825
|
-
this._httpsHost = 'iam-demo.apigateway.co';
|
|
3826
|
-
break;
|
|
3827
|
-
case i1.Environment.PROD:
|
|
3828
|
-
this._httpsHost = 'iam-prod.apigateway.co';
|
|
3829
|
-
break;
|
|
3830
|
-
}
|
|
3831
|
-
return this._httpsHost;
|
|
3832
|
-
};
|
|
3833
|
-
HostService.prototype.hostWithScheme = function () {
|
|
3834
|
-
var scheme = this.environmentService.getEnvironment() === i1.Environment.LOCAL ? 'http://' : 'https://';
|
|
3835
|
-
return scheme + this.host();
|
|
3836
|
-
};
|
|
3837
|
-
HostService.prototype.httpsHostWithScheme = function () {
|
|
3838
|
-
var scheme = this.environmentService.getEnvironment() === i1.Environment.LOCAL ? 'http://' : 'https://';
|
|
3839
|
-
return scheme + this.httpsHost();
|
|
3840
|
-
};
|
|
3841
|
-
return HostService;
|
|
3842
|
-
}());
|
|
3843
|
-
HostService.ɵfac = function HostService_Factory(t) { return new (t || HostService)(i0.ɵɵinject(i1.EnvironmentService)); };
|
|
3844
|
-
HostService.ɵprov = i0.ɵɵdefineInjectable({ token: HostService, factory: HostService.ɵfac, providedIn: 'root' });
|
|
3845
|
-
/*@__PURE__*/ (function () {
|
|
3846
|
-
i0.ɵsetClassMetadata(HostService, [{
|
|
3847
|
-
type: i0.Injectable,
|
|
3848
|
-
args: [{ providedIn: 'root' }]
|
|
3849
|
-
}], function () { return [{ type: i1.EnvironmentService }]; }, null);
|
|
3850
|
-
})();
|
|
3851
|
-
|
|
3852
|
-
// *********************************
|
|
3853
|
-
var UserIAMApiService = /** @class */ (function () {
|
|
3854
|
-
function UserIAMApiService(http, hostService) {
|
|
3855
|
-
this.http = http;
|
|
3856
|
-
this.hostService = hostService;
|
|
3857
|
-
}
|
|
3858
|
-
UserIAMApiService.prototype.apiOptions = function () {
|
|
3859
|
-
return {
|
|
3860
|
-
headers: new i1$1.HttpHeaders({
|
|
3861
|
-
'Content-Type': 'application/json'
|
|
3862
|
-
}),
|
|
3863
|
-
withCredentials: true
|
|
3864
|
-
};
|
|
3865
|
-
};
|
|
3866
|
-
UserIAMApiService.prototype.getSubjectBySession = function (r) {
|
|
3867
|
-
var request = (r.toApiJson) ? r : new GetSubjectBySessionRequest(r);
|
|
3868
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/GetSubjectBySession", request.toApiJson(), this.apiOptions())
|
|
3869
|
-
.pipe(operators.map(function (resp) { return GetSubjectResponse.fromProto(resp); }), operators.share());
|
|
3870
|
-
};
|
|
3871
|
-
UserIAMApiService.prototype.listPersonas = function (r) {
|
|
3872
|
-
var request = (r.toApiJson) ? r : new ListPersonasRequest(r);
|
|
3873
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/ListPersonas", request.toApiJson(), this.apiOptions())
|
|
3874
|
-
.pipe(operators.map(function (resp) { return ListPersonasResponse.fromProto(resp); }), operators.share());
|
|
3875
|
-
};
|
|
3876
|
-
UserIAMApiService.prototype.getToken = function (r) {
|
|
3877
|
-
var request = (r.toApiJson) ? r : new GetTokenRequest(r);
|
|
3878
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/GetToken", request.toApiJson(), this.apiOptions())
|
|
3879
|
-
.pipe(operators.map(function (resp) { return GetTokenResponse.fromProto(resp); }), operators.share());
|
|
3880
|
-
};
|
|
3881
|
-
UserIAMApiService.prototype.getSessionToken = function (r) {
|
|
3882
|
-
var request = (r.toApiJson) ? r : new GetSessionTokenRequest(r);
|
|
3883
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/GetSessionToken", request.toApiJson(), this.apiOptions())
|
|
3884
|
-
.pipe(operators.map(function (resp) { return GetTokenResponse.fromProto(resp); }), operators.share());
|
|
3885
|
-
};
|
|
3886
|
-
UserIAMApiService.prototype.resetPasswordWithToken = function (r) {
|
|
3887
|
-
var request = (r.toApiJson) ? r : new ResetPasswordWithTokenRequest(r);
|
|
3888
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/ResetPasswordWithToken", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
3889
|
-
};
|
|
3890
|
-
UserIAMApiService.prototype.getImpersonationToken = function (r) {
|
|
3891
|
-
var request = (r.toApiJson) ? r : new GetImpersonationTokenRequest(r);
|
|
3892
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.UserIAM/GetImpersonationToken", request.toApiJson(), this.apiOptions())
|
|
3893
|
-
.pipe(operators.map(function (resp) { return GetImpersonationTokenResponse.fromProto(resp); }), operators.share());
|
|
3894
|
-
};
|
|
3895
|
-
return UserIAMApiService;
|
|
3896
|
-
}());
|
|
3897
|
-
UserIAMApiService.ɵfac = function UserIAMApiService_Factory(t) { return new (t || UserIAMApiService)(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(HostService)); };
|
|
3898
|
-
UserIAMApiService.ɵprov = i0.ɵɵdefineInjectable({ token: UserIAMApiService, factory: UserIAMApiService.ɵfac, providedIn: 'root' });
|
|
3899
|
-
/*@__PURE__*/ (function () {
|
|
3900
|
-
i0.ɵsetClassMetadata(UserIAMApiService, [{
|
|
3901
|
-
type: i0.Injectable,
|
|
3902
|
-
args: [{ providedIn: 'root' }]
|
|
3903
|
-
}], function () { return [{ type: i1$1.HttpClient }, { type: HostService }]; }, null);
|
|
3904
|
-
})();
|
|
3905
|
-
|
|
3906
|
-
var LoginRequest = /** @class */ (function () {
|
|
3907
|
-
function LoginRequest(kwargs) {
|
|
3908
|
-
if (!kwargs) {
|
|
3909
|
-
return;
|
|
3910
|
-
}
|
|
3911
|
-
Object.assign(this, kwargs);
|
|
3912
|
-
}
|
|
3913
|
-
LoginRequest.fromProto = function (proto) {
|
|
3914
|
-
if (!proto) {
|
|
3915
|
-
return new LoginRequest();
|
|
3916
|
-
}
|
|
3917
|
-
var m = new LoginRequest();
|
|
3918
|
-
m = Object.assign(m, proto);
|
|
3919
|
-
return m;
|
|
3920
|
-
};
|
|
3921
|
-
LoginRequest.prototype.toApiJson = function () {
|
|
3922
|
-
if (typeof this.namespace === 'undefined' &&
|
|
3923
|
-
typeof this.type === 'undefined' &&
|
|
3924
|
-
typeof this.email === 'undefined' &&
|
|
3925
|
-
typeof this.password === 'undefined' &&
|
|
3926
|
-
typeof this.providerIdToken === 'undefined' &&
|
|
3927
|
-
typeof this.provider === 'undefined') {
|
|
3928
|
-
return {};
|
|
3929
|
-
}
|
|
3930
|
-
return {
|
|
3931
|
-
'namespace': (typeof this.namespace !== 'undefined') ? this.namespace : null,
|
|
3932
|
-
'type': (typeof this.type !== 'undefined') ? this.type : null,
|
|
3933
|
-
'email': (typeof this.email !== 'undefined') ? this.email : null,
|
|
3934
|
-
'password': (typeof this.password !== 'undefined') ? this.password : null,
|
|
3935
|
-
'provider_id_token': (typeof this.providerIdToken !== 'undefined') ? this.providerIdToken : null,
|
|
3936
|
-
'provider': (typeof this.provider !== 'undefined') ? this.provider : null
|
|
3937
|
-
};
|
|
3938
|
-
};
|
|
3939
|
-
return LoginRequest;
|
|
3940
|
-
}());
|
|
3941
|
-
var LoginResponse = /** @class */ (function () {
|
|
3942
|
-
function LoginResponse(kwargs) {
|
|
3943
|
-
if (!kwargs) {
|
|
3944
|
-
return;
|
|
3945
|
-
}
|
|
3946
|
-
Object.assign(this, kwargs);
|
|
3947
|
-
}
|
|
3948
|
-
LoginResponse.fromProto = function (proto) {
|
|
3949
|
-
var m = new LoginResponse();
|
|
3950
|
-
m.sessionId = proto['session_id'];
|
|
3951
|
-
return m;
|
|
3952
|
-
};
|
|
3953
|
-
LoginResponse.prototype.toApiJson = function () {
|
|
3954
|
-
if (typeof this.sessionId === 'undefined') {
|
|
3955
|
-
return {};
|
|
3956
|
-
}
|
|
3957
|
-
return {
|
|
3958
|
-
'sessionId': (typeof this.sessionId !== 'undefined') ? this.sessionId : null
|
|
3959
|
-
};
|
|
3960
|
-
};
|
|
3961
|
-
return LoginResponse;
|
|
3962
|
-
}());
|
|
3963
|
-
var LogoutResponse = /** @class */ (function () {
|
|
3964
|
-
function LogoutResponse(kwargs) {
|
|
3965
|
-
if (!kwargs) {
|
|
3966
|
-
return;
|
|
3967
|
-
}
|
|
3968
|
-
Object.assign(this, kwargs);
|
|
3969
|
-
}
|
|
3970
|
-
LogoutResponse.fromProto = function (proto) {
|
|
3971
|
-
var m = new LogoutResponse();
|
|
3972
|
-
m = Object.assign(m, proto);
|
|
3973
|
-
return m;
|
|
3974
|
-
};
|
|
3975
|
-
LogoutResponse.prototype.toApiJson = function () {
|
|
3976
|
-
if (typeof this.success === 'undefined') {
|
|
3977
|
-
return {};
|
|
3978
|
-
}
|
|
3979
|
-
return {
|
|
3980
|
-
'success': (typeof this.success !== 'undefined') ? this.success : null
|
|
3981
|
-
};
|
|
3982
|
-
};
|
|
3983
|
-
return LogoutResponse;
|
|
3984
|
-
}());
|
|
3985
|
-
var SSOLoginRequest = /** @class */ (function () {
|
|
3986
|
-
function SSOLoginRequest(kwargs) {
|
|
3987
|
-
if (!kwargs) {
|
|
3988
|
-
return;
|
|
3989
|
-
}
|
|
3990
|
-
Object.assign(this, kwargs);
|
|
3991
|
-
}
|
|
3992
|
-
SSOLoginRequest.fromProto = function (proto) {
|
|
3993
|
-
var m = new SSOLoginRequest();
|
|
3994
|
-
m = Object.assign(m, proto);
|
|
3995
|
-
return m;
|
|
3996
|
-
};
|
|
3997
|
-
SSOLoginRequest.prototype.toApiJson = function () {
|
|
3998
|
-
if (typeof this.nextUrl === 'undefined' &&
|
|
3999
|
-
typeof this.namespace === 'undefined' &&
|
|
4000
|
-
typeof this.type === 'undefined') {
|
|
4001
|
-
return null;
|
|
4002
|
-
}
|
|
4003
|
-
return {
|
|
4004
|
-
'next_url': (typeof this.nextUrl !== 'undefined') ? this.nextUrl : null,
|
|
4005
|
-
'namespace': (typeof this.namespace !== 'undefined') ? this.namespace : null,
|
|
4006
|
-
'type': (typeof this.type !== 'undefined') ? this.type : null
|
|
4007
|
-
};
|
|
4008
|
-
};
|
|
4009
|
-
return SSOLoginRequest;
|
|
4010
|
-
}());
|
|
4011
|
-
|
|
4012
|
-
var IamHttpApiService = /** @class */ (function () {
|
|
4013
|
-
function IamHttpApiService(http, hostService) {
|
|
4014
|
-
this.http = http;
|
|
4015
|
-
this.hostService = hostService;
|
|
4016
|
-
}
|
|
4017
|
-
IamHttpApiService.prototype.apiOptions = function (includeCredentials) {
|
|
4018
|
-
if (includeCredentials) {
|
|
4019
|
-
return {
|
|
4020
|
-
headers: new i1$1.HttpHeaders({
|
|
4021
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
4022
|
-
}),
|
|
4023
|
-
withCredentials: true,
|
|
4024
|
-
};
|
|
4025
|
-
}
|
|
4026
|
-
return {
|
|
4027
|
-
headers: new i1$1.HttpHeaders({
|
|
4028
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
4029
|
-
}),
|
|
4030
|
-
};
|
|
4031
|
-
};
|
|
4032
|
-
IamHttpApiService.prototype.login = function (r) {
|
|
4033
|
-
var toApiJson = r.toApiJson;
|
|
4034
|
-
var request = typeof toApiJson !== 'undefined' ? r : new LoginRequest(r);
|
|
4035
|
-
return this.http
|
|
4036
|
-
.post(this.hostService.httpsHostWithScheme() + '/_ajax/v1/login', request.toApiJson(), this.apiOptions())
|
|
4037
|
-
.pipe(operators.map(function (resp) { return LoginResponse.fromProto(resp); }), operators.share());
|
|
4038
|
-
};
|
|
4039
|
-
IamHttpApiService.prototype.logout = function () {
|
|
4040
|
-
return this.http
|
|
4041
|
-
.post(this.hostService.httpsHostWithScheme() + '/_ajax/v1/logout', {}, this.apiOptions(true))
|
|
4042
|
-
.pipe(operators.map(function (resp) { return LogoutResponse.fromProto(resp); }), operators.share());
|
|
4043
|
-
};
|
|
4044
|
-
IamHttpApiService.prototype.ssoLogin = function (r) {
|
|
4045
|
-
var toApiJson = r.toApiJson;
|
|
4046
|
-
var request = typeof toApiJson !== 'undefined' ? r : new SSOLoginRequest(r);
|
|
4047
|
-
var params = new URLSearchParams();
|
|
4048
|
-
var apiJson = request.toApiJson();
|
|
4049
|
-
for (var key in apiJson) {
|
|
4050
|
-
if (!apiJson.hasOwnProperty(key)) {
|
|
4051
|
-
continue;
|
|
4052
|
-
}
|
|
4053
|
-
var value = apiJson[key];
|
|
4054
|
-
if (value === null) {
|
|
4055
|
-
continue;
|
|
4056
|
-
}
|
|
4057
|
-
params.append(key, value);
|
|
4058
|
-
}
|
|
4059
|
-
window.location.href = this.hostService.httpsHostWithScheme() + "/sso-login?" + params.toString();
|
|
4060
|
-
};
|
|
4061
|
-
return IamHttpApiService;
|
|
4062
|
-
}());
|
|
4063
|
-
IamHttpApiService.ɵfac = function IamHttpApiService_Factory(t) { return new (t || IamHttpApiService)(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(HostService)); };
|
|
4064
|
-
IamHttpApiService.ɵprov = i0.ɵɵdefineInjectable({ token: IamHttpApiService, factory: IamHttpApiService.ɵfac, providedIn: 'root' });
|
|
4065
|
-
/*@__PURE__*/ (function () {
|
|
4066
|
-
i0.ɵsetClassMetadata(IamHttpApiService, [{
|
|
4067
|
-
type: i0.Injectable,
|
|
4068
|
-
args: [{ providedIn: 'root' }]
|
|
4069
|
-
}], function () { return [{ type: i1$1.HttpClient }, { type: HostService }]; }, null);
|
|
4070
|
-
})();
|
|
4071
|
-
|
|
4072
|
-
// *********************************
|
|
4073
|
-
var IAMApiService = /** @class */ (function () {
|
|
4074
|
-
function IAMApiService(http, hostService) {
|
|
4075
|
-
this.http = http;
|
|
4076
|
-
this.hostService = hostService;
|
|
4077
|
-
}
|
|
4078
|
-
IAMApiService.prototype.apiOptions = function () {
|
|
4079
|
-
return {
|
|
4080
|
-
headers: new i1$1.HttpHeaders({
|
|
4081
|
-
'Content-Type': 'application/json'
|
|
4082
|
-
}),
|
|
4083
|
-
withCredentials: true
|
|
4084
|
-
};
|
|
4085
|
-
};
|
|
4086
|
-
IAMApiService.prototype.registerSubject = function (r) {
|
|
4087
|
-
var request = (r.toApiJson) ? r : new RegisterSubjectRequest(r);
|
|
4088
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RegisterSubject", request.toApiJson(), this.apiOptions())
|
|
4089
|
-
.pipe(operators.map(function (resp) { return RegisterSubjectResponse.fromProto(resp); }), operators.share());
|
|
4090
|
-
};
|
|
4091
|
-
IAMApiService.prototype.authenticateSubject = function (r) {
|
|
4092
|
-
var request = (r.toApiJson) ? r : new AuthenticateSubjectRequest(r);
|
|
4093
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/AuthenticateSubject", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4094
|
-
};
|
|
4095
|
-
IAMApiService.prototype.getSubjects = function (r) {
|
|
4096
|
-
var request = (r.toApiJson) ? r : new GetSubjectsRequest(r);
|
|
4097
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetSubjects", request.toApiJson(), this.apiOptions())
|
|
4098
|
-
.pipe(operators.map(function (resp) { return GetSubjectsResponse.fromProto(resp); }), operators.share());
|
|
4099
|
-
};
|
|
4100
|
-
IAMApiService.prototype.getSubjectsByEmail = function (r) {
|
|
4101
|
-
var request = (r.toApiJson) ? r : new GetSubjectsByEmailRequest(r);
|
|
4102
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetSubjectsByEmail", request.toApiJson(), this.apiOptions())
|
|
4103
|
-
.pipe(operators.map(function (resp) { return GetSubjectsResponse.fromProto(resp); }), operators.share());
|
|
4104
|
-
};
|
|
4105
|
-
IAMApiService.prototype.mutateAttributes = function (r) {
|
|
4106
|
-
var request = (r.toApiJson) ? r : new MutateAttributesRequest(r);
|
|
4107
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/MutateAttributes", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4108
|
-
};
|
|
4109
|
-
IAMApiService.prototype.resetSubjectPassword = function (r) {
|
|
4110
|
-
var request = (r.toApiJson) ? r : new ResetSubjectPasswordRequest(r);
|
|
4111
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ResetSubjectPassword", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4112
|
-
};
|
|
4113
|
-
IAMApiService.prototype.changeSubjectEmail = function (r) {
|
|
4114
|
-
var request = (r.toApiJson) ? r : new ChangeSubjectEmailRequest(r);
|
|
4115
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ChangeSubjectEmail", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4116
|
-
};
|
|
4117
|
-
IAMApiService.prototype.deleteSubject = function (r) {
|
|
4118
|
-
var request = (r.toApiJson) ? r : new DeleteSubjectRequest(r);
|
|
4119
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/DeleteSubject", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4120
|
-
};
|
|
4121
|
-
IAMApiService.prototype.searchSubject = function (r) {
|
|
4122
|
-
var request = (r.toApiJson) ? r : new SearchSubjectRequest(r);
|
|
4123
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/SearchSubject", request.toApiJson(), this.apiOptions())
|
|
4124
|
-
.pipe(operators.map(function (resp) { return SearchSubjectResponse.fromProto(resp); }), operators.share());
|
|
4125
|
-
};
|
|
4126
|
-
IAMApiService.prototype.getSubjectContext = function (r) {
|
|
4127
|
-
var request = (r.toApiJson) ? r : new GetSubjectContextRequest(r);
|
|
4128
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetSubjectContext", request.toApiJson(), this.apiOptions())
|
|
4129
|
-
.pipe(operators.map(function (resp) { return GetSubjectContextResponse.fromProto(resp); }), operators.share());
|
|
4130
|
-
};
|
|
4131
|
-
IAMApiService.prototype.registerResourceOwner = function (r) {
|
|
4132
|
-
var request = (r.toApiJson) ? r : new RegisterResourceOwnerRequest(r);
|
|
4133
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RegisterResourceOwner", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4134
|
-
};
|
|
4135
|
-
IAMApiService.prototype.registerResource = function (r) {
|
|
4136
|
-
var request = (r.toApiJson) ? r : new RegisterResourceRequest(r);
|
|
4137
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RegisterResource", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4138
|
-
};
|
|
4139
|
-
IAMApiService.prototype.registerPolicy = function (r) {
|
|
4140
|
-
var request = (r.toApiJson) ? r : new RegisterPolicyRequest(r);
|
|
4141
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RegisterPolicy", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4142
|
-
};
|
|
4143
|
-
IAMApiService.prototype.accessResource = function (r) {
|
|
4144
|
-
var request = (r.toApiJson) ? r : new AccessResourceRequest(r);
|
|
4145
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/AccessResource", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4146
|
-
};
|
|
4147
|
-
IAMApiService.prototype.getShortLivedToken = function (r) {
|
|
4148
|
-
var request = (r.toApiJson) ? r : new GetShortLivedTokenRequest(r);
|
|
4149
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetShortLivedToken", request.toApiJson(), this.apiOptions())
|
|
4150
|
-
.pipe(operators.map(function (resp) { return GetTokenResponse.fromProto(resp); }), operators.share());
|
|
4151
|
-
};
|
|
4152
|
-
IAMApiService.prototype.getSessionToken = function (r) {
|
|
4153
|
-
var request = (r.toApiJson) ? r : new GetSessionTokenRequest(r);
|
|
4154
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetSessionToken", request.toApiJson(), this.apiOptions())
|
|
4155
|
-
.pipe(operators.map(function (resp) { return GetTokenResponse.fromProto(resp); }), operators.share());
|
|
4156
|
-
};
|
|
4157
|
-
IAMApiService.prototype.addKey = function (r) {
|
|
4158
|
-
var request = (r.toApiJson) ? r : new AddKeyRequest(r);
|
|
4159
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/AddKey", request.toApiJson(), this.apiOptions())
|
|
4160
|
-
.pipe(operators.map(function (resp) { return AddKeyResponse.fromProto(resp); }), operators.share());
|
|
4161
|
-
};
|
|
4162
|
-
IAMApiService.prototype.removeKey = function (r) {
|
|
4163
|
-
var request = (r.toApiJson) ? r : new RemoveKeyRequest(r);
|
|
4164
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RemoveKey", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4165
|
-
};
|
|
4166
|
-
IAMApiService.prototype.createSession = function (r) {
|
|
4167
|
-
var request = (r.toApiJson) ? r : new CreateSessionRequest(r);
|
|
4168
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/CreateSession", request.toApiJson(), this.apiOptions())
|
|
4169
|
-
.pipe(operators.map(function (resp) { return CreateSessionResponse.fromProto(resp); }), operators.share());
|
|
4170
|
-
};
|
|
4171
|
-
IAMApiService.prototype.getResetPasswordToken = function (r) {
|
|
4172
|
-
var request = (r.toApiJson) ? r : new GetResetPasswordTokenRequest(r);
|
|
4173
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetResetPasswordToken", request.toApiJson(), this.apiOptions())
|
|
4174
|
-
.pipe(operators.map(function (resp) { return ResetPasswordTokenResponse.fromProto(resp); }), operators.share());
|
|
4175
|
-
};
|
|
4176
|
-
IAMApiService.prototype.listPersonasByEmail = function (r) {
|
|
4177
|
-
var request = (r.toApiJson) ? r : new ListPersonasByEmailRequest(r);
|
|
4178
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ListPersonasByEmail", request.toApiJson(), this.apiOptions())
|
|
4179
|
-
.pipe(operators.map(function (resp) { return ListPersonasResponse.fromProto(resp); }), operators.share());
|
|
4180
|
-
};
|
|
4181
|
-
IAMApiService.prototype.listPersonas = function (r) {
|
|
4182
|
-
var request = (r.toApiJson) ? r : new IAMListPersonasRequest(r);
|
|
4183
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ListPersonas", request.toApiJson(), this.apiOptions())
|
|
4184
|
-
.pipe(operators.map(function (resp) { return ListPersonasResponse.fromProto(resp); }), operators.share());
|
|
4185
|
-
};
|
|
4186
|
-
IAMApiService.prototype.createTemporarySubject = function (r) {
|
|
4187
|
-
var request = (r.toApiJson) ? r : new CreateTemporarySubjectRequest(r);
|
|
4188
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/CreateTemporarySubject", request.toApiJson(), this.apiOptions())
|
|
4189
|
-
.pipe(operators.map(function (resp) { return CreateTemporarySubjectResponse.fromProto(resp); }), operators.share());
|
|
4190
|
-
};
|
|
4191
|
-
IAMApiService.prototype.getMultiUsers = function (r) {
|
|
4192
|
-
var request = (r.toApiJson) ? r : new GetMultiUsersRequest(r);
|
|
4193
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetMultiUsers", request.toApiJson(), this.apiOptions())
|
|
4194
|
-
.pipe(operators.map(function (resp) { return GetMultiUsersResponse.fromProto(resp); }), operators.share());
|
|
4195
|
-
};
|
|
4196
|
-
IAMApiService.prototype.listUsers = function (r) {
|
|
4197
|
-
var request = (r.toApiJson) ? r : new ListUsersRequest(r);
|
|
4198
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ListUsers", request.toApiJson(), this.apiOptions())
|
|
4199
|
-
.pipe(operators.map(function (resp) { return ListUsersResponse.fromProto(resp); }), operators.share());
|
|
4200
|
-
};
|
|
4201
|
-
IAMApiService.prototype.updateUser = function (r) {
|
|
4202
|
-
var request = (r.toApiJson) ? r : new UpdateUserRequest(r);
|
|
4203
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/UpdateUser", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4204
|
-
};
|
|
4205
|
-
IAMApiService.prototype.deleteUser = function (r) {
|
|
4206
|
-
var request = (r.toApiJson) ? r : new DeleteUserRequest(r);
|
|
4207
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/DeleteUser", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4208
|
-
};
|
|
4209
|
-
IAMApiService.prototype.listSecurityLogs = function (r) {
|
|
4210
|
-
var request = (r.toApiJson) ? r : new ListSecurityLogsRequest(r);
|
|
4211
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/ListSecurityLogs", request.toApiJson(), this.apiOptions())
|
|
4212
|
-
.pipe(operators.map(function (resp) { return ListSecurityLogsResponse.fromProto(resp); }), operators.share());
|
|
4213
|
-
};
|
|
4214
|
-
IAMApiService.prototype.verifyEmail = function (r) {
|
|
4215
|
-
var request = (r.toApiJson) ? r : new VerifyEmailRequest(r);
|
|
4216
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/VerifyEmail", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4217
|
-
};
|
|
4218
|
-
IAMApiService.prototype.sendEmailVerification = function (r) {
|
|
4219
|
-
var request = (r.toApiJson) ? r : new SendEmailVerificationRequest(r);
|
|
4220
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/SendEmailVerification", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4221
|
-
};
|
|
4222
|
-
IAMApiService.prototype.getMultiExternalId = function (r) {
|
|
4223
|
-
var request = (r.toApiJson) ? r : new GetMultiExternalIDRequest(r);
|
|
4224
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/GetMultiExternalID", request.toApiJson(), this.apiOptions())
|
|
4225
|
-
.pipe(operators.map(function (resp) { return GetMultiExternalIDResponse.fromProto(resp); }), operators.share());
|
|
4226
|
-
};
|
|
4227
|
-
IAMApiService.prototype.createExternalId = function (r) {
|
|
4228
|
-
var request = (r.toApiJson) ? r : new CreateExternalIDRequest(r);
|
|
4229
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/CreateExternalID", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4230
|
-
};
|
|
4231
|
-
IAMApiService.prototype.addMultiUserRestriction = function (r) {
|
|
4232
|
-
var request = (r.toApiJson) ? r : new AddMultiUserRestrictionRequest(r);
|
|
4233
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/AddMultiUserRestriction", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4234
|
-
};
|
|
4235
|
-
IAMApiService.prototype.removeMultiUserRestriction = function (r) {
|
|
4236
|
-
var request = (r.toApiJson) ? r : new RemoveMultiUserRestrictionRequest(r);
|
|
4237
|
-
return this.http.post(this.hostService.hostWithScheme() + "/iam.v1.IAM/RemoveMultiUserRestriction", request.toApiJson(), Object.assign(Object.assign({}, this.apiOptions()), { observe: 'response' }));
|
|
4238
|
-
};
|
|
4239
|
-
return IAMApiService;
|
|
4240
|
-
}());
|
|
4241
|
-
IAMApiService.ɵfac = function IAMApiService_Factory(t) { return new (t || IAMApiService)(i0.ɵɵinject(i1$1.HttpClient), i0.ɵɵinject(HostService)); };
|
|
4242
|
-
IAMApiService.ɵprov = i0.ɵɵdefineInjectable({ token: IAMApiService, factory: IAMApiService.ɵfac, providedIn: 'root' });
|
|
4243
|
-
/*@__PURE__*/ (function () {
|
|
4244
|
-
i0.ɵsetClassMetadata(IAMApiService, [{
|
|
4245
|
-
type: i0.Injectable,
|
|
4246
|
-
args: [{ providedIn: 'root' }]
|
|
4247
|
-
}], function () { return [{ type: i1$1.HttpClient }, { type: HostService }]; }, null);
|
|
4248
|
-
})();
|
|
4249
|
-
|
|
4250
|
-
var IAMService = /** @class */ (function () {
|
|
4251
|
-
function IAMService(api, httpApi, sessionService, iamApi) {
|
|
4252
|
-
this.api = api;
|
|
4253
|
-
this.httpApi = httpApi;
|
|
4254
|
-
this.sessionService = sessionService;
|
|
4255
|
-
this.iamApi = iamApi;
|
|
4256
|
-
}
|
|
4257
|
-
// Get a subject from the session ID
|
|
4258
|
-
IAMService.prototype.getSubjectBySession = function (sessionId, personaType, partnerId) {
|
|
4259
|
-
var context;
|
|
4260
|
-
if (!!partnerId) {
|
|
4261
|
-
context = new Context({
|
|
4262
|
-
namespaced: new NamespacedContext({
|
|
4263
|
-
namespace: partnerId,
|
|
4264
|
-
type: exports.PersonaType[personaType]
|
|
4265
|
-
})
|
|
4266
|
-
});
|
|
4267
|
-
}
|
|
4268
|
-
else {
|
|
4269
|
-
context = new Context({ typed: new TypedContext({ type: exports.PersonaType[personaType] }) });
|
|
4270
|
-
}
|
|
4271
|
-
return this.api
|
|
4272
|
-
.getSubjectBySession({
|
|
4273
|
-
session: sessionId,
|
|
4274
|
-
context: context
|
|
4275
|
-
})
|
|
4276
|
-
.pipe(operators.map(function (r) { return fromPersona(new Persona({ subject: r.subject.subject, context: context })); }));
|
|
4277
|
-
};
|
|
4278
|
-
// Get persona type from the current session
|
|
4279
|
-
IAMService.prototype.getLoggedInSubject = function (personaType, partnerId) {
|
|
4280
|
-
var _this = this;
|
|
4281
|
-
return this.sessionService
|
|
4282
|
-
.getSessionId()
|
|
4283
|
-
.pipe(operators.switchMap(function (sessionId) { return _this.getSubjectBySession(sessionId, personaType, partnerId); }));
|
|
4284
|
-
};
|
|
4285
|
-
// List all available personas for the session. Optionally pass a persona type to filter by that persona.
|
|
4286
|
-
IAMService.prototype.listPersonas = function (sessionId, personaType) {
|
|
4287
|
-
return this.api
|
|
4288
|
-
.listPersonas({
|
|
4289
|
-
session: sessionId,
|
|
4290
|
-
pageSize: 100,
|
|
4291
|
-
type: personaType
|
|
4292
|
-
})
|
|
4293
|
-
.pipe(operators.map(function (r) {
|
|
4294
|
-
var e_1, _a;
|
|
4295
|
-
var personas = [];
|
|
4296
|
-
if (!r || !r.personas) {
|
|
4297
|
-
return [];
|
|
4298
|
-
}
|
|
4299
|
-
try {
|
|
4300
|
-
for (var _b = __values(r.personas), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
4301
|
-
var p = _c.value;
|
|
4302
|
-
var persona = fromPersona(p);
|
|
4303
|
-
if (!!persona) {
|
|
4304
|
-
personas.push(persona);
|
|
4305
|
-
}
|
|
4306
|
-
}
|
|
4307
|
-
}
|
|
4308
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
4309
|
-
finally {
|
|
4310
|
-
try {
|
|
4311
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
4312
|
-
}
|
|
4313
|
-
finally { if (e_1) throw e_1.error; }
|
|
4314
|
-
}
|
|
4315
|
-
return personas;
|
|
4316
|
-
}));
|
|
4317
|
-
};
|
|
4318
|
-
// List all available personas for the current session. Optionally pass a persona type to filter by that persona.
|
|
4319
|
-
IAMService.prototype.listLoggedInPersonas = function (personaType) {
|
|
4320
|
-
var _this = this;
|
|
4321
|
-
return this.sessionService.getSessionId().pipe(operators.switchMap(function (sessionId) { return _this.listPersonas(sessionId, personaType); }));
|
|
4322
|
-
};
|
|
4323
|
-
// Get a short lived session token
|
|
4324
|
-
IAMService.prototype.getToken = function () {
|
|
4325
|
-
return this.api.getToken({}).pipe(operators.map(function (r) { return r.token; }));
|
|
4326
|
-
};
|
|
4327
|
-
// Login into a user. Optionally specify the partner and persona type you want to log into
|
|
4328
|
-
IAMService.prototype.login = function (email, password, personaType, partnerId) {
|
|
4329
|
-
return this.httpApi
|
|
4330
|
-
.login({
|
|
4331
|
-
email: email,
|
|
4332
|
-
password: password,
|
|
4333
|
-
namespace: partnerId,
|
|
4334
|
-
type: personaType
|
|
4335
|
-
})
|
|
4336
|
-
.pipe(operators.map(function (r) { return r.sessionId || ''; }));
|
|
4337
|
-
};
|
|
4338
|
-
// Logout of the current session, returns true if successful
|
|
4339
|
-
IAMService.prototype.logout = function () {
|
|
4340
|
-
return this.httpApi.logout().pipe(operators.map(function (r) { return r.success; }));
|
|
4341
|
-
};
|
|
4342
|
-
// This will redirect the browser to IAM's sso login handler.
|
|
4343
|
-
IAMService.prototype.ssoLogin = function (nextUrl, personaType, partnerId) {
|
|
4344
|
-
this.httpApi.ssoLogin({
|
|
4345
|
-
nextUrl: nextUrl,
|
|
4346
|
-
namespace: partnerId,
|
|
4347
|
-
type: personaType
|
|
4348
|
-
});
|
|
4349
|
-
};
|
|
4350
|
-
// getMultiUsers takes an array of user identifiers and calls IAM to convert them into Users
|
|
4351
|
-
IAMService.prototype.getMultiUsers = function (userIdentifiers) {
|
|
4352
|
-
return this.iamApi.getMultiUsers({
|
|
4353
|
-
userIdentifiers: userIdentifiers
|
|
4354
|
-
}).pipe(operators.map(function (resp) {
|
|
4355
|
-
if (!!resp.users) {
|
|
4356
|
-
return resp.users;
|
|
4357
|
-
}
|
|
4358
|
-
return [];
|
|
4359
|
-
}), operators.map(function (userContainers) { return userContainers.map(function (u) { return u.user; }); }));
|
|
4360
|
-
};
|
|
4361
|
-
// listSecurityLogs returns security logs for a userId passed in. This is a paged function, but the
|
|
4362
|
-
// handling of paged information is left to the implementor (for now).
|
|
4363
|
-
IAMService.prototype.listSecurityLogs = function (userId, cursor, pageSize, actionId) {
|
|
4364
|
-
if (actionId === void 0) { actionId = ''; }
|
|
4365
|
-
var optionalArgs = {};
|
|
4366
|
-
if (actionId !== '') {
|
|
4367
|
-
optionalArgs.filters = new ListSecurityLogsRequestFilters({ actionId: actionId });
|
|
4368
|
-
}
|
|
4369
|
-
return this.iamApi.listSecurityLogs(Object.assign({ userId: userId,
|
|
4370
|
-
cursor: cursor,
|
|
4371
|
-
pageSize: pageSize }, optionalArgs));
|
|
4372
|
-
};
|
|
4373
|
-
// listUsers returns users for a namespace passed in. This is a paged function, but the
|
|
4374
|
-
// handling of paged information is left to the implementor (for now).
|
|
4375
|
-
// An empty namespace will return users that exist outside of a namespace.
|
|
4376
|
-
IAMService.prototype.listUsers = function (namespace, email, cursor, pageSize, subjectTypes, searchTerms, sortOptions) {
|
|
4377
|
-
var userFilter = {};
|
|
4378
|
-
if (!!subjectTypes && subjectTypes.length > 0) {
|
|
4379
|
-
userFilter.subjectTypes = subjectTypes;
|
|
4380
|
-
}
|
|
4381
|
-
if (!!searchTerms && searchTerms.length > 0) {
|
|
4382
|
-
userFilter.searchTerms = searchTerms;
|
|
4383
|
-
}
|
|
4384
|
-
return this.iamApi.listUsers({
|
|
4385
|
-
namespace: namespace,
|
|
4386
|
-
email: email,
|
|
4387
|
-
cursor: cursor,
|
|
4388
|
-
pageSize: pageSize,
|
|
4389
|
-
userFilter: userFilter,
|
|
4390
|
-
sortOptions: (sortOptions || [])
|
|
4391
|
-
});
|
|
4392
|
-
};
|
|
4393
|
-
return IAMService;
|
|
4394
|
-
}());
|
|
4395
|
-
IAMService.ɵfac = function IAMService_Factory(t) { return new (t || IAMService)(i0.ɵɵinject(UserIAMApiService), i0.ɵɵinject(IamHttpApiService), i0.ɵɵinject(i1.SessionService), i0.ɵɵinject(IAMApiService)); };
|
|
4396
|
-
IAMService.ɵprov = i0.ɵɵdefineInjectable({ token: IAMService, factory: IAMService.ɵfac, providedIn: 'root' });
|
|
4397
|
-
/*@__PURE__*/ (function () {
|
|
4398
|
-
i0.ɵsetClassMetadata(IAMService, [{
|
|
4399
|
-
type: i0.Injectable,
|
|
4400
|
-
args: [{ providedIn: 'root' }]
|
|
4401
|
-
}], function () { return [{ type: UserIAMApiService }, { type: IamHttpApiService }, { type: i1.SessionService }, { type: IAMApiService }]; }, null);
|
|
4402
|
-
})();
|
|
4403
|
-
|
|
4404
|
-
// *********************************
|
|
4405
|
-
|
|
4406
|
-
/**
|
|
4407
|
-
* Generated bundle index. Do not edit.
|
|
4408
|
-
*/
|
|
4409
|
-
|
|
4410
|
-
exports.Access = Access;
|
|
4411
|
-
exports.AccessCheckFailures = AccessCheckFailures;
|
|
4412
|
-
exports.AccessResourceRequest = AccessResourceRequest;
|
|
4413
|
-
exports.AccessResourceRequestResourceEntityIdentifierEntry = AccessResourceRequestResourceEntityIdentifierEntry;
|
|
4414
|
-
exports.AddKeyRequest = AddKeyRequest;
|
|
4415
|
-
exports.AddKeyResponse = AddKeyResponse;
|
|
4416
|
-
exports.AddMultiUserRestrictionRequest = AddMultiUserRestrictionRequest;
|
|
4417
|
-
exports.Attribute = Attribute;
|
|
4418
|
-
exports.AuthenticateSubjectRequest = AuthenticateSubjectRequest;
|
|
4419
|
-
exports.BasePersona = BasePersona;
|
|
4420
|
-
exports.ChangeSubjectEmailRequest = ChangeSubjectEmailRequest;
|
|
4421
|
-
exports.Context = Context;
|
|
4422
|
-
exports.CreateExternalIDRequest = CreateExternalIDRequest;
|
|
4423
|
-
exports.CreateSessionRequest = CreateSessionRequest;
|
|
4424
|
-
exports.CreateSessionResponse = CreateSessionResponse;
|
|
4425
|
-
exports.CreateTemporarySubjectRequest = CreateTemporarySubjectRequest;
|
|
4426
|
-
exports.CreateTemporarySubjectResponse = CreateTemporarySubjectResponse;
|
|
4427
|
-
exports.DeleteSubjectRequest = DeleteSubjectRequest;
|
|
4428
|
-
exports.DeleteUserRequest = DeleteUserRequest;
|
|
4429
|
-
exports.DeveloperPersona = DeveloperPersona;
|
|
4430
|
-
exports.DigitalAgentPersona = DigitalAgentPersona;
|
|
4431
|
-
exports.FieldMask = FieldMask;
|
|
4432
|
-
exports.GeoPointAttribute = GeoPointAttribute;
|
|
4433
|
-
exports.GetImpersonationTokenRequest = GetImpersonationTokenRequest;
|
|
4434
|
-
exports.GetImpersonationTokenResponse = GetImpersonationTokenResponse;
|
|
4435
|
-
exports.GetMultiExternalIDRequest = GetMultiExternalIDRequest;
|
|
4436
|
-
exports.GetMultiExternalIDResponse = GetMultiExternalIDResponse;
|
|
4437
|
-
exports.GetMultiUsersRequest = GetMultiUsersRequest;
|
|
4438
|
-
exports.GetMultiUsersResponse = GetMultiUsersResponse;
|
|
4439
|
-
exports.GetMultiUsersResponseUserContainer = GetMultiUsersResponseUserContainer;
|
|
4440
|
-
exports.GetResetPasswordTokenRequest = GetResetPasswordTokenRequest;
|
|
4441
|
-
exports.GetSessionTokenRequest = GetSessionTokenRequest;
|
|
4442
|
-
exports.GetShortLivedTokenRequest = GetShortLivedTokenRequest;
|
|
4443
|
-
exports.GetSubjectBySessionRequest = GetSubjectBySessionRequest;
|
|
4444
|
-
exports.GetSubjectContextRequest = GetSubjectContextRequest;
|
|
4445
|
-
exports.GetSubjectContextResponse = GetSubjectContextResponse;
|
|
4446
|
-
exports.GetSubjectResponse = GetSubjectResponse;
|
|
4447
|
-
exports.GetSubjectsByEmailRequest = GetSubjectsByEmailRequest;
|
|
4448
|
-
exports.GetSubjectsRequest = GetSubjectsRequest;
|
|
4449
|
-
exports.GetSubjectsResponse = GetSubjectsResponse;
|
|
4450
|
-
exports.GetTokenRequest = GetTokenRequest;
|
|
4451
|
-
exports.GetTokenResponse = GetTokenResponse;
|
|
4452
|
-
exports.HostService = HostService;
|
|
4453
|
-
exports.IAMApiService = IAMApiService;
|
|
4454
|
-
exports.IAMListPersonasRequest = IAMListPersonasRequest;
|
|
4455
|
-
exports.IAMService = IAMService;
|
|
4456
|
-
exports.Identifier = Identifier;
|
|
4457
|
-
exports.IfClause = IfClause;
|
|
4458
|
-
exports.ListAttribute = ListAttribute;
|
|
4459
|
-
exports.ListPersonasByEmailRequest = ListPersonasByEmailRequest;
|
|
4460
|
-
exports.ListPersonasRequest = ListPersonasRequest;
|
|
4461
|
-
exports.ListPersonasResponse = ListPersonasResponse;
|
|
4462
|
-
exports.ListSecurityLogsRequest = ListSecurityLogsRequest;
|
|
4463
|
-
exports.ListSecurityLogsRequestFilters = ListSecurityLogsRequestFilters;
|
|
4464
|
-
exports.ListSecurityLogsResponse = ListSecurityLogsResponse;
|
|
4465
|
-
exports.ListUsersRequest = ListUsersRequest;
|
|
4466
|
-
exports.ListUsersResponse = ListUsersResponse;
|
|
4467
|
-
exports.MultiValueAttribute = MultiValueAttribute;
|
|
4468
|
-
exports.MutateAttributesRequest = MutateAttributesRequest;
|
|
4469
|
-
exports.Mutation = Mutation;
|
|
4470
|
-
exports.NamespacedContext = NamespacedContext;
|
|
4471
|
-
exports.NamespacedEmail = NamespacedEmail;
|
|
4472
|
-
exports.NamespacedPersona = NamespacedPersona;
|
|
4473
|
-
exports.NamespacedSession = NamespacedSession;
|
|
4474
|
-
exports.OAuthCredentials = OAuthCredentials;
|
|
4475
|
-
exports.Operator = Operator;
|
|
4476
|
-
exports.PartnerAppPersona = PartnerAppPersona;
|
|
4477
|
-
exports.PartnerPersona = PartnerPersona;
|
|
4478
|
-
exports.Persona = Persona;
|
|
4479
|
-
exports.Policy = Policy;
|
|
4480
|
-
exports.PolicyNode = PolicyNode;
|
|
4481
|
-
exports.PublicKey = PublicKey;
|
|
4482
|
-
exports.Query = Query;
|
|
4483
|
-
exports.RegisterPolicyRequest = RegisterPolicyRequest;
|
|
4484
|
-
exports.RegisterResourceOwnerRequest = RegisterResourceOwnerRequest;
|
|
4485
|
-
exports.RegisterResourceRequest = RegisterResourceRequest;
|
|
4486
|
-
exports.RegisterSubjectRequest = RegisterSubjectRequest;
|
|
4487
|
-
exports.RegisterSubjectResponse = RegisterSubjectResponse;
|
|
4488
|
-
exports.RemoveKeyRequest = RemoveKeyRequest;
|
|
4489
|
-
exports.RemoveMultiUserRestrictionRequest = RemoveMultiUserRestrictionRequest;
|
|
4490
|
-
exports.ResetPasswordTokenResponse = ResetPasswordTokenResponse;
|
|
4491
|
-
exports.ResetPasswordWithTokenRequest = ResetPasswordWithTokenRequest;
|
|
4492
|
-
exports.ResetSubjectPasswordRequest = ResetSubjectPasswordRequest;
|
|
4493
|
-
exports.ResourceIdentifier = ResourceIdentifier;
|
|
4494
|
-
exports.ResourceIdentifierIdentifiersEntry = ResourceIdentifierIdentifiersEntry;
|
|
4495
|
-
exports.ResourceOwner = ResourceOwner;
|
|
4496
|
-
exports.SMBPersona = SMBPersona;
|
|
4497
|
-
exports.SalespersonPersona = SalespersonPersona;
|
|
4498
|
-
exports.SearchSubjectRequest = SearchSubjectRequest;
|
|
4499
|
-
exports.SearchSubjectResponse = SearchSubjectResponse;
|
|
4500
|
-
exports.SecurityLog = SecurityLog;
|
|
4501
|
-
exports.SendEmailVerificationRequest = SendEmailVerificationRequest;
|
|
4502
|
-
exports.SingleValueAttribute = SingleValueAttribute;
|
|
4503
|
-
exports.StructAttribute = StructAttribute;
|
|
4504
|
-
exports.StructAttributeAttributesEntry = StructAttributeAttributesEntry;
|
|
4505
|
-
exports.Subject = Subject;
|
|
4506
|
-
exports.SubjectCredentials = SubjectCredentials;
|
|
4507
|
-
exports.SubjectMissingValueClause = SubjectMissingValueClause;
|
|
4508
|
-
exports.SubjectResourceForClause = SubjectResourceForClause;
|
|
4509
|
-
exports.SubjectResourceIntersectionClause = SubjectResourceIntersectionClause;
|
|
4510
|
-
exports.SubjectResourceSubsetClause = SubjectResourceSubsetClause;
|
|
4511
|
-
exports.SubjectResult = SubjectResult;
|
|
4512
|
-
exports.SubjectValueIntersectionClause = SubjectValueIntersectionClause;
|
|
4513
|
-
exports.TypedContext = TypedContext;
|
|
4514
|
-
exports.TypedExternalIdentifier = TypedExternalIdentifier;
|
|
4515
|
-
exports.TypedPersona = TypedPersona;
|
|
4516
|
-
exports.UpdateUserRequest = UpdateUserRequest;
|
|
4517
|
-
exports.UpdateUserRequestOperation = UpdateUserRequestOperation;
|
|
4518
|
-
exports.User = User;
|
|
4519
|
-
exports.UserFilter = UserFilter;
|
|
4520
|
-
exports.UserIAMApiService = UserIAMApiService;
|
|
4521
|
-
exports.UserIdentifier = UserIdentifier;
|
|
4522
|
-
exports.UserSortOptions = UserSortOptions;
|
|
4523
|
-
exports.ValueList = ValueList;
|
|
4524
|
-
exports.VendorPersona = VendorPersona;
|
|
4525
|
-
exports.VerifyEmailRequest = VerifyEmailRequest;
|
|
4526
|
-
exports.fromPersona = fromPersona;
|
|
4527
|
-
|
|
4528
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4529
|
-
|
|
4530
|
-
})));
|
|
4531
|
-
//# sourceMappingURL=vendasta-iam.umd.js.map
|