@rox-one/sdk 0.0.0-stage → 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/CALLS.md +82 -0
- package/README.md +1259 -2
- package/dist/chunk-AOHK5YXC.js +5585 -0
- package/dist/chunk-CATFKTFD.js +80 -0
- package/dist/chunk-FQGPXWPJ.js +1491 -0
- package/dist/chunk-G43PLP2U.js +1087 -0
- package/dist/chunk-LMJW65ML.js +836 -0
- package/dist/chunk-MCSQNZ4E.js +836 -0
- package/dist/chunk-NSJ3GKUC.js +1552 -0
- package/dist/chunk-OGFKJOK7.js +2068 -0
- package/dist/chunk-RDEJZJBZ.js +1351 -0
- package/dist/chunk-TMTYN2UK.js +1128 -0
- package/dist/chunk-V45LUJDI.js +838 -0
- package/dist/chunk-YRUXFEZM.js +1044 -0
- package/dist/chunk-ZYBAKW25.js +994 -0
- package/dist/generated/agent-fold/index.d.ts +4520 -0
- package/dist/generated/agent-fold/index.js +0 -0
- package/dist/generated/agent-harness/client/client.gen.d.ts +2 -0
- package/dist/generated/agent-harness/client/index.d.ts +10 -0
- package/dist/generated/agent-harness/client/types.gen.d.ts +120 -0
- package/dist/generated/agent-harness/client/utils.gen.d.ts +37 -0
- package/dist/generated/agent-harness/client.gen.d.ts +12 -0
- package/dist/generated/agent-harness/core/auth.gen.d.ts +25 -0
- package/dist/generated/agent-harness/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/agent-harness/core/params.gen.d.ts +43 -0
- package/dist/generated/agent-harness/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/agent-harness/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/agent-harness/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/agent-harness/core/types.gen.d.ts +83 -0
- package/dist/generated/agent-harness/core/utils.gen.d.ts +19 -0
- package/dist/generated/agent-harness/index.d.ts +2 -0
- package/dist/generated/agent-harness/index.js +6 -0
- package/dist/generated/agent-harness/sdk.gen.d.ts +375 -0
- package/dist/generated/agent-harness/types.gen.d.ts +4725 -0
- package/dist/generated/agent-reviews/index.d.ts +895 -0
- package/dist/generated/agent-reviews/index.js +0 -0
- package/dist/generated/auth/client/client.gen.d.ts +2 -0
- package/dist/generated/auth/client/index.d.ts +10 -0
- package/dist/generated/auth/client/types.gen.d.ts +120 -0
- package/dist/generated/auth/client/utils.gen.d.ts +37 -0
- package/dist/generated/auth/client.gen.d.ts +12 -0
- package/dist/generated/auth/core/auth.gen.d.ts +25 -0
- package/dist/generated/auth/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/auth/core/params.gen.d.ts +43 -0
- package/dist/generated/auth/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/auth/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/auth/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/auth/core/types.gen.d.ts +83 -0
- package/dist/generated/auth/core/utils.gen.d.ts +19 -0
- package/dist/generated/auth/index.d.ts +2 -0
- package/dist/generated/auth/index.js +6 -0
- package/dist/generated/auth/sdk.gen.d.ts +674 -0
- package/dist/generated/auth/types.gen.d.ts +5233 -0
- package/dist/generated/calendar/client/client.gen.d.ts +2 -0
- package/dist/generated/calendar/client/index.d.ts +10 -0
- package/dist/generated/calendar/client/types.gen.d.ts +120 -0
- package/dist/generated/calendar/client/utils.gen.d.ts +37 -0
- package/dist/generated/calendar/client.gen.d.ts +12 -0
- package/dist/generated/calendar/core/auth.gen.d.ts +25 -0
- package/dist/generated/calendar/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/calendar/core/params.gen.d.ts +43 -0
- package/dist/generated/calendar/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/calendar/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/calendar/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/calendar/core/types.gen.d.ts +83 -0
- package/dist/generated/calendar/core/utils.gen.d.ts +19 -0
- package/dist/generated/calendar/index.d.ts +2 -0
- package/dist/generated/calendar/index.js +6 -0
- package/dist/generated/calendar/sdk.gen.d.ts +157 -0
- package/dist/generated/calendar/types.gen.d.ts +2333 -0
- package/dist/generated/cognition/client/client.gen.d.ts +2 -0
- package/dist/generated/cognition/client/index.d.ts +10 -0
- package/dist/generated/cognition/client/types.gen.d.ts +120 -0
- package/dist/generated/cognition/client/utils.gen.d.ts +37 -0
- package/dist/generated/cognition/client.gen.d.ts +12 -0
- package/dist/generated/cognition/core/auth.gen.d.ts +25 -0
- package/dist/generated/cognition/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/cognition/core/params.gen.d.ts +43 -0
- package/dist/generated/cognition/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/cognition/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/cognition/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/cognition/core/types.gen.d.ts +83 -0
- package/dist/generated/cognition/core/utils.gen.d.ts +19 -0
- package/dist/generated/cognition/index.d.ts +2 -0
- package/dist/generated/cognition/index.js +6 -0
- package/dist/generated/cognition/sdk.gen.d.ts +348 -0
- package/dist/generated/cognition/types.gen.d.ts +4228 -0
- package/dist/generated/connection/client/client.gen.d.ts +2 -0
- package/dist/generated/connection/client/index.d.ts +10 -0
- package/dist/generated/connection/client/types.gen.d.ts +120 -0
- package/dist/generated/connection/client/utils.gen.d.ts +37 -0
- package/dist/generated/connection/client.gen.d.ts +12 -0
- package/dist/generated/connection/core/auth.gen.d.ts +25 -0
- package/dist/generated/connection/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/connection/core/params.gen.d.ts +43 -0
- package/dist/generated/connection/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/connection/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/connection/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/connection/core/types.gen.d.ts +83 -0
- package/dist/generated/connection/core/utils.gen.d.ts +19 -0
- package/dist/generated/connection/index.d.ts +2 -0
- package/dist/generated/connection/index.js +854 -0
- package/dist/generated/connection/sdk.gen.d.ts +43 -0
- package/dist/generated/connection/types.gen.d.ts +252 -0
- package/dist/generated/contacts/client/client.gen.d.ts +2 -0
- package/dist/generated/contacts/client/index.d.ts +10 -0
- package/dist/generated/contacts/client/types.gen.d.ts +120 -0
- package/dist/generated/contacts/client/utils.gen.d.ts +37 -0
- package/dist/generated/contacts/client.gen.d.ts +12 -0
- package/dist/generated/contacts/core/auth.gen.d.ts +25 -0
- package/dist/generated/contacts/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/contacts/core/params.gen.d.ts +43 -0
- package/dist/generated/contacts/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/contacts/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/contacts/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/contacts/core/types.gen.d.ts +83 -0
- package/dist/generated/contacts/core/utils.gen.d.ts +19 -0
- package/dist/generated/contacts/index.d.ts +2 -0
- package/dist/generated/contacts/index.js +6 -0
- package/dist/generated/contacts/sdk.gen.d.ts +47 -0
- package/dist/generated/contacts/types.gen.d.ts +108 -0
- package/dist/generated/email/client/client.gen.d.ts +2 -0
- package/dist/generated/email/client/index.d.ts +10 -0
- package/dist/generated/email/client/types.gen.d.ts +120 -0
- package/dist/generated/email/client/utils.gen.d.ts +37 -0
- package/dist/generated/email/client.gen.d.ts +12 -0
- package/dist/generated/email/core/auth.gen.d.ts +25 -0
- package/dist/generated/email/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/email/core/params.gen.d.ts +43 -0
- package/dist/generated/email/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/email/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/email/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/email/core/types.gen.d.ts +83 -0
- package/dist/generated/email/core/utils.gen.d.ts +19 -0
- package/dist/generated/email/index.d.ts +2 -0
- package/dist/generated/email/index.js +6 -0
- package/dist/generated/email/sdk.gen.d.ts +301 -0
- package/dist/generated/email/types.gen.d.ts +3262 -0
- package/dist/generated/notification/client/client.gen.d.ts +2 -0
- package/dist/generated/notification/client/index.d.ts +10 -0
- package/dist/generated/notification/client/types.gen.d.ts +120 -0
- package/dist/generated/notification/client/utils.gen.d.ts +37 -0
- package/dist/generated/notification/client.gen.d.ts +12 -0
- package/dist/generated/notification/core/auth.gen.d.ts +25 -0
- package/dist/generated/notification/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/notification/core/params.gen.d.ts +43 -0
- package/dist/generated/notification/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/notification/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/notification/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/notification/core/types.gen.d.ts +83 -0
- package/dist/generated/notification/core/utils.gen.d.ts +19 -0
- package/dist/generated/notification/index.d.ts +2 -0
- package/dist/generated/notification/index.js +6 -0
- package/dist/generated/notification/sdk.gen.d.ts +127 -0
- package/dist/generated/notification/types.gen.d.ts +2084 -0
- package/dist/generated/properties/client/client.gen.d.ts +2 -0
- package/dist/generated/properties/client/index.d.ts +10 -0
- package/dist/generated/properties/client/types.gen.d.ts +120 -0
- package/dist/generated/properties/client/utils.gen.d.ts +37 -0
- package/dist/generated/properties/client.gen.d.ts +12 -0
- package/dist/generated/properties/core/auth.gen.d.ts +25 -0
- package/dist/generated/properties/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/properties/core/params.gen.d.ts +43 -0
- package/dist/generated/properties/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/properties/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/properties/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/properties/core/types.gen.d.ts +83 -0
- package/dist/generated/properties/core/utils.gen.d.ts +19 -0
- package/dist/generated/properties/index.d.ts +2 -0
- package/dist/generated/properties/index.js +6 -0
- package/dist/generated/properties/sdk.gen.d.ts +158 -0
- package/dist/generated/properties/types.gen.d.ts +1311 -0
- package/dist/generated/scheduled-action/client/client.gen.d.ts +2 -0
- package/dist/generated/scheduled-action/client/index.d.ts +10 -0
- package/dist/generated/scheduled-action/client/types.gen.d.ts +120 -0
- package/dist/generated/scheduled-action/client/utils.gen.d.ts +37 -0
- package/dist/generated/scheduled-action/client.gen.d.ts +12 -0
- package/dist/generated/scheduled-action/core/auth.gen.d.ts +25 -0
- package/dist/generated/scheduled-action/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/scheduled-action/core/params.gen.d.ts +43 -0
- package/dist/generated/scheduled-action/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/scheduled-action/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/scheduled-action/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/scheduled-action/core/types.gen.d.ts +83 -0
- package/dist/generated/scheduled-action/core/utils.gen.d.ts +19 -0
- package/dist/generated/scheduled-action/index.d.ts +2 -0
- package/dist/generated/scheduled-action/index.js +6 -0
- package/dist/generated/scheduled-action/sdk.gen.d.ts +156 -0
- package/dist/generated/scheduled-action/types.gen.d.ts +3099 -0
- package/dist/generated/search/client/client.gen.d.ts +2 -0
- package/dist/generated/search/client/index.d.ts +10 -0
- package/dist/generated/search/client/types.gen.d.ts +120 -0
- package/dist/generated/search/client/utils.gen.d.ts +37 -0
- package/dist/generated/search/client.gen.d.ts +12 -0
- package/dist/generated/search/core/auth.gen.d.ts +25 -0
- package/dist/generated/search/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/search/core/params.gen.d.ts +43 -0
- package/dist/generated/search/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/search/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/search/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/search/core/types.gen.d.ts +83 -0
- package/dist/generated/search/core/utils.gen.d.ts +19 -0
- package/dist/generated/search/index.d.ts +2 -0
- package/dist/generated/search/index.js +6 -0
- package/dist/generated/search/sdk.gen.d.ts +44 -0
- package/dist/generated/search/types.gen.d.ts +2532 -0
- package/dist/generated/static-files/client/client.gen.d.ts +2 -0
- package/dist/generated/static-files/client/index.d.ts +10 -0
- package/dist/generated/static-files/client/types.gen.d.ts +120 -0
- package/dist/generated/static-files/client/utils.gen.d.ts +37 -0
- package/dist/generated/static-files/client.gen.d.ts +12 -0
- package/dist/generated/static-files/core/auth.gen.d.ts +25 -0
- package/dist/generated/static-files/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/static-files/core/params.gen.d.ts +43 -0
- package/dist/generated/static-files/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/static-files/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/static-files/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/static-files/core/types.gen.d.ts +83 -0
- package/dist/generated/static-files/core/utils.gen.d.ts +19 -0
- package/dist/generated/static-files/index.d.ts +2 -0
- package/dist/generated/static-files/index.js +842 -0
- package/dist/generated/static-files/sdk.gen.d.ts +43 -0
- package/dist/generated/static-files/types.gen.d.ts +220 -0
- package/dist/generated/storage/client/client.gen.d.ts +2 -0
- package/dist/generated/storage/client/index.d.ts +10 -0
- package/dist/generated/storage/client/types.gen.d.ts +120 -0
- package/dist/generated/storage/client/utils.gen.d.ts +37 -0
- package/dist/generated/storage/client.gen.d.ts +12 -0
- package/dist/generated/storage/core/auth.gen.d.ts +25 -0
- package/dist/generated/storage/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/storage/core/params.gen.d.ts +43 -0
- package/dist/generated/storage/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/storage/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/storage/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/storage/core/types.gen.d.ts +83 -0
- package/dist/generated/storage/core/utils.gen.d.ts +19 -0
- package/dist/generated/storage/index.d.ts +2 -0
- package/dist/generated/storage/index.js +6 -0
- package/dist/generated/storage/sdk.gen.d.ts +2285 -0
- package/dist/generated/storage/types.gen.d.ts +34546 -0
- package/dist/generated/unfurl/client/client.gen.d.ts +2 -0
- package/dist/generated/unfurl/client/index.d.ts +10 -0
- package/dist/generated/unfurl/client/types.gen.d.ts +120 -0
- package/dist/generated/unfurl/client/utils.gen.d.ts +37 -0
- package/dist/generated/unfurl/client.gen.d.ts +12 -0
- package/dist/generated/unfurl/core/auth.gen.d.ts +25 -0
- package/dist/generated/unfurl/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/unfurl/core/params.gen.d.ts +43 -0
- package/dist/generated/unfurl/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/unfurl/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/unfurl/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/unfurl/core/types.gen.d.ts +83 -0
- package/dist/generated/unfurl/core/utils.gen.d.ts +19 -0
- package/dist/generated/unfurl/index.d.ts +2 -0
- package/dist/generated/unfurl/index.js +6 -0
- package/dist/generated/unfurl/sdk.gen.d.ts +47 -0
- package/dist/generated/unfurl/types.gen.d.ts +145 -0
- package/dist/src/calls/browser.d.ts +14 -0
- package/dist/src/calls/browser.js +102 -0
- package/dist/src/calls/common.d.ts +18 -0
- package/dist/src/calls/node.d.ts +24 -0
- package/dist/src/calls/node.js +145 -0
- package/dist/src/calls/telemetry.d.ts +5 -0
- package/dist/src/config.d.ts +71 -0
- package/dist/src/entities/account-managers/grant.d.ts +62 -0
- package/dist/src/entities/account-managers/namespace.d.ts +29 -0
- package/dist/src/entities/activity/entity.d.ts +7 -0
- package/dist/src/entities/activity/namespace.d.ts +58 -0
- package/dist/src/entities/activity/namespace.test.d.ts +1 -0
- package/dist/src/entities/agent-sessions/activity.d.ts +48 -0
- package/dist/src/entities/agent-sessions/agent-session.d.ts +518 -0
- package/dist/src/entities/agent-sessions/code-execution.d.ts +60 -0
- package/dist/src/entities/agent-sessions/conversation.d.ts +91 -0
- package/dist/src/entities/agent-sessions/namespace.d.ts +142 -0
- package/dist/src/entities/agent-sessions/origin.d.ts +94 -0
- package/dist/src/entities/agent-sessions/queued-action.d.ts +60 -0
- package/dist/src/entities/agent-sessions/review.d.ts +114 -0
- package/dist/src/entities/agent-sessions/tool-approval.d.ts +25 -0
- package/dist/src/entities/agent-sessions/view.d.ts +11 -0
- package/dist/src/entities/agents/agent.d.ts +142 -0
- package/dist/src/entities/agents/namespace.d.ts +66 -0
- package/dist/src/entities/ai/namespace.d.ts +36 -0
- package/dist/src/entities/api-keys/api-key.d.ts +22 -0
- package/dist/src/entities/api-keys/namespace.d.ts +37 -0
- package/dist/src/entities/bots/bot.d.ts +143 -0
- package/dist/src/entities/bots/namespace.d.ts +50 -0
- package/dist/src/entities/bots/token.d.ts +39 -0
- package/dist/src/entities/calendar/booking-link.d.ts +55 -0
- package/dist/src/entities/calendar/booking-namespace.d.ts +143 -0
- package/dist/src/entities/calendar/booking-namespace.test.d.ts +1 -0
- package/dist/src/entities/calendar/booking.d.ts +97 -0
- package/dist/src/entities/calendar/calendar.d.ts +49 -0
- package/dist/src/entities/calendar/create-confirmed.test.d.ts +1 -0
- package/dist/src/entities/calendar/event.d.ts +283 -0
- package/dist/src/entities/calendar/event.test.d.ts +1 -0
- package/dist/src/entities/calendar/namespace.d.ts +334 -0
- package/dist/src/entities/calendar/namespace.test.d.ts +1 -0
- package/dist/src/entities/calendar/replacement.d.ts +31 -0
- package/dist/src/entities/calls/call-record.d.ts +231 -0
- package/dist/src/entities/calls/connection.d.ts +59 -0
- package/dist/src/entities/calls/errors.d.ts +15 -0
- package/dist/src/entities/calls/message.d.ts +55 -0
- package/dist/src/entities/calls/namespace.d.ts +41 -0
- package/dist/src/entities/calls/participant.d.ts +22 -0
- package/dist/src/entities/canvases/canvas.d.ts +329 -0
- package/dist/src/entities/channels/access-request.d.ts +42 -0
- package/dist/src/entities/channels/activity.d.ts +40 -0
- package/dist/src/entities/channels/channel.d.ts +302 -0
- package/dist/src/entities/channels/labels.d.ts +73 -0
- package/dist/src/entities/channels/message.d.ts +153 -0
- package/dist/src/entities/channels/message.test.d.ts +1 -0
- package/dist/src/entities/channels/namespace.d.ts +82 -0
- package/dist/src/entities/channels/namespace.test.d.ts +1 -0
- package/dist/src/entities/channels/picture.d.ts +11 -0
- package/dist/src/entities/channels/post.d.ts +37 -0
- package/dist/src/entities/channels/post.test.d.ts +1 -0
- package/dist/src/entities/channels/share.d.ts +9 -0
- package/dist/src/entities/channels/share.test.d.ts +1 -0
- package/dist/src/entities/channels/thread.d.ts +64 -0
- package/dist/src/entities/chats/chat.d.ts +121 -0
- package/dist/src/entities/chats/generation.d.ts +55 -0
- package/dist/src/entities/chats/namespace.d.ts +35 -0
- package/dist/src/entities/connected-apps/connected-app.d.ts +121 -0
- package/dist/src/entities/connected-apps/connector.d.ts +59 -0
- package/dist/src/entities/connected-apps/namespace.d.ts +92 -0
- package/dist/src/entities/crm/company.d.ts +154 -0
- package/dist/src/entities/crm/contact.d.ts +168 -0
- package/dist/src/entities/crm/namespace.d.ts +163 -0
- package/dist/src/entities/crm/pipeline-entry.d.ts +109 -0
- package/dist/src/entities/crm/pipeline.d.ts +426 -0
- package/dist/src/entities/crm/pipelines.d.ts +79 -0
- package/dist/src/entities/crm-email-privacy/email-privacy.d.ts +238 -0
- package/dist/src/entities/crm-email-privacy/email-rule-preview.d.ts +55 -0
- package/dist/src/entities/crm-email-privacy/email-rule-revision.d.ts +27 -0
- package/dist/src/entities/crm-email-privacy/email-rules.d.ts +32 -0
- package/dist/src/entities/databases/column.d.ts +122 -0
- package/dist/src/entities/databases/database.d.ts +431 -0
- package/dist/src/entities/databases/namespace.d.ts +109 -0
- package/dist/src/entities/databases/query.d.ts +86 -0
- package/dist/src/entities/databases/row.d.ts +29 -0
- package/dist/src/entities/databases/saved-query.d.ts +151 -0
- package/dist/src/entities/databases/table.d.ts +124 -0
- package/dist/src/entities/databases/view.d.ts +72 -0
- package/dist/src/entities/databases/webhook.d.ts +39 -0
- package/dist/src/entities/documents/ai-edit.d.ts +54 -0
- package/dist/src/entities/documents/anchor.d.ts +39 -0
- package/dist/src/entities/documents/comment.d.ts +68 -0
- package/dist/src/entities/documents/create.test.d.ts +1 -0
- package/dist/src/entities/documents/document.d.ts +675 -0
- package/dist/src/entities/documents/markdown.d.ts +25 -0
- package/dist/src/entities/documents/namespace.d.ts +291 -0
- package/dist/src/entities/documents/office-files.d.ts +47 -0
- package/dist/src/entities/documents/skills.test.d.ts +1 -0
- package/dist/src/entities/documents/system-skill.d.ts +36 -0
- package/dist/src/entities/documents/text-comment.d.ts +41 -0
- package/dist/src/entities/documents/text-comment.test.d.ts +1 -0
- package/dist/src/entities/documents/version.d.ts +26 -0
- package/dist/src/entities/email/attachment.d.ts +39 -0
- package/dist/src/entities/email/body-rox-compat.d.ts +22 -0
- package/dist/src/entities/email/draft.d.ts +164 -0
- package/dist/src/entities/email/filter.d.ts +44 -0
- package/dist/src/entities/email/label.d.ts +37 -0
- package/dist/src/entities/email/link.d.ts +35 -0
- package/dist/src/entities/email/message.d.ts +223 -0
- package/dist/src/entities/email/namespace.d.ts +235 -0
- package/dist/src/entities/email/namespace.test.d.ts +1 -0
- package/dist/src/entities/email/thread.d.ts +268 -0
- package/dist/src/entities/entity-mentions/mention.d.ts +21 -0
- package/dist/src/entities/entity-mentions/namespace.d.ts +20 -0
- package/dist/src/entities/entity.d.ts +167 -0
- package/dist/src/entities/external-chat/chat.d.ts +173 -0
- package/dist/src/entities/external-chat/message.d.ts +54 -0
- package/dist/src/entities/external-chat/namespace.d.ts +22 -0
- package/dist/src/entities/external-chat/participant.d.ts +28 -0
- package/dist/src/entities/external-chat/send.d.ts +40 -0
- package/dist/src/entities/external-chat/upload.d.ts +25 -0
- package/dist/src/entities/favorites/namespace.d.ts +52 -0
- package/dist/src/entities/foreign/foreign-entity.d.ts +36 -0
- package/dist/src/entities/foreign/namespace.d.ts +54 -0
- package/dist/src/entities/forms/form.d.ts +319 -0
- package/dist/src/entities/forms/namespace.d.ts +30 -0
- package/dist/src/entities/forms/question.d.ts +65 -0
- package/dist/src/entities/forms/response.d.ts +52 -0
- package/dist/src/entities/forms/section.d.ts +31 -0
- package/dist/src/entities/github-pull-requests/namespace.d.ts +20 -0
- package/dist/src/entities/github-pull-requests/pull-request.d.ts +64 -0
- package/dist/src/entities/harnesses/harness.d.ts +76 -0
- package/dist/src/entities/harnesses/namespace.d.ts +83 -0
- package/dist/src/entities/harnesses/pairing.d.ts +50 -0
- package/dist/src/entities/images/image.d.ts +88 -0
- package/dist/src/entities/images/namespace.d.ts +55 -0
- package/dist/src/entities/images/namespace.test.d.ts +1 -0
- package/dist/src/entities/imports/entry.d.ts +65 -0
- package/dist/src/entities/imports/namespace.d.ts +103 -0
- package/dist/src/entities/imports/namespace.test.d.ts +1 -0
- package/dist/src/entities/initiatives/initiative.d.ts +185 -0
- package/dist/src/entities/initiatives/initiative.test.d.ts +1 -0
- package/dist/src/entities/initiatives/namespace.d.ts +90 -0
- package/dist/src/entities/me/namespace.d.ts +68 -0
- package/dist/src/entities/meetings/meeting.d.ts +81 -0
- package/dist/src/entities/meetings/namespace.d.ts +38 -0
- package/dist/src/entities/memory/namespace.d.ts +49 -0
- package/dist/src/entities/memory/namespace.test.d.ts +1 -0
- package/dist/src/entities/messages/discussion.d.ts +84 -0
- package/dist/src/entities/messages/thread.d.ts +115 -0
- package/dist/src/entities/notifications/namespace.d.ts +66 -0
- package/dist/src/entities/notifications/notification.d.ts +78 -0
- package/dist/src/entities/notifications/notification.test.d.ts +1 -0
- package/dist/src/entities/passwords/item.d.ts +118 -0
- package/dist/src/entities/passwords/namespace.d.ts +45 -0
- package/dist/src/entities/pins/namespace.d.ts +42 -0
- package/dist/src/entities/projects/namespace.d.ts +45 -0
- package/dist/src/entities/projects/project.d.ts +108 -0
- package/dist/src/entities/properties/namespace.d.ts +105 -0
- package/dist/src/entities/properties/namespace.test.d.ts +1 -0
- package/dist/src/entities/properties/property-definition.d.ts +70 -0
- package/dist/src/entities/properties/property-option.d.ts +44 -0
- package/dist/src/entities/reference.d.ts +82 -0
- package/dist/src/entities/referrals/namespace.d.ts +40 -0
- package/dist/src/entities/routines/namespace.d.ts +239 -0
- package/dist/src/entities/routines/routine.d.ts +341 -0
- package/dist/src/entities/routines/suggestion.d.ts +38 -0
- package/dist/src/entities/saved-views/namespace.d.ts +58 -0
- package/dist/src/entities/saved-views/saved-view.d.ts +78 -0
- package/dist/src/entities/search/exclusions.d.ts +6 -0
- package/dist/src/entities/search/namespace.d.ts +71 -0
- package/dist/src/entities/search/options.d.ts +30 -0
- package/dist/src/entities/search/types.d.ts +90 -0
- package/dist/src/entities/sharing/access.d.ts +120 -0
- package/dist/src/entities/sharing/permissions.d.ts +13 -0
- package/dist/src/entities/spreadsheets/spreadsheet.d.ts +201 -0
- package/dist/src/entities/suggestions/namespace.d.ts +118 -0
- package/dist/src/entities/suggestions/suggestion.d.ts +172 -0
- package/dist/src/entities/suggestions/suggestion.test.d.ts +1 -0
- package/dist/src/entities/tasks/namespace.d.ts +77 -0
- package/dist/src/entities/tasks/task.d.ts +99 -0
- package/dist/src/entities/teams/invite.d.ts +33 -0
- package/dist/src/entities/teams/namespace.d.ts +23 -0
- package/dist/src/entities/teams/team.d.ts +129 -0
- package/dist/src/entities/ui/app-link.d.ts +24 -0
- package/dist/src/entities/ui/namespace.d.ts +75 -0
- package/dist/src/entities/unfurls/namespace.d.ts +24 -0
- package/dist/src/entities/users/namespace.d.ts +41 -0
- package/dist/src/entities/users/profile-picture.d.ts +29 -0
- package/dist/src/entities/users/profile-picture.test.d.ts +1 -0
- package/dist/src/entities/users/user.d.ts +102 -0
- package/dist/src/entities/web/namespace.d.ts +67 -0
- package/dist/src/entities/web/namespace.test.d.ts +1 -0
- package/dist/src/entities/webhooks/namespace.d.ts +38 -0
- package/dist/src/entities/webhooks/webhook.d.ts +130 -0
- package/dist/src/entities/whatsapp/account.d.ts +24 -0
- package/dist/src/entities/whatsapp/chat.d.ts +62 -0
- package/dist/src/entities/whatsapp/namespace.d.ts +29 -0
- package/dist/src/entities/workspace/items.d.ts +14 -0
- package/dist/src/entities/workspace/namespace.d.ts +96 -0
- package/dist/src/entities/workspace/query.d.ts +39 -0
- package/dist/src/entities/workspace/query.test.d.ts +1 -0
- package/dist/src/entities/workspace/types.d.ts +99 -0
- package/dist/src/events/hydrate/agentSession.d.ts +192 -0
- package/dist/src/events/hydrate/call.d.ts +101 -0
- package/dist/src/events/hydrate/channel.d.ts +55 -0
- package/dist/src/events/hydrate/document.d.ts +59 -0
- package/dist/src/events/hydrate/message.d.ts +70 -0
- package/dist/src/events/hydrate/user.d.ts +14 -0
- package/dist/src/events/receiver.d.ts +91 -0
- package/dist/src/events/types.d.ts +44 -0
- package/dist/src/events/verify.d.ts +13 -0
- package/dist/src/local-portmap.d.ts +8 -0
- package/dist/src/mentions.d.ts +42 -0
- package/dist/src/raw.d.ts +12 -0
- package/dist/src/rox.d.ts +268 -0
- package/dist/src/rox.js +23231 -0
- package/dist/src/utils/activity.d.ts +34 -0
- package/dist/src/utils/activity.test.d.ts +1 -0
- package/dist/src/utils/client.d.ts +62 -0
- package/dist/src/utils/concurrency.d.ts +5 -0
- package/dist/src/utils/index.d.ts +5 -0
- package/dist/src/utils/lazy.d.ts +37 -0
- package/dist/src/utils/options.d.ts +7 -0
- package/dist/src/utils/pagination.d.ts +28 -0
- package/dist/src/utils/unwrap.d.ts +48 -0
- package/dist/src/utils/verbs.d.ts +3 -0
- package/package.json +82 -4
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import type { ActivityType, ApiChannelWithLatest, ChannelType, GetChannelAttachmentsResponses, GetChannelParticipantsResponses, GetChannelResponses, MessageCursor } from '../../../generated/storage/types.gen';
|
|
2
|
+
import { type RichMessage } from '../../mentions';
|
|
3
|
+
import type { RoxClient } from '../../utils/client';
|
|
4
|
+
import { AgentConversation } from '../agent-sessions/conversation';
|
|
5
|
+
import { Bot } from '../bots/bot';
|
|
6
|
+
import { CallRecord } from '../calls/call-record';
|
|
7
|
+
import { CallConnection, type JoinOptions } from '../calls/connection';
|
|
8
|
+
import type { Document } from '../documents/document';
|
|
9
|
+
import { PropertiedEntity } from '../entity';
|
|
10
|
+
import type { StaticImage } from '../images/image';
|
|
11
|
+
import { MessageThread, type TimelineOptions } from '../messages/thread';
|
|
12
|
+
import type { Team } from '../teams/team';
|
|
13
|
+
import type { User } from '../users/user';
|
|
14
|
+
import { ChannelAccessRequest } from './access-request';
|
|
15
|
+
import { ChannelActivity } from './activity';
|
|
16
|
+
import { Message } from './message';
|
|
17
|
+
import type { ChannelPicture } from './picture';
|
|
18
|
+
import type { Thread } from './thread';
|
|
19
|
+
type ChannelDetail = GetChannelResponses[200];
|
|
20
|
+
/** A member of a channel, with their role and join time. */
|
|
21
|
+
export type ChannelParticipant = GetChannelParticipantsResponses[200][number];
|
|
22
|
+
/** A file or entity attached to a message in a channel. */
|
|
23
|
+
export type ChannelAttachment = GetChannelAttachmentsResponses[200]['items'][number];
|
|
24
|
+
/**
|
|
25
|
+
* A channel.
|
|
26
|
+
*/
|
|
27
|
+
export declare class Channel extends PropertiedEntity<ChannelDetail> {
|
|
28
|
+
/**
|
|
29
|
+
* Start or join this channel's call, ringing members if a new call starts;
|
|
30
|
+
* refused to an agent's program (ExecuteCode, a routine).
|
|
31
|
+
*
|
|
32
|
+
* @write
|
|
33
|
+
* @mcp-exclude Returns a live call room credential; MCP calls carry JSON only.
|
|
34
|
+
*/
|
|
35
|
+
startCall(opts?: JoinOptions): Promise<CallConnection>;
|
|
36
|
+
/**
|
|
37
|
+
* Check the current call without creating one; undefined means no call.
|
|
38
|
+
*
|
|
39
|
+
* @readonly
|
|
40
|
+
*/
|
|
41
|
+
activeCall(): Promise<CallRecord | undefined>;
|
|
42
|
+
/**
|
|
43
|
+
* Record a view or interaction in this channel.
|
|
44
|
+
*
|
|
45
|
+
* @write
|
|
46
|
+
*/
|
|
47
|
+
recordActivity(type: ActivityType): Promise<ChannelActivity>;
|
|
48
|
+
/**
|
|
49
|
+
* Set an uploaded profile picture, or clear it.
|
|
50
|
+
*
|
|
51
|
+
* @write
|
|
52
|
+
* @idempotent
|
|
53
|
+
*/
|
|
54
|
+
setPicture(picture?: ChannelPicture): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* A shared message thread scoped to this resource.
|
|
57
|
+
*
|
|
58
|
+
* @readonly
|
|
59
|
+
*/
|
|
60
|
+
messageThreadById(id: string): MessageThread;
|
|
61
|
+
/**
|
|
62
|
+
* A mixed message and activity timeline page.
|
|
63
|
+
*
|
|
64
|
+
* @readonly
|
|
65
|
+
*/
|
|
66
|
+
timelinePage(selection?: TimelineOptions<Message>): Promise<{
|
|
67
|
+
entries: ({
|
|
68
|
+
type: "activity";
|
|
69
|
+
activity: {
|
|
70
|
+
actor: User;
|
|
71
|
+
action: string;
|
|
72
|
+
actor_id: string;
|
|
73
|
+
id: string;
|
|
74
|
+
occurred_at: string;
|
|
75
|
+
payload?: unknown;
|
|
76
|
+
};
|
|
77
|
+
message?: undefined;
|
|
78
|
+
} | {
|
|
79
|
+
type: "message";
|
|
80
|
+
message: Message;
|
|
81
|
+
activity?: undefined;
|
|
82
|
+
})[];
|
|
83
|
+
nextCursor: MessageCursor | undefined;
|
|
84
|
+
previousCursor: MessageCursor | undefined;
|
|
85
|
+
}>;
|
|
86
|
+
/**
|
|
87
|
+
* Conversations maintained by agents in this channel.
|
|
88
|
+
*
|
|
89
|
+
* @readonly
|
|
90
|
+
*/
|
|
91
|
+
agentConversations(): Promise<AgentConversation[]>;
|
|
92
|
+
/** Favorites identify channels as `channel`. */
|
|
93
|
+
readonly entityType = "channel";
|
|
94
|
+
/** The properties service identifies channels as `CHANNEL`. */
|
|
95
|
+
protected readonly propertyEntityType = "CHANNEL";
|
|
96
|
+
protected fetch(): Promise<ChannelDetail>;
|
|
97
|
+
/** A handle to a channel by id. Details load on first access. */
|
|
98
|
+
static byId(client: RoxClient, id: string): Channel;
|
|
99
|
+
/**
|
|
100
|
+
* A handle seeded from a `GET /comms/channels` record. The listed name is
|
|
101
|
+
* the stored one, which the detail shows as is except on direct messages and
|
|
102
|
+
* unnamed private channels; those are named after the members, so they load.
|
|
103
|
+
*/
|
|
104
|
+
static fromListing(client: RoxClient, record: ApiChannelWithLatest): Channel;
|
|
105
|
+
/** Open (creating if needed) the DM channel with a user. */
|
|
106
|
+
static dm(client: RoxClient, recipient: User): Promise<Channel>;
|
|
107
|
+
/** Open (creating if needed) the group direct message with exactly these people, excluding the caller. */
|
|
108
|
+
static private(client: RoxClient, recipients: User[]): Promise<Channel>;
|
|
109
|
+
/** Create a channel. The caller becomes the owner. */
|
|
110
|
+
static create(client: RoxClient, opts: {
|
|
111
|
+
type: ChannelType;
|
|
112
|
+
name?: string;
|
|
113
|
+
/** Participants to add, excluding the owner. */
|
|
114
|
+
participants?: User[];
|
|
115
|
+
/** Team, for team channels. */
|
|
116
|
+
team?: Team;
|
|
117
|
+
}): Promise<Channel>;
|
|
118
|
+
/** The channel's display name, resolved from the viewer's perspective. */
|
|
119
|
+
readonly name: () => Promise<string>;
|
|
120
|
+
/** The channel's type (e.g. `public`, `dm`, `private`). */
|
|
121
|
+
readonly type: () => Promise<ChannelType>;
|
|
122
|
+
/**
|
|
123
|
+
* Post a message; pass `silent: true` for a routine update that should
|
|
124
|
+
* notify nobody. Plain text, or a rich body composed with `msg`.
|
|
125
|
+
* `images` attaches static images, such as one from
|
|
126
|
+
* `rox.images.generate()`, below the text; `documents` attaches Macro
|
|
127
|
+
* documents as file chips, such as a file from `rox.documents.upload()`.
|
|
128
|
+
* `silent` sends no push, email or inbox entry to anyone, mentioned people
|
|
129
|
+
* included; the message still appears in the channel.
|
|
130
|
+
*
|
|
131
|
+
* Works with a channel webhook token as well as a normal one — see
|
|
132
|
+
* {@link postToChannel} for which endpoint that picks and what it costs.
|
|
133
|
+
* The webhook endpoint takes no attachments.
|
|
134
|
+
*
|
|
135
|
+
* @example Share a generated CSV.
|
|
136
|
+
* ```js
|
|
137
|
+
* const file = await rox.documents.upload({ name: 'q3.csv', content: csv });
|
|
138
|
+
* await channel.send('Q3 numbers attached.', { documents: [file] });
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* @example Post a routine status update without notifying anyone.
|
|
142
|
+
* ```js
|
|
143
|
+
* await channel.send('Nightly sync finished: 42 records.', { silent: true });
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* @write
|
|
147
|
+
*/
|
|
148
|
+
send(body: string | RichMessage, opts?: {
|
|
149
|
+
thread?: Thread;
|
|
150
|
+
images?: StaticImage[];
|
|
151
|
+
documents?: Document[];
|
|
152
|
+
silent?: boolean;
|
|
153
|
+
}): Promise<Message>;
|
|
154
|
+
/**
|
|
155
|
+
* Root messages in this channel, most recent first, auto-paginated; `maxItems` caps the total.
|
|
156
|
+
*
|
|
157
|
+
* @readonly
|
|
158
|
+
*/
|
|
159
|
+
messages(opts?: {
|
|
160
|
+
pageSize?: number;
|
|
161
|
+
maxItems?: number;
|
|
162
|
+
}): AsyncGenerator<Message>;
|
|
163
|
+
/**
|
|
164
|
+
* Root messages created or replied to at or after `after`, most recent
|
|
165
|
+
* first, auto-paginated; `maxItems` caps the total. Use it to catch up after a disconnect.
|
|
166
|
+
*
|
|
167
|
+
* @readonly
|
|
168
|
+
*/
|
|
169
|
+
messagesAfter(after: Date | string, opts?: {
|
|
170
|
+
pageSize?: number;
|
|
171
|
+
maxItems?: number;
|
|
172
|
+
}): AsyncGenerator<Message>;
|
|
173
|
+
private timeline;
|
|
174
|
+
/**
|
|
175
|
+
* A handle to a message in this channel by id.
|
|
176
|
+
*
|
|
177
|
+
* @readonly
|
|
178
|
+
*/
|
|
179
|
+
message(id: string): Message;
|
|
180
|
+
/**
|
|
181
|
+
* Rename the channel.
|
|
182
|
+
*
|
|
183
|
+
* @write
|
|
184
|
+
* @idempotent
|
|
185
|
+
*/
|
|
186
|
+
rename(name: string): Promise<void>;
|
|
187
|
+
/**
|
|
188
|
+
* Delete the channel. This is not reversible.
|
|
189
|
+
*
|
|
190
|
+
* @destructive
|
|
191
|
+
* @idempotent
|
|
192
|
+
*/
|
|
193
|
+
delete(): Promise<void>;
|
|
194
|
+
/**
|
|
195
|
+
* Join the channel as the current user.
|
|
196
|
+
*
|
|
197
|
+
* @write
|
|
198
|
+
* @idempotent
|
|
199
|
+
*/
|
|
200
|
+
join(): Promise<void>;
|
|
201
|
+
/**
|
|
202
|
+
* A reusable code that lets a user join this channel.
|
|
203
|
+
*
|
|
204
|
+
* @readonly
|
|
205
|
+
*/
|
|
206
|
+
joinCode(): Promise<string>;
|
|
207
|
+
/**
|
|
208
|
+
* Read the current user's join request, eligibility, and retry time.
|
|
209
|
+
* Works without channel access. Denial or withdrawal may delay retries.
|
|
210
|
+
*
|
|
211
|
+
* @readonly
|
|
212
|
+
*/
|
|
213
|
+
myAccessRequest(): Promise<{
|
|
214
|
+
request?: ChannelAccessRequest;
|
|
215
|
+
canRequest: boolean;
|
|
216
|
+
retryAfter?: string;
|
|
217
|
+
}>;
|
|
218
|
+
/**
|
|
219
|
+
* Ask to join a private or team channel.
|
|
220
|
+
* Repeated calls return the pending request.
|
|
221
|
+
*
|
|
222
|
+
* @write
|
|
223
|
+
* @idempotent
|
|
224
|
+
*/
|
|
225
|
+
requestAccess(): Promise<ChannelAccessRequest>;
|
|
226
|
+
/**
|
|
227
|
+
* Withdraw the current user's pending join request.
|
|
228
|
+
*
|
|
229
|
+
* @destructive
|
|
230
|
+
* @idempotent
|
|
231
|
+
*/
|
|
232
|
+
cancelAccessRequest(): Promise<void>;
|
|
233
|
+
/**
|
|
234
|
+
* Leave the channel as the current user.
|
|
235
|
+
*
|
|
236
|
+
* @destructive
|
|
237
|
+
* @idempotent
|
|
238
|
+
*/
|
|
239
|
+
leave(): Promise<void>;
|
|
240
|
+
/**
|
|
241
|
+
* The channel's members, with their roles and join times.
|
|
242
|
+
*
|
|
243
|
+
* @readonly
|
|
244
|
+
*/
|
|
245
|
+
participants(): Promise<ChannelParticipant[]>;
|
|
246
|
+
/**
|
|
247
|
+
* Bots that can post to the channel.
|
|
248
|
+
*
|
|
249
|
+
* @readonly
|
|
250
|
+
*/
|
|
251
|
+
bots(): Promise<Bot[]>;
|
|
252
|
+
/**
|
|
253
|
+
* Add users to the channel.
|
|
254
|
+
*
|
|
255
|
+
* @write
|
|
256
|
+
* @idempotent
|
|
257
|
+
*/
|
|
258
|
+
addParticipants(users: User[]): Promise<void>;
|
|
259
|
+
/**
|
|
260
|
+
* Remove users from the channel.
|
|
261
|
+
*
|
|
262
|
+
* @destructive
|
|
263
|
+
* @idempotent
|
|
264
|
+
*/
|
|
265
|
+
removeParticipants(users: User[]): Promise<void>;
|
|
266
|
+
/**
|
|
267
|
+
* Broadcast a typing indicator, optionally scoped to a thread.
|
|
268
|
+
*
|
|
269
|
+
* @write
|
|
270
|
+
* @idempotent
|
|
271
|
+
*/
|
|
272
|
+
typing(action: 'start' | 'stop', opts?: {
|
|
273
|
+
thread?: Thread;
|
|
274
|
+
}): Promise<void>;
|
|
275
|
+
/**
|
|
276
|
+
* The attachments posted in this channel, auto-paginated; `maxItems` caps the total.
|
|
277
|
+
*
|
|
278
|
+
* @readonly
|
|
279
|
+
*/
|
|
280
|
+
attachments(opts?: {
|
|
281
|
+
pageSize?: number;
|
|
282
|
+
/** Filter by type: `static` for images/videos, `dss` for documents. */
|
|
283
|
+
type?: string;
|
|
284
|
+
maxItems?: number;
|
|
285
|
+
}): AsyncGenerator<ChannelAttachment>;
|
|
286
|
+
private attachmentPages;
|
|
287
|
+
/**
|
|
288
|
+
* The channel's URL in the Rox web app.
|
|
289
|
+
*
|
|
290
|
+
* @readonly
|
|
291
|
+
*/
|
|
292
|
+
webUrl(): string;
|
|
293
|
+
/** Identity, loaded detail and {@link webUrl}, so serialized handles carry their link. */
|
|
294
|
+
toJSON(): {
|
|
295
|
+
url: string;
|
|
296
|
+
id: string;
|
|
297
|
+
detail?: import("../../../generated/storage").ApiChannelDetail | undefined;
|
|
298
|
+
};
|
|
299
|
+
/** Search channels by content, most relevant first, auto-paginated; `maxItems` caps the total. */
|
|
300
|
+
static search: (client: RoxClient, query: string, searchOpts?: import("../search/options").SearchOpts) => AsyncGenerator<Channel, any, any>;
|
|
301
|
+
}
|
|
302
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { ChannelLabel, ChannelLabelRule, SmartTagPreview } from '../../../generated/storage/types.gen';
|
|
2
|
+
import type { RoxClient } from '../../utils/client';
|
|
3
|
+
import type { Channel } from './channel';
|
|
4
|
+
export type { ChannelLabel, ChannelLabelRule, SmartTagPreview };
|
|
5
|
+
/**
|
|
6
|
+
* Shared or private channel labels: named groups of channels shown in the Chat
|
|
7
|
+
* sidebar. Every member of the team sees the same labels in the same order,
|
|
8
|
+
* and any member may create, rename, delete, or move channels between them;
|
|
9
|
+
* each change applies to the whole team. Users without a team have private
|
|
10
|
+
* labels belonging to their account.
|
|
11
|
+
*
|
|
12
|
+
* A label's `channelIds` lists only the channels the authenticated user is a
|
|
13
|
+
* member of. Manual labels count all assignments; smart tags count visible
|
|
14
|
+
* matches. A channel can be in one manual label and any number of matching
|
|
15
|
+
* smart tags per team or account. Direct messages cannot be grouped.
|
|
16
|
+
*/
|
|
17
|
+
export declare class ChannelLabelsNamespace {
|
|
18
|
+
private readonly client;
|
|
19
|
+
constructor(client: RoxClient);
|
|
20
|
+
/**
|
|
21
|
+
* Every label in the authenticated user's shared or private scope.
|
|
22
|
+
*
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
25
|
+
list(): Promise<ChannelLabel[]>;
|
|
26
|
+
/**
|
|
27
|
+
* Create a label and atomically move `channels` into it. Names are unique
|
|
28
|
+
* within the team or account, case-insensitively.
|
|
29
|
+
*
|
|
30
|
+
* @write
|
|
31
|
+
*/
|
|
32
|
+
create(name: string, channels?: Channel[]): Promise<ChannelLabel>;
|
|
33
|
+
/**
|
|
34
|
+
* Create a smart tag whose membership follows an attribute rule automatically.
|
|
35
|
+
*
|
|
36
|
+
* @write
|
|
37
|
+
*/
|
|
38
|
+
createSmartTag(name: string, rule: ChannelLabelRule): Promise<ChannelLabel>;
|
|
39
|
+
/**
|
|
40
|
+
* Preview the first matches and total visible count without creating a tag.
|
|
41
|
+
*
|
|
42
|
+
* @readonly
|
|
43
|
+
*/
|
|
44
|
+
previewSmartTag(rule: ChannelLabelRule): Promise<SmartTagPreview>;
|
|
45
|
+
/**
|
|
46
|
+
* Update the name and matching rule of an existing smart tag.
|
|
47
|
+
*
|
|
48
|
+
* @write
|
|
49
|
+
* @idempotent
|
|
50
|
+
*/
|
|
51
|
+
updateSmartTag(label: ChannelLabel, name: string, rule: ChannelLabelRule): Promise<ChannelLabel>;
|
|
52
|
+
/**
|
|
53
|
+
* Rename a label for the whole team.
|
|
54
|
+
*
|
|
55
|
+
* @write
|
|
56
|
+
* @idempotent
|
|
57
|
+
*/
|
|
58
|
+
rename(label: ChannelLabel, name: string): Promise<ChannelLabel>;
|
|
59
|
+
/**
|
|
60
|
+
* Delete a label for the whole team; its channels return to the plain list.
|
|
61
|
+
*
|
|
62
|
+
* @destructive
|
|
63
|
+
* @idempotent
|
|
64
|
+
*/
|
|
65
|
+
delete(label: ChannelLabel): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Move a channel into `label`, or out of any label when `label` is `undefined`.
|
|
68
|
+
*
|
|
69
|
+
* @write
|
|
70
|
+
* @idempotent
|
|
71
|
+
*/
|
|
72
|
+
setLabel(channel: Channel, label: ChannelLabel | undefined): Promise<void>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import type { Message as MessageRecord } from '../../../generated/storage/types.gen';
|
|
2
|
+
import { type RichMessage, type SimpleMention } from '../../mentions';
|
|
3
|
+
import type { RoxClient } from '../../utils/client';
|
|
4
|
+
import { FavoritableEntity } from '../entity';
|
|
5
|
+
import { User } from '../users/user';
|
|
6
|
+
import { Channel } from './channel';
|
|
7
|
+
import { Thread } from './thread';
|
|
8
|
+
/** The API's representation of a message; the same record the document comment API returns. */
|
|
9
|
+
export type MessageData = MessageRecord;
|
|
10
|
+
/** How much surrounds a message in {@link Message.context}. */
|
|
11
|
+
export interface MessageContextOptions {
|
|
12
|
+
/** Top-level messages before the root; defaults to 3, at most 25. */
|
|
13
|
+
channelBefore?: number;
|
|
14
|
+
/** Top-level messages after the root; defaults to 3, at most 25. */
|
|
15
|
+
channelAfter?: number;
|
|
16
|
+
/** For a reply, replies before it; defaults to 10, at most 50. */
|
|
17
|
+
threadBefore?: number;
|
|
18
|
+
/** For a reply, replies after it; defaults to 10, at most 50. */
|
|
19
|
+
threadAfter?: number;
|
|
20
|
+
}
|
|
21
|
+
/** The replies around a reply, in {@link MessageContext}. */
|
|
22
|
+
export interface ReplyContext {
|
|
23
|
+
/** Replies before the message, oldest first. */
|
|
24
|
+
before: Message[];
|
|
25
|
+
/** Replies after the message, oldest first. */
|
|
26
|
+
after: Message[];
|
|
27
|
+
/** Earlier replies left out. */
|
|
28
|
+
omittedBefore: number;
|
|
29
|
+
/** Later replies left out. */
|
|
30
|
+
omittedAfter: number;
|
|
31
|
+
}
|
|
32
|
+
/** A channel message with the conversation around it. */
|
|
33
|
+
export interface MessageContext {
|
|
34
|
+
/** The message asked about. */
|
|
35
|
+
message: Message;
|
|
36
|
+
/** Its top-level message: the message itself, or the root of the thread it replies in. */
|
|
37
|
+
root: Message;
|
|
38
|
+
/** Top-level messages before `root`, oldest first. */
|
|
39
|
+
before: Message[];
|
|
40
|
+
/** Top-level messages after `root`, oldest first. */
|
|
41
|
+
after: Message[];
|
|
42
|
+
/** For a reply, the replies around it; absent for a top-level message. */
|
|
43
|
+
thread?: ReplyContext;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A message in a channel. A thin handle: `id` and `channelId` are known up
|
|
47
|
+
* front, and record-backed fields (`content`, `author`) load lazily on first
|
|
48
|
+
* access and cache. Actions carry the ids for you.
|
|
49
|
+
*/
|
|
50
|
+
export declare class Message extends FavoritableEntity<MessageRecord> {
|
|
51
|
+
readonly channelId: string;
|
|
52
|
+
/** Entities mentioned in this message, when a list, thread, or event supplied them. */
|
|
53
|
+
readonly mentions: SimpleMention[];
|
|
54
|
+
/** Favorites identify channel messages as `channel_message`. */
|
|
55
|
+
readonly entityType = "channel_message";
|
|
56
|
+
private constructor();
|
|
57
|
+
private get path();
|
|
58
|
+
protected fetch(): Promise<MessageRecord>;
|
|
59
|
+
/** A handle to a message by id. Fields load on first access. */
|
|
60
|
+
static byId(client: RoxClient, channelId: string, id: string, mentions?: SimpleMention[]): Message;
|
|
61
|
+
/** Build a root or reply from a message record (pre-seeded, no fetch). */
|
|
62
|
+
static from(client: RoxClient, channelId: string, data: MessageRecord): Message;
|
|
63
|
+
/** The message body. */
|
|
64
|
+
readonly content: () => Promise<string>;
|
|
65
|
+
/** When the message was created. */
|
|
66
|
+
readonly createdAt: () => Promise<string>;
|
|
67
|
+
/** When the message was last edited, if it has been. */
|
|
68
|
+
readonly editedAt: () => Promise<string | undefined>;
|
|
69
|
+
/** When the message was last updated. */
|
|
70
|
+
readonly updatedAt: () => Promise<string>;
|
|
71
|
+
/**
|
|
72
|
+
* The user who sent this message.
|
|
73
|
+
*
|
|
74
|
+
* @readonly
|
|
75
|
+
*/
|
|
76
|
+
author(): Promise<User>;
|
|
77
|
+
/**
|
|
78
|
+
* The message's URL in the Rox web app: its channel, scrolled to it. Pass
|
|
79
|
+
* the message to `rox.ui.open` to show it to the user.
|
|
80
|
+
*
|
|
81
|
+
* @readonly
|
|
82
|
+
*/
|
|
83
|
+
webUrl(): string;
|
|
84
|
+
/** Identity, loaded detail and {@link webUrl}, so serialized handles carry their link. */
|
|
85
|
+
toJSON(): {
|
|
86
|
+
url: string;
|
|
87
|
+
id: string;
|
|
88
|
+
detail?: MessageRecord | undefined;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* The channel this message is in.
|
|
92
|
+
*
|
|
93
|
+
* @readonly
|
|
94
|
+
*/
|
|
95
|
+
channel(): Channel;
|
|
96
|
+
/**
|
|
97
|
+
* The thread rooted at this message.
|
|
98
|
+
*
|
|
99
|
+
* @readonly
|
|
100
|
+
*/
|
|
101
|
+
thread(): Thread;
|
|
102
|
+
/**
|
|
103
|
+
* The conversation around this message: nearby top-level messages and, when
|
|
104
|
+
* it is a thread reply, its thread's root and the replies around it. Use it
|
|
105
|
+
* to read what a message (from a mention, search hit or notification)
|
|
106
|
+
* answers before acting on it.
|
|
107
|
+
*
|
|
108
|
+
* @readonly
|
|
109
|
+
*/
|
|
110
|
+
context(options?: MessageContextOptions): Promise<MessageContext>;
|
|
111
|
+
/**
|
|
112
|
+
* Add an emoji reaction to this message.
|
|
113
|
+
*
|
|
114
|
+
* @write
|
|
115
|
+
* @idempotent
|
|
116
|
+
*/
|
|
117
|
+
react(emoji: string): Promise<this>;
|
|
118
|
+
/**
|
|
119
|
+
* Remove one of your emoji reactions from this message.
|
|
120
|
+
*
|
|
121
|
+
* @write
|
|
122
|
+
* @idempotent
|
|
123
|
+
*/
|
|
124
|
+
unreact(emoji: string): Promise<this>;
|
|
125
|
+
/**
|
|
126
|
+
* Replace this message's body.
|
|
127
|
+
*
|
|
128
|
+
* @param body - Plain text, or a rich body composed with {@link msg}.
|
|
129
|
+
*
|
|
130
|
+
* @destructive
|
|
131
|
+
* @idempotent
|
|
132
|
+
*/
|
|
133
|
+
edit(body: string | RichMessage): Promise<this>;
|
|
134
|
+
/**
|
|
135
|
+
* Delete this message.
|
|
136
|
+
*
|
|
137
|
+
* @destructive
|
|
138
|
+
* @idempotent
|
|
139
|
+
*/
|
|
140
|
+
delete(): Promise<void>;
|
|
141
|
+
/**
|
|
142
|
+
* Post a reply in this message's thread; pass `silent: true` for a routine
|
|
143
|
+
* update that should notify nobody.
|
|
144
|
+
*
|
|
145
|
+
* @param opts.silent - Send no push, email or inbox entry to anyone,
|
|
146
|
+
* mentioned people included; the reply still appears in the thread.
|
|
147
|
+
*
|
|
148
|
+
* @write
|
|
149
|
+
*/
|
|
150
|
+
reply(body: string | RichMessage, opts?: {
|
|
151
|
+
silent?: boolean;
|
|
152
|
+
}): Promise<Message>;
|
|
153
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { ChannelType } from '../../../generated/storage/types.gen';
|
|
2
|
+
import { type IterationOptions } from '../../utils';
|
|
3
|
+
import type { RoxClient } from '../../utils/client';
|
|
4
|
+
import type { SearchOpts } from '../search/options';
|
|
5
|
+
import type { Team } from '../teams/team';
|
|
6
|
+
import type { User } from '../users/user';
|
|
7
|
+
import { ChannelActivity } from './activity';
|
|
8
|
+
import { Channel } from './channel';
|
|
9
|
+
import { ChannelLabelsNamespace } from './labels';
|
|
10
|
+
/**
|
|
11
|
+
* @routing Use when reading or sending channel and direct messages, posting a poll, reacting or managing members; not email, or WhatsApp and other external chats (`rox.externalChats`).
|
|
12
|
+
*
|
|
13
|
+
* @agent
|
|
14
|
+
* ## Polls
|
|
15
|
+
*
|
|
16
|
+
* A form for a channel is a poll: one required single- or multi-select question (`widget: "choice"`, or `"checkboxes"` for several answers), `status: "open"`, `tallyVisible: true`, and `channelGrants: []`. Post it as one message with its live card on its own line:
|
|
17
|
+
*
|
|
18
|
+
* `<m-document-card>{"documentId":"{form_id}","documentName":"{question}","blockName":"form","previewData":{"poll":{"optionCount":2}}}</m-document-card>`
|
|
19
|
+
*
|
|
20
|
+
* That message is the poll, and the card shares it with the channel. Never add a form chip, `/respond` link, `form:` link, or a second copy.
|
|
21
|
+
*/
|
|
22
|
+
export declare class ChannelNamespace {
|
|
23
|
+
private readonly client;
|
|
24
|
+
/**
|
|
25
|
+
* Recent channel activity, with channel and user handles.
|
|
26
|
+
*
|
|
27
|
+
* @readonly
|
|
28
|
+
*/
|
|
29
|
+
activity(): Promise<ChannelActivity[]>;
|
|
30
|
+
/** Team-shared labels that group channels in the Chat sidebar. */
|
|
31
|
+
readonly labels: ChannelLabelsNamespace;
|
|
32
|
+
constructor(client: RoxClient);
|
|
33
|
+
byId(id: string): Channel;
|
|
34
|
+
/**
|
|
35
|
+
* Open (creating if needed) the user's 1:1 direct message with one person.
|
|
36
|
+
* For several people, use {@link private}.
|
|
37
|
+
*
|
|
38
|
+
* @write
|
|
39
|
+
* @idempotent
|
|
40
|
+
*/
|
|
41
|
+
dm(recipient: User): Promise<Channel>;
|
|
42
|
+
/**
|
|
43
|
+
* Open (creating if needed) the group direct message with exactly these
|
|
44
|
+
* people, excluding the user. For one person, use {@link dm}.
|
|
45
|
+
*
|
|
46
|
+
* @write
|
|
47
|
+
* @idempotent
|
|
48
|
+
*/
|
|
49
|
+
private(recipients: User[]): Promise<Channel>;
|
|
50
|
+
/**
|
|
51
|
+
* Create a channel. The caller becomes the owner.
|
|
52
|
+
*
|
|
53
|
+
* @write
|
|
54
|
+
*/
|
|
55
|
+
create(opts: {
|
|
56
|
+
type: ChannelType;
|
|
57
|
+
name?: string;
|
|
58
|
+
/** Participants to add, excluding the owner. */
|
|
59
|
+
participants?: User[];
|
|
60
|
+
/** Team, for team channels. */
|
|
61
|
+
team?: Team;
|
|
62
|
+
}): Promise<Channel>;
|
|
63
|
+
/**
|
|
64
|
+
* Every channel the authenticated user is a member of, auto-paginated; `maxItems` caps the total.
|
|
65
|
+
* Iterate with `for await`; collect with `Array.fromAsync`.
|
|
66
|
+
*
|
|
67
|
+
* @readonly
|
|
68
|
+
*/
|
|
69
|
+
list(opts?: IterationOptions): AsyncGenerator<Channel>;
|
|
70
|
+
private listed;
|
|
71
|
+
/**
|
|
72
|
+
* Search the user's channels by name (the default) or by content; `maxItems`
|
|
73
|
+
* caps the total. A name search matches, case-insensitively, channels whose
|
|
74
|
+
* name or other members' names contain every word of `query`; the server runs
|
|
75
|
+
* it, one request per page of matches, newest first. A blank query lists
|
|
76
|
+
* every channel.
|
|
77
|
+
*
|
|
78
|
+
* @readonly
|
|
79
|
+
*/
|
|
80
|
+
search(query: string, opts?: SearchOpts): AsyncGenerator<Channel>;
|
|
81
|
+
private records;
|
|
82
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** An uploaded channel profile picture in static file storage. */
|
|
2
|
+
export declare class ChannelPicture {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
private constructor();
|
|
5
|
+
/** Construct a reference from the upload receipt. */
|
|
6
|
+
static byId(id: string): ChannelPicture;
|
|
7
|
+
/** Serialize the uploaded picture reference. */
|
|
8
|
+
toJSON(): {
|
|
9
|
+
id: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { RichMessage } from '../../mentions';
|
|
2
|
+
import type { RoxClient } from '../../utils/client';
|
|
3
|
+
import type { Document } from '../documents/document';
|
|
4
|
+
import type { StaticImage } from '../images/image';
|
|
5
|
+
import type { Channel } from './channel';
|
|
6
|
+
import type { Thread } from './thread';
|
|
7
|
+
/** What a posted message carries below its text, and who hears about it. */
|
|
8
|
+
export type PostOptions = {
|
|
9
|
+
/** Static images, shown inline. */
|
|
10
|
+
images?: StaticImage[];
|
|
11
|
+
/** Rox documents, shown as file chips. */
|
|
12
|
+
documents?: Document[];
|
|
13
|
+
/**
|
|
14
|
+
* Post without notifying anyone, mentioned people included: no push, email
|
|
15
|
+
* or inbox entry. The message still appears in the channel for everyone.
|
|
16
|
+
*/
|
|
17
|
+
silent?: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Post a message using the endpoint supported by the caller's credentials.
|
|
21
|
+
*
|
|
22
|
+
* Most credentials use `POST /messages/channel/{id}`. User-owned bots without
|
|
23
|
+
* an acting user instead use `POST /channels/{id}/webhook`, which authorizes
|
|
24
|
+
* through channel membership. The bot owner is read from `GET /bots/me` and
|
|
25
|
+
* cached by the client.
|
|
26
|
+
*
|
|
27
|
+
* The webhook endpoint takes content and `silent` only: the `mentions` list,
|
|
28
|
+
* threads and attachments are dropped. `<m-*>` mention tags in the content
|
|
29
|
+
* still render and notify, because the server extracts a bot's mentions from
|
|
30
|
+
* its content. A user-owned bot gets the full API by acting as its owner with
|
|
31
|
+
* `requestedAs`.
|
|
32
|
+
*
|
|
33
|
+
* Posting to a `Thread` puts the message in that thread; to a `Channel`, at the
|
|
34
|
+
* channel root. One target rather than a channel plus a thread id, so the two
|
|
35
|
+
* can't disagree.
|
|
36
|
+
*/
|
|
37
|
+
export declare function postToChannel(client: RoxClient, target: Channel | Thread, body: RichMessage, { images, documents, silent }?: PostOptions): Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChannelShareEntityType } from '../../../generated/storage/types.gen';
|
|
2
|
+
import type { RoxClient } from '../../utils/client';
|
|
3
|
+
import type { Channel } from './channel';
|
|
4
|
+
/**
|
|
5
|
+
* Grant a channel's current members access to one item, as posting it in the
|
|
6
|
+
* channel does. The caller must be in the channel and able to share the item;
|
|
7
|
+
* sharing again changes nothing.
|
|
8
|
+
*/
|
|
9
|
+
export declare function shareWithChannel(client: RoxClient, channel: Channel, entityType: ChannelShareEntityType, entityId: string): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../macro';
|