@verdocs/js-sdk 5.0.34 → 5.0.36

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.d.mts CHANGED
@@ -297,6 +297,7 @@ interface IOrganization {
297
297
  thumbnail_url?: string | null;
298
298
  primary_color?: string | null;
299
299
  secondary_color?: string | null;
300
+ disclaimer?: string | null;
300
301
  data?: Record<string, any> | null;
301
302
  /** Creation date/time. */
302
303
  created_at: string;
package/dist/index.d.ts CHANGED
@@ -297,6 +297,7 @@ interface IOrganization {
297
297
  thumbnail_url?: string | null;
298
298
  primary_color?: string | null;
299
299
  secondary_color?: string | null;
300
+ disclaimer?: string | null;
300
301
  data?: Record<string, any> | null;
301
302
  /** Creation date/time. */
302
303
  created_at: string;
package/dist/index.js CHANGED
@@ -826,59 +826,68 @@ function getDefaultExportFromCjs (x) {
826
826
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
827
827
  }
828
828
 
829
- // This file provides a polyfill for managing globals in both NodeJS and browser environments. This is
830
- // an anti-pattern we'd hoped to avoid, but we have several projects dependending on one common library
831
- // (this js-sdk) and we want that library to provide a common endpoint to all callers (so authentication
832
- // tokens only need to be tracked in one place). The trouble is, one of those libraries is based on
833
- // StencilJS and is compiling its modules into Web Components. Because of how module resolution works,
834
- // when those Components load js-sdk they get a separate instance. Without messy options like having to
835
- // pass raw data from the caller to each Component, or pass around references to a common Endpoint, they
836
- // have no way to access authenticated sessions unless we make the Endpoint a true global.
837
- //
838
- // @credit https://github.com/medikoo/es5-ext/blob/master/global.js
839
- // @credit https://mathiasbynens.be/notes/globalthis
840
- var naiveFallback = function () {
841
- if (typeof self === 'object' && self)
842
- return self;
843
- if (typeof window === 'object' && window)
844
- return window;
845
- throw new Error('Unable to resolve global `this`');
846
- };
847
- var globalThis_1 = (function () {
848
- if (this)
849
- return this;
850
- // Unexpected strict mode (may happen if e.g. bundled into ESM module)
851
- // Fallback to standard globalThis if available
852
- if (typeof globalThis === 'object' && globalThis)
853
- return globalThis;
854
- // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
855
- // In all ES5+ engines global object inherits from Object.prototype
856
- // (if you approached one that doesn't please report)
857
- try {
858
- Object.defineProperty(Object.prototype, '__global__', {
859
- get: function () {
860
- return this;
861
- },
862
- configurable: true,
863
- });
864
- }
865
- catch (error) {
866
- // Unfortunate case of updates to Object.prototype being restricted
867
- // via preventExtensions, seal or freeze
868
- return naiveFallback();
869
- }
870
- try {
871
- // Safari case (window.__global__ works, but __global__ does not)
872
- if (!__global__)
873
- return naiveFallback();
874
- return __global__;
875
- }
876
- finally {
877
- delete Object.prototype.__global__;
878
- }
879
- })();
829
+ var globalThis_1;
830
+ var hasRequiredGlobalThis;
880
831
 
881
- var globalThis$1 = /*@__PURE__*/getDefaultExportFromCjs(globalThis_1);
832
+ function requireGlobalThis () {
833
+ if (hasRequiredGlobalThis) return globalThis_1;
834
+ hasRequiredGlobalThis = 1;
835
+ // This file provides a polyfill for managing globals in both NodeJS and browser environments. This is
836
+ // an anti-pattern we'd hoped to avoid, but we have several projects dependending on one common library
837
+ // (this js-sdk) and we want that library to provide a common endpoint to all callers (so authentication
838
+ // tokens only need to be tracked in one place). The trouble is, one of those libraries is based on
839
+ // StencilJS and is compiling its modules into Web Components. Because of how module resolution works,
840
+ // when those Components load js-sdk they get a separate instance. Without messy options like having to
841
+ // pass raw data from the caller to each Component, or pass around references to a common Endpoint, they
842
+ // have no way to access authenticated sessions unless we make the Endpoint a true global.
843
+ //
844
+ // @credit https://github.com/medikoo/es5-ext/blob/master/global.js
845
+ // @credit https://mathiasbynens.be/notes/globalthis
846
+ var naiveFallback = function () {
847
+ if (typeof self === 'object' && self)
848
+ return self;
849
+ if (typeof window === 'object' && window)
850
+ return window;
851
+ throw new Error('Unable to resolve global `this`');
852
+ };
853
+ globalThis_1 = (function () {
854
+ if (this)
855
+ return this;
856
+ // Unexpected strict mode (may happen if e.g. bundled into ESM module)
857
+ // Fallback to standard globalThis if available
858
+ if (typeof globalThis === 'object' && globalThis)
859
+ return globalThis;
860
+ // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
861
+ // In all ES5+ engines global object inherits from Object.prototype
862
+ // (if you approached one that doesn't please report)
863
+ try {
864
+ Object.defineProperty(Object.prototype, '__global__', {
865
+ get: function () {
866
+ return this;
867
+ },
868
+ configurable: true,
869
+ });
870
+ }
871
+ catch (error) {
872
+ // Unfortunate case of updates to Object.prototype being restricted
873
+ // via preventExtensions, seal or freeze
874
+ return naiveFallback();
875
+ }
876
+ try {
877
+ // Safari case (window.__global__ works, but __global__ does not)
878
+ if (!__global__)
879
+ return naiveFallback();
880
+ return __global__;
881
+ }
882
+ finally {
883
+ delete Object.prototype.__global__;
884
+ }
885
+ })();
886
+ return globalThis_1;
887
+ }
888
+
889
+ var globalThisExports = requireGlobalThis();
890
+ var globalThis$1 = /*@__PURE__*/getDefaultExportFromCjs(globalThisExports);
882
891
 
883
892
  /**
884
893
  * Authenticate to Verdocs.
@@ -2864,9 +2873,6 @@ const canPerformTemplateAction = (profile, action, template) => {
2864
2873
  // were undefined, they would actually match.
2865
2874
  const profile_id = profile?.id || 'BOGUS';
2866
2875
  const organization_id = profile?.organization_id || 'BOGUS';
2867
- if (!profile_id) {
2868
- return { canPerform: false, message: 'Active session required' };
2869
- }
2870
2876
  const isCreator = template?.profile_id === profile_id;
2871
2877
  const isSameOrg = template?.organization_id === organization_id;
2872
2878
  const isPersonal = template?.is_personal ?? false;