@glassly/cloud-client 0.3.8-dev.999 → 0.4.0-dev.1018

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glassly/cloud-client",
3
- "version": "0.3.8-dev.999",
3
+ "version": "0.4.0-dev.1018",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "exports": {
@@ -12,7 +12,7 @@
12
12
  "test": "bun test"
13
13
  },
14
14
  "dependencies": {
15
- "@glassly/cloud-protocol": "0.3.8-dev.999",
15
+ "@glassly/cloud-protocol": "0.4.0-dev.1018",
16
16
  "tweetnacl": "^1.0.3"
17
17
  },
18
18
  "devDependencies": {
package/src/index.ts CHANGED
@@ -51,6 +51,8 @@ export type {
51
51
  StoreListingHardwareRequirement,
52
52
  StoreListingPermission,
53
53
  StoreListingScreenshot,
54
+ StoreRelease,
55
+ StoreReleasesResponse,
54
56
  } from "./modules/core/core";
55
57
 
56
58
  export type {
@@ -105,6 +105,25 @@ export interface StoreCatalogResponse {
105
105
  listings: StoreListing[];
106
106
  }
107
107
 
108
+ /** One published release of a listing (`GET /api/client/store/:packageName/releases`). */
109
+ export interface StoreRelease {
110
+ version: string;
111
+ /** The listing's active release. */
112
+ current: boolean;
113
+ /** Lowest Glassly App version the release runs on; null when its manifest sets none. */
114
+ minHostVersion: string | null;
115
+ sdkVersion: string | null;
116
+ releaseNotes: string | null;
117
+ bundle: { url: string; sha256: string; sizeBytes: number };
118
+ publishedAt: string;
119
+ }
120
+
121
+ export interface StoreReleasesResponse {
122
+ packageName: string;
123
+ /** Newest version first. */
124
+ releases: StoreRelease[];
125
+ }
126
+
108
127
  /**
109
128
  * `install_once`: installed by default, once. `mandatory`: reinstalled
110
129
  * whenever it is missing. Neither updates a miniapp the phone has; the Store
@@ -160,6 +179,7 @@ export class Core {
160
179
  readonly store: {
161
180
  list(): Promise<StoreCatalogResponse>;
162
181
  get(packageName: string): Promise<StoreListing>;
182
+ releases(packageName: string): Promise<StoreReleasesResponse>;
163
183
  fetchAsset(url: string): Promise<Uint8Array>;
164
184
  };
165
185
  readonly reports: {
@@ -210,6 +230,13 @@ export class Core {
210
230
  get(packageName: string): Promise<StoreListing> {
211
231
  return http.get<StoreListing>(`/api/client/store/${encodeURIComponent(packageName)}`, { headers: NO_CACHE });
212
232
  },
233
+ /** Every published release of a listing, newest first, each with its own bundle. */
234
+ releases(packageName: string): Promise<StoreReleasesResponse> {
235
+ return http.get<StoreReleasesResponse>(
236
+ `/api/client/store/${encodeURIComponent(packageName)}/releases`,
237
+ { headers: NO_CACHE },
238
+ );
239
+ },
213
240
  /**
214
241
  * Icons and screenshots need the user Bearer, which an <Image> cannot
215
242
  * attach. Fetch the bytes here; the host writes them to its file cache.