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
// Support a schema passed in, infer the type, or a generic supplied type
317
-
// 1. Create a span for the main call
318
-
// 2. Make an API call to api.trigger.dev/v1/http-callback/create
319
-
// 3. Return the successUrl and failureUrl and a waitpoint id (but don't block the run yet)
320
-
// 4. Set the successUrl, failureUrl and waitpoint entity type and id as attributes on the parent span
323
+
// Support a timeout passed in
324
+
// 1. Make an API call to engine.trigger.dev/v1/waitpoints/http-callback/create. New Waitpoint type "HTTPCallback"
325
+
// 2. Return the url and a waitpoint id (but don't block the run yet)
326
+
// 3. Create a span for the main call
327
+
// 4. Set the url and waitpoint entity type and id as attributes on the parent span
321
328
// 5. Create a span around the callback
322
329
// 6. Deal with errors thrown in the callback use `tryCatch()`
323
-
// 7. If that callback is successfully called, wait for the waitpoint with an API call to api.trigger.dev/v1/http-callback/wait
330
+
// 7. If that callback is successfully called, wait for the waitpoint with an API call to engine.trigger.dev/v1/waitpoints/http-callback/{waitpointId}/block
324
331
// 8. Wait for the waitpoint in the runtime
325
-
// 9. On the backend when the success/fail API is hit, complete the waitpoint with the result
332
+
// 9. On the backend when the API is hit, complete the waitpoint with the result api.trigger.dev/v1/waitpoints/http-callback/{waitpointId}/callback
326
333
// 10. Receive the result here and import the packet, then get the result in the right format
0 commit comments