-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/hotwax/job-manager into #2f…
…2h8hu
- Loading branch information
Showing
24 changed files
with
486 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import api from '@/api' | ||
|
||
const fetchShopifyWebhooks = async (payload?: any): Promise <any> => { | ||
return api({ | ||
url: "/service/getShopifyWebhooks", | ||
method: "post", | ||
data: payload | ||
}); | ||
} | ||
|
||
// TODO: add the service endpoint for the new order webhook | ||
const subscribeNewOrderWebhook = async (payload?: any): Promise <any> => { | ||
return api ({ | ||
url: '', | ||
method: 'post', | ||
data: payload | ||
}) | ||
} | ||
|
||
// TODO: add the service endpoint for the cancelled order webhook | ||
const subscribeCancelledOrderWebhook = async (payload?: any): Promise <any> => { | ||
return api ({ | ||
url: '', | ||
method: 'post', | ||
data: payload | ||
}) | ||
} | ||
|
||
// TODO: add the service endpoint for the payment status webhook | ||
const subscribePaymentStatusWebhook = async (payload?: any): Promise <any> => { | ||
return api ({ | ||
url: '', | ||
method: 'post', | ||
data: payload | ||
}) | ||
} | ||
|
||
// TODO: add the service endpoint for the order return webhook | ||
const subscribeReturnWebhook = async (payload?: any): Promise <any> => { | ||
return api ({ | ||
url: '', | ||
method: 'post', | ||
data: payload | ||
}) | ||
} | ||
|
||
// TODO: add the service endpoint for the new product webhook | ||
const subscribeNewProductsWebhook = async (payload?: any): Promise <any> => { | ||
return api ({ | ||
url: '', | ||
method: 'post', | ||
data: payload | ||
}) | ||
} | ||
|
||
const subscribeDeleteProductsWebhook = async (payload?: any): Promise <any> => { | ||
return api ({ | ||
url: 'service/subscribeProductDeleteWebhook', | ||
method: 'post', | ||
data: payload | ||
}) | ||
} | ||
|
||
const subscribeFileStatusUpdateWebhook = async (payload?: any): Promise <any> => { | ||
return api ({ | ||
url: 'service/subscribeFileStatusUpdateWebhook', | ||
method: 'post', | ||
data: payload | ||
}) | ||
} | ||
|
||
const unsubscribeWebhook = async (payload?: any): Promise <any> => { | ||
return api ({ | ||
url: 'service/removeShopifyWebhook', | ||
method: 'post', | ||
data: payload | ||
}) | ||
} | ||
|
||
export const WebhookService = { | ||
fetchShopifyWebhooks, | ||
subscribeNewOrderWebhook, | ||
subscribeCancelledOrderWebhook, | ||
subscribeFileStatusUpdateWebhook, | ||
subscribePaymentStatusWebhook, | ||
subscribeReturnWebhook, | ||
subscribeNewProductsWebhook, | ||
subscribeDeleteProductsWebhook, | ||
unsubscribeWebhook | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default interface WebhookState { | ||
cached: any | ||
} |
Oops, something went wrong.