@distilled.cloud/okta 1.0.0-rc.19 → 1.0.0-rc.20
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/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/errors.d.ts +5 -8
- package/lib/errors.d.ts.map +1 -1
- package/lib/protocol.d.ts.map +1 -1
- package/lib/services/okta.js +934 -934
- package/lib/services/okta.js.map +1 -1
- package/package.json +2 -2
- package/src/errors.ts +5 -5
- package/src/protocol.ts +6 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distilled.cloud/okta",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.20",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@distilled.cloud/core": "1.0.0-rc.
|
|
69
|
+
"@distilled.cloud/core": "1.0.0-rc.20"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@distilled.cloud/dev": "0.0.0",
|
package/src/errors.ts
CHANGED
|
@@ -28,15 +28,15 @@ export {
|
|
|
28
28
|
export type { DefaultErrors } from "@distilled.cloud/core/errors";
|
|
29
29
|
|
|
30
30
|
import * as Category from "@distilled.cloud/core/category";
|
|
31
|
+
import { UnknownErrorFields } from "@distilled.cloud/core/errors";
|
|
31
32
|
import * as Schema from "@distilled.cloud/core/schema-lite-typed";
|
|
32
33
|
|
|
33
34
|
/** Unknown Okta error -- returned when nothing else matches the failure. */
|
|
34
35
|
export class UnknownOktaError
|
|
35
|
-
extends /*@__PURE__*/ Schema.TaggedError<UnknownOktaError>()(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}).pipe(Category.withServerError) {}
|
|
36
|
+
extends /*@__PURE__*/ Schema.TaggedError<UnknownOktaError>()(
|
|
37
|
+
"UnknownOktaError",
|
|
38
|
+
UnknownErrorFields,
|
|
39
|
+
) {}
|
|
40
40
|
|
|
41
41
|
/** Schema parse error wrapper (kept for surface parity with other SDKs). */
|
|
42
42
|
export class OktaParseError
|
package/src/protocol.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type * as API from "@distilled.cloud/core/api";
|
|
2
2
|
import type { API_ERRORS, ConfigError, InvalidInput } from "@distilled.cloud/core/errors";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
makeRestProtocol,
|
|
5
|
+
type RestErrorEnvelope,
|
|
6
|
+
unknownErrorProps,
|
|
7
|
+
} from "@distilled.cloud/core/protocol-rest";
|
|
4
8
|
import type { SdkError } from "@distilled.cloud/core/sdk-error";
|
|
5
9
|
/**
|
|
6
10
|
* OktaProtocol -- hand-written.
|
|
@@ -70,11 +74,6 @@ export const OktaProtocol: Layer.Layer<API.Protocol> = /*@__PURE__*/ makeRestPro
|
|
|
70
74
|
baseUrl: (creds) => creds.apiBaseUrl,
|
|
71
75
|
headers: (creds) => formatHeaders(creds),
|
|
72
76
|
errorEnvelope,
|
|
73
|
-
unknownError: (
|
|
74
|
-
new UnknownOktaError({
|
|
75
|
-
code: typeof code === "string" ? code : code !== undefined ? String(code) : undefined,
|
|
76
|
-
message,
|
|
77
|
-
body,
|
|
78
|
-
}),
|
|
77
|
+
unknownError: (info) => new UnknownOktaError(unknownErrorProps(info)),
|
|
79
78
|
parseError: ({ body, cause }) => new OktaParseError({ body, cause }),
|
|
80
79
|
});
|