@ctx-core/auth0-management 6.0.100 → 6.0.104

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.
Files changed (48) hide show
  1. package/.swcrc +10 -0
  2. package/CHANGELOG.md +51 -0
  3. package/dist/auth0_audience__b.js +4 -3
  4. package/dist/auth0_audience__b.js.map +1 -1
  5. package/dist/auth0_management_.js +4 -2
  6. package/dist/auth0_management_.js.map +1 -1
  7. package/dist/auth0_management_Ctx.js +2 -1
  8. package/dist/auth0_management_Ctx.js.map +1 -1
  9. package/dist/auth0_management_client_credentials_body__b.js +3 -2
  10. package/dist/auth0_management_client_credentials_body__b.js.map +1 -1
  11. package/dist/auth0_management_ctx_I.generated.js +4 -1
  12. package/dist/auth0_management_ctx_I.generated.js.map +1 -1
  13. package/dist/auth0_management_token__b.js +3 -2
  14. package/dist/auth0_management_token__b.js.map +1 -1
  15. package/dist/get_auth0_v2_client_grants_b.js +9 -9
  16. package/dist/get_auth0_v2_client_grants_b.js.map +1 -1
  17. package/dist/get_auth0_v2_user_b.js +7 -6
  18. package/dist/get_auth0_v2_user_b.js.map +1 -1
  19. package/dist/get_auth0_v2_users_by_email_b.js +8 -7
  20. package/dist/get_auth0_v2_users_by_email_b.js.map +1 -1
  21. package/dist/index.js +1 -0
  22. package/dist/index.js.map +1 -1
  23. package/dist/patch_auth0_v2_client_b.js +7 -6
  24. package/dist/patch_auth0_v2_client_b.js.map +1 -1
  25. package/dist/patch_auth0_v2_user_b.js +13 -13
  26. package/dist/patch_auth0_v2_user_b.js.map +1 -1
  27. package/package.json +15 -15
  28. package/src/auth0_audience__b.ts +3 -3
  29. package/src/auth0_management_client_credentials_body__b.ts +2 -2
  30. package/src/auth0_management_token__b.ts +2 -2
  31. package/src/get_auth0_v2_client_grants_b.ts +5 -6
  32. package/src/get_auth0_v2_user_b.ts +3 -3
  33. package/src/get_auth0_v2_users_by_email_b.ts +6 -4
  34. package/src/patch_auth0_v2_client_b.ts +3 -3
  35. package/src/patch_auth0_v2_user_b.ts +4 -4
  36. package/dist/auth0_audience__b.d.ts +0 -6
  37. package/dist/auth0_management_.d.ts +0 -7
  38. package/dist/auth0_management_Ctx.d.ts +0 -4
  39. package/dist/auth0_management_client_credentials_body__b.d.ts +0 -7
  40. package/dist/auth0_management_ctx_I.generated.d.ts +0 -18
  41. package/dist/auth0_management_token__b.d.ts +0 -7
  42. package/dist/get_auth0_v2_client_grants_b.d.ts +0 -10
  43. package/dist/get_auth0_v2_user_b.d.ts +0 -10
  44. package/dist/get_auth0_v2_users_by_email_b.d.ts +0 -10
  45. package/dist/index.cjs +0 -1
  46. package/dist/index.d.ts +0 -11
  47. package/dist/patch_auth0_v2_client_b.d.ts +0 -11
  48. package/dist/patch_auth0_v2_user_b.d.ts +0 -10
package/.swcrc ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "jsc": {
3
+ "target": "es2019",
4
+ "parser": {
5
+ "syntax": "typescript",
6
+ "tsx": true,
7
+ "dynamicImport": true
8
+ }
9
+ }
10
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,56 @@
1
1
  # @ctx-core/auth0-management
2
2
 
3
+ ## 6.0.104
4
+
5
+ ### Patch Changes
6
+
7
+ - version bump: fix published dependencies
8
+
9
+ ## 6.0.105
10
+
11
+ ### Patch Changes
12
+
13
+ - version bump
14
+
15
+ ## 6.0.104
16
+
17
+ ### Patch Changes
18
+
19
+ - version bump
20
+
21
+ ## 6.0.103
22
+
23
+ ### Patch Changes
24
+
25
+ - @swc/core: ^1.2.107 -> ^1.2.108
26
+ - Updated dependencies
27
+ - Updated dependencies
28
+ - @ctx-core/auth0@26.0.1
29
+ - @ctx-core/fetch@11.0.81
30
+ - @ctx-core/object@21.0.23
31
+ - @ctx-core/store@27.0.37
32
+
33
+ ## 6.0.102
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies
38
+ - Updated dependencies
39
+ - Updated dependencies
40
+ - Updated dependencies
41
+ - @ctx-core/auth0@26.0.0
42
+
43
+ ## 6.0.101
44
+
45
+ ### Patch Changes
46
+
47
+ - compile using swc
48
+ - Updated dependencies
49
+ - @ctx-core/auth0@25.0.103
50
+ - @ctx-core/fetch@11.0.80
51
+ - @ctx-core/object@21.0.22
52
+ - @ctx-core/store@27.0.36
53
+
3
54
  ## 6.0.100
