@axcode/axcloud-sdk 0.2.0-dev.85285e0 → 0.2.0-dev.d9fb4fe

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 (40) hide show
  1. package/README.md +23 -0
  2. package/dist/barnsport.d.mts +12 -3
  3. package/dist/barnsport.d.ts +12 -3
  4. package/dist/barnsport.js +21 -17
  5. package/dist/barnsport.mjs +2 -2
  6. package/dist/{chunk-DI4M6A7K.js → chunk-2IVJTMRB.js} +264 -219
  7. package/dist/chunk-2IVJTMRB.js.map +1 -0
  8. package/dist/{chunk-HRNRGCCT.mjs → chunk-7IPCZJ5Q.mjs} +16 -5
  9. package/dist/chunk-7IPCZJ5Q.mjs.map +1 -0
  10. package/dist/chunk-7K5N3DQ4.js +231 -0
  11. package/dist/chunk-7K5N3DQ4.js.map +1 -0
  12. package/dist/{chunk-F3JPEND3.mjs → chunk-CACQMQCJ.mjs} +259 -214
  13. package/dist/chunk-CACQMQCJ.mjs.map +1 -0
  14. package/dist/chunk-PMMCOWL3.mjs +223 -0
  15. package/dist/chunk-PMMCOWL3.mjs.map +1 -0
  16. package/dist/{chunk-EX66R5IA.js → chunk-ZOQAXLCZ.js} +29 -17
  17. package/dist/chunk-ZOQAXLCZ.js.map +1 -0
  18. package/dist/index.d.mts +4 -79
  19. package/dist/index.d.ts +4 -79
  20. package/dist/index.js +81 -320
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.mjs +6 -260
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/public.d.mts +2 -2
  25. package/dist/public.d.ts +2 -2
  26. package/dist/public.js +29 -9
  27. package/dist/public.mjs +4 -4
  28. package/dist/{useBarnsport-1DObGZDl.d.mts → useBarnsport-Cn9flax0.d.mts} +54 -6
  29. package/dist/{useBarnsport-1DObGZDl.d.ts → useBarnsport-Cn9flax0.d.ts} +54 -6
  30. package/dist/{analytics-LYZxP7PC.d.mts → useContent-1WbKvPY4.d.mts} +77 -1
  31. package/dist/{analytics-BOxmSWNt.d.ts → useContent-Cl7dvERE.d.ts} +77 -1
  32. package/package.json +1 -1
  33. package/dist/chunk-2A5NJAFA.mjs +0 -15
  34. package/dist/chunk-2A5NJAFA.mjs.map +0 -1
  35. package/dist/chunk-DI4M6A7K.js.map +0 -1
  36. package/dist/chunk-DSWRJZWR.js +0 -18
  37. package/dist/chunk-DSWRJZWR.js.map +0 -1
  38. package/dist/chunk-EX66R5IA.js.map +0 -1
  39. package/dist/chunk-F3JPEND3.mjs.map +0 -1
  40. package/dist/chunk-HRNRGCCT.mjs.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { A as AxCloudClient, c as createClient, g as getClient } from './client-FOpKwe3e.js';
