Giter Site home page Giter Site logo

api's Introduction

Welcome to 7TV!

7TV is an opensource platform for emotes and other streamer related tools and services.

Contributing

If you want to contribute to this repo, please read the Contributing Guidelines.

CLA

We use a Contributor License Agreement to protect the rights of contributors.

License

This project is licensed under multiple licenses. Please see the licenses in the licenses directory for more information.

Code of Conduct

This project is governed by the Contributor Covenant Code of Conduct.

Security

If you find a security vulnerability, please read the Security Policy.

Contact

If you have any questions, please contact us at [email protected].

api's People

Contributors

anatoleam avatar broadeditz avatar dependabot[bot] avatar kars0nn avatar nerixyz avatar troykomodo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

api's Issues

Bug report: Enabling an emote with multiple versions results in an older version's emote data being loaded in

Previously reported in SevenTV/EventAPI#81


Steps to reproduce:

  1. Open web chat with the 7TV extension enabled or a version of Chatterino with 7TV live events support
  2. Enable the latest version of an emote with multiple versions (ex. peepoChat, which has 63438a743d1bc89e0ff9e400 as the latest version's emote ID and 60a4038db0dc46d7b43df99a as the previous version's emote ID)
  3. Use the newly enabled emote

Expected result:

  • The latest version of the enabled emote (63438a743d1bc89e0ff9e400 for peepoChat) is shown

Actual result:

  • A previous version of the enabled emote (60a4038db0dc46d7b43df99a for peepoChat) is shown

Refreshing the page or reloading emotes on Chatterino will load in the correct version of the emote.

Tested with:

web.mp4
c2.mp4

Response from @/Nerixyz (link)

It doesn't fully send the old version. The active emote is actually correct (contains the correct id), but the emote data is incorrect.

Example from above:

{
  "actor": {}, // shortened
  "id": "60b39e943e203cc169dfc106",
  "kind": 3,
  "pushed": [
    {
      "index": 229,
      "key": "emotes",
      "type": "object",
      "value": {
        "actor_id": "60b39e943e203cc169dfc106",
        "data": {
          "animated": true,
          "flags": 0,
          "host": {
            "files": [], // shortened
            "url": "//cdn.7tv.app/emote/60a4038db0dc46d7b43df99a"
          },
          "id": "60a4038db0dc46d7b43df99a", // this id is incorrect
          "lifecycle": 3,
          "listed": true,
          "name": "peepoChat",
          "owner": {
            "avatar_url": "//cdn.7tv.app/pp/6053853cb4d31e459fdaa2dc/a94c67d7736940feb543e42024b740ef",
            "connections": null,
            "display_name": "Laden",
            "id": "6053853cb4d31e459fdaa2dc",
            "roles": [
              "60724f65e93d828bf8858789",
              "6076a86b09a4c63a38ebe801"
            ],
            "style": {
              "color": 3319890,
              "paint": null
            },
            "username": "laden"
          }
        },
        "flags": 0,
        "id": "63438a743d1bc89e0ff9e400", // this id is correct
        "name": "peepoChat",
        "timestamp": 1667503272517
      }
    }
  ]
}

I think this is rather an issue on SevenTV/Api.

Add a way to determine 7TV Premium (and relative badge) to v3 api

I could not find a way to retrieve the fact that user is subscribed to 7TV or for how much (1 month, 2 months, 3 months ecc.. milestone badges) via v3 API.

My suspects are, the subscription is somewhat related to roles 6076a86b09a4c63a38ebe801 and 6076a99409a4c63a38ebe802.

Users with Discord connections are getting Discord API numbers (0 by default now) appended with an `_` to their 7TV `username`s

This wasn't voluntary, their names were automatically changed, not on connection link, but all at once

Some examples, using the following query

{user(id:$UserID){connections{id platform username}username}}
61388d575bbacadc3386a40e
{
	"data": {
		"user": {
			"connections": [
				{
					"id": "313260532671184896",
					"platform": "DISCORD",
					"username": "dispersal#0"
				},
				{
					"id": "460691477",
					"platform": "TWITCH",
					"username": "augustcelery"
				}
			],
			"username": "dispersal_0"
		}
	}
}
60a536d1ac08622846bced71
{
	"data": {
		"user": {
			"connections": [
				{
					"id": "UCaxo5bUH82K6q7jkGc-FdCA",
					"platform": "YOUTUBE",
					"username": "UCaxo5bUH82K6q7jkGc-FdCA"
				},
				{
					"id": "156499675497627648",
					"platform": "DISCORD",
					"username": "marcfryd#0"
				},
				{
					"id": "44710465",
					"platform": "TWITCH",
					"username": "marcfryd"
				},
				{
					"id": "29770",
					"platform": "KICK",
					"username": "marc"
				}
			],
			"username": "marcfryd_0"
		}
	}
}
6150811420eaf897465a7cfd
{
	"data": {
		"user": {
			"connections": [
				{
					"id": "69966",
					"platform": "KICK",
					"username": "suko"
				},
				{
					"id": "930642795235000391",
					"platform": "DISCORD",
					"username": "SukoXI#0507"
				},
				{
					"id": "504059939",
					"platform": "TWITCH",
					"username": "sukoxi"
				}
			],
			"username": "suko_0736"
		}
	}
}

