@rox-one/sdk 0.7.0 → 0.7.1
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/dist/generated/email/types.gen.d.ts +4 -4
- package/dist/src/config.d.ts +3 -3
- package/dist/src/entities/activity/namespace.d.ts +3 -3
- package/dist/src/entities/agent-sessions/namespace.d.ts +4 -4
- package/dist/src/entities/ai/namespace.d.ts +1 -1
- package/dist/src/entities/calendar/booking-namespace.d.ts +1 -1
- package/dist/src/entities/calendar/namespace.d.ts +2 -2
- package/dist/src/entities/canvases/canvas.d.ts +1 -1
- package/dist/src/entities/channels/channel.d.ts +3 -3
- package/dist/src/entities/channels/message.d.ts +1 -1
- package/dist/src/entities/channels/namespace.d.ts +1 -1
- package/dist/src/entities/channels/thread.d.ts +2 -2
- package/dist/src/entities/chats/namespace.d.ts +2 -2
- package/dist/src/entities/connected-apps/namespace.d.ts +3 -3
- package/dist/src/entities/crm/pipelines.d.ts +1 -1
- package/dist/src/entities/databases/namespace.d.ts +4 -4
- package/dist/src/entities/databases/saved-query.d.ts +1 -1
- package/dist/src/entities/documents/document.d.ts +1 -1
- package/dist/src/entities/documents/namespace.d.ts +5 -5
- package/dist/src/entities/email/body-rox-compat.d.ts +22 -0
- package/dist/src/entities/email/draft.d.ts +5 -1
- package/dist/src/entities/email/namespace.d.ts +2 -2
- package/dist/src/entities/external-chat/namespace.d.ts +2 -2
- package/dist/src/entities/favorites/namespace.d.ts +1 -1
- package/dist/src/entities/harnesses/namespace.d.ts +1 -1
- package/dist/src/entities/images/image.d.ts +2 -2
- package/dist/src/entities/images/namespace.d.ts +2 -2
- package/dist/src/entities/initiatives/initiative.d.ts +1 -1
- package/dist/src/entities/me/namespace.d.ts +5 -5
- package/dist/src/entities/memory/namespace.d.ts +4 -4
- package/dist/src/entities/pins/namespace.d.ts +1 -1
- package/dist/src/entities/projects/namespace.d.ts +1 -1
- package/dist/src/entities/routines/namespace.d.ts +8 -8
- package/dist/src/entities/routines/suggestion.d.ts +1 -1
- package/dist/src/entities/search/namespace.d.ts +6 -6
- package/dist/src/entities/search/options.d.ts +1 -1
- package/dist/src/entities/spreadsheets/spreadsheet.d.ts +6 -6
- package/dist/src/entities/suggestions/namespace.d.ts +5 -5
- package/dist/src/entities/suggestions/suggestion.d.ts +3 -3
- package/dist/src/entities/ui/app-link.d.ts +2 -2
- package/dist/src/entities/ui/namespace.d.ts +3 -3
- package/dist/src/entities/users/namespace.d.ts +2 -2
- package/dist/src/entities/users/profile-picture.d.ts +1 -1
- package/dist/src/entities/users/user.d.ts +3 -3
- package/dist/src/entities/web/namespace.d.ts +3 -3
- package/dist/src/entities/webhooks/webhook.d.ts +2 -2
- package/dist/src/entities/whatsapp/namespace.d.ts +2 -2
- package/dist/src/entities/workspace/namespace.d.ts +6 -6
- package/dist/src/events/receiver.d.ts +3 -3
- package/dist/src/rox.d.ts +1 -0
- package/dist/src/rox.js +60 -46
- package/dist/src/utils/unwrap.d.ts +1 -1
- package/package.json +1 -1
package/dist/src/rox.js
CHANGED
|
@@ -785,7 +785,7 @@ var User = class _User extends PropertiedEntity {
|
|
|
785
785
|
*
|
|
786
786
|
* A picture set through Rox is a `StaticImage`; an older picture stored as
|
|
787
787
|
* a bare URL is an `ExternalProfilePicture`. For many users at once use
|
|
788
|
-
* `
|
|
788
|
+
* `rox.users.profilePictures`.
|
|
789
789
|
*
|
|
790
790
|
* @returns The picture, or `undefined` if the user has none.
|
|
791
791
|
*
|
|
@@ -828,7 +828,7 @@ var User = class _User extends PropertiedEntity {
|
|
|
828
828
|
}
|
|
829
829
|
/**
|
|
830
830
|
* Open (or create) your 1:1 direct-message channel with this user. For a
|
|
831
|
-
* group DM, use `
|
|
831
|
+
* group DM, use `rox.channels.private(users)`.
|
|
832
832
|
*
|
|
833
833
|
* @returns The DM `Channel`.
|
|
834
834
|
*
|
|
@@ -847,7 +847,7 @@ var User = class _User extends PropertiedEntity {
|
|
|
847
847
|
* Anyone outside the caller's current teams fails with 403.
|
|
848
848
|
*
|
|
849
849
|
* @example
|
|
850
|
-
* const me = await
|
|
850
|
+
* const me = await rox.users.me();
|
|
851
851
|
* const reports = await me.activity({ start: '2026-10-01', end: '2026-10-31' });
|
|
852
852
|
* const weeks = reports.filter((report) => report.granularity === 'week');
|
|
853
853
|
*
|
|
@@ -1490,9 +1490,9 @@ var Thread = class _Thread {
|
|
|
1490
1490
|
*
|
|
1491
1491
|
* @param body - Plain text, or a rich body composed with {@link msg}.
|
|
1492
1492
|
* @param opts.images - Static images to attach, such as one from
|
|
1493
|
-
* `
|
|
1493
|
+
* `rox.images.generate()`.
|
|
1494
1494
|
* @param opts.documents - Rox documents to attach as file chips, such as
|
|
1495
|
-
* a file from `
|
|
1495
|
+
* a file from `rox.documents.upload()`.
|
|
1496
1496
|
* @param opts.silent - Send no push, email or inbox entry to anyone,
|
|
1497
1497
|
* mentioned people included; the reply still appears in the thread.
|
|
1498
1498
|
* @returns The created reply.
|
|
@@ -1558,7 +1558,7 @@ var Message = class _Message extends FavoritableEntity {
|
|
|
1558
1558
|
}
|
|
1559
1559
|
/**
|
|
1560
1560
|
* The message's URL in the Rox web app: its channel, scrolled to it. Pass
|
|
1561
|
-
* the message to `
|
|
1561
|
+
* the message to `rox.ui.open` to show it to the user.
|
|
1562
1562
|
*
|
|
1563
1563
|
* @readonly
|
|
1564
1564
|
*/
|
|
@@ -1934,7 +1934,7 @@ var Canvas = class {
|
|
|
1934
1934
|
*
|
|
1935
1935
|
* @example Find the items labelled "Risk".
|
|
1936
1936
|
* ```js
|
|
1937
|
-
* const canvas =
|
|
1937
|
+
* const canvas = rox.documents.byId(id).canvas();
|
|
1938
1938
|
* const scene = await canvas.scene();
|
|
1939
1939
|
* const risks = scene.items.filter((item) => item.text?.includes('Risk'));
|
|
1940
1940
|
* return { data: { revision: scene.revision, risks: risks.map((item) => ({ id: item.id, bounds: item.bounds })) } };
|
|
@@ -3139,7 +3139,7 @@ var Document = class _Document extends PropertiedEntity {
|
|
|
3139
3139
|
* ```js
|
|
3140
3140
|
* const file = await attachment.toDocument();
|
|
3141
3141
|
* const bytes = await file.bytes();
|
|
3142
|
-
* const copy = await
|
|
3142
|
+
* const copy = await rox.documents.upload({
|
|
3143
3143
|
* name: await attachment.filename(),
|
|
3144
3144
|
* content: bytes,
|
|
3145
3145
|
* project,
|
|
@@ -4743,7 +4743,7 @@ var Initiative = class _Initiative extends RoxEntity {
|
|
|
4743
4743
|
);
|
|
4744
4744
|
/**
|
|
4745
4745
|
* Tasks in this initiative. For their names, pass them to
|
|
4746
|
-
* `
|
|
4746
|
+
* `rox.tasks.summaries` (one request) instead of calling `name()` on each.
|
|
4747
4747
|
*/
|
|
4748
4748
|
tasks = this.mappedField(
|
|
4749
4749
|
"taskIds",
|
|
@@ -7496,8 +7496,8 @@ var Channel = class _Channel extends PropertiedEntity {
|
|
|
7496
7496
|
* Post a message; pass `silent: true` for a routine update that should
|
|
7497
7497
|
* notify nobody. Plain text, or a rich body composed with `msg`.
|
|
7498
7498
|
* `images` attaches static images, such as one from
|
|
7499
|
-
* `
|
|
7500
|
-
* documents as file chips, such as a file from `
|
|
7499
|
+
* `rox.images.generate()`, below the text; `documents` attaches Macro
|
|
7500
|
+
* documents as file chips, such as a file from `rox.documents.upload()`.
|
|
7501
7501
|
* `silent` sends no push, email or inbox entry to anyone, mentioned people
|
|
7502
7502
|
* included; the message still appears in the channel.
|
|
7503
7503
|
*
|
|
@@ -7507,7 +7507,7 @@ var Channel = class _Channel extends PropertiedEntity {
|
|
|
7507
7507
|
*
|
|
7508
7508
|
* @example Share a generated CSV.
|
|
7509
7509
|
* ```js
|
|
7510
|
-
* const file = await
|
|
7510
|
+
* const file = await rox.documents.upload({ name: 'q3.csv', content: csv });
|
|
7511
7511
|
* await channel.send('Q3 numbers attached.', { documents: [file] });
|
|
7512
7512
|
* ```
|
|
7513
7513
|
*
|
|
@@ -8554,7 +8554,7 @@ var RoxEvents = class {
|
|
|
8554
8554
|
*
|
|
8555
8555
|
* For SSE, register this handler before {@link listen} so the derived
|
|
8556
8556
|
* filters include `message.mentioned`. For persisted webhooks, register the
|
|
8557
|
-
* webhook separately, e.g. `
|
|
8557
|
+
* webhook separately, e.g. `rox.webhooks.create({ filters: [{ events:
|
|
8558
8558
|
* ['message.mentioned'] }], … })`.
|
|
8559
8559
|
*
|
|
8560
8560
|
* @returns An unsubscribe function.
|
|
@@ -8650,7 +8650,7 @@ var RoxEvents = class {
|
|
|
8650
8650
|
* Requires `webhookSecret` (or `ROX_WEBHOOK_SECRET`).
|
|
8651
8651
|
*
|
|
8652
8652
|
* @example
|
|
8653
|
-
* app.post('/webhook',
|
|
8653
|
+
* app.post('/webhook', rox.events.webhook()); // Hono
|
|
8654
8654
|
*/
|
|
8655
8655
|
webhook() {
|
|
8656
8656
|
if (!this.secret) {
|
|
@@ -13077,6 +13077,16 @@ var EmailAttachment = class _EmailAttachment extends RoxEntity {
|
|
|
13077
13077
|
}
|
|
13078
13078
|
};
|
|
13079
13079
|
|
|
13080
|
+
// src/entities/email/body-rox-compat.ts
|
|
13081
|
+
function readBodyRox(source) {
|
|
13082
|
+
if (!source) return null;
|
|
13083
|
+
return source.body_rox ?? source.bodyRox ?? source.body_macro ?? source.bodyMacro ?? null;
|
|
13084
|
+
}
|
|
13085
|
+
function readRestoreBodyRox(source) {
|
|
13086
|
+
if (!source) return null;
|
|
13087
|
+
return source.restore_body_rox ?? source.restoreBodyRox ?? source.restore_body_macro ?? source.restoreBodyMacro ?? null;
|
|
13088
|
+
}
|
|
13089
|
+
|
|
13080
13090
|
// src/entities/email/message.ts
|
|
13081
13091
|
var MAX_REMEMBERED_THREADS = 50;
|
|
13082
13092
|
var rememberedThreads = /* @__PURE__ */ new WeakMap();
|
|
@@ -13683,7 +13693,9 @@ function draftBody(options) {
|
|
|
13683
13693
|
const {
|
|
13684
13694
|
bodyText,
|
|
13685
13695
|
bodyHtml,
|
|
13696
|
+
bodyRox,
|
|
13686
13697
|
bodyMacro,
|
|
13698
|
+
body_macro: bodyMacroWire,
|
|
13687
13699
|
headers,
|
|
13688
13700
|
includeSignature,
|
|
13689
13701
|
draftGeneration,
|
|
@@ -13700,7 +13712,7 @@ function draftBody(options) {
|
|
|
13700
13712
|
(byte) => String.fromCharCode(byte)
|
|
13701
13713
|
).join("")
|
|
13702
13714
|
).replaceAll("+", "-").replaceAll("/", "_").replaceAll("=", ""),
|
|
13703
|
-
|
|
13715
|
+
body_rox: readBodyRox({ bodyRox, bodyMacro, body_macro: bodyMacroWire }) ?? void 0,
|
|
13704
13716
|
headers_json: headers,
|
|
13705
13717
|
include_signature: includeSignature,
|
|
13706
13718
|
draft_generation: draftGeneration,
|
|
@@ -14943,7 +14955,7 @@ var ActivityNamespace = class {
|
|
|
14943
14955
|
* @example
|
|
14944
14956
|
* const to = new Date();
|
|
14945
14957
|
* const from = new Date(to.getTime() - 7 * 24 * 60 * 60 * 1000);
|
|
14946
|
-
* const { activities, truncated } = await
|
|
14958
|
+
* const { activities, truncated } = await rox.activity.mine({ from, to });
|
|
14947
14959
|
*
|
|
14948
14960
|
* @readonly
|
|
14949
14961
|
*/
|
|
@@ -17119,7 +17131,7 @@ var PipelineNamespace = class {
|
|
|
17119
17131
|
* standard ones. Private unless `sharing` is `team`.
|
|
17120
17132
|
*
|
|
17121
17133
|
* @example
|
|
17122
|
-
* await
|
|
17134
|
+
* await rox.crm.pipelines.create({
|
|
17123
17135
|
* name: 'Hiring',
|
|
17124
17136
|
* recordType: 'contact',
|
|
17125
17137
|
* stages: ['Sourced', 'Interview', 'Offer', 'Hired'],
|
|
@@ -17479,7 +17491,7 @@ var Spreadsheet = class _Spreadsheet extends Document {
|
|
|
17479
17491
|
*
|
|
17480
17492
|
* @example Find the totals row.
|
|
17481
17493
|
* ```js
|
|
17482
|
-
* const sheet =
|
|
17494
|
+
* const sheet = rox.documents.spreadsheet(document);
|
|
17483
17495
|
* const { sheets } = await sheet.read();
|
|
17484
17496
|
* const { ranges } = await sheet.read({ sheet: sheets[0], ranges: [sheets[0].usedRange] });
|
|
17485
17497
|
* return { data: ranges[0].cells.filter((cell) => cell.formula?.startsWith('=SUM')) };
|
|
@@ -17514,7 +17526,7 @@ var Spreadsheet = class _Spreadsheet extends Document {
|
|
|
17514
17526
|
*
|
|
17515
17527
|
* @example Compare revenue with a 10% higher price.
|
|
17516
17528
|
* ```js
|
|
17517
|
-
* const sheet =
|
|
17529
|
+
* const sheet = rox.documents.spreadsheet(document);
|
|
17518
17530
|
* const { results } = await sheet.calculate(['=SUM(D2:D50)'], {
|
|
17519
17531
|
* sheet: 'Sales',
|
|
17520
17532
|
* overrides: [{ sheetId: 'Sales', cells: [{ address: 'B1', value: '=1.1*12' }] }],
|
|
@@ -17565,7 +17577,7 @@ var Spreadsheet = class _Spreadsheet extends Document {
|
|
|
17565
17577
|
*
|
|
17566
17578
|
* @example Add a total row and a status dropdown.
|
|
17567
17579
|
* ```js
|
|
17568
|
-
* const sheet =
|
|
17580
|
+
* const sheet = rox.documents.spreadsheet(document);
|
|
17569
17581
|
* const { revision, sheets } = await sheet.read();
|
|
17570
17582
|
* const sheetId = sheets[0].id;
|
|
17571
17583
|
* const { warnings, webUrl } = await sheet.applyEdits(
|
|
@@ -17622,7 +17634,7 @@ var Spreadsheet = class _Spreadsheet extends Document {
|
|
|
17622
17634
|
*
|
|
17623
17635
|
* @example Add a summary.
|
|
17624
17636
|
* ```js
|
|
17625
|
-
* const sheet =
|
|
17637
|
+
* const sheet = rox.documents.spreadsheet(document);
|
|
17626
17638
|
* const { changes, warnings, webUrl } = await sheet.edit(
|
|
17627
17639
|
* 'On the "Expenses" sheet, add a Total row under the last item that sums the Cost column, in bold.',
|
|
17628
17640
|
* );
|
|
@@ -17754,7 +17766,7 @@ var DocumentNamespace = class {
|
|
|
17754
17766
|
* @example Upload a generated CSV and share it in a channel.
|
|
17755
17767
|
* ```js
|
|
17756
17768
|
* const rows = [['name', 'amount'], ['Acme', 1200]];
|
|
17757
|
-
* const file = await
|
|
17769
|
+
* const file = await rox.documents.upload({
|
|
17758
17770
|
* name: 'invoices.csv',
|
|
17759
17771
|
* content: rows.map((row) => row.join(',')).join('\n'),
|
|
17760
17772
|
* });
|
|
@@ -17853,7 +17865,7 @@ var DocumentNamespace = class {
|
|
|
17853
17865
|
*
|
|
17854
17866
|
* @example Create and fill a budget, keeping the spreadsheet if a step fails.
|
|
17855
17867
|
* ```js
|
|
17856
|
-
* const sheet = await
|
|
17868
|
+
* const sheet = await rox.documents.createSpreadsheet({ name: 'Q4 budget' });
|
|
17857
17869
|
* try {
|
|
17858
17870
|
* const { revision, sheets } = await sheet.read();
|
|
17859
17871
|
* await sheet.applyEdits(
|
|
@@ -17908,7 +17920,7 @@ var DocumentNamespace = class {
|
|
|
17908
17920
|
* a skill mention or of a search result:
|
|
17909
17921
|
*
|
|
17910
17922
|
* ```js
|
|
17911
|
-
* const skill =
|
|
17923
|
+
* const skill = rox.documents.byId(skillId);
|
|
17912
17924
|
* const instructions = await skill.content();
|
|
17913
17925
|
* ```
|
|
17914
17926
|
*
|
|
@@ -17935,7 +17947,7 @@ var DocumentNamespace = class {
|
|
|
17935
17947
|
* updated first, then built-in skills.
|
|
17936
17948
|
*
|
|
17937
17949
|
* ```js
|
|
17938
|
-
* const [match] = await
|
|
17950
|
+
* const [match] = await rox.documents.skills({ query: 'deploy' });
|
|
17939
17951
|
* const instructions = match && (await match.skill.content());
|
|
17940
17952
|
* ```
|
|
17941
17953
|
*
|
|
@@ -18345,7 +18357,7 @@ var EmailNamespace = class {
|
|
|
18345
18357
|
* Search email threads by subject and content. To find a person's emails,
|
|
18346
18358
|
* search for their quoted email address, not their name: a name only
|
|
18347
18359
|
* matches where that display name appears. Resolve the address first, for
|
|
18348
|
-
* example with `
|
|
18360
|
+
* example with `rox.users.search(name)`.
|
|
18349
18361
|
*
|
|
18350
18362
|
* @readonly
|
|
18351
18363
|
*/
|
|
@@ -19575,7 +19587,7 @@ var ImagesNamespace = class {
|
|
|
19575
19587
|
* let the message reserve space before the image loads.
|
|
19576
19588
|
*
|
|
19577
19589
|
* @example
|
|
19578
|
-
* const image = await
|
|
19590
|
+
* const image = await rox.images.generate({
|
|
19579
19591
|
* prompt: 'A watercolor lighthouse at dusk',
|
|
19580
19592
|
* aspectRatio: 'widescreen',
|
|
19581
19593
|
* });
|
|
@@ -19970,13 +19982,13 @@ var MeNamespace = class {
|
|
|
19970
19982
|
* signing in, so teammates can tell who they are working with.
|
|
19971
19983
|
*
|
|
19972
19984
|
* @example
|
|
19973
|
-
* const image = await
|
|
19985
|
+
* const image = await rox.me.uploadProfilePicture(bytes, {
|
|
19974
19986
|
* fileName: 'avatar.png',
|
|
19975
19987
|
* contentType: 'image/png',
|
|
19976
19988
|
* });
|
|
19977
|
-
* await
|
|
19989
|
+
* await rox.me.update({ name: 'Research Agent', profilePicture: image });
|
|
19978
19990
|
* // Later, switch back to it from its saved id:
|
|
19979
|
-
* await
|
|
19991
|
+
* await rox.me.update({ profilePicture: rox.images.byId(savedId) });
|
|
19980
19992
|
*
|
|
19981
19993
|
* @write
|
|
19982
19994
|
* @idempotent
|
|
@@ -20068,7 +20080,7 @@ var MemoryNamespace = class {
|
|
|
20068
20080
|
* newline-separated, and edits address its one-based lines.
|
|
20069
20081
|
*
|
|
20070
20082
|
* @example
|
|
20071
|
-
* const memory = await
|
|
20083
|
+
* const memory = await rox.memory.read();
|
|
20072
20084
|
* const lines = memory.content.split('\n');
|
|
20073
20085
|
*
|
|
20074
20086
|
* @readonly
|
|
@@ -20085,9 +20097,9 @@ var MemoryNamespace = class {
|
|
|
20085
20097
|
* retrying. Insert at `lines.length + 1` to append.
|
|
20086
20098
|
*
|
|
20087
20099
|
* @example
|
|
20088
|
-
* const memory = await
|
|
20100
|
+
* const memory = await rox.memory.read();
|
|
20089
20101
|
* const lines = memory.content ? memory.content.split('\n') : [];
|
|
20090
|
-
* await
|
|
20102
|
+
* await rox.memory.edit(
|
|
20091
20103
|
* { action: 'insert', line: lines.length + 1, content: 'Prefers metric units' },
|
|
20092
20104
|
* memory.revision,
|
|
20093
20105
|
* );
|
|
@@ -21025,7 +21037,7 @@ var RoutineNamespace = class {
|
|
|
21025
21037
|
*
|
|
21026
21038
|
* @example
|
|
21027
21039
|
* // Every ten minutes, in New York time.
|
|
21028
|
-
* const routine = await
|
|
21040
|
+
* const routine = await rox.routines.create({
|
|
21029
21041
|
* name: 'Check the import',
|
|
21030
21042
|
* trigger: {
|
|
21031
21043
|
* type: 'cron',
|
|
@@ -21041,7 +21053,7 @@ var RoutineNamespace = class {
|
|
|
21041
21053
|
* ],
|
|
21042
21054
|
* });
|
|
21043
21055
|
* // Once, at 14:30 on 3 November 2027.
|
|
21044
|
-
* await
|
|
21056
|
+
* await rox.routines.create({
|
|
21045
21057
|
* name: 'Follow up on the review',
|
|
21046
21058
|
* trigger: { type: 'cron', schedule: '0 30 14 3 11 * 2027', timezone: 'UTC' },
|
|
21047
21059
|
* steps: [
|
|
@@ -21054,7 +21066,7 @@ var RoutineNamespace = class {
|
|
|
21054
21066
|
* });
|
|
21055
21067
|
* // A code step that posts in a channel, disabled until turned on. The
|
|
21056
21068
|
* // user asked for the post to come from them.
|
|
21057
|
-
* await
|
|
21069
|
+
* await rox.routines.create({
|
|
21058
21070
|
* name: 'Say hello',
|
|
21059
21071
|
* trigger: { type: 'once', at: '2027-11-03T14:30:00Z' },
|
|
21060
21072
|
* enabled: false,
|
|
@@ -21063,14 +21075,14 @@ var RoutineNamespace = class {
|
|
|
21063
21075
|
* type: 'code',
|
|
21064
21076
|
* title: 'Post hello',
|
|
21065
21077
|
* source: `export async function main({ macro }: StepContext) {
|
|
21066
|
-
* await
|
|
21078
|
+
* await rox.channels.byId('<channel id>').send('Hello');
|
|
21067
21079
|
* }`,
|
|
21068
21080
|
* },
|
|
21069
21081
|
* ],
|
|
21070
21082
|
* dangerouslyOperateAsUser: true,
|
|
21071
21083
|
* });
|
|
21072
21084
|
* // In a routine's code step: one follow-up per task, however often it runs.
|
|
21073
|
-
* await
|
|
21085
|
+
* await rox.routines.create(
|
|
21074
21086
|
* {
|
|
21075
21087
|
* name: `Check on ${taskName}`,
|
|
21076
21088
|
* trigger: { type: 'once', at: tomorrow },
|
|
@@ -21109,7 +21121,7 @@ var RoutineNamespace = class {
|
|
|
21109
21121
|
* exists.
|
|
21110
21122
|
*
|
|
21111
21123
|
* @example
|
|
21112
|
-
* const check = await
|
|
21124
|
+
* const check = await rox.routines.check({
|
|
21113
21125
|
* name: 'Say hello',
|
|
21114
21126
|
* trigger: { type: 'once', at: '2027-11-03T14:30:00Z' },
|
|
21115
21127
|
* steps: [{ type: 'code', title: 'Post hello', source }],
|
|
@@ -21147,7 +21159,7 @@ var RoutineNamespace = class {
|
|
|
21147
21159
|
* not, the `problems` to fix before suggesting it again.
|
|
21148
21160
|
*
|
|
21149
21161
|
* @example
|
|
21150
|
-
* const outcome = await
|
|
21162
|
+
* const outcome = await rox.routines.suggest({
|
|
21151
21163
|
* kind: 'catalog',
|
|
21152
21164
|
* key: 'inbox',
|
|
21153
21165
|
* knobs: {},
|
|
@@ -22161,7 +22173,7 @@ var Suggestion = class _Suggestion {
|
|
|
22161
22173
|
* Attach a reply draft to this open reply suggestion, with a `reason`; it replaces
|
|
22162
22174
|
* the suggestion's old draft. Only a suggestions generation session may. The draft is
|
|
22163
22175
|
* the user's own unsent draft in the thread the suggestion is about, from
|
|
22164
|
-
* `
|
|
22176
|
+
* `rox.email.createDraft({thread, replyingTo, ...}, await thread.link())`.
|
|
22165
22177
|
* Nothing is sent.
|
|
22166
22178
|
*/
|
|
22167
22179
|
async attachDraft(draft, reason) {
|
|
@@ -22207,7 +22219,7 @@ var SuggestionNamespace = class {
|
|
|
22207
22219
|
* generation session gets a 403.
|
|
22208
22220
|
*
|
|
22209
22221
|
* @example
|
|
22210
|
-
* const suggestions = await
|
|
22222
|
+
* const suggestions = await rox.suggestions.list({ limit: 5 });
|
|
22211
22223
|
* return suggestions.map((suggestion) => ({ title: suggestion.title, status: suggestion.status }));
|
|
22212
22224
|
*/
|
|
22213
22225
|
async list(options = {}) {
|
|
@@ -22244,7 +22256,7 @@ var SuggestionNamespace = class {
|
|
|
22244
22256
|
* one comes back only with a `reason`. Its kind never changes.
|
|
22245
22257
|
*
|
|
22246
22258
|
* @example
|
|
22247
|
-
* const outcome = await
|
|
22259
|
+
* const outcome = await rox.suggestions.suggest({
|
|
22248
22260
|
* kind: 'entity',
|
|
22249
22261
|
* dedupKey: `thread:${thread.id}:reply`,
|
|
22250
22262
|
* title: 'Reply to the venue',
|
|
@@ -22488,7 +22500,7 @@ var UserNamespace = class {
|
|
|
22488
22500
|
* a picture are absent from the map.
|
|
22489
22501
|
*
|
|
22490
22502
|
* @example
|
|
22491
|
-
* const pictures = await
|
|
22503
|
+
* const pictures = await rox.users.profilePictures(teammates);
|
|
22492
22504
|
* const mine = pictures.get(teammates[0]);
|
|
22493
22505
|
*
|
|
22494
22506
|
* @readonly
|
|
@@ -22548,7 +22560,7 @@ var WebNamespace = class {
|
|
|
22548
22560
|
* page, best match first. Cite the URLs you use.
|
|
22549
22561
|
*
|
|
22550
22562
|
* @example
|
|
22551
|
-
* const { results } = await
|
|
22563
|
+
* const { results } = await rox.web.search('Tokio 1.48 release notes', {
|
|
22552
22564
|
* domains: ['tokio.rs'],
|
|
22553
22565
|
* maxResults: 3,
|
|
22554
22566
|
* });
|
|
@@ -22577,7 +22589,7 @@ var WebNamespace = class {
|
|
|
22577
22589
|
* whether it was). Use it when a search snippet is not enough; cite the URL.
|
|
22578
22590
|
*
|
|
22579
22591
|
* @example
|
|
22580
|
-
* const page = await
|
|
22592
|
+
* const page = await rox.web.fetch('https://tokio.rs/blog/2025-10-tokio-1-48');
|
|
22581
22593
|
* console.log(page.content);
|
|
22582
22594
|
*
|
|
22583
22595
|
* @readonly
|
|
@@ -23212,6 +23224,8 @@ export {
|
|
|
23212
23224
|
WhatsAppChat,
|
|
23213
23225
|
here,
|
|
23214
23226
|
msg,
|
|
23227
|
+
readBodyRox,
|
|
23228
|
+
readRestoreBodyRox,
|
|
23215
23229
|
toBody,
|
|
23216
23230
|
wrapXml
|
|
23217
23231
|
};
|
|
@@ -19,7 +19,7 @@ export declare class RoxApiError extends RoxError {
|
|
|
19
19
|
* Agents: tell the user they can only view the item and offer to ask its owner
|
|
20
20
|
* for edit access. Request it only with the user's go-ahead, by calling
|
|
21
21
|
* `access.request('edit')` on the item (for example
|
|
22
|
-
* `
|
|
22
|
+
* `rox.initiatives.byId(id).access.request('edit')`); never request access
|
|
23
23
|
* on your own. The request grants nothing: report that it is pending and who
|
|
24
24
|
* reviews it (`access.state()` returns the `owner`), and do not claim the
|
|
25
25
|
* write succeeded. Check `access.state()` later and retry the write only once
|