2
- import { C as ContentItem, A as AxCloudAnalyticsOptions, U as User$1, a as UserRole, O as Organization, b as AxCloudModule, c as ContentQueryOptions, N as NewsItem, d as ContentListResponse, S as Section, e as SignedMediaUrl, f as OrganizationBranding, M as MediaItem, g as MediaListResponse, h as SignedDocumentUrl, D as DocumentQueryOptions, i as DocumentItem, j as DocumentListResponse, k as DocumentFolder, l as DocumentFolderListResponse } from './analytics-BOxmSWNt.js';
3
- export { m as AnalyticsEventData, n as AnalyticsEventValue, o as AnalyticsPublicConfig, p as AnalyticsRuntime, q as AnalyticsRuntimeConfig, r as AxCloudConfig, B as BaseRole, s as ContentCollectionType, t as ContentDetailType, u as CustomRole, v as DocumentAudience, w as DocumentSourceProvider, x as DocumentStatus, y as Membership, z as OrganizationSettings, P as Page, E as PaginatedResponse, F as SectionPermissions, G as SystemRole, H as fetchAnalyticsPublicConfig, I as isAllowedAnalyticsEvent, J as isLocalAnalyticsHostname, K as sanitizeAnalyticsEventData, L as sanitizeAnalyticsPath, Q as useAnalytics, R as useAnalyticsRuntime, T as useAxCloudContext, V as userHasAllPermissions, W as userHasAnyPermission, X as userHasPermission } from './analytics-BOxmSWNt.js';
4
- export { B as BarnsportActivitiesFilter, a as BarnsportActivity, b as BarnsportActivityListItem, c as BarnsportActivityLocation, d as BarnsportActivityResponse, e as BarnsportActivitySchedule, f as BarnsportInterestSubmissionRequest, g as BarnsportInterestSubmissionResponse, h as BarnsportListResponse, i as BarnsportMunicipality, j as BarnsportRegistrationMethod, k as BarnsportSitemapResponse, l as BarnsportSitemapUrl, m as BarnsportSport, u as useBarnsportActivities, n as useBarnsportActivity, o as useBarnsportMunicipalities, p as useBarnsportSitemap, q as useBarnsportSport, r as useBarnsportSports, s as useSubmitBarnsportInterest } from './useBarnsport-1DObGZDl.js';
2
+ import { A as AxCloudAnalyticsOptions, U as User$1, a as UserRole, O as Organization, b as AxCloudModule, C as ContentQueryOptions, N as NewsItem, c as ContentListResponse, S as Section, d as SignedMediaUrl, e as OrganizationBranding, M as MediaItem, f as MediaListResponse, g as SignedDocumentUrl, D as DocumentQueryOptions, h as DocumentItem, i as DocumentListResponse, j as DocumentFolder, k as DocumentFolderListResponse } from './useContent-Cl7dvERE.js';
3
+ export { l as AnalyticsEventData, m as AnalyticsEventValue, n as AnalyticsPublicConfig, o as AnalyticsRuntime, p as AnalyticsRuntimeConfig, q as AxCloudConfig, B as BaseRole, r as ContentCollectionType, s as ContentDetailType, t as ContentItem, u as ContentSlotImage, v as ContentSlotMap, w as ContentSlotReader, x as ContentSlotValue, y as CustomRole, z as DocumentAudience, E as DocumentSourceProvider, F as DocumentStatus, G as Membership, H as OrganizationSettings, P as Page, I as PageContentState, J as PaginatedResponse, K as SectionPermissions, L as SystemRole, Q as createContentSlotReader, R as fetchAnalyticsPublicConfig, T as getContentSlotMap, V as isAllowedAnalyticsEvent, W as isLocalAnalyticsHostname, X as sanitizeAnalyticsEventData, Y as sanitizeAnalyticsPath, Z as useAnalytics, _ as useAnalyticsRuntime, $ as useAxCloudContext, a0 as useContent, a1 as useContentItem, a2 as usePageContent, a3 as userHasAllPermissions, a4 as userHasAnyPermission, a5 as userHasPermission } from './useContent-Cl7dvERE.js';
4
+ export { B as BarnsportActivitiesFilter, a as BarnsportActivity, b as BarnsportActivityListItem, c as BarnsportActivityLocation, d as BarnsportActivityResponse, e as BarnsportActivitySchedule, f as BarnsportInterestSubmissionRequest, g as BarnsportInterestSubmissionResponse, h as BarnsportListResponse, i as BarnsportMunicipality, j as BarnsportRegistrationMethod, k as BarnsportSitemapResponse, l as BarnsportSitemapUrl, m as BarnsportSport, u as useBarnsportActivities, n as useBarnsportActivity, o as useBarnsportMunicipalities, p as useBarnsportSitemap, q as useBarnsportSport, r as useBarnsportSports, s as useSubmitBarnsportInterest } from './useBarnsport-Cn9flax0.js';
5
5
  import React from 'react';
6
6
  import * as _tanstack_react_query from '@tanstack/react-query';
7
7
  import { QueryClient } from '@tanstack/react-query';
