@erxes/plugin-sdk 0.1.0-v2.10 → 0.1.0-v2.11

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +8 -0
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -29,6 +29,14 @@
29
29
  * // An invoice may list what it pays for; `plugin` names another plugin's line (it gets the events):
30
30
  * // lines: [{ productId, quantity: 1, unitPrice: 150000 }, { name: 'Delivery', quantity: 1, unitPrice: 10000, plugin: 'tms' }]
31
31
  *
32
+ * Branches and departments (scopes `units:read`, `units:write`; subscribe to `core.unit.*`): core's,
33
+ * shared by plugins. Keep a read-only copy for your own visibility queries and refresh it whenever
34
+ * a `core.unit.*` event arrives (the event names the unit in `entityId`); bring your old units in
35
+ * once with `units.import`, which keeps their ids and answers where each one went.
36
+ *
37
+ * const { data } = await core.forOrg(orgId).units.list({}); // every unit, parents first, with memberIds
38
+ * const { ids } = await core.forOrg(orgId).units.import({ units: [{ id, kind: 'branch', name, memberIds }] });
39
+ *
32
40
  * Fields on customers and companies (rollups; scope `fields:write`): declare them in the manifest,
33
41
  * then write their values. Members see them read-only and filter by them; no timeline entry or event.
34
42
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erxes/plugin-sdk",
3
- "version": "0.1.0-v2.10",
3
+ "version": "0.1.0-v2.11",
4
4
  "private": false,
5
5
  "description": "For erxes plugin servers: a typed core client with automatic plugin tokens, verification of members' plugin session tokens and of core's deliveries, and plugin jobs",
6
6
  "license": "AGPL-3.0-only",
@@ -33,7 +33,7 @@
33
33
  "@orpc/openapi-client": "1.16.2",
34
34
  "jose": "^6.2.17",
35
35
  "zod": "^4.6.7",
36
- "@erxes/core-contract": "0.1.0-v2.11"
36
+ "@erxes/core-contract": "0.1.0-v2.12"
37
37
  },
38
38
  "devDependencies": {
39
39
  "drizzle-orm": "0.45.4"