@shipstatic/types 0.4.3 → 0.4.4
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 +34 -2
- package/package.json +1 -1
- package/src/index.ts +45 -4
package/dist/index.d.ts
CHANGED
|
@@ -580,11 +580,11 @@ export interface KeysResource {
|
|
|
580
580
|
/**
|
|
581
581
|
* All activity event types logged in the system
|
|
582
582
|
*/
|
|
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' | '
|
|
583
|
+
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
584
|
/**
|
|
585
585
|
* Activity events visible to users in the dashboard
|
|
586
586
|
*/
|
|
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' | '
|
|
587
|
+
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
588
|
/**
|
|
589
589
|
* Activity record returned from the API
|
|
590
590
|
*/
|
|
@@ -600,6 +600,38 @@ export interface Activity {
|
|
|
600
600
|
/** JSON-encoded metadata (parse with JSON.parse) */
|
|
601
601
|
meta?: string;
|
|
602
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* Parsed activity metadata.
|
|
605
|
+
* Different events populate different fields.
|
|
606
|
+
*/
|
|
607
|
+
export interface ActivityMeta {
|
|
608
|
+
/** Number of files in deployment */
|
|
609
|
+
files?: number;
|
|
610
|
+
/** Total size in bytes */
|
|
611
|
+
size?: number;
|
|
612
|
+
/** Whether deployment has config */
|
|
613
|
+
hasConfig?: boolean;
|
|
614
|
+
/** Whether this was an update (vs create) */
|
|
615
|
+
isUpdate?: boolean;
|
|
616
|
+
/** Whether domain was already verified */
|
|
617
|
+
wasVerified?: boolean;
|
|
618
|
+
/** Previous deployment ID before rebinding */
|
|
619
|
+
previousDeployment?: string;
|
|
620
|
+
/** Tags that were set/updated */
|
|
621
|
+
tags?: string[];
|
|
622
|
+
/** OAuth provider name */
|
|
623
|
+
provider?: string;
|
|
624
|
+
/** Account email */
|
|
625
|
+
email?: string;
|
|
626
|
+
/** Account display name */
|
|
627
|
+
name?: string;
|
|
628
|
+
/** Previous plan */
|
|
629
|
+
from?: string;
|
|
630
|
+
/** New plan */
|
|
631
|
+
to?: string;
|
|
632
|
+
/** Allow additional fields for future use */
|
|
633
|
+
[key: string]: unknown;
|
|
634
|
+
}
|
|
603
635
|
/**
|
|
604
636
|
* Response from GET /activities endpoint
|
|
605
637
|
*/
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -848,13 +848,13 @@ export type ActivityEvent =
|
|
|
848
848
|
| 'account_suspended'
|
|
849
849
|
// Deployment events
|
|
850
850
|
| 'deployment_create'
|
|
851
|
+
| 'deployment_update'
|
|
851
852
|
| 'deployment_delete'
|
|
852
853
|
| 'deployment_claim'
|
|
853
854
|
// Domain events
|
|
854
855
|
| 'domain_create'
|
|
855
856
|
| 'domain_update'
|
|
856
857
|
| 'domain_delete'
|
|
857
|
-
| 'domain_set'
|
|
858
858
|
| 'domain_verify'
|
|
859
859
|
// Token events
|
|
860
860
|
| 'token_create'
|
|
@@ -880,8 +880,8 @@ export type ActivityEvent =
|
|
|
880
880
|
| 'billing_past_due'
|
|
881
881
|
| 'billing_terminated'
|
|
882
882
|
| 'billing_manual_sync'
|
|
883
|
-
| '
|
|
884
|
-
| '
|
|
883
|
+
| 'refund_create'
|
|
884
|
+
| 'dispute_create';
|
|
885
885
|
|
|
886
886
|
/**
|
|
887
887
|
* Activity events visible to users in the dashboard
|
|
@@ -893,12 +893,12 @@ export type UserVisibleActivityEvent =
|
|
|
893
893
|
| 'account_key_generate'
|
|
894
894
|
| 'account_plan_transition'
|
|
895
895
|
| 'deployment_create'
|
|
896
|
+
| 'deployment_update'
|
|
896
897
|
| 'deployment_delete'
|
|
897
898
|
| 'deployment_claim'
|
|
898
899
|
| 'domain_create'
|
|
899
900
|
| 'domain_update'
|
|
900
901
|
| 'domain_delete'
|
|
901
|
-
| 'domain_set'
|
|
902
902
|
| 'domain_verify'
|
|
903
903
|
| 'token_create'
|
|
904
904
|
| 'token_consume';
|
|
@@ -919,6 +919,47 @@ export interface Activity {
|
|
|
919
919
|
meta?: string;
|
|
920
920
|
}
|
|
921
921
|
|
|
922
|
+
/**
|
|
923
|
+
* Parsed activity metadata.
|
|
924
|
+
* Different events populate different fields.
|
|
925
|
+
*/
|
|
926
|
+
export interface ActivityMeta {
|
|
927
|
+
// Deployment events
|
|
928
|
+
/** Number of files in deployment */
|
|
929
|
+
files?: number;
|
|
930
|
+
/** Total size in bytes */
|
|
931
|
+
size?: number;
|
|
932
|
+
/** Whether deployment has config */
|
|
933
|
+
hasConfig?: boolean;
|
|
934
|
+
|
|
935
|
+
// Domain events
|
|
936
|
+
/** Whether this was an update (vs create) */
|
|
937
|
+
isUpdate?: boolean;
|
|
938
|
+
/** Whether domain was already verified */
|
|
939
|
+
wasVerified?: boolean;
|
|
940
|
+
/** Previous deployment ID before rebinding */
|
|
941
|
+
previousDeployment?: string;
|
|
942
|
+
/** Tags that were set/updated */
|
|
943
|
+
tags?: string[];
|
|
944
|
+
|
|
945
|
+
// Account events
|
|
946
|
+
/** OAuth provider name */
|
|
947
|
+
provider?: string;
|
|
948
|
+
/** Account email */
|
|
949
|
+
email?: string;
|
|
950
|
+
/** Account display name */
|
|
951
|
+
name?: string;
|
|
952
|
+
|
|
953
|
+
// Plan transition events
|
|
954
|
+
/** Previous plan */
|
|
955
|
+
from?: string;
|
|
956
|
+
/** New plan */
|
|
957
|
+
to?: string;
|
|
958
|
+
|
|
959
|
+
/** Allow additional fields for future use */
|
|
960
|
+
[key: string]: unknown;
|
|
961
|
+
}
|
|
962
|
+
|
|
922
963
|
/**
|
|
923
964
|
* Response from GET /activities endpoint
|
|
924
965
|
*/
|