@shipstatic/types 0.4.3 → 0.4.5

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 CHANGED
@@ -79,8 +79,14 @@ export interface Domain {
79
79
  readonly created: number;
80
80
  /** Whether this was a create (201) or update (200) operation */
81
81
  readonly isCreate?: boolean;
82
- /** Unix timestamp (seconds) when deployment binding last changed */
82
+ /** When DNS was verified (Unix timestamp, null if pending) */
83
+ verified?: number;
84
+ /** Total DNS verification attempts */
85
+ verifications?: number;
86
+ /** When deployment was last bound (Unix timestamp, null if never) */
83
87
  bound?: number;
88
+ /** Total deployment bindings */
89
+ bindings?: number;
84
90
  }
85
91
  /**
86
92
  * Response for listing domains
@@ -580,11 +586,11 @@ export interface KeysResource {
580
586
  /**
581
587
  * All activity event types logged in the system
582
588
  */
583
- 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_verify' | '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';
589
+ export type ActivityEvent = 'account_create' | 'account_update' | 'account_delete' | 'account_key_generate' | 'account_plan_paid' | 'account_plan_transition' | 'account_suspended' | 'deployment_create' | 'deployment_update' | 'deployment_delete' | 'deployment_claim' | 'domain_create' | 'domain_update' | 'domain_delete' | 'domain_verify' | '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_create' | 'dispute_create';
584
590
  /**
585
591
  * Activity events visible to users in the dashboard
586
592
  */
587
- 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_verify' | 'token_create' | 'token_consume';
593
+ export type UserVisibleActivityEvent = 'account_create' | 'account_update' | 'account_delete' | 'account_key_generate' | 'account_plan_transition' | 'deployment_create' | 'deployment_update' | 'deployment_delete' | 'deployment_claim' | 'domain_create' | 'domain_update' | 'domain_delete' | 'domain_verify' | 'token_create' | 'token_consume';
588
594
  /**
589
595
  * Activity record returned from the API
590
596
  */
@@ -600,6 +606,38 @@ export interface Activity {
600
606
  /** JSON-encoded metadata (parse with JSON.parse) */
601
607
  meta?: string;
602
608
  }
609
+ /**
610
+ * Parsed activity metadata.
611
+ * Different events populate different fields.
612
+ */
613
+ export interface ActivityMeta {
614
+ /** Number of files in deployment */
615
+ files?: number;
616
+ /** Total size in bytes */
617
+ size?: number;
618
+ /** Whether deployment has config */
619
+ hasConfig?: boolean;
620
+ /** Whether this was an update (vs create) */
621
+ isUpdate?: boolean;
622
+ /** Whether domain was already verified */
623
+ wasVerified?: boolean;
624
+ /** Previous deployment ID before rebinding */
625
+ previousDeployment?: string;
626
+ /** Tags that were set/updated */
627
+ tags?: string[];
628
+ /** OAuth provider name */
629
+ provider?: string;
630
+ /** Account email */
631
+ email?: string;
632
+ /** Account display name */
633
+ name?: string;
634
+ /** Previous plan */
635
+ from?: string;
636
+ /** New plan */
637
+ to?: string;
638
+ /** Allow additional fields for future use */
639
+ [key: string]: unknown;
640
+ }
603
641
  /**
604
642
  * Response from GET /activities endpoint
605
643
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "Shared types for Shipstatic platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -95,8 +95,14 @@ export interface Domain {
95
95
  readonly created: number;
96
96
  /** Whether this was a create (201) or update (200) operation */
97
97
  readonly isCreate?: boolean;
98
- /** Unix timestamp (seconds) when deployment binding last changed */
98
+ /** When DNS was verified (Unix timestamp, null if pending) */
99
+ verified?: number;
100
+ /** Total DNS verification attempts */
101
+ verifications?: number;
102
+ /** When deployment was last bound (Unix timestamp, null if never) */
99
103
  bound?: number;
104
+ /** Total deployment bindings */
105
+ bindings?: number;
100
106
  }
101
107
 
102
108
  /**
@@ -848,13 +854,13 @@ export type ActivityEvent =
848
854
  | 'account_suspended'
849
855
  // Deployment events
850
856
  | 'deployment_create'
857
+ | 'deployment_update'
851
858
  | 'deployment_delete'
852
859
  | 'deployment_claim'
853
860
  // Domain events
854
861
  | 'domain_create'
855
862
  | 'domain_update'
856
863
  | 'domain_delete'
857
- | 'domain_set'
858
864
  | 'domain_verify'
859
865
  // Token events
860
866
  | 'token_create'
@@ -880,8 +886,8 @@ export type ActivityEvent =
880
886
  | 'billing_past_due'
881
887
  | 'billing_terminated'
882
888
  | 'billing_manual_sync'
883
- | 'refund_created'
884
- | 'dispute_created';
889
+ | 'refund_create'
890
+ | 'dispute_create';
885
891
 
886
892
  /**
887
893
  * Activity events visible to users in the dashboard
@@ -893,12 +899,12 @@ export type UserVisibleActivityEvent =
893
899
  | 'account_key_generate'
894
900
  | 'account_plan_transition'
895
901
  | 'deployment_create'
902
+ | 'deployment_update'
896
903
  | 'deployment_delete'
897
904
  | 'deployment_claim'
898
905
  | 'domain_create'
899
906
  | 'domain_update'
900
907
  | 'domain_delete'
901
- | 'domain_set'
902
908
  | 'domain_verify'
903
909
  | 'token_create'
904
910
  | 'token_consume';
@@ -919,6 +925,47 @@ export interface Activity {
919
925
  meta?: string;
920
926
  }
921
927
 
928
+ /**
929
+ * Parsed activity metadata.
930
+ * Different events populate different fields.
931
+ */
932
+ export interface ActivityMeta {
933
+ // Deployment events
934
+ /** Number of files in deployment */
935
+ files?: number;
936
+ /** Total size in bytes */
937
+ size?: number;
938
+ /** Whether deployment has config */
939
+ hasConfig?: boolean;
940
+
941
+ // Domain events
942
+ /** Whether this was an update (vs create) */
943
+ isUpdate?: boolean;
944
+ /** Whether domain was already verified */
945
+ wasVerified?: boolean;
946
+ /** Previous deployment ID before rebinding */
947
+ previousDeployment?: string;
948
+ /** Tags that were set/updated */
949
+ tags?: string[];
950
+
951
+ // Account events
952
+ /** OAuth provider name */
953
+ provider?: string;
954
+ /** Account email */
955
+ email?: string;
956
+ /** Account display name */
957
+ name?: string;
958
+
959
+ // Plan transition events
960
+ /** Previous plan */
961
+ from?: string;
962
+ /** New plan */
963
+ to?: string;
964
+
965
+ /** Allow additional fields for future use */
966
+ [key: string]: unknown;
967
+ }
968
+
922
969
  /**
923
970
  * Response from GET /activities endpoint
924
971
  */