medusa-stats 1.0.5

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 (180) hide show
  1. package/.medusa/server/src/admin/composite.png +0 -0
  2. package/.medusa/server/src/admin/index.js +10512 -0
  3. package/.medusa/server/src/admin/index.mjs +10510 -0
  4. package/.medusa/server/src/admin/params.png +0 -0
  5. package/.medusa/server/src/admin/view.png +0 -0
  6. package/.medusa/server/src/admin/visualizations.png +0 -0
  7. package/.medusa/server/src/api/admin/statistics/alert-logs/[id]/route.d.ts +6 -0
  8. package/.medusa/server/src/api/admin/statistics/alert-logs/[id]/route.js +18 -0
  9. package/.medusa/server/src/api/admin/statistics/alert-logs/route.d.ts +6 -0
  10. package/.medusa/server/src/api/admin/statistics/alert-logs/route.js +33 -0
  11. package/.medusa/server/src/api/admin/statistics/alerts/[id]/logs/route.d.ts +6 -0
  12. package/.medusa/server/src/api/admin/statistics/alerts/[id]/logs/route.js +23 -0
  13. package/.medusa/server/src/api/admin/statistics/alerts/[id]/route.d.ts +17 -0
  14. package/.medusa/server/src/api/admin/statistics/alerts/[id]/route.js +64 -0
  15. package/.medusa/server/src/api/admin/statistics/alerts/[id]/toggle/route.d.ts +6 -0
  16. package/.medusa/server/src/api/admin/statistics/alerts/[id]/toggle/route.js +18 -0
  17. package/.medusa/server/src/api/admin/statistics/alerts/route.d.ts +12 -0
  18. package/.medusa/server/src/api/admin/statistics/alerts/route.js +94 -0
  19. package/.medusa/server/src/api/admin/statistics/charts/[id]/route.d.ts +17 -0
  20. package/.medusa/server/src/api/admin/statistics/charts/[id]/route.js +50 -0
  21. package/.medusa/server/src/api/admin/statistics/charts/[id]/statistics/route.d.ts +15 -0
  22. package/.medusa/server/src/api/admin/statistics/charts/[id]/statistics/route.js +40 -0
  23. package/.medusa/server/src/api/admin/statistics/charts/route.d.ts +4 -0
  24. package/.medusa/server/src/api/admin/statistics/charts/route.js +55 -0
  25. package/.medusa/server/src/api/admin/statistics/options/[id]/calculate/route.d.ts +7 -0
  26. package/.medusa/server/src/api/admin/statistics/options/[id]/calculate/route.js +23 -0
  27. package/.medusa/server/src/api/admin/statistics/options/[id]/clone/route.d.ts +7 -0
  28. package/.medusa/server/src/api/admin/statistics/options/[id]/clone/route.js +15 -0
  29. package/.medusa/server/src/api/admin/statistics/options/[id]/route.d.ts +17 -0
  30. package/.medusa/server/src/api/admin/statistics/options/[id]/route.js +69 -0
  31. package/.medusa/server/src/api/admin/statistics/options/route.d.ts +12 -0
  32. package/.medusa/server/src/api/admin/statistics/options/route.js +87 -0
  33. package/.medusa/server/src/api/admin/statistics/providers/[id]/route.d.ts +6 -0
  34. package/.medusa/server/src/api/admin/statistics/providers/[id]/route.js +18 -0
  35. package/.medusa/server/src/api/admin/statistics/providers/[id]/statistics/route.d.ts +6 -0
  36. package/.medusa/server/src/api/admin/statistics/providers/[id]/statistics/route.js +18 -0
  37. package/.medusa/server/src/api/admin/statistics/providers/route.d.ts +7 -0
  38. package/.medusa/server/src/api/admin/statistics/providers/route.js +57 -0
  39. package/.medusa/server/src/api/admin/statistics/utils/option-graph.d.ts +3 -0
  40. package/.medusa/server/src/api/admin/statistics/utils/option-graph.js +34 -0
  41. package/.medusa/server/src/api/admin/statistics/views/[id]/calculate/route.d.ts +7 -0
  42. package/.medusa/server/src/api/admin/statistics/views/[id]/calculate/route.js +21 -0
  43. package/.medusa/server/src/api/admin/statistics/views/[id]/clone/route.d.ts +7 -0
  44. package/.medusa/server/src/api/admin/statistics/views/[id]/clone/route.js +21 -0
  45. package/.medusa/server/src/api/admin/statistics/views/[id]/route.d.ts +17 -0
  46. package/.medusa/server/src/api/admin/statistics/views/[id]/route.js +71 -0
  47. package/.medusa/server/src/api/admin/statistics/views/route.d.ts +12 -0
  48. package/.medusa/server/src/api/admin/statistics/views/route.js +74 -0
  49. package/.medusa/server/src/api/middlewares.d.ts +2 -0
  50. package/.medusa/server/src/api/middlewares.js +194 -0
  51. package/.medusa/server/src/api/validation/statistics/schemas.d.ts +1013 -0
  52. package/.medusa/server/src/api/validation/statistics/schemas.js +288 -0
  53. package/.medusa/server/src/index.d.ts +1 -0
  54. package/.medusa/server/src/index.js +18 -0
  55. package/.medusa/server/src/jobs/evaluate-statistics-alerts.d.ts +6 -0
  56. package/.medusa/server/src/jobs/evaluate-statistics-alerts.js +110 -0
  57. package/.medusa/server/src/links/statistics-alert-user.d.ts +2 -0
  58. package/.medusa/server/src/links/statistics-alert-user.js +16 -0
  59. package/.medusa/server/src/links/statistics-option-user.d.ts +2 -0
  60. package/.medusa/server/src/links/statistics-option-user.js +16 -0
  61. package/.medusa/server/src/loaders/statistics/index.d.ts +5 -0
  62. package/.medusa/server/src/loaders/statistics/index.js +47 -0
  63. package/.medusa/server/src/modules/statistics/index.d.ts +107 -0
  64. package/.medusa/server/src/modules/statistics/index.js +32 -0
  65. package/.medusa/server/src/modules/statistics/migrations/Migration20260223131741.d.ts +5 -0
  66. package/.medusa/server/src/modules/statistics/migrations/Migration20260223131741.js +57 -0
  67. package/.medusa/server/src/modules/statistics/models/alert-log.d.ts +74 -0
  68. package/.medusa/server/src/modules/statistics/models/alert-log.js +16 -0
  69. package/.medusa/server/src/modules/statistics/models/alert.d.ts +74 -0
  70. package/.medusa/server/src/modules/statistics/models/alert.js +24 -0
  71. package/.medusa/server/src/modules/statistics/models/chart.d.ts +81 -0
  72. package/.medusa/server/src/modules/statistics/models/chart.js +28 -0
  73. package/.medusa/server/src/modules/statistics/models/index.d.ts +7 -0
  74. package/.medusa/server/src/modules/statistics/models/index.js +24 -0
  75. package/.medusa/server/src/modules/statistics/models/option-input.d.ts +135 -0
  76. package/.medusa/server/src/modules/statistics/models/option-input.js +27 -0
  77. package/.medusa/server/src/modules/statistics/models/option.d.ts +78 -0
  78. package/.medusa/server/src/modules/statistics/models/option.js +41 -0
  79. package/.medusa/server/src/modules/statistics/models/provider.d.ts +75 -0
  80. package/.medusa/server/src/modules/statistics/models/provider.js +15 -0
  81. package/.medusa/server/src/modules/statistics/models/view.d.ts +79 -0
  82. package/.medusa/server/src/modules/statistics/models/view.js +30 -0
  83. package/.medusa/server/src/modules/statistics/providers/index.d.ts +1 -0
  84. package/.medusa/server/src/modules/statistics/providers/index.js +18 -0
  85. package/.medusa/server/src/modules/statistics/providers/provider.d.ts +254 -0
  86. package/.medusa/server/src/modules/statistics/providers/provider.js +307 -0
  87. package/.medusa/server/src/modules/statistics/service.d.ts +953 -0
  88. package/.medusa/server/src/modules/statistics/service.js +190 -0
  89. package/.medusa/server/src/modules/statistics/utils/dependency-option-map.d.ts +13 -0
  90. package/.medusa/server/src/modules/statistics/utils/dependency-option-map.js +67 -0
  91. package/.medusa/server/src/modules/statistics/utils/period-utils.d.ts +23 -0
  92. package/.medusa/server/src/modules/statistics/utils/period-utils.js +78 -0
  93. package/.medusa/server/src/modules/statistics/utils/time-series-utils.d.ts +6 -0
  94. package/.medusa/server/src/modules/statistics/utils/time-series-utils.js +8 -0
  95. package/.medusa/server/src/providers/common/index.d.ts +2 -0
  96. package/.medusa/server/src/providers/common/index.js +1232 -0
  97. package/.medusa/server/src/providers/composite/index.d.ts +2 -0
  98. package/.medusa/server/src/providers/composite/index.js +147 -0
  99. package/.medusa/server/src/workflows/statistics/calculate-single-statistic.d.ts +15 -0
  100. package/.medusa/server/src/workflows/statistics/calculate-single-statistic.js +28 -0
  101. package/.medusa/server/src/workflows/statistics/calculate-statistics.d.ts +20 -0
  102. package/.medusa/server/src/workflows/statistics/calculate-statistics.js +15 -0
  103. package/.medusa/server/src/workflows/statistics/calculate-view.d.ts +31 -0
  104. package/.medusa/server/src/workflows/statistics/calculate-view.js +30 -0
  105. package/.medusa/server/src/workflows/statistics/clone-view.d.ts +227 -0
  106. package/.medusa/server/src/workflows/statistics/clone-view.js +10 -0
  107. package/.medusa/server/src/workflows/statistics/create-alert.d.ts +139 -0
  108. package/.medusa/server/src/workflows/statistics/create-alert.js +12 -0
  109. package/.medusa/server/src/workflows/statistics/create-chart.d.ts +122 -0
  110. package/.medusa/server/src/workflows/statistics/create-chart.js +14 -0
  111. package/.medusa/server/src/workflows/statistics/create-view-with-options.d.ts +1342 -0
  112. package/.medusa/server/src/workflows/statistics/create-view-with-options.js +29 -0
  113. package/.medusa/server/src/workflows/statistics/delete-chart.d.ts +10 -0
  114. package/.medusa/server/src/workflows/statistics/delete-chart.js +14 -0
  115. package/.medusa/server/src/workflows/statistics/evaluate-alerts.d.ts +28 -0
  116. package/.medusa/server/src/workflows/statistics/evaluate-alerts.js +67 -0
  117. package/.medusa/server/src/workflows/statistics/get-available-statistics.d.ts +5 -0
  118. package/.medusa/server/src/workflows/statistics/get-available-statistics.js +10 -0
  119. package/.medusa/server/src/workflows/statistics/index.d.ts +14 -0
  120. package/.medusa/server/src/workflows/statistics/index.js +31 -0
  121. package/.medusa/server/src/workflows/statistics/manage-chart-statistics.d.ts +12 -0
  122. package/.medusa/server/src/workflows/statistics/manage-chart-statistics.js +14 -0
  123. package/.medusa/server/src/workflows/statistics/steps/calculate-statistics.d.ts +37 -0
  124. package/.medusa/server/src/workflows/statistics/steps/calculate-statistics.js +222 -0
  125. package/.medusa/server/src/workflows/statistics/steps/clone-view.d.ts +227 -0
  126. package/.medusa/server/src/workflows/statistics/steps/clone-view.js +39 -0
  127. package/.medusa/server/src/workflows/statistics/steps/create-alert-log-entries.d.ts +17 -0
  128. package/.medusa/server/src/workflows/statistics/steps/create-alert-log-entries.js +50 -0
  129. package/.medusa/server/src/workflows/statistics/steps/create-alert.d.ts +120 -0
  130. package/.medusa/server/src/workflows/statistics/steps/create-alert.js +21 -0
  131. package/.medusa/server/src/workflows/statistics/steps/create-chart.d.ts +118 -0
  132. package/.medusa/server/src/workflows/statistics/steps/create-chart.js +19 -0
  133. package/.medusa/server/src/workflows/statistics/steps/create-statistics-options.d.ts +117 -0
  134. package/.medusa/server/src/workflows/statistics/steps/create-statistics-options.js +16 -0
  135. package/.medusa/server/src/workflows/statistics/steps/create-statistics-view.d.ts +119 -0
  136. package/.medusa/server/src/workflows/statistics/steps/create-statistics-view.js +16 -0
  137. package/.medusa/server/src/workflows/statistics/steps/dedupe-alerts.d.ts +22 -0
  138. package/.medusa/server/src/workflows/statistics/steps/dedupe-alerts.js +64 -0
  139. package/.medusa/server/src/workflows/statistics/steps/delete-chart.d.ts +6 -0
  140. package/.medusa/server/src/workflows/statistics/steps/delete-chart.js +17 -0
  141. package/.medusa/server/src/workflows/statistics/steps/emit-alert-events.d.ts +17 -0
  142. package/.medusa/server/src/workflows/statistics/steps/emit-alert-events.js +41 -0
  143. package/.medusa/server/src/workflows/statistics/steps/evaluate-each-condition.d.ts +15 -0
  144. package/.medusa/server/src/workflows/statistics/steps/evaluate-each-condition.js +109 -0
  145. package/.medusa/server/src/workflows/statistics/steps/extract-alert-values.d.ts +12 -0
  146. package/.medusa/server/src/workflows/statistics/steps/extract-alert-values.js +86 -0
  147. package/.medusa/server/src/workflows/statistics/steps/fetch-active-alerts-for-option.d.ts +112 -0
  148. package/.medusa/server/src/workflows/statistics/steps/fetch-active-alerts-for-option.js +16 -0
  149. package/.medusa/server/src/workflows/statistics/steps/fetch-available-statistics.d.ts +4 -0
  150. package/.medusa/server/src/workflows/statistics/steps/fetch-available-statistics.js +39 -0
  151. package/.medusa/server/src/workflows/statistics/steps/fetch-option-with-relations.d.ts +112 -0
  152. package/.medusa/server/src/workflows/statistics/steps/fetch-option-with-relations.js +11 -0
  153. package/.medusa/server/src/workflows/statistics/steps/fetch-view-with-options.d.ts +112 -0
  154. package/.medusa/server/src/workflows/statistics/steps/fetch-view-with-options.js +20 -0
  155. package/.medusa/server/src/workflows/statistics/steps/manage-chart-statistics.d.ts +8 -0
  156. package/.medusa/server/src/workflows/statistics/steps/manage-chart-statistics.js +26 -0
  157. package/.medusa/server/src/workflows/statistics/steps/update-chart.d.ts +117 -0
  158. package/.medusa/server/src/workflows/statistics/steps/update-chart.js +32 -0
  159. package/.medusa/server/src/workflows/statistics/steps/update-view.d.ts +120 -0
  160. package/.medusa/server/src/workflows/statistics/steps/update-view.js +18 -0
  161. package/.medusa/server/src/workflows/statistics/steps/validate-alert-input.d.ts +1 -0
  162. package/.medusa/server/src/workflows/statistics/steps/validate-alert-input.js +34 -0
  163. package/.medusa/server/src/workflows/statistics/steps/validate-option-parameters.d.ts +21 -0
  164. package/.medusa/server/src/workflows/statistics/steps/validate-option-parameters.js +43 -0
  165. package/.medusa/server/src/workflows/statistics/steps/validate-view-input.d.ts +10 -0
  166. package/.medusa/server/src/workflows/statistics/steps/validate-view-input.js +15 -0
  167. package/.medusa/server/src/workflows/statistics/update-chart.d.ts +120 -0
  168. package/.medusa/server/src/workflows/statistics/update-chart.js +13 -0
  169. package/.medusa/server/src/workflows/statistics/update-view-configuration.d.ts +128 -0
  170. package/.medusa/server/src/workflows/statistics/update-view-configuration.js +18 -0
  171. package/.medusa/server/src/workflows/statistics/utils/cache-utils.d.ts +60 -0
  172. package/.medusa/server/src/workflows/statistics/utils/cache-utils.js +66 -0
  173. package/.medusa/server/src/workflows/statistics/utils/dependency-graph.d.ts +51 -0
  174. package/.medusa/server/src/workflows/statistics/utils/dependency-graph.js +131 -0
  175. package/.medusa/server/src/workflows/statistics/utils/parameter-utils.d.ts +54 -0
  176. package/.medusa/server/src/workflows/statistics/utils/parameter-utils.js +147 -0
  177. package/.medusa/server/src/workflows/statistics/validate-option-configuration.d.ts +9 -0
  178. package/.medusa/server/src/workflows/statistics/validate-option-configuration.js +35 -0
  179. package/README.md +310 -0
  180. package/package.json +87 -0
