Skip to content

Commit b71f33b

Browse files
tokens
1 parent ab5347a commit b71f33b

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@shipstatic/types",
3-
"version": "0.5.3",
3+
"version": "0.5.4",
44
"description": "Shared types for Shipstatic platform",
55
"type": "module",
66
"main": "./dist/index.js",

src/index.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,12 @@ export interface DomainValidateResponse {
182182
* Deployment token for automated deployments
183183
*/
184184
export interface Token {
185-
/** The token hash (not the actual token value) */
185+
/** 7-char management identifier */
186186
readonly token: string;
187187
/** The account this token belongs to */
188188
readonly account: string;
189+
/** SHA256 hash of the raw credential (auth lookups only, never exposed to users) */
190+
readonly hash: string;
189191
/** IP address locking for security, null if not locked */
190192
readonly ip: string | null;
191193
/** Labels for categorization and filtering (lowercase, alphanumeric with separators). Always present, empty array when none. */
@@ -200,10 +202,10 @@ export interface Token {
200202

201203
/**
202204
* Token as returned by the list endpoint.
203-
* Security-redacted: shows truncated prefix instead of full hash, omits account.
205+
* Shows 7-char management ID, omits account and hash.
204206
*/
205207
export interface TokenListItem {
206-
/** Truncated token prefix for identification (e.g., "hash12345678...") */
208+
/** 7-char management identifier (e.g., "a1b2c3d") */
207209
readonly token: string;
208210
/** Labels for categorization and filtering. Always present, empty array when none. */
209211
labels: string[];
@@ -229,8 +231,10 @@ export interface TokenListResponse {
229231
* Response for token creation
230232
*/
231233
export interface TokenCreateResponse {
232-
/** The actual token value (only returned on creation) */
234+
/** 7-char management identifier */
233235
token: string;
236+
/** The raw credential value (shown once at creation, then never again) */
237+
secret: string;
234238
/** Labels for categorization and filtering. Always present, empty array when none. */
235239
labels: string[];
236240
/** Unix timestamp (seconds) when token expires, null for never */

0 commit comments

Comments
 (0)