@smplkit/sdk 1.3.46 → 1.3.48
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 +12 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -29
- package/dist/index.d.ts +48 -29
- package/dist/index.js +12 -15
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -17131,7 +17131,7 @@ var ConfigClient = class {
|
|
|
17131
17131
|
let data;
|
|
17132
17132
|
try {
|
|
17133
17133
|
const result = await this._http.GET("/api/v1/configs", {});
|
|
17134
|
-
if (result.
|
|
17134
|
+
if (!result.response.ok) await checkError(result.response, "Failed to list configs");
|
|
17135
17135
|
data = result.data;
|
|
17136
17136
|
} catch (err) {
|
|
17137
17137
|
wrapFetchError(err);
|
|
@@ -17145,8 +17145,7 @@ var ConfigClient = class {
|
|
|
17145
17145
|
const result = await this._http.DELETE("/api/v1/configs/{id}", {
|
|
17146
17146
|
params: { path: { id } }
|
|
17147
17147
|
});
|
|
17148
|
-
if (result.
|
|
17149
|
-
await checkError(result.response, `Failed to delete config '${id}'`);
|
|
17148
|
+
if (!result.response.ok) await checkError(result.response, `Failed to delete config '${id}'`);
|
|
17150
17149
|
} catch (err) {
|
|
17151
17150
|
wrapFetchError(err);
|
|
17152
17151
|
}
|
|
@@ -17167,7 +17166,7 @@ var ConfigClient = class {
|
|
|
17167
17166
|
let data;
|
|
17168
17167
|
try {
|
|
17169
17168
|
const result = await this._http.POST("/api/v1/configs", { body });
|
|
17170
|
-
if (result.
|
|
17169
|
+
if (!result.response.ok) await checkError(result.response, "Failed to create config");
|
|
17171
17170
|
data = result.data;
|
|
17172
17171
|
} catch (err) {
|
|
17173
17172
|
wrapFetchError(err);
|
|
@@ -17191,7 +17190,7 @@ var ConfigClient = class {
|
|
|
17191
17190
|
params: { path: { id: config.id } },
|
|
17192
17191
|
body
|
|
17193
17192
|
});
|
|
17194
|
-
if (result.
|
|
17193
|
+
if (!result.response.ok)
|
|
17195
17194
|
await checkError(result.response, `Failed to update config ${config.id}`);
|
|
17196
17195
|
data = result.data;
|
|
17197
17196
|
} catch (err) {
|
|
@@ -17207,7 +17206,7 @@ var ConfigClient = class {
|
|
|
17207
17206
|
const result = await this._http.GET("/api/v1/configs/{id}", {
|
|
17208
17207
|
params: { path: { id } }
|
|
17209
17208
|
});
|
|
17210
|
-
if (result.
|
|
17209
|
+
if (!result.response.ok)
|
|
17211
17210
|
await checkError(result.response, `Config with id '${id}' not found`);
|
|
17212
17211
|
data = result.data;
|
|
17213
17212
|
} catch (err) {
|
|
@@ -17879,8 +17878,7 @@ var FlagsClient = class {
|
|
|
17879
17878
|
const result = await this._http.GET("/api/v1/flags/{id}", {
|
|
17880
17879
|
params: { path: { id } }
|
|
17881
17880
|
});
|
|
17882
|
-
if (result.
|
|
17883
|
-
await checkError2(result.response, `Flag with id '${id}' not found`);
|
|
17881
|
+
if (!result.response.ok) await checkError2(result.response, `Flag with id '${id}' not found`);
|
|
17884
17882
|
data = result.data;
|
|
17885
17883
|
} catch (err) {
|
|
17886
17884
|
wrapFetchError2(err);
|
|
@@ -17895,7 +17893,7 @@ var FlagsClient = class {
|
|
|
17895
17893
|
let data;
|
|
17896
17894
|
try {
|
|
17897
17895
|
const result = await this._http.GET("/api/v1/flags", {});
|
|
17898
|
-
if (result.
|
|
17896
|
+
if (!result.response.ok) await checkError2(result.response, "Failed to list flags");
|
|
17899
17897
|
data = result.data;
|
|
17900
17898
|
} catch (err) {
|
|
17901
17899
|
wrapFetchError2(err);
|
|
@@ -17909,8 +17907,7 @@ var FlagsClient = class {
|
|
|
17909
17907
|
const result = await this._http.DELETE("/api/v1/flags/{id}", {
|
|
17910
17908
|
params: { path: { id } }
|
|
17911
17909
|
});
|
|
17912
|
-
if (result.
|
|
17913
|
-
await checkError2(result.response, `Failed to delete flag '${id}'`);
|
|
17910
|
+
if (!result.response.ok) await checkError2(result.response, `Failed to delete flag '${id}'`);
|
|
17914
17911
|
} catch (err) {
|
|
17915
17912
|
wrapFetchError2(err);
|
|
17916
17913
|
}
|
|
@@ -17937,7 +17934,7 @@ var FlagsClient = class {
|
|
|
17937
17934
|
let data;
|
|
17938
17935
|
try {
|
|
17939
17936
|
const result = await this._http.POST("/api/v1/flags", { body });
|
|
17940
|
-
if (result.
|
|
17937
|
+
if (!result.response.ok) await checkError2(result.response, "Failed to create flag");
|
|
17941
17938
|
data = result.data;
|
|
17942
17939
|
} catch (err) {
|
|
17943
17940
|
wrapFetchError2(err);
|
|
@@ -17966,7 +17963,7 @@ var FlagsClient = class {
|
|
|
17966
17963
|
params: { path: { id: flag.id } },
|
|
17967
17964
|
body
|
|
17968
17965
|
});
|
|
17969
|
-
if (result.
|
|
17966
|
+
if (!result.response.ok)
|
|
17970
17967
|
await checkError2(result.response, `Failed to update flag ${flag.id}`);
|
|
17971
17968
|
data = result.data;
|
|
17972
17969
|
} catch (err) {
|
|
@@ -18276,7 +18273,7 @@ var FlagsClient = class {
|
|
|
18276
18273
|
let data;
|
|
18277
18274
|
try {
|
|
18278
18275
|
const result = await this._http.GET("/api/v1/flags", {});
|
|
18279
|
-
if (result.
|
|
18276
|
+
if (!result.response.ok) await checkError2(result.response, "Failed to list flags");
|
|
18280
18277
|
data = result.data;
|
|
18281
18278
|
} catch (err) {
|
|
18282
18279
|
wrapFetchError2(err);
|
|
@@ -19046,7 +19043,7 @@ var LoggingClient = class {
|
|
|
19046
19043
|
level: attrs.level ?? null,
|
|
19047
19044
|
group: attrs.group ?? null,
|
|
19048
19045
|
managed: attrs.managed ?? false,
|
|
19049
|
-
sources:
|
|
19046
|
+
sources: [],
|
|
19050
19047
|
environments: attrs.environments ?? {},
|
|
19051
19048
|
createdAt: attrs.created_at ?? null,
|
|
19052
19049
|
updatedAt: attrs.updated_at ?? null
|