@scalemule/nextjs 0.1.10 → 0.1.11

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/dist/index.js CHANGED
@@ -2771,6 +2771,20 @@ var StorageService = class extends ServiceModule {
2771
2771
  async getFileStatus(fileId, options) {
2772
2772
  return this._get(`/files/${fileId}/status`, options);
2773
2773
  }
2774
+ /**
2775
+ * Read the application's active media policy. Lightweight endpoint
2776
+ * (`GET /v1/storage/policy`) used by the SDK on boot to pick up the
2777
+ * platform-default `media_policy` without requiring app-admin auth.
2778
+ *
2779
+ * @example
2780
+ * ```ts
2781
+ * const { data } = await client.storage.getPolicy();
2782
+ * console.log(data?.media_policy); // 'safe_visible'
2783
+ * ```
2784
+ */
2785
+ async getPolicy(options) {
2786
+ return this._get(`/policy`, options);
2787
+ }
2774
2788
  /**
2775
2789
  * Get a signed view URL for inline display (img src, thumbnails).
2776
2790
  * Returns CloudFront signed URL (fast, ~1us) or S3 presigned fallback.
@@ -9332,9 +9346,6 @@ function ScaleMuleMedia(props) {
9332
9346
  if (hls) hls.destroy();
9333
9347
  };
9334
9348
  }, [isVideo, src]);
9335
- if (renderOverride) {
9336
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderOverride({ src, state: renderState }) });
9337
- }
9338
9349
  if (renderState === "blocked") {
9339
9350
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderBlocked ? renderBlocked() : /* @__PURE__ */ jsxRuntime.jsx(
9340
9351
  "div",
@@ -9346,6 +9357,9 @@ function ScaleMuleMedia(props) {
9346
9357
  }
9347
9358
  ) });
9348
9359
  }
9360
+ if (renderOverride) {
9361
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderOverride({ src, state: renderState }) });
9362
+ }
9349
9363
  if (renderState === "pending" && !src) {
9350
9364
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderPlaceholder ? renderPlaceholder() : /* @__PURE__ */ jsxRuntime.jsx(
9351
9365
  "div",
package/dist/index.mjs CHANGED
@@ -2751,6 +2751,20 @@ var StorageService = class extends ServiceModule {
2751
2751
  async getFileStatus(fileId, options) {
2752
2752
  return this._get(`/files/${fileId}/status`, options);
2753
2753
  }
2754
+ /**
2755
+ * Read the application's active media policy. Lightweight endpoint
2756
+ * (`GET /v1/storage/policy`) used by the SDK on boot to pick up the
2757
+ * platform-default `media_policy` without requiring app-admin auth.
2758
+ *
2759
+ * @example
2760
+ * ```ts
2761
+ * const { data } = await client.storage.getPolicy();
2762
+ * console.log(data?.media_policy); // 'safe_visible'
2763
+ * ```
2764
+ */
2765
+ async getPolicy(options) {
2766
+ return this._get(`/policy`, options);
2767
+ }
2754
2768
  /**
2755
2769
  * Get a signed view URL for inline display (img src, thumbnails).
2756
2770
  * Returns CloudFront signed URL (fast, ~1us) or S3 presigned fallback.
@@ -9312,9 +9326,6 @@ function ScaleMuleMedia(props) {
9312
9326
  if (hls) hls.destroy();
9313
9327
  };
9314
9328
  }, [isVideo, src]);
9315
- if (renderOverride) {
9316
- return /* @__PURE__ */ jsx(Fragment, { children: renderOverride({ src, state: renderState }) });
9317
- }
9318
9329
  if (renderState === "blocked") {
9319
9330
  return /* @__PURE__ */ jsx(Fragment, { children: renderBlocked ? renderBlocked() : /* @__PURE__ */ jsx(
9320
9331
  "div",
@@ -9326,6 +9337,9 @@ function ScaleMuleMedia(props) {
9326
9337
  }
9327
9338
  ) });
9328
9339
  }
9340
+ if (renderOverride) {
9341
+ return /* @__PURE__ */ jsx(Fragment, { children: renderOverride({ src, state: renderState }) });
9342
+ }
9329
9343
  if (renderState === "pending" && !src) {
9330
9344
  return /* @__PURE__ */ jsx(Fragment, { children: renderPlaceholder ? renderPlaceholder() : /* @__PURE__ */ jsx(
9331
9345
  "div",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalemule/nextjs",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "ScaleMule SDK for Next.js applications - authentication, storage, and user management",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@scalemule/money": "^0.0.1",
57
- "@scalemule/sdk": "^0.0.43"
57
+ "@scalemule/sdk": ">=0.0.45 <0.1.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "next": ">=14.0.0",