@capturly/capture-sdk 2.11.4 → 2.12.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @capturly/capture-sdk
2
2
 
3
+ ## 2.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#488](https://github.com/Corey-Alan-Consulting/capturly.app/pull/488) [`b4963e6`](https://github.com/Corey-Alan-Consulting/capturly.app/commit/b4963e699dd48f7d95057043dff86e0c036e510f) Thanks [@NX211](https://github.com/NX211)! - Stop pairing a studio's cover art with a capture request's own brand mark, and
8
+ move the two campaign notification toggles into Settings where they belong.
9
+
10
+ A capture request can set its own logo and colours; cover art has no per-request
11
+ override and is always the studio's. So a request branded for someone else — an
12
+ agency collecting for one client out of a shared studio — opened its page and
13
+ its invite under the studio's banner with the client's logo underneath: two
14
+ brands, only one of which is asking. When the mark belongs to the request, the
15
+ studio cover is no longer shown on either surface, and the mark leads.
16
+
17
+ Deciding that needs to know which level the mark came from, so `logoScope`
18
+ joins the respondent branding contract. Adding it was a compile error in the
19
+ mobile app, the capture SDK and the email decision table, which is what that
20
+ contract is for — each now records what it does with the key. The SDK surfaces
21
+ it on `CaptureRequestBranding` so an embedding host can make the same call about
22
+ its own layout; the mobile app declares it unused, having no cover art to pair.
23
+
24
+ Auto-reminders and new-video email were buttons in the header bar, which made two
25
+ pieces of persistent state look like two actions. They already PATCHed the same
26
+ endpoint the settings form uses, so they are now checkboxes in Settings and save
27
+ with everything else.
28
+
3
29
  ## 2.11.4
4
30
 
5
31
  ### Patch Changes
@@ -101,12 +101,17 @@ function isRecord(value) {
101
101
  return value !== null && typeof value === "object" && !Array.isArray(value);
102
102
  }
103
103
  var stringOrNull = (v) => typeof v === "string" ? v : null;
104
+ var LOGO_SCOPES = { org: true, studio: true, campaign: true };
105
+ function brandLogoScopeOrNull(v) {
106
+ return typeof v === "string" && v in LOGO_SCOPES ? v : null;
107
+ }
104
108
  var HANDLED_KEYS = {
105
109
  brandAccentColor: true,
106
110
  brandColor: true,
107
111
  brandSecondaryColor: true,
108
112
  coverPath: true,
109
113
  logoPath: true,
114
+ logoScope: true,
110
115
  studioName: true,
111
116
  // Served and deliberately dropped: it addresses a Capturly studio page, which
112
117
  // an embedding host has no reason to link to.
@@ -130,14 +135,16 @@ async function fetchCaptureView(args) {
130
135
  brandSecondaryColor: stringOrNull(view.branding.brandSecondaryColor),
131
136
  brandAccentColor: stringOrNull(view.branding.brandAccentColor),
132
137
  coverPath: stringOrNull(view.branding.coverPath),
133
- logoPath: stringOrNull(view.branding.logoPath)
138
+ logoPath: stringOrNull(view.branding.logoPath),
139
+ logoScope: brandLogoScopeOrNull(view.branding.logoScope)
134
140
  } : {
135
141
  studioName: "",
136
142
  brandColor: null,
137
143
  brandSecondaryColor: null,
138
144
  brandAccentColor: null,
139
145
  coverPath: null,
140
- logoPath: null
146
+ logoPath: null,
147
+ logoScope: null
141
148
  };
142
149
  if (typeof view.maxDurationSec !== "number" || view.maxDurationSec <= 0) {
143
150
  throw new CaptureError("unknown", "Capturly returned no recording time limit.");
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  isSecureTransportUrl,
6
6
  requestUpload,
7
7
  uploadBlob
8
- } from "./chunk-U6XUGPHI.js";
8
+ } from "./chunk-EH7DDMYO.js";
9
9
 
10
10
  var MP4_MIME = "video/mp4;codecs=avc1.42E01E,mp4a.40.2";
11
11
  function pickMuxStrategy() {
package/dist/transport.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  finalizeSubmission,
6
6
  requestUpload,
7
7
  uploadBlob
8
- } from "./chunk-U6XUGPHI.js";
8
+ } from "./chunk-EH7DDMYO.js";
9
9
  export {
10
10
  BRANDING_KEYS_HANDLED,
11
11
  CaptureError,
package/dist/types.d.ts CHANGED
@@ -41,6 +41,18 @@ export interface CaptureRequestBranding {
41
41
  * it without credentials.
42
42
  */
43
43
  logoPath: string | null;
44
+ /**
45
+ * Which level the mark came from: `'org'`, `'studio'`, or `'campaign'`, or
46
+ * null when there is none.
47
+ *
48
+ * `'campaign'` means this request set its own mark, which may belong to a
49
+ * different brand than the studio hosting it — an agency collecting for one
50
+ * client out of a shared studio. `coverPath` has no such override; it is
51
+ * always the studio's, so Capturly serves `coverPath: null` alongside a
52
+ * campaign-scoped mark rather than hand every host two unrelated brands.
53
+ * Layout information only — there is no rule for a host to re-apply.
54
+ */
55
+ logoScope: 'org' | 'studio' | 'campaign' | null;
44
56
  }
45
57
  /**
46
58
  * What the person is being asked, fetched with the same access the recording
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capturly/capture-sdk",
3
- "version": "2.11.4",
3
+ "version": "2.12.0",
4
4
  "description": "Record full-quality audio and video on your user's own device, from your own product.",
5
5
  "keywords": [
6
6
  "recording",
@@ -55,10 +55,10 @@
55
55
  "esbuild": "^0.25.0",
56
56
  "typescript": "^5.4.0",
57
57
  "vitest": "^4.1.7",
58
- "@capturly/eslint-config": "2.11.4",
59
- "@capturly/studios-client": "0.3.0",
60
- "@capturly/tsconfig": "2.11.4",
61
- "@capturly/recording-engine": "2.11.4"
58
+ "@capturly/eslint-config": "2.12.0",
59
+ "@capturly/recording-engine": "2.12.0",
60
+ "@capturly/studios-client": "0.4.0",
61
+ "@capturly/tsconfig": "2.12.0"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "pnpm clean && node build.mjs && tsc -p tsconfig.build.json --emitDeclarationOnly",