@broadcastingplatforms/sdk 0.0.0-dev.52fbff9

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 (57) hide show
  1. package/dist/auth-CSkJb9Wc.d.mts +1180 -0
  2. package/dist/auth-CSkJb9Wc.d.ts +1180 -0
  3. package/dist/auth.d.mts +1 -0
  4. package/dist/auth.d.ts +1 -0
  5. package/dist/auth.js +456 -0
  6. package/dist/auth.mjs +433 -0
  7. package/dist/base-client-BHrP5nb_.d.ts +70 -0
  8. package/dist/base-client-BbMR6ZrV.d.mts +70 -0
  9. package/dist/browser-client.d.mts +47 -0
  10. package/dist/browser-client.d.ts +47 -0
  11. package/dist/browser-client.js +1983 -0
  12. package/dist/browser-client.mjs +1952 -0
  13. package/dist/channels.d.mts +1 -0
  14. package/dist/channels.d.ts +1 -0
  15. package/dist/channels.js +78 -0
  16. package/dist/channels.mjs +55 -0
  17. package/dist/chat.d.mts +1 -0
  18. package/dist/chat.d.ts +1 -0
  19. package/dist/chat.js +105 -0
  20. package/dist/chat.mjs +80 -0
  21. package/dist/errors.d.mts +68 -0
  22. package/dist/errors.d.ts +68 -0
  23. package/dist/errors.js +151 -0
  24. package/dist/errors.mjs +127 -0
  25. package/dist/http.d.mts +1 -0
  26. package/dist/http.d.ts +1 -0
  27. package/dist/http.js +323 -0
  28. package/dist/http.mjs +298 -0
  29. package/dist/index.d.mts +7 -0
  30. package/dist/index.d.ts +7 -0
  31. package/dist/index.js +2072 -0
  32. package/dist/index.mjs +2025 -0
  33. package/dist/realtime.d.mts +9 -0
  34. package/dist/realtime.d.ts +9 -0
  35. package/dist/realtime.js +1050 -0
  36. package/dist/realtime.mjs +1021 -0
  37. package/dist/resource.d.mts +1 -0
  38. package/dist/resource.d.ts +1 -0
  39. package/dist/resource.js +52 -0
  40. package/dist/resource.mjs +27 -0
  41. package/dist/server-client.d.mts +60 -0
  42. package/dist/server-client.d.ts +60 -0
  43. package/dist/server-client.js +1984 -0
  44. package/dist/server-client.mjs +1954 -0
  45. package/dist/storage.d.mts +149 -0
  46. package/dist/storage.d.ts +149 -0
  47. package/dist/storage.js +243 -0
  48. package/dist/storage.mjs +211 -0
  49. package/dist/streams.d.mts +1 -0
  50. package/dist/streams.d.ts +1 -0
  51. package/dist/streams.js +267 -0
  52. package/dist/streams.mjs +242 -0
  53. package/dist/types.d.mts +1 -0
  54. package/dist/types.d.ts +1 -0
  55. package/dist/types.js +19 -0
  56. package/dist/types.mjs +1 -0
  57. package/package.json +139 -0
