@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
@@ -0,0 +1,223 @@
1
+ import { createContext, useContext } from 'react';
2
+
3
+ // src/core/errors.ts
4
+ var AxCloudError = class _AxCloudError extends Error {
5
+ constructor(message, code, status, details) {
6
+ super(message);
7
+ this.name = "AxCloudError";
8
+ this.code = code;
9
+ this.status = status;
10
+ this.details = details;
11
+ const ErrorWithCapture = Error;
12
+ if (ErrorWithCapture.captureStackTrace) {
13
+ ErrorWithCapture.captureStackTrace(this, _AxCloudError);
14
+ }
15
+ }
16
+ static fromResponse(status, body) {
17
+ const details = typeof body === "object" ? body : void 0;
18
+ const message = (typeof details?.message === "string" ? details.message : void 0) || (typeof details?.error === "string" ? details.error : void 0);
19
+ switch (status) {
20
+ case 401:
21
+ return new _AxCloudError(
22
+ message || "Authentication required",
23
+ "UNAUTHORIZED",
24
+ status,
25
+ details
26
+ );
27
+ case 403:
28
+ return new _AxCloudError(message || "Access denied", "FORBIDDEN", status, details);
29
+ case 404:
30
+ return new _AxCloudError(message || "Resource not found", "NOT_FOUND", status, details);
31
+ case 422:
32
+ return new _AxCloudError(
33
+ message || "Validation failed",
34
+ "VALIDATION_ERROR",
35
+ status,
36
+ details
37
+ );
38
+ default:
39
+ if (status >= 500) {
40
+ return new _AxCloudError(message || "Server error", "SERVER_ERROR", status, details);
41
+ }
42
+ return new _AxCloudError(message || "An error occurred", "UNKNOWN_ERROR", status, details);
43
+ }
44
+ }
45
+ static networkError(originalError) {
46
+ const isDev = typeof process !== "undefined" && process.env?.NODE_ENV === "development";
47
+ const message = isDev && originalError?.message ? originalError.message : "Network request failed";
48
+ return new _AxCloudError(
49
+ message,
50
+ "NETWORK_ERROR",
51
+ 0,
52
+ isDev ? { originalError: originalError?.message } : void 0
53
+ );
54
+ }
55
+ static timeoutError(timeoutMs) {
56
+ return new _AxCloudError(`Request timed out after ${timeoutMs}ms`, "TIMEOUT_ERROR", 0, {
57
+ timeout: timeoutMs
58
+ });
59
+ }
60
+ };
61
+ function isAxCloudError(error) {
62
+ return error instanceof AxCloudError;
63
+ }
64
+
65
+ // src/core/client.ts
66
+ var AxCloudClient = class {
67
+ constructor(config) {
68
+ this.baseUrl = config.baseUrl.replace(/\/$/, "");
69
+ this.getAccessToken = config.getAccessToken;
70
+ this.apiKey = config.apiKey;
71
+ this.defaultTimeout = config.timeout ?? 3e4;
72
+ }
73
+ /**
74
+ * Update the access token getter (used when auth state changes)
75
+ */
76
+ setAccessTokenGetter(getter) {
77
+ this.getAccessToken = getter;
78
+ }
79
+ /**
80
+ * Build URL with query parameters
81
+ */
82
+ buildUrl(path, params) {
83
+ const url = new URL(`${this.baseUrl}${path}`);
84
+ if (params) {
85
+ Object.entries(params).forEach(([key, value]) => {
86
+ if (value !== void 0) {
87
+ url.searchParams.append(key, String(value));
88
+ }
89
+ });
90
+ }
91
+ return url.toString();
92
+ }
93
+ /**
94
+ * API key should only be sent to public endpoints.
95
+ * This avoids leaking public keys to authenticated/internal routes.
96
+ */
97
+ shouldAttachApiKey(path) {
98
+ const normalized = path.startsWith("/") ? path : `/${path}`;
99
+ return normalized.startsWith("/public/") || normalized.startsWith("/api/public/") || normalized.startsWith("/content/public/") || normalized.startsWith("/media/public/") || normalized.startsWith("/documents/public/") || normalized.startsWith("/barnsport/public/") || normalized.startsWith("/api/barnsport/public/");
100
+ }
101
+ /**
102
+ * Make an authenticated request
103
+ */
104
+ async request(path, options = {}) {
105
+ const { body, params, headers: customHeaders, timeout, ...restOptions } = options;
106
+ const headers = {
107
+ "Content-Type": "application/json"
108
+ };
109
+ if (customHeaders) {
110
+ const customHeadersRecord = customHeaders;
111
+ Object.assign(headers, customHeadersRecord);
112
+ }
113
+ if (this.apiKey && this.shouldAttachApiKey(path)) {
114
+ headers["x-api-key"] = this.apiKey;
115
+ }
116
+ if (this.getAccessToken) {
117
+ try {
118
+ const token = await this.getAccessToken();
119
+ if (token) {
120
+ headers["Authorization"] = `Bearer ${token}`;
121
+ }
122
+ } catch (error) {
123
+ if (typeof process !== "undefined" && process.env?.NODE_ENV === "development") {
124
+ console.warn(
125
+ "[AxCloud SDK] Failed to fetch access token:",
126
+ error instanceof Error ? error.message : error
127
+ );
128
+ }
129
+ }
130
+ }
131
+ const url = this.buildUrl(path, params);
132
+ const controller = new AbortController();
133
+ const requestTimeout = timeout ?? this.defaultTimeout;
134
+ const timeoutId = setTimeout(() => controller.abort(), requestTimeout);
135
+ try {
136
+ const response = await fetch(url, {
137
+ ...restOptions,
138
+ headers,
139
+ body: body ? JSON.stringify(body) : void 0,
140
+ signal: controller.signal
141
+ });
142
+ const contentType = response.headers.get("content-type");
143
+ const isJson = contentType?.includes("application/json");
144
+ if (!response.ok) {
145
+ const errorBody = isJson ? await response.json().catch(() => null) : null;
146
+ throw AxCloudError.fromResponse(response.status, errorBody);
147
+ }
148
+ if (response.status === 204) {
149
+ return {};
150
+ }
151
+ return isJson ? await response.json() : {};
152
+ } catch (error) {
153
+ if (error instanceof AxCloudError) {
154
+ throw error;
155
+ }
156
+ if (error instanceof Error && error.name === "AbortError") {
157
+ throw AxCloudError.timeoutError(requestTimeout);
158
+ }
159
+ throw AxCloudError.networkError(error instanceof Error ? error : void 0);
160
+ } finally {
161
+ clearTimeout(timeoutId);
162
+ }
163
+ }
164
+ /**
165
+ * GET request
166
+ */
167
+ get(path, params) {
168
+ return this.request(path, { method: "GET", params });
169
+ }
170
+ /**
171
+ * POST request
172
+ */
173
+ post(path, body) {
174
+ return this.request(path, { method: "POST", body });
175
+ }
176
+ /**
177
+ * PUT request
178
+ */
179
+ put(path, body) {
180
+ return this.request(path, { method: "PUT", body });
181
+ }
182
+ /**
183
+ * PATCH request
184
+ */
185
+ patch(path, body) {
186
+ return this.request(path, { method: "PATCH", body });
187
+ }
188
+ /**
189
+ * DELETE request
190
+ */
191
+ delete(path) {
192
+ return this.request(path, { method: "DELETE" });
193
+ }
194
+ };
195
+ var clientRegistry = /* @__PURE__ */ new WeakMap();
196
+ function createClient(config, key) {
197
+ const client = new AxCloudClient(config);
198
+ if (key) {
199
+ clientRegistry.set(key, client);
200
+ }
201
+ return client;
202
+ }
203
+ function getClient(key) {
204
+ if (key) {
205
+ const client = clientRegistry.get(key);
206
+ if (client) {
207
+ return client;
208
+ }
209
+ }
210
+ throw new Error("AxCloud client not found. Make sure AxCloudProvider is mounted and use useAxCloudContext() to get the client.");
211
+ }
212
+ var AxCloudContext = createContext(null);
213
+ function useAxCloudContext() {
214
+ const context = useContext(AxCloudContext);
215
+ if (!context) {
216
+ throw new Error("useAxCloudContext must be used within a AxCloudProvider");
217
+ }
218
+ return context;
219
+ }
220
+
221
+ export { AxCloudClient, AxCloudContext, AxCloudError, createClient, getClient, isAxCloudError, useAxCloudContext };
222
+ //# sourceMappingURL=chunk-PMMCOWL3.mjs.map
223
+ //# sourceMappingURL=chunk-PMMCOWL3.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/errors.ts","../src/core/client.ts","../src/react/context.tsx"],"names":[],"mappings":";;;AAcO,IAAM,YAAA,GAAN,MAAM,aAAA,SAAqB,KAAA,CAAM;AAAA,EAKtC,WAAA,CACE,OAAA,EACA,IAAA,EACA,MAAA,EACA,OAAA,EACA;AACA,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,IAAA,GAAO,cAAA;AACZ,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AACd,IAAA,IAA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A,MAAM,OAAA,GAAU,WAAW,cAAc,CAAA;AACzC,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,MAAM,IAAI,MAAM,yDAAyD,CAAA;AAAA,EAC3E;AACA,EAAA,OAAO,OAAA;AACT","file":"chunk-PMMCOWL3.mjs","sourcesContent":["/**\n * AxCloud SDK Error Types\n */\n\nexport type AxCloudErrorCode =\n | 'UNAUTHORIZED'\n | 'FORBIDDEN'\n | 'NOT_FOUND'\n | 'VALIDATION_ERROR'\n | 'NETWORK_ERROR'\n | 'TIMEOUT_ERROR'\n | 'SERVER_ERROR'\n | 'UNKNOWN_ERROR';\n\nexport class AxCloudError extends Error {\n readonly code: AxCloudErrorCode;\n readonly status: number;\n readonly details?: Record<string, unknown>;\n\n constructor(\n message: string,\n code: AxCloudErrorCode,\n status: number,\n details?: Record<string, unknown>\n ) {\n super(message);\n this.name = 'AxCloudError';\n this.code = code;\n this.status = status;\n this.details = details;\n\n // Maintains proper stack trace for where error was thrown (V8 only)\n const ErrorWithCapture = Error as typeof Error & {\n captureStackTrace?: (target: object, constructor?: typeof AxCloudError) => void;\n };\n if (ErrorWithCapture.captureStackTrace) {\n ErrorWithCapture.captureStackTrace(this, AxCloudError);\n }\n }\n\n static fromResponse(status: number, body?: unknown): AxCloudError {\n const details = typeof body === 'object' ? (body as Record<string, unknown>) : undefined;\n const message =\n (typeof details?.message === 'string' ? details.message : undefined) ||\n (typeof details?.error === 'string' ? details.error : undefined);\n\n switch (status) {\n case 401:\n return new AxCloudError(\n message || 'Authentication required',\n 'UNAUTHORIZED',\n status,\n details\n );\n case 403:\n return new AxCloudError(message || 'Access denied', 'FORBIDDEN', status, details);\n case 404:\n return new AxCloudError(message || 'Resource not found', 'NOT_FOUND', status, details);\n case 422:\n return new AxCloudError(\n message || 'Validation failed',\n 'VALIDATION_ERROR',\n status,\n details\n );\n default:\n if (status >= 500) {\n return new AxCloudError(message || 'Server error', 'SERVER_ERROR', status, details);\n }\n return new AxCloudError(message || 'An error occurred', 'UNKNOWN_ERROR', status, details);\n }\n }\n\n static networkError(originalError?: Error): AxCloudError {\n // Don't include original error details in production to avoid leaking sensitive info\n // Use typeof check to avoid issues in environments where process is not defined\n const isDev = typeof process !== 'undefined' && process.env?.NODE_ENV === 'development';\n const message =\n isDev && originalError?.message ? originalError.message : 'Network request failed';\n\n return new AxCloudError(\n message,\n 'NETWORK_ERROR',\n 0,\n isDev ? { originalError: originalError?.message } : undefined\n );\n }\n\n static timeoutError(timeoutMs: number): AxCloudError {\n return new AxCloudError(`Request timed out after ${timeoutMs}ms`, 'TIMEOUT_ERROR', 0, {\n timeout: timeoutMs,\n });\n }\n}\n\nexport function isAxCloudError(error: unknown): error is AxCloudError {\n return error instanceof AxCloudError;\n}\n","/**\n * AxCloud API Client\n *\n * Fetch wrapper with authentication header injection and error handling.\n */\n\nimport { AxCloudError } from './errors'\n\nexport interface ClientConfig {\n baseUrl: string\n getAccessToken?: () => Promise<string | undefined>\n /** API key for public content endpoints */\n apiKey?: string\n /** Default request timeout in milliseconds (default: 30000) */\n timeout?: number\n}\n\nexport interface RequestOptions extends Omit<RequestInit, 'body'> {\n body?: unknown\n params?: Record<string, string | number | boolean | undefined>\n /** Request timeout in milliseconds (overrides client default) */\n timeout?: number\n}\n\nexport class AxCloudClient {\n private baseUrl: string\n private getAccessToken?: () => Promise<string | undefined>\n private apiKey?: string\n private defaultTimeout: number\n\n constructor(config: ClientConfig) {\n this.baseUrl = config.baseUrl.replace(/\\/$/, '')\n this.getAccessToken = config.getAccessToken\n this.apiKey = config.apiKey\n this.defaultTimeout = config.timeout ?? 30000\n }\n\n /**\n * Update the access token getter (used when auth state changes)\n */\n setAccessTokenGetter(getter: () => Promise<string | undefined>) {\n this.getAccessToken = getter\n }\n\n /**\n * Build URL with query parameters\n */\n private buildUrl(path: string, params?: Record<string, string | number | boolean | undefined>): string {\n const url = new URL(`${this.baseUrl}${path}`)\n\n if (params) {\n Object.entries(params).forEach(([key, value]) => {\n if (value !== undefined) {\n url.searchParams.append(key, String(value))\n }\n })\n }\n\n return url.toString()\n }\n\n /**\n * API key should only be sent to public endpoints.\n * This avoids leaking public keys to authenticated/internal routes.\n */\n private shouldAttachApiKey(path: string): boolean {\n const normalized = path.startsWith('/') ? path : `/${path}`\n return (\n normalized.startsWith('/public/') ||\n normalized.startsWith('/api/public/') ||\n normalized.startsWith('/content/public/') ||\n normalized.startsWith('/media/public/') ||\n normalized.startsWith('/documents/public/') ||\n normalized.startsWith('/barnsport/public/') ||\n normalized.startsWith('/api/barnsport/public/')\n )\n }\n\n /**\n * Make an authenticated request\n */\n async request<T>(path: string, options: RequestOptions = {}): Promise<T> {\n const { body, params, headers: customHeaders, timeout, ...restOptions } = options\n\n // Initialize headers as Record<string, string> to avoid type casting\n const headers: Record<string, string> = {\n 'Content-Type': 'application/json',\n }\n\n // Merge custom headers\n if (customHeaders) {\n const customHeadersRecord = customHeaders as Record<string, string>\n Object.assign(headers, customHeadersRecord)\n }\n\n // Add API key header only for public endpoints\n if (this.apiKey && this.shouldAttachApiKey(path)) {\n headers['x-api-key'] = this.apiKey\n }\n\n // Add auth header if we have a token getter\n if (this.getAccessToken) {\n try {\n const token = await this.getAccessToken()\n if (token) {\n headers['Authorization'] = `Bearer ${token}`\n }\n } catch (error) {\n // Log in development to help with debugging auth issues\n // Use typeof check to avoid issues in environments where process is not defined\n if (typeof process !== 'undefined' && process.env?.NODE_ENV === 'development') {\n console.warn(\n '[AxCloud SDK] Failed to fetch access token:',\n error instanceof Error ? error.message : error\n )\n }\n // Don't throw - allow request to continue (backend will return 401 if needed)\n }\n }\n\n const url = this.buildUrl(path, params)\n\n // Setup AbortController for timeout\n const controller = new AbortController()\n const requestTimeout = timeout ?? this.defaultTimeout\n const timeoutId = setTimeout(() => controller.abort(), requestTimeout)\n\n try {\n const response = await fetch(url, {\n ...restOptions,\n headers,\n body: body ? JSON.stringify(body) : undefined,\n signal: controller.signal,\n })\n\n // Handle non-JSON responses\n const contentType = response.headers.get('content-type')\n const isJson = contentType?.includes('application/json')\n\n if (!response.ok) {\n const errorBody = isJson ? await response.json().catch(() => null) : null\n throw AxCloudError.fromResponse(response.status, errorBody)\n }\n\n // Return empty object for 204 No Content\n if (response.status === 204) {\n return {} as T\n }\n\n return isJson ? await response.json() : ({} as T)\n } catch (error) {\n if (error instanceof AxCloudError) {\n throw error\n }\n // Handle abort/timeout errors\n if (error instanceof Error && error.name === 'AbortError') {\n throw AxCloudError.timeoutError(requestTimeout)\n }\n throw AxCloudError.networkError(error instanceof Error ? error : undefined)\n } finally {\n clearTimeout(timeoutId)\n }\n }\n\n /**\n * GET request\n */\n get<T>(path: string, params?: Record<string, string | number | boolean | undefined>): Promise<T> {\n return this.request<T>(path, { method: 'GET', params })\n }\n\n /**\n * POST request\n */\n post<T>(path: string, body?: unknown): Promise<T> {\n return this.request<T>(path, { method: 'POST', body })\n }\n\n /**\n * PUT request\n */\n put<T>(path: string, body?: unknown): Promise<T> {\n return this.request<T>(path, { method: 'PUT', body })\n }\n\n /**\n * PATCH request\n */\n patch<T>(path: string, body?: unknown): Promise<T> {\n return this.request<T>(path, { method: 'PATCH', body })\n }\n\n /**\n * DELETE request\n */\n delete<T>(path: string): Promise<T> {\n return this.request<T>(path, { method: 'DELETE' })\n }\n}\n\n// Client instance registry - allows multiple providers without SSR issues\n// Uses WeakMap to prevent memory leaks when providers unmount\nconst clientRegistry = new WeakMap<object, AxCloudClient>()\n\n/**\n * Create a client instance associated with a key (typically the provider instance)\n * This allows multiple AxCloudProviders to coexist without conflicts\n */\nexport function createClient(config: ClientConfig, key?: object): AxCloudClient {\n const client = new AxCloudClient(config)\n if (key) {\n clientRegistry.set(key, client)\n }\n return client\n}\n\n/**\n * Get a client instance by key\n * @deprecated Use the client from useAxCloudContext() instead\n */\nexport function getClient(key?: object): AxCloudClient {\n if (key) {\n const client = clientRegistry.get(key)\n if (client) {\n return client\n }\n }\n throw new Error('AxCloud client not found. Make sure AxCloudProvider is mounted and use useAxCloudContext() to get the client.')\n}\n","import { createContext, useContext } from 'react';\nimport type { AxCloudClient } from '../core/client';\nimport type { AxCloudConfig } from '../core/types';\nimport type { AnalyticsRuntime } from '../core/analytics';\n\nexport interface AxCloudContextValue {\n config: AxCloudConfig;\n client: AxCloudClient;\n orgId: string;\n /** API stage (e.g., 'dev', 'prod') */\n stage: string;\n /** Whether using public API mode (API key, no auth) */\n isPublicMode: boolean;\n /** Auth0 has completed its initial session check. */\n isAuthLoading?: boolean;\n /** Whether the current browser session is authenticated. */\n isAuthenticated?: boolean;\n /** Auth0 subject used to isolate member-only query caches. */\n authSubject?: string;\n /** Remove identity-bound AxCloud query data before logout or account changes. */\n clearContentCache?: () => void;\n analytics: AnalyticsRuntime;\n}\n\nexport const AxCloudContext = createContext<AxCloudContextValue | null>(null);\n\nexport function useAxCloudContext(): AxCloudContextValue {\n const context = useContext(AxCloudContext);\n if (!context) {\n throw new Error('useAxCloudContext must be used within a AxCloudProvider');\n }\n return context;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkDSWRJZWR_js = require('./chunk-DSWRJZWR.js');
3
+ var chunk7K5N3DQ4_js = require('./chunk-7K5N3DQ4.js');
4
4
  var reactQuery = require('@tanstack/react-query');
