samva 0.33.0 → 0.35.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.
- package/README.md +1 -1
- package/dist/client/sdk.gen.d.ts +225 -251
- package/dist/client/sdk.gen.js +85 -211
- package/dist/client/types.gen.d.ts +2897 -403
- package/dist/effect/agents.d.ts +28 -13
- package/dist/effect/agents.js +5 -1
- package/dist/effect/analytics.d.ts +15 -15
- package/dist/effect/api-keys.d.ts +27 -18
- package/dist/effect/campaigns.d.ts +721 -65
- package/dist/effect/categories.d.ts +3 -3
- package/dist/effect/contact-groups.d.ts +15 -15
- package/dist/effect/contacts.d.ts +56 -52
- package/dist/effect/conversations.d.ts +45 -45
- package/dist/effect/email.d.ts +82 -82
- package/dist/effect/errors.d.ts +1 -1
- package/dist/effect/errors.js +2 -2
- package/dist/effect/extension-installations.d.ts +11 -11
- package/dist/effect/extensions.d.ts +16 -16
- package/dist/effect/generated/agents.d.ts +1063 -33
- package/dist/effect/generated/agents.js +133 -11
- package/dist/effect/generated/analytics.d.ts +109 -136
- package/dist/effect/generated/analytics.js +65 -36
- package/dist/effect/generated/api-keys.d.ts +240 -19
- package/dist/effect/generated/api-keys.js +24 -8
- package/dist/effect/generated/attachments.d.ts +89 -1
- package/dist/effect/generated/attachments.js +10 -2
- package/dist/effect/generated/brands.d.ts +133 -1
- package/dist/effect/generated/brands.js +22 -10
- package/dist/effect/generated/campaigns.d.ts +1442 -140
- package/dist/effect/generated/campaigns.js +82 -20
- package/dist/effect/generated/contact-events.d.ts +26 -4
- package/dist/effect/generated/contact-events.js +5 -3
- package/dist/effect/generated/contact-groups.d.ts +233 -13
- package/dist/effect/generated/contact-groups.js +33 -17
- package/dist/effect/generated/contacts.d.ts +634 -96
- package/dist/effect/generated/contacts.js +82 -20
- package/dist/effect/generated/conversations.d.ts +398 -106
- package/dist/effect/generated/conversations.js +96 -22
- package/dist/effect/generated/custom-fields.d.ts +89 -1
- package/dist/effect/generated/custom-fields.js +11 -3
- package/dist/effect/generated/email.d.ts +1447 -83
- package/dist/effect/generated/email.js +167 -43
- package/dist/effect/generated/events.d.ts +51 -7
- package/dist/effect/generated/events.js +9 -5
- package/dist/effect/generated/extension-installations.d.ts +208 -10
- package/dist/effect/generated/extension-installations.js +26 -8
- package/dist/effect/generated/extensions.d.ts +123 -13
- package/dist/effect/generated/extensions.js +20 -10
- package/dist/effect/generated/feedback.d.ts +23 -1
- package/dist/effect/generated/feedback.js +6 -4
- package/dist/effect/generated/journeys.d.ts +684 -16
- package/dist/effect/generated/journeys.js +37 -9
- package/dist/effect/generated/mailboxes.d.ts +3085 -627
- package/dist/effect/generated/mailboxes.js +340 -141
- package/dist/effect/generated/media.d.ts +125 -15
- package/dist/effect/generated/media.js +15 -2
- package/dist/effect/generated/messages.d.ts +2036 -117
- package/dist/effect/generated/messages.js +286 -54
- package/dist/effect/generated/namespaces.d.ts +209 -25
- package/dist/effect/generated/namespaces.js +27 -9
- package/dist/effect/generated/newsletter-domains.d.ts +98 -12
- package/dist/effect/generated/newsletter-domains.js +20 -13
- package/dist/effect/generated/newsletter-issues.d.ts +354 -19
- package/dist/effect/generated/newsletter-issues.js +162 -98
- package/dist/effect/generated/newsletters.d.ts +123 -13
- package/dist/effect/generated/newsletters.js +19 -9
- package/dist/effect/generated/operations.d.ts +76 -10
- package/dist/effect/generated/operations.js +12 -6
- package/dist/effect/generated/organizations.d.ts +287 -7
- package/dist/effect/generated/organizations.js +33 -5
- package/dist/effect/generated/scheduled-messages.d.ts +4427 -99
- package/dist/effect/generated/scheduled-messages.js +71 -12
- package/dist/effect/generated/shared.d.ts +2213 -190
- package/dist/effect/generated/shared.js +527 -76
- package/dist/effect/generated/subscriptions.d.ts +23 -1
- package/dist/effect/generated/subscriptions.js +6 -4
- package/dist/effect/generated/templates.d.ts +1718 -136
- package/dist/effect/generated/templates.js +421 -226
- package/dist/effect/generated/topic-forms.d.ts +111 -1
- package/dist/effect/generated/topic-forms.js +23 -13
- package/dist/effect/generated/topics.d.ts +353 -43
- package/dist/effect/generated/topics.js +67 -19
- package/dist/effect/generated/webhooks.d.ts +308 -46
- package/dist/effect/generated/webhooks.js +67 -19
- package/dist/effect/generated/whoami.d.ts +35 -1
- package/dist/effect/generated/whoami.js +4 -2
- package/dist/effect/generated-metadata.d.ts +20 -0
- package/dist/effect/generated-metadata.js +10 -0
- package/dist/effect/index.js +2 -2
- package/dist/effect/internal/client.js +1 -1
- package/dist/effect/internal/email-sender.d.ts +1 -1
- package/dist/effect/internal/send.d.ts +1 -1
- package/dist/effect/journeys.d.ts +105 -19
- package/dist/effect/mailboxes.d.ts +405 -174
- package/dist/effect/media.d.ts +1 -1
- package/dist/effect/messages.d.ts +40 -40
- package/dist/effect/namespaces.d.ts +15 -15
- package/dist/effect/newsletter-domains.d.ts +5 -5
- package/dist/effect/newsletters.d.ts +1 -1
- package/dist/effect/operations.d.ts +11 -11
- package/dist/effect/organizations.d.ts +2 -2
- package/dist/effect/scheduled-messages.d.ts +863 -8
- package/dist/effect/templates.d.ts +37 -37
- package/dist/effect/topics.d.ts +21 -21
- package/dist/effect/webhooks.d.ts +28 -26
- package/dist/index.js +2 -2
- package/dist/normalize.js +13 -1
- package/dist/package.js +1 -1
- package/dist/promises/client.d.ts +1 -1
- package/dist/promises/client.js +2 -2
- package/dist/promises/errors.gen.d.ts +22 -2
- package/dist/promises/errors.gen.js +60 -2
- package/dist/promises/index.js +2 -2
- package/dist/promises/types.gen.d.ts +1 -1
- package/dist/service-map.d.ts +9 -0
- package/dist/service-map.js +5 -0
- package/package.json +9 -8
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
|
-
import { AnalyticsQueryError, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, UnauthorizedError, ValidationError, __SamvaRuntimeAbsoluteInstant } from "./shared";
|
|
3
|
+
import { AnalyticsQueryError, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, UnauthorizedError, ValidationError, __SamvaRuntimeAbsoluteInstant } from "./shared";
|
|
4
4
|
export type AnalyticsGetChannelStatsQuery = {
|
|
5
|
-
readonly after?: __SamvaRuntimeAbsoluteInstant
|
|
6
|
-
readonly before?: __SamvaRuntimeAbsoluteInstant
|
|
5
|
+
readonly after?: __SamvaRuntimeAbsoluteInstant;
|
|
6
|
+
readonly before?: __SamvaRuntimeAbsoluteInstant;
|
|
7
7
|
};
|
|
8
8
|
export declare const AnalyticsGetChannelStatsQuery: Schema.Struct<{
|
|
9
|
-
readonly after: Schema.optionalKey<Schema.
|
|
10
|
-
readonly before: Schema.optionalKey<Schema.
|
|
9
|
+
readonly after: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
10
|
+
readonly before: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
11
11
|
}>;
|
|
12
12
|
export type AnalyticsGetChannelStats200 = {
|
|
13
13
|
readonly email: {
|
|
@@ -21,6 +21,19 @@ export type AnalyticsGetChannelStats200 = {
|
|
|
21
21
|
readonly uniqueMessageClickRate: number;
|
|
22
22
|
readonly bounceRate: number;
|
|
23
23
|
};
|
|
24
|
+
readonly whatsapp: {
|
|
25
|
+
readonly sent: number;
|
|
26
|
+
readonly deliveryRate: number;
|
|
27
|
+
readonly readRate: number;
|
|
28
|
+
readonly failureRate: number;
|
|
29
|
+
readonly avgResponseTime: number;
|
|
30
|
+
};
|
|
31
|
+
readonly sms: {
|
|
32
|
+
readonly sent: number;
|
|
33
|
+
readonly deliveryRate: number;
|
|
34
|
+
readonly failureRate: number;
|
|
35
|
+
readonly totalSegments: number;
|
|
36
|
+
};
|
|
24
37
|
};
|
|
25
38
|
export declare const AnalyticsGetChannelStats200: Schema.Struct<{
|
|
26
39
|
readonly email: Schema.Struct<{
|
|
@@ -34,9 +47,22 @@ export declare const AnalyticsGetChannelStats200: Schema.Struct<{
|
|
|
34
47
|
readonly uniqueMessageClickRate: Schema.Finite;
|
|
35
48
|
readonly bounceRate: Schema.Finite;
|
|
36
49
|
}>;
|
|
50
|
+
readonly whatsapp: Schema.Struct<{
|
|
51
|
+
readonly sent: Schema.Finite;
|
|
52
|
+
readonly deliveryRate: Schema.Finite;
|
|
53
|
+
readonly readRate: Schema.Finite;
|
|
54
|
+
readonly failureRate: Schema.Finite;
|
|
55
|
+
readonly avgResponseTime: Schema.Finite;
|
|
56
|
+
}>;
|
|
57
|
+
readonly sms: Schema.Struct<{
|
|
58
|
+
readonly sent: Schema.Finite;
|
|
59
|
+
readonly deliveryRate: Schema.Finite;
|
|
60
|
+
readonly failureRate: Schema.Finite;
|
|
61
|
+
readonly totalSegments: Schema.Finite;
|
|
62
|
+
}>;
|
|
37
63
|
}>;
|
|
38
|
-
export type AnalyticsGetChannelStats400 = AnalyticsQueryError;
|
|
39
|
-
export declare const AnalyticsGetChannelStats400: typeof AnalyticsQueryError
|
|
64
|
+
export type AnalyticsGetChannelStats400 = AnalyticsQueryError | MalformedRequestError;
|
|
65
|
+
export declare const AnalyticsGetChannelStats400: Schema.Union<readonly [typeof AnalyticsQueryError, typeof MalformedRequestError]>;
|
|
40
66
|
export type AnalyticsGetChannelStats401 = UnauthorizedError;
|
|
41
67
|
export declare const AnalyticsGetChannelStats401: typeof UnauthorizedError;
|
|
42
68
|
export type AnalyticsGetChannelStats403 = ForbiddenError;
|
|
@@ -48,14 +74,14 @@ export declare const AnalyticsGetChannelStats500: typeof InternalError;
|
|
|
48
74
|
export type AnalyticsGetChannelStats504 = GatewayTimeoutError;
|
|
49
75
|
export declare const AnalyticsGetChannelStats504: typeof GatewayTimeoutError;
|
|
50
76
|
export type AnalyticsGetDeliveryMetricsQuery = {
|
|
51
|
-
readonly after?: __SamvaRuntimeAbsoluteInstant
|
|
52
|
-
readonly before?: __SamvaRuntimeAbsoluteInstant
|
|
53
|
-
readonly channel?: "
|
|
77
|
+
readonly after?: __SamvaRuntimeAbsoluteInstant;
|
|
78
|
+
readonly before?: __SamvaRuntimeAbsoluteInstant;
|
|
79
|
+
readonly channel?: "sms" | "whatsapp" | "email";
|
|
54
80
|
};
|
|
55
81
|
export declare const AnalyticsGetDeliveryMetricsQuery: Schema.Struct<{
|
|
56
|
-
readonly after: Schema.optionalKey<Schema.
|
|
57
|
-
readonly before: Schema.optionalKey<Schema.
|
|
58
|
-
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"
|
|
82
|
+
readonly after: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
83
|
+
readonly before: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
84
|
+
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
|
|
59
85
|
}>;
|
|
60
86
|
export type AnalyticsGetDeliveryMetrics200 = {
|
|
61
87
|
readonly deliveredRate: number;
|
|
@@ -69,8 +95,8 @@ export declare const AnalyticsGetDeliveryMetrics200: Schema.Struct<{
|
|
|
69
95
|
readonly pendingRate: Schema.Finite;
|
|
70
96
|
readonly avgDeliveryTimeMs: Schema.Finite;
|
|
71
97
|
}>;
|
|
72
|
-
export type AnalyticsGetDeliveryMetrics400 = AnalyticsQueryError;
|
|
73
|
-
export declare const AnalyticsGetDeliveryMetrics400: typeof AnalyticsQueryError
|
|
98
|
+
export type AnalyticsGetDeliveryMetrics400 = AnalyticsQueryError | MalformedRequestError;
|
|
99
|
+
export declare const AnalyticsGetDeliveryMetrics400: Schema.Union<readonly [typeof AnalyticsQueryError, typeof MalformedRequestError]>;
|
|
74
100
|
export type AnalyticsGetDeliveryMetrics401 = UnauthorizedError;
|
|
75
101
|
export declare const AnalyticsGetDeliveryMetrics401: typeof UnauthorizedError;
|
|
76
102
|
export type AnalyticsGetDeliveryMetrics403 = ForbiddenError;
|
|
@@ -85,13 +111,13 @@ export type AnalyticsExportDataRequestJson = {
|
|
|
85
111
|
readonly after: __SamvaRuntimeAbsoluteInstant;
|
|
86
112
|
readonly before: __SamvaRuntimeAbsoluteInstant;
|
|
87
113
|
readonly format?: "csv" | "json" | null;
|
|
88
|
-
readonly includeChannels?: ReadonlyArray<"email"> | null;
|
|
114
|
+
readonly includeChannels?: ReadonlyArray<"sms" | "whatsapp" | "email"> | null;
|
|
89
115
|
};
|
|
90
116
|
export declare const AnalyticsExportDataRequestJson: Schema.Struct<{
|
|
91
117
|
readonly after: Schema.decodeTo<Schema.Date, Schema.String, never, never>;
|
|
92
118
|
readonly before: Schema.decodeTo<Schema.Date, Schema.String, never, never>;
|
|
93
119
|
readonly format: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"csv">, Schema.Literal<"json">]>, Schema.Null]>>;
|
|
94
|
-
readonly includeChannels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>>;
|
|
120
|
+
readonly includeChannels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
|
|
95
121
|
}>;
|
|
96
122
|
export type AnalyticsExportData200 = {
|
|
97
123
|
readonly content: string;
|
|
@@ -103,8 +129,8 @@ export declare const AnalyticsExportData200: Schema.Struct<{
|
|
|
103
129
|
readonly mimeType: Schema.String;
|
|
104
130
|
readonly filename: Schema.String;
|
|
105
131
|
}>;
|
|
106
|
-
export type AnalyticsExportData400 = AnalyticsQueryError;
|
|
107
|
-
export declare const AnalyticsExportData400: typeof AnalyticsQueryError
|
|
132
|
+
export type AnalyticsExportData400 = AnalyticsQueryError | MalformedRequestError;
|
|
133
|
+
export declare const AnalyticsExportData400: Schema.Union<readonly [typeof AnalyticsQueryError, typeof MalformedRequestError]>;
|
|
108
134
|
export type AnalyticsExportData401 = UnauthorizedError;
|
|
109
135
|
export declare const AnalyticsExportData401: typeof UnauthorizedError;
|
|
110
136
|
export type AnalyticsExportData403 = ForbiddenError;
|
|
@@ -116,12 +142,12 @@ export declare const AnalyticsExportData500: typeof InternalError;
|
|
|
116
142
|
export type AnalyticsExportData504 = GatewayTimeoutError;
|
|
117
143
|
export declare const AnalyticsExportData504: typeof GatewayTimeoutError;
|
|
118
144
|
export type AnalyticsGetHourlyDistributionQuery = {
|
|
119
|
-
readonly after?: __SamvaRuntimeAbsoluteInstant
|
|
120
|
-
readonly before?: __SamvaRuntimeAbsoluteInstant
|
|
145
|
+
readonly after?: __SamvaRuntimeAbsoluteInstant;
|
|
146
|
+
readonly before?: __SamvaRuntimeAbsoluteInstant;
|
|
121
147
|
};
|
|
122
148
|
export declare const AnalyticsGetHourlyDistributionQuery: Schema.Struct<{
|
|
123
|
-
readonly after: Schema.optionalKey<Schema.
|
|
124
|
-
readonly before: Schema.optionalKey<Schema.
|
|
149
|
+
readonly after: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
150
|
+
readonly before: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
125
151
|
}>;
|
|
126
152
|
export type AnalyticsGetHourlyDistribution200 = ReadonlyArray<{
|
|
127
153
|
readonly hour: string;
|
|
@@ -131,8 +157,8 @@ export declare const AnalyticsGetHourlyDistribution200: Schema.$Array<Schema.Str
|
|
|
131
157
|
readonly hour: Schema.String;
|
|
132
158
|
readonly count: Schema.Finite;
|
|
133
159
|
}>>;
|
|
134
|
-
export type AnalyticsGetHourlyDistribution400 = AnalyticsQueryError;
|
|
135
|
-
export declare const AnalyticsGetHourlyDistribution400: typeof AnalyticsQueryError
|
|
160
|
+
export type AnalyticsGetHourlyDistribution400 = AnalyticsQueryError | MalformedRequestError;
|
|
161
|
+
export declare const AnalyticsGetHourlyDistribution400: Schema.Union<readonly [typeof AnalyticsQueryError, typeof MalformedRequestError]>;
|
|
136
162
|
export type AnalyticsGetHourlyDistribution401 = UnauthorizedError;
|
|
137
163
|
export declare const AnalyticsGetHourlyDistribution401: typeof UnauthorizedError;
|
|
138
164
|
export type AnalyticsGetHourlyDistribution403 = ForbiddenError;
|
|
@@ -144,31 +170,35 @@ export declare const AnalyticsGetHourlyDistribution500: typeof InternalError;
|
|
|
144
170
|
export type AnalyticsGetHourlyDistribution504 = GatewayTimeoutError;
|
|
145
171
|
export declare const AnalyticsGetHourlyDistribution504: typeof GatewayTimeoutError;
|
|
146
172
|
export type AnalyticsGetStatsQuery = {
|
|
147
|
-
readonly after?: __SamvaRuntimeAbsoluteInstant
|
|
148
|
-
readonly before?: __SamvaRuntimeAbsoluteInstant
|
|
149
|
-
readonly groupBy?: "day" | "week" | "month"
|
|
150
|
-
readonly channel?: "
|
|
173
|
+
readonly after?: __SamvaRuntimeAbsoluteInstant;
|
|
174
|
+
readonly before?: __SamvaRuntimeAbsoluteInstant;
|
|
175
|
+
readonly groupBy?: "day" | "week" | "month";
|
|
176
|
+
readonly channel?: "sms" | "whatsapp" | "email";
|
|
151
177
|
};
|
|
152
178
|
export declare const AnalyticsGetStatsQuery: Schema.Struct<{
|
|
153
|
-
readonly after: Schema.optionalKey<Schema.
|
|
154
|
-
readonly before: Schema.optionalKey<Schema.
|
|
155
|
-
readonly groupBy: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
156
|
-
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"
|
|
179
|
+
readonly after: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
180
|
+
readonly before: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
181
|
+
readonly groupBy: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"day">, Schema.Literal<"week">, Schema.Literal<"month">]>>;
|
|
182
|
+
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
|
|
157
183
|
}>;
|
|
158
184
|
export type AnalyticsGetStats200 = {
|
|
159
185
|
readonly volumeHistory: ReadonlyArray<{
|
|
160
186
|
readonly date: string;
|
|
161
187
|
readonly email: number;
|
|
188
|
+
readonly whatsapp: number;
|
|
189
|
+
readonly sms: number;
|
|
162
190
|
}>;
|
|
163
191
|
};
|
|
164
192
|
export declare const AnalyticsGetStats200: Schema.Struct<{
|
|
165
193
|
readonly volumeHistory: Schema.$Array<Schema.Struct<{
|
|
166
194
|
readonly date: Schema.String;
|
|
167
195
|
readonly email: Schema.Finite;
|
|
196
|
+
readonly whatsapp: Schema.Finite;
|
|
197
|
+
readonly sms: Schema.Finite;
|
|
168
198
|
}>>;
|
|
169
199
|
}>;
|
|
170
|
-
export type AnalyticsGetStats400 = AnalyticsQueryError;
|
|
171
|
-
export declare const AnalyticsGetStats400: typeof AnalyticsQueryError
|
|
200
|
+
export type AnalyticsGetStats400 = AnalyticsQueryError | MalformedRequestError;
|
|
201
|
+
export declare const AnalyticsGetStats400: Schema.Union<readonly [typeof AnalyticsQueryError, typeof MalformedRequestError]>;
|
|
172
202
|
export type AnalyticsGetStats401 = UnauthorizedError;
|
|
173
203
|
export declare const AnalyticsGetStats401: typeof UnauthorizedError;
|
|
174
204
|
export type AnalyticsGetStats403 = ForbiddenError;
|
|
@@ -180,16 +210,16 @@ export declare const AnalyticsGetStats500: typeof InternalError;
|
|
|
180
210
|
export type AnalyticsGetStats504 = GatewayTimeoutError;
|
|
181
211
|
export declare const AnalyticsGetStats504: typeof GatewayTimeoutError;
|
|
182
212
|
export type AnalyticsGetTopContactsQuery = {
|
|
183
|
-
readonly after?: __SamvaRuntimeAbsoluteInstant
|
|
184
|
-
readonly before?: __SamvaRuntimeAbsoluteInstant
|
|
213
|
+
readonly after?: __SamvaRuntimeAbsoluteInstant;
|
|
214
|
+
readonly before?: __SamvaRuntimeAbsoluteInstant;
|
|
185
215
|
readonly limit?: number | null;
|
|
186
|
-
readonly sortBy?: "sent" | "received" | "total"
|
|
216
|
+
readonly sortBy?: "sent" | "received" | "total";
|
|
187
217
|
};
|
|
188
218
|
export declare const AnalyticsGetTopContactsQuery: Schema.Struct<{
|
|
189
|
-
readonly after: Schema.optionalKey<Schema.
|
|
190
|
-
readonly before: Schema.optionalKey<Schema.
|
|
219
|
+
readonly after: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
220
|
+
readonly before: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
191
221
|
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
192
|
-
readonly sortBy: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
222
|
+
readonly sortBy: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sent">, Schema.Literal<"received">, Schema.Literal<"total">]>>;
|
|
193
223
|
}>;
|
|
194
224
|
export type AnalyticsGetTopContacts200 = ReadonlyArray<{
|
|
195
225
|
readonly id: string;
|
|
@@ -205,8 +235,8 @@ export declare const AnalyticsGetTopContacts200: Schema.$Array<Schema.Struct<{
|
|
|
205
235
|
readonly phone: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
206
236
|
readonly messageCount: Schema.Finite;
|
|
207
237
|
}>>;
|
|
208
|
-
export type AnalyticsGetTopContacts400 = AnalyticsQueryError;
|
|
209
|
-
export declare const AnalyticsGetTopContacts400: typeof AnalyticsQueryError
|
|
238
|
+
export type AnalyticsGetTopContacts400 = AnalyticsQueryError | MalformedRequestError;
|
|
239
|
+
export declare const AnalyticsGetTopContacts400: Schema.Union<readonly [typeof AnalyticsQueryError, typeof MalformedRequestError]>;
|
|
210
240
|
export type AnalyticsGetTopContacts401 = UnauthorizedError;
|
|
211
241
|
export declare const AnalyticsGetTopContacts401: typeof UnauthorizedError;
|
|
212
242
|
export type AnalyticsGetTopContacts403 = ForbiddenError;
|
|
@@ -221,24 +251,12 @@ declare const AnalyticsGroup_base: HttpApiGroup.HttpApiGroup<"Analytics", HttpAp
|
|
|
221
251
|
readonly after: Schema.decodeTo<Schema.Date, Schema.String, never, never>;
|
|
222
252
|
readonly before: Schema.decodeTo<Schema.Date, Schema.String, never, never>;
|
|
223
253
|
readonly format: Schema.optionalKey<Schema.Union<readonly [Schema.Union<readonly [Schema.Literal<"csv">, Schema.Literal<"json">]>, Schema.Null]>>;
|
|
224
|
-
readonly includeChannels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Literal<"email">>, Schema.Null]>>;
|
|
254
|
+
readonly includeChannels: Schema.optionalKey<Schema.Union<readonly [Schema.$Array<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>, Schema.Null]>>;
|
|
225
255
|
}>>, never, Schema.toCodecJson<Schema.Struct<{
|
|
226
256
|
readonly content: Schema.String;
|
|
227
257
|
readonly mimeType: Schema.String;
|
|
228
258
|
readonly filename: Schema.String;
|
|
229
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<
|
|
230
|
-
readonly _tag: "AnalyticsQueryError";
|
|
231
|
-
readonly message: string;
|
|
232
|
-
}, readonly [Schema.Struct<{
|
|
233
|
-
readonly _tag: Schema.tag<"AnalyticsQueryError">;
|
|
234
|
-
readonly message: Schema.String;
|
|
235
|
-
}>], {
|
|
236
|
-
readonly _tag: "AnalyticsQueryError";
|
|
237
|
-
readonly message: string;
|
|
238
|
-
}>, Schema.Struct<{
|
|
239
|
-
readonly _tag: Schema.tag<"AnalyticsQueryError">;
|
|
240
|
-
readonly message: Schema.String;
|
|
241
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
259
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof AnalyticsQueryError, typeof MalformedRequestError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
242
260
|
readonly _tag: "ForbiddenError";
|
|
243
261
|
readonly message: string;
|
|
244
262
|
}, readonly [Schema.Struct<{
|
|
@@ -299,8 +317,8 @@ declare const AnalyticsGroup_base: HttpApiGroup.HttpApiGroup<"Analytics", HttpAp
|
|
|
299
317
|
readonly message: Schema.String;
|
|
300
318
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
301
319
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"analyticsGetChannelStats", "GET", "/v1/analytics/channel-stats", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
302
|
-
readonly after: Schema.optionalKey<Schema.
|
|
303
|
-
readonly before: Schema.optionalKey<Schema.
|
|
320
|
+
readonly after: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
321
|
+
readonly before: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
304
322
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
305
323
|
readonly email: Schema.Struct<{
|
|
306
324
|
readonly sent: Schema.Finite;
|
|
@@ -313,19 +331,20 @@ declare const AnalyticsGroup_base: HttpApiGroup.HttpApiGroup<"Analytics", HttpAp
|
|
|
313
331
|
readonly uniqueMessageClickRate: Schema.Finite;
|
|
314
332
|
readonly bounceRate: Schema.Finite;
|
|
315
333
|
}>;
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}
|
|
323
|
-
readonly
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
}
|
|
334
|
+
readonly whatsapp: Schema.Struct<{
|
|
335
|
+
readonly sent: Schema.Finite;
|
|
336
|
+
readonly deliveryRate: Schema.Finite;
|
|
337
|
+
readonly readRate: Schema.Finite;
|
|
338
|
+
readonly failureRate: Schema.Finite;
|
|
339
|
+
readonly avgResponseTime: Schema.Finite;
|
|
340
|
+
}>;
|
|
341
|
+
readonly sms: Schema.Struct<{
|
|
342
|
+
readonly sent: Schema.Finite;
|
|
343
|
+
readonly deliveryRate: Schema.Finite;
|
|
344
|
+
readonly failureRate: Schema.Finite;
|
|
345
|
+
readonly totalSegments: Schema.Finite;
|
|
346
|
+
}>;
|
|
347
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof AnalyticsQueryError, typeof MalformedRequestError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
329
348
|
readonly _tag: "ForbiddenError";
|
|
330
349
|
readonly message: string;
|
|
331
350
|
}, readonly [Schema.Struct<{
|
|
@@ -386,27 +405,15 @@ declare const AnalyticsGroup_base: HttpApiGroup.HttpApiGroup<"Analytics", HttpAp
|
|
|
386
405
|
readonly message: Schema.String;
|
|
387
406
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
388
407
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"analyticsGetDeliveryMetrics", "GET", "/v1/analytics/delivery-metrics", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
389
|
-
readonly after: Schema.optionalKey<Schema.
|
|
390
|
-
readonly before: Schema.optionalKey<Schema.
|
|
391
|
-
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"
|
|
408
|
+
readonly after: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
409
|
+
readonly before: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
410
|
+
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
|
|
392
411
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
393
412
|
readonly deliveredRate: Schema.Finite;
|
|
394
413
|
readonly failedRate: Schema.Finite;
|
|
395
414
|
readonly pendingRate: Schema.Finite;
|
|
396
415
|
readonly avgDeliveryTimeMs: Schema.Finite;
|
|
397
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<
|
|
398
|
-
readonly _tag: "AnalyticsQueryError";
|
|
399
|
-
readonly message: string;
|
|
400
|
-
}, readonly [Schema.Struct<{
|
|
401
|
-
readonly _tag: Schema.tag<"AnalyticsQueryError">;
|
|
402
|
-
readonly message: Schema.String;
|
|
403
|
-
}>], {
|
|
404
|
-
readonly _tag: "AnalyticsQueryError";
|
|
405
|
-
readonly message: string;
|
|
406
|
-
}>, Schema.Struct<{
|
|
407
|
-
readonly _tag: Schema.tag<"AnalyticsQueryError">;
|
|
408
|
-
readonly message: Schema.String;
|
|
409
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
416
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof AnalyticsQueryError, typeof MalformedRequestError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
410
417
|
readonly _tag: "ForbiddenError";
|
|
411
418
|
readonly message: string;
|
|
412
419
|
}, readonly [Schema.Struct<{
|
|
@@ -467,24 +474,12 @@ declare const AnalyticsGroup_base: HttpApiGroup.HttpApiGroup<"Analytics", HttpAp
|
|
|
467
474
|
readonly message: Schema.String;
|
|
468
475
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
469
476
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"analyticsGetHourlyDistribution", "GET", "/v1/analytics/hourly-distribution", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
470
|
-
readonly after: Schema.optionalKey<Schema.
|
|
471
|
-
readonly before: Schema.optionalKey<Schema.
|
|
477
|
+
readonly after: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
478
|
+
readonly before: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
472
479
|
}>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
|
|
473
480
|
readonly hour: Schema.String;
|
|
474
481
|
readonly count: Schema.Finite;
|
|
475
|
-
}>>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<
|
|
476
|
-
readonly _tag: "AnalyticsQueryError";
|
|
477
|
-
readonly message: string;
|
|
478
|
-
}, readonly [Schema.Struct<{
|
|
479
|
-
readonly _tag: Schema.tag<"AnalyticsQueryError">;
|
|
480
|
-
readonly message: Schema.String;
|
|
481
|
-
}>], {
|
|
482
|
-
readonly _tag: "AnalyticsQueryError";
|
|
483
|
-
readonly message: string;
|
|
484
|
-
}>, Schema.Struct<{
|
|
485
|
-
readonly _tag: Schema.tag<"AnalyticsQueryError">;
|
|
486
|
-
readonly message: Schema.String;
|
|
487
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
482
|
+
}>>>, Schema.toCodecJson<Schema.Union<readonly [typeof AnalyticsQueryError, typeof MalformedRequestError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
488
483
|
readonly _tag: "ForbiddenError";
|
|
489
484
|
readonly message: string;
|
|
490
485
|
}, readonly [Schema.Struct<{
|
|
@@ -545,28 +540,18 @@ declare const AnalyticsGroup_base: HttpApiGroup.HttpApiGroup<"Analytics", HttpAp
|
|
|
545
540
|
readonly message: Schema.String;
|
|
546
541
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
547
542
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"analyticsGetStats", "GET", "/v1/analytics/stats", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
548
|
-
readonly after: Schema.optionalKey<Schema.
|
|
549
|
-
readonly before: Schema.optionalKey<Schema.
|
|
550
|
-
readonly groupBy: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
551
|
-
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"
|
|
543
|
+
readonly after: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
544
|
+
readonly before: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
545
|
+
readonly groupBy: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"day">, Schema.Literal<"week">, Schema.Literal<"month">]>>;
|
|
546
|
+
readonly channel: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sms">, Schema.Literal<"whatsapp">, Schema.Literal<"email">]>>;
|
|
552
547
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
553
548
|
readonly volumeHistory: Schema.$Array<Schema.Struct<{
|
|
554
549
|
readonly date: Schema.String;
|
|
555
550
|
readonly email: Schema.Finite;
|
|
551
|
+
readonly whatsapp: Schema.Finite;
|
|
552
|
+
readonly sms: Schema.Finite;
|
|
556
553
|
}>>;
|
|
557
|
-
}>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<
|
|
558
|
-
readonly _tag: "AnalyticsQueryError";
|
|
559
|
-
readonly message: string;
|
|
560
|
-
}, readonly [Schema.Struct<{
|
|
561
|
-
readonly _tag: Schema.tag<"AnalyticsQueryError">;
|
|
562
|
-
readonly message: Schema.String;
|
|
563
|
-
}>], {
|
|
564
|
-
readonly _tag: "AnalyticsQueryError";
|
|
565
|
-
readonly message: string;
|
|
566
|
-
}>, Schema.Struct<{
|
|
567
|
-
readonly _tag: Schema.tag<"AnalyticsQueryError">;
|
|
568
|
-
readonly message: Schema.String;
|
|
569
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
554
|
+
}>>, Schema.toCodecJson<Schema.Union<readonly [typeof AnalyticsQueryError, typeof MalformedRequestError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
570
555
|
readonly _tag: "ForbiddenError";
|
|
571
556
|
readonly message: string;
|
|
572
557
|
}, readonly [Schema.Struct<{
|
|
@@ -627,29 +612,17 @@ declare const AnalyticsGroup_base: HttpApiGroup.HttpApiGroup<"Analytics", HttpAp
|
|
|
627
612
|
readonly message: Schema.String;
|
|
628
613
|
readonly fields: Schema.optionalKey<Schema.Union<readonly [Schema.$Record<Schema.String, Schema.$Array<Schema.String>>, Schema.Null]>>;
|
|
629
614
|
}>, never, never> | typeof InternalError>, ApiKeySecurityMiddleware, never> | HttpApiEndpoint.HttpApiEndpoint<"analyticsGetTopContacts", "GET", "/v1/analytics/top-contacts", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
630
|
-
readonly after: Schema.optionalKey<Schema.
|
|
631
|
-
readonly before: Schema.optionalKey<Schema.
|
|
615
|
+
readonly after: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
616
|
+
readonly before: Schema.optionalKey<Schema.decodeTo<Schema.Date, Schema.String, never, never>>;
|
|
632
617
|
readonly limit: Schema.optionalKey<Schema.Union<readonly [Schema.Finite, Schema.Null]>>;
|
|
633
|
-
readonly sortBy: Schema.optionalKey<Schema.Union<readonly [Schema.
|
|
618
|
+
readonly sortBy: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"sent">, Schema.Literal<"received">, Schema.Literal<"total">]>>;
|
|
634
619
|
}>>, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
|
|
635
620
|
readonly id: Schema.String;
|
|
636
621
|
readonly name: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
637
622
|
readonly email: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
638
623
|
readonly phone: Schema.Union<readonly [Schema.String, Schema.Null]>;
|
|
639
624
|
readonly messageCount: Schema.Finite;
|
|
640
|
-
}>>>, Schema.toCodecJson<Schema.decodeTo<Schema.declareConstructor<
|
|
641
|
-
readonly _tag: "AnalyticsQueryError";
|
|
642
|
-
readonly message: string;
|
|
643
|
-
}, readonly [Schema.Struct<{
|
|
644
|
-
readonly _tag: Schema.tag<"AnalyticsQueryError">;
|
|
645
|
-
readonly message: Schema.String;
|
|
646
|
-
}>], {
|
|
647
|
-
readonly _tag: "AnalyticsQueryError";
|
|
648
|
-
readonly message: string;
|
|
649
|
-
}>, Schema.Struct<{
|
|
650
|
-
readonly _tag: Schema.tag<"AnalyticsQueryError">;
|
|
651
|
-
readonly message: Schema.String;
|
|
652
|
-
}>, never, never> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
625
|
+
}>>>, Schema.toCodecJson<Schema.Union<readonly [typeof AnalyticsQueryError, typeof MalformedRequestError]> | Schema.decodeTo<Schema.declareConstructor<ForbiddenError, {
|
|
653
626
|
readonly _tag: "ForbiddenError";
|
|
654
627
|
readonly message: string;
|
|
655
628
|
}, readonly [Schema.Struct<{
|
|
@@ -1,33 +1,52 @@
|
|
|
1
1
|
import { AbsoluteInstant } from "../runtime.js";
|
|
2
|
-
import { AnalyticsQueryError, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
2
|
+
import { AnalyticsQueryError, ApiKeySecurityMiddleware, ForbiddenError, GatewayTimeoutError, InternalError, MalformedRequestError, UnauthorizedError, ValidationError } from "./shared.js";
|
|
3
3
|
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/http-api";
|
|
4
4
|
import * as Schema from "effect/Schema";
|
|
5
5
|
// src/effect/generated/analytics.ts
|
|
6
6
|
const AnalyticsGetChannelStatsQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
7
|
-
after: Schema.optionalKey(
|
|
8
|
-
before: Schema.optionalKey(
|
|
7
|
+
after: Schema.optionalKey(AbsoluteInstant),
|
|
8
|
+
before: Schema.optionalKey(AbsoluteInstant)
|
|
9
9
|
}))();
|
|
10
|
-
const AnalyticsGetChannelStats200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
const AnalyticsGetChannelStats200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
11
|
+
email: Schema.Struct({
|
|
12
|
+
sent: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
13
|
+
deliveryRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
14
|
+
uniqueOpenedMessages: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
15
|
+
openTrackingEligibleDeliveredMessages: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
16
|
+
uniqueMessageOpenRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
17
|
+
uniqueClickedMessages: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
18
|
+
clickTrackingEligibleDeliveredMessages: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
19
|
+
uniqueMessageClickRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
20
|
+
bounceRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
21
|
+
}),
|
|
22
|
+
whatsapp: Schema.Struct({
|
|
23
|
+
sent: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
24
|
+
deliveryRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
25
|
+
readRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
26
|
+
failureRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
27
|
+
avgResponseTime: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" }))
|
|
28
|
+
}),
|
|
29
|
+
sms: Schema.Struct({
|
|
30
|
+
sent: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
31
|
+
deliveryRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
32
|
+
failureRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
33
|
+
totalSegments: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
34
|
+
})
|
|
35
|
+
}))();
|
|
36
|
+
const AnalyticsGetChannelStats400 = /* @__PURE__ */ (() => Schema.Union([AnalyticsQueryError, MalformedRequestError]))();
|
|
22
37
|
const AnalyticsGetChannelStats401 = UnauthorizedError;
|
|
23
38
|
const AnalyticsGetChannelStats403 = ForbiddenError;
|
|
24
39
|
const AnalyticsGetChannelStats422 = ValidationError;
|
|
25
40
|
const AnalyticsGetChannelStats500 = InternalError;
|
|
26
41
|
const AnalyticsGetChannelStats504 = GatewayTimeoutError;
|
|
27
42
|
const AnalyticsGetDeliveryMetricsQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
28
|
-
after: Schema.optionalKey(
|
|
29
|
-
before: Schema.optionalKey(
|
|
30
|
-
channel: Schema.optionalKey(Schema.Union([
|
|
43
|
+
after: Schema.optionalKey(AbsoluteInstant),
|
|
44
|
+
before: Schema.optionalKey(AbsoluteInstant),
|
|
45
|
+
channel: Schema.optionalKey(Schema.Union([
|
|
46
|
+
Schema.Literal("sms"),
|
|
47
|
+
Schema.Literal("whatsapp"),
|
|
48
|
+
Schema.Literal("email")
|
|
49
|
+
]))
|
|
31
50
|
}))();
|
|
32
51
|
const AnalyticsGetDeliveryMetrics200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
33
52
|
deliveredRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
@@ -35,7 +54,7 @@ const AnalyticsGetDeliveryMetrics200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
35
54
|
pendingRate: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" })),
|
|
36
55
|
avgDeliveryTimeMs: Schema.Finite.check(Schema.isFinite().annotate({ expected: "a finite number" }))
|
|
37
56
|
}))();
|
|
38
|
-
const AnalyticsGetDeliveryMetrics400 = AnalyticsQueryError;
|
|
57
|
+
const AnalyticsGetDeliveryMetrics400 = /* @__PURE__ */ (() => Schema.Union([AnalyticsQueryError, MalformedRequestError]))();
|
|
39
58
|
const AnalyticsGetDeliveryMetrics401 = UnauthorizedError;
|
|
40
59
|
const AnalyticsGetDeliveryMetrics403 = ForbiddenError;
|
|
41
60
|
const AnalyticsGetDeliveryMetrics422 = ValidationError;
|
|
@@ -45,62 +64,72 @@ const AnalyticsExportDataRequestJson = /* @__PURE__ */ (() => Schema.Struct({
|
|
|
45
64
|
after: AbsoluteInstant,
|
|
46
65
|
before: AbsoluteInstant,
|
|
47
66
|
format: Schema.optionalKey(Schema.Union([Schema.Union([Schema.Literal("csv"), Schema.Literal("json")]), Schema.Null])),
|
|
48
|
-
includeChannels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.
|
|
67
|
+
includeChannels: Schema.optionalKey(Schema.Union([Schema.Array(Schema.Union([
|
|
68
|
+
Schema.Literal("sms"),
|
|
69
|
+
Schema.Literal("whatsapp"),
|
|
70
|
+
Schema.Literal("email")
|
|
71
|
+
])), Schema.Null]))
|
|
49
72
|
}))();
|
|
50
73
|
const AnalyticsExportData200 = /* @__PURE__ */ (() => Schema.Struct({
|
|
51
74
|
content: Schema.String,
|
|
52
75
|
mimeType: Schema.String,
|
|
53
76
|
filename: Schema.String
|
|
54
77
|
}))();
|
|
55
|
-
const AnalyticsExportData400 = AnalyticsQueryError;
|
|
78
|
+
const AnalyticsExportData400 = /* @__PURE__ */ (() => Schema.Union([AnalyticsQueryError, MalformedRequestError]))();
|
|
56
79
|
const AnalyticsExportData401 = UnauthorizedError;
|
|
57
80
|
const AnalyticsExportData403 = ForbiddenError;
|
|
58
81
|
const AnalyticsExportData422 = ValidationError;
|
|
59
82
|
const AnalyticsExportData500 = InternalError;
|
|
60
83
|
const AnalyticsExportData504 = GatewayTimeoutError;
|
|
61
84
|
const AnalyticsGetHourlyDistributionQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
62
|
-
after: Schema.optionalKey(
|
|
63
|
-
before: Schema.optionalKey(
|
|
85
|
+
after: Schema.optionalKey(AbsoluteInstant),
|
|
86
|
+
before: Schema.optionalKey(AbsoluteInstant)
|
|
64
87
|
}))();
|
|
65
88
|
const AnalyticsGetHourlyDistribution200 = /* @__PURE__ */ (() => Schema.Array(Schema.Struct({
|
|
66
89
|
hour: Schema.String,
|
|
67
90
|
count: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
68
91
|
})))();
|
|
69
|
-
const AnalyticsGetHourlyDistribution400 = AnalyticsQueryError;
|
|
92
|
+
const AnalyticsGetHourlyDistribution400 = /* @__PURE__ */ (() => Schema.Union([AnalyticsQueryError, MalformedRequestError]))();
|
|
70
93
|
const AnalyticsGetHourlyDistribution401 = UnauthorizedError;
|
|
71
94
|
const AnalyticsGetHourlyDistribution403 = ForbiddenError;
|
|
72
95
|
const AnalyticsGetHourlyDistribution422 = ValidationError;
|
|
73
96
|
const AnalyticsGetHourlyDistribution500 = InternalError;
|
|
74
97
|
const AnalyticsGetHourlyDistribution504 = GatewayTimeoutError;
|
|
75
98
|
const AnalyticsGetStatsQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
76
|
-
after: Schema.optionalKey(
|
|
77
|
-
before: Schema.optionalKey(
|
|
78
|
-
groupBy: Schema.optionalKey(Schema.Union([
|
|
99
|
+
after: Schema.optionalKey(AbsoluteInstant),
|
|
100
|
+
before: Schema.optionalKey(AbsoluteInstant),
|
|
101
|
+
groupBy: Schema.optionalKey(Schema.Union([
|
|
79
102
|
Schema.Literal("day"),
|
|
80
103
|
Schema.Literal("week"),
|
|
81
104
|
Schema.Literal("month")
|
|
82
|
-
])
|
|
83
|
-
channel: Schema.optionalKey(Schema.Union([
|
|
105
|
+
])),
|
|
106
|
+
channel: Schema.optionalKey(Schema.Union([
|
|
107
|
+
Schema.Literal("sms"),
|
|
108
|
+
Schema.Literal("whatsapp"),
|
|
109
|
+
Schema.Literal("email")
|
|
110
|
+
]))
|
|
84
111
|
}))();
|
|
85
112
|
const AnalyticsGetStats200 = /* @__PURE__ */ (() => Schema.Struct({ volumeHistory: Schema.Array(Schema.Struct({
|
|
86
113
|
date: Schema.String,
|
|
87
|
-
email: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
114
|
+
email: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
115
|
+
whatsapp: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" })),
|
|
116
|
+
sms: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
88
117
|
})) }))();
|
|
89
|
-
const AnalyticsGetStats400 = AnalyticsQueryError;
|
|
118
|
+
const AnalyticsGetStats400 = /* @__PURE__ */ (() => Schema.Union([AnalyticsQueryError, MalformedRequestError]))();
|
|
90
119
|
const AnalyticsGetStats401 = UnauthorizedError;
|
|
91
120
|
const AnalyticsGetStats403 = ForbiddenError;
|
|
92
121
|
const AnalyticsGetStats422 = ValidationError;
|
|
93
122
|
const AnalyticsGetStats500 = InternalError;
|
|
94
123
|
const AnalyticsGetStats504 = GatewayTimeoutError;
|
|
95
124
|
const AnalyticsGetTopContactsQuery = /* @__PURE__ */ (() => Schema.Struct({
|
|
96
|
-
after: Schema.optionalKey(
|
|
97
|
-
before: Schema.optionalKey(
|
|
125
|
+
after: Schema.optionalKey(AbsoluteInstant),
|
|
126
|
+
before: Schema.optionalKey(AbsoluteInstant),
|
|
98
127
|
limit: Schema.optionalKey(Schema.Union([Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isLessThanOrEqualTo(100).annotate({ expected: "a value less than or equal to 100" })).check(Schema.isGreaterThan(0).annotate({ expected: "a value greater than 0" })), Schema.Null])),
|
|
99
|
-
sortBy: Schema.optionalKey(Schema.Union([
|
|
128
|
+
sortBy: Schema.optionalKey(Schema.Union([
|
|
100
129
|
Schema.Literal("sent"),
|
|
101
130
|
Schema.Literal("received"),
|
|
102
131
|
Schema.Literal("total")
|
|
103
|
-
])
|
|
132
|
+
]))
|
|
104
133
|
}))();
|
|
105
134
|
const AnalyticsGetTopContacts200 = /* @__PURE__ */ (() => Schema.Array(Schema.Struct({
|
|
106
135
|
id: Schema.String,
|
|
@@ -109,7 +138,7 @@ const AnalyticsGetTopContacts200 = /* @__PURE__ */ (() => Schema.Array(Schema.St
|
|
|
109
138
|
phone: Schema.Union([Schema.String, Schema.Null]),
|
|
110
139
|
messageCount: Schema.Finite.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })).check(Schema.isLessThanOrEqualTo(9007199254740991).annotate({ expected: "a value less than or equal to 9007199254740991" }))
|
|
111
140
|
})))();
|
|
112
|
-
const AnalyticsGetTopContacts400 = AnalyticsQueryError;
|
|
141
|
+
const AnalyticsGetTopContacts400 = /* @__PURE__ */ (() => Schema.Union([AnalyticsQueryError, MalformedRequestError]))();
|
|
113
142
|
const AnalyticsGetTopContacts401 = UnauthorizedError;
|
|
114
143
|
const AnalyticsGetTopContacts403 = ForbiddenError;
|
|
115
144
|
const AnalyticsGetTopContacts422 = ValidationError;
|