4
55
 
5
56
  ### Patch Changes
@@ -1,11 +1,12 @@
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
- export const auth0_audience__b = be_(key, ctx => {
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
12
  //# sourceMappingURL=auth0_audience__b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth0_audience__b.js","sourceRoot":"","sources":["../src/auth0_audience__b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,GAAG,GAAG,iBAAiB,CAAA;AAC7B,MAAM,CAAC,MAAM,iBAAiB,GAAuC,GAAG,CAAmC,GAAG,EAAE,GAAG,CAAA,EAAE;IACpH,MAAM,aAAa,GAAG,eAAe,CAAC,GAAG,CAAC,CAAA;IAC1C,OAAO,iBAAsC,CAAA;IAC7C,SAAS,iBAAiB;QACzB,OAAO,WAAW,aAAa,CAAC,CAAC,UAAU,CAAA;IAC5C,CAAC;AACF,CAAC,CAAC,CAAA"}
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,5 +1,6 @@
1
1
  import { ManagementClient } from 'auth0';
2
- export function auth0_management_(params = {}) {
2
+ export function auth0_management_(params = {
3
+ }) {
3
4
  const domain = params.domain || process.env.AUTH0_DOMAIN || '';
4
5
  const clientId = params.clientId || process.env.AUTH0_MANAGEMENT_ID || '';
5
6
  const clientSecret = params.clientSecret || process.env.AUTH0_MANAGEMENT_SECRET || '';
@@ -8,7 +9,8 @@ export function auth0_management_(params = {}) {
8
9
  domain,
9
10
  clientId,
10
11
  clientSecret,
11
- scope,
12
+ scope
12
13
  });
13
14
  }
15
+
14
16
  //# sourceMappingURL=auth0_management_.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth0_management_.js","sourceRoot":"","sources":["../src/auth0_management_.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AACxC,MAAM,UAAU,iBAAiB,CAAC,SAAmC,EAAE;IACtE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,EAAE,CAAA;IAC9D,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,EAAE,CAAA;IACzE,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,EAAE,CAAA;IACrF,MAAM,KAAK,GAAG,EAAE,CAAA;IAChB,OAAO,IAAI,gBAAgB,CAAC;QAC3B,MAAM;QACN,QAAQ;QACR,YAAY;QACZ,KAAK;KACL,CAAC,CAAA;AACH,CAAC"}
1
+ {"version":3,"sources":["../src/auth0_management_.ts"],"sourcesContent":["import { ManagementClient } from 'auth0'\nexport function auth0_management_(params:auth0_management_params_I = {}) {\n\tconst domain = params.domain || process.env.AUTH0_DOMAIN || ''\n\tconst clientId = params.clientId || process.env.AUTH0_MANAGEMENT_ID || ''\n\tconst clientSecret = params.clientSecret || process.env.AUTH0_MANAGEMENT_SECRET || ''\n\tconst scope = ''\n\treturn new ManagementClient({\n\t\tdomain,\n\t\tclientId,\n\t\tclientSecret,\n\t\tscope,\n\t})\n}\nexport interface auth0_management_params_I {\n\tdomain?:string\n\tclientId?:string\n\tclientSecret?:string\n}\n"],"names":["ManagementClient","auth0_management_","params","domain","process","env","AUTH0_DOMAIN","clientId","AUTH0_MANAGEMENT_ID","clientSecret","AUTH0_MANAGEMENT_SECRET","scope"],"mappings":"AAAA,MAAM,GAAGA,gBAAgB,QAAQ,CAAO;AACxC,MAAM,UAAUC,iBAAiB,CAACC,MAAgC,GAAG,CAAC;AAAA,CAAC,EAAE,CAAC;IACzE,KAAK,CAACC,MAAM,GAAGD,MAAM,CAACC,MAAM,IAAIC,OAAO,CAACC,GAAG,CAACC,YAAY,IAAI,CAAE;IAC9D,KAAK,CAACC,QAAQ,GAAGL,MAAM,CAACK,QAAQ,IAAIH,OAAO,CAACC,GAAG,CAACG,mBAAmB,IAAI,CAAE;IACzE,KAAK,CAACC,YAAY,GAAGP,MAAM,CAACO,YAAY,IAAIL,OAAO,CAACC,GAAG,CAACK,uBAAuB,IAAI,CAAE;IACrF,KAAK,CAACC,KAAK,GAAG,CAAE;IAChB,MAAM,CAAC,GAAG,CAACX,gBAAgB,CAAC,CAAC;QAC5BG,MAAM;QACNI,QAAQ;QACRE,YAAY;QACZE,KAAK;IACN,CAAC;AACF,CAAC"}
@@ -1,2 +1,3 @@
1
- export {};
1
+ export { };
2
+
2
3
  //# sourceMappingURL=auth0_management_Ctx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth0_management_Ctx.js","sourceRoot":"","sources":["../src/auth0_management_Ctx.ts"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../src/auth0_management_Ctx.ts"],"sourcesContent":["import type { auth0_Ctx } from '@ctx-core/auth0'\nimport type { auth0_management_ctx_I } from './auth0_management_ctx_I.generated.js'\nexport interface auth0_management_Ctx\n\textends auth0_management_ctx_I, auth0_Ctx {\n}\n"],"names":[],"mappings":"AAAA,MAAM"}
@@ -1,7 +1,7 @@
1
1
  import { be_ } from '@ctx-core/object';
2
2
  import { auth0_audience__b } from './auth0_audience__b.js';
3
3
  const key = 'auth0_management_client_credentials_body_';
4
- export const auth0_management_client_credentials_body__b = be_(key, ctx => {
4
+ export const auth0_management_client_credentials_body__b = be_(key, (ctx)=>{
5
5
  const auth0_audience_ = auth0_audience__b(ctx);
6
6
  return auth0_management_client_credentials_body_;
7
7
  function auth0_management_client_credentials_body_() {
@@ -9,8 +9,9 @@ export const auth0_management_client_credentials_body__b = be_(key, ctx => {
9
9
  grant_type: 'client_credentials',
10
10
  client_id: process.env.AUTH0_MANAGEMENT_ID,
11
11
  client_secret: process.env.AUTH0_MANAGEMENT_SECRET,
12
- audience: auth0_audience_(),
12
+ audience: auth0_audience_()
13
13
  };
14
14
  }
15
15
  });
16
+
16
17
  //# sourceMappingURL=auth0_management_client_credentials_body__b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth0_management_client_credentials_body__b.js","sourceRoot":"","sources":["../src/auth0_management_client_credentials_body__b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE1D,MAAM,GAAG,GAAG,2CAA2C,CAAA;AACvD,MAAM,CAAC,MAAM,2CAA2C,GAAuC,GAAG,CAAmC,GAAG,EAAE,GAAG,CAAA,EAAE;IAC9I,MAAM,eAAe,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAA;IAC9C,OAAO,yCAAwF,CAAA;IAC/F,SAAS,yCAAyC;QACjD,OAAO;YACN,UAAU,EAAE,oBAAoB;YAChC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAoB;YAC3C,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAwB;YACnD,QAAQ,EAAE,eAAe,EAAE;SAC3B,CAAA;IACF,CAAC;AACF,CAAC,CAAC,CAAA"}
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,2 +1,5 @@
1
- export {};
1
+ /*
2
+ * This file was generated by `npm run generate_ctx_I_file` in @ctx-core/dev-tools
3
+ */ export { };
4
+
2
5
  //# sourceMappingURL=auth0_management_ctx_I.generated.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth0_management_ctx_I.generated.js","sourceRoot":"","sources":["../src/auth0_management_ctx_I.generated.ts"],"names":[],"mappings":""}
1
+ {"version":3,"sources":["../src/auth0_management_ctx_I.generated.ts"],"sourcesContent":["/*\n * This file was generated by `npm run generate_ctx_I_file` in @ctx-core/dev-tools\n*/\nimport type { auth0_audience__T } from './auth0_audience__b.js'\nimport type { auth0_management_client_credentials_body__T } from './auth0_management_client_credentials_body__b.js'\nimport type { auth0_management_token__T } from './auth0_management_token__b.js'\nimport type { get_auth0_v2_client_grants_T } from './get_auth0_v2_client_grants_b.js'\nimport type { get_auth0_v2_user_T } from './get_auth0_v2_user_b.js'\nimport type { get_auth0_v2_users_by_email_T } from './get_auth0_v2_users_by_email_b.js'\nimport type { patch_auth0_v2_client_T } from './patch_auth0_v2_client_b.js'\nimport type { patch_auth0_v2_user_T } from './patch_auth0_v2_user_b.js'\nexport interface auth0_management_ctx_I {\n\tauth0_audience_?:auth0_audience__T\n\tauth0_management_client_credentials_body_?:auth0_management_client_credentials_body__T\n\tauth0_management_token_?:auth0_management_token__T\n\tget_auth0_v2_client_grants?:get_auth0_v2_client_grants_T\n\tget_auth0_v2_user?:get_auth0_v2_user_T\n\tget_auth0_v2_users_by_email?:get_auth0_v2_users_by_email_T\n\tpatch_auth0_v2_client?:patch_auth0_v2_client_T\n\tpatch_auth0_v2_user?:patch_auth0_v2_user_T\n}"],"names":[],"mappings":"AAAA,EAEE,AAFF;;AAEE,AAFF,EAEE,CACF,MAAM"}
@@ -1,8 +1,8 @@
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
- export const auth0_management_token__b = be_(key, ctx => {
5
+ export const auth0_management_token__b = be_(key, (ctx)=>{
6
6
  const post_auth0_oauth_token = post_auth0_oauth_token_b(ctx);
7
7
  const auth0_management_client_credentials_body_fn = auth0_management_client_credentials_body__b(ctx);
8
8
  return auth0_management_token_;
@@ -12,4 +12,5 @@ export const auth0_management_token__b = be_(key, ctx => {
12
12
  return response.json();
13
13
  }
14
14
  });
15
+
15
16
  //# sourceMappingURL=auth0_management_token__b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth0_management_token__b.js","sourceRoot":"","sources":["../src/auth0_management_token__b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAiB,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,EAAE,2CAA2C,EAAE,MAAM,kDAAkD,CAAA;AAE9G,MAAM,GAAG,GAAG,yBAAyB,CAAA;AACrC,MAAM,CAAC,MAAM,yBAAyB,GAAuC,GAAG,CAAmC,GAAG,EAAE,GAAG,CAAA,EAAE;IAC5H,MAAM,sBAAsB,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAA;IAC5D,MAAM,2CAA2C,GAAG,2CAA2C,CAAC,GAAG,CAAC,CAAA;IACpG,OAAO,uBAAoD,CAAA;IAC3D,KAAK,UAAU,uBAAuB;QACrC,MAAM,6BAA6B,GAAG,2CAA2C,EAAE,CAAA;QACnF,MAAM,QAAQ,GAAG,MAAM,sBAAsB,CAAC,6BAA6B,CAAC,CAAA;QAC5E,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAA;IACvB,CAAC;AACF,CAAC,CAAC,CAAA"}
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,26 +1,26 @@
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
- export const get_auth0_v2_client_grants_b = be_(key, ctx => {
7
+ export const get_auth0_v2_client_grants_b = be_(key, (ctx)=>{
9
8
  const auth0_management_token_ = auth0_management_token__b(ctx);
10
9
  const AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx);
11
10
  return get_auth0_v2_client_grants;
12
11
  async function get_auth0_v2_client_grants(params) {
13
- const { query, json } = params;
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: {
20
19
  'Content-Type': 'application/json',
21
- authorization,
22
- },
20
+ authorization
21
+ }
23
22
  });
24
23
  }
25
24
  });
25
+
26
26
  //# sourceMappingURL=get_auth0_v2_client_grants_b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get_auth0_v2_client_grants_b.js","sourceRoot":"","sources":["../src/get_auth0_v2_client_grants_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,yCAAyC,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EAAE,yBAAyB,EAAC,MAAM,gCAAgC,CAAA;AAEzE,MAAM,GAAG,GAAG,4BAA4B,CAAA;AACxC,MAAM,CAAC,MAAM,4BAA4B,GAAuC,GAAG,CAAmC,GAAG,EAAE,GAAG,CAAA,EAAE;IAC/H,MAAM,uBAAuB,GAAG,yBAAyB,CAAC,GAAG,CAAC,CAAA;IAC9D,MAAM,aAAa,GAAG,eAAe,CAAC,GAAG,CAAC,CAAA;IAC1C,OAAO,0BAA0D,CAAA;IACjE,KAAK,UAAU,0BAA0B,CACxC,MAA0C;QAE1C,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;QAC9B,MAAM,WAAW,GAAG,MAAM,uBAAuB,EAAE,CAAA;QACnD,MAAM,aAAa,GAAG,yCAAyC,CAAC,WAAW,CAAC,CAAA;QAC5E,MAAM,GAAG,GAAG,WAAW,GAAG,CAAC,aAAa,CAAC,yBAAyB,KAAK,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAA;QAC7F,OAAO,KAAK,CAAC,GAAG,EAAE;YACjB,MAAM,EAAE,KAAK;YACb,OAAO,EACN;gBACC,cAAc,EAAE,kBAAkB;gBAClC,aAAa;aACb;SACF,CAAC,CAAA;IACH,CAAC;AACF,CAAC,CAAC,CAAA"}
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,12 +1,12 @@
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
- export const get_auth0_v2_user_b = be_(key, ctx => {
6
+ export const get_auth0_v2_user_b = be_(key, (ctx)=>{
7
7
  const auth0_management_token_ = auth0_management_token__b(ctx);
8
8
  return get_auth0_v2_user;
9
- async function get_auth0_v2_user({ AUTH0_DOMAIN, user_id }) {
9
+ async function get_auth0_v2_user({ AUTH0_DOMAIN , user_id }) {
10
10
  const auth0_token = await auth0_management_token_();
11
11
  const authorization = verify_access_token_header_authorization_(auth0_token);
12
12
  const url = `https://${AUTH0_DOMAIN}/api/v2/users/${user_id}`;
@@ -14,9 +14,10 @@ export const get_auth0_v2_user_b = be_(key, ctx => {
14
14
  method: 'GET',
15
15
  headers: {
16
16
  'Content-Type': 'application/json',
17
- authorization,
18
- },
17
+ authorization
18
+ }
19
19
  });
20
20
  }
21
21
  });
22
+
22
23
  //# sourceMappingURL=get_auth0_v2_user_b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get_auth0_v2_user_b.js","sourceRoot":"","sources":["../src/get_auth0_v2_user_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,yCAAyC,EAAE,MAAM,iBAAiB,CAAA;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAE1E,MAAM,GAAG,GAAG,mBAAmB,CAAA;AAC/B,MAAM,CAAC,MAAM,mBAAmB,GAAuC,GAAG,CAAmC,GAAG,EAAE,GAAG,CAAA,EAAE;IACtH,MAAM,uBAAuB,GAAG,yBAAyB,CAAC,GAAG,CAAC,CAAA;IAC9D,OAAO,iBAAwC,CAAA;IAC/C,KAAK,UAAU,iBAAiB,CAAC,EAAE,YAAY,EAAE,OAAO,EAA6B;QACpF,MAAM,WAAW,GAAG,MAAM,uBAAuB,EAAE,CAAA;QACnD,MAAM,aAAa,GAAG,yCAAyC,CAAC,WAAW,CAAC,CAAA;QAC5E,MAAM,GAAG,GAAG,WAAW,YAAY,iBAAiB,OAAO,EAAE,CAAA;QAC7D,OAAO,KAAK,CAAC,GAAG,EAAE;YACjB,MAAM,EAAE,KAAK;YACb,OAAO,EACN;gBACC,cAAc,EAAE,kBAAkB;gBAClC,aAAa;aACb;SACF,CAAC,CAAA;IACH,CAAC;AACF,CAAC,CAAC,CAAA"}
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,24 +1,25 @@
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
- export const get_auth0_v2_users_by_email_b = be_(key, ctx => {
6
+ export const get_auth0_v2_users_by_email_b = be_(key, (ctx)=>{
7
7
  const auth0_management_token_ = auth0_management_token__b(ctx);
8
8
  return get_auth0_v2_users_by_email;
9
9
  async function get_auth0_v2_users_by_email(params) {
10
- const { email } = params;
11
- const AUTH0_DOMAIN = params.AUTH0_DOMAIN || AUTH0_DOMAIN$_b(ctx)._;
10
+ const { email } = params;
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',
19
- authorization,
20
- },
19
+ authorization
20
+ }
21
21
  });
22
22
  }
23
23
  });
24
+
24
25
  //# sourceMappingURL=get_auth0_v2_users_by_email_b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get_auth0_v2_users_by_email_b.js","sourceRoot":"","sources":["../src/get_auth0_v2_users_by_email_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,yCAAyC,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAE1E,MAAM,GAAG,GAAG,6BAA6B,CAAA;AACzC,MAAM,CAAC,MAAM,6BAA6B,GAAuC,GAAG,CAAmC,GAAG,EAAE,GAAG,CAAA,EAAE;IAChI,MAAM,uBAAuB,GAAG,yBAAyB,CAAC,GAAG,CAAC,CAAA;IAC9D,OAAO,2BAA4D,CAAA;IACnE,KAAK,UAAU,2BAA2B,CAAC,MAA2C;QACrF,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,CAAA;QACxB,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;QAClE,MAAM,WAAW,GAAG,MAAM,uBAAuB,EAAE,CAAA;QACnD,MAAM,aAAa,GAAG,yCAAyC,CAAC,WAAW,CAAC,CAAA;QAC5E,MAAM,GAAG,GAAG,WAAW,YAAY,gCAAgC,kBAAkB,CAAC,KAAK,CAAC,EAAE,CAAA;QAC9F,OAAO,KAAK,CAAC,GAAG,EAAE;YACjB,MAAM,EAAE,KAAK;YACb,OAAO,EACN;gBACC,cAAc,EAAE,kBAAkB;gBAClC,aAAa;aACb;SACF,CAAC,CAAA;IACH,CAAC;AACF,CAAC,CAAC,CAAA"}
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
@@ -9,4 +9,5 @@ export * from './get_auth0_v2_user_b.js';
9
9
  export * from './get_auth0_v2_users_by_email_b.js';
10
10
  export * from './patch_auth0_v2_client_b.js';
11
11
  export * from './patch_auth0_v2_user_b.js';
12
+
12
13
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,uCAAuC,CAAA;AACrD,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kDAAkD,CAAA;AAChE,cAAc,gCAAgC,CAAA;AAC9C,cAAc,mCAAmC,CAAA;AACjD,cAAc,0BAA0B,CAAA;AACxC,cAAc,oCAAoC,CAAA;AAClD,cAAc,8BAA8B,CAAA;AAC5C,cAAc,4BAA4B,CAAA"}
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,25 +1,26 @@
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
- export const patch_auth0_v2_client_b = be_(key, ctx => {
6
+ export const patch_auth0_v2_client_b = be_(key, (ctx)=>{
7
7
  const auth0_management_token_ = auth0_management_token__b(ctx);
8
8
  const AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx);
9
9
  return patch_auth0_v2_client;
10
10
  async function patch_auth0_v2_client(params) {
11
- const { client_id = process.env.AUTH0_CLIENT_ID, body, json, } = params;
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: {
18
18
  'Content-Type': 'application/json',
19
- authorization,
19
+ authorization
20
20
  },
21
- body: body || JSON.stringify(json),
21
+ body: body || JSON.stringify(json)
22
22
  });
23
23
  }
24
24
  });
25
+
25
26
  //# sourceMappingURL=patch_auth0_v2_client_b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"patch_auth0_v2_client_b.js","sourceRoot":"","sources":["../src/patch_auth0_v2_client_b.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,yCAAyC,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAE1E,MAAM,GAAG,GAAG,uBAAuB,CAAA;AACnC,MAAM,CAAC,MAAM,uBAAuB,GAAuC,GAAG,CAAmC,GAAG,EAAE,GAAG,CAAA,EAAE;IAC1H,MAAM,uBAAuB,GAAG,yBAAyB,CAAC,GAAG,CAAC,CAAA;IAC9D,MAAM,aAAa,GAAG,eAAe,CAAC,GAAG,CAAC,CAAA;IAC1C,OAAO,qBAAgD,CAAA;IACvD,KAAK,UAAU,qBAAqB,CAAC,MAAqC;QACzE,MAAM,EACL,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,EACvC,IAAI,EACJ,IAAI,GACJ,GAAG,MAAM,CAAA;QACV,MAAM,WAAW,GAAG,MAAM,uBAAuB,EAAE,CAAA;QACnD,MAAM,aAAa,GAAG,yCAAyC,CAAC,WAAW,CAAC,CAAA;QAC5E,MAAM,GAAG,GAAG,WAAW,aAAa,CAAC,CAAC,mBAAmB,SAAS,EAAE,CAAA;QACpE,OAAO,KAAK,CAAC,GAAG,EAAE;YACjB,MAAM,EAAE,OAAO;YACf,OAAO,EACN;gBACC,cAAc,EAAE,kBAAkB;gBAClC,aAAa;aACb;YACF,IAAI,EAAE,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAClC,CAAC,CAAA;IACH,CAAC;AACF,CAAC,CAAC,CAAA"}
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,31 +1,31 @@
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
- export const patch_auth0_v2_user_b = be_(key, ctx => {
6
+ export const patch_auth0_v2_user_b = be_(key, (ctx)=>{
7
7
  const auth0_management_token_ = auth0_management_token__b(ctx);
8
8
  const AUTH0_DOMAIN$ = AUTH0_DOMAIN$_b(ctx);
9
9
  return patch_auth0_v2_user;
10
10
  /**
11
- * @see {@link https://auth0.com/docs/api-auth/tutorials/client-credentials}
12
- * @see {@link https://auth0.com/docs/api-auth/which-oauth-flow-to-use}
13
- * @see {@link https://auth0.com/docs/clients/client-grant-types}
14
- * @see {@link https://auth0.com/docs/api-auth/grant/authorization-code}
15
- * @see {@link https://auth0.com/docs/protocols/oauth2}
16
- */
17
- async function patch_auth0_v2_user(user_id, data) {
11
+ * @see {@link https://auth0.com/docs/api-auth/tutorials/client-credentials}
12
+ * @see {@link https://auth0.com/docs/api-auth/which-oauth-flow-to-use}
13
+ * @see {@link https://auth0.com/docs/clients/client-grant-types}
14
+ * @see {@link https://auth0.com/docs/api-auth/grant/authorization-code}
15
+ * @see {@link https://auth0.com/docs/protocols/oauth2}
16
+ */ async function patch_auth0_v2_user(user_id, data) {
18
17
  const auth0_management_token = await auth0_management_token_();
19
18
  const authorization = verify_access_token_header_authorization_(auth0_management_token);
20
- const url = `https://${AUTH0_DOMAIN$._}/api/v2/users/${user_id}`;
19
+ const url = `https://${AUTH0_DOMAIN$.$}/api/v2/users/${user_id}`;
21
20
  return fetch(url, {
22
21
  method: 'PATCH',
23
22
  headers: {
24
23
  'Content-Type': 'application/json',
25
- authorization,
24
+ authorization
26
25
  },
27
- body: JSON.stringify(data),
26
+ body: JSON.stringify(data)
28
27
  });
29
28
  }
30
29
  });
30
+
31
31
  //# sourceMappingURL=patch_auth0_v2_user_b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"patch_auth0_v2_user_b.js","sourceRoot":"","sources":["../src/patch_auth0_v2_user_b.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAK,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,yCAAyC,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAE1E,MAAM,GAAG,GAAG,qBAAqB,CAAA;AACjC,MAAM,CAAC,MAAM,qBAAqB,GAAuC,GAAG,CAAmC,GAAG,EAAE,GAAG,CAAA,EAAE;IACxH,MAAM,uBAAuB,GAAG,yBAAyB,CAAC,GAAG,CAAC,CAAA;IAC9D,MAAM,aAAa,GAAG,eAAe,CAAC,GAAG,CAAC,CAAA;IAC1C,OAAO,mBAA4C,CAAA;IACnD;;;;;;OAMG;IACH,KAAK,UAAU,mBAAmB,CAAC,OAAc,EAAE,IAA+B;QACjF,MAAM,sBAAsB,GAAG,MAAM,uBAAuB,EAAE,CAAA;QAC9D,MAAM,aAAa,GAAG,yCAAyC,CAAC,sBAAsB,CAAC,CAAA;QACvF,MAAM,GAAG,GAAG,WAAW,aAAa,CAAC,CAAC,iBAAiB,OAAO,EAAE,CAAA;QAChE,OAAO,KAAK,CAAC,GAAG,EAAE;YACjB,MAAM,EAAE,OAAO;YACf,OAAO,EACN;gBACC,cAAc,EAAE,kBAAkB;gBAClC,aAAa;aACb;YACF,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SAC1B,CAAC,CAAA;IACH,CAAC;AACF,CAAC,CAAC,CAAA"}
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.100",
3
+ "version": "6.0.104",
4
4
  "description": "ctx-core auth0 management api",
5
5
  "keywords": [
6
6
  "ctx-core",
@@ -17,9 +17,9 @@
17
17
  "license": "Apache-2.0",
18
18
  "author": "Brian Takita",
19
19
  "type": "module",
20
- "main": "./dist/index.cjs",
20
+ "main": "./dist/index.js",
21
21
  "module": "./dist/index.js",
22
- "types": "./dist/index.d.ts",
22
+ "types": "./src/index.ts",
23
23
  "exports": {
24
24
  ".": {
25
25
  "require": "./dist/index.cjs",
@@ -33,17 +33,18 @@
33
33
  "getAll-client-grants-auth0": "./bin/getAll-client-grants-auth0.mjs"
34
34
  },
35
35
  "dependencies": {
36
- "@ctx-core/auth0": "^25.0.102",
37
- "@ctx-core/fetch": "^11.0.79",
38
- "@ctx-core/object": "^21.0.21",
39
- "@ctx-core/store": "^27.0.35",
36
+ "@ctx-core/auth0": "^26.0.1",
37
+ "@ctx-core/fetch": "^11.0.81",
38
+ "@ctx-core/object": "^21.0.23",
39
+ "@ctx-core/store": "^27.0.37",
40
40
  "auth0": "^2.37.0",
41
- "esm": "^3.2.25",
42
41
  "svelte": "3.44.1"
43
42
  },
44
43
  "devDependencies": {
45
- "@ctx-core/dev-tools": "^7.1.4",
46
- "@ctx-core/uri": "^12.0.15",
44
+ "@ctx-core/dev-tools": "^7.2.1",
45
+ "@ctx-core/uri": "^12.0.17",
46
+ "@swc/cli": "^0.1.51",
47
+ "@swc/core": "^1.2.108",
47
48
  "typescript": "^4.4.4"
48
49
  },
49
50
  "publishConfig": {
@@ -51,11 +52,10 @@
51
52
  "cache": "~/.npm"
52
53
  },
53
54
  "scripts": {
54
- "build": "npm run clean && npm run copy-mjs && npm run generate_ctx_I_file && npm run compile",
55
- "clean": "rm -f tsconfig.tsbuildinfo && rm -f src/**/*.js && rm -f src/**/*.d.ts && rm -f src/**/*.map",
56
- "compile": "./node_modules/.bin/tsc -b .",
57
- "copy-mjs": "cd dist && echo \"module.exports = (async () => import('./index.js'))()\" > index.cjs",
55
+ "build": "npm run generate_ctx_I_file && npm run compile",
56
+ "clean": "rm -rf dist",
57
+ "compile": "swc src --out-dir dist --copy-files --source-maps --config-file .swcrc",
58
58
  "exec": "$@",
59
- "generate_ctx_I_file": "./node_modules/.bin/generate_ctx_I_file"
59
+ "generate_ctx_I_file": "swc $(./node_modules/.bin/generate_ctx_I_file | tail -n1) --out-dir dist --source-maps --config-file .swcrc"
60
60
  }
61
61
  }
@@ -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[]
@@ -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:
@@ -1,6 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import type { auth0_management_Ctx } from './auth0_management_Ctx';
3
- declare const key = "auth0_audience_";
4
- export declare const auth0_audience__b: B<auth0_management_Ctx, typeof key>;
5
- export declare type auth0_audience__T = () => string;
6
- export {};
@@ -1,7 +0,0 @@
1
- import { ManagementClient } from 'auth0';
2
- export declare function auth0_management_(params?: auth0_management_params_I): ManagementClient<import("auth0").AppMetadata, import("auth0").UserMetadata>;
3
- export interface auth0_management_params_I {
4
- domain?: string;
5
- clientId?: string;
6
- clientSecret?: string;
7
- }
@@ -1,4 +0,0 @@
1
- import type { auth0_Ctx } from '@ctx-core/auth0';
2
- import type { auth0_management_ctx_I } from './auth0_management_ctx_I.generated.js';
3
- export interface auth0_management_Ctx extends auth0_management_ctx_I, auth0_Ctx {
4
- }
@@ -1,7 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import type { post_auth0_oauth_token_body_I } from '@ctx-core/auth0';
3
- import type { auth0_management_Ctx } from './auth0_management_Ctx';
4
- declare const key = "auth0_management_client_credentials_body_";
5
- export declare const auth0_management_client_credentials_body__b: B<auth0_management_Ctx, typeof key>;
6
- export declare type auth0_management_client_credentials_body__T = () => post_auth0_oauth_token_body_I;
7
- export {};
@@ -1,18 +0,0 @@
1
- import type { auth0_audience__T } from './auth0_audience__b.js';
2
- import type { auth0_management_client_credentials_body__T } from './auth0_management_client_credentials_body__b.js';
3
- import type { auth0_management_token__T } from './auth0_management_token__b.js';
4
- import type { get_auth0_v2_client_grants_T } from './get_auth0_v2_client_grants_b.js';
5
- import type { get_auth0_v2_user_T } from './get_auth0_v2_user_b.js';
6
- import type { get_auth0_v2_users_by_email_T } from './get_auth0_v2_users_by_email_b.js';
7
- import type { patch_auth0_v2_client_T } from './patch_auth0_v2_client_b.js';
8
- import type { patch_auth0_v2_user_T } from './patch_auth0_v2_user_b.js';
9
- export interface auth0_management_ctx_I {
10
- auth0_audience_?: auth0_audience__T;
11
- auth0_management_client_credentials_body_?: auth0_management_client_credentials_body__T;
12
- auth0_management_token_?: auth0_management_token__T;
13
- get_auth0_v2_client_grants?: get_auth0_v2_client_grants_T;
14
- get_auth0_v2_user?: get_auth0_v2_user_T;
15
- get_auth0_v2_users_by_email?: get_auth0_v2_users_by_email_T;
16
- patch_auth0_v2_client?: patch_auth0_v2_client_T;
17
- patch_auth0_v2_user?: patch_auth0_v2_user_T;
18
- }
@@ -1,7 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import { auth0_token_T } from '@ctx-core/auth0';
3
- import type { auth0_management_Ctx } from './auth0_management_Ctx';
4
- declare const key = "auth0_management_token_";
5
- export declare const auth0_management_token__b: B<auth0_management_Ctx, typeof key>;
6
- export declare type auth0_management_token__T = () => Promise<auth0_token_T>;
7
- export {};
@@ -1,10 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import type { auth0_management_Ctx } from './auth0_management_Ctx';
3
- declare const key = "get_auth0_v2_client_grants";
4
- export declare const get_auth0_v2_client_grants_b: B<auth0_management_Ctx, typeof key>;
5
- export interface get_auth0_v2_client_grants_params_I {
6
- query?: string;
7
- json?: any;
8
- }
9
- export declare type get_auth0_v2_client_grants_T = (params: get_auth0_v2_client_grants_params_I) => Promise<Response>;
10
- export {};
@@ -1,10 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import type { auth0_management_Ctx } from './auth0_management_Ctx';
3
- declare const key = "get_auth0_v2_user";
4
- export declare const get_auth0_v2_user_b: B<auth0_management_Ctx, typeof key>;
5
- export interface get_auth0_v2_user_params_T {
6
- AUTH0_DOMAIN: string;
7
- user_id: string;
8
- }
9
- export declare type get_auth0_v2_user_T = (params: get_auth0_v2_user_params_T) => Promise<Response>;
10
- export {};
@@ -1,10 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import type { auth0_management_Ctx } from './auth0_management_Ctx';
3
- declare const key = "get_auth0_v2_users_by_email";
4
- export declare const get_auth0_v2_users_by_email_b: B<auth0_management_Ctx, typeof key>;
5
- export declare type get_auth0_v2_users_by_email_params_I = {
6
- email: string;
7
- AUTH0_DOMAIN?: string;
8
- };
9
- export declare type get_auth0_v2_users_by_email_T = (params: get_auth0_v2_users_by_email_params_I) => Promise<Response>;
10
- export {};
package/dist/index.cjs DELETED
@@ -1 +0,0 @@
1
- module.exports = (async () => import('./index.js'))()
package/dist/index.d.ts DELETED
@@ -1,11 +0,0 @@
1
- export * from './auth0_management_Ctx.js';
2
- export * from './auth0_management_ctx_I.generated.js';
3
- export * from './auth0_audience__b.js';
4
- export * from './auth0_management_.js';
5
- export * from './auth0_management_client_credentials_body__b.js';
6
- export * from './auth0_management_token__b.js';
7
- export * from './get_auth0_v2_client_grants_b.js';
8
- export * from './get_auth0_v2_user_b.js';
9
- export * from './get_auth0_v2_users_by_email_b.js';
10
- export * from './patch_auth0_v2_client_b.js';
11
- export * from './patch_auth0_v2_user_b.js';
@@ -1,11 +0,0 @@
1
- import { B } from '@ctx-core/object';
2
- import type { auth0_management_Ctx } from './auth0_management_Ctx';
3
- declare const key = "patch_auth0_v2_client";
4
- export declare const patch_auth0_v2_client_b: B<auth0_management_Ctx, typeof key>;
5
- export interface patch_auth0_v2_client_params_T {
6
- client_id?: string;
7
- body?: string;
8
- json?: unknown;
9
- }
10
- export declare type patch_auth0_v2_client_T = (params: patch_auth0_v2_client_params_T) => Promise<Response>;
11
- export {};
@@ -1,10 +0,0 @@
1
- import type { Auth0UserProfile } from 'auth0-js';
2
- import { B } from '@ctx-core/object';
3
- import type { auth0_management_Ctx } from './auth0_management_Ctx';
4
- declare const key = "patch_auth0_v2_user";
5
- export declare const patch_auth0_v2_user_b: B<auth0_management_Ctx, typeof key>;
6
- export interface patch_auth0_v2_user_data_I extends Partial<Auth0UserProfile> {
7
- password?: string;
8
- }
9
- export declare type patch_auth0_v2_user_T = (user_id: string, data: patch_auth0_v2_user_data_I) => Promise<Response>;
10
- export {};