@polymorfa/sdk 0.1.0-dev.20260923190848 → 0.1.0-dev.20260923202417
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 +35 -11
- package/dist/calls/diagnostics.d.ts +1 -1
- package/dist/calls/diagnostics.js +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +8 -3
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/messaging/chats.d.ts +5 -2
- package/dist/messaging/chats.d.ts.map +1 -1
- package/dist/messaging/chats.js +1 -0
- package/dist/messaging/chats.js.map +1 -1
- package/dist/messaging/client.d.ts +2 -0
- package/dist/messaging/client.d.ts.map +1 -1
- package/dist/messaging/client.js +4 -1
- package/dist/messaging/client.js.map +1 -1
- package/dist/messaging/history.d.ts +4 -2
- package/dist/messaging/history.d.ts.map +1 -1
- package/dist/messaging/hybrid-link.d.ts +52 -0
- package/dist/messaging/hybrid-link.d.ts.map +1 -0
- package/dist/messaging/hybrid-link.js +55 -0
- package/dist/messaging/hybrid-link.js.map +1 -0
- package/dist/messaging/hybrid-routing.d.ts +4 -0
- package/dist/messaging/hybrid-routing.d.ts.map +1 -0
- package/dist/messaging/hybrid-routing.js +5 -0
- package/dist/messaging/hybrid-routing.js.map +1 -0
- package/dist/messaging/messages.d.ts +6 -2
- package/dist/messaging/messages.d.ts.map +1 -1
- package/dist/messaging/messages.js +14 -1
- package/dist/messaging/messages.js.map +1 -1
- package/dist/messaging/quicklinks.d.ts +51 -1
- package/dist/messaging/quicklinks.d.ts.map +1 -1
- package/dist/messaging/quicklinks.js +10 -0
- package/dist/messaging/quicklinks.js.map +1 -1
- package/dist/messaging/types.d.ts +39 -3
- package/dist/messaging/types.d.ts.map +1 -1
- package/dist/messaging/types.js.map +1 -1
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +10 -1
- package/dist/node.js.map +1 -1
- package/dist/platform/developer-resources.d.ts +7 -2
- package/dist/platform/developer-resources.d.ts.map +1 -1
- package/dist/platform/developer-resources.js +49 -29
- package/dist/platform/developer-resources.js.map +1 -1
- package/dist/platform/developer-types.d.ts +9 -0
- package/dist/platform/developer-types.d.ts.map +1 -1
- package/dist/platform/indexed-event-page.d.ts +27 -0
- package/dist/platform/indexed-event-page.d.ts.map +1 -0
- package/dist/platform/indexed-event-page.js +31 -0
- package/dist/platform/indexed-event-page.js.map +1 -0
- package/dist/platform/sessions.d.ts +5 -1
- package/dist/platform/sessions.d.ts.map +1 -1
- package/dist/platform/sessions.js +5 -1
- package/dist/platform/sessions.js.map +1 -1
- package/dist/transport/http.d.ts.map +1 -1
- package/dist/transport/http.js +71 -6
- package/dist/transport/http.js.map +1 -1
- package/dist/transport/types.d.ts +2 -1
- package/dist/transport/types.d.ts.map +1 -1
- package/dist/version.d.ts +2 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +2 -1
- package/dist/version.js.map +1 -1
- package/dist/webhooks/events.d.ts +32 -26
- package/dist/webhooks/events.d.ts.map +1 -1
- package/dist/webhooks/events.js.map +1 -1
- package/dist/webhooks/index.d.ts +1 -1
- package/dist/webhooks/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hybrid-link.d.ts","sourceRoot":"","sources":["../../src/messaging/hybrid-link.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEpE,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC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M,EAAE,OAAO,CAAC;CAC1B;AAED,mFAAmF;AACnF,qBAAa,kBAAkB;IAE3B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,cAAc;gBADd,SAAS,EAAE,aAAa,EACxB,cAAc,EAAE,mBAAmB,CAAC,MAAM,CAAC;IAE9D,SAAS,CACP,KAAK,EAAE,wBAAwB,EAC/B,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAS7D,SAAS,CACP,KAAK,EAAE,wBAAwB,EAC/B,IAAI,EAAE,6BAA6B,EACnC,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAU7D,KAAK,CACH,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAAC;IAQzD,SAAS,CACP,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,0BAA0B,EAChC,OAAO,GAAE,cAAmB,GAC3B,OAAO,CACR,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,CAC3E;IASD,OAAO,CAAC,IAAI;IAGZ,OAAO,CAAC,sBAAsB;CAO/B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { PolymorfaConfigurationError } from "../errors.js";
|
|
2
|
+
import { HttpTransport } from "../transport/http.js";
|
|
3
|
+
/** Private-preview authority is enforced by the API, including policy ancestry. */
|
|
4
|
+
export class HybridLinkResource {
|
|
5
|
+
transport;
|
|
6
|
+
credentialType;
|
|
7
|
+
constructor(transport, credentialType) {
|
|
8
|
+
this.transport = transport;
|
|
9
|
+
this.credentialType = credentialType;
|
|
10
|
+
}
|
|
11
|
+
getPolicy(scope, options = {}) {
|
|
12
|
+
this.assertServerCredential();
|
|
13
|
+
return this.transport.request({
|
|
14
|
+
method: "GET",
|
|
15
|
+
path: "/messaging/routing/hybrid",
|
|
16
|
+
query: { ...scope },
|
|
17
|
+
...options,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
setPolicy(scope, body, options = {}) {
|
|
21
|
+
this.assertServerCredential();
|
|
22
|
+
return this.transport.request({
|
|
23
|
+
method: "PUT",
|
|
24
|
+
path: "/messaging/routing/hybrid",
|
|
25
|
+
query: { ...scope },
|
|
26
|
+
body,
|
|
27
|
+
...options,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
state(session, options = {}) {
|
|
31
|
+
this.assertServerCredential();
|
|
32
|
+
return this.transport.request({
|
|
33
|
+
method: "GET",
|
|
34
|
+
path: this.path(session),
|
|
35
|
+
...options,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
setPaused(session, body, options = {}) {
|
|
39
|
+
this.assertServerCredential();
|
|
40
|
+
return this.transport.request({
|
|
41
|
+
method: "PUT",
|
|
42
|
+
path: this.path(session),
|
|
43
|
+
body,
|
|
44
|
+
...options,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
path(session) {
|
|
48
|
+
return `/messaging/${encodeURIComponent(session)}/hybrid-link`;
|
|
49
|
+
}
|
|
50
|
+
assertServerCredential() {
|
|
51
|
+
if (this.credentialType === "clientToken")
|
|
52
|
+
throw new PolymorfaConfigurationError("Hybrid Link controls require a server credential.", "credential");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=hybrid-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hybrid-link.js","sourceRoot":"","sources":["../../src/messaging/hybrid-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAsCrD,mFAAmF;AACnF,MAAM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AC;IACO,IAAI,CAAC,OAAe;QAC1B,OAAO,cAAc,kBAAkB,CAAC,OAAO,CAAC,cAAc,CAAC;IACjE,CAAC;IACO,sBAAsB;QAC5B,IAAI,IAAI,CAAC,cAAc,KAAK,aAAa;YACvC,MAAM,IAAI,2BAA2B,CACnC,mDAAmD,EACnD,YAAY,CACb,CAAC;IACN,CAAC;CACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { MessageTransport } from "./types.js";
|
|
2
|
+
/** Set the Graph-compatible route choice on a raw request. */
|
|
3
|
+
export declare function graphTransportHeaders(transport: MessageTransport): Readonly<Record<"X-Polymorfa-Transport", MessageTransport>>;
|
|
4
|
+
//# sourceMappingURL=hybrid-routing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hybrid-routing.d.ts","sourceRoot":"","sources":["../../src/messaging/hybrid-routing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,8DAA8D;AAC9D,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,gBAAgB,GAC1B,QAAQ,CAAC,MAAM,CAAC,uBAAuB,EAAE,gBAAgB,CAAC,CAAC,CAE7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hybrid-routing.js","sourceRoot":"","sources":["../../src/messaging/hybrid-routing.ts"],"names":[],"mappings":"AAEA,8DAA8D;AAC9D,MAAM,UAAU,qBAAqB,CACnC,SAA2B;IAE3B,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,CAAC;AAChD,CAAC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import type { MessagingCredential } from "../credentials.js";
|
|
1
2
|
import { HttpTransport } from "../transport/http.js";
|
|
2
3
|
import type { ApiResponse, RequestOptions } from "../transport/types.js";
|
|
3
|
-
import type { ReactRequest, SeenRequest, SendMessageRequest, SendMessageResponse, SendReactionResponse, StarMessageResponse, StarRequest, SuccessEnvelope, TypingRequest } from "./types.js";
|
|
4
|
+
import type { ReactRequest, MessageOperationResponse, SeenRequest, SendMessageRequest, SendMessageResponse, SendReactionResponse, StarMessageResponse, StarRequest, SuccessEnvelope, TypingRequest } from "./types.js";
|
|
4
5
|
export declare class MessagesResource {
|
|
5
6
|
private readonly transport;
|
|
6
|
-
|
|
7
|
+
private readonly credentialType;
|
|
8
|
+
constructor(transport: HttpTransport, credentialType: MessagingCredential["type"]);
|
|
9
|
+
/** Read the issuing principal's durable attempt. This method never resends. */
|
|
10
|
+
operationStatus(session: string, operationId: string, options?: RequestOptions): Promise<ApiResponse<MessageOperationResponse>>;
|
|
7
11
|
send(session: string, body: SendMessageRequest, options?: RequestOptions): Promise<ApiResponse<SendMessageResponse>>;
|
|
8
12
|
markSeen(session: string, body: SeenRequest, options?: RequestOptions): Promise<ApiResponse<SuccessEnvelope<{
|
|
9
13
|
readonly status: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/messaging/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,qBAAa,gBAAgB;
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/messaging/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CA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,cAAmB,GAC3B,OAAO,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;IAI5C,OAAO,CAAC,IAAI;CAab"}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
+
import { PolymorfaConfigurationError } from "../errors.js";
|
|
1
2
|
import { HttpTransport } from "../transport/http.js";
|
|
2
3
|
import { withIdempotencyKey } from "../transport/idempotency.js";
|
|
3
4
|
export class MessagesResource {
|
|
4
5
|
transport;
|
|
5
|
-
|
|
6
|
+
credentialType;
|
|
7
|
+
constructor(transport, credentialType) {
|
|
6
8
|
this.transport = transport;
|
|
9
|
+
this.credentialType = credentialType;
|
|
10
|
+
}
|
|
11
|
+
/** Read the issuing principal's durable attempt. This method never resends. */
|
|
12
|
+
operationStatus(session, operationId, options = {}) {
|
|
13
|
+
if (this.credentialType === "clientToken")
|
|
14
|
+
throw new PolymorfaConfigurationError("Message operation status requires a server credential.", "credential");
|
|
15
|
+
return this.transport.request({
|
|
16
|
+
method: "GET",
|
|
17
|
+
path: `/messaging/${encodeURIComponent(session)}/operations/${encodeURIComponent(operationId)}`,
|
|
18
|
+
...options,
|
|
19
|
+
});
|
|
7
20
|
}
|
|
8
21
|
send(session, body, options = {}) {
|
|
9
22
|
return this.post(session, "send", body, withIdempotencyKey(options));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/messaging/messages.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/messaging/messages.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAejE,MAAM,OAAO,gBAAgB;IAER;IACA;IAFnB,YACmB,SAAwB,EACxB,cAA2C;QAD3C,cAAS,GAAT,SAAS,CAAe;QACxB,mBAA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C;IACnD,CAAC;IAEO,IAAI,CACV,OAAe,EACf,MAAqD,EACrD,IAAa,EACb,OAAuB;QAEvB,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,cAAc,kBAAkB,CAAC,OAAO,CAAC,aAAa,MAAM,EAAE;YACpE,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -21,13 +21,29 @@ export interface QuickLinkConfiguration extends SessionConfigurationOverrides {
|
|
|
21
21
|
readonly requestFull?: boolean;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
export
|
|
24
|
+
export type QuickLinkPurpose = "initial" | "add_connection";
|
|
25
|
+
export type QuickLinkConnectionGoal = "single" | "hybrid";
|
|
26
|
+
export type QuickLinkConnectionKind = "linked_devices" | "official_api";
|
|
27
|
+
export type QuickLinkHybridPhase = "cloud_setup" | "linked_pairing" | "repair_linked" | "ready";
|
|
28
|
+
interface CreateQuickLinkBase {
|
|
29
|
+
readonly connectionGoal?: QuickLinkConnectionGoal;
|
|
30
|
+
readonly addConnection?: QuickLinkConnectionKind;
|
|
25
31
|
readonly projectId?: string;
|
|
26
32
|
readonly customerId?: string;
|
|
27
33
|
readonly externalId?: string;
|
|
28
34
|
readonly configuration?: QuickLinkConfiguration;
|
|
29
35
|
}
|
|
36
|
+
export type CreateQuickLinkRequest = CreateQuickLinkBase & ({
|
|
37
|
+
readonly purpose?: "initial";
|
|
38
|
+
readonly session?: string;
|
|
39
|
+
} | {
|
|
40
|
+
readonly purpose: "add_connection";
|
|
41
|
+
readonly session: string;
|
|
42
|
+
});
|
|
30
43
|
export interface QuickLink {
|
|
44
|
+
readonly purpose: QuickLinkPurpose;
|
|
45
|
+
readonly connectionGoal: QuickLinkConnectionGoal;
|
|
46
|
+
readonly addConnection?: QuickLinkConnectionKind;
|
|
31
47
|
readonly id: string;
|
|
32
48
|
readonly url: string;
|
|
33
49
|
readonly session: string;
|
|
@@ -35,6 +51,19 @@ export interface QuickLink {
|
|
|
35
51
|
}
|
|
36
52
|
export type QuickLinkStatusValue = "pending" | "opened" | "linked" | "connected" | "failed" | "cancelled";
|
|
37
53
|
export interface QuickLinkStatus {
|
|
54
|
+
readonly purpose: QuickLinkPurpose;
|
|
55
|
+
readonly connectionGoal: QuickLinkConnectionGoal;
|
|
56
|
+
readonly addConnection?: QuickLinkConnectionKind;
|
|
57
|
+
readonly hybridPhase: QuickLinkHybridPhase | null;
|
|
58
|
+
readonly onboarding?: {
|
|
59
|
+
readonly stage: string;
|
|
60
|
+
readonly connection: string | null;
|
|
61
|
+
readonly coexistence: boolean | null;
|
|
62
|
+
readonly contactsSync: string;
|
|
63
|
+
readonly historySync: string;
|
|
64
|
+
readonly historyProgress: number;
|
|
65
|
+
readonly errorCode: string | null;
|
|
66
|
+
} | null;
|
|
38
67
|
readonly id: string;
|
|
39
68
|
readonly status: QuickLinkStatusValue;
|
|
40
69
|
readonly session: string;
|
|
@@ -56,14 +85,35 @@ export interface CancelQuickLinkResponse {
|
|
|
56
85
|
readonly success: true;
|
|
57
86
|
readonly message: string;
|
|
58
87
|
}
|
|
88
|
+
export interface HybridQuickLinkAvailabilityRequest {
|
|
89
|
+
readonly projectId: string;
|
|
90
|
+
readonly session: string;
|
|
91
|
+
}
|
|
92
|
+
export interface HybridQuickLinkAvailability {
|
|
93
|
+
readonly allowed: boolean;
|
|
94
|
+
readonly addConnection: QuickLinkConnectionKind | null;
|
|
95
|
+
readonly connections: readonly {
|
|
96
|
+
readonly kind: QuickLinkConnectionKind;
|
|
97
|
+
readonly status: string;
|
|
98
|
+
readonly enabled: boolean;
|
|
99
|
+
}[];
|
|
100
|
+
readonly resumeQuickLinkId: string | null;
|
|
101
|
+
}
|
|
102
|
+
export interface HybridQuickLinkAvailabilityResponse {
|
|
103
|
+
readonly success: true;
|
|
104
|
+
readonly data: HybridQuickLinkAvailability;
|
|
105
|
+
}
|
|
59
106
|
/** Hosted QuickLink lifecycle. Client tokens are rejected before transport. */
|
|
60
107
|
export declare class QuickLinksResource {
|
|
61
108
|
private readonly transport;
|
|
62
109
|
private readonly credentialType;
|
|
63
110
|
constructor(transport: HttpTransport, credentialType: MessagingCredential["type"]);
|
|
64
111
|
create(input?: CreateQuickLinkRequest, options?: RequestOptions): Promise<ApiResponse<CreateQuickLinkResponse>>;
|
|
112
|
+
availability(input: HybridQuickLinkAvailabilityRequest, options?: RequestOptions): Promise<ApiResponse<HybridQuickLinkAvailabilityResponse>>;
|
|
65
113
|
retrieve(id: string, options?: RequestOptions): Promise<ApiResponse<GetQuickLinkResponse>>;
|
|
114
|
+
/** An initial real Number may return HTTP 202 while cleanup is pending. */
|
|
66
115
|
cancel(id: string, options?: RequestOptions): Promise<ApiResponse<CancelQuickLinkResponse>>;
|
|
67
116
|
private assertServerCredential;
|
|
68
117
|
}
|
|
118
|
+
export {};
|
|
69
119
|
//# sourceMappingURL=quicklinks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quicklinks.d.ts","sourceRoot":"","sources":["../../src/messaging/quicklinks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAEhF,OAAO,KAAK,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,MAAM,WAAW,sBAAuB,SAAQ,6BAA6B;IAC3E,QAAQ,CAAC,OAAO,CAAC,EAAE;QACjB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,4BAA4B,EAAE,oBAAoB,CAAC;QACn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
this.assertServerCredential();
|
|
22
|
+
return this.transport.request({
|
|
23
|
+
method: "GET",
|
|
24
|
+
path: "/messaging/quicklinks/availability",
|
|
25
|
+
query: { projectId: input.projectId, session: input.session },
|
|
26
|
+
...options,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
20
29
|
retrieve(id, options = {}) {
|
|
21
30
|
this.assertServerCredential();
|
|
22
31
|
return this.transport.request({
|
|
@@ -25,6 +34,7 @@ export class QuickLinksResource {
|
|
|
25
34
|
...options,
|
|
26
35
|
});
|
|
27
36
|
}
|
|
37
|
+
/** An initial real Number may return HTTP 202 while cleanup is pending. */
|
|
28
38
|
cancel(id, options = {}) {
|
|
29
39
|
this.assertServerCredential();
|
|
30
40
|
return this.transport.request({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quicklinks.js","sourceRoot":"","sources":["../../src/messaging/quicklinks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAK3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"quicklinks.js","sourceRoot":"","sources":["../../src/messaging/quicklinks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAK3D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAqHrD,+EAA+E;AAC/E,MAAM,OAAO,kBAAkB;IAEV;IACA;IAFnB,YACmB,SAAwB,EACxB,cAA2C;QAD3C,cAAS,GAAT,SAAS,CAAe;QACxB,mBAAc,GAAd,cAAc,CAA6B;IAC3D,CAAC;IAEJ,MAAM,CACJ,QAAgC,EAAE,EAClC,UAA0B,EAAE;QAE5B,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAC5B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,uBAAuB;YAC7B,IAAI,EAAE,KAA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ds = {
|
|
3
|
+
readonly linked_devices: string;
|
|
4
|
+
readonly official_api?: string;
|
|
5
|
+
} | {
|
|
6
|
+
readonly linked_devices?: string;
|
|
7
|
+
readonly official_api: string;
|
|
8
|
+
};
|
|
1
9
|
export type MessagingConnection = "linked_device" | "cloud_api";
|
|
2
10
|
export type BartenderMode = "magic" | "passthrough" | "passthrough_plus";
|
|
3
11
|
export interface CloudApiCredentials {
|
|
@@ -883,7 +891,9 @@ export interface ChannelMessage {
|
|
|
883
891
|
/** Ordering position for before/after pagination, not a message ID. */
|
|
884
892
|
readonly position: number;
|
|
885
893
|
readonly id: string;
|
|
886
|
-
readonly
|
|
894
|
+
readonly whatsapp_ids: WhatsAppMessageIds;
|
|
895
|
+
/** @deprecated Temporary singular reference for older consumers; use `whatsapp_ids`. */
|
|
896
|
+
readonly whatsapp_id?: string;
|
|
887
897
|
readonly conversation: ConversationIdentity;
|
|
888
898
|
readonly type: string;
|
|
889
899
|
readonly timestamp: string;
|
|
@@ -1104,7 +1114,16 @@ export type GetGroupJoinInfoResponse = SuccessEnvelope<GroupInviteInfo>;
|
|
|
1104
1114
|
export type GetGroupInviteCodeResponse = SuccessEnvelope<GroupInviteCode>;
|
|
1105
1115
|
export type RevokeGroupInviteCodeResponse = SuccessEnvelope<GroupInviteCode>;
|
|
1106
1116
|
export type GetGroupParticipantsResponse = SuccessEnvelope<readonly GroupParticipant[]>;
|
|
1117
|
+
/** Hybrid Link requires server-authorized availability on the Number. */
|
|
1118
|
+
export type MessageTransport = "auto" | "linked_devices" | "official_api";
|
|
1119
|
+
export type MessageRoutingReason = "explicit_transport" | "template" | "target_reference" | "only_eligible_transport" | "session_rule" | "project_rule" | "team_rule" | "default_linked_devices";
|
|
1120
|
+
export interface MessageRoutingMetadata {
|
|
1121
|
+
readonly transport?: Exclude<MessageTransport, "auto">;
|
|
1122
|
+
readonly routingReason?: MessageRoutingReason;
|
|
1123
|
+
readonly operationId?: string;
|
|
1124
|
+
}
|
|
1107
1125
|
export interface EditMessageRequest {
|
|
1126
|
+
readonly transport?: MessageTransport;
|
|
1108
1127
|
readonly text: string;
|
|
1109
1128
|
}
|
|
1110
1129
|
export type DisappearingTimerDuration = 0 | 86400 | 604800 | 7776000;
|
|
@@ -1640,6 +1659,7 @@ export type ConversationReference = Partial<ConversationIdentity> & ({
|
|
|
1640
1659
|
readonly bsuid: string;
|
|
1641
1660
|
});
|
|
1642
1661
|
export interface MessageSendContext {
|
|
1662
|
+
readonly transport?: MessageTransport;
|
|
1643
1663
|
readonly conversation: ConversationReference;
|
|
1644
1664
|
readonly isForwarded?: boolean;
|
|
1645
1665
|
readonly mentions?: readonly string[];
|
|
@@ -1765,9 +1785,24 @@ export interface SendTemplateMessageRequest extends MessageSendContext {
|
|
|
1765
1785
|
};
|
|
1766
1786
|
}
|
|
1767
1787
|
export type SendMessageRequest = SendTextMessageRequest | SendMediaMessageRequest | SendPollMessageRequest | SendLocationMessageRequest | SendContactMessageRequest | SendPhoneNumberRequest | SendProductMessageRequest | SendProductListMessageRequest | SendOrderMessageRequest | SendListMessageRequest | SendButtonsMessageRequest | SendAddressMessageRequest | SendFlowMessageRequest | SendCallPermissionRequestMessageRequest | SendTemplateMessageRequest;
|
|
1768
|
-
export interface
|
|
1788
|
+
export interface MessageOperation {
|
|
1789
|
+
readonly operationId: string;
|
|
1790
|
+
/** Pending and unknown remain fenced; rejected proves no provider attempt. */
|
|
1791
|
+
readonly status: "pending" | "unknown" | "completed" | "rejected";
|
|
1792
|
+
readonly transport?: Exclude<MessageTransport, "auto">;
|
|
1793
|
+
/** Present for a terminal rejection before the provider effect. */
|
|
1794
|
+
readonly rejectionCode?: "hybrid_authority_unavailable";
|
|
1795
|
+
readonly receipt?: {
|
|
1796
|
+
readonly whatsapp_ids: WhatsAppMessageIds;
|
|
1797
|
+
readonly timestamp: string;
|
|
1798
|
+
};
|
|
1799
|
+
}
|
|
1800
|
+
export type MessageOperationResponse = SuccessEnvelope<MessageOperation>;
|
|
1801
|
+
export interface MessageReceipt extends MessageRoutingMetadata {
|
|
1769
1802
|
readonly id: string;
|
|
1770
|
-
readonly
|
|
1803
|
+
readonly whatsapp_ids: WhatsAppMessageIds;
|
|
1804
|
+
/** @deprecated Temporary singular reference for older consumers; use `whatsapp_ids`. */
|
|
1805
|
+
readonly whatsapp_id?: string;
|
|
1771
1806
|
readonly conversation: ConversationIdentity;
|
|
1772
1807
|
readonly timestamp: string;
|
|
1773
1808
|
readonly status: string;
|
|
@@ -1791,6 +1826,7 @@ export interface TypingRequest {
|
|
|
1791
1826
|
readonly state: "typing" | "recording" | "paused";
|
|
1792
1827
|
}
|
|
1793
1828
|
export interface ReactRequest {
|
|
1829
|
+
readonly transport?: MessageTransport;
|
|
1794
1830
|
readonly conversation: ConversationReference;
|
|
1795
1831
|
readonly id: string;
|
|
1796
1832
|
readonly reaction: string;
|