Cannot sign in because nickname owned by other twitch user id

{
  "status_code": 500,
  "status": "Internal Server Error",
  "error": "Internal Server Error",
  "error_code": 70500
}

Cannot sign in into 7tv, because i have same nickname as my old 7tv account, which is get ubbaddoned and unavailable for login because twitch account banned permanently.

Thats existed one uses: https://7tv.app/users/63bfe9633977df67e32cfe7e
Thats my current twitch id: 971211575

My opinion thats because username is unique in mongodb, but i cannot say more info because i have not access to your logs, right.

So you know better.

Capacity emote slots

What seems to be the problem?

Will it still take that long for a capacity of 1000 emotes per slot? My account has a limit of 600, many other people's has a limit of 1000. Doesn't make sense, do you have to be subscribed, pay or something?

Operating System

Microsoft Windows

Browser

Chromium (Google Chrome, Microsoft Edge, Brave, Vivaldi, etc.)

How do we replicate that?

Will it still take that long for a capacity of 1000 emotes per slot? My account has a limit of 600, many other people's has a limit of 1000. Doesn't make sense, do you have to be subscribed, pay or something?

Relevant log output

No response

When querying emote sets, `emotes[].flags` is always `0`

example query
query {
	namedEmoteSet(name: GLOBAL) {
		emotes {
			id
			name
			flags
		}
	}
}
example response
{
	"data":
	{
		"namedEmoteSet":
		{
			"emotes":
			[
				{
					"flags": 0,
					"id": "60421fe677137b000de9e683",
					"name": "reckH"
				},
				{
					"flags": 0,
					"id": "60e5d610a69fc8d27f2737b7",
					"name": "Stare"
				},
				{
					"flags": 0,
					"id": "61159e9903dae26bc706eaa6",
					"name": "RainTime"
				},
				{
					"flags": 0,
					"id": "6128ed55a50c52b1429e09dc",
					"name": "PETPET"
				},
				{
					"flags": 0,
					"id": "612fc78b9a14cebbb339b113",
					"name": "SteerR"
				},
				{
					"flags": 0,
					"id": "6185d97a8d50b5f26ee802fb",
					"name": "PartyParrot"
				},
				{
					"flags": 0,
					"id": "62589908caeec18915c90a9b",
					"name": "ApuApustaja"
				},
				{
					"flags": 0,
					"id": "6297ed14d1b61557a52b21cb",
					"name": "Gayge"
				},
				{
					"flags": 0,
					"id": "62f9936414f7d01379c00164",
					"name": "7tvM"
				},
				{
					"flags": 0,
					"id": "62fa9b8a589348b4bf5a0cb9",
					"name": "YEAHBUT7TV"
				},
				{
					"flags": 0,
					"id": "62f9c69136c62011a8c3cb80",
					"name": "PepePls"
				},
				{
					"flags": 0,
					"id": "630379cc146e50911495d1f9",
					"name": "BillyApprove"
				},
				{
					"flags": 0,
					"id": "62e5d3fb05e2ed080d607eba",
					"name": "WAYTOODANK"
				},
				{
					"flags": 0,
					"id": "63018e81f7723932b45bff60",
					"name": "peepoHappy"
				},
				{
					"flags": 0,
					"id": "63019cd97f31c2c757a21162",
					"name": "peepoSad"
				},
				{
					"flags": 0,
					"id": "62e5ca6970577c2a6052bdec",
					"name": "nymnCorn"
				},
				{
					"flags": 0,
					"id": "62e5cf96163405166d920caf",
					"name": "GuitarTime"
				},
				{
					"flags": 0,
					"id": "62e5ce1ba1a665fe6efd5b98",
					"name": "CrayonTime"
				},
				{
					"flags": 0,
					"id": "62fc0a0c4a75fd54bd3520a9",
					"name": "Clap"
				},
				{
					"flags": 0,
					"id": "63037f9eaff63f446aeff4d0",
					"name": "Clap2"
				},
				{
					"flags": 0,
					"id": "62e5c83ce87e1a6f2d008e77",
					"name": "PianoTime"
				},
				{
					"flags": 0,
					"id": "63045f7dd9bf10a26e1a1d02",
					"name": "knaDyppaHopeep"
				},
				{
					"flags": 0,
					"id": "6304adb24fafee6e8608b854",
					"name": "RoxyPotato"
				},
				{
					"flags": 0,
					"id": "630393c6dd2e5e55608ef9f6",
					"name": "AlienDance"
				},
				{
					"flags": 0,
					"id": "63065e06464de28875c511fe",
					"name": "AYAYA"
				},
				{
					"flags": 0,
					"id": "62e5c88ba1a665fe6efd5aa2",
					"name": "TeaTime"
				},
				{
					"flags": 0,
					"id": "63071aeeb7e5a120600a432a",
					"name": "BasedGod"
				},
				{
					"flags": 0,
					"id": "63071b57464de28875c5252f",
					"name": "RebeccaBlack"
				},
				{
					"flags": 0,
					"id": "63071bb9464de28875c52531",
					"name": "FeelsDankMan"
				},
				{
					"flags": 0,
					"id": "630660200e929d2fde44db5b",
					"name": "FeelsOkayMan"
				},
				{
					"flags": 0,
					"id": "63065faf0e929d2fde44db56",
					"name": "WineTime"
				},
				{
					"flags": 0,
					"id": "6306613d449e6f5ff95cb5ff",
					"name": "forsenPls"
				},
				{
					"flags": 0,
					"id": "63065ef00e929d2fde44db51",
					"name": "gachiGASM"
				},
				{
					"flags": 0,
					"id": "63065b00b7e5a120600a2df6",
					"name": "FeelsStrongMan"
				},
				{
					"flags": 0,
					"id": "63071ba3449e6f5ff95cca6d",
					"name": "RareParrot"
				},
				{
					"flags": 0,
					"id": "63071b80942ffb69e13d700f",
					"name": "EZ"
				},
				{
					"flags": 0,
					"id": "6306606b28f42e96cc0df332",
					"name": "FeelsWeirdMan"
				},
				{
					"flags": 0,
					"id": "63066409170b2d3c2cfc53f1",
					"name": "gachiBASS"
				},
				{
					"flags": 0,
					"id": "63065b70be8c19d70f9d6633",
					"name": "ppL"
				}
			]
		}
	}
}

