@smplkit/sdk 3.0.83 → 3.0.84
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.cjs +98 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +98 -51
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2008,7 +2008,7 @@ declare class Environment {
|
|
|
2008
2008
|
* environment. Unmanaged environments are view-only — existing values
|
|
2009
2009
|
* render for comparison but no new values can be set. Managed
|
|
2010
2010
|
* environments count toward the account's `platform.managed_environments`
|
|
2011
|
-
* quota.
|
|
2011
|
+
* quota. `production` is always managed and cannot be demoted.
|
|
2012
2012
|
*/
|
|
2013
2013
|
managed: boolean;
|
|
2014
2014
|
/** When the environment was created. */
|
|
@@ -4161,9 +4161,17 @@ declare class PinoAdapter implements LoggingAdapter {
|
|
|
4161
4161
|
/** A single error object from a JSON:API error response. */
|
|
4162
4162
|
interface ApiErrorDetail {
|
|
4163
4163
|
status?: string;
|
|
4164
|
+
/**
|
|
4165
|
+
* Application-specific machine-readable error code (e.g.
|
|
4166
|
+
* ``environment_unmanaged``). Per JSON:API §7 and ADR-014, the server
|
|
4167
|
+
* sets this on every error so callers can branch without string-matching.
|
|
4168
|
+
*/
|
|
4169
|
+
code?: string;
|
|
4164
4170
|
title?: string;
|
|
4165
4171
|
detail?: string;
|
|
4166
4172
|
source?: Record<string, unknown>;
|
|
4173
|
+
/** Additional structured context (e.g. ``{environment: "staging"}``). */
|
|
4174
|
+
meta?: Record<string, unknown>;
|
|
4167
4175
|
}
|
|
4168
4176
|
/** Base exception for all smplkit SDK errors. */
|
|
4169
4177
|
declare class SmplError extends Error {
|
package/dist/index.d.ts
CHANGED
|
@@ -2008,7 +2008,7 @@ declare class Environment {
|
|
|
2008
2008
|
* environment. Unmanaged environments are view-only — existing values
|
|
2009
2009
|
* render for comparison but no new values can be set. Managed
|
|
2010
2010
|
* environments count toward the account's `platform.managed_environments`
|
|
2011
|
-
* quota.
|
|
2011
|
+
* quota. `production` is always managed and cannot be demoted.
|
|
2012
2012
|
*/
|
|
2013
2013
|
managed: boolean;
|
|
2014
2014
|
/** When the environment was created. */
|
|
@@ -4161,9 +4161,17 @@ declare class PinoAdapter implements LoggingAdapter {
|
|
|
4161
4161
|
/** A single error object from a JSON:API error response. */
|
|
4162
4162
|
interface ApiErrorDetail {
|
|
4163
4163
|
status?: string;
|
|
4164
|
+
/**
|
|
4165
|
+
* Application-specific machine-readable error code (e.g.
|
|
4166
|
+
* ``environment_unmanaged``). Per JSON:API §7 and ADR-014, the server
|
|
4167
|
+
* sets this on every error so callers can branch without string-matching.
|
|
4168
|
+
*/
|
|
4169
|
+
code?: string;
|
|
4164
4170
|
title?: string;
|
|
4165
4171
|
detail?: string;
|
|
4166
4172
|
source?: Record<string, unknown>;
|
|
4173
|
+
/** Additional structured context (e.g. ``{environment: "staging"}``). */
|
|
4174
|
+
meta?: Record<string, unknown>;
|
|
4167
4175
|
}
|
|
4168
4176
|
/** Base exception for all smplkit SDK errors. */
|
|
4169
4177
|
declare class SmplError extends Error {
|
package/dist/index.js
CHANGED
|
@@ -16697,9 +16697,11 @@ function parseJsonApiErrors(body) {
|
|
|
16697
16697
|
if (parsed && Array.isArray(parsed.errors)) {
|
|
16698
16698
|
return parsed.errors.map((e) => ({
|
|
16699
16699
|
...e.status !== void 0 ? { status: String(e.status) } : {},
|
|
16700
|
+
...e.code !== void 0 ? { code: String(e.code) } : {},
|
|
16700
16701
|
...e.title !== void 0 ? { title: String(e.title) } : {},
|
|
16701
16702
|
...e.detail !== void 0 ? { detail: String(e.detail) } : {},
|
|
16702
|
-
...e.source !== void 0 && typeof e.source === "object" && e.source !== null ? { source: e.source } : {}
|
|
16703
|
+
...e.source !== void 0 && typeof e.source === "object" && e.source !== null ? { source: e.source } : {},
|
|
16704
|
+
...e.meta !== void 0 && typeof e.meta === "object" && e.meta !== null ? { meta: e.meta } : {}
|
|
16703
16705
|
}));
|
|
16704
16706
|
}
|
|
16705
16707
|
} catch {
|
|
@@ -18509,7 +18511,7 @@ var Environment = class {
|
|
|
18509
18511
|
* environment. Unmanaged environments are view-only — existing values
|
|
18510
18512
|
* render for comparison but no new values can be set. Managed
|
|
18511
18513
|
* environments count toward the account's `platform.managed_environments`
|
|
18512
|
-
* quota.
|
|
18514
|
+
* quota. `production` is always managed and cannot be demoted.
|
|
18513
18515
|
*/
|
|
18514
18516
|
managed;
|
|
18515
18517
|
/** When the environment was created. */
|
|
@@ -18895,8 +18897,17 @@ function wrapFetchError(err) {
|
|
|
18895
18897
|
`Request failed: ${err instanceof Error ? err.message : String(err)}`
|
|
18896
18898
|
);
|
|
18897
18899
|
}
|
|
18898
|
-
async function checkError(response) {
|
|
18899
|
-
|
|
18900
|
+
async function checkError(response, error) {
|
|
18901
|
+
let body = "";
|
|
18902
|
+
if (error !== void 0 && error !== null) {
|
|
18903
|
+
try {
|
|
18904
|
+
body = typeof error === "string" ? error : JSON.stringify(error);
|
|
18905
|
+
} catch {
|
|
18906
|
+
}
|
|
18907
|
+
}
|
|
18908
|
+
if (!body) {
|
|
18909
|
+
body = await response.text().catch(() => "");
|
|
18910
|
+
}
|
|
18900
18911
|
throwForStatus(response.status, body);
|
|
18901
18912
|
}
|
|
18902
18913
|
function buildBody(config) {
|
|
@@ -19051,7 +19062,7 @@ var ManagementConfigClient = class {
|
|
|
19051
19062
|
const result = await this._http.GET("/api/v1/configs", {
|
|
19052
19063
|
params: { query }
|
|
19053
19064
|
});
|
|
19054
|
-
if (!result.response.ok) await checkError(result.response);
|
|
19065
|
+
if (!result.response.ok) await checkError(result.response, result.error);
|
|
19055
19066
|
data = result.data;
|
|
19056
19067
|
} catch (err) {
|
|
19057
19068
|
wrapFetchError(err);
|
|
@@ -19066,7 +19077,7 @@ var ManagementConfigClient = class {
|
|
|
19066
19077
|
const result = await this._http.GET("/api/v1/configs/{id}", {
|
|
19067
19078
|
params: { path: { id } }
|
|
19068
19079
|
});
|
|
19069
|
-
if (!result.response.ok) await checkError(result.response);
|
|
19080
|
+
if (!result.response.ok) await checkError(result.response, result.error);
|
|
19070
19081
|
data = result.data;
|
|
19071
19082
|
} catch (err) {
|
|
19072
19083
|
wrapFetchError(err);
|
|
@@ -19087,7 +19098,7 @@ var ManagementConfigClient = class {
|
|
|
19087
19098
|
params: { path: { id } }
|
|
19088
19099
|
});
|
|
19089
19100
|
if (!result.response.ok && result.response.status !== 204) {
|
|
19090
|
-
await checkError(result.response);
|
|
19101
|
+
await checkError(result.response, result.error);
|
|
19091
19102
|
}
|
|
19092
19103
|
} catch (err) {
|
|
19093
19104
|
wrapFetchError(err);
|
|
@@ -19103,7 +19114,7 @@ var ManagementConfigClient = class {
|
|
|
19103
19114
|
let data;
|
|
19104
19115
|
try {
|
|
19105
19116
|
const result = await this._http.POST("/api/v1/configs", { body });
|
|
19106
|
-
if (!result.response.ok) await checkError(result.response);
|
|
19117
|
+
if (!result.response.ok) await checkError(result.response, result.error);
|
|
19107
19118
|
data = result.data;
|
|
19108
19119
|
} catch (err) {
|
|
19109
19120
|
wrapFetchError(err);
|
|
@@ -19121,7 +19132,7 @@ var ManagementConfigClient = class {
|
|
|
19121
19132
|
params: { path: { id: config.id } },
|
|
19122
19133
|
body
|
|
19123
19134
|
});
|
|
19124
|
-
if (!result.response.ok) await checkError(result.response);
|
|
19135
|
+
if (!result.response.ok) await checkError(result.response, result.error);
|
|
19125
19136
|
data = result.data;
|
|
19126
19137
|
} catch (err) {
|
|
19127
19138
|
wrapFetchError(err);
|
|
@@ -19135,8 +19146,17 @@ var ManagementConfigClient = class {
|
|
|
19135
19146
|
|
|
19136
19147
|
// src/management/flags.ts
|
|
19137
19148
|
var FLAG_REGISTRATION_FLUSH_SIZE = 50;
|
|
19138
|
-
async function checkError2(response) {
|
|
19139
|
-
|
|
19149
|
+
async function checkError2(response, error) {
|
|
19150
|
+
let body = "";
|
|
19151
|
+
if (error !== void 0 && error !== null) {
|
|
19152
|
+
try {
|
|
19153
|
+
body = typeof error === "string" ? error : JSON.stringify(error);
|
|
19154
|
+
} catch {
|
|
19155
|
+
}
|
|
19156
|
+
}
|
|
19157
|
+
if (!body) {
|
|
19158
|
+
body = await response.text().catch(() => "");
|
|
19159
|
+
}
|
|
19140
19160
|
throwForStatus(response.status, body);
|
|
19141
19161
|
}
|
|
19142
19162
|
function wrapFetchError2(err) {
|
|
@@ -19334,7 +19354,7 @@ var ManagementFlagsClient = class {
|
|
|
19334
19354
|
const result = await this._http.GET("/api/v1/flags/{id}", {
|
|
19335
19355
|
params: { path: { id } }
|
|
19336
19356
|
});
|
|
19337
|
-
if (!result.response.ok) await checkError2(result.response);
|
|
19357
|
+
if (!result.response.ok) await checkError2(result.response, result.error);
|
|
19338
19358
|
data = result.data;
|
|
19339
19359
|
} catch (err) {
|
|
19340
19360
|
wrapFetchError2(err);
|
|
@@ -19361,7 +19381,7 @@ var ManagementFlagsClient = class {
|
|
|
19361
19381
|
const result = await this._http.GET("/api/v1/flags", {
|
|
19362
19382
|
params: { query }
|
|
19363
19383
|
});
|
|
19364
|
-
if (!result.response.ok) await checkError2(result.response);
|
|
19384
|
+
if (!result.response.ok) await checkError2(result.response, result.error);
|
|
19365
19385
|
data = result.data;
|
|
19366
19386
|
} catch (err) {
|
|
19367
19387
|
wrapFetchError2(err);
|
|
@@ -19380,7 +19400,7 @@ var ManagementFlagsClient = class {
|
|
|
19380
19400
|
params: { path: { id } }
|
|
19381
19401
|
});
|
|
19382
19402
|
if (!result.response.ok && result.response.status !== 204) {
|
|
19383
|
-
await checkError2(result.response);
|
|
19403
|
+
await checkError2(result.response, result.error);
|
|
19384
19404
|
}
|
|
19385
19405
|
} catch (err) {
|
|
19386
19406
|
wrapFetchError2(err);
|
|
@@ -19425,7 +19445,7 @@ var ManagementFlagsClient = class {
|
|
|
19425
19445
|
let data;
|
|
19426
19446
|
try {
|
|
19427
19447
|
const result = await this._http.POST("/api/v1/flags", { body });
|
|
19428
|
-
if (!result.response.ok) await checkError2(result.response);
|
|
19448
|
+
if (!result.response.ok) await checkError2(result.response, result.error);
|
|
19429
19449
|
data = result.data;
|
|
19430
19450
|
} catch (err) {
|
|
19431
19451
|
wrapFetchError2(err);
|
|
@@ -19443,7 +19463,7 @@ var ManagementFlagsClient = class {
|
|
|
19443
19463
|
params: { path: { id: flag.id } },
|
|
19444
19464
|
body
|
|
19445
19465
|
});
|
|
19446
|
-
if (!result.response.ok) await checkError2(result.response);
|
|
19466
|
+
if (!result.response.ok) await checkError2(result.response, result.error);
|
|
19447
19467
|
data = result.data;
|
|
19448
19468
|
} catch (err) {
|
|
19449
19469
|
wrapFetchError2(err);
|
|
@@ -19763,8 +19783,17 @@ var LogGroup = class {
|
|
|
19763
19783
|
|
|
19764
19784
|
// src/management/logging.ts
|
|
19765
19785
|
var LOGGER_REGISTRATION_FLUSH_SIZE = 50;
|
|
19766
|
-
async function checkError3(response) {
|
|
19767
|
-
|
|
19786
|
+
async function checkError3(response, error) {
|
|
19787
|
+
let body = "";
|
|
19788
|
+
if (error !== void 0 && error !== null) {
|
|
19789
|
+
try {
|
|
19790
|
+
body = typeof error === "string" ? error : JSON.stringify(error);
|
|
19791
|
+
} catch {
|
|
19792
|
+
}
|
|
19793
|
+
}
|
|
19794
|
+
if (!body) {
|
|
19795
|
+
body = await response.text().catch(() => "");
|
|
19796
|
+
}
|
|
19768
19797
|
throwForStatus(response.status, body);
|
|
19769
19798
|
}
|
|
19770
19799
|
function wrapFetchError3(err) {
|
|
@@ -19899,7 +19928,7 @@ var LoggersClient = class {
|
|
|
19899
19928
|
const result = await this._http.GET("/api/v1/loggers", {
|
|
19900
19929
|
params: { query }
|
|
19901
19930
|
});
|
|
19902
|
-
if (!result.response.ok) await checkError3(result.response);
|
|
19931
|
+
if (!result.response.ok) await checkError3(result.response, result.error);
|
|
19903
19932
|
data = result.data;
|
|
19904
19933
|
} catch (err) {
|
|
19905
19934
|
wrapFetchError3(err);
|
|
@@ -19913,7 +19942,7 @@ var LoggersClient = class {
|
|
|
19913
19942
|
const result = await this._http.GET("/api/v1/loggers/{id}", {
|
|
19914
19943
|
params: { path: { id } }
|
|
19915
19944
|
});
|
|
19916
|
-
if (!result.response.ok) await checkError3(result.response);
|
|
19945
|
+
if (!result.response.ok) await checkError3(result.response, result.error);
|
|
19917
19946
|
data = result.data;
|
|
19918
19947
|
} catch (err) {
|
|
19919
19948
|
wrapFetchError3(err);
|
|
@@ -19933,7 +19962,7 @@ var LoggersClient = class {
|
|
|
19933
19962
|
params: { path: { id } }
|
|
19934
19963
|
});
|
|
19935
19964
|
if (!result.response.ok && result.response.status !== 204) {
|
|
19936
|
-
await checkError3(result.response);
|
|
19965
|
+
await checkError3(result.response, result.error);
|
|
19937
19966
|
}
|
|
19938
19967
|
} catch (err) {
|
|
19939
19968
|
wrapFetchError3(err);
|
|
@@ -19974,7 +20003,7 @@ var LoggersClient = class {
|
|
|
19974
20003
|
params: { path: { id: logger.id } },
|
|
19975
20004
|
body
|
|
19976
20005
|
});
|
|
19977
|
-
if (!result.response.ok) await checkError3(result.response);
|
|
20006
|
+
if (!result.response.ok) await checkError3(result.response, result.error);
|
|
19978
20007
|
data = result.data;
|
|
19979
20008
|
} catch (err) {
|
|
19980
20009
|
wrapFetchError3(err);
|
|
@@ -20017,7 +20046,7 @@ var LogGroupsClient = class {
|
|
|
20017
20046
|
const result = await this._http.GET("/api/v1/log_groups", {
|
|
20018
20047
|
params: { query }
|
|
20019
20048
|
});
|
|
20020
|
-
if (!result.response.ok) await checkError3(result.response);
|
|
20049
|
+
if (!result.response.ok) await checkError3(result.response, result.error);
|
|
20021
20050
|
data = result.data;
|
|
20022
20051
|
} catch (err) {
|
|
20023
20052
|
wrapFetchError3(err);
|
|
@@ -20031,7 +20060,7 @@ var LogGroupsClient = class {
|
|
|
20031
20060
|
const result = await this._http.GET("/api/v1/log_groups/{id}", {
|
|
20032
20061
|
params: { path: { id } }
|
|
20033
20062
|
});
|
|
20034
|
-
if (!result.response.ok) await checkError3(result.response);
|
|
20063
|
+
if (!result.response.ok) await checkError3(result.response, result.error);
|
|
20035
20064
|
data = result.data;
|
|
20036
20065
|
} catch (err) {
|
|
20037
20066
|
wrapFetchError3(err);
|
|
@@ -20051,7 +20080,7 @@ var LogGroupsClient = class {
|
|
|
20051
20080
|
params: { path: { id } }
|
|
20052
20081
|
});
|
|
20053
20082
|
if (!result.response.ok && result.response.status !== 204) {
|
|
20054
|
-
await checkError3(result.response);
|
|
20083
|
+
await checkError3(result.response, result.error);
|
|
20055
20084
|
}
|
|
20056
20085
|
} catch (err) {
|
|
20057
20086
|
wrapFetchError3(err);
|
|
@@ -20068,7 +20097,7 @@ var LogGroupsClient = class {
|
|
|
20068
20097
|
let data;
|
|
20069
20098
|
try {
|
|
20070
20099
|
const result = await this._http.POST("/api/v1/log_groups", { body });
|
|
20071
|
-
if (!result.response.ok) await checkError3(result.response);
|
|
20100
|
+
if (!result.response.ok) await checkError3(result.response, result.error);
|
|
20072
20101
|
data = result.data;
|
|
20073
20102
|
} catch (err) {
|
|
20074
20103
|
wrapFetchError3(err);
|
|
@@ -20086,7 +20115,7 @@ var LogGroupsClient = class {
|
|
|
20086
20115
|
params: { path: { id: group.id } },
|
|
20087
20116
|
body
|
|
20088
20117
|
});
|
|
20089
|
-
if (!result.response.ok) await checkError3(result.response);
|
|
20118
|
+
if (!result.response.ok) await checkError3(result.response, result.error);
|
|
20090
20119
|
data = result.data;
|
|
20091
20120
|
} catch (err) {
|
|
20092
20121
|
wrapFetchError3(err);
|
|
@@ -20235,8 +20264,17 @@ var Forwarder = class {
|
|
|
20235
20264
|
};
|
|
20236
20265
|
|
|
20237
20266
|
// src/management/audit.ts
|
|
20238
|
-
async function checkError4(response) {
|
|
20239
|
-
|
|
20267
|
+
async function checkError4(response, error) {
|
|
20268
|
+
let body = "";
|
|
20269
|
+
if (error !== void 0 && error !== null) {
|
|
20270
|
+
try {
|
|
20271
|
+
body = typeof error === "string" ? error : JSON.stringify(error);
|
|
20272
|
+
} catch {
|
|
20273
|
+
}
|
|
20274
|
+
}
|
|
20275
|
+
if (!body) {
|
|
20276
|
+
body = await response.text().catch(() => "");
|
|
20277
|
+
}
|
|
20240
20278
|
throwForStatus(response.status, body);
|
|
20241
20279
|
}
|
|
20242
20280
|
function wrapFetchError4(err) {
|
|
@@ -20392,7 +20430,7 @@ var ForwardersClient = class {
|
|
|
20392
20430
|
const result = await this._http.GET("/api/v1/forwarders", {
|
|
20393
20431
|
params: { query }
|
|
20394
20432
|
});
|
|
20395
|
-
if (!result.response.ok) await checkError4(result.response);
|
|
20433
|
+
if (!result.response.ok) await checkError4(result.response, result.error);
|
|
20396
20434
|
data = result.data;
|
|
20397
20435
|
} catch (err) {
|
|
20398
20436
|
wrapFetchError4(err);
|
|
@@ -20413,7 +20451,7 @@ var ForwardersClient = class {
|
|
|
20413
20451
|
const result = await this._http.GET("/api/v1/forwarders/{forwarder_id}", {
|
|
20414
20452
|
params: { path: { forwarder_id: forwarderId } }
|
|
20415
20453
|
});
|
|
20416
|
-
if (!result.response.ok) await checkError4(result.response);
|
|
20454
|
+
if (!result.response.ok) await checkError4(result.response, result.error);
|
|
20417
20455
|
data = result.data;
|
|
20418
20456
|
} catch (err) {
|
|
20419
20457
|
wrapFetchError4(err);
|
|
@@ -20427,7 +20465,7 @@ var ForwardersClient = class {
|
|
|
20427
20465
|
const result = await this._http.DELETE("/api/v1/forwarders/{forwarder_id}", {
|
|
20428
20466
|
params: { path: { forwarder_id: forwarderId } }
|
|
20429
20467
|
});
|
|
20430
|
-
if (result.response.status !== 204) await checkError4(result.response);
|
|
20468
|
+
if (result.response.status !== 204) await checkError4(result.response, result.error);
|
|
20431
20469
|
} catch (err) {
|
|
20432
20470
|
wrapFetchError4(err);
|
|
20433
20471
|
}
|
|
@@ -20442,7 +20480,7 @@ var ForwardersClient = class {
|
|
|
20442
20480
|
let data;
|
|
20443
20481
|
try {
|
|
20444
20482
|
const result = await this._http.POST("/api/v1/forwarders", { body });
|
|
20445
|
-
if (!result.response.ok) await checkError4(result.response);
|
|
20483
|
+
if (!result.response.ok) await checkError4(result.response, result.error);
|
|
20446
20484
|
data = result.data;
|
|
20447
20485
|
} catch (err) {
|
|
20448
20486
|
wrapFetchError4(err);
|
|
@@ -20469,7 +20507,7 @@ var ForwardersClient = class {
|
|
|
20469
20507
|
params: { path: { forwarder_id: forwarder.id } },
|
|
20470
20508
|
body
|
|
20471
20509
|
});
|
|
20472
|
-
if (!result.response.ok) await checkError4(result.response);
|
|
20510
|
+
if (!result.response.ok) await checkError4(result.response, result.error);
|
|
20473
20511
|
data = result.data;
|
|
20474
20512
|
} catch (err) {
|
|
20475
20513
|
wrapFetchError4(err);
|
|
@@ -20632,8 +20670,17 @@ function splitContextId(idOrType, key) {
|
|
|
20632
20670
|
}
|
|
20633
20671
|
return [idOrType, key];
|
|
20634
20672
|
}
|
|
20635
|
-
async function checkError5(response) {
|
|
20636
|
-
|
|
20673
|
+
async function checkError5(response, error) {
|
|
20674
|
+
let body = "";
|
|
20675
|
+
if (error !== void 0 && error !== null) {
|
|
20676
|
+
try {
|
|
20677
|
+
body = typeof error === "string" ? error : JSON.stringify(error);
|
|
20678
|
+
} catch {
|
|
20679
|
+
}
|
|
20680
|
+
}
|
|
20681
|
+
if (!body) {
|
|
20682
|
+
body = await response.text().catch(() => "");
|
|
20683
|
+
}
|
|
20637
20684
|
throwForStatus(response.status, body);
|
|
20638
20685
|
}
|
|
20639
20686
|
function wrapFetchError5(err) {
|
|
@@ -20734,7 +20781,7 @@ var EnvironmentsClient = class {
|
|
|
20734
20781
|
const result = await this._http.GET("/api/v1/environments", {
|
|
20735
20782
|
params: { query }
|
|
20736
20783
|
});
|
|
20737
|
-
if (!result.response.ok) await checkError5(result.response);
|
|
20784
|
+
if (!result.response.ok) await checkError5(result.response, result.error);
|
|
20738
20785
|
data = result.data;
|
|
20739
20786
|
} catch (err) {
|
|
20740
20787
|
wrapFetchError5(err);
|
|
@@ -20748,7 +20795,7 @@ var EnvironmentsClient = class {
|
|
|
20748
20795
|
const result = await this._http.GET("/api/v1/environments/{id}", {
|
|
20749
20796
|
params: { path: { id } }
|
|
20750
20797
|
});
|
|
20751
|
-
if (!result.response.ok) await checkError5(result.response);
|
|
20798
|
+
if (!result.response.ok) await checkError5(result.response, result.error);
|
|
20752
20799
|
data = result.data;
|
|
20753
20800
|
} catch (err) {
|
|
20754
20801
|
wrapFetchError5(err);
|
|
@@ -20763,7 +20810,7 @@ var EnvironmentsClient = class {
|
|
|
20763
20810
|
params: { path: { id } }
|
|
20764
20811
|
});
|
|
20765
20812
|
if (!result.response.ok && result.response.status !== 204) {
|
|
20766
|
-
await checkError5(result.response);
|
|
20813
|
+
await checkError5(result.response, result.error);
|
|
20767
20814
|
}
|
|
20768
20815
|
} catch (err) {
|
|
20769
20816
|
wrapFetchError5(err);
|
|
@@ -20786,7 +20833,7 @@ var EnvironmentsClient = class {
|
|
|
20786
20833
|
let data;
|
|
20787
20834
|
try {
|
|
20788
20835
|
const result = await this._http.POST("/api/v1/environments", { body });
|
|
20789
|
-
if (!result.response.ok) await checkError5(result.response);
|
|
20836
|
+
if (!result.response.ok) await checkError5(result.response, result.error);
|
|
20790
20837
|
data = result.data;
|
|
20791
20838
|
} catch (err) {
|
|
20792
20839
|
wrapFetchError5(err);
|
|
@@ -20815,7 +20862,7 @@ var EnvironmentsClient = class {
|
|
|
20815
20862
|
params: { path: { id: env.id } },
|
|
20816
20863
|
body
|
|
20817
20864
|
});
|
|
20818
|
-
if (!result.response.ok) await checkError5(result.response);
|
|
20865
|
+
if (!result.response.ok) await checkError5(result.response, result.error);
|
|
20819
20866
|
data = result.data;
|
|
20820
20867
|
} catch (err) {
|
|
20821
20868
|
wrapFetchError5(err);
|
|
@@ -20860,7 +20907,7 @@ var ContextTypesClient = class {
|
|
|
20860
20907
|
const result = await this._http.GET("/api/v1/context_types", {
|
|
20861
20908
|
params: { query }
|
|
20862
20909
|
});
|
|
20863
|
-
if (!result.response.ok) await checkError5(result.response);
|
|
20910
|
+
if (!result.response.ok) await checkError5(result.response, result.error);
|
|
20864
20911
|
data = result.data;
|
|
20865
20912
|
} catch (err) {
|
|
20866
20913
|
wrapFetchError5(err);
|
|
@@ -20874,7 +20921,7 @@ var ContextTypesClient = class {
|
|
|
20874
20921
|
const result = await this._http.GET("/api/v1/context_types/{id}", {
|
|
20875
20922
|
params: { path: { id } }
|
|
20876
20923
|
});
|
|
20877
|
-
if (!result.response.ok) await checkError5(result.response);
|
|
20924
|
+
if (!result.response.ok) await checkError5(result.response, result.error);
|
|
20878
20925
|
data = result.data;
|
|
20879
20926
|
} catch (err) {
|
|
20880
20927
|
wrapFetchError5(err);
|
|
@@ -20889,7 +20936,7 @@ var ContextTypesClient = class {
|
|
|
20889
20936
|
params: { path: { id } }
|
|
20890
20937
|
});
|
|
20891
20938
|
if (!result.response.ok && result.response.status !== 204) {
|
|
20892
|
-
await checkError5(result.response);
|
|
20939
|
+
await checkError5(result.response, result.error);
|
|
20893
20940
|
}
|
|
20894
20941
|
} catch (err) {
|
|
20895
20942
|
wrapFetchError5(err);
|
|
@@ -20910,7 +20957,7 @@ var ContextTypesClient = class {
|
|
|
20910
20957
|
let data;
|
|
20911
20958
|
try {
|
|
20912
20959
|
const result = await this._http.POST("/api/v1/context_types", { body });
|
|
20913
|
-
if (!result.response.ok) await checkError5(result.response);
|
|
20960
|
+
if (!result.response.ok) await checkError5(result.response, result.error);
|
|
20914
20961
|
data = result.data;
|
|
20915
20962
|
} catch (err) {
|
|
20916
20963
|
wrapFetchError5(err);
|
|
@@ -20937,7 +20984,7 @@ var ContextTypesClient = class {
|
|
|
20937
20984
|
params: { path: { id: ct.id } },
|
|
20938
20985
|
body
|
|
20939
20986
|
});
|
|
20940
|
-
if (!result.response.ok) await checkError5(result.response);
|
|
20987
|
+
if (!result.response.ok) await checkError5(result.response, result.error);
|
|
20941
20988
|
data = result.data;
|
|
20942
20989
|
} catch (err) {
|
|
20943
20990
|
wrapFetchError5(err);
|
|
@@ -21016,7 +21063,7 @@ var ContextsClient = class {
|
|
|
21016
21063
|
}))
|
|
21017
21064
|
}
|
|
21018
21065
|
});
|
|
21019
|
-
if (!result.response.ok) await checkError5(result.response);
|
|
21066
|
+
if (!result.response.ok) await checkError5(result.response, result.error);
|
|
21020
21067
|
} catch (err) {
|
|
21021
21068
|
wrapFetchError5(err);
|
|
21022
21069
|
}
|
|
@@ -21042,7 +21089,7 @@ var ContextsClient = class {
|
|
|
21042
21089
|
const result = await this._http.GET("/api/v1/contexts", {
|
|
21043
21090
|
params: { query }
|
|
21044
21091
|
});
|
|
21045
|
-
if (!result.response.ok) await checkError5(result.response);
|
|
21092
|
+
if (!result.response.ok) await checkError5(result.response, result.error);
|
|
21046
21093
|
data = result.data;
|
|
21047
21094
|
} catch (err) {
|
|
21048
21095
|
wrapFetchError5(err);
|
|
@@ -21059,7 +21106,7 @@ var ContextsClient = class {
|
|
|
21059
21106
|
const result = await this._http.GET("/api/v1/contexts/{id}", {
|
|
21060
21107
|
params: { path: { id: composite } }
|
|
21061
21108
|
});
|
|
21062
|
-
if (!result.response.ok) await checkError5(result.response);
|
|
21109
|
+
if (!result.response.ok) await checkError5(result.response, result.error);
|
|
21063
21110
|
data = result.data;
|
|
21064
21111
|
} catch (err) {
|
|
21065
21112
|
wrapFetchError5(err);
|
|
@@ -21077,7 +21124,7 @@ var ContextsClient = class {
|
|
|
21077
21124
|
params: { path: { id: composite } }
|
|
21078
21125
|
});
|
|
21079
21126
|
if (!result.response.ok && result.response.status !== 204) {
|
|
21080
|
-
await checkError5(result.response);
|
|
21127
|
+
await checkError5(result.response, result.error);
|
|
21081
21128
|
}
|
|
21082
21129
|
} catch (err) {
|
|
21083
21130
|
wrapFetchError5(err);
|
|
@@ -21107,7 +21154,7 @@ var ContextsClient = class {
|
|
|
21107
21154
|
params: { path: { id: ctx.id } },
|
|
21108
21155
|
body
|
|
21109
21156
|
});
|
|
21110
|
-
if (!result.response.ok) await checkError5(result.response);
|
|
21157
|
+
if (!result.response.ok) await checkError5(result.response, result.error);
|
|
21111
21158
|
data = result.data;
|
|
21112
21159
|
} catch (err) {
|
|
21113
21160
|
wrapFetchError5(err);
|