You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All generated files extend `WebAPICallResult` and have all properties optional.
137
-
138
-
**Note**: If the JSON sample doesn't exist yet in `java-slack-sdk`, the API method has not been added to that project yet. The maintainers need to add it there first before it can be added here.
**Note**: Request types are imported from the barrel `./types/request` (already grouped by namespace), but response types are imported from their individual files (e.g., `./types/response/ChatAppendStreamResponse`).
205
-
206
-
**Binding pattern** — within the appropriate namespace object in the `Methods` class:
207
-
208
-
```typescript
209
-
publicreadonlychat= {
210
-
/**
211
-
* @description Appends text to an existing streaming conversation.
212
-
* @see{@linkhttps://docs.slack.dev/reference/methods/chat.appendStream `chat.appendStream` API reference}.
-**Type tests**: tsd (`*.test-d.ts` files in `packages/web-api/test/types/`)
284
-
-**Integration tests**: CommonJS, ESM, and TypeScript compatibility checks
285
-
-**CI matrix**: Node 18.x, 20.x, 22.x, 24.x on Ubuntu + Windows (8 jobs total)
286
-
-**Coverage output**: `lcov.info` at each package root (not in `coverage/` dir)
287
-
-**Test results**: `test-results.xml` at each package root (JUnit format)
288
-
289
-
Per-package test commands:
290
-
291
-
```bash
292
-
npm test --workspace=packages/web-api # all tests (types + integration + unit)
293
-
npm run test:unit --workspace=packages/web-api
294
-
npm run test:types --workspace=packages/web-api
295
-
```
296
-
297
-
## Web API Client Architecture
298
-
299
-
`packages/web-api/src/WebClient.ts`:
96
+
## Development Philosophy
300
97
301
-
- Extends the `Methods` class (which defines all API method bindings in `methods.ts`)
302
-
- Uses Axios for HTTP requests
303
-
-`p-queue` for request concurrency control
304
-
-`p-retry` for automatic retries with backoff
305
-
- Built-in cursor pagination via `paginate()`
306
-
- Streaming support via `chatStream()` using `ChatStreamer`
307
-
- Rate limiting with emitted events
98
+
-**Follow existing patterns exactly** — when adding or modifying code, match the style of adjacent code.
99
+
-**Reuse mixins and shared types** rather than duplicating field definitions across packages.
100
+
-**PascalCase for types**, camelCase for methods.
101
+
-**JSDoc on public APIs**: Always include `@description` and `@see` with a link to the API reference.
308
102
309
103
## Common Pitfalls
310
104
311
-
-**Don't edit generated response types** — use `scripts/generate-web-api-types.sh` instead. Look for the "DO NOT EDIT" banner.
312
-
-**Build in dependency order** — building `web-api` before `logger` and `types` will fail.
313
-
-**Use Biome, not ESLint/Prettier** — this repo uses Biome exclusively (`biome.json`).
314
-
-**Biome overrides exist for generated code** — `packages/web-api/src/types/response/**/*.ts` has relaxed rules (`noBannedTypes: off`, `noExplicitAny: off`).
315
-
-**Import organization is disabled** for `packages/web-api/src/index.ts` in Biome config.
316
-
-**Response type imports use individual files**, not the barrel — e.g., `import type { ChatPostMessageResponse } from './types/response/ChatPostMessageResponse'`.
317
-
318
-
## Development Philosophy
319
-
320
-
-**Follow existing patterns exactly** — when adding a new method, match the style of adjacent methods.
321
-
-**Reuse mixins** from `common.ts` and namespace-specific files rather than duplicating field definitions.
322
-
-**Every API method needs four things**: request type, response type, method binding, and type tests.
323
-
-**Naming conventions**: PascalCase for types (`ChatPostMessageArguments`), camelCase for methods (`postMessage`).
324
-
-**JSDoc on method bindings**: Always include `@description` and `@see` with a link to the API reference.
105
+
-**Build in dependency order** — see the dependency graph above.
0 commit comments