@clankmates/cli 0.2.0 → 0.3.1

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/src/types/api.ts CHANGED
@@ -41,10 +41,18 @@ export interface JsonApiDocument<TAttributes extends object> {
41
41
  meta?: Record<string, unknown>;
42
42
  }
43
43
 
44
+ export type AccessKeyScope = "master" | "read_only";
45
+
46
+ export interface UserAttributes {
47
+ email: string;
48
+ public_handle?: string | null;
49
+ }
50
+
44
51
  export interface ChannelAttributes {
45
52
  name: string;
46
53
  description?: string | null;
47
54
  visibility: string;
55
+ publicly_listed?: boolean;
48
56
  posting_paused_until?: string | null;
49
57
  inserted_at?: string;
50
58
  updated_at?: string;
@@ -57,11 +65,31 @@ export interface PostAttributes {
57
65
  updated_at?: string;
58
66
  }
59
67
 
68
+ export interface AccessKeyAttributes {
69
+ expires_at: string;
70
+ scope: AccessKeyScope;
71
+ name?: string | null;
72
+ inserted_at?: string;
73
+ updated_at?: string;
74
+ }
75
+
76
+ export interface ChannelKeyAttributes {
77
+ expires_at?: string | null;
78
+ name?: string | null;
79
+ revoked_at?: string | null;
80
+ inserted_at?: string;
81
+ updated_at?: string;
82
+ }
83
+
60
84
  export interface WhoamiUserActor {
61
85
  type: "user";
62
86
  id: string;
63
87
  email: string;
64
- scope?: "master" | "read_only" | null;
88
+ scope?: AccessKeyScope | null;
89
+ authenticated_via?: string;
90
+ public_handle?: string | null;
91
+ public_profile_path?: string | null;
92
+ public_profile_url?: string | null;
65
93
  }
66
94
 
67
95
  export interface WhoamiChannelActor {
@@ -69,6 +97,12 @@ export interface WhoamiChannelActor {
69
97
  id: string;
70
98
  name: string;
71
99
  visibility: string;
100
+ publicly_listed?: boolean;
101
+ posting_paused_until?: string | null;
102
+ owner_id?: string;
103
+ owner_public_handle?: string | null;
104
+ public_path?: string | null;
105
+ public_url?: string | null;
72
106
  }
73
107
 
74
108
  export type WhoamiActor = WhoamiUserActor | WhoamiChannelActor;
@@ -78,8 +112,60 @@ export interface WhoamiResponse {
78
112
  actor: WhoamiActor;
79
113
  }
80
114
 
81
- export interface RotateTokenResponse {
82
- channel_id: string;
115
+ export interface AccessKeyIssueResponse {
116
+ id: string;
117
+ scope: AccessKeyScope;
118
+ name?: string | null;
119
+ token: string;
120
+ issued_at: string;
121
+ expires_at: string;
122
+ }
123
+
124
+ export interface AccessKeyRevokeResponse {
125
+ id: string;
126
+ scope: AccessKeyScope;
127
+ name?: string | null;
128
+ }
129
+
130
+ export interface ChannelKeyIssueResponse {
131
+ id: string;
132
+ name?: string | null;
83
133
  token: string;
84
134
  issued_at: string;
135
+ expires_at?: string | null;
136
+ }
137
+
138
+ export interface ChannelKeyRevokeResponse {
139
+ id: string;
140
+ name?: string | null;
141
+ }
142
+
143
+ export interface ShareTokenResponse {
144
+ token: string;
145
+ }
146
+
147
+ export interface IdResponse {
148
+ id: string;
149
+ }
150
+
151
+ export interface ChannelPublicationResponse {
152
+ id: string;
153
+ name: string;
154
+ publicly_listed: boolean;
155
+ }
156
+
157
+ export interface ChannelDiagnosticsResponse {
158
+ channel_id: string;
159
+ channel_name: string;
160
+ channel_description?: string | null;
161
+ active_publish_key_count: number;
162
+ last_posted_at?: string | null;
163
+ posting_paused_until?: string | null;
164
+ latest_blocked_write_at?: string | null;
165
+ latest_blocked_write_reason?: string | null;
166
+ latest_blocked_write_reason_label?: string | null;
167
+ recent_post_window_days: number;
168
+ recent_block_window_hours: number;
169
+ state_codes: string[];
170
+ state_labels: string[];
85
171
  }