videomail-client 13.12.6 → 13.12.8

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.12.6"
10855
+ rE: "13.12.8"
10856
10856
  };
10857
10857
  function isAudioEnabled(options) {
10858
10858
  return Boolean(options.audio.enabled);
@@ -14188,7 +14188,7 @@ var __webpack_exports__ = {};
14188
14188
  }
14189
14189
  class HTTPVideomailError extends Error {
14190
14190
  constructor(...args){
14191
- super(...args), HTTPVideomailError_define_property(this, "code", void 0), HTTPVideomailError_define_property(this, "status", void 0), HTTPVideomailError_define_property(this, "explanation", void 0);
14191
+ super(...args), HTTPVideomailError_define_property(this, "name", "VideomailError"), HTTPVideomailError_define_property(this, "code", void 0), HTTPVideomailError_define_property(this, "status", void 0), HTTPVideomailError_define_property(this, "explanation", void 0);
14192
14192
  }
14193
14193
  }
14194
14194
  const error_HTTPVideomailError = HTTPVideomailError;
@@ -14390,6 +14390,27 @@ var __webpack_exports__ = {};
14390
14390
  return videomailError;
14391
14391
  }
14392
14392
  const error_createError = createError;
14393
+ function findOriginalExc(exc) {
14394
+ if (exc instanceof Error && "response" in exc) {
14395
+ const response = exc.response;
14396
+ const body = response.body;
14397
+ if ("error" in body) {
14398
+ const message = body.error.message;
14399
+ const cause = body.error.cause;
14400
+ const error = new error_HTTPVideomailError(message, {
14401
+ cause
14402
+ });
14403
+ if (body.error.name) error.name = body.error.name;
14404
+ if (body.error.explanation) error.explanation = body.error.explanation;
14405
+ if (body.error.stack) error.stack = body.error.stack;
14406
+ if (body.error.status) error.status = body.error.status;
14407
+ if (body.error.code) error.code = body.error.code;
14408
+ return error;
14409
+ }
14410
+ }
14411
+ return exc;
14412
+ }
14413
+ const error_findOriginalExc = findOriginalExc;
14393
14414
  function _extends() {
14394
14415
  _extends = Object.assign || function(target) {
14395
14416
  for(var i = 1; i < arguments.length; i++){
@@ -14923,26 +14944,6 @@ var __webpack_exports__ = {};
14923
14944
  }
14924
14945
  return target;
14925
14946
  }
14926
- function findOriginalExc(exc) {
14927
- if (exc instanceof Error && "response" in exc) {
14928
- const response = exc.response;
14929
- const body = response.body;
14930
- if ("error" in body) {
14931
- const message = body.error.message;
14932
- const cause = body.error.cause;
14933
- const error = new error_HTTPVideomailError(message, {
14934
- cause
14935
- });
14936
- if (body.error.name) error.name = body.error.name;
14937
- if (body.error.explanation) error.explanation = body.error.explanation;
14938
- if (body.error.stack) error.stack = body.error.stack;
14939
- if (body.error.status) error.status = body.error.status;
14940
- if (body.error.code) error.code = body.error.code;
14941
- return error;
14942
- }
14943
- }
14944
- return exc;
14945
- }
14946
14947
  class Resource {
14947
14948
  applyDefaultValue(videomail, name) {
14948
14949
  if (this.options.defaults[name] && !videomail[name]) videomail[name] = this.options.defaults[name];
@@ -14971,7 +14972,7 @@ var __webpack_exports__ = {};
14971
14972
  return videomail;
14972
14973
  } catch (exc) {
14973
14974
  throw error_createError({
14974
- exc: findOriginalExc(exc),
14975
+ exc: error_findOriginalExc(exc),
14975
14976
  options: this.options
14976
14977
  });
14977
14978
  }
@@ -14984,13 +14985,19 @@ var __webpack_exports__ = {};
14984
14985
  };
14985
14986
  const path = videomail.public ? "wall" : "videomail";
14986
14987
  let url = `${this.options.apiUrl}/${path}/`;
14987
- if (method === FormMethod.PUT && videomail.key) url += videomail.key;
14988
+ if (method === FormMethod.PUT) {
14989
+ if (videomail.public) throw error_createError({
14990
+ message: "A public videomail cannot be updated.",
14991
+ options: this.options
14992
+ });
14993
+ if (videomail.key) url += videomail.key;
14994
+ }
14988
14995
  try {
14989
14996
  const request = yield client_default()(method, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(videomail).timeout(this.options.timeouts.connection);
14990
14997
  return request;
14991
14998
  } catch (exc) {
14992
14999
  throw error_createError({
14993
- exc: findOriginalExc(exc),
15000
+ exc: error_findOriginalExc(exc),
14994
15001
  options: this.options
14995
15002
  });
14996
15003
  }
@@ -15071,7 +15078,7 @@ var __webpack_exports__ = {};
15071
15078
  return res;
15072
15079
  } catch (exc) {
15073
15080
  throw error_createError({
15074
- exc: findOriginalExc(exc),
15081
+ exc: error_findOriginalExc(exc),
15075
15082
  options: this.options
15076
15083
  });
15077
15084
  }
@@ -15103,7 +15110,7 @@ var __webpack_exports__ = {};
15103
15110
  return res;
15104
15111
  } catch (exc) {
15105
15112
  throw error_createError({
15106
- exc: findOriginalExc(exc),
15113
+ exc: error_findOriginalExc(exc),
15107
15114
  options: this.options
15108
15115
  });
15109
15116
  }
