twitch-gql-queries 0.1.21 → 0.1.22
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/README.md +3 -1
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +24 -19
- package/dist/index.d.ts +24 -19
- package/dist/index.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Type-safe requests to twitch public GraphQL API
|
|
4
4
|
|
|
5
|
-
You can try queries right in the browser: [Swagger UI](https://twitch-gql-swagger.surge.sh) / [Scalar Swagger UI](https://twitch-gql-swagger.surge.sh/scalar/)
|
|
5
|
+
You can try queries right in the browser: [Swagger UI](https://twitch-gql-swagger.surge.sh) ([mirror](https://dmitryscaletta.github.io/twitch-gql-queries/)) / [Scalar Swagger UI](https://twitch-gql-swagger.surge.sh/scalar/) ([mirror](https://dmitryscaletta.github.io/twitch-gql-queries/scalar/))
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -12,6 +12,8 @@ You can try queries right in the browser: [Swagger UI](https://twitch-gql-swagge
|
|
|
12
12
|
* **Tests** to validate types with real requests
|
|
13
13
|
* **Zero dependencies**
|
|
14
14
|
|
|
15
|
+
See also: [twitch-api-swagger](https://github.com/DmitryScaletta/twitch-api-swagger)
|
|
16
|
+
|
|
15
17
|
## Installation
|
|
16
18
|
|
|
17
19
|
```bash
|
package/dist/index.cjs
CHANGED
|
@@ -131,7 +131,7 @@ var getQueryChannelVideoShelvesQuery = (variables) => ({
|
|
|
131
131
|
extensions: {
|
|
132
132
|
persistedQuery: {
|
|
133
133
|
version: 1,
|
|
134
|
-
sha256Hash: "
|
|
134
|
+
sha256Hash: "280f582866d0914749c1666da7adfcdb42739182b060ef4050641aa9324da19b"
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
});
|
|
@@ -215,7 +215,7 @@ var getQueryFilterableVideoTowerVideos = (variables) => ({
|
|
|
215
215
|
extensions: {
|
|
216
216
|
persistedQuery: {
|
|
217
217
|
version: 1,
|
|
218
|
-
sha256Hash: "
|
|
218
|
+
sha256Hash: "67004f7881e65c297936f32c75246470629557a393788fb5a69d6d9a25a8fd5f"
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
});
|
|
@@ -299,7 +299,7 @@ var getQueryShareClipRenderStatus = (variables) => ({
|
|
|
299
299
|
extensions: {
|
|
300
300
|
persistedQuery: {
|
|
301
301
|
version: 1,
|
|
302
|
-
sha256Hash: "
|
|
302
|
+
sha256Hash: "0a02bb974443b576f5579aab0fef1d4b7f44e58a8a256f0c5adfead0db70640f"
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -247,6 +247,7 @@ interface ChannelVideoShelvesQueryClip {
|
|
|
247
247
|
createdAt: string;
|
|
248
248
|
durationSeconds: number;
|
|
249
249
|
isFeatured: boolean;
|
|
250
|
+
isAutoCurated: boolean;
|
|
250
251
|
clipTitle: string;
|
|
251
252
|
clipViewCount: number;
|
|
252
253
|
curator: null | {
|
|
@@ -274,6 +275,10 @@ interface ChannelVideoShelvesQueryClip {
|
|
|
274
275
|
};
|
|
275
276
|
__typename: 'User';
|
|
276
277
|
};
|
|
278
|
+
broadcastIdentifier: null | {
|
|
279
|
+
id: string;
|
|
280
|
+
__typename: 'BroadcastIdOnly';
|
|
281
|
+
};
|
|
277
282
|
guestStarParticipants: null | {
|
|
278
283
|
guests: (null | {
|
|
279
284
|
id: string;
|
|
@@ -305,6 +310,10 @@ interface ChannelVideoShelvesQueryVideo {
|
|
|
305
310
|
name: string;
|
|
306
311
|
__typename: 'Game';
|
|
307
312
|
};
|
|
313
|
+
broadcastIdentifier: null | {
|
|
314
|
+
id: string;
|
|
315
|
+
__typename: 'BroadcastIdOnly';
|
|
316
|
+
};
|
|
308
317
|
owner: {
|
|
309
318
|
displayName: string;
|
|
310
319
|
id: string;
|
|
@@ -530,9 +539,6 @@ interface ClipsCardsUserClip {
|
|
|
530
539
|
embedURL: string;
|
|
531
540
|
title: string;
|
|
532
541
|
viewCount: number;
|
|
533
|
-
/**
|
|
534
|
-
* Possible values: `EN`, `DE`, `ASL`, `ZH_HK`
|
|
535
|
-
*/
|
|
536
542
|
language: string;
|
|
537
543
|
thumbnailURL: '' | string & {};
|
|
538
544
|
createdAt: string;
|
|
@@ -777,6 +783,10 @@ interface FilterableVideoTowerVideosVideo {
|
|
|
777
783
|
name: string;
|
|
778
784
|
__typename: 'Game';
|
|
779
785
|
};
|
|
786
|
+
broadcastIdentifier: null | {
|
|
787
|
+
id: string;
|
|
788
|
+
__typename: 'BroadcastIdOnly';
|
|
789
|
+
};
|
|
780
790
|
owner: null | {
|
|
781
791
|
displayName: string;
|
|
782
792
|
id: string;
|
|
@@ -920,7 +930,7 @@ interface GetPinnedChatPinnedChatMessage {
|
|
|
920
930
|
updatedAt: string;
|
|
921
931
|
endsAt: null | string;
|
|
922
932
|
pinnedMessage: GetPinnedChatMessage;
|
|
923
|
-
pinnedBy: {
|
|
933
|
+
pinnedBy: null | {
|
|
924
934
|
id: string;
|
|
925
935
|
displayName: string;
|
|
926
936
|
__typename: 'User';
|
|
@@ -1013,7 +1023,7 @@ interface SearchResultsPageChannel {
|
|
|
1013
1023
|
login: string;
|
|
1014
1024
|
profileImageURL: string;
|
|
1015
1025
|
description: null | string;
|
|
1016
|
-
broadcastSettings: {
|
|
1026
|
+
broadcastSettings: null | {
|
|
1017
1027
|
id: string;
|
|
1018
1028
|
title: string;
|
|
1019
1029
|
__typename: 'BroadcastSettings';
|
|
@@ -1022,15 +1032,12 @@ interface SearchResultsPageChannel {
|
|
|
1022
1032
|
totalCount: null | number;
|
|
1023
1033
|
__typename: 'FollowerConnection';
|
|
1024
1034
|
};
|
|
1025
|
-
|
|
1026
|
-
* If never streamed: `{ id: null, startedAt: null }`
|
|
1027
|
-
*/
|
|
1028
|
-
lastBroadcast: {
|
|
1035
|
+
lastBroadcast: null | {
|
|
1029
1036
|
id: null | string;
|
|
1030
1037
|
startedAt: null | string;
|
|
1031
1038
|
__typename: 'Broadcast';
|
|
1032
1039
|
};
|
|
1033
|
-
channel: {
|
|
1040
|
+
channel: null | {
|
|
1034
1041
|
id: string;
|
|
1035
1042
|
schedule: null | {
|
|
1036
1043
|
id: string;
|
|
@@ -1369,7 +1376,6 @@ interface ShareClipRenderStatusBroadcaster {
|
|
|
1369
1376
|
interface ShareClipRenderStatusClipAsset {
|
|
1370
1377
|
id: string;
|
|
1371
1378
|
aspectRatio: number;
|
|
1372
|
-
type: 'SOURCE' | 'RECOMPOSED';
|
|
1373
1379
|
createdAt: string;
|
|
1374
1380
|
creationState: 'CREATED' | 'CREATING';
|
|
1375
1381
|
/**
|
|
@@ -1386,6 +1392,7 @@ interface ShareClipRenderStatusClipAsset {
|
|
|
1386
1392
|
videoQualities: {
|
|
1387
1393
|
bitrate: number;
|
|
1388
1394
|
codecs: string;
|
|
1395
|
+
duration: null | number;
|
|
1389
1396
|
height: number;
|
|
1390
1397
|
width: number;
|
|
1391
1398
|
videoCodec: null | 'AVC' | 'HEVC' | string & {};
|
|
@@ -1452,21 +1459,22 @@ interface ShareClipRenderStatusClip {
|
|
|
1452
1459
|
id: string;
|
|
1453
1460
|
slug: string;
|
|
1454
1461
|
url: string;
|
|
1462
|
+
isAutoCurated: boolean;
|
|
1455
1463
|
embedURL: string;
|
|
1456
1464
|
title: string;
|
|
1457
1465
|
viewCount: number;
|
|
1458
|
-
/**
|
|
1459
|
-
* Possible values: `EN`, `DE`, `ASL`, `ZH_HK`
|
|
1460
|
-
*/
|
|
1461
1466
|
language: string;
|
|
1462
1467
|
isFeatured: boolean;
|
|
1463
1468
|
thumbnailURL: '' | string & {};
|
|
1464
1469
|
createdAt: string;
|
|
1465
1470
|
isPublished: boolean;
|
|
1471
|
+
duration: number;
|
|
1466
1472
|
durationSeconds: number;
|
|
1467
1473
|
champBadge: null;
|
|
1468
1474
|
videoOffsetSeconds: null | number;
|
|
1469
1475
|
isViewerEditRestricted: boolean;
|
|
1476
|
+
rawMediaRelativeOffset: number;
|
|
1477
|
+
rawMediaKey: string;
|
|
1470
1478
|
assets: ShareClipRenderStatusClipAsset[];
|
|
1471
1479
|
curator: null | {
|
|
1472
1480
|
id: string;
|
|
@@ -1537,14 +1545,11 @@ interface StreamMetadataUser {
|
|
|
1537
1545
|
displayName: string;
|
|
1538
1546
|
__typename: 'Team';
|
|
1539
1547
|
};
|
|
1540
|
-
channel: {
|
|
1548
|
+
channel: null | {
|
|
1541
1549
|
id: string;
|
|
1542
1550
|
__typename: 'Channel';
|
|
1543
1551
|
};
|
|
1544
|
-
|
|
1545
|
-
* If never streamed: `{ id: null, title: null }`
|
|
1546
|
-
*/
|
|
1547
|
-
lastBroadcast: {
|
|
1552
|
+
lastBroadcast: null | {
|
|
1548
1553
|
id: null | string;
|
|
1549
1554
|
title: null | string;
|
|
1550
1555
|
__typename: 'Broadcast';
|
package/dist/index.d.ts
CHANGED
|
@@ -247,6 +247,7 @@ interface ChannelVideoShelvesQueryClip {
|
|
|
247
247
|
createdAt: string;
|
|
248
248
|
durationSeconds: number;
|
|
249
249
|
isFeatured: boolean;
|
|
250
|
+
isAutoCurated: boolean;
|
|
250
251
|
clipTitle: string;
|
|
251
252
|
clipViewCount: number;
|
|
252
253
|
curator: null | {
|
|
@@ -274,6 +275,10 @@ interface ChannelVideoShelvesQueryClip {
|
|
|
274
275
|
};
|
|
275
276
|
__typename: 'User';
|
|
276
277
|
};
|
|
278
|
+
broadcastIdentifier: null | {
|
|
279
|
+
id: string;
|
|
280
|
+
__typename: 'BroadcastIdOnly';
|
|
281
|
+
};
|
|
277
282
|
guestStarParticipants: null | {
|
|
278
283
|
guests: (null | {
|
|
279
284
|
id: string;
|
|
@@ -305,6 +310,10 @@ interface ChannelVideoShelvesQueryVideo {
|
|
|
305
310
|
name: string;
|
|
306
311
|
__typename: 'Game';
|
|
307
312
|
};
|
|
313
|
+
broadcastIdentifier: null | {
|
|
314
|
+
id: string;
|
|
315
|
+
__typename: 'BroadcastIdOnly';
|
|
316
|
+
};
|
|
308
317
|
owner: {
|
|
309
318
|
displayName: string;
|
|
310
319
|
id: string;
|
|
@@ -530,9 +539,6 @@ interface ClipsCardsUserClip {
|
|
|
530
539
|
embedURL: string;
|
|
531
540
|
title: string;
|
|
532
541
|
viewCount: number;
|
|
533
|
-
/**
|
|
534
|
-
* Possible values: `EN`, `DE`, `ASL`, `ZH_HK`
|
|
535
|
-
*/
|
|
536
542
|
language: string;
|
|
537
543
|
thumbnailURL: '' | string & {};
|
|
538
544
|
createdAt: string;
|
|
@@ -777,6 +783,10 @@ interface FilterableVideoTowerVideosVideo {
|
|
|
777
783
|
name: string;
|
|
778
784
|
__typename: 'Game';
|
|
779
785
|
};
|
|
786
|
+
broadcastIdentifier: null | {
|
|
787
|
+
id: string;
|
|
788
|
+
__typename: 'BroadcastIdOnly';
|
|
789
|
+
};
|
|
780
790
|
owner: null | {
|
|
781
791
|
displayName: string;
|
|
782
792
|
id: string;
|
|
@@ -920,7 +930,7 @@ interface GetPinnedChatPinnedChatMessage {
|
|
|
920
930
|
updatedAt: string;
|
|
921
931
|
endsAt: null | string;
|
|
922
932
|
pinnedMessage: GetPinnedChatMessage;
|
|
923
|
-
pinnedBy: {
|
|
933
|
+
pinnedBy: null | {
|
|
924
934
|
id: string;
|
|
925
935
|
displayName: string;
|
|
926
936
|
__typename: 'User';
|
|
@@ -1013,7 +1023,7 @@ interface SearchResultsPageChannel {
|
|
|
1013
1023
|
login: string;
|
|
1014
1024
|
profileImageURL: string;
|
|
1015
1025
|
description: null | string;
|
|
1016
|
-
broadcastSettings: {
|
|
1026
|
+
broadcastSettings: null | {
|
|
1017
1027
|
id: string;
|
|
1018
1028
|
title: string;
|
|
1019
1029
|
__typename: 'BroadcastSettings';
|
|
@@ -1022,15 +1032,12 @@ interface SearchResultsPageChannel {
|
|
|
1022
1032
|
totalCount: null | number;
|
|
1023
1033
|
__typename: 'FollowerConnection';
|
|
1024
1034
|
};
|
|
1025
|
-
|
|
1026
|
-
* If never streamed: `{ id: null, startedAt: null }`
|
|
1027
|
-
*/
|
|
1028
|
-
lastBroadcast: {
|
|
1035
|
+
lastBroadcast: null | {
|
|
1029
1036
|
id: null | string;
|
|
1030
1037
|
startedAt: null | string;
|
|
1031
1038
|
__typename: 'Broadcast';
|
|
1032
1039
|
};
|
|
1033
|
-
channel: {
|
|
1040
|
+
channel: null | {
|
|
1034
1041
|
id: string;
|
|
1035
1042
|
schedule: null | {
|
|
1036
1043
|
id: string;
|
|
@@ -1369,7 +1376,6 @@ interface ShareClipRenderStatusBroadcaster {
|
|
|
1369
1376
|
interface ShareClipRenderStatusClipAsset {
|
|
1370
1377
|
id: string;
|
|
1371
1378
|
aspectRatio: number;
|
|
1372
|
-
type: 'SOURCE' | 'RECOMPOSED';
|
|
1373
1379
|
createdAt: string;
|
|
1374
1380
|
creationState: 'CREATED' | 'CREATING';
|
|
1375
1381
|
/**
|
|
@@ -1386,6 +1392,7 @@ interface ShareClipRenderStatusClipAsset {
|
|
|
1386
1392
|
videoQualities: {
|
|
1387
1393
|
bitrate: number;
|
|
1388
1394
|
codecs: string;
|
|
1395
|
+
duration: null | number;
|
|
1389
1396
|
height: number;
|
|
1390
1397
|
width: number;
|
|
1391
1398
|
videoCodec: null | 'AVC' | 'HEVC' | string & {};
|
|
@@ -1452,21 +1459,22 @@ interface ShareClipRenderStatusClip {
|
|
|
1452
1459
|
id: string;
|
|
1453
1460
|
slug: string;
|
|
1454
1461
|
url: string;
|
|
1462
|
+
isAutoCurated: boolean;
|
|
1455
1463
|
embedURL: string;
|
|
1456
1464
|
title: string;
|
|
1457
1465
|
viewCount: number;
|
|
1458
|
-
/**
|
|
1459
|
-
* Possible values: `EN`, `DE`, `ASL`, `ZH_HK`
|
|
1460
|
-
*/
|
|
1461
1466
|
language: string;
|
|
1462
1467
|
isFeatured: boolean;
|
|
1463
1468
|
thumbnailURL: '' | string & {};
|
|
1464
1469
|
createdAt: string;
|
|
1465
1470
|
isPublished: boolean;
|
|
1471
|
+
duration: number;
|
|
1466
1472
|
durationSeconds: number;
|
|
1467
1473
|
champBadge: null;
|
|
1468
1474
|
videoOffsetSeconds: null | number;
|
|
1469
1475
|
isViewerEditRestricted: boolean;
|
|
1476
|
+
rawMediaRelativeOffset: number;
|
|
1477
|
+
rawMediaKey: string;
|
|
1470
1478
|
assets: ShareClipRenderStatusClipAsset[];
|
|
1471
1479
|
curator: null | {
|
|
1472
1480
|
id: string;
|
|
@@ -1537,14 +1545,11 @@ interface StreamMetadataUser {
|
|
|
1537
1545
|
displayName: string;
|
|
1538
1546
|
__typename: 'Team';
|
|
1539
1547
|
};
|
|
1540
|
-
channel: {
|
|
1548
|
+
channel: null | {
|
|
1541
1549
|
id: string;
|
|
1542
1550
|
__typename: 'Channel';
|
|
1543
1551
|
};
|
|
1544
|
-
|
|
1545
|
-
* If never streamed: `{ id: null, title: null }`
|
|
1546
|
-
*/
|
|
1547
|
-
lastBroadcast: {
|
|
1552
|
+
lastBroadcast: null | {
|
|
1548
1553
|
id: null | string;
|
|
1549
1554
|
title: null | string;
|
|
1550
1555
|
__typename: 'Broadcast';
|
package/dist/index.js
CHANGED
|
@@ -77,7 +77,7 @@ var getQueryChannelVideoShelvesQuery = (variables) => ({
|
|
|
77
77
|
extensions: {
|
|
78
78
|
persistedQuery: {
|
|
79
79
|
version: 1,
|
|
80
|
-
sha256Hash: "
|
|
80
|
+
sha256Hash: "280f582866d0914749c1666da7adfcdb42739182b060ef4050641aa9324da19b"
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
});
|
|
@@ -161,7 +161,7 @@ var getQueryFilterableVideoTowerVideos = (variables) => ({
|
|
|
161
161
|
extensions: {
|
|
162
162
|
persistedQuery: {
|
|
163
163
|
version: 1,
|
|
164
|
-
sha256Hash: "
|
|
164
|
+
sha256Hash: "67004f7881e65c297936f32c75246470629557a393788fb5a69d6d9a25a8fd5f"
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
});
|
|
@@ -245,7 +245,7 @@ var getQueryShareClipRenderStatus = (variables) => ({
|
|
|
245
245
|
extensions: {
|
|
246
246
|
persistedQuery: {
|
|
247
247
|
version: 1,
|
|
248
|
-
sha256Hash: "
|
|
248
|
+
sha256Hash: "0a02bb974443b576f5579aab0fef1d4b7f44e58a8a256f0c5adfead0db70640f"
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twitch-gql-queries",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "Type-safe requests to twitch public GraphQL API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"twitch",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"remove-query": "node --no-warnings=ExperimentalWarning scripts/query.ts remove",
|
|
42
42
|
"swagger": "node --no-warnings=ExperimentalWarning scripts/swagger.ts",
|
|
43
43
|
"deploy": "pnpm swagger && surge docs twitch-gql-swagger.surge.sh",
|
|
44
|
-
"serve": "
|
|
44
|
+
"serve": "pnpx serve docs",
|
|
45
45
|
"test": "node --no-warnings=ExperimentalWarning --test **/*.test.ts",
|
|
46
46
|
"test:watch": "node --no-warnings=ExperimentalWarning --test --watch **/*.test.ts",
|
|
47
47
|
"test:types": "pnpm tsc --noEmit"
|