@epilot/sdk 2.7.14 → 2.8.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/definitions/focus-pocus-runtime.json +1 -0
- package/definitions/focus-pocus.json +757 -0
- package/definitions/integration-toolkit-runtime.json +1 -1
- package/definitions/integration-toolkit.json +857 -108
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +8 -8
- package/dist/apis/integration-toolkit.d.cts +2 -2
- package/dist/apis/integration-toolkit.d.ts +2 -2
- package/dist/apis/integration-toolkit.js +2 -2
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-WM74R3BD.js → chunk-7V7ECXTZ.js} +1 -1
- package/dist/{chunk-4FFGRWLS.cjs → chunk-I53TWOTX.cjs} +1 -1
- package/dist/{chunk-P2NOKWKO.cjs → chunk-N3P24HUW.cjs} +2 -2
- package/dist/{chunk-VPRWTF4G.js → chunk-OOERPBL3.js} +2 -2
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/integration-toolkit-27Z3VZBZ.cjs +7 -0
- package/dist/integration-toolkit-NRLZZFVS.js +7 -0
- package/dist/{integration-toolkit-runtime-YHTU4X5J.cjs → integration-toolkit-runtime-FY7QVFL6.cjs} +2 -2
- package/dist/{integration-toolkit-runtime-YR4CIMKH.js → integration-toolkit-runtime-HCJ5QLCR.js} +1 -1
- package/dist/{integration-toolkit.d-CDcHwmoI.d.cts → integration-toolkit.d-BW9RK5G-.d.cts} +1658 -27
- package/dist/{integration-toolkit.d-CDcHwmoI.d.ts → integration-toolkit.d-BW9RK5G-.d.ts} +1658 -27
- package/dist/js-yaml-DLCVPJ7G.js +0 -0
- package/docs/integration-toolkit.md +479 -17
- package/package.json +12 -11
- package/LICENSE +0 -21
- package/dist/integration-toolkit-PGT2TTEZ.cjs +0 -7
- package/dist/integration-toolkit-RBGVNSUA.js +0 -7
package/dist/js-yaml-DLCVPJ7G.js
CHANGED
|
File without changes
|
|
@@ -56,6 +56,11 @@ const { data } = await integrationToolkitClient.acknowledgeTracking(...)
|
|
|
56
56
|
- [`setIntegrationAppMapping`](#setintegrationappmapping)
|
|
57
57
|
- [`deleteIntegrationAppMapping`](#deleteintegrationappmapping)
|
|
58
58
|
- [`getOutboundStatus`](#getoutboundstatus)
|
|
59
|
+
- [`pollOutboundMessages`](#polloutboundmessages)
|
|
60
|
+
- [`ackOutboundMessages`](#ackoutboundmessages)
|
|
61
|
+
- [`listOutboundDlqMessages`](#listoutbounddlqmessages)
|
|
62
|
+
- [`redriveOutboundDlqMessages`](#redriveoutbounddlqmessages)
|
|
63
|
+
- [`unblockOutboundStream`](#unblockoutboundstream)
|
|
59
64
|
- [`listSecureProxies`](#listsecureproxies)
|
|
60
65
|
- [`generateTypesPreview`](#generatetypespreview)
|
|
61
66
|
- [`generateTypes`](#generatetypes)
|
|
@@ -187,10 +192,26 @@ const { data } = await integrationToolkitClient.acknowledgeTracking(...)
|
|
|
187
192
|
- [`IntegrationConfigurationV2`](#integrationconfigurationv2)
|
|
188
193
|
- [`OutboundMapping`](#outboundmapping)
|
|
189
194
|
- [`DeliveryConfig`](#deliveryconfig)
|
|
195
|
+
- [`WebhookDeliveryConfig`](#webhookdeliveryconfig)
|
|
196
|
+
- [`PollDeliveryConfig`](#polldeliveryconfig)
|
|
190
197
|
- [`OutboundStatusResponse`](#outboundstatusresponse)
|
|
191
198
|
- [`OutboundUseCaseStatus`](#outboundusecasestatus)
|
|
199
|
+
- [`OutboundPollStatus`](#outboundpollstatus)
|
|
192
200
|
- [`WebhookStatus`](#webhookstatus)
|
|
193
201
|
- [`OutboundConflict`](#outboundconflict)
|
|
202
|
+
- [`PollOutboundMessagesRequest`](#polloutboundmessagesrequest)
|
|
203
|
+
- [`OutboundMessage`](#outboundmessage)
|
|
204
|
+
- [`PollOutboundMessagesResponse`](#polloutboundmessagesresponse)
|
|
205
|
+
- [`AckOutboundMessagesRequest`](#ackoutboundmessagesrequest)
|
|
206
|
+
- [`AckResult`](#ackresult)
|
|
207
|
+
- [`AckOutboundMessagesResponse`](#ackoutboundmessagesresponse)
|
|
208
|
+
- [`OutboundDlqMessage`](#outbounddlqmessage)
|
|
209
|
+
- [`OutboundDlqListResponse`](#outbounddlqlistresponse)
|
|
210
|
+
- [`RedriveOutboundDlqRequest`](#redriveoutbounddlqrequest)
|
|
211
|
+
- [`RedriveOutboundDlqResult`](#redriveoutbounddlqresult)
|
|
212
|
+
- [`RedriveOutboundDlqResponse`](#redriveoutbounddlqresponse)
|
|
213
|
+
- [`UnblockOutboundStreamRequest`](#unblockoutboundstreamrequest)
|
|
214
|
+
- [`UnblockOutboundStreamResponse`](#unblockoutboundstreamresponse)
|
|
194
215
|
- [`RelationConfig`](#relationconfig)
|
|
195
216
|
- [`RelationItemConfig`](#relationitemconfig)
|
|
196
217
|
- [`RelationUniqueIdField`](#relationuniqueidfield)
|
|
@@ -2060,7 +2081,15 @@ const { data } = await client.getOutboundStatus({
|
|
|
2060
2081
|
"webhookId": "string",
|
|
2061
2082
|
"message": "string"
|
|
2062
2083
|
}
|
|
2063
|
-
]
|
|
2084
|
+
],
|
|
2085
|
+
"poll": {
|
|
2086
|
+
"queue_depth": 0,
|
|
2087
|
+
"oldest_unconsumed_age_seconds": 0,
|
|
2088
|
+
"last_poll_at": "1970-01-01T00:00:00.000Z",
|
|
2089
|
+
"last_ack_at": "1970-01-01T00:00:00.000Z",
|
|
2090
|
+
"blocked": true,
|
|
2091
|
+
"dlq_count": 0
|
|
2092
|
+
}
|
|
2064
2093
|
}
|
|
2065
2094
|
]
|
|
2066
2095
|
}
|
|
@@ -2070,6 +2099,209 @@ const { data } = await client.getOutboundStatus({
|
|
|
2070
2099
|
|
|
2071
2100
|
---
|
|
2072
2101
|
|
|
2102
|
+
### `pollOutboundMessages`
|
|
2103
|
+
|
|
2104
|
+
Poll outbound messages for an integration's poll-mode use cases.
|
|
2105
|
+
Takes a lease on the head-of-line batch of the integration's FIFO stream:
|
|
2106
|
+
the returned messages stay invisible to subsequent polls unti
|
|
2107
|
+
|
|
2108
|
+
`POST /v1/integrations/{integrationId}/outbound/messages/poll`
|
|
2109
|
+
|
|
2110
|
+
```ts
|
|
2111
|
+
const { data } = await client.pollOutboundMessages(
|
|
2112
|
+
{
|
|
2113
|
+
integrationId: 'example',
|
|
2114
|
+
},
|
|
2115
|
+
{
|
|
2116
|
+
limit: 10
|
|
2117
|
+
},
|
|
2118
|
+
)
|
|
2119
|
+
```
|
|
2120
|
+
|
|
2121
|
+
<details>
|
|
2122
|
+
<summary>Response</summary>
|
|
2123
|
+
|
|
2124
|
+
```json
|
|
2125
|
+
{
|
|
2126
|
+
"messages": [
|
|
2127
|
+
{
|
|
2128
|
+
"id": "string",
|
|
2129
|
+
"lease_token": "string",
|
|
2130
|
+
"use_case_id": "string",
|
|
2131
|
+
"event_name": "string",
|
|
2132
|
+
"event_id": "string",
|
|
2133
|
+
"group": "string",
|
|
2134
|
+
"payload": {},
|
|
2135
|
+
"enqueued_at": "1970-01-01T00:00:00.000Z"
|
|
2136
|
+
}
|
|
2137
|
+
],
|
|
2138
|
+
"visibility_timeout_seconds": 0,
|
|
2139
|
+
"has_more": true
|
|
2140
|
+
}
|
|
2141
|
+
```
|
|
2142
|
+
|
|
2143
|
+
</details>
|
|
2144
|
+
|
|
2145
|
+
---
|
|
2146
|
+
|
|
2147
|
+
### `ackOutboundMessages`
|
|
2148
|
+
|
|
2149
|
+
Acknowledge polled outbound messages. Acks are validated against the
|
|
2150
|
+
active lease and committed as a prefix-contiguous cursor advance:
|
|
2151
|
+
messages must be acknowledged in stream order. Out-of-order acks
|
|
2152
|
+
|
|
2153
|
+
`POST /v1/integrations/{integrationId}/outbound/messages/ack`
|
|
2154
|
+
|
|
2155
|
+
```ts
|
|
2156
|
+
const { data } = await client.ackOutboundMessages(
|
|
2157
|
+
{
|
|
2158
|
+
integrationId: 'example',
|
|
2159
|
+
},
|
|
2160
|
+
{
|
|
2161
|
+
acks: [
|
|
2162
|
+
{
|
|
2163
|
+
id: 'string',
|
|
2164
|
+
lease_token: 'string'
|
|
2165
|
+
}
|
|
2166
|
+
]
|
|
2167
|
+
},
|
|
2168
|
+
)
|
|
2169
|
+
```
|
|
2170
|
+
|
|
2171
|
+
<details>
|
|
2172
|
+
<summary>Response</summary>
|
|
2173
|
+
|
|
2174
|
+
```json
|
|
2175
|
+
{
|
|
2176
|
+
"results": [
|
|
2177
|
+
{
|
|
2178
|
+
"id": "string",
|
|
2179
|
+
"status": "accepted",
|
|
2180
|
+
"reason": "stale_lease"
|
|
2181
|
+
}
|
|
2182
|
+
]
|
|
2183
|
+
}
|
|
2184
|
+
```
|
|
2185
|
+
|
|
2186
|
+
</details>
|
|
2187
|
+
|
|
2188
|
+
---
|
|
2189
|
+
|
|
2190
|
+
### `listOutboundDlqMessages`
|
|
2191
|
+
|
|
2192
|
+
List an integration's dead-lettered outbound queue messages
|
|
2193
|
+
(poison_policy enforcement and operator skips move messages here).
|
|
2194
|
+
Operator endpoint — requires the `integration:manage` grant. Message
|
|
2195
|
+
payl
|
|
2196
|
+
|
|
2197
|
+
`GET /v1/integrations/{integrationId}/outbound/messages/dlq`
|
|
2198
|
+
|
|
2199
|
+
```ts
|
|
2200
|
+
const { data } = await client.listOutboundDlqMessages({
|
|
2201
|
+
integrationId: 'example',
|
|
2202
|
+
limit: 1,
|
|
2203
|
+
next_token: 'example',
|
|
2204
|
+
})
|
|
2205
|
+
```
|
|
2206
|
+
|
|
2207
|
+
<details>
|
|
2208
|
+
<summary>Response</summary>
|
|
2209
|
+
|
|
2210
|
+
```json
|
|
2211
|
+
{
|
|
2212
|
+
"items": [
|
|
2213
|
+
{
|
|
2214
|
+
"id": "string",
|
|
2215
|
+
"use_case_id": "string",
|
|
2216
|
+
"event_name": "string",
|
|
2217
|
+
"event_id": "string",
|
|
2218
|
+
"enqueued_at": "1970-01-01T00:00:00.000Z",
|
|
2219
|
+
"dead_lettered_at": "1970-01-01T00:00:00.000Z",
|
|
2220
|
+
"delivery_attempts": 0,
|
|
2221
|
+
"reason": "string",
|
|
2222
|
+
"expires_at": "1970-01-01T00:00:00.000Z"
|
|
2223
|
+
}
|
|
2224
|
+
],
|
|
2225
|
+
"next_token": "string"
|
|
2226
|
+
}
|
|
2227
|
+
```
|
|
2228
|
+
|
|
2229
|
+
</details>
|
|
2230
|
+
|
|
2231
|
+
---
|
|
2232
|
+
|
|
2233
|
+
### `redriveOutboundDlqMessages`
|
|
2234
|
+
|
|
2235
|
+
Redrive selected dead-lettered messages back into the live stream.
|
|
2236
|
+
Operator endpoint — requires the `integration:manage` grant.
|
|
2237
|
+
A redriven message is re-enqueued at the tail with a new id and
|
|
2238
|
+
sequence
|
|
2239
|
+
|
|
2240
|
+
`POST /v1/integrations/{integrationId}/outbound/messages/dlq/redrive`
|
|
2241
|
+
|
|
2242
|
+
```ts
|
|
2243
|
+
const { data } = await client.redriveOutboundDlqMessages(
|
|
2244
|
+
{
|
|
2245
|
+
integrationId: 'example',
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
ids: ['string']
|
|
2249
|
+
},
|
|
2250
|
+
)
|
|
2251
|
+
```
|
|
2252
|
+
|
|
2253
|
+
<details>
|
|
2254
|
+
<summary>Response</summary>
|
|
2255
|
+
|
|
2256
|
+
```json
|
|
2257
|
+
{
|
|
2258
|
+
"results": [
|
|
2259
|
+
{
|
|
2260
|
+
"id": "string",
|
|
2261
|
+
"status": "redriven"
|
|
2262
|
+
}
|
|
2263
|
+
]
|
|
2264
|
+
}
|
|
2265
|
+
```
|
|
2266
|
+
|
|
2267
|
+
</details>
|
|
2268
|
+
|
|
2269
|
+
---
|
|
2270
|
+
|
|
2271
|
+
### `unblockOutboundStream`
|
|
2272
|
+
|
|
2273
|
+
Unblock an integration's outbound stream halted by the `block`
|
|
2274
|
+
poison policy: skips (dead-letters) the current blocked head message,
|
|
2275
|
+
emitting MSG_DEAD_LETTERED and letting the next message become the
|
|
2276
|
+
|
|
2277
|
+
|
|
2278
|
+
`POST /v1/integrations/{integrationId}/outbound/messages/unblock`
|
|
2279
|
+
|
|
2280
|
+
```ts
|
|
2281
|
+
const { data } = await client.unblockOutboundStream(
|
|
2282
|
+
{
|
|
2283
|
+
integrationId: 'example',
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
reason: 'string'
|
|
2287
|
+
},
|
|
2288
|
+
)
|
|
2289
|
+
```
|
|
2290
|
+
|
|
2291
|
+
<details>
|
|
2292
|
+
<summary>Response</summary>
|
|
2293
|
+
|
|
2294
|
+
```json
|
|
2295
|
+
{
|
|
2296
|
+
"unblocked": true,
|
|
2297
|
+
"dead_lettered_id": "string"
|
|
2298
|
+
}
|
|
2299
|
+
```
|
|
2300
|
+
|
|
2301
|
+
</details>
|
|
2302
|
+
|
|
2303
|
+
---
|
|
2304
|
+
|
|
2073
2305
|
### `queryAccessLogs`
|
|
2074
2306
|
|
|
2075
2307
|
Query API access logs for a specific integration's organization.
|
|
@@ -3299,13 +3531,18 @@ type OutboundIntegrationEventConfiguration = {
|
|
|
3299
3531
|
mappings: Array<{
|
|
3300
3532
|
id?: string // uuid
|
|
3301
3533
|
name: string
|
|
3302
|
-
jsonata_expression
|
|
3534
|
+
jsonata_expression?: string
|
|
3303
3535
|
enabled: boolean
|
|
3304
3536
|
delivery: {
|
|
3305
3537
|
type: { ... }
|
|
3306
3538
|
webhook_id: { ... }
|
|
3307
3539
|
webhook_name?: { ... }
|
|
3308
3540
|
webhook_url?: { ... }
|
|
3541
|
+
} | {
|
|
3542
|
+
type: { ... }
|
|
3543
|
+
retention_days?: { ... }
|
|
3544
|
+
poison_policy?: { ... }
|
|
3545
|
+
max_delivery_attempts?: { ... }
|
|
3309
3546
|
}
|
|
3310
3547
|
created_at?: string // date-time
|
|
3311
3548
|
updated_at?: string // date-time
|
|
@@ -3772,7 +4009,7 @@ type EmbeddedUseCaseRequest = {
|
|
|
3772
4009
|
mappings: Array<{
|
|
3773
4010
|
id?: { ... }
|
|
3774
4011
|
name: { ... }
|
|
3775
|
-
jsonata_expression
|
|
4012
|
+
jsonata_expression?: { ... }
|
|
3776
4013
|
enabled: { ... }
|
|
3777
4014
|
delivery: { ... }
|
|
3778
4015
|
created_at?: { ... }
|
|
@@ -3897,7 +4134,7 @@ type EmbeddedOutboundUseCaseRequest = {
|
|
|
3897
4134
|
mappings: Array<{
|
|
3898
4135
|
id?: { ... }
|
|
3899
4136
|
name: { ... }
|
|
3900
|
-
jsonata_expression
|
|
4137
|
+
jsonata_expression?: { ... }
|
|
3901
4138
|
enabled: { ... }
|
|
3902
4139
|
delivery: { ... }
|
|
3903
4140
|
created_at?: { ... }
|
|
@@ -4070,7 +4307,7 @@ type OutboundUseCase = {
|
|
|
4070
4307
|
mappings: Array<{
|
|
4071
4308
|
id?: { ... }
|
|
4072
4309
|
name: { ... }
|
|
4073
|
-
jsonata_expression
|
|
4310
|
+
jsonata_expression?: { ... }
|
|
4074
4311
|
enabled: { ... }
|
|
4075
4312
|
delivery: { ... }
|
|
4076
4313
|
created_at?: { ... }
|
|
@@ -4235,7 +4472,7 @@ type UseCase = {
|
|
|
4235
4472
|
mappings: Array<{
|
|
4236
4473
|
id?: { ... }
|
|
4237
4474
|
name: { ... }
|
|
4238
|
-
jsonata_expression
|
|
4475
|
+
jsonata_expression?: { ... }
|
|
4239
4476
|
enabled: { ... }
|
|
4240
4477
|
delivery: { ... }
|
|
4241
4478
|
created_at?: { ... }
|
|
@@ -4332,7 +4569,7 @@ type CreateUseCaseRequest = {
|
|
|
4332
4569
|
mappings: Array<{
|
|
4333
4570
|
id?: { ... }
|
|
4334
4571
|
name: { ... }
|
|
4335
|
-
jsonata_expression
|
|
4572
|
+
jsonata_expression?: { ... }
|
|
4336
4573
|
enabled: { ... }
|
|
4337
4574
|
delivery: { ... }
|
|
4338
4575
|
created_at?: { ... }
|
|
@@ -4455,7 +4692,7 @@ type CreateOutboundUseCaseRequest = {
|
|
|
4455
4692
|
mappings: Array<{
|
|
4456
4693
|
id?: { ... }
|
|
4457
4694
|
name: { ... }
|
|
4458
|
-
jsonata_expression
|
|
4695
|
+
jsonata_expression?: { ... }
|
|
4459
4696
|
enabled: { ... }
|
|
4460
4697
|
delivery: { ... }
|
|
4461
4698
|
created_at?: { ... }
|
|
@@ -4592,7 +4829,7 @@ type UpdateUseCaseRequest = {
|
|
|
4592
4829
|
mappings: Array<{
|
|
4593
4830
|
id?: { ... }
|
|
4594
4831
|
name: { ... }
|
|
4595
|
-
jsonata_expression
|
|
4832
|
+
jsonata_expression?: { ... }
|
|
4596
4833
|
enabled: { ... }
|
|
4597
4834
|
delivery: { ... }
|
|
4598
4835
|
created_at?: { ... }
|
|
@@ -4716,7 +4953,7 @@ type UpdateOutboundUseCaseRequest = {
|
|
|
4716
4953
|
mappings: Array<{
|
|
4717
4954
|
id?: { ... }
|
|
4718
4955
|
name: { ... }
|
|
4719
|
-
jsonata_expression
|
|
4956
|
+
jsonata_expression?: { ... }
|
|
4720
4957
|
enabled: { ... }
|
|
4721
4958
|
delivery: { ... }
|
|
4722
4959
|
created_at?: { ... }
|
|
@@ -4874,7 +5111,7 @@ type UseCaseHistoryEntry = {
|
|
|
4874
5111
|
mappings: Array<{
|
|
4875
5112
|
id?: { ... }
|
|
4876
5113
|
name: { ... }
|
|
4877
|
-
jsonata_expression
|
|
5114
|
+
jsonata_expression?: { ... }
|
|
4878
5115
|
enabled: { ... }
|
|
4879
5116
|
delivery: { ... }
|
|
4880
5117
|
created_at?: { ... }
|
|
@@ -5005,7 +5242,7 @@ type OutboundUseCaseHistoryEntry = {
|
|
|
5005
5242
|
mappings: Array<{
|
|
5006
5243
|
id?: { ... }
|
|
5007
5244
|
name: { ... }
|
|
5008
|
-
jsonata_expression
|
|
5245
|
+
jsonata_expression?: { ... }
|
|
5009
5246
|
enabled: { ... }
|
|
5010
5247
|
delivery: { ... }
|
|
5011
5248
|
created_at?: { ... }
|
|
@@ -5808,19 +6045,24 @@ type IntegrationConfigurationV2 = {
|
|
|
5808
6045
|
|
|
5809
6046
|
### `OutboundMapping`
|
|
5810
6047
|
|
|
5811
|
-
A mapping that
|
|
6048
|
+
A mapping that delivers an event to an external system — either pushed to a webhook (with a JSONata payload transformation) or made available on the pull-based poll queue (raw event payload, no transformation)
|
|
5812
6049
|
|
|
5813
6050
|
```ts
|
|
5814
6051
|
type OutboundMapping = {
|
|
5815
6052
|
id?: string // uuid
|
|
5816
6053
|
name: string
|
|
5817
|
-
jsonata_expression
|
|
6054
|
+
jsonata_expression?: string
|
|
5818
6055
|
enabled: boolean
|
|
5819
6056
|
delivery: {
|
|
5820
6057
|
type: "webhook"
|
|
5821
6058
|
webhook_id: string
|
|
5822
6059
|
webhook_name?: string
|
|
5823
6060
|
webhook_url?: string
|
|
6061
|
+
} | {
|
|
6062
|
+
type: "poll"
|
|
6063
|
+
retention_days?: number
|
|
6064
|
+
poison_policy?: "dead_letter" | "block"
|
|
6065
|
+
max_delivery_attempts?: number
|
|
5824
6066
|
}
|
|
5825
6067
|
created_at?: string // date-time
|
|
5826
6068
|
updated_at?: string // date-time
|
|
@@ -5829,7 +6071,7 @@ type OutboundMapping = {
|
|
|
5829
6071
|
|
|
5830
6072
|
### `DeliveryConfig`
|
|
5831
6073
|
|
|
5832
|
-
Configuration for how the
|
|
6074
|
+
Configuration for how the event should be delivered. webhook = push delivery via svc-webhooks (JSONata-transformed payload); poll = pull-based queue delivery where the consumer fetches items via the poll API (raw event payload)
|
|
5833
6075
|
|
|
5834
6076
|
```ts
|
|
5835
6077
|
type DeliveryConfig = {
|
|
@@ -5837,6 +6079,37 @@ type DeliveryConfig = {
|
|
|
5837
6079
|
webhook_id: string
|
|
5838
6080
|
webhook_name?: string
|
|
5839
6081
|
webhook_url?: string
|
|
6082
|
+
} | {
|
|
6083
|
+
type: "poll"
|
|
6084
|
+
retention_days?: number
|
|
6085
|
+
poison_policy?: "dead_letter" | "block"
|
|
6086
|
+
max_delivery_attempts?: number
|
|
6087
|
+
}
|
|
6088
|
+
```
|
|
6089
|
+
|
|
6090
|
+
### `WebhookDeliveryConfig`
|
|
6091
|
+
|
|
6092
|
+
Push delivery of the transformed event to a webhook via svc-webhooks
|
|
6093
|
+
|
|
6094
|
+
```ts
|
|
6095
|
+
type WebhookDeliveryConfig = {
|
|
6096
|
+
type: "webhook"
|
|
6097
|
+
webhook_id: string
|
|
6098
|
+
webhook_name?: string
|
|
6099
|
+
webhook_url?: string
|
|
6100
|
+
}
|
|
6101
|
+
```
|
|
6102
|
+
|
|
6103
|
+
### `PollDeliveryConfig`
|
|
6104
|
+
|
|
6105
|
+
Pull-based queue delivery. Items carry the raw standardized event-catalog payload; no JSONata mapping is applied in poll mode. Consumers fetch and acknowledge items via the poll API.
|
|
6106
|
+
|
|
6107
|
+
```ts
|
|
6108
|
+
type PollDeliveryConfig = {
|
|
6109
|
+
type: "poll"
|
|
6110
|
+
retention_days?: number
|
|
6111
|
+
poison_policy?: "dead_letter" | "block"
|
|
6112
|
+
max_delivery_attempts?: number
|
|
5840
6113
|
}
|
|
5841
6114
|
```
|
|
5842
6115
|
|
|
@@ -5861,6 +6134,14 @@ type OutboundStatusResponse = {
|
|
|
5861
6134
|
webhookId?: { ... }
|
|
5862
6135
|
message: { ... }
|
|
5863
6136
|
}>
|
|
6137
|
+
poll?: {
|
|
6138
|
+
queue_depth: { ... }
|
|
6139
|
+
oldest_unconsumed_age_seconds: { ... }
|
|
6140
|
+
last_poll_at: { ... }
|
|
6141
|
+
last_ack_at: { ... }
|
|
6142
|
+
blocked: { ... }
|
|
6143
|
+
dlq_count: { ... }
|
|
6144
|
+
}
|
|
5864
6145
|
}>
|
|
5865
6146
|
}
|
|
5866
6147
|
```
|
|
@@ -5881,10 +6162,36 @@ type OutboundUseCaseStatus = {
|
|
|
5881
6162
|
}>
|
|
5882
6163
|
status: "ok" | "conflict" | "disabled"
|
|
5883
6164
|
conflicts?: Array<{
|
|
5884
|
-
type: "event_disabled" | "all_webhooks_disabled" | "event_enabled_while_disabled" | "webhook_enabled_while_disabled"
|
|
6165
|
+
type: "event_disabled" | "all_webhooks_disabled" | "event_enabled_while_disabled" | "webhook_enabled_while_disabled" | "stream_blocked" | "dlq_items_present"
|
|
5885
6166
|
webhookId?: string
|
|
5886
6167
|
message: string
|
|
5887
6168
|
}>
|
|
6169
|
+
poll?: {
|
|
6170
|
+
queue_depth: number
|
|
6171
|
+
oldest_unconsumed_age_seconds: number
|
|
6172
|
+
last_poll_at: string // date-time
|
|
6173
|
+
last_ack_at: string // date-time
|
|
6174
|
+
blocked: boolean
|
|
6175
|
+
dlq_count: number
|
|
6176
|
+
}
|
|
6177
|
+
}
|
|
6178
|
+
```
|
|
6179
|
+
|
|
6180
|
+
### `OutboundPollStatus`
|
|
6181
|
+
|
|
6182
|
+
Queue/consumer health for a poll-mode use case. Present only on use
|
|
6183
|
+
cases with a poll delivery mapping — webhook-only use cases are
|
|
6184
|
+
unaffected. Depth/age/DLQ numbers are first-page approximations.
|
|
6185
|
+
|
|
6186
|
+
|
|
6187
|
+
```ts
|
|
6188
|
+
type OutboundPollStatus = {
|
|
6189
|
+
queue_depth: number
|
|
6190
|
+
oldest_unconsumed_age_seconds: number
|
|
6191
|
+
last_poll_at: string // date-time
|
|
6192
|
+
last_ack_at: string // date-time
|
|
6193
|
+
blocked: boolean
|
|
6194
|
+
dlq_count: number
|
|
5888
6195
|
}
|
|
5889
6196
|
```
|
|
5890
6197
|
|
|
@@ -5902,12 +6209,167 @@ type WebhookStatus = {
|
|
|
5902
6209
|
|
|
5903
6210
|
```ts
|
|
5904
6211
|
type OutboundConflict = {
|
|
5905
|
-
type: "event_disabled" | "all_webhooks_disabled" | "event_enabled_while_disabled" | "webhook_enabled_while_disabled"
|
|
6212
|
+
type: "event_disabled" | "all_webhooks_disabled" | "event_enabled_while_disabled" | "webhook_enabled_while_disabled" | "stream_blocked" | "dlq_items_present"
|
|
5906
6213
|
webhookId?: string
|
|
5907
6214
|
message: string
|
|
5908
6215
|
}
|
|
5909
6216
|
```
|
|
5910
6217
|
|
|
6218
|
+
### `PollOutboundMessagesRequest`
|
|
6219
|
+
|
|
6220
|
+
```ts
|
|
6221
|
+
type PollOutboundMessagesRequest = {
|
|
6222
|
+
limit?: number
|
|
6223
|
+
}
|
|
6224
|
+
```
|
|
6225
|
+
|
|
6226
|
+
### `OutboundMessage`
|
|
6227
|
+
|
|
6228
|
+
```ts
|
|
6229
|
+
type OutboundMessage = {
|
|
6230
|
+
id: string
|
|
6231
|
+
lease_token: string
|
|
6232
|
+
use_case_id: string
|
|
6233
|
+
event_name: string
|
|
6234
|
+
event_id: string
|
|
6235
|
+
group: string
|
|
6236
|
+
payload: Record<string, unknown>
|
|
6237
|
+
enqueued_at: string // date-time
|
|
6238
|
+
}
|
|
6239
|
+
```
|
|
6240
|
+
|
|
6241
|
+
### `PollOutboundMessagesResponse`
|
|
6242
|
+
|
|
6243
|
+
```ts
|
|
6244
|
+
type PollOutboundMessagesResponse = {
|
|
6245
|
+
messages: Array<{
|
|
6246
|
+
id: string
|
|
6247
|
+
lease_token: string
|
|
6248
|
+
use_case_id: string
|
|
6249
|
+
event_name: string
|
|
6250
|
+
event_id: string
|
|
6251
|
+
group: string
|
|
6252
|
+
payload: Record<string, unknown>
|
|
6253
|
+
enqueued_at: string // date-time
|
|
6254
|
+
}>
|
|
6255
|
+
visibility_timeout_seconds: number
|
|
6256
|
+
has_more: boolean
|
|
6257
|
+
}
|
|
6258
|
+
```
|
|
6259
|
+
|
|
6260
|
+
### `AckOutboundMessagesRequest`
|
|
6261
|
+
|
|
6262
|
+
```ts
|
|
6263
|
+
type AckOutboundMessagesRequest = {
|
|
6264
|
+
acks: Array<{
|
|
6265
|
+
id: string
|
|
6266
|
+
lease_token: string
|
|
6267
|
+
}>
|
|
6268
|
+
}
|
|
6269
|
+
```
|
|
6270
|
+
|
|
6271
|
+
### `AckResult`
|
|
6272
|
+
|
|
6273
|
+
```ts
|
|
6274
|
+
type AckResult = {
|
|
6275
|
+
id: string
|
|
6276
|
+
status: "accepted" | "rejected"
|
|
6277
|
+
reason?: "stale_lease" | "out_of_order" | "not_found"
|
|
6278
|
+
}
|
|
6279
|
+
```
|
|
6280
|
+
|
|
6281
|
+
### `AckOutboundMessagesResponse`
|
|
6282
|
+
|
|
6283
|
+
```ts
|
|
6284
|
+
type AckOutboundMessagesResponse = {
|
|
6285
|
+
results: Array<{
|
|
6286
|
+
id: string
|
|
6287
|
+
status: "accepted" | "rejected"
|
|
6288
|
+
reason?: "stale_lease" | "out_of_order" | "not_found"
|
|
6289
|
+
}>
|
|
6290
|
+
}
|
|
6291
|
+
```
|
|
6292
|
+
|
|
6293
|
+
### `OutboundDlqMessage`
|
|
6294
|
+
|
|
6295
|
+
```ts
|
|
6296
|
+
type OutboundDlqMessage = {
|
|
6297
|
+
id: string
|
|
6298
|
+
use_case_id: string
|
|
6299
|
+
event_name: string
|
|
6300
|
+
event_id: string
|
|
6301
|
+
enqueued_at?: string // date-time
|
|
6302
|
+
dead_lettered_at: string // date-time
|
|
6303
|
+
delivery_attempts: number
|
|
6304
|
+
reason?: string
|
|
6305
|
+
expires_at?: string // date-time
|
|
6306
|
+
}
|
|
6307
|
+
```
|
|
6308
|
+
|
|
6309
|
+
### `OutboundDlqListResponse`
|
|
6310
|
+
|
|
6311
|
+
```ts
|
|
6312
|
+
type OutboundDlqListResponse = {
|
|
6313
|
+
items: Array<{
|
|
6314
|
+
id: string
|
|
6315
|
+
use_case_id: string
|
|
6316
|
+
event_name: string
|
|
6317
|
+
event_id: string
|
|
6318
|
+
enqueued_at?: string // date-time
|
|
6319
|
+
dead_lettered_at: string // date-time
|
|
6320
|
+
delivery_attempts: number
|
|
6321
|
+
reason?: string
|
|
6322
|
+
expires_at?: string // date-time
|
|
6323
|
+
}>
|
|
6324
|
+
next_token?: string
|
|
6325
|
+
}
|
|
6326
|
+
```
|
|
6327
|
+
|
|
6328
|
+
### `RedriveOutboundDlqRequest`
|
|
6329
|
+
|
|
6330
|
+
```ts
|
|
6331
|
+
type RedriveOutboundDlqRequest = {
|
|
6332
|
+
ids: string[]
|
|
6333
|
+
}
|
|
6334
|
+
```
|
|
6335
|
+
|
|
6336
|
+
### `RedriveOutboundDlqResult`
|
|
6337
|
+
|
|
6338
|
+
```ts
|
|
6339
|
+
type RedriveOutboundDlqResult = {
|
|
6340
|
+
id: string
|
|
6341
|
+
status: "redriven" | "not_found"
|
|
6342
|
+
}
|
|
6343
|
+
```
|
|
6344
|
+
|
|
6345
|
+
### `RedriveOutboundDlqResponse`
|
|
6346
|
+
|
|
6347
|
+
```ts
|
|
6348
|
+
type RedriveOutboundDlqResponse = {
|
|
6349
|
+
results: Array<{
|
|
6350
|
+
id: string
|
|
6351
|
+
status: "redriven" | "not_found"
|
|
6352
|
+
}>
|
|
6353
|
+
}
|
|
6354
|
+
```
|
|
6355
|
+
|
|
6356
|
+
### `UnblockOutboundStreamRequest`
|
|
6357
|
+
|
|
6358
|
+
```ts
|
|
6359
|
+
type UnblockOutboundStreamRequest = {
|
|
6360
|
+
reason?: string
|
|
6361
|
+
}
|
|
6362
|
+
```
|
|
6363
|
+
|
|
6364
|
+
### `UnblockOutboundStreamResponse`
|
|
6365
|
+
|
|
6366
|
+
```ts
|
|
6367
|
+
type UnblockOutboundStreamResponse = {
|
|
6368
|
+
unblocked: boolean
|
|
6369
|
+
dead_lettered_id?: string
|
|
6370
|
+
}
|
|
6371
|
+
```
|
|
6372
|
+
|
|
5911
6373
|
### `RelationConfig`
|
|
5912
6374
|
|
|
5913
6375
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epilot/sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "JavaScript/TypeScript SDK for epilot APIs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -316,6 +316,16 @@
|
|
|
316
316
|
},
|
|
317
317
|
"./workflow-definition/openapi.json": "./definitions/workflow-definition.json"
|
|
318
318
|
},
|
|
319
|
+
"scripts": {
|
|
320
|
+
"generate": "tsx ../../scripts/generate-sdk-v2.ts && pnpm lint:fix",
|
|
321
|
+
"build": "tsup",
|
|
322
|
+
"build:watch": "tsup --watch",
|
|
323
|
+
"test": "vitest run",
|
|
324
|
+
"test:watch": "vitest",
|
|
325
|
+
"lint": "biome check src",
|
|
326
|
+
"lint:fix": "biome check src --fix",
|
|
327
|
+
"prepublishOnly": "npm run build"
|
|
328
|
+
},
|
|
319
329
|
"keywords": [
|
|
320
330
|
"epilot",
|
|
321
331
|
"sdk",
|
|
@@ -506,14 +516,5 @@
|
|
|
506
516
|
"./dist/apis/workflow-definition.d.ts"
|
|
507
517
|
]
|
|
508
518
|
}
|
|
509
|
-
},
|
|
510
|
-
"scripts": {
|
|
511
|
-
"generate": "tsx ../../scripts/generate-sdk-v2.ts && pnpm lint:fix",
|
|
512
|
-
"build": "tsup",
|
|
513
|
-
"build:watch": "tsup --watch",
|
|
514
|
-
"test": "vitest run",
|
|
515
|
-
"test:watch": "vitest",
|
|
516
|
-
"lint": "biome check src",
|
|
517
|
-
"lint:fix": "biome check src --fix"
|
|
518
519
|
}
|
|
519
|
-
}
|
|
520
|
+
}
|