@m5kdev/commons 0.7.0 → 0.8.0

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 (85) hide show
  1. package/dist/src/modules/ai/ai.constants.d.mts +58 -0
  2. package/dist/src/modules/ai/ai.constants.mjs +284 -0
  3. package/dist/src/modules/ai/ai.constants.mjs.map +1 -0
  4. package/dist/src/modules/ai/ai.utils.d.mts +5 -0
  5. package/dist/src/modules/ai/ai.utils.mjs +8 -0
  6. package/dist/src/modules/ai/ai.utils.mjs.map +1 -0
  7. package/dist/src/modules/auth/auth.schema.d.mts +25 -0
  8. package/dist/src/modules/auth/auth.schema.mjs +24 -0
  9. package/dist/src/modules/auth/auth.schema.mjs.map +1 -0
  10. package/dist/src/modules/base/base.schema.d.mts +30 -0
  11. package/dist/src/modules/base/base.schema.mjs +12 -0
  12. package/dist/src/modules/base/base.schema.mjs.map +1 -0
  13. package/dist/src/modules/billing/billing.schema.d.mts +27 -0
  14. package/dist/src/modules/billing/billing.schema.mjs +26 -0
  15. package/dist/src/modules/billing/billing.schema.mjs.map +1 -0
  16. package/dist/src/modules/billing/billing.types.d.mts +21 -0
  17. package/dist/src/modules/billing/billing.types.mjs +1 -0
  18. package/dist/src/modules/billing/billing.utils.d.mts +10 -0
  19. package/dist/src/modules/billing/billing.utils.mjs +12 -0
  20. package/dist/src/modules/billing/billing.utils.mjs.map +1 -0
  21. package/dist/src/modules/file/file.constants.d.mts +8 -0
  22. package/dist/src/modules/file/file.constants.mjs +50 -0
  23. package/dist/src/modules/file/file.constants.mjs.map +1 -0
  24. package/dist/src/modules/recurrence/recurrence.schema.d.mts +103 -0
  25. package/dist/src/modules/recurrence/recurrence.schema.mjs +62 -0
  26. package/dist/src/modules/recurrence/recurrence.schema.mjs.map +1 -0
  27. package/dist/src/modules/schemas/query.schema.d.mts +115 -0
  28. package/dist/src/modules/schemas/query.schema.mjs +50 -0
  29. package/dist/src/modules/schemas/query.schema.mjs.map +1 -0
  30. package/dist/src/modules/table/filter.types.d.mts +15 -0
  31. package/dist/src/modules/table/filter.types.mjs +1 -0
  32. package/dist/src/modules/tag/tag.schema.d.mts +121 -0
  33. package/dist/src/modules/tag/tag.schema.mjs +56 -0
  34. package/dist/src/modules/tag/tag.schema.mjs.map +1 -0
  35. package/dist/src/modules/workflow/workflow.constants.d.mts +6 -0
  36. package/dist/src/modules/workflow/workflow.constants.mjs +11 -0
  37. package/dist/src/modules/workflow/workflow.constants.mjs.map +1 -0
  38. package/dist/src/modules/workflow/workflow.schema.d.mts +97 -0
  39. package/dist/src/modules/workflow/workflow.schema.mjs +33 -0
  40. package/dist/src/modules/workflow/workflow.schema.mjs.map +1 -0
  41. package/dist/src/utils/json.d.mts +6 -0
  42. package/dist/src/utils/json.mjs +12 -0
  43. package/dist/src/utils/json.mjs.map +1 -0
  44. package/dist/src/utils/timezones.d.mts +18 -0
  45. package/dist/src/utils/timezones.mjs +5645 -0
  46. package/dist/src/utils/timezones.mjs.map +1 -0
  47. package/dist/src/utils/trpc.d.mts +8 -0
  48. package/dist/src/utils/trpc.mjs +10 -0
  49. package/dist/src/utils/trpc.mjs.map +1 -0
  50. package/package.json +4 -3
  51. package/dist/src/modules/ai/ai.constants.d.ts +0 -54
  52. package/dist/src/modules/ai/ai.constants.js +0 -287
  53. package/dist/src/modules/ai/ai.utils.d.ts +0 -1
  54. package/dist/src/modules/ai/ai.utils.js +0 -10
  55. package/dist/src/modules/auth/auth.schema.d.ts +0 -20
  56. package/dist/src/modules/auth/auth.schema.js +0 -22
  57. package/dist/src/modules/base/base.schema.d.ts +0 -25
  58. package/dist/src/modules/base/base.schema.js +0 -18
  59. package/dist/src/modules/billing/billing.schema.d.ts +0 -22
  60. package/dist/src/modules/billing/billing.schema.js +0 -24
  61. package/dist/src/modules/billing/billing.types.d.ts +0 -17
  62. package/dist/src/modules/billing/billing.types.js +0 -2
  63. package/dist/src/modules/billing/billing.utils.d.ts +0 -5
  64. package/dist/src/modules/billing/billing.utils.js +0 -12
  65. package/dist/src/modules/file/file.constants.d.ts +0 -4
  66. package/dist/src/modules/file/file.constants.js +0 -17
  67. package/dist/src/modules/recurrence/recurrence.schema.d.ts +0 -98
  68. package/dist/src/modules/recurrence/recurrence.schema.js +0 -65
  69. package/dist/src/modules/schemas/query.schema.d.ts +0 -110
  70. package/dist/src/modules/schemas/query.schema.js +0 -38
  71. package/dist/src/modules/table/filter.types.d.ts +0 -12
  72. package/dist/src/modules/table/filter.types.js +0 -2
  73. package/dist/src/modules/tag/tag.schema.d.ts +0 -116
  74. package/dist/src/modules/tag/tag.schema.js +0 -58
  75. package/dist/src/modules/workflow/workflow.constants.d.ts +0 -2
  76. package/dist/src/modules/workflow/workflow.constants.js +0 -4
  77. package/dist/src/modules/workflow/workflow.schema.d.ts +0 -92
  78. package/dist/src/modules/workflow/workflow.schema.js +0 -37
  79. package/dist/src/utils/json.d.ts +0 -2
  80. package/dist/src/utils/json.js +0 -11
  81. package/dist/src/utils/timezones.d.ts +0 -14
  82. package/dist/src/utils/timezones.js +0 -4362
  83. package/dist/src/utils/trpc.d.ts +0 -4
  84. package/dist/src/utils/trpc.js +0 -8
  85. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -0,0 +1,8 @@