5
5
 
6
6
  // src/core/barnsportClient.ts
@@ -34,7 +34,7 @@ var BarnsportClient = class {
34
34
  return this.client.get(this.path("/providers"), { ...filters });
35
35
  }
36
36
  getProvider(slug) {
37
- return this.client.get(this.path(`/providers/${encodeURIComponent(slug)}`));
37
+ return this.client.get(this.path(`/providers/by-slug/${encodeURIComponent(slug)}`));
38
38
  }
39
39
  listActivityOffers(filters = {}) {
40
40
  return this.client.get(this.path("/activity-offers"), { ...filters });
@@ -57,15 +57,26 @@ var BarnsportClient = class {
57
57
  request
58
58
  );
59
59
  }
60
+ submitProviderUpdateRequest(providerSlug, request) {
61
+ return this.client.post(this.path("/update-requests"), { ...request, providerSlug });
62
+ }
60
63
  };
61
64
  function createBarnsportClient(client, orgId) {
62
65
  return new BarnsportClient(client, orgId);
63
66
  }
67
+ function createPublicBarnsportClient({
68
+ apiUrl,
69
+ apiKey,
70
+ orgId,
71
+ timeout
72
+ }) {
73
+ return createBarnsportClient(new chunk7K5N3DQ4_js.AxCloudClient({ baseUrl: apiUrl, apiKey, timeout }), orgId);
74
+ }
64
75
  function barnsportQueryRoot(context) {
65
76
  return ["axcloud", "barnsport", context.stage, context.config.apiUrl, context.orgId];
66
77
  }
