@clovnet/casino-sdk 1.0.0

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.
@@ -0,0 +1,56 @@
1
+ export { A as AffiliateSubIds, a as AppErrorEnvelope, b as AuthError, c as AuthSession, B as BalanceResponse, d as Bet, e as BetDetail, f as BetStatus, g as BetsPage, h as BetsQuery, C as COOKIE, i as CasinoClient, j as CasinoClientConfig, k as CasinoSdkError, l as CategoryNode, m as ConflictError, n as ConsentEntry, o as ConsentsPage, p as CookieJar, q as CoolOffPeriod, r as CreateCasinoClientConfig, D as DataExportStatus, s as DepositDetail, t as DepositHistoryPage, u as DepositHistoryQuery, v as DepositInput, w as DepositResult, x as DepositSummary, y as DepositTxStatus, E as ExtActionInput, z as ExtActionOutput, F as ExtActionShape, G as ExtCallArgs, H as ExtCallOpts, I as ExtCatalog, J as ExtCatalogOptions, K as ExtCatalogPlugin, L as ExtMethod, M as ExtModule, N as ExtPluginClient, O as ExtRegistry, P as ExtRequestInit, Q as FetchLike, R as FlowDelegatedError, S as ForbiddenError, T as Game, U as GameFeatures, V as GamePage, W as GameSession, X as GameSessionsPage, Y as GeoQuery, Z as HEADER, _ as HistoryRangeQuery, $ as InsufficientFundsError, a0 as KycChecklistItem, a1 as KycDocumentStatus, a2 as KycHistoryEntry, a3 as KycHistoryPage, a4 as KycItemDocument, a5 as KycRequest, a6 as KycRequestStatus, a7 as KycStatusResponse, a8 as KycTrigger, a9 as KycUploadInput, aa as KycUploadResult, ab as LaunchInput, ac as LaunchResult, ad as LedgerEntry, ae as LedgerQuery, af as LimitExceededError, ag as LimitKind, ah as LimitPeriod, ai as LobbyQuery, aj as LoginAttempt, ak as LoginHistoryPage, al as LoginInput, am as MONEY_SCALE, an as MeResponse, ao as MinorUnits, ap as NetworkError, aq as NotFoundError, ar as NotImplementedError, as as OddsFormat, at as OperationDeniedError, au as PageInfo, av as Paginated, aw as PaymentMethod, ax as Player, ay as PlayerKycStatus, az as PlayerLimit, aA as PlayerPreferences, aB as PlayerProfile, aC as PlayerProfileRecord, aD as PlayerStatus, aE as PluginActionDescriptor, aF as PluginActionNotFoundError, aG as PluginFrontendDecl, aH as PluginNotEnabledError, aI as PluginUnavailableError, aJ as PluginVersionMismatchError, aK as ProfileResponse, aL as Provider, aM as RateLimitError, aN as RealtimeOptions, aO as RgBlockedError, aP as SafeSession, aQ as SearchQuery, aR as SelfExclusionPeriod, aS as ServerError, aT as SessionHistoryPage, aU as SessionHistoryQuery, aV as SessionSnapshot, aW as SetLimitInput, aX as SetPreferencesInput, aY as SignupAttribution, aZ as SignupInput, a_ as SocialAccount, a$ as SocialProvider, b0 as SocialStartOptions, b1 as TrackClickInput, b2 as TrackClickResult, b3 as TransactionStatus, b4 as TransactionType, b5 as TransactionsQuery, b6 as TypedExtPluginClient, b7 as UnprocessableError, b8 as UpdateProfileInput, b9 as UpdateProfileResult, ba as UtmParams, bb as ValidationError, bc as VerificationRequestResult, bd as WalletBucketName, be as WalletBuckets, bf as WalletTransaction, bg as WithdrawalDetail, bh as WithdrawalHistoryPage, bi as WithdrawalHistoryQuery, bj as WithdrawalInput, bk as WithdrawalResult, bl as WithdrawalSummary, bm as WithdrawalTxStatus, bn as assertLaunchUrl, bo as assertPluginVersion, bp as createCasinoClient, bq as decimalToMinor, br as formatMoney, bs as isAppErrorEnvelope, bt as minorStringToMinor, bu as minorToAmount, bv as minorToDecimal } from './client-B3-Y0Xan.cjs';
2
+ export { B as BonusEvent, C as ChannelEventMap, a as ConnectionState, b as CoreRealtimeChannel, E as ExtChannel, c as ExtPluginEvent, G as GamingEvent, P as PlayerEvent, R as REALTIME_CHANNELS, d as RealtimeChannel, e as RealtimeError, W as WalletBalanceEvent, f as WalletBucket, g as WalletDepositEvent, h as WalletWithdrawalEvent, i as isExtChannel } from './contract-DtFe4bRy.cjs';
3
+
4
+ /**
5
+ * Minimal JSON Schema (draft-07 subset) checker: `type`, `required`, `enum` —
6
+ * nothing more, by design. The SDK uses it for **dev-mode advisory warnings**
7
+ * on plugin-action inputs; the server's Zod validation stays authoritative and
8
+ * the SDK never rejects client-side on a schema mismatch. The playground reuses
9
+ * it to derive form field types.
10
+ */
11
+ /** One advisory mismatch found by {@link checkJsonSchema}. */
12
+ interface JsonSchemaProblem {
13
+ /** JSON-pointer-ish location, `""` for the root value. */
14
+ path: string;
15
+ message: string;
16
+ }
17
+ /**
18
+ * Best-effort check of `value` against `schema`. Returns problems (empty when the
19
+ * value passes or the schema is not an object). Only `type`, `required`, and
20
+ * `enum` are enforced, recursing through `properties` and single-schema `items`.
21
+ */
22
+ declare function checkJsonSchema(value: unknown, schema: unknown, path?: string): JsonSchemaProblem[];
23
+
24
+ /**
25
+ * Idempotency key generation.
26
+ *
27
+ * Money operations on the runtime require a key (8–128 chars) sent both as the
28
+ * body field `idempotencyKey` and the `idempotency-key` header. Replays return
29
+ * the original result with `idempotent: true`. The SDK auto-generates one per
30
+ * money call unless the caller supplies their own.
31
+ */
32
+ /** A reasonably-unique, URL-safe key. Prefers `crypto.randomUUID` when available. */
33
+ declare function generateIdempotencyKey(prefix?: string): string;
34
+
35
+ /**
36
+ * `@clovnet/casino-sdk` — player / casino frontend SDK for the CasinoWebEngine Runtime
37
+ * Core. Framework-agnostic core; React bindings live at `@clovnet/casino-sdk/react`,
38
+ * the standalone realtime client at `@clovnet/casino-sdk/realtime`.
39
+ *
40
+ * @example
41
+ * import { createCasinoClient, formatMoney } from "@clovnet/casino-sdk";
42
+ *
43
+ * const sdk = createCasinoClient({
44
+ * baseUrl: "https://api.staging.example",
45
+ * wsUrl: "wss://api.staging.example/realtime",
46
+ * tenantId: "grandbet",
47
+ * });
48
+ *
49
+ * await sdk.auth.login({ email, password });
50
+ * const balance = await sdk.wallet.getBalance();
51
+ * formatMoney(balance.cash, balance.currency); // "€12.50"
52
+ */
53
+ /** The runtime API contract version this SDK release targets. */
54
+ declare const RUNTIME_API_VERSION: "2026-07-27";
55
+
56
+ export { type JsonSchemaProblem, RUNTIME_API_VERSION, checkJsonSchema, generateIdempotencyKey };
@@ -0,0 +1,56 @@
1
+ export { A as AffiliateSubIds, a as AppErrorEnvelope, b as AuthError, c as AuthSession, B as BalanceResponse, d as Bet, e as BetDetail, f as BetStatus, g as BetsPage, h as BetsQuery, C as COOKIE, i as CasinoClient, j as CasinoClientConfig, k as CasinoSdkError, l as CategoryNode, m as ConflictError, n as ConsentEntry, o as ConsentsPage, p as CookieJar, q as CoolOffPeriod, r as CreateCasinoClientConfig, D as DataExportStatus, s as DepositDetail, t as DepositHistoryPage, u as DepositHistoryQuery, v as DepositInput, w as DepositResult, x as DepositSummary, y as DepositTxStatus, E as ExtActionInput, z as ExtActionOutput, F as ExtActionShape, G as ExtCallArgs, H as ExtCallOpts, I as ExtCatalog, J as ExtCatalogOptions, K as ExtCatalogPlugin, L as ExtMethod, M as ExtModule, N as ExtPluginClient, O as ExtRegistry, P as ExtRequestInit, Q as FetchLike, R as FlowDelegatedError, S as ForbiddenError, T as Game, U as GameFeatures, V as GamePage, W as GameSession, X as GameSessionsPage, Y as GeoQuery, Z as HEADER, _ as HistoryRangeQuery, $ as InsufficientFundsError, a0 as KycChecklistItem, a1 as KycDocumentStatus, a2 as KycHistoryEntry, a3 as KycHistoryPage, a4 as KycItemDocument, a5 as KycRequest, a6 as KycRequestStatus, a7 as KycStatusResponse, a8 as KycTrigger, a9 as KycUploadInput, aa as KycUploadResult, ab as LaunchInput, ac as LaunchResult, ad as LedgerEntry, ae as LedgerQuery, af as LimitExceededError, ag as LimitKind, ah as LimitPeriod, ai as LobbyQuery, aj as LoginAttempt, ak as LoginHistoryPage, al as LoginInput, am as MONEY_SCALE, an as MeResponse, ao as MinorUnits, ap as NetworkError, aq as NotFoundError, ar as NotImplementedError, as as OddsFormat, at as OperationDeniedError, au as PageInfo, av as Paginated, aw as PaymentMethod, ax as Player, ay as PlayerKycStatus, az as PlayerLimit, aA as PlayerPreferences, aB as PlayerProfile, aC as PlayerProfileRecord, aD as PlayerStatus, aE as PluginActionDescriptor, aF as PluginActionNotFoundError, aG as PluginFrontendDecl, aH as PluginNotEnabledError, aI as PluginUnavailableError, aJ as PluginVersionMismatchError, aK as ProfileResponse, aL as Provider, aM as RateLimitError, aN as RealtimeOptions, aO as RgBlockedError, aP as SafeSession, aQ as SearchQuery, aR as SelfExclusionPeriod, aS as ServerError, aT as SessionHistoryPage, aU as SessionHistoryQuery, aV as SessionSnapshot, aW as SetLimitInput, aX as SetPreferencesInput, aY as SignupAttribution, aZ as SignupInput, a_ as SocialAccount, a$ as SocialProvider, b0 as SocialStartOptions, b1 as TrackClickInput, b2 as TrackClickResult, b3 as TransactionStatus, b4 as TransactionType, b5 as TransactionsQuery, b6 as TypedExtPluginClient, b7 as UnprocessableError, b8 as UpdateProfileInput, b9 as UpdateProfileResult, ba as UtmParams, bb as ValidationError, bc as VerificationRequestResult, bd as WalletBucketName, be as WalletBuckets, bf as WalletTransaction, bg as WithdrawalDetail, bh as WithdrawalHistoryPage, bi as WithdrawalHistoryQuery, bj as WithdrawalInput, bk as WithdrawalResult, bl as WithdrawalSummary, bm as WithdrawalTxStatus, bn as assertLaunchUrl, bo as assertPluginVersion, bp as createCasinoClient, bq as decimalToMinor, br as formatMoney, bs as isAppErrorEnvelope, bt as minorStringToMinor, bu as minorToAmount, bv as minorToDecimal } from './client-BxHPrkxp.js';
2
+ export { B as BonusEvent, C as ChannelEventMap, a as ConnectionState, b as CoreRealtimeChannel, E as ExtChannel, c as ExtPluginEvent, G as GamingEvent, P as PlayerEvent, R as REALTIME_CHANNELS, d as RealtimeChannel, e as RealtimeError, W as WalletBalanceEvent, f as WalletBucket, g as WalletDepositEvent, h as WalletWithdrawalEvent, i as isExtChannel } from './contract-DtFe4bRy.js';
3
+
4
+ /**
5
+ * Minimal JSON Schema (draft-07 subset) checker: `type`, `required`, `enum` —
6
+ * nothing more, by design. The SDK uses it for **dev-mode advisory warnings**
7
+ * on plugin-action inputs; the server's Zod validation stays authoritative and
8
+ * the SDK never rejects client-side on a schema mismatch. The playground reuses
9
+ * it to derive form field types.
10
+ */
11
+ /** One advisory mismatch found by {@link checkJsonSchema}. */
12
+ interface JsonSchemaProblem {
13
+ /** JSON-pointer-ish location, `""` for the root value. */
14
+ path: string;
15
+ message: string;
16
+ }
17
+ /**
18
+ * Best-effort check of `value` against `schema`. Returns problems (empty when the
19
+ * value passes or the schema is not an object). Only `type`, `required`, and
20
+ * `enum` are enforced, recursing through `properties` and single-schema `items`.
21
+ */
22
+ declare function checkJsonSchema(value: unknown, schema: unknown, path?: string): JsonSchemaProblem[];
23
+
24
+ /**
25
+ * Idempotency key generation.
26
+ *
27
+ * Money operations on the runtime require a key (8–128 chars) sent both as the
28
+ * body field `idempotencyKey` and the `idempotency-key` header. Replays return
29
+ * the original result with `idempotent: true`. The SDK auto-generates one per
30
+ * money call unless the caller supplies their own.
31
+ */
32
+ /** A reasonably-unique, URL-safe key. Prefers `crypto.randomUUID` when available. */
33
+ declare function generateIdempotencyKey(prefix?: string): string;
34
+
35
+ /**
36
+ * `@clovnet/casino-sdk` — player / casino frontend SDK for the CasinoWebEngine Runtime
37
+ * Core. Framework-agnostic core; React bindings live at `@clovnet/casino-sdk/react`,
38
+ * the standalone realtime client at `@clovnet/casino-sdk/realtime`.
39
+ *
40
+ * @example
41
+ * import { createCasinoClient, formatMoney } from "@clovnet/casino-sdk";
42
+ *
43
+ * const sdk = createCasinoClient({
44
+ * baseUrl: "https://api.staging.example",
45
+ * wsUrl: "wss://api.staging.example/realtime",
46
+ * tenantId: "grandbet",
47
+ * });
48
+ *
49
+ * await sdk.auth.login({ email, password });
50
+ * const balance = await sdk.wallet.getBalance();
51
+ * formatMoney(balance.cash, balance.currency); // "€12.50"
52
+ */
53
+ /** The runtime API contract version this SDK release targets. */
54
+ declare const RUNTIME_API_VERSION: "2026-07-27";
55
+
56
+ export { type JsonSchemaProblem, RUNTIME_API_VERSION, checkJsonSchema, generateIdempotencyKey };