@distilled.cloud/slack 1.0.0-rc.12 → 1.0.0-rc.14
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 +34 -0
- package/lib/credentials.d.ts +2 -2
- package/lib/credentials.d.ts.map +1 -1
- package/lib/credentials.js +3 -3
- package/lib/credentials.js.map +1 -1
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/errors.js.map +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/pagination.d.ts.map +1 -1
- package/lib/pagination.js.map +1 -1
- package/lib/protocol.d.ts +3 -3
- package/lib/protocol.d.ts.map +1 -1
- package/lib/protocol.js +23 -22
- package/lib/protocol.js.map +1 -1
- package/lib/protocol.test.d.ts +2 -0
- package/lib/protocol.test.d.ts.map +1 -0
- package/lib/protocol.test.js +288 -0
- package/lib/protocol.test.js.map +1 -0
- package/lib/retry.d.ts +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/retry.js +1 -1
- package/lib/retry.js.map +1 -1
- package/lib/services/admin.d.ts +236 -29
- package/lib/services/admin.d.ts.map +1 -1
- package/lib/services/admin.js +417 -749
- package/lib/services/admin.js.map +1 -1
- package/lib/services/agents.d.ts +423 -0
- package/lib/services/agents.d.ts.map +1 -0
- package/lib/services/agents.js +315 -0
- package/lib/services/agents.js.map +1 -0
- package/lib/services/api.d.ts +1 -1
- package/lib/services/api.d.ts.map +1 -1
- package/lib/services/api.js +4 -6
- package/lib/services/api.js.map +1 -1
- package/lib/services/apps.d.ts +21 -3
- package/lib/services/apps.d.ts.map +1 -1
- package/lib/services/apps.js +65 -133
- package/lib/services/apps.js.map +1 -1
- package/lib/services/assistant.d.ts +4 -4
- package/lib/services/assistant.d.ts.map +1 -1
- package/lib/services/assistant.js +16 -38
- package/lib/services/assistant.js.map +1 -1
- package/lib/services/auth.d.ts +2 -2
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +11 -28
- package/lib/services/auth.js.map +1 -1
- package/lib/services/blocks.d.ts +1 -1
- package/lib/services/blocks.d.ts.map +1 -1
- package/lib/services/blocks.js +5 -9
- package/lib/services/blocks.js.map +1 -1
- package/lib/services/bookmarks.d.ts +4 -4
- package/lib/services/bookmarks.d.ts.map +1 -1
- package/lib/services/bookmarks.js +14 -30
- package/lib/services/bookmarks.js.map +1 -1
- package/lib/services/bots.d.ts +1 -1
- package/lib/services/bots.d.ts.map +1 -1
- package/lib/services/bots.js +7 -15
- package/lib/services/bots.js.map +1 -1
- package/lib/services/calls.d.ts +1 -1
- package/lib/services/calls.d.ts.map +1 -1
- package/lib/services/calls.js +13 -33
- package/lib/services/calls.js.map +1 -1
- package/lib/services/canvases.d.ts +22 -2
- package/lib/services/canvases.d.ts.map +1 -1
- package/lib/services/canvases.js +37 -48
- package/lib/services/canvases.js.map +1 -1
- package/lib/services/chat.d.ts +29 -25
- package/lib/services/chat.d.ts.map +1 -1
- package/lib/services/chat.js +47 -95
- package/lib/services/chat.js.map +1 -1
- package/lib/services/conversations.d.ts +10 -8
- package/lib/services/conversations.d.ts.map +1 -1
- package/lib/services/conversations.js +43 -115
- package/lib/services/conversations.js.map +1 -1
- package/lib/services/dialog.d.ts +1 -1
- package/lib/services/dialog.d.ts.map +1 -1
- package/lib/services/dialog.js +5 -9
- package/lib/services/dialog.js.map +1 -1
- package/lib/services/dnd.d.ts +1 -1
- package/lib/services/dnd.d.ts.map +1 -1
- package/lib/services/dnd.js +10 -24
- package/lib/services/dnd.js.map +1 -1
- package/lib/services/emoji.d.ts +1 -1
- package/lib/services/emoji.d.ts.map +1 -1
- package/lib/services/emoji.js +6 -11
- package/lib/services/emoji.js.map +1 -1
- package/lib/services/entity.d.ts +1 -1
- package/lib/services/entity.d.ts.map +1 -1
- package/lib/services/entity.js +8 -20
- package/lib/services/entity.js.map +1 -1
- package/lib/services/files.d.ts +5 -5
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +39 -109
- package/lib/services/files.js.map +1 -1
- package/lib/services/functions.d.ts +1 -1
- package/lib/services/functions.d.ts.map +1 -1
- package/lib/services/functions.js +28 -75
- package/lib/services/functions.js.map +1 -1
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +1 -0
- package/lib/services/index.js.map +1 -1
- package/lib/services/lists.d.ts +5 -1
- package/lib/services/lists.d.ts.map +1 -1
- package/lib/services/lists.js +35 -146
- package/lib/services/lists.js.map +1 -1
- package/lib/services/migration.d.ts +1 -1
- package/lib/services/migration.d.ts.map +1 -1
- package/lib/services/migration.js +5 -8
- package/lib/services/migration.js.map +1 -1
- package/lib/services/oauth.d.ts +38 -2
- package/lib/services/oauth.d.ts.map +1 -1
- package/lib/services/oauth.js +67 -50
- package/lib/services/oauth.js.map +1 -1
- package/lib/services/openid.d.ts +1 -1
- package/lib/services/openid.d.ts.map +1 -1
- package/lib/services/openid.js +7 -15
- package/lib/services/openid.js.map +1 -1
- package/lib/services/pins.d.ts +1 -1
- package/lib/services/pins.d.ts.map +1 -1
- package/lib/services/pins.js +7 -15
- package/lib/services/pins.js.map +1 -1
- package/lib/services/reactions.d.ts +2 -2
- package/lib/services/reactions.d.ts.map +1 -1
- package/lib/services/reactions.js +13 -29
- package/lib/services/reactions.js.map +1 -1
- package/lib/services/reminders.d.ts +1 -1
- package/lib/services/reminders.d.ts.map +1 -1
- package/lib/services/reminders.js +13 -33
- package/lib/services/reminders.js.map +1 -1
- package/lib/services/rtm.d.ts +1 -1
- package/lib/services/rtm.d.ts.map +1 -1
- package/lib/services/rtm.js +9 -21
- package/lib/services/rtm.js.map +1 -1
- package/lib/services/search.d.ts +1 -1
- package/lib/services/search.d.ts.map +1 -1
- package/lib/services/search.js +13 -30
- package/lib/services/search.js.map +1 -1
- package/lib/services/stars.d.ts +1 -1
- package/lib/services/stars.d.ts.map +1 -1
- package/lib/services/stars.js +10 -20
- package/lib/services/stars.js.map +1 -1
- package/lib/services/team.d.ts +1 -1
- package/lib/services/team.d.ts.map +1 -1
- package/lib/services/team.js +25 -62
- package/lib/services/team.js.map +1 -1
- package/lib/services/tooling.d.ts +1 -1
- package/lib/services/tooling.d.ts.map +1 -1
- package/lib/services/tooling.js +5 -9
- package/lib/services/tooling.js.map +1 -1
- package/lib/services/usergroups.d.ts +8 -3
- package/lib/services/usergroups.d.ts.map +1 -1
- package/lib/services/usergroups.js +23 -51
- package/lib/services/usergroups.js.map +1 -1
- package/lib/services/users.d.ts +2 -2
- package/lib/services/users.d.ts.map +1 -1
- package/lib/services/users.js +28 -81
- package/lib/services/users.js.map +1 -1
- package/lib/services/views.d.ts +1 -1
- package/lib/services/views.d.ts.map +1 -1
- package/lib/services/views.js +11 -27
- package/lib/services/views.js.map +1 -1
- package/lib/services/workflows.d.ts +1 -1
- package/lib/services/workflows.d.ts.map +1 -1
- package/lib/services/workflows.js +27 -71
- package/lib/services/workflows.js.map +1 -1
- package/package.json +16 -12
- package/src/credentials.ts +8 -10
- package/src/errors.ts +17 -31
- package/src/index.ts +4 -8
- package/src/pagination.ts +2 -5
- package/src/protocol.test.ts +372 -0
- package/src/protocol.ts +56 -72
- package/src/retry.ts +4 -9
- package/src/services/admin.ts +1241 -1557
- package/src/services/agents.ts +853 -0
- package/src/services/api.ts +4 -10
- package/src/services/apps.ts +146 -243
- package/src/services/assistant.ts +93 -144
- package/src/services/auth.ts +12 -33
- package/src/services/blocks.ts +9 -24
- package/src/services/bookmarks.ts +14 -34
- package/src/services/bots.ts +7 -19
- package/src/services/calls.ts +15 -43
- package/src/services/canvases.ts +82 -85
- package/src/services/chat.ts +134 -254
- package/src/services/conversations.ts +101 -217
- package/src/services/dialog.ts +5 -13
- package/src/services/dnd.ts +11 -31
- package/src/services/emoji.ts +9 -19
- package/src/services/entity.ts +17 -45
- package/src/services/files.ts +72 -165
- package/src/services/functions.ts +95 -168
- package/src/services/index.ts +1 -0
- package/src/services/lists.ts +65 -208
- package/src/services/migration.ts +8 -17
- package/src/services/oauth.ts +127 -60
- package/src/services/openid.ts +12 -34
- package/src/services/pins.ts +7 -19
- package/src/services/reactions.ts +19 -43
- package/src/services/reminders.ts +13 -37
- package/src/services/rtm.ts +9 -25
- package/src/services/search.ts +51 -92
- package/src/services/stars.ts +20 -31
- package/src/services/team.ts +81 -155
- package/src/services/tooling.ts +5 -13
- package/src/services/usergroups.ts +37 -68
- package/src/services/users.ts +35 -102
- package/src/services/views.ts +11 -31
- package/src/services/workflows.ts +65 -129
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @distilled.cloud/slack
|
|
2
|
+
|
|
3
|
+
Effect-native SDK for [slack](https://www.npmjs.com/package/@distilled.cloud/slack).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @distilled.cloud/slack effect
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { Effect, Layer } from "effect";
|
|
15
|
+
import * as FetchHttpClient from "effect/http/FetchHttpClient";
|
|
16
|
+
import * as Slack from "@distilled.cloud/slack";
|
|
17
|
+
|
|
18
|
+
const program = Effect.gen(function* () {
|
|
19
|
+
const result = yield* Slack.admin.listAppsActivities({});
|
|
20
|
+
return result;
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const Live = Layer.mergeAll(
|
|
24
|
+
FetchHttpClient.layer,
|
|
25
|
+
Slack.CredentialsFromEnv,
|
|
26
|
+
Slack.SlackProtocol,
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
program.pipe(Effect.provide(Live), Effect.runPromise);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Auth
|
|
33
|
+
|
|
34
|
+
Required: `SLACK_BOT_TOKEN`, `SLACK_TOKEN`. Optional: `SLACK_API_URL`. Sent as `Authorization: Bearer`.
|
package/lib/credentials.d.ts
CHANGED
|
@@ -16,11 +16,11 @@ export declare class Credentials extends Credentials_base {
|
|
|
16
16
|
}
|
|
17
17
|
export declare const CredentialsFromEnv: Layer.Layer<Credentials, never, never>;
|
|
18
18
|
/**
|
|
19
|
-
* Convenience layer from a
|
|
19
|
+
* Convenience layer from a redacted token + optional base URL. Pass an empty
|
|
20
20
|
* token (`""`) for the credential-less OAuth exchange methods.
|
|
21
21
|
*/
|
|
22
22
|
export declare const credentials: (config: {
|
|
23
|
-
readonly token: string
|
|
23
|
+
readonly token: Redacted.Redacted<string>;
|
|
24
24
|
readonly apiBaseUrl?: string;
|
|
25
25
|
}) => Layer.Layer<Credentials>;
|
|
26
26
|
export {};
|
package/lib/credentials.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;;AAED,qBAAa,WAAY,SAAQ,gBAEhC;CAAG;AAaJ,eAAO,MAAM,kBAAkB,wCAe9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,WAAY;IAClC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAOxB,CAAC"}
|
package/lib/credentials.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
1
2
|
/**
|
|
2
3
|
* Slack credentials — hand-written.
|
|
3
4
|
*
|
|
@@ -22,7 +23,6 @@ import * as Context from "effect/Context";
|
|
|
22
23
|
import * as Effect from "effect/Effect";
|
|
23
24
|
import * as Layer from "effect/Layer";
|
|
24
25
|
import * as Redacted from "effect/Redacted";
|
|
25
|
-
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
26
26
|
/**
|
|
27
27
|
* Slack Web API base URL. Every method is `POST/GET <base>/<method>`.
|
|
28
28
|
* Override via `SLACK_API_URL` only to point at a proxy or a mock.
|
|
@@ -43,11 +43,11 @@ export const CredentialsFromEnv = Layer.succeed(Credentials, envConfig.pipe(Effe
|
|
|
43
43
|
apiBaseUrl,
|
|
44
44
|
})), Effect.orDie));
|
|
45
45
|
/**
|
|
46
|
-
* Convenience layer from a
|
|
46
|
+
* Convenience layer from a redacted token + optional base URL. Pass an empty
|
|
47
47
|
* token (`""`) for the credential-less OAuth exchange methods.
|
|
48
48
|
*/
|
|
49
49
|
export const credentials = (config) => Layer.succeed(Credentials, Effect.succeed({
|
|
50
|
-
token:
|
|
50
|
+
token: config.token,
|
|
51
51
|
apiBaseUrl: config.apiBaseUrl ?? DEFAULT_API_BASE_URL,
|
|
52
52
|
}));
|
|
53
53
|
//# sourceMappingURL=credentials.js.map
|
package/lib/credentials.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,gB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E;CAC7E,CAAC,CACL,EACD,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;IACrC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;IAC3B,UAAU;CACX,CAAC,CAAC,EACH,MAAM,CAAC,KAAK,CACb,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAG3B,EAA4B,EAAE,CAC7B,KAAK,CAAC,OAAO,CACX,WAAW,EACX,MAAM,CAAC,OAAO,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,KAAK;IACnB,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,oBAAoB;CACtD,CAAC,CACH,CAAC"}
|
package/lib/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,cAAc,EACd,UAAU,GACX,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEvF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;;;;;;;;AAExC;;;;;;;GAOG;AACH,qBAAa,UAAW,SAAQ,eAM9B;CAAG;;;;;;;;;;;;;;AAEL;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,qBAIwB;CAAG;;;;;;AAEjE;;;GAGG;AACH,qBAAa,cAAe,SAAQ,mBAIlC;CAAG;;;;;;;;;AAEL,kCAAkC;AAClC,qBAAa,eAAgB,SAAQ,oBAGL;CAAG;AAEnC;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,gBAAgB,GAAG,cAAc,GAAG,eAAe,CAAC;AAE5F;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,YAAY,CAAC"}
|
package/lib/errors.js
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* slugs that method can produce.
|
|
11
11
|
*/
|
|
12
12
|
export { BadGateway, BadRequest, Conflict, ConfigError, Forbidden, GatewayTimeout, InternalServerError, NotFound, ServiceUnavailable, TooManyRequests, Unauthorized, UnprocessableEntity, HTTP_STATUS_MAP, DEFAULT_ERRORS, API_ERRORS, } from "@distilled.cloud/core/errors";
|
|
13
|
-
import * as Schema from "effect/Schema";
|
|
14
13
|
import * as Category from "@distilled.cloud/core/category";
|
|
15
14
|
import { withCategory } from "@distilled.cloud/core/error-category";
|
|
16
15
|
import { DurationSchema, RETRYABLE } from "@distilled.cloud/core/errors";
|
|
16
|
+
import * as Schema from "effect/Schema";
|
|
17
17
|
/**
|
|
18
18
|
* A Slack API error envelope: `ok: false` with a machine-readable slug.
|
|
19
19
|
* `code` is the slug (`channel_not_found`, `invalid_blocks`, …) — the field
|
package/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,QAAQ,EACR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AAE,MAAM,CAAC,MAAM;IACnB,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC;CAC5C,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,mBAAmB,CAAC;CAAG;AAEjE;;;GAGG;AACH,MAAM,OAAO,cAAe,SAAQ,MAAM,CAAC,WAAW,EAAkB,CAAC,gBAAgB,EAAE;IACzF,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;CACrC,CAAC;CAAG;AAEL,kCAAkC;AAClC,MAAM,OAAO,eAAgB,SAAQ,MAAM,CAAC,WAAW,EAAmB,CAAC,iBAAiB,EAAE;IAC5F,IAAI,EAAE,MAAM,CAAC,OAAO;IACpB,KAAK,EAAE,MAAM,CAAC,OAAO;CACtB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;CAAG"}
|
package/lib/index.d.ts
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `./services` is generated by `scripts/generate.ts` from the Smithy models
|
|
5
5
|
* in `.generated-specs` (written by `scripts/convert.ts` from the JSON twins
|
|
6
|
-
* of the docs.slack.dev method reference,
|
|
7
|
-
* `
|
|
6
|
+
* of the docs.slack.dev method reference, which the spec mirror
|
|
7
|
+
* `specs/spec-mirror-slack` snapshots). Everything else in this folder is
|
|
8
8
|
* hand-written.
|
|
9
9
|
*/
|
|
10
10
|
export * from "./credentials.ts";
|
|
11
11
|
export * from "./errors.ts";
|
|
12
12
|
export * as T from "./traits.ts";
|
|
13
|
-
export { SlackProtocol, type SlackOpError, type SlackOpContext
|
|
13
|
+
export { SlackProtocol, type SlackOpError, type SlackOpContext } from "./protocol.ts";
|
|
14
14
|
export * as Retry from "./retry.ts";
|
|
15
15
|
export * as Pagination from "./pagination.ts";
|
|
16
|
-
export *
|
|
16
|
+
export * from "./services/index.ts";
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AACtF,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,cAAc,qBAAqB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `./services` is generated by `scripts/generate.ts` from the Smithy models
|
|
5
5
|
* in `.generated-specs` (written by `scripts/convert.ts` from the JSON twins
|
|
6
|
-
* of the docs.slack.dev method reference,
|
|
7
|
-
* `
|
|
6
|
+
* of the docs.slack.dev method reference, which the spec mirror
|
|
7
|
+
* `specs/spec-mirror-slack` snapshots). Everything else in this folder is
|
|
8
8
|
* hand-written.
|
|
9
9
|
*/
|
|
10
10
|
export * from "./credentials.js";
|
|
11
11
|
export * from "./errors.js";
|
|
12
12
|
export * as T from "./traits.js";
|
|
13
|
-
export { SlackProtocol
|
|
13
|
+
export { SlackProtocol } from "./protocol.js";
|
|
14
14
|
export * as Retry from "./retry.js";
|
|
15
15
|
export * as Pagination from "./pagination.js";
|
|
16
|
-
export *
|
|
16
|
+
export * from "./services/index.js";
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAA0C,MAAM,eAAe,CAAC;AACtF,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,cAAc,qBAAqB,CAAC"}
|
package/lib/pagination.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,kBACkB,CAAC"}
|
package/lib/pagination.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkC,
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAkC,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,CAC3F,UAAU,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC"}
|
package/lib/protocol.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as Layer from "effect/Layer";
|
|
2
|
-
import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
3
|
-
import type * as HttpClientError from "effect/unstable/http/HttpClientError";
|
|
4
1
|
import * as API from "@distilled.cloud/core/api";
|
|
5
2
|
import { ConfigError } from "@distilled.cloud/core/errors";
|
|
3
|
+
import type * as HttpClient from "effect/http/HttpClient";
|
|
4
|
+
import type * as HttpClientError from "effect/http/HttpClientError";
|
|
5
|
+
import * as Layer from "effect/Layer";
|
|
6
6
|
import { Credentials } from "./credentials.ts";
|
|
7
7
|
import { type DefaultErrors } from "./errors.ts";
|
|
8
8
|
/**
|
package/lib/protocol.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AACjD,OAAO,EACL,WAAW,EAMZ,MAAM,8BAA8B,CAAC;AAwCtC,OAAO,KAAK,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,eAAe,MAAM,6BAA6B,CAAC;AAGpE,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,WAAW,EAAe,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EACL,KAAK,aAAa,EAKnB,MAAM,aAAa,CAAC;AAErB;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,CAAC,eAAe,CAAC;AAEzF,wEAAwE;AACxE,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC;AAqOjE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAOnD,CAAC"}
|
package/lib/protocol.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import { ConfigError, GatewayTimeout, HTTP_STATUS_MAP, InternalServerError, ServiceUnavailable, Unauthorized, } from "@distilled.cloud/core/errors";
|
|
3
|
+
import { buildRequest, getAnn, getProps, hasPropAnn, mapKeys, matchTypedError, } from "@distilled.cloud/core/protocol-http";
|
|
4
|
+
import { unwrapRedactedDeep, wrapSensitive } from "@distilled.cloud/core/protocol-rest";
|
|
5
|
+
import { validateResponse } from "@distilled.cloud/core/response-validation";
|
|
6
|
+
import { parseRetryAfterForStatus, parseServerRetryHint } from "@distilled.cloud/core/retry-after";
|
|
7
|
+
import { httpSymbol, querySymbol } from "@distilled.cloud/core/trait";
|
|
1
8
|
/**
|
|
2
9
|
* SlackProtocol — hand-written.
|
|
3
10
|
*
|
|
@@ -27,14 +34,8 @@
|
|
|
27
34
|
import * as Effect from "effect/Effect";
|
|
28
35
|
import * as Layer from "effect/Layer";
|
|
29
36
|
import * as Redacted from "effect/Redacted";
|
|
30
|
-
import * as API from "@distilled.cloud/core/api";
|
|
31
|
-
import { httpSymbol, querySymbol, } from "@distilled.cloud/core/trait";
|
|
32
|
-
import { buildRequest, getAnn, getProps, hasPropAnn, mapKeys, matchTypedError, } from "@distilled.cloud/core/protocol-http";
|
|
33
|
-
import { unwrapRedactedDeep, wrapSensitive, } from "@distilled.cloud/core/protocol-rest";
|
|
34
|
-
import { ConfigError, GatewayTimeout, HTTP_STATUS_MAP, InternalServerError, ServiceUnavailable, Unauthorized, } from "@distilled.cloud/core/errors";
|
|
35
|
-
import { parseRetryAfterForStatus, parseServerRetryHint, } from "@distilled.cloud/core/retry-after";
|
|
36
37
|
import { Credentials } from "./credentials.js";
|
|
37
|
-
import { SlackError, SlackHttpError, SlackRateLimited, } from "./errors.js";
|
|
38
|
+
import { SlackError, SlackHttpError, SlackParseError, SlackRateLimited, } from "./errors.js";
|
|
38
39
|
// Bridge: Protocol.decode is typed as Effect<unknown> (no error channel), but
|
|
39
40
|
// Slack failures are real typed errors that an operation re-surfaces via its
|
|
40
41
|
// `errors: [...]` list. Fail with the instance and erase the error type here;
|
|
@@ -77,8 +78,7 @@ const serializeForWire = (input, inputAst) => {
|
|
|
77
78
|
if (input === null || typeof input !== "object" || Array.isArray(input)) {
|
|
78
79
|
return input;
|
|
79
80
|
}
|
|
80
|
-
const isForm = getAnn(inputAst, httpSymbol)?.contentType ===
|
|
81
|
-
"form-urlencoded";
|
|
81
|
+
const isForm = getAnn(inputAst, httpSymbol)?.contentType === "form-urlencoded";
|
|
82
82
|
const props = getProps(inputAst);
|
|
83
83
|
if (props.length === 0)
|
|
84
84
|
return input;
|
|
@@ -108,7 +108,7 @@ const serializeForWire = (input, inputAst) => {
|
|
|
108
108
|
// request instead. Like the error channel above, the requirement is erased at
|
|
109
109
|
// this boundary (Protocol effects are typed with no requirements) and
|
|
110
110
|
// reintroduced for callers by the generated `SlackOpContext` annotations.
|
|
111
|
-
const encode = ({ input, inputAst
|
|
111
|
+
const encode = ({ input, inputAst }) => Effect.gen(function* () {
|
|
112
112
|
const resolveCredentials = yield* Credentials;
|
|
113
113
|
const creds = yield* resolveCredentials;
|
|
114
114
|
const token = Redacted.value(creds.token);
|
|
@@ -152,8 +152,7 @@ const decode = ({ response, outputAst, errors: errorClasses, }) => Effect.gen(fu
|
|
|
152
152
|
// `response_metadata.messages` carries per-field validation detail
|
|
153
153
|
// (e.g. `invalid_arguments`); some envelopes use a bare `errors` list.
|
|
154
154
|
const detailMessages = [
|
|
155
|
-
...(json?.response_metadata
|
|
156
|
-
?.messages ?? []),
|
|
155
|
+
...(json?.response_metadata?.messages ?? []),
|
|
157
156
|
...(Array.isArray(json?.errors) ? json.errors : []),
|
|
158
157
|
].filter((m) => typeof m === "string");
|
|
159
158
|
const message = detailMessages[0] ??
|
|
@@ -164,7 +163,10 @@ const decode = ({ response, outputAst, errors: errorClasses, }) => Effect.gen(fu
|
|
|
164
163
|
// error codes are string slugs, and matcher `code`s are numeric —
|
|
165
164
|
// a patch-declared class matches on `status`/`message` instead
|
|
166
165
|
// (`message` is the slug when the envelope carries no detail).
|
|
167
|
-
const typed = matchTypedError(errorClasses, status, [{ message }]
|
|
166
|
+
const typed = matchTypedError(errorClasses, status, [{ message }], {
|
|
167
|
+
body: json === undefined ? text : json,
|
|
168
|
+
headers,
|
|
169
|
+
});
|
|
168
170
|
if (typed !== undefined)
|
|
169
171
|
return yield* fail(typed);
|
|
170
172
|
// 2. Throttling — the 429 or its envelope spellings.
|
|
@@ -187,12 +189,8 @@ const decode = ({ response, outputAst, errors: errorClasses, }) => Effect.gen(fu
|
|
|
187
189
|
return yield* fail(new SlackError({
|
|
188
190
|
code: slug,
|
|
189
191
|
...(message !== slug ? { message } : {}),
|
|
190
|
-
...(typeof json?.needed === "string"
|
|
191
|
-
|
|
192
|
-
: {}),
|
|
193
|
-
...(typeof json?.provided === "string"
|
|
194
|
-
? { provided: json.provided }
|
|
195
|
-
: {}),
|
|
192
|
+
...(typeof json?.needed === "string" ? { needed: json.needed } : {}),
|
|
193
|
+
...(typeof json?.provided === "string" ? { provided: json.provided } : {}),
|
|
196
194
|
...(detailMessages.length > 0 ? { messages: detailMessages } : {}),
|
|
197
195
|
}));
|
|
198
196
|
}
|
|
@@ -214,13 +212,16 @@ const decode = ({ response, outputAst, errors: errorClasses, }) => Effect.gen(fu
|
|
|
214
212
|
}
|
|
215
213
|
// Successful non-JSON body: raw bytes (the analytics file download —
|
|
216
214
|
// modeled as a Document output, so the bytes pass through verbatim).
|
|
215
|
+
// Strict mode fails them for every other (struct) output.
|
|
217
216
|
if (json === undefined) {
|
|
218
|
-
return bytes;
|
|
217
|
+
return yield* validateResponse(outputAst, bytes, (cause) => new SlackParseError({ body: text, cause })).pipe(Effect.catch(fail));
|
|
219
218
|
}
|
|
220
219
|
// 2xx envelope: the body IS the payload (`ok` rides along as a modeled
|
|
221
220
|
// member). Wire→TS key mapping is schema-driven; sensitive members
|
|
222
|
-
// (OAuth access/refresh tokens) wrap in Redacted.
|
|
223
|
-
|
|
221
|
+
// (OAuth access/refresh tokens) wrap in Redacted. Strict mode checks the
|
|
222
|
+
// mapped payload against the output schema first.
|
|
223
|
+
const mapped = yield* validateResponse(outputAst, mapKeys(outputAst, json, "decode"), (cause) => new SlackParseError({ body: json, cause })).pipe(Effect.catch(fail));
|
|
224
|
+
return wrapSensitive(outputAst, mapped);
|
|
224
225
|
});
|
|
225
226
|
export const SlackProtocol = Layer.succeed(API.Protocol, API.Protocol.of({
|
|
226
227
|
// Erase encode's Credentials requirement (see comment above).
|
package/lib/protocol.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAA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