@fluojs/discord 1.0.1 → 1.0.3
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.ko.md +10 -2
- package/README.md +10 -2
- package/package.json +5 -5
package/README.ko.md
CHANGED
|
@@ -95,6 +95,7 @@ DiscordModule.forRootAsync({
|
|
|
95
95
|
Behavioral contract 메모:
|
|
96
96
|
|
|
97
97
|
- `DiscordService.send(...)`는 전달 전에 `defaultThreadId`를 해석합니다.
|
|
98
|
+
- `DiscordService.sendMany(...)`는 `DiscordMessage[]`를 직접 순차 전송하는 batch API이며 `continueOnError`를 지원합니다. 이는 multi-recipient `@fluojs/notifications` dispatch shortcut이 아닙니다.
|
|
98
99
|
- 서비스는 모듈 bootstrap 시 transport를 초기화하고, factory가 소유한 리소스만 애플리케이션 shutdown 시 닫습니다.
|
|
99
100
|
- send는 bootstrap이 transport를 `ready`로 표시한 뒤에만 허용됩니다. bootstrap 전, startup 중, bootstrap 실패 후, shutdown 중, shutdown 후 시도는 전달 전에 거부됩니다.
|
|
100
101
|
- 서비스가 shutdown 중이거나 이미 stopped 상태라면 cached transport를 재사용하지 않고 send를 거부합니다.
|
|
@@ -144,7 +145,7 @@ Behavioral contract 메모:
|
|
|
144
145
|
- 하나의 notification dispatch는 정확히 하나의 Discord thread 경로로 매핑됩니다. `payload.threadId` 또는 `recipients`의 단일 항목을 사용해야 합니다.
|
|
145
146
|
- `payload.threadId`가 없으면 `DiscordService.sendNotification(...)`는 첫 번째 `recipients` 항목을 사용하고, 그것도 없으면 `defaultThreadId`로 폴백합니다.
|
|
146
147
|
- notification metadata는 payload metadata, dispatch metadata, template/subject marker를 합쳐 구성됩니다. `template`은 renderer가 구성된 경우에만 렌더링됩니다.
|
|
147
|
-
- 여러 Discord thread로 fan-out이
|
|
148
|
+
- 여러 Discord thread로 fan-out이 필요한 notification workflow라면 thread별 concrete Discord message를 만들어 `DiscordService.sendMany(...)`로 보내거나 별도 notification dispatch를 실행해야 합니다. 하나의 notification dispatch는 multi-recipient fan-out을 암묵적으로 확장하지 않습니다.
|
|
148
149
|
|
|
149
150
|
### 명시적 fetch 주입을 사용하는 webhook-first 전달
|
|
150
151
|
|
|
@@ -185,7 +186,10 @@ Discord 패키지는 의도적으로 다음을 **포함하지 않습니다**:
|
|
|
185
186
|
|
|
186
187
|
### 핵심
|
|
187
188
|
|
|
189
|
+
- `Discord`
|
|
188
190
|
- `DiscordModule.forRoot(options)` / `DiscordModule.forRootAsync(options)`
|
|
191
|
+
- `DiscordModuleOptions`
|
|
192
|
+
- `DiscordAsyncModuleOptions`
|
|
189
193
|
- `DiscordService`
|
|
190
194
|
- `DiscordChannel`
|
|
191
195
|
- `DISCORD`
|
|
@@ -197,11 +201,11 @@ Discord 패키지는 의도적으로 다음을 **포함하지 않습니다**:
|
|
|
197
201
|
|
|
198
202
|
- `DiscordMessage`
|
|
199
203
|
- `NormalizedDiscordMessage`
|
|
200
|
-
- `DiscordAsyncModuleOptions`
|
|
201
204
|
- `DiscordWebhookTransportOptions`
|
|
202
205
|
- `DiscordFetchLike`
|
|
203
206
|
- `DiscordFetchResponse`
|
|
204
207
|
- `DiscordSendResult`
|
|
208
|
+
- `DiscordSendOptions`
|
|
205
209
|
- `DiscordSendManyOptions`
|
|
206
210
|
- `DiscordSendBatchResult`
|
|
207
211
|
- `DiscordSendFailure`
|
|
@@ -213,7 +217,9 @@ Discord 패키지는 의도적으로 다음을 **포함하지 않습니다**:
|
|
|
213
217
|
- `DiscordEmbed`
|
|
214
218
|
- `DiscordPoll`
|
|
215
219
|
- `DiscordTransport`
|
|
220
|
+
- `DiscordTransportContext`
|
|
216
221
|
- `DiscordTransportFactory`
|
|
222
|
+
- `DiscordTransportReceipt`
|
|
217
223
|
- `DiscordTemplateRenderInput`
|
|
218
224
|
- `DiscordTemplateRenderResult`
|
|
219
225
|
- `DiscordTemplateRenderer`
|
|
@@ -223,6 +229,8 @@ Discord 패키지는 의도적으로 다음을 **포함하지 않습니다**:
|
|
|
223
229
|
|
|
224
230
|
- `createDiscordPlatformStatusSnapshot(...)`
|
|
225
231
|
- `DiscordLifecycleState`
|
|
232
|
+
- `DiscordPlatformStatusSnapshot`
|
|
233
|
+
- `DiscordStatusAdapterInput`
|
|
226
234
|
- `DiscordConfigurationError`
|
|
227
235
|
- `DiscordMessageValidationError`
|
|
228
236
|
- `DiscordTransportError`
|
package/README.md
CHANGED
|
@@ -95,6 +95,7 @@ DiscordModule.forRootAsync({
|
|
|
95
95
|
Behavioral contract notes:
|
|
96
96
|
|
|
97
97
|
- `DiscordService.send(...)` resolves `defaultThreadId` before delivery.
|
|
98
|
+
- `DiscordService.sendMany(...)` is a direct `DiscordMessage[]` batch API that sends messages sequentially and supports `continueOnError`; it is not a multi-recipient `@fluojs/notifications` dispatch shortcut.
|
|
98
99
|
- The service initializes the configured transport during module bootstrap and closes factory-owned resources during application shutdown.
|
|
99
100
|
- Sends are accepted only after bootstrap marks the transport `ready`; attempts before bootstrap, during startup, after failed bootstrap, while shutting down, or after shutdown are rejected before delivery.
|
|
100
101
|
- Sends attempted while the service is shutting down or already stopped are rejected before reusing the cached transport.
|
|
@@ -144,7 +145,7 @@ Behavioral contract notes:
|
|
|
144
145
|
- One notification dispatch maps to exactly one Discord thread route. Use `payload.threadId` or a single entry in `recipients`.
|
|
145
146
|
- If `payload.threadId` is omitted, `DiscordService.sendNotification(...)` uses the first `recipients` entry or falls back to `defaultThreadId`.
|
|
146
147
|
- Notification metadata is merged from payload metadata, dispatch metadata, and template/subject markers. `template` is rendered only when a renderer is configured.
|
|
147
|
-
- If a notification needs fan-out across multiple Discord threads,
|
|
148
|
+
- If a notification workflow needs fan-out across multiple Discord threads, create one concrete Discord message per thread with `DiscordService.sendMany(...)` or issue separate notification dispatches; a single notification dispatch never expands multi-recipient fan-out implicitly.
|
|
148
149
|
|
|
149
150
|
### Webhook-first delivery with explicit fetch injection
|
|
150
151
|
|
|
@@ -185,7 +186,10 @@ These limitations are part of the package contract so runtime choice, provider c
|
|
|
185
186
|
|
|
186
187
|
### Core
|
|
187
188
|
|
|
189
|
+
- `Discord`
|
|
188
190
|
- `DiscordModule.forRoot(options)` / `DiscordModule.forRootAsync(options)`
|
|
191
|
+
- `DiscordModuleOptions`
|
|
192
|
+
- `DiscordAsyncModuleOptions`
|
|
189
193
|
- `DiscordService`
|
|
190
194
|
- `DiscordChannel`
|
|
191
195
|
- `DISCORD`
|
|
@@ -197,11 +201,11 @@ Compose applications through `DiscordModule` and integrate notifications through
|
|
|
197
201
|
|
|
198
202
|
- `DiscordMessage`
|
|
199
203
|
- `NormalizedDiscordMessage`
|
|
200
|
-
- `DiscordAsyncModuleOptions`
|
|
201
204
|
- `DiscordWebhookTransportOptions`
|
|
202
205
|
- `DiscordFetchLike`
|
|
203
206
|
- `DiscordFetchResponse`
|
|
204
207
|
- `DiscordSendResult`
|
|
208
|
+
- `DiscordSendOptions`
|
|
205
209
|
- `DiscordSendManyOptions`
|
|
206
210
|
- `DiscordSendBatchResult`
|
|
207
211
|
- `DiscordSendFailure`
|
|
@@ -213,7 +217,9 @@ Compose applications through `DiscordModule` and integrate notifications through
|
|
|
213
217
|
- `DiscordEmbed`
|
|
214
218
|
- `DiscordPoll`
|
|
215
219
|
- `DiscordTransport`
|
|
220
|
+
- `DiscordTransportContext`
|
|
216
221
|
- `DiscordTransportFactory`
|
|
222
|
+
- `DiscordTransportReceipt`
|
|
217
223
|
- `DiscordTemplateRenderInput`
|
|
218
224
|
- `DiscordTemplateRenderResult`
|
|
219
225
|
- `DiscordTemplateRenderer`
|
|
@@ -223,6 +229,8 @@ Compose applications through `DiscordModule` and integrate notifications through
|
|
|
223
229
|
|
|
224
230
|
- `createDiscordPlatformStatusSnapshot(...)`
|
|
225
231
|
- `DiscordLifecycleState`
|
|
232
|
+
- `DiscordPlatformStatusSnapshot`
|
|
233
|
+
- `DiscordStatusAdapterInput`
|
|
226
234
|
- `DiscordConfigurationError`
|
|
227
235
|
- `DiscordMessageValidationError`
|
|
228
236
|
- `DiscordTransportError`
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"portable",
|
|
10
10
|
"fetch"
|
|
11
11
|
],
|
|
12
|
-
"version": "1.0.
|
|
12
|
+
"version": "1.0.3",
|
|
13
13
|
"private": false,
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"repository": {
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@fluojs/core": "^1.0.
|
|
40
|
-
"@fluojs/
|
|
41
|
-
"@fluojs/
|
|
42
|
-
"@fluojs/
|
|
39
|
+
"@fluojs/core": "^1.0.3",
|
|
40
|
+
"@fluojs/notifications": "^1.0.1",
|
|
41
|
+
"@fluojs/runtime": "^1.1.1",
|
|
42
|
+
"@fluojs/di": "^1.0.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"vitest": "^3.2.4"
|