@omnibase/core-js 0.1.0 → 0.1.2

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.
@@ -1,4 +1,4 @@
1
- import { LoginFlow as LoginFlow$1, RecoveryFlow as RecoveryFlow$1, VerificationFlow as VerificationFlow$1, RegistrationFlow as RegistrationFlow$1, SettingsFlow as SettingsFlow$1 } from '@ory/client-fetch';
1
+ import { LoginFlow as LoginFlow$1, RecoveryFlow as RecoveryFlow$1, VerificationFlow as VerificationFlow$1, RegistrationFlow as RegistrationFlow$1, SettingsFlow as SettingsFlow$1, SessionAuthenticationMethod, AuthenticatorAssuranceLevel, SessionDevice, Identity } from '@ory/client-fetch';
2
2
 
3
3
  type FlowType = LoginFlow | RecoveryFlow | VerificationFlow | RegistrationFlow | SettingsFlow;
4
4
  /**
@@ -23,5 +23,81 @@ type RegistrationFlow = RegistrationFlow$1;
23
23
  * This flow is used when an identity wants to update settings (e.g. profile data, passwords, ...) in a selfservice manner.
24
24
  */
25
25
  type SettingsFlow = SettingsFlow$1;
26
+ /**
27
+ * A Session
28
+ * @export
29
+ * @interface Session
30
+ */
31
+ type Session = {
32
+ /**
33
+ * Active state. If false the session is no longer active.
34
+ * @type {boolean}
35
+ * @memberof Session
36
+ */
37
+ active?: boolean;
38
+ /**
39
+ * The Session Authentication Timestamp
40
+ *
41
+ * When this session was authenticated at. If multi-factor authentication was used this
42
+ * is the time when the last factor was authenticated (e.g. the TOTP code challenge was completed).
43
+ * @type {Date}
44
+ * @memberof Session
45
+ */
46
+ authenticated_at?: Date;
47
+ /**
48
+ * A list of authenticators which were used to authenticate the session.
49
+ * @type {Array<SessionAuthenticationMethod>}
50
+ * @memberof Session
51
+ */
52
+ authentication_methods?: Array<SessionAuthenticationMethod>;
53
+ /**
54
+ *
55
+ * @type {AuthenticatorAssuranceLevel}
56
+ * @memberof Session
57
+ */
58
+ authenticator_assurance_level?: AuthenticatorAssuranceLevel;
59
+ /**
60
+ * Devices has history of all endpoints where the session was used
61
+ * @type {Array<SessionDevice>}
62
+ * @memberof Session
63
+ */
64
+ devices?: Array<SessionDevice>;
65
+ /**
66
+ * The Session Expiry
67
+ *
68
+ * When this session expires at.
69
+ * @type {Date}
70
+ * @memberof Session
71
+ */
72
+ expires_at?: Date;
73
+ /**
74
+ * Session ID
75
+ * @type {string}
76
+ * @memberof Session
77
+ */
78
+ id: string;
79
+ /**
80
+ *
81
+ * @type {Identity}
82
+ * @memberof Session
83
+ */
84
+ identity?: Identity;
85
+ /**
86
+ * The Session Issuance Timestamp
87
+ *
88
+ * When this session was issued at. Usually equal or close to `authenticated_at`.
89
+ * @type {Date}
90
+ * @memberof Session
91
+ */
92
+ issued_at?: Date;
93
+ /**
94
+ * Tokenized is the tokenized (e.g. JWT) version of the session.
95
+ *
96
+ * It is only set when the `tokenize_as` query parameter was set to a valid tokenize template during calls to `/session/whoami`.
97
+ * @type {string}
98
+ * @memberof Session
99
+ */
100
+ tokenized?: string;
101
+ };
26
102
 
27
- export type { FlowType, LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow };
103
+ export type { FlowType, LoginFlow, RecoveryFlow, RegistrationFlow, Session, SettingsFlow, VerificationFlow };
@@ -1,4 +1,4 @@
1
- import { LoginFlow as LoginFlow$1, RecoveryFlow as RecoveryFlow$1, VerificationFlow as VerificationFlow$1, RegistrationFlow as RegistrationFlow$1, SettingsFlow as SettingsFlow$1 } from '@ory/client-fetch';
1
+ import { LoginFlow as LoginFlow$1, RecoveryFlow as RecoveryFlow$1, VerificationFlow as VerificationFlow$1, RegistrationFlow as RegistrationFlow$1, SettingsFlow as SettingsFlow$1, SessionAuthenticationMethod, AuthenticatorAssuranceLevel, SessionDevice, Identity } from '@ory/client-fetch';
2
2
 
3
3
  type FlowType = LoginFlow | RecoveryFlow | VerificationFlow | RegistrationFlow | SettingsFlow;
4
4
  /**
@@ -23,5 +23,81 @@ type RegistrationFlow = RegistrationFlow$1;
23
23
  * This flow is used when an identity wants to update settings (e.g. profile data, passwords, ...) in a selfservice manner.
24
24
  */
25
25
  type SettingsFlow = SettingsFlow$1;
