@whitewall/blip-sdk 0.0.112 → 0.0.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/client.js +37 -27
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/namespaces/account.js +36 -36
- package/dist/cjs/namespaces/activecampaign.js +14 -14
- package/dist/cjs/namespaces/analytics.js +8 -8
- package/dist/cjs/namespaces/builder.js +8 -8
- package/dist/cjs/namespaces/configurations.js +4 -4
- package/dist/cjs/namespaces/context.js +54 -0
- package/dist/cjs/namespaces/context.js.map +1 -0
- package/dist/cjs/namespaces/desk.js +36 -27
- package/dist/cjs/namespaces/desk.js.map +1 -1
- package/dist/cjs/namespaces/media.js +4 -4
- package/dist/cjs/namespaces/namespace.js +8 -8
- package/dist/cjs/namespaces/namespace.js.map +1 -1
- package/dist/cjs/namespaces/plugins.js +13 -13
- package/dist/cjs/namespaces/portal.js +14 -40
- package/dist/cjs/namespaces/portal.js.map +1 -1
- package/dist/cjs/namespaces/scheduler.js +9 -9
- package/dist/cjs/namespaces/whatsapp.js +21 -21
- package/dist/cjs/sender/bliperror.js +12 -1
- package/dist/cjs/sender/bliperror.js.map +1 -1
- package/dist/cjs/sender/enveloperesolver.js +2 -2
- package/dist/cjs/sender/gateway/customgatewaysender.js +2 -2
- package/dist/cjs/sender/http/httpsender.js +8 -8
- package/dist/cjs/sender/http/httpsender.js.map +1 -1
- package/dist/cjs/sender/index.js +1 -1
- package/dist/cjs/sender/{portal → plugin}/communication.js +3 -3
- package/dist/cjs/sender/{portal → plugin}/communication.js.map +1 -1
- package/dist/cjs/sender/plugin/pluginsender.js +98 -0
- package/dist/cjs/sender/plugin/pluginsender.js.map +1 -0
- package/dist/cjs/sender/sessionegotiator.js +46 -41
- package/dist/cjs/sender/sessionegotiator.js.map +1 -1
- package/dist/cjs/sender/tcp/tcpsender.js +12 -16
- package/dist/cjs/sender/tcp/tcpsender.js.map +1 -1
- package/dist/cjs/sender/websocket/websocketsender.js +12 -12
- package/dist/cjs/sender/websocket/websocketsender.js.map +1 -1
- package/dist/cjs/types/node.js +3 -0
- package/dist/cjs/types/node.js.map +1 -1
- package/dist/esm/client.js +23 -13
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/index.js +6 -6
- package/dist/esm/namespaces/account.js +3 -3
- package/dist/esm/namespaces/activecampaign.js +3 -3
- package/dist/esm/namespaces/analytics.js +2 -2
- package/dist/esm/namespaces/builder.js +3 -3
- package/dist/esm/namespaces/configurations.js +2 -2
- package/dist/esm/namespaces/context.js +50 -0
- package/dist/esm/namespaces/context.js.map +1 -0
- package/dist/esm/namespaces/desk.js +13 -4
- package/dist/esm/namespaces/desk.js.map +1 -1
- package/dist/esm/namespaces/media.js +2 -2
- package/dist/esm/namespaces/namespace.js +3 -3
- package/dist/esm/namespaces/namespace.js.map +1 -1
- package/dist/esm/namespaces/plugins.js +2 -2
- package/dist/esm/namespaces/portal.js +8 -34
- package/dist/esm/namespaces/portal.js.map +1 -1
- package/dist/esm/namespaces/scheduler.js +3 -3
- package/dist/esm/namespaces/whatsapp.js +2 -2
- package/dist/esm/sender/bliperror.js +12 -1
- package/dist/esm/sender/bliperror.js.map +1 -1
- package/dist/esm/sender/enveloperesolver.js +1 -1
- package/dist/esm/sender/gateway/customgatewaysender.js +1 -1
- package/dist/esm/sender/http/httpsender.js +5 -5
- package/dist/esm/sender/http/httpsender.js.map +1 -1
- package/dist/esm/sender/index.js +7 -7
- package/dist/esm/sender/{portal → plugin}/communication.js +1 -1
- package/dist/esm/sender/{portal → plugin}/communication.js.map +1 -1
- package/dist/esm/sender/plugin/pluginsender.js +94 -0
- package/dist/esm/sender/plugin/pluginsender.js.map +1 -0
- package/dist/esm/sender/sessionegotiator.js +46 -41
- package/dist/esm/sender/sessionegotiator.js.map +1 -1
- package/dist/esm/sender/tcp/tcpsender.js +8 -12
- package/dist/esm/sender/tcp/tcpsender.js.map +1 -1
- package/dist/esm/sender/websocket/websocketsender.js +7 -7
- package/dist/esm/sender/websocket/websocketsender.js.map +1 -1
- package/dist/esm/types/index.js +11 -11
- package/dist/esm/types/node.js +3 -0
- package/dist/esm/types/node.js.map +1 -1
- package/dist/types/client.d.ts +17 -14
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/index.d.ts +6 -6
- package/dist/types/namespaces/account.d.ts +5 -5
- package/dist/types/namespaces/activecampaign.d.ts +3 -3
- package/dist/types/namespaces/analytics.d.ts +4 -4
- package/dist/types/namespaces/builder.d.ts +2 -2
- package/dist/types/namespaces/configurations.d.ts +2 -2
- package/dist/types/namespaces/context.d.ts +16 -0
- package/dist/types/namespaces/context.d.ts.map +1 -0
- package/dist/types/namespaces/desk.d.ts +5 -4
- package/dist/types/namespaces/desk.d.ts.map +1 -1
- package/dist/types/namespaces/media.d.ts +2 -2
- package/dist/types/namespaces/namespace.d.ts +4 -2
- package/dist/types/namespaces/namespace.d.ts.map +1 -1
- package/dist/types/namespaces/plugins.d.ts +6 -6
- package/dist/types/namespaces/portal.d.ts +4 -11
- package/dist/types/namespaces/portal.d.ts.map +1 -1
- package/dist/types/namespaces/scheduler.d.ts +3 -3
- package/dist/types/namespaces/whatsapp.d.ts +4 -4
- package/dist/types/sender/bliperror.d.ts +5 -1
- package/dist/types/sender/bliperror.d.ts.map +1 -1
- package/dist/types/sender/enveloperesolver.d.ts +2 -2
- package/dist/types/sender/gateway/customgatewaysender.d.ts +2 -2
- package/dist/types/sender/http/httpsender.d.ts +2 -2
- package/dist/types/sender/index.d.ts +7 -7
- package/dist/types/sender/{portal → plugin}/communication.d.ts.map +1 -1
- package/dist/types/sender/plugin/pluginsender.d.ts +21 -0
- package/dist/types/sender/plugin/pluginsender.d.ts.map +1 -0
- package/dist/types/sender/sender.d.ts +1 -1
- package/dist/types/sender/sessionegotiator.d.ts +4 -4
- package/dist/types/sender/sessionegotiator.d.ts.map +1 -1
- package/dist/types/sender/tcp/tcpsender.d.ts +2 -2
- package/dist/types/sender/websocket/websocketsender.d.ts +2 -2
- package/dist/types/types/account.d.ts +2 -2
- package/dist/types/types/analytics.d.ts +1 -1
- package/dist/types/types/command.d.ts +2 -2
- package/dist/types/types/command.d.ts.map +1 -1
- package/dist/types/types/envelope.d.ts +1 -1
- package/dist/types/types/index.d.ts +11 -11
- package/dist/types/types/message.d.ts +3 -3
- package/dist/types/types/node.d.ts +1 -0
- package/dist/types/types/node.d.ts.map +1 -1
- package/dist/types/types/notification.d.ts +1 -1
- package/dist/types/types/session.d.ts +1 -1
- package/package.json +3 -2
- package/dist/cjs/sender/portal/pluginsender.js +0 -47
- package/dist/cjs/sender/portal/pluginsender.js.map +0 -1
- package/dist/esm/sender/portal/pluginsender.js +0 -43
- package/dist/esm/sender/portal/pluginsender.js.map +0 -1
- package/dist/types/sender/portal/pluginsender.d.ts +0 -14
- package/dist/types/sender/portal/pluginsender.d.ts.map +0 -1
- /package/dist/types/sender/{portal → plugin}/communication.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BlipClient } from '../client.
|
|
2
|
-
import { Namespace, type SendCommandOptions } from './namespace.
|
|
1
|
+
import type { BlipClient } from '../client.ts';
|
|
2
|
+
import { Namespace, type SendCommandOptions } from './namespace.ts';
|
|
3
3
|
export declare class ConfigurationsNamespace extends Namespace {
|
|
4
4
|
constructor(blipClient: BlipClient, defaultOptions?: SendCommandOptions);
|
|
5
5
|
getConfigurations(opts?: SendCommandOptions): Promise<Record<string, string>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BlipClient } from '../index.ts';
|
|
2
|
+
import type { Account, BlipLanguage } from '../types/account.ts';
|
|
3
|
+
import { Namespace, type SendCommandOptions } from './namespace.ts';
|
|
4
|
+
export declare class ContextNamespace extends Namespace {
|
|
5
|
+
constructor(blipClient: BlipClient, defaultOptions?: SendCommandOptions);
|
|
6
|
+
getUser(): Promise<Account>;
|
|
7
|
+
getLanguage(): Promise<BlipLanguage>;
|
|
8
|
+
toast(type: 'success' | 'warning' | 'danger', message: string): void;
|
|
9
|
+
changeHeight(height: number): void;
|
|
10
|
+
loading(show: boolean): void;
|
|
11
|
+
getUserToken(): Promise<string>;
|
|
12
|
+
isOnBlipDesk(): boolean;
|
|
13
|
+
isOnPortal(): boolean;
|
|
14
|
+
private checkSenderRealm;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/namespaces/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAE,SAAS,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAEnE,qBAAa,gBAAiB,SAAQ,SAAS;gBAC/B,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,kBAAkB;IAIhE,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;IAK3B,WAAW,IAAI,OAAO,CAAC,YAAY,CAAC;IAKpC,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAMpE,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAKlC,OAAO,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI;IAS5B,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAK/B,YAAY,IAAI,OAAO;IAIvB,UAAU,IAAI,OAAO;IAI5B,OAAO,CAAC,gBAAgB;CAO3B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { BlipClient } from '../client.
|
|
2
|
-
import { type Identity, Node, type ThreadItem, type Ticket, type TicketStatus } from '../types/index.
|
|
3
|
-
import type { ODataFilter } from '../utils/odata.
|
|
4
|
-
import { type ConsumeOptions, Namespace, type SendCommandOptions } from './namespace.
|
|
1
|
+
import type { BlipClient } from '../client.ts';
|
|
2
|
+
import { type Identity, Node, type ThreadItem, type Ticket, type TicketStatus } from '../types/index.ts';
|
|
3
|
+
import type { ODataFilter } from '../utils/odata.ts';
|
|
4
|
+
import { type ConsumeOptions, Namespace, type SendCommandOptions } from './namespace.ts';
|
|
5
5
|
export declare class DeskNamespace extends Namespace {
|
|
6
6
|
constructor(blipClient: BlipClient, defaultOptions?: SendCommandOptions);
|
|
7
7
|
createTicket(contact: Identity, opts?: ConsumeOptions): Promise<Ticket>;
|
|
@@ -32,6 +32,7 @@ export declare class DeskNamespace extends Namespace {
|
|
|
32
32
|
priority: number;
|
|
33
33
|
}>>;
|
|
34
34
|
getTickets(filter?: ODataFilter<Ticket>, opts?: ConsumeOptions): Promise<Array<Ticket>>;
|
|
35
|
+
getContactTickets(contact: Identity, opts?: ConsumeOptions): Promise<Array<Ticket>>;
|
|
35
36
|
changeTicketStatus(ticket: string, status: TicketStatus, settings?: {
|
|
36
37
|
agent?: Identity;
|
|
37
38
|
closedBy?: Identity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desk.d.ts","sourceRoot":"","sources":["../../../src/namespaces/desk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAE9C,OAAO,EAGH,KAAK,QAAQ,EACb,IAAI,EACJ,KAAK,UAAU,EACf,KAAK,MAAM,EACX,KAAK,YAAY,EACpB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD,OAAO,EAAE,KAAK,cAAc,EAAE,SAAS,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAExF,qBAAa,aAAc,SAAQ,SAAS;gBAC5B,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,kBAAkB;IAI1D,YAAY,CAAC,OAAO,EAAE,QAAQ,EA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ACJ,CAAA;KACJ,CAAC;IAUW,gBAAgB,CACzB,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAA;KACjB,EACD,IAAI,CAAC,EAAE,cAAc;CAsB5B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BlipClient } from '../client.
|
|
2
|
-
import { type ConsumeOptions, Namespace, type SendCommandOptions } from './namespace.
|
|
1
|
+
import type { BlipClient } from '../client.ts';
|
|
2
|
+
import { type ConsumeOptions, Namespace, type SendCommandOptions } from './namespace.ts';
|
|
3
3
|
export declare class MediaNamespace extends Namespace {
|
|
4
4
|
constructor(blipClient: BlipClient, defaultOptions?: SendCommandOptions);
|
|
5
5
|
getMediaUploadUrl(opts?: ConsumeOptions): Promise<string>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { BlipClient } from '../client.
|
|
2
|
-
import { type Command, type CommandMethods, type Identity } from '../types/index.
|
|
1
|
+
import type { BlipClient } from '../client.ts';
|
|
2
|
+
import { type Command, type CommandMethods, type Identity, type NodeLike } from '../types/index.ts';
|
|
3
3
|
export type SendCommandOptions = {
|
|
4
|
+
pp?: NodeLike;
|
|
5
|
+
from?: NodeLike;
|
|
4
6
|
ownerIdentity?: Identity | `${string}.${string}`;
|
|
5
7
|
domain?: `${string}.${string}`;
|
|
6
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"namespace.d.ts","sourceRoot":"","sources":["../../../src/namespaces/namespace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,QAAQ,EAAQ,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"namespace.d.ts","sourceRoot":"","sources":["../../../src/namespaces/namespace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,E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E,MAAM,CAAC,CAAA;SAC7B,CAAA;KACJ,EACD,IAAI,CAAC,EAAE,cAAc,GAAG;QACpB,UAAU,CAAC,EAAE,WAAW,SAAS,IAAI,GAAG,IAAI,GAAG,KAAK,CAAA;KACvD,GACF,OAAO,CAAC,SAAS,CAAC;CAoFxB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { BlipClient } from '../client.
|
|
2
|
-
import type { BlipLanguage } from '../types/account.
|
|
3
|
-
import type { Identity } from '../types/node.
|
|
4
|
-
import type { DetailedPlugin, Plugin, PluginSubscription } from '../types/plugins.
|
|
5
|
-
import type { Application } from '../types/portal.
|
|
6
|
-
import { type ConsumeOptions, Namespace, type SendCommandOptions } from './namespace.
|
|
1
|
+
import type { BlipClient } from '../client.ts';
|
|
2
|
+
import type { BlipLanguage } from '../types/account.ts';
|
|
3
|
+
import type { Identity } from '../types/node.ts';
|
|
4
|
+
import type { DetailedPlugin, Plugin, PluginSubscription } from '../types/plugins.ts';
|
|
5
|
+
import type { Application } from '../types/portal.ts';
|
|
6
|
+
import { type ConsumeOptions, Namespace, type SendCommandOptions } from './namespace.ts';
|
|
7
7
|
export declare class PluginsNamespace extends Namespace {
|
|
8
8
|
constructor(blipClient: BlipClient, defaultOptions?: SendCommandOptions);
|
|
9
9
|
getTenantApplicationsWithPlugin(tenantId: string, pluginId: string, opts?: ConsumeOptions): Promise<Array<Application>>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { BlipClient } from '../client.
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type
|
|
5
|
-
import { type ConsumeOptions, Namespace, type SendCommandOptions } from './namespace.js';
|
|
1
|
+
import type { BlipClient } from '../client.ts';
|
|
2
|
+
import type { Identity } from '../types/node.ts';
|
|
3
|
+
import type { Application } from '../types/portal.ts';
|
|
4
|
+
import { type ConsumeOptions, Namespace, type SendCommandOptions } from './namespace.ts';
|
|
6
5
|
export declare class PortalNamespace extends Namespace {
|
|
7
6
|
constructor(blipClient: BlipClient, defaultOptions?: SendCommandOptions);
|
|
8
7
|
getInstalledPlugins(opts?: ConsumeOptions): Promise<{
|
|
@@ -27,12 +26,6 @@ export declare class PortalNamespace extends Namespace {
|
|
|
27
26
|
/** @returns all applications where the current user is an admin */
|
|
28
27
|
getAdminApplications(opts?: ConsumeOptions): Promise<Array<Identity>>;
|
|
29
28
|
getParentApplications(): Promise<Array<Application>>;
|
|
30
|
-
getUser(): Promise<Account>;
|
|
31
|
-
getLanguage(): Promise<BlipLanguage>;
|
|
32
|
-
toast(type: 'info' | 'success' | 'warning' | 'danger', message: string): void;
|
|
33
|
-
changeHeight(height: number): void;
|
|
34
|
-
loading(show: boolean): void;
|
|
35
|
-
getUserToken(): Promise<string>;
|
|
36
29
|
tenantExists(tenantId: string): Promise<boolean>;
|
|
37
30
|
}
|
|
38
31
|
//# sourceMappingURL=portal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../../src/namespaces/portal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAG9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"portal.d.ts","sourceRoot":"","sources":["../../../src/namespaces/portal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAG9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD,OAAO,EAAE,KAAK,cAAc,EAAE,SAAS,EAAE,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAExF,qBAAa,eAAgB,SAAQ,SAAS;gBAC9B,UAAU,EAAE,UAAU,EAAE,cAAc,CAAC,EAAE,kBAAkB;IAI1D,mBAAmB,CAAC,IAAI,CAAC,EAAE,cAAc;;;;;IAazC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAC9D,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBxE,SAAS,CAClB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;KACd,EACD,IAAI,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,IAAI,CAAC;IAeH,YAAY,CACrB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,OAAO,CAAC;QACd,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;KACd,CAAC,EACF,IAAI,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,IAAI,CAAC;IAkBT,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,GAAG;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAmBvG,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAe5F,mEAAmE;IAC5D,oBAAoB,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAe/D,qBAAqB,IAAI,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAuBpD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAmBhE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BlipClient } from '../client.
|
|
2
|
-
import type { UnknownMessage } from '../types/index.
|
|
3
|
-
import { type ConsumeOptions, Namespace, type SendCommandOptions } from './namespace.
|
|
1
|
+
import type { BlipClient } from '../client.ts';
|
|
2
|
+
import type { UnknownMessage } from '../types/index.ts';
|
|
3
|
+
import { type ConsumeOptions, Namespace, type SendCommandOptions } from './namespace.ts';
|
|
4
4
|
export declare class SchedulerNamespace extends Namespace {
|
|
5
5
|
constructor(blipClient: BlipClient, defaultOptions?: SendCommandOptions);
|
|
6
6
|
scheduleMessage(schedule: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { BlipClient } from '../client.
|
|
2
|
-
import type { Identity } from '../types/index.
|
|
3
|
-
import type { MessageTemplate, MessageTemplateVariable, WhatsappFlow } from '../types/whatsapp.
|
|
4
|
-
import { type ConsumeOptions, Namespace, type SendCommandOptions } from './namespace.
|
|
1
|
+
import type { BlipClient } from '../client.ts';
|
|
2
|
+
import type { Identity } from '../types/index.ts';
|
|
3
|
+
import type { MessageTemplate, MessageTemplateVariable, WhatsappFlow } from '../types/whatsapp.ts';
|
|
4
|
+
import { type ConsumeOptions, Namespace, type SendCommandOptions } from './namespace.ts';
|
|
5
5
|
export declare class WhatsAppNamespace extends Namespace {
|
|
6
6
|
constructor(blipClient: BlipClient, defaultOptions?: SendCommandOptions);
|
|
7
7
|
phoneToIdentity(phoneNumber: string, opts?: ConsumeOptions): Promise<Identity>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import type { CommandMethods, CommandResponse } from '../types/command.ts';
|
|
1
2
|
export declare class BlipError extends Error {
|
|
2
3
|
readonly uri: string;
|
|
3
4
|
readonly code: number;
|
|
4
|
-
|
|
5
|
+
commandResponse?: CommandResponse<unknown, CommandMethods, "failure"> | undefined;
|
|
6
|
+
constructor(uri: string, code: number, description: string, commandResponse?: CommandResponse<unknown, CommandMethods, "failure"> | undefined);
|
|
7
|
+
static isFailedCommandResponse(maybeCommandResponse: unknown): maybeCommandResponse is CommandResponse<unknown, CommandMethods, 'failure'>;
|
|
8
|
+
static commandResponseToBlipError(uri: string, commandResponse: CommandResponse<unknown, CommandMethods, 'failure'>): BlipError;
|
|
5
9
|
}
|
|
6
10
|
//# sourceMappingURL=bliperror.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bliperror.d.ts","sourceRoot":"","sources":["../../../src/sender/bliperror.ts"],"names":[],"mappings":"AAAA,qBAAa,SAAU,SAAQ,KAAK;aAEZ,GAAG,EAAE,MAAM;aACX,IAAI,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"bliperror.d.ts","sourceRoot":"","sources":["../../../src/sender/bliperror.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1E,qBAAa,SAAU,SAAQ,KAAK;aAEZ,GAAG,EAAE,MAAM;aACX,IAAI,EAAE,MAAM;IAErB,eAAe,CAAC,EAAE,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,CAAC;gBAH5D,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EAC5B,WAAW,EAAE,MAAM,EACZ,eAAe,CAAC,EAAE,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,CAAC,YAAA;WAKlE,uBAAuB,CACjC,oBAAoB,EAAE,OAAO,GAC9B,oBAAoB,IAAI,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,CAAC;WAShE,0BAA0B,CACpC,GAAG,EAAE,MAAM,EACX,eAAe,EAAE,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,CAAC,GACrE,SAAS;CAGf"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Envelope } from '../types/envelope.
|
|
2
|
-
import type { OpenConnectionSender } from './sender.
|
|
1
|
+
import type { Envelope } from '../types/envelope.ts';
|
|
2
|
+
import type { OpenConnectionSender } from './sender.ts';
|
|
3
3
|
export declare class EnvelopeResolver {
|
|
4
4
|
private readonly sender;
|
|
5
5
|
private readonly waitingEnvelopeResponseResolvers;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Message, type MessageTypesContent } from '../../types/index.
|
|
2
|
-
import type { Sender } from '../sender.
|
|
1
|
+
import { type Message, type MessageTypesContent } from '../../types/index.ts';
|
|
2
|
+
import type { Sender } from '../sender.ts';
|
|
3
3
|
export declare class CustomGatewayHttpSender implements Sender {
|
|
4
4
|
private readonly baseurl;
|
|
5
5
|
private readonly token;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Command, type CommandMethods, type Identity, type Message, type MessageTypes } from '../../types/index.
|
|
2
|
-
import type { Sender } from '../sender.
|
|
1
|
+
import { type Command, type CommandMethods, type Identity, type Message, type MessageTypes } from '../../types/index.ts';
|
|
2
|
+
import type { Sender } from '../sender.ts';
|
|
3
3
|
export declare class HttpSender implements Sender {
|
|
4
4
|
private readonly token;
|
|
5
5
|
private readonly baseurl;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './sender.
|
|
2
|
-
export * from './bliperror.
|
|
3
|
-
export * from './gateway/customgatewaysender.
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './websocket/websocketsender.
|
|
6
|
-
export * from './tcp/tcpsender.
|
|
7
|
-
export * from './http/httpsender.
|
|
1
|
+
export * from './sender.ts';
|
|
2
|
+
export * from './bliperror.ts';
|
|
3
|
+
export * from './gateway/customgatewaysender.ts';
|
|
4
|
+
export * from './plugin/pluginsender.ts';
|
|
5
|
+
export * from './websocket/websocketsender.ts';
|
|
6
|
+
export * from './tcp/tcpsender.ts';
|
|
7
|
+
export * from './http/httpsender.ts';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"communication.d.ts","sourceRoot":"","sources":["../../../../src/sender/
|
|
1
|
+
{"version":3,"file":"communication.d.ts","sourceRoot":"","sources":["../../../../src/sender/plugin/communication.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;WAyBV,CAAC,UAAU,MAAM,WAAW,OAAO,YAAY;QAAE,aAAa,EAAE,OAAO,CAAA;KAAE,KA8B1D,OAAO,CAAC,CAAC,CAAC;;CAOvC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type BlipClient, type Command, type CommandMethods, type Identity, type Message, type MessageTypes, type Sender } from '../../index.ts';
|
|
2
|
+
export declare class PluginSender implements Sender {
|
|
3
|
+
private readonly blipDesk?;
|
|
4
|
+
readonly channel: {
|
|
5
|
+
post: <T>(action: string, content: unknown, options?: {
|
|
6
|
+
fireAndForget: boolean;
|
|
7
|
+
}) => Promise<T>;
|
|
8
|
+
destroy: () => void;
|
|
9
|
+
};
|
|
10
|
+
constructor(blipDesk?: {
|
|
11
|
+
currentBotIdentity: Identity;
|
|
12
|
+
} | undefined);
|
|
13
|
+
sendMessage<Type extends MessageTypes>(message: Message<Type>): Promise<void>;
|
|
14
|
+
sendCommand(command: Command<CommandMethods>): Promise<unknown>;
|
|
15
|
+
static check(blipClient: BlipClient): PluginSender;
|
|
16
|
+
static getRealm(blipClient: BlipClient): 'portal' | 'desk';
|
|
17
|
+
private getRealm;
|
|
18
|
+
private cachedAccountPromise;
|
|
19
|
+
private fixBlipDeskMsgingCommand;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=pluginsender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pluginsender.d.ts","sourceRoot":"","sources":["../../../../src/sender/plugin/pluginsender.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,UAAU,EAEf,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,YAAY,EAEjB,KAAK,MAAM,EACd,MAAM,gBAAgB,CAAA;AAGvB,qBAAa,YAAa,YAAW,MAAM;IAInC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAH9B,SAAgB,OAAO;;;;;MAAA;gBAGF,QAAQ,CAAC,EAAE;QACxB,kBAAkB,EAAE,QAAQ,CAAA;KAC/B,YAAA;IAKQ,WAAW,CAAC,IAAI,SAAS,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC;IAa7D,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;WA0B9D,KAAK,CAAC,UAAU,EAAE,UAAU,GAAG,YAAY;WAQ3C,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,QAAQ,GAAG,MAAM;IAQjE,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,oBAAoB,CAA0C;YACxD,wBAAwB;CAiCzC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Command, CommandMethods, CommandResponse, Message, MessageTypes } from '../types/index.
|
|
1
|
+
import type { Command, CommandMethods, CommandResponse, Message, MessageTypes } from '../types/index.ts';
|
|
2
2
|
export interface Sender {
|
|
3
3
|
sendMessage<Type extends MessageTypes>(message: Message<Type>): Promise<void>;
|
|
4
4
|
sendCommand(command: Command<CommandMethods>): Promise<unknown>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Envelope } from '../types/envelope.
|
|
2
|
-
import { Node, type NodeLike } from '../types/node.
|
|
3
|
-
import type { Session } from '../types/session.
|
|
4
|
-
import type { OpenConnectionSender } from './sender.
|
|
1
|
+
import type { Envelope } from '../types/envelope.ts';
|
|
2
|
+
import { Node, type NodeLike } from '../types/node.ts';
|
|
3
|
+
import type { Session } from '../types/session.ts';
|
|
4
|
+
import type { OpenConnectionSender } from './sender.ts';
|
|
5
5
|
export declare class SessionNegotiator {
|
|
6
6
|
private readonly sender;
|
|
7
7
|
private readonly sendSession;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionegotiator.d.ts","sourceRoot":"","sources":["../../../src/sender/sessionegotiator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAA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;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAZzB,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS,CAAQ;IAC3C,OAAO,EAAE;QACZ,EAAE,EAAE,MAAM,CAAA;QACV,SAAS,EAAE,IAAI,CAAA;QACf,UAAU,EAAE,IAAI,CAAA;KACnB,GAAG,IAAI,CAAO;IAEf,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,sBAAsB,CAAyE;gBAGlF,MAAM,EAAE,oBAAoB,EAC5B,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI;IAG/C,SAAS,CAAC,OAAO,EAAE;QAC5B,QAAQ,EAAE,QAAQ,CAAA;QAClB,cAAc,EAAE;YACZ,MAAM,EAAE,KAAK,CAAA;YACb,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;SAChC,CAAA;KACJ,GAAG,OAAO,CAAC,IAAI,CAAC;IA4DV,cAAc,CAAC,OAAO,EAAE,QAAQ;IAO1B,cAAc,CAAC,iBAAiB,SAAK,GAAG,OAAO,CAAC,IAAI,CAAC;IAgC3D,MAAM;IAWb,IAAW,WAAW,IAAI,OAAO,CAEhC;YAEa,sBAAsB;CAWvC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Command, type CommandMethods, type CommandResponse, type Message, type MessageTypes } from '../../types/index.
|
|
2
|
-
import type { OpenConnectionSender } from '../sender.
|
|
1
|
+
import { type Command, type CommandMethods, type CommandResponse, type Message, type MessageTypes } from '../../types/index.ts';
|
|
2
|
+
import type { OpenConnectionSender } from '../sender.ts';
|
|
3
3
|
export declare class TCPSender implements OpenConnectionSender {
|
|
4
4
|
private readonly throttler;
|
|
5
5
|
private readonly envelopeResolver;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Command, type CommandMethods, type CommandResponse, type Message, type MessageTypes } from '../../types/index.
|
|
2
|
-
import type { OpenConnectionSender } from '../sender.
|
|
1
|
+
import { type Command, type CommandMethods, type CommandResponse, type Message, type MessageTypes } from '../../types/index.ts';
|
|
2
|
+
import type { OpenConnectionSender } from '../sender.ts';
|
|
3
3
|
export declare class WebSocketSender implements OpenConnectionSender {
|
|
4
4
|
private readonly throttler;
|
|
5
5
|
private readonly envelopeResolver;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UnknownMessageContent } from './message.
|
|
2
|
-
import type { Identity } from './node.
|
|
1
|
+
import type { UnknownMessageContent } from './message.ts';
|
|
2
|
+
import type { Identity } from './node.ts';
|
|
3
3
|
export type Account = {
|
|
4
4
|
identity: Identity;
|
|
5
5
|
fullName: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Envelope } from './envelope.
|
|
1
|
+
import type { Envelope } from './envelope.ts';
|
|
2
2
|
type ResourceCommand = {
|
|
3
3
|
type: string;
|
|
4
4
|
resource: unknown;
|
|
5
5
|
};
|
|
6
|
-
type NoResourceCommand =
|
|
6
|
+
type NoResourceCommand = object;
|
|
7
7
|
interface CommandMethodsProperties {
|
|
8
8
|
get: NoResourceCommand;
|
|
9
9
|
set: ResourceCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/types/command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,KAAK,eAAe,GAAG;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,KAAK,iBAAiB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/types/command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAE7C,KAAK,eAAe,GAAG;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,KAAK,iBAAiB,GAAG,MAAM,CAAA;AAE/B,UAAU,wBAAwB;IAC9B,GAAG,EAAE,iBAAiB,CAAA;IACtB,GAAG,EAAE,eAAe,CAAA;IACpB,KAAK,EAAE,eAAe,CAAA;IACtB,MAAM,EAAE,iBAAiB,GAAG,eAAe,CAAA;IAC3C,OAAO,EAAE,eAAe,CAAA;CAC3B;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,wBAAwB,CAAA;AAE3D,MAAM,MAAM,OAAO,CAAC,OAAO,SAAS,cAAc,IAAI,QAAQ,GAAG;IAC7D,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,OAAO,CAAA;CAClB,GAAG,wBAAwB,CAAC,OAAO,CAAC,CAAA;AAErC,MAAM,MAAM,eAAe,CAAC,SAAS,EAAE,OAAO,SAAS,cAAc,EAAE,OAAO,SAAS,SAAS,GAAG,SAAS,IAAI,IAAI,CAChH,OAAO,CAAC,OAAO,CAAC,EAChB,KAAK,CACR,GAAG;IACA,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,OAAO,CAAA;IACf,QAAQ,EAAE,OAAO,SAAS,KAAK,GAAG,CAAC,OAAO,SAAS,SAAS,GAAG,SAAS,GAAG,KAAK,CAAC,GAAG,KAAK,CAAA;IACzF,MAAM,EAAE,OAAO,SAAS,SAAS,GAC3B;QACI,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,MAAM,CAAA;KACtB,GACD,KAAK,CAAA;CACd,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,UAAU,QAAQ,KAAG,QAAQ,IAAI,OAAO,CAAC,cAAc,CACpC,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * from './node.
|
|
2
|
-
export * from './envelope.
|
|
3
|
-
export * from './message.
|
|
4
|
-
export * from './command.
|
|
5
|
-
export * from './notification.
|
|
6
|
-
export * from './desk.
|
|
7
|
-
export * from './account.
|
|
8
|
-
export * from './whatsapp.
|
|
9
|
-
export * from './portal.
|
|
10
|
-
export * from './plugins.
|
|
11
|
-
export * from './analytics.
|
|
1
|
+
export * from './node.ts';
|
|
2
|
+
export * from './envelope.ts';
|
|
3
|
+
export * from './message.ts';
|
|
4
|
+
export * from './command.ts';
|
|
5
|
+
export * from './notification.ts';
|
|
6
|
+
export * from './desk.ts';
|
|
7
|
+
export * from './account.ts';
|
|
8
|
+
export * from './whatsapp.ts';
|
|
9
|
+
export * from './portal.ts';
|
|
10
|
+
export * from './plugins.ts';
|
|
11
|
+
export * from './analytics.ts';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TicketStatus } from './desk.
|
|
2
|
-
import type { Envelope } from './envelope.
|
|
3
|
-
import type { Identity } from './node.
|
|
1
|
+
import type { TicketStatus } from './desk.ts';
|
|
2
|
+
import type { Envelope } from './envelope.ts';
|
|
3
|
+
import type { Identity } from './node.ts';
|
|
4
4
|
export type PlainText = string;
|
|
5
5
|
export type Ticket<Type extends MessageTypes | undefined = undefined> = {
|
|
6
6
|
id: string;
|
|
@@ -7,6 +7,7 @@ export declare class Node extends String {
|
|
|
7
7
|
readonly instance?: string | undefined;
|
|
8
8
|
constructor(name: string, domain: string, instance?: string | undefined);
|
|
9
9
|
toIdentity(): Identity;
|
|
10
|
+
withInstance(instance: string): Node;
|
|
10
11
|
static isValid(node: string | null | undefined): node is NodeShape;
|
|
11
12
|
getSource(): "Blip Chat" | "Messenger" | "Instagram" | "WhatsApp" | "Google Business Messages" | "Telegram" | "Workplace" | "Email" | "Bot" | "Blip" | "Tunnel" | "Slack" | "Custom" | "Unknown";
|
|
12
13
|
static from(node: NodeLike): Node;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/types/node.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;AACtD,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,GAAG,QAAQ,IAAI,MAAM,EAAE,CAAA;AAC1D,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAA;AAEvC,qBAAa,IAAK,SAAQ,MAAM;aAER,IAAI,EAAE,MAAM;aACZ,MAAM,EAAE,MAAM;aACd,QAAQ,CAAC,EAAE,MAAM;gBAFjB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,YAAA;IAK9B,UAAU,IAC+C,QAAQ;
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/types/node.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAA;AACtD,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,GAAG,QAAQ,IAAI,MAAM,EAAE,CAAA;AAC1D,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAA;AAEvC,qBAAa,IAAK,SAAQ,MAAM;aAER,IAAI,EAAE,MAAM;aACZ,MAAM,EAAE,MAAM;aACd,QAAQ,CAAC,EAAE,MAAM;gBAFjB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,YAAA;IAK9B,UAAU,IAC+C,QAAQ;IAGjE,YAAY,CAAC,QAAQ,EAAE,MAAM;WAItB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,IAAI,SAAS;IAIlE,SAAS;WAsCF,IAAI,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI;CAa3C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Envelope } from './envelope.
|
|
1
|
+
import type { Envelope } from './envelope.ts';
|
|
2
2
|
export type Session = Envelope & {
|
|
3
3
|
state: 'new' | 'negotiating' | 'authenticating' | 'established' | 'finishing' | 'finished' | 'failed';
|
|
4
4
|
encryptionOptions?: Array<string>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whitewall/blip-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.113",
|
|
4
4
|
"description": "Blip API wrapper",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"exports": {
|
|
6
7
|
"types": "./dist/types/index.d.ts",
|
|
7
8
|
"import": "./dist/esm/index.js",
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
],
|
|
23
24
|
"devDependencies": {
|
|
24
25
|
"@biomejs/biome": "1.9.4",
|
|
25
|
-
"@types/node": "22.14.
|
|
26
|
+
"@types/node": "22.14.1",
|
|
26
27
|
"concurrently": "9.1.2",
|
|
27
28
|
"typescript": "5.8.3"
|
|
28
29
|
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PortalPluginSender = void 0;
|
|
4
|
-
const index_js_1 = require("../../index.js");
|
|
5
|
-
const communication_js_1 = require("./communication.js");
|
|
6
|
-
class PortalPluginSender {
|
|
7
|
-
channel;
|
|
8
|
-
constructor() {
|
|
9
|
-
this.channel = (0, communication_js_1.startChannel)();
|
|
10
|
-
}
|
|
11
|
-
async sendMessage(message) {
|
|
12
|
-
await this.sendCommand({
|
|
13
|
-
id: message.id,
|
|
14
|
-
uri: '/schedules',
|
|
15
|
-
method: 'set',
|
|
16
|
-
type: 'application/vnd.iris.schedule+json',
|
|
17
|
-
resource: {
|
|
18
|
-
message,
|
|
19
|
-
when: new Date().toISOString(),
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
async sendCommand(command) {
|
|
24
|
-
try {
|
|
25
|
-
return await this.channel.post('sendCommand', {
|
|
26
|
-
command,
|
|
27
|
-
destination: command.to?.includes('msging.net') ? 'MessagingHubService' : 'BlipService',
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
catch (err) {
|
|
31
|
-
if (err && typeof err === 'object' && 'code' in err && 'description' in err) {
|
|
32
|
-
const knownerror = err;
|
|
33
|
-
throw new index_js_1.BlipError(command.uri, knownerror.code, knownerror.description);
|
|
34
|
-
}
|
|
35
|
-
throw err;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
static check(blipClient) {
|
|
39
|
-
const isPluginSender = blipClient.sender instanceof PortalPluginSender;
|
|
40
|
-
if (!isPluginSender) {
|
|
41
|
-
throw new Error('This command is only allowed for plugin senders');
|
|
42
|
-
}
|
|
43
|
-
return blipClient.sender;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
exports.PortalPluginSender = PortalPluginSender;
|
|
47
|
-
//# sourceMappingURL=pluginsender.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pluginsender.js","sourceRoot":"","sources":["../../../../src/sender/portal/pluginsender.ts"],"names":[],"mappings":";;;AAAA,6CAQuB;AACvB,yDAAiD;AAEjD,MAAa,kBAAkB;IACX,OAAO,CAAA;IAEvB;QACI,IAAI,CAAC,OAAO,GAAG,IAAA,+BAAY,GAAE,CAAA;IACjC,CAAC;IAEM,KAAK,CAAC,WAAW,CAA4B,OAAsB;QACtE,MAAM,IAAI,CAAC,WAAW,CAAC;YACnB,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,GAAG,EAAE,YAAY;YACjB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,oCAAoC;YAC1C,QAAQ,EAAE;gBACN,OAAO;gBACP,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACjC;SACJ,CAAC,CAAA;IACN,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,OAAgC;QACrD,IAAI,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE;gBAC1C,OAAO;gBACP,WAAW,EAAE,OAAO,CAAC,EAAE,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,aAAa;aAC1F,CAAC,CAAA;QACN,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,IAAI,GAAG,IAAI,aAAa,IAAI,GAAG,EAAE,CAAC;gBAC1E,MAAM,UAAU,GAAG,GAA4C,CAAA;gBAC/D,MAAM,IAAI,oBAAS,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,CAAA;YAC7E,CAAC;YAED,MAAM,GAAG,CAAA;QACb,CAAC;IACL,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,UAAsB;QACtC,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,YAAY,kBAAkB,CAAA;QACtE,IAAI,CAAC,cAAc,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAA;QACtE,CAAC;QACD,OAAO,UAAU,CAAC,MAAM,CAAA;IAC5B,CAAC;CACJ;AA3CD,gDA2CC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { BlipError, } from '../../index.js';
|
|
2
|
-
import { startChannel } from './communication.js';
|
|
3
|
-
export class PortalPluginSender {
|
|
4
|
-
channel;
|
|
5
|
-
constructor() {
|
|
6
|
-
this.channel = startChannel();
|
|
7
|
-
}
|
|
8
|
-
async sendMessage(message) {
|
|
9
|
-
await this.sendCommand({
|
|
10
|
-
id: message.id,
|
|
11
|
-
uri: '/schedules',
|
|
12
|
-
method: 'set',
|
|
13
|
-
type: 'application/vnd.iris.schedule+json',
|
|
14
|
-
resource: {
|
|
15
|
-
message,
|
|
16
|
-
when: new Date().toISOString(),
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
async sendCommand(command) {
|
|
21
|
-
try {
|
|
22
|
-
return await this.channel.post('sendCommand', {
|
|
23
|
-
command,
|
|
24
|
-
destination: command.to?.includes('msging.net') ? 'MessagingHubService' : 'BlipService',
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
catch (err) {
|
|
28
|
-
if (err && typeof err === 'object' && 'code' in err && 'description' in err) {
|
|
29
|
-
const knownerror = err;
|
|
30
|
-
throw new BlipError(command.uri, knownerror.code, knownerror.description);
|
|
31
|
-
}
|
|
32
|
-
throw err;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
static check(blipClient) {
|
|
36
|
-
const isPluginSender = blipClient.sender instanceof PortalPluginSender;
|
|
37
|
-
if (!isPluginSender) {
|
|
38
|
-
throw new Error('This command is only allowed for plugin senders');
|
|
39
|
-
}
|
|
40
|
-
return blipClient.sender;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=pluginsender.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pluginsender.js","sourceRoot":"","sources":["../../../../src/sender/portal/pluginsender.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,SAAS,GAMZ,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD,MAAM,OAAO,kBAAkB;IACX,OAAO,CAAA;IAEvB;QACI,IAAI,CAAC,OAAO,GAAG,YAAY,EAAE,CAAA;IACjC,CAAC;IAEM,KAAK,CAAC,WAAW,CAA4B,OAAsB;QACtE,MAAM,IAAI,CAAC,WAAW,CAAC;YACnB,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,GAAG,EAAE,YAAY;YACjB,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,oCAAoC;YAC1C,QAAQ,EAAE;gBACN,OAAO;gBACP,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;aACjC;SACJ,CAAC,CAAA;IACN,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,OAAgC;QACrD,IAAI,CAAC;YACD,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE;gBAC1C,OAAO;gBACP,WAAW,EAAE,OAAO,CAAC,EAAE,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,aAAa;aAC1F,CAAC,CAAA;QACN,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,IAAI,GAAG,IAAI,aAAa,IAAI,GAAG,EAAE,CAAC;gBAC1E,MAAM,UAAU,GAAG,GAA4C,CAAA;gBAC/D,MAAM,IAAI,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC,CAAA;YAC7E,CAAC;YAED,MAAM,GAAG,CAAA;QACb,CAAC;IACL,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,UAAsB;QACtC,MAAM,cAAc,GAAG,UAAU,CAAC,MAAM,YAAY,kBAAkB,CAAA;QACtE,IAAI,CAAC,cAAc,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAA;QACtE,CAAC;QACD,OAAO,UAAU,CAAC,MAAM,CAAA;IAC5B,CAAC;CACJ"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type BlipClient, type Command, type CommandMethods, type Message, type MessageTypes, type Sender } from '../../index.js';
|
|
2
|
-
export declare class PortalPluginSender implements Sender {
|
|
3
|
-
readonly channel: {
|
|
4
|
-
post: <T>(action: string, content: unknown, options?: {
|
|
5
|
-
fireAndForget: boolean;
|
|
6
|
-
}) => Promise<T>;
|
|
7
|
-
destroy: () => void;
|
|
8
|
-
};
|
|
9
|
-
constructor();
|
|
10
|
-
sendMessage<Type extends MessageTypes>(message: Message<Type>): Promise<void>;
|
|
11
|
-
sendCommand(command: Command<CommandMethods>): Promise<unknown>;
|
|
12
|
-
static check(blipClient: BlipClient): PortalPluginSender;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=pluginsender.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pluginsender.d.ts","sourceRoot":"","sources":["../../../../src/sender/portal/pluginsender.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,UAAU,EAEf,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,MAAM,EACd,MAAM,gBAAgB,CAAA;AAGvB,qBAAa,kBAAmB,YAAW,MAAM;IAC7C,SAAgB,OAAO;;;;;MAAA;;IAMV,WAAW,CAAC,IAAI,SAAS,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC;IAa7D,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;WAgB9D,KAAK,CAAC,UAAU,EAAE,UAAU,GAAG,kBAAkB;CAOlE"}
|
|
File without changes
|