@ctx-core/auth0-management 9.0.30 → 9.0.31

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,13 @@
1
1
  # @ctx-core/auth0-management
2
2
 
3
+ ## 9.0.31
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: revert headers\_ for fetch calls
8
+ - Updated dependencies
9
+ - @ctx-core/auth0@33.2.3
10
+
3
11
  ## 9.0.30
4
12
 
5
13
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/auth0-management",
3
- "version": "9.0.30",
3
+ "version": "9.0.31",
4
4
  "description": "ctx-core auth0 management api",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -39,7 +39,7 @@
39
39
  "test-unit-coverage": "c8 pnpm test-unit"
40
40
  },
41
41
  "dependencies": {
42
- "@ctx-core/auth0": "^33.2.2",
42
+ "@ctx-core/auth0": "^33.2.3",
43
43
  "@ctx-core/fetch-undici": "^1.2.4",
44
44
  "@ctx-core/object": "*",
45
45
  "@ctx-core/uri": "^12.0.39",
@@ -1,5 +1,5 @@
1
1
  import { verify_access_token_header_authorization, AUTH0_DOMAIN$_ } from '@ctx-core/auth0'
2
- import { fetch, headers_ } from '@ctx-core/fetch-undici'
2
+ import { fetch } from '@ctx-core/fetch-undici'
3
3
  import { query_str_ } from '@ctx-core/uri'
4
4
  import { auth0_management_token_ } from './auth0_management_token_.js'
5
5
  /** @typedef {import('auth0').CreateClientGrant}CreateClientGrant */
@@ -15,10 +15,10 @@ export async function get_auth0_v2_client_grants(ctx, params) {
15
15
  const url = `https://${AUTH0_DOMAIN$_(ctx).$}/api/v2/client-grants?${query || query_str_(json)}`
16
16
  const res = await fetch(url, {
17
17
  method: 'GET',
18
- headers: headers_({
18
+ headers: {
19
19
  'Content-Type': 'application/json',
20
20
  authorization
21
- })
21
+ }
22
22
  })
23
23
  /** @type {CreateClientGrant} */
24
24
  const create_client_grant = await res.json()
@@ -1,5 +1,5 @@
1
1
  import { verify_access_token_header_authorization } from '@ctx-core/auth0'
2
- import { fetch, headers_ } from '@ctx-core/fetch-undici'
2
+ import { fetch } from '@ctx-core/fetch-undici'
3
3
  import { auth0_management_token_ } from './auth0_management_token_.js'
4
4
  /** @typedef {import('auth0').User}User */
5
5
  /**
@@ -14,10 +14,10 @@ export async function get_auth0_v2_user(ctx, params) {
14
14
  const url = `https://${AUTH0_DOMAIN}/api/v2/users/${user_id}`
15
15
  const res = await fetch(url, {
16
16
  method: 'GET',
17
- headers: headers_({
17
+ headers: {
18
18
  'Content-Type': 'application/json',
19
19
  authorization
20
- })
20
+ }
21
21
  })
22
22
  /** @type {User} */
23
23
  const user = await res.json()
@@ -1,5 +1,5 @@
1
1
  import { verify_access_token_header_authorization, AUTH0_DOMAIN$_ } from '@ctx-core/auth0'
2
- import { fetch, headers_ } from '@ctx-core/fetch-undici'
2
+ import { fetch } from '@ctx-core/fetch-undici'
3
3
  import { auth0_management_token_ } from './auth0_management_token_.js'
4
4
  /** @type {import('auth0-js').Auth0UserProfile}Auth0UserProfile */
5
5
  /**
@@ -15,10 +15,10 @@ export async function get_auth0_v2_users_by_email(ctx, params) {
15
15
  const url = `https://${AUTH0_DOMAIN}/api/v2/users-by-email?email=${encodeURIComponent(email)}`
16
16
  const res = await fetch(url, {
17
17
  method: 'GET',
18
- headers: headers_({
18
+ headers: {
19
19
  'Content-Type': 'application/json',
20
20
  authorization
21
- })
21
+ }
22
22
  })
23
23
  /** @type {Auth0UserProfile[]} */
24
24
  const auth0_user_profile_a = await res.json()
@@ -1,5 +1,5 @@
1
1
  import { verify_access_token_header_authorization, AUTH0_DOMAIN$_ } from '@ctx-core/auth0'
2
- import { fetch, headers_ } from '@ctx-core/fetch-undici'
2
+ import { fetch } from '@ctx-core/fetch-undici'
3
3
  import { auth0_management_token_ } from './auth0_management_token_.js'
4
4
  /** @typedef {import('auth0').Client}Client */
5
5
  /**
@@ -14,10 +14,10 @@ export async function patch_auth0_v2_client(ctx, params) {
14
14
  const url = `https://${AUTH0_DOMAIN$_(ctx).$}/api/v2/clients/${client_id}`
15
15
  const res = await fetch(url, {
16
16
  method: 'PATCH',
17
- headers: headers_({
17
+ headers: {
18
18
  'Content-Type': 'application/json',
19
19
  authorization
20
- }),
20
+ },
21
21
  body: body || JSON.stringify(json)
22
22
  })
23
23
  /** @type {Client} */
@@ -1,5 +1,5 @@
1
1
  import { verify_access_token_header_authorization, AUTH0_DOMAIN$_ } from '@ctx-core/auth0'
2
- import { fetch, headers_ } from '@ctx-core/fetch-undici'
2
+ import { fetch } from '@ctx-core/fetch-undici'
3
3
  import { auth0_management_token_ } from './auth0_management_token_.js'
4
4
  /** @typedef {import('auth0').UpdateUserData}UpdateUserData */
5
5
  /** @typedef {import('auth0').Auth0Error}Auth0Error */
@@ -22,10 +22,10 @@ export async function patch_auth0_v2_user(
22
22
  const url = `https://${AUTH0_DOMAIN$_(ctx).$}/api/v2/users/${user_id}`
23
23
  const res = await fetch(url, {
24
24
  method: 'PATCH',
25
- headers: headers_({
25
+ headers: {
26
26
  'Content-Type': 'application/json',
27
27
  authorization
28
- }),
28
+ },
29
29
  body: JSON.stringify(data)
30
30
  })
31
31
  /** @type {UpdateUserData|Auth0Error} */