@brickset-api/types 0.0.10 → 0.0.11
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/CHANGELOG.md +6 -0
- package/data/get-sets.ts +2 -11
- package/endpoints.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/data/get-sets.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export type GetSets =
|
|
2
|
-
|
|
3
|
-
export type Item = ItemBase;
|
|
1
|
+
export type GetSets = GetSetsBase;
|
|
4
2
|
|
|
5
3
|
export type GetSetsOptions = {
|
|
6
4
|
setID?: number;
|
|
@@ -23,14 +21,7 @@ export type GetSetsOptions = {
|
|
|
23
21
|
extendedData?: boolean;
|
|
24
22
|
};
|
|
25
23
|
|
|
26
|
-
interface
|
|
27
|
-
message?: string;
|
|
28
|
-
status: string;
|
|
29
|
-
matches?: number;
|
|
30
|
-
sets?: ItemBase[];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
interface ItemBase {
|
|
24
|
+
interface GetSetsBase {
|
|
34
25
|
setID: number;
|
|
35
26
|
number: string;
|
|
36
27
|
numberVariant: string;
|
package/endpoints.ts
CHANGED
|
@@ -44,7 +44,7 @@ type ApiResponse<T> = {
|
|
|
44
44
|
|
|
45
45
|
// result type for endpoint
|
|
46
46
|
export type EndpointType<Url extends KnownEndpoint | (string & {})> =
|
|
47
|
-
Url extends '/api/v3.asmx/getSets' ?
|
|
47
|
+
Url extends '/api/v3.asmx/getSets' ? { status: 'success' | 'error'; message?: string; sets: GetSets } :
|
|
48
48
|
unknown;
|
|
49
49
|
|
|
50
50
|
export type ValidateEndpointUrl<T extends string> = unknown extends EndpointType<T> ? 'unknown endpoint url' : T;
|