@antcde/connect-ts 0.4.26-rc.2 → 0.4.26-rc.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.
|
@@ -6,8 +6,34 @@ import type { SbsRecord } from "../services/SbsService";
|
|
|
6
6
|
import type { Table } from "../services/TableService";
|
|
7
7
|
import type { Task } from "../services/TaskService";
|
|
8
8
|
import type { User } from "../services/UserService";
|
|
9
|
+
/**
|
|
10
|
+
* The CRUD lifecycle every resource has, and the **runtime default** for a subscription that
|
|
11
|
+
* names no actions — `host.ts` spreads this array when `observe.actions` is absent.
|
|
12
|
+
*
|
|
13
|
+
* ⚠️ Adding to it changes what every actionless `.with()` receives, everywhere. It is the default
|
|
14
|
+
* subscription, not a list of permitted values.
|
|
15
|
+
*/
|
|
9
16
|
export declare const changes: readonly ["created", "updated", "deleted", "trashed", "restored"];
|
|
10
|
-
export type
|
|
17
|
+
export type CrudChange = typeof changes[number];
|
|
18
|
+
/**
|
|
19
|
+
* A resource action: the CRUD set, or any action the broadcasting side defines.
|
|
20
|
+
*
|
|
21
|
+
* Open by the same `(string & {})` device the resource *type* already uses on `.with()`, and for
|
|
22
|
+
* the same reason. The platform cannot enumerate the actions of things it does not model: an app
|
|
23
|
+
* may publish a specific transition under its own verb so subscribers can ask for that moment
|
|
24
|
+
* alone rather than every `updated` preceding it. The channel is `resource.<type>.<action>`
|
|
25
|
+
* either way — only the vocabulary belongs to the caller.
|
|
26
|
+
*
|
|
27
|
+
* Closing this while leaving the type open was an asymmetry, not a safety measure. It let an app
|
|
28
|
+
* declare a resource the platform had never heard of and then refused to let it name an action on
|
|
29
|
+
* it, so every such subscription was a type error the app could not fix from its own side.
|
|
30
|
+
*
|
|
31
|
+
* The trade is the usual one for an open union: a misspelt CRUD verb no longer fails to compile.
|
|
32
|
+
* That is already the accepted trade one line up for the resource type, and the alternative —
|
|
33
|
+
* this file growing a list of every app's vocabulary — couples the platform to its consumers,
|
|
34
|
+
* which is a worse thing to be wrong about.
|
|
35
|
+
*/
|
|
36
|
+
export type Change = CrudChange | (string & {});
|
|
11
37
|
export interface Cause<T = any> {
|
|
12
38
|
id: string;
|
|
13
39
|
action?: Change;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signalChangeTypes.d.ts","sourceRoot":"","sources":["../../src/comms/signalChangeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,kCAAgC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,+BAA6B;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,mCAAiC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,mCAAiC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA6B;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,iCAA+B;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,gCAA8B;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,gCAA8B;AAElD,eAAO,MAAM,OAAO,mEAAoE,CAAA;AACxF,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"signalChangeTypes.d.ts","sourceRoot":"","sources":["../../src/comms/signalChangeTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,kCAAgC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,+BAA6B;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,mCAAiC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,mCAAiC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA6B;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,iCAA+B;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,gCAA8B;AAClD,OAAO,KAAK,EAAE,IAAI,EAAE,gCAA8B;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,mEAAoE,CAAA;AACxF,MAAM,MAAM,UAAU,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAA;AAE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AAkB,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IAChC;;;;OAIG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;CAC9B"}
|
|
@@ -1 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CRUD lifecycle every resource has, and the **runtime default** for a subscription that
|
|
3
|
+
* names no actions — `host.ts` spreads this array when `observe.actions` is absent.
|
|
4
|
+
*
|
|
5
|
+
* ⚠️ Adding to it changes what every actionless `.with()` receives, everywhere. It is the default
|
|
6
|
+
* subscription, not a list of permitted values.
|
|
7
|
+
*/
|
|
1
8
|
export const changes = ['created', 'updated', 'deleted', 'trashed', 'restored'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskServiceQueries.d.ts","sourceRoot":"","sources":["../../src/services/TaskServiceQueries.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"TaskServiceQueries.d.ts","sourceRoot":"","sources":["../../src/services/TaskServiceQueries.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;CAkEtB,CAAA;AACV,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;CAyCvB,CAAA;AAEV,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,UAqCzD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,UAK1C"}
|
|
@@ -37,7 +37,10 @@ export const defaultGetTaskQuery = {
|
|
|
37
37
|
'labels': ['id', 'name', 'color', 'icon'].join(','),
|
|
38
38
|
'roles': ['id', 'name'].join(','),
|
|
39
39
|
'sbsRecord': ['id', 'code', 'label', 'project'].join(','),
|
|
40
|
-
|
|
40
|
+
// source_type + source_metadata let the client detect external links and open their
|
|
41
|
+
// source_url; parent_id is required so the server-side DMS read-permission gate can walk
|
|
42
|
+
// the folder chain (a partial select without it would wrongly restrict nested files).
|
|
43
|
+
'attachments.dmsFile': ['id', 'token', 'name', 'extension', 'project_id', 'license_id', 'source_type', 'source_metadata', 'parent_id'].join(','),
|
|
41
44
|
'app': ['id', 'title', 'icon', 'color'].join(','),
|
|
42
45
|
},
|
|
43
46
|
include: [
|