@ctx-core/auth0-management 6.0.101 → 6.0.106

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,67 @@
1
1
  # @ctx-core/auth0-management
2
2
 
3
+ ## 6.0.106
4
+
5
+ ### Patch Changes
6
+
7
+ - update dependencies
8
+ - Updated dependencies
9
+ - @ctx-core/auth0@26.0.3
10
+
11
+ ## 6.0.105
12
+
13
+ ### Patch Changes
14
+
15
+ - typescript: ^4.4.4 -> ^4.5.2
16
+ - @swc/core: ^1.2.108 -> ^1.2.110
17
+ - Updated dependencies
18
+ - Updated dependencies
19
+ - Updated dependencies
20
+ - @ctx-core/auth0@26.0.2
21
+ - @ctx-core/fetch@11.0.83
22
+ - @ctx-core/object@21.0.24
23
+ - @ctx-core/store@27.0.38
24
+
25
+ ## 6.0.104
26
+
27
+ ### Patch Changes
28
+
29
+ - version bump: fix published dependencies
30
+
31
+ ## 6.0.105
32
+
33
+ ### Patch Changes
34
+
35
+ - version bump
36
+
37
+ ## 6.0.104
38
+
39
+ ### Patch Changes
40
+
41
+ - version bump
42
+
43
+ ## 6.0.103
44
+
45
+ ### Patch Changes
46
+
47
+ - @swc/core: ^1.2.107 -> ^1.2.108
48
+ - Updated dependencies
49
+ - Updated dependencies
50
+ - @ctx-core/auth0@26.0.1
51
+ - @ctx-core/fetch@11.0.81
52
+ - @ctx-core/object@21.0.23
53
+ - @ctx-core/store@27.0.37
54
+
55
+ ## 6.0.102
56
+
57
+ ### Patch Changes
58
+
59
+ - Updated dependencies
60
+ - Updated dependencies
61
+ - Updated dependencies
62
+ - Updated dependencies
63
+ - @ctx-core/auth0@26.0.0
64
+
3
65
  ## 6.0.101
4
66
 
5
67
  ### Patch Changes
@@ -1,11 +1,11 @@
1
- import { be_ } from '@ctx-core/object';
2
1
  import { AUTH0_DOMAIN$_b } from '@ctx-core/auth0';
2
+ import { be_ } from '@ctx-core/object';
3
3
  const key = 'auth0_audience_';
4
4
  export const auth0_audience__b = be_(key, (ctx)=>{
5
5
  const AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx);
6
6
  return auth0_audience_fn;
7
7
  function auth0_audience_fn() {
8
- return `https://${AUTH0_DOMAIN$._}/api/v2/`;
8
+ return `https://${AUTH0_DOMAIN$.$}/api/v2/`;
9
9
  }
10
10
  });
