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