@downcity/city 0.2.82 → 0.2.92

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 (229) hide show
  1. package/README.md +10 -10
  2. package/bin/client/city.d.ts +90 -0
  3. package/bin/client/city.d.ts.map +1 -0
  4. package/bin/{city → client}/city.js +32 -22
  5. package/bin/client/city.js.map +1 -0
  6. package/bin/client/types.d.ts +77 -0
  7. package/bin/client/types.d.ts.map +1 -0
  8. package/bin/client/types.js +8 -0
  9. package/bin/{core → client}/types.js.map +1 -1
  10. package/bin/{core → federation}/auth/authenticator.d.ts +7 -7
  11. package/bin/federation/auth/authenticator.d.ts.map +1 -0
  12. package/bin/{core → federation}/auth/authenticator.js +15 -15
  13. package/bin/federation/auth/authenticator.js.map +1 -0
  14. package/bin/federation/auth/token-signer.d.ts.map +1 -0
  15. package/bin/{core → federation}/auth/token-signer.js +4 -4
  16. package/bin/federation/auth/token-signer.js.map +1 -0
  17. package/bin/{core → federation}/auth/types.d.ts +6 -6
  18. package/bin/federation/auth/types.d.ts.map +1 -0
  19. package/bin/federation/auth/types.js.map +1 -0
  20. package/bin/federation/federation-env-catalog.d.ts +13 -0
  21. package/bin/federation/federation-env-catalog.d.ts.map +1 -0
  22. package/bin/{core/base/base-env-catalog.js → federation/federation-env-catalog.js} +5 -5
  23. package/bin/federation/federation-env-catalog.js.map +1 -0
  24. package/bin/{core/base/base-init.d.ts → federation/federation-init.d.ts} +17 -17
  25. package/bin/federation/federation-init.d.ts.map +1 -0
  26. package/bin/{core/base/base-init.js → federation/federation-init.js} +27 -27
  27. package/bin/federation/federation-init.js.map +1 -0
  28. package/bin/federation/federation-instruction.d.ts +11 -0
  29. package/bin/federation/federation-instruction.d.ts.map +1 -0
  30. package/bin/{core/base/base-instruction.js → federation/federation-instruction.js} +4 -4
  31. package/bin/federation/federation-instruction.js.map +1 -0
  32. package/bin/{core/base/base-router.d.ts → federation/federation-router.d.ts} +11 -11
  33. package/bin/federation/federation-router.d.ts.map +1 -0
  34. package/bin/{core/base/base-router.js → federation/federation-router.js} +27 -27
  35. package/bin/federation/federation-router.js.map +1 -0
  36. package/bin/{core/base/base-runtime.d.ts → federation/federation-runtime.d.ts} +6 -6
  37. package/bin/federation/federation-runtime.d.ts.map +1 -0
  38. package/bin/{core/base/base-runtime.js → federation/federation-runtime.js} +10 -10
  39. package/bin/federation/federation-runtime.js.map +1 -0
  40. package/bin/{core/base/base.d.ts → federation/federation.d.ts} +15 -15
  41. package/bin/federation/federation.d.ts.map +1 -0
  42. package/bin/{core/base/base.js → federation/federation.js} +22 -22
  43. package/bin/federation/federation.js.map +1 -0
  44. package/bin/{core → federation}/runtime.d.ts +9 -9
  45. package/bin/federation/runtime.d.ts.map +1 -0
  46. package/bin/federation/runtime.js +13 -0
  47. package/bin/federation/runtime.js.map +1 -0
  48. package/bin/{core → federation}/types.d.ts +6 -6
  49. package/bin/federation/types.d.ts.map +1 -0
  50. package/bin/{city/user → federation}/types.js.map +1 -1
  51. package/bin/index.d.ts +23 -26
  52. package/bin/index.d.ts.map +1 -1
  53. package/bin/index.js +13 -15
  54. package/bin/index.js.map +1 -1
  55. package/bin/{city → pact}/admin/index.d.ts +23 -7
  56. package/bin/pact/admin/index.d.ts.map +1 -0
  57. package/bin/{city → pact}/admin/index.js +21 -8
  58. package/bin/pact/admin/index.js.map +1 -0
  59. package/bin/{city → pact}/admin/types.d.ts +7 -1
  60. package/bin/pact/admin/types.d.ts.map +1 -0
  61. package/bin/pact/admin/types.js.map +1 -0
  62. package/bin/{city → pact}/http.d.ts.map +1 -1
  63. package/bin/{city → pact}/http.js.map +1 -1
  64. package/bin/{city → pact}/invoker/ai/index.d.ts +1 -1
  65. package/bin/{city → pact}/invoker/ai/index.d.ts.map +1 -1
  66. package/bin/{city → pact}/invoker/ai/index.js +1 -1
  67. package/bin/{city → pact}/invoker/ai/index.js.map +1 -1
  68. package/bin/{city → pact}/invoker/ai/stream.d.ts +1 -1
  69. package/bin/{city → pact}/invoker/ai/stream.d.ts.map +1 -1
  70. package/bin/{city → pact}/invoker/ai/stream.js +1 -1
  71. package/bin/{city → pact}/invoker/ai/stream.js.map +1 -1
  72. package/bin/{city → pact}/invoker/ai/types.d.ts +2 -2
  73. package/bin/{city → pact}/invoker/ai/types.d.ts.map +1 -1
  74. package/bin/pact/invoker/ai/types.js +9 -0
  75. package/bin/pact/invoker/ai/types.js.map +1 -0
  76. package/bin/{city → pact}/invoker/balance/index.d.ts.map +1 -1
  77. package/bin/{city → pact}/invoker/balance/index.js.map +1 -1
  78. package/bin/{city → pact}/invoker/balance/types.d.ts.map +1 -1
  79. package/bin/pact/invoker/balance/types.js.map +1 -0
  80. package/bin/pact/invoker/cities/index.d.ts +46 -0
  81. package/bin/pact/invoker/cities/index.d.ts.map +1 -0
  82. package/bin/{city/invoker/towns → pact/invoker/cities}/index.js +16 -16
  83. package/bin/pact/invoker/cities/index.js.map +1 -0
  84. package/bin/pact/invoker/cities/types.d.ts +46 -0
  85. package/bin/pact/invoker/cities/types.d.ts.map +1 -0
  86. package/bin/pact/invoker/cities/types.js +5 -0
  87. package/bin/pact/invoker/cities/types.js.map +1 -0
  88. package/bin/{city → pact}/invoker/env/index.d.ts +2 -2
  89. package/bin/{city → pact}/invoker/env/index.d.ts.map +1 -1
  90. package/bin/{city → pact}/invoker/env/index.js +2 -2
  91. package/bin/{city → pact}/invoker/env/index.js.map +1 -1
  92. package/bin/{city → pact}/invoker/env/types.d.ts +2 -2
  93. package/bin/{city → pact}/invoker/env/types.d.ts.map +1 -1
  94. package/bin/pact/invoker/env/types.js +5 -0
  95. package/bin/pact/invoker/env/types.js.map +1 -0
  96. package/bin/{city → pact}/invoker/invoker.d.ts +9 -9
  97. package/bin/{city → pact}/invoker/invoker.d.ts.map +1 -1
  98. package/bin/{city → pact}/invoker/invoker.js +11 -11
  99. package/bin/{city → pact}/invoker/invoker.js.map +1 -1
  100. package/bin/{city → pact}/invoker/payment/index.d.ts +1 -1
  101. package/bin/{city → pact}/invoker/payment/index.d.ts.map +1 -1
  102. package/bin/{city → pact}/invoker/payment/index.js +1 -1
  103. package/bin/{city → pact}/invoker/payment/index.js.map +1 -1
  104. package/bin/{city → pact}/invoker/payment/types.d.ts +1 -1
  105. package/bin/{city → pact}/invoker/payment/types.d.ts.map +1 -1
  106. package/bin/pact/invoker/payment/types.js.map +1 -0
  107. package/bin/{city → pact}/user/index.d.ts +5 -5
  108. package/bin/{city → pact}/user/index.d.ts.map +1 -1
  109. package/bin/{city → pact}/user/index.js +9 -9
  110. package/bin/{city → pact}/user/index.js.map +1 -1
  111. package/bin/{city → pact}/user/types.d.ts +3 -3
  112. package/bin/{city → pact}/user/types.d.ts.map +1 -1
  113. package/bin/pact/user/types.js.map +1 -0
  114. package/bin/service/ai/ai-service.js +3 -3
  115. package/bin/service/ai/helpers.js +2 -2
  116. package/bin/service/ai/job-types.d.ts +8 -8
  117. package/bin/service/ai/job-types.d.ts.map +1 -1
  118. package/bin/service/ai/schema.d.ts +4 -4
  119. package/bin/service/ai/schema.js +6 -6
  120. package/bin/service/ai/schema.js.map +1 -1
  121. package/bin/service/cities/cities-service.d.ts +15 -0
  122. package/bin/service/cities/cities-service.d.ts.map +1 -0
  123. package/bin/service/{towns/towns-service.js → cities/cities-service.js} +17 -17
  124. package/bin/service/cities/cities-service.js.map +1 -0
  125. package/bin/service/cities/city-store.d.ts +17 -0
  126. package/bin/service/cities/city-store.d.ts.map +1 -0
  127. package/bin/service/{towns/town-store.js → cities/city-store.js} +17 -17
  128. package/bin/service/cities/city-store.js.map +1 -0
  129. package/bin/service/{towns → cities}/schema.d.ts +23 -23
  130. package/bin/service/cities/schema.d.ts.map +1 -0
  131. package/bin/service/cities/schema.js +60 -0
  132. package/bin/service/cities/schema.js.map +1 -0
  133. package/bin/service/cities/types.d.ts +51 -0
  134. package/bin/service/cities/types.d.ts.map +1 -0
  135. package/bin/service/cities/types.js +7 -0
  136. package/bin/service/cities/types.js.map +1 -0
  137. package/bin/service/env/env-service.d.ts +2 -2
  138. package/bin/service/env/env-service.js +3 -3
  139. package/bin/service/env/env-service.js.map +1 -1
  140. package/bin/service/env/types.d.ts +2 -2
  141. package/bin/service/env/types.js +1 -1
  142. package/bin/service/installable-service.d.ts +4 -4
  143. package/bin/service/installable-service.d.ts.map +1 -1
  144. package/bin/service/installable-service.js +1 -1
  145. package/bin/service/instruction.d.ts +2 -2
  146. package/bin/service/instruction.js +5 -5
  147. package/bin/service/instruction.js.map +1 -1
  148. package/bin/service/service.d.ts +9 -9
  149. package/bin/service/service.d.ts.map +1 -1
  150. package/bin/service/service.js +2 -2
  151. package/bin/service/service.js.map +1 -1
  152. package/package.json +3 -3
  153. package/bin/city/admin/index.d.ts.map +0 -1
  154. package/bin/city/admin/index.js.map +0 -1
  155. package/bin/city/admin/types.d.ts.map +0 -1
  156. package/bin/city/admin/types.js.map +0 -1
  157. package/bin/city/city.d.ts +0 -73
  158. package/bin/city/city.d.ts.map +0 -1
  159. package/bin/city/city.js.map +0 -1
  160. package/bin/city/index.d.ts +0 -20
  161. package/bin/city/index.d.ts.map +0 -1
  162. package/bin/city/index.js +0 -14
  163. package/bin/city/index.js.map +0 -1
  164. package/bin/city/invoker/ai/types.js +0 -9
  165. package/bin/city/invoker/ai/types.js.map +0 -1
  166. package/bin/city/invoker/balance/types.js.map +0 -1
  167. package/bin/city/invoker/env/types.js +0 -5
  168. package/bin/city/invoker/env/types.js.map +0 -1
  169. package/bin/city/invoker/payment/types.js.map +0 -1
  170. package/bin/city/invoker/towns/index.d.ts +0 -46
  171. package/bin/city/invoker/towns/index.d.ts.map +0 -1
  172. package/bin/city/invoker/towns/index.js.map +0 -1
  173. package/bin/city/invoker/towns/types.d.ts +0 -46
  174. package/bin/city/invoker/towns/types.d.ts.map +0 -1
  175. package/bin/city/invoker/towns/types.js +0 -5
  176. package/bin/city/invoker/towns/types.js.map +0 -1
  177. package/bin/city/types/city.d.ts +0 -71
  178. package/bin/city/types/city.d.ts.map +0 -1
  179. package/bin/city/types/city.js +0 -8
  180. package/bin/city/types/city.js.map +0 -1
  181. package/bin/core/auth/authenticator.d.ts.map +0 -1
  182. package/bin/core/auth/authenticator.js.map +0 -1
  183. package/bin/core/auth/token-signer.d.ts.map +0 -1
  184. package/bin/core/auth/token-signer.js.map +0 -1
  185. package/bin/core/auth/types.d.ts.map +0 -1
  186. package/bin/core/auth/types.js.map +0 -1
  187. package/bin/core/base/base-env-catalog.d.ts +0 -13
  188. package/bin/core/base/base-env-catalog.d.ts.map +0 -1
  189. package/bin/core/base/base-env-catalog.js.map +0 -1
  190. package/bin/core/base/base-init.d.ts.map +0 -1
  191. package/bin/core/base/base-init.js.map +0 -1
  192. package/bin/core/base/base-instruction.d.ts +0 -11
  193. package/bin/core/base/base-instruction.d.ts.map +0 -1
  194. package/bin/core/base/base-instruction.js.map +0 -1
  195. package/bin/core/base/base-router.d.ts.map +0 -1
  196. package/bin/core/base/base-router.js.map +0 -1
  197. package/bin/core/base/base-runtime.d.ts.map +0 -1
  198. package/bin/core/base/base-runtime.js.map +0 -1
  199. package/bin/core/base/base.d.ts.map +0 -1
  200. package/bin/core/base/base.js.map +0 -1
  201. package/bin/core/runtime.d.ts.map +0 -1
  202. package/bin/core/runtime.js +0 -13
  203. package/bin/core/runtime.js.map +0 -1
  204. package/bin/core/types.d.ts.map +0 -1
  205. package/bin/service/towns/schema.d.ts.map +0 -1
  206. package/bin/service/towns/schema.js +0 -60
  207. package/bin/service/towns/schema.js.map +0 -1
  208. package/bin/service/towns/town-store.d.ts +0 -17
  209. package/bin/service/towns/town-store.d.ts.map +0 -1
  210. package/bin/service/towns/town-store.js.map +0 -1
  211. package/bin/service/towns/towns-service.d.ts +0 -15
  212. package/bin/service/towns/towns-service.d.ts.map +0 -1
  213. package/bin/service/towns/towns-service.js.map +0 -1
  214. package/bin/service/towns/types.d.ts +0 -51
  215. package/bin/service/towns/types.d.ts.map +0 -1
  216. package/bin/service/towns/types.js +0 -7
  217. package/bin/service/towns/types.js.map +0 -1
  218. /package/bin/{core → federation}/auth/token-signer.d.ts +0 -0
  219. /package/bin/{core → federation}/auth/types.js +0 -0
  220. /package/bin/{core → federation}/types.js +0 -0
  221. /package/bin/{city → pact}/admin/types.js +0 -0
  222. /package/bin/{city → pact}/http.d.ts +0 -0
  223. /package/bin/{city → pact}/http.js +0 -0
  224. /package/bin/{city → pact}/invoker/balance/index.d.ts +0 -0
  225. /package/bin/{city → pact}/invoker/balance/index.js +0 -0
  226. /package/bin/{city → pact}/invoker/balance/types.d.ts +0 -0
  227. /package/bin/{city → pact}/invoker/balance/types.js +0 -0
  228. /package/bin/{city → pact}/invoker/payment/types.js +0 -0
  229. /package/bin/{city → pact}/user/types.js +0 -0
