@aicats/sdk 1.2.0 → 1.2.2
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.mts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +10 -0
- package/dist/index.mjs +9 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Available media types for AI cat media
|
|
3
3
|
*/
|
|
4
|
-
declare enum
|
|
4
|
+
declare enum MediaType {
|
|
5
5
|
/** All media types */
|
|
6
|
-
All = "",
|
|
6
|
+
All = "All",
|
|
7
7
|
/** Image media type (Default) */
|
|
8
8
|
Image = "Image",
|
|
9
9
|
/** Video media type */
|
|
@@ -19,7 +19,7 @@ interface SearchResult {
|
|
|
19
19
|
/** Direct URL to the cat media */
|
|
20
20
|
url: string;
|
|
21
21
|
/** The type of media */
|
|
22
|
-
type:
|
|
22
|
+
type: MediaType;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -61,7 +61,7 @@ interface CatInfo {
|
|
|
61
61
|
/** The theme of the cat media */
|
|
62
62
|
theme: Theme;
|
|
63
63
|
/** The type of media */
|
|
64
|
-
type:
|
|
64
|
+
type: MediaType;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
@@ -95,7 +95,7 @@ interface RandomCatOptions<T extends ResponseType = 'blob'> {
|
|
|
95
95
|
/** Theme of the cat media */
|
|
96
96
|
theme?: Theme;
|
|
97
97
|
/** Filter by media type */
|
|
98
|
-
type?:
|
|
98
|
+
type?: MediaType;
|
|
99
99
|
/** Response format (default: blob) */
|
|
100
100
|
responseType?: T;
|
|
101
101
|
}
|
|
@@ -114,7 +114,7 @@ interface SearchOptions {
|
|
|
114
114
|
/** Media size in results */
|
|
115
115
|
size?: Size;
|
|
116
116
|
/** Filter by media type */
|
|
117
|
-
type?:
|
|
117
|
+
type?: MediaType;
|
|
118
118
|
}
|
|
119
119
|
/** Options for similar cats */
|
|
120
120
|
interface SimilarOptions {
|
|
@@ -128,7 +128,7 @@ interface GetByIdOptions<T extends ResponseType = 'blob'> {
|
|
|
128
128
|
/** Media size (default: Large) */
|
|
129
129
|
size?: Size;
|
|
130
130
|
/** media type */
|
|
131
|
-
type?:
|
|
131
|
+
type?: MediaType;
|
|
132
132
|
/** Response format (default: blob) */
|
|
133
133
|
responseType?: T;
|
|
134
134
|
}
|
|
@@ -136,7 +136,7 @@ interface CountOptions {
|
|
|
136
136
|
/** Filter by theme */
|
|
137
137
|
theme?: Theme;
|
|
138
138
|
/** Filter by media type */
|
|
139
|
-
type?:
|
|
139
|
+
type?: MediaType;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
declare const AiCats: {
|
|
@@ -150,4 +150,4 @@ declare const AiCats: {
|
|
|
150
150
|
getCount: (options?: CountOptions) => Promise<number>;
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
-
export { AiCats, type CatInfo, type RandomCatOptions, type SearchOptions, type SearchResult, type SimilarOptions, Size, Theme };
|
|
153
|
+
export { AiCats, type CatInfo, type CountOptions, type GetByIdOptions, MediaType, type RandomCatOptions, type SearchOptions, type SearchResult, type SimilarOptions, Size, Theme };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Available media types for AI cat media
|
|
3
3
|
*/
|
|
4
|
-
declare enum
|
|
4
|
+
declare enum MediaType {
|
|
5
5
|
/** All media types */
|
|
6
|
-
All = "",
|
|
6
|
+
All = "All",
|
|
7
7
|
/** Image media type (Default) */
|
|
8
8
|
Image = "Image",
|
|
9
9
|
/** Video media type */
|
|
@@ -19,7 +19,7 @@ interface SearchResult {
|
|
|
19
19
|
/** Direct URL to the cat media */
|
|
20
20
|
url: string;
|
|
21
21
|
/** The type of media */
|
|
22
|
-
type:
|
|
22
|
+
type: MediaType;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -61,7 +61,7 @@ interface CatInfo {
|
|
|
61
61
|
/** The theme of the cat media */
|
|
62
62
|
theme: Theme;
|
|
63
63
|
/** The type of media */
|
|
64
|
-
type:
|
|
64
|
+
type: MediaType;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/**
|
|
@@ -95,7 +95,7 @@ interface RandomCatOptions<T extends ResponseType = 'blob'> {
|
|
|
95
95
|
/** Theme of the cat media */
|
|
96
96
|
theme?: Theme;
|
|
97
97
|
/** Filter by media type */
|
|
98
|
-
type?:
|
|
98
|
+
type?: MediaType;
|
|
99
99
|
/** Response format (default: blob) */
|
|
100
100
|
responseType?: T;
|
|
101
101
|
}
|
|
@@ -114,7 +114,7 @@ interface SearchOptions {
|
|
|
114
114
|
/** Media size in results */
|
|
115
115
|
size?: Size;
|
|
116
116
|
/** Filter by media type */
|
|
117
|
-
type?:
|
|
117
|
+
type?: MediaType;
|
|
118
118
|
}
|
|
119
119
|
/** Options for similar cats */
|
|
120
120
|
interface SimilarOptions {
|
|
@@ -128,7 +128,7 @@ interface GetByIdOptions<T extends ResponseType = 'blob'> {
|
|
|
128
128
|
/** Media size (default: Large) */
|
|
129
129
|
size?: Size;
|
|
130
130
|
/** media type */
|
|
131
|
-
type?:
|
|
131
|
+
type?: MediaType;
|
|
132
132
|
/** Response format (default: blob) */
|
|
133
133
|
responseType?: T;
|
|
134
134
|
}
|
|
@@ -136,7 +136,7 @@ interface CountOptions {
|
|
|
136
136
|
/** Filter by theme */
|
|
137
137
|
theme?: Theme;
|
|
138
138
|
/** Filter by media type */
|
|
139
|
-
type?:
|
|
139
|
+
type?: MediaType;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
declare const AiCats: {
|
|
@@ -150,4 +150,4 @@ declare const AiCats: {
|
|
|
150
150
|
getCount: (options?: CountOptions) => Promise<number>;
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
-
export { AiCats, type CatInfo, type RandomCatOptions, type SearchOptions, type SearchResult, type SimilarOptions, Size, Theme };
|
|
153
|
+
export { AiCats, type CatInfo, type CountOptions, type GetByIdOptions, MediaType, type RandomCatOptions, type SearchOptions, type SearchResult, type SimilarOptions, Size, Theme };
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
AiCats: () => AiCats,
|
|
24
|
+
MediaType: () => MediaType,
|
|
24
25
|
Size: () => Size,
|
|
25
26
|
Theme: () => Theme
|
|
26
27
|
});
|
|
@@ -52,6 +53,14 @@ var Theme = /* @__PURE__ */ ((Theme2) => {
|
|
|
52
53
|
return Theme2;
|
|
53
54
|
})(Theme || {});
|
|
54
55
|
|
|
56
|
+
// src/models/enums/type.enum.ts
|
|
57
|
+
var MediaType = /* @__PURE__ */ ((MediaType2) => {
|
|
58
|
+
MediaType2["All"] = "All";
|
|
59
|
+
MediaType2["Image"] = "Image";
|
|
60
|
+
MediaType2["Video"] = "Video";
|
|
61
|
+
return MediaType2;
|
|
62
|
+
})(MediaType || {});
|
|
63
|
+
|
|
55
64
|
// src/api/ai-cats-api.ts
|
|
56
65
|
var ApiUrl = "https://api.ai-cats.net/v1";
|
|
57
66
|
async function toResponseType(buffer, mediaType = "Image" /* Image */, type = "blob") {
|
|
@@ -192,6 +201,7 @@ var AiCats = AiCatsAPI;
|
|
|
192
201
|
// Annotate the CommonJS export names for ESM import in node:
|
|
193
202
|
0 && (module.exports = {
|
|
194
203
|
AiCats,
|
|
204
|
+
MediaType,
|
|
195
205
|
Size,
|
|
196
206
|
Theme
|
|
197
207
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -24,6 +24,14 @@ var Theme = /* @__PURE__ */ ((Theme2) => {
|
|
|
24
24
|
return Theme2;
|
|
25
25
|
})(Theme || {});
|
|
26
26
|
|
|
27
|
+
// src/models/enums/type.enum.ts
|
|
28
|
+
var MediaType = /* @__PURE__ */ ((MediaType2) => {
|
|
29
|
+
MediaType2["All"] = "All";
|
|
30
|
+
MediaType2["Image"] = "Image";
|
|
31
|
+
MediaType2["Video"] = "Video";
|
|
32
|
+
return MediaType2;
|
|
33
|
+
})(MediaType || {});
|
|
34
|
+
|
|
27
35
|
// src/api/ai-cats-api.ts
|
|
28
36
|
var ApiUrl = "https://api.ai-cats.net/v1";
|
|
29
37
|
async function toResponseType(buffer, mediaType = "Image" /* Image */, type = "blob") {
|
|
@@ -163,6 +171,7 @@ var AiCatsAPI = {
|
|
|
163
171
|
var AiCats = AiCatsAPI;
|
|
164
172
|
export {
|
|
165
173
|
AiCats,
|
|
174
|
+
MediaType,
|
|
166
175
|
Size,
|
|
167
176
|
Theme
|
|
168
177
|
};
|