Now when you open PETPET (6128ed55a50c52b1429e09dc) on the site, and check the GQL query, you get the right 0w flag (256)

query
query Emote($id: ObjectID!) {
	emote(id: $id) {
		id
		created_at
		name
		lifecycle
		listed
		trending
		tags
		owner {
			id
			username
			display_name
			avatar_url
			style {
				color
				__typename
			}
			__typename
		}
		flags
		host {
			url
			__typename
		}
		versions {
			id
			name
			description
			created_at
			lifecycle
			listed
			host {
				url
				files {
					name
					format
					width
					height
					size
					__typename
				}
				__typename
			}
			__typename
		}
		animated
		__typename
	}
}
response
{
	"data": {
		"emote": {
			"id": "6128ed55a50c52b1429e09dc",
			"created_at": "2021-08-27T13:49:09Z",
			"name": "PETPET",
			"lifecycle": 3,
			"listed": true,
			"trending": null,
			"tags": [],
			"owner": {
				"id": "60af6678a564afa26e61f9b5",
				"username": "yamadaaoi",
				"display_name": "YamadaAoi",
				"avatar_url": "//static-cdn.jtvnw.net/jtv_user_pictures/yamadaaoi-profile_image-375227b0e5200d1c-70x70.jpeg",
				"style": {
					"color": 0,
					"__typename": "UserStyle"
				},
				"__typename": "UserPartial"
			},
			"flags": 256,
			"host": {
				"url": "//cdn.7tv.app/emote/6128ed55a50c52b1429e09dc",
				"__typename": "ImageHost"
			},
			"versions": [
				{
					"id": "6128ed55a50c52b1429e09dc",
					"name": "",
					"description": "",
					"created_at": "2021-08-27T13:49:09Z",
					"lifecycle": 3,
					"listed": true,
					"host": {
						"url": "//cdn.7tv.app/emote/6128ed55a50c52b1429e09dc",
						"files": [
							{
								"name": "1x.avif",
								"format": "AVIF",
								"width": 32,
								"height": 32,
								"size": 4054,
								"__typename": "Image"
							},
							{
								"name": "1x.webp",
								"format": "WEBP",
								"width": 32,
								"height": 32,
								"size": 3582,
								"__typename": "Image"
							},
							{
								"name": "2x.avif",
								"format": "AVIF",
								"width": 64,
								"height": 64,
								"size": 6739,
								"__typename": "Image"
							},
							{
								"name": "2x.webp",
								"format": "WEBP",
								"width": 64,
								"height": 64,
								"size": 7780,
								"__typename": "Image"
							},
							{
								"name": "3x.avif",
								"format": "AVIF",
								"width": 96,
								"height": 96,
								"size": 10110,
								"__typename": "Image"
							},
							{
								"name": "3x.webp",
								"format": "WEBP",
								"width": 96,
								"height": 96,
								"size": 13366,
								"__typename": "Image"
							},
							{
								"name": "4x.avif",
								"format": "AVIF",
								"width": 128,
								"height": 128,
								"size": 13693,
								"__typename": "Image"
							},
							{
								"name": "4x.webp",
								"format": "WEBP",
								"width": 128,
								"height": 128,
								"size": 16666,
								"__typename": "Image"
							}
						],
						"__typename": "ImageHost"
					},
					"__typename": "EmoteVersion"
				}
			],
			"animated": true,
			"__typename": "Emote"
		}
	}
}