1
+ //#region src/utils/trpc.d.ts
2
+ declare const transformer: {
3
+ deserialize: (object: any) => any;
4
+ serialize: (object: any) => string;
5
+ };
6
+ //#endregion
7
+ export { transformer };
8
+ //# sourceMappingURL=trpc.d.mts.map
@@ -0,0 +1,10 @@
1
+ import { parse, stringify } from "devalue";
2
+ //#region src/utils/trpc.ts
3
+ const transformer = {
4
+ deserialize: (object) => parse(object),
5
+ serialize: (object) => stringify(object)
6
+ };
7
+ //#endregion
8
+ export { transformer };
9
+
10
+ //# sourceMappingURL=trpc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trpc.mjs","names":[],"sources":["../../../src/utils/trpc.ts"],"sourcesContent":["import { parse, stringify } from \"devalue\";\r\n\r\nexport const transformer = {\r\n deserialize: (object: any) => parse(object),\r\n serialize: (object: any) => stringify(object),\r\n};\r\n"],"mappings":";;AAEA,MAAa,cAAc;CACzB,cAAc,WAAgB,MAAM,OAAO;CAC3C,YAAY,WAAgB,UAAU,OAAO;CAC9C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m5kdev/commons",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "license": "GPL-3.0-only",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,8 +16,9 @@
16
16
  "zod": "4.2.1"
17
17
  },
18
18
  "devDependencies": {
19
+ "tsdown": "0.21.7",
19
20
  "typescript": "5.9.2",
20
- "@m5kdev/config": "0.7.0"
21
+ "@m5kdev/config": "0.8.0"
21
22
  },
