serialstation 1.0.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/LICENSE +21 -0
- package/README.md +272 -0
- package/dist/api/companies/index.d.mts +16 -0
- package/dist/api/companies/index.d.ts +16 -0
- package/dist/api/companies/index.js +41 -0
- package/dist/api/companies/index.js.map +1 -0
- package/dist/api/companies/index.mjs +16 -0
- package/dist/api/companies/index.mjs.map +1 -0
- package/dist/api/content-ids/index.d.mts +20 -0
- package/dist/api/content-ids/index.d.ts +20 -0
- package/dist/api/content-ids/index.js +47 -0
- package/dist/api/content-ids/index.js.map +1 -0
- package/dist/api/content-ids/index.mjs +22 -0
- package/dist/api/content-ids/index.mjs.map +1 -0
- package/dist/api/franchises/index.d.mts +16 -0
- package/dist/api/franchises/index.d.ts +16 -0
- package/dist/api/franchises/index.js +41 -0
- package/dist/api/franchises/index.js.map +1 -0
- package/dist/api/franchises/index.mjs +16 -0
- package/dist/api/franchises/index.mjs.map +1 -0
- package/dist/api/games/index.d.mts +20 -0
- package/dist/api/games/index.d.ts +20 -0
- package/dist/api/games/index.js +47 -0
- package/dist/api/games/index.js.map +1 -0
- package/dist/api/games/index.mjs +22 -0
- package/dist/api/games/index.mjs.map +1 -0
- package/dist/api/title-ids/index.d.mts +32 -0
- package/dist/api/title-ids/index.d.ts +32 -0
- package/dist/api/title-ids/index.js +58 -0
- package/dist/api/title-ids/index.js.map +1 -0
- package/dist/api/title-ids/index.mjs +33 -0
- package/dist/api/title-ids/index.mjs.map +1 -0
- package/dist/client/BaseClient.d.mts +76 -0
- package/dist/client/BaseClient.d.ts +76 -0
- package/dist/client/BaseClient.js +136 -0
- package/dist/client/BaseClient.js.map +1 -0
- package/dist/client/BaseClient.mjs +101 -0
- package/dist/client/BaseClient.mjs.map +1 -0
- package/dist/index.d.mts +44 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +263 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +220 -0
- package/dist/index.mjs.map +1 -0
- package/dist/types/index.d.mts +23 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mjs +1 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/types-BjzcHkoc.d.mts +25 -0
- package/dist/types-BjzcHkoc.d.ts +25 -0
- package/dist/types-BnaHEIcd.d.mts +41 -0
- package/dist/types-BnaHEIcd.d.ts +41 -0
- package/dist/types-Dv-1DNPu.d.mts +60 -0
- package/dist/types-Dv-1DNPu.d.ts +60 -0
- package/dist/types-KwGU8D6g.d.mts +66 -0
- package/dist/types-KwGU8D6g.d.ts +66 -0
- package/dist/types-axGWx6HR.d.mts +25 -0
- package/dist/types-axGWx6HR.d.ts +25 -0
- package/package.json +103 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { O as OrderDirection, P as PagedTitleIDSchema, T as TitleIDFilterParams, a as TitleIDGameSchema, b as TitleIDOrderFields, c as TitleIDSchema } from '../types-KwGU8D6g.js';
|
|
2
|
+
export { C as ContentIDFilterParams, a as ContentIDOrderFields, b as ContentIDSchema, P as PagedContentIDSchema } from '../types-BnaHEIcd.js';
|
|
3
|
+
export { G as GameCompanySchema, a as GameFilterParams, b as GameFranchiseSchema, c as GameOrderFields, d as GameSchema, P as PagedGameSchema } from '../types-Dv-1DNPu.js';
|
|
4
|
+
export { F as FranchiseFilterParams, a as FranchiseSchema, P as PagedFranchiseSchema } from '../types-axGWx6HR.js';
|
|
5
|
+
export { C as CompanyFilterParams, a as CompanySchema, P as PagedCompanySchema } from '../types-BjzcHkoc.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Console values supported by the API (PlayStation platforms).
|
|
9
|
+
*/
|
|
10
|
+
type Console = 'PS1' | 'PS2' | 'PS3' | 'PS4' | 'PS5' | 'PSP' | 'PSV' | 'PSM';
|
|
11
|
+
/**
|
|
12
|
+
* Generic paginated response structure.
|
|
13
|
+
*
|
|
14
|
+
* @template T - The type of items in the response
|
|
15
|
+
*/
|
|
16
|
+
interface PagedResponse<T> {
|
|
17
|
+
/** Array of items in the current page */
|
|
18
|
+
items: T[];
|
|
19
|
+
/** Total count of items across all pages */
|
|
20
|
+
count: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type { Console, PagedResponse };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/types/index.ts
|
|
17
|
+
var types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(types_exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/types/index.ts"],"sourcesContent":["/**\r\n * Console values supported by the API (PlayStation platforms).\r\n */\r\nexport type Console = 'PS1' | 'PS2' | 'PS3' | 'PS4' | 'PS5' | 'PSP' | 'PSV' | 'PSM';\r\n\r\n/**\r\n * Generic paginated response structure.\r\n *\r\n * @template T - The type of items in the response\r\n */\r\nexport interface PagedResponse<T> {\r\n /** Array of items in the current page */\r\n items: T[];\r\n /** Total count of items across all pages */\r\n count: number;\r\n}\r\n\r\nexport * from '../api/title-ids/types';\r\nexport * from '../api/content-ids/types';\r\nexport * from '../api/games/types';\r\nexport * from '../api/franchises/types';\r\nexport * from '../api/companies/types';\r\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameters for filtering companies with pagination.
|
|
3
|
+
*/
|
|
4
|
+
interface CompanyFilterParams {
|
|
5
|
+
/** Maximum number of results (1-100, default 100) */
|
|
6
|
+
limit?: number;
|
|
7
|
+
/** Number of results to skip for pagination */
|
|
8
|
+
offset?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Schema representing a company entry (developer/publisher).
|
|
12
|
+
*/
|
|
13
|
+
interface CompanySchema {
|
|
14
|
+
id: string | null;
|
|
15
|
+
name: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Paginated response containing company schemas.
|
|
19
|
+
*/
|
|
20
|
+
interface PagedCompanySchema {
|
|
21
|
+
items: CompanySchema[];
|
|
22
|
+
count: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type { CompanyFilterParams as C, PagedCompanySchema as P, CompanySchema as a };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameters for filtering companies with pagination.
|
|
3
|
+
*/
|
|
4
|
+
interface CompanyFilterParams {
|
|
5
|
+
/** Maximum number of results (1-100, default 100) */
|
|
6
|
+
limit?: number;
|
|
7
|
+
/** Number of results to skip for pagination */
|
|
8
|
+
offset?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Schema representing a company entry (developer/publisher).
|
|
12
|
+
*/
|
|
13
|
+
interface CompanySchema {
|
|
14
|
+
id: string | null;
|
|
15
|
+
name: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Paginated response containing company schemas.
|
|
19
|
+
*/
|
|
20
|
+
interface PagedCompanySchema {
|
|
21
|
+
items: CompanySchema[];
|
|
22
|
+
count: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type { CompanyFilterParams as C, PagedCompanySchema as P, CompanySchema as a };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order fields for content ID list.
|
|
3
|
+
*/
|
|
4
|
+
type ContentIDOrderFields = 'content_id' | 'name';
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for filtering content IDs with pagination.
|
|
7
|
+
*/
|
|
8
|
+
interface ContentIDFilterParams {
|
|
9
|
+
/** Filter by title ID (9 characters) */
|
|
10
|
+
title_id?: string;
|
|
11
|
+
/** Filter by name (partial match) */
|
|
12
|
+
name?: string;
|
|
13
|
+
/** Order by field */
|
|
14
|
+
order_by?: ContentIDOrderFields;
|
|
15
|
+
/** Sort direction */
|
|
16
|
+
order_direction?: 'asc' | 'desc';
|
|
17
|
+
/** Maximum number of results (1-100, default 100) */
|
|
18
|
+
limit?: number;
|
|
19
|
+
/** Number of results to skip for pagination */
|
|
20
|
+
offset?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Schema representing a content ID entry.
|
|
24
|
+
*/
|
|
25
|
+
interface ContentIDSchema {
|
|
26
|
+
/** Unique content ID (36 characters) */
|
|
27
|
+
content_id: string;
|
|
28
|
+
/** Associated title ID (9 characters) */
|
|
29
|
+
title_id: string;
|
|
30
|
+
/** Content name */
|
|
31
|
+
name: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Paginated response containing content ID schemas.
|
|
35
|
+
*/
|
|
36
|
+
interface PagedContentIDSchema {
|
|
37
|
+
items: ContentIDSchema[];
|
|
38
|
+
count: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type { ContentIDFilterParams as C, PagedContentIDSchema as P, ContentIDOrderFields as a, ContentIDSchema as b };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order fields for content ID list.
|
|
3
|
+
*/
|
|
4
|
+
type ContentIDOrderFields = 'content_id' | 'name';
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for filtering content IDs with pagination.
|
|
7
|
+
*/
|
|
8
|
+
interface ContentIDFilterParams {
|
|
9
|
+
/** Filter by title ID (9 characters) */
|
|
10
|
+
title_id?: string;
|
|
11
|
+
/** Filter by name (partial match) */
|
|
12
|
+
name?: string;
|
|
13
|
+
/** Order by field */
|
|
14
|
+
order_by?: ContentIDOrderFields;
|
|
15
|
+
/** Sort direction */
|
|
16
|
+
order_direction?: 'asc' | 'desc';
|
|
17
|
+
/** Maximum number of results (1-100, default 100) */
|
|
18
|
+
limit?: number;
|
|
19
|
+
/** Number of results to skip for pagination */
|
|
20
|
+
offset?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Schema representing a content ID entry.
|
|
24
|
+
*/
|
|
25
|
+
interface ContentIDSchema {
|
|
26
|
+
/** Unique content ID (36 characters) */
|
|
27
|
+
content_id: string;
|
|
28
|
+
/** Associated title ID (9 characters) */
|
|
29
|
+
title_id: string;
|
|
30
|
+
/** Content name */
|
|
31
|
+
name: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Paginated response containing content ID schemas.
|
|
35
|
+
*/
|
|
36
|
+
interface PagedContentIDSchema {
|
|
37
|
+
items: ContentIDSchema[];
|
|
38
|
+
count: number;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type { ContentIDFilterParams as C, PagedContentIDSchema as P, ContentIDOrderFields as a, ContentIDSchema as b };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order fields for game list.
|
|
3
|
+
*/
|
|
4
|
+
type GameOrderFields = 'name';
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for filtering games with pagination.
|
|
7
|
+
*/
|
|
8
|
+
interface GameFilterParams {
|
|
9
|
+
/** Filter by game name (partial match) */
|
|
10
|
+
name?: string;
|
|
11
|
+
/** Filter by franchise UUID */
|
|
12
|
+
franchise?: string;
|
|
13
|
+
/** Filter by developer company UUID */
|
|
14
|
+
developer?: string;
|
|
15
|
+
/** Filter by publisher company UUID */
|
|
16
|
+
publisher?: string;
|
|
17
|
+
/** Order by field */
|
|
18
|
+
order_by?: GameOrderFields;
|
|
19
|
+
/** Sort direction */
|
|
20
|
+
order_direction?: 'asc' | 'desc';
|
|
21
|
+
/** Maximum number of results (1-100, default 100) */
|
|
22
|
+
limit?: number;
|
|
23
|
+
/** Number of results to skip for pagination */
|
|
24
|
+
offset?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Company schema (developer/publisher) - same structure as companies API.
|
|
28
|
+
*/
|
|
29
|
+
interface GameCompanySchema {
|
|
30
|
+
id: string | null;
|
|
31
|
+
name: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Franchise schema - same structure as franchises API.
|
|
35
|
+
*/
|
|
36
|
+
interface GameFranchiseSchema {
|
|
37
|
+
id: string | null;
|
|
38
|
+
name: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Schema representing a game entry.
|
|
42
|
+
*/
|
|
43
|
+
interface GameSchema {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
title_ids: string[];
|
|
47
|
+
concept_ids: number[] | null;
|
|
48
|
+
franchises: GameFranchiseSchema[] | null;
|
|
49
|
+
developers: GameCompanySchema[] | null;
|
|
50
|
+
publishers: GameCompanySchema[] | null;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Paginated response containing game schemas.
|
|
54
|
+
*/
|
|
55
|
+
interface PagedGameSchema {
|
|
56
|
+
items: GameSchema[];
|
|
57
|
+
count: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type { GameCompanySchema as G, PagedGameSchema as P, GameFilterParams as a, GameFranchiseSchema as b, GameOrderFields as c, GameSchema as d };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order fields for game list.
|
|
3
|
+
*/
|
|
4
|
+
type GameOrderFields = 'name';
|
|
5
|
+
/**
|
|
6
|
+
* Parameters for filtering games with pagination.
|
|
7
|
+
*/
|
|
8
|
+
interface GameFilterParams {
|
|
9
|
+
/** Filter by game name (partial match) */
|
|
10
|
+
name?: string;
|
|
11
|
+
/** Filter by franchise UUID */
|
|
12
|
+
franchise?: string;
|
|
13
|
+
/** Filter by developer company UUID */
|
|
14
|
+
developer?: string;
|
|
15
|
+
/** Filter by publisher company UUID */
|
|
16
|
+
publisher?: string;
|
|
17
|
+
/** Order by field */
|
|
18
|
+
order_by?: GameOrderFields;
|
|
19
|
+
/** Sort direction */
|
|
20
|
+
order_direction?: 'asc' | 'desc';
|
|
21
|
+
/** Maximum number of results (1-100, default 100) */
|
|
22
|
+
limit?: number;
|
|
23
|
+
/** Number of results to skip for pagination */
|
|
24
|
+
offset?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Company schema (developer/publisher) - same structure as companies API.
|
|
28
|
+
*/
|
|
29
|
+
interface GameCompanySchema {
|
|
30
|
+
id: string | null;
|
|
31
|
+
name: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Franchise schema - same structure as franchises API.
|
|
35
|
+
*/
|
|
36
|
+
interface GameFranchiseSchema {
|
|
37
|
+
id: string | null;
|
|
38
|
+
name: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Schema representing a game entry.
|
|
42
|
+
*/
|
|
43
|
+
interface GameSchema {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
title_ids: string[];
|
|
47
|
+
concept_ids: number[] | null;
|
|
48
|
+
franchises: GameFranchiseSchema[] | null;
|
|
49
|
+
developers: GameCompanySchema[] | null;
|
|
50
|
+
publishers: GameCompanySchema[] | null;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Paginated response containing game schemas.
|
|
54
|
+
*/
|
|
55
|
+
interface PagedGameSchema {
|
|
56
|
+
items: GameSchema[];
|
|
57
|
+
count: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type { GameCompanySchema as G, PagedGameSchema as P, GameFilterParams as a, GameFranchiseSchema as b, GameOrderFields as c, GameSchema as d };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Console values supported by the API (PlayStation platforms).
|
|
3
|
+
*/
|
|
4
|
+
type Console = 'PS1' | 'PS2' | 'PS3' | 'PS4' | 'PS5' | 'PSP' | 'PSV' | 'PSM';
|
|
5
|
+
/**
|
|
6
|
+
* Order fields for title ID list.
|
|
7
|
+
*/
|
|
8
|
+
type TitleIDOrderFields = 'title_id' | 'name';
|
|
9
|
+
/**
|
|
10
|
+
* Order direction for list results.
|
|
11
|
+
*/
|
|
12
|
+
type OrderDirection = 'asc' | 'desc';
|
|
13
|
+
/**
|
|
14
|
+
* Parameters for filtering title IDs with pagination.
|
|
15
|
+
*/
|
|
16
|
+
interface TitleIDFilterParams {
|
|
17
|
+
/** Filter by title ID type (e.g. CUSA, BLUS) */
|
|
18
|
+
title_id_type?: string;
|
|
19
|
+
/** Filter by console/system */
|
|
20
|
+
system?: Console;
|
|
21
|
+
/** Filter by title name (partial match) */
|
|
22
|
+
name?: string;
|
|
23
|
+
/** Order by field */
|
|
24
|
+
order_by?: TitleIDOrderFields;
|
|
25
|
+
/** Sort direction */
|
|
26
|
+
order_direction?: OrderDirection;
|
|
27
|
+
/** Maximum number of results (1-100, default 100) */
|
|
28
|
+
limit?: number;
|
|
29
|
+
/** Number of results to skip for pagination */
|
|
30
|
+
offset?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Game reference in a title ID response.
|
|
34
|
+
*/
|
|
35
|
+
interface TitleIDGameSchema {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Schema representing a title ID entry.
|
|
41
|
+
*/
|
|
42
|
+
interface TitleIDSchema {
|
|
43
|
+
/** Unique title ID (9 characters) */
|
|
44
|
+
title_id: string;
|
|
45
|
+
/** Title ID type prefix (4 chars, e.g. CUSA) */
|
|
46
|
+
title_id_type: string;
|
|
47
|
+
/** Title ID number (5 chars) */
|
|
48
|
+
title_id_number: string;
|
|
49
|
+
/** Title name */
|
|
50
|
+
name: string;
|
|
51
|
+
/** Content type */
|
|
52
|
+
content_type: string;
|
|
53
|
+
/** Array of systems this title ID is associated with */
|
|
54
|
+
systems: string[];
|
|
55
|
+
/** Associated games */
|
|
56
|
+
games: TitleIDGameSchema[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Paginated response containing title ID schemas.
|
|
60
|
+
*/
|
|
61
|
+
interface PagedTitleIDSchema {
|
|
62
|
+
items: TitleIDSchema[];
|
|
63
|
+
count: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type { Console as C, OrderDirection as O, PagedTitleIDSchema as P, TitleIDFilterParams as T, TitleIDGameSchema as a, TitleIDOrderFields as b, TitleIDSchema as c };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Console values supported by the API (PlayStation platforms).
|
|
3
|
+
*/
|
|
4
|
+
type Console = 'PS1' | 'PS2' | 'PS3' | 'PS4' | 'PS5' | 'PSP' | 'PSV' | 'PSM';
|
|
5
|
+
/**
|
|
6
|
+
* Order fields for title ID list.
|
|
7
|
+
*/
|
|
8
|
+
type TitleIDOrderFields = 'title_id' | 'name';
|
|
9
|
+
/**
|
|
10
|
+
* Order direction for list results.
|
|
11
|
+
*/
|
|
12
|
+
type OrderDirection = 'asc' | 'desc';
|
|
13
|
+
/**
|
|
14
|
+
* Parameters for filtering title IDs with pagination.
|
|
15
|
+
*/
|
|
16
|
+
interface TitleIDFilterParams {
|
|
17
|
+
/** Filter by title ID type (e.g. CUSA, BLUS) */
|
|
18
|
+
title_id_type?: string;
|
|
19
|
+
/** Filter by console/system */
|
|
20
|
+
system?: Console;
|
|
21
|
+
/** Filter by title name (partial match) */
|
|
22
|
+
name?: string;
|
|
23
|
+
/** Order by field */
|
|
24
|
+
order_by?: TitleIDOrderFields;
|
|
25
|
+
/** Sort direction */
|
|
26
|
+
order_direction?: OrderDirection;
|
|
27
|
+
/** Maximum number of results (1-100, default 100) */
|
|
28
|
+
limit?: number;
|
|
29
|
+
/** Number of results to skip for pagination */
|
|
30
|
+
offset?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Game reference in a title ID response.
|
|
34
|
+
*/
|
|
35
|
+
interface TitleIDGameSchema {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Schema representing a title ID entry.
|
|
41
|
+
*/
|
|
42
|
+
interface TitleIDSchema {
|
|
43
|
+
/** Unique title ID (9 characters) */
|
|
44
|
+
title_id: string;
|
|
45
|
+
/** Title ID type prefix (4 chars, e.g. CUSA) */
|
|
46
|
+
title_id_type: string;
|
|
47
|
+
/** Title ID number (5 chars) */
|
|
48
|
+
title_id_number: string;
|
|
49
|
+
/** Title name */
|
|
50
|
+
name: string;
|
|
51
|
+
/** Content type */
|
|
52
|
+
content_type: string;
|
|
53
|
+
/** Array of systems this title ID is associated with */
|
|
54
|
+
systems: string[];
|
|
55
|
+
/** Associated games */
|
|
56
|
+
games: TitleIDGameSchema[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Paginated response containing title ID schemas.
|
|
60
|
+
*/
|
|
61
|
+
interface PagedTitleIDSchema {
|
|
62
|
+
items: TitleIDSchema[];
|
|
63
|
+
count: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type { Console as C, OrderDirection as O, PagedTitleIDSchema as P, TitleIDFilterParams as T, TitleIDGameSchema as a, TitleIDOrderFields as b, TitleIDSchema as c };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameters for filtering franchises with pagination.
|
|
3
|
+
*/
|
|
4
|
+
interface FranchiseFilterParams {
|
|
5
|
+
/** Maximum number of results (1-100, default 100) */
|
|
6
|
+
limit?: number;
|
|
7
|
+
/** Number of results to skip for pagination */
|
|
8
|
+
offset?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Schema representing a franchise entry.
|
|
12
|
+
*/
|
|
13
|
+
interface FranchiseSchema {
|
|
14
|
+
id: string | null;
|
|
15
|
+
name: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Paginated response containing franchise schemas.
|
|
19
|
+
*/
|
|
20
|
+
interface PagedFranchiseSchema {
|
|
21
|
+
items: FranchiseSchema[];
|
|
22
|
+
count: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type { FranchiseFilterParams as F, PagedFranchiseSchema as P, FranchiseSchema as a };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parameters for filtering franchises with pagination.
|
|
3
|
+
*/
|
|
4
|
+
interface FranchiseFilterParams {
|
|
5
|
+
/** Maximum number of results (1-100, default 100) */
|
|
6
|
+
limit?: number;
|
|
7
|
+
/** Number of results to skip for pagination */
|
|
8
|
+
offset?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Schema representing a franchise entry.
|
|
12
|
+
*/
|
|
13
|
+
interface FranchiseSchema {
|
|
14
|
+
id: string | null;
|
|
15
|
+
name: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Paginated response containing franchise schemas.
|
|
19
|
+
*/
|
|
20
|
+
interface PagedFranchiseSchema {
|
|
21
|
+
items: FranchiseSchema[];
|
|
22
|
+
count: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type { FranchiseFilterParams as F, PagedFranchiseSchema as P, FranchiseSchema as a };
|
package/package.json
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "serialstation",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "An npm package enabling integration with the SerialStation API (https://api.serialstation.com/v1/openapi.json)",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"module": "dist/index.mjs",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md",
|
|
11
|
+
"LICENSE"
|
|
12
|
+
],
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.mjs",
|
|
17
|
+
"require": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./client": {
|
|
20
|
+
"types": "./dist/client/BaseClient.d.ts",
|
|
21
|
+
"import": "./dist/client/BaseClient.mjs",
|
|
22
|
+
"require": "./dist/client/BaseClient.js"
|
|
23
|
+
},
|
|
24
|
+
"./title-ids": {
|
|
25
|
+
"types": "./dist/api/title-ids/index.d.ts",
|
|
26
|
+
"import": "./dist/api/title-ids/index.mjs",
|
|
27
|
+
"require": "./dist/api/title-ids/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./content-ids": {
|
|
30
|
+
"types": "./dist/api/content-ids/index.d.ts",
|
|
31
|
+
"import": "./dist/api/content-ids/index.mjs",
|
|
32
|
+
"require": "./dist/api/content-ids/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./games": {
|
|
35
|
+
"types": "./dist/api/games/index.d.ts",
|
|
36
|
+
"import": "./dist/api/games/index.mjs",
|
|
37
|
+
"require": "./dist/api/games/index.js"
|
|
38
|
+
},
|
|
39
|
+
"./franchises": {
|
|
40
|
+
"types": "./dist/api/franchises/index.d.ts",
|
|
41
|
+
"import": "./dist/api/franchises/index.mjs",
|
|
42
|
+
"require": "./dist/api/franchises/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./companies": {
|
|
45
|
+
"types": "./dist/api/companies/index.d.ts",
|
|
46
|
+
"import": "./dist/api/companies/index.mjs",
|
|
47
|
+
"require": "./dist/api/companies/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./types": {
|
|
50
|
+
"types": "./dist/types/index.d.ts",
|
|
51
|
+
"import": "./dist/types/index.mjs",
|
|
52
|
+
"require": "./dist/types/index.js"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "tsup src/index.ts src/client/BaseClient.ts src/api/**/index.ts src/types/index.ts --format cjs,esm --dts",
|
|
57
|
+
"dev": "tsup src/index.ts src/client/BaseClient.ts src/api/**/index.ts src/types/index.ts --format cjs,esm --dts --watch",
|
|
58
|
+
"test": "vitest",
|
|
59
|
+
"type-check": "tsc --noEmit",
|
|
60
|
+
"lint": "eslint src --ext .ts",
|
|
61
|
+
"format": "prettier --write src/**/*.ts",
|
|
62
|
+
"clean": "rimraf dist",
|
|
63
|
+
"prepublish": "npm run clean && npm run build && npm run type-check && npm pack",
|
|
64
|
+
"release": "npm version patch && npm publish"
|
|
65
|
+
},
|
|
66
|
+
"repository": {
|
|
67
|
+
"type": "git",
|
|
68
|
+
"url": "git+https://github.com/Tazhys/serialstation.git"
|
|
69
|
+
},
|
|
70
|
+
"keywords": [
|
|
71
|
+
"serialstation",
|
|
72
|
+
"api-client",
|
|
73
|
+
"typescript",
|
|
74
|
+
"psn",
|
|
75
|
+
"playstation",
|
|
76
|
+
"vita",
|
|
77
|
+
"ps3",
|
|
78
|
+
"ps4"
|
|
79
|
+
],
|
|
80
|
+
"author": "Tazhys",
|
|
81
|
+
"license": "MIT",
|
|
82
|
+
"bugs": {
|
|
83
|
+
"url": "https://github.com/Tazhys/serialstation/issues"
|
|
84
|
+
},
|
|
85
|
+
"homepage": "https://github.com/Tazhys/serialstation#readme",
|
|
86
|
+
"engines": {
|
|
87
|
+
"node": ">=16.0.0"
|
|
88
|
+
},
|
|
89
|
+
"dependencies": {
|
|
90
|
+
"axios": "^1.6.0"
|
|
91
|
+
},
|
|
92
|
+
"devDependencies": {
|
|
93
|
+
"@types/node": "^20.0.0",
|
|
94
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
95
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
96
|
+
"eslint": "^8.45.0",
|
|
97
|
+
"prettier": "^3.0.0",
|
|
98
|
+
"rimraf": "^6.1.2",
|
|
99
|
+
"tsup": "^8.0.0",
|
|
100
|
+
"typescript": "^5.9.3",
|
|
101
|
+
"vitest": "^1.0.0"
|
|
102
|
+
}
|
|
103
|
+
}
|