twitter-openapi-typescript-generated 0.0.1 → 0.0.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.
Files changed (127) hide show
  1. package/.openapi-generator-ignore +1 -2
  2. package/README.md +2 -2
  3. package/package.json +25 -26
  4. package/tools/openapi-generator-config.yaml +10 -0
  5. package/tools/win/clean.ps1 +21 -0
  6. package/tools/win/gen.ps1 +8 -0
  7. package/tools/win/init.ps1 +1 -0
  8. package/tools/win/replace.py +40 -0
  9. package/twitter-openapi/.vscode/extensions.json +3 -0
  10. package/twitter-openapi/.vscode/settings.json +9 -0
  11. package/twitter-openapi/LICENSE.txt +661 -0
  12. package/twitter-openapi/README.md +38 -0
  13. package/twitter-openapi/dist/dart/openapi-3.0.yaml +111 -0
  14. package/twitter-openapi/dist/dart/paths/bookmarks.yaml +134 -0
  15. package/twitter-openapi/dist/dart/paths/follow.yaml +262 -0
  16. package/twitter-openapi/dist/dart/paths/other.yaml +96 -0
  17. package/twitter-openapi/dist/dart/paths/post.yaml +834 -0
  18. package/twitter-openapi/dist/dart/paths/profile.yaml +152 -0
  19. package/twitter-openapi/dist/dart/paths/timeline.yaml +380 -0
  20. package/twitter-openapi/dist/dart/paths/tweet.yaml +134 -0
  21. package/twitter-openapi/dist/dart/paths/user.yaml +112 -0
  22. package/twitter-openapi/dist/dart/paths/usertweets.yaml +484 -0
  23. package/twitter-openapi/dist/dart/paths/v1.1-get.yaml +300 -0
  24. package/twitter-openapi/dist/dart/paths/v1.1-post.yaml +295 -0
  25. package/twitter-openapi/dist/dart/paths/v2.0-get.yaml +331 -0
  26. package/twitter-openapi/dist/dart/response/error.yaml +90 -0
  27. package/twitter-openapi/dist/dart/schemas/content.yaml +181 -0
  28. package/twitter-openapi/dist/dart/schemas/general.yaml +13 -0
  29. package/twitter-openapi/dist/dart/schemas/instruction.yaml +83 -0
  30. package/twitter-openapi/dist/dart/schemas/timeline.yaml +25 -0
  31. package/twitter-openapi/dist/dart/schemas/tweet.yaml +251 -0
  32. package/twitter-openapi/dist/dart/schemas/typename.yaml +19 -0
  33. package/twitter-openapi/dist/dart/schemas/user.yaml +206 -0
  34. package/twitter-openapi/dist/docs/openapi-3.0.yaml +135 -0
  35. package/twitter-openapi/dist/docs/paths/bookmarks.yaml +248 -0
  36. package/twitter-openapi/dist/docs/paths/follow.yaml +486 -0
  37. package/twitter-openapi/dist/docs/paths/other.yaml +96 -0
  38. package/twitter-openapi/dist/docs/paths/post.yaml +638 -0
  39. package/twitter-openapi/dist/docs/paths/profile.yaml +159 -0
  40. package/twitter-openapi/dist/docs/paths/timeline.yaml +730 -0
  41. package/twitter-openapi/dist/docs/paths/tweet.yaml +272 -0
  42. package/twitter-openapi/dist/docs/paths/user.yaml +152 -0
  43. package/twitter-openapi/dist/docs/paths/usertweets.yaml +1010 -0
  44. package/twitter-openapi/dist/docs/paths/v1.1-get.yaml +242 -0
  45. package/twitter-openapi/dist/docs/paths/v1.1-post.yaml +237 -0
  46. package/twitter-openapi/dist/docs/paths/v2.0-get.yaml +302 -0
  47. package/twitter-openapi/dist/docs/response/error.yaml +90 -0
  48. package/twitter-openapi/dist/docs/schemas/content.yaml +181 -0
  49. package/twitter-openapi/dist/docs/schemas/general.yaml +13 -0
  50. package/twitter-openapi/dist/docs/schemas/instruction.yaml +83 -0
  51. package/twitter-openapi/dist/docs/schemas/timeline.yaml +25 -0
  52. package/twitter-openapi/dist/docs/schemas/tweet.yaml +251 -0
  53. package/twitter-openapi/dist/docs/schemas/typename.yaml +19 -0
  54. package/twitter-openapi/dist/docs/schemas/user.yaml +206 -0
  55. package/twitter-openapi/dist/test/openapi-3.0.yaml +135 -0
  56. package/twitter-openapi/dist/test/paths/bookmarks.yaml +105 -0
  57. package/twitter-openapi/dist/test/paths/follow.yaml +204 -0
  58. package/twitter-openapi/dist/test/paths/other.yaml +96 -0
  59. package/twitter-openapi/dist/test/paths/post.yaml +485 -0
  60. package/twitter-openapi/dist/test/paths/profile.yaml +123 -0
  61. package/twitter-openapi/dist/test/paths/timeline.yaml +293 -0
  62. package/twitter-openapi/dist/test/paths/tweet.yaml +105 -0
  63. package/twitter-openapi/dist/test/paths/user.yaml +83 -0
  64. package/twitter-openapi/dist/test/paths/usertweets.yaml +368 -0
  65. package/twitter-openapi/dist/test/paths/v1.1-get.yaml +242 -0
  66. package/twitter-openapi/dist/test/paths/v1.1-post.yaml +277 -0
  67. package/twitter-openapi/dist/test/paths/v2.0-get.yaml +302 -0
  68. package/twitter-openapi/dist/test/response/error.yaml +90 -0
  69. package/twitter-openapi/dist/test/schemas/content.yaml +181 -0
  70. package/twitter-openapi/dist/test/schemas/general.yaml +13 -0
  71. package/twitter-openapi/dist/test/schemas/instruction.yaml +83 -0
  72. package/twitter-openapi/dist/test/schemas/timeline.yaml +25 -0
  73. package/twitter-openapi/dist/test/schemas/tweet.yaml +251 -0
  74. package/twitter-openapi/dist/test/schemas/typename.yaml +19 -0
  75. package/twitter-openapi/dist/test/schemas/user.yaml +206 -0
  76. package/twitter-openapi/dist/typescript/openapi-3.0.yaml +135 -0
  77. package/twitter-openapi/dist/typescript/paths/bookmarks.yaml +105 -0
  78. package/twitter-openapi/dist/typescript/paths/follow.yaml +204 -0
  79. package/twitter-openapi/dist/typescript/paths/other.yaml +96 -0
  80. package/twitter-openapi/dist/typescript/paths/post.yaml +660 -0
  81. package/twitter-openapi/dist/typescript/paths/profile.yaml +123 -0
  82. package/twitter-openapi/dist/typescript/paths/timeline.yaml +293 -0
  83. package/twitter-openapi/dist/typescript/paths/tweet.yaml +105 -0
  84. package/twitter-openapi/dist/typescript/paths/user.yaml +83 -0
  85. package/twitter-openapi/dist/typescript/paths/usertweets.yaml +368 -0
  86. package/twitter-openapi/dist/typescript/paths/v1.1-get.yaml +242 -0
  87. package/twitter-openapi/dist/typescript/paths/v1.1-post.yaml +237 -0
  88. package/twitter-openapi/dist/typescript/paths/v2.0-get.yaml +302 -0
  89. package/twitter-openapi/dist/typescript/response/error.yaml +90 -0
  90. package/twitter-openapi/dist/typescript/schemas/content.yaml +181 -0
  91. package/twitter-openapi/dist/typescript/schemas/general.yaml +13 -0
  92. package/twitter-openapi/dist/typescript/schemas/instruction.yaml +83 -0
  93. package/twitter-openapi/dist/typescript/schemas/timeline.yaml +25 -0
  94. package/twitter-openapi/dist/typescript/schemas/tweet.yaml +251 -0
  95. package/twitter-openapi/dist/typescript/schemas/typename.yaml +19 -0
  96. package/twitter-openapi/dist/typescript/schemas/user.yaml +206 -0
  97. package/twitter-openapi/requirements.txt +0 -0
  98. package/twitter-openapi/src/config/component/response_header.yaml +32 -0
  99. package/twitter-openapi/src/config/component/response_header_legacy.yaml +35 -0
  100. package/twitter-openapi/src/config/component/security_schemes.yaml +67 -0
  101. package/twitter-openapi/src/config/placeholder.json +535 -0
  102. package/twitter-openapi/src/openapi/openapi-3.0.yaml +68 -0
  103. package/twitter-openapi/src/openapi/paths/bookmarks.yaml +42 -0
  104. package/twitter-openapi/src/openapi/paths/follow.yaml +73 -0
  105. package/twitter-openapi/src/openapi/paths/other.yaml +101 -0
  106. package/twitter-openapi/src/openapi/paths/post.yaml +246 -0
  107. package/twitter-openapi/src/openapi/paths/profile.yaml +81 -0
  108. package/twitter-openapi/src/openapi/paths/timeline.yaml +98 -0
  109. package/twitter-openapi/src/openapi/paths/tweet.yaml +35 -0
  110. package/twitter-openapi/src/openapi/paths/user.yaml +35 -0
  111. package/twitter-openapi/src/openapi/paths/usertweets.yaml +94 -0
  112. package/twitter-openapi/src/openapi/paths/v1.1-get.yaml +25 -0
  113. package/twitter-openapi/src/openapi/paths/v1.1-post.yaml +25 -0
  114. package/twitter-openapi/src/openapi/paths/v2.0-get.yaml +15 -0
  115. package/twitter-openapi/src/openapi/response/error.yaml +97 -0
  116. package/twitter-openapi/src/openapi/schemas/content.yaml +190 -0
  117. package/twitter-openapi/src/openapi/schemas/general.yaml +12 -0
  118. package/twitter-openapi/src/openapi/schemas/instruction.yaml +90 -0
  119. package/twitter-openapi/src/openapi/schemas/timeline.yaml +27 -0
  120. package/twitter-openapi/src/openapi/schemas/tweet.yaml +264 -0
  121. package/twitter-openapi/src/openapi/schemas/typename.yaml +21 -0
  122. package/twitter-openapi/src/openapi/schemas/user.yaml +210 -0
  123. package/twitter-openapi/tools/__pycache__/build_config.cpython-310.pyc +0 -0
  124. package/twitter-openapi/tools/__pycache__/hooks.cpython-310.pyc +0 -0
  125. package/twitter-openapi/tools/build.py +79 -0
  126. package/twitter-openapi/tools/build_config.py +200 -0
  127. package/twitter-openapi/tools/hooks.py +265 -0
