@isnap/sdk 0.0.0-next.3 → 1.1.0-next.38
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/client.d.ts +9 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +42 -0
- package/dist/client.js.map +1 -1
- package/dist/generated/openapi.d.ts +3203 -242
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/resources/lookup.d.ts +4 -4
- package/dist/resources/lookup.js +4 -4
- package/dist/resources/messages.d.ts +19 -15
- package/dist/resources/messages.d.ts.map +1 -1
- package/dist/resources/messages.js +18 -6
- package/dist/resources/messages.js.map +1 -1
- package/dist/version.d.ts +2 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +19 -3
- package/dist/version.js.map +1 -1
- package/dist/webhooks/types.d.ts +21 -8
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/webhooks/types.js +5 -2
- package/dist/webhooks/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { ISnapClient } from './client.js';
|
|
2
2
|
export type { ClientConfig } from './config.js';
|
|
3
|
+
export { SDK_VERSION, MIN_API_VERSION } from './version.js';
|
|
3
4
|
export { APIConnectionError, APIError, AuthenticationError, BadRequestError, ConflictError, GoneError, InternalServerError, NotFoundError, PaymentRequiredError, PermissionDeniedError, QuotaExceededError, RateLimitError, ServiceUnavailableError, UnprocessableEntityError, WebhookSignatureError } from './errors.js';
|
|
4
5
|
export type { APIErrorMeta } from './errors.js';
|
|
5
6
|
export type { ErrorEnvelope, ErrorIssue, HttpMethod, RequestOptions } from './types.js';
|
|
@@ -15,7 +16,7 @@ export { WebhooksResource } from './resources/webhooks.js';
|
|
|
15
16
|
export type { ChatMarkRead, ChatTypingStart, ChatTypingStop, MarkReadBody, ShareContactCardBody, ShareContactCardResult, TypingStartBody } from './resources/chats.js';
|
|
16
17
|
export type { AssignLineBody, Line, LineConfigPatch, LineConfigResponseData, LineHealth, LineList, ListLinesQuery, ListQueueQuery, MyLines, PatchLineBody, QueueResponseData, QuotaSnapshot, TransferOwnershipBody } from './resources/lines.js';
|
|
17
18
|
export type { LookupRequest, LookupResult } from './resources/lookup.js';
|
|
18
|
-
export type {
|
|
19
|
+
export type { ListMessagesQuery, Message, Reaction, ReactionRemoval, SendMessageBody, SendReactionBody } from './resources/messages.js';
|
|
19
20
|
export type { Attachment, CreateAttachmentBody, CreateAttachmentResponse, UploadInput, UploadMetadata, UploadOptions } from './resources/attachments.js';
|
|
20
21
|
export type { ByodPairBody, ByodPairResponse } from './resources/byod.js';
|
|
21
22
|
export type { TrialActivityData, TrialInitBody, TrialInitData, TrialStatusData } from './resources/trial.js';
|
|
@@ -23,6 +24,6 @@ export type { CreateWebhookBody, ListDeliveriesQuery, ListEventsQuery, UpdateWeb
|
|
|
23
24
|
export { parseWebhookEvent } from './webhooks/parse.js';
|
|
24
25
|
export { verifyWebhook } from './webhooks/verify.js';
|
|
25
26
|
export type { VerifyWebhookOptions } from './webhooks/verify.js';
|
|
26
|
-
export { isLineEvent, isMessageEvent, isReactionEvent, isTrialEvent,
|
|
27
|
-
export type { LineEvent, LineEventType, MessageEvent, MessageEventType, ReactionEvent, ReactionEventType, TrialEvent, TrialEventType,
|
|
27
|
+
export { isLineEvent, isMessageEvent, isPreOrderEvent, isReactionEvent, isTrialEvent, isTypingIndicatorEvent } from './webhooks/types.js';
|
|
28
|
+
export type { LineEvent, LineEventType, MessageEvent, MessageEventType, PreOrderEvent, PreOrderEventType, ReactionEvent, ReactionEventType, TrialEvent, TrialEventType, TypingIndicatorEvent, TypingIndicatorEventType, WebhookEvent, WebhookEventBase } from './webhooks/types.js';
|
|
28
29
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,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,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,wBAAwB,EACxB,YAAY,EACZ,gBAAgB,EACjB,MAAM,qBAAqB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { ISnapClient } from './client.js';
|
|
2
|
+
export { SDK_VERSION, MIN_API_VERSION } from './version.js';
|
|
2
3
|
export { APIConnectionError, APIError, AuthenticationError, BadRequestError, ConflictError, GoneError, InternalServerError, NotFoundError, PaymentRequiredError, PermissionDeniedError, QuotaExceededError, RateLimitError, ServiceUnavailableError, UnprocessableEntityError, WebhookSignatureError } from './errors.js';
|
|
3
4
|
export { AttachmentsResource } from './resources/attachments.js';
|
|
4
5
|
export { ByodResource } from './resources/byod.js';
|
|
@@ -10,5 +11,5 @@ export { TrialResource } from './resources/trial.js';
|
|
|
10
11
|
export { WebhooksResource } from './resources/webhooks.js';
|
|
11
12
|
export { parseWebhookEvent } from './webhooks/parse.js';
|
|
12
13
|
export { verifyWebhook } from './webhooks/verify.js';
|
|
13
|
-
export { isLineEvent, isMessageEvent, isReactionEvent, isTrialEvent,
|
|
14
|
+
export { isLineEvent, isMessageEvent, isPreOrderEvent, isReactionEvent, isTrialEvent, isTypingIndicatorEvent } from './webhooks/types.js';
|
|
14
15
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC,OAAO,EACL,kBAAkB,EAClB,QAAQ,EACR,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACtB,MA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,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAgE1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,OAAO,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,eAAe,EACf,YAAY,EACZ,sBAAsB,EACvB,MAAM,qBAAqB,CAAA"}
|
|
@@ -5,10 +5,10 @@ export type LookupRequest = components['schemas']['LookupRequest'];
|
|
|
5
5
|
export type LookupResult = components['schemas']['Lookup'];
|
|
6
6
|
export declare class LookupResource extends BaseResource {
|
|
7
7
|
/**
|
|
8
|
-
* `POST /v1/lookup` — check whether a handle is reachable on iMessage
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* `POST /v1/lookup` — check whether a handle is reachable on iMessage.
|
|
9
|
+
* Synchronous: returns `imessage: true | false | null`. `null` means
|
|
10
|
+
* the iMessage status is unknown and the handle should be treated as
|
|
11
|
+
* SMS-safe (degrade to SMS instead of relying on iMessage delivery).
|
|
12
12
|
*/
|
|
13
13
|
check(params: LookupRequest, opts?: RequestOptions): Promise<LookupResult>;
|
|
14
14
|
}
|
package/dist/resources/lookup.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BaseResource } from './base.js';
|
|
2
2
|
export class LookupResource extends BaseResource {
|
|
3
3
|
/**
|
|
4
|
-
* `POST /v1/lookup` — check whether a handle is reachable on iMessage
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* `POST /v1/lookup` — check whether a handle is reachable on iMessage.
|
|
5
|
+
* Synchronous: returns `imessage: true | false | null`. `null` means
|
|
6
|
+
* the iMessage status is unknown and the handle should be treated as
|
|
7
|
+
* SMS-safe (degrade to SMS instead of relying on iMessage delivery).
|
|
8
8
|
*/
|
|
9
9
|
check(params, opts) {
|
|
10
10
|
return this.client.request('POST', '/v1/lookup', params, opts);
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import type { components, paths } from '../generated/openapi.js';
|
|
2
2
|
import type { RequestOptions } from '../types.js';
|
|
3
3
|
import { BaseResource } from './base.js';
|
|
4
|
-
/** Full message shape returned by send/get/cancel (contract §2.2 fat shape). */
|
|
4
|
+
/** Full message shape returned by send/get/list/cancel (contract §2.2 fat shape). */
|
|
5
5
|
export type Message = components['schemas']['MessageV1'];
|
|
6
|
-
/**
|
|
7
|
-
* Legacy message shape returned by `GET /v1/messages` cursor list. Differs
|
|
8
|
-
* from the fat shape on field names (`from_number`/`to_number` vs `from`/`to`)
|
|
9
|
-
* and missing fields (`effect`, `reply_to_message_id`, `queue_info`, etc.).
|
|
10
|
-
* Backend follow-up will harmonize the list shape with `MessageV1`.
|
|
11
|
-
*/
|
|
12
|
-
export type ListedMessage = components['schemas']['Message'];
|
|
13
6
|
export type SendMessageBody = NonNullable<paths['/v1/messages']['post']['requestBody']>['content']['application/json'];
|
|
14
7
|
export type ListMessagesQuery = NonNullable<paths['/v1/messages']['get']['parameters']['query']>;
|
|
15
8
|
export type SendReactionBody = components['schemas']['SendReactionRequest'];
|
|
16
9
|
export type Reaction = components['schemas']['Reaction'];
|
|
10
|
+
export type ReactionRemoval = components['schemas']['ReactionRemoval'];
|
|
17
11
|
export declare class MessagesResource extends BaseResource {
|
|
18
12
|
/** `POST /v1/messages` — send a new outbound message (queued, returns `MessageV1`). */
|
|
19
13
|
send(body: SendMessageBody, opts?: RequestOptions): Promise<Message>;
|
|
@@ -23,16 +17,26 @@ export declare class MessagesResource extends BaseResource {
|
|
|
23
17
|
* `GET /v1/messages` — cursor-paginated list as an AsyncIterable. The
|
|
24
18
|
* iterator threads the next_cursor across pages so the consumer can
|
|
25
19
|
* `for await (const m of client.messages.list({...}))` and get every
|
|
26
|
-
* matching message.
|
|
27
|
-
* `
|
|
20
|
+
* matching message. Items use the fat `Message` shape — same fields as
|
|
21
|
+
* `send()` / `get()` (contract §2.2).
|
|
28
22
|
*/
|
|
29
|
-
list(filters?: Omit<ListMessagesQuery, 'cursor'>, opts?: RequestOptions): AsyncIterable<
|
|
23
|
+
list(filters?: Omit<ListMessagesQuery, 'cursor'>, opts?: RequestOptions): AsyncIterable<Message>;
|
|
30
24
|
/**
|
|
31
|
-
* `POST /v1/messages/{id}/reactions` — add
|
|
32
|
-
*
|
|
33
|
-
*
|
|
25
|
+
* `POST /v1/messages/{id}/reactions` — add an Apple-native tapback
|
|
26
|
+
* (love / like / dislike / laugh / emphasize / question). Replace-on-add
|
|
27
|
+
* semantics: posting a different `type` against the same parent updates
|
|
28
|
+
* the existing reaction in place. Reactions require iMessage; SMS / RCS
|
|
29
|
+
* parents are rejected with 422.
|
|
34
30
|
*/
|
|
35
|
-
|
|
31
|
+
addReaction(messageId: string, body: SendReactionBody, opts?: RequestOptions): Promise<Reaction>;
|
|
32
|
+
/**
|
|
33
|
+
* `DELETE /v1/messages/{id}/reactions` — remove the active tapback on a
|
|
34
|
+
* message. Idempotent: returns 200 with `removed: false` when there
|
|
35
|
+
* was nothing to remove (no 404), so partners can fire-and-forget. The
|
|
36
|
+
* response carries the `type` that was removed when applicable — handy
|
|
37
|
+
* for UI feedback ("removed your 'love'").
|
|
38
|
+
*/
|
|
39
|
+
removeReaction(messageId: string, opts?: RequestOptions): Promise<ReactionRemoval>;
|
|
36
40
|
/**
|
|
37
41
|
* `DELETE /v1/messages/{id}` — cancel a queued or scheduled message before
|
|
38
42
|
* it dispatches. Once `status: sent` the cancel is a 409.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/resources/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM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GAAG,OAAO,CAAC,OAAO,CAAC;IAIxD;;;;;;OAMG;IACH,IAAI,CACF,OAAO,GAAE,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAM,EAC/C,IAAI,CAAC,EAAE,cAAc,GACpB,aAAa,CAAC,OAAO,CAAC;IAWzB;;;;;;OAMG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;IAShG;;;;;;OAMG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;IASlF;;;OAGG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;CAQ5D"}
|
|
@@ -13,8 +13,8 @@ export class MessagesResource extends BaseResource {
|
|
|
13
13
|
* `GET /v1/messages` — cursor-paginated list as an AsyncIterable. The
|
|
14
14
|
* iterator threads the next_cursor across pages so the consumer can
|
|
15
15
|
* `for await (const m of client.messages.list({...}))` and get every
|
|
16
|
-
* matching message.
|
|
17
|
-
* `
|
|
16
|
+
* matching message. Items use the fat `Message` shape — same fields as
|
|
17
|
+
* `send()` / `get()` (contract §2.2).
|
|
18
18
|
*/
|
|
19
19
|
list(filters = {}, opts) {
|
|
20
20
|
return paginate((cursor) => this.client.request('GET', '/v1/messages', undefined, {
|
|
@@ -23,13 +23,25 @@ export class MessagesResource extends BaseResource {
|
|
|
23
23
|
}), { signal: opts?.signal });
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* `POST /v1/messages/{id}/reactions` — add
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* `POST /v1/messages/{id}/reactions` — add an Apple-native tapback
|
|
27
|
+
* (love / like / dislike / laugh / emphasize / question). Replace-on-add
|
|
28
|
+
* semantics: posting a different `type` against the same parent updates
|
|
29
|
+
* the existing reaction in place. Reactions require iMessage; SMS / RCS
|
|
30
|
+
* parents are rejected with 422.
|
|
29
31
|
*/
|
|
30
|
-
|
|
32
|
+
addReaction(messageId, body, opts) {
|
|
31
33
|
return this.client.request('POST', `/v1/messages/${encodeURIComponent(messageId)}/reactions`, body, opts);
|
|
32
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* `DELETE /v1/messages/{id}/reactions` — remove the active tapback on a
|
|
37
|
+
* message. Idempotent: returns 200 with `removed: false` when there
|
|
38
|
+
* was nothing to remove (no 404), so partners can fire-and-forget. The
|
|
39
|
+
* response carries the `type` that was removed when applicable — handy
|
|
40
|
+
* for UI feedback ("removed your 'love'").
|
|
41
|
+
*/
|
|
42
|
+
removeReaction(messageId, opts) {
|
|
43
|
+
return this.client.request('DELETE', `/v1/messages/${encodeURIComponent(messageId)}/reactions`, undefined, opts);
|
|
44
|
+
}
|
|
33
45
|
/**
|
|
34
46
|
* `DELETE /v1/messages/{id}` — cancel a queued or scheduled message before
|
|
35
47
|
* it dispatches. Once `status: sent` the cancel is a 409.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/messages.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAYxC,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAChD,uFAAuF;IACvF,IAAI,CAAC,IAAqB,EAAE,IAAqB;QAC/C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAU,MAAM,EAAE,cAAc,EAAE,IAAI,EA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CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,UAAU,CAAA;AAelC,eAAO,MAAM,eAAe,UAAU,CAAA"}
|
package/dist/version.js
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
|
|
1
|
+
// SDK version. Bumped INDEPENDENTLY of the API contract version per
|
|
2
|
+
// industry standard (Stripe, Twilio, OpenAI, AWS): SDK semver tracks SDK
|
|
3
|
+
// changes (new methods, retry logic, type fixes), API semver tracks the
|
|
4
|
+
// contract surface. Synced with `package.json` by the release flow.
|
|
5
|
+
export const SDK_VERSION = '1.0.0';
|
|
6
|
+
// Minimum API version the SDK considers compatible. Reference-only
|
|
7
|
+
// today: the client does NOT yet fetch `/v1/version` at first request,
|
|
8
|
+
// and there is no `IncompatibleApiVersionError` thrown on a lower
|
|
9
|
+
// backend. The runtime precheck (and the corresponding error type) is a
|
|
10
|
+
// follow-up — until it ships, this constant is documentation that
|
|
11
|
+
// downstream tooling can read but the client itself does not enforce.
|
|
12
|
+
//
|
|
13
|
+
// Bump this when the SDK starts using a feature that requires a specific
|
|
14
|
+
// backend version (e.g. a new endpoint added in API minor X.Y.0 — the
|
|
15
|
+
// SDK that wraps it sets MIN_API_VERSION to X.Y.0). Within a major
|
|
16
|
+
// version (1.x), the API stays additive (oasdiff
|
|
17
|
+
// `--deprecation-days-stable 30` enforced in CI), so a 1.0.0 SDK keeps
|
|
18
|
+
// working against any 1.x backend without raising the floor.
|
|
19
|
+
export const MIN_API_VERSION = '1.0.0';
|
|
4
20
|
//# sourceMappingURL=version.js.map
|
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,yEAAyE;AACzE,wEAAwE;AACxE,oEAAoE;AACpE,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAA;AAElC,mEAAmE;AACnE,uEAAuE;AACvE,kEAAkE;AAClE,wEAAwE;AACxE,kEAAkE;AAClE,sEAAsE;AACtE,EAAE;AACF,yEAAyE;AACzE,sEAAsE;AACtE,mEAAmE;AACnE,iDAAiD;AACjD,uEAAuE;AACvE,6DAA6D;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAA"}
|
package/dist/webhooks/types.d.ts
CHANGED
|
@@ -20,14 +20,14 @@ export interface MessageEvent extends WebhookEventBase {
|
|
|
20
20
|
message: Message;
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
export type ReactionEventType = 'reaction.added' | 'reaction.removed';
|
|
23
|
+
export type ReactionEventType = 'reaction.added' | 'reaction.received' | 'reaction.removed';
|
|
24
24
|
export interface ReactionEvent extends WebhookEventBase {
|
|
25
25
|
event_type: `reaction.${string}`;
|
|
26
26
|
data: {
|
|
27
27
|
reaction: Reaction;
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
export type LineEventType = 'line.connected' | 'line.
|
|
30
|
+
export type LineEventType = 'line.connected' | 'line.disconnected' | 'line.offline' | 'line.degraded' | 'line.apple_id_flagged' | 'line.quota_warning' | 'line.quota_exceeded';
|
|
31
31
|
/**
|
|
32
32
|
* `data` is intentionally typed as `Record<string, unknown>` until the
|
|
33
33
|
* contract pins per-event-type field shapes. Today's payloads vary by
|
|
@@ -41,22 +41,34 @@ export interface LineEvent extends WebhookEventBase {
|
|
|
41
41
|
event_type: `line.${string}`;
|
|
42
42
|
data: Record<string, unknown>;
|
|
43
43
|
}
|
|
44
|
-
export type
|
|
44
|
+
export type TypingIndicatorEventType = 'typing_indicator.started' | 'typing_indicator.stopped';
|
|
45
45
|
/**
|
|
46
46
|
* `data` is intentionally `Record<string, unknown>` — the partner-facing
|
|
47
47
|
* shape is not yet documented in the contract. See `LineEvent` for the
|
|
48
48
|
* same rationale.
|
|
49
49
|
*/
|
|
50
|
-
export interface
|
|
51
|
-
event_type: `
|
|
50
|
+
export interface TypingIndicatorEvent extends WebhookEventBase {
|
|
51
|
+
event_type: `typing_indicator.${string}`;
|
|
52
52
|
data: Record<string, unknown>;
|
|
53
53
|
}
|
|
54
|
-
export type TrialEventType = 'trial.linked' | 'trial.dormant' | 'trial.reactivated'
|
|
54
|
+
export type TrialEventType = 'trial.linked' | 'trial.dormant' | 'trial.reactivated';
|
|
55
55
|
/** See `LineEvent` for why `data` is loose. */
|
|
56
56
|
export interface TrialEvent extends WebhookEventBase {
|
|
57
57
|
event_type: `trial.${string}`;
|
|
58
58
|
data: Record<string, unknown>;
|
|
59
59
|
}
|
|
60
|
+
export type PreOrderEventType = 'pre_order.fulfilled' | 'pre_order.cancelled' | 'pre_order.refunded';
|
|
61
|
+
/**
|
|
62
|
+
* Pre-order lifecycle events fired when ops procures hardware against a
|
|
63
|
+
* customer pre-order. `pre_order.fulfilled` carries the freshly-activated
|
|
64
|
+
* `line_id` so partner dashboards can wire it without a follow-up GET.
|
|
65
|
+
* `data` is left loose for the same reason as `LineEvent` until the
|
|
66
|
+
* per-event-type shapes are pinned in the contract.
|
|
67
|
+
*/
|
|
68
|
+
export interface PreOrderEvent extends WebhookEventBase {
|
|
69
|
+
event_type: `pre_order.${string}`;
|
|
70
|
+
data: Record<string, unknown>;
|
|
71
|
+
}
|
|
60
72
|
/**
|
|
61
73
|
* Discriminated union over the typed event families plus `WebhookEventBase`
|
|
62
74
|
* as the catch-all for event types not yet known to this SDK version.
|
|
@@ -71,10 +83,11 @@ export interface TrialEvent extends WebhookEventBase {
|
|
|
71
83
|
* }
|
|
72
84
|
* ```
|
|
73
85
|
*/
|
|
74
|
-
export type WebhookEvent = MessageEvent | ReactionEvent | LineEvent |
|
|
86
|
+
export type WebhookEvent = MessageEvent | ReactionEvent | LineEvent | TypingIndicatorEvent | TrialEvent | PreOrderEvent | WebhookEventBase;
|
|
75
87
|
export declare function isMessageEvent(event: WebhookEventBase): event is MessageEvent;
|
|
76
88
|
export declare function isReactionEvent(event: WebhookEventBase): event is ReactionEvent;
|
|
77
89
|
export declare function isLineEvent(event: WebhookEventBase): event is LineEvent;
|
|
78
|
-
export declare function
|
|
90
|
+
export declare function isTypingIndicatorEvent(event: WebhookEventBase): event is TypingIndicatorEvent;
|
|
79
91
|
export declare function isTrialEvent(event: WebhookEventBase): event is TrialEvent;
|
|
92
|
+
export declare function isPreOrderEvent(event: WebhookEventBase): event is PreOrderEvent;
|
|
80
93
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/webhooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAEjE;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC9B;AAeD,MAAM,MAAM,gBAAgB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,cAAc,GACd,mBAAmB,GACnB,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,mBAAmB,CAAA;AAEvB,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IACpD,UAAU,EAAE,WAAW,MAAM,EAAE,CAAA;IAC/B,IAAI,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAA;CAC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gBAAgB,GAAG,KAAK,IAAI,UAAU,CAEzE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,gBAAgB,GAAG,KAAK,IAAI,aAAa,CAE/E"}
|
package/dist/webhooks/types.js
CHANGED
|
@@ -8,10 +8,13 @@ export function isReactionEvent(event) {
|
|
|
8
8
|
export function isLineEvent(event) {
|
|
9
9
|
return event.event_type.startsWith('line.');
|
|
10
10
|
}
|
|
11
|
-
export function
|
|
12
|
-
return event.event_type.startsWith('
|
|
11
|
+
export function isTypingIndicatorEvent(event) {
|
|
12
|
+
return event.event_type.startsWith('typing_indicator.');
|
|
13
13
|
}
|
|
14
14
|
export function isTrialEvent(event) {
|
|
15
15
|
return event.event_type.startsWith('trial.');
|
|
16
16
|
}
|
|
17
|
+
export function isPreOrderEvent(event) {
|
|
18
|
+
return event.event_type.startsWith('pre_order.');
|
|
19
|
+
}
|
|
17
20
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/webhooks/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/webhooks/types.ts"],"names":[],"mappings":"AA0JA,6EAA6E;AAE7E,MAAM,UAAU,cAAc,CAAC,KAAuB;IACpD,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;AAChD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAuB;IACrD,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA;AACjD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;AAC7C,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,KAAuB;IAEvB,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAA;AACzD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAAuB;IAClD,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;AAC9C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAuB;IACrD,OAAO,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC,CAAA;AAClD,CAAC"}
|