@tiddlywiki/mws 0.0.21 → 0.1.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 (202) hide show
  1. package/README.md +42 -9
  2. package/dist/metafile-esm.json +1 -0
  3. package/dist/mws.d.ts +1 -0
  4. package/dist/mws.js +34710 -0
  5. package/dist/mws.js.map +1 -0
  6. package/editions/mws-docs/tiddlers/$__StoryList.tid +1 -2
  7. package/editions/mws-docs/tiddlers/2025-02-18 - User Management.md.meta +2 -2
  8. package/editions/mws-docs/tiddlers/2025-04-14 - client plugins /342/234/224/357/270/217.md" +31 -0
  9. package/editions/mws-docs/tiddlers/2025-04-14 - client plugins /342/234/224/357/270/217.md.meta" +5 -0
  10. package/editions/mws-docs/tiddlers/{2025-05-04.md → 2025-05-04 - event hooks /342/234/224/357/270/217.md" } +7 -1
  11. package/editions/mws-docs/tiddlers/2025-05-04 - event hooks /342/234/224/357/270/217.md.meta" +5 -0
  12. package/editions/mws-docs/tiddlers/{2025-05-06.md → 2025-05-06 - syncer design.md } +0 -4
  13. package/editions/mws-docs/tiddlers/2025-05-06 - syncer design.md.meta +5 -0
  14. package/editions/mws-docs/tiddlers/Allowed Methods.tid +8 -0
  15. package/editions/mws-docs/tiddlers/Application Access & Security.md +14 -84
  16. package/editions/mws-docs/tiddlers/Application Access & Security.md.meta +1 -1
  17. package/editions/mws-docs/tiddlers/Body Format.md +19 -0
  18. package/editions/mws-docs/tiddlers/Body Format.md.meta +4 -0
  19. package/editions/mws-docs/tiddlers/Checklists and Features.md +0 -3
  20. package/editions/mws-docs/tiddlers/Checklists and Features.md.meta +1 -1
  21. package/editions/mws-docs/tiddlers/Client Plugins.md +17 -0
  22. package/editions/mws-docs/tiddlers/Client Plugins.md.meta +5 -0
  23. package/editions/mws-docs/tiddlers/HTTP API.md +4 -3
  24. package/editions/mws-docs/tiddlers/HTTP API.md.meta +1 -1
  25. package/editions/mws-docs/tiddlers/HelloThere.tid +2 -2
  26. package/editions/mws-docs/tiddlers/Installation.tid +2 -3
  27. package/editions/mws-docs/tiddlers/MWS Architecture.tid +6 -1
  28. package/editions/mws-docs/tiddlers/Multi-user Trust.md +12 -0
  29. package/editions/mws-docs/tiddlers/Multi-user Trust.md.meta +5 -0
  30. package/editions/mws-docs/tiddlers/Notes.tid +5 -3
  31. package/editions/mws-docs/tiddlers/Oracle Attacks.md +29 -0
  32. package/editions/mws-docs/tiddlers/Oracle Attacks.md.meta +5 -0
  33. package/editions/mws-docs/tiddlers/Reference.md +1 -0
  34. package/editions/mws-docs/tiddlers/Reference.md.meta +1 -1
  35. package/editions/mws-docs/tiddlers/Request Handling.md +53 -0
  36. package/editions/mws-docs/tiddlers/Request Handling.md.meta +5 -0
  37. package/editions/mws-docs/tiddlers/Roadmap.tid +7 -0
  38. package/editions/mws-docs/tiddlers/Route Definers.md +206 -0
  39. package/editions/mws-docs/tiddlers/Route Definers.md.meta +5 -0
  40. package/editions/mws-docs/tiddlers/Security.md +75 -0
  41. package/editions/mws-docs/tiddlers/Security.md.meta +5 -0
  42. package/editions/mws-docs/tiddlers/Server Plugins.md +7 -0
  43. package/editions/mws-docs/tiddlers/Server Plugins.md.meta +5 -0
  44. package/editions/mws-docs/tiddlers/Startup Cache.md +28 -0
  45. package/editions/mws-docs/tiddlers/Startup Cache.md.meta +5 -0
  46. package/editions/mws-docs/tiddlers/TiddlerFields.md +5 -0
  47. package/editions/mws-docs/tiddlers/TiddlerFields.md.meta +4 -0
  48. package/editions/mws-docs/tiddlers/Usage.tid +2 -2
  49. package/editions/mws-docs/tiddlers/system/$__mws_cssvar-macro.tid +10 -0
  50. package/editions/mws-docs/tiddlers/system/$__palettes_MUI +143 -0
  51. package/editions/mws-docs/tiddlers/system/$__palettes_MUI.meta +7 -0
  52. package/editions/mws-docs/tiddlers/system/$__palettes_MUI_styles.css +567 -0
  53. package/editions/mws-docs/tiddlers/system/$__palettes_MUI_styles.css.meta +6 -0
  54. package/editions/mws-docs/tiddlers/system/$__theme.tid +6 -0
  55. package/editions/mws-docs/tiddlers/system/SplashScreen.tid +21 -0
  56. package/editions/mws-docs/tiddlers/system/StaticBanner.tid +1 -1
  57. package/editions/mws-docs/tiddlers/system/Styles.tid +13 -0
  58. package/editions/mws-docs/tiddlers/system/palette.tid +4 -1
  59. package/editions/mws-docs/tiddlers/system/sidebarlayout.tid +4 -1
  60. package/editions/mws-docs/tiddlers/x-mws-tiddler.md +35 -0
  61. package/editions/mws-docs/tiddlers/x-mws-tiddler.md.meta +5 -0
  62. package/mws.run.mjs +30 -0
  63. package/package.json +47 -36
  64. package/plugins/client/package-lock.json +46 -83
  65. package/plugins/client/package.json +1 -6
  66. package/plugins/client/plugin.info +2 -2
  67. package/plugins/client/src/fflate.d.ts +1501 -0
  68. package/plugins/client/src/multiwikiclientadaptor.ts +768 -317
  69. package/plugins/client/src/mws.d.ts +4 -0
  70. package/plugins/client/src/types.d.ts +3928 -0
  71. package/plugins/client/tiddlers/en-US.multids +3 -0
  72. package/plugins/client/tiddlers/status/SaveWikiButtonTemplate.tid +3 -0
  73. package/plugins/client/tiddlers/status/icon-cloud.tid +4 -0
  74. package/plugins/client/tiddlers/status/info-segment.tid +8 -0
  75. package/plugins/client/tiddlers/status/readonly-styles.tid +27 -0
  76. package/plugins/client/tiddlers/status/save-offline.tid +7 -0
  77. package/plugins/client/tiddlers/status/save-wiki-button.tid +26 -0
  78. package/plugins/client/tiddlers/status/styles.tid +44 -0
  79. package/plugins/client/tiddlers/status/syncer-actions-copy-logs.tid +6 -0
  80. package/plugins/client/tiddlers/status/syncer-actions-login-status.tid +9 -0
  81. package/plugins/client/tiddlers/status/syncer-actions-login.tid +8 -0
  82. package/plugins/client/tiddlers/status/syncer-actions-logout.tid +8 -0
  83. package/plugins/client/tiddlers/status/syncer-actions-refresh.tid +9 -0
  84. package/plugins/client/tiddlers/status/syncer-actions-save-snapshot.tid +9 -0
  85. package/plugins/client/tiddlers/status/tags-syncerdropdown.tid +2 -0
  86. package/plugins/client/tiddlers/syncer/multiwikiclientadaptor.js +640 -0
  87. package/plugins/client/tiddlers/syncer/syncer.js +831 -0
  88. package/plugins/client/tsconfig.json +19 -16
  89. package/plugins/filter-ast-to-sql/example-run-series.ts +146 -0
  90. package/plugins/server/SplashScreen.tid +150 -0
  91. package/plugins/server/fflate.js +9 -0
  92. package/plugins/server/plugin.info +8 -0
  93. package/plugins/server/readme +1 -0
  94. package/plugins/server/url-polyfill.js +294 -0
  95. package/prisma/client/client.d.ts +1 -0
  96. package/prisma/client/client.js +3 -0
  97. package/prisma/client/default.d.ts +1 -0
  98. package/prisma/client/default.js +3 -0
  99. package/prisma/client/edge.d.ts +1 -0
  100. package/prisma/client/edge.js +297 -0
  101. package/prisma/client/index-browser.js +275 -0
  102. package/prisma/client/index.d.ts +17770 -0
  103. package/prisma/client/index.js +324 -0
  104. package/prisma/client/package.json +173 -0
  105. package/prisma/client/query_engine_bg.js +811 -0
  106. package/prisma/client/query_engine_bg.wasm +0 -0
  107. package/prisma/client/runtime/edge-esm.js +10000 -0
  108. package/prisma/client/runtime/edge.js +10036 -0
  109. package/prisma/client/runtime/index-browser.d.ts +370 -0
  110. package/prisma/client/runtime/index-browser.js +2300 -0
  111. package/prisma/client/runtime/library.d.ts +3681 -0
  112. package/prisma/client/runtime/library.js +10604 -0
  113. package/prisma/client/runtime/react-native.js +10629 -0
  114. package/prisma/client/runtime/wasm-compiler-edge.js +11238 -0
  115. package/prisma/client/runtime/wasm-engine-edge.js +7801 -0
  116. package/prisma/client/schema.prisma +156 -0
  117. package/prisma/client/wasm-edge-light-loader.mjs +4 -0
  118. package/prisma/client/wasm-worker-loader.mjs +4 -0
  119. package/prisma/client/wasm.d.ts +1 -0
  120. package/prisma/client/wasm.js +304 -0
  121. package/prisma/global.ts +53 -0
  122. package/prisma/migrations/{20250406213424_init → 20250606001949_init}/migration.sql +46 -48
  123. package/prisma/migrations/20250613000526_remove_group/migration.sql +22 -0
  124. package/prisma/migrations/20250620014502_settings/migration.sql +5 -0
  125. package/prisma/migrations/20250707205229_recipes/migration.sql +20 -0
  126. package/prisma/migrations/migration_lock.toml +1 -1
  127. package/prisma/notes.md +1 -2
  128. package/prisma/schema.prisma +52 -49
  129. package/prisma/test.sqlite +0 -0
  130. package/prisma/test.sqlite-journal +0 -0
  131. package/public/react-admin/android-chrome-192x192.png +0 -0
  132. package/public/react-admin/android-chrome-512x512.png +0 -0
  133. package/public/react-admin/apple-touch-icon.png +0 -0
  134. package/{react-user-mgmt/public/esm-QKDFEP3B.js → public/react-admin/esm-L4WLVWJN.js} +1 -1
  135. package/public/react-admin/esm-L4WLVWJN.js.map +7 -0
  136. package/public/react-admin/esm-QMNGI3LF.js +3 -0
  137. package/public/react-admin/favicon-16x16.png +0 -0
  138. package/public/react-admin/favicon-32x32.png +0 -0
  139. package/public/react-admin/favicon.ico +0 -0
  140. package/public/react-admin/index.html +36 -0
  141. package/public/react-admin/main.js +268 -0
  142. package/public/react-admin/main.js.map +7 -0
  143. package/public/react-admin/site.webmanifest +20 -0
  144. package/public/react-admin/stats.json +1 -0
  145. package/scripts.mjs +134 -25
  146. package/dist/server.d.ts +0 -945
  147. package/dist/server.js +0 -20775
  148. package/dist/server.js.map +0 -1
  149. package/editions/mws-docs/tiddlers/2025-04-03 - Phases of Development.md +0 -64
  150. package/editions/mws-docs/tiddlers/2025-04-03 - Phases of Development.md.meta +0 -5
  151. package/editions/mws-docs/tiddlers/2025-04-13 - Plugins.md +0 -18
  152. package/editions/mws-docs/tiddlers/2025-04-13 - Plugins.md.meta +0 -5
  153. package/editions/mws-docs/tiddlers/2025-05-04.md.meta +0 -5
  154. package/editions/mws-docs/tiddlers/2025-05-06.md.meta +0 -5
  155. package/editions/mws-docs/tiddlers/Moduler Design.md +0 -29
  156. package/editions/mws-docs/tiddlers/Moduler Design.md.meta +0 -5
  157. package/editions/mws-docs/tiddlers/Request Server.md +0 -20
  158. package/editions/mws-docs/tiddlers/Request Server.md.meta +0 -5
  159. package/editions/mws-docs/tiddlers/system/$__palettes_MUI-Dark +0 -173
  160. package/editions/mws-docs/tiddlers/system/$__palettes_MUI-Dark.meta +0 -6
  161. package/editions/mws-docs/tiddlers/system/$__palettes_MUI-Light +0 -172
  162. package/editions/mws-docs/tiddlers/system/$__palettes_MUI-Light.meta +0 -6
  163. package/plugins/client/tiddlers/config-tiddlers-filter.tid +0 -2
  164. package/plugins/client/tiddlers/config-use-server-sent-events.tid +0 -2
  165. package/plugins/client/tiddlers/info-segment.tid +0 -8
  166. package/plugins/client/tiddlers/multiwikiclientadaptor.js +0 -444
  167. package/prisma/migrations/20250407002306_disconnect_user_tables/migration.sql +0 -52
  168. package/prisma/old-db.sql +0 -144
  169. package/react-user-mgmt/README.md +0 -50
  170. package/react-user-mgmt/eslint.config.js +0 -28
  171. package/react-user-mgmt/package-lock.json +0 -2738
  172. package/react-user-mgmt/package.json +0 -31
  173. package/react-user-mgmt/public/index.html +0 -1
  174. package/react-user-mgmt/public/main.js +0 -295
  175. package/react-user-mgmt/public/main.js.map +0 -7
  176. package/react-user-mgmt/public/stats.json +0 -1
  177. package/react-user-mgmt/tsconfig.json +0 -40
  178. package/react-user-mgmt/types.d.ts +0 -2
  179. package/tiddlywiki-types/boot/boot.d.ts +0 -378
  180. package/tiddlywiki-types/boot/bootprefix.d.ts +0 -110
  181. package/tiddlywiki-types/core/modules/filters.d.ts +0 -107
  182. package/tiddlywiki-types/core/modules/tiddler.d.ts +0 -47
  183. package/tiddlywiki-types/core/modules/wiki-bulkops.d.ts +0 -36
  184. package/tiddlywiki-types/core/modules/wiki.d.ts +0 -208
  185. package/tiddlywiki-types/index.d.ts +0 -7
  186. package/tiddlywiki-types/package.json +0 -3
  187. /package/plugins/client/tiddlers/{sidebarsegment.tid → status/sidebarsegment.tid} +0 -0
  188. /package/plugins/client/tiddlers/{GettingStarted.tid → syncer/GettingStarted.tid} +0 -0
  189. /package/plugins/client/tiddlers/{config-incoming-updates-filter.tid → syncer/config-incoming-updates-filter.tid} +0 -0
  190. /package/plugins/client/tiddlers/{readme.tid → syncer/readme.tid} +0 -0
  191. /package/{react-user-mgmt/public → public/react-admin}/chunk-YALWN5OT.js +0 -0
  192. /package/{react-user-mgmt/public → public/react-admin}/chunk-YALWN5OT.js.map +0 -0
  193. /package/{react-user-mgmt/public/esm-QKDFEP3B.js.map → public/react-admin/esm-QMNGI3LF.js.map} +0 -0
  194. /package/{react-user-mgmt/public → public/react-admin}/favicon.png +0 -0
  195. /package/{react-user-mgmt/public → public/react-admin}/missing-favicon.png +0 -0
  196. /package/{react-user-mgmt/public → public/react-admin}/motovun-jack.jpg +0 -0
  197. /package/{react-user-mgmt/public → public/react-admin}/mws-icon.png +0 -0
  198. /package/{react-user-mgmt/public → public/react-admin}/stats.css +0 -0
  199. /package/{react-user-mgmt/public → public/react-admin}/stats.html +0 -0
  200. /package/{react-user-mgmt/public → public/react-admin}/stats.js +0 -0
  201. /package/{react-user-mgmt/public → public/react-admin}/stats.svg +0 -0
  202. /package/{react-user-mgmt/public → public/react-admin}/vite.svg +0 -0
@@ -0,0 +1,370 @@
1
+ declare class AnyNull extends NullTypesEnumValue {
2
+ #private;
3
+ }
4
+
5
+ declare type Args<T, F extends Operation> = T extends {
6
+ [K: symbol]: {
7
+ types: {
8
+ operations: {
9
+ [K in F]: {
10
+ args: any;
11
+ };
12
+ };
13
+ };
14
+ };
15
+ } ? T[symbol]['types']['operations'][F]['args'] : any;
16
+
17
+ declare class DbNull extends NullTypesEnumValue {
18
+ #private;
19
+ }
20
+
21
+ export declare function Decimal(n: Decimal.Value): Decimal;
22
+
23
+ export declare namespace Decimal {
24
+ export type Constructor = typeof Decimal;
25
+ export type Instance = Decimal;
26
+ export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
27
+ export type Modulo = Rounding | 9;
28
+ export type Value = string | number | Decimal;
29
+
30
+ // http://mikemcl.github.io/decimal.js/#constructor-properties
31
+ export interface Config {
32
+ precision?: number;
33
+ rounding?: Rounding;
34
+ toExpNeg?: number;
35
+ toExpPos?: number;
36
+ minE?: number;
37
+ maxE?: number;
38
+ crypto?: boolean;
39
+ modulo?: Modulo;
40
+ defaults?: boolean;
41
+ }
42
+ }
43
+
44
+ export declare class Decimal {
45
+ readonly d: number[];
46
+ readonly e: number;
47
+ readonly s: number;
48
+
49
+ constructor(n: Decimal.Value);
50
+
51
+ absoluteValue(): Decimal;
52
+ abs(): Decimal;
53
+
54
+ ceil(): Decimal;
55
+
56
+ clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal;
57
+ clamp(min: Decimal.Value, max: Decimal.Value): Decimal;
58
+
59
+ comparedTo(n: Decimal.Value): number;
60
+ cmp(n: Decimal.Value): number;
61
+
62
+ cosine(): Decimal;
63
+ cos(): Decimal;
64
+
65
+ cubeRoot(): Decimal;
66
+ cbrt(): Decimal;
67
+
68
+ decimalPlaces(): number;
69
+ dp(): number;
70
+
71
+ dividedBy(n: Decimal.Value): Decimal;
72
+ div(n: Decimal.Value): Decimal;
73
+
74
+ dividedToIntegerBy(n: Decimal.Value): Decimal;
75
+ divToInt(n: Decimal.Value): Decimal;
76
+
77
+ equals(n: Decimal.Value): boolean;
78
+ eq(n: Decimal.Value): boolean;
79
+
80
+ floor(): Decimal;
81
+
82
+ greaterThan(n: Decimal.Value): boolean;
83
+ gt(n: Decimal.Value): boolean;
84
+
85
+ greaterThanOrEqualTo(n: Decimal.Value): boolean;
86
+ gte(n: Decimal.Value): boolean;
87
+
88
+ hyperbolicCosine(): Decimal;
89
+ cosh(): Decimal;
90
+
91
+ hyperbolicSine(): Decimal;
92
+ sinh(): Decimal;
93
+
94
+ hyperbolicTangent(): Decimal;
95
+ tanh(): Decimal;
96
+
97
+ inverseCosine(): Decimal;
98
+ acos(): Decimal;
99
+
100
+ inverseHyperbolicCosine(): Decimal;
101
+ acosh(): Decimal;
102
+
103
+ inverseHyperbolicSine(): Decimal;
104
+ asinh(): Decimal;
105
+
106
+ inverseHyperbolicTangent(): Decimal;
107
+ atanh(): Decimal;
108
+
109
+ inverseSine(): Decimal;
110
+ asin(): Decimal;
111
+
112
+ inverseTangent(): Decimal;
113
+ atan(): Decimal;
114
+
115
+ isFinite(): boolean;
116
+
117
+ isInteger(): boolean;
118
+ isInt(): boolean;
119
+
120
+ isNaN(): boolean;
121
+
122
+ isNegative(): boolean;
123
+ isNeg(): boolean;
124
+
125
+ isPositive(): boolean;
126
+ isPos(): boolean;
127
+
128
+ isZero(): boolean;
129
+
130
+ lessThan(n: Decimal.Value): boolean;
131
+ lt(n: Decimal.Value): boolean;
132
+
133
+ lessThanOrEqualTo(n: Decimal.Value): boolean;
134
+ lte(n: Decimal.Value): boolean;
135
+
136
+ logarithm(n?: Decimal.Value): Decimal;
137
+ log(n?: Decimal.Value): Decimal;
138
+
139
+ minus(n: Decimal.Value): Decimal;
140
+ sub(n: Decimal.Value): Decimal;
141
+
142
+ modulo(n: Decimal.Value): Decimal;
143
+ mod(n: Decimal.Value): Decimal;
144
+
145
+ naturalExponential(): Decimal;
146
+ exp(): Decimal;
147
+
148
+ naturalLogarithm(): Decimal;
149
+ ln(): Decimal;
150
+
151
+ negated(): Decimal;
152
+ neg(): Decimal;
153
+
154
+ plus(n: Decimal.Value): Decimal;
155
+ add(n: Decimal.Value): Decimal;
156
+
157
+ precision(includeZeros?: boolean): number;
158
+ sd(includeZeros?: boolean): number;
159
+
160
+ round(): Decimal;
161
+
162
+ sine() : Decimal;
163
+ sin() : Decimal;
164
+
165
+ squareRoot(): Decimal;
166
+ sqrt(): Decimal;
167
+
168
+ tangent() : Decimal;
169
+ tan() : Decimal;
170
+
171
+ times(n: Decimal.Value): Decimal;
172
+ mul(n: Decimal.Value) : Decimal;
173
+
174
+ toBinary(significantDigits?: number): string;
175
+ toBinary(significantDigits: number, rounding: Decimal.Rounding): string;
176
+
177
+ toDecimalPlaces(decimalPlaces?: number): Decimal;
178
+ toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
179
+ toDP(decimalPlaces?: number): Decimal;
180
+ toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal;
181
+
182
+ toExponential(decimalPlaces?: number): string;
183
+ toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string;
184
+
185
+ toFixed(decimalPlaces?: number): string;
186
+ toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string;
187
+
188
+ toFraction(max_denominator?: Decimal.Value): Decimal[];
189
+
190
+ toHexadecimal(significantDigits?: number): string;
191
+ toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string;
192
+ toHex(significantDigits?: number): string;
193
+ toHex(significantDigits: number, rounding?: Decimal.Rounding): string;
194
+
195
+ toJSON(): string;
196
+
197
+ toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal;
198
+
199
+ toNumber(): number;
200
+
201
+ toOctal(significantDigits?: number): string;
202
+ toOctal(significantDigits: number, rounding: Decimal.Rounding): string;
203
+
204
+ toPower(n: Decimal.Value): Decimal;
205
+ pow(n: Decimal.Value): Decimal;
206
+
207
+ toPrecision(significantDigits?: number): string;
208
+ toPrecision(significantDigits: number, rounding: Decimal.Rounding): string;
209
+
210
+ toSignificantDigits(significantDigits?: number): Decimal;
211
+ toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal;
212
+ toSD(significantDigits?: number): Decimal;
213
+ toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal;
214
+
215
+ toString(): string;
216
+
217
+ truncated(): Decimal;
218
+ trunc(): Decimal;
219
+
220
+ valueOf(): string;
221
+
222
+ static abs(n: Decimal.Value): Decimal;
223
+ static acos(n: Decimal.Value): Decimal;
224
+ static acosh(n: Decimal.Value): Decimal;
225
+ static add(x: Decimal.Value, y: Decimal.Value): Decimal;
226
+ static asin(n: Decimal.Value): Decimal;
227
+ static asinh(n: Decimal.Value): Decimal;
228
+ static atan(n: Decimal.Value): Decimal;
229
+ static atanh(n: Decimal.Value): Decimal;
230
+ static atan2(y: Decimal.Value, x: Decimal.Value): Decimal;
231
+ static cbrt(n: Decimal.Value): Decimal;
232
+ static ceil(n: Decimal.Value): Decimal;
233
+ static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal;
234
+ static clone(object?: Decimal.Config): Decimal.Constructor;
235
+ static config(object: Decimal.Config): Decimal.Constructor;
236
+ static cos(n: Decimal.Value): Decimal;
237
+ static cosh(n: Decimal.Value): Decimal;
238
+ static div(x: Decimal.Value, y: Decimal.Value): Decimal;
239
+ static exp(n: Decimal.Value): Decimal;
240
+ static floor(n: Decimal.Value): Decimal;
241
+ static hypot(...n: Decimal.Value[]): Decimal;
242
+ static isDecimal(object: any): object is Decimal;
243
+ static ln(n: Decimal.Value): Decimal;
244
+ static log(n: Decimal.Value, base?: Decimal.Value): Decimal;
245
+ static log2(n: Decimal.Value): Decimal;
246
+ static log10(n: Decimal.Value): Decimal;
247
+ static max(...n: Decimal.Value[]): Decimal;
248
+ static min(...n: Decimal.Value[]): Decimal;
249
+ static mod(x: Decimal.Value, y: Decimal.Value): Decimal;
250
+ static mul(x: Decimal.Value, y: Decimal.Value): Decimal;
251
+ static noConflict(): Decimal.Constructor; // Browser only
252
+ static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal;
253
+ static random(significantDigits?: number): Decimal;
254
+ static round(n: Decimal.Value): Decimal;
255
+ static set(object: Decimal.Config): Decimal.Constructor;
256
+ static sign(n: Decimal.Value): number;
257
+ static sin(n: Decimal.Value): Decimal;
258
+ static sinh(n: Decimal.Value): Decimal;
259
+ static sqrt(n: Decimal.Value): Decimal;
260
+ static sub(x: Decimal.Value, y: Decimal.Value): Decimal;
261
+ static sum(...n: Decimal.Value[]): Decimal;
262
+ static tan(n: Decimal.Value): Decimal;
263
+ static tanh(n: Decimal.Value): Decimal;
264
+ static trunc(n: Decimal.Value): Decimal;
265
+
266
+ static readonly default?: Decimal.Constructor;
267
+ static readonly Decimal?: Decimal.Constructor;
268
+
269
+ static readonly precision: number;
270
+ static readonly rounding: Decimal.Rounding;
271
+ static readonly toExpNeg: number;
272
+ static readonly toExpPos: number;
273
+ static readonly minE: number;
274
+ static readonly maxE: number;
275
+ static readonly crypto: boolean;
276
+ static readonly modulo: Decimal.Modulo;
277
+
278
+ static readonly ROUND_UP: 0;
279
+ static readonly ROUND_DOWN: 1;
280
+ static readonly ROUND_CEIL: 2;
281
+ static readonly ROUND_FLOOR: 3;
282
+ static readonly ROUND_HALF_UP: 4;
283
+ static readonly ROUND_HALF_DOWN: 5;
284
+ static readonly ROUND_HALF_EVEN: 6;
285
+ static readonly ROUND_HALF_CEIL: 7;
286
+ static readonly ROUND_HALF_FLOOR: 8;
287
+ static readonly EUCLID: 9;
288
+ }
289
+
290
+ declare type Exact<A, W> = (A extends unknown ? (W extends A ? {
291
+ [K in keyof A]: Exact<A[K], W[K]>;
292
+ } : W) : never) | (A extends Narrowable ? A : never);
293
+
294
+ export declare function getRuntime(): GetRuntimeOutput;
295
+
296
+ declare type GetRuntimeOutput = {
297
+ id: RuntimeName;
298
+ prettyName: string;
299
+ isEdge: boolean;
300
+ };
301
+
302
+ declare class JsonNull extends NullTypesEnumValue {
303
+ #private;
304
+ }
305
+
306
+ /**
307
+ * Generates more strict variant of an enum which, unlike regular enum,
308
+ * throws on non-existing property access. This can be useful in following situations:
309
+ * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input
310
+ * - enum values are generated dynamically from DMMF.
311
+ *
312
+ * In that case, if using normal enums and no compile-time typechecking, using non-existing property
313
+ * will result in `undefined` value being used, which will be accepted. Using strict enum
314
+ * in this case will help to have a runtime exception, telling you that you are probably doing something wrong.
315
+ *
316
+ * Note: if you need to check for existence of a value in the enum you can still use either
317
+ * `in` operator or `hasOwnProperty` function.
318
+ *
319
+ * @param definition
320
+ * @returns
321
+ */
322
+ export declare function makeStrictEnum<T extends Record<PropertyKey, string | number>>(definition: T): T;
323
+
324
+ declare type Narrowable = string | number | bigint | boolean | [];
325
+
326
+ declare class NullTypesEnumValue extends ObjectEnumValue {
327
+ _getNamespace(): string;
328
+ }
329
+
330
+ /**
331
+ * Base class for unique values of object-valued enums.
332
+ */
333
+ declare abstract class ObjectEnumValue {
334
+ constructor(arg?: symbol);
335
+ abstract _getNamespace(): string;
336
+ _getName(): string;
337
+ toString(): string;
338
+ }
339
+
340
+ export declare const objectEnumValues: {
341
+ classes: {
342
+ DbNull: typeof DbNull;
343
+ JsonNull: typeof JsonNull;
344
+ AnyNull: typeof AnyNull;
345
+ };
346
+ instances: {
347
+ DbNull: DbNull;
348
+ JsonNull: JsonNull;
349
+ AnyNull: AnyNull;
350
+ };
351
+ };
352
+
353
+ declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'updateManyAndReturn' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw';
354
+
355
+ declare namespace Public {
356
+ export {
357
+ validator
358
+ }
359
+ }
360
+ export { Public }
361
+
362
+ declare type RuntimeName = 'workerd' | 'deno' | 'netlify' | 'node' | 'bun' | 'edge-light' | '';
363
+
364
+ declare function validator<V>(): <S>(select: Exact<S, V>) => S;
365
+
366
+ declare function validator<C, M extends Exclude<keyof C, `$${string}`>, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): <S>(select: Exact<S, Args<C[M], O>>) => S;
367
+
368
+ declare function validator<C, M extends Exclude<keyof C, `$${string}`>, O extends keyof C[M] & Operation, P extends keyof Args<C[M], O>>(client: C, model: M, operation: O, prop: P): <S>(select: Exact<S, Args<C[M], O>[P]>) => S;
369
+
370
+ export { }