@@ -0,0 +1,94 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Twitter OpenAPI
4
+ version: 0.0.1
5
+
6
+ paths:
7
+ /graphql/{{queryId}}/UserTweets:
8
+ get:
9
+ operationId: getUserTweets
10
+ description: "get user tweets"
11
+ responses:
12
+ "200":
13
+ description: Successful operation
14
+ content:
15
+ application/json:
16
+ schema:
17
+ $ref: "#/components/schemas/UserTweetsResponse"
18
+ tags:
19
+ - "tweet"
20
+
21
+ /graphql/{{queryId}}/UserTweetsAndReplies:
22
+ get:
23
+ operationId: getUserTweetsAndReplies
24
+ description: "get user replies tweets"
25
+ responses:
26
+ "200":
27
+ description: Successful operation
28
+ content:
29
+ application/json:
30
+ schema:
31
+ $ref: "#/components/schemas/UserTweetsResponse"
32
+ tags:
33
+ - "tweet"
34
+
35
+ /graphql/{{queryId}}/UserMedia:
36
+ get:
37
+ operationId: getUserMedia
38
+ description: "get user media tweets"
39
+ responses:
40
+ "200":
41
+ description: Successful operation
42
+ content:
43
+ application/json:
44
+ schema:
45
+ $ref: "#/components/schemas/UserTweetsResponse"
46
+ tags:
47
+ - "tweet"
48
+
49
+ /graphql/{{queryId}}/Likes:
50
+ get:
51
+ operationId: getLikes
52
+ description: "get user likes tweets"
53
+ responses:
54
+ "200":
55
+ description: Successful operation
56
+ content:
57
+ application/json:
58
+ schema:
59
+ $ref: "#/components/schemas/UserTweetsResponse"
60
+ tags:
61
+ - "tweet"
62
+
63
+ components:
64
+ schemas:
65
+ UserTweetsResponse:
66
+ required:
67
+ - "data"
68
+ properties:
69
+ data:
70
+ $ref: "#/components/schemas/UserTweetsData"
71
+
72
+ UserTweetsData:
73
+ required:
74
+ - "user"
75
+ properties:
76
+ user:
77
+ $ref: "#/components/schemas/UserTweetsUser"
78
+
79
+ UserTweetsUser:
80
+ required:
81
+ - "result"
82
+ properties:
83
+ result:
84
+ $ref: "#/components/schemas/UserTweetsResult"
85
+
86
+ UserTweetsResult:
87
+ required:
88
+ - "__typename"
89
+ - "timeline_v2"
90
+ properties:
91
+ __typename:
92
+ $ref: "./../schemas/typename.yaml#/components/schemas/TypeName" # User
93
+ timeline_v2:
94
+ $ref: "./../schemas/timeline.yaml#/components/schemas/TimelineV2"
@@ -0,0 +1,25 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Twitter OpenAPI
4
+ version: 0.0.1
5
+
6
+ paths:
7
+ /1.1/friends/following/list.json:
8
+ get:
9
+ operationId: getFriendsFollowingList
10
+ description: get friends following list
11
+ responses:
12
+ "200":
13
+ description: Successful operation
14
+ tags:
15
+ - "v1.1-get"
16
+
17
+ /1.1/search/typeahead.json:
18
+ get:
19
+ operationId: getSearchTypeahead
20
+ description: get search typeahead
21
+ responses:
22
+ "200":
23
+ description: Successful operation
24
+ tags:
25
+ - "v1.1-get"
@@ -0,0 +1,25 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Twitter OpenAPI
4
+ version: 0.0.1
5
+
6
+ paths:
7
+ /1.1/friendships/create.json:
8
+ post:
9
+ operationId: postCreateFriendships
10
+ description: post create friendships
11
+ responses:
12
+ "200":
13
+ description: Successful operation
14
+ tags:
15
+ - "v1.1-post"
16
+
17
+ /1.1/friendships/destroy.json:
18
+ post:
19
+ operationId: postDestroyFriendships
20
+ description: post destroy friendships
21
+ responses:
22
+ "200":
23
+ description: Successful operation
24
+ tags:
25
+ - "v1.1-post"
@@ -0,0 +1,15 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Twitter OpenAPI
4
+ version: 0.0.1
5
+
6
+ paths:
7
+ /2/search/adaptive.json:
8
+ get:
9
+ operationId: getSearchAdaptive
10
+ description: get search adaptive
11
+ responses:
12
+ "200":
13
+ description: Successful operation
14
+ tags:
15
+ - "v2.0-get"
@@ -0,0 +1,97 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Twitter OpenAPI
4
+ version: 0.0.1
5
+
6
+ paths: {}
7
+
8
+ components:
9
+ schemas:
10
+ ErrorResponse:
11
+ type: object
12
+ required:
13
+ - errors
14
+ - data
15
+ properties:
16
+ errors:
17
+ $ref: "#/components/schemas/Errors"
18
+
19
+ Errors:
20
+ type: array
21
+ items:
22
+ $ref: "#/components/schemas/Error"
23
+
24
+ Error:
25
+ type: object
26
+ required:
27
+ - message
28
+ - locations
29
+ - path
30
+ - extensions
31
+ - code
32
+ - kind
33
+ - name
34
+ - source
35
+ - tracing
36
+ properties:
37
+ message:
38
+ type: string
39
+ locations:
40
+ type: array
41
+ items:
42
+ $ref: "#/components/schemas/Location"
43
+ path:
44
+ type: array
45
+ items:
46
+ type: string
47
+ extensions:
48
+ $ref: "#/components/schemas/Extensions"
49
+ code:
50
+ type: integer
51
+ kind:
52
+ type: string
53
+ name:
54
+ type: string
55
+ source:
56
+ type: string
57
+ tracing:
58
+ $ref: "#/components/schemas/Tracing"
59
+
60
+ Location:
61
+ type: object
62
+ required:
63
+ - line
64
+ - column
65
+ properties:
66
+ line:
67
+ type: integer
68
+ column:
69
+ type: integer
70
+
71
+ Extensions:
72
+ type: object
73
+ required:
74
+ - name
75
+ - source
76
+ - code
77
+ - kind
78
+ - tracing
79
+ properties:
80
+ name:
81
+ type: string
82
+ source:
83
+ type: string
84
+ code:
85
+ type: integer
86
+ kind:
87
+ type: string
88
+ tracing:
89
+ $ref: "#/components/schemas/Tracing"
90
+
91
+ Tracing:
92
+ type: object
93
+ required:
94
+ - trace_id
95
+ properties:
96
+ trace_id:
97
+ type: string
@@ -0,0 +1,190 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Twitter OpenAPI
4
+ version: 0.0.1
5
+
6
+ paths: {}
7
+ components:
8
+ schemas:
9
+ ContentUnion:
10
+ oneOf:
11
+ - $ref: "#/components/schemas/TimelineTimelineItem"
12
+ - $ref: "#/components/schemas/TimelineTimelineModule"
13
+ - $ref: "#/components/schemas/TimelineTimelineCursor"
14
+ discriminator:
15
+ propertyName: entryType
16
+ mapping": # deprecated
17
+ TimelineTimelineItem: "#/components/schemas/TimelineTimelineItem"
18
+ TimelineTimelineModule: "#/components/schemas/TimelineTimelineModule"
19
+ TimelineTimelineCursor: "#/components/schemas/TimelineTimelineCursor"
20
+
21
+ ContentEntryType:
22
+ type: string
23
+ enum:
24
+ [TimelineTimelineItem, TimelineTimelineCursor, TimelineTimelineModule]
25
+
26
+ TimelineTimelineItem:
27
+ required:
28
+ - "__typename"
29
+ - "entryType"
30
+ - "itemContent"
31
+ properties:
32
+ __typename:
33
+ $ref: "./typename.yaml#/components/schemas/TypeName" # TimelineTimelineItem
34
+ entryType:
35
+ type: string # enum
36
+ $ref: "#/components/schemas/ContentEntryType" # TimelineTimelineItem
37
+ itemContent:
38
+ $ref: "#/components/schemas/ItemContentUnion"
39
+ clientEventInfo:
40
+ type: object # todo
41
+ feedbackInfo:
42
+ type: object # todo
43
+
44
+ TimelineTimelineModule:
45
+ required:
46
+ - "__typename"
47
+ - "entryType"
48
+ - "displayType"
49
+ # - "items"
50
+ - "clientEventInfo"
51
+ properties:
52
+ __typename:
53
+ $ref: "./typename.yaml#/components/schemas/TypeName" # TimelineTimelineModule
54
+ entryType:
55
+ type: string # enum
56
+ $ref: "#/components/schemas/ContentEntryType" # TimelineTimelineCursor
57
+ displayType:
58
+ type: string # enum
59
+ items:
60
+ type: array
61
+ items:
62
+ $ref: "#/components/schemas/ModuleItem"
63
+ footer:
64
+ type: object # todo
65
+ header:
66
+ type: object # todo
67
+
68
+ clientEventInfo:
69
+ type: object # todo
70
+
71
+ TimelineTimelineCursor:
72
+ required:
73
+ - "__typename"
74
+ - "cursorType"
75
+ - "value"
76
+ properties:
77
+ __typename:
78
+ $ref: "./typename.yaml#/components/schemas/TypeName" # TimelineTimelineCursor
79
+ entryType:
80
+ type: string # enum
81
+ $ref: "#/components/schemas/ContentEntryType" # null | TimelineTimelineCursor
82
+ itemType:
83
+ type: string # enum
84
+ $ref: "#/components/schemas/ContentEntryType" # null | TimelineTimelineCursor
85
+ cursorType:
86
+ type: string
87
+ enum: [Top, Bottom, ShowMore, ShowMoreThreads, Gap] # Gap???
88
+ value:
89
+ type: string
90
+
91
+ # ================= Module =================
92
+
93
+ ModuleItem:
94
+ required:
95
+ - "entryId"
96
+ - "item"
97
+ properties:
98
+ entryId:
99
+ type: string
100
+ pattern: '^[a-z\-]+[0-9]+$'
101
+ item:
102
+ $ref: "#/components/schemas/ModuleEntry"
103
+
104
+ ModuleEntry:
105
+ required:
106
+ - "clientEventInfo"
107
+ - "itemContent"
108
+ properties:
109
+ clientEventInfo:
110
+ type: object # todo
111
+ itemContent:
112
+ $ref: "#/components/schemas/ItemContentUnion"
113
+
114
+ # ================= ContentItem =================
115
+
116
+ ItemContentUnion:
117
+ oneOf:
118
+ - $ref: "#/components/schemas/TimelineTweet"
119
+ - $ref: "#/components/schemas/TimelineTimelineCursor"
120
+ - $ref: "#/components/schemas/TimelineUser"
121
+ discriminator:
122
+ propertyName: itemType
123
+ mapping": # deprecated
124
+ TimelineTweet: "#/components/schemas/TimelineTweet"
125
+ TimelineTimelineCursor: "#/components/schemas/TimelineTimelineCursor"
126
+ TimelineUser: "#/components/schemas/TimelineUser"
127
+
128
+ ContentItemType:
129
+ type: string
130
+ enum: [TimelineTweet, TimelineTimelineCursor, TimelineUser]
131
+
132
+ TimelineTweet:
133
+ required:
134
+ - "__typename"
135
+ - "itemType"
136
+ - "tweetDisplayType"
137
+ - "tweet_results"
138
+ properties:
139
+ __typename:
140
+ $ref: "./typename.yaml#/components/schemas/TypeName" # TimelineTweet
141
+ itemType:
142
+ type: string # enum
143
+ $ref: "#/components/schemas/ContentItemType" # TimelineTweet
144
+ tweetDisplayType:
145
+ type: string
146
+ tweet_results:
147
+ $ref: "#/components/schemas/ItemResult"
148
+ SocialContext:
149
+ $ref: "#/components/schemas/SocialContext"
150
+ promotedMetadata:
151
+ type: object # todo
152
+
153
+ TimelineUser:
154
+ required:
155
+ - "__typename"
156
+ - "itemType"
157
+ - "socialContext"
158
+ - "userDisplayType"
159
+ - "user_results"
160
+ properties:
161
+ __typename:
162
+ $ref: "./typename.yaml#/components/schemas/TypeName" # TimelineUser
163
+ itemType:
164
+ type: string # enum
165
+ $ref: "#/components/schemas/ContentItemType" # TimelineUser
166
+ SocialContext:
167
+ $ref: "#/components/schemas/SocialContext"
168
+ userDisplayType:
169
+ type: string # enum
170
+ user_results:
171
+ $ref: "./user.yaml#/components/schemas/UserResults"
172
+
173
+ ItemResult:
174
+ required:
175
+ - "result"
176
+ properties:
177
+ __typename:
178
+ $ref: "./typename.yaml#/components/schemas/TypeName" # null | TimelineTweet
179
+ result:
180
+ $ref: "./tweet.yaml#/components/schemas/TweetUnion"
181
+
182
+ SocialContext:
183
+ type: object
184
+ properties:
185
+ contextType:
186
+ type: string # enum
187
+ text:
188
+ type: string
189
+ type:
190
+ type: string # enum
@@ -0,0 +1,12 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Twitter OpenAPI
4
+ version: 0.0.1
5
+
6
+ paths: {}
7
+ components:
8
+ schemas:
9
+ TwitterTimeFormat:
10
+ type: string
11
+ pattern: "^(Sun|Mon|Tue|Wed|Thu|Fri|Sat) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (0[1-9]|[12][0-9]|3[01]) (0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]) ([+-][0-9]{4}) ([0-9]{4})$"
12
+ example: "Sat Dec 31 23:59:59 +0000 2023"
@@ -0,0 +1,90 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Twitter OpenAPI
4
+ version: 0.0.1
5
+
6
+ paths: {}
7
+ components:
8
+ schemas:
9
+ InstructionUnion:
10
+ oneOf:
11
+ - $ref: "#/components/schemas/TimelineAddEntries"
12
+ - $ref: "#/components/schemas/TimelineClearCache"
13
+ - $ref: "#/components/schemas/TimelinePinEntry"
14
+ - $ref: "#/components/schemas/TimelineTerminateTimeline"
15
+ discriminator:
16
+ propertyName: type
17
+ mapping": # deprecated
18
+ TimelineAddEntries: "#/components/schemas/TimelineAddEntries"
19
+ TimelineClearCache: "#/components/schemas/TimelineClearCache"
20
+ TimelinePinEntry: "#/components/schemas/TimelinePinEntry"
21
+ TimelineTerminateTimeline: "#/components/schemas/TimelineTerminateTimeline"
22
+
23
+ InstructionType:
24
+ type: string
25
+ enum:
26
+ [
27
+ TimelineAddEntries,
28
+ TimelineClearCache,
29
+ TimelinePinEntry,
30
+ TimelineTerminateTimeline,
31
+ ]
32
+
33
+ TimelineAddEntries:
34
+ required:
35
+ - type
36
+ - entries
37
+ properties:
38
+ type:
39
+ type: string
40
+ $ref: "#/components/schemas/InstructionType" # TimelineAddEntries
41
+ entries:
42
+ type: array
43
+ items:
44
+ $ref: "#/components/schemas/TimelineAddEntry"
45
+
46
+ TimelineClearCache:
47
+ required:
48
+ - type
49
+ properties:
50
+ type:
51
+ type: string
52
+ $ref: "#/components/schemas/InstructionType" # TimelineClearCache
53
+
54
+ TimelinePinEntry:
55
+ required:
56
+ - type
57
+ - entry
58
+ properties:
59
+ type:
60
+ type: string
61
+ $ref: "#/components/schemas/InstructionType" # TimelinePinEntry
62
+ entry:
63
+ $ref: "#/components/schemas/TimelineAddEntry"
64
+
65
+ TimelineTerminateTimeline:
66
+ required:
67
+ - type
68
+ - direction
69
+ properties:
70
+ type:
71
+ type: string
72
+ $ref: "#/components/schemas/InstructionType" # TimelineTerminateTimeline
73
+ direction:
74
+ type: string
75
+ enum: [Top, Bottom]
76
+
77
+ TimelineAddEntry:
78
+ required:
79
+ - "content"
80
+ - "entryId"
81
+ - "sortIndex"
82
+ properties:
83
+ content:
84
+ $ref: "./content.yaml#/components/schemas/ContentUnion"
85
+ entryId:
86
+ type: string
87
+ pattern: '^[a-z\-]+[0-9]+$'
88
+ sortIndex:
89
+ type: string
90
+ pattern: "[0-9]+$"
@@ -0,0 +1,27 @@
1
+ openapi: 3.0.3
2
+ info:
3
+ title: Twitter OpenAPI
4
+ version: 0.0.1
5
+
6
+ paths: {}
7
+ components:
8
+ schemas:
9
+ TimelineV2:
10
+ required:
11
+ - "timeline"
12
+ properties:
13
+ timeline:
14
+ $ref: "#/components/schemas/Timeline"
15
+
16
+ Timeline:
17
+ required:
18
+ - "instructions"
19
+ properties:
20
+ instructions:
21
+ type: array
22
+ items:
23
+ $ref: "./../schemas/instruction.yaml#/components/schemas/InstructionUnion"
24
+ metadata:
25
+ type: object # todo
26
+ responseObjects:
27
+ type: object # todo