appwrite-cli 12.0.0 → 13.0.0-rc.1

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 (283) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +2 -2
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +145 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/lib/client.d.ts +89 -0
  8. package/dist/lib/client.d.ts.map +1 -0
  9. package/dist/lib/client.js +227 -0
  10. package/dist/lib/client.js.map +1 -0
  11. package/dist/lib/commands/account.d.ts +379 -0
  12. package/dist/lib/commands/account.d.ts.map +1 -0
  13. package/dist/lib/commands/account.js +1228 -0
  14. package/dist/lib/commands/account.js.map +1 -0
  15. package/dist/lib/commands/console.d.ts +20 -0
  16. package/dist/lib/commands/console.d.ts.map +1 -0
  17. package/dist/lib/commands/console.js +78 -0
  18. package/dist/lib/commands/console.js.map +1 -0
  19. package/dist/lib/commands/databases.d.ts +732 -0
  20. package/dist/lib/commands/databases.d.ts.map +1 -0
  21. package/dist/lib/commands/databases.js +2196 -0
  22. package/dist/lib/commands/databases.js.map +1 -0
  23. package/dist/lib/commands/functions.d.ts +310 -0
  24. package/dist/lib/commands/functions.d.ts.map +1 -0
  25. package/dist/lib/commands/functions.js +1100 -0
  26. package/dist/lib/commands/functions.js.map +1 -0
  27. package/dist/lib/commands/generic.d.ts +17 -0
  28. package/dist/lib/commands/generic.d.ts.map +1 -0
  29. package/dist/lib/commands/generic.js +279 -0
  30. package/dist/lib/commands/generic.js.map +1 -0
  31. package/dist/lib/commands/graphql.d.ts +19 -0
  32. package/dist/lib/commands/graphql.d.ts.map +1 -0
  33. package/dist/lib/commands/graphql.js +77 -0
  34. package/dist/lib/commands/graphql.js.map +1 -0
  35. package/dist/lib/commands/health.d.ts +153 -0
  36. package/dist/lib/commands/health.d.ts.map +1 -0
  37. package/dist/lib/commands/health.js +464 -0
  38. package/dist/lib/commands/health.js.map +1 -0
  39. package/dist/lib/commands/init.d.ts +3 -0
  40. package/dist/lib/commands/init.d.ts.map +1 -0
  41. package/dist/lib/commands/init.js +518 -0
  42. package/dist/lib/commands/init.js.map +1 -0
  43. package/dist/lib/commands/locale.d.ts +53 -0
  44. package/dist/lib/commands/locale.d.ts.map +1 -0
  45. package/dist/lib/commands/locale.js +165 -0
  46. package/dist/lib/commands/locale.js.map +1 -0
  47. package/dist/lib/commands/messaging.d.ts +588 -0
  48. package/dist/lib/commands/messaging.d.ts.map +1 -0
  49. package/dist/lib/commands/messaging.js +2042 -0
  50. package/dist/lib/commands/messaging.js.map +1 -0
  51. package/dist/lib/commands/migrations.d.ts +150 -0
  52. package/dist/lib/commands/migrations.d.ts.map +1 -0
  53. package/dist/lib/commands/migrations.js +524 -0
  54. package/dist/lib/commands/migrations.js.map +1 -0
  55. package/dist/lib/commands/organizations.d.ts +11 -0
  56. package/dist/lib/commands/organizations.d.ts.map +1 -0
  57. package/dist/lib/commands/organizations.js +31 -0
  58. package/dist/lib/commands/organizations.js.map +1 -0
  59. package/dist/lib/commands/project.d.ts +53 -0
  60. package/dist/lib/commands/project.d.ts.map +1 -0
  61. package/dist/lib/commands/project.js +176 -0
  62. package/dist/lib/commands/project.js.map +1 -0
  63. package/dist/lib/commands/projects.d.ts +516 -0
  64. package/dist/lib/commands/projects.d.ts.map +1 -0
  65. package/dist/lib/commands/projects.js +1590 -0
  66. package/dist/lib/commands/projects.js.map +1 -0
  67. package/dist/lib/commands/proxy.d.ts +71 -0
  68. package/dist/lib/commands/proxy.d.ts.map +1 -0
  69. package/dist/lib/commands/proxy.js +240 -0
  70. package/dist/lib/commands/proxy.js.map +1 -0
  71. package/dist/lib/commands/pull.d.ts +8 -0
  72. package/dist/lib/commands/pull.d.ts.map +1 -0
  73. package/dist/lib/commands/pull.js +455 -0
  74. package/dist/lib/commands/pull.js.map +1 -0
  75. package/dist/lib/commands/push.d.ts +4 -0
  76. package/dist/lib/commands/push.d.ts.map +1 -0
  77. package/dist/lib/commands/push.js +2154 -0
  78. package/dist/lib/commands/push.js.map +1 -0
  79. package/dist/lib/commands/run.d.ts +3 -0
  80. package/dist/lib/commands/run.d.ts.map +1 -0
  81. package/dist/lib/commands/run.js +287 -0
  82. package/dist/lib/commands/run.js.map +1 -0
  83. package/dist/lib/commands/sites.d.ts +296 -0
  84. package/dist/lib/commands/sites.d.ts.map +1 -0
  85. package/dist/lib/commands/sites.js +1046 -0
  86. package/dist/lib/commands/sites.js.map +1 -0
  87. package/dist/lib/commands/storage.d.ts +170 -0
  88. package/dist/lib/commands/storage.d.ts.map +1 -0
  89. package/dist/lib/commands/storage.js +651 -0
  90. package/dist/lib/commands/storage.js.map +1 -0
  91. package/dist/lib/commands/tables-db.d.ts +728 -0
  92. package/dist/lib/commands/tables-db.d.ts.map +1 -0
  93. package/dist/lib/commands/tables-db.js +2198 -0
  94. package/dist/lib/commands/tables-db.js.map +1 -0
  95. package/dist/lib/commands/teams.d.ts +129 -0
  96. package/dist/lib/commands/teams.d.ts.map +1 -0
  97. package/dist/lib/commands/teams.js +403 -0
  98. package/dist/lib/commands/teams.js.map +1 -0
  99. package/dist/lib/commands/tokens.d.ts +48 -0
  100. package/dist/lib/commands/tokens.d.ts.map +1 -0
  101. package/dist/lib/commands/tokens.js +156 -0
  102. package/dist/lib/commands/tokens.js.map +1 -0
  103. package/dist/lib/commands/types.d.ts +3 -0
  104. package/dist/lib/commands/types.d.ts.map +1 -0
  105. package/dist/lib/commands/types.js +155 -0
  106. package/dist/lib/commands/types.js.map +1 -0
  107. package/dist/lib/commands/update.d.ts +3 -0
  108. package/dist/lib/commands/update.d.ts.map +1 -0
  109. package/dist/lib/commands/update.js +202 -0
  110. package/dist/lib/commands/update.js.map +1 -0
  111. package/dist/lib/commands/users.d.ts +382 -0
  112. package/dist/lib/commands/users.d.ts.map +1 -0
  113. package/dist/lib/commands/users.js +1195 -0
  114. package/dist/lib/commands/users.js.map +1 -0
  115. package/dist/lib/commands/vcs.d.ts +92 -0
  116. package/dist/lib/commands/vcs.d.ts.map +1 -0
  117. package/dist/lib/commands/vcs.js +276 -0
  118. package/dist/lib/commands/vcs.js.map +1 -0
  119. package/dist/lib/config.d.ts +118 -0
  120. package/dist/lib/config.d.ts.map +1 -0
  121. package/{lib → dist/lib}/config.js +204 -325
  122. package/dist/lib/config.js.map +1 -0
  123. package/dist/lib/emulation/docker.d.ts +15 -0
  124. package/dist/lib/emulation/docker.d.ts.map +1 -0
  125. package/dist/lib/emulation/docker.js +220 -0
  126. package/dist/lib/emulation/docker.js.map +1 -0
  127. package/dist/lib/emulation/utils.d.ts +29 -0
  128. package/dist/lib/emulation/utils.d.ts.map +1 -0
  129. package/dist/lib/emulation/utils.js +168 -0
  130. package/dist/lib/emulation/utils.js.map +1 -0
  131. package/dist/lib/exception.d.ts +8 -0
  132. package/dist/lib/exception.d.ts.map +1 -0
  133. package/dist/lib/exception.js +16 -0
  134. package/dist/lib/exception.js.map +1 -0
  135. package/dist/lib/id.d.ts +7 -0
  136. package/dist/lib/id.d.ts.map +1 -0
  137. package/dist/lib/id.js +32 -0
  138. package/dist/lib/id.js.map +1 -0
  139. package/dist/lib/paginate.d.ts +10 -0
  140. package/dist/lib/paginate.d.ts.map +1 -0
  141. package/{lib → dist/lib}/paginate.js +9 -15
  142. package/dist/lib/paginate.js.map +1 -0
  143. package/dist/lib/parser.d.ts +18 -0
  144. package/dist/lib/parser.d.ts.map +1 -0
  145. package/dist/lib/parser.js +237 -0
  146. package/dist/lib/parser.js.map +1 -0
  147. package/dist/lib/questions.d.ts +59 -0
  148. package/dist/lib/questions.d.ts.map +1 -0
  149. package/dist/lib/questions.js +995 -0
  150. package/dist/lib/questions.js.map +1 -0
  151. package/dist/lib/sdks.d.ts +4 -0
  152. package/dist/lib/sdks.d.ts.map +1 -0
  153. package/dist/lib/sdks.js +51 -0
  154. package/dist/lib/sdks.js.map +1 -0
  155. package/dist/lib/spinner.d.ts +28 -0
  156. package/dist/lib/spinner.d.ts.map +1 -0
  157. package/{lib → dist/lib}/spinner.js +34 -45
  158. package/dist/lib/spinner.js.map +1 -0
  159. package/dist/lib/type-generation/attribute.d.ts +17 -0
  160. package/dist/lib/type-generation/attribute.d.ts.map +1 -0
  161. package/dist/lib/type-generation/attribute.js +19 -0
  162. package/dist/lib/type-generation/attribute.js.map +1 -0
  163. package/dist/lib/type-generation/languages/csharp.d.ts +7 -0
  164. package/dist/lib/type-generation/languages/csharp.d.ts.map +1 -0
  165. package/dist/lib/type-generation/languages/csharp.js +180 -0
  166. package/dist/lib/type-generation/languages/csharp.js.map +1 -0
  167. package/dist/lib/type-generation/languages/dart.d.ts +8 -0
  168. package/dist/lib/type-generation/languages/dart.d.ts.map +1 -0
  169. package/dist/lib/type-generation/languages/dart.js +197 -0
  170. package/dist/lib/type-generation/languages/dart.js.map +1 -0
  171. package/dist/lib/type-generation/languages/java.d.ts +7 -0
  172. package/dist/lib/type-generation/languages/java.d.ts.map +1 -0
  173. package/dist/lib/type-generation/languages/java.js +140 -0
  174. package/dist/lib/type-generation/languages/java.js.map +1 -0
  175. package/dist/lib/type-generation/languages/javascript.d.ts +9 -0
  176. package/dist/lib/type-generation/languages/javascript.d.ts.map +1 -0
  177. package/dist/lib/type-generation/languages/javascript.js +108 -0
  178. package/dist/lib/type-generation/languages/javascript.js.map +1 -0
  179. package/dist/lib/type-generation/languages/kotlin.d.ts +7 -0
  180. package/dist/lib/type-generation/languages/kotlin.d.ts.map +1 -0
  181. package/dist/lib/type-generation/languages/kotlin.js +95 -0
  182. package/dist/lib/type-generation/languages/kotlin.js.map +1 -0
  183. package/dist/lib/type-generation/languages/language.d.ts +43 -0
  184. package/dist/lib/type-generation/languages/language.d.ts.map +1 -0
  185. package/dist/lib/type-generation/languages/language.js +82 -0
  186. package/dist/lib/type-generation/languages/language.js.map +1 -0
  187. package/dist/lib/type-generation/languages/php.d.ts +7 -0
  188. package/dist/lib/type-generation/languages/php.d.ts.map +1 -0
  189. package/dist/lib/type-generation/languages/php.js +116 -0
  190. package/dist/lib/type-generation/languages/php.js.map +1 -0
  191. package/dist/lib/type-generation/languages/swift.d.ts +7 -0
  192. package/dist/lib/type-generation/languages/swift.d.ts.map +1 -0
  193. package/dist/lib/type-generation/languages/swift.js +179 -0
  194. package/dist/lib/type-generation/languages/swift.js.map +1 -0
  195. package/dist/lib/type-generation/languages/typescript.d.ts +9 -0
  196. package/dist/lib/type-generation/languages/typescript.d.ts.map +1 -0
  197. package/dist/lib/type-generation/languages/typescript.js +112 -0
  198. package/dist/lib/type-generation/languages/typescript.js.map +1 -0
  199. package/dist/lib/types.d.ts +133 -0
  200. package/dist/lib/types.d.ts.map +1 -0
  201. package/dist/lib/types.js +3 -0
  202. package/dist/lib/types.js.map +1 -0
  203. package/dist/lib/utils.d.ts +15 -0
  204. package/dist/lib/utils.d.ts.map +1 -0
  205. package/{lib → dist/lib}/utils.js +74 -120
  206. package/dist/lib/utils.js.map +1 -0
  207. package/dist/lib/validations.d.ts +2 -0
  208. package/dist/lib/validations.d.ts.map +1 -0
  209. package/dist/lib/validations.js +20 -0
  210. package/dist/lib/validations.js.map +1 -0
  211. package/docs/examples/databases/upsert-document.md +1 -2
  212. package/index.ts +152 -0
  213. package/install.ps1 +2 -5
  214. package/install.sh +1 -2
  215. package/lib/client.ts +259 -0
  216. package/lib/commands/{account.js → account.ts} +410 -664
  217. package/lib/commands/console.ts +112 -0
  218. package/lib/commands/{databases.js → databases.ts} +818 -1136
  219. package/lib/commands/{functions.js → functions.ts} +381 -526
  220. package/lib/commands/{generic.js → generic.ts} +47 -39
  221. package/lib/commands/graphql.ts +110 -0
  222. package/lib/commands/{health.js → health.ts} +168 -284
  223. package/lib/commands/{init.js → init.ts} +68 -66
  224. package/lib/commands/{locale.js → locale.ts} +75 -121
  225. package/lib/commands/{messaging.js → messaging.ts} +699 -937
  226. package/lib/commands/{migrations.js → migrations.ts} +182 -258
  227. package/lib/commands/organizations.ts +46 -0
  228. package/lib/commands/{project.js → project.ts} +75 -111
  229. package/lib/commands/{projects.js → projects.ts} +587 -843
  230. package/lib/commands/{proxy.js → proxy.ts} +94 -140
  231. package/lib/commands/{pull.js → pull.ts} +54 -44
  232. package/lib/commands/{push.js → push.ts} +235 -191
  233. package/lib/commands/{run.js → run.ts} +61 -55
  234. package/lib/commands/{sites.js → sites.ts} +364 -504
  235. package/lib/commands/{storage.js → storage.ts} +216 -292
  236. package/lib/commands/{tables-db.js → tables-db.ts} +817 -1126
  237. package/lib/commands/{teams.js → teams.ts} +162 -236
  238. package/lib/commands/{tokens.js → tokens.ts} +70 -99
  239. package/lib/commands/{types.js → types.ts} +37 -35
  240. package/lib/commands/{update.js → update.ts} +25 -27
  241. package/lib/commands/{users.js → users.ts} +426 -644
  242. package/lib/commands/{vcs.js → vcs.ts} +122 -173
  243. package/lib/config.ts +854 -0
  244. package/lib/emulation/{docker.js → docker.ts} +39 -38
  245. package/lib/emulation/utils.ts +193 -0
  246. package/lib/exception.ts +20 -0
  247. package/lib/{id.js → id.ts} +5 -5
  248. package/lib/paginate.ts +63 -0
  249. package/lib/parser.ts +238 -0
  250. package/lib/{questions.js → questions.ts} +148 -156
  251. package/lib/sdks.ts +55 -0
  252. package/lib/spinner.ts +118 -0
  253. package/lib/type-generation/attribute.ts +17 -0
  254. package/lib/type-generation/languages/{csharp.js → csharp.ts} +59 -48
  255. package/lib/type-generation/languages/{dart.js → dart.ts} +91 -80
  256. package/lib/type-generation/languages/{java.js → java.ts} +58 -47
  257. package/lib/type-generation/languages/javascript.ts +111 -0
  258. package/lib/type-generation/languages/kotlin.ts +96 -0
  259. package/lib/type-generation/languages/language.ts +119 -0
  260. package/lib/type-generation/languages/{php.js → php.ts} +55 -48
  261. package/lib/type-generation/languages/{swift.js → swift.ts} +59 -48
  262. package/lib/type-generation/languages/typescript.ts +116 -0
  263. package/lib/types.ts +150 -0
  264. package/lib/utils.ts +322 -0
  265. package/lib/validations.ts +17 -0
  266. package/package.json +21 -12
  267. package/scoop/appwrite.config.json +3 -3
  268. package/tsconfig.json +30 -0
  269. package/index.js +0 -147
  270. package/lib/client.js +0 -254
  271. package/lib/commands/console.js +0 -127
  272. package/lib/commands/graphql.js +0 -126
  273. package/lib/commands/organizations.js +0 -48
  274. package/lib/emulation/utils.js +0 -186
  275. package/lib/exception.js +0 -9
  276. package/lib/parser.js +0 -250
  277. package/lib/sdks.js +0 -60
  278. package/lib/type-generation/attribute.js +0 -16
  279. package/lib/type-generation/languages/javascript.js +0 -102
  280. package/lib/type-generation/languages/kotlin.js +0 -85
  281. package/lib/type-generation/languages/language.js +0 -125
  282. package/lib/type-generation/languages/typescript.js +0 -107
  283. package/lib/validations.js +0 -17
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../../../lib/type-generation/languages/language.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,SAAS,EAAE,CAAC;CAC3B;AAED,8BAAsB,YAAY;;IAO9B,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAW1C,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAI1C,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAI/C,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAI1C,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAI3C;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,UAAU,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM;IAEnG;;OAEG;IACH,YAAY,IAAI,OAAO;IAIvB;;OAEG;IACH,QAAQ,CAAC,WAAW,IAAI,MAAM;IAE9B;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,MAAM;CACxD;AAKD,wBAAgB,cAAc,IAAI,MAAM,CAoCvC"}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LanguageMeta = void 0;
4
+ exports.detectLanguage = detectLanguage;
5
+ const fs = require("fs");
6
+ const path = require("path");
7
+ class LanguageMeta {
8
+ constructor() {
9
+ if (new.target === LanguageMeta) {
10
+ throw new TypeError("Abstract classes can't be instantiated.");
11
+ }
12
+ }
13
+ static toKebabCase(string) {
14
+ return string
15
+ .replace(/[^a-zA-Z0-9\s-_]/g, '') // Remove invalid characters
16
+ .replace(/([a-z])([A-Z])/g, '$1-$2') // Add hyphen between camelCase
17
+ .replace(/([A-Z])([A-Z][a-z])/g, '$1-$2') // Add hyphen between PascalCase
18
+ .replace(/[_\s]+/g, '-') // Replace spaces and underscores with hyphens
19
+ .replace(/^-+|-+$/g, '') // Remove leading and trailing hyphens
20
+ .replace(/--+/g, '-') // Replace multiple hyphens with a single hyphen
21
+ .toLowerCase();
22
+ }
23
+ static toSnakeCase(string) {
24
+ return this.toKebabCase(string).replace(/-/g, '_');
25
+ }
26
+ static toUpperSnakeCase(string) {
27
+ return this.toSnakeCase(string).toUpperCase();
28
+ }
29
+ static toCamelCase(string) {
30
+ return this.toKebabCase(string).replace(/-([a-z0-9])/g, (g) => g[1].toUpperCase());
31
+ }
32
+ static toPascalCase(string) {
33
+ return this.toCamelCase(string).replace(/^./, (g) => g.toUpperCase());
34
+ }
35
+ /**
36
+ * Returns true if the language uses a single file for all types.
37
+ */
38
+ isSingleFile() {
39
+ return false;
40
+ }
41
+ }
42
+ exports.LanguageMeta = LanguageMeta;
43
+ const existsFiles = (...files) => files.some((file) => fs.existsSync(path.join(process.cwd(), file)));
44
+ function detectLanguage() {
45
+ if (existsFiles('tsconfig.json', 'deno.json')) {
46
+ return 'ts';
47
+ }
48
+ if (existsFiles('package.json')) {
49
+ return 'js';
50
+ }
51
+ if (existsFiles('composer.json')) {
52
+ return 'php';
53
+ }
54
+ if (existsFiles('requirements.txt', 'Pipfile', 'pyproject.toml')) {
55
+ return 'python';
56
+ }
57
+ if (existsFiles('Gemfile', 'Rakefile')) {
58
+ return 'ruby';
59
+ }
60
+ if (existsFiles('build.gradle.kts')) {
61
+ return 'kotlin';
62
+ }
63
+ if (existsFiles('build.gradle', 'pom.xml')) {
64
+ return 'java';
65
+ }
66
+ try {
67
+ if (fs.readdirSync(process.cwd()).some((file) => file.endsWith('.csproj'))) {
68
+ return 'dotnet';
69
+ }
70
+ }
71
+ catch {
72
+ // Directory not readable, skip .csproj detection
73
+ }
74
+ if (existsFiles('Package.swift')) {
75
+ return 'swift';
76
+ }
77
+ if (existsFiles('pubspec.yaml')) {
78
+ return 'dart';
79
+ }
80
+ throw new Error('Could not detect language, please specify with -l');
81
+ }
82
+ //# sourceMappingURL=language.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language.js","sourceRoot":"","sources":["../../../../lib/type-generation/languages/language.ts"],"names":[],"mappings":";;;AAkFA,wCAoCC;AAtHD,yBAA0B;AAC1B,6BAA8B;AAqB9B,MAAsB,YAAY;IAC9B;QACI,IAAI,GAAG,CAAC,MAAM,KAAK,YAAY,EAAE,CAAC;YAC9B,MAAM,IAAI,SAAS,CAAC,yCAAyC,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O,CAAC;IACnB,CAAC;IACD,IAAI,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC;QAC9B,OAAO,MAAM,CAAC;IAClB,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;AACzE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { LanguageMeta, Attribute, Collection } from './language';
2
+ export declare class PHP extends LanguageMeta {
3
+ getType(attribute: Attribute, collections?: Collection[], collectionName?: string): string;
4
+ getTemplate(): string;
5
+ getFileName(collection: Collection): string;
6
+ }
7
+ //# sourceMappingURL=php.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"php.d.ts","sourceRoot":"","sources":["../../../../lib/type-generation/languages/php.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEjE,qBAAa,GAAI,SAAQ,YAAY;IACjC,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,UAAU,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM;IAmD1F,WAAW,IAAI,MAAM;IAyDrB,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM;CAG9C"}
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PHP = void 0;
4
+ const attribute_1 = require("../attribute");
5
+ const language_1 = require("./language");
6
+ class PHP extends language_1.LanguageMeta {
7
+ getType(attribute, collections, collectionName) {
8
+ if (attribute.array) {
9
+ return 'array';
10
+ }
11
+ let type = '';
12
+ switch (attribute.type) {
13
+ case attribute_1.AttributeType.STRING:
14
+ case attribute_1.AttributeType.EMAIL:
15
+ case attribute_1.AttributeType.DATETIME:
16
+ type = 'string';
17
+ if (attribute.format === attribute_1.AttributeType.ENUM) {
18
+ type = language_1.LanguageMeta.toPascalCase(collectionName) + language_1.LanguageMeta.toPascalCase(attribute.key);
19
+ }
20
+ break;
21
+ case attribute_1.AttributeType.INTEGER:
22
+ type = 'int';
23
+ break;
24
+ case attribute_1.AttributeType.FLOAT:
25
+ type = 'float';
26
+ break;
27
+ case attribute_1.AttributeType.BOOLEAN:
28
+ type = 'bool';
29
+ break;
30
+ case attribute_1.AttributeType.RELATIONSHIP:
31
+ const relatedCollection = collections?.find((c) => c.$id === attribute.relatedCollection);
32
+ if (!relatedCollection) {
33
+ throw new Error(`Related collection with ID '${attribute.relatedCollection}' not found.`);
34
+ }
35
+ type = language_1.LanguageMeta.toPascalCase(relatedCollection.name);
36
+ if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') ||
37
+ (attribute.relationType === 'manyToOne' && attribute.side === 'child') ||
38
+ attribute.relationType === 'manyToMany') {
39
+ type = 'array';
40
+ }
41
+ break;
42
+ case attribute_1.AttributeType.POINT:
43
+ case attribute_1.AttributeType.LINESTRING:
44
+ case attribute_1.AttributeType.POLYGON:
45
+ type = 'array';
46
+ break;
47
+ default:
48
+ throw new Error(`Unknown attribute type: ${attribute.type}`);
49
+ }
50
+ if (!attribute.required && attribute.default === null) {
51
+ type += '|null';
52
+ }
53
+ return type;
54
+ }
55
+ getTemplate() {
56
+ return `<?php
57
+ namespace Appwrite\\Models;
58
+
59
+ // This file is auto-generated by the Appwrite CLI.
60
+ // You can regenerate it by running \`appwrite ${process.argv.slice(2).join(' ')}\`.
61
+
62
+ <% for (const attribute of collection.attributes) { -%>
63
+ <% if (attribute.type === 'relationship' && !(attribute.relationType === 'manyToMany') && !(attribute.relationType === 'oneToMany' && attribute.side === 'parent')) { -%>
64
+ use Appwrite\\Models\\<%- toPascalCase(collections.find(c => c.$id === attribute.relatedCollection).name) %>;
65
+
66
+ <% } -%>
67
+ <% } -%>
68
+ <% for (const attribute of collection.attributes) { -%>
69
+ <% if (attribute.format === 'enum') { -%>
70
+ enum <%- toPascalCase(collection.name) %><%- toPascalCase(attribute.key) %>: string {
71
+ <% for (const [index, element] of Object.entries(attribute.elements)) { -%>
72
+ case <%- toUpperSnakeCase(element) %> = '<%- element %>';
73
+ <% } -%>
74
+ }
75
+
76
+ <% } -%>
77
+ <% } -%>
78
+ class <%- toPascalCase(collection.name) %> {
79
+ <% for (const attribute of collection.attributes ){ -%>
80
+ private <%- getType(attribute, collections, collection.name) %> $<%- strict ? toCamelCase(attribute.key) : attribute.key %>;
81
+ <% } -%>
82
+
83
+ public function __construct(
84
+ <% for (const attribute of collection.attributes ){ -%>
85
+ <% if (attribute.required) { -%>
86
+ <%- getType(attribute, collections, collection.name).replace('|null', '') %> $<%- strict ? toCamelCase(attribute.key) : attribute.key %><% if (collection.attributes.indexOf(attribute) < collection.attributes.length - 1) { %>,<% } %>
87
+ <% } else { -%>
88
+ ?<%- getType(attribute, collections, collection.name).replace('|null', '') %> $<%- strict ? toCamelCase(attribute.key) : attribute.key %> = null<% if (collection.attributes.indexOf(attribute) < collection.attributes.length - 1) { %>,<% } %>
89
+ <% } -%>
90
+ <% } -%>
91
+ ) {
92
+ <% for (const attribute of collection.attributes ){ -%>
93
+ $this-><%- strict ? toCamelCase(attribute.key) : attribute.key %> = $<%- strict ? toCamelCase(attribute.key) : attribute.key %>;
94
+ <% } -%>
95
+ }
96
+
97
+ <% for (const [index, attribute] of Object.entries(collection.attributes)) { -%>
98
+ public function get<%- toPascalCase(attribute.key) %>(): <%- getType(attribute, collections, collection.name) %> {
99
+ return $this-><%- strict ? toCamelCase(attribute.key) : attribute.key %>;
100
+ }
101
+
102
+ public function set<%- toPascalCase(attribute.key) %>(<%- getType(attribute, collections, collection.name) %> $<%- strict ? toCamelCase(attribute.key) : attribute.key %>): void {
103
+ $this-><%- strict ? toCamelCase(attribute.key) : attribute.key %> = $<%- strict ? toCamelCase(attribute.key) : attribute.key %>;
104
+ }
105
+ <% if (index < collection.attributes.length - 1) { %>
106
+ <% } -%>
107
+ <% } -%>
108
+ }
109
+ `;
110
+ }
111
+ getFileName(collection) {
112
+ return language_1.LanguageMeta.toPascalCase(collection.name) + '.php';
113
+ }
114
+ }
115
+ exports.PHP = PHP;
116
+ //# sourceMappingURL=php.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"php.js","sourceRoot":"","sources":["../../../../lib/type-generation/languages/php.ts"],"names":[],"mappings":";;;AAAA,4CAA6C;AAC7C,yCAAiE;AAEjE,MAAa,GAAI,SAAQ,uBAAY;IACjC,OAAO,CAAC,SAAoB,EAAE,WAA0B,EAAE,cAAuB;QAC7E,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;YAClB,OAAO,OAAO,CAAC;QACnB,CAAC;QACD,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,QAAQ,SAAS,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,yBAAa,CAAC,MAAM,CAAC;YAC1B,KAAK,yBAAa,CAAC,KAAK,CAAC;YACzB,KAAK,yBAAa,CAAC,QAAQ;gBACvB,IAAI,GAAG,QAAQ,CAAC;gBAChB,IAAI,SAAS,CAAC,MAAM,KAAK,yBAAa,CAAC,IAAI,EAAE,CAAC;oBAC1C,IAAI,GAAG,uBAAY,CAAC,YAAY,CAAC,cAAe,CAAC,GAAG,uBAAY,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;gBACjG,CAAC;gBACD,MAAM;YACV,KAAK,yBAAa,CAAC,OAAO;gBACtB,IAAI,GAAG,KAAK,CAAC;gBACb,MAAM;YACV,KAAK,yBAAa,CAAC,KAAK;gBACpB,IAAI,GAAG,OAAO,CAAC;gBACf,MAAM;YACV,KAAK,yBAAa,CAAC,OAAO;gBACtB,IAAI,GAAG,MAAM,CAAC;gBACd,MAAM;YACV,KAAK,yBAAa,CAAC,YAAY;gBAC3B,MAAM,iBAAiB,GAAG,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,iBAAiB,CAAC,CAAC;gBAC1F,IAAI,CAAC,iBAAiB,EAAE,CAAC;oBACrB,MAAM,IAAI,KAAK,C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anguageMeta {
3
+ getType(attribute: Attribute, collections?: Collection[], collectionName?: string): string;
4
+ getTemplate(): string;
5
+ getFileName(collection: Collection): string;
6
+ }
7
+ //# sourceMappingURL=swift.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swift.d.ts","sourceRoot":"","sources":["../../../../lib/type-generation/languages/swift.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEjE,qBAAa,KAAM,SAAQ,YAAY;IACnC,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,UAAU,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM;IAuD1F,WAAW,IAAI,MAAM;IAoHrB,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,MAAM;CAG9C"}
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Swift = void 0;
4
+ const attribute_1 = require("../attribute");
5
+ const language_1 = require("./language");
6
+ class Swift extends language_1.LanguageMeta {
7
+ getType(attribute, collections, collectionName) {
8
+ let type = '';
9
+ switch (attribute.type) {
10
+ case attribute_1.AttributeType.STRING:
11
+ case attribute_1.AttributeType.EMAIL:
12
+ case attribute_1.AttributeType.DATETIME:
13
+ type = 'String';
14
+ if (attribute.format === attribute_1.AttributeType.ENUM) {
15
+ type = language_1.LanguageMeta.toPascalCase(collectionName) + language_1.LanguageMeta.toPascalCase(attribute.key);
16
+ }
17
+ break;
18
+ case attribute_1.AttributeType.INTEGER:
19
+ type = 'Int';
20
+ break;
21
+ case attribute_1.AttributeType.FLOAT:
22
+ type = 'Double';
23
+ break;
24
+ case attribute_1.AttributeType.BOOLEAN:
25
+ type = 'Bool';
26
+ break;
27
+ case attribute_1.AttributeType.RELATIONSHIP:
28
+ const relatedCollection = collections?.find((c) => c.$id === attribute.relatedCollection);
29
+ if (!relatedCollection) {
30
+ throw new Error(`Related collection with ID '${attribute.relatedCollection}' not found.`);
31
+ }
32
+ type = language_1.LanguageMeta.toPascalCase(relatedCollection.name);
33
+ if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') ||
34
+ (attribute.relationType === 'manyToOne' && attribute.side === 'child') ||
35
+ attribute.relationType === 'manyToMany') {
36
+ type = `[${type}]`;
37
+ }
38
+ break;
39
+ case attribute_1.AttributeType.POINT:
40
+ type = '[Double]';
41
+ break;
42
+ case attribute_1.AttributeType.LINESTRING:
43
+ type = '[[Double]]';
44
+ break;
45
+ case attribute_1.AttributeType.POLYGON:
46
+ type = '[[[Double]]]';
47
+ break;
48
+ default:
49
+ throw new Error(`Unknown attribute type: ${attribute.type}`);
50
+ }
51
+ if (attribute.array) {
52
+ type = '[' + type + ']';
53
+ }
54
+ if (!attribute.required && attribute.default === null) {
55
+ type += '?';
56
+ }
57
+ return type;
58
+ }
59
+ getTemplate() {
60
+ return `import Foundation
61
+
62
+ /// This file is auto-generated by the Appwrite CLI.
63
+ /// You can regenerate it by running \`appwrite ${process.argv.slice(2).join(' ')}\`.
64
+
65
+ <% for (const attribute of collection.attributes) { -%>
66
+ <% if (attribute.format === 'enum') { -%>
67
+ public enum <%- toPascalCase(collection.name) %><%- toPascalCase(attribute.key) %>: String, Codable, CaseIterable {
68
+ <% for (const [index, element] of Object.entries(attribute.elements)) { -%>
69
+ case <%- strict ? toCamelCase(element) : element %> = "<%- element %>"
70
+ <% } -%>
71
+ }
72
+
73
+ <% } -%>
74
+ <% } -%>
75
+ public class <%- toPascalCase(collection.name) %>: Codable {
76
+ <% for (const attribute of collection.attributes) { -%>
77
+ public let <%- strict ? toCamelCase(attribute.key) : attribute.key %>: <%- getType(attribute, collections, collection.name) %>
78
+ <% } %>
79
+ enum CodingKeys: String, CodingKey {
80
+ <% for (const attribute of collection.attributes) { -%>
81
+ case <%- strict ? toCamelCase(attribute.key) : attribute.key %> = "<%- attribute.key %>"
82
+ <% } -%>
83
+ }
84
+
85
+ public init(
86
+ <% for (const [index, attribute] of Object.entries(collection.attributes)) { -%>
87
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: <%- getType(attribute, collections, collection.name) %><% if (index < collection.attributes.length - 1) { %>,<% } %>
88
+ <% } -%>
89
+ ) {
90
+ <% for (const attribute of collection.attributes) { -%>
91
+ self.<%- strict ? toCamelCase(attribute.key) : attribute.key %> = <%- strict ? toCamelCase(attribute.key) : attribute.key %>
92
+ <% } -%>
93
+ }
94
+
95
+ public required init(from decoder: Decoder) throws {
96
+ let container = try decoder.container(keyedBy: CodingKeys.self)
97
+
98
+ <% for (const attribute of collection.attributes) { -%>
99
+ <% if (!(!attribute.required && attribute.default === null)) { -%>
100
+ self.<%- strict ? toCamelCase(attribute.key) : attribute.key %> = try container.decode(<%- getType(attribute, collections, collection.name).replace('?', '') %>.self, forKey: .<%- strict ? toCamelCase(attribute.key) : attribute.key %>)
101
+ <% } else { -%>
102
+ self.<%- strict ? toCamelCase(attribute.key) : attribute.key %> = try container.decodeIfPresent(<%- getType(attribute, collections, collection.name).replace('?', '') %>.self, forKey: .<%- strict ? toCamelCase(attribute.key) : attribute.key %>)
103
+ <% } -%>
104
+ <% } -%>
105
+ }
106
+
107
+ public func encode(to encoder: Encoder) throws {
108
+ var container = encoder.container(keyedBy: CodingKeys.self)
109
+
110
+ <% for (const attribute of collection.attributes) { -%>
111
+ <% if (!(!attribute.required && attribute.default === null)) { -%>
112
+ try container.encode(<%- strict ? toCamelCase(attribute.key) : attribute.key %>, forKey: .<%- strict ? toCamelCase(attribute.key) : attribute.key %>)
113
+ <% } else { -%>
114
+ try container.encodeIfPresent(<%- strict ? toCamelCase(attribute.key) : attribute.key %>, forKey: .<%- strict ? toCamelCase(attribute.key) : attribute.key %>)
115
+ <% } -%>
116
+ <% } -%>
117
+ }
118
+
119
+ public func toMap() -> [String: Any] {
120
+ return [
121
+ <% for (const [index, attribute] of Object.entries(collection.attributes)) { -%>
122
+ <% if (attribute.type === 'relationship') { -%>
123
+ "<%- attribute.key %>": <%- strict ? toCamelCase(attribute.key) : attribute.key %> as Any<% if (index < collection.attributes.length - 1) { %>,<% } %>
124
+ <% } else if (attribute.array && attribute.type !== 'string' && attribute.type !== 'integer' && attribute.type !== 'float' && attribute.type !== 'boolean') { -%>
125
+ "<%- attribute.key %>": <%- strict ? toCamelCase(attribute.key) : attribute.key %>?.map { $0.toMap() } as Any<% if (index < collection.attributes.length - 1) { %>,<% } %>
126
+ <% } else { -%>
127
+ "<%- attribute.key %>": <%- strict ? toCamelCase(attribute.key) : attribute.key %> as Any<% if (index < collection.attributes.length - 1) { %>,<% } %>
128
+ <% } -%>
129
+ <% } -%>
130
+ ]
131
+ }
132
+
133
+ public static func from(map: [String: Any]) -> <%- toPascalCase(collection.name) %> {
134
+ return <%- toPascalCase(collection.name) %>(
135
+ <% for (const [index, attribute] of Object.entries(collection.attributes)) { -%>
136
+ <% if (attribute.type === 'relationship') { -%>
137
+ <% if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || (attribute.relationType === 'manyToOne' && attribute.side === 'child') || attribute.relationType === 'manyToMany') { -%>
138
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: map["<%- attribute.key %>"] as<% if (!attribute.required) { %>?<% } else { %>!<% } %> [<%- toPascalCase(collections.find(c => c.$id === attribute.relatedCollection).name) %>]<% if (index < collection.attributes.length - 1) { %>,<% } %>
139
+ <% } else { -%>
140
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: map["<%- attribute.key %>"] as<% if (!attribute.required) { %>?<% } else { %>!<% } %> <%- toPascalCase(collections.find(c => c.$id === attribute.relatedCollection).name) %><% if (index < collection.attributes.length - 1) { %>,<% } %>
141
+ <% } -%>
142
+ <% } else if (attribute.array) { -%>
143
+ <% if (attribute.type === 'string') { -%>
144
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: map["<%- attribute.key %>"] as<% if (!attribute.required) { %>?<% } else { %>!<% } %> [String]<% if (index < collection.attributes.length - 1) { %>,<% } %>
145
+ <% } else if (attribute.type === 'integer') { -%>
146
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: map["<%- attribute.key %>"] as<% if (!attribute.required) { %>?<% } else { %>!<% } %> [Int]<% if (index < collection.attributes.length - 1) { %>,<% } %>
147
+ <% } else if (attribute.type === 'float') { -%>
148
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: map["<%- attribute.key %>"] as<% if (!attribute.required) { %>?<% } else { %>!<% } %> [Double]<% if (index < collection.attributes.length - 1) { %>,<% } %>
149
+ <% } else if (attribute.type === 'boolean') { -%>
150
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: map["<%- attribute.key %>"] as<% if (!attribute.required) { %>?<% } else { %>!<% } %> [Bool]<% if (index < collection.attributes.length - 1) { %>,<% } %>
151
+ <% } else { -%>
152
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: (map["<%- attribute.key %>"] as<% if (!attribute.required) { %>?<% } else { %>!<% } %> [[String: Any]])<% if (!attribute.required) { %>?<% } %>.map { <%- toPascalCase(attribute.type) %>.from(map: $0) }<% if (index < collection.attributes.length - 1) { %>,<% } %>
153
+ <% } -%>
154
+ <% } else { -%>
155
+ <% if ((attribute.type === 'string' || attribute.type === 'email' || attribute.type === 'datetime') && attribute.format !== 'enum') { -%>
156
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: map["<%- attribute.key %>"] as<% if (!attribute.required) { %>?<% } else { %>!<% } %> String<% if (index < collection.attributes.length - 1) { %>,<% } %>
157
+ <% } else if (attribute.type === 'string' && attribute.format === 'enum') { -%>
158
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: <%- toPascalCase(collection.name) %><%- toPascalCase(attribute.key) %>(rawValue: map["<%- attribute.key %>"] as! String)!<% if (index < collection.attributes.length - 1) { %>,<% } %>
159
+ <% } else if (attribute.type === 'integer') { -%>
160
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: map["<%- attribute.key %>"] as<% if (!attribute.required) { %>?<% } else { %>!<% } %> Int<% if (index < collection.attributes.length - 1) { %>,<% } %>
161
+ <% } else if (attribute.type === 'float') { -%>
162
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: map["<%- attribute.key %>"] as<% if (!attribute.required) { %>?<% } else { %>!<% } %> Double<% if (index < collection.attributes.length - 1) { %>,<% } %>
163
+ <% } else if (attribute.type === 'boolean') { -%>
164
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: map["<%- attribute.key %>"] as<% if (!attribute.required) { %>?<% } else { %>!<% } %> Bool<% if (index < collection.attributes.length - 1) { %>,<% } %>
165
+ <% } else { -%>
166
+ <%- strict ? toCamelCase(attribute.key) : attribute.key %>: <%- toPascalCase(attribute.type) %>.from(map: map["<%- attribute.key %>"] as! [String: Any])<% if (index < collection.attributes.length - 1) { %>,<% } %>
167
+ <% } -%>
168
+ <% } -%>
169
+ <% } -%>
170
+ )
171
+ }
172
+ }`;
173
+ }
174
+ getFileName(collection) {
175
+ return language_1.LanguageMeta.toPascalCase(collection.name) + '.swift';
176
+ }
177
+ }
178
+ exports.Swift = Swift;
179
+ //# sourceMappingURL=swift.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swift.js","sourceRoot":"","sources":["../../../../lib/type-generation/languages/swift.ts"],"names":[],"mappings":";;;AAAA,4CAA6C;AAC7C,yCAAiE;AAEjE,MAAa,KAAM,SAAQ,uBAAY;IACnC,OAAO,CAAC,SAAoB,EAAE,WAA0B,EAAE,cAAuB;QAC7E,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,QAAQ,SAAS,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,yBAAa,CAAC,MAAM,CAAC;YAC1B,KAAK,yBAAa,CAAC,KAAK,CAAC;YACzB,KAAK,yBAAa,CAAC,QAAQ;gBACvB,IAAI,GAAG,QAAQ,CAAC;gBAChB,IAAI,SAAS,CAAC,MAAM,KAAK,yBAAa,CAAC,IAAI,EAAE,CAAC;oBAC1C,IAAI,GAAG,uBAAY,CAAC,Y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;gBACI,MAAM,IAAI,KAAK,CAAC,2BAA2B,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;YAClB,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC;QAC5B,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;YACpD,IAAI,IAAI,GAAG,CAAC;QAChB,CAAC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,WAAW;QACP,OAAO;;;kDAGmC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6G/E,CAAC;IACC,CAAC;IAED,WAAW,CAAC,UAAsB;QAC9B,OAAO,uBAAY,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC;IACjE,CAAC;CACJ;AA/KD,sBA+KC"}
@@ -0,0 +1,9 @@
1
+ import { LanguageMeta, Attribute, Collection } from './language';
2
+ export declare class TypeScript extends LanguageMeta {
3
+ getType(attribute: Attribute, collections?: Collection[], collectionName?: string): string;
4
+ isSingleFile(): boolean;
5
+ private _getAppwriteDependency;
6
+ getTemplate(): string;
7
+ getFileName(_: Collection | undefined): string;
8
+ }
9
+ //# sourceMappingURL=typescript.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.d.ts","sourceRoot":"","sources":["../../../../lib/type-generation/languages/typescript.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEjE,qBAAa,UAAW,SAAQ,YAAY;IACxC,OAAO,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,UAAU,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM;IAyD1F,YAAY,IAAI,OAAO;IAIvB,OAAO,CAAC,sBAAsB;IAc9B,WAAW,IAAI,MAAM;IA+BrB,WAAW,CAAC,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM;CAGjD"}
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TypeScript = void 0;
4
+ const fs = require("fs");
5
+ const path = require("path");
6
+ const attribute_1 = require("../attribute");
7
+ const language_1 = require("./language");
8
+ class TypeScript extends language_1.LanguageMeta {
9
+ getType(attribute, collections, collectionName) {
10
+ let type = '';
11
+ switch (attribute.type) {
12
+ case attribute_1.AttributeType.STRING:
13
+ case attribute_1.AttributeType.EMAIL:
14
+ case attribute_1.AttributeType.DATETIME:
15
+ case attribute_1.AttributeType.IP:
16
+ case attribute_1.AttributeType.URL:
17
+ type = 'string';
18
+ if (attribute.format === attribute_1.AttributeType.ENUM) {
19
+ type = language_1.LanguageMeta.toPascalCase(collectionName) + language_1.LanguageMeta.toPascalCase(attribute.key);
20
+ }
21
+ break;
22
+ case attribute_1.AttributeType.INTEGER:
23
+ type = 'number';
24
+ break;
25
+ case attribute_1.AttributeType.FLOAT:
26
+ type = 'number';
27
+ break;
28
+ case attribute_1.AttributeType.BOOLEAN:
29
+ type = 'boolean';
30
+ break;
31
+ case attribute_1.AttributeType.RELATIONSHIP:
32
+ const relatedCollection = collections?.find((c) => c.$id === attribute.relatedCollection);
33
+ if (!relatedCollection) {
34
+ throw new Error(`Related collection with ID '${attribute.relatedCollection}' not found.`);
35
+ }
36
+ type = language_1.LanguageMeta.toPascalCase(relatedCollection.name);
37
+ if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') ||
38
+ (attribute.relationType === 'manyToOne' && attribute.side === 'child') ||
39
+ attribute.relationType === 'manyToMany') {
40
+ type = `${type}[]`;
41
+ }
42
+ break;
43
+ case attribute_1.AttributeType.POINT:
44
+ type = 'Array<number>';
45
+ break;
46
+ case attribute_1.AttributeType.LINESTRING:
47
+ type = 'Array<Array<number>>';
48
+ break;
49
+ case attribute_1.AttributeType.POLYGON:
50
+ type = 'Array<Array<Array<number>>>';
51
+ break;
52
+ default:
53
+ throw new Error(`Unknown attribute type: ${attribute.type}`);
54
+ }
55
+ if (attribute.array) {
56
+ type += '[]';
57
+ }
58
+ if (!attribute.required && attribute.default === null) {
59
+ type += ' | null';
60
+ }
61
+ return type;
62
+ }
63
+ isSingleFile() {
64
+ return true;
65
+ }
66
+ _getAppwriteDependency() {
67
+ if (fs.existsSync(path.resolve(process.cwd(), 'package.json'))) {
68
+ const packageJsonRaw = fs.readFileSync(path.resolve(process.cwd(), 'package.json'));
69
+ const packageJson = JSON.parse(packageJsonRaw.toString('utf-8'));
70
+ return packageJson.dependencies && packageJson.dependencies['node-appwrite'] ? 'node-appwrite' : 'appwrite';
71
+ }
72
+ if (fs.existsSync(path.resolve(process.cwd(), 'deno.json'))) {
73
+ return 'https://deno.land/x/appwrite/mod.ts';
74
+ }
75
+ return 'appwrite';
76
+ }
77
+ getTemplate() {
78
+ return `import type { Models } from '${this._getAppwriteDependency()}';
79
+
80
+ // This file is auto-generated by the Appwrite CLI.
81
+ // You can regenerate it by running \`appwrite ${process.argv.slice(2).join(' ')}\`.
82
+
83
+ <% for (const collection of collections) { -%>
84
+ <% for (const attribute of collection.attributes) { -%>
85
+ <% if (attribute.format === 'enum') { -%>
86
+ export enum <%- toPascalCase(collection.name) %><%- toPascalCase(attribute.key) %> {
87
+ <% const entries = Object.entries(attribute.elements); -%>
88
+ <% for (let i = 0; i < entries.length; i++) { -%>
89
+ <%- toUpperSnakeCase(entries[i][1]) %> = "<%- entries[i][1] %>"<% if (i !== entries.length - 1) { %>,<% } %>
90
+ <% } -%>
91
+ }
92
+
93
+ <% } -%>
94
+ <% } -%>
95
+ <% } -%>
96
+ <% for (const [index, collection] of Object.entries(collections)) { -%>
97
+ export type <%- toPascalCase(collection.name) %> = Models.Row & {
98
+ <% for (const attribute of collection.attributes) { -%>
99
+ <% const propertyName = strict ? toCamelCase(attribute.key) : attribute.key; -%>
100
+ <% const isValidIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(propertyName); -%>
101
+ <% if (isValidIdentifier) { %><%- propertyName %><% } else { %>"<%- propertyName %>"<% } %>: <%- getType(attribute, collections, collection.name) %>;
102
+ <% } -%>
103
+ }<% if (index < collections.length - 1) { %>
104
+ <% } %>
105
+ <% } -%>`;
106
+ }
107
+ getFileName(_) {
108
+ return 'appwrite.d.ts';
109
+ }
110
+ }
111
+ exports.TypeScript = TypeScript;
112
+ //# sourceMappingURL=typescript.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typescript.js","sourceRoot":"","sources":["../../../../lib/type-generation/languages/typescript.ts"],"names":[],"mappings":";;;AAAA,yBAA0B;AAC1B,6BAA8B;AAC9B,4CAA6C;AAC7C,yCAAiE;AAEjE,MAAa,UAAW,SAAQ,uBAAY;IACxC,OAAO,CAAC,SAAoB,EAAE,WAA0B,EAAE,cAAuB;QAC7E,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,QAAQ,SAAS,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,yBAAa,CAAC,MAAM,CAAC;YAC1B,KAAK,yBAAa,CAAC,KAAK,CAAC;YACzB,KAAK,yBAAa,CAAC,QAAQ,CAAC;YAC5B,KAAK,yBAAa,CAAC,EAAE,CAAC;YACtB,KAAK,yBAAa,CAAC,GAAG;gBAClB,IAAI,GAAG,QAAQ,CAAC;gBAChB,IAAI,SAAS,CAAC,MAAM,KAAK,yBAAa,CAAC,IAAI,EAAE,CAAC;oBAC1C,IAAI,GAAG,uBAAY,CAAC,YAAY,CAAC,cAAe,CAAC,GAAG,uBAAY,CAAC,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;gBACjG,C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