26
+ /**
27
+ * A Session
28
+ * @export
29
+ * @interface Session
30
+ */
31
+ type Session = {
32
+ /**
33
+ * Active state. If false the session is no longer active.
34
+ * @type {boolean}
35
+ * @memberof Session
36
+ */
37
+ active?: boolean;
38
+ /**
39
+ * The Session Authentication Timestamp
40
+ *
41
+ * When this session was authenticated at. If multi-factor authentication was used this
42
+ * is the time when the last factor was authenticated (e.g. the TOTP code challenge was completed).
43
+ * @type {Date}
44
+ * @memberof Session
45
+ */
46
+ authenticated_at?: Date;
47
+ /**
48
+ * A list of authenticators which were used to authenticate the session.
49
+ * @type {Array<SessionAuthenticationMethod>}
50
+ * @memberof Session
51
+ */
52
+ authentication_methods?: Array<SessionAuthenticationMethod>;
53
+ /**
54
+ *
55
+ * @type {AuthenticatorAssuranceLevel}
56
+ * @memberof Session
57
+ */
58
+ authenticator_assurance_level?: AuthenticatorAssuranceLevel;
59
+ /**
60
+ * Devices has history of all endpoints where the session was used
61
+ * @type {Array<SessionDevice>}
62
+ * @memberof Session
63
+ */
64
+ devices?: Array<SessionDevice>;
65
+ /**
66
+ * The Session Expiry
67
+ *
68
+ * When this session expires at.
69
+ * @type {Date}
70
+ * @memberof Session
71
+ */
72
+ expires_at?: Date;
73
+ /**
74
+ * Session ID
75
+ * @type {string}
76
+ * @memberof Session
77
+ */
78
+ id: string;
79
+ /**
80
+ *
81
+ * @type {Identity}
82
+ * @memberof Session
83
+ */
84
+ identity?: Identity;
85
+ /**
86
+ * The Session Issuance Timestamp
87
+ *
88
+ * When this session was issued at. Usually equal or close to `authenticated_at`.
89
+ * @type {Date}
90
+ * @memberof Session
91
+ */
92
+ issued_at?: Date;
93
+ /**
94
+ * Tokenized is the tokenized (e.g. JWT) version of the session.
95
+ *
96
+ * It is only set when the `tokenize_as` query parameter was set to a valid tokenize template during calls to `/session/whoami`.
97
+ * @type {string}
98
+ * @memberof Session
99
+ */
100
+ tokenized?: string;
101
+ };
26
102
 
27
- export type { FlowType, LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow };
103
+ export type { FlowType, LoginFlow, RecoveryFlow, RegistrationFlow, Session, SettingsFlow, VerificationFlow };
@@ -121,4 +121,4 @@ type SwitchActiveTenantResponse = ApiResponse<{
121
121
  */
122
122
  declare function switchActiveTenant(tenantId: string): Promise<SwitchActiveTenantResponse>;
123
123
 
124
- export { type AcceptTenantInviteResponse, type CreateTenantRequest, type CreateTenantResponse, type CreateTenantUserInviteRequest, type CreateTenantUserInviteResponse, type DeleteTenantResponse, type SwitchActiveTenantResponse, type Tenant, type TenantInvite, acceptTenantInvite, createTenant, createTenantUserInvite, deleteTenant, switchActiveTenant };
124
+ export { type AcceptTenantInviteResponse, type ApiResponse, type CreateTenantRequest, type CreateTenantResponse, type CreateTenantUserInviteRequest, type CreateTenantUserInviteResponse, type DeleteTenantResponse, type SwitchActiveTenantResponse, type Tenant, type TenantInvite, acceptTenantInvite, createTenant, createTenantUserInvite, deleteTenant, switchActiveTenant };
@@ -121,4 +121,4 @@ type SwitchActiveTenantResponse = ApiResponse<{
121
121
  */
122
122
  declare function switchActiveTenant(tenantId: string): Promise<SwitchActiveTenantResponse>;
123
123
 
124
- export { type AcceptTenantInviteResponse, type CreateTenantRequest, type CreateTenantResponse, type CreateTenantUserInviteRequest, type CreateTenantUserInviteResponse, type DeleteTenantResponse, type SwitchActiveTenantResponse, type Tenant, type TenantInvite, acceptTenantInvite, createTenant, createTenantUserInvite, deleteTenant, switchActiveTenant };
124
+ export { type AcceptTenantInviteResponse, type ApiResponse, type CreateTenantRequest, type CreateTenantResponse, type CreateTenantUserInviteRequest, type CreateTenantUserInviteResponse, type DeleteTenantResponse, type SwitchActiveTenantResponse, type Tenant, type TenantInvite, acceptTenantInvite, createTenant, createTenantUserInvite, deleteTenant, switchActiveTenant };
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "@omnibase/core-js",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "OmniBase core Javascript SDK - framework agnostic",
5
- "files": ["dist/**/*"],
5
+ "files": [
6
+ "dist/**/*"
7
+ ],
6
8
  "type": "module",
7
9
  "scripts": {
8
10
  "build": "tsup src/database/index.ts src/tenants/index.ts src/auth/types.ts --format cjs,esm --dts",
@@ -13,17 +15,22 @@
13
15
  "types": "./dist/auth/index.d.ts"
14
16
  },
15
17
  "./database": {
16
- "import": "./dist/database/index.js",
18
+ "import": "./dist/database/index.js",
17
19
  "require": "./dist/database/index.cjs",
18
20
  "types": "./dist/database/index.d.ts"
19
21
  },
20
22
  "./tenants": {
21
23
  "import": "./dist/tenants/index.js",
22
- "require": "./dist/tenants/index.cjs",
24
+ "require": "./dist/tenants/index.cjs",
23
25
  "types": "./dist/tenants/index.d.ts"
24
26
  }
25
27
  },
26
- "keywords": ["omnibase", "sdk", "javascript", "typescript"],
28
+ "keywords": [
29
+ "omnibase",
30
+ "sdk",
31
+ "javascript",
32
+ "typescript"
33
+ ],
27
34
  "author": "Phoenix Baker Van Urk",
28
35
  "license": "MIT",
29
36
  "devDependencies": {