palbase 0.26.0 → 0.28.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 +12 -1
- package/dist/ai/index.js +2 -2
- package/dist/backend/engine.js +2 -2
- package/dist/backend/env.js +1 -1
- package/dist/backend/index.js +3 -3
- package/dist/backend/stack.js +1 -1
- package/dist/backend/test.js +2 -2
- package/dist/chunks/{GHQTIJT7.js → 2XAUD7E5.js} +2 -2
- package/dist/chunks/{EAHHUIQP.js → 36Q4EJBD.js} +1 -1
- package/dist/chunks/{4W2CWOGO.js → 3G43SAQ7.js} +1 -1
- package/dist/chunks/{V2OJIKUV.js → 53VJSMGY.js} +1 -1
- package/dist/chunks/5SSYP4TM.js +2 -0
- package/dist/chunks/{QUX35QKY.js → 7M5HEXJC.js} +2 -2
- package/dist/chunks/{CZMQEBC6.js → CQ2AKEKI.js} +2 -2
- package/dist/chunks/{HMQIA6DH.js → D5YY344U.js} +2 -2
- package/dist/chunks/{OTWMAAPL.js → DJE7B7X4.js} +2 -2
- package/dist/chunks/{4I34RRBK.js → DJIO7ZRV.js} +1 -1
- package/dist/chunks/{DVRO2E2S.js → EL7LGFXD.js} +2 -2
- package/dist/chunks/EXT5BO4H.js +22 -0
- package/dist/chunks/{RC4ZSGS2.js → FJWAFNAZ.js} +2 -2
- package/dist/chunks/{BN5FJ3YM.js → FXV6V457.js} +1 -1
- package/dist/chunks/{2LNRLAVP.js → GP56VUVJ.js} +2 -2
- package/dist/chunks/{5RWEOPF2.js → LIB2AHJU.js} +2 -2
- package/dist/chunks/{B4ZHHG4H.js → LTS573ZP.js} +2 -2
- package/dist/chunks/{SB36QYBM.js → MVXEPZPI.js} +2 -2
- package/dist/chunks/{DK2JMPU3.js → QUBQS6S5.js} +2 -2
- package/dist/chunks/{FBCZT7JT.js → RUQZFFRU.js} +2 -2
- package/dist/chunks/UYPJY7TK.js +2 -0
- package/dist/chunks/{UKRY3HRA.js → YZCJVWWC.js} +1 -1
- package/dist/chunks/{Q4E3WXGS.js → ZVQZVVBH.js} +1 -1
- package/dist/cli.js +135 -135
- package/dist/cloud/index.js +2 -2
- package/dist/refuse/ai.js +1 -1
- package/dist/refuse/backend.js +1 -1
- package/dist/refuse/cloud.js +1 -1
- package/dist/refuse/server.js +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/testing.js +2 -2
- package/dist/web/calls-ui.js +46 -0
- package/dist/web/index.js +2 -2
- package/dist/web/message.js +2 -2
- package/dist/web/palbe.js +2 -2
- package/dist/web/paywall.js +2 -2
- package/dist/web/push-sw.js +2 -2
- package/dist/web/ssr.js +2 -2
- package/dist/web/vite.js +2 -2
- package/package.json +7 -2
- package/types/cloud/src/generated/project.d.ts +1 -0
- package/types/internal/src/modules/calls.d.ts +810 -0
- package/types/internal/src/modules/events.d.ts +4 -3
- package/types/internal/src/modules/index.d.ts +1 -0
- package/types/internal/src/modules/messaging.d.ts +298 -15
- package/types/internal/src/modules/realtime.d.ts +1 -1
- package/types/server/src/server.d.ts +15 -0
- package/types/web/src/calls-ui/index.d.ts +71 -0
- package/types/web/src/calls.d.ts +274 -0
- package/types/web/src/client.d.ts +5 -0
- package/types/web/src/index.d.ts +1 -0
- package/types/web/src/messaging.d.ts +47 -6
- package/dist/chunks/72VOVUBT.js +0 -22
- package/dist/chunks/M5MRZQPV.js +0 -2
- package/dist/chunks/QUPZ6GF5.js +0 -2
|
@@ -2,6 +2,7 @@ import type { WebhookEvent } from '../event.js';
|
|
|
2
2
|
import type { Events as AiEvents } from './ai.js';
|
|
3
3
|
import type { Events as AnalyticsEvents } from './analytics.js';
|
|
4
4
|
import type { Events as AuthEvents } from './auth.js';
|
|
5
|
+
import type { Events as CallsEvents } from './calls.js';
|
|
5
6
|
import type { Events as FlagsEvents } from './flags.js';
|
|
6
7
|
import type { Events as JourneysEvents } from './journeys.js';
|
|
7
8
|
import type { Events as MessagingEvents } from './messaging.js';
|
|
@@ -10,16 +11,16 @@ import type { Events as PurchasesEvents } from './purchases.js';
|
|
|
10
11
|
import type { Events as StorageEvents } from './storage.js';
|
|
11
12
|
import type { Events as StoresEvents } from './stores.js';
|
|
12
13
|
/** Every event the modules' contracts say they send the project's webhooks (x-palbase-events), by type: its payload, the event's data. */
|
|
13
|
-
export interface PlatformEvents extends AiEvents, AnalyticsEvents, AuthEvents, FlagsEvents, JourneysEvents, MessagingEvents, NotifyEvents, PurchasesEvents, StorageEvents, StoresEvents {
|
|
14
|
+
export interface PlatformEvents extends AiEvents, AnalyticsEvents, AuthEvents, CallsEvents, FlagsEvents, JourneysEvents, MessagingEvents, NotifyEvents, PurchasesEvents, StorageEvents, StoresEvents {
|
|
14
15
|
}
|
|
15
16
|
/** A platform event's type: one a module's contract declares. */
|
|
16
17
|
export type EventType = keyof PlatformEvents;
|
|
17
18
|
/** Every platform event's type, as the contracts declare them. */
|
|
18
|
-
export declare const EVENT_TYPES: readonly ["ai.goal.updated", "ai.response.completed", "ai.response.failed", "ai.response.started", "ai.voice.closed", "ai.voice.delegated", "ai.voice.started", "ai.workspace.published", "ai.workspace.pushed", "audience.entered", "audience.exited", "consent.changed", "device.revoked", "file.deleted", "file.moved", "file.uploaded", "flag.changed", "flag.override_changed", "journey.converted", "journey.ended", "journey.entered", "journey.event", "journey.step", "messaging.conversation.created", "messaging.conversation.deleted", "messaging.report.created", "notification.action", "notification.bounced", "notification.complained", "notification.delivered", "notification.dismissed", "notification.expired", "notification.failed", "notification.not_shown", "notification.opened", "notification.push_failing", "notification.read", "notification.received", "notification.rejected", "notification.sent", "notification.unconfirmed", "notification.undelivered", "notification.uninstalled", "purchases.catalog.applied", "purchases.catalog.changed", "purchases.coupon.redeemed", "purchases.credits.depleted", "purchases.credits.low", "purchases.customer.changed", "purchases.customer.erased", "purchases.customer.merged", "purchases.entitlement.changed", "purchases.offer.redeemed", "purchases.ownership.transferred", "purchases.paywall.published", "purchases.purchase.completed", "purchases.quota.exhausted", "purchases.quota.threshold", "purchases.refund.changed", "purchases.store.changed", "purchases.subscription.changed", "session.ended", "stores.action.changed", "stores.app.changed", "stores.apple.changed", "stores.apple.key.made", "stores.apple.key.revoked", "stores.apple.session.changed", "stores.apple.session.ended", "stores.apple.session.expired", "stores.beta_review.changed", "stores.build.changed", "stores.delivery.changed", "stores.delivery.requested", "stores.feedback.received", "stores.google.changed", "stores.group.changed", "stores.package.changed", "stores.play_release.changed", "stores.product.changed", "stores.review.message", "stores.version.changed", "stores.version.reviewed", "stores.vitals.changed", "stores.webhook.changed", "user.converted", "user.deleted", "user.locale_changed", "user.permissions_changed"];
|
|
19
|
+
export declare const EVENT_TYPES: readonly ["ai.goal.updated", "ai.response.completed", "ai.response.failed", "ai.response.started", "ai.voice.closed", "ai.voice.delegated", "ai.voice.started", "ai.workspace.published", "ai.workspace.pushed", "audience.entered", "audience.exited", "calls.call.ended", "calls.call.started", "calls.participant.joined", "calls.participant.left", "consent.changed", "device.revoked", "file.deleted", "file.moved", "file.uploaded", "flag.changed", "flag.override_changed", "journey.converted", "journey.ended", "journey.entered", "journey.event", "journey.step", "messaging.conversation.created", "messaging.conversation.deleted", "messaging.conversation.read", "messaging.message.created", "messaging.report.created", "notification.action", "notification.bounced", "notification.complained", "notification.delivered", "notification.dismissed", "notification.expired", "notification.failed", "notification.not_shown", "notification.opened", "notification.push_failing", "notification.read", "notification.received", "notification.rejected", "notification.sent", "notification.unconfirmed", "notification.undelivered", "notification.uninstalled", "purchases.catalog.applied", "purchases.catalog.changed", "purchases.coupon.redeemed", "purchases.credits.depleted", "purchases.credits.low", "purchases.customer.changed", "purchases.customer.erased", "purchases.customer.merged", "purchases.entitlement.changed", "purchases.offer.redeemed", "purchases.ownership.transferred", "purchases.paywall.published", "purchases.purchase.completed", "purchases.quota.exhausted", "purchases.quota.threshold", "purchases.refund.changed", "purchases.store.changed", "purchases.subscription.changed", "session.ended", "stores.action.changed", "stores.app.changed", "stores.apple.changed", "stores.apple.key.made", "stores.apple.key.revoked", "stores.apple.session.changed", "stores.apple.session.ended", "stores.apple.session.expired", "stores.beta_review.changed", "stores.build.changed", "stores.delivery.changed", "stores.delivery.requested", "stores.feedback.received", "stores.google.changed", "stores.group.changed", "stores.package.changed", "stores.play_release.changed", "stores.product.changed", "stores.review.message", "stores.version.changed", "stores.version.reviewed", "stores.vitals.changed", "stores.webhook.changed", "user.converted", "user.deleted", "user.locale_changed", "user.permissions_changed"];
|
|
19
20
|
/**
|
|
20
21
|
* A platform event as delivered: one member per type the contracts declare,
|
|
21
22
|
* its data that type's payload, so a switch on its type narrows it. An
|
|
22
23
|
* event of a type none of them declares (one a newer platform sends) is no
|
|
23
24
|
* member: at run time it reaches the switch's default, which takes it.
|
|
24
25
|
*/
|
|
25
|
-
export type PalbaseEvent = WebhookEvent<PlatformEvents["ai.goal.updated"], "ai.goal.updated"> | WebhookEvent<PlatformEvents["ai.response.completed"], "ai.response.completed"> | WebhookEvent<PlatformEvents["ai.response.failed"], "ai.response.failed"> | WebhookEvent<PlatformEvents["ai.response.started"], "ai.response.started"> | WebhookEvent<PlatformEvents["ai.voice.closed"], "ai.voice.closed"> | WebhookEvent<PlatformEvents["ai.voice.delegated"], "ai.voice.delegated"> | WebhookEvent<PlatformEvents["ai.voice.started"], "ai.voice.started"> | WebhookEvent<PlatformEvents["ai.workspace.published"], "ai.workspace.published"> | WebhookEvent<PlatformEvents["ai.workspace.pushed"], "ai.workspace.pushed"> | WebhookEvent<PlatformEvents["audience.entered"], "audience.entered"> | WebhookEvent<PlatformEvents["audience.exited"], "audience.exited"> | WebhookEvent<PlatformEvents["consent.changed"], "consent.changed"> | WebhookEvent<PlatformEvents["device.revoked"], "device.revoked"> | WebhookEvent<PlatformEvents["file.deleted"], "file.deleted"> | WebhookEvent<PlatformEvents["file.moved"], "file.moved"> | WebhookEvent<PlatformEvents["file.uploaded"], "file.uploaded"> | WebhookEvent<PlatformEvents["flag.changed"], "flag.changed"> | WebhookEvent<PlatformEvents["flag.override_changed"], "flag.override_changed"> | WebhookEvent<PlatformEvents["journey.converted"], "journey.converted"> | WebhookEvent<PlatformEvents["journey.ended"], "journey.ended"> | WebhookEvent<PlatformEvents["journey.entered"], "journey.entered"> | WebhookEvent<PlatformEvents["journey.event"], "journey.event"> | WebhookEvent<PlatformEvents["journey.step"], "journey.step"> | WebhookEvent<PlatformEvents["messaging.conversation.created"], "messaging.conversation.created"> | WebhookEvent<PlatformEvents["messaging.conversation.deleted"], "messaging.conversation.deleted"> | WebhookEvent<PlatformEvents["messaging.report.created"], "messaging.report.created"> | WebhookEvent<PlatformEvents["notification.action"], "notification.action"> | WebhookEvent<PlatformEvents["notification.bounced"], "notification.bounced"> | WebhookEvent<PlatformEvents["notification.complained"], "notification.complained"> | WebhookEvent<PlatformEvents["notification.delivered"], "notification.delivered"> | WebhookEvent<PlatformEvents["notification.dismissed"], "notification.dismissed"> | WebhookEvent<PlatformEvents["notification.expired"], "notification.expired"> | WebhookEvent<PlatformEvents["notification.failed"], "notification.failed"> | WebhookEvent<PlatformEvents["notification.not_shown"], "notification.not_shown"> | WebhookEvent<PlatformEvents["notification.opened"], "notification.opened"> | WebhookEvent<PlatformEvents["notification.push_failing"], "notification.push_failing"> | WebhookEvent<PlatformEvents["notification.read"], "notification.read"> | WebhookEvent<PlatformEvents["notification.received"], "notification.received"> | WebhookEvent<PlatformEvents["notification.rejected"], "notification.rejected"> | WebhookEvent<PlatformEvents["notification.sent"], "notification.sent"> | WebhookEvent<PlatformEvents["notification.unconfirmed"], "notification.unconfirmed"> | WebhookEvent<PlatformEvents["notification.undelivered"], "notification.undelivered"> | WebhookEvent<PlatformEvents["notification.uninstalled"], "notification.uninstalled"> | WebhookEvent<PlatformEvents["purchases.catalog.applied"], "purchases.catalog.applied"> | WebhookEvent<PlatformEvents["purchases.catalog.changed"], "purchases.catalog.changed"> | WebhookEvent<PlatformEvents["purchases.coupon.redeemed"], "purchases.coupon.redeemed"> | WebhookEvent<PlatformEvents["purchases.credits.depleted"], "purchases.credits.depleted"> | WebhookEvent<PlatformEvents["purchases.credits.low"], "purchases.credits.low"> | WebhookEvent<PlatformEvents["purchases.customer.changed"], "purchases.customer.changed"> | WebhookEvent<PlatformEvents["purchases.customer.erased"], "purchases.customer.erased"> | WebhookEvent<PlatformEvents["purchases.customer.merged"], "purchases.customer.merged"> | WebhookEvent<PlatformEvents["purchases.entitlement.changed"], "purchases.entitlement.changed"> | WebhookEvent<PlatformEvents["purchases.offer.redeemed"], "purchases.offer.redeemed"> | WebhookEvent<PlatformEvents["purchases.ownership.transferred"], "purchases.ownership.transferred"> | WebhookEvent<PlatformEvents["purchases.paywall.published"], "purchases.paywall.published"> | WebhookEvent<PlatformEvents["purchases.purchase.completed"], "purchases.purchase.completed"> | WebhookEvent<PlatformEvents["purchases.quota.exhausted"], "purchases.quota.exhausted"> | WebhookEvent<PlatformEvents["purchases.quota.threshold"], "purchases.quota.threshold"> | WebhookEvent<PlatformEvents["purchases.refund.changed"], "purchases.refund.changed"> | WebhookEvent<PlatformEvents["purchases.store.changed"], "purchases.store.changed"> | WebhookEvent<PlatformEvents["purchases.subscription.changed"], "purchases.subscription.changed"> | WebhookEvent<PlatformEvents["session.ended"], "session.ended"> | WebhookEvent<PlatformEvents["stores.action.changed"], "stores.action.changed"> | WebhookEvent<PlatformEvents["stores.app.changed"], "stores.app.changed"> | WebhookEvent<PlatformEvents["stores.apple.changed"], "stores.apple.changed"> | WebhookEvent<PlatformEvents["stores.apple.key.made"], "stores.apple.key.made"> | WebhookEvent<PlatformEvents["stores.apple.key.revoked"], "stores.apple.key.revoked"> | WebhookEvent<PlatformEvents["stores.apple.session.changed"], "stores.apple.session.changed"> | WebhookEvent<PlatformEvents["stores.apple.session.ended"], "stores.apple.session.ended"> | WebhookEvent<PlatformEvents["stores.apple.session.expired"], "stores.apple.session.expired"> | WebhookEvent<PlatformEvents["stores.beta_review.changed"], "stores.beta_review.changed"> | WebhookEvent<PlatformEvents["stores.build.changed"], "stores.build.changed"> | WebhookEvent<PlatformEvents["stores.delivery.changed"], "stores.delivery.changed"> | WebhookEvent<PlatformEvents["stores.delivery.requested"], "stores.delivery.requested"> | WebhookEvent<PlatformEvents["stores.feedback.received"], "stores.feedback.received"> | WebhookEvent<PlatformEvents["stores.google.changed"], "stores.google.changed"> | WebhookEvent<PlatformEvents["stores.group.changed"], "stores.group.changed"> | WebhookEvent<PlatformEvents["stores.package.changed"], "stores.package.changed"> | WebhookEvent<PlatformEvents["stores.play_release.changed"], "stores.play_release.changed"> | WebhookEvent<PlatformEvents["stores.product.changed"], "stores.product.changed"> | WebhookEvent<PlatformEvents["stores.review.message"], "stores.review.message"> | WebhookEvent<PlatformEvents["stores.version.changed"], "stores.version.changed"> | WebhookEvent<PlatformEvents["stores.version.reviewed"], "stores.version.reviewed"> | WebhookEvent<PlatformEvents["stores.vitals.changed"], "stores.vitals.changed"> | WebhookEvent<PlatformEvents["stores.webhook.changed"], "stores.webhook.changed"> | WebhookEvent<PlatformEvents["user.converted"], "user.converted"> | WebhookEvent<PlatformEvents["user.deleted"], "user.deleted"> | WebhookEvent<PlatformEvents["user.locale_changed"], "user.locale_changed"> | WebhookEvent<PlatformEvents["user.permissions_changed"], "user.permissions_changed">;
|
|
26
|
+
export type PalbaseEvent = WebhookEvent<PlatformEvents["ai.goal.updated"], "ai.goal.updated"> | WebhookEvent<PlatformEvents["ai.response.completed"], "ai.response.completed"> | WebhookEvent<PlatformEvents["ai.response.failed"], "ai.response.failed"> | WebhookEvent<PlatformEvents["ai.response.started"], "ai.response.started"> | WebhookEvent<PlatformEvents["ai.voice.closed"], "ai.voice.closed"> | WebhookEvent<PlatformEvents["ai.voice.delegated"], "ai.voice.delegated"> | WebhookEvent<PlatformEvents["ai.voice.started"], "ai.voice.started"> | WebhookEvent<PlatformEvents["ai.workspace.published"], "ai.workspace.published"> | WebhookEvent<PlatformEvents["ai.workspace.pushed"], "ai.workspace.pushed"> | WebhookEvent<PlatformEvents["audience.entered"], "audience.entered"> | WebhookEvent<PlatformEvents["audience.exited"], "audience.exited"> | WebhookEvent<PlatformEvents["calls.call.ended"], "calls.call.ended"> | WebhookEvent<PlatformEvents["calls.call.started"], "calls.call.started"> | WebhookEvent<PlatformEvents["calls.participant.joined"], "calls.participant.joined"> | WebhookEvent<PlatformEvents["calls.participant.left"], "calls.participant.left"> | WebhookEvent<PlatformEvents["consent.changed"], "consent.changed"> | WebhookEvent<PlatformEvents["device.revoked"], "device.revoked"> | WebhookEvent<PlatformEvents["file.deleted"], "file.deleted"> | WebhookEvent<PlatformEvents["file.moved"], "file.moved"> | WebhookEvent<PlatformEvents["file.uploaded"], "file.uploaded"> | WebhookEvent<PlatformEvents["flag.changed"], "flag.changed"> | WebhookEvent<PlatformEvents["flag.override_changed"], "flag.override_changed"> | WebhookEvent<PlatformEvents["journey.converted"], "journey.converted"> | WebhookEvent<PlatformEvents["journey.ended"], "journey.ended"> | WebhookEvent<PlatformEvents["journey.entered"], "journey.entered"> | WebhookEvent<PlatformEvents["journey.event"], "journey.event"> | WebhookEvent<PlatformEvents["journey.step"], "journey.step"> | WebhookEvent<PlatformEvents["messaging.conversation.created"], "messaging.conversation.created"> | WebhookEvent<PlatformEvents["messaging.conversation.deleted"], "messaging.conversation.deleted"> | WebhookEvent<PlatformEvents["messaging.conversation.read"], "messaging.conversation.read"> | WebhookEvent<PlatformEvents["messaging.message.created"], "messaging.message.created"> | WebhookEvent<PlatformEvents["messaging.report.created"], "messaging.report.created"> | WebhookEvent<PlatformEvents["notification.action"], "notification.action"> | WebhookEvent<PlatformEvents["notification.bounced"], "notification.bounced"> | WebhookEvent<PlatformEvents["notification.complained"], "notification.complained"> | WebhookEvent<PlatformEvents["notification.delivered"], "notification.delivered"> | WebhookEvent<PlatformEvents["notification.dismissed"], "notification.dismissed"> | WebhookEvent<PlatformEvents["notification.expired"], "notification.expired"> | WebhookEvent<PlatformEvents["notification.failed"], "notification.failed"> | WebhookEvent<PlatformEvents["notification.not_shown"], "notification.not_shown"> | WebhookEvent<PlatformEvents["notification.opened"], "notification.opened"> | WebhookEvent<PlatformEvents["notification.push_failing"], "notification.push_failing"> | WebhookEvent<PlatformEvents["notification.read"], "notification.read"> | WebhookEvent<PlatformEvents["notification.received"], "notification.received"> | WebhookEvent<PlatformEvents["notification.rejected"], "notification.rejected"> | WebhookEvent<PlatformEvents["notification.sent"], "notification.sent"> | WebhookEvent<PlatformEvents["notification.unconfirmed"], "notification.unconfirmed"> | WebhookEvent<PlatformEvents["notification.undelivered"], "notification.undelivered"> | WebhookEvent<PlatformEvents["notification.uninstalled"], "notification.uninstalled"> | WebhookEvent<PlatformEvents["purchases.catalog.applied"], "purchases.catalog.applied"> | WebhookEvent<PlatformEvents["purchases.catalog.changed"], "purchases.catalog.changed"> | WebhookEvent<PlatformEvents["purchases.coupon.redeemed"], "purchases.coupon.redeemed"> | WebhookEvent<PlatformEvents["purchases.credits.depleted"], "purchases.credits.depleted"> | WebhookEvent<PlatformEvents["purchases.credits.low"], "purchases.credits.low"> | WebhookEvent<PlatformEvents["purchases.customer.changed"], "purchases.customer.changed"> | WebhookEvent<PlatformEvents["purchases.customer.erased"], "purchases.customer.erased"> | WebhookEvent<PlatformEvents["purchases.customer.merged"], "purchases.customer.merged"> | WebhookEvent<PlatformEvents["purchases.entitlement.changed"], "purchases.entitlement.changed"> | WebhookEvent<PlatformEvents["purchases.offer.redeemed"], "purchases.offer.redeemed"> | WebhookEvent<PlatformEvents["purchases.ownership.transferred"], "purchases.ownership.transferred"> | WebhookEvent<PlatformEvents["purchases.paywall.published"], "purchases.paywall.published"> | WebhookEvent<PlatformEvents["purchases.purchase.completed"], "purchases.purchase.completed"> | WebhookEvent<PlatformEvents["purchases.quota.exhausted"], "purchases.quota.exhausted"> | WebhookEvent<PlatformEvents["purchases.quota.threshold"], "purchases.quota.threshold"> | WebhookEvent<PlatformEvents["purchases.refund.changed"], "purchases.refund.changed"> | WebhookEvent<PlatformEvents["purchases.store.changed"], "purchases.store.changed"> | WebhookEvent<PlatformEvents["purchases.subscription.changed"], "purchases.subscription.changed"> | WebhookEvent<PlatformEvents["session.ended"], "session.ended"> | WebhookEvent<PlatformEvents["stores.action.changed"], "stores.action.changed"> | WebhookEvent<PlatformEvents["stores.app.changed"], "stores.app.changed"> | WebhookEvent<PlatformEvents["stores.apple.changed"], "stores.apple.changed"> | WebhookEvent<PlatformEvents["stores.apple.key.made"], "stores.apple.key.made"> | WebhookEvent<PlatformEvents["stores.apple.key.revoked"], "stores.apple.key.revoked"> | WebhookEvent<PlatformEvents["stores.apple.session.changed"], "stores.apple.session.changed"> | WebhookEvent<PlatformEvents["stores.apple.session.ended"], "stores.apple.session.ended"> | WebhookEvent<PlatformEvents["stores.apple.session.expired"], "stores.apple.session.expired"> | WebhookEvent<PlatformEvents["stores.beta_review.changed"], "stores.beta_review.changed"> | WebhookEvent<PlatformEvents["stores.build.changed"], "stores.build.changed"> | WebhookEvent<PlatformEvents["stores.delivery.changed"], "stores.delivery.changed"> | WebhookEvent<PlatformEvents["stores.delivery.requested"], "stores.delivery.requested"> | WebhookEvent<PlatformEvents["stores.feedback.received"], "stores.feedback.received"> | WebhookEvent<PlatformEvents["stores.google.changed"], "stores.google.changed"> | WebhookEvent<PlatformEvents["stores.group.changed"], "stores.group.changed"> | WebhookEvent<PlatformEvents["stores.package.changed"], "stores.package.changed"> | WebhookEvent<PlatformEvents["stores.play_release.changed"], "stores.play_release.changed"> | WebhookEvent<PlatformEvents["stores.product.changed"], "stores.product.changed"> | WebhookEvent<PlatformEvents["stores.review.message"], "stores.review.message"> | WebhookEvent<PlatformEvents["stores.version.changed"], "stores.version.changed"> | WebhookEvent<PlatformEvents["stores.version.reviewed"], "stores.version.reviewed"> | WebhookEvent<PlatformEvents["stores.vitals.changed"], "stores.vitals.changed"> | WebhookEvent<PlatformEvents["stores.webhook.changed"], "stores.webhook.changed"> | WebhookEvent<PlatformEvents["user.converted"], "user.converted"> | WebhookEvent<PlatformEvents["user.deleted"], "user.deleted"> | WebhookEvent<PlatformEvents["user.locale_changed"], "user.locale_changed"> | WebhookEvent<PlatformEvents["user.permissions_changed"], "user.permissions_changed">;
|
|
@@ -2,6 +2,7 @@ export * as ai from './ai.js';
|
|
|
2
2
|
export * as analytics from './analytics.js';
|
|
3
3
|
export * as auth from './auth.js';
|
|
4
4
|
export * as cache from './cache.js';
|
|
5
|
+
export * as calls from './calls.js';
|
|
5
6
|
export * as flags from './flags.js';
|
|
6
7
|
export * as journeys from './journeys.js';
|
|
7
8
|
export * as machines from './machines.js';
|
|
@@ -80,15 +80,27 @@ export type AdminConversationRequest = {
|
|
|
80
80
|
*/
|
|
81
81
|
photo?: string;
|
|
82
82
|
settings?: GroupSettings;
|
|
83
|
+
/**
|
|
84
|
+
* The place of the app's it belongs to, as the app names it (org:<id>, project:<id>): 1 to 128 letters, digits and : _ . / @ -. Fixed as it is made; absent: none.
|
|
85
|
+
*/
|
|
86
|
+
space?: string;
|
|
83
87
|
/**
|
|
84
88
|
* A group's title.
|
|
85
89
|
*/
|
|
86
90
|
title?: string;
|
|
91
|
+
/**
|
|
92
|
+
* open (a space named: required): found in its space's open groups and joined by whom the project's hook lets (POST …/join); closed (the default): joined when someone adds you. A direct conversation is never open.
|
|
93
|
+
*/
|
|
94
|
+
visibility?: "open" | "closed";
|
|
87
95
|
};
|
|
88
96
|
/**
|
|
89
|
-
* A message the project's server says, as the
|
|
97
|
+
* A message the project's server says: as the app, or as one of the conversation's people (as_user_id, with via).
|
|
90
98
|
*/
|
|
91
99
|
export type AdminMessageRequest = {
|
|
100
|
+
/**
|
|
101
|
+
* The person it is written as: one of the conversation's people now. The message is theirs, as if they sent it — what they may send there, their read of it, the others' unread counts and pushes, from them — and says via what wrote it. Each is in the access log, the person named.
|
|
102
|
+
*/
|
|
103
|
+
as_user_id?: string;
|
|
92
104
|
/**
|
|
93
105
|
* The server's own id of it: sent again with it, it is the same message.
|
|
94
106
|
*/
|
|
@@ -101,6 +113,14 @@ export type AdminMessageRequest = {
|
|
|
101
113
|
* What it says.
|
|
102
114
|
*/
|
|
103
115
|
text: string;
|
|
116
|
+
/**
|
|
117
|
+
* The message whose thread it answers.
|
|
118
|
+
*/
|
|
119
|
+
thread_id?: string;
|
|
120
|
+
/**
|
|
121
|
+
* What wrote it (as pal), shown with the message (Message.via): 1 to 32 letters, digits and _ . -. Required with as_user_id — the others always know it was not the person's own hand.
|
|
122
|
+
*/
|
|
123
|
+
via?: string;
|
|
104
124
|
};
|
|
105
125
|
/**
|
|
106
126
|
* The project's server's word on a person's name and picture.
|
|
@@ -159,6 +179,10 @@ export type AdminUpdateConversation = {
|
|
|
159
179
|
* A direct conversation's vanish mode.
|
|
160
180
|
*/
|
|
161
181
|
vanish?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* A group's: open (found in its space's open groups and joined by whom the project's hook lets; the group has a space — 400 space_required otherwise) or closed. Its admins' (or the project's server's); a person opening one is asked of the hook first (open_group): refused, 403 not_allowed. Opened, whoever joins reads what its history shows newcomers (history_for_new_members).
|
|
184
|
+
*/
|
|
185
|
+
visibility?: "open" | "closed";
|
|
162
186
|
};
|
|
163
187
|
/**
|
|
164
188
|
* A file a message carries.
|
|
@@ -269,6 +293,51 @@ export type BlockPage = {
|
|
|
269
293
|
*/
|
|
270
294
|
next_cursor?: string;
|
|
271
295
|
};
|
|
296
|
+
/**
|
|
297
|
+
* A call made from a conversation, as its call message keeps it (the calls module's word).
|
|
298
|
+
*/
|
|
299
|
+
export type CallRecord = {
|
|
300
|
+
/**
|
|
301
|
+
* When it was answered
|
|
302
|
+
*/
|
|
303
|
+
answered_at: string | null;
|
|
304
|
+
/**
|
|
305
|
+
* The call (GET /calls/{call_id})
|
|
306
|
+
*/
|
|
307
|
+
call_id: string;
|
|
308
|
+
/**
|
|
309
|
+
* Who called
|
|
310
|
+
*/
|
|
311
|
+
caller_id: string;
|
|
312
|
+
/**
|
|
313
|
+
* Why it ended: hung_up, canceled, declined, missed, busy, failed or ended
|
|
314
|
+
*/
|
|
315
|
+
end_reason: string | null;
|
|
316
|
+
/**
|
|
317
|
+
* When it ended
|
|
318
|
+
*/
|
|
319
|
+
ended_at: string | null;
|
|
320
|
+
/**
|
|
321
|
+
* Two people, or a group
|
|
322
|
+
*/
|
|
323
|
+
kind: "direct" | "group";
|
|
324
|
+
/**
|
|
325
|
+
* How long it lasted, from its answer to its end
|
|
326
|
+
*/
|
|
327
|
+
seconds: number;
|
|
328
|
+
/**
|
|
329
|
+
* When it was made
|
|
330
|
+
*/
|
|
331
|
+
started_at: string;
|
|
332
|
+
/**
|
|
333
|
+
* Ringing, going on, or over
|
|
334
|
+
*/
|
|
335
|
+
state: "ringing" | "active" | "ended";
|
|
336
|
+
/**
|
|
337
|
+
* A video call (else voice)
|
|
338
|
+
*/
|
|
339
|
+
video: boolean;
|
|
340
|
+
};
|
|
272
341
|
/**
|
|
273
342
|
* A conversation as a member reads it.
|
|
274
343
|
*/
|
|
@@ -335,6 +404,10 @@ export type Conversation = {
|
|
|
335
404
|
*/
|
|
336
405
|
photo: string | null;
|
|
337
406
|
settings: ConversationSettings;
|
|
407
|
+
/**
|
|
408
|
+
* The place of the app's it belongs to (org:<id>, project:<id>), fixed as it was made; null: none. Always sent; absent (an answer kept from before it was): null.
|
|
409
|
+
*/
|
|
410
|
+
space?: string | null;
|
|
338
411
|
/**
|
|
339
412
|
* A group's title.
|
|
340
413
|
*/
|
|
@@ -343,6 +416,10 @@ export type Conversation = {
|
|
|
343
416
|
* How many times it changed.
|
|
344
417
|
*/
|
|
345
418
|
version: number;
|
|
419
|
+
/**
|
|
420
|
+
* open: a group found in its space's open groups and joined by whom the project's hook lets; closed: joined when someone adds you (every direct conversation). Always sent; absent (an answer kept from before it was): closed.
|
|
421
|
+
*/
|
|
422
|
+
visibility?: "open" | "closed";
|
|
346
423
|
};
|
|
347
424
|
/**
|
|
348
425
|
* A conversation made, and whom it did not take.
|
|
@@ -374,6 +451,10 @@ export type ConversationCreatedEvent = {
|
|
|
374
451
|
* Its people.
|
|
375
452
|
*/
|
|
376
453
|
member_ids: string[];
|
|
454
|
+
/**
|
|
455
|
+
* Its space; null: none.
|
|
456
|
+
*/
|
|
457
|
+
space?: string | null;
|
|
377
458
|
};
|
|
378
459
|
/**
|
|
379
460
|
* messaging.conversation.deleted
|
|
@@ -398,6 +479,31 @@ export type ConversationPage = {
|
|
|
398
479
|
*/
|
|
399
480
|
next_cursor?: string;
|
|
400
481
|
};
|
|
482
|
+
/**
|
|
483
|
+
* messaging.conversation.read
|
|
484
|
+
*/
|
|
485
|
+
export type ConversationReadEvent = {
|
|
486
|
+
/**
|
|
487
|
+
* The conversation.
|
|
488
|
+
*/
|
|
489
|
+
conversation_id: string;
|
|
490
|
+
/**
|
|
491
|
+
* How far they read it (a message's seq).
|
|
492
|
+
*/
|
|
493
|
+
read_seq: number;
|
|
494
|
+
/**
|
|
495
|
+
* The conversation's space; null: none.
|
|
496
|
+
*/
|
|
497
|
+
space: string | null;
|
|
498
|
+
/**
|
|
499
|
+
* The thread they read; null: the conversation itself.
|
|
500
|
+
*/
|
|
501
|
+
thread_id: string | null;
|
|
502
|
+
/**
|
|
503
|
+
* Who read it.
|
|
504
|
+
*/
|
|
505
|
+
user_id: string;
|
|
506
|
+
};
|
|
401
507
|
/**
|
|
402
508
|
* How a conversation runs.
|
|
403
509
|
*/
|
|
@@ -432,9 +538,13 @@ export type ConversationSettings = {
|
|
|
432
538
|
vanish: boolean;
|
|
433
539
|
};
|
|
434
540
|
/**
|
|
435
|
-
* Opens the direct conversation with a person.
|
|
541
|
+
* Opens the direct conversation with a person, in a space.
|
|
436
542
|
*/
|
|
437
543
|
export type DirectRequest = {
|
|
544
|
+
/**
|
|
545
|
+
* The space it is in (org:<id>): the pair has one direct conversation in each space, and one with none. 1 to 128 letters, digits and : _ . / @ -; absent: none.
|
|
546
|
+
*/
|
|
547
|
+
space?: string;
|
|
438
548
|
/**
|
|
439
549
|
* The other person.
|
|
440
550
|
*/
|
|
@@ -521,10 +631,18 @@ export type GroupRequest = {
|
|
|
521
631
|
*/
|
|
522
632
|
photo?: string;
|
|
523
633
|
settings?: GroupSettings;
|
|
634
|
+
/**
|
|
635
|
+
* The place of the app's it belongs to, as the app names it (org:<id>, project:<id>): 1 to 128 letters, digits and : _ . / @ -. Fixed as it is made; absent: none.
|
|
636
|
+
*/
|
|
637
|
+
space?: string;
|
|
524
638
|
/**
|
|
525
639
|
* Its title.
|
|
526
640
|
*/
|
|
527
641
|
title: string;
|
|
642
|
+
/**
|
|
643
|
+
* open (a space named: required): found in its space's open groups and joined by whom the project's hook lets (POST …/join); closed (the default): joined when someone adds you. A person's open group is asked of the project's hook first (open_group, the space named): refused, 403 not_allowed.
|
|
644
|
+
*/
|
|
645
|
+
visibility?: "open" | "closed";
|
|
528
646
|
};
|
|
529
647
|
/**
|
|
530
648
|
* How a group runs, as it is made.
|
|
@@ -569,7 +687,7 @@ export type HiddenMessage = {
|
|
|
569
687
|
*/
|
|
570
688
|
export type HookSettings = {
|
|
571
689
|
/**
|
|
572
|
-
* When it does not answer: allow everyone, or deny (the client retries).
|
|
690
|
+
* When it does not answer: allow everyone, or deny (the client retries). Allow is for a direct conversation and people added to a group alone: a space's open groups — having one, finding them, joining one — are refused (503 hook_unavailable) while it is silent, whatever this says.
|
|
573
691
|
*/
|
|
574
692
|
on_error: "allow" | "deny";
|
|
575
693
|
/**
|
|
@@ -586,7 +704,7 @@ export type HookSettings = {
|
|
|
586
704
|
*/
|
|
587
705
|
export type HookSettingsRequest = {
|
|
588
706
|
/**
|
|
589
|
-
* allow or deny (default).
|
|
707
|
+
* allow or deny (default). Allow never opens a space's open groups (open_group, list_open, join): those are refused while the hook is silent.
|
|
590
708
|
*/
|
|
591
709
|
on_error?: "allow" | "deny";
|
|
592
710
|
/**
|
|
@@ -749,6 +867,10 @@ export type Message = {
|
|
|
749
867
|
* Its files.
|
|
750
868
|
*/
|
|
751
869
|
attachments: Attachment[];
|
|
870
|
+
/**
|
|
871
|
+
* What a call message keeps of its call (kind call): written as the call starts, and again as it is answered and as it ends. It counts as no unread message.
|
|
872
|
+
*/
|
|
873
|
+
call: CallRecord | null;
|
|
752
874
|
/**
|
|
753
875
|
* The writer's app's own id of it.
|
|
754
876
|
*/
|
|
@@ -782,9 +904,9 @@ export type Message = {
|
|
|
782
904
|
*/
|
|
783
905
|
id: string;
|
|
784
906
|
/**
|
|
785
|
-
* text, media (files) or
|
|
907
|
+
* text, media (files), system, or call (a call made from the conversation: `call` says how it went).
|
|
786
908
|
*/
|
|
787
|
-
kind: "text" | "media" | "system";
|
|
909
|
+
kind: "text" | "media" | "system" | "call";
|
|
788
910
|
/**
|
|
789
911
|
* When its thread was last answered.
|
|
790
912
|
*/
|
|
@@ -837,11 +959,76 @@ export type Message = {
|
|
|
837
959
|
* How many times it changed (a reaction, an answer in its thread, an edit).
|
|
838
960
|
*/
|
|
839
961
|
version: number;
|
|
962
|
+
/**
|
|
963
|
+
* What the project's server wrote it through, as one of the conversation's people or as the app (as pal): show it beside the message ("sent by Pal"). null: its writer wrote it. Always sent; absent (an answer kept from before it was): null.
|
|
964
|
+
*/
|
|
965
|
+
via?: string | null;
|
|
840
966
|
/**
|
|
841
967
|
* When it is seen a limited number of times.
|
|
842
968
|
*/
|
|
843
969
|
view_once: ViewOnce | null;
|
|
844
970
|
};
|
|
971
|
+
/**
|
|
972
|
+
* messaging.message.created
|
|
973
|
+
*/
|
|
974
|
+
export type MessageCreatedEvent = {
|
|
975
|
+
/**
|
|
976
|
+
* The conversation.
|
|
977
|
+
*/
|
|
978
|
+
conversation_id: string;
|
|
979
|
+
/**
|
|
980
|
+
* direct or group.
|
|
981
|
+
*/
|
|
982
|
+
conversation_kind: string;
|
|
983
|
+
/**
|
|
984
|
+
* When it was written.
|
|
985
|
+
*/
|
|
986
|
+
created_at: string;
|
|
987
|
+
/**
|
|
988
|
+
* Whether it carries files.
|
|
989
|
+
*/
|
|
990
|
+
has_attachments: boolean;
|
|
991
|
+
/**
|
|
992
|
+
* text or media (files).
|
|
993
|
+
*/
|
|
994
|
+
kind: string;
|
|
995
|
+
/**
|
|
996
|
+
* Whom its words name.
|
|
997
|
+
*/
|
|
998
|
+
mention_ids: string[];
|
|
999
|
+
/**
|
|
1000
|
+
* The message: read it with the secret key (GET /messaging/admin/conversations/{conversation_id}/messages).
|
|
1001
|
+
*/
|
|
1002
|
+
message_id: string;
|
|
1003
|
+
/**
|
|
1004
|
+
* Whom it is for: the conversation's people but its writer (and one blocking them, whom it never reaches).
|
|
1005
|
+
*/
|
|
1006
|
+
recipient_ids: string[];
|
|
1007
|
+
/**
|
|
1008
|
+
* Its writer; null: the project's server, as the app.
|
|
1009
|
+
*/
|
|
1010
|
+
sender_id: string | null;
|
|
1011
|
+
/**
|
|
1012
|
+
* Its place in the conversation.
|
|
1013
|
+
*/
|
|
1014
|
+
seq: number;
|
|
1015
|
+
/**
|
|
1016
|
+
* The conversation's space; null: none.
|
|
1017
|
+
*/
|
|
1018
|
+
space: string | null;
|
|
1019
|
+
/**
|
|
1020
|
+
* What it says, when the project lets the event say it (settings.event_text) — never a message meant to go (vanish mode, seen a limited number of times, living a while): the event stream keeps an event 7 days; absent otherwise.
|
|
1021
|
+
*/
|
|
1022
|
+
text?: string;
|
|
1023
|
+
/**
|
|
1024
|
+
* The message whose thread it answers; null: none.
|
|
1025
|
+
*/
|
|
1026
|
+
thread_id: string | null;
|
|
1027
|
+
/**
|
|
1028
|
+
* What the project's server wrote it through (as pal); null: its writer wrote it.
|
|
1029
|
+
*/
|
|
1030
|
+
via: string | null;
|
|
1031
|
+
};
|
|
845
1032
|
export type MessagePage = {
|
|
846
1033
|
/**
|
|
847
1034
|
* The messages.
|
|
@@ -915,6 +1102,54 @@ export type NotificationsRequest = {
|
|
|
915
1102
|
*/
|
|
916
1103
|
notify_level?: "all" | "mentions" | "none";
|
|
917
1104
|
};
|
|
1105
|
+
/**
|
|
1106
|
+
* An open group of a space, as one who may find it reads it.
|
|
1107
|
+
*/
|
|
1108
|
+
export type OpenGroup = {
|
|
1109
|
+
/**
|
|
1110
|
+
* When it was made.
|
|
1111
|
+
*/
|
|
1112
|
+
created_at: string;
|
|
1113
|
+
/**
|
|
1114
|
+
* Its description.
|
|
1115
|
+
*/
|
|
1116
|
+
description: string | null;
|
|
1117
|
+
/**
|
|
1118
|
+
* The group.
|
|
1119
|
+
*/
|
|
1120
|
+
id: string;
|
|
1121
|
+
/**
|
|
1122
|
+
* Whether the reader is in it.
|
|
1123
|
+
*/
|
|
1124
|
+
joined: boolean;
|
|
1125
|
+
/**
|
|
1126
|
+
* When something was last said in it; null: nothing yet.
|
|
1127
|
+
*/
|
|
1128
|
+
last_message_at: string | null;
|
|
1129
|
+
/**
|
|
1130
|
+
* How many people are in it.
|
|
1131
|
+
*/
|
|
1132
|
+
member_count: number;
|
|
1133
|
+
/**
|
|
1134
|
+
* Where the app reads its picture.
|
|
1135
|
+
*/
|
|
1136
|
+
photo: string | null;
|
|
1137
|
+
/**
|
|
1138
|
+
* Its space.
|
|
1139
|
+
*/
|
|
1140
|
+
space: string;
|
|
1141
|
+
/**
|
|
1142
|
+
* Its title.
|
|
1143
|
+
*/
|
|
1144
|
+
title: string | null;
|
|
1145
|
+
};
|
|
1146
|
+
export type OpenGroupPage = {
|
|
1147
|
+
data: OpenGroup[];
|
|
1148
|
+
/**
|
|
1149
|
+
* The next page's cursor; absent on the last.
|
|
1150
|
+
*/
|
|
1151
|
+
next_cursor?: string;
|
|
1152
|
+
};
|
|
918
1153
|
/**
|
|
919
1154
|
* A person as the conversations show them.
|
|
920
1155
|
*/
|
|
@@ -1397,6 +1632,10 @@ export type Settings = {
|
|
|
1397
1632
|
* A deleted user's messages: keep (their writer anonymous) or delete.
|
|
1398
1633
|
*/
|
|
1399
1634
|
deleted_user_messages: "keep" | "delete";
|
|
1635
|
+
/**
|
|
1636
|
+
* Whether messaging.message.created says what the message says (text) — never a message meant to go (vanish mode, seen a limited number of times, living a while): the words leave the sealed store for the project's backend, kept on the event stream for 7 days. false: the backend reads the message with the secret key. Always sent; absent: false.
|
|
1637
|
+
*/
|
|
1638
|
+
event_text?: boolean;
|
|
1400
1639
|
/**
|
|
1401
1640
|
* The hook asked whom one may reach; null: anyone may reach anyone.
|
|
1402
1641
|
*/
|
|
@@ -1426,6 +1665,10 @@ export type SettingsRequest = {
|
|
|
1426
1665
|
* keep or delete.
|
|
1427
1666
|
*/
|
|
1428
1667
|
deleted_user_messages?: "keep" | "delete";
|
|
1668
|
+
/**
|
|
1669
|
+
* Whether messaging.message.created says what the message says (text).
|
|
1670
|
+
*/
|
|
1671
|
+
event_text?: boolean;
|
|
1429
1672
|
/**
|
|
1430
1673
|
* The hook; null removes it.
|
|
1431
1674
|
*/
|
|
@@ -1505,7 +1748,7 @@ export type SystemEvent = {
|
|
|
1505
1748
|
*/
|
|
1506
1749
|
title?: string;
|
|
1507
1750
|
/**
|
|
1508
|
-
* What happened: created, members_added, member_left, member_removed, role_changed, title_changed, description_changed, photo_changed, timer_changed, vanish_on, vanish_off, settings_changed, read_only_on, read_only_off, screenshot. A person whose account was deleted is named deleted_… here, as everywhere.
|
|
1751
|
+
* What happened: created, members_added, member_joined (one joined an open group by themselves), member_left, member_removed, role_changed, title_changed, description_changed, photo_changed, timer_changed, vanish_on, vanish_off, settings_changed, read_only_on, read_only_off, screenshot. A person whose account was deleted is named deleted_… here, as everywhere.
|
|
1509
1752
|
*/
|
|
1510
1753
|
type: string;
|
|
1511
1754
|
/**
|
|
@@ -1608,6 +1851,10 @@ export type UpdateConversation = {
|
|
|
1608
1851
|
* A direct conversation's vanish mode.
|
|
1609
1852
|
*/
|
|
1610
1853
|
vanish?: boolean;
|
|
1854
|
+
/**
|
|
1855
|
+
* A group's: open (found in its space's open groups and joined by whom the project's hook lets; the group has a space — 400 space_required otherwise) or closed. Its admins' (or the project's server's); a person opening one is asked of the hook first (open_group): refused, 403 not_allowed. Opened, whoever joins reads what its history shows newcomers (history_for_new_members).
|
|
1856
|
+
*/
|
|
1857
|
+
visibility?: "open" | "closed";
|
|
1611
1858
|
};
|
|
1612
1859
|
/**
|
|
1613
1860
|
* Changes a member's role.
|
|
@@ -1788,6 +2035,14 @@ export interface Events {
|
|
|
1788
2035
|
* messaging.conversation.deleted: a conversation was deleted for everyone.
|
|
1789
2036
|
*/
|
|
1790
2037
|
"messaging.conversation.deleted": ConversationDeletedEvent;
|
|
2038
|
+
/**
|
|
2039
|
+
* messaging.conversation.read: a person read a conversation, or a thread of it, further (a read receipt, or clearing it). Told only to the endpoints that name it, and written only while one does.
|
|
2040
|
+
*/
|
|
2041
|
+
"messaging.conversation.read": ConversationReadEvent;
|
|
2042
|
+
/**
|
|
2043
|
+
* messaging.message.created: a message reached a conversation — a person's, or the project's server's (as the app, or as a person: via) — with whom it is for and whom it names. Told only to the endpoints that name it (an endpoint of every event is not sent it), and written only while one does.
|
|
2044
|
+
*/
|
|
2045
|
+
"messaging.message.created": MessageCreatedEvent;
|
|
1791
2046
|
/**
|
|
1792
2047
|
* messaging.report.created: a person reported a conversation, someone in it or messages of it; read it with the secret key.
|
|
1793
2048
|
*/
|
|
@@ -1814,10 +2069,11 @@ export declare function client(t: Transport): {
|
|
|
1814
2069
|
*/
|
|
1815
2070
|
adminListConversations(input?: {
|
|
1816
2071
|
query?: {
|
|
1817
|
-
user_id?: string; /** Another person, beside user_id: the direct conversation of the two (none when they have none). */
|
|
2072
|
+
user_id?: string; /** Another person, beside user_id: the direct conversation of the two (none when they have none): their direct conversations in every space (space narrows them). */
|
|
1818
2073
|
with?: string; /** How many (1 to 100; 30 when absent). */
|
|
1819
2074
|
limit?: number; /** The cursor a page handed out (next_cursor). */
|
|
1820
|
-
cursor?: string;
|
|
2075
|
+
cursor?: string; /** Only the conversations of these spaces: one space a parameter, repeated for more, at most 20. */
|
|
2076
|
+
space?: string[];
|
|
1821
2077
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
1822
2078
|
signal?: AbortSignal;
|
|
1823
2079
|
}): Promise<Reply<200, ConversationPage>>;
|
|
@@ -1906,7 +2162,7 @@ export declare function client(t: Transport): {
|
|
|
1906
2162
|
/**
|
|
1907
2163
|
* Say something in a conversation
|
|
1908
2164
|
*
|
|
1909
|
-
* The project's server says something in a conversation, as the
|
|
2165
|
+
* The project's server says something in a conversation — as the app (sender_id null), or as one of its people (as_user_id, with via): the message is theirs, as if they sent it (what they may send there, their read of it, the others' unread counts and pushes, from them), and says what wrote it (Message.via). In a thread too (thread_id). Sent again with the same client_message_id, it is the same message (200).
|
|
1910
2166
|
*/
|
|
1911
2167
|
adminSendMessage(input: {
|
|
1912
2168
|
path: {
|
|
@@ -2037,12 +2293,13 @@ export declare function client(t: Transport): {
|
|
|
2037
2293
|
/**
|
|
2038
2294
|
* The reader's conversations
|
|
2039
2295
|
*
|
|
2040
|
-
* The signed-in person's conversations, the latest first, with their own place in each, what they have not read and the last message each shows. A direct conversation someone else opened shows once something is said in it; one they cleared, once something new is.
|
|
2296
|
+
* The signed-in person's conversations (of the spaces it names, when it names any), the latest first, with their own place in each, what they have not read and the last message each shows. A direct conversation someone else opened shows once something is said in it; one they cleared, once something new is.
|
|
2041
2297
|
*/
|
|
2042
2298
|
listConversations(input?: {
|
|
2043
2299
|
query?: {
|
|
2044
2300
|
limit?: number; /** The cursor a page handed out (next_cursor). */
|
|
2045
|
-
cursor?: string;
|
|
2301
|
+
cursor?: string; /** Only the conversations of these spaces: one space a parameter, repeated for more (space=org:a&space=org:b), at most 20. */
|
|
2302
|
+
space?: string[];
|
|
2046
2303
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2047
2304
|
signal?: AbortSignal;
|
|
2048
2305
|
}): Promise<Reply<200, ConversationPage>>;
|
|
@@ -2123,6 +2380,17 @@ export declare function client(t: Transport): {
|
|
|
2123
2380
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2124
2381
|
signal?: AbortSignal;
|
|
2125
2382
|
}): Promise<Reply<204, undefined>>;
|
|
2383
|
+
/**
|
|
2384
|
+
* Join an open group
|
|
2385
|
+
*
|
|
2386
|
+
* The reader joins an open group by themselves — when the project's hook lets them (action join, the group and its space named; with no hook, anyone) and it has room. They read it as one added to it does (its history when it shows it to newcomers), and its people are told (member_joined). Joining one they are in answers it as it is. One an admin removed does not join again by themselves.
|
|
2387
|
+
*/
|
|
2388
|
+
joinGroup(input: {
|
|
2389
|
+
path: {
|
|
2390
|
+
conversation_id: string;
|
|
2391
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2392
|
+
signal?: AbortSignal;
|
|
2393
|
+
}): Promise<Reply<200, Conversation>>;
|
|
2126
2394
|
/**
|
|
2127
2395
|
* A conversation's people
|
|
2128
2396
|
*
|
|
@@ -2188,7 +2456,8 @@ export declare function client(t: Transport): {
|
|
|
2188
2456
|
limit?: number; /** The cursor a page handed out (next_cursor). */
|
|
2189
2457
|
cursor?: string; /** Open the timeline at this message: the page holds it, about half the page before it and half after (next_cursor pages back, newer_cursor forward). A thread's answer is read in its thread (`in_thread`). */
|
|
2190
2458
|
around?: string; /** The cursor a page handed out to read on toward the newest (newer_cursor). */
|
|
2191
|
-
after?: string;
|
|
2459
|
+
after?: string; /** Only messages of this kind — text, media, system or call; several comma-separated (call: the calls made from the conversation). */
|
|
2460
|
+
kind?: string;
|
|
2192
2461
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2193
2462
|
signal?: AbortSignal;
|
|
2194
2463
|
}): Promise<Reply<200, MessagePage>>;
|
|
@@ -2371,6 +2640,19 @@ export declare function client(t: Transport): {
|
|
|
2371
2640
|
body: UploadRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2372
2641
|
signal?: AbortSignal;
|
|
2373
2642
|
}): Promise<Reply<201, Upload>>;
|
|
2643
|
+
/**
|
|
2644
|
+
* A space's open groups
|
|
2645
|
+
*
|
|
2646
|
+
* A space's open groups, the oldest first, each with whether the reader is in it — when the project's hook lets the reader find them (action list_open, the space named; with no hook, anyone). Join one with POST /messaging/conversations/{conversation_id}/join.
|
|
2647
|
+
*/
|
|
2648
|
+
listOpenGroups(input: {
|
|
2649
|
+
query: {
|
|
2650
|
+
space: string; /** How many (1 to 100; 50 when absent). */
|
|
2651
|
+
limit?: number; /** The cursor a page handed out (next_cursor). */
|
|
2652
|
+
cursor?: string;
|
|
2653
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2654
|
+
signal?: AbortSignal;
|
|
2655
|
+
}): Promise<Reply<200, OpenGroupPage>>;
|
|
2374
2656
|
/**
|
|
2375
2657
|
* The reader's own profile
|
|
2376
2658
|
*
|
|
@@ -2466,7 +2748,8 @@ export declare function client(t: Transport): {
|
|
|
2466
2748
|
by?: "words" | "meaning"; /** Search one conversation of the reader's only. */
|
|
2467
2749
|
conversation_id?: string; /** How many (1 to 50; 20 when absent). */
|
|
2468
2750
|
limit?: number; /** The cursor a page handed out (next_cursor). */
|
|
2469
|
-
cursor?: string;
|
|
2751
|
+
cursor?: string; /** Search only the conversations of these spaces: one space a parameter, repeated for more, at most 20. */
|
|
2752
|
+
space?: string[];
|
|
2470
2753
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
2471
2754
|
signal?: AbortSignal;
|
|
2472
2755
|
}): Promise<Reply<200, SearchPage>>;
|
|
@@ -2481,7 +2764,7 @@ export declare function client(t: Transport): {
|
|
|
2481
2764
|
/**
|
|
2482
2765
|
* Change how the project runs its conversations
|
|
2483
2766
|
*
|
|
2484
|
-
* What it names changes: how long messages are kept (null: for good), whether pushes say what a message says, what becomes of a deleted user's messages,
|
|
2767
|
+
* What it names changes: how long messages are kept (null: for good), whether pushes say what a message says, what becomes of a deleted user's messages, the hook asked whom one may reach (null: none), and whether messaging.message.created says what a message says (event_text). The hook is POSTed `{event: "messaging.can_message", action: "direct" | "group_add" | "open_group" | "list_open" | "join", from_user_id, to_user_ids, conversation_id, space}` — whom of to_user_ids from_user_id may reach (a direct conversation, a group they are added to), or, to_user_ids being [from_user_id], whether they may have an open group in a space (open_group: making one, or opening theirs), find a space's open groups (list_open) or join one (join); space is the conversation's (absent: none), signed as Standard Webhooks sign (webhook-id, webhook-timestamp, webhook-signature), and answers 200 `{allowed_user_ids: [...]}`. A hook set for the first time is given its signing secret, here, once.
|
|
2485
2768
|
*/
|
|
2486
2769
|
putSettings(input: {
|
|
2487
2770
|
body: SettingsRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
@@ -307,7 +307,7 @@ export declare function client(t: Transport): {
|
|
|
307
307
|
/**
|
|
308
308
|
* Declare the channels
|
|
309
309
|
*
|
|
310
|
-
* Replaces the project's channel declaration, in its order (100 at most). A pattern is ':'-separated segments; a {name} segment matches exactly one. `owner`: the pattern's one {name} must be the joining user, who may do everything on it. `public`: any signed-in user of the project subscribes, and may publish and read or write state as declared. A channel no pattern matches belongs to no one. roles:, flags:, messaging: and debug: are the platform's. Open sockets are decided again within a heartbeat.
|
|
310
|
+
* Replaces the project's channel declaration, in its order (100 at most). A pattern is ':'-separated segments; a {name} segment matches exactly one. `owner`: the pattern's one {name} must be the joining user, who may do everything on it. `public`: any signed-in user of the project subscribes, and may publish and read or write state as declared. A channel no pattern matches belongs to no one. roles:, flags:, messaging:, calls: and debug: are the platform's. Open sockets are decided again within a heartbeat.
|
|
311
311
|
*/
|
|
312
312
|
putChannels(input: {
|
|
313
313
|
body: ChannelDeclaration; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
@@ -26,6 +26,13 @@ export interface PalbaseServer {
|
|
|
26
26
|
auth: ReturnType<typeof modules.auth.client>;
|
|
27
27
|
/** The project's cache entries; palbase/backend's Cache is the way to use them. */
|
|
28
28
|
cache: ReturnType<typeof modules.cache.client>;
|
|
29
|
+
/**
|
|
30
|
+
* The project's calls: their settings (getCallSettings, putCallSettings, rotateCallHookSecret), the calls read and
|
|
31
|
+
* ended (adminListCalls, adminGetCall, adminEndCall), and the project's own agent let into one —
|
|
32
|
+
* createCallTicket({ path: { call_id }, body: { identity } }) answers the media server's url and an access token its
|
|
33
|
+
* open-source agent libraries connect with as they are.
|
|
34
|
+
*/
|
|
35
|
+
calls: ReturnType<typeof modules.calls.client>;
|
|
29
36
|
/**
|
|
30
37
|
* The project's encrypted database fields (fields.ts): `await
|
|
31
38
|
* palbase.fields.load()` at startup, then encrypt, decrypt and lookup —
|
|
@@ -35,6 +42,14 @@ export interface PalbaseServer {
|
|
|
35
42
|
fields: Fields;
|
|
36
43
|
flags: ReturnType<typeof modules.flags.client>;
|
|
37
44
|
machines: ReturnType<typeof modules.machines.client>;
|
|
45
|
+
/**
|
|
46
|
+
* The messaging module's calls as its contract states them. The project's server makes its admin ones with the
|
|
47
|
+
* secret key: a conversation for people (adminCreateConversation, in a space), a message as the app or as one of
|
|
48
|
+
* the conversation's people (adminSendMessage with as_user_id and via: "pal" — the others see it was not their own
|
|
49
|
+
* hand), its conversations by person, pair or space (adminListConversations). A person's own calls are their app's
|
|
50
|
+
* (palbase/web, the iOS and Android SDKs), with their session.
|
|
51
|
+
*/
|
|
52
|
+
messaging: ReturnType<typeof modules.messaging.client>;
|
|
38
53
|
notify: ReturnType<typeof modules.notify.client>;
|
|
39
54
|
purchases: ReturnType<typeof modules.purchases.client>;
|
|
40
55
|
realtime: ReturnType<typeof modules.realtime.client>;
|