@@ -33,8 +33,8 @@ export interface Deployment {
3333 status : DeploymentStatusType ; // Mutable - can be updated
3434 /** Whether deployment has configuration */
3535 readonly config ?: boolean ;
36- /** Optional array of tags for categorization and filtering (lowercase, alphanumeric with separators) */
37- tags ?: string [ ] ;
36+ /** Optional array of labels for categorization and filtering (lowercase, alphanumeric with separators) */
37+ labels ?: string [ ] ;
3838 /** The client/tool used to create this deployment (e.g., 'web', 'sdk', 'cli') */
3939 readonly via ?: string ;
4040 /** The deployment URL */
@@ -91,8 +91,8 @@ export interface Domain {
9191 deployment : string | null ; // Mutable - can be updated to point to different deployment
9292 /** Current domain status */
9393 status : DomainStatusType ; // Mutable - can be updated
94- /** Optional array of tags for categorization and filtering (lowercase, alphanumeric with separators) */
95- tags ?: string [ ] ;
94+ /** Optional array of labels for categorization and filtering (lowercase, alphanumeric with separators) */
95+ labels ?: string [ ] ;
9696 /** The domain URL - internal (subdomain) or external (custom domain) */
9797 readonly url : string ;
9898 /** Unix timestamp (seconds) when domain was created */
@@ -204,8 +204,8 @@ export interface Token {
204204 readonly account : string ;
205205 /** Optional IP address locking for security */
206206 readonly ip ?: string ;
207- /** Optional array of tags for categorization and filtering (lowercase, alphanumeric with separators) */
208- tags ?: string [ ] ;
207+ /** Optional array of labels for categorization and filtering (lowercase, alphanumeric with separators) */
208+ labels ?: string [ ] ;
209209 /** Unix timestamp (seconds) when token was created */
210210 readonly created : number ;
211211 /** Unix timestamp (seconds) when token expires, or null for never */
@@ -1003,8 +1003,8 @@ export type DeployInput = File[] | string | string[];
10031003 * SDK implementations may extend with additional options (timeout, signal, callbacks, etc.).
10041004 */
10051005export interface DeploymentCreateOptions {
1006- /** Optional tags for categorization and filtering */
1007- tags ?: string [ ] ;
1006+ /** Optional labels for categorization and filtering */
1007+ labels ?: string [ ] ;
10081008 /** Optional subdomain suggestion for the deployment */
10091009 subdomain ?: string ;
10101010 /** Client identifier (e.g., 'cli', 'sdk', 'web') */
@@ -1018,15 +1018,15 @@ export interface DeploymentResource {
10181018 create : ( input : DeployInput , options ?: DeploymentCreateOptions ) => Promise < Deployment > ;
10191019 list : ( ) => Promise < DeploymentListResponse > ;
10201020 get : ( id : string ) => Promise < Deployment > ;
1021- set : ( id : string , options : { tags : string [ ] } ) => Promise < Deployment > ;
1021+ set : ( id : string , options : { labels : string [ ] } ) => Promise < Deployment > ;
10221022 remove : ( id : string ) => Promise < void > ;
10231023}
10241024
10251025/**
10261026 * Domain resource interface - the contract all implementations must follow
10271027 */
10281028export interface DomainResource {
1029- set : ( name : string , options ?: { deployment ?: string ; tags ?: string [ ] } ) => Promise < Domain > ;
1029+ set : ( name : string , options ?: { deployment ?: string ; labels ?: string [ ] } ) => Promise < Domain > ;
10301030 list : ( ) => Promise < DomainListResponse > ;
10311031 get : ( name : string ) => Promise < Domain > ;
10321032 remove : ( name : string ) => Promise < void > ;
@@ -1048,7 +1048,7 @@ export interface AccountResource {
10481048 * Token resource interface - the contract all implementations must follow
10491049 */
10501050export interface TokenResource {
1051- create : ( options ?: { ttl ?: number ; tags ?: string [ ] } ) => Promise < TokenCreateResponse > ;
1051+ create : ( options ?: { ttl ?: number ; labels ?: string [ ] } ) => Promise < TokenCreateResponse > ;
10521052 list : ( ) => Promise < TokenListResponse > ;
10531053 remove : ( token : string ) => Promise < void > ;
10541054}
@@ -1149,7 +1149,7 @@ export type ActivityEvent =
11491149 | 'admin.account.plan.update'
11501150 | 'admin.account.ref.update'
11511151 | 'admin.account.billing.update'
1152- | 'admin.account.tags .update'
1152+ | 'admin.account.labels .update'
11531153 | 'admin.deployment.delete'
11541154 | 'admin.domain.delete'
11551155 | 'admin.billing.sync'
@@ -1224,8 +1224,8 @@ export interface ActivityMeta {
12241224 wasVerified ?: boolean ;
12251225 /** Previous deployment ID before relinking */
12261226 previousDeployment ?: string ;
1227- /** Tags that were set/updated */
1228- tags ?: string [ ] ;
1227+ /** Labels that were set/updated */
1228+ labels ?: string [ ] ;
12291229
12301230 // Account events
12311231 /** OAuth provider name */
@@ -1421,59 +1421,59 @@ export function generateDomainUrl(domain: string): string {
14211421}
14221422
14231423// =============================================================================
1424- // TAG UTILITIES
1424+ // LABEL UTILITIES
14251425// =============================================================================
14261426
14271427/**
1428- * Tag validation constraints shared across UI and API.
1429- * These rules define the single source of truth for tag validation.
1428+ * Label validation constraints shared across UI and API.
1429+ * These rules define the single source of truth for label validation.
14301430 */
1431- export const TAG_CONSTRAINTS = {
1432- /** Minimum tag length in characters */
1431+ export const LABEL_CONSTRAINTS = {
1432+ /** Minimum label length in characters */
14331433 MIN_LENGTH : 3 ,
1434- /** Maximum tag length in characters (concise tags , matches Stack Overflow's original limit) */
1434+ /** Maximum label length in characters (concise labels , matches Stack Overflow's original limit) */
14351435 MAX_LENGTH : 25 ,
1436- /** Maximum number of tags allowed per resource */
1436+ /** Maximum number of labels allowed per resource */
14371437 MAX_COUNT : 10 ,
1438- /** Allowed separator characters between tag segments */
1438+ /** Allowed separator characters between label segments */
14391439 SEPARATORS : '._-' ,
14401440} as const ;
14411441
14421442/**
1443- * Tag validation pattern.
1443+ * Label validation pattern.
14441444 * Must start and end with alphanumeric (a-z, 0-9).
14451445 * Can contain separators (. _ -) between segments, but not consecutive.
14461446 *
14471447 * Valid examples: 'production', 'v1.2.3', 'api_v2', 'us-east-1'
14481448 * Invalid examples: 'ab' (too short), '-prod' (starts with separator), 'foo--bar' (consecutive separators)
14491449 */
1450- export const TAG_PATTERN = / ^ [ a - z 0 - 9 ] + (?: [ . _ - ] [ a - z 0 - 9 ] + ) * $ / ;
1450+ export const LABEL_PATTERN = / ^ [ a - z 0 - 9 ] + (?: [ . _ - ] [ a - z 0 - 9 ] + ) * $ / ;
14511451
14521452/**
1453- * Serialize tags array to JSON string for database storage.
1453+ * Serialize labels array to JSON string for database storage.
14541454 * Returns null for empty or undefined arrays.
14551455 *
1456- * @example serializeTags (['web', 'production']) → '["web","production"]'
1457- * @example serializeTags ([]) → null
1458- * @example serializeTags (undefined) → null
1456+ * @example serializeLabels (['web', 'production']) → '["web","production"]'
1457+ * @example serializeLabels ([]) → null
1458+ * @example serializeLabels (undefined) → null
14591459 */
1460- export function serializeTags ( tags : string [ ] | undefined ) : string | null {
1461- if ( ! tags || tags . length === 0 ) return null ;
1462- return JSON . stringify ( tags ) ;
1460+ export function serializeLabels ( labels : string [ ] | undefined ) : string | null {
1461+ if ( ! labels || labels . length === 0 ) return null ;
1462+ return JSON . stringify ( labels ) ;
14631463}
14641464
14651465/**
1466- * Deserialize tags from JSON string to array.
1466+ * Deserialize labels from JSON string to array.
14671467 * Returns undefined for null/empty strings.
14681468 *
1469- * @example deserializeTags ('["web","production"]') → ['web', 'production']
1470- * @example deserializeTags (null) → undefined
1471- * @example deserializeTags ('') → undefined
1469+ * @example deserializeLabels ('["web","production"]') → ['web', 'production']
1470+ * @example deserializeLabels (null) → undefined
1471+ * @example deserializeLabels ('') → undefined
14721472 */
1473- export function deserializeTags ( tagsJson : string | null ) : string [ ] | undefined {
1474- if ( ! tagsJson ) return undefined ;
1473+ export function deserializeLabels ( labelsJson : string | null ) : string [ ] | undefined {
1474+ if ( ! labelsJson ) return undefined ;
14751475 try {
1476- const parsed = JSON . parse ( tagsJson ) ;
1476+ const parsed = JSON . parse ( labelsJson ) ;
14771477 return Array . isArray ( parsed ) && parsed . length > 0 ? parsed : undefined ;
14781478 } catch {
14791479 return undefined ;
0 commit comments