terse-sdk 0.3.7 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terse-sdk",
3
- "version": "0.3.7",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "repository": {
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "ms": "2.1.3",
33
- "terse-types": "0.1.7"
33
+ "terse-types": "0.4.0"
34
34
  },
35
35
  "scripts": {
36
36
  "build": "tsc",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=__typetest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"__typetest.d.ts","sourceRoot":"","sources":["../src/__typetest.ts"],"names":[],"mappings":""}
@@ -1,25 +0,0 @@
1
- import { slack, waitForInput } from "./index.js";
2
- async function __typetest() {
3
- const decision = await waitForInput({
4
- via: slack({ channel: "C123" }),
5
- prompt: "Approve?",
6
- options: [
7
- { id: "approve", label: "Approve" },
8
- { id: "changes", label: "Request changes", freeText: true }
9
- ]
10
- });
11
- if (decision.kind === "response") {
12
- const choice = decision.choice;
13
- // @ts-expect-error - "nope" is not one of the option ids
14
- const bad = decision.choice;
15
- void choice;
16
- void bad;
17
- }
18
- // delivery narrows to the slack member without a kind check
19
- const ts = decision.delivery.messageTs;
20
- const ch = decision.delivery.channelId;
21
- void ts;
22
- void ch;
23
- }
24
- void __typetest;
25
- //# sourceMappingURL=__typetest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"__typetest.js","sourceRoot":"","sources":["../src/__typetest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEhD,KAAK,UAAU,UAAU;IACrB,MAAM,QAAQ,GAAG,MAAM,YAAY,CAAC;QAChC,GAAG,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QAC/B,MAAM,EAAE,UAAU;QAClB,OAAO,EAAE;YACL,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;YACnC,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE;SAC9D;KACJ,CAAC,CAAA;IAEF,IAAI,QAAQ,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,MAAM,MAAM,GAA0B,QAAQ,CAAC,MAAM,CAAA;QACrD,yDAAyD;QACzD,MAAM,GAAG,GAAW,QAAQ,CAAC,MAAM,CAAA;QACnC,KAAK,MAAM,CAAA;QACX,KAAK,GAAG,CAAA;IACZ,CAAC;IAED,4DAA4D;IAC5D,MAAM,EAAE,GAAW,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAA;IAC9C,MAAM,EAAE,GAAW,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAA;IAC9C,KAAK,EAAE,CAAA;IACP,KAAK,EAAE,CAAA;AACX,CAAC;AAED,KAAK,UAAU,CAAA"}