@spectrum-ts/core 5.1.0 → 5.2.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.
@@ -6407,7 +6407,9 @@ type CustomEventStreams<Providers extends PlatformProviderConfig[]> = { [K in Ex
6407
6407
  type ResolvedSpaceOf<Def extends AnyPlatformDef> = AwaitedReturn<Def["space"]["create"]>;
6408
6408
  type SchemaSpaceOf<Def extends AnyPlatformDef> = InferOptionalSchema<Def["space"]["schema"]>;
6409
6409
  type ResolvedUserOf<Def extends AnyPlatformDef> = AwaitedReturn<Def["user"]["resolve"]>;
6410
+ type SchemaUserOf<Def extends AnyPlatformDef> = InferOptionalSchema<Def["user"]["schema"]>;
6410
6411
  type SpaceShapeOf<Def extends AnyPlatformDef> = [SchemaSpaceOf<Def>] extends [never] ? ResolvedSpaceOf<Def> : SchemaSpaceOf<Def>;
6412
+ type UserShapeOf<Def extends AnyPlatformDef> = [SchemaUserOf<Def>] extends [never] ? ResolvedUserOf<Def> : SchemaUserOf<Def>;
6411
6413
  type SpaceParamsInputOf<Def extends AnyPlatformDef> = z.ZodType<object> extends Def["space"]["params"] ? never : InputSchema<Def["space"]["params"]>;
6412
6414
  type SpaceUserLike<Def extends AnyPlatformDef> = PlatformUser<Def> | string;
6413
6415
  type SpaceParamsArgs<Def extends AnyPlatformDef> = [SpaceParamsInputOf<Def>] extends [never] ? [] : Record<string, never> extends SpaceParamsInputOf<Def> ? [params?: SpaceParamsInputOf<Def>] : [params: SpaceParamsInputOf<Def>];
@@ -6443,7 +6445,7 @@ interface PlatformWiseInstanceMethods<Def extends AnyPlatformDef> {
6443
6445
  }
6444
6446
  type PlatformSpace<Def extends AnyPlatformDef> = Omit<SpaceShapeOf<Def>, keyof Space | keyof SpaceActionMethods<Def>> & Space & SpaceActionMethods<Def>;
6445
6447
  type PlatformMessage<Def extends AnyPlatformDef> = Omit<SchemaInfer<Def["message"]>, keyof Message | keyof MessageActionMethods<Def>> & Message<Def["name"], PlatformUser<Def>, PlatformSpace<Def>> & MessageActionMethods<Def>;
6446
- type PlatformUser<Def extends AnyPlatformDef> = Omit<ResolvedUserOf<Def>, keyof User> & User;
6448
+ type PlatformUser<Def extends AnyPlatformDef> = Omit<UserShapeOf<Def>, keyof User> & User;
6447
6449
  type PlatformInstance<Def extends AnyPlatformDef> = {
6448
6450
  readonly messages: AsyncIterable<[PlatformSpace<Def>, PlatformMessage<Def>]>;
6449
6451
  readonly space: SpaceNamespace<Def>;
@@ -1,4 +1,4 @@
1
- import { $t as groupSchema, Bt as asPollOption, Dn as buildPhotoAction, En as PhotoInput, H as ProviderMessageRecord, K as ManagedStream, Nt as asRead, On as photoActionSchema, St as asText, Tt as asRichlink, Wt as asMarkdown, Zt as asGroup, cn as reactionSchema, gt as asVoice, ln as asCustom, on as asReaction, r as asAttachment, yn as asContact, zt as asPoll } from "./attachment-a_lrhg6w.js";
1
+ import { $t as groupSchema, Bt as asPollOption, Dn as buildPhotoAction, En as PhotoInput, H as ProviderMessageRecord, K as ManagedStream, Nt as asRead, On as photoActionSchema, St as asText, Tt as asRichlink, Wt as asMarkdown, Zt as asGroup, cn as reactionSchema, gt as asVoice, ln as asCustom, on as asReaction, r as asAttachment, yn as asContact, zt as asPoll } from "./attachment-CQh4PQGl.js";
2
2
  import z from "zod";
3
3
  import { LogAttrs, LogAttrs as LogAttrs$1, LogLevel, PhotonLogger, createLogger, sanitizeEmail, sanitizeErrorMessage, sanitizePhone, setLogLevel } from "@photon-ai/otel";
4
4
  import { Token } from "marked";
package/dist/elysia.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { T as WebhookHandler, nn as Message, rn as Space } from "./attachment-a_lrhg6w.js";
1
+ import { T as WebhookHandler, nn as Message, rn as Space } from "./attachment-CQh4PQGl.js";
2
2
  import { Elysia } from "elysia";
3
3
 
4
4
  //#region src/elysia.d.ts
package/dist/express.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { T as WebhookHandler, nn as Message, rn as Space } from "./attachment-a_lrhg6w.js";
1
+ import { T as WebhookHandler, nn as Message, rn as Space } from "./attachment-CQh4PQGl.js";
2
2
  import { Router } from "express";
3
3
 
4
4
  //#region src/express.d.ts
package/dist/hono.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { T as WebhookHandler, nn as Message, rn as Space } from "./attachment-a_lrhg6w.js";
1
+ import { T as WebhookHandler, nn as Message, rn as Space } from "./attachment-CQh4PQGl.js";
2
2
 
3
3
  //#region src/hono.d.ts
4
4
  /**
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as FusorTokenData, A as isFusorEvent, An as AppLayout, At as Rename, B as PlatformUser, C as FusorVerify, Cn as Avatar, Ct as text, D as WebhookRawResult, Dt as resolveContents, E as WebhookRawRequest, Et as richlink, F as PlatformInstance, Ft as Poll, G as Broadcaster, Gt as markdown, Ht as poll, I as PlatformMessage, It as PollChoice, J as mergeStreams, Jt as StreamTextSource, K as ManagedStream, Kt as DeltaExtractor, L as PlatformProviderConfig, Lt as PollChoiceInput, M as EventProducer, Mn as app, Mt as Read, N as Platform, Nn as appLayoutSchema, O as FusorEvent, Ot as Reply, P as PlatformDef, Pt as read, Q as DedicatedTokenData, Qt as group, R as PlatformRuntime, Rt as PollOption, S as FusorRespond, Sn as User, T as WebhookHandler, Tn as avatar, U as SchemaMessage, Ut as Markdown, V as ProviderMessage, Vt as option, W as SpaceNamespace, X as Store, Xt as Group, Y as stream, Yt as TextStreamOptions, Z as CloudPlatform, _ as FusorClient, _n as ContactOrg, _t as voice, a as Content, an as ReactionBuilder, at as SharedTokenData, b as FusorMessagesReturn, bn as contact, bt as Typing, c as fromVCard, ct as SpectrumCloudError, d as UnsupportedKind, dn as Contact, dt as TokenData, en as Edit, et as ImessageInfoData, f as Spectrum, fn as ContactAddress, ft as cloud, g as isFusorClient, gn as ContactName, h as fusor, hn as ContactInput, ht as Voice, i as attachment, in as Reaction, it as ProjectProfile, j as AnyPlatformDef, jn as AppUrl, jt as rename, k as fusorEvent, kn as App, kt as reply, l as toVCard, lt as SubscriptionData, m as definePlatform, mn as ContactEmail, mt as EmojiKey, n as AttachmentInput, nn as Message, nt as PlatformsData, o as ContentBuilder, ot as SlackTeamMeta, p as SpectrumInstance, pn as ContactDetails, pt as Emoji, q as broadcast, qt as StreamText, rn as Space, rt as ProjectData, s as ContentInput, sn as reaction, st as SlackTokenData, t as Attachment, tn as edit, tt as PlatformStatus, u as UnsupportedError, un as custom, ut as SubscriptionStatus, v as FusorMessages, vn as ContactPhone, vt as Unsend, w as FusorVerifyRequest, wn as AvatarInput, wt as Richlink, x as FusorReply, xn as AgentSender, xt as typing, y as FusorMessagesCtx, yt as unsend, z as PlatformSpace } from "./attachment-a_lrhg6w.js";
1
+ import { $ as FusorTokenData, A as isFusorEvent, An as AppLayout, At as Rename, B as PlatformUser, C as FusorVerify, Cn as Avatar, Ct as text, D as WebhookRawResult, Dt as resolveContents, E as WebhookRawRequest, Et as richlink, F as PlatformInstance, Ft as Poll, G as Broadcaster, Gt as markdown, Ht as poll, I as PlatformMessage, It as PollChoice, J as mergeStreams, Jt as StreamTextSource, K as ManagedStream, Kt as DeltaExtractor, L as PlatformProviderConfig, Lt as PollChoiceInput, M as EventProducer, Mn as app, Mt as Read, N as Platform, Nn as appLayoutSchema, O as FusorEvent, Ot as Reply, P as PlatformDef, Pt as read, Q as DedicatedTokenData, Qt as group, R as PlatformRuntime, Rt as PollOption, S as FusorRespond, Sn as User, T as WebhookHandler, Tn as avatar, U as SchemaMessage, Ut as Markdown, V as ProviderMessage, Vt as option, W as SpaceNamespace, X as Store, Xt as Group, Y as stream, Yt as TextStreamOptions, Z as CloudPlatform, _ as FusorClient, _n as ContactOrg, _t as voice, a as Content, an as ReactionBuilder, at as SharedTokenData, b as FusorMessagesReturn, bn as contact, bt as Typing, c as fromVCard, ct as SpectrumCloudError, d as UnsupportedKind, dn as Contact, dt as TokenData, en as Edit, et as ImessageInfoData, f as Spectrum, fn as ContactAddress, ft as cloud, g as isFusorClient, gn as ContactName, h as fusor, hn as ContactInput, ht as Voice, i as attachment, in as Reaction, it as ProjectProfile, j as AnyPlatformDef, jn as AppUrl, jt as rename, k as fusorEvent, kn as App, kt as reply, l as toVCard, lt as SubscriptionData, m as definePlatform, mn as ContactEmail, mt as EmojiKey, n as AttachmentInput, nn as Message, nt as PlatformsData, o as ContentBuilder, ot as SlackTeamMeta, p as SpectrumInstance, pn as ContactDetails, pt as Emoji, q as broadcast, qt as StreamText, rn as Space, rt as ProjectData, s as ContentInput, sn as reaction, st as SlackTokenData, t as Attachment, tn as edit, tt as PlatformStatus, u as UnsupportedError, un as custom, ut as SubscriptionStatus, v as FusorMessages, vn as ContactPhone, vt as Unsend, w as FusorVerifyRequest, wn as AvatarInput, wt as Richlink, x as FusorReply, xn as AgentSender, xt as typing, y as FusorMessagesCtx, yt as unsend, z as PlatformSpace } from "./attachment-CQh4PQGl.js";
2
2
  export { type AgentSender, type AnyPlatformDef, type App, type AppLayout, type AppUrl, type Attachment, type AttachmentInput, type Avatar, type AvatarInput, type Broadcaster, type CloudPlatform, type Contact, type ContactAddress, type ContactDetails, type ContactEmail, type ContactInput, type ContactName, type ContactOrg, type ContactPhone, type Content, type ContentBuilder, type ContentInput, type DedicatedTokenData, type DeltaExtractor, type Edit, Emoji, type EmojiKey, type EventProducer, type FusorClient, type FusorEvent, type FusorMessages, type FusorMessagesCtx, type FusorMessagesReturn, type FusorReply, type FusorRespond, type FusorTokenData, type FusorVerify, type FusorVerifyRequest, type Group, type ImessageInfoData, type ManagedStream, type Markdown, type Message, type Platform, type PlatformDef, type PlatformInstance, type PlatformMessage, type PlatformProviderConfig, type PlatformRuntime, type PlatformSpace, type PlatformStatus, type PlatformUser, type PlatformsData, type Poll, type PollChoice, type PollChoiceInput, type PollOption, type ProjectData, type ProjectProfile, type ProviderMessage, type Reaction, type ReactionBuilder, type Read, type Rename, type Reply, type Richlink, type SchemaMessage, type SharedTokenData, type SlackTeamMeta, type SlackTokenData, type Space, type SpaceNamespace, Spectrum, SpectrumCloudError, type SpectrumInstance, type Store, type StreamText, type StreamTextSource, type SubscriptionData, type SubscriptionStatus, type TextStreamOptions, type TokenData, type Typing, type Unsend, UnsupportedError, type UnsupportedKind, type User, type Voice, type WebhookHandler, type WebhookRawRequest, type WebhookRawResult, app, appLayoutSchema, attachment, avatar, broadcast, cloud, contact, custom, definePlatform, edit, fromVCard, fusor, fusorEvent, group, isFusorClient, isFusorEvent, markdown, mergeStreams, option, poll, reaction, read, rename, reply, resolveContents, richlink, stream, text, toVCard, typing, unsend, voice };
package/dist/index.js CHANGED
@@ -2994,7 +2994,7 @@ function definePlatform(name, rawDef) {
2994
2994
  }
2995
2995
  //#endregion
2996
2996
  //#region src/build-env.ts
2997
- const SPECTRUM_SDK_VERSION = "5.1.0";
2997
+ const SPECTRUM_SDK_VERSION = "5.2.0";
2998
2998
  //#endregion
2999
2999
  //#region src/utils/provider-packages.ts
3000
3000
  const OFFICIAL_PROVIDER_PACKAGES = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-ts/core",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "The spectrum-ts runtime — Spectrum, content builders, fusor, and the provider authoring API.",
5
5
  "repository": {
6
6
  "type": "git",