@theokit/gateway-sms 0.2.0 → 0.2.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 +22 -0
- package/dist/index.d.cts +25 -2
- package/dist/index.d.ts +25 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Every credential field now says what the platform calls it and where it is issued.
|
|
8
|
+
|
|
9
|
+
Measured: a developer who wires one adapter and carries its field name to the next gets
|
|
10
|
+
`error TS2353: … 'token' does not exist in type 'SlackAdapterOptions'`. That names the wrong field
|
|
11
|
+
and the type, and never the right one — so the answer was always one file away.
|
|
12
|
+
|
|
13
|
+
These docblocks are on published option types, so an editor now shows the answer on hover and
|
|
14
|
+
completion. All 15 credential-bearing fields across the ten packages are covered, including the ones
|
|
15
|
+
beyond each adapter's primary token: Slack's `appToken`, LINE's `channelSecret`, Vonage's
|
|
16
|
+
`apiSecret` and `signatureSecret`, WhatsApp's `appSecret`.
|
|
17
|
+
|
|
18
|
+
**Nothing was renamed.** Six of the ten primary names are the platform's own key, pinned against the
|
|
19
|
+
SDK's own declaration — `channelAccessToken` in `@line/bot-sdk`, `clientSecret` in
|
|
20
|
+
`@microsoft/teams.apps`, `accessToken` in `matrix-js-sdk`, `token` in `grammy` and `discord.js`,
|
|
21
|
+
`authToken` in `twilio`. Where ours diverges, the docblock says so rather than implying otherwise:
|
|
22
|
+
`botToken` (deliberate — the adapter also takes an `appToken`), Mattermost's `accessToken` against
|
|
23
|
+
its client's `token`, and `password` against nodemailer's `pass`.
|
|
24
|
+
|
|
3
25
|
## 0.2.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/dist/index.d.cts
CHANGED
|
@@ -14,7 +14,16 @@ import { Express } from 'express';
|
|
|
14
14
|
interface TwilioOptions {
|
|
15
15
|
readonly backend: "twilio";
|
|
16
16
|
readonly accountSid: string;
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The SMS provider's auth token, used both to call the API and to verify inbound signatures.
|
|
19
|
+
*
|
|
20
|
+
* @platform-term Twilio calls this an **auth token**. The name is pinned on the verification
|
|
21
|
+
* surface — `RequestValidatorOptions.authToken` in the `twilio` package — which is the call this
|
|
22
|
+
* adapter makes. On the CLIENT surface the same SDK names it `password`, so "theirs" is true of
|
|
23
|
+
* the half we use and not of the other. Plivo names its field `authToken`; Vonage's equivalent
|
|
24
|
+
* is an API secret.
|
|
25
|
+
* @issued-at The Twilio Console dashboard, beside the Account SID.
|
|
26
|
+
*/
|
|
18
27
|
readonly authToken: string;
|
|
19
28
|
/** Bot's own E.164 number (used as `from` in outbound). */
|
|
20
29
|
readonly fromNumber: string;
|
|
@@ -37,8 +46,22 @@ interface PlivoOptions {
|
|
|
37
46
|
interface VonageOptions {
|
|
38
47
|
readonly backend: "vonage";
|
|
39
48
|
readonly apiKey: string;
|
|
49
|
+
/**
|
|
50
|
+
* The Vonage API secret for this SMS account.
|
|
51
|
+
*
|
|
52
|
+
* @platform-term Vonage calls this an **API secret**, and `@vonage/auth` names the field
|
|
53
|
+
* `apiSecret`, so the name here is theirs.
|
|
54
|
+
* @issued-at The Vonage API Dashboard, beside the API key.
|
|
55
|
+
*/
|
|
40
56
|
readonly apiSecret: string;
|
|
41
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* The Vonage signature secret, used to verify inbound SMS webhooks.
|
|
59
|
+
*
|
|
60
|
+
* @platform-term Vonage calls this a **signature secret** — a different object from the API
|
|
61
|
+
* secret above, and issued separately.
|
|
62
|
+
* @issued-at The Vonage API Dashboard, under Settings → Inbound messages, once signed webhooks
|
|
63
|
+
* are enabled.
|
|
64
|
+
*/
|
|
42
65
|
readonly signatureSecret: string;
|
|
43
66
|
readonly fromNumber: string;
|
|
44
67
|
readonly publicUrl: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,16 @@ import { Express } from 'express';
|
|
|
14
14
|
interface TwilioOptions {
|
|
15
15
|
readonly backend: "twilio";
|
|
16
16
|
readonly accountSid: string;
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The SMS provider's auth token, used both to call the API and to verify inbound signatures.
|
|
19
|
+
*
|
|
20
|
+
* @platform-term Twilio calls this an **auth token**. The name is pinned on the verification
|
|
21
|
+
* surface — `RequestValidatorOptions.authToken` in the `twilio` package — which is the call this
|
|
22
|
+
* adapter makes. On the CLIENT surface the same SDK names it `password`, so "theirs" is true of
|
|
23
|
+
* the half we use and not of the other. Plivo names its field `authToken`; Vonage's equivalent
|
|
24
|
+
* is an API secret.
|
|
25
|
+
* @issued-at The Twilio Console dashboard, beside the Account SID.
|
|
26
|
+
*/
|
|
18
27
|
readonly authToken: string;
|
|
19
28
|
/** Bot's own E.164 number (used as `from` in outbound). */
|
|
20
29
|
readonly fromNumber: string;
|
|
@@ -37,8 +46,22 @@ interface PlivoOptions {
|
|
|
37
46
|
interface VonageOptions {
|
|
38
47
|
readonly backend: "vonage";
|
|
39
48
|
readonly apiKey: string;
|
|
49
|
+
/**
|
|
50
|
+
* The Vonage API secret for this SMS account.
|
|
51
|
+
*
|
|
52
|
+
* @platform-term Vonage calls this an **API secret**, and `@vonage/auth` names the field
|
|
53
|
+
* `apiSecret`, so the name here is theirs.
|
|
54
|
+
* @issued-at The Vonage API Dashboard, beside the API key.
|
|
55
|
+
*/
|
|
40
56
|
readonly apiSecret: string;
|
|
41
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* The Vonage signature secret, used to verify inbound SMS webhooks.
|
|
59
|
+
*
|
|
60
|
+
* @platform-term Vonage calls this a **signature secret** — a different object from the API
|
|
61
|
+
* secret above, and issued separately.
|
|
62
|
+
* @issued-at The Vonage API Dashboard, under Settings → Inbound messages, once signed webhooks
|
|
63
|
+
* are enabled.
|
|
64
|
+
*/
|
|
42
65
|
readonly signatureSecret: string;
|
|
43
66
|
readonly fromNumber: string;
|
|
44
67
|
readonly publicUrl: string;
|
package/package.json
CHANGED