22
23
  "exports": {
23
24
  "./utils/*": {
@@ -72,7 +73,7 @@
72
73
  "scripts": {
73
74
  "lint": "biome check .",
74
75
  "lint:fix": "biome check . --write",
75
- "build": "tsc --build",
76
+ "build": "tsdown",
76
77
  "check-types": "tsc --noEmit"
77
78
  }
78
79
  }
@@ -1,54 +0,0 @@
1
- export declare const GPT_5_CHAT = "openai/gpt-5-chat";
2
- export declare const GPT_5_1 = "openai/gpt-5.1";
3
- export declare const GPT_5_2 = "openai/gpt-5.2";
4
- export declare const GEMINI_3_1_PRO = "google/gemini-3.1-pro-preview";
5
- export declare const GEMINI_2_5_PRO = "google/gemini-2.5-pro";
6
- export declare const GEMINI_3_PRO = "google/gemini-3-pro-preview";
7
- export declare const GEMINI_3_FLASH = "google/gemini-3-flash-preview";
8
- export declare const GROK_4 = "x-ai/grok-4";
9
- export declare const CLAUDE_SONNET_4 = "anthropic/claude-sonnet-4";
10
- export declare const CLAUDE_SONNET_4_5 = "anthropic/claude-sonnet-4.5";
11
- export declare const CLAUDE_OPUS_4_5 = "anthropic/claude-opus-4.5";
12
- export declare const CLAUDE_SONNET_4_6 = "anthropic/claude-sonnet-4.6";
13
- export declare const CLAUDE_OPUS_4_6 = "anthropic/claude-opus-4.6";
14
- export declare const MINIMAX_M2 = "minimax/minimax-m2";
15
- export declare const QWEN3_MAX = "qwen/qwen3-max";
16
- export declare const O3 = "openai/o3";
17
- export declare const GPT_5_MINI = "openai/gpt-5-mini";
18
- export declare const GEMINI_2_5_FLASH = "google/gemini-2.5-flash";
19
- export declare const GROK_3_MINI = "x-ai/grok-3-mini";
20
- export declare const GROK_4_FAST = "x-ai/grok-4-fast";
21
- export declare const KIMI_K2_THINKING = "moonshotai/kimi-k2-thinking";
22
- export declare const KIMI_K2 = "moonshotai/kimi-k2-0905";
23
- export declare const KIMI_K2_5 = "moonshotai/kimi-k2.5";
24
- export declare const CLAUDE_SONNET_3_HAIKU = "anthropic/claude-3-haiku";
25
- export declare const GLM_4_5V = "z-ai/glm-4.5v";
26
- export declare const GLM_4_6 = "z-ai/glm-4.6";
27
- export declare const DEEPSEEK_V3_1 = "deepseek/deepseek-chat-v3.1";
28
- export declare const DEEPSEEK_R1 = "deepseek/deepseek-r1-0528";
29
- export declare const LLAMA_3_3_70B_INSTRUCT = "meta-llama/llama-3.3-70b-instruct";
30
- export declare const MISTRAL_3_1_MEDIUM = "mistralai/mistral-medium-3.1";
31
- export declare const QWEN3_30B_A3B = "qwen/qwen3-30b-a3b";
32
- export declare const GPT_5_NANO = "openai/gpt-5-nano";
33
- export declare const GEMINI_2_5_FLASH_LITE = "google/gemini-2.5-flash-lite";
34
- export declare const OPENAI_TEXT_EMBEDDING_3_SMALL = "openai/text-embedding-3-small";
35
- export declare const AI_EMBEDDING_MODELS: readonly ["openai/text-embedding-3-small"];
36
- export type AiEmbeddingModel = (typeof AI_EMBEDDING_MODELS)[number];
37
- export declare const SCORER_BEST = "google/gemini-3-flash-preview";
38
- export declare const SCORER_FAST = "moonshotai/kimi-k2.5";
39
- export declare const RESONING_BEST = "google/gemini-3.1-pro-preview";
40
- export declare const RESONING_FAST = "moonshotai/kimi-k2.5";
41
- export declare const STRUCTURED_OUTPUT_BEST = "anthropic/claude-sonnet-4.5";
42
- export declare const STRUCTURED_OUTPUT_FAST = "openai/gpt-5-mini";
43
- export declare const TOOL_CALL_BEST = "anthropic/claude-sonnet-4.5";
44
- export declare const TOOL_CALL_FAST = "openai/gpt-5-mini";
45
- export declare const AI_MODELS: readonly ["meta-llama/llama-3.3-70b-instruct", "qwen/qwen3-30b-a3b", "google/gemini-2.5-pro", "google/gemini-3-pro-preview", "google/gemini-3-flash-preview", "deepseek/deepseek-r1-0528", "openai/o3", "openai/gpt-5.1", "openai/gpt-5.2", "openai/gpt-5-chat", "x-ai/grok-4", "anthropic/claude-sonnet-4", "anthropic/claude-sonnet-4.5", "anthropic/claude-opus-4.5", "openai/gpt-5-mini", "z-ai/glm-4.5v", "mistralai/mistral-medium-3.1", "google/gemini-2.5-flash", "x-ai/grok-3-mini", "anthropic/claude-3-haiku", "openai/gpt-5-nano", "google/gemini-2.5-flash-lite", "x-ai/grok-4-fast", "minimax/minimax-m2", "moonshotai/kimi-k2-0905", "moonshotai/kimi-k2-thinking", "deepseek/deepseek-chat-v3.1", "z-ai/glm-4.6", "qwen/qwen3-max"];
46
- export declare const AI_MODELS_REGISTRY: AiModelRegistry;
47
- export type AiModel = (typeof AI_MODELS)[number];
48
- export type AiModelRegistry = Record<AiModel, {
49
- name: string;
50
- provider: string;
51
- icon: string;
52
- tier: string;
53
- order: number;
54
- }>;
@@ -1,287 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AI_MODELS_REGISTRY = exports.AI_MODELS = exports.TOOL_CALL_FAST = exports.TOOL_CALL_BEST = exports.STRUCTURED_OUTPUT_FAST = exports.STRUCTURED_OUTPUT_BEST = exports.RESONING_FAST = exports.RESONING_BEST = exports.SCORER_FAST = exports.SCORER_BEST = exports.AI_EMBEDDING_MODELS = exports.OPENAI_TEXT_EMBEDDING_3_SMALL = exports.GEMINI_2_5_FLASH_LITE = exports.GPT_5_NANO = exports.QWEN3_30B_A3B = exports.MISTRAL_3_1_MEDIUM = exports.LLAMA_3_3_70B_INSTRUCT = exports.DEEPSEEK_R1 = exports.DEEPSEEK_V3_1 = exports.GLM_4_6 = exports.GLM_4_5V = exports.CLAUDE_SONNET_3_HAIKU = exports.KIMI_K2_5 = exports.KIMI_K2 = exports.KIMI_K2_THINKING = exports.GROK_4_FAST = exports.GROK_3_MINI = exports.GEMINI_2_5_FLASH = exports.GPT_5_MINI = exports.O3 = exports.QWEN3_MAX = exports.MINIMAX_M2 = exports.CLAUDE_OPUS_4_6 = exports.CLAUDE_SONNET_4_6 = exports.CLAUDE_OPUS_4_5 = exports.CLAUDE_SONNET_4_5 = exports.CLAUDE_SONNET_4 = exports.GROK_4 = exports.GEMINI_3_FLASH = exports.GEMINI_3_PRO = exports.GEMINI_2_5_PRO = exports.GEMINI_3_1_PRO = exports.GPT_5_2 = exports.GPT_5_1 = exports.GPT_5_CHAT = void 0;
4
- // Models > $1/M tokens
5
- exports.GPT_5_CHAT = "openai/gpt-5-chat";
6
- exports.GPT_5_1 = "openai/gpt-5.1";
7
- exports.GPT_5_2 = "openai/gpt-5.2";
8
- exports.GEMINI_3_1_PRO = "google/gemini-3.1-pro-preview";
9
- exports.GEMINI_2_5_PRO = "google/gemini-2.5-pro";
10
- exports.GEMINI_3_PRO = "google/gemini-3-pro-preview";
11
- exports.GEMINI_3_FLASH = "google/gemini-3-flash-preview";
12
- exports.GROK_4 = "x-ai/grok-4";
13
- exports.CLAUDE_SONNET_4 = "anthropic/claude-sonnet-4";
14
- exports.CLAUDE_SONNET_4_5 = "anthropic/claude-sonnet-4.5";
15
- exports.CLAUDE_OPUS_4_5 = "anthropic/claude-opus-4.5";
16
- exports.CLAUDE_SONNET_4_6 = "anthropic/claude-sonnet-4.6";
17
- exports.CLAUDE_OPUS_4_6 = "anthropic/claude-opus-4.6";
18
- exports.MINIMAX_M2 = "minimax/minimax-m2";
19
- exports.QWEN3_MAX = "qwen/qwen3-max";
20
- exports.O3 = "openai/o3";
21
- // Models < $1/M tokens
22
- exports.GPT_5_MINI = "openai/gpt-5-mini";
23
- exports.GEMINI_2_5_FLASH = "google/gemini-2.5-flash";
24
- exports.GROK_3_MINI = "x-ai/grok-3-mini";
25
- exports.GROK_4_FAST = "x-ai/grok-4-fast";
26
- exports.KIMI_K2_THINKING = "moonshotai/kimi-k2-thinking";
27
- exports.KIMI_K2 = "moonshotai/kimi-k2-0905";
28
- exports.KIMI_K2_5 = "moonshotai/kimi-k2.5";
29
- exports.CLAUDE_SONNET_3_HAIKU = "anthropic/claude-3-haiku";
30
- exports.GLM_4_5V = "z-ai/glm-4.5v";
31
- exports.GLM_4_6 = "z-ai/glm-4.6";
32
- exports.DEEPSEEK_V3_1 = "deepseek/deepseek-chat-v3.1";
33
- exports.DEEPSEEK_R1 = "deepseek/deepseek-r1-0528";
34
- exports.LLAMA_3_3_70B_INSTRUCT = "meta-llama/llama-3.3-70b-instruct";
35
- exports.MISTRAL_3_1_MEDIUM = "mistralai/mistral-medium-3.1";
36
- // Models < $0.1/M tokens
37
- exports.QWEN3_30B_A3B = "qwen/qwen3-30b-a3b";
38
- exports.GPT_5_NANO = "openai/gpt-5-nano";
39
- exports.GEMINI_2_5_FLASH_LITE = "google/gemini-2.5-flash-lite";
40
- // Embedding Models
41
- exports.OPENAI_TEXT_EMBEDDING_3_SMALL = "openai/text-embedding-3-small";
42
- exports.AI_EMBEDDING_MODELS = [exports.OPENAI_TEXT_EMBEDDING_3_SMALL];
43
- // Models by utility
44
- exports.SCORER_BEST = exports.GEMINI_3_FLASH;
45
- exports.SCORER_FAST = exports.KIMI_K2_5;
46
- exports.RESONING_BEST = exports.GEMINI_3_1_PRO;
47
- exports.RESONING_FAST = exports.KIMI_K2_5;
48
- exports.STRUCTURED_OUTPUT_BEST = exports.CLAUDE_SONNET_4_5;
49
- exports.STRUCTURED_OUTPUT_FAST = exports.GPT_5_MINI;
50
- exports.TOOL_CALL_BEST = exports.CLAUDE_SONNET_4_5;
51
- exports.TOOL_CALL_FAST = exports.GPT_5_MINI;
52
- exports.AI_MODELS = [
53
- exports.LLAMA_3_3_70B_INSTRUCT,
54
- exports.QWEN3_30B_A3B,
55
- exports.GEMINI_2_5_PRO,
56
- exports.GEMINI_3_PRO,
57
- exports.GEMINI_3_FLASH,
58
- exports.DEEPSEEK_R1,
59
- exports.O3,
60
- exports.GPT_5_1,
61
- exports.GPT_5_2,
62
- exports.GPT_5_CHAT,
63
- exports.GROK_4,
64
- exports.CLAUDE_SONNET_4,
65
- exports.CLAUDE_SONNET_4_5,
66
- exports.CLAUDE_OPUS_4_5,
67
- exports.GPT_5_MINI,
68
- exports.GLM_4_5V,
69
- exports.MISTRAL_3_1_MEDIUM,
70
- exports.GEMINI_2_5_FLASH,
71
- exports.GROK_3_MINI,
72
- exports.CLAUDE_SONNET_3_HAIKU,
73
- exports.GPT_5_NANO,
74
- exports.GEMINI_2_5_FLASH_LITE,
75
- exports.GROK_4_FAST,
76
- exports.MINIMAX_M2,
77
- exports.KIMI_K2,
78
- exports.KIMI_K2_THINKING,
79
- exports.DEEPSEEK_V3_1,
80
- exports.GLM_4_6,
81
- exports.QWEN3_MAX,
82
- ];
83
- exports.AI_MODELS_REGISTRY = {
84
- [exports.O3]: {
85
- name: "O3",
86
- provider: "openai",
87
- icon: "ti-brand-openai",
88
- tier: "pro",
89
- order: 1,
90
- },
91
- [exports.MISTRAL_3_1_MEDIUM]: {
92
- name: "Mistral 3.1 Medium",
93
- provider: "mistralai",
94
- icon: "ti-ai",
95
- tier: "pro",
96
- order: 1,
97
- },
98
- [exports.DEEPSEEK_R1]: {
99
- name: "DeepSeek R1",
100
- provider: "deepseek",
101
- icon: "ti-ai",
102
- tier: "pro",
103
- order: 1,
104
- },
105
- [exports.QWEN3_30B_A3B]: {
106
- name: "Qwen3 30B A3B",
107
- provider: "qwen",
108
- icon: "ti-ai",
109
- tier: "pro",
110
- order: 1,
111
- },
112
- [exports.LLAMA_3_3_70B_INSTRUCT]: {
113
- name: "LLama 3.3 70B",
114
- provider: "meta-llama",
115
- icon: "ti-brand-meta",
116
- tier: "pro",
117
- order: 1,
118
- },
119
- [exports.GLM_4_5V]: {
120
- name: "GLM 4.5V",
121
- provider: "z-ai",
122
- icon: "ti-ai",
123
- tier: "pro",
124
- order: 1,
125
- },
126
- [exports.GLM_4_6]: {
127
- name: "GLM 4.6",
128
- provider: "z-ai",
129
- icon: "ti-ai",
130
- tier: "pro",
131
- order: 1,
132
- },
133
- [exports.QWEN3_MAX]: {
134
- name: "Qwen3 Max",
135
- provider: "qwen",
136
- icon: "ti-ai",
137
- tier: "pro",
138
- order: 1,
139
- },
140
- [exports.DEEPSEEK_V3_1]: {
141
- name: "DeepSeek V3.1",
142
- provider: "deepseek",
143
- icon: "ti-ai",
144
- tier: "pro",
145
- order: 1,
146
- },
147
- [exports.KIMI_K2]: {
148
- name: "Kimi K2",
149
- provider: "moonshotai",
150
- icon: "ti-ai",
151
- tier: "pro",
152
- order: 1,
153
- },
154
- [exports.KIMI_K2_THINKING]: {
155
- name: "Kimi K2 Thinking",
156
- provider: "moonshotai",
157
- icon: "ti-ai",
158
- tier: "pro",
159
- order: 1,
160
- },
161
- [exports.CLAUDE_SONNET_4_5]: {
162
- name: "Claude Sonnet 4.5",
163
- provider: "anthropic",
164
- icon: "ti-ai",
165
- tier: "pro",
166
- order: 1,
167
- },
168
- [exports.GPT_5_1]: {
169
- name: "GPT-5.1",
170
- provider: "openai",
171
- icon: "ti-brand-openai",
172
- tier: "pro",
173
- order: 1,
174
- },
175
- [exports.GPT_5_2]: {
176
- name: "GPT-5.2",
177
- provider: "openai",
178
- icon: "ti-brand-openai",
179
- tier: "pro",
180
- order: 1,
181
- },
182
- [exports.MINIMAX_M2]: {
183
- name: "MiniMax M2",
184
- provider: "minimax",
185
- icon: "ti-ai",
186
- tier: "pro",
187
- order: 1,
188
- },
189
- [exports.GEMINI_2_5_PRO]: {
190
- name: "Gemini 2.5 Pro",
191
- provider: "google",
192
- icon: "ti-brand-google",
193
- tier: "pro",
194
- order: 1,
195
- },
196
- [exports.GEMINI_3_PRO]: {
197
- name: "Gemini 3 Pro",
198
- provider: "google",
199
- icon: "ti-brand-google",
200
- tier: "pro",
201
- order: 1,
202
- },
203
- [exports.GEMINI_3_FLASH]: {
204
- name: "Gemini 3 Flash",
205
- provider: "google",
206
- icon: "ti-brand-google",
207
- tier: "pro",
208
- order: 1,
209
- },
210
- [exports.GPT_5_CHAT]: {
211
- name: "GPT-5",
212
- provider: "openai",
213
- icon: "ti-brand-openai",
214
- tier: "pro",
215
- order: 2,
216
- },
217
- [exports.GROK_4]: {
218
- name: "Grok 4",
219
- provider: "x-ai",
220
- icon: "ti-brand-x",
221
- tier: "pro",
222
- order: 3,
223
- },
224
- [exports.GROK_4_FAST]: {
225
- name: "Grok 4 Fast",
226
- provider: "x-ai",
227
- icon: "ti-brand-x",
228
- tier: "pro",
229
- order: 4,
230
- },
231
- [exports.CLAUDE_SONNET_4]: {
232
- name: "Claude Sonnet 4",
233
- provider: "anthropic",
234
- icon: "ti-ai",
235
- tier: "pro",
236
- order: 4,
237
- },
238
- [exports.CLAUDE_OPUS_4_5]: {
239
- name: "Claude Opus 4.5",
240
- provider: "anthropic",
241
- icon: "ti-ai",
242
- tier: "pro",
243
- order: 1,
244
- },
245
- [exports.GPT_5_MINI]: {
246
- name: "GPT-5 Mini",
247
- provider: "openai",
248
- icon: "ti-brand-openai",
249
- tier: "standard",
250
- order: 5,
251
- },
252
- [exports.GEMINI_2_5_FLASH]: {
253
- name: "Gemini 2.5 Flash",
254
- provider: "google",
255
- icon: "ti-brand-google",
256
- tier: "standard",
257
- order: 6,
258
- },
259
- [exports.GROK_3_MINI]: {
260
- name: "Grok 3 Mini",
261
- provider: "x-ai",
262
- icon: "ti-brand-x",
263
- tier: "standard",
264
- order: 7,
265
- },
266
- [exports.CLAUDE_SONNET_3_HAIKU]: {
267
- name: "Claude Sonnet 3 Haiku",
268
- provider: "anthropic",
269
- icon: "ti-brand-anthropic",
270
- tier: "standard",
271
- order: 8,
272
- },
273
- [exports.GPT_5_NANO]: {
274
- name: "GPT-5 Nano",
275
- provider: "openai",
276
- icon: "ti-brand-openai",
277
- tier: "fast",
278
- order: 9,
279
- },
280
- [exports.GEMINI_2_5_FLASH_LITE]: {
281
- name: "Gemini 2.5 Flash Lite",
282
- provider: "google",
283
- icon: "ti-brand-google",
284
- tier: "fast",
285
- order: 10,
286
- },
287
- };
@@ -1 +0,0 @@
1
- export declare function arrayToPseudoXML<T extends Record<string, unknown>>(array: readonly T[], keys: readonly (keyof T)[], name?: string): string;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.arrayToPseudoXML = arrayToPseudoXML;
4
- function arrayToPseudoXML(array, keys, name = "item") {
5
- return array
6
- .map((item) => `<${name}>${keys
7
- .map((key) => `<${String(key)}>${String(item[key])}</${String(key)}>`)
8
- .join("\n")}</${name}>`)
9
- .join("\n");
10
- }
@@ -1,20 +0,0 @@
1
- import { z } from "zod";
2
- export declare const userSchema: z.ZodObject<{
3
- id: z.ZodString;
4
- name: z.ZodString;
5
- email: z.ZodString;
6
- emailVerified: z.ZodBoolean;
7
- image: z.ZodNullable<z.ZodString>;
8
- createdAt: z.ZodDate;
9
- updatedAt: z.ZodDate;
10
- role: z.ZodNullable<z.ZodString>;
11
- banned: z.ZodNullable<z.ZodBoolean>;
12
- banReason: z.ZodNullable<z.ZodString>;
13
- banExpires: z.ZodNullable<z.ZodDate>;
14
- paymentCustomerId: z.ZodNullable<z.ZodString>;
15
- paymentPlanTier: z.ZodNullable<z.ZodString>;
16
- paymentPlanExpiresAt: z.ZodNullable<z.ZodDate>;
17
- preferences: z.ZodNullable<z.ZodString>;
18
- onboarding: z.ZodNullable<z.ZodBoolean>;
19
- }, z.core.$strip>;
20
- export type UserSchema = z.infer<typeof userSchema>;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.userSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.userSchema = zod_1.z.object({
6
- id: zod_1.z.string(),
7
- name: zod_1.z.string(),
8
- email: zod_1.z.string(),
9
- emailVerified: zod_1.z.boolean(),
10
- image: zod_1.z.string().nullable(),
11
- createdAt: zod_1.z.date(),
12
- updatedAt: zod_1.z.date(),
13
- role: zod_1.z.string().nullable(),
14
- banned: zod_1.z.boolean().nullable(),
15
- banReason: zod_1.z.string().nullable(),
16
- banExpires: zod_1.z.date().nullable(),
17
- paymentCustomerId: zod_1.z.string().nullable(),
18
- paymentPlanTier: zod_1.z.string().nullable(),
19
- paymentPlanExpiresAt: zod_1.z.date().nullable(),
20
- preferences: zod_1.z.string().nullable(),
21
- onboarding: zod_1.z.boolean().nullable(),
22
- });
@@ -1,25 +0,0 @@
1
- import { z } from "zod";
2
- export declare const uuidSchema: z.ZodObject<{
3
- id: z.ZodUUID;
4
- }, z.core.$strip>;
5
- export declare const uuidManySchema: z.ZodObject<{
6
- ids: z.ZodArray<z.ZodUUID>;
7
- }, z.core.$strip>;
8
- export declare const scheduleOutputSchema: z.ZodObject<{
9
- jobId: z.ZodString;
10
- }, z.core.$strip>;
11
- export declare const scheduleManyOutputSchema: z.ZodObject<{
12
- jobIds: z.ZodArray<z.ZodString>;
13
- }, z.core.$strip>;
14
- export declare const deleteOutputSchema: z.ZodObject<{
15
- id: z.ZodUUID;
16
- }, z.core.$strip>;
17
- export declare const deleteManyOutputSchema: z.ZodObject<{
18
- ids: z.ZodArray<z.ZodUUID>;
19
- }, z.core.$strip>;
20
- export type UuidSchema = z.infer<typeof uuidSchema>;
21
- export type UuidManySchema = z.infer<typeof uuidManySchema>;
22
- export type ScheduleOutputSchema = z.infer<typeof scheduleOutputSchema>;
23
- export type ScheduleManyOutputSchema = z.infer<typeof scheduleManyOutputSchema>;
24
- export type DeleteOutputSchema = z.infer<typeof deleteOutputSchema>;
25
- export type DeleteManyInputSchema = z.infer<typeof deleteManyOutputSchema>;
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteManyOutputSchema = exports.deleteOutputSchema = exports.scheduleManyOutputSchema = exports.scheduleOutputSchema = exports.uuidManySchema = exports.uuidSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.uuidSchema = zod_1.z.object({
6
- id: zod_1.z.uuid(),
7
- });
8
- exports.uuidManySchema = zod_1.z.object({
9
- ids: zod_1.z.array(zod_1.z.uuid()),
10
- });
11
- exports.scheduleOutputSchema = zod_1.z.object({
12
- jobId: zod_1.z.string(),
13
- });
14
- exports.scheduleManyOutputSchema = zod_1.z.object({
15
- jobIds: zod_1.z.array(zod_1.z.string()),
16
- });
17
- exports.deleteOutputSchema = exports.uuidSchema;
18
- exports.deleteManyOutputSchema = exports.uuidManySchema;
@@ -1,22 +0,0 @@
1
- import { z } from "zod";
2
- export declare const billingSchema: z.ZodObject<{
3
- id: z.ZodString;
4
- plan: z.ZodString;
5
- referenceId: z.ZodString;
6
- stripeCustomerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
- stripeSubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
- status: z.ZodString;
9
- periodStart: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
10
- periodEnd: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
11
- cancelAtPeriodEnd: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
12
- cancelAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
13
- canceledAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
14
- seats: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
15
- trialStart: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
16
- trialEnd: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
17
- priceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
- interval: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
- unitAmount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
20
- discounts: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
21
- }, z.core.$strip>;
22
- export type BillingSchema = z.infer<typeof billingSchema>;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.billingSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.billingSchema = zod_1.z.object({
6
- id: zod_1.z.string(),
7
- plan: zod_1.z.string(),
8
- referenceId: zod_1.z.string(),
9
- stripeCustomerId: zod_1.z.string().nullish(),
10
- stripeSubscriptionId: zod_1.z.string().nullish(),
11
- status: zod_1.z.string(),
12
- periodStart: zod_1.z.date().nullish(),
13
- periodEnd: zod_1.z.date().nullish(),
14
- cancelAtPeriodEnd: zod_1.z.boolean().nullish(),
15
- cancelAt: zod_1.z.date().nullish(),
16
- canceledAt: zod_1.z.date().nullish(),
17
- seats: zod_1.z.number().nullish(),
18
- trialStart: zod_1.z.date().nullish(),
19
- trialEnd: zod_1.z.date().nullish(),
20
- priceId: zod_1.z.string().nullish(),
21
- interval: zod_1.z.string().nullish(),
22
- unitAmount: zod_1.z.number().nullish(),
23
- discounts: zod_1.z.array(zod_1.z.string()).nullish(),
24
- });
@@ -1,17 +0,0 @@
1
- export type StripePlan = {
2
- name: string;
3
- priceId: string;
4
- priceUnitAmount?: number;
5
- annualDiscountPriceId?: string;
6
- annualPriceUnitAmount?: number;
7
- freeTrial?: {
8
- days: number;
9
- };
10
- limits?: Record<string, number>;
11
- group?: string;
12
- };
13
- export type StripePlansConfig = {
14
- production: StripePlan[];
15
- sandbox: StripePlan[];
16
- trialPlanName?: string;
17
- };
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- import type { StripePlan, StripePlansConfig } from "./billing.types";
2
- export declare const getEnvironmentPlans: (plansConfig: StripePlansConfig, environment?: string) => {
3
- plans: StripePlan[];
4
- trial: StripePlan | undefined;
5
- };
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getEnvironmentPlans = void 0;
4
- const getEnvironmentPlans = (plansConfig, environment = "sandbox") => {
5
- const isProduction = environment === "production";
6
- const plans = isProduction ? plansConfig.production : plansConfig.sandbox;
7
- const trial = plansConfig.trialPlanName
8
- ? plans.find((plan) => plan.name === plansConfig.trialPlanName)
9
- : undefined;
10
- return { plans, trial };
11
- };
12
- exports.getEnvironmentPlans = getEnvironmentPlans;
@@ -1,4 +0,0 @@
1
- export declare const fileTypes: Record<string, {
2
- mimetypes: string[];
3
- extensions: string[];
4
- }>;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fileTypes = void 0;
4
- exports.fileTypes = {
5
- image: {
6
- mimetypes: ["image/jpeg", "image/png", "image/jpg", "image/webp"],
7
- extensions: ["jpg", "jpeg", "png", "webp"],
8
- },
9
- video: {
10
- mimetypes: ["video/mp4", "video/mov", "video/avi", "video/mkv", "video/webm"],
11
- extensions: ["mp4", "mov", "avi", "mkv"],
12
- },
13
- audio: {
14
- mimetypes: ["audio/mp3", "audio/wav", "audio/m4a", "audio/webm"],
15
- extensions: ["mp3", "wav", "m4a", "webm"],
16
- },
17
- };