contiguity 0.1.9 → 0.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.
- package/README.md +33 -0
- package/dist/client.d.ts +4 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +6 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/resources/facetime.d.ts +59 -0
- package/dist/resources/facetime.d.ts.map +1 -0
- package/dist/resources/facetime.js +54 -0
- package/dist/resources/intelligence.d.ts +15 -0
- package/dist/resources/intelligence.d.ts.map +1 -0
- package/dist/resources/intelligence.js +25 -0
- package/dist/schemas/facetime.d.ts +40 -0
- package/dist/schemas/facetime.d.ts.map +1 -0
- package/dist/schemas/facetime.js +13 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +2 -0
- package/dist/schemas/intelligence.d.ts +40 -0
- package/dist/schemas/intelligence.d.ts.map +1 -0
- package/dist/schemas/intelligence.js +8 -0
- package/dist/types/webhooks.d.ts +3 -1
- package/dist/types/webhooks.d.ts.map +1 -1
- package/dist/utils/request.d.ts +2 -0
- package/dist/utils/request.d.ts.map +1 -1
- package/dist/utils/request.js +2 -0
- package/package.json +19 -3
package/README.md
CHANGED
|
@@ -66,6 +66,39 @@ const verification = await contiguity.otp.verify({
|
|
|
66
66
|
});
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
+
### Place a FaceTime Audio call
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
const call = await contiguity.facetime.dial({
|
|
73
|
+
to: "+15125550100",
|
|
74
|
+
from: "+18005551234",
|
|
75
|
+
caller_id: "Tesla Support"
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
await contiguity.facetime.hangup(call.call_id);
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Answer, reject, hang up, and get also take a parsed FaceTime webhook event (or `event.data`), the same way `text.reply(event)` works:
|
|
82
|
+
|
|
83
|
+
```typescript
|
|
84
|
+
const event = contiguity.webhook.parse(raw_body);
|
|
85
|
+
|
|
86
|
+
await contiguity.facetime.answer(event, { caller_id: "Support" });
|
|
87
|
+
await contiguity.facetime.reject(event);
|
|
88
|
+
await contiguity.facetime.hangup(event);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### Look up a phone number
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
const lookup = await contiguity.intelligence.lookup("+13129457420", {
|
|
96
|
+
imessage: true,
|
|
97
|
+
facetime: true,
|
|
98
|
+
contiguity_risk_scoring_beta: true
|
|
99
|
+
});
|
|
100
|
+
```
|
|
101
|
+
|
|
69
102
|
## Documentation
|
|
70
103
|
|
|
71
104
|
For complete documentation, examples, and API reference, visit [docs.contiguity.com](https://docs.contiguity.com/sdk/js/overview).
|
package/dist/client.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ import { AgreementsResource } from "./resources/agreements.js";
|
|
|
8
8
|
import { ImessageResource } from "./resources/imessage.js";
|
|
9
9
|
import { WhatsappResource } from "./resources/whatsapp.js";
|
|
10
10
|
import { ConversationsResource } from "./resources/conversations.js";
|
|
11
|
+
import { FacetimeResource } from "./resources/facetime.js";
|
|
12
|
+
import { IntelligenceResource } from "./resources/intelligence.js";
|
|
11
13
|
import { WebhookResource } from "./resources/webhook.js";
|
|
12
14
|
export interface ContiguityConfig {
|
|
13
15
|
debug?: boolean;
|
|
@@ -23,6 +25,8 @@ export declare class Contiguity {
|
|
|
23
25
|
readonly imessage: ImessageResource;
|
|
24
26
|
readonly whatsapp: WhatsappResource;
|
|
25
27
|
readonly conversations: ConversationsResource;
|
|
28
|
+
readonly facetime: FacetimeResource;
|
|
29
|
+
readonly intelligence: IntelligenceResource;
|
|
26
30
|
readonly webhook: WebhookResource;
|
|
27
31
|
constructor(token?: string, config?: ContiguityConfig);
|
|
28
32
|
}
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGzD,MAAM,WAAW,gBAAgB;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,UAAU;IACnB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAC5C,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAE5C,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;gBAEtB,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,GAAE,gBAAqB;CA+B5D"}
|
package/dist/client.js
CHANGED
|
@@ -8,6 +8,8 @@ import { AgreementsResource } from "./resources/agreements.js";
|
|
|
8
8
|
import { ImessageResource } from "./resources/imessage.js";
|
|
9
9
|
import { WhatsappResource } from "./resources/whatsapp.js";
|
|
10
10
|
import { ConversationsResource } from "./resources/conversations.js";
|
|
11
|
+
import { FacetimeResource } from "./resources/facetime.js";
|
|
12
|
+
import { IntelligenceResource } from "./resources/intelligence.js";
|
|
11
13
|
// import { VoiceResource } from "./resources/voice.js";
|
|
12
14
|
import { WebhookResource } from "./resources/webhook.js";
|
|
13
15
|
export class Contiguity {
|
|
@@ -21,6 +23,8 @@ export class Contiguity {
|
|
|
21
23
|
imessage;
|
|
22
24
|
whatsapp;
|
|
23
25
|
conversations;
|
|
26
|
+
facetime;
|
|
27
|
+
intelligence;
|
|
24
28
|
// readonly voice: VoiceResource;
|
|
25
29
|
webhook;
|
|
26
30
|
constructor(token, config = {}) {
|
|
@@ -47,6 +51,8 @@ export class Contiguity {
|
|
|
47
51
|
this.imessage = new ImessageResource(request_config);
|
|
48
52
|
this.whatsapp = new WhatsappResource(request_config);
|
|
49
53
|
this.conversations = new ConversationsResource({ ...request_config, base: "conversations" });
|
|
54
|
+
this.facetime = new FacetimeResource({ ...request_config, base: "facetime" });
|
|
55
|
+
this.intelligence = new IntelligenceResource({ ...request_config, base: "intelligence" });
|
|
50
56
|
// this.voice = new VoiceResource({ ...request_config, base: "voice" });
|
|
51
57
|
this.webhook = new WebhookResource();
|
|
52
58
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type { ContiguityErrorData } from "./utils/errors.js";
|
|
|
5
5
|
export { verifyWebhookSignature } from "./webhook/verify.js";
|
|
6
6
|
export { parseWebhookPayload } from "./webhook/parse.js";
|
|
7
7
|
export type { ResponseMetadata } from "./types/responses.js";
|
|
8
|
-
export type { WebhookEventBase, WebhookEventType, IncomingMessageData, TextIncomingData, ImessageIncomingData, TextDeliveryData, OtpReverseVerifiedData, } from "./types/webhooks.js";
|
|
8
|
+
export type { WebhookEventBase, WebhookEventType, IncomingMessageData, TextIncomingData, ImessageIncomingData, TextDeliveryData, OtpReverseVerifiedData, FacetimeCallData, } from "./types/webhooks.js";
|
|
9
9
|
export type { TextSendParams, TextReactParams } from "./schemas/text.js";
|
|
10
10
|
export type { EmailSendParams } from "./schemas/email.js";
|
|
11
11
|
export { renderReactEmail } from "./utils/react-email.js";
|
|
@@ -14,4 +14,7 @@ export type { AvailableFilters, AvailableLeaseNumber, AvailableOptions, LeaseAva
|
|
|
14
14
|
export type { ImessageSendParams, ImessageTypingParams, ImessageReactParams, ImessageReadParams, } from "./schemas/imessage.js";
|
|
15
15
|
export type { WhatsappSendParams, WhatsappTypingParams, WhatsappReactParams } from "./schemas/whatsapp.js";
|
|
16
16
|
export type { ConversationGetParams, ConversationHistoryParams, ConversationCancelResponse, } from "./schemas/conversations.js";
|
|
17
|
+
export type { FacetimeDialParams, FacetimeAnswerParams, FacetimeCallDirection, FacetimeCallStatus, FacetimeWebRTC, FacetimeCall, FacetimeAvailableResponse, } from "./schemas/facetime.js";
|
|
18
|
+
export type { FacetimeCallRef } from "./resources/facetime.js";
|
|
19
|
+
export type { IntelligenceLookupParams, IntelligenceRiskLevel, IntelligenceCarrier, IntelligencePorted, IntelligenceRiskScore, IntelligenceLookupResponse, } from "./schemas/intelligence.js";
|
|
17
20
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzE,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EACV,aAAa,EACb,YAAY,EACZ,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,EACd,WAAW,EACX,aAAa,EACb,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACR,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,YAAY,EACV,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EACV,wBAAwB,EACxB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { RequestConfig } from "../utils/request.js";
|
|
2
|
+
import type { WebhookEventBase } from "../types/webhooks.js";
|
|
3
|
+
import { type FacetimeAnswerParams, type FacetimeAvailableResponse, type FacetimeCall, type FacetimeDialParams } from "../schemas/facetime.js";
|
|
4
|
+
export type FacetimeCallRef = string | WebhookEventBase | {
|
|
5
|
+
call_id: string;
|
|
6
|
+
} | Record<string, unknown>;
|
|
7
|
+
export declare class FacetimeResource {
|
|
8
|
+
private readonly config;
|
|
9
|
+
constructor(config: RequestConfig);
|
|
10
|
+
dial(params: FacetimeDialParams): Promise<FacetimeCall & {
|
|
11
|
+
metadata: {
|
|
12
|
+
id: string;
|
|
13
|
+
timestamp: string;
|
|
14
|
+
api_version: string;
|
|
15
|
+
object: string;
|
|
16
|
+
};
|
|
17
|
+
}>;
|
|
18
|
+
get(call: FacetimeCallRef): Promise<FacetimeCall & {
|
|
19
|
+
metadata: {
|
|
20
|
+
id: string;
|
|
21
|
+
timestamp: string;
|
|
22
|
+
api_version: string;
|
|
23
|
+
object: string;
|
|
24
|
+
};
|
|
25
|
+
}>;
|
|
26
|
+
answer(call: FacetimeCallRef, params?: FacetimeAnswerParams): Promise<FacetimeCall & {
|
|
27
|
+
metadata: {
|
|
28
|
+
id: string;
|
|
29
|
+
timestamp: string;
|
|
30
|
+
api_version: string;
|
|
31
|
+
object: string;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
reject(call: FacetimeCallRef): Promise<FacetimeCall & {
|
|
35
|
+
metadata: {
|
|
36
|
+
id: string;
|
|
37
|
+
timestamp: string;
|
|
38
|
+
api_version: string;
|
|
39
|
+
object: string;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
hangup(call: FacetimeCallRef): Promise<FacetimeCall & {
|
|
43
|
+
metadata: {
|
|
44
|
+
id: string;
|
|
45
|
+
timestamp: string;
|
|
46
|
+
api_version: string;
|
|
47
|
+
object: string;
|
|
48
|
+
};
|
|
49
|
+
}>;
|
|
50
|
+
availability(to: string): Promise<FacetimeAvailableResponse & {
|
|
51
|
+
metadata: {
|
|
52
|
+
id: string;
|
|
53
|
+
timestamp: string;
|
|
54
|
+
api_version: string;
|
|
55
|
+
object: string;
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=facetime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facetime.d.ts","sourceRoot":"","sources":["../../src/resources/facetime.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAGH,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EAC1B,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,gBAAgB,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAWxG,qBAAa,gBAAgB;IACb,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAE5C,IAAI,CAAC,MAAM,EAAE,kBAAkB;;;;;;;;IAQ/B,GAAG,CAAC,IAAI,EAAE,eAAe;;;;;;;;IAOzB,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,GAAE,oBAAyB;;;;;;;;IAS/D,MAAM,CAAC,IAAI,EAAE,eAAe;;;;;;;;IAO5B,MAAM,CAAC,IAAI,EAAE,eAAe;;;;;;;;IAO5B,YAAY,CAAC,EAAE,EAAE,MAAM;;;;;;;;CAOhC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { request } from "../utils/request.js";
|
|
2
|
+
import { facetimeAnswerSchema, facetimeDialSchema, } from "../schemas/facetime.js";
|
|
3
|
+
function call_id_from(target) {
|
|
4
|
+
if (typeof target === "string")
|
|
5
|
+
return target;
|
|
6
|
+
if ("data" in target && target.data && typeof target.data.call_id === "string") {
|
|
7
|
+
return target.data.call_id;
|
|
8
|
+
}
|
|
9
|
+
if ("call_id" in target && typeof target.call_id === "string")
|
|
10
|
+
return target.call_id;
|
|
11
|
+
throw new Error("FaceTime webhook data must have call_id");
|
|
12
|
+
}
|
|
13
|
+
export class FacetimeResource {
|
|
14
|
+
config;
|
|
15
|
+
constructor(config) {
|
|
16
|
+
this.config = config;
|
|
17
|
+
}
|
|
18
|
+
async dial(params) {
|
|
19
|
+
const parsed = facetimeDialSchema.parse(params);
|
|
20
|
+
return request(this.config, "/dial", {
|
|
21
|
+
method: "POST",
|
|
22
|
+
body: parsed,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
async get(call) {
|
|
26
|
+
const call_id = call_id_from(call);
|
|
27
|
+
return request(this.config, `/${encodeURIComponent(call_id)}`, {
|
|
28
|
+
method: "GET",
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
async answer(call, params = {}) {
|
|
32
|
+
const call_id = call_id_from(call);
|
|
33
|
+
const parsed = facetimeAnswerSchema.parse(params);
|
|
34
|
+
return request(this.config, `/${encodeURIComponent(call_id)}/answer`, {
|
|
35
|
+
method: "POST",
|
|
36
|
+
body: parsed,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
async reject(call) {
|
|
40
|
+
const call_id = call_id_from(call);
|
|
41
|
+
return request(this.config, `/${encodeURIComponent(call_id)}/reject`, {
|
|
42
|
+
method: "POST",
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async hangup(call) {
|
|
46
|
+
const call_id = call_id_from(call);
|
|
47
|
+
return request(this.config, `/${encodeURIComponent(call_id)}/hangup`, {
|
|
48
|
+
method: "POST",
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
async availability(to) {
|
|
52
|
+
return request(this.config, `/availability/${encodeURIComponent(to)}`, { method: "GET" });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RequestConfig } from "../utils/request.js";
|
|
2
|
+
import { type IntelligenceLookupParams, type IntelligenceLookupResponse } from "../schemas/intelligence.js";
|
|
3
|
+
export declare class IntelligenceResource {
|
|
4
|
+
private readonly config;
|
|
5
|
+
constructor(config: RequestConfig);
|
|
6
|
+
lookup(number: string, params?: IntelligenceLookupParams): Promise<IntelligenceLookupResponse & {
|
|
7
|
+
metadata: {
|
|
8
|
+
id: string;
|
|
9
|
+
timestamp: string;
|
|
10
|
+
api_version: string;
|
|
11
|
+
object: string;
|
|
12
|
+
};
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=intelligence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intelligence.d.ts","sourceRoot":"","sources":["../../src/resources/intelligence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAEH,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAClC,MAAM,4BAA4B,CAAC;AAepC,qBAAa,oBAAoB;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAE5C,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAE,wBAA6B;;;;;;;;CAQrE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { request } from "../utils/request.js";
|
|
2
|
+
import { intelligenceLookupSchema, } from "../schemas/intelligence.js";
|
|
3
|
+
function lookup_query(params) {
|
|
4
|
+
const imessage = params.imessage === true || params.contiguity_risk_scoring_beta === true;
|
|
5
|
+
const facetime = params.facetime === true || params.contiguity_risk_scoring_beta === true;
|
|
6
|
+
const risk = params.contiguity_risk_scoring_beta === true;
|
|
7
|
+
const parts = [
|
|
8
|
+
...(imessage ? ["imessage=true"] : []),
|
|
9
|
+
...(facetime ? ["facetime=true"] : []),
|
|
10
|
+
...(risk ? ["contiguity_risk_scoring_beta=true"] : []),
|
|
11
|
+
];
|
|
12
|
+
if (parts.length === 0)
|
|
13
|
+
return "";
|
|
14
|
+
return `?${parts.join("&")}`;
|
|
15
|
+
}
|
|
16
|
+
export class IntelligenceResource {
|
|
17
|
+
config;
|
|
18
|
+
constructor(config) {
|
|
19
|
+
this.config = config;
|
|
20
|
+
}
|
|
21
|
+
async lookup(number, params = {}) {
|
|
22
|
+
const parsed = intelligenceLookupSchema.parse(params);
|
|
23
|
+
return request(this.config, `/${encodeURIComponent(number)}${lookup_query(parsed)}`, { method: "GET" });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const facetimeDialSchema: z.ZodObject<{
|
|
3
|
+
to: z.ZodString;
|
|
4
|
+
from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
|
+
caller_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
}, z.core.$loose>;
|
|
7
|
+
export declare const facetimeAnswerSchema: z.ZodObject<{
|
|
8
|
+
caller_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
}, z.core.$loose>;
|
|
10
|
+
export type FacetimeDialParams = z.infer<typeof facetimeDialSchema>;
|
|
11
|
+
export type FacetimeAnswerParams = z.infer<typeof facetimeAnswerSchema>;
|
|
12
|
+
export type FacetimeCallDirection = "inbound" | "outbound";
|
|
13
|
+
export type FacetimeCallStatus = "queued" | "ringing" | "in_progress" | "completed" | "failed";
|
|
14
|
+
export interface FacetimeWebRTC {
|
|
15
|
+
url: string;
|
|
16
|
+
room: string;
|
|
17
|
+
token: string;
|
|
18
|
+
join: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface FacetimeCall {
|
|
21
|
+
call_id: string;
|
|
22
|
+
ft_audio_line: string;
|
|
23
|
+
to: string;
|
|
24
|
+
from: string;
|
|
25
|
+
caller_id: string | null;
|
|
26
|
+
direction: FacetimeCallDirection;
|
|
27
|
+
status: FacetimeCallStatus;
|
|
28
|
+
cause: string | null;
|
|
29
|
+
link: string | null;
|
|
30
|
+
webrtc: FacetimeWebRTC | null;
|
|
31
|
+
participants: string[];
|
|
32
|
+
created_at: string;
|
|
33
|
+
answered_at: string | null;
|
|
34
|
+
ended_at: string | null;
|
|
35
|
+
duration: number | null;
|
|
36
|
+
}
|
|
37
|
+
export interface FacetimeAvailableResponse {
|
|
38
|
+
available: boolean;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=facetime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facetime.d.ts","sourceRoot":"","sources":["../../src/schemas/facetime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;iBAMnB,CAAC;AAEb,eAAO,MAAM,oBAAoB;;iBAIrB,CAAC;AAEb,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACpE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,UAAU,CAAC;AAC3D,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE/F,MAAM,WAAW,cAAc;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,qBAAqB,CAAC;IACjC,MAAM,EAAE,kBAAkB,CAAC;IAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,WAAW,yBAAyB;IACtC,SAAS,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const facetimeDialSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
to: z.string(),
|
|
5
|
+
from: z.string().nullable().optional(),
|
|
6
|
+
caller_id: z.string().nullable().optional(),
|
|
7
|
+
})
|
|
8
|
+
.loose();
|
|
9
|
+
export const facetimeAnswerSchema = z
|
|
10
|
+
.object({
|
|
11
|
+
caller_id: z.string().nullable().optional(),
|
|
12
|
+
})
|
|
13
|
+
.loose();
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const intelligenceLookupSchema: z.ZodObject<{
|
|
3
|
+
imessage: z.ZodOptional<z.ZodBoolean>;
|
|
4
|
+
facetime: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
contiguity_risk_scoring_beta: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
}, z.core.$loose>;
|
|
7
|
+
export type IntelligenceLookupParams = z.infer<typeof intelligenceLookupSchema>;
|
|
8
|
+
export type IntelligenceRiskLevel = "low" | "medium" | "high" | "very_high";
|
|
9
|
+
export interface IntelligenceCarrier {
|
|
10
|
+
name: string | null;
|
|
11
|
+
type: string | null;
|
|
12
|
+
mcc: string | null;
|
|
13
|
+
mnc: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface IntelligencePorted {
|
|
16
|
+
ported: boolean;
|
|
17
|
+
date: string | null;
|
|
18
|
+
original_carrier: string | null;
|
|
19
|
+
current_carrier: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface IntelligenceRiskScore {
|
|
22
|
+
score: number;
|
|
23
|
+
level: IntelligenceRiskLevel;
|
|
24
|
+
confidence: number;
|
|
25
|
+
}
|
|
26
|
+
export interface IntelligenceLookupResponse {
|
|
27
|
+
number: string | null;
|
|
28
|
+
formatted: string | null;
|
|
29
|
+
country: string | null;
|
|
30
|
+
caller_name: string | null;
|
|
31
|
+
line_type: string | null;
|
|
32
|
+
city: string | null;
|
|
33
|
+
region: string | null;
|
|
34
|
+
carrier: IntelligenceCarrier | null;
|
|
35
|
+
ported: IntelligencePorted | null;
|
|
36
|
+
imessage: boolean | null;
|
|
37
|
+
facetime: boolean | null;
|
|
38
|
+
contiguity_risk_scoring_beta: IntelligenceRiskScore | null;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=intelligence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intelligence.d.ts","sourceRoot":"","sources":["../../src/schemas/intelligence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB;;;;iBAMzB,CAAC;AAEb,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAChC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,qBAAqB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,qBAAqB,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,0BAA0B;IACvC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACpC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAClC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,4BAA4B,EAAE,qBAAqB,GAAG,IAAI,CAAC;CAC9D"}
|
package/dist/types/webhooks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Webhook event types (v2 format) */
|
|
2
|
-
export type WebhookEventType = "text.incoming.sms" | "text.incoming.mms" | "text.delivery.confirmed" | "text.delivery.failed" | "text.cancelled" | "imessage.incoming" | "imessage.cancelled" | "whatsapp.cancelled" | "numbers.substitution" | "otp.reverse.verified" | "email.incoming" | "identity.verification_session.started" | "identity.verification_session.processing" | "identity.verification_session.verified" | "identity.verification_session.failed" | "identity.verification_session.requires_input" | "identity.verification_session.manually_approved" | "identity.verification_session.manually_denied" | "identity.verification_report.generated";
|
|
2
|
+
export type WebhookEventType = "text.incoming.sms" | "text.incoming.mms" | "text.delivery.confirmed" | "text.delivery.failed" | "text.cancelled" | "imessage.incoming" | "imessage.cancelled" | "whatsapp.cancelled" | "numbers.substitution" | "otp.reverse.verified" | "email.incoming" | "identity.verification_session.started" | "identity.verification_session.processing" | "identity.verification_session.verified" | "identity.verification_session.failed" | "identity.verification_session.requires_input" | "identity.verification_session.manually_approved" | "identity.verification_session.manually_denied" | "identity.verification_report.generated" | "facetime.call.initiated" | "facetime.call.ringing" | "facetime.call.answered" | "facetime.call.rejected" | "facetime.call.failed" | "facetime.call.ended";
|
|
3
3
|
export interface WebhookEventBase {
|
|
4
4
|
id: string;
|
|
5
5
|
type: WebhookEventType;
|
|
@@ -56,4 +56,6 @@ export interface IncomingMessageData {
|
|
|
56
56
|
from: string;
|
|
57
57
|
[key: string]: unknown;
|
|
58
58
|
}
|
|
59
|
+
/** facetime.call.* — same call object as GET /facetime/{call_id} */
|
|
60
|
+
export type { FacetimeCall as FacetimeCallData } from "../schemas/facetime.js";
|
|
59
61
|
//# sourceMappingURL=webhooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/types/webhooks.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,MAAM,MAAM,gBAAgB,GACtB,mBAAmB,GACnB,mBAAmB,GACnB,yBAAyB,GACzB,sBAAsB,GACtB,gBAAgB,GAChB,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,GACpB,sBAAsB,GACtB,sBAAsB,GACtB,gBAAgB,GAChB,uCAAuC,GACvC,0CAA0C,GAC1C,wCAAwC,GACxC,sCAAsC,GACtC,8CAA8C,GAC9C,iDAAiD,GACjD,+CAA+C,GAC/C,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/types/webhooks.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,MAAM,MAAM,gBAAgB,GACtB,mBAAmB,GACnB,mBAAmB,GACnB,yBAAyB,GACzB,sBAAsB,GACtB,gBAAgB,GAChB,mBAAmB,GACnB,oBAAoB,GACpB,oBAAoB,GACpB,sBAAsB,GACtB,sBAAsB,GACtB,gBAAgB,GAChB,uCAAuC,GACvC,0CAA0C,GAC1C,wCAAwC,GACxC,sCAAsC,GACtC,8CAA8C,GAC9C,iDAAiD,GACjD,+CAA+C,GAC/C,wCAAwC,GACxC,yBAAyB,GACzB,uBAAuB,GACvB,wBAAwB,GACxB,wBAAwB,GACxB,sBAAsB,GACtB,qBAAqB,CAAC;AAE5B,MAAM,WAAW,gBAAgB;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAED,4CAA4C;AAC5C,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxE;AAED,wBAAwB;AACxB,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3E;AAED,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,2BAA2B;AAC3B,MAAM,WAAW,sBAAsB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,KAAK,GAAG,UAAU,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,gFAAgF;AAChF,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,oEAAoE;AACpE,YAAY,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/utils/request.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ declare const BASE_URLS: {
|
|
|
6
6
|
readonly conversations: "https://api.contiguity.com/conversations";
|
|
7
7
|
readonly voice: "https://api.contiguity.com/voice";
|
|
8
8
|
readonly entitlements: "https://api.contiguity.com/entitlements";
|
|
9
|
+
readonly facetime: "https://api.contiguity.com/facetime";
|
|
10
|
+
readonly intelligence: "https://api.contiguity.com/intelligence";
|
|
9
11
|
};
|
|
10
12
|
export type ApiBase = keyof typeof BASE_URLS;
|
|
11
13
|
export interface RequestConfig {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/utils/request.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/utils/request.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,SAAS;;;;;;;;;;CAUL,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,SAAS,CAAC;AAE7C,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,OAAO,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrD,MAAM,EAAE,aAAa,EACrB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IACL,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7B,GACP,OAAO,CAAC,CAAC,GAAG;IAAE,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC,CAqCnG"}
|
package/dist/utils/request.js
CHANGED
|
@@ -8,6 +8,8 @@ const BASE_URLS = {
|
|
|
8
8
|
conversations: "https://api.contiguity.com/conversations",
|
|
9
9
|
voice: "https://api.contiguity.com/voice",
|
|
10
10
|
entitlements: "https://api.contiguity.com/entitlements",
|
|
11
|
+
facetime: "https://api.contiguity.com/facetime",
|
|
12
|
+
intelligence: "https://api.contiguity.com/intelligence",
|
|
11
13
|
};
|
|
12
14
|
export async function request(config, path, options = {}) {
|
|
13
15
|
const { token, base, debug } = config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contiguity",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Contiguity JavaScript/TypeScript SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,11 +25,27 @@
|
|
|
25
25
|
},
|
|
26
26
|
"keywords": [
|
|
27
27
|
"contiguity",
|
|
28
|
+
"contiguity.com",
|
|
29
|
+
"facetime audio",
|
|
30
|
+
"sdk",
|
|
31
|
+
"typescript",
|
|
32
|
+
"javascript",
|
|
33
|
+
"otp",
|
|
34
|
+
"2fa",
|
|
35
|
+
"multi-factor authentication",
|
|
28
36
|
"sms",
|
|
29
37
|
"email",
|
|
30
|
-
"otp",
|
|
31
38
|
"imessage",
|
|
32
|
-
"whatsapp"
|
|
39
|
+
"whatsapp",
|
|
40
|
+
"facetime",
|
|
41
|
+
"messaging",
|
|
42
|
+
"verification",
|
|
43
|
+
"authentication",
|
|
44
|
+
"one time password",
|
|
45
|
+
"nodejs",
|
|
46
|
+
"api",
|
|
47
|
+
"notifications",
|
|
48
|
+
"contiguity sdk"
|
|
33
49
|
],
|
|
34
50
|
"license": "MIT",
|
|
35
51
|
"dependencies": {
|