@shipstatic/types 0.3.14 → 0.3.16
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 +33 -3
- package/package.json +1 -1
- package/src/index.ts +100 -3
package/dist/index.d.ts
CHANGED
|
@@ -66,8 +66,8 @@ export type DomainStatusType = typeof DomainStatus[keyof typeof DomainStatus];
|
|
|
66
66
|
export interface Domain {
|
|
67
67
|
/** The domain name */
|
|
68
68
|
readonly domain: string;
|
|
69
|
-
/** The deployment name this domain points to */
|
|
70
|
-
deployment: string;
|
|
69
|
+
/** The deployment name this domain points to (null = domain added but not yet linked) */
|
|
70
|
+
deployment: string | null;
|
|
71
71
|
/** Current domain status */
|
|
72
72
|
status: DomainStatusType;
|
|
73
73
|
/** Optional array of tags for categorization and filtering (lowercase, alphanumeric with separators) */
|
|
@@ -408,7 +408,7 @@ export interface DeploymentResource {
|
|
|
408
408
|
* Domain resource interface - the contract all implementations must follow
|
|
409
409
|
*/
|
|
410
410
|
export interface DomainResource {
|
|
411
|
-
set: (domainName: string, deployment
|
|
411
|
+
set: (domainName: string, deployment?: string, tags?: string[]) => Promise<Domain>;
|
|
412
412
|
get: (domainName: string) => Promise<Domain>;
|
|
413
413
|
list: () => Promise<DomainListResponse>;
|
|
414
414
|
remove: (domainName: string) => Promise<void>;
|
|
@@ -495,6 +495,36 @@ export interface KeysResource {
|
|
|
495
495
|
apiKey: string;
|
|
496
496
|
}>;
|
|
497
497
|
}
|
|
498
|
+
/**
|
|
499
|
+
* All activity event types logged in the system
|
|
500
|
+
*/
|
|
501
|
+
export type ActivityEvent = 'account_create' | 'account_update' | 'account_delete' | 'account_key_generate' | 'account_plan_paid' | 'account_plan_transition' | 'account_suspended' | 'deployment_create' | 'deployment_delete' | 'deployment_claim' | 'domain_create' | 'domain_update' | 'domain_delete' | 'domain_set' | 'domain_confirm' | 'token_create' | 'token_consume' | 'admin_account_plan_update' | 'admin_account_ref_update' | 'admin_account_billing_update' | 'admin_account_tags_update' | 'admin_deployment_delete' | 'admin_domain_delete' | 'billing_suspended' | 'billing_active' | 'billing_canceled' | 'billing_paused' | 'billing_expired' | 'billing_paid' | 'billing_trialing' | 'billing_scheduled_cancel' | 'billing_unpaid' | 'billing_update' | 'billing_past_due' | 'billing_terminated' | 'billing_manual_sync' | 'refund_created' | 'dispute_created';
|
|
502
|
+
/**
|
|
503
|
+
* Activity events visible to users in the dashboard
|
|
504
|
+
*/
|
|
505
|
+
export type UserVisibleActivityEvent = 'account_create' | 'account_update' | 'account_delete' | 'account_key_generate' | 'account_plan_transition' | 'deployment_create' | 'deployment_delete' | 'deployment_claim' | 'domain_create' | 'domain_update' | 'domain_delete' | 'domain_set' | 'domain_confirm' | 'token_create' | 'token_consume';
|
|
506
|
+
/**
|
|
507
|
+
* Activity record returned from the API
|
|
508
|
+
*/
|
|
509
|
+
export interface Activity {
|
|
510
|
+
/** The event type */
|
|
511
|
+
event: ActivityEvent;
|
|
512
|
+
/** Unix timestamp (seconds) when the activity occurred */
|
|
513
|
+
created: number;
|
|
514
|
+
/** Associated deployment ID (if applicable) */
|
|
515
|
+
deployment?: string;
|
|
516
|
+
/** Associated domain name (if applicable) */
|
|
517
|
+
domain?: string;
|
|
518
|
+
/** JSON-encoded metadata (parse with JSON.parse) */
|
|
519
|
+
meta?: string;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Response from GET /activities endpoint
|
|
523
|
+
*/
|
|
524
|
+
export interface ActivityListResponse {
|
|
525
|
+
/** Array of activities */
|
|
526
|
+
activities: Activity[];
|
|
527
|
+
}
|
|
498
528
|
/**
|
|
499
529
|
* File status constants for validation state tracking
|
|
500
530
|
*/
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -82,8 +82,8 @@ export type DomainStatusType = typeof DomainStatus[keyof typeof DomainStatus];
|
|
|
82
82
|
export interface Domain {
|
|
83
83
|
/** The domain name */
|
|
84
84
|
readonly domain: string;
|
|
85
|
-
/** The deployment name this domain points to */
|
|
86
|
-
deployment: string; // Mutable - can be updated to point to different deployment
|
|
85
|
+
/** The deployment name this domain points to (null = domain added but not yet linked) */
|
|
86
|
+
deployment: string | null; // Mutable - can be updated to point to different deployment
|
|
87
87
|
/** Current domain status */
|
|
88
88
|
status: DomainStatusType; // Mutable - can be updated
|
|
89
89
|
/** Optional array of tags for categorization and filtering (lowercase, alphanumeric with separators) */
|
|
@@ -662,7 +662,7 @@ export interface DeploymentResource {
|
|
|
662
662
|
* Domain resource interface - the contract all implementations must follow
|
|
663
663
|
*/
|
|
664
664
|
export interface DomainResource {
|
|
665
|
-
set: (domainName: string, deployment
|
|
665
|
+
set: (domainName: string, deployment?: string, tags?: string[]) => Promise<Domain>;
|
|
666
666
|
get: (domainName: string) => Promise<Domain>;
|
|
667
667
|
list: () => Promise<DomainListResponse>;
|
|
668
668
|
remove: (domainName: string) => Promise<void>;
|
|
@@ -750,6 +750,103 @@ export interface KeysResource {
|
|
|
750
750
|
create: () => Promise<{ apiKey: string }>;
|
|
751
751
|
}
|
|
752
752
|
|
|
753
|
+
// =============================================================================
|
|
754
|
+
// ACTIVITY TYPES
|
|
755
|
+
// =============================================================================
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* All activity event types logged in the system
|
|
759
|
+
*/
|
|
760
|
+
export type ActivityEvent =
|
|
761
|
+
// Account events
|
|
762
|
+
| 'account_create'
|
|
763
|
+
| 'account_update'
|
|
764
|
+
| 'account_delete'
|
|
765
|
+
| 'account_key_generate'
|
|
766
|
+
| 'account_plan_paid'
|
|
767
|
+
| 'account_plan_transition'
|
|
768
|
+
| 'account_suspended'
|
|
769
|
+
// Deployment events
|
|
770
|
+
| 'deployment_create'
|
|
771
|
+
| 'deployment_delete'
|
|
772
|
+
| 'deployment_claim'
|
|
773
|
+
// Domain events
|
|
774
|
+
| 'domain_create'
|
|
775
|
+
| 'domain_update'
|
|
776
|
+
| 'domain_delete'
|
|
777
|
+
| 'domain_set'
|
|
778
|
+
| 'domain_confirm'
|
|
779
|
+
// Token events
|
|
780
|
+
| 'token_create'
|
|
781
|
+
| 'token_consume'
|
|
782
|
+
// System events (not user-visible)
|
|
783
|
+
| 'admin_account_plan_update'
|
|
784
|
+
| 'admin_account_ref_update'
|
|
785
|
+
| 'admin_account_billing_update'
|
|
786
|
+
| 'admin_account_tags_update'
|
|
787
|
+
| 'admin_deployment_delete'
|
|
788
|
+
| 'admin_domain_delete'
|
|
789
|
+
// Billing events (internal, not shown to users except account_plan_transition)
|
|
790
|
+
| 'billing_suspended'
|
|
791
|
+
| 'billing_active'
|
|
792
|
+
| 'billing_canceled'
|
|
793
|
+
| 'billing_paused'
|
|
794
|
+
| 'billing_expired'
|
|
795
|
+
| 'billing_paid'
|
|
796
|
+
| 'billing_trialing'
|
|
797
|
+
| 'billing_scheduled_cancel'
|
|
798
|
+
| 'billing_unpaid'
|
|
799
|
+
| 'billing_update'
|
|
800
|
+
| 'billing_past_due'
|
|
801
|
+
| 'billing_terminated'
|
|
802
|
+
| 'billing_manual_sync'
|
|
803
|
+
| 'refund_created'
|
|
804
|
+
| 'dispute_created';
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* Activity events visible to users in the dashboard
|
|
808
|
+
*/
|
|
809
|
+
export type UserVisibleActivityEvent =
|
|
810
|
+
| 'account_create'
|
|
811
|
+
| 'account_update'
|
|
812
|
+
| 'account_delete'
|
|
813
|
+
| 'account_key_generate'
|
|
814
|
+
| 'account_plan_transition'
|
|
815
|
+
| 'deployment_create'
|
|
816
|
+
| 'deployment_delete'
|
|
817
|
+
| 'deployment_claim'
|
|
818
|
+
| 'domain_create'
|
|
819
|
+
| 'domain_update'
|
|
820
|
+
| 'domain_delete'
|
|
821
|
+
| 'domain_set'
|
|
822
|
+
| 'domain_confirm'
|
|
823
|
+
| 'token_create'
|
|
824
|
+
| 'token_consume';
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Activity record returned from the API
|
|
828
|
+
*/
|
|
829
|
+
export interface Activity {
|
|
830
|
+
/** The event type */
|
|
831
|
+
event: ActivityEvent;
|
|
832
|
+
/** Unix timestamp (seconds) when the activity occurred */
|
|
833
|
+
created: number;
|
|
834
|
+
/** Associated deployment ID (if applicable) */
|
|
835
|
+
deployment?: string;
|
|
836
|
+
/** Associated domain name (if applicable) */
|
|
837
|
+
domain?: string;
|
|
838
|
+
/** JSON-encoded metadata (parse with JSON.parse) */
|
|
839
|
+
meta?: string;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Response from GET /activities endpoint
|
|
844
|
+
*/
|
|
845
|
+
export interface ActivityListResponse {
|
|
846
|
+
/** Array of activities */
|
|
847
|
+
activities: Activity[];
|
|
848
|
+
}
|
|
849
|
+
|
|
753
850
|
// =============================================================================
|
|
754
851
|
// FILE UPLOAD TYPES
|
|
755
852
|
// =============================================================================
|