SearchEmotes query in v3 GraphQL API returns the same results for all pages > 25

Hey I originally ran across this issue while just browsing the website looking for emotes to add to my twitch channel. There's tons of emotes available, so I wanted to take a look at which ones I could possibly add.

It came to my attention though that after I reached page 25 of the top emotes, I was not seeing any new emotes. So I went into the network inspector to try to see what was going on, and I noticed that the GraphQL request was returning the same content for each request, even with a new page number. This only happened with page numbers above 25.

Page 23-25 showing unique emotes
Screen Shot 2023-09-12 at 7 09 10 AM
Screen Shot 2023-09-12 at 7 09 16 AM
Screen Shot 2023-09-12 at 7 09 21 AM

Page 25+ showing duplicate emotes
Screen Shot 2023-09-12 at 7 09 28 AM
Screen Shot 2023-09-12 at 7 09 30 AM
Screen Shot 2023-09-12 at 7 09 33 AM
Screen Shot 2023-09-12 at 7 09 35 AM
Screen Shot 2023-09-12 at 7 09 36 AM

I also went ahead and ran the requests myself with postman to see if the behavior was the same, and it was. I could get more emotes to show up by increasing the limit per page, but the duplication behavior after page 25 did not change.

Postman page 23-25 unique results
Screen Shot 2023-09-12 at 6 57 43 AM
Screen Shot 2023-09-12 at 6 57 55 AM
Screen Shot 2023-09-12 at 6 58 03 AM

Postman page 25+ duplicate results
Screen Shot 2023-09-12 at 6 58 08 AM
Screen Shot 2023-09-12 at 6 58 32 AM
Screen Shot 2023-09-12 at 6 58 42 AM
Screen Shot 2023-09-12 at 6 58 50 AM

I'd go over the API myself to see if I could find the issue, but I'm limited on time and not very familiar with Go.

Thanks to anyone who takes a look at this!

Emotes no longer reflect the set count nor channels using the emotes

Since a backend maintenance I can't remember the exact date of, emotes seem to no longer update the number of channels they have been enabled for nor return a list of channels using the emotes.

When adding an emote to a set mutation ChangeEmoteInSet is sent to the GQL twice, probably to fix an issue where it wouldn't always do this on the first attempt in the past?
image

After checking the emote's count and channels it still shows 0 for a fresh emote (Even ones that have been up there since at least December 5th).
image

When checking the GQL in the network logging of the devtools the count stats at 0 for this specific emote
image
image

When checking an older, more popular emote I do see a number, but this also won't update anymore and there is also no list channels currently using the emote (Also activity seems to be missing here).
image
image
image
image
image

Dec. 5th emote ID: 656f22bf993668f0217a8e5d
Old emote ID: 6437c75aaa32f7b42f3f4273

I did try using different browsers, different internet connections (also meaning different PCs like my home computers and office laptop), with and without a PiHole in the network, using different DNS providers and looking at it without being logged in.

I know of at least a couple dozen users that seem to be experiencing the same problem but feel afraid to report it in Discord for each their own reason, so I hope this issue reaches you well. :)

I tried looking at the repo's code but GQL in GoLang is just not my cuppa-tea.

Is version 2 of the API still supported?

