@livechat/developer-studio-api 3.3.5 → 3.3.7

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
@@ -6817,6 +6817,9 @@ declare const api: {
6817
6817
  token: string;
6818
6818
  }>;
6819
6819
  };
6820
+ openai: {
6821
+ verifyToken(token: string): Promise<boolean>;
6822
+ };
6820
6823
  text: {
6821
6824
  app: {
6822
6825
  monitoring: {
package/dist/index.d.ts CHANGED
@@ -6817,6 +6817,9 @@ declare const api: {
6817
6817
  token: string;
6818
6818
  }>;
6819
6819
  };
6820
+ openai: {
6821
+ verifyToken(token: string): Promise<boolean>;
6822
+ };
6820
6823
  text: {
6821
6824
  app: {
6822
6825
  monitoring: {
package/dist/index.js CHANGED
@@ -4782,6 +4782,21 @@ var bigcommerceApi = {
4782
4782
  }
4783
4783
  };
4784
4784
 
4785
+ // src/apis/integrations/openai/api.ts
4786
+ var import_axios25 = __toESM(require("axios"));
4787
+ var openaiApi = {
4788
+ verifyToken(token) {
4789
+ return __async(this, null, function* () {
4790
+ const response = yield import_axios25.default.get("https://api.openai.com/v1/models", {
4791
+ headers: {
4792
+ Authorization: `Bearer ${token}`
4793
+ }
4794
+ });
4795
+ return Boolean(response.data);
4796
+ });
4797
+ }
4798
+ };
4799
+
4785
4800
  // src/apis/integrations/api.ts
4786
4801
  var integrationsApi = {
4787
4802
  github: gitHubApi,
@@ -4793,6 +4808,7 @@ var integrationsApi = {
4793
4808
  planetscale: planetscaleApi,
4794
4809
  hubspot: hubspotApi,
4795
4810
  bigommerce: bigcommerceApi,
4811
+ openai: openaiApi,
4796
4812
  text: textApi
4797
4813
  };
4798
4814
 
@@ -8097,7 +8113,7 @@ function initApi(config, tokens) {
8097
8113
  api.isInitialized = true;
8098
8114
  }
8099
8115
 
8100
- // ../../private/utils/src/serializers/base64.ts
8116
+ // ../../../private/utils/src/serializers/base64.ts
8101
8117
  var serializerBase64 = {
8102
8118
  serialize(state) {
8103
8119
  return btoa(escape(JSON.stringify(state)));
package/dist/index.mjs CHANGED
@@ -4627,6 +4627,21 @@ var bigcommerceApi = {
4627
4627
  }
4628
4628
  };
4629
4629
 
4630
+ // src/apis/integrations/openai/api.ts
4631
+ import axios23 from "axios";
4632
+ var openaiApi = {
4633
+ verifyToken(token) {
4634
+ return __async(this, null, function* () {
4635
+ const response = yield axios23.get("https://api.openai.com/v1/models", {
4636
+ headers: {
4637
+ Authorization: `Bearer ${token}`
4638
+ }
4639
+ });
4640
+ return Boolean(response.data);
4641
+ });
4642
+ }
4643
+ };
4644
+
4630
4645
  // src/apis/integrations/api.ts
4631
4646
  var integrationsApi = {
4632
4647
  github: gitHubApi,
@@ -4638,6 +4653,7 @@ var integrationsApi = {
4638
4653
  planetscale: planetscaleApi,
4639
4654
  hubspot: hubspotApi,
4640
4655
  bigommerce: bigcommerceApi,
4656
+ openai: openaiApi,
4641
4657
  text: textApi
4642
4658
  };
4643
4659
 
@@ -7942,7 +7958,7 @@ function initApi(config, tokens) {
7942
7958
  api.isInitialized = true;
7943
7959
  }
7944
7960
 
7945
- // ../../private/utils/src/serializers/base64.ts
7961
+ // ../../../private/utils/src/serializers/base64.ts
7946
7962
  var serializerBase64 = {
7947
7963
  serialize(state) {
7948
7964
  return btoa(escape(JSON.stringify(state)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/developer-studio-api",
3
- "version": "3.3.5",
3
+ "version": "3.3.7",
4
4
  "description": "This project is API for LiveChat Developer Studio.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -20,9 +20,9 @@
20
20
  "@types/node": "^17.0.12",
21
21
  "tsup": "^7.1.0",
22
22
  "typescript": "^5.1.6",
23
- "eslint-config-custom": "0.0.9",
24
- "tsconfig": "0.0.1",
25
- "utils": "0.0.4"
23
+ "eslint-config-custom": "0.0.10",
24
+ "utils": "0.0.4",
25
+ "tsconfig": "0.0.1"
26
26
  },
27
27
  "scripts": {
28
28
  "build": "tsup",