@parsrun/types 0.1.28 → 0.1.30
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/dist/index.d.ts +603 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -69,7 +69,12 @@ declare const cursorPaginationMeta: arktype_internal_variants_object_ts.ObjectTy
|
|
|
69
69
|
nextCursor?: string;
|
|
70
70
|
prevCursor?: string;
|
|
71
71
|
}, {}>;
|
|
72
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Creates a success response schema wrapper for any data type.
|
|
74
|
+
* @template T - The data schema type
|
|
75
|
+
* @param dataSchema - The ArkType schema for the response data
|
|
76
|
+
* @returns An ArkType schema for a success response containing the data
|
|
77
|
+
*/
|
|
73
78
|
declare const successResponse: <T>(dataSchema: T) => arktype_internal_variants_object_ts.ObjectType<{
|
|
74
79
|
success: "true";
|
|
75
80
|
data: never;
|
|
@@ -85,7 +90,12 @@ declare const errorResponse: arktype_internal_variants_object_ts.ObjectType<{
|
|
|
85
90
|
};
|
|
86
91
|
message?: string;
|
|
87
92
|
}, {}>;
|
|
88
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* Creates a paginated response schema wrapper for offset-based pagination.
|
|
95
|
+
* @template T - The data schema type (typically an array schema)
|
|
96
|
+
* @param dataSchema - The ArkType schema for the paginated data array
|
|
97
|
+
* @returns An ArkType schema for a paginated response with pagination metadata
|
|
98
|
+
*/
|
|
89
99
|
declare const paginatedResponse: <T>(dataSchema: T) => arktype_internal_variants_object_ts.ObjectType<{
|
|
90
100
|
success: boolean;
|
|
91
101
|
data: never;
|
|
@@ -99,7 +109,12 @@ declare const paginatedResponse: <T>(dataSchema: T) => arktype_internal_variants
|
|
|
99
109
|
};
|
|
100
110
|
message?: string;
|
|
101
111
|
}, {}>;
|
|
102
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* Creates a cursor-paginated response schema wrapper for cursor-based pagination.
|
|
114
|
+
* @template T - The data schema type (typically an array schema)
|
|
115
|
+
* @param dataSchema - The ArkType schema for the paginated data array
|
|
116
|
+
* @returns An ArkType schema for a cursor-paginated response with cursor metadata
|
|
117
|
+
*/
|
|
103
118
|
declare const cursorPaginatedResponse: <T>(dataSchema: T) => arktype_internal_variants_object_ts.ObjectType<{
|
|
104
119
|
success: boolean;
|
|
105
120
|
data: never;
|
|
@@ -126,37 +141,85 @@ declare const validationErrorDetail: arktype_internal_variants_object_ts.ObjectT
|
|
|
126
141
|
expected?: string;
|
|
127
142
|
received?: unknown;
|
|
128
143
|
}, {}>;
|
|
129
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* UUID v4 string type.
|
|
146
|
+
* Represents a universally unique identifier in the standard UUID v4 format.
|
|
147
|
+
*/
|
|
130
148
|
type UUID = typeof uuid.infer;
|
|
131
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* ISO 8601 timestamp string type.
|
|
151
|
+
* Represents a date-time value in ISO 8601 format (e.g., "2024-01-15T10:30:00Z").
|
|
152
|
+
*/
|
|
132
153
|
type Timestamp = typeof timestamp.infer;
|
|
133
|
-
/**
|
|
154
|
+
/**
|
|
155
|
+
* Valid email address string type.
|
|
156
|
+
* Represents a properly formatted email address.
|
|
157
|
+
*/
|
|
134
158
|
type Email = typeof email.infer;
|
|
135
|
-
/**
|
|
159
|
+
/**
|
|
160
|
+
* Valid URL string type.
|
|
161
|
+
* Represents a properly formatted URL.
|
|
162
|
+
*/
|
|
136
163
|
type Url = typeof url.infer;
|
|
137
|
-
/**
|
|
164
|
+
/**
|
|
165
|
+
* Non-empty string type (length >= 1).
|
|
166
|
+
* Ensures the string contains at least one character.
|
|
167
|
+
*/
|
|
138
168
|
type NonEmptyString = typeof nonEmptyString.infer;
|
|
139
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Positive integer type (> 0).
|
|
171
|
+
* Represents whole numbers greater than zero.
|
|
172
|
+
*/
|
|
140
173
|
type PositiveInt = typeof positiveInt.infer;
|
|
141
|
-
/**
|
|
174
|
+
/**
|
|
175
|
+
* Non-negative integer type (>= 0).
|
|
176
|
+
* Represents whole numbers that are zero or greater.
|
|
177
|
+
*/
|
|
142
178
|
type NonNegativeInt = typeof nonNegativeInt.infer;
|
|
143
|
-
/**
|
|
179
|
+
/**
|
|
180
|
+
* Entity status type.
|
|
181
|
+
* Common lifecycle states for entities: 'active' | 'inactive' | 'suspended' | 'deleted'.
|
|
182
|
+
*/
|
|
144
183
|
type Status = typeof status.infer;
|
|
145
|
-
/**
|
|
184
|
+
/**
|
|
185
|
+
* Session status type.
|
|
186
|
+
* Represents the current state of a user session: 'active' | 'expired' | 'revoked'.
|
|
187
|
+
*/
|
|
146
188
|
type SessionStatus = typeof sessionStatus.infer;
|
|
147
|
-
/**
|
|
189
|
+
/**
|
|
190
|
+
* Pagination request parameters type.
|
|
191
|
+
* Contains page number, limit, and optional ordering for offset-based pagination.
|
|
192
|
+
*/
|
|
148
193
|
type Pagination = typeof pagination.infer;
|
|
149
|
-
/**
|
|
194
|
+
/**
|
|
195
|
+
* Pagination metadata type for responses.
|
|
196
|
+
* Contains page info, totals, and navigation flags for offset-based pagination.
|
|
197
|
+
*/
|
|
150
198
|
type PaginationMeta = typeof paginationMeta.infer;
|
|
151
|
-
/**
|
|
199
|
+
/**
|
|
200
|
+
* Cursor-based pagination request type.
|
|
201
|
+
* Contains cursor, limit, and direction for cursor-based pagination.
|
|
202
|
+
*/
|
|
152
203
|
type CursorPagination = typeof cursorPagination.infer;
|
|
153
|
-
/**
|
|
204
|
+
/**
|
|
205
|
+
* Cursor-based pagination metadata type.
|
|
206
|
+
* Contains current/next/prev cursors and hasMore flag for cursor-based pagination.
|
|
207
|
+
*/
|
|
154
208
|
type CursorPaginationMeta = typeof cursorPaginationMeta.infer;
|
|
155
|
-
/**
|
|
209
|
+
/**
|
|
210
|
+
* Standard error response structure type.
|
|
211
|
+
* Contains success flag, error object with code/message/details, and optional message.
|
|
212
|
+
*/
|
|
156
213
|
type ErrorResponse = typeof errorResponse.infer;
|
|
157
|
-
/**
|
|
214
|
+
/**
|
|
215
|
+
* Pars framework error structure type.
|
|
216
|
+
* Contains message, HTTP status code, optional error code, and optional details.
|
|
217
|
+
*/
|
|
158
218
|
type ParsError = typeof parsError.infer;
|
|
159
|
-
/**
|
|
219
|
+
/**
|
|
220
|
+
* Validation error detail type.
|
|
221
|
+
* Contains the field path, error message, and optional expected/received values.
|
|
222
|
+
*/
|
|
160
223
|
type ValidationErrorDetail = typeof validationErrorDetail.infer;
|
|
161
224
|
/** Generic API response wrapper */
|
|
162
225
|
interface ApiResponse<T = unknown> {
|
|
@@ -592,6 +655,7 @@ declare const verifyEmailRequest: arktype_internal_variants_object_ts.ObjectType
|
|
|
592
655
|
declare const checkVerificationStatusRequest: arktype_internal_variants_object_ts.ObjectType<{
|
|
593
656
|
email: string;
|
|
594
657
|
}, {}>;
|
|
658
|
+
/** Check verification status response */
|
|
595
659
|
declare const checkVerificationStatusResponse: arktype_internal_variants_object_ts.ObjectType<{
|
|
596
660
|
success: boolean;
|
|
597
661
|
verified: boolean;
|
|
@@ -1006,52 +1070,240 @@ declare const parsAuthConfig: arktype_internal_variants_object_ts.ObjectType<{
|
|
|
1006
1070
|
};
|
|
1007
1071
|
callbacks?: object;
|
|
1008
1072
|
}, {}>;
|
|
1073
|
+
/**
|
|
1074
|
+
* User entity type.
|
|
1075
|
+
* Represents a user account with display name, 2FA settings, and status.
|
|
1076
|
+
*/
|
|
1009
1077
|
type User = typeof user.infer;
|
|
1078
|
+
/**
|
|
1079
|
+
* Authentication method type.
|
|
1080
|
+
* Represents how a user authenticates (email, phone, OAuth providers).
|
|
1081
|
+
*/
|
|
1010
1082
|
type AuthMethod = typeof authMethod.infer;
|
|
1083
|
+
/**
|
|
1084
|
+
* Session entity type.
|
|
1085
|
+
* Represents an active user session with tokens, device info, and expiry.
|
|
1086
|
+
*/
|
|
1011
1087
|
type Session = typeof session.infer;
|
|
1088
|
+
/**
|
|
1089
|
+
* Tenant membership type.
|
|
1090
|
+
* Represents a user's membership and role within a specific tenant.
|
|
1091
|
+
*/
|
|
1012
1092
|
type TenantMembership = typeof tenantMembership.infer;
|
|
1093
|
+
/**
|
|
1094
|
+
* Request OTP request type.
|
|
1095
|
+
* Contains email or phone number for OTP delivery.
|
|
1096
|
+
*/
|
|
1013
1097
|
type RequestOTPRequest = typeof requestOTPRequest.infer;
|
|
1098
|
+
/**
|
|
1099
|
+
* Request OTP response type.
|
|
1100
|
+
* Contains success status, expiry, and optional tenant selection info.
|
|
1101
|
+
*/
|
|
1014
1102
|
type RequestOTPResponse = typeof requestOTPResponse.infer;
|
|
1103
|
+
/**
|
|
1104
|
+
* Verify OTP request type.
|
|
1105
|
+
* Contains email/phone, OTP code, and optional tenant ID.
|
|
1106
|
+
*/
|
|
1015
1107
|
type VerifyOTPRequest = typeof verifyOTPRequest.infer;
|
|
1108
|
+
/**
|
|
1109
|
+
* Resend OTP request type.
|
|
1110
|
+
* Contains email or phone number to resend OTP to.
|
|
1111
|
+
*/
|
|
1016
1112
|
type ResendOTPRequest = typeof resendOTPRequest.infer;
|
|
1113
|
+
/**
|
|
1114
|
+
* Login response data type.
|
|
1115
|
+
* Contains user, session tokens, auth method, and membership info.
|
|
1116
|
+
*/
|
|
1017
1117
|
type LoginResponseData = typeof loginResponseData.infer;
|
|
1118
|
+
/**
|
|
1119
|
+
* Login response type.
|
|
1120
|
+
* Wrapper containing success status and login response data.
|
|
1121
|
+
*/
|
|
1018
1122
|
type LoginResponse = typeof loginResponse.infer;
|
|
1123
|
+
/**
|
|
1124
|
+
* Current user response data type.
|
|
1125
|
+
* Contains user details, auth method, memberships, roles, and permissions.
|
|
1126
|
+
*/
|
|
1019
1127
|
type CurrentUserResponseData = typeof currentUserResponseData.infer;
|
|
1128
|
+
/**
|
|
1129
|
+
* Current user response type.
|
|
1130
|
+
* Wrapper containing success status and current user data.
|
|
1131
|
+
*/
|
|
1020
1132
|
type CurrentUserResponse = typeof currentUserResponse.infer;
|
|
1133
|
+
/**
|
|
1134
|
+
* Refresh token request type.
|
|
1135
|
+
* Contains the refresh token for obtaining new access tokens.
|
|
1136
|
+
*/
|
|
1021
1137
|
type RefreshTokenRequest = typeof refreshTokenRequest.infer;
|
|
1138
|
+
/**
|
|
1139
|
+
* Token info type for client storage.
|
|
1140
|
+
* Contains access token, optional refresh token, expiry, and CSRF token.
|
|
1141
|
+
*/
|
|
1022
1142
|
type TokenInfo = typeof tokenInfo.infer;
|
|
1143
|
+
/**
|
|
1144
|
+
* JWT payload type.
|
|
1145
|
+
* Contains subject (user ID), tenant ID, session ID, roles, permissions, and timing claims.
|
|
1146
|
+
*/
|
|
1023
1147
|
type JwtPayload = typeof jwtPayload.infer;
|
|
1148
|
+
/**
|
|
1149
|
+
* Permission entity type.
|
|
1150
|
+
* Defines an action that can be performed on a resource within a scope.
|
|
1151
|
+
*/
|
|
1024
1152
|
type Permission = typeof permission.infer;
|
|
1153
|
+
/**
|
|
1154
|
+
* Role entity type.
|
|
1155
|
+
* Groups permissions together for assignment to users within a tenant.
|
|
1156
|
+
*/
|
|
1025
1157
|
type Role = typeof role.infer;
|
|
1158
|
+
/**
|
|
1159
|
+
* Permission check request type.
|
|
1160
|
+
* Used to verify if a user has permission for a specific resource/action.
|
|
1161
|
+
*/
|
|
1026
1162
|
type PermissionCheck = typeof permissionCheck.infer;
|
|
1163
|
+
/**
|
|
1164
|
+
* Logout request type.
|
|
1165
|
+
* Contains refresh token and flag for logging out all devices.
|
|
1166
|
+
*/
|
|
1027
1167
|
type LogoutRequest = typeof logoutRequest.infer;
|
|
1168
|
+
/**
|
|
1169
|
+
* Revoke session request type.
|
|
1170
|
+
* Contains optional reason for session revocation.
|
|
1171
|
+
*/
|
|
1028
1172
|
type RevokeSessionRequest = typeof revokeSessionRequest.infer;
|
|
1173
|
+
/**
|
|
1174
|
+
* Revoke all sessions request type.
|
|
1175
|
+
* Contains reason and option to exclude the current session.
|
|
1176
|
+
*/
|
|
1029
1177
|
type RevokeAllSessionsRequest = typeof revokeAllSessionsRequest.infer;
|
|
1178
|
+
/**
|
|
1179
|
+
* Revoke all sessions response type.
|
|
1180
|
+
* Contains success status, message, and count of revoked sessions.
|
|
1181
|
+
*/
|
|
1030
1182
|
type RevokeAllSessionsResponse = typeof revokeAllSessionsResponse.infer;
|
|
1183
|
+
/**
|
|
1184
|
+
* Send verification email request type.
|
|
1185
|
+
* Contains the email address to send verification to.
|
|
1186
|
+
*/
|
|
1031
1187
|
type SendVerificationEmailRequest = typeof sendVerificationEmailRequest.infer;
|
|
1188
|
+
/**
|
|
1189
|
+
* Verify email request type.
|
|
1190
|
+
* Contains the verification token from the email link.
|
|
1191
|
+
*/
|
|
1032
1192
|
type VerifyEmailRequest = typeof verifyEmailRequest.infer;
|
|
1193
|
+
/**
|
|
1194
|
+
* Check verification status request type.
|
|
1195
|
+
* Contains email address to check verification status for.
|
|
1196
|
+
*/
|
|
1033
1197
|
type CheckVerificationStatusRequest = typeof checkVerificationStatusRequest.infer;
|
|
1198
|
+
/**
|
|
1199
|
+
* Check verification status response type.
|
|
1200
|
+
* Contains verification status and optional timing information.
|
|
1201
|
+
*/
|
|
1034
1202
|
type CheckVerificationStatusResponse = typeof checkVerificationStatusResponse.infer;
|
|
1203
|
+
/**
|
|
1204
|
+
* CSRF token request type.
|
|
1205
|
+
* Contains the CSRF token for validation.
|
|
1206
|
+
*/
|
|
1035
1207
|
type CSRFTokenRequest = typeof csrfTokenRequest.infer;
|
|
1208
|
+
/**
|
|
1209
|
+
* Session configuration type.
|
|
1210
|
+
* Controls token expiry, sliding window, max sessions, and invalidation rules.
|
|
1211
|
+
*/
|
|
1036
1212
|
type SessionConfig = typeof sessionConfig.infer;
|
|
1213
|
+
/**
|
|
1214
|
+
* JWT configuration type.
|
|
1215
|
+
* Controls algorithm, issuer, and audience for JWT tokens.
|
|
1216
|
+
*/
|
|
1037
1217
|
type JwtConfig = typeof jwtConfig.infer;
|
|
1218
|
+
/**
|
|
1219
|
+
* Cookie configuration type.
|
|
1220
|
+
* Controls cookie naming, domain, path, and security settings.
|
|
1221
|
+
*/
|
|
1038
1222
|
type CookieConfig = typeof cookieConfig.infer;
|
|
1223
|
+
/**
|
|
1224
|
+
* CSRF configuration type.
|
|
1225
|
+
* Controls CSRF protection settings including header and cookie names.
|
|
1226
|
+
*/
|
|
1039
1227
|
type CsrfConfig = typeof csrfConfig.infer;
|
|
1228
|
+
/**
|
|
1229
|
+
* Rate limit configuration type.
|
|
1230
|
+
* Controls login attempt limits and window size.
|
|
1231
|
+
*/
|
|
1040
1232
|
type RateLimitConfig = typeof rateLimitConfig.infer;
|
|
1233
|
+
/**
|
|
1234
|
+
* Lockout configuration type.
|
|
1235
|
+
* Controls account lockout after failed attempts.
|
|
1236
|
+
*/
|
|
1041
1237
|
type LockoutConfig = typeof lockoutConfig.infer;
|
|
1238
|
+
/**
|
|
1239
|
+
* Security configuration type.
|
|
1240
|
+
* Groups rate limit, lockout, and CSRF settings.
|
|
1241
|
+
*/
|
|
1042
1242
|
type SecurityConfig = typeof securityConfig.infer;
|
|
1243
|
+
/**
|
|
1244
|
+
* Tenant configuration type.
|
|
1245
|
+
* Controls multi-tenancy strategy and resolution method.
|
|
1246
|
+
*/
|
|
1043
1247
|
type TenantConfig = typeof tenantConfig.infer;
|
|
1248
|
+
/**
|
|
1249
|
+
* OAuth provider configuration type.
|
|
1250
|
+
* Contains client credentials and callback URL for an OAuth provider.
|
|
1251
|
+
*/
|
|
1044
1252
|
type OAuthProviderConfig = typeof oauthProviderConfig.infer;
|
|
1253
|
+
/**
|
|
1254
|
+
* OTP email configuration type.
|
|
1255
|
+
* Controls email OTP settings including expiry, length, and rate limits.
|
|
1256
|
+
*/
|
|
1045
1257
|
type OtpEmailConfig = typeof otpEmailConfig.infer;
|
|
1258
|
+
/**
|
|
1259
|
+
* OTP SMS configuration type.
|
|
1260
|
+
* Controls SMS OTP settings including expiry, length, and rate limits.
|
|
1261
|
+
*/
|
|
1046
1262
|
type OtpSmsConfig = typeof otpSmsConfig.infer;
|
|
1263
|
+
/**
|
|
1264
|
+
* OTP configuration type.
|
|
1265
|
+
* Groups email and SMS OTP settings.
|
|
1266
|
+
*/
|
|
1047
1267
|
type OtpConfig = typeof otpConfig.infer;
|
|
1268
|
+
/**
|
|
1269
|
+
* Magic link configuration type.
|
|
1270
|
+
* Controls magic link expiry and send function.
|
|
1271
|
+
*/
|
|
1048
1272
|
type MagicLinkConfig = typeof magicLinkConfig.infer;
|
|
1273
|
+
/**
|
|
1274
|
+
* TOTP configuration type.
|
|
1275
|
+
* Controls time-based OTP settings for 2FA including issuer and backup codes.
|
|
1276
|
+
*/
|
|
1049
1277
|
type TotpConfig = typeof totpConfig.infer;
|
|
1278
|
+
/**
|
|
1279
|
+
* WebAuthn configuration type.
|
|
1280
|
+
* Controls WebAuthn/FIDO2 settings including relying party info.
|
|
1281
|
+
*/
|
|
1050
1282
|
type WebAuthnConfig = typeof webauthnConfig.infer;
|
|
1283
|
+
/**
|
|
1284
|
+
* Password configuration type.
|
|
1285
|
+
* Controls password requirements including length and character requirements.
|
|
1286
|
+
*/
|
|
1051
1287
|
type PasswordConfig = typeof passwordConfig.infer;
|
|
1288
|
+
/**
|
|
1289
|
+
* OAuth providers configuration type.
|
|
1290
|
+
* Maps OAuth provider names to their configurations.
|
|
1291
|
+
*/
|
|
1052
1292
|
type OAuthProvidersConfig = typeof oauthProvidersConfig.infer;
|
|
1293
|
+
/**
|
|
1294
|
+
* Auth providers configuration type.
|
|
1295
|
+
* Groups all authentication provider settings.
|
|
1296
|
+
*/
|
|
1053
1297
|
type ProvidersConfig = typeof providersConfig.infer;
|
|
1298
|
+
/**
|
|
1299
|
+
* Auth storage configuration type.
|
|
1300
|
+
* Controls session/token storage backend selection.
|
|
1301
|
+
*/
|
|
1054
1302
|
type StorageConfig = typeof storageConfig.infer;
|
|
1303
|
+
/**
|
|
1304
|
+
* Main Pars auth configuration type.
|
|
1305
|
+
* Complete configuration object for the Pars authentication system.
|
|
1306
|
+
*/
|
|
1055
1307
|
type ParsAuthConfig = typeof parsAuthConfig.infer;
|
|
1056
1308
|
|
|
1057
1309
|
/**
|
|
@@ -1130,11 +1382,35 @@ declare const tenantMemberListQuery: arktype_internal_variants_object_ts.ObjectT
|
|
|
1130
1382
|
declare const switchTenantRequest: arktype_internal_variants_object_ts.ObjectType<{
|
|
1131
1383
|
tenantId: string;
|
|
1132
1384
|
}, {}>;
|
|
1385
|
+
/**
|
|
1386
|
+
* Tenant entity type.
|
|
1387
|
+
* Represents an organization/workspace with branding, settings, and localization.
|
|
1388
|
+
*/
|
|
1133
1389
|
type Tenant = typeof tenant.infer;
|
|
1390
|
+
/**
|
|
1391
|
+
* Create tenant request type.
|
|
1392
|
+
* Contains required name and optional branding/localization settings.
|
|
1393
|
+
*/
|
|
1134
1394
|
type CreateTenantRequest = typeof createTenantRequest.infer;
|
|
1395
|
+
/**
|
|
1396
|
+
* Update tenant request type.
|
|
1397
|
+
* Contains optional fields for updating tenant properties.
|
|
1398
|
+
*/
|
|
1135
1399
|
type UpdateTenantRequest = typeof updateTenantRequest.infer;
|
|
1400
|
+
/**
|
|
1401
|
+
* Invite tenant member request type.
|
|
1402
|
+
* Contains email, role, access level, and optional expiry for invitations.
|
|
1403
|
+
*/
|
|
1136
1404
|
type InviteTenantMemberRequest = typeof inviteTenantMemberRequest.infer;
|
|
1405
|
+
/**
|
|
1406
|
+
* Tenant member list query type.
|
|
1407
|
+
* Contains pagination, filtering, and search options for listing members.
|
|
1408
|
+
*/
|
|
1137
1409
|
type TenantMemberListQuery = typeof tenantMemberListQuery.infer;
|
|
1410
|
+
/**
|
|
1411
|
+
* Switch tenant request type.
|
|
1412
|
+
* Contains the target tenant ID for switching the user's active tenant.
|
|
1413
|
+
*/
|
|
1138
1414
|
type SwitchTenantRequest = typeof switchTenantRequest.infer;
|
|
1139
1415
|
|
|
1140
1416
|
/**
|
|
@@ -1286,17 +1562,65 @@ declare const emailConfig: arktype_internal_variants_object_ts.ObjectType<{
|
|
|
1286
1562
|
};
|
|
1287
1563
|
templates?: object;
|
|
1288
1564
|
}, {}>;
|
|
1565
|
+
/**
|
|
1566
|
+
* Email address type with optional display name.
|
|
1567
|
+
* Contains email and optional name for formatted addresses like "John Doe <john@example.com>".
|
|
1568
|
+
*/
|
|
1289
1569
|
type EmailAddress = typeof emailAddress.infer;
|
|
1570
|
+
/**
|
|
1571
|
+
* Email recipient type.
|
|
1572
|
+
* Accepts either a simple email string or an EmailAddress object.
|
|
1573
|
+
*/
|
|
1290
1574
|
type EmailRecipient = typeof emailRecipient.infer;
|
|
1575
|
+
/**
|
|
1576
|
+
* Email attachment type.
|
|
1577
|
+
* Contains filename, content, encoding, and disposition for email attachments.
|
|
1578
|
+
*/
|
|
1291
1579
|
type EmailAttachment = typeof emailAttachment.infer;
|
|
1580
|
+
/**
|
|
1581
|
+
* Send email options type.
|
|
1582
|
+
* Contains recipients, subject, body content (text/html), attachments, and metadata.
|
|
1583
|
+
*/
|
|
1292
1584
|
type SendEmailOptions = typeof sendEmailOptions.infer;
|
|
1585
|
+
/**
|
|
1586
|
+
* Send template email options type.
|
|
1587
|
+
* Contains recipients, template name, template data, and attachments.
|
|
1588
|
+
*/
|
|
1293
1589
|
type SendTemplateEmailOptions = typeof sendTemplateEmailOptions.infer;
|
|
1590
|
+
/**
|
|
1591
|
+
* Email send result type.
|
|
1592
|
+
* Contains success status, message ID, and lists of accepted/rejected/pending recipients.
|
|
1593
|
+
*/
|
|
1294
1594
|
type EmailSendResult = typeof emailSendResult.infer;
|
|
1595
|
+
/**
|
|
1596
|
+
* SMTP configuration type.
|
|
1597
|
+
* Contains host, port, authentication, and TLS settings for SMTP servers.
|
|
1598
|
+
*/
|
|
1295
1599
|
type SmtpConfig = typeof smtpConfig.infer;
|
|
1600
|
+
/**
|
|
1601
|
+
* Resend configuration type.
|
|
1602
|
+
* Contains API key and optional domain for the Resend email service.
|
|
1603
|
+
*/
|
|
1296
1604
|
type ResendConfig = typeof resendConfig.infer;
|
|
1605
|
+
/**
|
|
1606
|
+
* SendGrid configuration type.
|
|
1607
|
+
* Contains API key for the SendGrid email service.
|
|
1608
|
+
*/
|
|
1297
1609
|
type SendgridConfig = typeof sendgridConfig.infer;
|
|
1610
|
+
/**
|
|
1611
|
+
* AWS SES configuration type.
|
|
1612
|
+
* Contains region and optional credentials for Amazon Simple Email Service.
|
|
1613
|
+
*/
|
|
1298
1614
|
type SesConfig = typeof sesConfig.infer;
|
|
1615
|
+
/**
|
|
1616
|
+
* Postmark configuration type.
|
|
1617
|
+
* Contains server token for the Postmark email service.
|
|
1618
|
+
*/
|
|
1299
1619
|
type PostmarkConfig = typeof postmarkConfig.infer;
|
|
1620
|
+
/**
|
|
1621
|
+
* Email configuration type.
|
|
1622
|
+
* Contains provider selection and provider-specific configuration.
|
|
1623
|
+
*/
|
|
1300
1624
|
type EmailConfig = typeof emailConfig.infer;
|
|
1301
1625
|
|
|
1302
1626
|
/**
|
|
@@ -1445,15 +1769,55 @@ declare const storageProviderConfig: arktype_internal_variants_object_ts.ObjectT
|
|
|
1445
1769
|
keyFilename?: string;
|
|
1446
1770
|
};
|
|
1447
1771
|
}, {}>;
|
|
1772
|
+
/**
|
|
1773
|
+
* File metadata type.
|
|
1774
|
+
* Contains file information including name, MIME type, size, path, and upload details.
|
|
1775
|
+
*/
|
|
1448
1776
|
type FileMetadata = typeof fileMetadata.infer;
|
|
1777
|
+
/**
|
|
1778
|
+
* Upload options type.
|
|
1779
|
+
* Contains optional path, filename, content type, ACL, and caching settings for uploads.
|
|
1780
|
+
*/
|
|
1449
1781
|
type UploadOptions = typeof uploadOptions.infer;
|
|
1782
|
+
/**
|
|
1783
|
+
* Signed URL options type.
|
|
1784
|
+
* Contains expiry, HTTP method, and content type settings for generating signed URLs.
|
|
1785
|
+
*/
|
|
1450
1786
|
type SignedUrlOptions = typeof signedUrlOptions.infer;
|
|
1787
|
+
/**
|
|
1788
|
+
* List files options type.
|
|
1789
|
+
* Contains prefix filter, pagination limit, cursor, and delimiter for file listing.
|
|
1790
|
+
*/
|
|
1451
1791
|
type ListFilesOptions = typeof listFilesOptions.infer;
|
|
1792
|
+
/**
|
|
1793
|
+
* List files result type.
|
|
1794
|
+
* Contains array of file metadata, pagination cursor, and hasMore flag.
|
|
1795
|
+
*/
|
|
1452
1796
|
type ListFilesResult = typeof listFilesResult.infer;
|
|
1797
|
+
/**
|
|
1798
|
+
* Local storage configuration type.
|
|
1799
|
+
* Contains base path, optional base URL, and file permissions for local file storage.
|
|
1800
|
+
*/
|
|
1453
1801
|
type LocalStorageConfig = typeof localStorageConfig.infer;
|
|
1802
|
+
/**
|
|
1803
|
+
* S3 storage configuration type.
|
|
1804
|
+
* Contains bucket, region, endpoint, credentials, and ACL settings for Amazon S3.
|
|
1805
|
+
*/
|
|
1454
1806
|
type S3StorageConfig = typeof s3StorageConfig.infer;
|
|
1807
|
+
/**
|
|
1808
|
+
* Cloudflare R2 storage configuration type.
|
|
1809
|
+
* Contains account ID, bucket, credentials, and optional public URL for R2.
|
|
1810
|
+
*/
|
|
1455
1811
|
type R2StorageConfig = typeof r2StorageConfig.infer;
|
|
1812
|
+
/**
|
|
1813
|
+
* Google Cloud Storage configuration type.
|
|
1814
|
+
* Contains bucket, project ID, and credentials for GCS.
|
|
1815
|
+
*/
|
|
1456
1816
|
type GcsStorageConfig = typeof gcsStorageConfig.infer;
|
|
1817
|
+
/**
|
|
1818
|
+
* Storage provider configuration type.
|
|
1819
|
+
* Contains provider selection and provider-specific configuration.
|
|
1820
|
+
*/
|
|
1457
1821
|
type StorageProviderConfig = typeof storageProviderConfig.infer;
|
|
1458
1822
|
|
|
1459
1823
|
/**
|
|
@@ -1623,15 +1987,55 @@ declare const queueConfig: arktype_internal_variants_object_ts.ObjectType<{
|
|
|
1623
1987
|
maxStalledCount?: number;
|
|
1624
1988
|
};
|
|
1625
1989
|
}, {}>;
|
|
1990
|
+
/**
|
|
1991
|
+
* Job status type.
|
|
1992
|
+
* Represents job lifecycle states: 'pending' | 'active' | 'completed' | 'failed' | 'delayed' | 'paused'.
|
|
1993
|
+
*/
|
|
1626
1994
|
type JobStatus = typeof jobStatus.infer;
|
|
1995
|
+
/**
|
|
1996
|
+
* Job entity type.
|
|
1997
|
+
* Represents a background job with data, status, attempts, priority, and timing information.
|
|
1998
|
+
*/
|
|
1627
1999
|
type Job = typeof job.infer;
|
|
2000
|
+
/**
|
|
2001
|
+
* Job options type.
|
|
2002
|
+
* Contains priority, delay, retry attempts, backoff strategy, timeout, and repeat settings.
|
|
2003
|
+
*/
|
|
1628
2004
|
type JobOptions = typeof jobOptions.infer;
|
|
2005
|
+
/**
|
|
2006
|
+
* Add job request type.
|
|
2007
|
+
* Contains job name, data payload, and optional job options.
|
|
2008
|
+
*/
|
|
1629
2009
|
type AddJobRequest = typeof addJobRequest.infer;
|
|
2010
|
+
/**
|
|
2011
|
+
* Job progress update type.
|
|
2012
|
+
* Contains progress percentage, optional message, and additional data.
|
|
2013
|
+
*/
|
|
1630
2014
|
type JobProgressUpdate = typeof jobProgressUpdate.infer;
|
|
2015
|
+
/**
|
|
2016
|
+
* Queue stats type.
|
|
2017
|
+
* Contains counts of jobs in each state and pause status for a queue.
|
|
2018
|
+
*/
|
|
1631
2019
|
type QueueStats = typeof queueStats.infer;
|
|
2020
|
+
/**
|
|
2021
|
+
* Queue list options type.
|
|
2022
|
+
* Contains status filter, pagination range, and sort order for listing jobs.
|
|
2023
|
+
*/
|
|
1632
2024
|
type QueueListOptions = typeof queueListOptions.infer;
|
|
2025
|
+
/**
|
|
2026
|
+
* Redis queue configuration type.
|
|
2027
|
+
* Contains Redis connection settings including host, port, password, and TLS.
|
|
2028
|
+
*/
|
|
1633
2029
|
type RedisQueueConfig = typeof redisQueueConfig.infer;
|
|
2030
|
+
/**
|
|
2031
|
+
* Worker options type.
|
|
2032
|
+
* Contains concurrency, rate limiting, lock settings, and stalled job handling.
|
|
2033
|
+
*/
|
|
1634
2034
|
type WorkerOptions = typeof workerOptions.infer;
|
|
2035
|
+
/**
|
|
2036
|
+
* Queue configuration type.
|
|
2037
|
+
* Contains provider selection, default job options, and provider-specific settings.
|
|
2038
|
+
*/
|
|
1635
2039
|
type QueueConfig = typeof queueConfig.infer;
|
|
1636
2040
|
|
|
1637
2041
|
/**
|
|
@@ -1757,14 +2161,50 @@ declare const cacheConfig: arktype_internal_variants_object_ts.ObjectType<{
|
|
|
1757
2161
|
readThrough?: boolean;
|
|
1758
2162
|
};
|
|
1759
2163
|
}, {}>;
|
|
2164
|
+
/**
|
|
2165
|
+
* Cache set options type.
|
|
2166
|
+
* Contains optional TTL, tags for invalidation, and metadata.
|
|
2167
|
+
*/
|
|
1760
2168
|
type CacheSetOptions = typeof cacheSetOptions.infer;
|
|
2169
|
+
/**
|
|
2170
|
+
* Cache get result type.
|
|
2171
|
+
* Contains the cached value, remaining TTL, creation time, and tags.
|
|
2172
|
+
*/
|
|
1761
2173
|
type CacheGetResult = typeof cacheGetResult.infer;
|
|
2174
|
+
/**
|
|
2175
|
+
* Cache stats type.
|
|
2176
|
+
* Contains hit/miss counts, total keys, and optional memory usage.
|
|
2177
|
+
*/
|
|
1762
2178
|
type CacheStats = typeof cacheStats.infer;
|
|
2179
|
+
/**
|
|
2180
|
+
* Memory cache configuration type.
|
|
2181
|
+
* Contains max size, default TTL, cleanup interval, and stale serving options.
|
|
2182
|
+
*/
|
|
1763
2183
|
type MemoryCacheConfig = typeof memoryCacheConfig.infer;
|
|
2184
|
+
/**
|
|
2185
|
+
* Redis cache configuration type.
|
|
2186
|
+
* Contains Redis connection settings, key prefix, and default TTL.
|
|
2187
|
+
*/
|
|
1764
2188
|
type RedisCacheConfig = typeof redisCacheConfig.infer;
|
|
2189
|
+
/**
|
|
2190
|
+
* Upstash cache configuration type.
|
|
2191
|
+
* Contains Upstash URL, token, key prefix, and default TTL.
|
|
2192
|
+
*/
|
|
1765
2193
|
type UpstashCacheConfig = typeof upstashCacheConfig.infer;
|
|
2194
|
+
/**
|
|
2195
|
+
* Cloudflare KV configuration type.
|
|
2196
|
+
* Contains namespace ID, account credentials, and key prefix.
|
|
2197
|
+
*/
|
|
1766
2198
|
type CloudflareKvConfig = typeof cloudflareKvConfig.infer;
|
|
2199
|
+
/**
|
|
2200
|
+
* Multi-tier cache configuration type.
|
|
2201
|
+
* Contains array of cache tiers with priorities and write-through/read-through settings.
|
|
2202
|
+
*/
|
|
1767
2203
|
type MultiTierCacheConfig = typeof multiTierCacheConfig.infer;
|
|
2204
|
+
/**
|
|
2205
|
+
* Cache configuration type.
|
|
2206
|
+
* Contains provider selection and provider-specific configuration.
|
|
2207
|
+
*/
|
|
1768
2208
|
type CacheConfig = typeof cacheConfig.infer;
|
|
1769
2209
|
|
|
1770
2210
|
/**
|
|
@@ -1988,28 +2428,120 @@ declare const paymentsConfig: arktype_internal_variants_object_ts.ObjectType<{
|
|
|
1988
2428
|
};
|
|
1989
2429
|
webhookPath?: string;
|
|
1990
2430
|
}, {}>;
|
|
2431
|
+
/**
|
|
2432
|
+
* ISO 4217 currency code type.
|
|
2433
|
+
* Represents a 3-letter currency code (e.g., "USD", "EUR", "GBP").
|
|
2434
|
+
*/
|
|
1991
2435
|
type CurrencyCode = typeof currencyCode.infer;
|
|
2436
|
+
/**
|
|
2437
|
+
* Money type with amount and currency.
|
|
2438
|
+
* Represents a monetary value with its currency code.
|
|
2439
|
+
*/
|
|
1992
2440
|
type Money = typeof money.infer;
|
|
2441
|
+
/**
|
|
2442
|
+
* Payment customer type.
|
|
2443
|
+
* Represents a customer in the payment system with email, name, and metadata.
|
|
2444
|
+
*/
|
|
1993
2445
|
type PaymentCustomer = typeof paymentCustomer.infer;
|
|
2446
|
+
/**
|
|
2447
|
+
* Create customer request type.
|
|
2448
|
+
* Contains email, optional name, phone, and metadata for creating customers.
|
|
2449
|
+
*/
|
|
1994
2450
|
type CreateCustomerRequest = typeof createCustomerRequest.infer;
|
|
2451
|
+
/**
|
|
2452
|
+
* Card details type.
|
|
2453
|
+
* Contains card brand, last 4 digits, expiration, and optional fingerprint.
|
|
2454
|
+
*/
|
|
1995
2455
|
type CardDetails = typeof cardDetails.infer;
|
|
2456
|
+
/**
|
|
2457
|
+
* Payment method type.
|
|
2458
|
+
* Represents a stored payment method (card, bank account, etc.) for a customer.
|
|
2459
|
+
*/
|
|
1996
2460
|
type PaymentMethod = typeof paymentMethod.infer;
|
|
2461
|
+
/**
|
|
2462
|
+
* Payment intent status type.
|
|
2463
|
+
* Represents payment lifecycle: 'created' | 'processing' | 'requires_action' | 'succeeded' | 'failed' | 'canceled'.
|
|
2464
|
+
*/
|
|
1997
2465
|
type PaymentIntentStatus = typeof paymentIntentStatus.infer;
|
|
2466
|
+
/**
|
|
2467
|
+
* Payment intent type.
|
|
2468
|
+
* Represents a payment attempt with amount, currency, status, and customer info.
|
|
2469
|
+
*/
|
|
1998
2470
|
type PaymentIntent = typeof paymentIntent.infer;
|
|
2471
|
+
/**
|
|
2472
|
+
* Create payment intent request type.
|
|
2473
|
+
* Contains customer ID, amount, currency, and optional payment method.
|
|
2474
|
+
*/
|
|
1999
2475
|
type CreatePaymentIntentRequest = typeof createPaymentIntentRequest.infer;
|
|
2476
|
+
/**
|
|
2477
|
+
* Subscription status type.
|
|
2478
|
+
* Represents subscription states: 'active' | 'past_due' | 'canceled' | 'incomplete' | 'trialing' | 'paused'.
|
|
2479
|
+
*/
|
|
2000
2480
|
type SubscriptionStatus = typeof subscriptionStatus.infer;
|
|
2481
|
+
/**
|
|
2482
|
+
* Price interval type.
|
|
2483
|
+
* Represents billing frequency: 'day' | 'week' | 'month' | 'year'.
|
|
2484
|
+
*/
|
|
2001
2485
|
type PriceInterval = typeof priceInterval.infer;
|
|
2486
|
+
/**
|
|
2487
|
+
* Price type.
|
|
2488
|
+
* Represents a recurring price with amount, currency, interval, and trial settings.
|
|
2489
|
+
*/
|
|
2002
2490
|
type Price = typeof price.infer;
|
|
2491
|
+
/**
|
|
2492
|
+
* Subscription type.
|
|
2493
|
+
* Represents a recurring subscription with status, billing period, and trial info.
|
|
2494
|
+
*/
|
|
2003
2495
|
type Subscription = typeof subscription.infer;
|
|
2496
|
+
/**
|
|
2497
|
+
* Create subscription request type.
|
|
2498
|
+
* Contains customer ID, price ID, optional payment method, and trial days.
|
|
2499
|
+
*/
|
|
2004
2500
|
type CreateSubscriptionRequest = typeof createSubscriptionRequest.infer;
|
|
2501
|
+
/**
|
|
2502
|
+
* Refund status type.
|
|
2503
|
+
* Represents refund states: 'pending' | 'succeeded' | 'failed' | 'canceled'.
|
|
2504
|
+
*/
|
|
2005
2505
|
type RefundStatus = typeof refundStatus.infer;
|
|
2506
|
+
/**
|
|
2507
|
+
* Refund type.
|
|
2508
|
+
* Represents a refund for a payment with amount, status, and reason.
|
|
2509
|
+
*/
|
|
2006
2510
|
type Refund = typeof refund.infer;
|
|
2511
|
+
/**
|
|
2512
|
+
* Create refund request type.
|
|
2513
|
+
* Contains payment intent ID, optional amount for partial refunds, and reason.
|
|
2514
|
+
*/
|
|
2007
2515
|
type CreateRefundRequest = typeof createRefundRequest.infer;
|
|
2516
|
+
/**
|
|
2517
|
+
* Webhook event type.
|
|
2518
|
+
* Represents payment webhook event types like payment.succeeded, subscription.created, etc.
|
|
2519
|
+
*/
|
|
2008
2520
|
type WebhookEventType = typeof webhookEventType.infer;
|
|
2521
|
+
/**
|
|
2522
|
+
* Webhook event type.
|
|
2523
|
+
* Represents a payment provider webhook event with type, data, and timestamp.
|
|
2524
|
+
*/
|
|
2009
2525
|
type WebhookEvent = typeof webhookEvent.infer;
|
|
2526
|
+
/**
|
|
2527
|
+
* Stripe configuration type.
|
|
2528
|
+
* Contains Stripe API keys and webhook secret.
|
|
2529
|
+
*/
|
|
2010
2530
|
type StripeConfig = typeof stripeConfig.infer;
|
|
2531
|
+
/**
|
|
2532
|
+
* Paddle configuration type.
|
|
2533
|
+
* Contains Paddle vendor credentials and webhook settings.
|
|
2534
|
+
*/
|
|
2011
2535
|
type PaddleConfig = typeof paddleConfig.infer;
|
|
2536
|
+
/**
|
|
2537
|
+
* iyzico configuration type.
|
|
2538
|
+
* Contains iyzico API credentials and base URL.
|
|
2539
|
+
*/
|
|
2012
2540
|
type IyzicoConfig = typeof iyzicoConfig.infer;
|
|
2541
|
+
/**
|
|
2542
|
+
* Payments configuration type.
|
|
2543
|
+
* Contains provider selection and provider-specific configuration.
|
|
2544
|
+
*/
|
|
2013
2545
|
type PaymentsConfig = typeof paymentsConfig.infer;
|
|
2014
2546
|
|
|
2015
2547
|
/**
|
|
@@ -2155,18 +2687,70 @@ declare const requestContext: arktype_internal_variants_object_ts.ObjectType<{
|
|
|
2155
2687
|
permissions?: string[];
|
|
2156
2688
|
};
|
|
2157
2689
|
}, {}>;
|
|
2690
|
+
/**
|
|
2691
|
+
* UUID path parameter type.
|
|
2692
|
+
* Contains an 'id' field for extracting UUID parameters from URL paths.
|
|
2693
|
+
*/
|
|
2158
2694
|
type UuidParam = typeof uuidParam.infer;
|
|
2695
|
+
/**
|
|
2696
|
+
* Pagination query type for URL query parameters.
|
|
2697
|
+
* Contains page, limit, orderBy, and orderDirection as strings for parsing.
|
|
2698
|
+
*/
|
|
2159
2699
|
type PaginationQuery = typeof paginationQuery.infer;
|
|
2700
|
+
/**
|
|
2701
|
+
* Cursor pagination query type for URL query parameters.
|
|
2702
|
+
* Contains cursor, limit, and direction as strings for parsing.
|
|
2703
|
+
*/
|
|
2160
2704
|
type CursorPaginationQuery = typeof cursorPaginationQuery.infer;
|
|
2705
|
+
/**
|
|
2706
|
+
* Search query type for URL query parameters.
|
|
2707
|
+
* Contains q, search, and filter fields for search endpoints.
|
|
2708
|
+
*/
|
|
2161
2709
|
type SearchQuery = typeof searchQuery.infer;
|
|
2710
|
+
/**
|
|
2711
|
+
* Date range query type for URL query parameters.
|
|
2712
|
+
* Contains startDate and endDate as ISO 8601 strings.
|
|
2713
|
+
*/
|
|
2162
2714
|
type DateRangeQuery = typeof dateRangeQuery.infer;
|
|
2715
|
+
/**
|
|
2716
|
+
* Health check response type.
|
|
2717
|
+
* Contains overall status, timestamp, version, uptime, and individual check results.
|
|
2718
|
+
*/
|
|
2163
2719
|
type HealthResponse = typeof healthResponse.infer;
|
|
2720
|
+
/**
|
|
2721
|
+
* API info response type.
|
|
2722
|
+
* Contains API name, version, description, environment, and documentation URL.
|
|
2723
|
+
*/
|
|
2164
2724
|
type ApiInfoResponse = typeof apiInfoResponse.infer;
|
|
2725
|
+
/**
|
|
2726
|
+
* CORS configuration type.
|
|
2727
|
+
* Contains origin, methods, headers, credentials, and max age settings.
|
|
2728
|
+
*/
|
|
2165
2729
|
type CorsConfig = typeof corsConfig.infer;
|
|
2730
|
+
/**
|
|
2731
|
+
* Server rate limit configuration type.
|
|
2732
|
+
* Contains window size, max requests, key generator, and skip function.
|
|
2733
|
+
*/
|
|
2166
2734
|
type ServerRateLimitConfig = typeof serverRateLimitConfig.infer;
|
|
2735
|
+
/**
|
|
2736
|
+
* Logger configuration type.
|
|
2737
|
+
* Contains log level, format, fields to redact, and timestamp settings.
|
|
2738
|
+
*/
|
|
2167
2739
|
type LoggerConfig = typeof loggerConfig.infer;
|
|
2740
|
+
/**
|
|
2741
|
+
* Server configuration type.
|
|
2742
|
+
* Contains port, host, base path, CORS, rate limiting, and logging settings.
|
|
2743
|
+
*/
|
|
2168
2744
|
type ServerConfig = typeof serverConfig.infer;
|
|
2745
|
+
/**
|
|
2746
|
+
* Auth context type (available after auth middleware).
|
|
2747
|
+
* Contains user ID, tenant ID, session ID, roles, and permissions.
|
|
2748
|
+
*/
|
|
2169
2749
|
type AuthContext = typeof authContext.infer;
|
|
2750
|
+
/**
|
|
2751
|
+
* Request context type.
|
|
2752
|
+
* Contains request ID, start time, client IP, user agent, and auth context.
|
|
2753
|
+
*/
|
|
2170
2754
|
type RequestContext = typeof requestContext.infer;
|
|
2171
2755
|
|
|
2172
2756
|
/**
|