Hey there, I just noticed that all of our integrations for 7TV API v2 stopped working. I can see some "documentation" for v3, but can't see any info about migration or anything specific to help me actually use it. I looked here https://7tv.io/docs

Are there any notes about this?
All we need is to access
https://api.7tv.app/v2/emotes/global
and
https://api.7tv.app/v2/users/{twitchUserId}/emotes

Previously it was really easy just be calling GET for these two endpoints. How to migrate this as easily as possible?

Add way to update 7TV site username after change on Twitch

Currently my user (id: 632f7a86609c358bd8c232ca) shows on the 7TV site as the username 0xL1LY even after I changed it on Twitch which as of current is the only way to login to your 7TV account.

It would be really nice to reflect that change considering that, or a way to change your username on 7TV manually.

edit: clarity

Emotes in ~4 day period can't be resolved with extensionless CDN link

Emotes uploaded between 2022-07-13T08:14:00 and 2022-07-17T13:112:00 are unable to be resolved with their extensionless CDN link (e.g. https://cdn.7tv.app/emote/62d40ad49be195fd6d68a23b/4x). This causes chatterino to fail when rending the emote as it receives a bad result.

Issue appears to have started from this emote ID (conveniently uploaded by @TroyKomodo ): 62ce7ee4b6813bf221c8d43e
and stopped after this emote ID: 62d40ad49be195fd6d68a23b.

I assume this was fixed by 776565e for emotes after that period, but a fix was not done to existing emotes. All of the emotes in that range still fail to render in chatterino7.

Merging multiple origin sets does not work correctly

When using multiple origin sets with conflicting emote names they do not get merged correctly.

Example Set 1 containing emotes:
A
B
C
D

Example set 2 containing variants of some of these emotes:
A
B
C

When adding both sets as an origin set to a new empty set the resulting set should have each emote once. Instead the resulting set will have the expected amount of items but there will be duplicates and some emotes go missing.
e.g. the resulting set might look like
A
A
B
C

where emote D has vanished

I've set up an example of this here
https://7tv.app/users/643599800fe566f611c49fcd
Clueless appears twice and COPIUM has gone missing

[IDEA] using api to add/remove emotes

the ability to make a twitch bot that listens to a command (!emoterequest [link/id]) and then it adds that emote (if the tags are ok (being able to exclude tags (for example nsfw))).

Add Way in v3 API to pull list of User Emotes

In API v2 you could call:

https://api.7tv.app/v2/users/<user ID>/emotes

and receive a JSON output of all emotes added to a user. This functionality does not seem to be present in v3. I use this functionality to maintain a list of user emotes that can be called on by chatbots.

[BUG] `/config/extension(-nightly)?` report the wrong version

As of right now, the response to https://7tv.io/v3/config/extension is

{"version":"3.0.9","overrides":[],"compatibility":[{"id":["ajopnjidmegmdimjlfnijceegpefgped","[email protected]"],"issues":[{"platform":null,"severity":"NOTE","message":"7TV supports BetterTTV emotes by default"},{"platform":null,"severity":"DUPLICATE_FUNCTIONALITY","message":"A significant amount of functionality from this extension is also in 7TV. While there is no known immediate clashing with this extension, such redundancy may decrease performance"}]},{"id":["fadndhdgpmmaapbmfcknlfgcflmmmieb","[email protected]"],"issues":[{"platform":null,"severity":"NOTE","message":"7TV supports FrankerFaceZ emotes by default. This extension is compatibility-tested by our team. However, many of its features may currently be unavailable. We are working on improving integration."}]},{"id":["fooolghllnmhmmndgjiamiiodkpenpbb"],"issues":[{"platform":null,"severity":"BAD_PERFORMANCE","message":"This extension attempts to hook the chat input box, which is partially prevented by 7TV. This leads to severe lag spikes. Please consider switching to a different password manager"},{"platform":null,"severity":"WARNING","message":"Our analysis of this extension revealed that it's highly obfuscated and appears to be extremely inefficient"}]},{"id":["ipnllhnoiiclnoonckahfcpahgehgdgb"],"issues":[{"platform":null,"severity":"CLASHING","message":"This extension is wholly incompatible with 7TV's high-performance chat and breaks layout"}]},{"id":["bhplkbgoehhhddaoolmakpocnenplmhf","twitch5@coolcmd"],"issues":[{"platform":null,"severity":"WARNING","message":"7TV cannot function with this extension because it runs inside its own isolated context. Please disable it."}]}]}

On both Firefox and Edge (wanted to test a non-Firefox browser because of the issues with extension distribution). Note that the endpoint reports the 3.0.9 version, although the most recent stable is 3.0.16. This is a bit misleading, because that means the website https://7tv.app/ reports the wrong versions on the downloads buttons

The 7tv.app website with emphasis on the Download Extension button advertising the wrong version

This is a bit misleading and led me to believe I was up to date when I wasn't (I'm using Firefox so I assume I have to install the extension manually from the website). It looks like the extension versions are coming from a mongo read, I assume that the CI on the extension should update it automatically but doesn't, or it's a manual update to do? Note that hitting Download here downloads the actual latest version, so it's really just cosmetic

