@oneblink/sdk-core 8.11.1-beta.3 → 8.11.1

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.
@@ -10,7 +10,8 @@ exports.convertToFormWorkflowEvent = convertToFormWorkflowEvent;
10
10
  function convertToFormWorkflowEvent(webhookSubscription) {
11
11
  const url = new URL(webhookSubscription.callbackUrl);
12
12
  if (url.hostname.endsWith('logic.azure.com') ||
13
- url.hostname.endsWith('logic.azure.us')) {
13
+ url.hostname.endsWith('logic.azure.us') ||
14
+ url.hostname.endsWith('api.powerplatform.com')) {
14
15
  return {
15
16
  type: 'POWER_AUTOMATE_FLOW',
16
17
  label: webhookSubscription.label,
@@ -1 +1 @@
1
- {"version":3,"file":"webhookSubscriptionService.js","sourceRoot":"","sources":["../src/webhookSubscriptionService.ts"],"names":[],"mappings":";;AA8CS,gEAA0B;AA5CnC;;;;;GAKG;AACH,SAAS,0BAA0B,CACjC,mBAA6D;IAE7D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAA;IACpD,IACE,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACxC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EACvC,CAAC;QACD,OAAO;YACL,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,mBAAmB,CAAC,KAAK;YAChC,aAAa,EAAE;gBACb,GAAG,EAAE,mBAAmB,CAAC,WAAW;gBACpC,MAAM,EAAE,mBAAmB,CAAC,MAAM;aACnC;SACF,CAAA;IACH,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QAC3C,OAAO;YACL,IAAI,EAAE,4BAA4B;YAClC,KAAK,EAAE,mBAAmB,CAAC,KAAK;YAChC,aAAa,EAAE;gBACb,GAAG,EAAE,mBAAmB,CAAC,WAAW;gBACpC,MAAM,EAAE,mBAAmB,CAAC,MAAM;aACnC;SACF,CAAA;IACH,CAAC;IAED,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,mBAAmB,CAAC,KAAK;QAChC,aAAa,EAAE;YACb,GAAG,EAAE,mBAAmB,CAAC,WAAW;SACrC;KACF,CAAA;AACH,CAAC","sourcesContent":["import { SubmissionEventTypes } from '@oneblink/types'\n\n/**\n * Converts a Webhook sbuscription into its corresponding Form workflow event\n *\n * @param webhookSubscription The subscription to be converted\n * @returns\n */\nfunction convertToFormWorkflowEvent(\n webhookSubscription: SubmissionEventTypes.WebhookSubscription,\n): SubmissionEventTypes.FormWorkflowEvent {\n const url = new URL(webhookSubscription.callbackUrl)\n if (\n url.hostname.endsWith('logic.azure.com') ||\n url.hostname.endsWith('logic.azure.us')\n ) {\n return {\n type: 'POWER_AUTOMATE_FLOW',\n label: webhookSubscription.label,\n configuration: {\n url: webhookSubscription.callbackUrl,\n formId: webhookSubscription.formId,\n },\n }\n }\n\n if (url.hostname.endsWith('civicplus.com')) {\n return {\n type: 'CP_INTEGRATION_HUB_WEBHOOK',\n label: webhookSubscription.label,\n configuration: {\n url: webhookSubscription.callbackUrl,\n formId: webhookSubscription.formId,\n },\n }\n }\n\n return {\n type: 'CALLBACK',\n label: webhookSubscription.label,\n configuration: {\n url: webhookSubscription.callbackUrl,\n },\n }\n}\n\nexport { convertToFormWorkflowEvent }\n"]}
1
+ {"version":3,"file":"webhookSubscriptionService.js","sourceRoot":"","sources":["../src/webhookSubscriptionService.ts"],"names":[],"mappings":";;AA+CS,gEAA0B;AA7CnC;;;;;GAKG;AACH,SAAS,0BAA0B,CACjC,mBAA6D;IAE7D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAA;IACpD,IACE,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QACxC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QACvC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAC9C,CAAC;QACD,OAAO;YACL,IAAI,EAAE,qBAAqB;YAC3B,KAAK,EAAE,mBAAmB,CAAC,KAAK;YAChC,aAAa,EAAE;gBACb,GAAG,EAAE,mBAAmB,CAAC,WAAW;gBACpC,MAAM,EAAE,mBAAmB,CAAC,MAAM;aACnC;SACF,CAAA;IACH,CAAC;IAED,IAAI,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;QAC3C,OAAO;YACL,IAAI,EAAE,4BAA4B;YAClC,KAAK,EAAE,mBAAmB,CAAC,KAAK;YAChC,aAAa,EAAE;gBACb,GAAG,EAAE,mBAAmB,CAAC,WAAW;gBACpC,MAAM,EAAE,mBAAmB,CAAC,MAAM;aACnC;SACF,CAAA;IACH,CAAC;IAED,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,mBAAmB,CAAC,KAAK;QAChC,aAAa,EAAE;YACb,GAAG,EAAE,mBAAmB,CAAC,WAAW;SACrC;KACF,CAAA;AACH,CAAC","sourcesContent":["import { SubmissionEventTypes } from '@oneblink/types'\n\n/**\n * Converts a Webhook sbuscription into its corresponding Form workflow event\n *\n * @param webhookSubscription The subscription to be converted\n * @returns\n */\nfunction convertToFormWorkflowEvent(\n webhookSubscription: SubmissionEventTypes.WebhookSubscription,\n): SubmissionEventTypes.FormWorkflowEvent {\n const url = new URL(webhookSubscription.callbackUrl)\n if (\n url.hostname.endsWith('logic.azure.com') ||\n url.hostname.endsWith('logic.azure.us') ||\n url.hostname.endsWith('api.powerplatform.com')\n ) {\n return {\n type: 'POWER_AUTOMATE_FLOW',\n label: webhookSubscription.label,\n configuration: {\n url: webhookSubscription.callbackUrl,\n formId: webhookSubscription.formId,\n },\n }\n }\n\n if (url.hostname.endsWith('civicplus.com')) {\n return {\n type: 'CP_INTEGRATION_HUB_WEBHOOK',\n label: webhookSubscription.label,\n configuration: {\n url: webhookSubscription.callbackUrl,\n formId: webhookSubscription.formId,\n },\n }\n }\n\n return {\n type: 'CALLBACK',\n label: webhookSubscription.label,\n configuration: {\n url: webhookSubscription.callbackUrl,\n },\n }\n}\n\nexport { convertToFormWorkflowEvent }\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oneblink/sdk-core",
3
3
  "description": "OneBlink SDK for JavaScript (works in Browsers and NodeJS)",
4
- "version": "8.11.1-beta.3",
4
+ "version": "8.11.1",
5
5
  "author": "OneBlink <developers@oneblink.io> (https://oneblink.io)",
6
6
  "bugs": {
7
7
  "url": "https://github.com/oneblink/sdk-core-js/issues"