@whitewall/blip-sdk 0.0.29 → 0.0.31
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/namespaces/account.js +5 -2
- package/dist/cjs/namespaces/account.js.map +1 -1
- package/dist/cjs/namespaces/activecampaign.js.map +1 -1
- package/dist/cjs/namespaces/analytics.js.map +1 -1
- package/dist/cjs/namespaces/builder.js.map +1 -1
- package/dist/cjs/namespaces/desk.js +35 -0
- package/dist/cjs/namespaces/desk.js.map +1 -1
- package/dist/cjs/namespaces/media.js.map +1 -1
- package/dist/cjs/namespaces/namespace.js +6 -6
- package/dist/cjs/namespaces/namespace.js.map +1 -1
- package/dist/cjs/namespaces/scheduler.js.map +1 -1
- package/dist/cjs/namespaces/whatsapp.js +1 -1
- package/dist/cjs/namespaces/whatsapp.js.map +1 -1
- package/dist/cjs/sender/httpsender.js +10 -8
- package/dist/cjs/sender/httpsender.js.map +1 -1
- package/dist/cjs/types/desk.js.map +1 -1
- package/dist/cjs/types/message.js.map +1 -1
- package/dist/cjs/types/node.js +1 -1
- package/dist/cjs/utils/odata.js.map +1 -1
- package/dist/cjs/utils/uri.js.map +1 -1
- package/dist/esm/namespaces/account.js +5 -2
- package/dist/esm/namespaces/account.js.map +1 -1
- package/dist/esm/namespaces/activecampaign.js.map +1 -1
- package/dist/esm/namespaces/analytics.js.map +1 -1
- package/dist/esm/namespaces/builder.js.map +1 -1
- package/dist/esm/namespaces/desk.js +35 -0
- package/dist/esm/namespaces/desk.js.map +1 -1
- package/dist/esm/namespaces/media.js.map +1 -1
- package/dist/esm/namespaces/namespace.js +6 -6
- package/dist/esm/namespaces/namespace.js.map +1 -1
- package/dist/esm/namespaces/scheduler.js.map +1 -1
- package/dist/esm/namespaces/whatsapp.js +1 -1
- package/dist/esm/namespaces/whatsapp.js.map +1 -1
- package/dist/esm/sender/httpsender.js +10 -8
- package/dist/esm/sender/httpsender.js.map +1 -1
- package/dist/esm/types/desk.js.map +1 -1
- package/dist/esm/types/message.js.map +1 -1
- package/dist/esm/types/node.js +1 -1
- package/dist/esm/utils/odata.js.map +1 -1
- package/dist/esm/utils/uri.js.map +1 -1
- package/dist/types/client.d.ts +2 -2
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/namespaces/account.d.ts +13 -13
- package/dist/types/namespaces/account.d.ts.map +1 -1
- package/dist/types/namespaces/activecampaign.d.ts +7 -7
- package/dist/types/namespaces/activecampaign.d.ts.map +1 -1
- package/dist/types/namespaces/analytics.d.ts +3 -3
- package/dist/types/namespaces/analytics.d.ts.map +1 -1
- package/dist/types/namespaces/builder.d.ts +4 -4
- package/dist/types/namespaces/builder.d.ts.map +1 -1
- package/dist/types/namespaces/desk.d.ts +24 -19
- package/dist/types/namespaces/desk.d.ts.map +1 -1
- package/dist/types/namespaces/media.d.ts +2 -2
- package/dist/types/namespaces/media.d.ts.map +1 -1
- package/dist/types/namespaces/namespace.d.ts +3 -3
- package/dist/types/namespaces/namespace.d.ts.map +1 -1
- package/dist/types/namespaces/scheduler.d.ts +5 -5
- package/dist/types/namespaces/scheduler.d.ts.map +1 -1
- package/dist/types/namespaces/whatsapp.d.ts +8 -8
- package/dist/types/namespaces/whatsapp.d.ts.map +1 -1
- package/dist/types/sender/httpsender.d.ts +2 -2
- package/dist/types/sender/httpsender.d.ts.map +1 -1
- package/dist/types/types/account.d.ts +2 -2
- package/dist/types/types/account.d.ts.map +1 -1
- package/dist/types/types/command.d.ts +7 -7
- package/dist/types/types/command.d.ts.map +1 -1
- package/dist/types/types/desk.d.ts +3 -3
- package/dist/types/types/desk.d.ts.map +1 -1
- package/dist/types/types/envelope.d.ts +1 -1
- package/dist/types/types/envelope.d.ts.map +1 -1
- package/dist/types/types/message.d.ts +14 -15
- package/dist/types/types/message.d.ts.map +1 -1
- package/dist/types/types/whatsapp.d.ts +5 -5
- package/dist/types/types/whatsapp.d.ts.map +1 -1
- package/dist/types/utils/odata.d.ts.map +1 -1
- package/dist/types/utils/uri.d.ts +1 -1
- package/dist/types/utils/uri.d.ts.map +1 -1
- package/package.json +6 -5
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { Sender } from '../sender/sender.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { Sender } from '../sender/sender.js';
|
|
2
|
+
import type { Identity } from '../types/index.js';
|
|
3
|
+
import type { MessageTemplate, WhatsappFlow } from '../types/whatsapp.js';
|
|
4
|
+
import { type ConsumeOptions, Namespace } from './namespace.js';
|
|
5
5
|
export declare class WhatsAppNamespace extends Namespace {
|
|
6
6
|
constructor(sender: Sender);
|
|
7
7
|
phoneToIdentity(phoneNumber: string): Promise<Identity>;
|
|
8
8
|
getMessageTemplates(filters?: {
|
|
9
9
|
status: string;
|
|
10
10
|
templateName: string;
|
|
11
|
-
}, opts?: ConsumeOptions): Promise<MessageTemplate
|
|
11
|
+
}, opts?: ConsumeOptions): Promise<Array<MessageTemplate>>;
|
|
12
12
|
createFlow(name: string, category: string, opts?: ConsumeOptions): Promise<{
|
|
13
13
|
id: string;
|
|
14
14
|
}>;
|
|
15
15
|
updateFlowName(id: string, name: string, opts?: ConsumeOptions): Promise<void>;
|
|
16
16
|
updateFlowJson(id: string, json: string, opts?: ConsumeOptions): Promise<void>;
|
|
17
17
|
updateFlowsPublicKey(publicKey: string, opts?: ConsumeOptions): Promise<void>;
|
|
18
|
-
getFlows(opts?: ConsumeOptions): Promise<WhatsappFlow
|
|
18
|
+
getFlows(opts?: ConsumeOptions): Promise<Array<WhatsappFlow>>;
|
|
19
19
|
getFlow(id: string, opts?: ConsumeOptions): Promise<WhatsappFlow>;
|
|
20
20
|
publishFlow(id: string, opts?: ConsumeOptions): Promise<void>;
|
|
21
21
|
deprecateFlow(id: string, opts?: ConsumeOptions): Promise<void>;
|
|
22
|
-
getFlowAssets(id: string, opts?: ConsumeOptions): Promise<{
|
|
22
|
+
getFlowAssets(id: string, opts?: ConsumeOptions): Promise<Array<{
|
|
23
23
|
name: string;
|
|
24
24
|
download_url: string;
|
|
25
|
-
}
|
|
25
|
+
}>>;
|
|
26
26
|
deleteFlow(id: string, opts?: ConsumeOptions): Promise<void>;
|
|
27
27
|
}
|
|
28
28
|
//# sourceMappingURL=whatsapp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whatsapp.d.ts","sourceRoot":"","sources":["../../../src/namespaces/whatsapp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"whatsapp.d.ts","sourceRoot":"","sources":["../../../src/namespaces/whatsapp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEzE,OAAO,EAAE,KAAK,cAAc,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/D,qBAAa,iBAAkB,SAAQ,SAAS;gBAChC,MAAM,EAAE,MAAM;IAIb,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAyBvD,mBAAmB,CAC5B,OAAO,CAAC,EAAE;QACN,MAAM,EAAE,MAAM,CAAA;QACd,YAAY,EAAE,MAAM,CAAA;KACvB,EACD,IAAI,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAarB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAe1F,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAc9E,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAY9E,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAc7E,QAAQ,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAU7D,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAUjE,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAU7D,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAU/D,aAAa,CACtB,EAAE,EAAE,MAAM,EACV,IAAI,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAa5C,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CAS5E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { type Command, type CommandMethods, type Identity, type Message, type MessageTypes } from '../types/index.js';
|
|
2
|
+
import type { Sender } from './sender.js';
|
|
3
3
|
export declare class HttpSender implements Sender {
|
|
4
4
|
private readonly token;
|
|
5
5
|
private readonly tenantId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpsender.d.ts","sourceRoot":"","sources":["../../../src/sender/httpsender.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"httpsender.d.ts","sourceRoot":"","sources":["../../../src/sender/httpsender.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,cAAc,EAEnB,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,KAAK,YAAY,EAEpB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,qBAAa,UAAW,YAAW,MAAM;IAEjC,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBADR,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM;IAGxB,WAAW,CAAC,IAAI,SAAS,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAe7E,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;WAwB9D,KAAK,CAAC,uBAAuB,EAAE,MAAM,GAAG,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU;CAOnH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/types/account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/types/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEzC,MAAM,MAAM,OAAO,GAAG;IAClB,QAAQ,EAAE,QAAQ,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAA;IACtC,eAAe,CAAC,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,GAAG,UAAU,CAAA;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAA;CAC3C,GAAG,qBAAqB,CAAA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Envelope } from './envelope.js';
|
|
1
|
+
import type { Envelope } from './envelope.js';
|
|
2
2
|
type ResourceCommand = {
|
|
3
3
|
type: string;
|
|
4
4
|
resource: unknown;
|
|
5
5
|
};
|
|
6
|
-
type NoResourceCommand =
|
|
6
|
+
type NoResourceCommand = Record<string, never> | undefined;
|
|
7
7
|
interface CommandMethodsProperties {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
get: NoResourceCommand;
|
|
9
|
+
set: ResourceCommand;
|
|
10
|
+
merge: ResourceCommand;
|
|
11
|
+
delete: NoResourceCommand | ResourceCommand;
|
|
12
|
+
observe: ResourceCommand;
|
|
13
13
|
}
|
|
14
14
|
export type CommandMethods = keyof CommandMethodsProperties;
|
|
15
15
|
export type Command<TMethod extends CommandMethods> = Envelope & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/types/command.ts"],"names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export type Queue = {
|
|
|
32
32
|
};
|
|
33
33
|
export type DetailedAttendanceHour = {
|
|
34
34
|
attendanceHour: AttendanceHour;
|
|
35
|
-
attendanceHourScheduleItems: AttendanceHourScheduleItem
|
|
36
|
-
attendanceHourOffItems: AttendanceHourOffItem
|
|
37
|
-
queues: Queue
|
|
35
|
+
attendanceHourScheduleItems: Array<AttendanceHourScheduleItem>;
|
|
36
|
+
attendanceHourOffItems: Array<AttendanceHourOffItem>;
|
|
37
|
+
queues: Array<Queue>;
|
|
38
38
|
};
|
|
39
39
|
//# sourceMappingURL=desk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desk.d.ts","sourceRoot":"","sources":["../../../src/types/desk.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"desk.d.ts","sourceRoot":"","sources":["../../../src/types/desk.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAClB,SAAS,GACT,MAAM,GACN,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,wBAAwB,CAAA;AAE9B,MAAM,MAAM,cAAc,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,OAAO,CAAA;CAClB,CAAA;AAED,oBAAY,SAAS;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACxB;AAED,MAAM,MAAM,0BAA0B,GAAG;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,SAAS,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,KAAK,GAAG;IAChB,EAAE,EAAE,MAAM,CAAA;IACV,WAAW,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IACjC,cAAc,EAAE,cAAc,CAAA;IAC9B,2BAA2B,EAAE,KAAK,CAAC,0BAA0B,CAAC,CAAA;IAC9D,sBAAsB,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACpD,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;CACvB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../../src/types/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../../src/types/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEzC,MAAM,MAAM,QAAQ,GAAG;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,EAAE,CAAC,EAAE,QAAQ,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAA;IACxC,EAAE,CAAC,EAAE,QAAQ,CAAA;CAChB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { TicketStatus } from './desk.js';
|
|
2
|
+
import type { Envelope } from './envelope.js';
|
|
3
|
+
import type { Identity } from './node.js';
|
|
4
4
|
export type PlainText = string;
|
|
5
5
|
export type Ticket<Type extends MessageTypes | undefined = undefined> = {
|
|
6
6
|
id: string;
|
|
@@ -22,7 +22,7 @@ export type Ticket<Type extends MessageTypes | undefined = undefined> = {
|
|
|
22
22
|
customerInput: Type extends MessageTypes ? Document<Type> : undefined;
|
|
23
23
|
closed: boolean;
|
|
24
24
|
closedBy?: Identity;
|
|
25
|
-
tags: string
|
|
25
|
+
tags: Array<string>;
|
|
26
26
|
};
|
|
27
27
|
export type Redirect<Type extends MessageTypes> = {
|
|
28
28
|
address: Identity;
|
|
@@ -39,22 +39,22 @@ export type Reply<Type extends MessageTypes> = {
|
|
|
39
39
|
};
|
|
40
40
|
export type Select = {
|
|
41
41
|
text: string;
|
|
42
|
-
options: {
|
|
42
|
+
options: Array<{
|
|
43
43
|
text: string;
|
|
44
|
-
}
|
|
44
|
+
}>;
|
|
45
45
|
};
|
|
46
46
|
export type ChatState = {
|
|
47
47
|
state: string;
|
|
48
48
|
};
|
|
49
49
|
export interface MessageTypesContent {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
'text/plain': PlainText;
|
|
51
|
+
'application/vnd.iris.ticket+json': Ticket<MessageTypes>;
|
|
52
|
+
'application/vnd.lime.redirect+json': Redirect<MessageTypes>;
|
|
53
|
+
'application/vnd.lime.media-link+json': MediaLink;
|
|
54
|
+
'application/json': Record<string, unknown>;
|
|
55
|
+
'application/vnd.lime.reply+json': Reply<MessageTypes>;
|
|
56
|
+
'application/vnd.lime.select+json': Select;
|
|
57
|
+
'application/vnd.lime.chatstate+json': ChatState;
|
|
58
58
|
}
|
|
59
59
|
export type MessageTypes = keyof MessageTypesContent;
|
|
60
60
|
export type Document<Type extends MessageTypes> = {
|
|
@@ -69,7 +69,6 @@ export type Message<Type extends MessageTypes> = Envelope & MessageContent<Type>
|
|
|
69
69
|
export type UnknownDocument = Document<MessageTypes>;
|
|
70
70
|
export type UnknownMessage = Message<MessageTypes>;
|
|
71
71
|
export type UnknownMessageContent = MessageContent<MessageTypes>;
|
|
72
|
-
export type AnyDocument = Document<any>;
|
|
73
72
|
export declare const isMessageOfType: <Type extends keyof MessageTypesContent>(message: UnknownMessage, type: Type) => message is Message<Type>;
|
|
74
73
|
export declare const isDocumentOfType: <Type extends keyof MessageTypesContent>(document: UnknownDocument, type: Type) => document is Document<Type>;
|
|
75
74
|
export declare const messageToDocument: <Type extends keyof MessageTypesContent>(message: Pick<Message<Type>, 'type' | 'content'>) => Document<Type>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/types/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../src/types/message.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEzC,MAAM,MAAM,SAAS,GAAG,MAAM,CAAA;AAE9B,MAAM,MAAM,MAAM,CAAC,IAAI,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,IAAI;IACpE,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,QAAQ,CAAA;IACvB,gBAAgB,EAAE,QAAQ,CAAA;IAC1B,cAAc,EAAE,MAAM,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,YAAY,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,aAAa,CAAC,EAAE,QAAQ,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,C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AkC,EAAE,MAAM,CAAA;IAC1C,qCAAqC,EAAE,SAAS,CAAA;CACnD;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,mBAAmB,CAAA;AAEpD,MAAM,MAAM,QAAQ,CAAC,IAAI,SAAS,YAAY,IAAI;IAC9C,IAAI,EAAE,IAAI,CAAA;IACV,KAAK,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,cAAc,CAAC,IAAI,SAAS,YAAY,IAAI;IACpD,IAAI,EAAE,IAAI,CAAA;IACV,OAAO,EAAE,mBAAmB,CAAC,IAAI,CAAC,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,OAAO,CAAC,IAAI,SAAS,YAAY,IAAI,QAAQ,GAAG,cAAc,CAAC,IAAI,CAAC,CAAA;AAEhF,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAA;AACpD,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,CAAA;AAClD,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,YAAY,CAAC,CAAA;AAEhE,eAAO,MAAM,eAAe,oDACf,cAAc,QACjB,IAAI,6BACsC,CAAA;AAEpD,eAAO,MAAM,gBAAgB,qDACf,eAAe,QACnB,IAAI,+BACyC,CAAA;AAEvD,eAAO,MAAM,iBAAiB,oDACjB,KAAK,QAAQ,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC,KACjD,SAAS,IAAI,CAGd,CAAA"}
|
|
@@ -2,8 +2,8 @@ export type WhatsappFlow = {
|
|
|
2
2
|
id: string;
|
|
3
3
|
name: string;
|
|
4
4
|
status: 'DRAFT' | 'PUBLISHED' | 'DEPRECATED';
|
|
5
|
-
categories: string
|
|
6
|
-
validation_errors: string
|
|
5
|
+
categories: Array<string>;
|
|
6
|
+
validation_errors: Array<string>;
|
|
7
7
|
};
|
|
8
8
|
export type MessageTemplate = {
|
|
9
9
|
id: string;
|
|
@@ -11,13 +11,13 @@ export type MessageTemplate = {
|
|
|
11
11
|
status: string;
|
|
12
12
|
language: string;
|
|
13
13
|
last_update_time: string;
|
|
14
|
-
components: {
|
|
14
|
+
components: Array<{
|
|
15
15
|
type: string;
|
|
16
16
|
text?: string;
|
|
17
17
|
format: string;
|
|
18
18
|
example: {
|
|
19
|
-
header_handle: string
|
|
19
|
+
header_handle: Array<string>;
|
|
20
20
|
};
|
|
21
|
-
}
|
|
21
|
+
}>;
|
|
22
22
|
};
|
|
23
23
|
//# sourceMappingURL=whatsapp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whatsapp.d.ts","sourceRoot":"","sources":["../../../src/types/whatsapp.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,YAAY,CAAA;IAC5C,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"whatsapp.d.ts","sourceRoot":"","sources":["../../../src/types/whatsapp.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,YAAY,CAAA;IAC5C,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACzB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,KAAK,CAAC;QACd,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;QACd,OAAO,EAAE;YACL,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;SAC/B,CAAA;KACJ,CAAC,CAAA;CACL,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odata.d.ts","sourceRoot":"","sources":["../../../src/utils/odata.ts"],"names":[],"mappings":"AAEA,qBAAa,WAAW,CAAC,CAAC;IACtB,OAAO,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"odata.d.ts","sourceRoot":"","sources":["../../../src/utils/odata.ts"],"names":[],"mappings":"AAEA,qBAAa,WAAW,CAAC,CAAC;IACtB,OAAO,CAAC,WAAW,CAAoB;IAEvC,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,YAAY;IAIpB,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;IAK5D,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;IAK5D,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC;IAKnE,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC;IAKnE,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC;IAKnE,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC;IAKnE,EAAE,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;IAMpE,UAAU,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC;IAKtE,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC;IAKpE,GAAG,CAAC,aAAa,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;IAU9E,EAAE,CAAC,aAAa,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC;IAU7E,QAAQ,IAAI,MAAM;CAGrB;AAED,eAAO,MAAM,MAAM,WAAU,YAAY,CAAC,CAAyB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uri.d.ts","sourceRoot":"","sources":["../../../src/utils/uri.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,UACL,oBAAoB,WAClB,OAAO,
|
|
1
|
+
{"version":3,"file":"uri.d.ts","sourceRoot":"","sources":["../../../src/utils/uri.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,UACL,oBAAoB,WAClB,MAAM,OAAO,CAAC,KACxB;IACC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,IAAI,MAAM,EAAE,MAAM,CAAC,CAAA;CAuC7B,CAAA;AAED,eAAO,MAAM,UAAU,QAAS,IAAI,MAAM,EAAE,MAAM,CAAC,KAAG,MAIrD,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whitewall/blip-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.31",
|
|
4
4
|
"description": "Blip API wrapper",
|
|
5
5
|
"exports": {
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
7
|
-
"import": "./dist/esm",
|
|
8
|
-
"require": "./dist/cjs"
|
|
7
|
+
"import": "./dist/esm/index.js",
|
|
8
|
+
"require": "./dist/cjs/index.js"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build:esm": "tsc --module ESNext --outDir dist/esm",
|
|
@@ -13,14 +13,15 @@
|
|
|
13
13
|
"build:types": "tsc --declaration --emitDeclarationOnly --declarationMap --outDir dist/types",
|
|
14
14
|
"build": "npm run build:esm && npm run build:cjs && npm run build:types",
|
|
15
15
|
"start": "concurrently -k \"npm run build:esm -- -w\" \"npm run build:cjs -- -w\" \"npm run build:types -- -w\"",
|
|
16
|
-
"lint": "
|
|
16
|
+
"lint": "biome check --write --unsafe ./src",
|
|
17
|
+
"lint:nofix": "biome ci ./src"
|
|
17
18
|
},
|
|
18
19
|
"files": [
|
|
19
20
|
"dist/*"
|
|
20
21
|
],
|
|
21
22
|
"devDependencies": {
|
|
23
|
+
"@biomejs/biome": "^1.8.0",
|
|
22
24
|
"concurrently": "^8.2.2",
|
|
23
|
-
"prettier": "^3.2.5",
|
|
24
25
|
"typescript": "^5.4.5"
|
|
25
26
|
}
|
|
26
27
|
}
|