@shipstatic/types 0.5.2 → 0.5.4
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 +27 -38
- package/package.json +1 -1
- package/src/index.ts +28 -41
package/dist/index.d.ts
CHANGED
|
@@ -152,25 +152,16 @@ export interface DomainValidateResponse {
|
|
|
152
152
|
/** Error message, null when valid */
|
|
153
153
|
error: string | null;
|
|
154
154
|
}
|
|
155
|
-
/**
|
|
156
|
-
* Response for deployment removal
|
|
157
|
-
*/
|
|
158
|
-
export interface DeploymentRemoveResponse {
|
|
159
|
-
/** Operation success status */
|
|
160
|
-
success: boolean;
|
|
161
|
-
/** The deployment ID */
|
|
162
|
-
deployment: string;
|
|
163
|
-
/** Human-readable message */
|
|
164
|
-
message: string;
|
|
165
|
-
}
|
|
166
155
|
/**
|
|
167
156
|
* Deployment token for automated deployments
|
|
168
157
|
*/
|
|
169
158
|
export interface Token {
|
|
170
|
-
/**
|
|
159
|
+
/** 7-char management identifier */
|
|
171
160
|
readonly token: string;
|
|
172
161
|
/** The account this token belongs to */
|
|
173
162
|
readonly account: string;
|
|
163
|
+
/** SHA256 hash of the raw credential (auth lookups only, never exposed to users) */
|
|
164
|
+
readonly hash: string;
|
|
174
165
|
/** IP address locking for security, null if not locked */
|
|
175
166
|
readonly ip: string | null;
|
|
176
167
|
/** Labels for categorization and filtering (lowercase, alphanumeric with separators). Always present, empty array when none. */
|
|
@@ -182,21 +173,39 @@ export interface Token {
|
|
|
182
173
|
/** Unix timestamp (seconds) when token was last used, null if never used */
|
|
183
174
|
readonly used: number | null;
|
|
184
175
|
}
|
|
176
|
+
/**
|
|
177
|
+
* Token as returned by the list endpoint.
|
|
178
|
+
* Shows 7-char management ID, omits account and hash.
|
|
179
|
+
*/
|
|
180
|
+
export interface TokenListItem {
|
|
181
|
+
/** 7-char management identifier (e.g., "a1b2c3d") */
|
|
182
|
+
readonly token: string;
|
|
183
|
+
/** Labels for categorization and filtering. Always present, empty array when none. */
|
|
184
|
+
labels: string[];
|
|
185
|
+
/** Unix timestamp (seconds) when token was created */
|
|
186
|
+
readonly created: number;
|
|
187
|
+
/** Unix timestamp (seconds) when token expires, null for never */
|
|
188
|
+
readonly expires: number | null;
|
|
189
|
+
/** Unix timestamp (seconds) when token was last used, null if never used */
|
|
190
|
+
readonly used: number | null;
|
|
191
|
+
}
|
|
185
192
|
/**
|
|
186
193
|
* Response for listing tokens
|
|
187
194
|
*/
|
|
188
195
|
export interface TokenListResponse {
|
|
189
|
-
/** Array of tokens */
|
|
190
|
-
tokens:
|
|
191
|
-
/** Total
|
|
192
|
-
|
|
196
|
+
/** Array of tokens (security-redacted for list display) */
|
|
197
|
+
tokens: TokenListItem[];
|
|
198
|
+
/** Total number of tokens */
|
|
199
|
+
total: number;
|
|
193
200
|
}
|
|
194
201
|
/**
|
|
195
202
|
* Response for token creation
|
|
196
203
|
*/
|
|
197
204
|
export interface TokenCreateResponse {
|
|
198
|
-
/**
|
|
205
|
+
/** 7-char management identifier */
|
|
199
206
|
token: string;
|
|
207
|
+
/** The raw credential value (shown once at creation, then never again) */
|
|
208
|
+
secret: string;
|
|
200
209
|
/** Labels for categorization and filtering. Always present, empty array when none. */
|
|
201
210
|
labels: string[];
|
|
202
211
|
/** Unix timestamp (seconds) when token expires, null for never */
|
|
@@ -429,15 +438,6 @@ export declare const ALLOWED_MIME_TYPES: readonly ["text/html", "text/css", "tex
|
|
|
429
438
|
* isAllowedMimeType('application/wasm') // false (not allowed)
|
|
430
439
|
*/
|
|
431
440
|
export declare function isAllowedMimeType(mimeType: string): boolean;
|
|
432
|
-
/**
|
|
433
|
-
* Generic success response wrapper
|
|
434
|
-
*/
|
|
435
|
-
export interface SuccessResponse<T = any> {
|
|
436
|
-
/** Always true for success */
|
|
437
|
-
success: true;
|
|
438
|
-
/** Response data */
|
|
439
|
-
data: T;
|
|
440
|
-
}
|
|
441
441
|
/**
|
|
442
442
|
* Simple ping response for health checks
|
|
443
443
|
*/
|
|
@@ -782,17 +782,6 @@ export interface ValidationIssue {
|
|
|
782
782
|
/** Display-ready message explaining the issue */
|
|
783
783
|
message: string;
|
|
784
784
|
}
|
|
785
|
-
/**
|
|
786
|
-
* Legacy validation error structure
|
|
787
|
-
*
|
|
788
|
-
* @deprecated Use ValidationIssue[] from FileValidationResult instead
|
|
789
|
-
*/
|
|
790
|
-
export interface ValidationError {
|
|
791
|
-
error: string;
|
|
792
|
-
details: string;
|
|
793
|
-
errors: string[];
|
|
794
|
-
isClientError: true;
|
|
795
|
-
}
|
|
796
785
|
/**
|
|
797
786
|
* Minimal file interface required for validation
|
|
798
787
|
*/
|
|
@@ -800,7 +789,7 @@ export interface ValidatableFile {
|
|
|
800
789
|
name: string;
|
|
801
790
|
size: number;
|
|
802
791
|
type: string;
|
|
803
|
-
status?:
|
|
792
|
+
status?: FileValidationStatusType;
|
|
804
793
|
statusMessage?: string;
|
|
805
794
|
}
|
|
806
795
|
/**
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -174,18 +174,6 @@ export interface DomainValidateResponse {
|
|
|
174
174
|
error: string | null;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
/**
|
|
178
|
-
* Response for deployment removal
|
|
179
|
-
*/
|
|
180
|
-
export interface DeploymentRemoveResponse {
|
|
181
|
-
/** Operation success status */
|
|
182
|
-
success: boolean;
|
|
183
|
-
/** The deployment ID */
|
|
184
|
-
deployment: string;
|
|
185
|
-
/** Human-readable message */
|
|
186
|
-
message: string;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
177
|
// =============================================================================
|
|
190
178
|
// TOKEN TYPES
|
|
191
179
|
// =============================================================================
|
|
@@ -194,10 +182,12 @@ export interface DeploymentRemoveResponse {
|
|
|
194
182
|
* Deployment token for automated deployments
|
|
195
183
|
*/
|
|
196
184
|
export interface Token {
|
|
197
|
-
/**
|
|
185
|
+
/** 7-char management identifier */
|
|
198
186
|
readonly token: string;
|
|
199
187
|
/** The account this token belongs to */
|
|
200
188
|
readonly account: string;
|
|
189
|
+
/** SHA256 hash of the raw credential (auth lookups only, never exposed to users) */
|
|
190
|
+
readonly hash: string;
|
|
201
191
|
/** IP address locking for security, null if not locked */
|
|
202
192
|
readonly ip: string | null;
|
|
203
193
|
/** Labels for categorization and filtering (lowercase, alphanumeric with separators). Always present, empty array when none. */
|
|
@@ -210,22 +200,41 @@ export interface Token {
|
|
|
210
200
|
readonly used: number | null;
|
|
211
201
|
}
|
|
212
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Token as returned by the list endpoint.
|
|
205
|
+
* Shows 7-char management ID, omits account and hash.
|
|
206
|
+
*/
|
|
207
|
+
export interface TokenListItem {
|
|
208
|
+
/** 7-char management identifier (e.g., "a1b2c3d") */
|
|
209
|
+
readonly token: string;
|
|
210
|
+
/** Labels for categorization and filtering. Always present, empty array when none. */
|
|
211
|
+
labels: string[];
|
|
212
|
+
/** Unix timestamp (seconds) when token was created */
|
|
213
|
+
readonly created: number;
|
|
214
|
+
/** Unix timestamp (seconds) when token expires, null for never */
|
|
215
|
+
readonly expires: number | null;
|
|
216
|
+
/** Unix timestamp (seconds) when token was last used, null if never used */
|
|
217
|
+
readonly used: number | null;
|
|
218
|
+
}
|
|
219
|
+
|
|
213
220
|
/**
|
|
214
221
|
* Response for listing tokens
|
|
215
222
|
*/
|
|
216
223
|
export interface TokenListResponse {
|
|
217
|
-
/** Array of tokens */
|
|
218
|
-
tokens:
|
|
219
|
-
/** Total
|
|
220
|
-
|
|
224
|
+
/** Array of tokens (security-redacted for list display) */
|
|
225
|
+
tokens: TokenListItem[];
|
|
226
|
+
/** Total number of tokens */
|
|
227
|
+
total: number;
|
|
221
228
|
}
|
|
222
229
|
|
|
223
230
|
/**
|
|
224
231
|
* Response for token creation
|
|
225
232
|
*/
|
|
226
233
|
export interface TokenCreateResponse {
|
|
227
|
-
/**
|
|
234
|
+
/** 7-char management identifier */
|
|
228
235
|
token: string;
|
|
236
|
+
/** The raw credential value (shown once at creation, then never again) */
|
|
237
|
+
secret: string;
|
|
229
238
|
/** Labels for categorization and filtering. Always present, empty array when none. */
|
|
230
239
|
labels: string[];
|
|
231
240
|
/** Unix timestamp (seconds) when token expires, null for never */
|
|
@@ -751,16 +760,6 @@ export function isAllowedMimeType(mimeType: string): boolean {
|
|
|
751
760
|
// COMMON RESPONSE PATTERNS
|
|
752
761
|
// =============================================================================
|
|
753
762
|
|
|
754
|
-
/**
|
|
755
|
-
* Generic success response wrapper
|
|
756
|
-
*/
|
|
757
|
-
export interface SuccessResponse<T = any> {
|
|
758
|
-
/** Always true for success */
|
|
759
|
-
success: true;
|
|
760
|
-
/** Response data */
|
|
761
|
-
data: T;
|
|
762
|
-
}
|
|
763
|
-
|
|
764
763
|
/**
|
|
765
764
|
* Simple ping response for health checks
|
|
766
765
|
*/
|
|
@@ -1289,18 +1288,6 @@ export interface ValidationIssue {
|
|
|
1289
1288
|
message: string;
|
|
1290
1289
|
}
|
|
1291
1290
|
|
|
1292
|
-
/**
|
|
1293
|
-
* Legacy validation error structure
|
|
1294
|
-
*
|
|
1295
|
-
* @deprecated Use ValidationIssue[] from FileValidationResult instead
|
|
1296
|
-
*/
|
|
1297
|
-
export interface ValidationError {
|
|
1298
|
-
error: string;
|
|
1299
|
-
details: string;
|
|
1300
|
-
errors: string[];
|
|
1301
|
-
isClientError: true;
|
|
1302
|
-
}
|
|
1303
|
-
|
|
1304
1291
|
/**
|
|
1305
1292
|
* Minimal file interface required for validation
|
|
1306
1293
|
*/
|
|
@@ -1308,7 +1295,7 @@ export interface ValidatableFile {
|
|
|
1308
1295
|
name: string;
|
|
1309
1296
|
size: number;
|
|
1310
1297
|
type: string;
|
|
1311
|
-
status?:
|
|
1298
|
+
status?: FileValidationStatusType;
|
|
1312
1299
|
statusMessage?: string;
|
|
1313
1300
|
}
|
|
1314
1301
|
|