@livechat/developer-studio-api 2.3.45 → 2.3.46
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 +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +14 -9
- package/dist/index.mjs +14 -9
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1090,6 +1090,8 @@ interface AppPlanetScaleStorage {
|
|
|
1090
1090
|
interface AppVercelStorage {
|
|
1091
1091
|
}
|
|
1092
1092
|
interface AppNeonStorage {
|
|
1093
|
+
projectName: string;
|
|
1094
|
+
projectId: string;
|
|
1093
1095
|
}
|
|
1094
1096
|
type AppStorage = ({
|
|
1095
1097
|
provider: "planetscale";
|
|
@@ -1313,6 +1315,7 @@ interface PlatformAdapterClientInstanceAuthorization {
|
|
|
1313
1315
|
vercel?: string;
|
|
1314
1316
|
planetscale?: string;
|
|
1315
1317
|
sentry?: string;
|
|
1318
|
+
neon?: string;
|
|
1316
1319
|
}
|
|
1317
1320
|
type PlatformAdapterClientInstanceOptions = PlatformAdapterClientInstanceAuthorization & {
|
|
1318
1321
|
ensureAuthorizationToken?: {
|
|
@@ -1324,6 +1327,7 @@ type PlatformAdapterClientInstanceOptions = PlatformAdapterClientInstanceAuthori
|
|
|
1324
1327
|
vercel?: boolean;
|
|
1325
1328
|
planetscale?: boolean;
|
|
1326
1329
|
sentry?: boolean;
|
|
1330
|
+
neon?: boolean;
|
|
1327
1331
|
};
|
|
1328
1332
|
};
|
|
1329
1333
|
declare function getPlatformAdapterClientAuthorization(req: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1090,6 +1090,8 @@ interface AppPlanetScaleStorage {
|
|
|
1090
1090
|
interface AppVercelStorage {
|
|
1091
1091
|
}
|
|
1092
1092
|
interface AppNeonStorage {
|
|
1093
|
+
projectName: string;
|
|
1094
|
+
projectId: string;
|
|
1093
1095
|
}
|
|
1094
1096
|
type AppStorage = ({
|
|
1095
1097
|
provider: "planetscale";
|
|
@@ -1313,6 +1315,7 @@ interface PlatformAdapterClientInstanceAuthorization {
|
|
|
1313
1315
|
vercel?: string;
|
|
1314
1316
|
planetscale?: string;
|
|
1315
1317
|
sentry?: string;
|
|
1318
|
+
neon?: string;
|
|
1316
1319
|
}
|
|
1317
1320
|
type PlatformAdapterClientInstanceOptions = PlatformAdapterClientInstanceAuthorization & {
|
|
1318
1321
|
ensureAuthorizationToken?: {
|
|
@@ -1324,6 +1327,7 @@ type PlatformAdapterClientInstanceOptions = PlatformAdapterClientInstanceAuthori
|
|
|
1324
1327
|
vercel?: boolean;
|
|
1325
1328
|
planetscale?: boolean;
|
|
1326
1329
|
sentry?: boolean;
|
|
1330
|
+
neon?: boolean;
|
|
1327
1331
|
};
|
|
1328
1332
|
};
|
|
1329
1333
|
declare function getPlatformAdapterClientAuthorization(req: {
|
package/dist/index.js
CHANGED
|
@@ -5171,6 +5171,7 @@ function getPlatformAdapterClientAuthorization(req) {
|
|
|
5171
5171
|
netlify: req.headers["netlify-token"],
|
|
5172
5172
|
vercel: req.headers["vercel-token"],
|
|
5173
5173
|
planetscale: req.headers["planetscale-token"],
|
|
5174
|
+
neon: req.headers["neon-token"],
|
|
5174
5175
|
sentry: req.headers["sentry-token"]
|
|
5175
5176
|
};
|
|
5176
5177
|
}
|
|
@@ -5196,7 +5197,7 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
5196
5197
|
}
|
|
5197
5198
|
);
|
|
5198
5199
|
function getPlatformAdapterClientConfig(options = {}) {
|
|
5199
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
5200
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
5200
5201
|
const currentHeaders = platformAdapterClientInstance.defaults.headers;
|
|
5201
5202
|
const headers = {
|
|
5202
5203
|
platform: {
|
|
@@ -5210,28 +5211,32 @@ function getPlatformAdapterClientConfig(options = {}) {
|
|
|
5210
5211
|
netlify: (_g = currentHeaders["netlify-token"]) != null ? _g : options.netlify,
|
|
5211
5212
|
vercel: (_h = currentHeaders["vercel-token"]) != null ? _h : options.vercel,
|
|
5212
5213
|
planetscale: (_i = currentHeaders["planetscale-token"]) != null ? _i : options.planetscale,
|
|
5213
|
-
|
|
5214
|
+
neon: (_j = currentHeaders["neon-token"]) != null ? _j : options.neon,
|
|
5215
|
+
sentry: (_k = currentHeaders["sentry-token"]) != null ? _k : options.sentry
|
|
5214
5216
|
}
|
|
5215
5217
|
};
|
|
5216
5218
|
if (currentHeaders["platform-dps-token"]) {
|
|
5217
|
-
currentHeaders["X-Region"] = (
|
|
5219
|
+
currentHeaders["X-Region"] = (_l = getRegion2(currentHeaders["platform-dps-token"])) != null ? _l : void 0;
|
|
5218
5220
|
}
|
|
5219
|
-
if (((
|
|
5221
|
+
if (((_n = (_m = options.ensureAuthorizationToken) == null ? void 0 : _m.platform) == null ? void 0 : _n.dps) && !headers.platform.dps) {
|
|
5220
5222
|
throw new UnauthorizeApiError("dps");
|
|
5221
5223
|
}
|
|
5222
|
-
if (((
|
|
5224
|
+
if (((_o = options.ensureAuthorizationToken) == null ? void 0 : _o.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
|
|
5223
5225
|
throw new UnauthorizeApiError("github");
|
|
5224
5226
|
}
|
|
5225
|
-
if (((
|
|
5227
|
+
if (((_p = options.ensureAuthorizationToken) == null ? void 0 : _p.vercel) && !headers.integrations.vercel) {
|
|
5226
5228
|
throw new UnauthorizeApiError("vercel");
|
|
5227
5229
|
}
|
|
5228
|
-
if (((
|
|
5230
|
+
if (((_q = options.ensureAuthorizationToken) == null ? void 0 : _q.netlify) && !headers.integrations.netlify) {
|
|
5229
5231
|
throw new UnauthorizeApiError("netlify");
|
|
5230
5232
|
}
|
|
5231
|
-
if (((
|
|
5233
|
+
if (((_r = options.ensureAuthorizationToken) == null ? void 0 : _r.planetscale) && !headers.integrations.planetscale) {
|
|
5232
5234
|
throw new UnauthorizeApiError("planetscale");
|
|
5233
5235
|
}
|
|
5234
|
-
if (((
|
|
5236
|
+
if (((_s = options.ensureAuthorizationToken) == null ? void 0 : _s.neon) && !headers.integrations.neon) {
|
|
5237
|
+
throw new UnauthorizeApiError("neon");
|
|
5238
|
+
}
|
|
5239
|
+
if (((_t = options.ensureAuthorizationToken) == null ? void 0 : _t.sentry) && !headers.integrations.sentry) {
|
|
5235
5240
|
throw new UnauthorizeApiError("sentry");
|
|
5236
5241
|
}
|
|
5237
5242
|
return {
|
package/dist/index.mjs
CHANGED
|
@@ -5075,6 +5075,7 @@ function getPlatformAdapterClientAuthorization(req) {
|
|
|
5075
5075
|
netlify: req.headers["netlify-token"],
|
|
5076
5076
|
vercel: req.headers["vercel-token"],
|
|
5077
5077
|
planetscale: req.headers["planetscale-token"],
|
|
5078
|
+
neon: req.headers["neon-token"],
|
|
5078
5079
|
sentry: req.headers["sentry-token"]
|
|
5079
5080
|
};
|
|
5080
5081
|
}
|
|
@@ -5100,7 +5101,7 @@ platformAdapterClientInstance.interceptors.response.use(
|
|
|
5100
5101
|
}
|
|
5101
5102
|
);
|
|
5102
5103
|
function getPlatformAdapterClientConfig(options = {}) {
|
|
5103
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
5104
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
5104
5105
|
const currentHeaders = platformAdapterClientInstance.defaults.headers;
|
|
5105
5106
|
const headers = {
|
|
5106
5107
|
platform: {
|
|
@@ -5114,28 +5115,32 @@ function getPlatformAdapterClientConfig(options = {}) {
|
|
|
5114
5115
|
netlify: (_g = currentHeaders["netlify-token"]) != null ? _g : options.netlify,
|
|
5115
5116
|
vercel: (_h = currentHeaders["vercel-token"]) != null ? _h : options.vercel,
|
|
5116
5117
|
planetscale: (_i = currentHeaders["planetscale-token"]) != null ? _i : options.planetscale,
|
|
5117
|
-
|
|
5118
|
+
neon: (_j = currentHeaders["neon-token"]) != null ? _j : options.neon,
|
|
5119
|
+
sentry: (_k = currentHeaders["sentry-token"]) != null ? _k : options.sentry
|
|
5118
5120
|
}
|
|
5119
5121
|
};
|
|
5120
5122
|
if (currentHeaders["platform-dps-token"]) {
|
|
5121
|
-
currentHeaders["X-Region"] = (
|
|
5123
|
+
currentHeaders["X-Region"] = (_l = getRegion2(currentHeaders["platform-dps-token"])) != null ? _l : void 0;
|
|
5122
5124
|
}
|
|
5123
|
-
if (((
|
|
5125
|
+
if (((_n = (_m = options.ensureAuthorizationToken) == null ? void 0 : _m.platform) == null ? void 0 : _n.dps) && !headers.platform.dps) {
|
|
5124
5126
|
throw new UnauthorizeApiError("dps");
|
|
5125
5127
|
}
|
|
5126
|
-
if (((
|
|
5128
|
+
if (((_o = options.ensureAuthorizationToken) == null ? void 0 : _o.github) && (!headers.integrations.github.app || !headers.integrations.github.oauth)) {
|
|
5127
5129
|
throw new UnauthorizeApiError("github");
|
|
5128
5130
|
}
|
|
5129
|
-
if (((
|
|
5131
|
+
if (((_p = options.ensureAuthorizationToken) == null ? void 0 : _p.vercel) && !headers.integrations.vercel) {
|
|
5130
5132
|
throw new UnauthorizeApiError("vercel");
|
|
5131
5133
|
}
|
|
5132
|
-
if (((
|
|
5134
|
+
if (((_q = options.ensureAuthorizationToken) == null ? void 0 : _q.netlify) && !headers.integrations.netlify) {
|
|
5133
5135
|
throw new UnauthorizeApiError("netlify");
|
|
5134
5136
|
}
|
|
5135
|
-
if (((
|
|
5137
|
+
if (((_r = options.ensureAuthorizationToken) == null ? void 0 : _r.planetscale) && !headers.integrations.planetscale) {
|
|
5136
5138
|
throw new UnauthorizeApiError("planetscale");
|
|
5137
5139
|
}
|
|
5138
|
-
if (((
|
|
5140
|
+
if (((_s = options.ensureAuthorizationToken) == null ? void 0 : _s.neon) && !headers.integrations.neon) {
|
|
5141
|
+
throw new UnauthorizeApiError("neon");
|
|
5142
|
+
}
|
|
5143
|
+
if (((_t = options.ensureAuthorizationToken) == null ? void 0 : _t.sentry) && !headers.integrations.sentry) {
|
|
5139
5144
|
throw new UnauthorizeApiError("sentry");
|
|
5140
5145
|
}
|
|
5141
5146
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/developer-studio-api",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.46",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"tsup": "^7.1.0",
|
|
19
19
|
"typescript": "^5.1.6",
|
|
20
20
|
"config": "0.0.1",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
21
|
+
"eslint-config-custom": "0.0.2",
|
|
22
|
+
"tsconfig": "0.0.1"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|