@axcode/axcloud-sdk 0.3.2 → 0.4.0-dev.bf5c2c0

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/dist/public.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { QueryClient } from '@tanstack/react-query';
3
- import { A as AxCloudAnalyticsOptions } from './useContent-1WbKvPY4.mjs';
4
- export { l as AnalyticsEventData, m as AnalyticsEventValue, o as AnalyticsRuntime, p as AnalyticsRuntimeConfig, a6 as ContentBlock, t as ContentItem, a7 as ContentItemOptions, c as ContentListResponse, C as ContentQueryOptions, u as ContentSlotImage, v as ContentSlotMap, w as ContentSlotReader, x as ContentSlotValue, P as Page, I as PageContentState, Q as createContentSlotReader, T as getContentSlotMap, Z as useAnalytics, _ as useAnalyticsRuntime, $ as useAxCloudContext, a0 as useContent, a1 as useContentItem, a2 as usePageContent } from './useContent-1WbKvPY4.mjs';
3
+ import { A as AxCloudAnalyticsOptions } from './useContent-DLoyqAWH.mjs';
4
+ export { l as AnalyticsEventData, m as AnalyticsEventValue, o as AnalyticsRuntime, p as AnalyticsRuntimeConfig, a6 as ContentBlock, t as ContentItem, a7 as ContentItemOptions, c as ContentListResponse, C as ContentQueryOptions, u as ContentSlotImage, v as ContentSlotMap, w as ContentSlotReader, x as ContentSlotValue, P as Page, I as PageContentState, Q as createContentSlotReader, T as getContentSlotMap, Z as useAnalytics, _ as useAnalyticsRuntime, $ as useAxCloudContext, a0 as useContent, a1 as useContentItem, a2 as usePageContent } from './useContent-DLoyqAWH.mjs';
5
5
  import './client-FOpKwe3e.mjs';
6
6
 