11
11
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/auth0_audience__b.ts"],"sourcesContent":["import { be_, B } from '@ctx-core/object'\nimport { AUTH0_DOMAIN$_b } from '@ctx-core/auth0'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx'\nconst key = 'auth0_audience_'\nexport const auth0_audience__b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)\n\treturn auth0_audience_fn as auth0_audience__T\n\tfunction auth0_audience_fn() {\n\t\treturn `https://${AUTH0_DOMAIN$._}/api/v2/`\n\t}\n})\nexport type auth0_audience__T = ()=>string\n"],"names":["be_","AUTH0_DOMAIN$_b","key","auth0_audience__b","ctx","AUTH0_DOMAIN$","auth0_audience_fn","_"],"mappings":"AAAA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,eAAe,QAAQ,CAAiB;AAEjD,KAAK,CAACC,GAAG,GAAG,CAAiB;AAC7B,MAAM,CAAC,KAAK,CAACC,iBAAiB,GAAuCH,GAAG,CAAmCE,GAAG,GAAEE,GAAG,GAAE,CAAC;IACrH,KAAK,CAACC,aAAa,GAAGJ,eAAe,CAACG,GAAG;IACzC,MAAM,CAACE,iBAAiB;aACfA,iBAAiB,GAAG,CAAC;QAC7B,MAAM,EAAE,QAAQ,EAAED,aAAa,CAACE,CAAC,CAAC,QAAQ;IAC3C,CAAC;AACF,CAAC"}
1
+ {"version":3,"sources":["../src/auth0_audience__b.ts"],"sourcesContent":["import { AUTH0_DOMAIN$_b } from '@ctx-core/auth0'\nimport { be_, B } from '@ctx-core/object'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx.js'\nconst key = 'auth0_audience_'\nexport const auth0_audience__b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)\n\treturn auth0_audience_fn as auth0_audience__T\n\tfunction auth0_audience_fn() {\n\t\treturn `https://${AUTH0_DOMAIN$.$}/api/v2/`\n\t}\n})\nexport type auth0_audience__T = ()=>string\n"],"names":["AUTH0_DOMAIN$_b","be_","key","auth0_audience__b","ctx","AUTH0_DOMAIN$","auth0_audience_fn","$"],"mappings":"AAAA,MAAM,GAAGA,eAAe,QAAQ,CAAiB;AACjD,MAAM,GAAGC,GAAG,QAAW,CAAkB;AAEzC,KAAK,CAACC,GAAG,GAAG,CAAiB;AAC7B,MAAM,CAAC,KAAK,CAACC,iBAAiB,GAAuCF,GAAG,CAAmCC,GAAG,GAAEE,GAAG,GAAE,CAAC;IACrH,KAAK,CAACC,aAAa,GAAGL,eAAe,CAACI,GAAG;IACzC,MAAM,CAACE,iBAAiB;aACfA,iBAAiB,GAAG,CAAC;QAC7B,MAAM,EAAE,QAAQ,EAAED,aAAa,CAACE,CAAC,CAAC,QAAQ;IAC3C,CAAC;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/auth0_management_client_credentials_body__b.ts"],"sourcesContent":["import { be_, B } from '@ctx-core/object'\nimport type { post_auth0_oauth_token_body_I } from '@ctx-core/auth0'\nimport { auth0_audience__b } from './auth0_audience__b.js'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx'\nconst key = 'auth0_management_client_credentials_body_'\nexport const auth0_management_client_credentials_body__b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst auth0_audience_ = auth0_audience__b(ctx)\n\treturn auth0_management_client_credentials_body_ as auth0_management_client_credentials_body__T\n\tfunction auth0_management_client_credentials_body_():post_auth0_oauth_token_body_I {\n\t\treturn {\n\t\t\tgrant_type: 'client_credentials',\n\t\t\tclient_id: process.env.AUTH0_MANAGEMENT_ID!,\n\t\t\tclient_secret: process.env.AUTH0_MANAGEMENT_SECRET!,\n\t\t\taudience: auth0_audience_(),\n\t\t}\n\t}\n})\nexport type auth0_management_client_credentials_body__T = ()=>post_auth0_oauth_token_body_I\n"],"names":["be_","auth0_audience__b","key","auth0_management_client_credentials_body__b","ctx","auth0_audience_","auth0_management_client_credentials_body_","grant_type","client_id","process","env","AUTH0_MANAGEMENT_ID","client_secret","AUTH0_MANAGEMENT_SECRET","audience"],"mappings":"AAAA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AAEzC,MAAM,GAAGC,iBAAiB,QAAQ,CAAwB;AAE1D,KAAK,CAACC,GAAG,GAAG,CAA2C;AACvD,MAAM,CAAC,KAAK,CAACC,2CAA2C,GAAuCH,GAAG,CAAmCE,GAAG,GAAEE,GAAG,GAAE,CAAC;IAC/I,KAAK,CAACC,eAAe,GAAGJ,iBAAiB,CAACG,GAAG;IAC7C,MAAM,CAACE,yCAAyC;aACvCA,yCAAyC,GAAiC,CAAC;QACnF,MAAM,CAAC,CAAC;YACPC,UAAU,EAAE,CAAoB;YAChCC,SAAS,EAAEC,OAAO,CAACC,GAAG,CAACC,mBAAmB;YAC1CC,aAAa,EAAEH,OAAO,CAACC,GAAG,CAACG,uBAAuB;YAClDC,QAAQ,EAAET,eAAe;QAC1B,CAAC;IACF,CAAC;AACF,CAAC"}
1
+ {"version":3,"sources":["../src/auth0_management_client_credentials_body__b.ts"],"sourcesContent":["import type { post_auth0_oauth_token_body_I } from '@ctx-core/auth0'\nimport { be_, B } from '@ctx-core/object'\nimport { auth0_audience__b } from './auth0_audience__b.js'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx.js'\nconst key = 'auth0_management_client_credentials_body_'\nexport const auth0_management_client_credentials_body__b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst auth0_audience_ = auth0_audience__b(ctx)\n\treturn auth0_management_client_credentials_body_ as auth0_management_client_credentials_body__T\n\tfunction auth0_management_client_credentials_body_():post_auth0_oauth_token_body_I {\n\t\treturn {\n\t\t\tgrant_type: 'client_credentials',\n\t\t\tclient_id: process.env.AUTH0_MANAGEMENT_ID!,\n\t\t\tclient_secret: process.env.AUTH0_MANAGEMENT_SECRET!,\n\t\t\taudience: auth0_audience_(),\n\t\t}\n\t}\n})\nexport type auth0_management_client_credentials_body__T = ()=>post_auth0_oauth_token_body_I\n"],"names":["be_","auth0_audience__b","key","auth0_management_client_credentials_body__b","ctx","auth0_audience_","auth0_management_client_credentials_body_","grant_type","client_id","process","env","AUTH0_MANAGEMENT_ID","client_secret","AUTH0_MANAGEMENT_SECRET","audience"],"mappings":"AACA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,iBAAiB,QAAQ,CAAwB;AAE1D,KAAK,CAACC,GAAG,GAAG,CAA2C;AACvD,MAAM,CAAC,KAAK,CAACC,2CAA2C,GAAuCH,GAAG,CAAmCE,GAAG,GAAEE,GAAG,GAAE,CAAC;IAC/I,KAAK,CAACC,eAAe,GAAGJ,iBAAiB,CAACG,GAAG;IAC7C,MAAM,CAACE,yCAAyC;aACvCA,yCAAyC,GAAiC,CAAC;QACnF,MAAM,CAAC,CAAC;YACPC,UAAU,EAAE,CAAoB;YAChCC,SAAS,EAAEC,OAAO,CAACC,GAAG,CAACC,mBAAmB;YAC1CC,aAAa,EAAEH,OAAO,CAACC,GAAG,CAACG,uBAAuB;YAClDC,QAAQ,EAAET,eAAe;QAC1B,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -1,5 +1,5 @@
1
- import { be_ } from '@ctx-core/object';
2
1
  import { post_auth0_oauth_token_b } from '@ctx-core/auth0';
2
+ import { be_ } from '@ctx-core/object';
3
3
  import { auth0_management_client_credentials_body__b } from './auth0_management_client_credentials_body__b.js';
4
4
  const key = 'auth0_management_token_';
5
5
  export const auth0_management_token__b = be_(key, (ctx)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/auth0_management_token__b.ts"],"sourcesContent":["import { be_, B } from '@ctx-core/object'\nimport { auth0_token_T, post_auth0_oauth_token_b } from '@ctx-core/auth0'\nimport { auth0_management_client_credentials_body__b } from './auth0_management_client_credentials_body__b.js'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx'\nconst key = 'auth0_management_token_'\nexport const auth0_management_token__b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst post_auth0_oauth_token = post_auth0_oauth_token_b(ctx)\n\tconst auth0_management_client_credentials_body_fn = auth0_management_client_credentials_body__b(ctx)\n\treturn auth0_management_token_ as auth0_management_token__T\n\tasync function auth0_management_token_():Promise<auth0_token_T> {\n\t\tconst management_client_credentials = auth0_management_client_credentials_body_fn()\n\t\tconst response = await post_auth0_oauth_token(management_client_credentials)\n\t\treturn response.json()\n\t}\n})\nexport type auth0_management_token__T = ()=>Promise<auth0_token_T>\n"],"names":["be_","post_auth0_oauth_token_b","auth0_management_client_credentials_body__b","key","auth0_management_token__b","ctx","post_auth0_oauth_token","auth0_management_client_credentials_body_fn","auth0_management_token_","management_client_credentials","response","json"],"mappings":"AAAA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAkBC,wBAAwB,QAAQ,CAAiB;AACzE,MAAM,GAAGC,2CAA2C,QAAQ,CAAkD;AAE9G,KAAK,CAACC,GAAG,GAAG,CAAyB;AACrC,MAAM,CAAC,KAAK,CAACC,yBAAyB,GAAuCJ,GAAG,CAAmCG,GAAG,GAAEE,GAAG,GAAE,CAAC;IAC7H,KAAK,CAACC,sBAAsB,GAAGL,wBAAwB,CAACI,GAAG;IAC3D,KAAK,CAACE,2CAA2C,GAAGL,2CAA2C,CAACG,GAAG;IACnG,MAAM,CAACG,uBAAuB;mBACfA,uBAAuB,GAA0B,CAAC;QAChE,KAAK,CAACC,6BAA6B,GAAGF,2CAA2C;QACjF,KAAK,CAACG,QAAQ,GAAG,KAAK,CAACJ,sBAAsB,CAACG,6BAA6B;QAC3E,MAAM,CAACC,QAAQ,CAACC,IAAI;IACrB,CAAC;AACF,CAAC"}
1
+ {"version":3,"sources":["../src/auth0_management_token__b.ts"],"sourcesContent":["import { auth0_token_T, post_auth0_oauth_token_b } from '@ctx-core/auth0'\nimport { be_, B } from '@ctx-core/object'\nimport { auth0_management_client_credentials_body__b } from './auth0_management_client_credentials_body__b.js'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx.js'\nconst key = 'auth0_management_token_'\nexport const auth0_management_token__b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst post_auth0_oauth_token = post_auth0_oauth_token_b(ctx)\n\tconst auth0_management_client_credentials_body_fn = auth0_management_client_credentials_body__b(ctx)\n\treturn auth0_management_token_ as auth0_management_token__T\n\tasync function auth0_management_token_():Promise<auth0_token_T> {\n\t\tconst management_client_credentials = auth0_management_client_credentials_body_fn()\n\t\tconst response = await post_auth0_oauth_token(management_client_credentials)\n\t\treturn response.json()\n\t}\n})\nexport type auth0_management_token__T = ()=>Promise<auth0_token_T>\n"],"names":["post_auth0_oauth_token_b","be_","auth0_management_client_credentials_body__b","key","auth0_management_token__b","ctx","post_auth0_oauth_token","auth0_management_client_credentials_body_fn","auth0_management_token_","management_client_credentials","response","json"],"mappings":"AAAA,MAAM,GAAkBA,wBAAwB,QAAQ,CAAiB;AACzE,MAAM,GAAGC,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,2CAA2C,QAAQ,CAAkD;AAE9G,KAAK,CAACC,GAAG,GAAG,CAAyB;AACrC,MAAM,CAAC,KAAK,CAACC,yBAAyB,GAAuCH,GAAG,CAAmCE,GAAG,GAAEE,GAAG,GAAE,CAAC;IAC7H,KAAK,CAACC,sBAAsB,GAAGN,wBAAwB,CAACK,GAAG;IAC3D,KAAK,CAACE,2CAA2C,GAAGL,2CAA2C,CAACG,GAAG;IACnG,MAAM,CAACG,uBAAuB;mBACfA,uBAAuB,GAA0B,CAAC;QAChE,KAAK,CAACC,6BAA6B,GAAGF,2CAA2C;QACjF,KAAK,CAACG,QAAQ,GAAG,KAAK,CAACJ,sBAAsB,CAACG,6BAA6B;QAC3E,MAAM,CAACC,QAAQ,CAACC,IAAI;IACrB,CAAC;AACF,CAAC"}
@@ -1,8 +1,7 @@
1
- import { be_ } from '@ctx-core/object';
2
- import { _query_str } from '@ctx-core/uri';
3
- import { get } from '@ctx-core/store';
4
- import { fetch } from '@ctx-core/fetch';
5
1
  import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0';
2
+ import { fetch } from '@ctx-core/fetch';
3
+ import { be_ } from '@ctx-core/object';
4
+ import { query_str_ } from '@ctx-core/uri';
6
5
  import { auth0_management_token__b } from './auth0_management_token__b.js';
7
6
  const key = 'get_auth0_v2_client_grants';
8
7
  export const get_auth0_v2_client_grants_b = be_(key, (ctx)=>{
@@ -13,7 +12,7 @@ export const get_auth0_v2_client_grants_b = be_(key, (ctx)=>{
13
12
  const { query , json } = params;
14
13
  const auth0_token = await auth0_management_token_();
15
14
  const authorization = verify_access_token_header_authorization_(auth0_token);
16
- const url = `https://${get(AUTH0_DOMAIN$)}/api/v2/client-grants?${query || _query_str(json)}`;
15
+ const url = `https://${AUTH0_DOMAIN$.$}/api/v2/client-grants?${query || query_str_(json)}`;
17
16
  return fetch(url, {
18
17
  method: 'GET',
19
18
  headers: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/get_auth0_v2_client_grants_b.ts"],"sourcesContent":["import { be_, B } from '@ctx-core/object'\nimport { _query_str } from '@ctx-core/uri'\nimport { get } from '@ctx-core/store'\nimport { fetch } from '@ctx-core/fetch'\nimport { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'\nimport { auth0_management_token__b} from './auth0_management_token__b.js'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx'\nconst key = 'get_auth0_v2_client_grants'\nexport const get_auth0_v2_client_grants_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst auth0_management_token_ = auth0_management_token__b(ctx)\n\tconst AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)\n\treturn get_auth0_v2_client_grants as get_auth0_v2_client_grants_T\n\tasync function get_auth0_v2_client_grants(\n\t\tparams:get_auth0_v2_client_grants_params_I\n\t) {\n\t\tconst { query, json } = params\n\t\tconst auth0_token = await auth0_management_token_()\n\t\tconst authorization = verify_access_token_header_authorization_(auth0_token)\n\t\tconst url = `https://${get(AUTH0_DOMAIN$)}/api/v2/client-grants?${query || _query_str(json)}`\n\t\treturn fetch(url, {\n\t\t\tmethod: 'GET',\n\t\t\theaders:\n\t\t\t\t{\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tauthorization,\n\t\t\t\t},\n\t\t})\n\t}\n})\nexport interface get_auth0_v2_client_grants_params_I {\n\tquery?:string\n\tjson?:any\n}\nexport type get_auth0_v2_client_grants_T =\n\t(params:get_auth0_v2_client_grants_params_I)=>Promise<Response>\n"],"names":["be_","_query_str","get","fetch","verify_access_token_header_authorization_","AUTH0_DOMAIN$_b","auth0_management_token__b","key","get_auth0_v2_client_grants_b","ctx","auth0_management_token_","AUTH0_DOMAIN$","get_auth0_v2_client_grants","params","query","json","auth0_token","authorization","url","method","headers"],"mappings":"AAAA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,UAAU,QAAQ,CAAe;AAC1C,MAAM,GAAGC,GAAG,QAAQ,CAAiB;AACrC,MAAM,GAAGC,KAAK,QAAQ,CAAiB;AACvC,MAAM,GAAGC,yCAAyC,EAAEC,eAAe,QAAQ,CAAiB;AAC5F,MAAM,GAAGC,yBAAyB,QAAO,CAAgC;AAEzE,KAAK,CAACC,GAAG,GAAG,CAA4B;AACxC,MAAM,CAAC,KAAK,CAACC,4BAA4B,GAAuCR,GAAG,CAAmCO,GAAG,GAAEE,GAAG,GAAE,CAAC;IAChI,KAAK,CAACC,uBAAuB,GAAGJ,yBAAyB,CAACG,GAAG;IAC7D,KAAK,CAACE,aAAa,GAAGN,eAAe,CAACI,GAAG;IACzC,MAAM,CAACG,0BAA0B;mBAClBA,0BAA0B,CACxCC,MAA0C,EACzC,CAAC;QACF,KAAK,CAAC,CAAC,CAACC,KAAK,GAAEC,IAAI,EAAC,CAAC,GAAGF,MAAM;QAC9B,KAAK,CAACG,WAAW,GAAG,KAAK,CAACN,uBAAuB;QACjD,KAAK,CAACO,aAAa,GAAGb,yCAAyC,CAACY,WAAW;QAC3E,KAAK,CAACE,GAAG,IAAI,QAAQ,EAAEhB,GAAG,CAACS,aAAa,EAAE,sBAAsB,EAAEG,KAAK,IAAIb,UAAU,CAACc,IAAI;QAC1F,MAAM,CAACZ,KAAK,CAACe,GAAG,EAAE,CAAC;YAClBC,MAAM,EAAE,CAAK;YACbC,OAAO,EACN,CAAC;gBACA,CAAc,eAAE,CAAkB;gBAClCH,aAAa;YACd,CAAC;QACH,CAAC;IACF,CAAC;AACF,CAAC"}
1
+ {"version":3,"sources":["../src/get_auth0_v2_client_grants_b.ts"],"sourcesContent":["import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'\nimport { fetch } from '@ctx-core/fetch'\nimport { be_, B } from '@ctx-core/object'\nimport { query_str_ } from '@ctx-core/uri'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx.js'\nimport { auth0_management_token__b} from './auth0_management_token__b.js'\nconst key = 'get_auth0_v2_client_grants'\nexport const get_auth0_v2_client_grants_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst auth0_management_token_ = auth0_management_token__b(ctx)\n\tconst AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)\n\treturn get_auth0_v2_client_grants as get_auth0_v2_client_grants_T\n\tasync function get_auth0_v2_client_grants(\n\t\tparams:get_auth0_v2_client_grants_params_I\n\t) {\n\t\tconst { query, json } = params\n\t\tconst auth0_token = await auth0_management_token_()\n\t\tconst authorization = verify_access_token_header_authorization_(auth0_token)\n\t\tconst url = `https://${AUTH0_DOMAIN$.$}/api/v2/client-grants?${query || query_str_(json)}`\n\t\treturn fetch(url, {\n\t\t\tmethod: 'GET',\n\t\t\theaders:\n\t\t\t\t{\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tauthorization,\n\t\t\t\t},\n\t\t})\n\t}\n})\nexport interface get_auth0_v2_client_grants_params_I {\n\tquery?:string\n\tjson?:any\n}\nexport type get_auth0_v2_client_grants_T =\n\t(params:get_auth0_v2_client_grants_params_I)=>Promise<Response>\n"],"names":["verify_access_token_header_authorization_","AUTH0_DOMAIN$_b","fetch","be_","query_str_","auth0_management_token__b","key","get_auth0_v2_client_grants_b","ctx","auth0_management_token_","AUTH0_DOMAIN$","get_auth0_v2_client_grants","params","query","json","auth0_token","authorization","url","$","method","headers"],"mappings":"AAAA,MAAM,GAAGA,yCAAyC,EAAEC,eAAe,QAAQ,CAAiB;AAC5F,MAAM,GAAGC,KAAK,QAAQ,CAAiB;AACvC,MAAM,GAAGC,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,UAAU,QAAQ,CAAe;AAE1C,MAAM,GAAGC,yBAAyB,QAAO,CAAgC;AACzE,KAAK,CAACC,GAAG,GAAG,CAA4B;AACxC,MAAM,CAAC,KAAK,CAACC,4BAA4B,GAAuCJ,GAAG,CAAmCG,GAAG,GAAEE,GAAG,GAAE,CAAC;IAChI,KAAK,CAACC,uBAAuB,GAAGJ,yBAAyB,CAACG,GAAG;IAC7D,KAAK,CAACE,aAAa,GAAGT,eAAe,CAACO,GAAG;IACzC,MAAM,CAACG,0BAA0B;mBAClBA,0BAA0B,CACxCC,MAA0C,EACzC,CAAC;QACF,KAAK,CAAC,CAAC,CAACC,KAAK,GAAEC,IAAI,EAAC,CAAC,GAAGF,MAAM;QAC9B,KAAK,CAACG,WAAW,GAAG,KAAK,CAACN,uBAAuB;QACjD,KAAK,CAACO,aAAa,GAAGhB,yCAAyC,CAACe,WAAW;QAC3E,KAAK,CAACE,GAAG,IAAI,QAAQ,EAAEP,aAAa,CAACQ,CAAC,CAAC,sBAAsB,EAAEL,KAAK,IAAIT,UAAU,CAACU,IAAI;QACvF,MAAM,CAACZ,KAAK,CAACe,GAAG,EAAE,CAAC;YAClBE,MAAM,EAAE,CAAK;YACbC,OAAO,EACN,CAAC;gBACA,CAAc,eAAE,CAAkB;gBAClCJ,aAAa;YACd,CAAC;QACH,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -1,6 +1,6 @@
1
- import { be_ } from '@ctx-core/object';
2
- import { fetch } from '@ctx-core/fetch';
3
1
  import { verify_access_token_header_authorization_ } from '@ctx-core/auth0';
2
+ import { fetch } from '@ctx-core/fetch';
3
+ import { be_ } from '@ctx-core/object';
4
4
  import { auth0_management_token__b } from './auth0_management_token__b.js';
5
5
  const key = 'get_auth0_v2_user';
6
6
  export const get_auth0_v2_user_b = be_(key, (ctx)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/get_auth0_v2_user_b.ts"],"sourcesContent":["import { be_, B } from '@ctx-core/object'\nimport { fetch } from '@ctx-core/fetch'\nimport { verify_access_token_header_authorization_ } from '@ctx-core/auth0'\nimport { auth0_management_token__b } from './auth0_management_token__b.js'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx'\nconst key = 'get_auth0_v2_user'\nexport const get_auth0_v2_user_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst auth0_management_token_ = auth0_management_token__b(ctx)\n\treturn get_auth0_v2_user as get_auth0_v2_user_T\n\tasync function get_auth0_v2_user({ AUTH0_DOMAIN, user_id }:get_auth0_v2_user_params_T):Promise<Response> {\n\t\tconst auth0_token = await auth0_management_token_()\n\t\tconst authorization = verify_access_token_header_authorization_(auth0_token)\n\t\tconst url = `https://${AUTH0_DOMAIN}/api/v2/users/${user_id}`\n\t\treturn fetch(url, {\n\t\t\tmethod: 'GET',\n\t\t\theaders:\n\t\t\t\t{\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tauthorization,\n\t\t\t\t},\n\t\t})\n\t}\n})\nexport interface get_auth0_v2_user_params_T {\n\tAUTH0_DOMAIN:string\n\tuser_id:string\n}\nexport type get_auth0_v2_user_T =\n\t(params:get_auth0_v2_user_params_T)=>Promise<Response>\n"],"names":["be_","fetch","verify_access_token_header_authorization_","auth0_management_token__b","key","get_auth0_v2_user_b","ctx","auth0_management_token_","get_auth0_v2_user","AUTH0_DOMAIN","user_id","auth0_token","authorization","url","method","headers"],"mappings":"AAAA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,KAAK,QAAQ,CAAiB;AACvC,MAAM,GAAGC,yCAAyC,QAAQ,CAAiB;AAC3E,MAAM,GAAGC,yBAAyB,QAAQ,CAAgC;AAE1E,KAAK,CAACC,GAAG,GAAG,CAAmB;AAC/B,MAAM,CAAC,KAAK,CAACC,mBAAmB,GAAuCL,GAAG,CAAmCI,GAAG,GAAEE,GAAG,GAAE,CAAC;IACvH,KAAK,CAACC,uBAAuB,GAAGJ,yBAAyB,CAACG,GAAG;IAC7D,MAAM,CAACE,iBAAiB;mBACTA,iBAAiB,CAAC,CAAC,CAACC,YAAY,GAAEC,OAAO,EAA4B,CAAC,EAAoB,CAAC;QACzG,KAAK,CAACC,WAAW,GAAG,KAAK,CAACJ,uBAAuB;QACjD,KAAK,CAACK,aAAa,GAAGV,yCAAyC,CAACS,WAAW;QAC3E,KAAK,CAACE,GAAG,IAAI,QAAQ,EAAEJ,YAAY,CAAC,cAAc,EAAEC,OAAO;QAC3D,MAAM,CAACT,KAAK,CAACY,GAAG,EAAE,CAAC;YAClBC,MAAM,EAAE,CAAK;YACbC,OAAO,EACN,CAAC;gBACA,CAAc,eAAE,CAAkB;gBAClCH,aAAa;YACd,CAAC;QACH,CAAC;IACF,CAAC;AACF,CAAC"}
1
+ {"version":3,"sources":["../src/get_auth0_v2_user_b.ts"],"sourcesContent":["import { verify_access_token_header_authorization_ } from '@ctx-core/auth0'\nimport { fetch } from '@ctx-core/fetch'\nimport { be_, B } from '@ctx-core/object'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx.js'\nimport { auth0_management_token__b } from './auth0_management_token__b.js'\nconst key = 'get_auth0_v2_user'\nexport const get_auth0_v2_user_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst auth0_management_token_ = auth0_management_token__b(ctx)\n\treturn get_auth0_v2_user as get_auth0_v2_user_T\n\tasync function get_auth0_v2_user({ AUTH0_DOMAIN, user_id }:get_auth0_v2_user_params_T):Promise<Response> {\n\t\tconst auth0_token = await auth0_management_token_()\n\t\tconst authorization = verify_access_token_header_authorization_(auth0_token)\n\t\tconst url = `https://${AUTH0_DOMAIN}/api/v2/users/${user_id}`\n\t\treturn fetch(url, {\n\t\t\tmethod: 'GET',\n\t\t\theaders:\n\t\t\t\t{\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tauthorization,\n\t\t\t\t},\n\t\t})\n\t}\n})\nexport interface get_auth0_v2_user_params_T {\n\tAUTH0_DOMAIN:string\n\tuser_id:string\n}\nexport type get_auth0_v2_user_T =\n\t(params:get_auth0_v2_user_params_T)=>Promise<Response>\n"],"names":["verify_access_token_header_authorization_","fetch","be_","auth0_management_token__b","key","get_auth0_v2_user_b","ctx","auth0_management_token_","get_auth0_v2_user","AUTH0_DOMAIN","user_id","auth0_token","authorization","url","method","headers"],"mappings":"AAAA,MAAM,GAAGA,yCAAyC,QAAQ,CAAiB;AAC3E,MAAM,GAAGC,KAAK,QAAQ,CAAiB;AACvC,MAAM,GAAGC,GAAG,QAAW,CAAkB;AAEzC,MAAM,GAAGC,yBAAyB,QAAQ,CAAgC;AAC1E,KAAK,CAACC,GAAG,GAAG,CAAmB;AAC/B,MAAM,CAAC,KAAK,CAACC,mBAAmB,GAAuCH,GAAG,CAAmCE,GAAG,GAAEE,GAAG,GAAE,CAAC;IACvH,KAAK,CAACC,uBAAuB,GAAGJ,yBAAyB,CAACG,GAAG;IAC7D,MAAM,CAACE,iBAAiB;mBACTA,iBAAiB,CAAC,CAAC,CAACC,YAAY,GAAEC,OAAO,EAA4B,CAAC,EAAoB,CAAC;QACzG,KAAK,CAACC,WAAW,GAAG,KAAK,CAACJ,uBAAuB;QACjD,KAAK,CAACK,aAAa,GAAGZ,yCAAyC,CAACW,WAAW;QAC3E,KAAK,CAACE,GAAG,IAAI,QAAQ,EAAEJ,YAAY,CAAC,cAAc,EAAEC,OAAO;QAC3D,MAAM,CAACT,KAAK,CAACY,GAAG,EAAE,CAAC;YAClBC,MAAM,EAAE,CAAK;YACbC,OAAO,EACN,CAAC;gBACA,CAAc,eAAE,CAAkB;gBAClCH,aAAa;YACd,CAAC;QACH,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -1,6 +1,6 @@
1
+ import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0';
1
2
  import { be_ } from '@ctx-core/object';
2
3
  import { fetch } from '@ctx-core/fetch';
3
- import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0';
4
4
  import { auth0_management_token__b } from './auth0_management_token__b.js';
5
5
  const key = 'get_auth0_v2_users_by_email';
6
6
  export const get_auth0_v2_users_by_email_b = be_(key, (ctx)=>{
@@ -8,11 +8,11 @@ export const get_auth0_v2_users_by_email_b = be_(key, (ctx)=>{
8
8
  return get_auth0_v2_users_by_email;
9
9
  async function get_auth0_v2_users_by_email(params) {
10
10
  const { email } = params;
11
- const AUTH0_DOMAIN = params.AUTH0_DOMAIN || AUTH0_DOMAIN$_b(ctx)._;
11
+ const AUTH0_DOMAIN = params.AUTH0_DOMAIN || AUTH0_DOMAIN$_b(ctx).$;
12
12
  const auth0_token = await auth0_management_token_();
13
13
  const authorization = verify_access_token_header_authorization_(auth0_token);
14
14
  const url = `https://${AUTH0_DOMAIN}/api/v2/users-by-email?email=${encodeURIComponent(email)}`;
15
- return fetch(url, {
15
+ return await fetch(url, {
16
16
  method: 'GET',
17
17
  headers: {
18
18
  'Content-Type': 'application/json',
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/get_auth0_v2_users_by_email_b.ts"],"sourcesContent":["import { be_, B } from '@ctx-core/object'\nimport { fetch } from '@ctx-core/fetch'\nimport { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'\nimport { auth0_management_token__b } from './auth0_management_token__b.js'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx'\nconst key = 'get_auth0_v2_users_by_email'\nexport const get_auth0_v2_users_by_email_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst auth0_management_token_ = auth0_management_token__b(ctx)\n\treturn get_auth0_v2_users_by_email as get_auth0_v2_users_by_email_T\n\tasync function get_auth0_v2_users_by_email(params:get_auth0_v2_users_by_email_params_I) {\n\t\tconst { email } = params\n\t\tconst AUTH0_DOMAIN = params.AUTH0_DOMAIN || AUTH0_DOMAIN$_b(ctx)._\n\t\tconst auth0_token = await auth0_management_token_()\n\t\tconst authorization = verify_access_token_header_authorization_(auth0_token)\n\t\tconst url = `https://${AUTH0_DOMAIN}/api/v2/users-by-email?email=${encodeURIComponent(email)}`\n\t\treturn fetch(url, {\n\t\t\tmethod: 'GET',\n\t\t\theaders:\n\t\t\t\t{\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tauthorization,\n\t\t\t\t},\n\t\t})\n\t}\n})\nexport type get_auth0_v2_users_by_email_params_I = {\n\temail:string,\n\tAUTH0_DOMAIN?:string,\n}\nexport type get_auth0_v2_users_by_email_T =\n\t(params:get_auth0_v2_users_by_email_params_I)=>Promise<Response>\n"],"names":["be_","fetch","verify_access_token_header_authorization_","AUTH0_DOMAIN$_b","auth0_management_token__b","key","get_auth0_v2_users_by_email_b","ctx","auth0_management_token_","get_auth0_v2_users_by_email","params","email","AUTH0_DOMAIN","_","auth0_token","authorization","url","encodeURIComponent","method","headers"],"mappings":"AAAA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,KAAK,QAAQ,CAAiB;AACvC,MAAM,GAAGC,yCAAyC,EAAEC,eAAe,QAAQ,CAAiB;AAC5F,MAAM,GAAGC,yBAAyB,QAAQ,CAAgC;AAE1E,KAAK,CAACC,GAAG,GAAG,CAA6B;AACzC,MAAM,CAAC,KAAK,CAACC,6BAA6B,GAAuCN,GAAG,CAAmCK,GAAG,GAAEE,GAAG,GAAE,CAAC;IACjI,KAAK,CAACC,uBAAuB,GAAGJ,yBAAyB,CAACG,GAAG;IAC7D,MAAM,CAACE,2BAA2B;mBACnBA,2BAA2B,CAACC,MAA2C,EAAE,CAAC;QACxF,KAAK,CAAC,CAAC,CAACC,KAAK,EAAC,CAAC,GAAGD,MAAM;QACxB,KAAK,CAACE,YAAY,GAAGF,MAAM,CAACE,YAAY,IAAIT,eAAe,CAACI,GAAG,EAAEM,CAAC;QAClE,KAAK,CAACC,WAAW,GAAG,KAAK,CAACN,uBAAuB;QACjD,KAAK,CAACO,aAAa,GAAGb,yCAAyC,CAACY,WAAW;QAC3E,KAAK,CAACE,GAAG,IAAI,QAAQ,EAAEJ,YAAY,CAAC,6BAA6B,EAAEK,kBAAkB,CAACN,KAAK;QAC3F,MAAM,CAACV,KAAK,CAACe,GAAG,EAAE,CAAC;YAClBE,MAAM,EAAE,CAAK;YACbC,OAAO,EACN,CAAC;gBACA,CAAc,eAAE,CAAkB;gBAClCJ,aAAa;YACd,CAAC;QACH,CAAC;IACF,CAAC;AACF,CAAC"}
1
+ {"version":3,"sources":["../src/get_auth0_v2_users_by_email_b.ts"],"sourcesContent":["import type { Auth0UserProfile } from 'auth0-js'\nimport { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'\nimport { be_, B } from '@ctx-core/object'\nimport { fetch } from '@ctx-core/fetch'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx.js'\nimport { auth0_management_token__b } from './auth0_management_token__b.js'\nconst key = 'get_auth0_v2_users_by_email'\nexport const get_auth0_v2_users_by_email_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst auth0_management_token_ = auth0_management_token__b(ctx)\n\treturn get_auth0_v2_users_by_email as get_auth0_v2_users_by_email_T\n\tasync function get_auth0_v2_users_by_email(params:get_auth0_v2_users_by_email_params_I) {\n\t\tconst { email } = params\n\t\tconst AUTH0_DOMAIN = params.AUTH0_DOMAIN || AUTH0_DOMAIN$_b(ctx).$\n\t\tconst auth0_token = await auth0_management_token_()\n\t\tconst authorization = verify_access_token_header_authorization_(auth0_token)\n\t\tconst url = `https://${AUTH0_DOMAIN}/api/v2/users-by-email?email=${encodeURIComponent(email)}`\n\t\treturn await fetch(url, {\n\t\t\tmethod: 'GET',\n\t\t\theaders:\n\t\t\t\t{\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tauthorization,\n\t\t\t\t},\n\t\t})\n\t}\n})\nexport type get_auth0_v2_users_by_email_params_I = {\n\temail:string,\n\tAUTH0_DOMAIN?:string,\n}\nexport type get_auth0_v2_users_by_email_T =\n\t(params:get_auth0_v2_users_by_email_params_I)=>Promise<Response>\nexport type get_auth0_v2_users_by_email_response_T = Auth0UserProfile[]\n"],"names":["verify_access_token_header_authorization_","AUTH0_DOMAIN$_b","be_","fetch","auth0_management_token__b","key","get_auth0_v2_users_by_email_b","ctx","auth0_management_token_","get_auth0_v2_users_by_email","params","email","AUTH0_DOMAIN","$","auth0_token","authorization","url","encodeURIComponent","method","headers"],"mappings":"AACA,MAAM,GAAGA,yCAAyC,EAAEC,eAAe,QAAQ,CAAiB;AAC5F,MAAM,GAAGC,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,KAAK,QAAQ,CAAiB;AAEvC,MAAM,GAAGC,yBAAyB,QAAQ,CAAgC;AAC1E,KAAK,CAACC,GAAG,GAAG,CAA6B;AACzC,MAAM,CAAC,KAAK,CAACC,6BAA6B,GAAuCJ,GAAG,CAAmCG,GAAG,GAAEE,GAAG,GAAE,CAAC;IACjI,KAAK,CAACC,uBAAuB,GAAGJ,yBAAyB,CAACG,GAAG;IAC7D,MAAM,CAACE,2BAA2B;mBACnBA,2BAA2B,CAACC,MAA2C,EAAE,CAAC;QACxF,KAAK,CAAC,CAAC,CAACC,KAAK,EAAC,CAAC,GAAGD,MAAM;QACxB,KAAK,CAACE,YAAY,GAAGF,MAAM,CAACE,YAAY,IAAIX,eAAe,CAACM,GAAG,EAAEM,CAAC;QAClE,KAAK,CAACC,WAAW,GAAG,KAAK,CAACN,uBAAuB;QACjD,KAAK,CAACO,aAAa,GAAGf,yCAAyC,CAACc,WAAW;QAC3E,KAAK,CAACE,GAAG,IAAI,QAAQ,EAAEJ,YAAY,CAAC,6BAA6B,EAAEK,kBAAkB,CAACN,KAAK;QAC3F,MAAM,CAAC,KAAK,CAACR,KAAK,CAACa,GAAG,EAAE,CAAC;YACxBE,MAAM,EAAE,CAAK;YACbC,OAAO,EACN,CAAC;gBACA,CAAc,eAAE,CAAkB;gBAClCJ,aAAa;YACd,CAAC;QACH,CAAC;IACF,CAAC;AACF,CAAC"}
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- export * from './auth0_management_Ctx.js';
2
- export * from './auth0_management_ctx_I.generated.js';
3
1
  export * from './auth0_audience__b.js';
4
2
  export * from './auth0_management_.js';
5
3
  export * from './auth0_management_client_credentials_body__b.js';
4
+ export * from './auth0_management_Ctx.js';
5
+ export * from './auth0_management_ctx_I.generated.js';
6
6
  export * from './auth0_management_token__b.js';
7
7
  export * from './get_auth0_v2_client_grants_b.js';
8
8
  export * from './get_auth0_v2_user_b.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './auth0_management_Ctx.js'\nexport * from './auth0_management_ctx_I.generated.js'\nexport * from './auth0_audience__b.js'\nexport * from './auth0_management_.js'\nexport * from './auth0_management_client_credentials_body__b.js'\nexport * from './auth0_management_token__b.js'\nexport * from './get_auth0_v2_client_grants_b.js'\nexport * from './get_auth0_v2_user_b.js'\nexport * from './get_auth0_v2_users_by_email_b.js'\nexport * from './patch_auth0_v2_client_b.js'\nexport * from './patch_auth0_v2_user_b.js'\n"],"names":[],"mappings":"cAAc,CAA2B;cAC3B,CAAuC;cACvC,CAAwB;cACxB,CAAwB;cACxB,CAAkD;cAClD,CAAgC;cAChC,CAAmC;cACnC,CAA0B;cAC1B,CAAoC;cACpC,CAA8B;cAC9B,CAA4B"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './auth0_audience__b.js'\nexport * from './auth0_management_.js'\nexport * from './auth0_management_client_credentials_body__b.js'\nexport * from './auth0_management_Ctx.js'\nexport * from './auth0_management_ctx_I.generated.js'\nexport * from './auth0_management_token__b.js'\nexport * from './get_auth0_v2_client_grants_b.js'\nexport * from './get_auth0_v2_user_b.js'\nexport * from './get_auth0_v2_users_by_email_b.js'\nexport * from './patch_auth0_v2_client_b.js'\nexport * from './patch_auth0_v2_user_b.js'\n"],"names":[],"mappings":"cAAc,CAAwB;cACxB,CAAwB;cACxB,CAAkD;cAClD,CAA2B;cAC3B,CAAuC;cACvC,CAAgC;cAChC,CAAmC;cACnC,CAA0B;cAC1B,CAAoC;cACpC,CAA8B;cAC9B,CAA4B"}
@@ -1,6 +1,6 @@
1
+ import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0';
1
2
  import { be_ } from '@ctx-core/object';
2
3
  import { fetch } from '@ctx-core/fetch';
3
- import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0';
4
4
  import { auth0_management_token__b } from './auth0_management_token__b.js';
5
5
  const key = 'patch_auth0_v2_client';
6
6
  export const patch_auth0_v2_client_b = be_(key, (ctx)=>{
@@ -11,7 +11,7 @@ export const patch_auth0_v2_client_b = be_(key, (ctx)=>{
11
11
  const { client_id =process.env.AUTH0_CLIENT_ID , body , json , } = params;
12
12
  const auth0_token = await auth0_management_token_();
13
13
  const authorization = verify_access_token_header_authorization_(auth0_token);
14
- const url = `https://${AUTH0_DOMAIN$._}/api/v2/clients/${client_id}`;
14
+ const url = `https://${AUTH0_DOMAIN$.$}/api/v2/clients/${client_id}`;
15
15
  return fetch(url, {
16
16
  method: 'PATCH',
17
17
  headers: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/patch_auth0_v2_client_b.ts"],"sourcesContent":["import { be_, B } from '@ctx-core/object'\nimport { fetch } from '@ctx-core/fetch'\nimport { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'\nimport { auth0_management_token__b } from './auth0_management_token__b.js'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx'\nconst key = 'patch_auth0_v2_client'\nexport const patch_auth0_v2_client_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst auth0_management_token_ = auth0_management_token__b(ctx)\n\tconst AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)\n\treturn patch_auth0_v2_client as patch_auth0_v2_client_T\n\tasync function patch_auth0_v2_client(params:patch_auth0_v2_client_params_T) {\n\t\tconst {\n\t\t\tclient_id = process.env.AUTH0_CLIENT_ID,\n\t\t\tbody,\n\t\t\tjson,\n\t\t} = params\n\t\tconst auth0_token = await auth0_management_token_()\n\t\tconst authorization = verify_access_token_header_authorization_(auth0_token)\n\t\tconst url = `https://${AUTH0_DOMAIN$._}/api/v2/clients/${client_id}`\n\t\treturn fetch(url, {\n\t\t\tmethod: 'PATCH',\n\t\t\theaders:\n\t\t\t\t{\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tauthorization,\n\t\t\t\t},\n\t\t\tbody: body || JSON.stringify(json),\n\t\t})\n\t}\n})\nexport interface patch_auth0_v2_client_params_T {\n\tclient_id?:string\n\tbody?:string\n\tjson?:unknown\n}\nexport type patch_auth0_v2_client_T =\n\t(params:patch_auth0_v2_client_params_T)=>Promise<Response>\n"],"names":["be_","fetch","verify_access_token_header_authorization_","AUTH0_DOMAIN$_b","auth0_management_token__b","key","patch_auth0_v2_client_b","ctx","auth0_management_token_","AUTH0_DOMAIN$","patch_auth0_v2_client","params","client_id","process","env","AUTH0_CLIENT_ID","body","json","auth0_token","authorization","url","_","method","headers","JSON","stringify"],"mappings":"AAAA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,KAAK,QAAQ,CAAiB;AACvC,MAAM,GAAGC,yCAAyC,EAAEC,eAAe,QAAQ,CAAiB;AAC5F,MAAM,GAAGC,yBAAyB,QAAQ,CAAgC;AAE1E,KAAK,CAACC,GAAG,GAAG,CAAuB;AACnC,MAAM,CAAC,KAAK,CAACC,uBAAuB,GAAuCN,GAAG,CAAmCK,GAAG,GAAEE,GAAG,GAAE,CAAC;IAC3H,KAAK,CAACC,uBAAuB,GAAGJ,yBAAyB,CAACG,GAAG;IAC7D,KAAK,CAACE,aAAa,GAAGN,eAAe,CAACI,GAAG;IACzC,MAAM,CAACG,qBAAqB;mBACbA,qBAAqB,CAACC,MAAqC,EAAE,CAAC;QAC5E,KAAK,CAAC,CAAC,CACNC,SAAS,EAAGC,OAAO,CAACC,GAAG,CAACC,eAAe,GACvCC,IAAI,GACJC,IAAI,IACL,CAAC,GAAGN,MAAM;QACV,KAAK,CAACO,WAAW,GAAG,KAAK,CAACV,uBAAuB;QACjD,KAAK,CAACW,aAAa,GAAGjB,yCAAyC,CAACgB,WAAW;QAC3E,KAAK,CAACE,GAAG,IAAI,QAAQ,EAAEX,aAAa,CAACY,CAAC,CAAC,gBAAgB,EAAET,SAAS;QAClE,MAAM,CAACX,KAAK,CAACmB,GAAG,EAAE,CAAC;YAClBE,MAAM,EAAE,CAAO;YACfC,OAAO,EACN,CAAC;gBACA,CAAc,eAAE,CAAkB;gBAClCJ,aAAa;YACd,CAAC;YACFH,IAAI,EAAEA,IAAI,IAAIQ,IAAI,CAACC,SAAS,CAACR,IAAI;QAClC,CAAC;IACF,CAAC;AACF,CAAC"}
1
+ {"version":3,"sources":["../src/patch_auth0_v2_client_b.ts"],"sourcesContent":["import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'\nimport { be_, B } from '@ctx-core/object'\nimport { fetch } from '@ctx-core/fetch'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx.js'\nimport { auth0_management_token__b } from './auth0_management_token__b.js'\nconst key = 'patch_auth0_v2_client'\nexport const patch_auth0_v2_client_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst auth0_management_token_ = auth0_management_token__b(ctx)\n\tconst AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)\n\treturn patch_auth0_v2_client as patch_auth0_v2_client_T\n\tasync function patch_auth0_v2_client(params:patch_auth0_v2_client_params_T) {\n\t\tconst {\n\t\t\tclient_id = process.env.AUTH0_CLIENT_ID,\n\t\t\tbody,\n\t\t\tjson,\n\t\t} = params\n\t\tconst auth0_token = await auth0_management_token_()\n\t\tconst authorization = verify_access_token_header_authorization_(auth0_token)\n\t\tconst url = `https://${AUTH0_DOMAIN$.$}/api/v2/clients/${client_id}`\n\t\treturn fetch(url, {\n\t\t\tmethod: 'PATCH',\n\t\t\theaders:\n\t\t\t\t{\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tauthorization,\n\t\t\t\t},\n\t\t\tbody: body || JSON.stringify(json),\n\t\t})\n\t}\n})\nexport interface patch_auth0_v2_client_params_T {\n\tclient_id?:string\n\tbody?:string\n\tjson?:unknown\n}\nexport type patch_auth0_v2_client_T =\n\t(params:patch_auth0_v2_client_params_T)=>Promise<Response>\n"],"names":["verify_access_token_header_authorization_","AUTH0_DOMAIN$_b","be_","fetch","auth0_management_token__b","key","patch_auth0_v2_client_b","ctx","auth0_management_token_","AUTH0_DOMAIN$","patch_auth0_v2_client","params","client_id","process","env","AUTH0_CLIENT_ID","body","json","auth0_token","authorization","url","$","method","headers","JSON","stringify"],"mappings":"AAAA,MAAM,GAAGA,yCAAyC,EAAEC,eAAe,QAAQ,CAAiB;AAC5F,MAAM,GAAGC,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,KAAK,QAAQ,CAAiB;AAEvC,MAAM,GAAGC,yBAAyB,QAAQ,CAAgC;AAC1E,KAAK,CAACC,GAAG,GAAG,CAAuB;AACnC,MAAM,CAAC,KAAK,CAACC,uBAAuB,GAAuCJ,GAAG,CAAmCG,GAAG,GAAEE,GAAG,GAAE,CAAC;IAC3H,KAAK,CAACC,uBAAuB,GAAGJ,yBAAyB,CAACG,GAAG;IAC7D,KAAK,CAACE,aAAa,GAAGR,eAAe,CAACM,GAAG;IACzC,MAAM,CAACG,qBAAqB;mBACbA,qBAAqB,CAACC,MAAqC,EAAE,CAAC;QAC5E,KAAK,CAAC,CAAC,CACNC,SAAS,EAAGC,OAAO,CAACC,GAAG,CAACC,eAAe,GACvCC,IAAI,GACJC,IAAI,IACL,CAAC,GAAGN,MAAM;QACV,KAAK,CAACO,WAAW,GAAG,KAAK,CAACV,uBAAuB;QACjD,KAAK,CAACW,aAAa,GAAGnB,yCAAyC,CAACkB,WAAW;QAC3E,KAAK,CAACE,GAAG,IAAI,QAAQ,EAAEX,aAAa,CAACY,CAAC,CAAC,gBAAgB,EAAET,SAAS;QAClE,MAAM,CAACT,KAAK,CAACiB,GAAG,EAAE,CAAC;YAClBE,MAAM,EAAE,CAAO;YACfC,OAAO,EACN,CAAC;gBACA,CAAc,eAAE,CAAkB;gBAClCJ,aAAa;YACd,CAAC;YACFH,IAAI,EAAEA,IAAI,IAAIQ,IAAI,CAACC,SAAS,CAACR,IAAI;QAClC,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -1,6 +1,6 @@
1
- import { be_ } from '@ctx-core/object';
2
- import { fetch } from '@ctx-core/fetch';
3
1
  import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0';
2
+ import { fetch } from '@ctx-core/fetch';
3
+ import { be_ } from '@ctx-core/object';
4
4
  import { auth0_management_token__b } from './auth0_management_token__b.js';
5
5
  const key = 'patch_auth0_v2_user';
6
6
  export const patch_auth0_v2_user_b = be_(key, (ctx)=>{
@@ -16,7 +16,7 @@ export const patch_auth0_v2_user_b = be_(key, (ctx)=>{
16
16
  */ async function patch_auth0_v2_user(user_id, data) {
17
17
  const auth0_management_token = await auth0_management_token_();
18
18
  const authorization = verify_access_token_header_authorization_(auth0_management_token);
19
- const url = `https://${AUTH0_DOMAIN$._}/api/v2/users/${user_id}`;
19
+ const url = `https://${AUTH0_DOMAIN$.$}/api/v2/users/${user_id}`;
20
20
  return fetch(url, {
21
21
  method: 'PATCH',
22
22
  headers: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/patch_auth0_v2_user_b.ts"],"sourcesContent":["import type { Auth0UserProfile } from 'auth0-js'\nimport { be_, B } from '@ctx-core/object'\nimport { fetch } from '@ctx-core/fetch'\nimport { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'\nimport { auth0_management_token__b } from './auth0_management_token__b.js'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx'\nconst key = 'patch_auth0_v2_user'\nexport const patch_auth0_v2_user_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst auth0_management_token_ = auth0_management_token__b(ctx)\n\tconst AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)\n\treturn patch_auth0_v2_user as patch_auth0_v2_user_T\n\t/**\n\t * @see {@link https://auth0.com/docs/api-auth/tutorials/client-credentials}\n\t * @see {@link https://auth0.com/docs/api-auth/which-oauth-flow-to-use}\n\t * @see {@link https://auth0.com/docs/clients/client-grant-types}\n\t * @see {@link https://auth0.com/docs/api-auth/grant/authorization-code}\n\t * @see {@link https://auth0.com/docs/protocols/oauth2}\n\t */\n\tasync function patch_auth0_v2_user(user_id:string, data:patch_auth0_v2_user_data_I) {\n\t\tconst auth0_management_token = await auth0_management_token_()\n\t\tconst authorization = verify_access_token_header_authorization_(auth0_management_token)\n\t\tconst url = `https://${AUTH0_DOMAIN$._}/api/v2/users/${user_id}`\n\t\treturn fetch(url, {\n\t\t\tmethod: 'PATCH',\n\t\t\theaders:\n\t\t\t\t{\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tauthorization,\n\t\t\t\t},\n\t\t\tbody: JSON.stringify(data),\n\t\t})\n\t}\n})\nexport interface patch_auth0_v2_user_data_I extends Partial<Auth0UserProfile> {\n\tpassword?:string\n}\nexport type patch_auth0_v2_user_T =\n\t(user_id:string, data:patch_auth0_v2_user_data_I)=>Promise<Response>\n"],"names":["be_","fetch","verify_access_token_header_authorization_","AUTH0_DOMAIN$_b","auth0_management_token__b","key","patch_auth0_v2_user_b","ctx","auth0_management_token_","AUTH0_DOMAIN$","patch_auth0_v2_user","user_id","data","auth0_management_token","authorization","url","_","method","headers","body","JSON","stringify"],"mappings":"AACA,MAAM,GAAGA,GAAG,QAAW,CAAkB;AACzC,MAAM,GAAGC,KAAK,QAAQ,CAAiB;AACvC,MAAM,GAAGC,yCAAyC,EAAEC,eAAe,QAAQ,CAAiB;AAC5F,MAAM,GAAGC,yBAAyB,QAAQ,CAAgC;AAE1E,KAAK,CAACC,GAAG,GAAG,CAAqB;AACjC,MAAM,CAAC,KAAK,CAACC,qBAAqB,GAAuCN,GAAG,CAAmCK,GAAG,GAAEE,GAAG,GAAE,CAAC;IACzH,KAAK,CAACC,uBAAuB,GAAGJ,yBAAyB,CAACG,GAAG;IAC7D,KAAK,CAACE,aAAa,GAAGN,eAAe,CAACI,GAAG;IACzC,MAAM,CAACG,mBAAmB;IAC1B,EAMG,AANH;;;;;;EAMG,AANH,EAMG,gBACYA,mBAAmB,CAACC,OAAc,EAAEC,IAA+B,EAAE,CAAC;QACpF,KAAK,CAACC,sBAAsB,GAAG,KAAK,CAACL,uBAAuB;QAC5D,KAAK,CAACM,aAAa,GAAGZ,yCAAyC,CAACW,sBAAsB;QACtF,KAAK,CAACE,GAAG,IAAI,QAAQ,EAAEN,aAAa,CAACO,CAAC,CAAC,cAAc,EAAEL,OAAO;QAC9D,MAAM,CAACV,KAAK,CAACc,GAAG,EAAE,CAAC;YAClBE,MAAM,EAAE,CAAO;YACfC,OAAO,EACN,CAAC;gBACA,CAAc,eAAE,CAAkB;gBAClCJ,aAAa;YACd,CAAC;YACFK,IAAI,EAAEC,IAAI,CAACC,SAAS,CAACT,IAAI;QAC1B,CAAC;IACF,CAAC;AACF,CAAC"}
1
+ {"version":3,"sources":["../src/patch_auth0_v2_user_b.ts"],"sourcesContent":["import type { Auth0UserProfile } from 'auth0-js'\nimport { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'\nimport { fetch } from '@ctx-core/fetch'\nimport { be_, B } from '@ctx-core/object'\nimport type { auth0_management_Ctx } from './auth0_management_Ctx.js'\nimport { auth0_management_token__b } from './auth0_management_token__b.js'\nconst key = 'patch_auth0_v2_user'\nexport const patch_auth0_v2_user_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{\n\tconst auth0_management_token_ = auth0_management_token__b(ctx)\n\tconst AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)\n\treturn patch_auth0_v2_user as patch_auth0_v2_user_T\n\t/**\n\t * @see {@link https://auth0.com/docs/api-auth/tutorials/client-credentials}\n\t * @see {@link https://auth0.com/docs/api-auth/which-oauth-flow-to-use}\n\t * @see {@link https://auth0.com/docs/clients/client-grant-types}\n\t * @see {@link https://auth0.com/docs/api-auth/grant/authorization-code}\n\t * @see {@link https://auth0.com/docs/protocols/oauth2}\n\t */\n\tasync function patch_auth0_v2_user(user_id:string, data:patch_auth0_v2_user_data_I) {\n\t\tconst auth0_management_token = await auth0_management_token_()\n\t\tconst authorization = verify_access_token_header_authorization_(auth0_management_token)\n\t\tconst url = `https://${AUTH0_DOMAIN$.$}/api/v2/users/${user_id}`\n\t\treturn fetch(url, {\n\t\t\tmethod: 'PATCH',\n\t\t\theaders:\n\t\t\t\t{\n\t\t\t\t\t'Content-Type': 'application/json',\n\t\t\t\t\tauthorization,\n\t\t\t\t},\n\t\t\tbody: JSON.stringify(data),\n\t\t})\n\t}\n})\nexport interface patch_auth0_v2_user_data_I extends Partial<Auth0UserProfile> {\n\tpassword?:string\n}\nexport type patch_auth0_v2_user_T =\n\t(user_id:string, data:patch_auth0_v2_user_data_I)=>Promise<Response>\n"],"names":["verify_access_token_header_authorization_","AUTH0_DOMAIN$_b","fetch","be_","auth0_management_token__b","key","patch_auth0_v2_user_b","ctx","auth0_management_token_","AUTH0_DOMAIN$","patch_auth0_v2_user","user_id","data","auth0_management_token","authorization","url","$","method","headers","body","JSON","stringify"],"mappings":"AACA,MAAM,GAAGA,yCAAyC,EAAEC,eAAe,QAAQ,CAAiB;AAC5F,MAAM,GAAGC,KAAK,QAAQ,CAAiB;AACvC,MAAM,GAAGC,GAAG,QAAW,CAAkB;AAEzC,MAAM,GAAGC,yBAAyB,QAAQ,CAAgC;AAC1E,KAAK,CAACC,GAAG,GAAG,CAAqB;AACjC,MAAM,CAAC,KAAK,CAACC,qBAAqB,GAAuCH,GAAG,CAAmCE,GAAG,GAAEE,GAAG,GAAE,CAAC;IACzH,KAAK,CAACC,uBAAuB,GAAGJ,yBAAyB,CAACG,GAAG;IAC7D,KAAK,CAACE,aAAa,GAAGR,eAAe,CAACM,GAAG;IACzC,MAAM,CAACG,mBAAmB;IAC1B,EAMG,AANH;;;;;;EAMG,AANH,EAMG,gBACYA,mBAAmB,CAACC,OAAc,EAAEC,IAA+B,EAAE,CAAC;QACpF,KAAK,CAACC,sBAAsB,GAAG,KAAK,CAACL,uBAAuB;QAC5D,KAAK,CAACM,aAAa,GAAGd,yCAAyC,CAACa,sBAAsB;QACtF,KAAK,CAACE,GAAG,IAAI,QAAQ,EAAEN,aAAa,CAACO,CAAC,CAAC,cAAc,EAAEL,OAAO;QAC9D,MAAM,CAACT,KAAK,CAACa,GAAG,EAAE,CAAC;YAClBE,MAAM,EAAE,CAAO;YACfC,OAAO,EACN,CAAC;gBACA,CAAc,eAAE,CAAkB;gBAClCJ,aAAa;YACd,CAAC;YACFK,IAAI,EAAEC,IAAI,CAACC,SAAS,CAACT,IAAI;QAC1B,CAAC;IACF,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctx-core/auth0-management",
3
- "version": "6.0.101",
3
+ "version": "6.0.106",
4
4
  "description": "ctx-core auth0 management api",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -33,19 +33,19 @@
33
33
  "getAll-client-grants-auth0": "./bin/getAll-client-grants-auth0.mjs"
34
34
  },
35
35
  "dependencies": {
36
- "@ctx-core/auth0": "^25.0.103",
37
- "@ctx-core/fetch": "^11.0.80",
38
- "@ctx-core/object": "^21.0.22",
39
- "@ctx-core/store": "^27.0.36",
36
+ "@ctx-core/auth0": "^26.0.3",
37
+ "@ctx-core/fetch": "^11.0.83",
38
+ "@ctx-core/object": "^21.0.24",
39
+ "@ctx-core/store": "^27.0.38",
40
40
  "auth0": "^2.37.0",
41
41
  "svelte": "3.44.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@ctx-core/dev-tools": "^7.2.0",
45
- "@ctx-core/uri": "^12.0.16",
44
+ "@ctx-core/dev-tools": "^7.2.2",
45
+ "@ctx-core/uri": "^12.0.18",
46
46
  "@swc/cli": "^0.1.51",
47
- "@swc/core": "^1.2.107",
48
- "typescript": "^4.4.4"
47
+ "@swc/core": "^1.2.110",
48
+ "typescript": "^4.5.2"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public",
@@ -1,12 +1,12 @@
1
- import { be_, B } from '@ctx-core/object'
2
1
  import { AUTH0_DOMAIN$_b } from '@ctx-core/auth0'
3
- import type { auth0_management_Ctx } from './auth0_management_Ctx'
2
+ import { be_, B } from '@ctx-core/object'
3
+ import type { auth0_management_Ctx } from './auth0_management_Ctx.js'
4
4
  const key = 'auth0_audience_'
5
5
  export const auth0_audience__b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{
6
6
  const AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx)
7
7
  return auth0_audience_fn as auth0_audience__T
8
8
  function auth0_audience_fn() {
9
- return `https://${AUTH0_DOMAIN$._}/api/v2/`
9
+ return `https://${AUTH0_DOMAIN$.$}/api/v2/`
10
10
  }
11
11
  })
12
12
  export type auth0_audience__T = ()=>string
@@ -1,7 +1,7 @@
1
- import { be_, B } from '@ctx-core/object'
2
1
  import type { post_auth0_oauth_token_body_I } from '@ctx-core/auth0'
2
+ import { be_, B } from '@ctx-core/object'
3
3
  import { auth0_audience__b } from './auth0_audience__b.js'
4
- import type { auth0_management_Ctx } from './auth0_management_Ctx'
4
+ import type { auth0_management_Ctx } from './auth0_management_Ctx.js'
5
5
  const key = 'auth0_management_client_credentials_body_'
6
6
  export const auth0_management_client_credentials_body__b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{
7
7
  const auth0_audience_ = auth0_audience__b(ctx)
@@ -1,7 +1,7 @@
1
- import { be_, B } from '@ctx-core/object'
2
1
  import { auth0_token_T, post_auth0_oauth_token_b } from '@ctx-core/auth0'
2
+ import { be_, B } from '@ctx-core/object'
3
3
  import { auth0_management_client_credentials_body__b } from './auth0_management_client_credentials_body__b.js'
4
- import type { auth0_management_Ctx } from './auth0_management_Ctx'
4
+ import type { auth0_management_Ctx } from './auth0_management_Ctx.js'
5
5
  const key = 'auth0_management_token_'
6
6
  export const auth0_management_token__b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{
7
7
  const post_auth0_oauth_token = post_auth0_oauth_token_b(ctx)
@@ -1,10 +1,9 @@
1
- import { be_, B } from '@ctx-core/object'
2
- import { _query_str } from '@ctx-core/uri'
3
- import { get } from '@ctx-core/store'
4
- import { fetch } from '@ctx-core/fetch'
5
1
  import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'
2
+ import { fetch } from '@ctx-core/fetch'
3
+ import { be_, B } from '@ctx-core/object'
4
+ import { query_str_ } from '@ctx-core/uri'
5
+ import type { auth0_management_Ctx } from './auth0_management_Ctx.js'
6
6
  import { auth0_management_token__b} from './auth0_management_token__b.js'
7
- import type { auth0_management_Ctx } from './auth0_management_Ctx'
8
7
  const key = 'get_auth0_v2_client_grants'
9
8
  export const get_auth0_v2_client_grants_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{
10
9
  const auth0_management_token_ = auth0_management_token__b(ctx)
@@ -16,7 +15,7 @@ export const get_auth0_v2_client_grants_b:B<auth0_management_Ctx, typeof key> =
16
15
  const { query, json } = params
17
16
  const auth0_token = await auth0_management_token_()
18
17
  const authorization = verify_access_token_header_authorization_(auth0_token)
19
- const url = `https://${get(AUTH0_DOMAIN$)}/api/v2/client-grants?${query || _query_str(json)}`
18
+ const url = `https://${AUTH0_DOMAIN$.$}/api/v2/client-grants?${query || query_str_(json)}`
20
19
  return fetch(url, {
21
20
  method: 'GET',
22
21
  headers:
@@ -1,8 +1,8 @@
1
- import { be_, B } from '@ctx-core/object'
2
- import { fetch } from '@ctx-core/fetch'
3
1
  import { verify_access_token_header_authorization_ } from '@ctx-core/auth0'
2
+ import { fetch } from '@ctx-core/fetch'
3
+ import { be_, B } from '@ctx-core/object'
4
+ import type { auth0_management_Ctx } from './auth0_management_Ctx.js'
4
5
  import { auth0_management_token__b } from './auth0_management_token__b.js'
5
- import type { auth0_management_Ctx } from './auth0_management_Ctx'
6
6
  const key = 'get_auth0_v2_user'
7
7
  export const get_auth0_v2_user_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{
8
8
  const auth0_management_token_ = auth0_management_token__b(ctx)
@@ -1,19 +1,20 @@
1
+ import type { Auth0UserProfile } from 'auth0-js'
2
+ import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'
1
3
  import { be_, B } from '@ctx-core/object'
2
4
  import { fetch } from '@ctx-core/fetch'
3
- import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'
5
+ import type { auth0_management_Ctx } from './auth0_management_Ctx.js'
4
6
  import { auth0_management_token__b } from './auth0_management_token__b.js'
5
- import type { auth0_management_Ctx } from './auth0_management_Ctx'
6
7
  const key = 'get_auth0_v2_users_by_email'
7
8
  export const get_auth0_v2_users_by_email_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{
8
9
  const auth0_management_token_ = auth0_management_token__b(ctx)
9
10
  return get_auth0_v2_users_by_email as get_auth0_v2_users_by_email_T
10
11
  async function get_auth0_v2_users_by_email(params:get_auth0_v2_users_by_email_params_I) {
11
12
  const { email } = params
12
- const AUTH0_DOMAIN = params.AUTH0_DOMAIN || AUTH0_DOMAIN$_b(ctx)._
13
+ const AUTH0_DOMAIN = params.AUTH0_DOMAIN || AUTH0_DOMAIN$_b(ctx).$
13
14
  const auth0_token = await auth0_management_token_()
14
15
  const authorization = verify_access_token_header_authorization_(auth0_token)
15
16
  const url = `https://${AUTH0_DOMAIN}/api/v2/users-by-email?email=${encodeURIComponent(email)}`
16
- return fetch(url, {
17
+ return await fetch(url, {
17
18
  method: 'GET',
18
19
  headers:
19
20
  {
@@ -29,3 +30,4 @@ export type get_auth0_v2_users_by_email_params_I = {
29
30
  }
30
31
  export type get_auth0_v2_users_by_email_T =
31
32
  (params:get_auth0_v2_users_by_email_params_I)=>Promise<Response>
33
+ export type get_auth0_v2_users_by_email_response_T = Auth0UserProfile[]
package/src/index.ts CHANGED
@@ -1,8 +1,8 @@
1
- export * from './auth0_management_Ctx.js'
2
- export * from './auth0_management_ctx_I.generated.js'
3
1
  export * from './auth0_audience__b.js'
4
2
  export * from './auth0_management_.js'
5
3
  export * from './auth0_management_client_credentials_body__b.js'
4
+ export * from './auth0_management_Ctx.js'
5
+ export * from './auth0_management_ctx_I.generated.js'
6
6
  export * from './auth0_management_token__b.js'
7
7
  export * from './get_auth0_v2_client_grants_b.js'
8
8
  export * from './get_auth0_v2_user_b.js'
@@ -1,8 +1,8 @@
1
+ import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'
1
2
  import { be_, B } from '@ctx-core/object'
2
3
  import { fetch } from '@ctx-core/fetch'
3
- import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'
4
+ import type { auth0_management_Ctx } from './auth0_management_Ctx.js'
4
5
  import { auth0_management_token__b } from './auth0_management_token__b.js'
5
- import type { auth0_management_Ctx } from './auth0_management_Ctx'
6
6
  const key = 'patch_auth0_v2_client'
7
7
  export const patch_auth0_v2_client_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{
8
8
  const auth0_management_token_ = auth0_management_token__b(ctx)
@@ -16,7 +16,7 @@ export const patch_auth0_v2_client_b:B<auth0_management_Ctx, typeof key> = be_<a
16
16
  } = params
17
17
  const auth0_token = await auth0_management_token_()
18
18
  const authorization = verify_access_token_header_authorization_(auth0_token)
19
- const url = `https://${AUTH0_DOMAIN$._}/api/v2/clients/${client_id}`
19
+ const url = `https://${AUTH0_DOMAIN$.$}/api/v2/clients/${client_id}`
20
20
  return fetch(url, {
21
21
  method: 'PATCH',
22
22
  headers:
@@ -1,9 +1,9 @@
1
1
  import type { Auth0UserProfile } from 'auth0-js'
2
- import { be_, B } from '@ctx-core/object'
3
- import { fetch } from '@ctx-core/fetch'
4
2
  import { verify_access_token_header_authorization_, AUTH0_DOMAIN$_b } from '@ctx-core/auth0'
3
+ import { fetch } from '@ctx-core/fetch'
4
+ import { be_, B } from '@ctx-core/object'
5
+ import type { auth0_management_Ctx } from './auth0_management_Ctx.js'
5
6
  import { auth0_management_token__b } from './auth0_management_token__b.js'
6
- import type { auth0_management_Ctx } from './auth0_management_Ctx'
7
7
  const key = 'patch_auth0_v2_user'
8
8
  export const patch_auth0_v2_user_b:B<auth0_management_Ctx, typeof key> = be_<auth0_management_Ctx, typeof key>(key, ctx=>{
9
9
  const auth0_management_token_ = auth0_management_token__b(ctx)
@@ -19,7 +19,7 @@ export const patch_auth0_v2_user_b:B<auth0_management_Ctx, typeof key> = be_<aut
19
19
  async function patch_auth0_v2_user(user_id:string, data:patch_auth0_v2_user_data_I) {
20
20
  const auth0_management_token = await auth0_management_token_()
21
21
  const authorization = verify_access_token_header_authorization_(auth0_management_token)
22
- const url = `https://${AUTH0_DOMAIN$._}/api/v2/users/${user_id}`
22
+ const url = `https://${AUTH0_DOMAIN$.$}/api/v2/users/${user_id}`
23
23
  return fetch(url, {
24
24
  method: 'PATCH',
25
25
  headers: