@blizzard-api/core 1.1.2 → 1.2.0
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.cts +9 -2
- package/dist/index.d.ts +9 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -53,7 +53,7 @@ declare function getBlizzardApi<T extends Origins>(origin: T, locale?: (typeof _
|
|
|
53
53
|
* Blizzard API namespaces.
|
|
54
54
|
* @see https://develop.battle.net/documentation/world-of-warcraft/guides/namespaces
|
|
55
55
|
*/
|
|
56
|
-
type BlizzardNamespaces = 'dynamic
|
|
56
|
+
type BlizzardNamespaces = 'dynamic' | 'dynamic-classic' | 'dynamic-classic1x' | 'profile' | 'static' | 'static-classic' | 'static-classic1x';
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Represents a resource that can be requested from the Blizzard API
|
|
@@ -73,6 +73,13 @@ type Resource<Response, SearchOptions extends object = Record<string, never>, Pr
|
|
|
73
73
|
} & (ProtectedResource extends true ? {
|
|
74
74
|
token: string;
|
|
75
75
|
} : unknown);
|
|
76
|
+
/**
|
|
77
|
+
* Represents a resource that requires a token to be requested
|
|
78
|
+
* @param Response The response type of the resource
|
|
79
|
+
* @param SearchOptions The search options that can be passed to the resource
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
type ProtectedResource<Response, SearchOptions extends object = Record<string, never>> = Resource<Response, SearchOptions, true>;
|
|
76
83
|
/**
|
|
77
84
|
* Represents the response of a resource
|
|
78
85
|
* @param T The response type of the resource
|
|
@@ -132,4 +139,4 @@ interface SearchResponse<T> {
|
|
|
132
139
|
results: Array<T>;
|
|
133
140
|
}
|
|
134
141
|
|
|
135
|
-
export { type BaseSearchParameters, type BlizzardNamespaces, type ExtractResourceType, type Locales, type Origins, type Resource, type ResourceResponse, type SearchResponse, getBlizzardApi };
|
|
142
|
+
export { type BaseSearchParameters, type BlizzardNamespaces, type ExtractResourceType, type Locales, type Origins, type ProtectedResource, type Resource, type ResourceResponse, type SearchResponse, getBlizzardApi };
|
package/dist/index.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ declare function getBlizzardApi<T extends Origins>(origin: T, locale?: (typeof _
|
|
|
53
53
|
* Blizzard API namespaces.
|
|
54
54
|
* @see https://develop.battle.net/documentation/world-of-warcraft/guides/namespaces
|
|
55
55
|
*/
|
|
56
|
-
type BlizzardNamespaces = 'dynamic
|
|
56
|
+
type BlizzardNamespaces = 'dynamic' | 'dynamic-classic' | 'dynamic-classic1x' | 'profile' | 'static' | 'static-classic' | 'static-classic1x';
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Represents a resource that can be requested from the Blizzard API
|
|
@@ -73,6 +73,13 @@ type Resource<Response, SearchOptions extends object = Record<string, never>, Pr
|
|
|
73
73
|
} & (ProtectedResource extends true ? {
|
|
74
74
|
token: string;
|
|
75
75
|
} : unknown);
|
|
76
|
+
/**
|
|
77
|
+
* Represents a resource that requires a token to be requested
|
|
78
|
+
* @param Response The response type of the resource
|
|
79
|
+
* @param SearchOptions The search options that can be passed to the resource
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
type ProtectedResource<Response, SearchOptions extends object = Record<string, never>> = Resource<Response, SearchOptions, true>;
|
|
76
83
|
/**
|
|
77
84
|
* Represents the response of a resource
|
|
78
85
|
* @param T The response type of the resource
|
|
@@ -132,4 +139,4 @@ interface SearchResponse<T> {
|
|
|
132
139
|
results: Array<T>;
|
|
133
140
|
}
|
|
134
141
|
|
|
135
|
-
export { type BaseSearchParameters, type BlizzardNamespaces, type ExtractResourceType, type Locales, type Origins, type Resource, type ResourceResponse, type SearchResponse, getBlizzardApi };
|
|
142
|
+
export { type BaseSearchParameters, type BlizzardNamespaces, type ExtractResourceType, type Locales, type Origins, type ProtectedResource, type Resource, type ResourceResponse, type SearchResponse, getBlizzardApi };
|