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
@@ -1,4 +1,3 @@
1
1
  tools/**
2
2
  twitter-openapi/**
3
- LICENSE.txt
4
- package.json
3
+ LICENSE.txt
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## twitter-openapi-typescript-generated@0.0.1
1
+ ## twitter-openapi-typescript-generated@0.0.2
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install twitter-openapi-typescript-generated@0.0.1 --save
39
+ npm install twitter-openapi-typescript-generated@0.0.2 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
package/package.json CHANGED
@@ -1,26 +1,25 @@
1
- {
2
- "name": "twitter-openapi-typescript-generated",
3
- "version": "0.0.1",
4
- "description": "OpenAPI client for twitter-openapi-typescript-generated",
5
- "author": "OpenAPI-Generator",
6
- "author": "fa0311",
7
- "license": "LGPL-3.0-only",
8
- "repository": {
9
- "type": "git",
10
- "url": "https://github.com/fa0311/twitter-openapi-typescript.git"
11
- },
12
- "keywords": [
13
- "twitter",
14
- "api",
15
- "typescript"
16
- ],
17
- "main": "./dist/index.js",
18
- "typings": "./dist/index.d.ts",
19
- "scripts": {
20
- "build": "tsc",
21
- "prepare": "npm run build"
22
- },
23
- "devDependencies": {
24
- "typescript": "^4.0"
25
- }
26
- }
1
+ {
2
+ "name": "twitter-openapi-typescript-generated",
3
+ "version": "0.0.2",
4
+ "description": "OpenAPI client for twitter-openapi-typescript-generated",
5
+ "author": "fa0311",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/fa0311/twitter-openapi-typescript.git"
9
+ },
10
+ "main": "./dist/index.js",
11
+ "typings": "./dist/index.d.ts",
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "prepare": "npm run build"
15
+ },
16
+ "devDependencies": {
17
+ "typescript": "^4.0"
18
+ },
19
+ "license": "LGPL-3.0-only",
20
+ "keywords": [
21
+ "twitter",
22
+ "api",
23
+ "typescript"
24
+ ]
25
+ }
@@ -0,0 +1,10 @@
1
+ inputSpec: twitter-openapi/dist/typescript/openapi-3.0.yaml
2
+ outputDir: .
3
+ npmName: twitter-openapi-typescript-generated
4
+ npmVersion: 0.0.2
5
+
6
+ # withoutRuntimeChecks: false
7
+ legacyDiscriminatorBehavior: false
8
+ # modelPropertyNaming: original
9
+ # stringEnums: true
10
+ # paramNaming: original
@@ -0,0 +1,21 @@
1
+ # Remove-Item -Recurse .openapi-generator
2
+ # Remove-Item -Recurse .gitignore
3
+ # Remove-Item -Recurse .npmignore
4
+ # Remove-Item -Recurse api.ts
5
+ # Remove-Item -Recurse base.ts
6
+ # Remove-Item -Recurse common.ts
7
+ # Remove-Item -Recurse configuration.ts
8
+ # Remove-Item -Recurse git_push.sh
9
+ # Remove-Item -Recurse index.ts
10
+
11
+ Remove-Item -Recurse .openapi-generator
12
+ Remove-Item -Recurse src
13
+ Remove-Item -Recurse .gitignore
14
+ Remove-Item -Recurse .npmignore
15
+ Remove-Item -Recurse package.json
16
+ Remove-Item -Recurse README.md
17
+ Remove-Item -Recurse tsconfig.json
18
+ Remove-Item -Recurse dist
19
+
20
+ # Remove-Item -Recurse package-lock.json
21
+ # Remove-Item -Recurse node_modules
@@ -0,0 +1,8 @@
1
+
2
+ ./twitter-openapi/.venv/Scripts/Activate.ps1
3
+ Start-Process -FilePath "python" -ArgumentList "tools/build.py" -WorkingDirectory "twitter-openapi" -Wait -NoNewWindow
4
+
5
+ tools/win/clean.ps1
6
+ java -jar tools/openapi-generator-cli.jar generate -g typescript-fetch -c tools/openapi-generator-config.yaml --git-repo-id twitter-openapi-typescript --git-user-id fa0311
7
+ python tools/win/replace.py
8
+ npm install
@@ -0,0 +1 @@
1
+ Invoke-WebRequest -OutFile tools/openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/6.6.0/openapi-generator-cli-6.6.0.jar
@@ -0,0 +1,40 @@
1
+ import glob
2
+ import json
3
+
4
+
5
+ for file in glob.glob("src/**/*.ts", recursive=True):
6
+ with open(file, mode="r", encoding="utf-8") as f:
7
+ text = f.read()
8
+
9
+ text = text.replace("json['typename']", "json['__typename']")
10
+ text = text.replace("json['typename']", "json['__typename']")
11
+
12
+ with open(file, mode="w", encoding="utf-8") as f:
13
+ f.write(text)
14
+
15
+
16
+
17
+ with open(file, mode="r", encoding="utf-8") as f:
18
+ text = f.read()
19
+
20
+
21
+ with open("package.json", mode="r", encoding="utf-8") as f:
22
+ package = json.load(f)
23
+
24
+ package.update({
25
+ "author": "fa0311",
26
+ "license": "LGPL-3.0-only",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/fa0311/twitter-openapi-typescript.git"
30
+ },
31
+ "keywords": [
32
+ "twitter",
33
+ "api",
34
+ "typescript"
35
+ ],
36
+ })
37
+
38
+
39
+ with open("package.json", mode="w", encoding="utf-8") as f:
40
+ json.dump(package, f, ensure_ascii=False, indent=2)
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["redhat.vscode-yaml"]
3
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "yaml.format.enable": true,
3
+ "yaml.completion": true,
4
+ "yaml.validate": true,
5
+ "yaml.hover": true,
6
+ "yaml.schemas": {
7
+ "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.0/schema.json": "twitter-openapi/**/*.yaml"
8
+ }
9
+ }