7
7
  interface AxCloudPublicProviderProps {
package/dist/public.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { QueryClient } from '@tanstack/react-query';
3
- import { A as AxCloudAnalyticsOptions } from './useContent-Cl7dvERE.js';
4
- export { l as AnalyticsEventData, m as AnalyticsEventValue, o as AnalyticsRuntime, p as AnalyticsRuntimeConfig, a6 as ContentBlock, t as ContentItem, a7 as ContentItemOptions, c as ContentListResponse, C as ContentQueryOptions, u as ContentSlotImage, v as ContentSlotMap, w as ContentSlotReader, x as ContentSlotValue, P as Page, I as PageContentState, Q as createContentSlotReader, T as getContentSlotMap, Z as useAnalytics, _ as useAnalyticsRuntime, $ as useAxCloudContext, a0 as useContent, a1 as useContentItem, a2 as usePageContent } from './useContent-Cl7dvERE.js';
3
+ import { A as AxCloudAnalyticsOptions } from './useContent-CGI1l3Gs.js';
4
+ export { l as AnalyticsEventData, m as AnalyticsEventValue, o as AnalyticsRuntime, p as AnalyticsRuntimeConfig, a6 as ContentBlock, t as ContentItem, a7 as ContentItemOptions, c as ContentListResponse, C as ContentQueryOptions, u as ContentSlotImage, v as ContentSlotMap, w as ContentSlotReader, x as ContentSlotValue, P as Page, I as PageContentState, Q as createContentSlotReader, T as getContentSlotMap, Z as useAnalytics, _ as useAnalyticsRuntime, $ as useAxCloudContext, a0 as useContent, a1 as useContentItem, a2 as usePageContent } from './useContent-CGI1l3Gs.js';
5
5
  import './client-FOpKwe3e.js';
6
6
 
7
7
  interface AxCloudPublicProviderProps {
@@ -45,6 +45,22 @@ declare function fetchAnalyticsPublicConfig(input: {
45
45
  signal?: AbortSignal;
46
46
  }): Promise<AnalyticsPublicConfig>;
47
47
 
48
+ /**
49
+ * Generated from auth0/rbac.yaml.
50
+ * Do not edit manually. Run `pnpm auth0:rbac:generate-permissions`.
51
+ */
52
+ declare const AUTH0_ROLE_RANKS: {
53
+ readonly airene_admin: 90;
54
+ readonly content_editor: 50;
55
+ readonly member: 40;
56
+ readonly org_admin: 80;
57
+ readonly qa_admin: 60;
58
+ readonly qa_member: 40;
59
+ readonly super_admin: 100;
60
+ readonly viewer: 20;
61
+ };
62
+ type Auth0Role = keyof typeof AUTH0_ROLE_RANKS;
63
+
48
64
  /**
49
65
  * AxCloud SDK Types
50
66
  *
@@ -53,7 +69,7 @@ declare function fetchAnalyticsPublicConfig(input: {
53
69
  */
54
70
 
55
71
  type AxCloudModule = 'content' | 'members' | 'sections' | 'training' | 'ai' | 'documents' | 'voting';
56
- type SystemRole = 'super_admin' | 'org_admin' | 'section_admin' | 'member' | 'viewer';
72
+ type SystemRole = Auth0Role | 'section_admin';
57
73
  type UserRole = SystemRole | 'superadmin' | 'admin' | 'editor';
58
74
  type BaseRole = 'org_admin' | 'section_admin' | 'member' | 'viewer';
59
75
  /**
@@ -262,6 +278,14 @@ interface AxCloudConfig {
262
278
  /** Optional privacy-safe web analytics collection. */
263
279
  analytics?: AxCloudAnalyticsOptions;
264
280
  auth0: {
281
+ /**
282
+ * Stable public AxCloud identity-provider identifier.
283
+ *
284
+ * Include this when the organization uses a customer-owned identity
285
+ * provider so shared SDK caches are isolated across provider rotations.
286
+ * This is not an Auth0 secret and is not sent to Auth0.
287
+ */
288
+ identityProviderId?: string;
265
289
  domain: string;
266
290
  clientId: string;
267
291
  redirectUri: string;
@@ -45,6 +45,22 @@ declare function fetchAnalyticsPublicConfig(input: {
45
45
  signal?: AbortSignal;
46
46
  }): Promise<AnalyticsPublicConfig>;
47
47
 
48
+ /**
49
+ * Generated from auth0/rbac.yaml.
50
+ * Do not edit manually. Run `pnpm auth0:rbac:generate-permissions`.
51
+ */
52
+ declare const AUTH0_ROLE_RANKS: {
53
+ readonly airene_admin: 90;
54
+ readonly content_editor: 50;
55
+ readonly member: 40;
56
+ readonly org_admin: 80;
57
+ readonly qa_admin: 60;
58
+ readonly qa_member: 40;
59
+ readonly super_admin: 100;
60
+ readonly viewer: 20;
61
+ };
62
+ type Auth0Role = keyof typeof AUTH0_ROLE_RANKS;
63
+
48
64
  /**
49
65
  * AxCloud SDK Types
50
66
  *
@@ -53,7 +69,7 @@ declare function fetchAnalyticsPublicConfig(input: {
53
69
  */
54
70
 
55
71
  type AxCloudModule = 'content' | 'members' | 'sections' | 'training' | 'ai' | 'documents' | 'voting';
56
- type SystemRole = 'super_admin' | 'org_admin' | 'section_admin' | 'member' | 'viewer';
72
+ type SystemRole = Auth0Role | 'section_admin';
57
73
  type UserRole = SystemRole | 'superadmin' | 'admin' | 'editor';
58
74
  type BaseRole = 'org_admin' | 'section_admin' | 'member' | 'viewer';
59
75
  /**
@@ -262,6 +278,14 @@ interface AxCloudConfig {
262
278
  /** Optional privacy-safe web analytics collection. */
263
279
  analytics?: AxCloudAnalyticsOptions;
264
280
  auth0: {
281
+ /**
282
+ * Stable public AxCloud identity-provider identifier.
283
+ *
284
+ * Include this when the organization uses a customer-owned identity
285
+ * provider so shared SDK caches are isolated across provider rotations.
286
+ * This is not an Auth0 secret and is not sent to Auth0.
287
+ */
288
+ identityProviderId?: string;
265
289
  domain: string;
266
290
  clientId: string;
267
291
  redirectUri: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axcode/axcloud-sdk",
3
- "version": "0.3.2",
3
+ "version": "0.4.0-dev.bf5c2c0",
4
4
  "description": "SDK for building websites with AxCloud CMS and member management",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -45,21 +45,22 @@
45
45
  },
46
46
  "devDependencies": {
47
47
  "@eslint/js": "^9.17.0",
48
- "@testing-library/jest-dom": "^6.9.1",
48
+ "@testing-library/dom": "^10.4.1",
49
+ "@testing-library/jest-dom": "^7.0.1",
49
50
  "@testing-library/react": "^16.1.0",
50
51
  "@types/node": "^20.0.0",
51
52
  "@types/react": "^19.0.2",
52
53
  "@types/react-dom": "^19.0.2",
53
- "@vitest/coverage-v8": "4.1.10",
54
+ "@vitest/coverage-v8": "4.1.11",
54
55
  "eslint": "^9.17.0",
55
56
  "eslint-plugin-react": "^7.37.4",
56
- "globals": "^16.5.0",
57
+ "globals": "^17.12.0",
57
58
  "react": "^19.2.8",
58
59
  "react-dom": "^19.2.8",
59
60
  "tsup": "^8.3.5",
60
61
  "typescript": "^5.7.2",
61
- "typescript-eslint": "^8.31.1",
62
- "vitest": "4.1.10"
62
+ "typescript-eslint": "^8.67.0",
63
+ "vitest": "4.1.11"
63
64
  },
64
65
  "repository": {
65
66
  "type": "git",