@@ -0,0 +1 @@
1
+ export { B as BaseResource, $ as buildQueryString } from './auth-CSkJb9Wc.mjs';
@@ -0,0 +1 @@
1
+ export { B as BaseResource, $ as buildQueryString } from './auth-CSkJb9Wc.js';
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/resource.ts
21
+ var resource_exports = {};
22
+ __export(resource_exports, {
23
+ buildQueryString: () => buildQueryString
24
+ });
25
+ module.exports = __toCommonJS(resource_exports);
26
+ var buildQueryString = (params) => {
27
+ if (!params) {
28
+ return "";
29
+ }
30
+ const searchParams = new URLSearchParams();
31
+ for (const [key, value] of Object.entries(params)) {
32
+ if (Array.isArray(value)) {
33
+ for (const item of value) {
34
+ if (item === null || item === void 0) {
35
+ continue;
36
+ }
37
+ searchParams.append(`${key}[]`, String(item));
38
+ }
39
+ continue;
40
+ }
41
+ if (value === null || value === void 0) {
42
+ continue;
43
+ }
44
+ searchParams.set(key, String(value));
45
+ }
46
+ return searchParams.toString();
47
+ };
48
+ // Annotate the CommonJS export names for ESM import in node:
49
+ 0 && (module.exports = {
50
+ buildQueryString
51
+ });
52
+ //# sourceMappingURL=resource.js.map
@@ -0,0 +1,27 @@
1
+ // src/resource.ts
2
+ var buildQueryString = (params) => {
3
+ if (!params) {
4
+ return "";
5
+ }
6
+ const searchParams = new URLSearchParams();
7
+ for (const [key, value] of Object.entries(params)) {
8
+ if (Array.isArray(value)) {
9
+ for (const item of value) {
10
+ if (item === null || item === void 0) {
11
+ continue;
12
+ }
13
+ searchParams.append(`${key}[]`, String(item));
14
+ }
15
+ continue;
16
+ }
17
+ if (value === null || value === void 0) {
18
+ continue;
19
+ }
20
+ searchParams.set(key, String(value));
21
+ }
22
+ return searchParams.toString();
23
+ };
24
+ export {
25
+ buildQueryString
26
+ };
27
+ //# sourceMappingURL=resource.mjs.map
@@ -0,0 +1,60 @@
1
+ import { j as CookieAccessors, k as CookieOptions, b as AuthClientOptions, _ as RealtimeClientOverrides, h as SdkClient } from './auth-CSkJb9Wc.mjs';
2
+ import { B as BaseSdkClient } from './base-client-BbMR6ZrV.mjs';
3
+
4
+ /**
5
+ * Server client entrypoint for the SDK core package.
6
+ */
7
+
8
+ /**
9
+ * Server cookie accessors with optional defaults for prefix and options.
10
+ */
11
+ interface ServerCookieAccessors extends CookieAccessors {
12
+ /**
13
+ * Prefix applied to cookie names.
14
+ */
15
+ cookiePrefix?: string;
16
+ /**
17
+ * Cookie options to use when writing values.
18
+ */
19
+ cookieOptions?: CookieOptions;
20
+ }
21
+ /**
22
+ * Options for creating a server SDK client instance.
23
+ */
24
+ interface ServerClientFactoryOptions {
25
+ /**
26
+ * Cookie accessors supplied by the runtime (e.g. Next.js headers()).
27
+ */
28
+ cookies?: ServerCookieAccessors;
29
+ /**
30
+ * Auth configuration overrides for the client.
31
+ */
32
+ auth?: AuthClientOptions;
33
+ /**
34
+ * Default headers to apply to each request.
35
+ */
36
+ headers?: Record<string, string>;
37
+ /**
38
+ * Fetch implementation override (required on Node <22).
39
+ */
40
+ fetch?: typeof fetch;
41
+ /**
42
+ * Realtime configuration for the client (baseUrl/getToken are provided internally).
43
+ */
44
+ realtime?: RealtimeClientOverrides;
45
+ }
46
+ /**
47
+ * Server SDK client wrapper exposing HTTP and auth helpers.
48
+ */
49
+ declare class ServerClient extends BaseSdkClient implements SdkClient {
50
+ /**
51
+ * Create a server client instance.
52
+ */
53
+ constructor(baseUrl: string, keyOverride?: string | null, options?: ServerClientFactoryOptions);
54
+ }
55
+ /**
56
+ * Create a server-oriented SDK client.
57
+ */
58
+ declare const createServerClient: (baseUrl: string, keyOverride?: string | null, options?: ServerClientFactoryOptions) => SdkClient;
59
+
60
+ export { ServerClient, type ServerClientFactoryOptions, type ServerCookieAccessors, createServerClient };
@@ -0,0 +1,60 @@
1
+ import { j as CookieAccessors, k as CookieOptions, b as AuthClientOptions, _ as RealtimeClientOverrides, h as SdkClient } from './auth-CSkJb9Wc.js';
2
+ import { B as BaseSdkClient } from './base-client-BHrP5nb_.js';
3
+
4
+ /**
5
+ * Server client entrypoint for the SDK core package.
6
+ */
7
+
8
+ /**
9
+ * Server cookie accessors with optional defaults for prefix and options.
10
+ */
11
+ interface ServerCookieAccessors extends CookieAccessors {
12
+ /**
13
+ * Prefix applied to cookie names.
14
+ */
15
+ cookiePrefix?: string;
16
+ /**
17
+ * Cookie options to use when writing values.
18
+ */
19
+ cookieOptions?: CookieOptions;
20
+ }
21
+ /**
22
+ * Options for creating a server SDK client instance.
23
+ */
24
+ interface ServerClientFactoryOptions {
25
+ /**
26
+ * Cookie accessors supplied by the runtime (e.g. Next.js headers()).
27
+ */
28
+ cookies?: ServerCookieAccessors;
29
+ /**
30
+ * Auth configuration overrides for the client.
31
+ */
32
+ auth?: AuthClientOptions;
33
+ /**
34
+ * Default headers to apply to each request.
35
+ */
36
+ headers?: Record<string, string>;
37
+ /**
38
+ * Fetch implementation override (required on Node <22).
39
+ */
40
+ fetch?: typeof fetch;
41
+ /**
42
+ * Realtime configuration for the client (baseUrl/getToken are provided internally).
43
+ */
44
+ realtime?: RealtimeClientOverrides;
45
+ }
46
+ /**
47
+ * Server SDK client wrapper exposing HTTP and auth helpers.
48
+ */
49
+ declare class ServerClient extends BaseSdkClient implements SdkClient {
50
+ /**
51
+ * Create a server client instance.
52
+ */
53
+ constructor(baseUrl: string, keyOverride?: string | null, options?: ServerClientFactoryOptions);
54
+ }
55
+ /**
56
+ * Create a server-oriented SDK client.
57
+ */
58
+ declare const createServerClient: (baseUrl: string, keyOverride?: string | null, options?: ServerClientFactoryOptions) => SdkClient;
59
+
60
+ export { ServerClient, type ServerClientFactoryOptions, type ServerCookieAccessors, createServerClient };