videomail-client 13.9.0 → 13.11.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.
@@ -10852,7 +10852,7 @@ var __webpack_exports__ = {};
10852
10852
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10853
10853
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10854
10854
  var package_namespaceObject = {
10855
- rE: "13.9.0"
10855
+ rE: "13.11.0"
10856
10856
  };
10857
10857
  function isAudioEnabled(options) {
10858
10858
  return Boolean(options.audio.enabled);
@@ -14960,11 +14960,15 @@ var __webpack_exports__ = {};
14960
14960
  newVideomail = this.applyDefaultValue(newVideomail, "body");
14961
14961
  return newVideomail;
14962
14962
  }
14963
- get(identifierName, identifierValue) {
14963
+ get(identifierName, identifierValue, identifierType) {
14964
14964
  return resource_async_to_generator(function*() {
14965
- const url = `${this.options.apiUrl}/videomail/${identifierName}/${identifierValue}/snapshot`;
14965
+ const url = `${this.options.apiUrl}/videomail/${identifierName}/${identifierValue}/${identifierType}`;
14966
14966
  try {
14967
14967
  const request = yield client_default()("get", url).type("json").set("Accept", "application/json").withCredentials().set("Timezone-Id", this.timezoneId).set(constants.WHITELIST_KEY_LABEL, this.options.whitelistKey).timeout(this.options.timeouts.connection);
14968
+ if ("thread" === identifierType) {
14969
+ const thread = request.body;
14970
+ return thread;
14971
+ }
14968
14972
  const videomail = request.body;
14969
14973
  return videomail;
14970
14974
  } catch (exc) {
@@ -14996,12 +15000,22 @@ var __webpack_exports__ = {};
14996
15000
  }
14997
15001
  getByAlias(alias) {
14998
15002
  return resource_async_to_generator(function*() {
14999
- return yield this.get("alias", alias);
15003
+ return yield this.get("alias", alias, "snapshot");
15000
15004
  }).call(this);
15001
15005
  }
15002
15006
  getByKey(key) {
15003
15007
  return resource_async_to_generator(function*() {
15004
- return yield this.get("key", key);
15008
+ return yield this.get("key", key, "snapshot");
15009
+ }).call(this);
15010
+ }
15011
+ getThreadByAlias(alias) {
15012
+ return resource_async_to_generator(function*() {
15013
+ return yield this.get("alias", alias, "thread");
15014
+ }).call(this);
15015
+ }
15016
+ getThreadByKey(key) {
15017
+ return resource_async_to_generator(function*() {
15018
+ return yield this.get("key", key, "thread");
15005
15019
  }).call(this);
15006
15020
  }
15007
15021
  reportError(err) {
@@ -19348,6 +19362,18 @@ var __webpack_exports__ = {};
19348
19362
  return yield resource.getByKey(key);
19349
19363
  }).call(this);
19350
19364
  }
19365
+ getThreadByAlias(alias) {
19366
+ return client_async_to_generator(function*() {
19367
+ const resource = new src_resource(this.options);
19368
+ return yield resource.getThreadByAlias(alias);
19369
+ }).call(this);
19370
+ }
19371
+ getThreadByKey(key) {
19372
+ return client_async_to_generator(function*() {
19373
+ const resource = new src_resource(this.options);
19374
+ return yield resource.getThreadByKey(key);
19375
+ }).call(this);
19376
+ }
19351
19377
  isDirty() {
19352
19378
  return this.container.isDirty();
19353
19379
  }
@@ -23,6 +23,8 @@ declare class VideomailClient extends Despot {
23
23
  hide(): void;
24
24
  getByAlias(alias: string): Promise<Videomail>;
25
25
  getByKey(key: string): Promise<Videomail>;
26
+ getThreadByAlias(alias: string): Promise<import("./types/thread").VideomailThread>;
27
+ getThreadByKey(key: string): Promise<import("./types/thread").VideomailThread>;
26
28
  isDirty(): boolean;
27
29
  isBuilt(): boolean;
28
30
  isRecording(): boolean;
@@ -8,6 +8,7 @@ export type { EmailAddress, EmailAddresses } from "./types/EmailAddress";
8
8
  export type { FullVideomailErrorData, VideomailErrorData } from "./types/error";
9
9
  export type { VideomailEvents } from "./types/events";
10
10
  export type * from "./types/events/params";
11
+ export type { VideomailIdentifier } from "./types/identifier";
11
12
  export type { VideomailClientOptions } from "./types/options";
12
13
  export type { ReactionKey, ReactionLabel, ReactionPrettyByUserKey, ReactionsByUserKey, ReactionsPrettyByUserKey, ReactionType, } from "./types/reaction";
13
14
  export { Reactions } from "./types/reaction";
package/dist/esm/index.js CHANGED
@@ -3613,7 +3613,7 @@ const constants = {
3613
3613
  }
3614
3614
  };
3615
3615
  var package_namespaceObject = {
3616
- rE: "13.9.0"
3616
+ rE: "13.11.0"
3617
3617
  };
3618
3618
  function isAudioEnabled(options) {
3619
3619
  return Boolean(options.audio.enabled);
@@ -4343,10 +4343,14 @@ class Resource {
4343
4343
  newVideomail = this.applyDefaultValue(newVideomail, "body");
4344
4344
  return newVideomail;
4345
4345
  }
4346
- async get(identifierName, identifierValue) {
4347
- const url = `${this.options.apiUrl}/videomail/${identifierName}/${identifierValue}/snapshot`;
4346
+ async get(identifierName, identifierValue, identifierType) {
4347
+ const url = `${this.options.apiUrl}/videomail/${identifierName}/${identifierValue}/${identifierType}`;
4348
4348
  try {
4349
4349
  const request = await superagent("get", url).type("json").set("Accept", "application/json").withCredentials().set("Timezone-Id", this.timezoneId).set(constants.WHITELIST_KEY_LABEL, this.options.whitelistKey).timeout(this.options.timeouts.connection);
4350
+ if ("thread" === identifierType) {
4351
+ const thread = request.body;
4352
+ return thread;
4353
+ }
4350
4354
  const videomail = request.body;
4351
4355
  return videomail;
4352
4356
  } catch (exc) {
@@ -4374,10 +4378,16 @@ class Resource {
4374
4378
  }
4375
4379
  }
4376
4380
  async getByAlias(alias) {
4377
- return await this.get("alias", alias);
4381
+ return await this.get("alias", alias, "snapshot");
4378
4382
  }
4379
4383
  async getByKey(key) {
4380
- return await this.get("key", key);
4384
+ return await this.get("key", key, "snapshot");
4385
+ }
4386
+ async getThreadByAlias(alias) {
4387
+ return await this.get("alias", alias, "thread");
4388
+ }
4389
+ async getThreadByKey(key) {
4390
+ return await this.get("key", key, "thread");
4381
4391
  }
4382
4392
  async reportError(err) {
4383
4393
  const queryParams = {
@@ -8454,6 +8464,14 @@ class VideomailClient extends util_Despot {
8454
8464
  const resource = new src_resource(this.options);
8455
8465
  return await resource.getByKey(key);
8456
8466
  }
8467
+ async getThreadByAlias(alias) {
8468
+ const resource = new src_resource(this.options);
8469
+ return await resource.getThreadByAlias(alias);
8470
+ }
8471
+ async getThreadByKey(key) {
8472
+ const resource = new src_resource(this.options);
8473
+ return await resource.getThreadByKey(key);
8474
+ }
8457
8475
  isDirty() {
8458
8476
  return this.container.isDirty();
8459
8477
  }
@@ -1,5 +1,6 @@
1
1
  import Response from "superagent/lib/node/response";
2
2
  import { VideomailClientOptions } from "./types/options";
3
+ import { VideomailThread } from "./types/thread";
3
4
  import { PartialVideomail, Videomail } from "./types/Videomail";
4
5
  import VideomailError from "./util/error/VideomailError";
5
6
  import { FormInputs } from "./wrappers/form";
@@ -13,6 +14,8 @@ declare class Resource {
13
14
  private write;
14
15
  getByAlias(alias: string): Promise<Videomail>;
15
16
  getByKey(key: string): Promise<Videomail>;
17
+ getThreadByAlias(alias: string): Promise<VideomailThread>;
18
+ getThreadByKey(key: string): Promise<VideomailThread>;
16
19
  reportError(err: VideomailError): Promise<void>;
17
20
  post(videomail: PartialVideomail): Promise<Response>;
18
21
  put(videomail: PartialVideomail): Promise<Response>;
@@ -34,7 +34,6 @@ export interface Videomail {
34
34
  recordingStats?: RecordingStats | undefined;
35
35
  recordLocation?: string | undefined;
36
36
  parentKey?: string | undefined;
37
- parentSnapshots?: Videomail[] | undefined;
38
37
  reactions?: ReactionsByUserKey | undefined;
39
38
  reactionsPretty?: ReactionsPrettyByUserKey | undefined;
40
39
  replyAllUrl?: string;
@@ -0,0 +1 @@
1
+ export type VideomailIdentifier = "snapshot" | "thread";
@@ -0,0 +1,2 @@
1
+ import { Videomail } from "./Videomail";
2
+ export type VideomailThread = Videomail[];
@@ -105,7 +105,6 @@ declare class Form extends Despot {
105
105
  } | undefined;
106
106
  recordLocation?: string | undefined | undefined;
107
107
  parentKey?: string | undefined | undefined;
108
- parentSnapshots?: Videomail[] | undefined | undefined;
109
108
  reactions?: {
110
109
  love?: readonly string[];
111
110
  applause?: readonly string[];
@@ -281,7 +280,6 @@ declare class Form extends Despot {
281
280
  } | undefined;
282
281
  recordLocation?: string | undefined | undefined;
283
282
  parentKey?: string | undefined | undefined;
284
- parentSnapshots?: Videomail[] | undefined | undefined;
285
283
  reactions?: {
286
284
  love?: readonly string[];
287
285
  applause?: readonly string[];
package/dist/umd/index.js CHANGED
@@ -10858,7 +10858,7 @@
10858
10858
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10859
10859
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10860
10860
  var package_namespaceObject = {
10861
- rE: "13.9.0"
10861
+ rE: "13.11.0"
10862
10862
  };
10863
10863
  function isAudioEnabled(options) {
10864
10864
  return Boolean(options.audio.enabled);
@@ -14861,10 +14861,14 @@
14861
14861
  newVideomail = this.applyDefaultValue(newVideomail, "body");
14862
14862
  return newVideomail;
14863
14863
  }
14864
- async get(identifierName, identifierValue) {
14865
- const url = `${this.options.apiUrl}/videomail/${identifierName}/${identifierValue}/snapshot`;
14864
+ async get(identifierName, identifierValue, identifierType) {
14865
+ const url = `${this.options.apiUrl}/videomail/${identifierName}/${identifierValue}/${identifierType}`;
14866
14866
  try {
14867
14867
  const request = await client_default()("get", url).type("json").set("Accept", "application/json").withCredentials().set("Timezone-Id", this.timezoneId).set(constants.WHITELIST_KEY_LABEL, this.options.whitelistKey).timeout(this.options.timeouts.connection);
14868
+ if ("thread" === identifierType) {
14869
+ const thread = request.body;
14870
+ return thread;
14871
+ }
14868
14872
  const videomail = request.body;
14869
14873
  return videomail;
14870
14874
  } catch (exc) {
@@ -14892,10 +14896,16 @@
14892
14896
  }
14893
14897
  }
14894
14898
  async getByAlias(alias) {
14895
- return await this.get("alias", alias);
14899
+ return await this.get("alias", alias, "snapshot");
14896
14900
  }
14897
14901
  async getByKey(key) {
14898
- return await this.get("key", key);
14902
+ return await this.get("key", key, "snapshot");
14903
+ }
14904
+ async getThreadByAlias(alias) {
14905
+ return await this.get("alias", alias, "thread");
14906
+ }
14907
+ async getThreadByKey(key) {
14908
+ return await this.get("key", key, "thread");
14899
14909
  }
14900
14910
  async reportError(err) {
14901
14911
  const queryParams = {
@@ -18985,6 +18995,14 @@
18985
18995
  const resource = new src_resource(this.options);
18986
18996
  return await resource.getByKey(key);
18987
18997
  }
18998
+ async getThreadByAlias(alias) {
18999
+ const resource = new src_resource(this.options);
19000
+ return await resource.getThreadByAlias(alias);
19001
+ }
19002
+ async getThreadByKey(key) {
19003
+ const resource = new src_resource(this.options);
19004
+ return await resource.getThreadByKey(key);
19005
+ }
18988
19006
  isDirty() {
18989
19007
  return this.container.isDirty();
18990
19008
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "13.9.0",
3
+ "version": "13.11.0",
4
4
  "description": "A wicked npm package to record videos directly in the browser, for Deaf and Sign Language!",
5
5
  "keywords": [
6
6
  "webcam",
@@ -106,14 +106,14 @@
106
106
  "eslint-plugin-simple-import-sort": "13.0.0",
107
107
  "globals": "17.5.0",
108
108
  "jsdom": "29.0.2",
109
- "msw": "2.13.5",
109
+ "msw": "2.13.6",
110
110
  "msw-storybook-addon": "2.0.7",
111
111
  "prettier": "3.8.3",
112
112
  "prettier-plugin-curly": "0.4.1",
113
113
  "prettier-plugin-jsdoc": "1.8.0",
114
114
  "prettier-plugin-packagejson": "3.0.2",
115
115
  "prettier-plugin-sh": "0.18.1",
116
- "release-it": "20.0.0",
116
+ "release-it": "20.0.1",
117
117
  "storybook": "10.3.5",
118
118
  "storybook-html-rsbuild": "3.3.3",
119
119
  "type-fest": "5.6.0",