[BUG] Nickname Color Bug in Twitch Chat on Windows 11 Edge

Describe the issue
The colored 7tv subscriber nickname occasionally gets replaced with the stock basic from Twitch when sending messages in the chat.
The problem is not client-side (imo), because I can see same thing at streamers side in stream picture. Also I can see that other 7tv subscribers are also having same issue.

Where does the issue happen
Website - twitch.tv

Steps to Reproduce

  1. Open Microsoft Edge browser version 120.0.2210.133.
  2. Navigate to the twitch.tv website.
  3. Log in to your account.
  4. Verify that you are a 7tv subscriber with a colored nickname.
  5. Enter a chat room.
  6. Send a message in the chat.

Expected Behavior
The expectation is to consistently see the fancy colored 7tv subscriber nickname every time a message is sent in the chat.

Environment

OS: Windows 11
Web Browser: Microsoft Edge 120.0.2210.133

Query for emote by name?

Is there a way to query for emotes by name? I'm looking at the docs (https://7tv.io/docs) and the Search Emotes is what I'm looking to use. However, using /emotes/emote-name does not work as it expects an ID for that path. I also have tried /emotes?query=emote-name but that still is not correct.

How do I use the /emotes endpoint to get emotes by searching for a particular emote name?

Swagger schemas are missing the `required` field

I use swagger.json for generating typescript definitions:

npx openapi-typescript https://github.com/SevenTV/API/raw/dev/internal/api/rest/v3/docs/swagger.json

And now it generates types where all fields in schemas are optional, because they are missing the required field.

export interface definitions {
  // ...
  "model.ActiveEmoteModel": {
    actor_id?: string;
    data?: definitions["model.EmotePartialModel"];
    flags?: definitions["model.ActiveEmoteFlagModel"];
    id?: string;
    name?: string;
    origin_id?: string;
    timestamp?: number;
  };
  // ...
}

Schema Object Examples with required in the docs: https://swagger.io/specification/v2/#:~:text=Schema%20Object%20Examples
Example how it should look like:

{
  "model.ActiveEmoteModel": {
    "type": "object",
+    "required": [
+      "actor_id",
+      "data",
+      "flags",
+      "id",
+      "name",
+      "origin_id",
+      "timestamp",
+    ],
    "properties": {
      "actor_id": {
        "type": "string",
        "x-nullable": true
      },
      "data": {
        "allOf": [
          {
            "$ref": "#/definitions/model.EmotePartialModel"
          }
        ],
        "x-nullable": true
      },
      "flags": {
        "$ref": "#/definitions/model.ActiveEmoteFlagModel"
      },
      "id": {
        "type": "string"
      },
      "name": {
        "type": "string"
      },
      "origin_id": {
        "type": "string",
        "x-omitempty": true
      },
      "timestamp": {
        "type": "integer"
      }
    }
  },
}
Full generated types with openapi-typescript
/**
 * This file was auto-generated by openapi-typescript.
 * Do not make direct changes to the file.
 */

export interface paths {
  "/emote-sets": {
    /** Search for Emote Sets */
    get: {
      parameters: {
        query: {
          /** search by emote set name / tags */
          query?: string;
        };
      };
      responses: {
        /** OK */
        200: {
          schema: definitions["model.EmoteSetModel"][];
        };
      };
    };
  };
 // ...
}

