@distilled.cloud/okta 1.0.0-rc.20 → 1.0.0-rc.21
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/README.md +12 -1
- package/lib/.lazy.json +1 -1
- package/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/credentials.d.ts +6 -3
- package/lib/credentials.d.ts.map +1 -1
- package/lib/errors.d.ts +7 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.lazy.js.map +1 -1
- package/lib/pagination.d.ts.map +1 -1
- package/lib/protocol.d.ts +9 -12
- package/lib/protocol.d.ts.map +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/okta.d.ts +10038 -4026
- package/lib/services/okta.d.ts.map +1 -1
- package/lib/services/okta.js +930 -944
- package/lib/services/okta.js.map +1 -1
- package/lib/services.lazy/okta.js +2 -2
- package/lib/traits.d.ts.map +1 -1
- package/lib/unstable-services/index.d.ts +2 -0
- package/lib/unstable-services/index.d.ts.map +1 -0
- package/lib/unstable-services/index.js +1 -0
- package/lib/unstable-services/okta.d.ts +541 -0
- package/lib/unstable-services/okta.d.ts.map +1 -0
- package/lib/unstable-services/okta.js +2 -0
- package/lib/unstable-services/okta.js.map +1 -0
- package/lib/unstable-services.lazy/index.js +3 -0
- package/lib/unstable-services.lazy/okta.js +1 -0
- package/package.json +12 -5
- package/src/credentials.ts +25 -21
- package/src/errors.ts +9 -1
- package/src/protocol.ts +13 -23
- package/src/services/okta.ts +14246 -7131
- package/src/unstable-services/index.ts +2 -0
- package/src/unstable-services/okta.ts +895 -0
|
@@ -0,0 +1,895 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import * as C from "@distilled.cloud/core/category";
|
|
3
|
+
// AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-okta/specs/management.json). Do not edit.
|
|
4
|
+
import * as S from "@distilled.cloud/core/schema-lite";
|
|
5
|
+
import * as __L from "@distilled.cloud/core/schema-lite";
|
|
6
|
+
import type * as Redacted from "effect/Redacted";
|
|
7
|
+
import { OktaServiceErrors } from "../errors.ts";
|
|
8
|
+
import { OktaProtocol, type OktaOpError, type OktaOpContext } from "../protocol.ts";
|
|
9
|
+
import * as Retry from "../retry.ts";
|
|
10
|
+
import * as T from "../traits.ts";
|
|
11
|
+
// Schema table, filled on first reach (see __S at the end).
|
|
12
|
+
const __s: any[] = [];
|
|
13
|
+
|
|
14
|
+
export type { OktaOpError, OktaOpContext };
|
|
15
|
+
|
|
16
|
+
/** Span facts shared by every operation (com.distilled.telemetry#service). */
|
|
17
|
+
const TELEMETRY = {
|
|
18
|
+
system: "okta-api",
|
|
19
|
+
responseHeaders: [
|
|
20
|
+
{ header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
|
|
21
|
+
{ header: "request-id", name: "http.response.header.request-id", transform: "list" },
|
|
22
|
+
],
|
|
23
|
+
prefix: "Okta",
|
|
24
|
+
service: "Okta",
|
|
25
|
+
labels: "okta",
|
|
26
|
+
propagate: "w3c",
|
|
27
|
+
} as const;
|
|
28
|
+
|
|
29
|
+
export class BadRequest
|
|
30
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
31
|
+
/*@__PURE__*/ S.TaggedError<BadRequest>()("BadRequest", {
|
|
32
|
+
code: S.Number,
|
|
33
|
+
message: S.String,
|
|
34
|
+
body: /*@__PURE__*/ S.optional(
|
|
35
|
+
/*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]),
|
|
36
|
+
),
|
|
37
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
38
|
+
}).pipe(C.withBadRequestError),
|
|
39
|
+
[{ status: 400 }],
|
|
40
|
+
)
|
|
41
|
+
{
|
|
42
|
+
declare readonly body?: Error | string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export class Forbidden
|
|
46
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
47
|
+
/*@__PURE__*/ S.TaggedError<Forbidden>()("Forbidden", {
|
|
48
|
+
code: S.Number,
|
|
49
|
+
message: S.String,
|
|
50
|
+
body: /*@__PURE__*/ S.optional(
|
|
51
|
+
/*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]),
|
|
52
|
+
),
|
|
53
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
54
|
+
}).pipe(C.withAuthError),
|
|
55
|
+
[{ status: 403 }],
|
|
56
|
+
)
|
|
57
|
+
{
|
|
58
|
+
declare readonly body?: Error | string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export class NotFound
|
|
62
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
63
|
+
/*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
|
|
64
|
+
code: S.Number,
|
|
65
|
+
message: S.String,
|
|
66
|
+
body: /*@__PURE__*/ S.optional(
|
|
67
|
+
/*@__PURE__*/ S.Union([/*@__PURE__*/ S.suspend(() => __S(2, __c0, 2)), S.String]),
|
|
68
|
+
),
|
|
69
|
+
headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
|
|
70
|
+
}).pipe(C.withBadRequestError),
|
|
71
|
+
[{ status: 404 }],
|
|
72
|
+
)
|
|
73
|
+
{
|
|
74
|
+
declare readonly body?: Error | string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type GetDeviceOSAccountRequestExpandItem = "users" | "account_linked_enrollments";
|
|
78
|
+
export type GetDeviceOSAccountRequestExpandList = Array<
|
|
79
|
+
GetDeviceOSAccountRequestExpandItem | (string & {})
|
|
80
|
+
>;
|
|
81
|
+
export interface GetDeviceOSAccountRequest {
|
|
82
|
+
/** `id` of the device */
|
|
83
|
+
deviceId: string;
|
|
84
|
+
/** The unique identifier for the OS account */
|
|
85
|
+
osAccountId: string;
|
|
86
|
+
/** Comma-separated list of related resources to include in the `_embedded` attribute. Supported values are `users` and `account_linked_enrollments`. */
|
|
87
|
+
expand?: GetDeviceOSAccountRequestExpandList | undefined;
|
|
88
|
+
}
|
|
89
|
+
/** OS platform for OS accounts (desktop platforms only) */
|
|
90
|
+
export type OSAccountWindowsOutputPlatform = "WINDOWS";
|
|
91
|
+
/** Display name of the OS account */
|
|
92
|
+
export interface OSAccountDisplayName {
|
|
93
|
+
/** Indicates whether the associated value is Personal Identifiable Information (PII) and requires masking */
|
|
94
|
+
sensitive?: boolean | undefined;
|
|
95
|
+
/** Display name of the OS account */
|
|
96
|
+
value?: string | undefined;
|
|
97
|
+
}
|
|
98
|
+
/** Status of the OS account */
|
|
99
|
+
export type OSAccountStatus = "ACTIVE" | "DELETED";
|
|
100
|
+
/** Authentication method used for the enrollment */
|
|
101
|
+
export type AccountLinkedEnrollmentProfileAuthenticationMethod = "PASSWORD" | "SECURE_ENCLAVE";
|
|
102
|
+
/** Profile details for a linked enrollment */
|
|
103
|
+
export interface AccountLinkedEnrollmentProfile {
|
|
104
|
+
/** Authentication method used for the enrollment */
|
|
105
|
+
authenticationMethod?: AccountLinkedEnrollmentProfileAuthenticationMethod | undefined;
|
|
106
|
+
}
|
|
107
|
+
/** Status of the enrollment. Possible values depend on `type`. For `platform_sso` - `ACTIVE`, `SUSPENDED`, `REVOKED`. For `desktop_mfa` - `ACTIVE`, `DELETED`. */
|
|
108
|
+
export type AccountLinkedEnrollmentStatus = "ACTIVE" | "SUSPENDED" | "REVOKED" | "DELETED";
|
|
109
|
+
/** Type of the linked enrollment */
|
|
110
|
+
export type AccountLinkedEnrollmentType = "platform_sso" | "desktop_mfa";
|
|
111
|
+
/** Embedded data for a linked enrollment */
|
|
112
|
+
export interface AccountLinkedEnrollmentEmbedded {
|
|
113
|
+
/** Timestamp of the last successful authentication */
|
|
114
|
+
lastAuthenticatedOn?: string | undefined;
|
|
115
|
+
}
|
|
116
|
+
/** An enrollment linked to an OS account */
|
|
117
|
+
export interface AccountLinkedEnrollment {
|
|
118
|
+
/** Timestamp when the enrollment was created */
|
|
119
|
+
created?: string | undefined;
|
|
120
|
+
/** Unique identifier of the enrollment */
|
|
121
|
+
id?: string | undefined;
|
|
122
|
+
/** Timestamp when the enrollment was last updated */
|
|
123
|
+
lastUpdated?: string | undefined;
|
|
124
|
+
profile?: AccountLinkedEnrollmentProfile | undefined;
|
|
125
|
+
/** Status of the enrollment. Possible values depend on `type`. For `platform_sso` - `ACTIVE`, `SUSPENDED`, `REVOKED`. For `desktop_mfa` - `ACTIVE`, `DELETED`. */
|
|
126
|
+
status?: AccountLinkedEnrollmentStatus | undefined;
|
|
127
|
+
/** Type of the linked enrollment */
|
|
128
|
+
type?: AccountLinkedEnrollmentType | undefined;
|
|
129
|
+
_embedded?: AccountLinkedEnrollmentEmbedded | undefined;
|
|
130
|
+
}
|
|
131
|
+
/** Enrollments linked to this OS account */
|
|
132
|
+
export type OSAccountEmbeddedOutputAccountLinkedEnrollmentsList = Array<AccountLinkedEnrollment>;
|
|
133
|
+
/** The algorithm used to generate the hash using the password (and salt, when applicable). */
|
|
134
|
+
export type PasswordCredentialHashAlgorithm =
|
|
135
|
+
| "BCRYPT"
|
|
136
|
+
| "MD5"
|
|
137
|
+
| "PBKDF2"
|
|
138
|
+
| "SHA-1"
|
|
139
|
+
| "SHA-256"
|
|
140
|
+
| "SHA-512";
|
|
141
|
+
/** Algorithm used to generate the key. Only required for the PBKDF2 algorithm. */
|
|
142
|
+
export type DigestAlgorithm = "SHA256_HMAC" | "SHA512_HMAC";
|
|
143
|
+
/** Specifies a hashed password to import into Okta. This allows an existing password to be imported into Okta directly from some other store. Okta supports the BCRYPT, SHA-512, SHA-256, SHA-1, MD5, and PBKDF2 hash functions for password import. A hashed password may be specified in a password object when creating or updating a user, but not for other operations. See the [Create user with imported hashed password](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/User/#create-user-with-imported-hashed-password) description. When you update a user with a hashed password, the user must be in the `STAGED` status. */
|
|
144
|
+
export interface PasswordCredentialHash {
|
|
145
|
+
algorithm?: PasswordCredentialHashAlgorithm | undefined;
|
|
146
|
+
digestAlgorithm?: DigestAlgorithm | undefined;
|
|
147
|
+
/** The number of iterations used when hashing passwords using PBKDF2. Must be >= 4096. Only required for PBKDF2 algorithm. */
|
|
148
|
+
iterationCount?: number | undefined;
|
|
149
|
+
/** Size of the derived key in bytes. Only required for PBKDF2 algorithm. */
|
|
150
|
+
keySize?: number | undefined;
|
|
151
|
+
/** Only required for salted hashes. For BCRYPT, this specifies Radix-64 as the encoded salt used to generate the hash, which must be 22 characters long. For other salted hashes, this specifies the Base64-encoded salt used to generate the hash. */
|
|
152
|
+
salt?: string | undefined;
|
|
153
|
+
/** Specifies whether salt was pre- or postfixed to the password before hashing. Only required for salted algorithms. */
|
|
154
|
+
saltOrder?: string | undefined;
|
|
155
|
+
/** For SHA-512, SHA-256, SHA-1, MD5, and PBKDF2, this is the actual base64-encoded hash of the password (and salt, if used). This is the Base64-encoded `value` of the SHA-512/SHA-256/SHA-1/MD5/PBKDF2 digest that was computed by either pre-fixing or post-fixing the `salt` to the `password`, depending on the `saltOrder`. If a `salt` was not used in the `source` system, then this should just be the Base64-encoded `value` of the password's SHA-512/SHA-256/SHA-1/MD5/PBKDF2 digest. For BCRYPT, this is the actual Radix-64 encoded hashed password. */
|
|
156
|
+
value?: string | undefined;
|
|
157
|
+
/** Governs the strength of the hash and the time required to compute it. Only required for BCRYPT algorithm. */
|
|
158
|
+
workFactor?: number | undefined;
|
|
159
|
+
}
|
|
160
|
+
/** Specify a [password import inline hook](/openapi/okta-management/management/tags/inlinehook/createpasswordimportinlinehook) to trigger verification of the user's password the first time the user signs in. This allows an existing password to be imported into Okta directly from some other store. */
|
|
161
|
+
export interface PasswordCredentialHook {
|
|
162
|
+
/** The type of password inline hook. Currently, must be set to default. */
|
|
163
|
+
type?: string | undefined;
|
|
164
|
+
}
|
|
165
|
+
/** Specifies a password for a user. When a user has a valid password, imported hashed password, or password hook, and a response object contains a password credential, then the password object is a bare object without the value property defined (for example, `password: {}`). This indicates that a password value exists. You can modify password policy requirements in the Admin Console by editing the Password authenticator: **Security** > **Authenticators** > **Password** (or for Okta Classic orgs, use **Security** > **Authentication** > **Password**). For information on defaults and configuring your password policies, see [Configure the password authenticator](https://help.okta.com/okta_help.htm?type=oie&id=ext-configure-password) in the help documentation. */
|
|
166
|
+
export interface PasswordCredentialOutput {
|
|
167
|
+
hash?: PasswordCredentialHash | undefined;
|
|
168
|
+
hook?: PasswordCredentialHook | undefined;
|
|
169
|
+
}
|
|
170
|
+
/** The type of authentication provider */
|
|
171
|
+
export type AuthenticationProviderType =
|
|
172
|
+
| "ACTIVE_DIRECTORY"
|
|
173
|
+
| "FEDERATION"
|
|
174
|
+
| "IMPORT"
|
|
175
|
+
| "LDAP"
|
|
176
|
+
| "OKTA"
|
|
177
|
+
| "SOCIAL";
|
|
178
|
+
/** Specifies the authentication provider that validates the user's password credential. The user's current provider is managed by the **Delegated Authentication** settings for your org. The provider object is **read-only**. */
|
|
179
|
+
export interface AuthenticationProvider {
|
|
180
|
+
/** The name of the authentication provider */
|
|
181
|
+
name?: string | undefined;
|
|
182
|
+
type?: AuthenticationProviderType | undefined;
|
|
183
|
+
}
|
|
184
|
+
/** Specifies a secret question and answer that's validated (case insensitive) when a user forgets their password or unlocks their account. The answer property is write-only. */
|
|
185
|
+
export interface RecoveryQuestionCredentialOutput {
|
|
186
|
+
/** The recovery question */
|
|
187
|
+
question?: string | undefined;
|
|
188
|
+
}
|
|
189
|
+
/** Specifies primary authentication and recovery credentials for a user. Credential types and requirements vary depending on the provider and security policy of the org. */
|
|
190
|
+
export interface UserCredentialsOutput {
|
|
191
|
+
password?: PasswordCredentialOutput | undefined;
|
|
192
|
+
provider?: AuthenticationProvider | undefined;
|
|
193
|
+
recovery_question?: RecoveryQuestionCredentialOutput | undefined;
|
|
194
|
+
}
|
|
195
|
+
/** Specifies the default and custom profile properties for a user. The default user profile is based on the [System for Cross-domain Identity Management: Core Schema](https://datatracker.ietf.org/doc/html/rfc7643). The only permitted customizations of the default profile are to update permissions, change whether the `firstName` and `lastName` properties are nullable, and specify a [pattern](https://developer.okta.com/docs/reference/api/schemas/#login-pattern-validation) for `login`. You can use the Profile Editor in the Admin Console or the [Schemas API](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/UISchema/#tag/UISchema) to make schema modifications. You can extend user profiles with custom properties. You must first add the custom property to the user profile schema before you reference it. You can use the Profile Editor in the Admin Console or the [Schemas API](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/UISchema/#tag/UISchema) to manage schema extensions. Custom attributes can contain HTML tags. It's the client's responsibility to escape or encode this data before displaying it. Use [best-practices](https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html) to prevent cross-site scripting. */
|
|
196
|
+
export interface UserProfile {
|
|
197
|
+
/** The city or locality of the user's address (`locality`) */
|
|
198
|
+
city?: string | null | undefined;
|
|
199
|
+
/** Name of the cost center assigned to a user */
|
|
200
|
+
costCenter?: string | null | undefined;
|
|
201
|
+
/** The country name component of the user's address (`country`). For validation, see [ISO 3166-1 alpha 2 "short" code format](https://datatracker.ietf.org/doc/html/draft-ietf-scim-core-schema-22#ref-ISO3166). */
|
|
202
|
+
countryCode?: string | null | undefined;
|
|
203
|
+
/** Name of the user's department */
|
|
204
|
+
department?: string | undefined;
|
|
205
|
+
/** Name of the user suitable for display to end users */
|
|
206
|
+
displayName?: string | null | undefined;
|
|
207
|
+
/** Name of the user's division */
|
|
208
|
+
division?: string | null | undefined;
|
|
209
|
+
/** The primary email address of the user. For validation, see [RFC 5322 Section 3.2.3](https://datatracker.ietf.org/doc/html/rfc5322#section-3.2.3). */
|
|
210
|
+
email?: string | undefined;
|
|
211
|
+
/** The organization or company assigned unique identifier for the user */
|
|
212
|
+
employeeNumber?: string | undefined;
|
|
213
|
+
/** Given name of the user (`givenName`) */
|
|
214
|
+
firstName?: string | null | undefined;
|
|
215
|
+
/** Honorific prefix(es) of the user, or title in most Western languages */
|
|
216
|
+
honorificPrefix?: string | null | undefined;
|
|
217
|
+
/** Honorific suffix(es) of the user */
|
|
218
|
+
honorificSuffix?: string | null | undefined;
|
|
219
|
+
/** The family name of the user (`familyName`) */
|
|
220
|
+
lastName?: string | null | undefined;
|
|
221
|
+
/** The user's default location for purposes of localizing items such as currency, date time format, numerical representations, and so on. A locale value is a concatenation of the ISO 639-1 two-letter language code, an underscore, and the ISO 3166-1 two-letter country code. For example, en_US specifies the language English and country US. This value is `en_US` by default. */
|
|
222
|
+
locale?: string | undefined;
|
|
223
|
+
/** The unique identifier for the user (`username`). For validation, see [Login pattern validation](https://developer.okta.com/docs/reference/api/schemas/#login-pattern-validation). Every user within your Okta org must have a unique identifier for a login. This constraint applies to all users you import from other systems or applications such as Active Directory. Your organization is the top-level namespace to mix and match logins from all your connected applications or directories. Careful consideration of naming conventions for your login identifier will make it easier to onboard new applications in the future. Logins are not considered unique if they differ only in case and/or diacritical marks. If one of your users has a login of `Isaac.Brock@example.com`, there cannot be another user whose login is `isaac.brock@example.com`, nor `isáàc.bröck@example.com`. Okta has a default ambiguous name resolution policy for usernames that include @-signs. By default, usernames must be formatted as email addresses and thus always include @-signs. You can remove that restriction using either the Admin Console or the [Schemas API](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Schema/). Users can sign in with their non-qualified short name (for example: `isaac.brock` with username `isaac.brock@example.com`) as long as the short name is still unique within the org. */
|
|
224
|
+
login?: string | undefined;
|
|
225
|
+
/** The `displayName` of the user's manager */
|
|
226
|
+
manager?: string | null | undefined;
|
|
227
|
+
/** The `id` of the user's manager */
|
|
228
|
+
managerId?: string | null | undefined;
|
|
229
|
+
/** The middle name of the user */
|
|
230
|
+
middleName?: string | null | undefined;
|
|
231
|
+
/** The mobile phone number of the user */
|
|
232
|
+
mobilePhone?: string | null | undefined;
|
|
233
|
+
/** The casual way to address the user in real life */
|
|
234
|
+
nickName?: string | null | undefined;
|
|
235
|
+
/** Name of the the user's organization */
|
|
236
|
+
organization?: string | null | undefined;
|
|
237
|
+
/** Mailing address component of the user's address */
|
|
238
|
+
postalAddress?: string | null | undefined;
|
|
239
|
+
/** The user's preferred written or spoken language. For validation, see [RFC 7231 Section 5.3.5](https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.5). */
|
|
240
|
+
preferredLanguage?: string | null | undefined;
|
|
241
|
+
/** The primary phone number of the user such as a home number */
|
|
242
|
+
primaryPhone?: string | null | undefined;
|
|
243
|
+
/** The URL of the user's online profile. For example, a web page. See [URL](https://datatracker.ietf.org/doc/html/rfc1808). */
|
|
244
|
+
profileUrl?: string | null | undefined;
|
|
245
|
+
/** The secondary email address of the user typically used for account recovery. For validation, see [RFC 5322 Section 3.2.3](https://datatracker.ietf.org/doc/html/rfc5322#section-3.2.3). */
|
|
246
|
+
secondEmail?: string | null | undefined;
|
|
247
|
+
/** The state or region component of the user's address (`region`) */
|
|
248
|
+
state?: string | null | undefined;
|
|
249
|
+
/** The full street address component of the user's address */
|
|
250
|
+
streetAddress?: string | null | undefined;
|
|
251
|
+
/** The user's time zone */
|
|
252
|
+
timezone?: string | null | undefined;
|
|
253
|
+
/** The user's title, such as Vice President */
|
|
254
|
+
title?: string | null | undefined;
|
|
255
|
+
/** The property used to describe the organization-to-user relationship, such as employee or contractor > **Note:** The `userType` property is a standard string attribute and should be treated as a descriptive label rather than a functional setting. Unlike a user's assigned user [`type`](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/User/#tag/User/operation/createUser!path=type&t=request), this property is purely informational and doesn't influence the behavior of the Okta platform. */
|
|
256
|
+
userType?: string | null | undefined;
|
|
257
|
+
/** The ZIP code or postal code component of the user's address (`postalCode`) */
|
|
258
|
+
zipCode?: string | null | undefined;
|
|
259
|
+
[key: string]: unknown;
|
|
260
|
+
}
|
|
261
|
+
/** The current status of the user. The status of a user changes in response to explicit events, such as admin-driven lifecycle changes, user login, or self-service password recovery. Okta doesn't asynchronously sweep through users and update their password expiry state, for example. Instead, Okta evaluates password policy at login time, notices the password has expired, and moves the user to the expired state. When running reports, remember that the data is valid as of the last login or lifecycle event for that user. > **Note:** The `ACTIVATING` status is a transitional status that occurs when a user is being activated but hasn't completed the activation process. This status isn't directly settable through the API, nor should you use it for any of your user management workflows. */
|
|
262
|
+
export type UserStatus =
|
|
263
|
+
| "ACTIVE"
|
|
264
|
+
| "DEPROVISIONED"
|
|
265
|
+
| "LOCKED_OUT"
|
|
266
|
+
| "PASSWORD_EXPIRED"
|
|
267
|
+
| "PROVISIONED"
|
|
268
|
+
| "RECOVERY"
|
|
269
|
+
| "STAGED"
|
|
270
|
+
| "SUSPENDED";
|
|
271
|
+
/** The target status of an in-progress asynchronous status transition. This property is only returned if the user's state is transitioning. */
|
|
272
|
+
export type UserOutputTransitioningToStatus = "ACTIVE" | "DEPROVISIONED" | "PROVISIONED";
|
|
273
|
+
/** The user type that determines the schema for the user's profile. The `type` property is a map that identifies the [User Types](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/UserType/#tag/UserType). Currently it contains a single element, `id`. It can be specified when creating a new user, and can be updated by an admin on a full replace of an existing user (but not a partial update). */
|
|
274
|
+
export interface UserOutputType {
|
|
275
|
+
/** The ID of the user type */
|
|
276
|
+
id?: string | undefined;
|
|
277
|
+
}
|
|
278
|
+
/** Embedded resources related to the user using the [JSON Hypertext Application Language](https://datatracker.ietf.org/doc/html/draft-kelly-json-hal-06) specification */
|
|
279
|
+
export type UserOutputEmbeddedMap = { [key: string]: unknown | undefined };
|
|
280
|
+
export type HttpMethod = "DELETE" | "GET" | "POST" | "PUT";
|
|
281
|
+
export type HrefHintsAllowList = Array<HttpMethod>;
|
|
282
|
+
/** Describes allowed HTTP verbs for the `href` */
|
|
283
|
+
export interface HrefHints {
|
|
284
|
+
allow?: HrefHintsAllowList | undefined;
|
|
285
|
+
}
|
|
286
|
+
export interface HrefObjectSelfLink {
|
|
287
|
+
hints?: HrefHints | undefined;
|
|
288
|
+
/** Link URI */
|
|
289
|
+
href: string;
|
|
290
|
+
/** Link name */
|
|
291
|
+
name?: string | undefined;
|
|
292
|
+
/** Indicates whether the link object's `href` property is a URI template. */
|
|
293
|
+
templated?: boolean | undefined;
|
|
294
|
+
/** The media type of the link. If omitted, it is implicitly `application/json`. */
|
|
295
|
+
type?: string | undefined;
|
|
296
|
+
[key: string]: unknown;
|
|
297
|
+
}
|
|
298
|
+
export type HrefObject = HrefObjectSelfLink;
|
|
299
|
+
/** Specifies link relations (see [Web Linking](https://datatracker.ietf.org/doc/html/rfc8288) available for the current status of a user. The links object is used for dynamic discovery of related resources, lifecycle operations, and credential operations. The links object is read-only. For an individual user result, the links object contains a full set of link relations available for that user as determined by your policies. For a collection of users, the links object contains only the `self` link. Operations that return a collection of users include [List all users](https://developer.okta.com/docs/api/openapi/okta-management/management/user/listusers) and [List all group member users](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Group/#tag/Group/operation/listGroupUsers). */
|
|
300
|
+
export interface UserOutputLinks {
|
|
301
|
+
/** URL to the individual user */
|
|
302
|
+
self?: HrefObjectSelfLink | undefined;
|
|
303
|
+
/** URL to activate the user */
|
|
304
|
+
activate?: HrefObjectSelfLink | undefined;
|
|
305
|
+
/** URL to reset the user's password */
|
|
306
|
+
resetPassword?: HrefObjectSelfLink | undefined;
|
|
307
|
+
/** URL to reset the user's factors */
|
|
308
|
+
resetFactors?: HrefObjectSelfLink | undefined;
|
|
309
|
+
/** URL to expire the user's password */
|
|
310
|
+
expirePassword?: HrefObjectSelfLink | undefined;
|
|
311
|
+
/** URL to initiate a forgot password operation */
|
|
312
|
+
forgotPassword?: HrefObjectSelfLink | undefined;
|
|
313
|
+
/** URL to change the user's recovery question */
|
|
314
|
+
changeRecoveryQuestion?: HrefObjectSelfLink | undefined;
|
|
315
|
+
/** URL to deactivate a user */
|
|
316
|
+
deactivate?: HrefObjectSelfLink | undefined;
|
|
317
|
+
/** URL to reactivate the user */
|
|
318
|
+
reactivate?: HrefObjectSelfLink | undefined;
|
|
319
|
+
/** URL to change the user's password */
|
|
320
|
+
changePassword?: HrefObjectSelfLink | undefined;
|
|
321
|
+
/** URL to the user's profile schema */
|
|
322
|
+
schema?: HrefObjectSelfLink | undefined;
|
|
323
|
+
/** URL to suspend the user */
|
|
324
|
+
suspend?: HrefObjectSelfLink | undefined;
|
|
325
|
+
/** URL to unsuspend the user */
|
|
326
|
+
unsuspend?: HrefObjectSelfLink | undefined;
|
|
327
|
+
/** URL to unlock the locked-out user */
|
|
328
|
+
unlock?: HrefObjectSelfLink | undefined;
|
|
329
|
+
/** URL to the user type */
|
|
330
|
+
type?: HrefObjectSelfLink | undefined;
|
|
331
|
+
}
|
|
332
|
+
export interface UserOutput {
|
|
333
|
+
/** The timestamp when the user status transitioned to `ACTIVE` */
|
|
334
|
+
activated?: string | null | undefined;
|
|
335
|
+
/** The timestamp when the user was created */
|
|
336
|
+
created?: string | undefined;
|
|
337
|
+
credentials?: UserCredentialsOutput | undefined;
|
|
338
|
+
/** The unique key for the user */
|
|
339
|
+
id?: string | undefined;
|
|
340
|
+
/** The timestamp of the last login */
|
|
341
|
+
lastLogin?: string | null | undefined;
|
|
342
|
+
/** The timestamp when the user was last updated */
|
|
343
|
+
lastUpdated?: string | undefined;
|
|
344
|
+
/** The timestamp when the user's password was last updated */
|
|
345
|
+
passwordChanged?: string | Redacted.Redacted<string> | null | undefined;
|
|
346
|
+
profile?: UserProfile | undefined;
|
|
347
|
+
/** The ID of the realm in which the user is residing. See [Realms](/openapi/okta-management/management/tags/realm). */
|
|
348
|
+
realmId?: string | undefined;
|
|
349
|
+
status?: UserStatus | undefined;
|
|
350
|
+
/** The timestamp when the status of the user last changed */
|
|
351
|
+
statusChanged?: string | null | undefined;
|
|
352
|
+
/** The target status of an in-progress asynchronous status transition. This property is only returned if the user's state is transitioning. */
|
|
353
|
+
transitioningToStatus?: UserOutputTransitioningToStatus | null | undefined;
|
|
354
|
+
/** The user type that determines the schema for the user's profile. The `type` property is a map that identifies the [User Types](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/UserType/#tag/UserType). Currently it contains a single element, `id`. It can be specified when creating a new user, and can be updated by an admin on a full replace of an existing user (but not a partial update). */
|
|
355
|
+
type?: UserOutputType | undefined;
|
|
356
|
+
/** Embedded resources related to the user using the [JSON Hypertext Application Language](https://datatracker.ietf.org/doc/html/draft-kelly-json-hal-06) specification */
|
|
357
|
+
_embedded?: UserOutputEmbeddedMap | undefined;
|
|
358
|
+
/** Specifies link relations (see [Web Linking](https://datatracker.ietf.org/doc/html/rfc8288) available for the current status of a user. The links object is used for dynamic discovery of related resources, lifecycle operations, and credential operations. The links object is read-only. For an individual user result, the links object contains a full set of link relations available for that user as determined by your policies. For a collection of users, the links object contains only the `self` link. Operations that return a collection of users include [List all users](https://developer.okta.com/docs/api/openapi/okta-management/management/user/listusers) and [List all group member users](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/Group/#tag/Group/operation/listGroupUsers). */
|
|
359
|
+
_links?: UserOutputLinks | undefined;
|
|
360
|
+
}
|
|
361
|
+
/** Users associated with this OS account */
|
|
362
|
+
export type OSAccountEmbeddedOutputUsersList = Array<UserOutput>;
|
|
363
|
+
/** Embedded resources related to the OS account */
|
|
364
|
+
export interface OSAccountEmbeddedOutput {
|
|
365
|
+
/** Enrollments linked to this OS account */
|
|
366
|
+
accountLinkedEnrollments?: OSAccountEmbeddedOutputAccountLinkedEnrollmentsList | undefined;
|
|
367
|
+
/** Users associated with this OS account */
|
|
368
|
+
users?: OSAccountEmbeddedOutputUsersList | undefined;
|
|
369
|
+
}
|
|
370
|
+
export interface OSAccountLinks {
|
|
371
|
+
device?: HrefObjectSelfLink | undefined;
|
|
372
|
+
self?: HrefObjectSelfLink | undefined;
|
|
373
|
+
}
|
|
374
|
+
/** Profile type discriminator */
|
|
375
|
+
export type WindowsOSAccountProfileType = "WINDOWS";
|
|
376
|
+
export interface WindowsOSAccountProfile {
|
|
377
|
+
/** Active Directory join status */
|
|
378
|
+
directoryJoinStatus?: string | undefined;
|
|
379
|
+
/** Domain\username format (down-level logon name) */
|
|
380
|
+
downLevelUsername?: string | undefined;
|
|
381
|
+
/** Full name of the account user */
|
|
382
|
+
fullName?: string | undefined;
|
|
383
|
+
/** Globally Unique Identifier for the account */
|
|
384
|
+
GUID?: string | undefined;
|
|
385
|
+
/** Fully qualified username */
|
|
386
|
+
qualifiedUsername?: string | undefined;
|
|
387
|
+
/** Windows Security Identifier (SID) */
|
|
388
|
+
securityId?: string | undefined;
|
|
389
|
+
/** Profile type discriminator */
|
|
390
|
+
type?: WindowsOSAccountProfileType | undefined;
|
|
391
|
+
/** User principal name */
|
|
392
|
+
upn?: string | undefined;
|
|
393
|
+
}
|
|
394
|
+
export interface OSAccountWindowsOutput {
|
|
395
|
+
/** Timestamp when the OS account was created */
|
|
396
|
+
created: string;
|
|
397
|
+
/** Unique identifier of the device this OS account belongs to */
|
|
398
|
+
deviceId: string;
|
|
399
|
+
/** Unique identifier for the OS account */
|
|
400
|
+
id: string;
|
|
401
|
+
/** Timestamp when the OS account was last seen */
|
|
402
|
+
lastSeenAt?: string | null | undefined;
|
|
403
|
+
/** Timestamp when the OS account was last updated */
|
|
404
|
+
lastUpdated: string;
|
|
405
|
+
/** OS platform for OS accounts (desktop platforms only) */
|
|
406
|
+
platform: OSAccountWindowsOutputPlatform;
|
|
407
|
+
resourceAlternateId?: string | null | undefined;
|
|
408
|
+
resourceDisplayName?: OSAccountDisplayName | undefined;
|
|
409
|
+
/** Alternate key for the `id` */
|
|
410
|
+
resourceId?: string | undefined;
|
|
411
|
+
resourceType?: string | undefined;
|
|
412
|
+
/** Status of the OS account */
|
|
413
|
+
status: OSAccountStatus;
|
|
414
|
+
_embedded?: OSAccountEmbeddedOutput | undefined;
|
|
415
|
+
_links: OSAccountLinks;
|
|
416
|
+
profile: WindowsOSAccountProfile;
|
|
417
|
+
}
|
|
418
|
+
/** OS platform for OS accounts (desktop platforms only) */
|
|
419
|
+
export type OSAccountMacOSOutputPlatform = "MACOS";
|
|
420
|
+
/** Profile type discriminator */
|
|
421
|
+
export type MacOSAccountProfileType = "MACOS";
|
|
422
|
+
export interface MacOSAccountProfile {
|
|
423
|
+
/** Unique identifier for the macOS account */
|
|
424
|
+
accountUuid?: string | undefined;
|
|
425
|
+
/** Full name of the account user */
|
|
426
|
+
fullName?: string | undefined;
|
|
427
|
+
/** Profile type discriminator */
|
|
428
|
+
type?: MacOSAccountProfileType | undefined;
|
|
429
|
+
/** Username of the account */
|
|
430
|
+
username?: string | undefined;
|
|
431
|
+
}
|
|
432
|
+
export interface OSAccountMacOSOutput {
|
|
433
|
+
/** Timestamp when the OS account was created */
|
|
434
|
+
created: string;
|
|
435
|
+
/** Unique identifier of the device this OS account belongs to */
|
|
436
|
+
deviceId: string;
|
|
437
|
+
/** Unique identifier for the OS account */
|
|
438
|
+
id: string;
|
|
439
|
+
/** Timestamp when the OS account was last seen */
|
|
440
|
+
lastSeenAt?: string | null | undefined;
|
|
441
|
+
/** Timestamp when the OS account was last updated */
|
|
442
|
+
lastUpdated: string;
|
|
443
|
+
/** OS platform for OS accounts (desktop platforms only) */
|
|
444
|
+
platform: OSAccountMacOSOutputPlatform;
|
|
445
|
+
resourceAlternateId?: string | null | undefined;
|
|
446
|
+
resourceDisplayName?: OSAccountDisplayName | undefined;
|
|
447
|
+
/** Alternate key for the `id` */
|
|
448
|
+
resourceId?: string | undefined;
|
|
449
|
+
resourceType?: string | undefined;
|
|
450
|
+
/** Status of the OS account */
|
|
451
|
+
status: OSAccountStatus;
|
|
452
|
+
_embedded?: OSAccountEmbeddedOutput | undefined;
|
|
453
|
+
_links: OSAccountLinks;
|
|
454
|
+
profile: MacOSAccountProfile;
|
|
455
|
+
}
|
|
456
|
+
export type GetDeviceOSAccountResponseBody = OSAccountWindowsOutput | OSAccountMacOSOutput;
|
|
457
|
+
export type GetDeviceOSAccountResponse = GetDeviceOSAccountResponseBody;
|
|
458
|
+
export interface GetDRStatusRequest {}
|
|
459
|
+
/** Status whether a domain has been failed over or not */
|
|
460
|
+
export interface DRStatusItem {
|
|
461
|
+
/** Domain for your org */
|
|
462
|
+
domain?: string | undefined;
|
|
463
|
+
/** Indicates if the domain has been failed over */
|
|
464
|
+
isFailedOver?: boolean | undefined;
|
|
465
|
+
}
|
|
466
|
+
/** List of domains and their disaster recovery status */
|
|
467
|
+
export type GetDRStatusResponseStatusList = Array<DRStatusItem>;
|
|
468
|
+
export interface GetDRStatusResponse {
|
|
469
|
+
/** List of domains and their disaster recovery status */
|
|
470
|
+
status?: GetDRStatusResponseStatusList | undefined;
|
|
471
|
+
}
|
|
472
|
+
export interface GetDRStatusByDomainRequest {
|
|
473
|
+
/** The Okta domain name of your org or one of your custom domains */
|
|
474
|
+
domain: string;
|
|
475
|
+
}
|
|
476
|
+
/** List of domains and their disaster recovery status */
|
|
477
|
+
export type GetDRStatusByDomainResponseStatusList = Array<DRStatusItem>;
|
|
478
|
+
export interface GetDRStatusByDomainResponse {
|
|
479
|
+
/** List of domains and their disaster recovery status */
|
|
480
|
+
status?: GetDRStatusByDomainResponseStatusList | undefined;
|
|
481
|
+
}
|
|
482
|
+
export interface GetUserClassificationRequest {
|
|
483
|
+
/** ID of an existing Okta user */
|
|
484
|
+
userId: string;
|
|
485
|
+
}
|
|
486
|
+
/** The type of user classification */
|
|
487
|
+
export type ClassificationType = "LITE" | "STANDARD";
|
|
488
|
+
export interface UserClassification {
|
|
489
|
+
/** The timestamp when the user classification was last updated */
|
|
490
|
+
lastUpdated?: string | undefined;
|
|
491
|
+
type?: ClassificationType | undefined;
|
|
492
|
+
}
|
|
493
|
+
export type ListDeviceOSAccountsRequestExpandItem = "users" | "account_linked_enrollments";
|
|
494
|
+
export type ListDeviceOSAccountsRequestExpandList = Array<
|
|
495
|
+
ListDeviceOSAccountsRequestExpandItem | (string & {})
|
|
496
|
+
>;
|
|
497
|
+
export interface ListDeviceOSAccountsRequest {
|
|
498
|
+
/** `id` of the device */
|
|
499
|
+
deviceId: string;
|
|
500
|
+
/** Comma-separated list of related resources to include in the `_embedded` attribute. Supported values are `users` and `account_linked_enrollments`. */
|
|
501
|
+
expand?: ListDeviceOSAccountsRequestExpandList | undefined;
|
|
502
|
+
}
|
|
503
|
+
export type ListDeviceOSAccountsResponseBodyItem = OSAccountWindowsOutput | OSAccountMacOSOutput;
|
|
504
|
+
export type ListDeviceOSAccountsResponseBodyList = Array<ListDeviceOSAccountsResponseBodyItem>;
|
|
505
|
+
export type ListDeviceOSAccountsResponse = ListDeviceOSAccountsResponseBodyList;
|
|
506
|
+
export interface ReplaceUserClassificationRequest {
|
|
507
|
+
/** ID of an existing Okta user */
|
|
508
|
+
userId: string;
|
|
509
|
+
type?: ClassificationType | (string & {}) | undefined;
|
|
510
|
+
}
|
|
511
|
+
/** The Okta domain to failback */
|
|
512
|
+
export type FailbackRequestSchemaDomainsList = Array<string>;
|
|
513
|
+
export interface FailbackRequestSchema {
|
|
514
|
+
/** The Okta domain to failback */
|
|
515
|
+
domains?: FailbackRequestSchemaDomainsList | undefined;
|
|
516
|
+
}
|
|
517
|
+
export type StartOrgFailbackRequestBody = FailbackRequestSchema | unknown;
|
|
518
|
+
export interface StartOrgFailbackRequest {
|
|
519
|
+
body?: StartOrgFailbackRequestBody | undefined;
|
|
520
|
+
}
|
|
521
|
+
export interface StartOrgFailbackResponseResultsItem {
|
|
522
|
+
/** Domain for your org */
|
|
523
|
+
domain?: string | undefined;
|
|
524
|
+
/** Domain failback message */
|
|
525
|
+
message?: string | undefined;
|
|
526
|
+
}
|
|
527
|
+
/** Results of the failback operation */
|
|
528
|
+
export type StartOrgFailbackResponseResultsList = Array<StartOrgFailbackResponseResultsItem>;
|
|
529
|
+
export interface StartOrgFailbackResponse {
|
|
530
|
+
/** Results of the failback operation */
|
|
531
|
+
results?: StartOrgFailbackResponseResultsList | undefined;
|
|
532
|
+
}
|
|
533
|
+
/** The Okta domain to failover */
|
|
534
|
+
export type FailoverRequestSchemaDomainsList = Array<string>;
|
|
535
|
+
export interface FailoverRequestSchema {
|
|
536
|
+
/** The Okta domain to failover */
|
|
537
|
+
domains?: FailoverRequestSchemaDomainsList | undefined;
|
|
538
|
+
}
|
|
539
|
+
export type StartOrgFailoverRequestBody = FailoverRequestSchema | unknown;
|
|
540
|
+
export interface StartOrgFailoverRequest {
|
|
541
|
+
body?: StartOrgFailoverRequestBody | undefined;
|
|
542
|
+
}
|
|
543
|
+
export interface StartOrgFailoverResponseResultsItem {
|
|
544
|
+
/** Domain for your org */
|
|
545
|
+
domain?: string | undefined;
|
|
546
|
+
/** Domain failover message */
|
|
547
|
+
message?: string | undefined;
|
|
548
|
+
}
|
|
549
|
+
/** Results of the failover operation */
|
|
550
|
+
export type StartOrgFailoverResponseResultsList = Array<StartOrgFailoverResponseResultsItem>;
|
|
551
|
+
export interface StartOrgFailoverResponse {
|
|
552
|
+
/** Results of the failover operation */
|
|
553
|
+
results?: StartOrgFailoverResponseResultsList | undefined;
|
|
554
|
+
}
|
|
555
|
+
export interface ErrorCause {
|
|
556
|
+
errorSummary?: string | undefined;
|
|
557
|
+
}
|
|
558
|
+
export type ErrorErrorCausesList = Array<ErrorCause>;
|
|
559
|
+
export interface Error {
|
|
560
|
+
errorCauses?: ErrorErrorCausesList | undefined;
|
|
561
|
+
/** An Okta code for this type of error */
|
|
562
|
+
errorCode?: string | undefined;
|
|
563
|
+
/** A unique identifier for this error. This can be used by Okta Support to help with troubleshooting. */
|
|
564
|
+
errorId?: string | undefined;
|
|
565
|
+
/** An Okta code for this type of error */
|
|
566
|
+
errorLink?: string | undefined;
|
|
567
|
+
/** A short description of what caused this error. Sometimes this contains dynamically-generated information about your specific error. */
|
|
568
|
+
errorSummary?: string | undefined;
|
|
569
|
+
}
|
|
570
|
+
export type GetDeviceOSAccountError = Forbidden | NotFound | OktaOpError;
|
|
571
|
+
/** Retrieve an OS account Retrieves an OS account by `osAccountId` for a device */
|
|
572
|
+
export const getDeviceOSAccount: API.OperationMethod<
|
|
573
|
+
GetDeviceOSAccountRequest,
|
|
574
|
+
GetDeviceOSAccountResponse,
|
|
575
|
+
GetDeviceOSAccountError,
|
|
576
|
+
OktaOpContext
|
|
577
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
578
|
+
input: __S(8, __c2, 0) as any as S.Schema<GetDeviceOSAccountRequest>,
|
|
579
|
+
output: __S(9, __c2, 1) as any as S.Schema<GetDeviceOSAccountResponse>,
|
|
580
|
+
errors: [Forbidden, NotFound],
|
|
581
|
+
serviceErrors: OktaServiceErrors,
|
|
582
|
+
protocol: OktaProtocol,
|
|
583
|
+
retry: Retry.Retry,
|
|
584
|
+
telemetry: TELEMETRY,
|
|
585
|
+
span: "GetDeviceOSAccount",
|
|
586
|
+
}));
|
|
587
|
+
|
|
588
|
+
export type GetDRStatusError = BadRequest | Forbidden | OktaOpError;
|
|
589
|
+
/** Retrieve the disaster recovery status for all domains Retrieves the failover or failback status for all the domains for your org */
|
|
590
|
+
export const getDRStatus: API.OperationMethod<
|
|
591
|
+
GetDRStatusRequest,
|
|
592
|
+
GetDRStatusResponse,
|
|
593
|
+
GetDRStatusError,
|
|
594
|
+
OktaOpContext
|
|
595
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
596
|
+
input: __S(16, __c4, 0) as any as S.Schema<GetDRStatusRequest>,
|
|
597
|
+
output: __S(22, __c5, 2) as any as S.Schema<GetDRStatusResponse>,
|
|
598
|
+
errors: [BadRequest, Forbidden],
|
|
599
|
+
serviceErrors: OktaServiceErrors,
|
|
600
|
+
protocol: OktaProtocol,
|
|
601
|
+
retry: Retry.Retry,
|
|
602
|
+
telemetry: TELEMETRY,
|
|
603
|
+
span: "GetDRStatus",
|
|
604
|
+
}));
|
|
605
|
+
|
|
606
|
+
export type GetDRStatusByDomainError = BadRequest | Forbidden | OktaOpError;
|
|
607
|
+
/** Retrieve the disaster recovery status for a domain Retrieves the failover or failback status for the domain specified in the request path */
|
|
608
|
+
export const getDRStatusByDomain: API.OperationMethod<
|
|
609
|
+
GetDRStatusByDomainRequest,
|
|
610
|
+
GetDRStatusByDomainResponse,
|
|
611
|
+
GetDRStatusByDomainError,
|
|
612
|
+
OktaOpContext
|
|
613
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
614
|
+
input: __S(24, __c6, 0) as any as S.Schema<GetDRStatusByDomainRequest>,
|
|
615
|
+
output: __S(22, __c5, 2) as any as S.Schema<GetDRStatusByDomainResponse>,
|
|
616
|
+
errors: [BadRequest, Forbidden],
|
|
617
|
+
serviceErrors: OktaServiceErrors,
|
|
618
|
+
protocol: OktaProtocol,
|
|
619
|
+
retry: Retry.Retry,
|
|
620
|
+
telemetry: TELEMETRY,
|
|
621
|
+
span: "GetDRStatusByDomain",
|
|
622
|
+
}));
|
|
623
|
+
|
|
624
|
+
export type GetUserClassificationError = Forbidden | NotFound | OktaOpError;
|
|
625
|
+
/** Retrieve a user's classification Retrieves a user's classification */
|
|
626
|
+
export const getUserClassification: API.OperationMethod<
|
|
627
|
+
GetUserClassificationRequest,
|
|
628
|
+
UserClassification,
|
|
629
|
+
GetUserClassificationError,
|
|
630
|
+
OktaOpContext
|
|
631
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
632
|
+
input: __S(28, __c7, 0) as any as S.Schema<GetUserClassificationRequest>,
|
|
633
|
+
output: __S(32, __c8, 0) as any as S.Schema<UserClassification>,
|
|
634
|
+
errors: [Forbidden, NotFound],
|
|
635
|
+
serviceErrors: OktaServiceErrors,
|
|
636
|
+
protocol: OktaProtocol,
|
|
637
|
+
retry: Retry.Retry,
|
|
638
|
+
telemetry: TELEMETRY,
|
|
639
|
+
span: "GetUserClassification",
|
|
640
|
+
}));
|
|
641
|
+
|
|
642
|
+
export type ListDeviceOSAccountsError = Forbidden | NotFound | OktaOpError;
|
|
643
|
+
/** List all OS accounts for a device Lists all OS accounts for a device by `deviceId` */
|
|
644
|
+
export const listDeviceOSAccounts: API.OperationMethod<
|
|
645
|
+
ListDeviceOSAccountsRequest,
|
|
646
|
+
ListDeviceOSAccountsResponse,
|
|
647
|
+
ListDeviceOSAccountsError,
|
|
648
|
+
OktaOpContext
|
|
649
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
650
|
+
input: __S(36, __c9, 0) as any as S.Schema<ListDeviceOSAccountsRequest>,
|
|
651
|
+
output: __S(38, __c9, 2) as any as S.Schema<ListDeviceOSAccountsResponse>,
|
|
652
|
+
errors: [Forbidden, NotFound],
|
|
653
|
+
serviceErrors: OktaServiceErrors,
|
|
654
|
+
protocol: OktaProtocol,
|
|
655
|
+
retry: Retry.Retry,
|
|
656
|
+
telemetry: TELEMETRY,
|
|
657
|
+
span: "ListDeviceOSAccounts",
|
|
658
|
+
}));
|
|
659
|
+
|
|
660
|
+
export type ReplaceUserClassificationError = Forbidden | NotFound | OktaOpError;
|
|
661
|
+
/** Replace the user's classification Replaces the user's classification */
|
|
662
|
+
export const replaceUserClassification: API.OperationMethod<
|
|
663
|
+
ReplaceUserClassificationRequest,
|
|
664
|
+
UserClassification,
|
|
665
|
+
ReplaceUserClassificationError,
|
|
666
|
+
OktaOpContext
|
|
667
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
668
|
+
input: __S(40, __c10, 0) as any as S.Schema<ReplaceUserClassificationRequest>,
|
|
669
|
+
output: __S(32, __c8, 0) as any as S.Schema<UserClassification>,
|
|
670
|
+
errors: [Forbidden, NotFound],
|
|
671
|
+
serviceErrors: OktaServiceErrors,
|
|
672
|
+
protocol: OktaProtocol,
|
|
673
|
+
retry: Retry.Retry,
|
|
674
|
+
telemetry: TELEMETRY,
|
|
675
|
+
span: "ReplaceUserClassification",
|
|
676
|
+
}));
|
|
677
|
+
|
|
678
|
+
export type StartOrgFailbackError = BadRequest | Forbidden | OktaOpError;
|
|
679
|
+
/** Start the failback of your org Starts the failback of your org */
|
|
680
|
+
export const startOrgFailback: API.OperationMethod<
|
|
681
|
+
StartOrgFailbackRequest,
|
|
682
|
+
StartOrgFailbackResponse,
|
|
683
|
+
StartOrgFailbackError,
|
|
684
|
+
OktaOpContext
|
|
685
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
686
|
+
input: __S(44, __c11, 0) as any as S.Schema<StartOrgFailbackRequest>,
|
|
687
|
+
output: __S(50, __c12, 2) as any as S.Schema<StartOrgFailbackResponse>,
|
|
688
|
+
errors: [BadRequest, Forbidden],
|
|
689
|
+
serviceErrors: OktaServiceErrors,
|
|
690
|
+
protocol: OktaProtocol,
|
|
691
|
+
retry: Retry.Retry,
|
|
692
|
+
telemetry: TELEMETRY,
|
|
693
|
+
span: "StartOrgFailback",
|
|
694
|
+
}));
|
|
695
|
+
|
|
696
|
+
export type StartOrgFailoverError = BadRequest | Forbidden | OktaOpError;
|
|
697
|
+
/** Start the failover of your org Starts the failover of your org */
|
|
698
|
+
export const startOrgFailover: API.OperationMethod<
|
|
699
|
+
StartOrgFailoverRequest,
|
|
700
|
+
StartOrgFailoverResponse,
|
|
701
|
+
StartOrgFailoverError,
|
|
702
|
+
OktaOpContext
|
|
703
|
+
> = /*@__PURE__*/ API.make(() => ({
|
|
704
|
+
input: __S(4, __c1, 0) as any as S.Schema<StartOrgFailoverRequest>,
|
|
705
|
+
output: __S(50, __c12, 2) as any as S.Schema<StartOrgFailoverResponse>,
|
|
706
|
+
errors: [BadRequest, Forbidden],
|
|
707
|
+
serviceErrors: OktaServiceErrors,
|
|
708
|
+
protocol: OktaProtocol,
|
|
709
|
+
retry: Retry.Retry,
|
|
710
|
+
telemetry: TELEMETRY,
|
|
711
|
+
span: "StartOrgFailover",
|
|
712
|
+
}));
|
|
713
|
+
|
|
714
|
+
// Schema builders: each runs one schema initializer, on that schema's first use.
|
|
715
|
+
function __c0(j: number): any {
|
|
716
|
+
switch (j) {
|
|
717
|
+
case 0:
|
|
718
|
+
return S.suspend(() =>
|
|
719
|
+
S.Struct({
|
|
720
|
+
errorSummary: S.optional(S.String),
|
|
721
|
+
}),
|
|
722
|
+
).annotate({ identifier: "ErrorCause" });
|
|
723
|
+
case 1:
|
|
724
|
+
return S.Array(__S(0, __c0, 0));
|
|
725
|
+
case 2:
|
|
726
|
+
return S.suspend(() =>
|
|
727
|
+
S.Struct({
|
|
728
|
+
errorCauses: S.optional(__S(1, __c0, 1)),
|
|
729
|
+
errorCode: S.optional(S.String),
|
|
730
|
+
errorId: S.optional(S.String),
|
|
731
|
+
errorLink: S.optional(S.String),
|
|
732
|
+
errorSummary: S.optional(S.String),
|
|
733
|
+
}),
|
|
734
|
+
).annotate({ identifier: "Error" });
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
function __c1(j: number): any {
|
|
738
|
+
switch (j) {
|
|
739
|
+
case 0:
|
|
740
|
+
return S.suspend(() =>
|
|
741
|
+
S.Struct({
|
|
742
|
+
body: S.optional(S.Unknown.pipe(T.HttpBody())),
|
|
743
|
+
}).pipe(T.Http({ method: "POST", uri: "/api/v1/dr/failover", code: 200 })),
|
|
744
|
+
).annotate({ identifier: "StartOrgFailoverRequest" });
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
function __c2(j: number): any {
|
|
748
|
+
switch (j) {
|
|
749
|
+
case 0:
|
|
750
|
+
return S.suspend(() =>
|
|
751
|
+
S.Struct({
|
|
752
|
+
deviceId: S.String.pipe(T.Label()),
|
|
753
|
+
osAccountId: S.String.pipe(T.Label()),
|
|
754
|
+
expand: S.optional(__S(12, __c3, 0).pipe(T.Query())),
|
|
755
|
+
}).pipe(
|
|
756
|
+
T.Http({
|
|
757
|
+
method: "GET",
|
|
758
|
+
uri: "/api/v1/devices/{deviceId}/os-accounts/{osAccountId}",
|
|
759
|
+
code: 200,
|
|
760
|
+
}),
|
|
761
|
+
),
|
|
762
|
+
).annotate({ identifier: "GetDeviceOSAccountRequest" });
|
|
763
|
+
case 1:
|
|
764
|
+
return S.suspend(() => S.Unknown.pipe(T.RawResponseRoot())).annotate({
|
|
765
|
+
identifier: "GetDeviceOSAccountResponse",
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
function __c3(j: number): any {
|
|
770
|
+
switch (j) {
|
|
771
|
+
case 0:
|
|
772
|
+
return S.Array(S.String);
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
function __c4(j: number): any {
|
|
776
|
+
switch (j) {
|
|
777
|
+
case 0:
|
|
778
|
+
return S.suspend(() =>
|
|
779
|
+
S.Struct({}).pipe(T.Http({ method: "GET", uri: "/api/v1/dr/status", code: 200 })),
|
|
780
|
+
).annotate({ identifier: "GetDRStatusRequest" });
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
function __c5(j: number): any {
|
|
784
|
+
switch (j) {
|
|
785
|
+
case 0:
|
|
786
|
+
return S.suspend(() =>
|
|
787
|
+
S.Struct({
|
|
788
|
+
domain: S.optional(S.String),
|
|
789
|
+
isFailedOver: S.optional(S.Boolean),
|
|
790
|
+
}),
|
|
791
|
+
).annotate({ identifier: "DRStatusItem" });
|
|
792
|
+
case 1:
|
|
793
|
+
return S.Array(__S(20, __c5, 0));
|
|
794
|
+
case 2:
|
|
795
|
+
return S.suspend(() =>
|
|
796
|
+
S.Struct({
|
|
797
|
+
status: S.optional(__S(21, __c5, 1)),
|
|
798
|
+
}),
|
|
799
|
+
).annotate({ identifier: "GetDRStatusResponse" });
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
function __c6(j: number): any {
|
|
803
|
+
switch (j) {
|
|
804
|
+
case 0:
|
|
805
|
+
return S.suspend(() =>
|
|
806
|
+
S.Struct({
|
|
807
|
+
domain: S.String.pipe(T.Label()),
|
|
808
|
+
}).pipe(T.Http({ method: "GET", uri: "/api/v1/dr/status/{domain}", code: 200 })),
|
|
809
|
+
).annotate({ identifier: "GetDRStatusByDomainRequest" });
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
function __c7(j: number): any {
|
|
813
|
+
switch (j) {
|
|
814
|
+
case 0:
|
|
815
|
+
return S.suspend(() =>
|
|
816
|
+
S.Struct({
|
|
817
|
+
userId: S.String.pipe(T.Label()),
|
|
818
|
+
}).pipe(T.Http({ method: "GET", uri: "/api/v1/users/{userId}/classification", code: 200 })),
|
|
819
|
+
).annotate({ identifier: "GetUserClassificationRequest" });
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
function __c8(j: number): any {
|
|
823
|
+
switch (j) {
|
|
824
|
+
case 0:
|
|
825
|
+
return S.suspend(() =>
|
|
826
|
+
S.Struct({
|
|
827
|
+
lastUpdated: S.optional(S.String),
|
|
828
|
+
type: S.optional(S.String),
|
|
829
|
+
}),
|
|
830
|
+
).annotate({ identifier: "UserClassification" });
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
function __c9(j: number): any {
|
|
834
|
+
switch (j) {
|
|
835
|
+
case 0:
|
|
836
|
+
return S.suspend(() =>
|
|
837
|
+
S.Struct({
|
|
838
|
+
deviceId: S.String.pipe(T.Label()),
|
|
839
|
+
expand: S.optional(__S(12, __c3, 0).pipe(T.Query())),
|
|
840
|
+
}).pipe(
|
|
841
|
+
T.Http({ method: "GET", uri: "/api/v1/devices/{deviceId}/os-accounts", code: 200 }),
|
|
842
|
+
),
|
|
843
|
+
).annotate({ identifier: "ListDeviceOSAccountsRequest" });
|
|
844
|
+
case 1:
|
|
845
|
+
return S.Array(S.Unknown);
|
|
846
|
+
case 2:
|
|
847
|
+
return S.suspend(() => __S(37, __c9, 1).pipe(T.RawResponseRoot())).annotate({
|
|
848
|
+
identifier: "ListDeviceOSAccountsResponse",
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
function __c10(j: number): any {
|
|
853
|
+
switch (j) {
|
|
854
|
+
case 0:
|
|
855
|
+
return S.suspend(() =>
|
|
856
|
+
S.Struct({
|
|
857
|
+
userId: S.String.pipe(T.Label()),
|
|
858
|
+
type: S.optional(S.String),
|
|
859
|
+
}).pipe(T.Http({ method: "PUT", uri: "/api/v1/users/{userId}/classification", code: 200 })),
|
|
860
|
+
).annotate({ identifier: "ReplaceUserClassificationRequest" });
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
function __c11(j: number): any {
|
|
864
|
+
switch (j) {
|
|
865
|
+
case 0:
|
|
866
|
+
return S.suspend(() =>
|
|
867
|
+
S.Struct({
|
|
868
|
+
body: S.optional(S.Unknown.pipe(T.HttpBody())),
|
|
869
|
+
}).pipe(T.Http({ method: "POST", uri: "/api/v1/dr/failback", code: 200 })),
|
|
870
|
+
).annotate({ identifier: "StartOrgFailbackRequest" });
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
function __c12(j: number): any {
|
|
874
|
+
switch (j) {
|
|
875
|
+
case 0:
|
|
876
|
+
return S.suspend(() =>
|
|
877
|
+
S.Struct({
|
|
878
|
+
domain: S.optional(S.String),
|
|
879
|
+
message: S.optional(S.String),
|
|
880
|
+
}),
|
|
881
|
+
).annotate({ identifier: "StartOrgFailbackResponseResultsItem" });
|
|
882
|
+
case 1:
|
|
883
|
+
return S.Array(__S(48, __c12, 0));
|
|
884
|
+
case 2:
|
|
885
|
+
return S.suspend(() =>
|
|
886
|
+
S.Struct({
|
|
887
|
+
results: S.optional(__S(49, __c12, 1)),
|
|
888
|
+
}),
|
|
889
|
+
).annotate({ identifier: "StartOrgFailbackResponse" });
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
// Schema table: entry i is schema j of builder f, made on first reach.
|
|
893
|
+
function __S(i: number, f: (j: number) => unknown, j: number): any {
|
|
894
|
+
return (__s[i] ??= __L.at(f, j));
|
|
895
|
+
}
|