@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.d.cts
CHANGED
|
@@ -329,11 +329,8 @@ interface components {
|
|
|
329
329
|
* @description Human-readable display name
|
|
330
330
|
*/
|
|
331
331
|
name: string;
|
|
332
|
-
/**
|
|
333
|
-
|
|
334
|
-
* @default
|
|
335
|
-
*/
|
|
336
|
-
description: string;
|
|
332
|
+
/** Description */
|
|
333
|
+
description?: string | null;
|
|
337
334
|
/**
|
|
338
335
|
* Type
|
|
339
336
|
* @description Value type: STRING, BOOLEAN, NUMERIC, or JSON
|
|
@@ -413,7 +410,7 @@ interface components {
|
|
|
413
410
|
* }
|
|
414
411
|
* ]
|
|
415
412
|
* },
|
|
416
|
-
* "id": "
|
|
413
|
+
* "id": "dark-mode",
|
|
417
414
|
* "type": "flag"
|
|
418
415
|
* }
|
|
419
416
|
*/
|
|
@@ -449,34 +446,56 @@ interface components {
|
|
|
449
446
|
/** Value */
|
|
450
447
|
value: unknown;
|
|
451
448
|
};
|
|
452
|
-
/**
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
|
|
449
|
+
/** UsageAttributes */
|
|
450
|
+
UsageAttributes: {
|
|
451
|
+
/** Limit Key */
|
|
452
|
+
limit_key: string;
|
|
453
|
+
/** Period */
|
|
454
|
+
period: string;
|
|
455
|
+
/** Value */
|
|
456
|
+
value: number;
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* UsageListResponse
|
|
460
|
+
* @example {
|
|
461
|
+
* "data": [
|
|
462
|
+
* {
|
|
463
|
+
* "attributes": {
|
|
464
|
+
* "limit_key": "flags.items",
|
|
465
|
+
* "period": "current",
|
|
466
|
+
* "value": 5
|
|
467
|
+
* },
|
|
468
|
+
* "id": "550e8400-e29b-41d4-a716-446655440000",
|
|
469
|
+
* "type": "usage"
|
|
470
|
+
* }
|
|
471
|
+
* ]
|
|
472
|
+
* }
|
|
473
|
+
*/
|
|
474
|
+
UsageListResponse: {
|
|
475
|
+
/** Data */
|
|
476
|
+
data: components["schemas"]["UsageResource"][];
|
|
456
477
|
};
|
|
457
|
-
/**
|
|
458
|
-
|
|
478
|
+
/**
|
|
479
|
+
* UsageResource
|
|
480
|
+
* @example {
|
|
481
|
+
* "attributes": {
|
|
482
|
+
* "limit_key": "flags.items",
|
|
483
|
+
* "period": "current",
|
|
484
|
+
* "value": 5
|
|
485
|
+
* },
|
|
486
|
+
* "id": "550e8400-e29b-41d4-a716-446655440000",
|
|
487
|
+
* "type": "usage"
|
|
488
|
+
* }
|
|
489
|
+
*/
|
|
490
|
+
UsageResource: {
|
|
459
491
|
/** Id */
|
|
460
|
-
id
|
|
492
|
+
id: string;
|
|
461
493
|
/**
|
|
462
494
|
* Type
|
|
463
|
-
* @
|
|
495
|
+
* @constant
|
|
464
496
|
*/
|
|
465
|
-
type:
|
|
466
|
-
attributes: components["schemas"]["
|
|
467
|
-
};
|
|
468
|
-
/** Response[Flag] */
|
|
469
|
-
Response_Flag_: {
|
|
470
|
-
data: components["schemas"]["Resource_Flag_"];
|
|
471
|
-
};
|
|
472
|
-
/** ValidationError */
|
|
473
|
-
ValidationError: {
|
|
474
|
-
/** Location */
|
|
475
|
-
loc: (string | number)[];
|
|
476
|
-
/** Message */
|
|
477
|
-
msg: string;
|
|
478
|
-
/** Error Type */
|
|
479
|
-
type: string;
|
|
497
|
+
type: "usage";
|
|
498
|
+
attributes: components["schemas"]["UsageAttributes"];
|
|
480
499
|
};
|
|
481
500
|
};
|
|
482
501
|
responses: never;
|
package/dist/index.d.ts
CHANGED
|
@@ -329,11 +329,8 @@ interface components {
|
|
|
329
329
|
* @description Human-readable display name
|
|
330
330
|
*/
|
|
331
331
|
name: string;
|
|
332
|
-
/**
|
|
333
|
-
|
|
334
|
-
* @default
|
|
335
|
-
*/
|
|
336
|
-
description: string;
|
|
332
|
+
/** Description */
|
|
333
|
+
description?: string | null;
|
|
337
334
|
/**
|
|
338
335
|
* Type
|
|
339
336
|
* @description Value type: STRING, BOOLEAN, NUMERIC, or JSON
|
|
@@ -413,7 +410,7 @@ interface components {
|
|
|
413
410
|
* }
|
|
414
411
|
* ]
|
|
415
412
|
* },
|
|
416
|
-
* "id": "
|
|
413
|
+
* "id": "dark-mode",
|
|
417
414
|
* "type": "flag"
|
|
418
415
|
* }
|
|
419
416
|
*/
|
|
@@ -449,34 +446,56 @@ interface components {
|
|
|
449
446
|
/** Value */
|
|
450
447
|
value: unknown;
|
|
451
448
|
};
|
|
452
|
-
/**
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
|
|
449
|
+
/** UsageAttributes */
|
|
450
|
+
UsageAttributes: {
|
|
451
|
+
/** Limit Key */
|
|
452
|
+
limit_key: string;
|
|
453
|
+
/** Period */
|
|
454
|
+
period: string;
|
|
455
|
+
/** Value */
|
|
456
|
+
value: number;
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* UsageListResponse
|
|
460
|
+
* @example {
|
|
461
|
+
* "data": [
|
|
462
|
+
* {
|
|
463
|
+
* "attributes": {
|
|
464
|
+
* "limit_key": "flags.items",
|
|
465
|
+
* "period": "current",
|
|
466
|
+
* "value": 5
|
|
467
|
+
* },
|
|
468
|
+
* "id": "550e8400-e29b-41d4-a716-446655440000",
|
|
469
|
+
* "type": "usage"
|
|
470
|
+
* }
|
|
471
|
+
* ]
|
|
472
|
+
* }
|
|
473
|
+
*/
|
|
474
|
+
UsageListResponse: {
|
|
475
|
+
/** Data */
|
|
476
|
+
data: components["schemas"]["UsageResource"][];
|
|
456
477
|
};
|
|
457
|
-
/**
|
|
458
|
-
|
|
478
|
+
/**
|
|
479
|
+
* UsageResource
|
|
480
|
+
* @example {
|
|
481
|
+
* "attributes": {
|
|
482
|
+
* "limit_key": "flags.items",
|
|
483
|
+
* "period": "current",
|
|
484
|
+
* "value": 5
|
|
485
|
+
* },
|
|
486
|
+
* "id": "550e8400-e29b-41d4-a716-446655440000",
|
|
487
|
+
* "type": "usage"
|
|
488
|
+
* }
|
|
489
|
+
*/
|
|
490
|
+
UsageResource: {
|
|
459
491
|
/** Id */
|
|
460
|
-
id
|
|
492
|
+
id: string;
|
|
461
493
|
/**
|
|
462
494
|
* Type
|
|
463
|
-
* @
|
|
495
|
+
* @constant
|
|
464
496
|
*/
|
|
465
|
-
type:
|
|
466
|
-
attributes: components["schemas"]["
|
|
467
|
-
};
|
|
468
|
-
/** Response[Flag] */
|
|
469
|
-
Response_Flag_: {
|
|
470
|
-
data: components["schemas"]["Resource_Flag_"];
|
|
471
|
-
};
|
|
472
|
-
/** ValidationError */
|
|
473
|
-
ValidationError: {
|
|
474
|
-
/** Location */
|
|
475
|
-
loc: (string | number)[];
|
|
476
|
-
/** Message */
|
|
477
|
-
msg: string;
|
|
478
|
-
/** Error Type */
|
|
479
|
-
type: string;
|
|
497
|
+
type: "usage";
|
|
498
|
+
attributes: components["schemas"]["UsageAttributes"];
|
|
480
499
|
};
|
|
481
500
|
};
|
|
482
501
|
responses: never;
|
package/dist/index.js
CHANGED
|
@@ -17090,7 +17090,7 @@ var ConfigClient = class {
|
|
|
17090
17090
|
let data;
|
|
17091
17091
|
try {
|
|
17092
17092
|
const result = await this._http.GET("/api/v1/configs", {});
|
|
17093
|
-
if (result.
|
|
17093
|
+
if (!result.response.ok) await checkError(result.response, "Failed to list configs");
|
|
17094
17094
|
data = result.data;
|
|
17095
17095
|
} catch (err) {
|
|
17096
17096
|
wrapFetchError(err);
|
|
@@ -17104,8 +17104,7 @@ var ConfigClient = class {
|
|
|
17104
17104
|
const result = await this._http.DELETE("/api/v1/configs/{id}", {
|
|
17105
17105
|
params: { path: { id } }
|
|
17106
17106
|
});
|
|
17107
|
-
if (result.
|
|
17108
|
-
await checkError(result.response, `Failed to delete config '${id}'`);
|
|
17107
|
+
if (!result.response.ok) await checkError(result.response, `Failed to delete config '${id}'`);
|
|
17109
17108
|
} catch (err) {
|
|
17110
17109
|
wrapFetchError(err);
|
|
17111
17110
|
}
|
|
@@ -17126,7 +17125,7 @@ var ConfigClient = class {
|
|
|
17126
17125
|
let data;
|
|
17127
17126
|
try {
|
|
17128
17127
|
const result = await this._http.POST("/api/v1/configs", { body });
|
|
17129
|
-
if (result.
|
|
17128
|
+
if (!result.response.ok) await checkError(result.response, "Failed to create config");
|
|
17130
17129
|
data = result.data;
|
|
17131
17130
|
} catch (err) {
|
|
17132
17131
|
wrapFetchError(err);
|
|
@@ -17150,7 +17149,7 @@ var ConfigClient = class {
|
|
|
17150
17149
|
params: { path: { id: config.id } },
|
|
17151
17150
|
body
|
|
17152
17151
|
});
|
|
17153
|
-
if (result.
|
|
17152
|
+
if (!result.response.ok)
|
|
17154
17153
|
await checkError(result.response, `Failed to update config ${config.id}`);
|
|
17155
17154
|
data = result.data;
|
|
17156
17155
|
} catch (err) {
|
|
@@ -17166,7 +17165,7 @@ var ConfigClient = class {
|
|
|
17166
17165
|
const result = await this._http.GET("/api/v1/configs/{id}", {
|
|
17167
17166
|
params: { path: { id } }
|
|
17168
17167
|
});
|
|
17169
|
-
if (result.
|
|
17168
|
+
if (!result.response.ok)
|
|
17170
17169
|
await checkError(result.response, `Config with id '${id}' not found`);
|
|
17171
17170
|
data = result.data;
|
|
17172
17171
|
} catch (err) {
|
|
@@ -17838,8 +17837,7 @@ var FlagsClient = class {
|
|
|
17838
17837
|
const result = await this._http.GET("/api/v1/flags/{id}", {
|
|
17839
17838
|
params: { path: { id } }
|
|
17840
17839
|
});
|
|
17841
|
-
if (result.
|
|
17842
|
-
await checkError2(result.response, `Flag with id '${id}' not found`);
|
|
17840
|
+
if (!result.response.ok) await checkError2(result.response, `Flag with id '${id}' not found`);
|
|
17843
17841
|
data = result.data;
|
|
17844
17842
|
} catch (err) {
|
|
17845
17843
|
wrapFetchError2(err);
|
|
@@ -17854,7 +17852,7 @@ var FlagsClient = class {
|
|
|
17854
17852
|
let data;
|
|
17855
17853
|
try {
|
|
17856
17854
|
const result = await this._http.GET("/api/v1/flags", {});
|
|
17857
|
-
if (result.
|
|
17855
|
+
if (!result.response.ok) await checkError2(result.response, "Failed to list flags");
|
|
17858
17856
|
data = result.data;
|
|
17859
17857
|
} catch (err) {
|
|
17860
17858
|
wrapFetchError2(err);
|
|
@@ -17868,8 +17866,7 @@ var FlagsClient = class {
|
|
|
17868
17866
|
const result = await this._http.DELETE("/api/v1/flags/{id}", {
|
|
17869
17867
|
params: { path: { id } }
|
|
17870
17868
|
});
|
|
17871
|
-
if (result.
|
|
17872
|
-
await checkError2(result.response, `Failed to delete flag '${id}'`);
|
|
17869
|
+
if (!result.response.ok) await checkError2(result.response, `Failed to delete flag '${id}'`);
|
|
17873
17870
|
} catch (err) {
|
|
17874
17871
|
wrapFetchError2(err);
|
|
17875
17872
|
}
|
|
@@ -17896,7 +17893,7 @@ var FlagsClient = class {
|
|
|
17896
17893
|
let data;
|
|
17897
17894
|
try {
|
|
17898
17895
|
const result = await this._http.POST("/api/v1/flags", { body });
|
|
17899
|
-
if (result.
|
|
17896
|
+
if (!result.response.ok) await checkError2(result.response, "Failed to create flag");
|
|
17900
17897
|
data = result.data;
|
|
17901
17898
|
} catch (err) {
|
|
17902
17899
|
wrapFetchError2(err);
|
|
@@ -17925,7 +17922,7 @@ var FlagsClient = class {
|
|
|
17925
17922
|
params: { path: { id: flag.id } },
|
|
17926
17923
|
body
|
|
17927
17924
|
});
|
|
17928
|
-
if (result.
|
|
17925
|
+
if (!result.response.ok)
|
|
17929
17926
|
await checkError2(result.response, `Failed to update flag ${flag.id}`);
|
|
17930
17927
|
data = result.data;
|
|
17931
17928
|
} catch (err) {
|
|
@@ -18235,7 +18232,7 @@ var FlagsClient = class {
|
|
|
18235
18232
|
let data;
|
|
18236
18233
|
try {
|
|
18237
18234
|
const result = await this._http.GET("/api/v1/flags", {});
|
|
18238
|
-
if (result.
|
|
18235
|
+
if (!result.response.ok) await checkError2(result.response, "Failed to list flags");
|
|
18239
18236
|
data = result.data;
|
|
18240
18237
|
} catch (err) {
|
|
18241
18238
|
wrapFetchError2(err);
|
|
@@ -19005,7 +19002,7 @@ var LoggingClient = class {
|
|
|
19005
19002
|
level: attrs.level ?? null,
|
|
19006
19003
|
group: attrs.group ?? null,
|
|
19007
19004
|
managed: attrs.managed ?? false,
|
|
19008
|
-
sources:
|
|
19005
|
+
sources: [],
|
|
19009
19006
|
environments: attrs.environments ?? {},
|
|
19010
19007
|
createdAt: attrs.created_at ?? null,
|
|
19011
19008
|
updatedAt: attrs.updated_at ?? null
|