@morehao/trendradar-contract 0.3.0 → 0.4.0

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/gen/ts/index.d.ts CHANGED
@@ -43,14 +43,16 @@ export interface RunRequest {
43
43
  "date"?: string;
44
44
  "dryRun"?: boolean;
45
45
  "outputDir"?: string;
46
- "action"?: "list" | "add" | "remove";
46
+ "action"?: "list" | "add" | "remove" | "releases";
47
47
  "repo"?: string;
48
+ "volume"?: number;
49
+ "stages"?: Array<"trending" | "digest" | "releases">;
48
50
  }
49
51
 
50
52
  export interface RunResult {
51
53
  "ipcSchema": 2;
52
54
  "ok": boolean;
53
- "command": "run" | "serve" | "config" | "version";
55
+ "command": "run" | "serve" | "config" | "version" | "subscribe";
54
56
  "startedAt": string;
55
57
  "finishedAt": string;
56
58
  "skipped": boolean;
@@ -63,6 +65,8 @@ export interface RunResult {
63
65
  "warnings"?: Array<string>;
64
66
  "usage"?: Usage;
65
67
  "releases"?: ReleasesReport;
68
+ "subscriptions"?: SubscriptionList;
69
+ "subscriptionDoc"?: SubscriptionDoc;
66
70
  [k: string]: unknown;
67
71
  }
68
72
 
@@ -104,7 +108,7 @@ export interface ReleaseItem {
104
108
  "prerelease": boolean;
105
109
  "draft": boolean;
106
110
  "bodyExcerpt"?: string;
107
- "summaryZh": string;
111
+ "summaryZh"?: string;
108
112
  "summarySource": "model" | "original";
109
113
  [k: string]: unknown;
110
114
  }
@@ -114,6 +118,9 @@ export interface RepoReleases {
114
118
  "url": string;
115
119
  "latestTag": string;
116
120
  "newCount": number;
121
+ "periodStart"?: string;
122
+ "periodEnd"?: string;
123
+ "summaryZh"?: string;
117
124
  "releases": Array<ReleaseItem>;
118
125
  [k: string]: unknown;
119
126
  }
@@ -121,6 +128,8 @@ export interface RepoReleases {
121
128
  export interface ReleasesReport {
122
129
  "enabled": boolean;
123
130
  "repos": number;
131
+ "checked": number;
132
+ "changed": number;
124
133
  "newReleases": number;
125
134
  "summarized"?: number;
126
135
  "degraded"?: number;
@@ -143,8 +152,39 @@ export interface ReleaseManifestEntry {
143
152
  [k: string]: unknown;
144
153
  }
145
154
 
155
+ export type SubscriptionStatus = "baseline" | "ok" | "no_change" | "rate_limited" | "failed";
156
+
157
+ export interface SubscriptionItem {
158
+ "fullName": string;
159
+ "url"?: string;
160
+ "latestTag"?: string;
161
+ "latestSummaryAt"?: string;
162
+ "lastCheckedAt"?: string;
163
+ "status": SubscriptionStatus;
164
+ [k: string]: unknown;
165
+ }
166
+
146
167
  export interface SubscriptionList {
147
168
  "repos": Array<string>;
169
+ "items"?: Array<SubscriptionItem>;
170
+ [k: string]: unknown;
171
+ }
172
+
173
+ export interface SubscriptionVolume {
174
+ "index": number;
175
+ "file": string;
176
+ "from"?: string;
177
+ "to"?: string;
178
+ "lines"?: number;
179
+ [k: string]: unknown;
180
+ }
181
+
182
+ export interface SubscriptionDoc {
183
+ "fullName": string;
184
+ "volume": number;
185
+ "volumes"?: Array<SubscriptionVolume>;
186
+ "updatedAt"?: string;
187
+ "markdown": string;
148
188
  [k: string]: unknown;
149
189
  }
150
190
 
@@ -169,7 +209,7 @@ export interface Digest {
169
209
  }
170
210
 
171
211
  export interface ReleaseDigest {
172
- "schema": 1;
212
+ "schema": 2;
173
213
  "date": string;
174
214
  "period": "daily" | "weekly" | "monthly";
175
215
  "contentHash": string;
@@ -202,6 +242,10 @@ export declare const fixtures: {
202
242
  releaseNormal: ReleaseDigest;
203
243
  releaseDegraded: ReleaseDigest;
204
244
  releaseEmpty: ReleaseDigest;
245
+ releaseWeekly: ReleaseDigest;
246
+ subscriptionsNormal: SubscriptionList;
247
+ subscriptions40: SubscriptionList;
248
+ subscriptionDocNormal: SubscriptionDoc;
205
249
  };
206
250
  export declare const validators: {
207
251
  runRequest: (value: unknown) => boolean;
@@ -209,6 +253,8 @@ export declare const validators: {
209
253
  digest: (value: unknown) => boolean;
210
254
  releases: (value: unknown) => boolean;
211
255
  releasesReport: (value: unknown) => boolean;
256
+ subscriptionList: (value: unknown) => boolean;
257
+ subscriptionDoc: (value: unknown) => boolean;
212
258
  versionInfo: (value: unknown) => boolean;
213
259
  };
214
260
  export declare const rawSchema: {