@isnap/sdk 2.3.0 → 2.3.1-next.43615425532.1
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/CHANGELOG.md +65 -40
- package/README.md +361 -167
- package/dist/client.d.ts +37 -49
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +47 -58
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts +6 -6
- package/dist/config.js +6 -6
- package/dist/generated/openapi.d.ts +910 -91
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/sleep.d.ts +2 -2
- package/dist/internal/sleep.js +5 -5
- package/dist/internal/sleep.js.map +1 -1
- package/dist/resources/apps.d.ts +11 -18
- package/dist/resources/apps.d.ts.map +1 -1
- package/dist/resources/apps.js +11 -18
- package/dist/resources/apps.js.map +1 -1
- package/dist/resources/area-codes.d.ts +5 -6
- package/dist/resources/area-codes.d.ts.map +1 -1
- package/dist/resources/area-codes.js +5 -6
- package/dist/resources/area-codes.js.map +1 -1
- package/dist/resources/attachments.d.ts +51 -17
- package/dist/resources/attachments.d.ts.map +1 -1
- package/dist/resources/attachments.js +42 -22
- package/dist/resources/attachments.js.map +1 -1
- package/dist/resources/byod.d.ts +14 -4
- package/dist/resources/byod.d.ts.map +1 -1
- package/dist/resources/byod.js +14 -4
- package/dist/resources/byod.js.map +1 -1
- package/dist/resources/chats.d.ts +32 -22
- package/dist/resources/chats.d.ts.map +1 -1
- package/dist/resources/chats.js +31 -21
- package/dist/resources/chats.js.map +1 -1
- package/dist/resources/fleet.d.ts +23 -0
- package/dist/resources/fleet.d.ts.map +1 -0
- package/dist/resources/fleet.js +20 -0
- package/dist/resources/fleet.js.map +1 -0
- package/dist/resources/lines.d.ts +258 -268
- package/dist/resources/lines.d.ts.map +1 -1
- package/dist/resources/lines.js +251 -266
- package/dist/resources/lines.js.map +1 -1
- package/dist/resources/lookup.d.ts +10 -13
- package/dist/resources/lookup.d.ts.map +1 -1
- package/dist/resources/lookup.js +10 -13
- package/dist/resources/lookup.js.map +1 -1
- package/dist/resources/macos-sessions.d.ts +42 -36
- package/dist/resources/macos-sessions.d.ts.map +1 -1
- package/dist/resources/macos-sessions.js +24 -22
- package/dist/resources/macos-sessions.js.map +1 -1
- package/dist/resources/messages.d.ts +35 -25
- package/dist/resources/messages.d.ts.map +1 -1
- package/dist/resources/messages.js +30 -19
- package/dist/resources/messages.js.map +1 -1
- package/dist/resources/preorders.d.ts +42 -47
- package/dist/resources/preorders.d.ts.map +1 -1
- package/dist/resources/preorders.js +42 -47
- package/dist/resources/preorders.js.map +1 -1
- package/dist/resources/trial.d.ts +30 -21
- package/dist/resources/trial.d.ts.map +1 -1
- package/dist/resources/trial.js +30 -21
- package/dist/resources/trial.js.map +1 -1
- package/dist/resources/webhooks.d.ts +39 -22
- package/dist/resources/webhooks.d.ts.map +1 -1
- package/dist/resources/webhooks.js +39 -22
- package/dist/resources/webhooks.js.map +1 -1
- package/dist/retry.d.ts +9 -10
- package/dist/retry.d.ts.map +1 -1
- package/dist/retry.js +11 -12
- package/dist/retry.js.map +1 -1
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +13 -37
- package/dist/version.js.map +1 -1
- package/dist/webhooks/parse.d.ts +10 -9
- package/dist/webhooks/parse.d.ts.map +1 -1
- package/dist/webhooks/parse.js +14 -13
- package/dist/webhooks/parse.js.map +1 -1
- package/dist/webhooks/types.d.ts +75 -111
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/webhooks/types.js.map +1 -1
- package/dist/webhooks/verify.d.ts +27 -29
- package/dist/webhooks/verify.d.ts.map +1 -1
- package/dist/webhooks/verify.js +29 -35
- package/dist/webhooks/verify.js.map +1 -1
- package/examples/handle-webhook.ts +146 -0
- package/examples/paginate-messages.ts +54 -0
- package/examples/send-message.ts +37 -0
- package/examples/upload-attachment.ts +91 -0
- package/package.json +4 -8
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
/**
|
|
4
|
+
/** A chat, as `list` and `get` return it. */
|
|
5
5
|
export type Chat = components['schemas']['Chat'];
|
|
6
6
|
export type ChatTypingStart = components['schemas']['ChatTypingStart'];
|
|
7
7
|
export type ChatTypingStop = components['schemas']['ChatTypingStop'];
|
|
@@ -13,38 +13,48 @@ export type MarkReadBody = NonNullable<paths['/v1/chats/{chat_id}/read']['post']
|
|
|
13
13
|
export type ShareContactCardBody = NonNullable<paths['/v1/chats/{chat_id}/share-contact-card']['post']['requestBody']>['content']['application/json'];
|
|
14
14
|
export declare class ChatsResource extends BaseResource {
|
|
15
15
|
/**
|
|
16
|
-
* `GET /v1/chats/{chat_id}
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* out-of-scope ids resolve 404.
|
|
16
|
+
* `GET /v1/chats/{chat_id}`: one chat, by its `chat_` id. An unknown id, a
|
|
17
|
+
* chat of another account and a chat outside the lines of a line-scoped key
|
|
18
|
+
* all return `404`.
|
|
20
19
|
*/
|
|
21
20
|
get(chatId: string, opts?: RequestOptions): Promise<Chat>;
|
|
22
21
|
/**
|
|
23
|
-
* `GET /v1/chats
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* `
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* `limit` (1
|
|
30
|
-
*
|
|
31
|
-
*
|
|
22
|
+
* `GET /v1/chats`: your chats, most recent activity first, as an
|
|
23
|
+
* `AsyncIterable`. A `for await` loop receives every matching chat; the SDK
|
|
24
|
+
* fetches the next page when the current one is consumed. Filter by
|
|
25
|
+
* `line_id`, bound the last activity time with `since` and `until` (ISO 8601,
|
|
26
|
+
* inclusive), keep the chats of some health statuses with `health` (a
|
|
27
|
+
* comma-separated list, for example `'at_risk,critical'`), and set the page
|
|
28
|
+
* size with `limit` (1 to 100, default 20).
|
|
29
|
+
*
|
|
30
|
+
* On a shared line, `outbound_number` is the number that serves the contact,
|
|
31
|
+
* or `null` when none is assigned. On every other line it is `null`.
|
|
32
32
|
*/
|
|
33
33
|
list(filters?: Omit<ListChatsQuery, 'cursor'>, opts?: RequestOptions): AsyncIterable<Chat>;
|
|
34
34
|
/**
|
|
35
|
-
* `POST /v1/chats/{chat_id}/typing
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* `
|
|
35
|
+
* `POST /v1/chats/{chat_id}/typing`: ask the line's device to show the typing
|
|
36
|
+
* indicator to the chat's contact. Resolves with `chat_id`, `started_at` and
|
|
37
|
+
* `expires_at`, which is 15 seconds after `started_at`. Call it again to keep
|
|
38
|
+
* the indicator, or call `typingStop` to clear it.
|
|
39
39
|
*/
|
|
40
40
|
typingStart(chatId: string, body: TypingStartBody, opts?: RequestOptions): Promise<ChatTypingStart>;
|
|
41
|
-
/** `DELETE /v1/chats/{chat_id}/typing
|
|
41
|
+
/** `DELETE /v1/chats/{chat_id}/typing`: ask the line's device to clear the typing indicator. */
|
|
42
42
|
typingStop(chatId: string, opts?: RequestOptions): Promise<ChatTypingStop>;
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* `POST /v1/chats/{chat_id}/read`: mark every unread inbound message of the
|
|
45
|
+
* chat as read and ask the line's device to send read receipts. Resolves with
|
|
46
|
+
* `chat_id`, `read_at` and `marked_count`.
|
|
47
|
+
*/
|
|
44
48
|
markRead(chatId: string, body: MarkReadBody, opts?: RequestOptions): Promise<ChatMarkRead>;
|
|
45
49
|
/**
|
|
46
|
-
* `POST /v1/chats/{chat_id}/share-contact-card
|
|
47
|
-
* contact
|
|
50
|
+
* `POST /v1/chats/{chat_id}/share-contact-card`: send a contact card (a
|
|
51
|
+
* vCard file) to the chat's contact, as a message with one attachment.
|
|
52
|
+
*
|
|
53
|
+
* Once a call has queued the card, a repeat with the same idempotency key
|
|
54
|
+
* returns `409 idempotency_conflict` instead of the first result. The
|
|
55
|
+
* automatic retries of the SDK reuse the key: call this method with
|
|
56
|
+
* `{ maxRetries: 0 }`, and after an error read the messages of the chat's
|
|
57
|
+
* line before you send the card again.
|
|
48
58
|
*/
|
|
49
59
|
shareContactCard(chatId: string, body: ShareContactCardBody, opts?: RequestOptions): Promise<ShareContactCardResult>;
|
|
50
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chats.d.ts","sourceRoot":"","sources":["../../src/resources/chats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAGhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,
|
|
1
|
+
{"version":3,"file":"chats.d.ts","sourceRoot":"","sources":["../../src/resources/chats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAGhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,6CAA6C;AAC7C,MAAM,MAAM,IAAI,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA;AAChD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAA;AACtE,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAAA;AACpE,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAA;AAChE,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,wBAAwB,CAAC,CAAA;AAEpF,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAA;AAC1F,MAAM,MAAM,eAAe,GAAG,WAAW,CACvC,KAAK,CAAC,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAC3D,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAA;AAChC,MAAM,MAAM,YAAY,GAAG,WAAW,CACpC,KAAK,CAAC,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CACzD,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAA;AAChC,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAC5C,KAAK,CAAC,wCAAwC,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CACvE,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAA;AAEhC,qBAAa,aAAc,SAAQ,YAAY;IAC7C;;;;OAIG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IASzD;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,OAAO,GAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,aAAa,CAAC,IAAI,CAAC;IAW9F;;;;;OAKG;IACH,WAAW,CACT,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,eAAe,EACrB,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,eAAe,CAAC;IAS3B,gGAAgG;IAChG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC;IAS1E;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAS1F;;;;;;;;;OASG;IACH,gBAAgB,CACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,oBAAoB,EAC1B,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAAC,sBAAsB,CAAC;CAQnC"}
|
package/dist/resources/chats.js
CHANGED
|
@@ -2,24 +2,24 @@ import { paginate } from '../pagination.js';
|
|
|
2
2
|
import { BaseResource } from './base.js';
|
|
3
3
|
export class ChatsResource extends BaseResource {
|
|
4
4
|
/**
|
|
5
|
-
* `GET /v1/chats/{chat_id}
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* out-of-scope ids resolve 404.
|
|
5
|
+
* `GET /v1/chats/{chat_id}`: one chat, by its `chat_` id. An unknown id, a
|
|
6
|
+
* chat of another account and a chat outside the lines of a line-scoped key
|
|
7
|
+
* all return `404`.
|
|
9
8
|
*/
|
|
10
9
|
get(chatId, opts) {
|
|
11
10
|
return this.client.request('GET', `/v1/chats/${encodeURIComponent(chatId)}`, undefined, opts);
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
|
-
* `GET /v1/chats
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* `
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* `limit` (1
|
|
21
|
-
*
|
|
22
|
-
*
|
|
13
|
+
* `GET /v1/chats`: your chats, most recent activity first, as an
|
|
14
|
+
* `AsyncIterable`. A `for await` loop receives every matching chat; the SDK
|
|
15
|
+
* fetches the next page when the current one is consumed. Filter by
|
|
16
|
+
* `line_id`, bound the last activity time with `since` and `until` (ISO 8601,
|
|
17
|
+
* inclusive), keep the chats of some health statuses with `health` (a
|
|
18
|
+
* comma-separated list, for example `'at_risk,critical'`), and set the page
|
|
19
|
+
* size with `limit` (1 to 100, default 20).
|
|
20
|
+
*
|
|
21
|
+
* On a shared line, `outbound_number` is the number that serves the contact,
|
|
22
|
+
* or `null` when none is assigned. On every other line it is `null`.
|
|
23
23
|
*/
|
|
24
24
|
list(filters = {}, opts) {
|
|
25
25
|
return paginate((cursor) => this.client.request('GET', '/v1/chats', undefined, {
|
|
@@ -28,25 +28,35 @@ export class ChatsResource extends BaseResource {
|
|
|
28
28
|
}), { signal: opts?.signal });
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
|
-
* `POST /v1/chats/{chat_id}/typing
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* `
|
|
31
|
+
* `POST /v1/chats/{chat_id}/typing`: ask the line's device to show the typing
|
|
32
|
+
* indicator to the chat's contact. Resolves with `chat_id`, `started_at` and
|
|
33
|
+
* `expires_at`, which is 15 seconds after `started_at`. Call it again to keep
|
|
34
|
+
* the indicator, or call `typingStop` to clear it.
|
|
35
35
|
*/
|
|
36
36
|
typingStart(chatId, body, opts) {
|
|
37
37
|
return this.client.request('POST', `/v1/chats/${encodeURIComponent(chatId)}/typing`, body, opts);
|
|
38
38
|
}
|
|
39
|
-
/** `DELETE /v1/chats/{chat_id}/typing
|
|
39
|
+
/** `DELETE /v1/chats/{chat_id}/typing`: ask the line's device to clear the typing indicator. */
|
|
40
40
|
typingStop(chatId, opts) {
|
|
41
41
|
return this.client.request('DELETE', `/v1/chats/${encodeURIComponent(chatId)}/typing`, undefined, opts);
|
|
42
42
|
}
|
|
43
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* `POST /v1/chats/{chat_id}/read`: mark every unread inbound message of the
|
|
45
|
+
* chat as read and ask the line's device to send read receipts. Resolves with
|
|
46
|
+
* `chat_id`, `read_at` and `marked_count`.
|
|
47
|
+
*/
|
|
44
48
|
markRead(chatId, body, opts) {
|
|
45
49
|
return this.client.request('POST', `/v1/chats/${encodeURIComponent(chatId)}/read`, body, opts);
|
|
46
50
|
}
|
|
47
51
|
/**
|
|
48
|
-
* `POST /v1/chats/{chat_id}/share-contact-card
|
|
49
|
-
* contact
|
|
52
|
+
* `POST /v1/chats/{chat_id}/share-contact-card`: send a contact card (a
|
|
53
|
+
* vCard file) to the chat's contact, as a message with one attachment.
|
|
54
|
+
*
|
|
55
|
+
* Once a call has queued the card, a repeat with the same idempotency key
|
|
56
|
+
* returns `409 idempotency_conflict` instead of the first result. The
|
|
57
|
+
* automatic retries of the SDK reuse the key: call this method with
|
|
58
|
+
* `{ maxRetries: 0 }`, and after an error read the messages of the chat's
|
|
59
|
+
* line before you send the card again.
|
|
50
60
|
*/
|
|
51
61
|
shareContactCard(chatId, body, opts) {
|
|
52
62
|
return this.client.request('POST', `/v1/chats/${encodeURIComponent(chatId)}/share-contact-card`, body, opts);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chats.js","sourceRoot":"","sources":["../../src/resources/chats.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAoBxC,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C
|
|
1
|
+
{"version":3,"file":"chats.js","sourceRoot":"","sources":["../../src/resources/chats.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAoBxC,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C;;;;OAIG;IACH,GAAG,CAAC,MAAc,EAAE,IAAqB;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,KAAK,EACL,aAAa,kBAAkB,CAAC,MAAM,CAAC,EAAE,EACzC,SAAS,EACT,IAAI,CACL,CAAA;IACH,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,UAA0C,EAAE,EAAE,IAAqB;QACtE,OAAO,QAAQ,CACb,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,CAAC,MAAM,CAAC,OAAO,CAAmB,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE;YACnE,GAAG,IAAI;YACP,KAAK,EAAE,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE;SAC9B,CAAC,EACJ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,CACzB,CAAA;IACH,CAAC;IAED;;;;;OAKG;IACH,WAAW,CACT,MAAc,EACd,IAAqB,EACrB,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,MAAM,EACN,aAAa,kBAAkB,CAAC,MAAM,CAAC,SAAS,EAChD,IAAI,EACJ,IAAI,CACL,CAAA;IACH,CAAC;IAED,gGAAgG;IAChG,UAAU,CAAC,MAAc,EAAE,IAAqB;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,QAAQ,EACR,aAAa,kBAAkB,CAAC,MAAM,CAAC,SAAS,EAChD,SAAS,EACT,IAAI,CACL,CAAA;IACH,CAAC;IAED;;;;OAIG;IACH,QAAQ,CAAC,MAAc,EAAE,IAAkB,EAAE,IAAqB;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,MAAM,EACN,aAAa,kBAAkB,CAAC,MAAM,CAAC,OAAO,EAC9C,IAAI,EACJ,IAAI,CACL,CAAA;IACH,CAAC;IAED;;;;;;;;;OASG;IACH,gBAAgB,CACd,MAAc,EACd,IAA0B,EAC1B,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CACxB,MAAM,EACN,aAAa,kBAAkB,CAAC,MAAM,CAAC,qBAAqB,EAC5D,IAAI,EACJ,IAAI,CACL,CAAA;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { components } from '../generated/openapi.js';
|
|
2
|
+
import type { RequestOptions } from '../types.js';
|
|
3
|
+
import { BaseResource } from './base.js';
|
|
4
|
+
export type FleetHealthReport = components['schemas']['FleetHealthReport'];
|
|
5
|
+
export type FleetHealthLine = components['schemas']['FleetHealthLine'];
|
|
6
|
+
export type FleetHealthSummary = components['schemas']['FleetHealthSummary'];
|
|
7
|
+
export declare class FleetResource extends BaseResource {
|
|
8
|
+
/**
|
|
9
|
+
* `GET /v1/fleet/health`: the latest daily two-way rate report of the iSnap
|
|
10
|
+
* fleet (`two-way-rate/1`). The operation needs no credential.
|
|
11
|
+
*
|
|
12
|
+
* The report holds figures for the whole rated fleet (`summary`) and one
|
|
13
|
+
* anonymous row per rated line (`lines`). A row names no line, phone number,
|
|
14
|
+
* customer or area code, and the rows come in an order that carries nothing:
|
|
15
|
+
* do not read a line's identity or rank from its position.
|
|
16
|
+
*
|
|
17
|
+
* `as_of` is `null` and `lines` is empty until the first report is
|
|
18
|
+
* published: that is a report, not an error. The API keeps the answer for 5
|
|
19
|
+
* minutes, so read it again after 5 minutes, not sooner.
|
|
20
|
+
*/
|
|
21
|
+
health(opts?: RequestOptions): Promise<FleetHealthReport>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=fleet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleet.d.ts","sourceRoot":"","sources":["../../src/resources/fleet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAAA;AAC1E,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAA;AACtE,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAA;AAE5E,qBAAa,aAAc,SAAQ,YAAY;IAC7C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAG1D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseResource } from './base.js';
|
|
2
|
+
export class FleetResource extends BaseResource {
|
|
3
|
+
/**
|
|
4
|
+
* `GET /v1/fleet/health`: the latest daily two-way rate report of the iSnap
|
|
5
|
+
* fleet (`two-way-rate/1`). The operation needs no credential.
|
|
6
|
+
*
|
|
7
|
+
* The report holds figures for the whole rated fleet (`summary`) and one
|
|
8
|
+
* anonymous row per rated line (`lines`). A row names no line, phone number,
|
|
9
|
+
* customer or area code, and the rows come in an order that carries nothing:
|
|
10
|
+
* do not read a line's identity or rank from its position.
|
|
11
|
+
*
|
|
12
|
+
* `as_of` is `null` and `lines` is empty until the first report is
|
|
13
|
+
* published: that is a report, not an error. The API keeps the answer for 5
|
|
14
|
+
* minutes, so read it again after 5 minutes, not sooner.
|
|
15
|
+
*/
|
|
16
|
+
health(opts) {
|
|
17
|
+
return this.client.request('GET', '/v1/fleet/health', undefined, opts);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=fleet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fleet.js","sourceRoot":"","sources":["../../src/resources/fleet.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAMxC,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAqB;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAoB,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,IAAI,CAAC,CAAA;IAC3F,CAAC;CACF"}
|