@@ -1,60 +0,0 @@
1
- /**
2
- * Town 数据库 schema 模块。
3
- *
4
- * 定义 Downcity 内置的 Town 表结构(SQLite + Postgres)。
5
- * Town 是 City 多租户隔离的基本单位。
6
- */
7
- import { pgTable, text as pgText } from "drizzle-orm/pg-core";
8
- import { sqliteTable, text as sqliteText } from "drizzle-orm/sqlite-core";
9
- const DEFAULT_TOWN_TABLE = "towns";
10
- /**
11
- * 默认 SQLite Town 表。
12
- */
13
- export const sqliteTowns = sqliteTable(DEFAULT_TOWN_TABLE, {
14
- /**
15
- * Town ID。
16
- */
17
- town_id: sqliteText("town_id").primaryKey(),
18
- /**
19
- * Town 名称。
20
- */
21
- name: sqliteText("name").notNull(),
22
- /**
23
- * Town 状态。
24
- */
25
- status: sqliteText("status").notNull(),
26
- /**
27
- * Town 创建时间。
28
- */
29
- created_at: sqliteText("created_at").notNull(),
30
- /**
31
- * Town 更新时间。
32
- */
33
- updated_at: sqliteText("updated_at").notNull(),
34
- });
35
- /**
36
- * 默认 Postgres Town 表。
37
- */
38
- export const pgTowns = pgTable(DEFAULT_TOWN_TABLE, {
39
- /**
40
- * Town ID。
41
- */
42
- town_id: pgText("town_id").primaryKey(),
43
- /**
44
- * Town 名称。
45
- */
46
- name: pgText("name").notNull(),
47
- /**
48
- * Town 状态。
49
- */
50
- status: pgText("status").notNull(),
51
- /**
52
- * Town 创建时间。
53
- */
54
- created_at: pgText("created_at").notNull(),
55
- /**
56
- * Town 更新时间。
57
- */
58
- updated_at: pgText("updated_at").notNull(),
59
- });
60
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/service/towns/schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1E,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAAC,kBAAkB,EAAE;IACzD;;OAEG;IACH,OAAO,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE;IAE3C;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE;IAElC;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;IAEtC;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;IAE9C;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;CAC/C,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,kBAAkB,EAAE;IACjD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE;IAEvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE;IAE9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;IAElC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;IAE1C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;CAC3C,CAAC,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Town 数据存储。
3
- *
4
- * 基于 CityTableApi,不直接依赖 Drizzle。
5
- */
6
- import type { CityTableApi } from "../../store/table-api.js";
7
- import type { Town, TownCreateInput, TownStatus } from "./types.js";
8
- export declare class TownStore {
9
- private table;
10
- constructor(table: CityTableApi<Town>);
11
- list(): Promise<Town[]>;
12
- get(town_id: string): Promise<Town | undefined>;
13
- create(input: TownCreateInput): Promise<Town>;
14
- setStatus(town_id: string, status: TownStatus): Promise<Town>;
15
- remove(town_id: string): Promise<void>;
16
- }
17
- //# sourceMappingURL=town-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"town-store.d.ts","sourceRoot":"","sources":["../../../src/service/towns/town-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEpE,qBAAa,SAAS;IACR,OAAO,CAAC,KAAK;gBAAL,KAAK,EAAE,YAAY,CAAC,IAAI,CAAC;IAEvC,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IAIvB,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,GAAG,SAAS,CAAC;IAK/C,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAe7C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAW7D,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC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AC/C,MAAM,IAAI,SAAS,CAAC,wBAAwB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAChE,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,OAAO,EAAE,CAAC,CAAC;QAC3D,MAAM,IAAI,GAAS,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;QACjF,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAmB,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAC/E,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAe;QAC1B,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAmB,CAAC,CAAC;IACxD,CAAC;CACF"}
@@ -1,15 +0,0 @@
1
- /**
2
- * towns 内置服务。
3
- *
4
- * 关键说明(中文)
5
- * - City 默认注册该 service。
6
- * - TownStore 由 City 初始化并注入,确保鉴权和管理 API 使用同一份 town 状态。
7
- */
8
- import { Service } from "../service.js";
9
- export declare class TownsService extends Service {
10
- private store;
11
- private auth;
12
- constructor();
13
- _onInit(): Promise<void>;
14
- }
15
- //# sourceMappingURL=towns-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"towns-service.d.ts","sourceRoot":"","sources":["../../../src/service/towns/towns-service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAIxC,qBAAa,YAAa,SAAQ,OAAO;IACvC,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,IAAI,CAAiB;;IA0CvB,OAAO,IAAI,OAAO,CA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C;IAC1B,CAAC;IAED,KAAK,CAAC,OAAO;QACX,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,UAAW,CAAC;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,cAAe,CAAC;QAEjC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACvD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;CACF"}
@@ -1,51 +0,0 @@
1
- /**
2
- * Town 层公共类型。
3
- *
4
- * Town 是 City 多租户隔离的基本单位,每个 API 调用都绑定到一个 Town。
5
- */
6
- /**
7
- * Town 当前状态。
8
- */
9
- export type TownStatus = "active" | "paused";
10
- /**
11
- * City 中的 Town 记录。
12
- */
13
- export interface Town extends Record<string, unknown> {
14
- /**
15
- * Town 的唯一 ID。
16
- */
17
- town_id: string;
18
- /**
19
- * Town 展示名称。
20
- */
21
- name: string;
22
- /**
23
- * Town 当前状态。
24
- */
25
- status: TownStatus;
26
- /**
27
- * Town 创建时间。
28
- */
29
- created_at: string;
30
- /**
31
- * Town 最后更新时间。
32
- */
33
- updated_at: string;
34
- }
35
- /**
36
- * 创建 Town 时的输入。
37
- */
38
- export interface TownCreateInput {
39
- /**
40
- * Town 展示名称。
41
- */
42
- name: string;
43
- /**
44
- * 自定义 Town ID。
45
- *
46
- * 未传入时由 City 自动生成 `town_${randomSecret(12)}` 格式的 ID。
47
- * 传入时直接采用该值,便于在种子场景中使用固定 ID。
48
- */
49
- town_id?: string;
50
- }
51
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/service/towns/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,IAAK,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACnD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Town 层公共类型。
3
- *
4
- * Town 是 City 多租户隔离的基本单位,每个 API 调用都绑定到一个 Town。
5
- */
6
- export {};
7
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/service/towns/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes