@axcode/axcloud-sdk 0.2.0-dev.03fb26c → 0.2.0-dev.85285e0
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/README.md +44 -0
- package/dist/analytics-BOxmSWNt.d.ts +432 -0
- package/dist/analytics-LYZxP7PC.d.mts +432 -0
- package/dist/barnsport.d.mts +30 -0
- package/dist/barnsport.d.ts +30 -0
- package/dist/barnsport.js +69 -0
- package/dist/barnsport.js.map +1 -0
- package/dist/barnsport.mjs +4 -0
- package/dist/barnsport.mjs.map +1 -0
- package/dist/chunk-2A5NJAFA.mjs +15 -0
- package/dist/chunk-2A5NJAFA.mjs.map +1 -0
- package/dist/chunk-DI4M6A7K.js +474 -0
- package/dist/chunk-DI4M6A7K.js.map +1 -0
- package/dist/chunk-DSWRJZWR.js +18 -0
- package/dist/chunk-DSWRJZWR.js.map +1 -0
- package/dist/chunk-EX66R5IA.js +278 -0
- package/dist/chunk-EX66R5IA.js.map +1 -0
- package/dist/chunk-F3JPEND3.mjs +461 -0
- package/dist/chunk-F3JPEND3.mjs.map +1 -0
- package/dist/chunk-HRNRGCCT.mjs +262 -0
- package/dist/chunk-HRNRGCCT.mjs.map +1 -0
- package/dist/client-FOpKwe3e.d.mts +75 -0
- package/dist/client-FOpKwe3e.d.ts +75 -0
- package/dist/index.d.mts +10 -737
- package/dist/index.d.ts +10 -737
- package/dist/index.js +112 -632
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -585
- package/dist/index.mjs.map +1 -1
- package/dist/public.d.mts +27 -0
- package/dist/public.d.ts +27 -0
- package/dist/public.js +111 -0
- package/dist/public.js.map +1 -0
- package/dist/public.mjs +99 -0
- package/dist/public.mjs.map +1 -0
- package/dist/useBarnsport-1DObGZDl.d.mts +526 -0
- package/dist/useBarnsport-1DObGZDl.d.ts +526 -0
- package/package.json +11 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,81 +1,11 @@
|
|
|
1
|
+
export { A as AxCloudClient, c as createClient, g as getClient } from './client-FOpKwe3e.mjs';
|
|
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-LYZxP7PC.mjs';
|
|
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-LYZxP7PC.mjs';
|
|
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.mjs';
|
|
1
5
|
import React from 'react';
|
|
2
6
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
3
7
|
import { QueryClient } from '@tanstack/react-query';
|
|
4
|
-
import { useAuth0, User
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* AxCloud API Client
|
|
8
|
-
*
|
|
9
|
-
* Fetch wrapper with authentication header injection and error handling.
|
|
10
|
-
*/
|
|
11
|
-
interface ClientConfig {
|
|
12
|
-
baseUrl: string;
|
|
13
|
-
getAccessToken?: () => Promise<string | undefined>;
|
|
14
|
-
/** API key for public content endpoints */
|
|
15
|
-
apiKey?: string;
|
|
16
|
-
/** Default request timeout in milliseconds (default: 30000) */
|
|
17
|
-
timeout?: number;
|
|
18
|
-
}
|
|
19
|
-
interface RequestOptions extends Omit<RequestInit, 'body'> {
|
|
20
|
-
body?: unknown;
|
|
21
|
-
params?: Record<string, string | number | boolean | undefined>;
|
|
22
|
-
/** Request timeout in milliseconds (overrides client default) */
|
|
23
|
-
timeout?: number;
|
|
24
|
-
}
|
|
25
|
-
declare class AxCloudClient {
|
|
26
|
-
private baseUrl;
|
|
27
|
-
private getAccessToken?;
|
|
28
|
-
private apiKey?;
|
|
29
|
-
private defaultTimeout;
|
|
30
|
-
constructor(config: ClientConfig);
|
|
31
|
-
/**
|
|
32
|
-
* Update the access token getter (used when auth state changes)
|
|
33
|
-
*/
|
|
34
|
-
setAccessTokenGetter(getter: () => Promise<string | undefined>): void;
|
|
35
|
-
/**
|
|
36
|
-
* Build URL with query parameters
|
|
37
|
-
*/
|
|
38
|
-
private buildUrl;
|
|
39
|
-
/**
|
|
40
|
-
* API key should only be sent to public endpoints.
|
|
41
|
-
* This avoids leaking public keys to authenticated/internal routes.
|
|
42
|
-
*/
|
|
43
|
-
private shouldAttachApiKey;
|
|
44
|
-
/**
|
|
45
|
-
* Make an authenticated request
|
|
46
|
-
*/
|
|
47
|
-
request<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
48
|
-
/**
|
|
49
|
-
* GET request
|
|
50
|
-
*/
|
|
51
|
-
get<T>(path: string, params?: Record<string, string | number | boolean | undefined>): Promise<T>;
|
|
52
|
-
/**
|
|
53
|
-
* POST request
|
|
54
|
-
*/
|
|
55
|
-
post<T>(path: string, body?: unknown): Promise<T>;
|
|
56
|
-
/**
|
|
57
|
-
* PUT request
|
|
58
|
-
*/
|
|
59
|
-
put<T>(path: string, body?: unknown): Promise<T>;
|
|
60
|
-
/**
|
|
61
|
-
* PATCH request
|
|
62
|
-
*/
|
|
63
|
-
patch<T>(path: string, body?: unknown): Promise<T>;
|
|
64
|
-
/**
|
|
65
|
-
* DELETE request
|
|
66
|
-
*/
|
|
67
|
-
delete<T>(path: string): Promise<T>;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Create a client instance associated with a key (typically the provider instance)
|
|
71
|
-
* This allows multiple AxCloudProviders to coexist without conflicts
|
|
72
|
-
*/
|
|
73
|
-
declare function createClient(config: ClientConfig, key?: object): AxCloudClient;
|
|
74
|
-
/**
|
|
75
|
-
* Get a client instance by key
|
|
76
|
-
* @deprecated Use the client from useAxCloudContext() instead
|
|
77
|
-
*/
|
|
78
|
-
declare function getClient(key?: object): AxCloudClient;
|
|
8
|
+
import { useAuth0, User } from '@auth0/auth0-react';
|
|
79
9
|
|
|
80
10
|
/**
|
|
81
11
|
* AxCloud SDK Error Types
|
|
@@ -92,588 +22,6 @@ declare class AxCloudError extends Error {
|
|
|
92
22
|
}
|
|
93
23
|
declare function isAxCloudError(error: unknown): error is AxCloudError;
|
|
94
24
|
|
|
95
|
-
type AnalyticsEventValue = string | number | boolean;
|
|
96
|
-
type AnalyticsEventData = Record<string, AnalyticsEventValue>;
|
|
97
|
-
interface AxCloudAnalyticsOptions {
|
|
98
|
-
/** Site key configured in AxCloud, for example "public-web". */
|
|
99
|
-
siteKey: string;
|
|
100
|
-
/** Analytics is opt-in and disabled unless this is true. */
|
|
101
|
-
enabled?: boolean;
|
|
102
|
-
/** Allow local collection for explicit development tests. */
|
|
103
|
-
trackLocalhost?: boolean;
|
|
104
|
-
/** Override path normalization. Return null to skip a pageview. */
|
|
105
|
-
normalizePath?: (pathname: string) => string | null;
|
|
106
|
-
}
|
|
107
|
-
interface AnalyticsPublicConfig {
|
|
108
|
-
enabled: boolean;
|
|
109
|
-
provider?: 'umami';
|
|
110
|
-
websiteId?: string;
|
|
111
|
-
scriptUrl?: string;
|
|
112
|
-
hostUrl?: string;
|
|
113
|
-
domains?: string[];
|
|
114
|
-
autoTrack?: boolean;
|
|
115
|
-
respectDoNotTrack?: boolean;
|
|
116
|
-
excludeSearch?: boolean;
|
|
117
|
-
excludeHash?: boolean;
|
|
118
|
-
allowedEvents?: string[];
|
|
119
|
-
}
|
|
120
|
-
interface AnalyticsRuntime {
|
|
121
|
-
enabled: boolean;
|
|
122
|
-
ready: boolean;
|
|
123
|
-
track: (eventName: string, data?: AnalyticsEventData) => boolean;
|
|
124
|
-
trackPageView: (pathname?: string) => boolean;
|
|
125
|
-
}
|
|
126
|
-
declare function isLocalAnalyticsHostname(hostname: string): boolean;
|
|
127
|
-
declare function sanitizeAnalyticsPath(pathname: string, customNormalizer?: (pathname: string) => string | null): string | null;
|
|
128
|
-
declare function sanitizeAnalyticsEventData(data: AnalyticsEventData | undefined): AnalyticsEventData | undefined;
|
|
129
|
-
declare function isAllowedAnalyticsEvent(eventName: string, allowedEvents: string[] | undefined): boolean;
|
|
130
|
-
declare function fetchAnalyticsPublicConfig(input: {
|
|
131
|
-
apiUrl: string;
|
|
132
|
-
orgId: string;
|
|
133
|
-
siteKey: string;
|
|
134
|
-
stage: string;
|
|
135
|
-
hostname: string;
|
|
136
|
-
signal?: AbortSignal;
|
|
137
|
-
}): Promise<AnalyticsPublicConfig>;
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* AxCloud SDK Types
|
|
141
|
-
*
|
|
142
|
-
* Note: In the future, these types should be auto-generated from the OpenAPI spec.
|
|
143
|
-
* For now, they are manually defined based on the AxCloud API.
|
|
144
|
-
*/
|
|
145
|
-
|
|
146
|
-
type AxCloudModule = 'content' | 'members' | 'sections' | 'training' | 'ai' | 'documents' | 'voting';
|
|
147
|
-
type SystemRole = 'super_admin' | 'org_admin' | 'section_admin' | 'member' | 'viewer';
|
|
148
|
-
type UserRole = SystemRole | 'superadmin' | 'admin' | 'editor';
|
|
149
|
-
type BaseRole = 'org_admin' | 'section_admin' | 'member' | 'viewer';
|
|
150
|
-
/**
|
|
151
|
-
* Custom role definition
|
|
152
|
-
*/
|
|
153
|
-
interface CustomRole {
|
|
154
|
-
role_id: string;
|
|
155
|
-
org_id: string;
|
|
156
|
-
name: string;
|
|
157
|
-
description?: string;
|
|
158
|
-
baseRole: BaseRole;
|
|
159
|
-
permissions?: string[];
|
|
160
|
-
deniedPermissions?: string[];
|
|
161
|
-
effectivePermissions?: string[];
|
|
162
|
-
color?: string;
|
|
163
|
-
icon?: string;
|
|
164
|
-
hierarchy: number;
|
|
165
|
-
isSystem: false;
|
|
166
|
-
isActive: boolean;
|
|
167
|
-
createdAt: string;
|
|
168
|
-
updatedAt: string;
|
|
169
|
-
}
|
|
170
|
-
interface Organization {
|
|
171
|
-
id: string;
|
|
172
|
-
name: string;
|
|
173
|
-
slug: string;
|
|
174
|
-
description?: string;
|
|
175
|
-
modules: AxCloudModule[];
|
|
176
|
-
settings?: OrganizationSettings;
|
|
177
|
-
createdAt: string;
|
|
178
|
-
updatedAt: string;
|
|
179
|
-
}
|
|
180
|
-
interface OrganizationSettings {
|
|
181
|
-
allowPublicSignup?: boolean;
|
|
182
|
-
requireEmailVerification?: boolean;
|
|
183
|
-
defaultUserRole?: UserRole;
|
|
184
|
-
theme?: {
|
|
185
|
-
primaryColor?: string;
|
|
186
|
-
logo?: string;
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
interface Section {
|
|
190
|
-
id: string;
|
|
191
|
-
organizationId: string;
|
|
192
|
-
name: string;
|
|
193
|
-
description?: string;
|
|
194
|
-
slug: string;
|
|
195
|
-
parentId?: string;
|
|
196
|
-
permissions?: SectionPermissions;
|
|
197
|
-
createdAt: string;
|
|
198
|
-
updatedAt: string;
|
|
199
|
-
}
|
|
200
|
-
interface SectionPermissions {
|
|
201
|
-
canViewMembers?: boolean;
|
|
202
|
-
canEditContent?: boolean;
|
|
203
|
-
canManageMembers?: boolean;
|
|
204
|
-
}
|
|
205
|
-
interface User {
|
|
206
|
-
id: string;
|
|
207
|
-
email: string;
|
|
208
|
-
name: string;
|
|
209
|
-
firstName?: string;
|
|
210
|
-
lastName?: string;
|
|
211
|
-
/** Organization-specific title/position. Managed by organization administrators. */
|
|
212
|
-
title?: string | null;
|
|
213
|
-
phone?: string | null;
|
|
214
|
-
address?: string | null;
|
|
215
|
-
avatar?: string;
|
|
216
|
-
organizationId: string;
|
|
217
|
-
sectionId?: string;
|
|
218
|
-
role: UserRole;
|
|
219
|
-
customRole?: CustomRole;
|
|
220
|
-
permissions?: string[];
|
|
221
|
-
metadata?: Record<string, unknown>;
|
|
222
|
-
createdAt: string;
|
|
223
|
-
updatedAt: string;
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Check if user has a specific permission
|
|
227
|
-
*/
|
|
228
|
-
declare function userHasPermission(user: User, permission: string): boolean;
|
|
229
|
-
/**
|
|
230
|
-
* Check if user has any of the specified permissions
|
|
231
|
-
*/
|
|
232
|
-
declare function userHasAnyPermission(user: User, permissions: string[]): boolean;
|
|
233
|
-
/**
|
|
234
|
-
* Check if user has all of the specified permissions
|
|
235
|
-
*/
|
|
236
|
-
declare function userHasAllPermissions(user: User, permissions: string[]): boolean;
|
|
237
|
-
interface Membership {
|
|
238
|
-
userId: string;
|
|
239
|
-
organizationId: string;
|
|
240
|
-
sectionId?: string;
|
|
241
|
-
section?: Section;
|
|
242
|
-
role: UserRole;
|
|
243
|
-
/** Organization-specific title/position, separate from the access role. */
|
|
244
|
-
title?: string | null;
|
|
245
|
-
status: 'active' | 'pending' | 'suspended' | 'expired';
|
|
246
|
-
joinedAt: string;
|
|
247
|
-
expiresAt?: string;
|
|
248
|
-
metadata?: Record<string, unknown>;
|
|
249
|
-
}
|
|
250
|
-
interface ContentBlock {
|
|
251
|
-
id: string;
|
|
252
|
-
type: string;
|
|
253
|
-
content?: string;
|
|
254
|
-
url?: string;
|
|
255
|
-
alt?: string;
|
|
256
|
-
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
257
|
-
items?: unknown[];
|
|
258
|
-
language?: string;
|
|
259
|
-
caption?: string;
|
|
260
|
-
attributes?: Record<string, unknown>;
|
|
261
|
-
ordered?: boolean;
|
|
262
|
-
author?: string;
|
|
263
|
-
}
|
|
264
|
-
interface ContentTranslation {
|
|
265
|
-
title: string;
|
|
266
|
-
slug: string;
|
|
267
|
-
description?: string;
|
|
268
|
-
blocks: ContentBlock[];
|
|
269
|
-
/** Structured website/template fields for this language. */
|
|
270
|
-
fields?: Record<string, unknown>;
|
|
271
|
-
metaTitle?: string;
|
|
272
|
-
metaDescription?: string;
|
|
273
|
-
keywords?: string[];
|
|
274
|
-
}
|
|
275
|
-
type ContentPublicationState = 'draft' | 'published' | 'archived';
|
|
276
|
-
type ContentAudience = 'public' | 'internal' | 'members' | 'section';
|
|
277
|
-
interface ContentItem {
|
|
278
|
-
id: string;
|
|
279
|
-
/** Present when a consumer needs to distinguish organizations outside its configured provider. */
|
|
280
|
-
organizationId?: string;
|
|
281
|
-
type: string;
|
|
282
|
-
title: string;
|
|
283
|
-
slug: string;
|
|
284
|
-
/** Legacy string content. New AxCloud content uses `blocks`. */
|
|
285
|
-
content?: string;
|
|
286
|
-
description?: string;
|
|
287
|
-
blocks?: ContentBlock[];
|
|
288
|
-
/** Template identifier used by websites, e.g. "home" or "landing". */
|
|
289
|
-
template?: string;
|
|
290
|
-
/** Structured website/template fields. Frontends own layout and read these values by key. */
|
|
291
|
-
fields?: Record<string, unknown>;
|
|
292
|
-
excerpt?: string;
|
|
293
|
-
author?: {
|
|
294
|
-
id: string;
|
|
295
|
-
name: string;
|
|
296
|
-
};
|
|
297
|
-
status?: ContentPublicationState;
|
|
298
|
-
visibility?: ContentPublicationState;
|
|
299
|
-
/** @deprecated Delivery access is derived from publication metadata and the verified visitor. */
|
|
300
|
-
audience?: ContentAudience;
|
|
301
|
-
sectionId?: string;
|
|
302
|
-
tags?: string[];
|
|
303
|
-
lang?: string;
|
|
304
|
-
featuredImage?: string;
|
|
305
|
-
metaTitle?: string;
|
|
306
|
-
metaDescription?: string;
|
|
307
|
-
keywords?: string[];
|
|
308
|
-
translations?: Record<string, ContentTranslation>;
|
|
309
|
-
currentLanguage?: string;
|
|
310
|
-
availableLanguages?: string[];
|
|
311
|
-
seo?: {
|
|
312
|
-
canonical: string;
|
|
313
|
-
hreflang: Array<{
|
|
314
|
-
lang: string;
|
|
315
|
-
href: string;
|
|
316
|
-
}>;
|
|
317
|
-
};
|
|
318
|
-
publishedAt?: string;
|
|
319
|
-
createdAt: string;
|
|
320
|
-
updatedAt: string;
|
|
321
|
-
}
|
|
322
|
-
interface NewsItem extends ContentItem {
|
|
323
|
-
type: 'news';
|
|
324
|
-
featuredImage?: string;
|
|
325
|
-
category?: string;
|
|
326
|
-
tags?: string[];
|
|
327
|
-
}
|
|
328
|
-
interface Page extends ContentItem {
|
|
329
|
-
type: 'page';
|
|
330
|
-
template?: string;
|
|
331
|
-
order?: number;
|
|
332
|
-
}
|
|
333
|
-
interface ContentListResponse<T> {
|
|
334
|
-
items: T[];
|
|
335
|
-
count: number;
|
|
336
|
-
total: number;
|
|
337
|
-
page: number;
|
|
338
|
-
pageSize: number;
|
|
339
|
-
hasMore: boolean;
|
|
340
|
-
nextCursor?: string;
|
|
341
|
-
}
|
|
342
|
-
/** @deprecated Use ContentListResponse. */
|
|
343
|
-
type PaginatedResponse<T> = ContentListResponse<T>;
|
|
344
|
-
type ContentCollectionType = 'news' | 'pages' | 'events';
|
|
345
|
-
type ContentDetailType = 'news' | 'page' | 'event';
|
|
346
|
-
interface AxCloudConfig {
|
|
347
|
-
orgId: string;
|
|
348
|
-
apiUrl: string;
|
|
349
|
-
/** API stage - defaults to 'dev'. Use 'prod' for production. */
|
|
350
|
-
stage: string;
|
|
351
|
-
/** API key for public content endpoints (optional - required for public API access) */
|
|
352
|
-
apiKey?: string;
|
|
353
|
-
/** Optional privacy-safe web analytics collection. */
|
|
354
|
-
analytics?: AxCloudAnalyticsOptions;
|
|
355
|
-
auth0: {
|
|
356
|
-
domain: string;
|
|
357
|
-
clientId: string;
|
|
358
|
-
redirectUri: string;
|
|
359
|
-
audience?: string;
|
|
360
|
-
/** Auth0 Organization ID. Use this for invite-only member sites. */
|
|
361
|
-
organization?: string;
|
|
362
|
-
/** Database connection name for password operations. Defaults to 'Username-Password-Authentication' */
|
|
363
|
-
connection?: string;
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
interface ContentQueryOptions {
|
|
367
|
-
page?: number;
|
|
368
|
-
pageSize?: number;
|
|
369
|
-
/** @deprecated Delivery endpoints always return the published snapshot. */
|
|
370
|
-
status?: ContentPublicationState;
|
|
371
|
-
/** @deprecated Delivery endpoints always return the published snapshot. */
|
|
372
|
-
visibility?: ContentPublicationState;
|
|
373
|
-
audience?: ContentAudience;
|
|
374
|
-
/** @deprecated Member section access is derived from the verified token. */
|
|
375
|
-
sectionId?: string;
|
|
376
|
-
search?: string;
|
|
377
|
-
sortBy?: 'publishedAt' | 'createdAt' | 'updatedAt' | 'title';
|
|
378
|
-
sortOrder?: 'asc' | 'desc';
|
|
379
|
-
tags?: string[];
|
|
380
|
-
/** Return the requested translation when content has language variants. */
|
|
381
|
-
lang?: string;
|
|
382
|
-
/** Force public endpoint even when authenticated (for public pages) */
|
|
383
|
-
publicOnly?: boolean;
|
|
384
|
-
}
|
|
385
|
-
/**
|
|
386
|
-
* Organization branding information
|
|
387
|
-
*/
|
|
388
|
-
interface OrganizationBranding {
|
|
389
|
-
organizationId: string;
|
|
390
|
-
name: string;
|
|
391
|
-
branding: {
|
|
392
|
-
/** Signed URL for logo (expires in 1 hour) */
|
|
393
|
-
logoUrl: string | null;
|
|
394
|
-
/** Seconds until logoUrl expires */
|
|
395
|
-
logoExpiresIn: number | null;
|
|
396
|
-
/** Primary brand color (hex) */
|
|
397
|
-
primaryColor: string | null;
|
|
398
|
-
/** Secondary brand color (hex) */
|
|
399
|
-
secondaryColor: string | null;
|
|
400
|
-
};
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* Signed URL response for media assets
|
|
404
|
-
*/
|
|
405
|
-
interface SignedMediaUrl {
|
|
406
|
-
/** Signed S3 URL (expires in 1 hour) */
|
|
407
|
-
url: string;
|
|
408
|
-
/** Seconds until URL expires */
|
|
409
|
-
expiresIn: number;
|
|
410
|
-
/** S3 bucket name */
|
|
411
|
-
bucket: string;
|
|
412
|
-
/** S3 object key */
|
|
413
|
-
key: string;
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Media list item
|
|
417
|
-
*/
|
|
418
|
-
interface MediaItem {
|
|
419
|
-
/** File key (filename) */
|
|
420
|
-
key: string;
|
|
421
|
-
/** File size in bytes */
|
|
422
|
-
size: number;
|
|
423
|
-
/** Last modified timestamp */
|
|
424
|
-
lastModified: string;
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* Media list response
|
|
428
|
-
*/
|
|
429
|
-
interface MediaListResponse {
|
|
430
|
-
items: MediaItem[];
|
|
431
|
-
count: number;
|
|
432
|
-
bucket: string;
|
|
433
|
-
prefix: string;
|
|
434
|
-
}
|
|
435
|
-
type DocumentStatus = 'draft' | 'published' | 'archived';
|
|
436
|
-
type DocumentAudience = 'public' | 'members' | 'section' | 'internal';
|
|
437
|
-
type DocumentSourceProvider = 'upload' | 'sharepoint';
|
|
438
|
-
/**
|
|
439
|
-
* Public document metadata exposed through the AxCloud SDK.
|
|
440
|
-
*/
|
|
441
|
-
interface DocumentItem {
|
|
442
|
-
document_id: string;
|
|
443
|
-
org_id: string;
|
|
444
|
-
title: string;
|
|
445
|
-
description?: string;
|
|
446
|
-
filename: string;
|
|
447
|
-
mime_type: string;
|
|
448
|
-
size: number;
|
|
449
|
-
status: DocumentStatus;
|
|
450
|
-
audience: DocumentAudience;
|
|
451
|
-
tags: string[];
|
|
452
|
-
source_provider: DocumentSourceProvider;
|
|
453
|
-
created_at: string;
|
|
454
|
-
updated_at: string;
|
|
455
|
-
published_at?: string;
|
|
456
|
-
/** Section IDs this document is scoped to (member endpoint only). */
|
|
457
|
-
section_ids?: string[];
|
|
458
|
-
/** Display name of the member who uploaded the document (member endpoint only). */
|
|
459
|
-
uploaded_by_name?: string;
|
|
460
|
-
/** Folder IDs this document belongs to (member endpoint only). */
|
|
461
|
-
folder_ids?: string[];
|
|
462
|
-
}
|
|
463
|
-
interface DocumentListResponse {
|
|
464
|
-
items: DocumentItem[];
|
|
465
|
-
count: number;
|
|
466
|
-
}
|
|
467
|
-
/**
|
|
468
|
-
* A document folder the current member is allowed to see.
|
|
469
|
-
*
|
|
470
|
-
* Members receive folders for their own sections plus org-level folders
|
|
471
|
-
* (`section_id === null`). Returned by the member document-folders endpoint.
|
|
472
|
-
*/
|
|
473
|
-
interface DocumentFolder {
|
|
474
|
-
id: string;
|
|
475
|
-
/** Section this folder belongs to, or `null` for org-level folders. */
|
|
476
|
-
section_id: string | null;
|
|
477
|
-
/** Parent folder for nesting, or `null` for a top-level folder. */
|
|
478
|
-
parent_folder_id: string | null;
|
|
479
|
-
name: string;
|
|
480
|
-
sort_order: number;
|
|
481
|
-
}
|
|
482
|
-
interface DocumentFolderListResponse {
|
|
483
|
-
folders: DocumentFolder[];
|
|
484
|
-
}
|
|
485
|
-
interface SignedDocumentUrl {
|
|
486
|
-
documentId: string;
|
|
487
|
-
url: string;
|
|
488
|
-
expiresIn: number;
|
|
489
|
-
filename: string;
|
|
490
|
-
mimeType: string;
|
|
491
|
-
}
|
|
492
|
-
interface DocumentQueryOptions {
|
|
493
|
-
search?: string;
|
|
494
|
-
tags?: string[];
|
|
495
|
-
limit?: number;
|
|
496
|
-
/** Restrict results to documents belonging to this folder (member endpoint only). */
|
|
497
|
-
folderId?: string;
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
interface BarnsportMunicipality {
|
|
501
|
-
id: string;
|
|
502
|
-
slug: string;
|
|
503
|
-
name: string;
|
|
504
|
-
county?: string;
|
|
505
|
-
geo?: {
|
|
506
|
-
lat: number;
|
|
507
|
-
lng: number;
|
|
508
|
-
bounds?: [number, number, number, number];
|
|
509
|
-
};
|
|
510
|
-
}
|
|
511
|
-
interface BarnsportSportArticle {
|
|
512
|
-
short_description?: string;
|
|
513
|
-
what_is_it?: string;
|
|
514
|
-
why_fun?: string;
|
|
515
|
-
good_to_know?: {
|
|
516
|
-
age?: string;
|
|
517
|
-
equipment?: string;
|
|
518
|
-
cost?: string;
|
|
519
|
-
};
|
|
520
|
-
fun_facts?: string[];
|
|
521
|
-
}
|
|
522
|
-
interface BarnsportSport {
|
|
523
|
-
id: string;
|
|
524
|
-
slug: string;
|
|
525
|
-
name: string;
|
|
526
|
-
icon?: string;
|
|
527
|
-
color?: string;
|
|
528
|
-
category?: string;
|
|
529
|
-
is_featured?: boolean;
|
|
530
|
-
hero_image_url?: string;
|
|
531
|
-
short_description?: string;
|
|
532
|
-
/** Present on the single-sport endpoint (GET /public/{orgId}/sports/{slug}). */
|
|
533
|
-
article?: BarnsportSportArticle;
|
|
534
|
-
}
|
|
535
|
-
interface BarnsportActivitySchedule {
|
|
536
|
-
weekday?: number;
|
|
537
|
-
starts_at?: string;
|
|
538
|
-
ends_at?: string;
|
|
539
|
-
label?: string;
|
|
540
|
-
season?: string;
|
|
541
|
-
}
|
|
542
|
-
interface BarnsportActivityLocation {
|
|
543
|
-
name?: string;
|
|
544
|
-
address?: string;
|
|
545
|
-
lat?: number;
|
|
546
|
-
lng?: number;
|
|
547
|
-
}
|
|
548
|
-
interface BarnsportRegistrationMethod {
|
|
549
|
-
type: 'url' | 'email' | 'phone' | 'form' | 'external';
|
|
550
|
-
label?: string;
|
|
551
|
-
value: string;
|
|
552
|
-
instructions?: string;
|
|
553
|
-
preferred?: boolean;
|
|
554
|
-
}
|
|
555
|
-
interface BarnsportActivityListItem {
|
|
556
|
-
id: string;
|
|
557
|
-
slug: string;
|
|
558
|
-
title: string;
|
|
559
|
-
summary?: string;
|
|
560
|
-
sport: {
|
|
561
|
-
id: string;
|
|
562
|
-
slug: string;
|
|
563
|
-
name?: string;
|
|
564
|
-
icon?: string;
|
|
565
|
-
};
|
|
566
|
-
municipality: {
|
|
567
|
-
id: string;
|
|
568
|
-
slug: string;
|
|
569
|
-
name?: string;
|
|
570
|
-
};
|
|
571
|
-
club: {
|
|
572
|
-
id: string;
|
|
573
|
-
slug: string;
|
|
574
|
-
name?: string;
|
|
575
|
-
};
|
|
576
|
-
birthYears?: number[];
|
|
577
|
-
minBirthYear?: number;
|
|
578
|
-
maxBirthYear?: number;
|
|
579
|
-
ageLabel?: string;
|
|
580
|
-
schedule: BarnsportActivitySchedule[];
|
|
581
|
-
location?: BarnsportActivityLocation;
|
|
582
|
-
registrationSummary?: string;
|
|
583
|
-
updatedAt: string;
|
|
584
|
-
}
|
|
585
|
-
interface BarnsportActivity {
|
|
586
|
-
activity_id: string;
|
|
587
|
-
org_id: string;
|
|
588
|
-
slug: string;
|
|
589
|
-
title: string;
|
|
590
|
-
summary?: string;
|
|
591
|
-
description?: string;
|
|
592
|
-
sport_id: string;
|
|
593
|
-
sport_slug: string;
|
|
594
|
-
sport_name?: string;
|
|
595
|
-
sport_icon?: string;
|
|
596
|
-
municipality_id: string;
|
|
597
|
-
municipality_slug: string;
|
|
598
|
-
municipality_name?: string;
|
|
599
|
-
club_id: string;
|
|
600
|
-
club_slug: string;
|
|
601
|
-
club_name?: string;
|
|
602
|
-
club_website_url?: string;
|
|
603
|
-
birth_years?: number[];
|
|
604
|
-
min_birth_year?: number;
|
|
605
|
-
max_birth_year?: number;
|
|
606
|
-
age_label?: string;
|
|
607
|
-
schedule: BarnsportActivitySchedule[];
|
|
608
|
-
location?: BarnsportActivityLocation;
|
|
609
|
-
registration: {
|
|
610
|
-
methods: BarnsportRegistrationMethod[];
|
|
611
|
-
deadline?: string;
|
|
612
|
-
price_label?: string;
|
|
613
|
-
};
|
|
614
|
-
seo?: {
|
|
615
|
-
title?: string;
|
|
616
|
-
description?: string;
|
|
617
|
-
image_media_id?: string;
|
|
618
|
-
};
|
|
619
|
-
published_at?: string;
|
|
620
|
-
updated_at: string;
|
|
621
|
-
}
|
|
622
|
-
interface BarnsportActivitiesFilter {
|
|
623
|
-
municipality?: string;
|
|
624
|
-
sport?: string;
|
|
625
|
-
birthYear?: number;
|
|
626
|
-
q?: string;
|
|
627
|
-
search?: string;
|
|
628
|
-
sort?: 'updated' | 'name' | 'relevance';
|
|
629
|
-
cursor?: string;
|
|
630
|
-
limit?: number;
|
|
631
|
-
}
|
|
632
|
-
interface BarnsportListResponse<T> {
|
|
633
|
-
items: T[];
|
|
634
|
-
count: number;
|
|
635
|
-
nextCursor?: string | null;
|
|
636
|
-
}
|
|
637
|
-
interface BarnsportActivityResponse {
|
|
638
|
-
activity: BarnsportActivity;
|
|
639
|
-
}
|
|
640
|
-
interface BarnsportSitemapUrl {
|
|
641
|
-
loc: string;
|
|
642
|
-
lastmod?: string;
|
|
643
|
-
changefreq?: string;
|
|
644
|
-
priority?: number;
|
|
645
|
-
}
|
|
646
|
-
interface BarnsportSitemapResponse {
|
|
647
|
-
baseUrl: string;
|
|
648
|
-
updatedAt: string;
|
|
649
|
-
urls: BarnsportSitemapUrl[];
|
|
650
|
-
}
|
|
651
|
-
interface BarnsportInterestSubmissionRequest {
|
|
652
|
-
activitySlug: string;
|
|
653
|
-
guardianName: string;
|
|
654
|
-
guardianEmail: string;
|
|
655
|
-
guardianPhone?: string;
|
|
656
|
-
childName?: string;
|
|
657
|
-
childBirthYear?: number;
|
|
658
|
-
message?: string;
|
|
659
|
-
consent: {
|
|
660
|
-
contact: boolean;
|
|
661
|
-
privacyVersion: string;
|
|
662
|
-
};
|
|
663
|
-
honeypot?: string;
|
|
664
|
-
source?: {
|
|
665
|
-
site?: string;
|
|
666
|
-
pageUrl?: string;
|
|
667
|
-
utm?: Record<string, string>;
|
|
668
|
-
};
|
|
669
|
-
}
|
|
670
|
-
interface BarnsportInterestSubmissionResponse {
|
|
671
|
-
success: boolean;
|
|
672
|
-
submissionId?: string;
|
|
673
|
-
duplicate?: boolean;
|
|
674
|
-
message: string;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
25
|
type ContentSlotValue = string | number | boolean | null | undefined | string[] | Record<string, unknown> | unknown[];
|
|
678
26
|
type ContentSlotMap = Record<string, ContentSlotValue>;
|
|
679
27
|
interface ContentSlotImage {
|
|
@@ -1033,30 +381,6 @@ interface AxCloudProviderProps {
|
|
|
1033
381
|
*/
|
|
1034
382
|
declare function AxCloudProvider({ children, orgId, apiUrl, stage, apiKey, analytics, auth0, queryClient: providedQueryClient, timeout, }: AxCloudProviderProps): React.JSX.Element;
|
|
1035
383
|
|
|
1036
|
-
interface AxCloudContextValue {
|
|
1037
|
-
config: AxCloudConfig;
|
|
1038
|
-
client: AxCloudClient;
|
|
1039
|
-
orgId: string;
|
|
1040
|
-
/** API stage (e.g., 'dev', 'prod') */
|
|
1041
|
-
stage: string;
|
|
1042
|
-
/** Whether using public API mode (API key, no auth) */
|
|
1043
|
-
isPublicMode: boolean;
|
|
1044
|
-
/** Auth0 has completed its initial session check. */
|
|
1045
|
-
isAuthLoading?: boolean;
|
|
1046
|
-
/** Whether the current browser session is authenticated. */
|
|
1047
|
-
isAuthenticated?: boolean;
|
|
1048
|
-
/** Auth0 subject used to isolate member-only query caches. */
|
|
1049
|
-
authSubject?: string;
|
|
1050
|
-
/** Remove identity-bound AxCloud query data before logout or account changes. */
|
|
1051
|
-
clearContentCache?: () => void;
|
|
1052
|
-
analytics: AnalyticsRuntime;
|
|
1053
|
-
}
|
|
1054
|
-
declare function useAxCloudContext(): AxCloudContextValue;
|
|
1055
|
-
|
|
1056
|
-
type AnalyticsRuntimeConfig = Pick<AxCloudConfig, 'analytics' | 'apiUrl' | 'orgId' | 'stage'>;
|
|
1057
|
-
declare function useAnalyticsRuntime(config: AnalyticsRuntimeConfig): AnalyticsRuntime;
|
|
1058
|
-
declare function useAnalytics(): AnalyticsRuntime;
|
|
1059
|
-
|
|
1060
384
|
interface AuthUser {
|
|
1061
385
|
id: string;
|
|
1062
386
|
email: string;
|
|
@@ -1103,7 +427,7 @@ interface Auth0ClientState {
|
|
|
1103
427
|
logout: ReturnType<typeof useAuth0>['logout'];
|
|
1104
428
|
getAccessTokenSilently: ReturnType<typeof useAuth0>['getAccessTokenSilently'];
|
|
1105
429
|
getIdTokenClaims: ReturnType<typeof useAuth0>['getIdTokenClaims'];
|
|
1106
|
-
user: User
|
|
430
|
+
user: User | undefined;
|
|
1107
431
|
isAuthenticated: boolean;
|
|
1108
432
|
isLoading: boolean;
|
|
1109
433
|
error: Error | undefined;
|
|
@@ -1158,7 +482,7 @@ interface UserOrganizationMembership {
|
|
|
1158
482
|
sectionIds: string[];
|
|
1159
483
|
sections: UserOrganizationSection[];
|
|
1160
484
|
}
|
|
1161
|
-
interface UserApiResponse extends User {
|
|
485
|
+
interface UserApiResponse extends User$1 {
|
|
1162
486
|
allOrgIds: string[];
|
|
1163
487
|
organizationMemberships: Record<string, UserOrganizationMembership>;
|
|
1164
488
|
effectiveOrganizationId: string | null;
|
|
@@ -1395,7 +719,7 @@ interface PageContentState<T extends ContentItem = ContentItem> extends ContentS
|
|
|
1395
719
|
declare function usePageContent<T extends ContentItem = ContentItem>(slug: string, options?: ContentItemOptions): PageContentState<T>;
|
|
1396
720
|
|
|
1397
721
|
interface SectionWithMembers extends Section {
|
|
1398
|
-
members?: User[];
|
|
722
|
+
members?: User$1[];
|
|
1399
723
|
memberCount?: number;
|
|
1400
724
|
}
|
|
1401
725
|
/**
|
|
@@ -1430,7 +754,7 @@ declare function useMySection(options?: {
|
|
|
1430
754
|
}): {
|
|
1431
755
|
section: SectionWithMembers | null;
|
|
1432
756
|
sectionId: string | null;
|
|
1433
|
-
members: User[];
|
|
757
|
+
members: User$1[];
|
|
1434
758
|
memberCount: number;
|
|
1435
759
|
isLoading: boolean;
|
|
1436
760
|
isError: boolean;
|
|
@@ -1901,57 +1225,6 @@ declare function useMemberDocumentDownload(documentId: string | undefined): {
|
|
|
1901
1225
|
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<SignedDocumentUrl, Error>>;
|
|
1902
1226
|
};
|
|
1903
1227
|
|
|
1904
|
-
declare function useBarnsportMunicipalities(): {
|
|
1905
|
-
municipalities: BarnsportMunicipality[];
|
|
1906
|
-
count: number;
|
|
1907
|
-
isLoading: boolean;
|
|
1908
|
-
isError: boolean;
|
|
1909
|
-
error: Error | null;
|
|
1910
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<BarnsportListResponse<BarnsportMunicipality>, Error>>;
|
|
1911
|
-
};
|
|
1912
|
-
declare function useBarnsportSports(): {
|
|
1913
|
-
sports: BarnsportSport[];
|
|
1914
|
-
count: number;
|
|
1915
|
-
isLoading: boolean;
|
|
1916
|
-
isError: boolean;
|
|
1917
|
-
error: Error | null;
|
|
1918
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<BarnsportListResponse<BarnsportSport>, Error>>;
|
|
1919
|
-
};
|
|
1920
|
-
declare function useBarnsportSport(slug: string | undefined): {
|
|
1921
|
-
sport: BarnsportSport | null;
|
|
1922
|
-
isLoading: boolean;
|
|
1923
|
-
isError: boolean;
|
|
1924
|
-
error: Error | null;
|
|
1925
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<{
|
|
1926
|
-
sport: BarnsportSport;
|
|
1927
|
-
}, Error>>;
|
|
1928
|
-
};
|
|
1929
|
-
declare function useBarnsportActivities(filters?: BarnsportActivitiesFilter): {
|
|
1930
|
-
activities: BarnsportActivityListItem[];
|
|
1931
|
-
count: number;
|
|
1932
|
-
nextCursor: string | null;
|
|
1933
|
-
isLoading: boolean;
|
|
1934
|
-
isError: boolean;
|
|
1935
|
-
error: Error | null;
|
|
1936
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<BarnsportListResponse<BarnsportActivityListItem>, Error>>;
|
|
1937
|
-
};
|
|
1938
|
-
declare function useBarnsportActivity(slug: string | undefined): {
|
|
1939
|
-
activity: BarnsportActivity | null;
|
|
1940
|
-
isLoading: boolean;
|
|
1941
|
-
isError: boolean;
|
|
1942
|
-
error: Error | null;
|
|
1943
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<BarnsportActivityResponse, Error>>;
|
|
1944
|
-
};
|
|
1945
|
-
declare function useBarnsportSitemap(baseUrl?: string): {
|
|
1946
|
-
sitemap: BarnsportSitemapResponse | null;
|
|
1947
|
-
urls: BarnsportSitemapUrl[];
|
|
1948
|
-
isLoading: boolean;
|
|
1949
|
-
isError: boolean;
|
|
1950
|
-
error: Error | null;
|
|
1951
|
-
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<BarnsportSitemapResponse, Error>>;
|
|
1952
|
-
};
|
|
1953
|
-
declare function useSubmitBarnsportInterest(): _tanstack_react_query.UseMutationResult<BarnsportInterestSubmissionResponse, Error, BarnsportInterestSubmissionRequest, unknown>;
|
|
1954
|
-
|
|
1955
1228
|
interface LoginButtonProps {
|
|
1956
1229
|
/**
|
|
1957
1230
|
* Button text when not authenticated
|
|
@@ -2202,4 +1475,4 @@ interface LinkedAccountsListProps {
|
|
|
2202
1475
|
*/
|
|
2203
1476
|
declare function LinkedAccountsList({ providers, showConnectButtons, className, onUnlink, onLinkInitiated, renderIdentity, renderAvailableProvider, }: LinkedAccountsListProps): React.JSX.Element;
|
|
2204
1477
|
|
|
2205
|
-
export { type
|
|
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 };
|