@croct/sdk 0.21.0 → 0.21.1

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/apiKey.cjs CHANGED
@@ -26,10 +26,10 @@ const _ApiKey = class _ApiKey {
26
26
  this.privateKey = privateKey;
27
27
  }
28
28
  static from(apiKey) {
29
- if (apiKey instanceof _ApiKey) {
30
- return apiKey;
29
+ if (typeof apiKey === "string") {
30
+ return _ApiKey.parse(apiKey);
31
31
  }
32
- return _ApiKey.parse(apiKey);
32
+ return apiKey;
33
33
  }
34
34
  static parse(apiKey) {
35
35
  const parts = apiKey.split(":");
package/apiKey.js CHANGED
@@ -4,10 +4,10 @@ const _ApiKey = class _ApiKey {
4
4
  this.privateKey = privateKey;
5
5
  }
6
6
  static from(apiKey) {
7
- if (apiKey instanceof _ApiKey) {
8
- return apiKey;
7
+ if (typeof apiKey === "string") {
8
+ return _ApiKey.parse(apiKey);
9
9
  }
10
- return _ApiKey.parse(apiKey);
10
+ return apiKey;
11
11
  }
12
12
  static parse(apiKey) {
13
13
  const parts = apiKey.split(":");
package/constants.cjs CHANGED
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
  const BASE_ENDPOINT_URL = "https://api.croct.io";
27
27
  const MAX_QUERY_LENGTH = parseInt("<@maxQueryLength@>", 10);
28
- const VERSION = "0.21.0";
28
+ const VERSION = "0.21.1";
29
29
  const CLIENT_LIBRARY = `Croct SDK JS v${VERSION}`;
30
30
  // Annotate the CommonJS export names for ESM import in node:
31
31
  0 && (module.exports = {
package/constants.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare const BASE_ENDPOINT_URL = "https://api.croct.io";
2
2
  declare const MAX_QUERY_LENGTH: number;
3
- declare const VERSION = "0.21.0";
4
- declare const CLIENT_LIBRARY = "Croct SDK JS v0.21.0";
3
+ declare const VERSION = "0.21.1";
4
+ declare const CLIENT_LIBRARY = "Croct SDK JS v0.21.1";
5
5
 
6
6
  export { BASE_ENDPOINT_URL, CLIENT_LIBRARY, MAX_QUERY_LENGTH, VERSION };
package/constants.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  declare const BASE_ENDPOINT_URL = "https://api.croct.io";
2
2
  declare const MAX_QUERY_LENGTH: number;
3
- declare const VERSION = "0.21.0";
4
- declare const CLIENT_LIBRARY = "Croct SDK JS v0.21.0";
3
+ declare const VERSION = "0.21.1";
4
+ declare const CLIENT_LIBRARY = "Croct SDK JS v0.21.1";
5
5
 
6
6
  export { BASE_ENDPOINT_URL, CLIENT_LIBRARY, MAX_QUERY_LENGTH, VERSION };
package/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const BASE_ENDPOINT_URL = "https://api.croct.io";
2
2
  const MAX_QUERY_LENGTH = parseInt("<@maxQueryLength@>", 10);
3
- const VERSION = "0.21.0";
3
+ const VERSION = "0.21.1";
4
4
  const CLIENT_LIBRARY = `Croct SDK JS v${VERSION}`;
5
5
  export {
6
6
  BASE_ENDPOINT_URL,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@croct/sdk",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "description": "Croct SDK for JavaScript.",
5
5
  "license": "MIT",
6
6
  "author": {