@@ -0,0 +1,1013 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Common schemas
4
+ */
5
+ export declare const PaginationSchema: z.ZodObject<{
6
+ fields: z.ZodOptional<z.ZodString>;
7
+ } & {
8
+ offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
9
+ limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
10
+ order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
11
+ with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
12
+ }, "strip", z.ZodTypeAny, {
13
+ offset: number;
14
+ limit: number;
15
+ order?: string | undefined;
16
+ fields?: string | undefined;
17
+ with_deleted?: boolean | undefined;
18
+ }, {
19
+ order?: string | undefined;
20
+ fields?: string | undefined;
21
+ offset?: unknown;
22
+ limit?: unknown;
23
+ with_deleted?: unknown;
24
+ }>;
25
+ export declare const ExpandSchema: z.ZodObject<{
26
+ fields: z.ZodOptional<z.ZodString>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ fields?: string | undefined;
29
+ }, {
30
+ fields?: string | undefined;
31
+ }>;
32
+ /**
33
+ * Provider Validation Schemas
34
+ */
35
+ export declare const ListProvidersQuerySchema: z.ZodObject<{
36
+ offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
37
+ limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
38
+ with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
39
+ q: z.ZodOptional<z.ZodString>;
40
+ order: z.ZodOptional<z.ZodString>;
41
+ is_enabled: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
42
+ } & {
43
+ fields: z.ZodOptional<z.ZodString>;
44
+ }, "strip", z.ZodTypeAny, {
45
+ limit: number;
46
+ offset: number;
47
+ is_enabled?: boolean | undefined;
48
+ order?: string | undefined;
49
+ fields?: string | undefined;
50
+ q?: string | undefined;
51
+ with_deleted?: boolean | undefined;
52
+ }, {
53
+ is_enabled?: unknown;
54
+ order?: string | undefined;
55
+ limit?: unknown;
56
+ offset?: unknown;
57
+ fields?: string | undefined;
58
+ q?: string | undefined;
59
+ with_deleted?: unknown;
60
+ }>;
61
+ export declare const GetProviderQuerySchema: z.ZodObject<{
62
+ fields: z.ZodOptional<z.ZodString>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ fields?: string | undefined;
65
+ }, {
66
+ fields?: string | undefined;
67
+ }>;
68
+ export declare const GetProviderStatisticsQuerySchema: z.ZodObject<{
69
+ sales_channel_id: z.ZodOptional<z.ZodString>;
70
+ }, "strip", z.ZodTypeAny, {
71
+ sales_channel_id?: string | undefined;
72
+ }, {
73
+ sales_channel_id?: string | undefined;
74
+ }>;
75
+ /**
76
+ * View Validation Schemas
77
+ */
78
+ export declare const ListViewsQuerySchema: z.ZodObject<{
79
+ offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
80
+ limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
81
+ with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
82
+ q: z.ZodOptional<z.ZodString>;
83
+ order: z.ZodOptional<z.ZodString>;
84
+ } & {
85
+ fields: z.ZodOptional<z.ZodString>;
86
+ }, "strip", z.ZodTypeAny, {
87
+ limit: number;
88
+ offset: number;
89
+ order?: string | undefined;
90
+ fields?: string | undefined;
91
+ q?: string | undefined;
92
+ with_deleted?: boolean | undefined;
93
+ }, {
94
+ order?: string | undefined;
95
+ limit?: unknown;
96
+ offset?: unknown;
97
+ fields?: string | undefined;
98
+ q?: string | undefined;
99
+ with_deleted?: unknown;
100
+ }>;
101
+ export declare const ListChartsQuerySchema: z.ZodObject<{
102
+ offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
103
+ limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
104
+ with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
105
+ view_id: z.ZodOptional<z.ZodString>;
106
+ q: z.ZodOptional<z.ZodString>;
107
+ order: z.ZodOptional<z.ZodString>;
108
+ } & {
109
+ fields: z.ZodOptional<z.ZodString>;
110
+ }, "strip", z.ZodTypeAny, {
111
+ limit: number;
112
+ offset: number;
113
+ order?: string | undefined;
114
+ view_id?: string | undefined;
115
+ fields?: string | undefined;
116
+ q?: string | undefined;
117
+ with_deleted?: boolean | undefined;
118
+ }, {
119
+ order?: string | undefined;
120
+ view_id?: string | undefined;
121
+ limit?: unknown;
122
+ offset?: unknown;
123
+ fields?: string | undefined;
124
+ q?: string | undefined;
125
+ with_deleted?: unknown;
126
+ }>;
127
+ export declare const CreateViewSchema: z.ZodObject<{
128
+ name: z.ZodString;
129
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
130
+ stats_data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
131
+ layout_config: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
132
+ period_type: z.ZodOptional<z.ZodEnum<["rolling", "calendar", "custom"]>>;
133
+ period_config: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
134
+ interval: z.ZodOptional<z.ZodNumber>;
135
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
136
+ provider_id: z.ZodString;
137
+ statistic_key: z.ZodString;
138
+ data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
139
+ }, "strip", z.ZodTypeAny, {
140
+ provider_id: string;
141
+ statistic_key: string;
142
+ data?: Record<string, any> | null | undefined;
143
+ }, {
144
+ provider_id: string;
145
+ statistic_key: string;
146
+ data?: Record<string, any> | null | undefined;
147
+ }>, "many">>;
148
+ }, "strip", z.ZodTypeAny, {
149
+ name: string;
150
+ options?: {
151
+ provider_id: string;
152
+ statistic_key: string;
153
+ data?: Record<string, any> | null | undefined;
154
+ }[] | undefined;
155
+ description?: string | null | undefined;
156
+ interval?: number | undefined;
157
+ stats_data?: Record<string, any> | null | undefined;
158
+ period_type?: "rolling" | "calendar" | "custom" | undefined;
159
+ period_config?: Record<string, any> | null | undefined;
160
+ layout_config?: Record<string, any> | null | undefined;
161
+ }, {
162
+ name: string;
163
+ options?: {
164
+ provider_id: string;
165
+ statistic_key: string;
166
+ data?: Record<string, any> | null | undefined;
167
+ }[] | undefined;
168
+ description?: string | null | undefined;
169
+ interval?: number | undefined;
170
+ stats_data?: Record<string, any> | null | undefined;
171
+ period_type?: "rolling" | "calendar" | "custom" | undefined;
172
+ period_config?: Record<string, any> | null | undefined;
173
+ layout_config?: Record<string, any> | null | undefined;
174
+ }>;
175
+ export declare const UpdateViewSchema: z.ZodObject<{
176
+ name: z.ZodOptional<z.ZodString>;
177
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
178
+ stats_data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
179
+ layout_config: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
180
+ period_type: z.ZodOptional<z.ZodEnum<["rolling", "calendar", "custom"]>>;
181
+ period_config: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
182
+ interval: z.ZodOptional<z.ZodNumber>;
183
+ cache_options: z.ZodNullable<z.ZodOptional<z.ZodObject<{
184
+ enabled: z.ZodOptional<z.ZodBoolean>;
185
+ ttl: z.ZodOptional<z.ZodNumber>;
186
+ }, "strip", z.ZodTypeAny, {
187
+ enabled?: boolean | undefined;
188
+ ttl?: number | undefined;
189
+ }, {
190
+ enabled?: boolean | undefined;
191
+ ttl?: number | undefined;
192
+ }>>>;
193
+ }, "strip", z.ZodTypeAny, {
194
+ cache_options?: {
195
+ enabled?: boolean | undefined;
196
+ ttl?: number | undefined;
197
+ } | null | undefined;
198
+ name?: string | undefined;
199
+ description?: string | null | undefined;
200
+ interval?: number | undefined;
201
+ stats_data?: Record<string, any> | null | undefined;
202
+ period_type?: "rolling" | "calendar" | "custom" | undefined;
203
+ period_config?: Record<string, any> | null | undefined;
204
+ layout_config?: Record<string, any> | null | undefined;
205
+ }, {
206
+ cache_options?: {
207
+ enabled?: boolean | undefined;
208
+ ttl?: number | undefined;
209
+ } | null | undefined;
210
+ name?: string | undefined;
211
+ description?: string | null | undefined;
212
+ interval?: number | undefined;
213
+ stats_data?: Record<string, any> | null | undefined;
214
+ period_type?: "rolling" | "calendar" | "custom" | undefined;
215
+ period_config?: Record<string, any> | null | undefined;
216
+ layout_config?: Record<string, any> | null | undefined;
217
+ }>;
218
+ export declare const GetViewQuerySchema: z.ZodObject<{
219
+ fields: z.ZodOptional<z.ZodString>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ fields?: string | undefined;
222
+ }, {
223
+ fields?: string | undefined;
224
+ }>;
225
+ export declare const CalculateViewSchema: z.ZodObject<{
226
+ periodStart: z.ZodString;
227
+ periodEnd: z.ZodString;
228
+ interval: z.ZodNumber;
229
+ }, "strip", z.ZodTypeAny, {
230
+ interval: number;
231
+ periodStart: string;
232
+ periodEnd: string;
233
+ }, {
234
+ interval: number;
235
+ periodStart: string;
236
+ periodEnd: string;
237
+ }>;
238
+ export declare const CloneViewSchema: z.ZodObject<{
239
+ new_name: z.ZodString;
240
+ include_options: z.ZodOptional<z.ZodBoolean>;
241
+ }, "strip", z.ZodTypeAny, {
242
+ new_name: string;
243
+ include_options?: boolean | undefined;
244
+ }, {
245
+ new_name: string;
246
+ include_options?: boolean | undefined;
247
+ }>;
248
+ /**
249
+ * Option Validation Schemas
250
+ */
251
+ export declare const InputDependencySchema: z.ZodObject<{
252
+ input_option_id: z.ZodString;
253
+ parameter_name: z.ZodNullable<z.ZodString>;
254
+ order: z.ZodOptional<z.ZodNumber>;
255
+ metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
256
+ }, "strip", z.ZodTypeAny, {
257
+ parameter_name: string | null;
258
+ input_option_id: string;
259
+ metadata?: Record<string, any> | null | undefined;
260
+ order?: number | undefined;
261
+ }, {
262
+ parameter_name: string | null;
263
+ input_option_id: string;
264
+ metadata?: Record<string, any> | null | undefined;
265
+ order?: number | undefined;
266
+ }>;
267
+ export declare const ParameterConfigSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
268
+ value: z.ZodAny;
269
+ locked: z.ZodDefault<z.ZodBoolean>;
270
+ }, "strip", z.ZodTypeAny, {
271
+ locked: boolean;
272
+ value?: any;
273
+ }, {
274
+ value?: any;
275
+ locked?: boolean | undefined;
276
+ }>>;
277
+ export declare const ListOptionsQuerySchema: z.ZodObject<{
278
+ offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
279
+ limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
280
+ with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
281
+ view_id: z.ZodOptional<z.ZodString>;
282
+ provider_id: z.ZodOptional<z.ZodString>;
283
+ q: z.ZodOptional<z.ZodString>;
284
+ order: z.ZodOptional<z.ZodString>;
285
+ preset: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
286
+ has_dependencies: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
287
+ } & {
288
+ fields: z.ZodOptional<z.ZodString>;
289
+ }, "strip", z.ZodTypeAny, {
290
+ limit: number;
291
+ offset: number;
292
+ preset?: boolean | undefined;
293
+ order?: string | undefined;
294
+ view_id?: string | undefined;
295
+ provider_id?: string | undefined;
296
+ fields?: string | undefined;
297
+ q?: string | undefined;
298
+ with_deleted?: boolean | undefined;
299
+ has_dependencies?: boolean | undefined;
300
+ }, {
301
+ preset?: unknown;
302
+ order?: string | undefined;
303
+ view_id?: string | undefined;
304
+ provider_id?: string | undefined;
305
+ limit?: unknown;
306
+ offset?: unknown;
307
+ fields?: string | undefined;
308
+ q?: string | undefined;
309
+ with_deleted?: unknown;
310
+ has_dependencies?: unknown;
311
+ }>;
312
+ export declare const CreateOptionSchema: z.ZodObject<{
313
+ view_id: z.ZodOptional<z.ZodString>;
314
+ provider_id: z.ZodString;
315
+ provider_option_name: z.ZodString;
316
+ data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
317
+ local_option_name: z.ZodOptional<z.ZodString>;
318
+ parameter_config: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
319
+ value: z.ZodAny;
320
+ locked: z.ZodDefault<z.ZodBoolean>;
321
+ }, "strip", z.ZodTypeAny, {
322
+ locked: boolean;
323
+ value?: any;
324
+ }, {
325
+ value?: any;
326
+ locked?: boolean | undefined;
327
+ }>>>>;
328
+ preset: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
329
+ input_dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
330
+ input_option_id: z.ZodString;
331
+ parameter_name: z.ZodNullable<z.ZodString>;
332
+ order: z.ZodOptional<z.ZodNumber>;
333
+ metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
334
+ }, "strip", z.ZodTypeAny, {
335
+ parameter_name: string | null;
336
+ input_option_id: string;
337
+ metadata?: Record<string, any> | null | undefined;
338
+ order?: number | undefined;
339
+ }, {
340
+ parameter_name: string | null;
341
+ input_option_id: string;
342
+ metadata?: Record<string, any> | null | undefined;
343
+ order?: number | undefined;
344
+ }>, "many">>;
345
+ }, "strip", z.ZodTypeAny, {
346
+ provider_option_name: string;
347
+ preset: boolean;
348
+ provider_id: string;
349
+ local_option_name?: string | undefined;
350
+ data?: Record<string, any> | null | undefined;
351
+ parameter_config?: Record<string, {
352
+ locked: boolean;
353
+ value?: any;
354
+ }> | null | undefined;
355
+ input_dependencies?: {
356
+ parameter_name: string | null;
357
+ input_option_id: string;
358
+ metadata?: Record<string, any> | null | undefined;
359
+ order?: number | undefined;
360
+ }[] | undefined;
361
+ view_id?: string | undefined;
362
+ }, {
363
+ provider_option_name: string;
364
+ provider_id: string;
365
+ local_option_name?: string | undefined;
366
+ data?: Record<string, any> | null | undefined;
367
+ parameter_config?: Record<string, {
368
+ value?: any;
369
+ locked?: boolean | undefined;
370
+ }> | null | undefined;
371
+ preset?: boolean | undefined;
372
+ input_dependencies?: {
373
+ parameter_name: string | null;
374
+ input_option_id: string;
375
+ metadata?: Record<string, any> | null | undefined;
376
+ order?: number | undefined;
377
+ }[] | undefined;
378
+ view_id?: string | undefined;
379
+ }>;
380
+ export declare const UpdateOptionSchema: z.ZodObject<{
381
+ data: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
382
+ local_option_name: z.ZodOptional<z.ZodString>;
383
+ visualization_config: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
384
+ cache_options: z.ZodNullable<z.ZodOptional<z.ZodObject<{
385
+ enabled: z.ZodOptional<z.ZodBoolean>;
386
+ ttl: z.ZodOptional<z.ZodNumber>;
387
+ }, "strip", z.ZodTypeAny, {
388
+ enabled?: boolean | undefined;
389
+ ttl?: number | undefined;
390
+ }, {
391
+ enabled?: boolean | undefined;
392
+ ttl?: number | undefined;
393
+ }>>>;
394
+ parameter_config: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
395
+ value: z.ZodAny;
396
+ locked: z.ZodDefault<z.ZodBoolean>;
397
+ }, "strip", z.ZodTypeAny, {
398
+ locked: boolean;
399
+ value?: any;
400
+ }, {
401
+ value?: any;
402
+ locked?: boolean | undefined;
403
+ }>>>>;
404
+ preset: z.ZodOptional<z.ZodBoolean>;
405
+ input_dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
406
+ input_option_id: z.ZodString;
407
+ parameter_name: z.ZodNullable<z.ZodString>;
408
+ order: z.ZodOptional<z.ZodNumber>;
409
+ metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
410
+ }, "strip", z.ZodTypeAny, {
411
+ parameter_name: string | null;
412
+ input_option_id: string;
413
+ metadata?: Record<string, any> | null | undefined;
414
+ order?: number | undefined;
415
+ }, {
416
+ parameter_name: string | null;
417
+ input_option_id: string;
418
+ metadata?: Record<string, any> | null | undefined;
419
+ order?: number | undefined;
420
+ }>, "many">>;
421
+ view_id: z.ZodOptional<z.ZodString>;
422
+ }, "strip", z.ZodTypeAny, {
423
+ local_option_name?: string | undefined;
424
+ data?: Record<string, any> | null | undefined;
425
+ visualization_config?: Record<string, any> | null | undefined;
426
+ cache_options?: {
427
+ enabled?: boolean | undefined;
428
+ ttl?: number | undefined;
429
+ } | null | undefined;
430
+ parameter_config?: Record<string, {
431
+ locked: boolean;
432
+ value?: any;
433
+ }> | null | undefined;
434
+ preset?: boolean | undefined;
435
+ input_dependencies?: {
436
+ parameter_name: string | null;
437
+ input_option_id: string;
438
+ metadata?: Record<string, any> | null | undefined;
439
+ order?: number | undefined;
440
+ }[] | undefined;
441
+ view_id?: string | undefined;
442
+ }, {
443
+ local_option_name?: string | undefined;
444
+ data?: Record<string, any> | null | undefined;
445
+ visualization_config?: Record<string, any> | null | undefined;
446
+ cache_options?: {
447
+ enabled?: boolean | undefined;
448
+ ttl?: number | undefined;
449
+ } | null | undefined;
450
+ parameter_config?: Record<string, {
451
+ value?: any;
452
+ locked?: boolean | undefined;
453
+ }> | null | undefined;
454
+ preset?: boolean | undefined;
455
+ input_dependencies?: {
456
+ parameter_name: string | null;
457
+ input_option_id: string;
458
+ metadata?: Record<string, any> | null | undefined;
459
+ order?: number | undefined;
460
+ }[] | undefined;
461
+ view_id?: string | undefined;
462
+ }>;
463
+ export declare const CloneOptionSchema: z.ZodObject<{
464
+ local_option_name: z.ZodOptional<z.ZodString>;
465
+ parameter_config: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
466
+ value: z.ZodAny;
467
+ locked: z.ZodDefault<z.ZodBoolean>;
468
+ }, "strip", z.ZodTypeAny, {
469
+ locked: boolean;
470
+ value?: any;
471
+ }, {
472
+ value?: any;
473
+ locked?: boolean | undefined;
474
+ }>>>>;
475
+ preset: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
476
+ }, "strip", z.ZodTypeAny, {
477
+ preset: boolean;
478
+ local_option_name?: string | undefined;
479
+ parameter_config?: Record<string, {
480
+ locked: boolean;
481
+ value?: any;
482
+ }> | null | undefined;
483
+ }, {
484
+ local_option_name?: string | undefined;
485
+ parameter_config?: Record<string, {
486
+ value?: any;
487
+ locked?: boolean | undefined;
488
+ }> | null | undefined;
489
+ preset?: boolean | undefined;
490
+ }>;
491
+ export declare const GetOptionQuerySchema: z.ZodObject<{
492
+ fields: z.ZodOptional<z.ZodString>;
493
+ }, "strip", z.ZodTypeAny, {
494
+ fields?: string | undefined;
495
+ }, {
496
+ fields?: string | undefined;
497
+ }>;
498
+ export declare const CalculateOptionSchema: z.ZodObject<{
499
+ periodStart: z.ZodString;
500
+ periodEnd: z.ZodString;
501
+ interval: z.ZodNumber;
502
+ onlyCompleteData: z.ZodOptional<z.ZodBoolean>;
503
+ parameters: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
504
+ cache_options_override: z.ZodNullable<z.ZodOptional<z.ZodObject<{
505
+ enabled: z.ZodOptional<z.ZodBoolean>;
506
+ ttl: z.ZodOptional<z.ZodNumber>;
507
+ }, "strip", z.ZodTypeAny, {
508
+ enabled?: boolean | undefined;
509
+ ttl?: number | undefined;
510
+ }, {
511
+ enabled?: boolean | undefined;
512
+ ttl?: number | undefined;
513
+ }>>>;
514
+ }, "strip", z.ZodTypeAny, {
515
+ interval: number;
516
+ periodStart: string;
517
+ periodEnd: string;
518
+ onlyCompleteData?: boolean | undefined;
519
+ parameters?: Record<string, any> | null | undefined;
520
+ cache_options_override?: {
521
+ enabled?: boolean | undefined;
522
+ ttl?: number | undefined;
523
+ } | null | undefined;
524
+ }, {
525
+ interval: number;
526
+ periodStart: string;
527
+ periodEnd: string;
528
+ onlyCompleteData?: boolean | undefined;
529
+ parameters?: Record<string, any> | null | undefined;
530
+ cache_options_override?: {
531
+ enabled?: boolean | undefined;
532
+ ttl?: number | undefined;
533
+ } | null | undefined;
534
+ }>;
535
+ /**
536
+ * Snapshot Validation Schemas
537
+ */
538
+ /**
539
+ * Alert Validation Schemas
540
+ */
541
+ export declare const ListAlertsQuerySchema: z.ZodObject<{
542
+ offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
543
+ limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
544
+ with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
545
+ option_id: z.ZodOptional<z.ZodString>;
546
+ severity: z.ZodOptional<z.ZodEnum<["info", "warning", "error"]>>;
547
+ q: z.ZodOptional<z.ZodString>;
548
+ order: z.ZodOptional<z.ZodString>;
549
+ is_enabled: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
550
+ } & {
551
+ fields: z.ZodOptional<z.ZodString>;
552
+ }, "strip", z.ZodTypeAny, {
553
+ limit: number;
554
+ offset: number;
555
+ is_enabled?: boolean | undefined;
556
+ severity?: "info" | "warning" | "error" | undefined;
557
+ order?: string | undefined;
558
+ option_id?: string | undefined;
559
+ fields?: string | undefined;
560
+ q?: string | undefined;
561
+ with_deleted?: boolean | undefined;
562
+ }, {
563
+ is_enabled?: unknown;
564
+ severity?: "info" | "warning" | "error" | undefined;
565
+ order?: string | undefined;
566
+ option_id?: string | undefined;
567
+ limit?: unknown;
568
+ offset?: unknown;
569
+ fields?: string | undefined;
570
+ q?: string | undefined;
571
+ with_deleted?: unknown;
572
+ }>;
573
+ export declare const CreateAlertSchema: z.ZodObject<{
574
+ option_id: z.ZodString;
575
+ name: z.ZodString;
576
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
577
+ condition: z.ZodObject<{
578
+ operator: z.ZodEnum<["lt", "gt", "lte", "gte", "eq", "neq", "between"]>;
579
+ comparisonType: z.ZodEnum<["absolute", "relative"]>;
580
+ threshold: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber, "many">]>>;
581
+ lookbackPositions: z.ZodOptional<z.ZodNumber>;
582
+ changeType: z.ZodOptional<z.ZodEnum<["absolute", "percentage"]>>;
583
+ }, "strip", z.ZodTypeAny, {
584
+ operator: "lt" | "gt" | "lte" | "gte" | "eq" | "neq" | "between";
585
+ comparisonType: "absolute" | "relative";
586
+ threshold?: number | number[] | undefined;
587
+ lookbackPositions?: number | undefined;
588
+ changeType?: "absolute" | "percentage" | undefined;
589
+ }, {
590
+ operator: "lt" | "gt" | "lte" | "gte" | "eq" | "neq" | "between";
591
+ comparisonType: "absolute" | "relative";
592
+ threshold?: number | number[] | undefined;
593
+ lookbackPositions?: number | undefined;
594
+ changeType?: "absolute" | "percentage" | undefined;
595
+ }>;
596
+ period: z.ZodOptional<z.ZodObject<{
597
+ type: z.ZodEnum<["calendar", "custom"]>;
598
+ config: z.ZodUnion<[z.ZodObject<{
599
+ reference: z.ZodEnum<["today", "yesterday", "wtd", "lastweek", "mtd", "lastmonth", "qtd", "lastquarter", "ytd", "lastyear"]>;
600
+ }, "strip", z.ZodTypeAny, {
601
+ reference: "today" | "yesterday" | "wtd" | "lastweek" | "mtd" | "lastmonth" | "qtd" | "lastquarter" | "ytd" | "lastyear";
602
+ }, {
603
+ reference: "today" | "yesterday" | "wtd" | "lastweek" | "mtd" | "lastmonth" | "qtd" | "lastquarter" | "ytd" | "lastyear";
604
+ }>, z.ZodObject<{
605
+ start: z.ZodUnion<[z.ZodString, z.ZodDate]>;
606
+ end: z.ZodUnion<[z.ZodString, z.ZodDate]>;
607
+ }, "strip", z.ZodTypeAny, {
608
+ start: string | Date;
609
+ end: string | Date;
610
+ }, {
611
+ start: string | Date;
612
+ end: string | Date;
613
+ }>]>;
614
+ }, "strip", z.ZodTypeAny, {
615
+ type: "calendar" | "custom";
616
+ config: {
617
+ reference: "today" | "yesterday" | "wtd" | "lastweek" | "mtd" | "lastmonth" | "qtd" | "lastquarter" | "ytd" | "lastyear";
618
+ } | {
619
+ start: string | Date;
620
+ end: string | Date;
621
+ };
622
+ }, {
623
+ type: "calendar" | "custom";
624
+ config: {
625
+ reference: "today" | "yesterday" | "wtd" | "lastweek" | "mtd" | "lastmonth" | "qtd" | "lastquarter" | "ytd" | "lastyear";
626
+ } | {
627
+ start: string | Date;
628
+ end: string | Date;
629
+ };
630
+ }>>;
631
+ interval: z.ZodOptional<z.ZodNumber>;
632
+ severity: z.ZodEnum<["info", "warning", "error"]>;
633
+ is_enabled: z.ZodOptional<z.ZodBoolean>;
634
+ user_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
635
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
636
+ }, "strip", z.ZodTypeAny, {
637
+ name: string;
638
+ condition: {
639
+ operator: "lt" | "gt" | "lte" | "gte" | "eq" | "neq" | "between";
640
+ comparisonType: "absolute" | "relative";
641
+ threshold?: number | number[] | undefined;
642
+ lookbackPositions?: number | undefined;
643
+ changeType?: "absolute" | "percentage" | undefined;
644
+ };
645
+ severity: "info" | "warning" | "error";
646
+ option_id: string;
647
+ is_enabled?: boolean | undefined;
648
+ metadata?: Record<string, any> | undefined;
649
+ description?: string | null | undefined;
650
+ period?: {
651
+ type: "calendar" | "custom";
652
+ config: {
653
+ reference: "today" | "yesterday" | "wtd" | "lastweek" | "mtd" | "lastmonth" | "qtd" | "lastquarter" | "ytd" | "lastyear";
654
+ } | {
655
+ start: string | Date;
656
+ end: string | Date;
657
+ };
658
+ } | undefined;
659
+ interval?: number | undefined;
660
+ user_ids?: string[] | undefined;
661
+ }, {
662
+ name: string;
663
+ condition: {
664
+ operator: "lt" | "gt" | "lte" | "gte" | "eq" | "neq" | "between";
665
+ comparisonType: "absolute" | "relative";
666
+ threshold?: number | number[] | undefined;
667
+ lookbackPositions?: number | undefined;
668
+ changeType?: "absolute" | "percentage" | undefined;
669
+ };
670
+ severity: "info" | "warning" | "error";
671
+ option_id: string;
672
+ is_enabled?: boolean | undefined;
673
+ metadata?: Record<string, any> | undefined;
674
+ description?: string | null | undefined;
675
+ period?: {
676
+ type: "calendar" | "custom";
677
+ config: {
678
+ reference: "today" | "yesterday" | "wtd" | "lastweek" | "mtd" | "lastmonth" | "qtd" | "lastquarter" | "ytd" | "lastyear";
679
+ } | {
680
+ start: string | Date;
681
+ end: string | Date;
682
+ };
683
+ } | undefined;
684
+ interval?: number | undefined;
685
+ user_ids?: string[] | undefined;
686
+ }>;
687
+ export declare const UpdateAlertSchema: z.ZodObject<{
688
+ name: z.ZodOptional<z.ZodString>;
689
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
690
+ condition: z.ZodOptional<z.ZodObject<{
691
+ operator: z.ZodOptional<z.ZodEnum<["lt", "gt", "lte", "gte", "eq", "neq", "between"]>>;
692
+ comparisonType: z.ZodOptional<z.ZodEnum<["absolute", "relative"]>>;
693
+ threshold: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber, "many">]>>;
694
+ lookbackPositions: z.ZodOptional<z.ZodNumber>;
695
+ changeType: z.ZodOptional<z.ZodEnum<["absolute", "percentage"]>>;
696
+ }, "strip", z.ZodTypeAny, {
697
+ operator?: "lt" | "gt" | "lte" | "gte" | "eq" | "neq" | "between" | undefined;
698
+ comparisonType?: "absolute" | "relative" | undefined;
699
+ threshold?: number | number[] | undefined;
700
+ lookbackPositions?: number | undefined;
701
+ changeType?: "absolute" | "percentage" | undefined;
702
+ }, {
703
+ operator?: "lt" | "gt" | "lte" | "gte" | "eq" | "neq" | "between" | undefined;
704
+ comparisonType?: "absolute" | "relative" | undefined;
705
+ threshold?: number | number[] | undefined;
706
+ lookbackPositions?: number | undefined;
707
+ changeType?: "absolute" | "percentage" | undefined;
708
+ }>>;
709
+ period: z.ZodOptional<z.ZodObject<{
710
+ type: z.ZodEnum<["calendar", "custom"]>;
711
+ config: z.ZodUnion<[z.ZodObject<{
712
+ reference: z.ZodEnum<["today", "yesterday", "wtd", "lastweek", "mtd", "lastmonth", "qtd", "lastquarter", "ytd", "lastyear"]>;
713
+ }, "strip", z.ZodTypeAny, {
714
+ reference: "today" | "yesterday" | "wtd" | "lastweek" | "mtd" | "lastmonth" | "qtd" | "lastquarter" | "ytd" | "lastyear";
715
+ }, {
716
+ reference: "today" | "yesterday" | "wtd" | "lastweek" | "mtd" | "lastmonth" | "qtd" | "lastquarter" | "ytd" | "lastyear";
717
+ }>, z.ZodObject<{
718
+ start: z.ZodUnion<[z.ZodString, z.ZodDate]>;
719
+ end: z.ZodUnion<[z.ZodString, z.ZodDate]>;
720
+ }, "strip", z.ZodTypeAny, {
721
+ start: string | Date;
722
+ end: string | Date;
723
+ }, {
724
+ start: string | Date;
725
+ end: string | Date;
726
+ }>]>;
727
+ }, "strip", z.ZodTypeAny, {
728
+ type: "calendar" | "custom";
729
+ config: {
730
+ reference: "today" | "yesterday" | "wtd" | "lastweek" | "mtd" | "lastmonth" | "qtd" | "lastquarter" | "ytd" | "lastyear";
731
+ } | {
732
+ start: string | Date;
733
+ end: string | Date;
734
+ };
735
+ }, {
736
+ type: "calendar" | "custom";
737
+ config: {
738
+ reference: "today" | "yesterday" | "wtd" | "lastweek" | "mtd" | "lastmonth" | "qtd" | "lastquarter" | "ytd" | "lastyear";
739
+ } | {
740
+ start: string | Date;
741
+ end: string | Date;
742
+ };
743
+ }>>;
744
+ interval: z.ZodOptional<z.ZodNumber>;
745
+ severity: z.ZodOptional<z.ZodEnum<["info", "warning", "error"]>>;
746
+ is_enabled: z.ZodOptional<z.ZodBoolean>;
747
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
748
+ }, "strip", z.ZodTypeAny, {
749
+ is_enabled?: boolean | undefined;
750
+ metadata?: Record<string, any> | undefined;
751
+ name?: string | undefined;
752
+ description?: string | null | undefined;
753
+ condition?: {
754
+ operator?: "lt" | "gt" | "lte" | "gte" | "eq" | "neq" | "between" | undefined;
755
+ comparisonType?: "absolute" | "relative" | undefined;
756
+ threshold?: number | number[] | undefined;
757
+ lookbackPositions?: number | undefined;
758
+ changeType?: "absolute" | "percentage" | undefined;
759
+ } | undefined;
760
+ period?: {
761
+ type: "calendar" | "custom";
762
+ config: {
763
+ reference: "today" | "yesterday" | "wtd" | "lastweek" | "mtd" | "lastmonth" | "qtd" | "lastquarter" | "ytd" | "lastyear";
764
+ } | {
765
+ start: string | Date;
766
+ end: string | Date;
767
+ };
768
+ } | undefined;
769
+ interval?: number | undefined;
770
+ severity?: "info" | "warning" | "error" | undefined;
771
+ }, {
772
+ is_enabled?: boolean | undefined;
773
+ metadata?: Record<string, any> | undefined;
774
+ name?: string | undefined;
775
+ description?: string | null | undefined;
776
+ condition?: {
777
+ operator?: "lt" | "gt" | "lte" | "gte" | "eq" | "neq" | "between" | undefined;
778
+ comparisonType?: "absolute" | "relative" | undefined;
779
+ threshold?: number | number[] | undefined;
780
+ lookbackPositions?: number | undefined;
781
+ changeType?: "absolute" | "percentage" | undefined;
782
+ } | undefined;
783
+ period?: {
784
+ type: "calendar" | "custom";
785
+ config: {
786
+ reference: "today" | "yesterday" | "wtd" | "lastweek" | "mtd" | "lastmonth" | "qtd" | "lastquarter" | "ytd" | "lastyear";
787
+ } | {
788
+ start: string | Date;
789
+ end: string | Date;
790
+ };
791
+ } | undefined;
792
+ interval?: number | undefined;
793
+ severity?: "info" | "warning" | "error" | undefined;
794
+ }>;
795
+ export declare const GetAlertQuerySchema: z.ZodObject<{
796
+ fields: z.ZodOptional<z.ZodString>;
797
+ }, "strip", z.ZodTypeAny, {
798
+ fields?: string | undefined;
799
+ }, {
800
+ fields?: string | undefined;
801
+ }>;
802
+ export declare const ListAlertLogsQuerySchema: z.ZodObject<{
803
+ fields: z.ZodOptional<z.ZodString>;
804
+ offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
805
+ limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
806
+ with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
807
+ } & {
808
+ order: z.ZodOptional<z.ZodString>;
809
+ }, "strip", z.ZodTypeAny, {
810
+ limit: number;
811
+ offset: number;
812
+ order?: string | undefined;
813
+ fields?: string | undefined;
814
+ with_deleted?: boolean | undefined;
815
+ }, {
816
+ order?: string | undefined;
817
+ limit?: unknown;
818
+ offset?: unknown;
819
+ fields?: string | undefined;
820
+ with_deleted?: unknown;
821
+ }>;
822
+ /**
823
+ * Alert Log Validation Schemas
824
+ */
825
+ export declare const ListAlertLogsGlobalQuerySchema: z.ZodObject<{
826
+ offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
827
+ limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
828
+ with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
829
+ alert_id: z.ZodOptional<z.ZodString>;
830
+ severity: z.ZodOptional<z.ZodEnum<["info", "warning", "critical"]>>;
831
+ order: z.ZodOptional<z.ZodString>;
832
+ } & {
833
+ fields: z.ZodOptional<z.ZodString>;
834
+ }, "strip", z.ZodTypeAny, {
835
+ limit: number;
836
+ offset: number;
837
+ severity?: "info" | "warning" | "critical" | undefined;
838
+ order?: string | undefined;
839
+ fields?: string | undefined;
840
+ with_deleted?: boolean | undefined;
841
+ alert_id?: string | undefined;
842
+ }, {
843
+ severity?: "info" | "warning" | "critical" | undefined;
844
+ order?: string | undefined;
845
+ limit?: unknown;
846
+ offset?: unknown;
847
+ fields?: string | undefined;
848
+ with_deleted?: unknown;
849
+ alert_id?: string | undefined;
850
+ }>;
851
+ export declare const GetAlertLogQuerySchema: z.ZodObject<{
852
+ fields: z.ZodOptional<z.ZodString>;
853
+ }, "strip", z.ZodTypeAny, {
854
+ fields?: string | undefined;
855
+ }, {
856
+ fields?: string | undefined;
857
+ }>;
858
+ /**
859
+ * Cache Validation Schemas
860
+ */
861
+ export declare const InvalidateCacheSchema: z.ZodEffects<z.ZodObject<{
862
+ view_id: z.ZodOptional<z.ZodString>;
863
+ option_id: z.ZodOptional<z.ZodString>;
864
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
865
+ option_id: z.ZodString;
866
+ parameters: z.ZodRecord<z.ZodString, z.ZodAny>;
867
+ }, "strip", z.ZodTypeAny, {
868
+ option_id: string;
869
+ parameters: Record<string, any>;
870
+ }, {
871
+ option_id: string;
872
+ parameters: Record<string, any>;
873
+ }>, "many">>;
874
+ periodStart: z.ZodDate;
875
+ periodEnd: z.ZodDate;
876
+ interval: z.ZodNumber;
877
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
878
+ }, "strip", z.ZodTypeAny, {
879
+ interval: number;
880
+ periodStart: Date;
881
+ periodEnd: Date;
882
+ options?: {
883
+ option_id: string;
884
+ parameters: Record<string, any>;
885
+ }[] | undefined;
886
+ view_id?: string | undefined;
887
+ option_id?: string | undefined;
888
+ parameters?: Record<string, any> | undefined;
889
+ }, {
890
+ interval: number;
891
+ periodStart: Date;
892
+ periodEnd: Date;
893
+ options?: {
894
+ option_id: string;
895
+ parameters: Record<string, any>;
896
+ }[] | undefined;
897
+ view_id?: string | undefined;
898
+ option_id?: string | undefined;
899
+ parameters?: Record<string, any> | undefined;
900
+ }>, {
901
+ interval: number;
902
+ periodStart: Date;
903
+ periodEnd: Date;
904
+ options?: {
905
+ option_id: string;
906
+ parameters: Record<string, any>;
907
+ }[] | undefined;
908
+ view_id?: string | undefined;
909
+ option_id?: string | undefined;
910
+ parameters?: Record<string, any> | undefined;
911
+ }, {
912
+ interval: number;
913
+ periodStart: Date;
914
+ periodEnd: Date;
915
+ options?: {
916
+ option_id: string;
917
+ parameters: Record<string, any>;
918
+ }[] | undefined;
919
+ view_id?: string | undefined;
920
+ option_id?: string | undefined;
921
+ parameters?: Record<string, any> | undefined;
922
+ }>;
923
+ export type ListProvidersQuery = z.infer<typeof ListProvidersQuerySchema>;
924
+ export type GetProviderQuery = z.infer<typeof GetProviderQuerySchema>;
925
+ export type GetProviderStatisticsQuery = z.infer<typeof GetProviderStatisticsQuerySchema>;
926
+ export type ListViewsQuery = z.infer<typeof ListViewsQuerySchema>;
927
+ export type ListChartsQuery = z.infer<typeof ListChartsQuerySchema>;
928
+ export type CreateViewInput = z.infer<typeof CreateViewSchema>;
929
+ export type UpdateViewInput = z.infer<typeof UpdateViewSchema>;
930
+ export type GetViewQuery = z.infer<typeof GetViewQuerySchema>;
931
+ export type CalculateViewInput = z.infer<typeof CalculateViewSchema>;
932
+ export type CloneViewInput = z.infer<typeof CloneViewSchema>;
933
+ export type ListOptionsQuery = z.infer<typeof ListOptionsQuerySchema>;
934
+ export type InputDependency = z.infer<typeof InputDependencySchema>;
935
+ export type ParameterConfig = z.infer<typeof ParameterConfigSchema>;
936
+ export type CreateOptionInput = z.infer<typeof CreateOptionSchema>;
937
+ export type UpdateOptionInput = z.infer<typeof UpdateOptionSchema>;
938
+ export type CloneOptionInput = z.infer<typeof CloneOptionSchema>;
939
+ export type GetOptionQuery = z.infer<typeof GetOptionQuerySchema>;
940
+ export type CalculateOptionInput = z.infer<typeof CalculateOptionSchema>;
941
+ export type ListAlertsQuery = z.infer<typeof ListAlertsQuerySchema>;
942
+ export type CreateAlertInput = z.infer<typeof CreateAlertSchema>;
943
+ export type UpdateAlertInput = z.infer<typeof UpdateAlertSchema>;
944
+ export type GetAlertQuery = z.infer<typeof GetAlertQuerySchema>;
945
+ export type ListAlertLogsQuery = z.infer<typeof ListAlertLogsQuerySchema>;
946
+ export type ListAlertLogsGlobalQuery = z.infer<typeof ListAlertLogsGlobalQuerySchema>;
947
+ export type GetAlertLogQuery = z.infer<typeof GetAlertLogQuerySchema>;
948
+ export type InvalidateCacheInput = z.infer<typeof InvalidateCacheSchema>;
949
+ /**
950
+ * Chart Validation Schemas
951
+ */
952
+ export declare const CreateChartSchema: z.ZodObject<{
953
+ name: z.ZodString;
954
+ description: z.ZodDefault<z.ZodString>;
955
+ visualization_config: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
956
+ layout: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
957
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
958
+ statistic_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
959
+ view_id: z.ZodString;
960
+ }, "strip", z.ZodTypeAny, {
961
+ visualization_config: Record<string, any>;
962
+ metadata: Record<string, any>;
963
+ name: string;
964
+ description: string;
965
+ layout: Record<string, any>;
966
+ view_id: string;
967
+ statistic_ids?: string[] | undefined;
968
+ }, {
969
+ name: string;
970
+ view_id: string;
971
+ visualization_config?: Record<string, any> | undefined;
972
+ metadata?: Record<string, any> | undefined;
973
+ description?: string | undefined;
974
+ layout?: Record<string, any> | undefined;
975
+ statistic_ids?: string[] | undefined;
976
+ }>;
977
+ export declare const UpdateChartSchema: z.ZodObject<{
978
+ name: z.ZodOptional<z.ZodString>;
979
+ description: z.ZodNullable<z.ZodOptional<z.ZodString>>;
980
+ visualization_config: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
981
+ layout: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
982
+ metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
983
+ }, "strip", z.ZodTypeAny, {
984
+ visualization_config?: Record<string, any> | null | undefined;
985
+ metadata?: Record<string, any> | null | undefined;
986
+ name?: string | undefined;
987
+ description?: string | null | undefined;
988
+ layout?: Record<string, any> | null | undefined;
989
+ }, {
990
+ visualization_config?: Record<string, any> | null | undefined;
991
+ metadata?: Record<string, any> | null | undefined;
992
+ name?: string | undefined;
993
+ description?: string | null | undefined;
994
+ layout?: Record<string, any> | null | undefined;
995
+ }>;
996
+ export declare const ManageChartStatisticsSchema: z.ZodObject<{
997
+ statistic_ids: z.ZodArray<z.ZodString, "many">;
998
+ }, "strip", z.ZodTypeAny, {
999
+ statistic_ids: string[];
1000
+ }, {
1001
+ statistic_ids: string[];
1002
+ }>;
1003
+ export declare const GetChartQuerySchema: z.ZodObject<{
1004
+ fields: z.ZodOptional<z.ZodString>;
1005
+ }, "strip", z.ZodTypeAny, {
1006
+ fields?: string | undefined;
1007
+ }, {
1008
+ fields?: string | undefined;
1009
+ }>;
1010
+ export type CreateChartInput = z.infer<typeof CreateChartSchema>;
1011
+ export type UpdateChartInput = z.infer<typeof UpdateChartSchema>;
1012
+ export type ManageChartStatisticsInput = z.infer<typeof ManageChartStatisticsSchema>;
1013
+ export type GetChartQuery = z.infer<typeof GetChartQuerySchema>;