@@ -19415,6 +19422,10 @@ var __webpack_exports__ = {};
19415
19422
  FIRE: {
19416
19423
  key: "fire",
19417
19424
  label: "Fire"
19425
+ },
19426
+ SAD: {
19427
+ key: "sad",
19428
+ label: "Sad"
19418
19429
  }
19419
19430
  };
19420
19431
  })();
package/dist/esm/index.js CHANGED
@@ -3613,7 +3613,7 @@ const constants = {
3613
3613
  }
3614
3614
  };
3615
3615
  var package_namespaceObject = {
3616
- rE: "13.12.6"
3616
+ rE: "13.12.8"
3617
3617
  };
3618
3618
  function isAudioEnabled(options) {
3619
3619
  return Boolean(options.audio.enabled);
@@ -3755,7 +3755,7 @@ function HTTPVideomailError_define_property(obj, key, value) {
3755
3755
  }
3756
3756
  class HTTPVideomailError extends Error {
3757
3757
  constructor(...args){
3758
- super(...args), HTTPVideomailError_define_property(this, "code", void 0), HTTPVideomailError_define_property(this, "status", void 0), HTTPVideomailError_define_property(this, "explanation", void 0);
3758
+ super(...args), HTTPVideomailError_define_property(this, "name", "VideomailError"), HTTPVideomailError_define_property(this, "code", void 0), HTTPVideomailError_define_property(this, "status", void 0), HTTPVideomailError_define_property(this, "explanation", void 0);
3759
3759
  }
3760
3760
  }
3761
3761
  const error_HTTPVideomailError = HTTPVideomailError;
@@ -3954,6 +3954,27 @@ function createError(errorParams) {
3954
3954
  return videomailError;
3955
3955
  }
3956
3956
  const error_createError = createError;
3957
+ function findOriginalExc(exc) {
3958
+ if (exc instanceof Error && "response" in exc) {
3959
+ const response = exc.response;
3960
+ const body = response.body;
3961
+ if ("error" in body) {
3962
+ const message = body.error.message;
3963
+ const cause = body.error.cause;
3964
+ const error = new error_HTTPVideomailError(message, {
3965
+ cause
3966
+ });
3967
+ if (body.error.name) error.name = body.error.name;
3968
+ if (body.error.explanation) error.explanation = body.error.explanation;
3969
+ if (body.error.stack) error.stack = body.error.stack;
3970
+ if (body.error.status) error.status = body.error.status;
3971
+ if (body.error.code) error.code = body.error.code;
3972
+ return error;
3973
+ }
3974
+ }
3975
+ return exc;
3976
+ }
3977
+ const error_findOriginalExc = findOriginalExc;
3957
3978
  function Despot_define_property(obj, key, value) {
3958
3979
  if (key in obj) Object.defineProperty(obj, key, {
3959
3980
  value: value,
@@ -4304,26 +4325,6 @@ function resource_define_property(obj, key, value) {
4304
4325
  else obj[key] = value;
4305
4326
  return obj;
4306
4327
  }
4307
- function findOriginalExc(exc) {
4308
- if (exc instanceof Error && "response" in exc) {
4309
- const response = exc.response;
4310
- const body = response.body;
4311
- if ("error" in body) {
4312
- const message = body.error.message;
4313
- const cause = body.error.cause;
4314
- const error = new error_HTTPVideomailError(message, {
4315
- cause
4316
- });
4317
- if (body.error.name) error.name = body.error.name;
4318
- if (body.error.explanation) error.explanation = body.error.explanation;
4319
- if (body.error.stack) error.stack = body.error.stack;
4320
- if (body.error.status) error.status = body.error.status;
4321
- if (body.error.code) error.code = body.error.code;
4322
- return error;
4323
- }
4324
- }
4325
- return exc;
4326
- }
4327
4328
  class Resource {
4328
4329
  applyDefaultValue(videomail, name) {
4329
4330
  if (this.options.defaults[name] && !videomail[name]) videomail[name] = this.options.defaults[name];
@@ -4353,7 +4354,7 @@ class Resource {
4353
4354
  return videomail;
4354
4355
  } catch (exc) {
4355
4356
  throw error_createError({
4356
- exc: findOriginalExc(exc),
4357
+ exc: error_findOriginalExc(exc),
4357
4358
  options: this.options
4358
4359
  });
4359
4360
  }
@@ -4364,13 +4365,19 @@ class Resource {
4364
4365
  };
4365
4366
  const path = videomail.public ? "wall" : "videomail";
4366
4367
  let url = `${this.options.apiUrl}/${path}/`;
4367
- if (method === FormMethod.PUT && videomail.key) url += videomail.key;
4368
+ if (method === FormMethod.PUT) {
4369
+ if (videomail.public) throw error_createError({
4370
+ message: "A public videomail cannot be updated.",
4371
+ options: this.options
4372
+ });
4373
+ if (videomail.key) url += videomail.key;
4374
+ }
4368
4375
  try {
4369
4376
  const request = await superagent(method, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(videomail).timeout(this.options.timeouts.connection);
4370
4377
  return request;
4371
4378
  } catch (exc) {
4372
4379
  throw error_createError({
4373
- exc: findOriginalExc(exc),
4380
+ exc: error_findOriginalExc(exc),
4374
4381
  options: this.options
4375
4382
  });
4376
4383
  }
@@ -4438,7 +4445,7 @@ class Resource {
4438
4445
  return res;
4439
4446
  } catch (exc) {
4440
4447
  throw error_createError({
4441
- exc: findOriginalExc(exc),
4448
+ exc: error_findOriginalExc(exc),
4442
4449
  options: this.options
4443
4450
  });
4444
4451
  }
@@ -4466,7 +4473,7 @@ class Resource {
4466
4473
  return res;
4467
4474
  } catch (exc) {
4468
4475
  throw error_createError({
4469
- exc: findOriginalExc(exc),
4476
+ exc: error_findOriginalExc(exc),
4470
4477
  options: this.options
4471
4478
  });
4472
4479
  }
@@ -8513,6 +8520,10 @@ const Reactions = {
8513
8520
  FIRE: {
8514
8521
  key: "fire",
8515
8522
  label: "Fire"
8523
+ },
8524
+ SAD: {
8525
+ key: "sad",
8526
+ label: "Sad"
8516
8527
  }
8517
8528
  };
8518
8529
  export { Reactions, VideoType, VideomailClient };
@@ -15,6 +15,10 @@ export declare const Reactions: {
15
15
  readonly key: "fire";
16
16
  readonly label: "Fire";
17
17
  };
18
+ readonly SAD: {
19
+ readonly key: "sad";
20
+ readonly label: "Sad";
21
+ };
18
22
  };
19
23
  export type ReactionType = (typeof Reactions)[keyof typeof Reactions];
20
24
  export type ReactionKey = ReactionType["key"];
@@ -1,4 +1,5 @@
1
1
  declare class HTTPVideomailError extends Error {
2
+ name: string;
2
3
  code?: string | undefined;
3
4
  status?: number | undefined;
4
5
  explanation?: string | undefined;
@@ -0,0 +1,2 @@
1
+ declare function findOriginalExc(exc: unknown): unknown;
2
+ export default findOriginalExc;
@@ -148,6 +148,7 @@ declare class Form extends Despot {
148
148
  applause?: readonly string[];
149
149
  grinningSweat?: readonly string[];
150
150
  fire?: readonly string[];
151
+ sad?: readonly string[];
151
152
  } | undefined;
152
153
  reactionsPretty?: {
153
154
  love?: {
@@ -174,6 +175,12 @@ declare class Form extends Despot {
174
175
  maskedEmailAddress?: string | undefined | undefined;
175
176
  } | undefined;
176
177
  };
178
+ sad?: {
179
+ [x: string]: {
180
+ nickName?: string | undefined | undefined;
181
+ maskedEmailAddress?: string | undefined | undefined;
182
+ } | undefined;
183
+ };
177
184
  } | undefined;
178
185
  commentUrl?: string | undefined | undefined;
179
186
  commentCount?: number | undefined | undefined;
@@ -325,6 +332,7 @@ declare class Form extends Despot {
325
332
  applause?: readonly string[];
326
333
  grinningSweat?: readonly string[];
327
334
  fire?: readonly string[];
335
+ sad?: readonly string[];
328
336
  } | undefined;
329
337
  reactionsPretty?: {
330
338
  love?: {
@@ -351,6 +359,12 @@ declare class Form extends Despot {
351
359
  maskedEmailAddress?: string | undefined | undefined;
352
360
  } | undefined;
353
361
  };
362
+ sad?: {
363
+ [x: string]: {
364
+ nickName?: string | undefined | undefined;
365
+ maskedEmailAddress?: string | undefined | undefined;
366
+ } | undefined;
367
+ };
354
368
  } | undefined;
355
369
  commentUrl?: string | undefined | undefined;
356
370
  commentCount?: number | undefined | undefined;
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.12.6"
10861
+ rE: "13.12.8"
10862
10862
  };
10863
10863
  function isAudioEnabled(options) {
10864
10864
  return Boolean(options.audio.enabled);
@@ -14173,6 +14173,7 @@
14173
14173
  }
14174
14174
  const util_getBrowser = getBrowser;
14175
14175
  class HTTPVideomailError extends Error {
14176
+ name = "VideomailError";
14176
14177
  code;
14177
14178
  status;
14178
14179
  explanation;
@@ -14379,6 +14380,27 @@
14379
14380
  return videomailError;
14380
14381
  }
14381
14382
  const error_createError = createError;
14383
+ function findOriginalExc(exc) {
14384
+ if (exc instanceof Error && "response" in exc) {
14385
+ const response = exc.response;
14386
+ const body = response.body;
14387
+ if ("error" in body) {
14388
+ const message = body.error.message;
14389
+ const cause = body.error.cause;
14390
+ const error = new error_HTTPVideomailError(message, {
14391
+ cause
14392
+ });
14393
+ if (body.error.name) error.name = body.error.name;
14394
+ if (body.error.explanation) error.explanation = body.error.explanation;
14395
+ if (body.error.stack) error.stack = body.error.stack;
14396
+ if (body.error.status) error.status = body.error.status;
14397
+ if (body.error.code) error.code = body.error.code;
14398
+ return error;
14399
+ }
14400
+ }
14401
+ return exc;
14402
+ }
14403
+ const error_findOriginalExc = findOriginalExc;
14382
14404
  function _extends() {
14383
14405
  _extends = Object.assign || function(target) {
14384
14406
  for(var i = 1; i < arguments.length; i++){
@@ -14816,26 +14838,6 @@
14816
14838
  }
14817
14839
  }
14818
14840
  const wrappers_form = Form;
14819
- function findOriginalExc(exc) {
14820
- if (exc instanceof Error && "response" in exc) {
14821
- const response = exc.response;
14822
- const body = response.body;
14823
- if ("error" in body) {
14824
- const message = body.error.message;
14825
- const cause = body.error.cause;
14826
- const error = new error_HTTPVideomailError(message, {
14827
- cause
14828
- });
14829
- if (body.error.name) error.name = body.error.name;
14830
- if (body.error.explanation) error.explanation = body.error.explanation;
14831
- if (body.error.stack) error.stack = body.error.stack;
14832
- if (body.error.status) error.status = body.error.status;
14833
- if (body.error.code) error.code = body.error.code;
14834
- return error;
14835
- }
14836
- }
14837
- return exc;
14838
- }
14839
14841
  class Resource {
14840
14842
  options;
14841
14843
  timezoneId;
@@ -14871,7 +14873,7 @@
14871
14873
  return videomail;
14872
14874
  } catch (exc) {
14873
14875
  throw error_createError({
14874
- exc: findOriginalExc(exc),
14876
+ exc: error_findOriginalExc(exc),
14875
14877
  options: this.options
14876
14878
  });
14877
14879
  }
@@ -14882,13 +14884,19 @@
14882
14884
  };
14883
14885
  const path = videomail.public ? "wall" : "videomail";
14884
14886
  let url = `${this.options.apiUrl}/${path}/`;
14885
- if (method === FormMethod.PUT && videomail.key) url += videomail.key;
14887
+ if (method === FormMethod.PUT) {
14888
+ if (videomail.public) throw error_createError({
14889
+ message: "A public videomail cannot be updated.",
14890
+ options: this.options
14891
+ });
14892
+ if (videomail.key) url += videomail.key;
14893
+ }
14886
14894
  try {
14887
14895
  const request = await client_default()(method, url).query(queryParams).set("Timezone-Id", this.timezoneId).withCredentials().send(videomail).timeout(this.options.timeouts.connection);
14888
14896
  return request;
14889
14897
  } catch (exc) {
14890
14898
  throw error_createError({
14891
- exc: findOriginalExc(exc),
14899
+ exc: error_findOriginalExc(exc),
14892
14900
  options: this.options
14893
14901
  });
14894
14902
  }
@@ -14956,7 +14964,7 @@
14956
14964
  return res;
14957
14965
  } catch (exc) {
14958
14966
  throw error_createError({
14959
- exc: findOriginalExc(exc),
14967
+ exc: error_findOriginalExc(exc),
14960
14968
  options: this.options
14961
14969
  });
14962
14970
  }
@@ -14984,7 +14992,7 @@
14984
14992
  return res;
14985
14993
  } catch (exc) {
14986
14994
  throw error_createError({
14987
- exc: findOriginalExc(exc),
14995
+ exc: error_findOriginalExc(exc),
14988
14996
  options: this.options
14989
14997
  });
14990
14998
  }
@@ -19036,6 +19044,10 @@
19036
19044
  FIRE: {
19037
19045
  key: "fire",
19038
19046
  label: "Fire"
19047
+ },
19048
+ SAD: {
19049
+ key: "sad",
19050
+ label: "Sad"
19039
19051
  }
19040
19052
  };
19041
19053
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "13.12.6",
3
+ "version": "13.12.8",
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",
@@ -76,11 +76,11 @@
76
76
  },
77
77
  "devDependencies": {
78
78
  "@chromatic-com/storybook": "5.1.2",
79
- "@eslint/config-inspector": "2.0.1",
79
+ "@eslint/config-inspector": "3.0.2",
80
80
  "@eslint/js": "10.0.1",
81
81
  "@rsbuild/plugin-node-polyfill": "1.4.4",
82
82
  "@rsbuild/plugin-stylus": "1.3.2",
83
- "@rsdoctor/rspack-plugin": "1.5.10",
83
+ "@rsdoctor/rspack-plugin": "1.5.11",
84
84
  "@rslib/core": "0.21.4",
85
85
  "@storybook/addon-a11y": "10.3.6",
86
86
  "@storybook/addon-docs": "10.3.6",
@@ -94,7 +94,7 @@
94
94
  "@types/ua-parser-js": "0.7.39",
95
95
  "@vitest/eslint-plugin": "1.6.17",
96
96
  "audit-ci": "7.1.0",
97
- "chromatic": "16.9.1",
97
+ "chromatic": "16.10.0",
98
98
  "cross-env": "10.1.0",
99
99
  "eslint": "10.3.0",
100
100
  "eslint-import-resolver-typescript": "4.4.4",
@@ -106,7 +106,7 @@
106
106
  "eslint-plugin-simple-import-sort": "13.0.0",
107
107
  "globals": "17.6.0",
108
108
  "jsdom": "29.1.1",
109
- "msw": "2.14.5",
109
+ "msw": "2.14.6",
110
110
  "msw-storybook-addon": "2.0.7",
111
111
  "prettier": "3.8.3",
112
112
  "prettier-plugin-curly": "0.4.1",
@@ -118,8 +118,8 @@
118
118
  "storybook-html-rsbuild": "3.3.3",
119
119
  "type-fest": "5.6.0",
120
120
  "typescript": "6.0.3",
121
- "typescript-eslint": "8.59.2",
122
- "vitest": "4.1.5"
121
+ "typescript-eslint": "8.59.3",
122
+ "vitest": "4.1.6"
123
123
  },
124
124
  "engines": {
125
125
  "node": "^24.15.0",