@stigg/js-client-sdk 2.4.1 → 2.4.2

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/client.d.ts CHANGED
@@ -8,6 +8,7 @@ export interface StiggClient {
8
8
  getBooleanEntitlement: (params: GetBooleanEntitlement) => BooleanEntitlement;
9
9
  getNumericEntitlement: (params: GetNumericEntitlement) => NumericEntitlement;
10
10
  getMeteredEntitlement: (params: GetMeteredEntitlement) => MeteredEntitlement;
11
+ fetchUsageHistory: (params: FetchUsageHistory) => Promise<UsageHistoryPoint[] | undefined>;
11
12
  setCustomerId: (customerId: string, customerToken?: string | null, resourceId?: string | null) => Promise<void>;
12
13
  clearCustomer: () => void;
13
14
  setResource: (resourceId: string) => Promise<void>;
package/dist/index.js CHANGED
@@ -1123,5 +1123,5 @@ ${t.o5}`,t.T5=r.default`
1123
1123
  ${t.l3}
1124
1124
  ${t.cU}
1125
1125
  ${t.Jy}
1126
- ${t.o5}`},5821:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5695);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e){return a(e,[])}function a(e,t){switch(i(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),i=function(e){var t=e[String(r.Z)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==i){var o=i.call(e);if(o!==e)return"string"==typeof o?o:a(o,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o<n;++o)i.push(a(e[o],t));return 1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},5695:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0},5217:(e,t,n)=>{"use strict";n.d(t,{Ye:()=>o,WU:()=>a,UG:()=>s});var r=n(5695);function i(e){var t=e.prototype.toJSON;"function"==typeof t||function(e,t){if(!Boolean(0))throw new Error("Unexpected invariant triggered.")}(),e.prototype.inspect=t,r.Z&&(e.prototype[r.Z]=t)}var o=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();i(o);var a=function(){function e(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function s(e){return null!=e&&"string"==typeof e.kind}i(a)},7392:(e,t,n)=>{"use strict";function r(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,i=0,o=null,a=0;a<e.length;++a)switch(e.charCodeAt(a)){case 13:10===e.charCodeAt(a+1)&&++a;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===o||i<o)&&(o=i),r=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==n)for(var r=1;r<t.length;r++)t[r]=t[r].slice(n);for(var o=0;o<t.length&&i(t[o]);)++o;for(var a=t.length;a>o&&i(t[a-1]);)--a;return t.slice(o,a).join("\n")}function i(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a="\\"===e[e.length-1],s=!r||o||a||n,u="";return!s||r&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}n.d(t,{W7:()=>r,LZ:()=>o})},143:(e,t,n)=>{"use strict";n.d(t,{H:()=>s,T:()=>u});var r=n(9763),i=n(5821);function o(e,t){if(!Boolean(e))throw new Error(t)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||o(0,"Body must be a string. Received: ".concat((0,i.Z)(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||o(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||o(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n;return t=e,(n=[{key:r.YF,get:function(){return"Source"}}])&&a(t.prototype,n),e}();function u(e){return e instanceof s}},9763:(e,t,n)=>{"use strict";n.d(t,{YF:()=>r}),"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var r="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag"},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@stigg/js-client-sdk","version":"2.4.1","description":"Stigg client-side SDK for Browser","main":"dist/index.js","typings":"dist/index.d.ts","repository":"https://github.com/stiggio/js-client-sdk.git","license":"MIT","scripts":{"start":"webpack serve","build:types":"tsc --emitDeclarationOnly","build":"yarn build:types && webpack","build:watch":"webpack --watch","build:prod":"yarn build:types && webpack --env production","fix":"run-s fix:*","fix:prettier":"prettier \\"src/**/*.ts\\" --write","fix:lint":"eslint src --ext .ts --fix","pretty-quick":"pretty-quick --staged --pattern \'**/*.*(js|jsx|ts|tsx)\'","test":"jest --silent","test:watch":"jest --watch","test:cov":"jest --coverage","prepare":"husky install","docs":"typedoc"},"files":["dist/**/*"],"dependencies":{"@apollo/client":"^3.4.17","@sentry/browser":"^7.11.1","@stigg/api-client-js":"0.466.0","cross-fetch":"^3.1.6","fetch-retry":"^5.0.6","husky":"^7.0.4","lint-staged":"^12.0.2","lodash":"^4.17.21","tiny-typed-emitter":"^2.1.0"},"devDependencies":{"@commitlint/cli":"^14.1.0","@commitlint/config-conventional":"^14.1.0","@mswjs/interceptors":"^0.19.2","@types/jest":"^27.0.2","@types/lodash":"^4.14.177","@typescript-eslint/eslint-plugin":"^5.4.0","@typescript-eslint/parser":"^5.4.0","eslint":"^8.2.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","jest":"^27.3.1","jest-fetch-mock":"^3.0.3","msw":"^0.35.0","npm-run-all":"^4.1.5","prettier":"^2.4.1","pretty-quick":"^3.1.3","ts-jest":"^27.0.7","ts-loader":"^9.2.6","typedoc":"^0.22.13","typedoc-plugin-rename-defaults":"^0.4.0","typescript":"^4.5.3","webpack":"^5.64.1","webpack-cli":"^4.9.1","webpack-dev-server":"^4.5.0"},"publishConfig":{"access":"public"},"lint-staged":{"*.{js,jsx,ts,tsx}":["prettier --check","eslint --cache"]}}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(9418)})()}));
1126
+ ${t.o5}`},5821:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5695);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e){return a(e,[])}function a(e,t){switch(i(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),i=function(e){var t=e[String(r.Z)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==i){var o=i.call(e);if(o!==e)return"string"==typeof o?o:a(o,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,i=[],o=0;o<n;++o)i.push(a(e[o],t));return 1===r?i.push("... 1 more item"):r>1&&i.push("... ".concat(r," more items")),"["+i.join(", ")+"]"}(e,n);return function(e,t){var n=Object.keys(e);return 0===n.length?"{}":t.length>2?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var n=e.constructor.name;if("string"==typeof n&&""!==n)return n}return t}(e)+"]":"{ "+n.map((function(n){return n+": "+a(e[n],t)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},5695:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0},5217:(e,t,n)=>{"use strict";n.d(t,{Ye:()=>o,WU:()=>a,UG:()=>s});var r=n(5695);function i(e){var t=e.prototype.toJSON;"function"==typeof t||function(e,t){if(!Boolean(0))throw new Error("Unexpected invariant triggered.")}(),e.prototype.inspect=t,r.Z&&(e.prototype[r.Z]=t)}var o=function(){function e(e,t,n){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=n}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();i(o);var a=function(){function e(e,t,n,r,i,o,a){this.kind=e,this.start=t,this.end=n,this.line=r,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function s(e){return null!=e&&"string"==typeof e.kind}i(a)},7392:(e,t,n)=>{"use strict";function r(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,i=0,o=null,a=0;a<e.length;++a)switch(e.charCodeAt(a)){case 13:10===e.charCodeAt(a+1)&&++a;case 10:n=!1,r=!0,i=0;break;case 9:case 32:++i;break;default:r&&!n&&(null===o||i<o)&&(o=i),r=!1}return null!==(t=o)&&void 0!==t?t:0}(e);if(0!==n)for(var r=1;r<t.length;r++)t[r]=t[r].slice(n);for(var o=0;o<t.length&&i(t[o]);)++o;for(var a=t.length;a>o&&i(t[a-1]);)--a;return t.slice(o,a).join("\n")}function i(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a="\\"===e[e.length-1],s=!r||o||a||n,u="";return!s||r&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}n.d(t,{W7:()=>r,LZ:()=>o})},143:(e,t,n)=>{"use strict";n.d(t,{H:()=>s,T:()=>u});var r=n(9763),i=n(5821);function o(e,t){if(!Boolean(e))throw new Error(t)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s=function(){function e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||o(0,"Body must be a string. Received: ".concat((0,i.Z)(e),".")),this.body=e,this.name=t,this.locationOffset=n,this.locationOffset.line>0||o(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||o(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n;return t=e,(n=[{key:r.YF,get:function(){return"Source"}}])&&a(t.prototype,n),e}();function u(e){return e instanceof s}},9763:(e,t,n)=>{"use strict";n.d(t,{YF:()=>r}),"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var r="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag"},4147:e=>{"use strict";e.exports=JSON.parse('{"name":"@stigg/js-client-sdk","version":"2.4.2","description":"Stigg client-side SDK for Browser","main":"dist/index.js","typings":"dist/index.d.ts","repository":"https://github.com/stiggio/js-client-sdk.git","license":"MIT","scripts":{"start":"webpack serve","build:types":"tsc --emitDeclarationOnly","build":"yarn build:types && webpack","build:watch":"webpack --watch","build:prod":"yarn build:types && webpack --env production","fix":"run-s fix:*","fix:prettier":"prettier \\"src/**/*.ts\\" --write","fix:lint":"eslint src --ext .ts --fix","pretty-quick":"pretty-quick --staged --pattern \'**/*.*(js|jsx|ts|tsx)\'","test":"jest --silent","test:watch":"jest --watch","test:cov":"jest --coverage","prepare":"husky install","docs":"typedoc"},"files":["dist/**/*"],"dependencies":{"@apollo/client":"^3.4.17","@sentry/browser":"^7.11.1","@stigg/api-client-js":"0.466.0","cross-fetch":"^3.1.6","fetch-retry":"^5.0.6","husky":"^7.0.4","lint-staged":"^12.0.2","lodash":"^4.17.21","tiny-typed-emitter":"^2.1.0"},"devDependencies":{"@commitlint/cli":"^14.1.0","@commitlint/config-conventional":"^14.1.0","@mswjs/interceptors":"^0.19.2","@types/jest":"^27.0.2","@types/lodash":"^4.14.177","@typescript-eslint/eslint-plugin":"^5.4.0","@typescript-eslint/parser":"^5.4.0","eslint":"^8.2.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","jest":"^27.3.1","jest-fetch-mock":"^3.0.3","msw":"^0.35.0","npm-run-all":"^4.1.5","prettier":"^2.4.1","pretty-quick":"^3.1.3","ts-jest":"^27.0.7","ts-loader":"^9.2.6","typedoc":"^0.22.13","typedoc-plugin-rename-defaults":"^0.4.0","typescript":"^4.5.3","webpack":"^5.64.1","webpack-cli":"^4.9.1","webpack-dev-server":"^4.5.0"},"publishConfig":{"access":"public"},"lint-staged":{"*.{js,jsx,ts,tsx}":["prettier --check","eslint --cache"]}}')}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n(9418)})()}));
1127
1127
  //# sourceMappingURL=index.js.map