export interface definitions {
  "model.ActiveEmoteFlagModel": 1 | 65536 | 131072 | 262144;
  "model.ActiveEmoteModel": {
    actor_id?: string;
    data?: definitions["model.EmotePartialModel"];
    flags?: definitions["model.ActiveEmoteFlagModel"];
    id?: string;
    name?: string;
    origin_id?: string;
    timestamp?: number;
  };
  "model.CosmeticBadgeModel": {
    host?: definitions["model.ImageHost"];
    id?: string;
    name?: string;
    tag?: string;
    tooltip?: string;
  };
  "model.CosmeticPaintCanvasRepeat":
    | "no-repeat"
    | "repeat-x"
    | "repeat-y"
    | "revert"
    | "round"
    | "space";
  "model.CosmeticPaintFlair": {
    /** Base64-encoded image or vector data */
    data?: string;
    /** The height of the flair */
    height?: number;
    /** The kind of sprite */
    kind?: definitions["model.CosmeticPaintFlairKind"];
    /** The width of the flair */
    width?: number;
    /** The X offset of the flair (%) */
    x_offset?: number;
    /** The Y offset of the flair (%) */
    y_offset?: number;
  };
  "model.CosmeticPaintFlairKind": "IMAGE" | "VECTOR" | "TEXT";
  "model.CosmeticPaintFunction": "LINEAR_GRADIENT" | "RADIAL_GRADIENT" | "URL";
  "model.CosmeticPaintGradient": {
    /** The degree angle of the gradient (does not apply if function is URL) */
    angle?: number;
    /** Gradient position (X/Y % values) */
    at?: number[];
    /** The repeat mode of the canvas */
    canvas_repeat?: definitions["model.CosmeticPaintCanvasRepeat"];
    /** The canvas size for the paint */
    canvas_size?: number[];
    /** The function used to generate the paint (i.e gradients or an image) */
    function?: definitions["model.CosmeticPaintFunction"];
    /** For a URL-based paint, the URL to an image */
    image_url?: string;
    /** Whether or not the gradient repeats outside its original area */
    repeat?: boolean;
    /** For a radial gradient, the shape of the gradient */
    shape?: string;
    /**
     * A list of gradients. There may be any amount, which can be stacked onto each other
     * Gradient stops, a list of positions and colors
     */
    stops?: definitions["model.CosmeticPaintGradientStop"][];
  };
  "model.CosmeticPaintGradientStop": {
    at?: number;
    /** the center position for the gradient. X/Y % values (for radial gradients only) */
    center_at?: number[];
    color?: number;
  };
  "model.CosmeticPaintModel": {
    /** use `gradients` */
    angle?: number;
    color?: number;
    flairs?: definitions["model.CosmeticPaintFlair"][];
    /** use `gradients` */
    function?: "LINEAR_GRADIENT" | "RADIAL_GRADIENT" | "URL";
    gradients?: definitions["model.CosmeticPaintGradient"][];
    id?: string;
    /** use `gradients` */
    image_url?: string;
    name?: string;
    /** use `gradients` */
    repeat?: boolean;
    /** A list of shadows. There may be any amount, which can be stacked onto each other */
    shadows?: definitions["model.CosmeticPaintShadow"][];
    /** use `gradients` */
    shape?: string;
    /** use `gradients` */
    stops?: definitions["model.CosmeticPaintGradientStop"][];
    text?: definitions["model.CosmeticPaintText"];
  };
  "model.CosmeticPaintShadow": {
    color?: number;
    radius?: number;
    x_offset?: number;
    y_offset?: number;
  };
  "model.CosmeticPaintStroke": {
    /** Stroke color */
    color?: number;
    /** Stroke width */
    width?: number;
  };
  "model.CosmeticPaintText": {
    /** Shadows applied to the text */
    shadows?: definitions["model.CosmeticPaintShadow"][];
    /** Text stroke */
    stroke?: definitions["model.CosmeticPaintStroke"];
    /** Text tranformation */
    transform?: definitions["model.CosmeticPaintTextTransform"];
    /** (css) font variant property. non-standard */
    variant?: string;
    /** Weight multiplier for the text. Defaults to 9x is not specified */
    weight?: number;
  };
  "model.CosmeticPaintTextTransform": "uppercase" | "lowercase";
  "model.EmoteFlagsModel": 1 | 2 | 256 | 65536 | 131072 | 262144 | 16777216;
  "model.EmoteLifecycleModel": -1 | 0 | 1 | 2 | 3 | -2;
  "model.EmoteModel": {
    animated?: boolean;
    flags?: definitions["model.EmoteFlagsModel"];
    host?: definitions["model.ImageHost"];
    id?: string;
    lifecycle?: definitions["model.EmoteLifecycleModel"];
    listed?: boolean;
    name?: string;
    owner?: definitions["model.UserPartialModel"];
    state?: definitions["model.EmoteVersionState"][];
    tags?: string[];
    versions?: definitions["model.EmoteVersionModel"][];
  };
  "model.EmotePartialModel": {
    animated?: boolean;
    flags?: definitions["model.EmoteFlagsModel"];
    host?: definitions["model.ImageHost"];
    id?: string;
    lifecycle?: definitions["model.EmoteLifecycleModel"];
    listed?: boolean;
    name?: string;
    owner?: definitions["model.UserPartialModel"];
    state?: definitions["model.EmoteVersionState"][];
    tags?: string[];
  };
  "model.EmoteSetFlagModel": 1 | 2 | 4 | 8;
  "model.EmoteSetModel": {
    capacity?: number;
    emote_count?: number;
    emotes?: definitions["model.ActiveEmoteModel"][];
    flags?: definitions["model.EmoteSetFlagModel"];
    id?: string;
    immutable?: boolean;
    name?: string;
    origins?: definitions["model.EmoteSetOrigin"][];
    owner?: definitions["model.UserPartialModel"];
    privileged?: boolean;
    tags?: string[];
  };
  "model.EmoteSetOrigin": {
    id?: string;
    slices?: number[];
    weight?: number;
  };
  "model.EmoteSetPartialModel": {
    capacity?: number;
    flags?: definitions["model.EmoteSetFlagModel"];
    id?: string;
    name?: string;
    owner?: definitions["model.UserPartialModel"];
    tags?: string[];
  };
  "model.EmoteVersionModel": {
    animated?: boolean;
    createdAt?: number;
    description?: string;
    host?: definitions["model.ImageHost"];
    id?: string;
    lifecycle?: definitions["model.EmoteLifecycleModel"];
    listed?: boolean;
    name?: string;
    state?: definitions["model.EmoteVersionState"][];
  };
  "model.EmoteVersionState": "LISTED" | "PERSONAL" | "NO_PERSONAL";
  "model.ImageFile": {
    format?: definitions["model.ImageFormat"];
    frame_count?: number;
    height?: number;
    name?: string;
    size?: number;
    /** deprecated */
    static_name?: string;
    width?: number;
  };
  "model.ImageFormat": "AVIF" | "WEBP";
  "model.ImageHost": {
    files?: definitions["model.ImageFile"][];
    url?: string;
  };
  "model.PresenceKind": 0 | 1 | 2;
  "model.PresenceModel": {
    id?: string;
    kind?: definitions["model.PresenceKind"];
    timestamp?: number;
    ttl?: number;
    user_id?: string;
  };
  "model.UserConnectionModel": {
    /** The display name of the user on the platform. */
    display_name?: string;
    /** The maximum size of emote sets that may be bound to this connection. */
    emote_capacity?: number;
    /** The emote set that is linked to this connection */
    emote_set?: definitions["model.EmoteSetModel"];
    /** The ID of the emote set bound to this connection. */
    emote_set_id?: string;
    id?: string;
    /** The time when the user linked this connection */
    linked_at?: number;
    /** The service of the connection. */
    platform?: "TWITCH" | "YOUTUBE" | "DISCORD";
    /** A list of users active in the channel */
    presences?: definitions["model.UserPartialModel"][];
    /** App data for the user */
    user?: definitions["model.UserModel"];
    /** The username of the user on the platform. */
    username?: string;
  };
  "model.UserConnectionPartialModel": {
    /** The display name of the user on the platform. */
    display_name?: string;
    /** The maximum size of emote sets that may be bound to this connection. */
    emote_capacity?: number;
    /** The emote set that is linked to this connection */
    emote_set_id?: string;
    id?: string;
    /** The time when the user linked this connection */
    linked_at?: number;
    /** The service of the connection. */
    platform?: "TWITCH" | "YOUTUBE" | "DISCORD";
    /** The username of the user on the platform. */
    username?: string;
  };
  "model.UserEditorModel": {
    added_at?: number;
    id?: string;
    permissions?: number;
    visible?: boolean;
  };
  "model.UserModel": {
    avatar_url?: string;
    biography?: string;
    connections?: definitions["model.UserConnectionModel"][];
    created_at?: number;
    display_name?: string;
    editors?: definitions["model.UserEditorModel"][];
    emote_sets?: definitions["model.EmoteSetPartialModel"][];
    id?: string;
    roles?: string[];
    style?: definitions["model.UserStyle"];
    type?: "" | "BOT" | "SYSTEM";
    username?: string;
  };
  "model.UserPartialModel": {
    avatar_url?: string;
    connections?: definitions["model.UserConnectionPartialModel"][];
    display_name?: string;
    id?: string;
    roles?: string[];
    style?: definitions["model.UserStyle"];
    type?: "" | "BOT" | "SYSTEM";
    username?: string;
  };
  "model.UserStyle": {
    badge?: definitions["model.CosmeticBadgeModel"];
    badge_id?: string;
    color?: number;
    paint?: definitions["model.CosmeticPaintModel"];
    paint_id?: string;
  };
}

export interface operations {}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.