postex-auth-sdk-stage 1.2.3 → 1.2.5
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 +5 -1
- package/dist/auth.d.ts +3 -0
- package/dist/postex-auth-sdk-stage.es.js +283 -274
- package/dist/postex-auth-sdk-stage.es.js.map +1 -1
- package/dist/postex-auth-sdk-stage.iife.js +1 -1
- package/dist/postex-auth-sdk-stage.iife.js.map +1 -1
- package/dist/postex-auth-sdk-stage.umd.js +1 -1
- package/dist/postex-auth-sdk-stage.umd.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,10 @@ npm install postex-auth-sdk-stage
|
|
|
40
40
|
```javascript
|
|
41
41
|
import { AuthSDK } from 'postex-auth-sdk-stage';
|
|
42
42
|
|
|
43
|
-
const auth = new AuthSDK({
|
|
43
|
+
const auth = new AuthSDK({
|
|
44
|
+
apiKey: 'your-api-key',
|
|
45
|
+
appId: 'postexglobal'
|
|
46
|
+
});
|
|
44
47
|
```
|
|
45
48
|
|
|
46
49
|
### Basic Authentication Flow
|
|
@@ -85,6 +88,7 @@ new AuthSDK(config: AuthSDKConfig)
|
|
|
85
88
|
| Parameter | Description |
|
|
86
89
|
|-----------|-------------|
|
|
87
90
|
| `config.apiKey` | (Optional) Your API key for authentication |
|
|
91
|
+
| `config.appId` | (Optional) Selects which Auth environment to use. Allowed values: `'xstak'`, `'postex'`, `'callcourier'`, `'postexglobal'`. Default: `'postexglobal'` |
|
|
88
92
|
|
|
89
93
|
---
|
|
90
94
|
|
package/dist/auth.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
type AuthEntity = "xstak" | "postex" | "callcourier" | "postexglobal";
|
|
1
2
|
interface AuthSDKConfig {
|
|
2
3
|
apiKey?: string;
|
|
4
|
+
appId?: AuthEntity;
|
|
3
5
|
}
|
|
4
6
|
type AuthStatusType = "no_session" | "session_found" | "webauthn_ready";
|
|
5
7
|
interface AuthStatusResponse {
|
|
@@ -94,6 +96,7 @@ export declare class AuthSDKFetchError extends Error {
|
|
|
94
96
|
export declare class AuthSDK {
|
|
95
97
|
private config;
|
|
96
98
|
constructor(config: AuthSDKConfig);
|
|
99
|
+
private getBaseUrl;
|
|
97
100
|
private normalizeAuthIdentifier;
|
|
98
101
|
private buildUrl;
|
|
99
102
|
private request;
|