@shipstatic/types 0.7.5 → 0.7.7
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/index.d.ts +12 -8
- package/dist/index.js +8 -8
- package/package.json +2 -2
- package/src/index.ts +12 -8
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file Shared TypeScript types, constants, and utilities for the
|
|
2
|
+
* @file Shared TypeScript types, constants, and utilities for the ShipStatic platform.
|
|
3
3
|
* This package is the single source of truth for all shared data structures.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
@@ -272,7 +272,7 @@ export interface AccountOverrides {
|
|
|
272
272
|
totalSize?: number;
|
|
273
273
|
}
|
|
274
274
|
/**
|
|
275
|
-
* All possible error types in the
|
|
275
|
+
* All possible error types in the ShipStatic platform
|
|
276
276
|
* Names are developer-friendly while wire format stays consistent
|
|
277
277
|
*/
|
|
278
278
|
export declare enum ErrorType {
|
|
@@ -572,6 +572,10 @@ export interface DeploymentUploadOptions {
|
|
|
572
572
|
subdomain?: string;
|
|
573
573
|
/** Client identifier (e.g., 'cli', 'sdk', 'web') */
|
|
574
574
|
via?: string;
|
|
575
|
+
/** @internal Trigger server-side build. Only available via /upload endpoint. */
|
|
576
|
+
build?: boolean;
|
|
577
|
+
/** @internal Trigger server-side prerender. Only available via /upload endpoint. */
|
|
578
|
+
prerender?: boolean;
|
|
575
579
|
}
|
|
576
580
|
/**
|
|
577
581
|
* Deployment resource interface - the contract all implementations must follow
|
|
@@ -824,24 +828,24 @@ export interface UploadedFile {
|
|
|
824
828
|
* Check if a domain is a platform domain (subdomain of our platform).
|
|
825
829
|
* Platform domains are free and don't require DNS verification.
|
|
826
830
|
*
|
|
827
|
-
* @example isPlatformDomain("www.shipstatic.
|
|
828
|
-
* @example isPlatformDomain("example.com", "shipstatic.
|
|
831
|
+
* @example isPlatformDomain("www.shipstatic.com", "shipstatic.com") → true
|
|
832
|
+
* @example isPlatformDomain("example.com", "shipstatic.com") → false
|
|
829
833
|
*/
|
|
830
834
|
export declare function isPlatformDomain(domain: string, platformDomain: string): boolean;
|
|
831
835
|
/**
|
|
832
836
|
* Check if a domain is a custom domain (not a platform subdomain).
|
|
833
837
|
* Custom domains are billable and require DNS verification.
|
|
834
838
|
*
|
|
835
|
-
* @example isCustomDomain("example.com", "shipstatic.
|
|
836
|
-
* @example isCustomDomain("www.shipstatic.
|
|
839
|
+
* @example isCustomDomain("example.com", "shipstatic.com") → true
|
|
840
|
+
* @example isCustomDomain("www.shipstatic.com", "shipstatic.com") → false
|
|
837
841
|
*/
|
|
838
842
|
export declare function isCustomDomain(domain: string, platformDomain: string): boolean;
|
|
839
843
|
/**
|
|
840
844
|
* Extract subdomain from a platform domain.
|
|
841
845
|
* Returns null if not a platform domain.
|
|
842
846
|
*
|
|
843
|
-
* @example extractSubdomain("www.shipstatic.
|
|
844
|
-
* @example extractSubdomain("example.com", "shipstatic.
|
|
847
|
+
* @example extractSubdomain("www.shipstatic.com", "shipstatic.com") → "www"
|
|
848
|
+
* @example extractSubdomain("example.com", "shipstatic.com") → null
|
|
845
849
|
*/
|
|
846
850
|
export declare function extractSubdomain(domain: string, platformDomain: string): string | null;
|
|
847
851
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file Shared TypeScript types, constants, and utilities for the
|
|
2
|
+
* @file Shared TypeScript types, constants, and utilities for the ShipStatic platform.
|
|
3
3
|
* This package is the single source of truth for all shared data structures.
|
|
4
4
|
*/
|
|
5
5
|
// =============================================================================
|
|
@@ -50,7 +50,7 @@ export const AccountPlan = {
|
|
|
50
50
|
// ERROR SYSTEM
|
|
51
51
|
// =============================================================================
|
|
52
52
|
/**
|
|
53
|
-
* All possible error types in the
|
|
53
|
+
* All possible error types in the ShipStatic platform
|
|
54
54
|
* Names are developer-friendly while wire format stays consistent
|
|
55
55
|
*/
|
|
56
56
|
export var ErrorType;
|
|
@@ -411,8 +411,8 @@ export const FileValidationStatus = {
|
|
|
411
411
|
* Check if a domain is a platform domain (subdomain of our platform).
|
|
412
412
|
* Platform domains are free and don't require DNS verification.
|
|
413
413
|
*
|
|
414
|
-
* @example isPlatformDomain("www.shipstatic.
|
|
415
|
-
* @example isPlatformDomain("example.com", "shipstatic.
|
|
414
|
+
* @example isPlatformDomain("www.shipstatic.com", "shipstatic.com") → true
|
|
415
|
+
* @example isPlatformDomain("example.com", "shipstatic.com") → false
|
|
416
416
|
*/
|
|
417
417
|
export function isPlatformDomain(domain, platformDomain) {
|
|
418
418
|
return domain.endsWith(`.${platformDomain}`);
|
|
@@ -421,8 +421,8 @@ export function isPlatformDomain(domain, platformDomain) {
|
|
|
421
421
|
* Check if a domain is a custom domain (not a platform subdomain).
|
|
422
422
|
* Custom domains are billable and require DNS verification.
|
|
423
423
|
*
|
|
424
|
-
* @example isCustomDomain("example.com", "shipstatic.
|
|
425
|
-
* @example isCustomDomain("www.shipstatic.
|
|
424
|
+
* @example isCustomDomain("example.com", "shipstatic.com") → true
|
|
425
|
+
* @example isCustomDomain("www.shipstatic.com", "shipstatic.com") → false
|
|
426
426
|
*/
|
|
427
427
|
export function isCustomDomain(domain, platformDomain) {
|
|
428
428
|
return !isPlatformDomain(domain, platformDomain);
|
|
@@ -431,8 +431,8 @@ export function isCustomDomain(domain, platformDomain) {
|
|
|
431
431
|
* Extract subdomain from a platform domain.
|
|
432
432
|
* Returns null if not a platform domain.
|
|
433
433
|
*
|
|
434
|
-
* @example extractSubdomain("www.shipstatic.
|
|
435
|
-
* @example extractSubdomain("example.com", "shipstatic.
|
|
434
|
+
* @example extractSubdomain("www.shipstatic.com", "shipstatic.com") → "www"
|
|
435
|
+
* @example extractSubdomain("example.com", "shipstatic.com") → null
|
|
436
436
|
*/
|
|
437
437
|
export function extractSubdomain(domain, platformDomain) {
|
|
438
438
|
if (!isPlatformDomain(domain, platformDomain)) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipstatic/types",
|
|
3
|
-
"version": "0.7.
|
|
4
|
-
"description": "Shared types for
|
|
3
|
+
"version": "0.7.7",
|
|
4
|
+
"description": "Shared types for ShipStatic platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @file Shared TypeScript types, constants, and utilities for the
|
|
2
|
+
* @file Shared TypeScript types, constants, and utilities for the ShipStatic platform.
|
|
3
3
|
* This package is the single source of truth for all shared data structures.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -315,7 +315,7 @@ export interface AccountOverrides {
|
|
|
315
315
|
// =============================================================================
|
|
316
316
|
|
|
317
317
|
/**
|
|
318
|
-
* All possible error types in the
|
|
318
|
+
* All possible error types in the ShipStatic platform
|
|
319
319
|
* Names are developer-friendly while wire format stays consistent
|
|
320
320
|
*/
|
|
321
321
|
export enum ErrorType {
|
|
@@ -878,6 +878,10 @@ export interface DeploymentUploadOptions {
|
|
|
878
878
|
subdomain?: string;
|
|
879
879
|
/** Client identifier (e.g., 'cli', 'sdk', 'web') */
|
|
880
880
|
via?: string;
|
|
881
|
+
/** @internal Trigger server-side build. Only available via /upload endpoint. */
|
|
882
|
+
build?: boolean;
|
|
883
|
+
/** @internal Trigger server-side prerender. Only available via /upload endpoint. */
|
|
884
|
+
prerender?: boolean;
|
|
881
885
|
}
|
|
882
886
|
|
|
883
887
|
/**
|
|
@@ -1231,8 +1235,8 @@ export interface UploadedFile {
|
|
|
1231
1235
|
* Check if a domain is a platform domain (subdomain of our platform).
|
|
1232
1236
|
* Platform domains are free and don't require DNS verification.
|
|
1233
1237
|
*
|
|
1234
|
-
* @example isPlatformDomain("www.shipstatic.
|
|
1235
|
-
* @example isPlatformDomain("example.com", "shipstatic.
|
|
1238
|
+
* @example isPlatformDomain("www.shipstatic.com", "shipstatic.com") → true
|
|
1239
|
+
* @example isPlatformDomain("example.com", "shipstatic.com") → false
|
|
1236
1240
|
*/
|
|
1237
1241
|
export function isPlatformDomain(domain: string, platformDomain: string): boolean {
|
|
1238
1242
|
return domain.endsWith(`.${platformDomain}`);
|
|
@@ -1242,8 +1246,8 @@ export function isPlatformDomain(domain: string, platformDomain: string): boolea
|
|
|
1242
1246
|
* Check if a domain is a custom domain (not a platform subdomain).
|
|
1243
1247
|
* Custom domains are billable and require DNS verification.
|
|
1244
1248
|
*
|
|
1245
|
-
* @example isCustomDomain("example.com", "shipstatic.
|
|
1246
|
-
* @example isCustomDomain("www.shipstatic.
|
|
1249
|
+
* @example isCustomDomain("example.com", "shipstatic.com") → true
|
|
1250
|
+
* @example isCustomDomain("www.shipstatic.com", "shipstatic.com") → false
|
|
1247
1251
|
*/
|
|
1248
1252
|
export function isCustomDomain(domain: string, platformDomain: string): boolean {
|
|
1249
1253
|
return !isPlatformDomain(domain, platformDomain);
|
|
@@ -1253,8 +1257,8 @@ export function isCustomDomain(domain: string, platformDomain: string): boolean
|
|
|
1253
1257
|
* Extract subdomain from a platform domain.
|
|
1254
1258
|
* Returns null if not a platform domain.
|
|
1255
1259
|
*
|
|
1256
|
-
* @example extractSubdomain("www.shipstatic.
|
|
1257
|
-
* @example extractSubdomain("example.com", "shipstatic.
|
|
1260
|
+
* @example extractSubdomain("www.shipstatic.com", "shipstatic.com") → "www"
|
|
1261
|
+
* @example extractSubdomain("example.com", "shipstatic.com") → null
|
|
1258
1262
|
*/
|
|
1259
1263
|
export function extractSubdomain(domain: string, platformDomain: string): string | null {
|
|
1260
1264
|
if (!isPlatformDomain(domain, platformDomain)) {
|