67
78
  function useBarnsportMunicipalities() {
68
- const { client, orgId } = chunkDSWRJZWR_js.useAxCloudContext();
79
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
69
80
  const query = reactQuery.useQuery({
70
81
  queryKey: ["axcloud", "barnsport", "municipalities", orgId],
71
82
  queryFn: () => client.get(
@@ -83,7 +94,7 @@ function useBarnsportMunicipalities() {
83
94
  };
84
95
  }
85
96
  function useBarnsportSports() {
86
- const { client, orgId } = chunkDSWRJZWR_js.useAxCloudContext();
97
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
87
98
  const query = reactQuery.useQuery({
88
99
  queryKey: ["axcloud", "barnsport", "sports", orgId],
89
100
  queryFn: () => client.get(`/barnsport/public/${orgId}/sports`),
@@ -99,7 +110,7 @@ function useBarnsportSports() {
99
110
  };
100
111
  }
101
112
  function useBarnsportSport(slug) {
102
- const { client, orgId } = chunkDSWRJZWR_js.useAxCloudContext();
113
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
103
114
  const query = reactQuery.useQuery({
104
115
  queryKey: ["axcloud", "barnsport", "sport", orgId, slug],
105
116
  queryFn: () => client.get(`/barnsport/public/${orgId}/sports/${slug || ""}`),
@@ -115,7 +126,7 @@ function useBarnsportSport(slug) {
115
126
  };
116
127
  }
117
128
  function useBarnsportActivities(filters = {}) {
118
- const { client, orgId } = chunkDSWRJZWR_js.useAxCloudContext();
129
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
119
130
  const params = { ...filters };
120
131
  const query = reactQuery.useQuery({
121
132
  queryKey: ["axcloud", "barnsport", "activities", orgId, filters],
@@ -136,7 +147,7 @@ function useBarnsportActivities(filters = {}) {
136
147
  };
137
148
  }
138
149
  function useBarnsportActivity(slug) {
139
- const { client, orgId } = chunkDSWRJZWR_js.useAxCloudContext();
150
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
140
151
  const query = reactQuery.useQuery({
141
152
  queryKey: ["axcloud", "barnsport", "activity", orgId, slug],
142
153
  queryFn: () => client.get(`/barnsport/public/${orgId}/activities/${slug || ""}`),
@@ -152,7 +163,7 @@ function useBarnsportActivity(slug) {
152
163
  };
153
164
  }
154
165
  function useBarnsportSitemap(baseUrl) {
155
- const { client, orgId } = chunkDSWRJZWR_js.useAxCloudContext();
166
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
156
167
  const query = reactQuery.useQuery({
157
168
  queryKey: ["axcloud", "barnsport", "sitemap", orgId, baseUrl],
158
169
  queryFn: () => client.get(`/barnsport/public/${orgId}/sitemap`, {
@@ -170,7 +181,7 @@ function useBarnsportSitemap(baseUrl) {
170
181
  };
171
182
  }
172
183
  function useSubmitBarnsportInterest() {
173
- const { client, orgId } = chunkDSWRJZWR_js.useAxCloudContext();
184
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
174
185
  return reactQuery.useMutation({
175
186
  mutationFn: (submission) => client.post(
176
187
  `/barnsport/public/${orgId}/interest`,
@@ -179,7 +190,7 @@ function useSubmitBarnsportInterest() {
179
190
  });
180
191
  }
181
192
  function useBarnsportProviderSearch(filters) {
182
- const context = chunkDSWRJZWR_js.useAxCloudContext();
193
+ const context = chunk7K5N3DQ4_js.useAxCloudContext();
183
194
  const api = createBarnsportClient(context.client, context.orgId);
184
195
  const normalizedFilters = { ...filters, q: filters.q?.trim() };
185
196
  const query = reactQuery.useQuery({
@@ -201,7 +212,7 @@ function useBarnsportProviderSearch(filters) {
201
212
  };
202
213
  }
203
214
  function useBarnsportProvider(slug) {
204
- const context = chunkDSWRJZWR_js.useAxCloudContext();
215
+ const context = chunk7K5N3DQ4_js.useAxCloudContext();
205
216
  const api = createBarnsportClient(context.client, context.orgId);
206
217
  const query = reactQuery.useQuery({
207
218
  queryKey: [...barnsportQueryRoot(context), "provider", slug],
@@ -218,7 +229,7 @@ function useBarnsportProvider(slug) {
218
229
  };
219
230
  }
220
231
  function useBarnsportActivityOffers(filters = {}) {
221
- const context = chunkDSWRJZWR_js.useAxCloudContext();
232
+ const context = chunk7K5N3DQ4_js.useAxCloudContext();
222
233
  const api = createBarnsportClient(context.client, context.orgId);
223
234
  const query = reactQuery.useQuery({
224
235
  queryKey: [...barnsportQueryRoot(context), "activity-offers", filters],
@@ -238,21 +249,21 @@ function useBarnsportActivityOffers(filters = {}) {
238
249
  };
239
250
  }
240
251
  function useSubmitBarnsportFeedback() {
241
- const { client, orgId } = chunkDSWRJZWR_js.useAxCloudContext();
252
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
242
253
  const api = createBarnsportClient(client, orgId);
243
254
  return reactQuery.useMutation({
244
255
  mutationFn: (request) => api.submitFeedback(request)
245
256
  });
246
257
  }
247
258
  function useSubmitBarnsportReview() {
248
- const { client, orgId } = chunkDSWRJZWR_js.useAxCloudContext();
259
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
249
260
  const api = createBarnsportClient(client, orgId);
250
261
  return reactQuery.useMutation({
251
262
  mutationFn: (request) => api.submitReview(request)
252
263
  });
253
264
  }
254
265
  function useTrackBarnsportEvent() {
255
- const { client, orgId } = chunkDSWRJZWR_js.useAxCloudContext();
266
+ const { client, orgId } = chunk7K5N3DQ4_js.useAxCloudContext();
256
267
  const api = createBarnsportClient(client, orgId);
257
268
  return reactQuery.useMutation({
258
269
  mutationFn: (request) => api.trackEvent(request)
@@ -261,6 +272,7 @@ function useTrackBarnsportEvent() {
261
272
 
262
273
  exports.BarnsportClient = BarnsportClient;
263
274
  exports.createBarnsportClient = createBarnsportClient;
275
+ exports.createPublicBarnsportClient = createPublicBarnsportClient;
264
276
  exports.useBarnsportActivities = useBarnsportActivities;
265
277
  exports.useBarnsportActivity = useBarnsportActivity;
266
278
  exports.useBarnsportActivityOffers = useBarnsportActivityOffers;
@@ -274,5 +286,5 @@ exports.useSubmitBarnsportFeedback = useSubmitBarnsportFeedback;
274
286
  exports.useSubmitBarnsportInterest = useSubmitBarnsportInterest;
275
287
  exports.useSubmitBarnsportReview = useSubmitBarnsportReview;
276
288
  exports.useTrackBarnsportEvent = useTrackBarnsportEvent;
277
- //# sourceMappingURL=chunk-EX66R5IA.js.map
278
- //# sourceMappingURL=chunk-EX66R5IA.js.map
289
+ //# sourceMappingURL=chunk-ZOQAXLCZ.js.map
290
+ //# sourceMappingURL=chunk-ZOQAXLCZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/barnsportClient.ts","../src/react/hooks/useBarnsport.ts"],"names":["AxCloudClient","useAxCloudContext","useQuery","useMutation"],"mappings":";;;;;;AAgCO,IAAM,kBAAN,MAAsB;AAAA,EAC3B,WAAA,CACmB,QACA,KAAA,EACjB;AAFiB,IAAA,IAAA,CAAA,MAAA,GAAA,MAAA;AACA,IAAA,IAAA,CAAA,KAAA,GAAA,KAAA;AAAA,EAChB;AAAA,EAEK,KAAK,IAAA,EAAsB;AACjC,IAAA,OAAO,qBAAqB,kBAAA,CAAmB,IAAA,CAAK,KAAK,CAAC,GAAG,IAAI,CAAA,CAAA;AAAA,EACnE;AAAA,EAEA,kBAAA,GAA4E;AAC1E,IAAA,OAAO,KAAK,MAAA,CAAO,GAAA,CAAI,IAAA,CAAK,IAAA,CAAK,iBAAiB,CAAC,CAAA;AAAA,EACrD;AAAA,EAEA,UAAA,GAA6D;AAC3D,IAAA,OAAO,KAAK,MAAA,CAAO,GAAA,CAAI,IAAA,CAAK,IAAA,CAAK,SAAS,CAAC,CAAA;AAAA,EAC7C;AAAA,EAEA,SAAS,IAAA,EAAkD;AACzD,IAAA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AAA,CAAM,OAAA;AAAA,IACf,OAAO,KAAA,CAAM,KAAA;AAAA,IACb,SAAS,KAAA,CAAM;AAAA,GACjB;AACF;AAEO,SAAS,0BAAA,GAA6B;AAC3C,EAAA,MAAM,EAAE,MAAA,EAAQ,KAAA,EAAM,GAAID,kCAAA,EAAkB;AAC5C,EAAA,MAAM,GAAA,GAAM,qBAAA,CAAsB,MAAA,EAAQ,KAAK,CAAA;AAC/C,EAAA,OAAOE,sBAAA,CAAwE;AAAA,IAC7E,UAAA,EAAY,CAAC,OAAA,KAAY,GAAA,CAAI,eAAe,OAAO;AAAA,GACpD,CAAA;AACH;AAEO,SAAS,wBAAA,GAA2B;AACzC,EAAA,MAAM,EAAE,MAAA,EAAQ,KAAA,EAAM,GAAIF,kCAAA,EAAkB;AAC5C,EAAA,MAAM,GAAA,GAAM,qBAAA,CAAsB,MAAA,EAAQ,KAAK,CAAA;AAC/C,EAAA,OAAOE,sBAAA,CAAwF;AAAA,IAC7F,UAAA,EAAY,CAAC,OAAA,KAAY,GAAA,CAAI,aAAa,OAAO;AAAA,GAClD,CAAA;AACH;AAEO,SAAS,sBAAA,GAAyB;AACvC,EAAA,MAAM,EAAE,MAAA,EAAQ,KAAA,EAAM,GAAIF,kCAAA,EAAkB;AAC5C,EAAA,MAAM,GAAA,GAAM,qBAAA,CAAsB,MAAA,EAAQ,KAAK,CAAA;AAC/C,EAAA,OAAOE,sBAAA,CAAkE;AAAA,IACvE,UAAA,EAAY,CAAC,OAAA,KAAY,GAAA,CAAI,WAAW,OAAO;AAAA,GAChD,CAAA;AACH","file":"chunk-ZOQAXLCZ.js","sourcesContent":["import { AxCloudClient } from './client';\nimport type {\n BarnsportActivitiesFilter,\n BarnsportActivityListItem,\n BarnsportActivityOffersFilter,\n BarnsportActivityResponse,\n BarnsportActivityOffer,\n BarnsportClubRemovalRequest,\n BarnsportClubRemovalResponse,\n BarnsportCollectionResponse,\n BarnsportEventRequest,\n BarnsportEventResponse,\n BarnsportFeedbackRequest,\n BarnsportFeedbackResponse,\n BarnsportInterestSubmissionRequest,\n BarnsportInterestSubmissionResponse,\n BarnsportItemResponse,\n BarnsportListResponse,\n BarnsportMunicipality,\n BarnsportProviderProfile,\n BarnsportProvider,\n BarnsportProviderUpdateRequest,\n BarnsportProviderUpdateResponse,\n BarnsportProvidersFilter,\n BarnsportReviewSubmissionRequest,\n BarnsportReviewSubmissionResponse,\n BarnsportSitemapResponse,\n BarnsportSport,\n} from './barnsport';\n\ntype QueryParams = Record<string, string | number | boolean | undefined>;\n\nexport class BarnsportClient {\n constructor(\n private readonly client: AxCloudClient,\n private readonly orgId: string\n ) {}\n\n private path(path: string): string {\n return `/barnsport/public/${encodeURIComponent(this.orgId)}${path}`;\n }\n\n listMunicipalities(): Promise<BarnsportListResponse<BarnsportMunicipality>> {\n return this.client.get(this.path('/municipalities'));\n }\n\n listSports(): Promise<BarnsportListResponse<BarnsportSport>> {\n return this.client.get(this.path('/sports'));\n }\n\n getSport(slug: string): Promise<{ sport: BarnsportSport }> {\n return this.client.get(this.path(`/sports/${encodeURIComponent(slug)}`));\n }\n\n listActivities(\n filters: BarnsportActivitiesFilter = {}\n ): Promise<BarnsportListResponse<BarnsportActivityListItem>> {\n return this.client.get(this.path('/activities'), { ...filters } as QueryParams);\n }\n\n getActivity(slug: string): Promise<BarnsportActivityResponse> {\n return this.client.get(this.path(`/activities/${encodeURIComponent(slug)}`));\n }\n\n getSitemap(baseUrl?: string): Promise<BarnsportSitemapResponse> {\n return this.client.get(this.path('/sitemap'), { baseUrl });\n }\n\n listProviders(\n filters: BarnsportProvidersFilter = {}\n ): Promise<BarnsportCollectionResponse<BarnsportProvider, BarnsportProvidersFilter>> {\n return this.client.get(this.path('/providers'), { ...filters } as QueryParams);\n }\n\n getProvider(slug: string): Promise<BarnsportItemResponse<BarnsportProviderProfile>> {\n return this.client.get(this.path(`/providers/by-slug/${encodeURIComponent(slug)}`));\n }\n\n listActivityOffers(\n filters: BarnsportActivityOffersFilter = {}\n ): Promise<BarnsportCollectionResponse<BarnsportActivityOffer, BarnsportActivityOffersFilter>> {\n return this.client.get(this.path('/activity-offers'), { ...filters } as QueryParams);\n }\n\n submitInterest(\n request: BarnsportInterestSubmissionRequest\n ): Promise<BarnsportInterestSubmissionResponse> {\n return this.client.post(this.path('/interest'), request);\n }\n\n submitFeedback(request: BarnsportFeedbackRequest): Promise<BarnsportFeedbackResponse> {\n return this.client.post(this.path('/feedback'), request);\n }\n\n submitReview(\n request: BarnsportReviewSubmissionRequest\n ): Promise<BarnsportReviewSubmissionResponse> {\n return this.client.post(this.path('/reviews'), request);\n }\n\n trackEvent(request: BarnsportEventRequest): Promise<BarnsportEventResponse> {\n return this.client.post(this.path('/events'), request);\n }\n\n submitClubRemovalRequest(\n clubSlug: string,\n request: BarnsportClubRemovalRequest\n ): Promise<BarnsportClubRemovalResponse> {\n return this.client.post(\n this.path(`/clubs/${encodeURIComponent(clubSlug)}/removal-request`),\n request\n );\n }\n\n submitProviderUpdateRequest(\n providerSlug: string,\n request: BarnsportProviderUpdateRequest\n ): Promise<BarnsportProviderUpdateResponse> {\n return this.client.post(this.path('/update-requests'), { ...request, providerSlug });\n }\n}\n\nexport function createBarnsportClient(client: AxCloudClient, orgId: string): BarnsportClient {\n return new BarnsportClient(client, orgId);\n}\n\nexport interface PublicBarnsportClientConfig {\n apiUrl: string;\n apiKey: string;\n orgId: string;\n timeout?: number;\n}\n\n/** Create a browser-safe Barnsport client without importing the authenticated SDK entrypoint. */\nexport function createPublicBarnsportClient({\n apiUrl,\n apiKey,\n orgId,\n timeout,\n}: PublicBarnsportClientConfig): BarnsportClient {\n return createBarnsportClient(new AxCloudClient({ baseUrl: apiUrl, apiKey, timeout }), orgId);\n}\n","import { useMutation, useQuery } from '@tanstack/react-query';\nimport { useAxCloudContext } from '../context';\nimport type {\n BarnsportActivitiesFilter,\n BarnsportActivityListItem,\n BarnsportActivityResponse,\n BarnsportClubRemovalRequest,\n BarnsportClubRemovalResponse,\n BarnsportInterestSubmissionRequest,\n BarnsportInterestSubmissionResponse,\n BarnsportListResponse,\n BarnsportMunicipality,\n BarnsportSitemapResponse,\n BarnsportSport,\n BarnsportActivityOffersFilter,\n BarnsportActivityOffer,\n BarnsportCollectionResponse,\n BarnsportEventRequest,\n BarnsportEventResponse,\n BarnsportFeedbackRequest,\n BarnsportFeedbackResponse,\n BarnsportProvider,\n BarnsportProviderProfile,\n BarnsportProvidersFilter,\n BarnsportReviewSubmissionRequest,\n BarnsportReviewSubmissionResponse,\n} from '../../core/barnsport';\nimport { createBarnsportClient } from '../../core/barnsportClient';\n\nfunction barnsportQueryRoot(context: ReturnType<typeof useAxCloudContext>) {\n return ['axcloud', 'barnsport', context.stage, context.config.apiUrl, context.orgId] as const;\n}\n\nexport function useBarnsportMunicipalities() {\n const { client, orgId } = useAxCloudContext();\n\n const query = useQuery<BarnsportListResponse<BarnsportMunicipality>>({\n queryKey: ['axcloud', 'barnsport', 'municipalities', orgId],\n queryFn: () =>\n client.get<BarnsportListResponse<BarnsportMunicipality>>(\n `/barnsport/public/${orgId}/municipalities`\n ),\n staleTime: 1000 * 60 * 30,\n });\n\n return {\n municipalities: query.data?.items ?? [],\n count: query.data?.count ?? 0,\n isLoading: query.isLoading,\n isError: query.isError,\n error: query.error,\n refetch: query.refetch,\n };\n}\n\nexport function useBarnsportSports() {\n const { client, orgId } = useAxCloudContext();\n\n const query = useQuery<BarnsportListResponse<BarnsportSport>>({\n queryKey: ['axcloud', 'barnsport', 'sports', orgId],\n queryFn: () =>\n client.get<BarnsportListResponse<BarnsportSport>>(`/barnsport/public/${orgId}/sports`),\n staleTime: 1000 * 60 * 30,\n });\n\n return {\n sports: query.data?.items ?? [],\n count: query.data?.count ?? 0,\n isLoading: query.isLoading,\n isError: query.isError,\n error: query.error,\n refetch: query.refetch,\n };\n}\n\nexport function useBarnsportSport(slug: string | undefined) {\n const { client, orgId } = useAxCloudContext();\n\n const query = useQuery<{ sport: BarnsportSport }>({\n queryKey: ['axcloud', 'barnsport', 'sport', orgId, slug],\n queryFn: () =>\n client.get<{ sport: BarnsportSport }>(`/barnsport/public/${orgId}/sports/${slug || ''}`),\n enabled: Boolean(slug),\n staleTime: 1000 * 60 * 15,\n });\n\n return {\n sport: query.data?.sport ?? null,\n isLoading: query.isLoading,\n isError: query.isError,\n error: query.error,\n refetch: query.refetch,\n };\n}\n\nexport function useBarnsportActivities(filters: BarnsportActivitiesFilter = {}) {\n const { client, orgId } = useAxCloudContext();\n const params: Record<string, string | number | boolean | undefined> = { ...filters };\n\n const query = useQuery<BarnsportListResponse<BarnsportActivityListItem>>({\n queryKey: ['axcloud', 'barnsport', 'activities', orgId, filters],\n queryFn: () =>\n client.get<BarnsportListResponse<BarnsportActivityListItem>>(\n `/barnsport/public/${orgId}/activities`,\n params\n ),\n staleTime: 1000 * 60 * 5,\n });\n\n return {\n activities: query.data?.items ?? [],\n count: query.data?.count ?? 0,\n nextCursor: query.data?.nextCursor ?? null,\n isLoading: query.isLoading,\n isError: query.isError,\n error: query.error,\n refetch: query.refetch,\n };\n}\n\nexport function useBarnsportActivity(slug: string | undefined) {\n const { client, orgId } = useAxCloudContext();\n\n const query = useQuery<BarnsportActivityResponse>({\n queryKey: ['axcloud', 'barnsport', 'activity', orgId, slug],\n queryFn: () =>\n client.get<BarnsportActivityResponse>(`/barnsport/public/${orgId}/activities/${slug || ''}`),\n enabled: Boolean(slug),\n staleTime: 1000 * 60 * 5,\n });\n\n return {\n activity: query.data?.activity ?? null,\n isLoading: query.isLoading,\n isError: query.isError,\n error: query.error,\n refetch: query.refetch,\n };\n}\n\nexport function useBarnsportSitemap(baseUrl?: string) {\n const { client, orgId } = useAxCloudContext();\n\n const query = useQuery<BarnsportSitemapResponse>({\n queryKey: ['axcloud', 'barnsport', 'sitemap', orgId, baseUrl],\n queryFn: () =>\n client.get<BarnsportSitemapResponse>(`/barnsport/public/${orgId}/sitemap`, {\n baseUrl,\n }),\n staleTime: 1000 * 60 * 15,\n });\n\n return {\n sitemap: query.data ?? null,\n urls: query.data?.urls ?? [],\n isLoading: query.isLoading,\n isError: query.isError,\n error: query.error,\n refetch: query.refetch,\n };\n}\n\nexport function useSubmitBarnsportInterest() {\n const { client, orgId } = useAxCloudContext();\n\n return useMutation<\n BarnsportInterestSubmissionResponse,\n Error,\n BarnsportInterestSubmissionRequest\n >({\n mutationFn: (submission) =>\n client.post<BarnsportInterestSubmissionResponse>(\n `/barnsport/public/${orgId}/interest`,\n submission\n ),\n });\n}\n\nexport function useSubmitBarnsportClubRemovalRequest(clubSlug: string | undefined) {\n const { client, orgId } = useAxCloudContext();\n\n return useMutation<BarnsportClubRemovalResponse, Error, BarnsportClubRemovalRequest>({\n mutationFn: (request) =>\n client.post<BarnsportClubRemovalResponse>(\n `/barnsport/public/${orgId}/clubs/${clubSlug || ''}/removal-request`,\n request\n ),\n });\n}\n\nexport function useBarnsportProviderSearch(filters: BarnsportProvidersFilter) {\n const context = useAxCloudContext();\n const api = createBarnsportClient(context.client, context.orgId);\n const normalizedFilters = { ...filters, q: filters.q?.trim() };\n const query = useQuery<BarnsportCollectionResponse<BarnsportProvider, BarnsportProvidersFilter>>({\n queryKey: [...barnsportQueryRoot(context), 'providers', normalizedFilters],\n queryFn: () => api.listProviders(normalizedFilters),\n enabled: (normalizedFilters.q?.length ?? 0) >= 2,\n staleTime: 1000 * 60,\n });\n\n return {\n providers: query.data?.items ?? [],\n count: query.data?.count ?? query.data?.items.length ?? 0,\n nextCursor: query.data?.nextCursor ?? null,\n hasMore: query.data?.hasMore ?? false,\n isLoading: query.isLoading,\n isFetching: query.isFetching,\n isError: query.isError,\n error: query.error,\n refetch: query.refetch,\n };\n}\n\nexport function useBarnsportProvider(slug: string | undefined) {\n const context = useAxCloudContext();\n const api = createBarnsportClient(context.client, context.orgId);\n const query = useQuery<{ item: BarnsportProviderProfile }>({\n queryKey: [...barnsportQueryRoot(context), 'provider', slug],\n queryFn: () => api.getProvider(slug || ''),\n enabled: Boolean(slug),\n staleTime: 1000 * 60 * 5,\n });\n\n return {\n provider: query.data?.item ?? null,\n isLoading: query.isLoading,\n isError: query.isError,\n error: query.error,\n refetch: query.refetch,\n };\n}\n\nexport function useBarnsportActivityOffers(filters: BarnsportActivityOffersFilter = {}) {\n const context = useAxCloudContext();\n const api = createBarnsportClient(context.client, context.orgId);\n const query = useQuery<\n BarnsportCollectionResponse<BarnsportActivityOffer, BarnsportActivityOffersFilter>\n >({\n queryKey: [...barnsportQueryRoot(context), 'activity-offers', filters],\n queryFn: () => api.listActivityOffers(filters),\n staleTime: 1000 * 60 * 5,\n });\n\n return {\n activityOffers: query.data?.items ?? [],\n count: query.data?.count ?? query.data?.items.length ?? 0,\n nextCursor: query.data?.nextCursor ?? null,\n hasMore: query.data?.hasMore ?? false,\n isLoading: query.isLoading,\n isFetching: query.isFetching,\n isError: query.isError,\n error: query.error,\n refetch: query.refetch,\n };\n}\n\nexport function useSubmitBarnsportFeedback() {\n const { client, orgId } = useAxCloudContext();\n const api = createBarnsportClient(client, orgId);\n return useMutation<BarnsportFeedbackResponse, Error, BarnsportFeedbackRequest>({\n mutationFn: (request) => api.submitFeedback(request),\n });\n}\n\nexport function useSubmitBarnsportReview() {\n const { client, orgId } = useAxCloudContext();\n const api = createBarnsportClient(client, orgId);\n return useMutation<BarnsportReviewSubmissionResponse, Error, BarnsportReviewSubmissionRequest>({\n mutationFn: (request) => api.submitReview(request),\n });\n}\n\nexport function useTrackBarnsportEvent() {\n const { client, orgId } = useAxCloudContext();\n const api = createBarnsportClient(client, orgId);\n return useMutation<BarnsportEventResponse, Error, BarnsportEventRequest>({\n mutationFn: (request) => api.trackEvent(request),\n });\n}\n"]}
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
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
+ 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-1WbKvPY4.mjs';
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-1WbKvPY4.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-Cn9flax0.mjs';
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 };