@@ -22,27 +22,6 @@ declare class AxCloudError extends Error {
22
22
  }
23
23
  declare function isAxCloudError(error: unknown): error is AxCloudError;
24
24
 
25
- type ContentSlotValue = string | number | boolean | null | undefined | string[] | Record<string, unknown> | unknown[];
26
- type ContentSlotMap = Record<string, ContentSlotValue>;
27
- interface ContentSlotImage {
28
- url: string;
29
- alt?: string;
30
- caption?: string;
31
- }
32
- interface ContentSlotReader {
33
- fields: ContentSlotMap;
34
- value<T = ContentSlotValue>(key: string, fallback?: T): ContentSlotValue | T;
35
- text(key: string, fallback?: string): string;
36
- /** @deprecated HTML is untrusted. Prefer text(), or unsafeHtml() with sanitization. */
37
- html(key: string, fallback?: string): string;
38
- /** Returns untrusted CMS HTML. Sanitize it before inserting it into the DOM. */
39
- unsafeHtml(key: string, fallback?: string): string;
40
- list(key: string, fallback?: string[]): string[];
41
- image(key: string, fallback?: ContentSlotImage): ContentSlotImage | undefined;
42
- }
43
- declare function getContentSlotMap(content?: Pick<ContentItem, 'fields' | 'blocks'> | null): ContentSlotMap;
44
- declare function createContentSlotReader(content?: Pick<ContentItem, 'fields' | 'blocks'> | null): ContentSlotReader;
45
-
46
25
  /**
47
26
  * AxCloud Forms Module
48
27
  *
@@ -664,60 +643,6 @@ declare function useNews(options?: ContentQueryOptions): {
664
643
  refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<ContentListResponse<NewsItem>, Error>>;
665
644
  };
666
645
 
667
- /**
668
- * Fetch a published content collection.
669
- *
670
- * AxCloud owns editorial data and publication. The consuming application owns
671
- * layout and rendering. Drafts are intentionally never selectable through
672
- * this delivery hook.
673
- */
674
- declare function useContent<T extends ContentItem = ContentItem>(contentType: string, options?: ContentQueryOptions): {
675
- data: T[];
676
- count: number;
677
- total: number;
678
- page: number;
679
- pageSize: number;
680
- hasMore: boolean;
681
- nextCursor: string | undefined;
682
- isLoading: boolean;
683
- isFetching: boolean;
684
- isError: boolean;
685
- error: Error | null;
686
- refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<ContentListResponse<T>, Error>>;
687
- };
688
- interface ContentItemOptions {
689
- /** Force public delivery even when the visitor is authenticated. */
690
- publicOnly?: boolean;
691
- /** Return the requested translation when content has language variants. */
692
- lang?: string;
693
- }
694
- /** Fetch one published content item by ID or slug. */
695
- declare function useContentItem<T extends ContentItem = ContentItem>(contentType: string, idOrSlug: string, options?: ContentItemOptions): {
696
- data: _tanstack_react_query.NoInfer<T> | null;
697
- isLoading: boolean;
698
- isFetching: boolean;
699
- isError: boolean;
700
- error: Error | null;
701
- refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<_tanstack_react_query.NoInfer<T>, Error>>;
702
- };
703
- interface PageContentState<T extends ContentItem = ContentItem> extends ContentSlotReader {
704
- page: T | null;
705
- data: T | null;
706
- isLoading: boolean;
707
- isFetching: boolean;
708
- isError: boolean;
709
- error: Error | null;
710
- refetch: () => unknown;
711
- }
712
- /**
713
- * Fetch a website page and expose structured template fields.
714
- *
715
- * Use `page.content`/`page.blocks` for article-like rich text pages. Use
716
- * `text('hero.title')`, `list('benefits.items')`, etc. for designed website
717
- * templates where the frontend owns layout and AxCloud owns content.
718
- */
719
- declare function usePageContent<T extends ContentItem = ContentItem>(slug: string, options?: ContentItemOptions): PageContentState<T>;
720
-
721
646
  interface SectionWithMembers extends Section {
722
647
  members?: User$1[];
723
648
  memberCount?: number;
@@ -1475,4 +1400,4 @@ interface LinkedAccountsListProps {
1475
1400
  */
1476
1401
  declare function LinkedAccountsList({ providers, showConnectButtons, className, onUnlink, onLinkInitiated, renderIdentity, renderAvailableProvider, }: LinkedAccountsListProps): React.JSX.Element;
1477
1402
 
1478
- export { type Auth0ClientState, type AuthUser, type AvailableProvider, AxCloudAnalyticsOptions, AxCloudError, type AxCloudErrorCode, AxCloudModule, AxCloudProvider, type Ballot, type BallotCandidate, type BallotOption, type BallotSeat, type CastVoteResult, type CodeEligibility, ContentItem, ContentListResponse, ContentQueryOptions, type ContentSlotImage, type ContentSlotMap, type ContentSlotReader, type ContentSlotValue, DocumentFolder, DocumentFolderListResponse, DocumentItem, DocumentListResponse, DocumentQueryOptions, type EmailVerificationResult, type FormStatsResponse, type FormSubmission, type FormSubmissionRecord, type FormSubmissionResponse, type FormSubmissionsResponse, LinkedAccountsList, type LinkedAccountsListProps, type LinkedIdentity, LoginButton, LogoutButton, MediaItem, MediaListResponse, ModuleGate, type MyProfileResponse, NewsItem, Organization, OrganizationBranding, type PageContentState, ProtectedRoute, Section, SignedDocumentUrl, SignedMediaUrl, type UpdateMyProfileInput, type UseAuthReturn, type UseLinkedAccountsReturn, User$1 as User, type UserApiResponse, type UserOrganizationMembership, type UserOrganizationSection, UserRole, type VoteReceipt, castVote, castVoteWithCode, checkEligibility, checkVotingCode, createContentSlotReader, createFormHelper, getBallot, getContentSlotMap, getVotingReceipt, isAxCloudError, submitForm, useAuth, useAvatar, useBranding, useCodeBallot, useContent, useContentItem, useDocumentDownload, useDocuments, useFormStats, useForms, useLinkedAccounts, useLogo, useMedia, useMediaList, useMemberDocumentDownload, useMemberDocumentFolders, useMemberDocuments, useModuleAccess, useMySection, useNews, useOrg, usePageContent, useSections, useUpdateFormSubmission, useUpdateMyProfile, useUser };
1403
+ export { type Auth0ClientState, type AuthUser, type AvailableProvider, AxCloudAnalyticsOptions, AxCloudError, type AxCloudErrorCode, AxCloudModule, AxCloudProvider, type Ballot, type BallotCandidate, type BallotOption, type BallotSeat, type CastVoteResult, type CodeEligibility, ContentListResponse, ContentQueryOptions, DocumentFolder, DocumentFolderListResponse, DocumentItem, DocumentListResponse, DocumentQueryOptions, type EmailVerificationResult, type FormStatsResponse, type FormSubmission, type FormSubmissionRecord, type FormSubmissionResponse, type FormSubmissionsResponse, LinkedAccountsList, type LinkedAccountsListProps, type LinkedIdentity, LoginButton, LogoutButton, MediaItem, MediaListResponse, ModuleGate, type MyProfileResponse, NewsItem, Organization, OrganizationBranding, ProtectedRoute, Section, SignedDocumentUrl, SignedMediaUrl, type UpdateMyProfileInput, type UseAuthReturn, type UseLinkedAccountsReturn, User$1 as User, type UserApiResponse, type UserOrganizationMembership, type UserOrganizationSection, UserRole, type VoteReceipt, castVote, castVoteWithCode, checkEligibility, checkVotingCode, createFormHelper, getBallot, getVotingReceipt, isAxCloudError, submitForm, useAuth, useAvatar, useBranding, useCodeBallot, useDocumentDownload, useDocuments, useFormStats, useForms, useLinkedAccounts, useLogo, useMedia, useMediaList, useMemberDocumentDownload, useMemberDocumentFolders, useMemberDocuments, useModuleAccess, useMySection, useNews, useOrg, useSections, useUpdateFormSubmission, useUpdateMyProfile, useUser };