@thatopen/services 0.9.0 → 0.10.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.
@@ -0,0 +1,36 @@
1
+ import { Metadata } from './files';
2
+ import { ItemFolder, ItemVersion } from './items';
3
+
4
+ /**
5
+ * Maximum number of ids the API accepts in one batch request. The client
6
+ * methods split larger inputs into chunks of this size automatically.
7
+ */
8
+ export declare const STORAGE_BATCH_MAX = 100;
9
+ export type BatchError = {
10
+ status: number;
11
+ message: string;
12
+ };
13
+ export type HiddenFileSignedUrlBatchEntry = {
14
+ hiddenFileId: string;
15
+ url?: string;
16
+ expiresAt?: string;
17
+ error?: BatchError;
18
+ };
19
+ export type ItemVersionsBatchEntry = {
20
+ itemId: string;
21
+ versions?: ItemVersion[];
22
+ error?: BatchError;
23
+ };
24
+ export type VersionMetadataBatchRequest = {
25
+ itemId: string;
26
+ versionTag: string;
27
+ };
28
+ export type VersionMetadataBatchEntry = VersionMetadataBatchRequest & {
29
+ metadata?: Metadata;
30
+ error?: BatchError;
31
+ };
32
+ export type ItemFoldersBatchEntry = {
33
+ folderId: string;
34
+ folder?: ItemFolder;
35
+ error?: BatchError;
36
+ };
@@ -20,6 +20,29 @@ export interface NotificationDto {
20
20
  muted: boolean;
21
21
  readAt: string | null;
22
22
  createdAt: string;
23
+ /**
24
+ * What to group consecutive notifications by — the automation id for a run,
25
+ * absent for anything that should stand alone.
26
+ *
27
+ * Derived rather than the raw producer payload, so fifty runs of one
28
+ * automation can collapse into a single row without the whole payload being
29
+ * on the wire for every notification type, forever.
30
+ */
31
+ groupKey?: string;
32
+ /**
33
+ * How an automation run ended, straight from the producer's result.
34
+ *
35
+ * Use this rather than reading the copy. `title` is built from the user's own
36
+ * automation name, so an automation called "Failover sync" makes every
37
+ * successful run look failed to anything matching on the text.
38
+ */
39
+ outcome?: 'success' | 'error' | 'warning';
40
+ /**
41
+ * The automation's name, for a grouped row's heading. Here for the same
42
+ * reason as `outcome`: recovering it by stripping words off the title breaks
43
+ * on any name that contains them.
44
+ */
45
+ groupLabel?: string;
23
46
  }
24
47
  /** `nextCursor` is opaque — pass it back verbatim. Null means the last page. */
25
48
  export interface NotificationPageDto {
@@ -3,6 +3,10 @@
3
3
  "path": "src/core/examples/apps.ts",
4
4
  "description": "App lifecycle — list, get with versions, create, download bundle, and archive."
5
5
  },
6
+ {
7
+ "path": "src/core/examples/batch-reads.ts",
8
+ "description": "Batch reads — sign many hidden files, list versions and metadata for many files, and resolve many folders in one request each."
9
+ },
6
10
  {
7
11
  "path": "src/core/examples/components.ts",
8
12
  "description": "Cloud component lifecycle — list, get with versions, create, update, download bundle, archive, and recover."
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "access": "public"
16
16
  },
17
17
  "private": false,
18
- "version": "0.9.0",
18
+ "version": "0.10.0",
19
19
  "main": "dist/index.cjs.js",
20
20
  "module": "dist/index.es.js",
21
21
  "types": "dist/index.d.ts",