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
@@ -312,47 +313,6 @@ async function completeToken<T>(
312
313
returnapiClient.completeWaitpointToken(tokenId,{ data },$requestOptions);
313
314
}
314
315
315
-
asyncfunctionforHttpCallback<TResult>(
316
-
callback: (url: string)=>Promise<void>,
317
-
options?: {
318
-
timeout?: string|Date|undefined;
319
-
}
320
-
): Promise<HttpCallbackResult<TResult>>{
321
-
//TODO:
322
-
// Support a schema passed in, infer the type, or a generic supplied type
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
328
-
// 5. Create a span around the callback
329
-
// 6. Deal with errors thrown in the callback use `tryCatch()`
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
331
-
// 8. Wait for the waitpoint in the runtime
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
333
-
// 10. Receive the result here and import the packet, then get the result in the right format
// Support a schema passed in, infer the type, or a generic supplied type
750
+
// Support a timeout passed in
751
+
// 1. Make an API call to engine.trigger.dev/v1/waitpoints/http-callback/create. New Waitpoint type "HTTPCallback"
752
+
// 2. Return the url and a waitpoint id (but don't block the run yet)
753
+
// 3. Create a span for the main call
754
+
// 4. Set the url and waitpoint entity type and id as attributes on the parent span
755
+
// 5. Create a span around the callback
756
+
// 6. Deal with errors thrown in the callback use `tryCatch()`
757
+
// 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
758
+
// 8. Wait for the waitpoint in the runtime
759
+
// 9. On the backend when the API is hit, complete the waitpoint with the result api.trigger.dev/v1/waitpoints/http-callback/{waitpointId}/callback
760
+
// 10. Receive the result here and import the packet, then get the result in the right format
0 commit comments