@ctx-core/auth0-management 9.6.7 → 9.7.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @ctx-core/auth0-management
2
2
 
3
+ ## 9.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - new functions:
8
+
9
+ + auth0__user$_
10
+ + auth0__user_
11
+ + auth0__user__set
12
+
3
13
  ## 9.6.7
4
14
 
5
15
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/auth0-management",
3
- "version": "9.6.7",
3
+ "version": "9.7.0",
4
4
  "description": "ctx-core auth0 management api",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -0,0 +1,9 @@
1
+ import type { be_atom_triple_T, WritableAtom_ } from '@ctx-core/nanostores'
2
+ import type { User } from 'auth0'
3
+ export declare const [
4
+ auth0__user$_,
5
+ auth0__user_,
6
+ auth0__user__set,
7
+ ]:be_atom_triple_T<
8
+ WritableAtom_<User>
9
+ >
@@ -0,0 +1,7 @@
1
+ import { atom_, be_atom_triple_ } from '@ctx-core/nanostores'
2
+ export const [
3
+ auth0__user$_,
4
+ auth0__user_,
5
+ auth0__user__set,
6
+ ] = be_atom_triple_(()=>
7
+ atom_())
@@ -0,0 +1,49 @@
1
+ import { ctx_ } from '@ctx-core/object'
2
+ import { User } from 'auth0'
3
+ import { test } from 'uvu'
4
+ import { equal } from 'uvu/assert'
5
+ import { auth0__user$_, auth0__user_, auth0__user__set } from '../index.js'
6
+ test('auth0__user', ()=>{
7
+ const ctx = ctx_()
8
+ const auth0__user = auth0__user__new()
9
+ equal(auth0__user$_(ctx).$, undefined)
10
+ equal(auth0__user_(ctx), undefined)
11
+ auth0__user__set(ctx, auth0__user)
12
+ equal(auth0__user$_(ctx).$, auth0__user)
13
+ equal(auth0__user_(ctx), auth0__user)
14
+ })
15
+ test.run()
16
+ function auth0__user__new() {
17
+ return {
18
+ "user_id": "auth0|507f1f77bcf86cd799439020",
19
+ "email": "john.doe@gmail.com",
20
+ "email_verified": false,
21
+ "username": "johndoe",
22
+ "phone_number": "+199999999999999",
23
+ "phone_verified": false,
24
+ "created_at": "",
25
+ "updated_at": "",
26
+ "identities": [
27
+ {
28
+ "connection": "Initial-Connection",
29
+ "user_id": "507f1f77bcf86cd799439020",
30
+ "provider": "auth0",
31
+ "isSocial": false
32
+ }
33
+ ],
34
+ "app_metadata": {},
35
+ "user_metadata": {},
36
+ "picture": "",
37
+ "name": "",
38
+ "nickname": "",
39
+ "multifactor": [
40
+ ""
41
+ ],
42
+ "last_ip": "",
43
+ "last_login": "",
44
+ "logins_count": 0,
45
+ "blocked": false,
46
+ "given_name": "",
47
+ "family_name": ""
48
+ } as User
49
+ }
@@ -1,6 +1,6 @@
1
1
  import { auth0__v2__url_ } from '@ctx-core/auth0'
2
- import { AUTH0_MANAGEMENT_ID_ } from '../AUTH0_MANAGEMENT_ID$_/index.js'
3
- import { AUTH0_MANAGEMENT_SECRET_ } from '../AUTH0_MANAGEMENT_SECRET$_/index.js'
2
+ import { AUTH0_MANAGEMENT_ID_ } from '../AUTH0_MANAGEMENT_ID/index.js'
3
+ import { AUTH0_MANAGEMENT_SECRET_ } from '../AUTH0_MANAGEMENT_SECRET/index.js'
4
4
  /**
5
5
  * @param {import('@ctx-core/object').Ctx}ctx
6
6
  * @return {import('@ctx-core/auth0').auth0__oauth_token__fetch__body_T}
@@ -1,6 +1,6 @@
1
1
  import { import_meta_env_ } from '@ctx-core/env'
2
- import { AUTH0_MANAGEMENT_ID__set } from '../AUTH0_MANAGEMENT_ID$_/index.js'
3
- import { AUTH0_MANAGEMENT_SECRET__set } from '../AUTH0_MANAGEMENT_SECRET$_/index.js'
2
+ import { AUTH0_MANAGEMENT_ID__set } from '../AUTH0_MANAGEMENT_ID/index.js'
3
+ import { AUTH0_MANAGEMENT_SECRET__set } from '../AUTH0_MANAGEMENT_SECRET/index.js'
4
4
  /** @typedef {import('@ctx-core/object').Ctx}Ctx */
5
5
  /** @typedef {import('./index.d.ts').auth0_management__init__params_T}auth0_management__init__params_T */
6
6
  /**
@@ -1,7 +1,7 @@
1
1
  import { AUTH0_DOMAIN_ } from '@ctx-core/auth0'
2
2
  import { createRequire } from 'module'
3
- import { AUTH0_MANAGEMENT_ID_ } from '../AUTH0_MANAGEMENT_ID$_/index.js'
4
- import { AUTH0_MANAGEMENT_SECRET_ } from '../AUTH0_MANAGEMENT_SECRET$_/index.js'
3
+ import { AUTH0_MANAGEMENT_ID_ } from '../AUTH0_MANAGEMENT_ID/index.js'
4
+ import { AUTH0_MANAGEMENT_SECRET_ } from '../AUTH0_MANAGEMENT_SECRET/index.js'
5
5
  const require = createRequire(import.meta.url)
6
6
  const { ManagementClient } = require('auth0')
7
7
  /** @typedef {import('@ctx-core/object').Ctx}Ctx */
package/src/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './auth0__user'
1
2
  export * from './auth0_management__new'
2
3
  export * from './auth0_management__client_credentials__body__new'
3
4
  export * from './auth0_management__init'
@@ -7,5 +8,5 @@ export * from './auth0__v2_user__GET__fetch'
7
8
  export * from './auth0__v2_users_by_email__GET__fetch'
8
9
  export * from './auth0__v2_client__GET__fetch'
9
10
  export * from './auth0__v2_user__PATCH__fetch'
10
- export * from './AUTH0_MANAGEMENT_ID$_'
11
- export * from './AUTH0_MANAGEMENT_SECRET$_'
11
+ export * from './AUTH0_MANAGEMENT_ID'
12
+ export * from './AUTH0_MANAGEMENT_SECRET'
package/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './auth0__user/index.js'
1
2
  export * from './auth0_management__new/index.js'
2
3
  export * from './auth0_management__client_credentials__body__new/index.js'
3
4
  export * from './auth0_management__init/index.js'
@@ -7,5 +8,5 @@ export * from './auth0__v2_user__GET__fetch/index.js'
7
8
  export * from './auth0__v2_users_by_email__GET__fetch/index.js'
8
9
  export * from './auth0__v2_client__GET__fetch/index.js'
9
10
  export * from './auth0__v2_user__PATCH__fetch/index.js'
10
- export * from './AUTH0_MANAGEMENT_ID$_/index.js'
11
- export * from './AUTH0_MANAGEMENT_SECRET$_/index.js'
11
+ export * from './AUTH0_MANAGEMENT_ID/index.js'
12
+ export * from './AUTH0_MANAGEMENT_SECRET/index.js'