exponential-sdk 1.28.0 → 1.31.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/README.md CHANGED
@@ -60,6 +60,46 @@ Returns all workspaces you have access to.
60
60
 
61
61
  ---
62
62
 
63
+ ### Users
64
+
65
+ ```typescript
66
+ const me = await client.users.me();
67
+ // { id, name, email, image, isAgent, agent: { id, name, owner: { id, name } } | null }
68
+ ```
69
+
70
+ Who the token signs in as. For an External agent's `exp_agent_…` key this is the agent's own shadow user: `isAgent` is `true` and `agent` names the agent and the person who owns it. When a call comes back `FORBIDDEN`, this is the account to add to the workspace or the restricted project.
71
+
72
+ ---
73
+
74
+ ### Positions (roles & responsibilities)
75
+
76
+ The roles shown on a workspace's settings page (ADR-0068). Writes need a
77
+ person's own API token — agent keys get `FORBIDDEN` — and owner/admin, except
78
+ that a holder who is at least a member may edit their Position's remit.
79
+
80
+ ```typescript
81
+ const { positions, members } = await client.positions.list(workspaceId);
82
+
83
+ const cto = await client.positions.create({
84
+ workspaceId,
85
+ title: 'Technical Director',
86
+ remit: 'Architecture, hiring engineers, the release process.',
87
+ notAccountableFor: 'Sales and marketing.',
88
+ holderUserIds: [userId],
89
+ });
90
+
91
+ await client.positions.update({ workspaceId, positionId: cto.id, remit: '...' });
92
+ await client.positions.setHolders(workspaceId, cto.id, [userId, otherUserId]);
93
+ await client.positions.delete(workspaceId, cto.id);
94
+
95
+ // Upsert by title in one transaction; dryRun shows the plan first.
96
+ await client.positions.importMany({ workspaceId, dryRun: true, positions: [
97
+ { title: 'Travel researcher', remit: 'Flights, hotels, visas.', holderUserIds: [] },
98
+ ] });
99
+ ```
100
+
101
+ ---
102
+
63
103
  ### Projects
64
104
 
65
105
  ```typescript