@vm0/cli 9.238.3 → 9.238.5
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/{agent-CTMIX4TA.js → agent-KS3ULPSZ.js} +6 -8
- package/{agent-CTMIX4TA.js.map → agent-KS3ULPSZ.js.map} +1 -1
- package/{banking-7EIKU7WX.js → banking-2B3GDOIE.js} +4 -6
- package/{banking-7EIKU7WX.js.map → banking-2B3GDOIE.js.map} +1 -1
- package/bill.generated-5FJHQPXY.js +16 -0
- package/bill.generated-5FJHQPXY.js.map +1 -0
- package/bill.generated-HYFQCA2Q.js +16 -0
- package/bill.generated-HYFQCA2Q.js.map +1 -0
- package/{chat-5MN7N3LD.js → chat-HP7XYF7H.js} +5 -7
- package/{chat-5MN7N3LD.js.map → chat-HP7XYF7H.js.map} +1 -1
- package/{chunk-65ZW3GHG.js → chunk-EJBHYDGP.js} +5 -7
- package/{chunk-65ZW3GHG.js.map → chunk-EJBHYDGP.js.map} +1 -1
- package/{chunk-XX3HVOWG.js → chunk-GIACTMOF.js} +18 -1015
- package/chunk-GIACTMOF.js.map +1 -0
- package/{chunk-ADBNTM34.js → chunk-H4Y7JDZB.js} +1947 -78
- package/chunk-H4Y7JDZB.js.map +1 -0
- package/{chunk-3LJFZEZ5.js → chunk-OCOHCUE3.js} +922 -290
- package/chunk-OCOHCUE3.js.map +1 -0
- package/{chunk-NAFRQSTL.js → chunk-T3XOMNS6.js} +3 -3
- package/{chunk-3SWR53IF.js → chunk-TEJZT6KB.js} +4 -4
- package/{chunk-3SZJPIMX.js → chunk-UHVWYX44.js} +2 -2
- package/{chunk-22VWTDX6.js → chunk-VC7E6IA7.js} +2830 -1325
- package/chunk-VC7E6IA7.js.map +1 -0
- package/{chunk-WPUM3KGN.js → chunk-VUER2HGS.js} +2 -2
- package/{chunk-4ODVSQ6H.js → chunk-YQ5ZYQN3.js} +2 -2
- package/{computer-use-JW6NHZFY.js → computer-use-6GZVM5S6.js} +3 -4
- package/{computer-use-JW6NHZFY.js.map → computer-use-6GZVM5S6.js.map} +1 -1
- package/{connector-II52GGER.js → connector-SFMD6HBQ.js} +5 -7
- package/{connector-II52GGER.js.map → connector-SFMD6HBQ.js.map} +1 -1
- package/copper.generated-PZRA3BV7.js +16 -0
- package/copper.generated-PZRA3BV7.js.map +1 -0
- package/copper.generated-UBWQDA5K.js +16 -0
- package/copper.generated-UBWQDA5K.js.map +1 -0
- package/{credit-SDMLLER2.js → credit-B465R4TF.js} +5 -7
- package/{credit-SDMLLER2.js.map → credit-B465R4TF.js.map} +1 -1
- package/datadog.generated-S4YB2V57.js +16 -0
- package/datadog.generated-S4YB2V57.js.map +1 -0
- package/datadog.generated-Z3O2DYLP.js +16 -0
- package/datadog.generated-Z3O2DYLP.js.map +1 -0
- package/{developer-support-7OGYYIJ2.js → developer-support-6GM2UW5P.js} +3 -4
- package/{developer-support-7OGYYIJ2.js.map → developer-support-6GM2UW5P.js.map} +1 -1
- package/{doctor-UJIIOA33.js → doctor-Z3HFRIKJ.js} +104 -18
- package/doctor-Z3HFRIKJ.js.map +1 -0
- package/expensify.generated-G2ZGBKBQ.js +16 -0
- package/expensify.generated-G2ZGBKBQ.js.map +1 -0
- package/expensify.generated-OHAW3AHP.js +16 -0
- package/expensify.generated-OHAW3AHP.js.map +1 -0
- package/{generate-DPGQKZTH.js → generate-37CJMAVG.js} +5 -7
- package/{generate-DPGQKZTH.js.map → generate-37CJMAVG.js.map} +1 -1
- package/{github-DA62AJIQ.js → github-6CSR7332.js} +3 -4
- package/{github-DA62AJIQ.js.map → github-6CSR7332.js.map} +1 -1
- package/{goal-WWM7OYBQ.js → goal-XURMW5OS.js} +3 -4
- package/{goal-WWM7OYBQ.js.map → goal-XURMW5OS.js.map} +1 -1
- package/google-contacts.generated-FL6Z7MTD.js +16 -0
- package/google-contacts.generated-FL6Z7MTD.js.map +1 -0
- package/google-contacts.generated-Q67YBTPW.js +16 -0
- package/google-contacts.generated-Q67YBTPW.js.map +1 -0
- package/google-forms.generated-AOKO24AB.js +16 -0
- package/google-forms.generated-AOKO24AB.js.map +1 -0
- package/google-forms.generated-KDCHIV43.js +16 -0
- package/google-forms.generated-KDCHIV43.js.map +1 -0
- package/{host-YMKJGV6R.js → host-EVFNV5BX.js} +4 -6
- package/{host-YMKJGV6R.js.map → host-EVFNV5BX.js.map} +1 -1
- package/index.js +14 -17
- package/index.js.map +1 -1
- package/{logs-FKXVE6QD.js → logs-DR7ZTWBK.js} +7 -10
- package/{logs-FKXVE6QD.js.map → logs-DR7ZTWBK.js.map} +1 -1
- package/{maps-MWMFHA72.js → maps-IAVJJMRT.js} +4 -6
- package/{maps-MWMFHA72.js.map → maps-IAVJJMRT.js.map} +1 -1
- package/{memory-KAGWT3GE.js → memory-X765S3ZI.js} +4 -6
- package/{memory-KAGWT3GE.js.map → memory-X765S3ZI.js.map} +1 -1
- package/{model-67UDE3IM.js → model-ZYVNUG47.js} +6 -8
- package/{model-67UDE3IM.js.map → model-ZYVNUG47.js.map} +1 -1
- package/{model-provider-YGNGMT6S.js → model-provider-SZIIRXS3.js} +5 -7
- package/{model-provider-YGNGMT6S.js.map → model-provider-SZIIRXS3.js.map} +1 -1
- package/netsuite.generated-3NXSZOXT.js +16 -0
- package/netsuite.generated-3NXSZOXT.js.map +1 -0
- package/netsuite.generated-XV3WXA4I.js +16 -0
- package/netsuite.generated-XV3WXA4I.js.map +1 -0
- package/{org-L52CQ6HJ.js → org-GBDLJZSE.js} +10 -12
- package/{org-L52CQ6HJ.js.map → org-GBDLJZSE.js.map} +1 -1
- package/package.json +1 -1
- package/paypal.generated-MDKROCJG.js +16 -0
- package/paypal.generated-MDKROCJG.js.map +1 -0
- package/paypal.generated-YZYYL7HX.js +16 -0
- package/paypal.generated-YZYYL7HX.js.map +1 -0
- package/{phone-VYQKHTRX.js → phone-KA4NZFQC.js} +4 -6
- package/{phone-VYQKHTRX.js.map → phone-KA4NZFQC.js.map} +1 -1
- package/{preference-7ULJO7RD.js → preference-TEMJHA73.js} +4 -6
- package/{preference-7ULJO7RD.js.map → preference-TEMJHA73.js.map} +1 -1
- package/ramp.generated-GDRLFPGX.js +16 -0
- package/ramp.generated-GDRLFPGX.js.map +1 -0
- package/ramp.generated-RJKZQLIG.js +16 -0
- package/ramp.generated-RJKZQLIG.js.map +1 -0
- package/{relationship-TNCKBWUW.js → relationship-OXV2SPNL.js} +4 -6
- package/{relationship-TNCKBWUW.js.map → relationship-OXV2SPNL.js.map} +1 -1
- package/{resource-V4AXTBFL.js → resource-2WREU3GR.js} +4 -6
- package/{resource-V4AXTBFL.js.map → resource-2WREU3GR.js.map} +1 -1
- package/{search-ABCFRK5K.js → search-V5V5IHY7.js} +7 -10
- package/{search-ABCFRK5K.js.map → search-V5V5IHY7.js.map} +1 -1
- package/{secret-6C53IEKW.js → secret-LIAHG47P.js} +12 -26
- package/secret-LIAHG47P.js.map +1 -0
- package/{slack-H4OQPL4A.js → slack-BUOXO2HU.js} +4 -6
- package/{slack-H4OQPL4A.js.map → slack-BUOXO2HU.js.map} +1 -1
- package/{teams-RLQBP3SK.js → teams-G7TYHRJB.js} +4 -6
- package/{teams-RLQBP3SK.js.map → teams-G7TYHRJB.js.map} +1 -1
- package/{telegram-TKQOVOWL.js → telegram-DEHNZSEN.js} +4 -6
- package/{telegram-TKQOVOWL.js.map → telegram-DEHNZSEN.js.map} +1 -1
- package/{variable-5PRGXPQX.js → variable-RMYF6NVZ.js} +4 -6
- package/{variable-5PRGXPQX.js.map → variable-RMYF6NVZ.js.map} +1 -1
- package/{video-CVM7TXWW.js → video-XEYMVSIU.js} +2 -3
- package/{video-CVM7TXWW.js.map → video-XEYMVSIU.js.map} +1 -1
- package/{web-E3KRU54R.js → web-4REDKON3.js} +3 -4
- package/{web-E3KRU54R.js.map → web-4REDKON3.js.map} +1 -1
- package/{whoami-7JOZNZEZ.js → whoami-66W7DPQX.js} +6 -8
- package/{whoami-7JOZNZEZ.js.map → whoami-66W7DPQX.js.map} +1 -1
- package/workday.generated-4MPT7O3V.js +16 -0
- package/workday.generated-4MPT7O3V.js.map +1 -0
- package/workday.generated-AHL44LEE.js +16 -0
- package/workday.generated-AHL44LEE.js.map +1 -0
- package/{workflow-RAR37LR4.js → workflow-PBJVC6HV.js} +5 -7
- package/workflow-PBJVC6HV.js.map +1 -0
- package/zero.js +34 -51
- package/zero.js.map +1 -1
- package/automation-7MAK66QT.js +0 -31
- package/automation-7MAK66QT.js.map +0 -1
- package/chunk-22VWTDX6.js.map +0 -1
- package/chunk-3LJFZEZ5.js.map +0 -1
- package/chunk-ADBNTM34.js.map +0 -1
- package/chunk-JUTUEPIR.js +0 -512
- package/chunk-JUTUEPIR.js.map +0 -1
- package/chunk-NBAZLPV3.js +0 -1301
- package/chunk-NBAZLPV3.js.map +0 -1
- package/chunk-XX3HVOWG.js.map +0 -1
- package/doctor-UJIIOA33.js.map +0 -1
- package/schedule-OSHL7HWT.js +0 -33
- package/schedule-OSHL7HWT.js.map +0 -1
- package/secret-6C53IEKW.js.map +0 -1
- package/workflow-RAR37LR4.js.map +0 -1
- /package/{chunk-NAFRQSTL.js.map → chunk-T3XOMNS6.js.map} +0 -0
- /package/{chunk-3SWR53IF.js.map → chunk-TEJZT6KB.js.map} +0 -0
- /package/{chunk-3SZJPIMX.js.map → chunk-UHVWYX44.js.map} +0 -0
- /package/{chunk-WPUM3KGN.js.map → chunk-VUER2HGS.js.map} +0 -0
- /package/{chunk-4ODVSQ6H.js.map → chunk-YQ5ZYQN3.js.map} +0 -0
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __createRequire } from "node:module";
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
hasBaseUrlParams,
|
|
6
|
+
hasRawWhitespace,
|
|
7
|
+
hasUnsafeFirewallPath,
|
|
8
|
+
hasUnsafeUrlCodepoint,
|
|
9
|
+
parseSegment,
|
|
10
|
+
splitPathSegments,
|
|
11
|
+
validateAuthBaseUrl,
|
|
12
|
+
validateBaseUrl
|
|
13
|
+
} from "./chunk-GIACTMOF.js";
|
|
4
14
|
import {
|
|
5
15
|
external_exports
|
|
6
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VC7E6IA7.js";
|
|
7
17
|
import {
|
|
8
18
|
init_esm_shims
|
|
9
19
|
} from "./chunk-DIRAZ3YX.js";
|
|
@@ -547,6 +557,63 @@ var googleCalendar = {
|
|
|
547
557
|
}
|
|
548
558
|
};
|
|
549
559
|
|
|
560
|
+
// ../../packages/connectors/src/connectors/google-contacts.ts
|
|
561
|
+
init_esm_shims();
|
|
562
|
+
var googleContacts = {
|
|
563
|
+
"google-contacts": {
|
|
564
|
+
label: "Google Contacts",
|
|
565
|
+
category: "communication-collaboration",
|
|
566
|
+
tags: ["contacts", "address-book", "people"],
|
|
567
|
+
helpText: "Connect your Google account to access and manage contacts and contact groups",
|
|
568
|
+
authMethods: {
|
|
569
|
+
oauth: {
|
|
570
|
+
featureFlag: "googleContactsConnector" /* GoogleContactsConnector */,
|
|
571
|
+
label: "OAuth (Recommended)",
|
|
572
|
+
helpText: "Sign in with Google to grant Google Contacts access.",
|
|
573
|
+
client: {
|
|
574
|
+
clientRegistration: "static",
|
|
575
|
+
clientType: "confidential",
|
|
576
|
+
clientIdEnv: "GOOGLE_OAUTH_CLIENT_ID",
|
|
577
|
+
clientSecretEnv: "GOOGLE_OAUTH_CLIENT_SECRET"
|
|
578
|
+
},
|
|
579
|
+
storage: {
|
|
580
|
+
secrets: [
|
|
581
|
+
"GOOGLE_CONTACTS_ACCESS_TOKEN",
|
|
582
|
+
"GOOGLE_CONTACTS_REFRESH_TOKEN"
|
|
583
|
+
],
|
|
584
|
+
variables: []
|
|
585
|
+
},
|
|
586
|
+
grant: {
|
|
587
|
+
kind: "auth-code",
|
|
588
|
+
scopes: [
|
|
589
|
+
"https://www.googleapis.com/auth/contacts",
|
|
590
|
+
"https://www.googleapis.com/auth/userinfo.email"
|
|
591
|
+
],
|
|
592
|
+
outputs: {
|
|
593
|
+
accessToken: "$secrets.GOOGLE_CONTACTS_ACCESS_TOKEN",
|
|
594
|
+
refreshToken: "$secrets.GOOGLE_CONTACTS_REFRESH_TOKEN"
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
access: {
|
|
598
|
+
kind: "refresh-token",
|
|
599
|
+
inputs: {
|
|
600
|
+
refreshToken: "$secrets.GOOGLE_CONTACTS_REFRESH_TOKEN"
|
|
601
|
+
},
|
|
602
|
+
outputs: {
|
|
603
|
+
accessToken: "$secrets.GOOGLE_CONTACTS_ACCESS_TOKEN",
|
|
604
|
+
refreshToken: "$secrets.GOOGLE_CONTACTS_REFRESH_TOKEN"
|
|
605
|
+
},
|
|
606
|
+
refreshableSecrets: ["GOOGLE_CONTACTS_ACCESS_TOKEN"],
|
|
607
|
+
envBindings: {
|
|
608
|
+
GOOGLE_CONTACTS_TOKEN: "$secrets.GOOGLE_CONTACTS_ACCESS_TOKEN"
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
revoke: { kind: "none" }
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
|
|
550
617
|
// ../../packages/connectors/src/connectors/google-docs.ts
|
|
551
618
|
init_esm_shims();
|
|
552
619
|
var googleDocs = {
|
|
@@ -599,6 +666,61 @@ var googleDocs = {
|
|
|
599
666
|
}
|
|
600
667
|
};
|
|
601
668
|
|
|
669
|
+
// ../../packages/connectors/src/connectors/google-forms.ts
|
|
670
|
+
init_esm_shims();
|
|
671
|
+
var googleForms = {
|
|
672
|
+
"google-forms": {
|
|
673
|
+
label: "Google Forms",
|
|
674
|
+
category: "docs-files-knowledge",
|
|
675
|
+
tags: ["forms", "surveys", "questionnaires", "responses"],
|
|
676
|
+
helpText: "Connect your Google account to create and manage forms and read responses",
|
|
677
|
+
authMethods: {
|
|
678
|
+
oauth: {
|
|
679
|
+
featureFlag: "googleFormsConnector" /* GoogleFormsConnector */,
|
|
680
|
+
label: "OAuth (Recommended)",
|
|
681
|
+
helpText: "Sign in with Google to grant Google Forms access.",
|
|
682
|
+
client: {
|
|
683
|
+
clientRegistration: "static",
|
|
684
|
+
clientType: "confidential",
|
|
685
|
+
clientIdEnv: "GOOGLE_OAUTH_CLIENT_ID",
|
|
686
|
+
clientSecretEnv: "GOOGLE_OAUTH_CLIENT_SECRET"
|
|
687
|
+
},
|
|
688
|
+
storage: {
|
|
689
|
+
secrets: ["GOOGLE_FORMS_ACCESS_TOKEN", "GOOGLE_FORMS_REFRESH_TOKEN"],
|
|
690
|
+
variables: []
|
|
691
|
+
},
|
|
692
|
+
grant: {
|
|
693
|
+
kind: "auth-code",
|
|
694
|
+
scopes: [
|
|
695
|
+
"https://www.googleapis.com/auth/forms.body",
|
|
696
|
+
"https://www.googleapis.com/auth/forms.responses.readonly",
|
|
697
|
+
"https://www.googleapis.com/auth/userinfo.email"
|
|
698
|
+
],
|
|
699
|
+
outputs: {
|
|
700
|
+
accessToken: "$secrets.GOOGLE_FORMS_ACCESS_TOKEN",
|
|
701
|
+
refreshToken: "$secrets.GOOGLE_FORMS_REFRESH_TOKEN"
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
access: {
|
|
705
|
+
kind: "refresh-token",
|
|
706
|
+
inputs: {
|
|
707
|
+
refreshToken: "$secrets.GOOGLE_FORMS_REFRESH_TOKEN"
|
|
708
|
+
},
|
|
709
|
+
outputs: {
|
|
710
|
+
accessToken: "$secrets.GOOGLE_FORMS_ACCESS_TOKEN",
|
|
711
|
+
refreshToken: "$secrets.GOOGLE_FORMS_REFRESH_TOKEN"
|
|
712
|
+
},
|
|
713
|
+
refreshableSecrets: ["GOOGLE_FORMS_ACCESS_TOKEN"],
|
|
714
|
+
envBindings: {
|
|
715
|
+
GOOGLE_FORMS_TOKEN: "$secrets.GOOGLE_FORMS_ACCESS_TOKEN"
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
revoke: { kind: "none" }
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
|
|
602
724
|
// ../../packages/connectors/src/connectors/google-cloud.ts
|
|
603
725
|
init_esm_shims();
|
|
604
726
|
var googleCloud = {
|
|
@@ -4096,6 +4218,41 @@ var bfl = {
|
|
|
4096
4218
|
}
|
|
4097
4219
|
};
|
|
4098
4220
|
|
|
4221
|
+
// ../../packages/connectors/src/connectors/bill.ts
|
|
4222
|
+
init_esm_shims();
|
|
4223
|
+
var bill = {
|
|
4224
|
+
bill: {
|
|
4225
|
+
label: "BILL",
|
|
4226
|
+
category: "sales-crm-business-operations",
|
|
4227
|
+
tags: ["bill.com", "accounts payable", "expenses", "budgets"],
|
|
4228
|
+
helpText: "Connect BILL to manage Spend & Expense budgets, users, cards, transactions, and reimbursements",
|
|
4229
|
+
authMethods: {
|
|
4230
|
+
"api-token": {
|
|
4231
|
+
featureFlag: "billConnector" /* BillConnector */,
|
|
4232
|
+
label: "Spend & Expense API Token",
|
|
4233
|
+
helpText: "1. Sign in to BILL\n2. Open **Settings** and select **API & Webhooks**\n3. Create a Spend & Expense API token\n4. Copy the token",
|
|
4234
|
+
storage: { secrets: ["BILL_TOKEN"], variables: [] },
|
|
4235
|
+
grant: {
|
|
4236
|
+
kind: "manual",
|
|
4237
|
+
fields: {
|
|
4238
|
+
BILL_TOKEN: {
|
|
4239
|
+
label: "API Token",
|
|
4240
|
+
publicId: "apiToken",
|
|
4241
|
+
required: true,
|
|
4242
|
+
placeholder: "CoffeeSafeLocalCoffeeSafeLocal"
|
|
4243
|
+
}
|
|
4244
|
+
}
|
|
4245
|
+
},
|
|
4246
|
+
access: {
|
|
4247
|
+
kind: "static",
|
|
4248
|
+
envBindings: { BILL_TOKEN: "$secrets.BILL_TOKEN" }
|
|
4249
|
+
},
|
|
4250
|
+
revoke: { kind: "none" }
|
|
4251
|
+
}
|
|
4252
|
+
}
|
|
4253
|
+
}
|
|
4254
|
+
};
|
|
4255
|
+
|
|
4099
4256
|
// ../../packages/connectors/src/connectors/bitrefill.ts
|
|
4100
4257
|
init_esm_shims();
|
|
4101
4258
|
var bitrefill = {
|
|
@@ -4701,7 +4858,53 @@ var calCom = {
|
|
|
4701
4858
|
category: "meetings-scheduling",
|
|
4702
4859
|
helpText: "Connect your Cal.com account to manage scheduling, bookings, and calendar events",
|
|
4703
4860
|
authMethods: {
|
|
4861
|
+
oauth: {
|
|
4862
|
+
featureFlag: "calComConnector" /* CalComConnector */,
|
|
4863
|
+
label: "OAuth (Recommended)",
|
|
4864
|
+
helpText: "Sign in with Cal.com to grant scheduling access.",
|
|
4865
|
+
client: {
|
|
4866
|
+
clientRegistration: "static",
|
|
4867
|
+
clientType: "confidential",
|
|
4868
|
+
clientIdEnv: "CALCOM_OAUTH_CLIENT_ID",
|
|
4869
|
+
clientSecretEnv: "CALCOM_OAUTH_CLIENT_SECRET"
|
|
4870
|
+
},
|
|
4871
|
+
storage: {
|
|
4872
|
+
secrets: ["CALCOM_ACCESS_TOKEN", "CALCOM_REFRESH_TOKEN"],
|
|
4873
|
+
variables: []
|
|
4874
|
+
},
|
|
4875
|
+
grant: {
|
|
4876
|
+
kind: "auth-code",
|
|
4877
|
+
scopes: [
|
|
4878
|
+
"BOOKING_READ",
|
|
4879
|
+
"BOOKING_WRITE",
|
|
4880
|
+
"EVENT_TYPE_READ",
|
|
4881
|
+
"EVENT_TYPE_WRITE",
|
|
4882
|
+
"PROFILE_READ",
|
|
4883
|
+
"SCHEDULE_READ"
|
|
4884
|
+
],
|
|
4885
|
+
outputs: {
|
|
4886
|
+
accessToken: "$secrets.CALCOM_ACCESS_TOKEN",
|
|
4887
|
+
refreshToken: "$secrets.CALCOM_REFRESH_TOKEN"
|
|
4888
|
+
}
|
|
4889
|
+
},
|
|
4890
|
+
access: {
|
|
4891
|
+
kind: "refresh-token",
|
|
4892
|
+
inputs: {
|
|
4893
|
+
refreshToken: "$secrets.CALCOM_REFRESH_TOKEN"
|
|
4894
|
+
},
|
|
4895
|
+
outputs: {
|
|
4896
|
+
accessToken: "$secrets.CALCOM_ACCESS_TOKEN",
|
|
4897
|
+
refreshToken: "$secrets.CALCOM_REFRESH_TOKEN"
|
|
4898
|
+
},
|
|
4899
|
+
refreshableSecrets: ["CALCOM_ACCESS_TOKEN"],
|
|
4900
|
+
envBindings: {
|
|
4901
|
+
CALCOM_TOKEN: "$secrets.CALCOM_ACCESS_TOKEN"
|
|
4902
|
+
}
|
|
4903
|
+
},
|
|
4904
|
+
revoke: { kind: "none" }
|
|
4905
|
+
},
|
|
4704
4906
|
"api-token": {
|
|
4907
|
+
featureFlag: "calComConnector" /* CalComConnector */,
|
|
4705
4908
|
label: "API Token",
|
|
4706
4909
|
helpText: "1. Log in to [Cal.com](https://app.cal.com)\n2. Go to **Settings** \u2192 **Developer** \u2192 **API Keys**\n3. Click **Create API Key**\n4. Copy the generated key",
|
|
4707
4910
|
storage: {
|
|
@@ -5679,6 +5882,41 @@ var coingecko = {
|
|
|
5679
5882
|
}
|
|
5680
5883
|
};
|
|
5681
5884
|
|
|
5885
|
+
// ../../packages/connectors/src/connectors/copper.ts
|
|
5886
|
+
init_esm_shims();
|
|
5887
|
+
var copper = {
|
|
5888
|
+
copper: {
|
|
5889
|
+
label: "Copper",
|
|
5890
|
+
category: "sales-crm-business-operations",
|
|
5891
|
+
tags: ["crm", "sales", "leads", "opportunities", "companies"],
|
|
5892
|
+
helpText: "Connect Copper CRM to search and manage people, companies, leads, opportunities, projects, tasks, and activities",
|
|
5893
|
+
authMethods: {
|
|
5894
|
+
oauth: {
|
|
5895
|
+
featureFlag: "copperConnector" /* CopperConnector */,
|
|
5896
|
+
label: "OAuth (Recommended)",
|
|
5897
|
+
helpText: "Sign in with Copper to grant CRM access.",
|
|
5898
|
+
client: {
|
|
5899
|
+
clientRegistration: "static",
|
|
5900
|
+
clientType: "confidential",
|
|
5901
|
+
clientIdEnv: "COPPER_OAUTH_CLIENT_ID",
|
|
5902
|
+
clientSecretEnv: "COPPER_OAUTH_CLIENT_SECRET"
|
|
5903
|
+
},
|
|
5904
|
+
storage: { secrets: ["COPPER_ACCESS_TOKEN"], variables: [] },
|
|
5905
|
+
grant: {
|
|
5906
|
+
kind: "auth-code",
|
|
5907
|
+
scopes: ["developer/v1/all"],
|
|
5908
|
+
outputs: { accessToken: "$secrets.COPPER_ACCESS_TOKEN" }
|
|
5909
|
+
},
|
|
5910
|
+
access: {
|
|
5911
|
+
kind: "static",
|
|
5912
|
+
envBindings: { COPPER_TOKEN: "$secrets.COPPER_ACCESS_TOKEN" }
|
|
5913
|
+
},
|
|
5914
|
+
revoke: { kind: "none" }
|
|
5915
|
+
}
|
|
5916
|
+
}
|
|
5917
|
+
}
|
|
5918
|
+
};
|
|
5919
|
+
|
|
5682
5920
|
// ../../packages/connectors/src/connectors/coresignal.ts
|
|
5683
5921
|
init_esm_shims();
|
|
5684
5922
|
var coresignal = {
|
|
@@ -5873,6 +6111,68 @@ var customerIo = {
|
|
|
5873
6111
|
}
|
|
5874
6112
|
};
|
|
5875
6113
|
|
|
6114
|
+
// ../../packages/connectors/src/connectors/datadog.ts
|
|
6115
|
+
init_esm_shims();
|
|
6116
|
+
var datadog = {
|
|
6117
|
+
datadog: {
|
|
6118
|
+
label: "Datadog",
|
|
6119
|
+
category: "data-automation-infrastructure",
|
|
6120
|
+
tags: ["observability", "logs", "metrics", "traces", "monitors"],
|
|
6121
|
+
helpText: "Connect Datadog to investigate logs, metrics, traces, dashboards, monitors, incidents, and service health",
|
|
6122
|
+
authMethods: {
|
|
6123
|
+
oauth: {
|
|
6124
|
+
featureFlag: "datadogConnector" /* DatadogConnector */,
|
|
6125
|
+
label: "OAuth (Recommended)",
|
|
6126
|
+
helpText: "Sign in with Datadog and select your Datadog site.",
|
|
6127
|
+
client: {
|
|
6128
|
+
clientRegistration: "static",
|
|
6129
|
+
clientType: "confidential",
|
|
6130
|
+
clientIdEnv: "DATADOG_OAUTH_CLIENT_ID",
|
|
6131
|
+
clientSecretEnv: "DATADOG_OAUTH_CLIENT_SECRET"
|
|
6132
|
+
},
|
|
6133
|
+
storage: {
|
|
6134
|
+
secrets: ["DATADOG_ACCESS_TOKEN", "DATADOG_REFRESH_TOKEN"],
|
|
6135
|
+
variables: ["DATADOG_DOMAIN"]
|
|
6136
|
+
},
|
|
6137
|
+
grant: {
|
|
6138
|
+
kind: "auth-code",
|
|
6139
|
+
scopes: [
|
|
6140
|
+
"dashboards_read",
|
|
6141
|
+
"events_read",
|
|
6142
|
+
"incident_read",
|
|
6143
|
+
"logs_read_index_data",
|
|
6144
|
+
"metrics_read",
|
|
6145
|
+
"monitors_read",
|
|
6146
|
+
"slos_read"
|
|
6147
|
+
],
|
|
6148
|
+
outputs: {
|
|
6149
|
+
accessToken: "$secrets.DATADOG_ACCESS_TOKEN",
|
|
6150
|
+
refreshToken: "$secrets.DATADOG_REFRESH_TOKEN",
|
|
6151
|
+
domain: "$vars.DATADOG_DOMAIN"
|
|
6152
|
+
}
|
|
6153
|
+
},
|
|
6154
|
+
access: {
|
|
6155
|
+
kind: "refresh-token",
|
|
6156
|
+
inputs: {
|
|
6157
|
+
refreshToken: "$secrets.DATADOG_REFRESH_TOKEN",
|
|
6158
|
+
domain: "$vars.DATADOG_DOMAIN"
|
|
6159
|
+
},
|
|
6160
|
+
outputs: {
|
|
6161
|
+
accessToken: "$secrets.DATADOG_ACCESS_TOKEN",
|
|
6162
|
+
refreshToken: "$secrets.DATADOG_REFRESH_TOKEN"
|
|
6163
|
+
},
|
|
6164
|
+
refreshableSecrets: ["DATADOG_ACCESS_TOKEN"],
|
|
6165
|
+
envBindings: {
|
|
6166
|
+
DATADOG_TOKEN: "$secrets.DATADOG_ACCESS_TOKEN",
|
|
6167
|
+
DATADOG_DOMAIN: "$vars.DATADOG_DOMAIN"
|
|
6168
|
+
}
|
|
6169
|
+
},
|
|
6170
|
+
revoke: { kind: "none" }
|
|
6171
|
+
}
|
|
6172
|
+
}
|
|
6173
|
+
}
|
|
6174
|
+
};
|
|
6175
|
+
|
|
5876
6176
|
// ../../packages/connectors/src/connectors/daytona.ts
|
|
5877
6177
|
init_esm_shims();
|
|
5878
6178
|
var daytona = {
|
|
@@ -6764,6 +7064,52 @@ var exa = {
|
|
|
6764
7064
|
}
|
|
6765
7065
|
};
|
|
6766
7066
|
|
|
7067
|
+
// ../../packages/connectors/src/connectors/expensify.ts
|
|
7068
|
+
init_esm_shims();
|
|
7069
|
+
var expensify = {
|
|
7070
|
+
expensify: {
|
|
7071
|
+
label: "Expensify",
|
|
7072
|
+
category: "sales-crm-business-operations",
|
|
7073
|
+
tags: ["expenses", "reports", "reconciliation", "accounting"],
|
|
7074
|
+
helpText: "Connect Expensify Integration Server to export expense reports, reconcile transactions, and manage reports",
|
|
7075
|
+
authMethods: {
|
|
7076
|
+
"api-token": {
|
|
7077
|
+
featureFlag: "expensifyConnector" /* ExpensifyConnector */,
|
|
7078
|
+
label: "Partner Credentials",
|
|
7079
|
+
helpText: "1. Sign in to Expensify\n2. Open [Integration Server credentials](https://www.expensify.com/tools/integrations/)\n3. Generate and copy the partner user ID and partner user secret",
|
|
7080
|
+
storage: {
|
|
7081
|
+
secrets: ["EXPENSIFY_PARTNER_USER_SECRET"],
|
|
7082
|
+
variables: ["EXPENSIFY_PARTNER_USER_ID"]
|
|
7083
|
+
},
|
|
7084
|
+
grant: {
|
|
7085
|
+
kind: "manual",
|
|
7086
|
+
fields: {
|
|
7087
|
+
EXPENSIFY_PARTNER_USER_ID: {
|
|
7088
|
+
label: "Partner User ID",
|
|
7089
|
+
publicId: "partnerUserId",
|
|
7090
|
+
required: true,
|
|
7091
|
+
storage: "variable"
|
|
7092
|
+
},
|
|
7093
|
+
EXPENSIFY_PARTNER_USER_SECRET: {
|
|
7094
|
+
label: "Partner User Secret",
|
|
7095
|
+
publicId: "partnerUserSecret",
|
|
7096
|
+
required: true
|
|
7097
|
+
}
|
|
7098
|
+
}
|
|
7099
|
+
},
|
|
7100
|
+
access: {
|
|
7101
|
+
kind: "static",
|
|
7102
|
+
envBindings: {
|
|
7103
|
+
EXPENSIFY_PARTNER_USER_ID: "$vars.EXPENSIFY_PARTNER_USER_ID",
|
|
7104
|
+
EXPENSIFY_PARTNER_USER_SECRET: "$secrets.EXPENSIFY_PARTNER_USER_SECRET"
|
|
7105
|
+
}
|
|
7106
|
+
},
|
|
7107
|
+
revoke: { kind: "none" }
|
|
7108
|
+
}
|
|
7109
|
+
}
|
|
7110
|
+
}
|
|
7111
|
+
};
|
|
7112
|
+
|
|
6767
7113
|
// ../../packages/connectors/src/connectors/explorium.ts
|
|
6768
7114
|
init_esm_shims();
|
|
6769
7115
|
var explorium = {
|
|
@@ -9823,6 +10169,79 @@ var netdata = {
|
|
|
9823
10169
|
}
|
|
9824
10170
|
};
|
|
9825
10171
|
|
|
10172
|
+
// ../../packages/connectors/src/connectors/netsuite.ts
|
|
10173
|
+
init_esm_shims();
|
|
10174
|
+
var netsuite = {
|
|
10175
|
+
netsuite: {
|
|
10176
|
+
label: "NetSuite",
|
|
10177
|
+
category: "sales-crm-business-operations",
|
|
10178
|
+
tags: ["erp", "accounting", "suiteql", "restlets", "oracle"],
|
|
10179
|
+
helpText: "Connect a NetSuite integration record to access REST Web Services, SuiteQL, and RESTlets with automatically refreshed OAuth tokens",
|
|
10180
|
+
authMethods: {
|
|
10181
|
+
"api-token": {
|
|
10182
|
+
featureFlag: "netSuiteConnector" /* NetSuiteConnector */,
|
|
10183
|
+
label: "OAuth 2.0 Credentials",
|
|
10184
|
+
helpText: "Create an OAuth 2.0 integration record in NetSuite, authorize it once, then provide the account ID, client credentials, and refresh token.",
|
|
10185
|
+
storage: {
|
|
10186
|
+
secrets: [
|
|
10187
|
+
"NETSUITE_CLIENT_SECRET",
|
|
10188
|
+
"NETSUITE_REFRESH_TOKEN",
|
|
10189
|
+
"NETSUITE_ACCESS_TOKEN"
|
|
10190
|
+
],
|
|
10191
|
+
variables: ["NETSUITE_ACCOUNT_SUBDOMAIN", "NETSUITE_CLIENT_ID"]
|
|
10192
|
+
},
|
|
10193
|
+
grant: {
|
|
10194
|
+
kind: "manual",
|
|
10195
|
+
fields: {
|
|
10196
|
+
NETSUITE_ACCOUNT_SUBDOMAIN: {
|
|
10197
|
+
label: "Account Domain Prefix",
|
|
10198
|
+
publicId: "accountSubdomain",
|
|
10199
|
+
required: true,
|
|
10200
|
+
storage: "variable",
|
|
10201
|
+
placeholder: "1234567-sb1"
|
|
10202
|
+
},
|
|
10203
|
+
NETSUITE_CLIENT_ID: {
|
|
10204
|
+
label: "Client ID",
|
|
10205
|
+
publicId: "clientId",
|
|
10206
|
+
required: true,
|
|
10207
|
+
storage: "variable"
|
|
10208
|
+
},
|
|
10209
|
+
NETSUITE_CLIENT_SECRET: {
|
|
10210
|
+
label: "Client Secret",
|
|
10211
|
+
publicId: "clientSecret",
|
|
10212
|
+
required: true
|
|
10213
|
+
},
|
|
10214
|
+
NETSUITE_REFRESH_TOKEN: {
|
|
10215
|
+
label: "Refresh Token",
|
|
10216
|
+
publicId: "refreshToken",
|
|
10217
|
+
required: true
|
|
10218
|
+
}
|
|
10219
|
+
}
|
|
10220
|
+
},
|
|
10221
|
+
access: {
|
|
10222
|
+
kind: "refresh-token",
|
|
10223
|
+
inputs: {
|
|
10224
|
+
accountSubdomain: "$vars.NETSUITE_ACCOUNT_SUBDOMAIN",
|
|
10225
|
+
clientId: "$vars.NETSUITE_CLIENT_ID",
|
|
10226
|
+
clientSecret: "$secrets.NETSUITE_CLIENT_SECRET",
|
|
10227
|
+
refreshToken: "$secrets.NETSUITE_REFRESH_TOKEN"
|
|
10228
|
+
},
|
|
10229
|
+
outputs: {
|
|
10230
|
+
accessToken: "$secrets.NETSUITE_ACCESS_TOKEN",
|
|
10231
|
+
refreshToken: "$secrets.NETSUITE_REFRESH_TOKEN"
|
|
10232
|
+
},
|
|
10233
|
+
refreshableSecrets: ["NETSUITE_ACCESS_TOKEN"],
|
|
10234
|
+
envBindings: {
|
|
10235
|
+
NETSUITE_TOKEN: "$secrets.NETSUITE_ACCESS_TOKEN",
|
|
10236
|
+
NETSUITE_ACCOUNT_SUBDOMAIN: "$vars.NETSUITE_ACCOUNT_SUBDOMAIN"
|
|
10237
|
+
}
|
|
10238
|
+
},
|
|
10239
|
+
revoke: { kind: "none" }
|
|
10240
|
+
}
|
|
10241
|
+
}
|
|
10242
|
+
}
|
|
10243
|
+
};
|
|
10244
|
+
|
|
9826
10245
|
// ../../packages/connectors/src/connectors/novita.ts
|
|
9827
10246
|
init_esm_shims();
|
|
9828
10247
|
var novita = {
|
|
@@ -10243,14 +10662,63 @@ var parallel = {
|
|
|
10243
10662
|
}
|
|
10244
10663
|
};
|
|
10245
10664
|
|
|
10246
|
-
// ../../packages/connectors/src/connectors/
|
|
10665
|
+
// ../../packages/connectors/src/connectors/paypal.ts
|
|
10247
10666
|
init_esm_shims();
|
|
10248
|
-
var
|
|
10249
|
-
|
|
10250
|
-
label: "
|
|
10251
|
-
category: "
|
|
10252
|
-
|
|
10253
|
-
helpText: "Connect
|
|
10667
|
+
var paypal = {
|
|
10668
|
+
paypal: {
|
|
10669
|
+
label: "PayPal",
|
|
10670
|
+
category: "sales-crm-business-operations",
|
|
10671
|
+
tags: ["payments", "orders", "invoices", "payouts", "transactions"],
|
|
10672
|
+
helpText: "Connect a PayPal REST app to manage orders, payments, invoices, payouts, disputes, and transaction reporting",
|
|
10673
|
+
authMethods: {
|
|
10674
|
+
"api-token": {
|
|
10675
|
+
featureFlag: "payPalConnector" /* PayPalConnector */,
|
|
10676
|
+
label: "REST App Credentials",
|
|
10677
|
+
helpText: "1. Open the [PayPal Developer Dashboard](https://developer.paypal.com/dashboard/applications/live)\n2. Create or select a live REST app\n3. Copy the client ID and client secret",
|
|
10678
|
+
storage: {
|
|
10679
|
+
secrets: ["PAYPAL_CLIENT_SECRET", "PAYPAL_ACCESS_TOKEN"],
|
|
10680
|
+
variables: ["PAYPAL_CLIENT_ID"]
|
|
10681
|
+
},
|
|
10682
|
+
grant: {
|
|
10683
|
+
kind: "manual",
|
|
10684
|
+
fields: {
|
|
10685
|
+
PAYPAL_CLIENT_ID: {
|
|
10686
|
+
label: "Client ID",
|
|
10687
|
+
publicId: "clientId",
|
|
10688
|
+
required: true,
|
|
10689
|
+
storage: "variable"
|
|
10690
|
+
},
|
|
10691
|
+
PAYPAL_CLIENT_SECRET: {
|
|
10692
|
+
label: "Client Secret",
|
|
10693
|
+
publicId: "clientSecret",
|
|
10694
|
+
required: true
|
|
10695
|
+
}
|
|
10696
|
+
}
|
|
10697
|
+
},
|
|
10698
|
+
access: {
|
|
10699
|
+
kind: "refresh-token",
|
|
10700
|
+
inputs: {
|
|
10701
|
+
clientId: "$vars.PAYPAL_CLIENT_ID",
|
|
10702
|
+
clientSecret: "$secrets.PAYPAL_CLIENT_SECRET"
|
|
10703
|
+
},
|
|
10704
|
+
outputs: { accessToken: "$secrets.PAYPAL_ACCESS_TOKEN" },
|
|
10705
|
+
refreshableSecrets: ["PAYPAL_ACCESS_TOKEN"],
|
|
10706
|
+
envBindings: { PAYPAL_TOKEN: "$secrets.PAYPAL_ACCESS_TOKEN" }
|
|
10707
|
+
},
|
|
10708
|
+
revoke: { kind: "none" }
|
|
10709
|
+
}
|
|
10710
|
+
}
|
|
10711
|
+
}
|
|
10712
|
+
};
|
|
10713
|
+
|
|
10714
|
+
// ../../packages/connectors/src/connectors/pdf4me.ts
|
|
10715
|
+
init_esm_shims();
|
|
10716
|
+
var pdf4me = {
|
|
10717
|
+
pdf4me: {
|
|
10718
|
+
label: "PDF4me",
|
|
10719
|
+
category: "data-automation-infrastructure",
|
|
10720
|
+
generation: ["document"],
|
|
10721
|
+
helpText: "Connect your PDF4me account to convert, merge, split, compress, and manipulate PDF documents",
|
|
10254
10722
|
authMethods: {
|
|
10255
10723
|
"api-token": {
|
|
10256
10724
|
label: "API Key",
|
|
@@ -11131,6 +11599,44 @@ var qdrant = {
|
|
|
11131
11599
|
}
|
|
11132
11600
|
};
|
|
11133
11601
|
|
|
11602
|
+
// ../../packages/connectors/src/connectors/qiita.ts
|
|
11603
|
+
init_esm_shims();
|
|
11604
|
+
var qiita = {
|
|
11605
|
+
qiita: {
|
|
11606
|
+
label: "Qiita",
|
|
11607
|
+
category: "marketing-content-growth",
|
|
11608
|
+
helpText: "Connect your Qiita account to search, read, and publish technical articles",
|
|
11609
|
+
authMethods: {
|
|
11610
|
+
"api-token": {
|
|
11611
|
+
label: "Access Token",
|
|
11612
|
+
helpText: "1. Log in to [Qiita](https://qiita.com)\n2. Go to **Settings > Applications**\n3. Create a new access token with the desired scopes (e.g., `read_qiita`, `write_qiita`)\n4. Copy the generated token\n5. Use it in API requests with the header `Authorization: Bearer [your_token]`",
|
|
11613
|
+
storage: {
|
|
11614
|
+
secrets: ["QIITA_TOKEN"],
|
|
11615
|
+
variables: []
|
|
11616
|
+
},
|
|
11617
|
+
grant: {
|
|
11618
|
+
kind: "manual",
|
|
11619
|
+
fields: {
|
|
11620
|
+
QIITA_TOKEN: {
|
|
11621
|
+
label: "Access Token",
|
|
11622
|
+
publicId: "accessToken",
|
|
11623
|
+
required: true,
|
|
11624
|
+
placeholder: "your-qiita-access-token"
|
|
11625
|
+
}
|
|
11626
|
+
}
|
|
11627
|
+
},
|
|
11628
|
+
access: {
|
|
11629
|
+
kind: "static",
|
|
11630
|
+
envBindings: {
|
|
11631
|
+
QIITA_TOKEN: "$secrets.QIITA_TOKEN"
|
|
11632
|
+
}
|
|
11633
|
+
},
|
|
11634
|
+
revoke: { kind: "none" }
|
|
11635
|
+
}
|
|
11636
|
+
}
|
|
11637
|
+
}
|
|
11638
|
+
};
|
|
11639
|
+
|
|
11134
11640
|
// ../../packages/connectors/src/connectors/quickbooks.ts
|
|
11135
11641
|
init_esm_shims();
|
|
11136
11642
|
var quickbooks = {
|
|
@@ -11189,44 +11695,6 @@ var quickbooks = {
|
|
|
11189
11695
|
}
|
|
11190
11696
|
};
|
|
11191
11697
|
|
|
11192
|
-
// ../../packages/connectors/src/connectors/qiita.ts
|
|
11193
|
-
init_esm_shims();
|
|
11194
|
-
var qiita = {
|
|
11195
|
-
qiita: {
|
|
11196
|
-
label: "Qiita",
|
|
11197
|
-
category: "marketing-content-growth",
|
|
11198
|
-
helpText: "Connect your Qiita account to search, read, and publish technical articles",
|
|
11199
|
-
authMethods: {
|
|
11200
|
-
"api-token": {
|
|
11201
|
-
label: "Access Token",
|
|
11202
|
-
helpText: "1. Log in to [Qiita](https://qiita.com)\n2. Go to **Settings > Applications**\n3. Create a new access token with the desired scopes (e.g., `read_qiita`, `write_qiita`)\n4. Copy the generated token\n5. Use it in API requests with the header `Authorization: Bearer [your_token]`",
|
|
11203
|
-
storage: {
|
|
11204
|
-
secrets: ["QIITA_TOKEN"],
|
|
11205
|
-
variables: []
|
|
11206
|
-
},
|
|
11207
|
-
grant: {
|
|
11208
|
-
kind: "manual",
|
|
11209
|
-
fields: {
|
|
11210
|
-
QIITA_TOKEN: {
|
|
11211
|
-
label: "Access Token",
|
|
11212
|
-
publicId: "accessToken",
|
|
11213
|
-
required: true,
|
|
11214
|
-
placeholder: "your-qiita-access-token"
|
|
11215
|
-
}
|
|
11216
|
-
}
|
|
11217
|
-
},
|
|
11218
|
-
access: {
|
|
11219
|
-
kind: "static",
|
|
11220
|
-
envBindings: {
|
|
11221
|
-
QIITA_TOKEN: "$secrets.QIITA_TOKEN"
|
|
11222
|
-
}
|
|
11223
|
-
},
|
|
11224
|
-
revoke: { kind: "none" }
|
|
11225
|
-
}
|
|
11226
|
-
}
|
|
11227
|
-
}
|
|
11228
|
-
};
|
|
11229
|
-
|
|
11230
11698
|
// ../../packages/connectors/src/connectors/railway.ts
|
|
11231
11699
|
init_esm_shims();
|
|
11232
11700
|
var railway = {
|
|
@@ -11303,6 +11771,63 @@ var railwayProject = {
|
|
|
11303
11771
|
}
|
|
11304
11772
|
};
|
|
11305
11773
|
|
|
11774
|
+
// ../../packages/connectors/src/connectors/ramp.ts
|
|
11775
|
+
init_esm_shims();
|
|
11776
|
+
var ramp = {
|
|
11777
|
+
ramp: {
|
|
11778
|
+
label: "Ramp",
|
|
11779
|
+
category: "sales-crm-business-operations",
|
|
11780
|
+
tags: ["expenses", "cards", "receipts", "limits", "accounting"],
|
|
11781
|
+
helpText: "Connect a Ramp developer app to access cards, receipts, transactions, reimbursements, users, and spending limits",
|
|
11782
|
+
authMethods: {
|
|
11783
|
+
"api-token": {
|
|
11784
|
+
featureFlag: "rampConnector" /* RampConnector */,
|
|
11785
|
+
label: "Client Credentials",
|
|
11786
|
+
helpText: "1. Open the Ramp Developer Console\n2. Create an app with the Client Credentials grant enabled\n3. Copy the client ID and client secret",
|
|
11787
|
+
storage: {
|
|
11788
|
+
secrets: ["RAMP_CLIENT_SECRET", "RAMP_ACCESS_TOKEN"],
|
|
11789
|
+
variables: ["RAMP_CLIENT_ID", "RAMP_SCOPE"]
|
|
11790
|
+
},
|
|
11791
|
+
grant: {
|
|
11792
|
+
kind: "manual",
|
|
11793
|
+
fields: {
|
|
11794
|
+
RAMP_CLIENT_ID: {
|
|
11795
|
+
label: "Client ID",
|
|
11796
|
+
publicId: "clientId",
|
|
11797
|
+
required: true,
|
|
11798
|
+
storage: "variable"
|
|
11799
|
+
},
|
|
11800
|
+
RAMP_CLIENT_SECRET: {
|
|
11801
|
+
label: "Client Secret",
|
|
11802
|
+
publicId: "clientSecret",
|
|
11803
|
+
required: true
|
|
11804
|
+
},
|
|
11805
|
+
RAMP_SCOPE: {
|
|
11806
|
+
label: "OAuth Scopes",
|
|
11807
|
+
publicId: "scope",
|
|
11808
|
+
required: true,
|
|
11809
|
+
storage: "variable",
|
|
11810
|
+
placeholder: "transactions:read users:read"
|
|
11811
|
+
}
|
|
11812
|
+
}
|
|
11813
|
+
},
|
|
11814
|
+
access: {
|
|
11815
|
+
kind: "refresh-token",
|
|
11816
|
+
inputs: {
|
|
11817
|
+
clientId: "$vars.RAMP_CLIENT_ID",
|
|
11818
|
+
clientSecret: "$secrets.RAMP_CLIENT_SECRET",
|
|
11819
|
+
scope: "$vars.RAMP_SCOPE"
|
|
11820
|
+
},
|
|
11821
|
+
outputs: { accessToken: "$secrets.RAMP_ACCESS_TOKEN" },
|
|
11822
|
+
refreshableSecrets: ["RAMP_ACCESS_TOKEN"],
|
|
11823
|
+
envBindings: { RAMP_TOKEN: "$secrets.RAMP_ACCESS_TOKEN" }
|
|
11824
|
+
},
|
|
11825
|
+
revoke: { kind: "none" }
|
|
11826
|
+
}
|
|
11827
|
+
}
|
|
11828
|
+
}
|
|
11829
|
+
};
|
|
11830
|
+
|
|
11306
11831
|
// ../../packages/connectors/src/connectors/reap.ts
|
|
11307
11832
|
init_esm_shims();
|
|
11308
11833
|
var reap = {
|
|
@@ -13712,6 +14237,88 @@ var wix = {
|
|
|
13712
14237
|
}
|
|
13713
14238
|
};
|
|
13714
14239
|
|
|
14240
|
+
// ../../packages/connectors/src/connectors/workday.ts
|
|
14241
|
+
init_esm_shims();
|
|
14242
|
+
var workday = {
|
|
14243
|
+
workday: {
|
|
14244
|
+
label: "Workday",
|
|
14245
|
+
category: "sales-crm-business-operations",
|
|
14246
|
+
tags: ["hr", "hcm", "workers", "recruiting", "finance"],
|
|
14247
|
+
helpText: "Connect a Workday API client for integrations to access tenant REST APIs with automatically refreshed OAuth tokens",
|
|
14248
|
+
authMethods: {
|
|
14249
|
+
"api-token": {
|
|
14250
|
+
featureFlag: "workdayConnector" /* WorkdayConnector */,
|
|
14251
|
+
label: "Integration OAuth Credentials",
|
|
14252
|
+
helpText: "Register an API Client for Integrations in Workday, generate a refresh token for the integration user, then provide the tenant connection details.",
|
|
14253
|
+
storage: {
|
|
14254
|
+
secrets: [
|
|
14255
|
+
"WORKDAY_CLIENT_SECRET",
|
|
14256
|
+
"WORKDAY_REFRESH_TOKEN",
|
|
14257
|
+
"WORKDAY_ACCESS_TOKEN"
|
|
14258
|
+
],
|
|
14259
|
+
variables: ["WORKDAY_HOST", "WORKDAY_TENANT", "WORKDAY_CLIENT_ID"]
|
|
14260
|
+
},
|
|
14261
|
+
grant: {
|
|
14262
|
+
kind: "manual",
|
|
14263
|
+
fields: {
|
|
14264
|
+
WORKDAY_HOST: {
|
|
14265
|
+
label: "Tenant Host",
|
|
14266
|
+
publicId: "tenantHost",
|
|
14267
|
+
required: true,
|
|
14268
|
+
storage: "variable",
|
|
14269
|
+
normalize: "host",
|
|
14270
|
+
placeholder: "tenant.myworkday.com"
|
|
14271
|
+
},
|
|
14272
|
+
WORKDAY_TENANT: {
|
|
14273
|
+
label: "Tenant Alias",
|
|
14274
|
+
publicId: "tenant",
|
|
14275
|
+
required: true,
|
|
14276
|
+
storage: "variable"
|
|
14277
|
+
},
|
|
14278
|
+
WORKDAY_CLIENT_ID: {
|
|
14279
|
+
label: "Client ID",
|
|
14280
|
+
publicId: "clientId",
|
|
14281
|
+
required: true,
|
|
14282
|
+
storage: "variable"
|
|
14283
|
+
},
|
|
14284
|
+
WORKDAY_CLIENT_SECRET: {
|
|
14285
|
+
label: "Client Secret",
|
|
14286
|
+
publicId: "clientSecret",
|
|
14287
|
+
required: true
|
|
14288
|
+
},
|
|
14289
|
+
WORKDAY_REFRESH_TOKEN: {
|
|
14290
|
+
label: "Refresh Token",
|
|
14291
|
+
publicId: "refreshToken",
|
|
14292
|
+
required: true
|
|
14293
|
+
}
|
|
14294
|
+
}
|
|
14295
|
+
},
|
|
14296
|
+
access: {
|
|
14297
|
+
kind: "refresh-token",
|
|
14298
|
+
inputs: {
|
|
14299
|
+
host: "$vars.WORKDAY_HOST",
|
|
14300
|
+
tenant: "$vars.WORKDAY_TENANT",
|
|
14301
|
+
clientId: "$vars.WORKDAY_CLIENT_ID",
|
|
14302
|
+
clientSecret: "$secrets.WORKDAY_CLIENT_SECRET",
|
|
14303
|
+
refreshToken: "$secrets.WORKDAY_REFRESH_TOKEN"
|
|
14304
|
+
},
|
|
14305
|
+
outputs: {
|
|
14306
|
+
accessToken: "$secrets.WORKDAY_ACCESS_TOKEN",
|
|
14307
|
+
refreshToken: "$secrets.WORKDAY_REFRESH_TOKEN"
|
|
14308
|
+
},
|
|
14309
|
+
refreshableSecrets: ["WORKDAY_ACCESS_TOKEN"],
|
|
14310
|
+
envBindings: {
|
|
14311
|
+
WORKDAY_TOKEN: "$secrets.WORKDAY_ACCESS_TOKEN",
|
|
14312
|
+
WORKDAY_HOST: "$vars.WORKDAY_HOST",
|
|
14313
|
+
WORKDAY_TENANT: "$vars.WORKDAY_TENANT"
|
|
14314
|
+
}
|
|
14315
|
+
},
|
|
14316
|
+
revoke: { kind: "none" }
|
|
14317
|
+
}
|
|
14318
|
+
}
|
|
14319
|
+
}
|
|
14320
|
+
};
|
|
14321
|
+
|
|
13715
14322
|
// ../../packages/connectors/src/connectors/workos.ts
|
|
13716
14323
|
init_esm_shims();
|
|
13717
14324
|
var workos = {
|
|
@@ -14143,7 +14750,9 @@ var CONNECTOR_TYPES_DEF = defineConnectors({
|
|
|
14143
14750
|
...slock,
|
|
14144
14751
|
...googleSheets,
|
|
14145
14752
|
...googleCalendar,
|
|
14753
|
+
...googleContacts,
|
|
14146
14754
|
...googleDocs,
|
|
14755
|
+
...googleForms,
|
|
14147
14756
|
...linear,
|
|
14148
14757
|
...intervalsIcu,
|
|
14149
14758
|
...vercel,
|
|
@@ -14218,6 +14827,7 @@ var CONNECTOR_TYPES_DEF = defineConnectors({
|
|
|
14218
14827
|
...base44,
|
|
14219
14828
|
...bentoml,
|
|
14220
14829
|
...bfl,
|
|
14830
|
+
...bill,
|
|
14221
14831
|
...bitrefill,
|
|
14222
14832
|
...bitrix,
|
|
14223
14833
|
...bland,
|
|
@@ -14247,11 +14857,13 @@ var CONNECTOR_TYPES_DEF = defineConnectors({
|
|
|
14247
14857
|
...cloudinary,
|
|
14248
14858
|
...coda,
|
|
14249
14859
|
...coingecko,
|
|
14860
|
+
...copper,
|
|
14250
14861
|
...coresignal,
|
|
14251
14862
|
...cronlytic,
|
|
14252
14863
|
...crustdata,
|
|
14253
14864
|
...cursor,
|
|
14254
14865
|
...customerIo,
|
|
14866
|
+
...datadog,
|
|
14255
14867
|
...daytona,
|
|
14256
14868
|
...db9,
|
|
14257
14869
|
...deel,
|
|
@@ -14273,6 +14885,7 @@ var CONNECTOR_TYPES_DEF = defineConnectors({
|
|
|
14273
14885
|
...etsy,
|
|
14274
14886
|
...etherscan,
|
|
14275
14887
|
...exa,
|
|
14888
|
+
...expensify,
|
|
14276
14889
|
...explorium,
|
|
14277
14890
|
...faire,
|
|
14278
14891
|
...fal,
|
|
@@ -14341,6 +14954,7 @@ var CONNECTOR_TYPES_DEF = defineConnectors({
|
|
|
14341
14954
|
...n8n,
|
|
14342
14955
|
...neon,
|
|
14343
14956
|
...netdata,
|
|
14957
|
+
...netsuite,
|
|
14344
14958
|
...novita,
|
|
14345
14959
|
...nyne,
|
|
14346
14960
|
...onyx,
|
|
@@ -14351,6 +14965,7 @@ var CONNECTOR_TYPES_DEF = defineConnectors({
|
|
|
14351
14965
|
...outlookMail,
|
|
14352
14966
|
...pandadoc,
|
|
14353
14967
|
...parallel,
|
|
14968
|
+
...paypal,
|
|
14354
14969
|
...pdf4me,
|
|
14355
14970
|
...pdfco,
|
|
14356
14971
|
...pdforge,
|
|
@@ -14372,10 +14987,11 @@ var CONNECTOR_TYPES_DEF = defineConnectors({
|
|
|
14372
14987
|
...productlane,
|
|
14373
14988
|
...pushinator,
|
|
14374
14989
|
...qdrant,
|
|
14375
|
-
...quickbooks,
|
|
14376
14990
|
...qiita,
|
|
14991
|
+
...quickbooks,
|
|
14377
14992
|
...railway,
|
|
14378
14993
|
...railwayProject,
|
|
14994
|
+
...ramp,
|
|
14379
14995
|
...reap,
|
|
14380
14996
|
...reddit,
|
|
14381
14997
|
...reducto,
|
|
@@ -14427,6 +15043,7 @@ var CONNECTOR_TYPES_DEF = defineConnectors({
|
|
|
14427
15043
|
...weread,
|
|
14428
15044
|
...whaleAlert,
|
|
14429
15045
|
...wix,
|
|
15046
|
+
...workday,
|
|
14430
15047
|
...workos,
|
|
14431
15048
|
...wrike,
|
|
14432
15049
|
...youtube,
|
|
@@ -14495,9 +15112,6 @@ function connectorRuntimeEnvBindings(envBindings) {
|
|
|
14495
15112
|
})
|
|
14496
15113
|
);
|
|
14497
15114
|
}
|
|
14498
|
-
function connectorAuthMethodOwnedSecretNames(method) {
|
|
14499
|
-
return method ? [...method.storage.secrets] : [];
|
|
14500
|
-
}
|
|
14501
15115
|
function getConnectorAuthMethodEnvBindings(type, authMethod) {
|
|
14502
15116
|
const method = getConnectorAuthMethod(type, authMethod);
|
|
14503
15117
|
return method ? connectorAccessRuntimeEnvBindings(method.access) : {};
|
|
@@ -14512,31 +15126,6 @@ function getConnectorEnvBindingEntries(type) {
|
|
|
14512
15126
|
}
|
|
14513
15127
|
return entries;
|
|
14514
15128
|
}
|
|
14515
|
-
function getConnectorStoredSecretDisplayInfo(secretName) {
|
|
14516
|
-
const allTypes = CONNECTOR_TYPE_KEYS;
|
|
14517
|
-
for (const type of allTypes) {
|
|
14518
|
-
const config = CONNECTOR_TYPES[type];
|
|
14519
|
-
const found = Object.values(config.authMethods).some((method) => {
|
|
14520
|
-
return connectorAuthMethodOwnedSecretNames(method).includes(secretName);
|
|
14521
|
-
});
|
|
14522
|
-
if (!found) {
|
|
14523
|
-
continue;
|
|
14524
|
-
}
|
|
14525
|
-
const envNames = [
|
|
14526
|
-
...new Set(
|
|
14527
|
-
getConnectorEnvBindingEntries(type).filter(({ valueRef }) => {
|
|
14528
|
-
return valueRef === `$secrets.${secretName}`;
|
|
14529
|
-
}).map(({ envName }) => {
|
|
14530
|
-
return envName;
|
|
14531
|
-
})
|
|
14532
|
-
)
|
|
14533
|
-
];
|
|
14534
|
-
if (envNames.length > 0) {
|
|
14535
|
-
return { connectorLabel: config.label, envNames };
|
|
14536
|
-
}
|
|
14537
|
-
}
|
|
14538
|
-
return null;
|
|
14539
|
-
}
|
|
14540
15129
|
function getDiagnosticConnectorTypeForRuntimeEnvName(envName) {
|
|
14541
15130
|
for (const type of CONNECTOR_TYPE_KEYS) {
|
|
14542
15131
|
const hasEnvName = getConnectorEnvBindingEntries(type).some((entry) => {
|
|
@@ -14549,10 +15138,1290 @@ function getDiagnosticConnectorTypeForRuntimeEnvName(envName) {
|
|
|
14549
15138
|
return null;
|
|
14550
15139
|
}
|
|
14551
15140
|
|
|
15141
|
+
// ../../packages/connectors/src/firewall-rule-matcher.ts
|
|
15142
|
+
init_esm_shims();
|
|
15143
|
+
var VALID_RULE_METHODS = /* @__PURE__ */ new Set([
|
|
15144
|
+
"GET",
|
|
15145
|
+
"POST",
|
|
15146
|
+
"PUT",
|
|
15147
|
+
"PATCH",
|
|
15148
|
+
"DELETE",
|
|
15149
|
+
"HEAD",
|
|
15150
|
+
"OPTIONS",
|
|
15151
|
+
"ANY"
|
|
15152
|
+
]);
|
|
15153
|
+
var FORBIDDEN_RUNTIME_HOST_CHARS = new Set("#%*,/<>?@\\^|{}".split(""));
|
|
15154
|
+
var FORBIDDEN_BASE_PATTERN_HOST_CHARS = new Set("#%,/<>?@\\^|".split(""));
|
|
15155
|
+
var PERCENT_ESCAPE_LENGTH = 3;
|
|
15156
|
+
var HEX_DIGITS = new Set("0123456789abcdefABCDEF".split(""));
|
|
15157
|
+
var PATH_SCORE_MULTIPLIER = 1e6;
|
|
15158
|
+
var AUTHORITY_SCORE_MULTIPLIER = 100;
|
|
15159
|
+
var LITERAL_SEGMENT_SCORE = 1e3;
|
|
15160
|
+
var MIXED_PARAM_SEGMENT_SCORE = 100;
|
|
15161
|
+
var PLAIN_PARAM_SEGMENT_SCORE = 10;
|
|
15162
|
+
var PLUS_GREEDY_SEGMENT_SCORE = 1;
|
|
15163
|
+
var ROOT_PATH_SCORE = 1;
|
|
15164
|
+
var STATIC_BASE_SCORE_BONUS = 1;
|
|
15165
|
+
var PERCENT_DECODED_AUTHORITY_SYNTAX_CHARS = /* @__PURE__ */ new Set([
|
|
15166
|
+
"{",
|
|
15167
|
+
"}",
|
|
15168
|
+
"*",
|
|
15169
|
+
".",
|
|
15170
|
+
"\u3002",
|
|
15171
|
+
"\uFF0E",
|
|
15172
|
+
"\uFF61",
|
|
15173
|
+
":"
|
|
15174
|
+
]);
|
|
15175
|
+
function matchMixedSegment(runtime2, prefix, suffix) {
|
|
15176
|
+
if (!runtime2.startsWith(prefix)) return null;
|
|
15177
|
+
if (!runtime2.endsWith(suffix)) return null;
|
|
15178
|
+
if (runtime2.length <= prefix.length + suffix.length) return null;
|
|
15179
|
+
return runtime2.slice(prefix.length, runtime2.length - suffix.length);
|
|
15180
|
+
}
|
|
15181
|
+
function hasNonEmptySegment(segments, start) {
|
|
15182
|
+
for (let i = start; i < segments.length; i++) {
|
|
15183
|
+
if (segments[i] !== "") return true;
|
|
15184
|
+
}
|
|
15185
|
+
return false;
|
|
15186
|
+
}
|
|
15187
|
+
function codePointLength(value) {
|
|
15188
|
+
return [...value].length;
|
|
15189
|
+
}
|
|
15190
|
+
function hasUnsafeRuntimeUrlSyntax(value) {
|
|
15191
|
+
return hasUnsafeUrlCodepoint(value) || hasRawWhitespace(value) || value.includes("\\") || !value.includes("://");
|
|
15192
|
+
}
|
|
15193
|
+
function stripTrailingSlash(value) {
|
|
15194
|
+
return value.endsWith("/") ? value.slice(0, -1) : value;
|
|
15195
|
+
}
|
|
15196
|
+
function isInvalidGreedyParam(patternIndex, lastPatternIndex, prefix, suffix) {
|
|
15197
|
+
return patternIndex !== lastPatternIndex || prefix !== "" || suffix !== "";
|
|
15198
|
+
}
|
|
15199
|
+
function parseStrictMatchSegment(segment2, patternIndex, lastPatternIndex) {
|
|
15200
|
+
const parsed = parseSegment(segment2);
|
|
15201
|
+
if (parsed.kind === "error") return null;
|
|
15202
|
+
if (parsed.kind === "param" && parsed.greedy !== "" && isInvalidGreedyParam(
|
|
15203
|
+
patternIndex,
|
|
15204
|
+
lastPatternIndex,
|
|
15205
|
+
parsed.prefix,
|
|
15206
|
+
parsed.suffix
|
|
15207
|
+
)) {
|
|
15208
|
+
return null;
|
|
15209
|
+
}
|
|
15210
|
+
return parsed;
|
|
15211
|
+
}
|
|
15212
|
+
function pathSpecificity(pattern) {
|
|
15213
|
+
if (!pattern.startsWith("/") || pattern.includes("?") || pattern.includes("#") || pattern.includes("\\") || hasRawWhitespace(pattern) || hasUnsafeUrlCodepoint(pattern)) {
|
|
15214
|
+
return null;
|
|
15215
|
+
}
|
|
15216
|
+
let literalSegments = 0;
|
|
15217
|
+
let mixedParamSegments = 0;
|
|
15218
|
+
let plainParamSegments = 0;
|
|
15219
|
+
let plusGreedySegments = 0;
|
|
15220
|
+
let starGreedySegments = 0;
|
|
15221
|
+
let literalChars = 0;
|
|
15222
|
+
const segments = splitPathSegments(pattern);
|
|
15223
|
+
const paramNames = /* @__PURE__ */ new Set();
|
|
15224
|
+
const lastSegmentIndex = segments.length - 1;
|
|
15225
|
+
for (let index = 0; index < segments.length; index += 1) {
|
|
15226
|
+
const seg = segments[index];
|
|
15227
|
+
const parsed = parseSegment(seg);
|
|
15228
|
+
if (parsed.kind === "error") return null;
|
|
15229
|
+
if (parsed.kind === "literal") {
|
|
15230
|
+
literalSegments += 1;
|
|
15231
|
+
literalChars += codePointLength(parsed.value);
|
|
15232
|
+
continue;
|
|
15233
|
+
}
|
|
15234
|
+
if (paramNames.has(parsed.name)) return null;
|
|
15235
|
+
paramNames.add(parsed.name);
|
|
15236
|
+
if (parsed.greedy !== "" && isInvalidGreedyParam(
|
|
15237
|
+
index,
|
|
15238
|
+
lastSegmentIndex,
|
|
15239
|
+
parsed.prefix,
|
|
15240
|
+
parsed.suffix
|
|
15241
|
+
)) {
|
|
15242
|
+
return null;
|
|
15243
|
+
}
|
|
15244
|
+
literalChars += codePointLength(parsed.prefix) + codePointLength(parsed.suffix);
|
|
15245
|
+
if (parsed.prefix !== "" || parsed.suffix !== "") {
|
|
15246
|
+
mixedParamSegments += 1;
|
|
15247
|
+
} else if (parsed.greedy === "+") {
|
|
15248
|
+
plusGreedySegments += 1;
|
|
15249
|
+
} else if (parsed.greedy === "*") {
|
|
15250
|
+
starGreedySegments += 1;
|
|
15251
|
+
} else {
|
|
15252
|
+
plainParamSegments += 1;
|
|
15253
|
+
}
|
|
15254
|
+
}
|
|
15255
|
+
return [
|
|
15256
|
+
literalSegments,
|
|
15257
|
+
mixedParamSegments,
|
|
15258
|
+
plainParamSegments,
|
|
15259
|
+
plusGreedySegments,
|
|
15260
|
+
-starGreedySegments,
|
|
15261
|
+
literalChars,
|
|
15262
|
+
segments.length
|
|
15263
|
+
];
|
|
15264
|
+
}
|
|
15265
|
+
function comparePathSpecificity(left, right) {
|
|
15266
|
+
for (let i = 0; i < left.length; i++) {
|
|
15267
|
+
const difference = left[i] - right[i];
|
|
15268
|
+
if (difference !== 0) return difference;
|
|
15269
|
+
}
|
|
15270
|
+
return 0;
|
|
15271
|
+
}
|
|
15272
|
+
function compileDecisionRule(permission, rule) {
|
|
15273
|
+
const spaceIdx = rule.indexOf(" ");
|
|
15274
|
+
if (spaceIdx === -1) return null;
|
|
15275
|
+
const method = rule.slice(0, spaceIdx);
|
|
15276
|
+
if (!VALID_RULE_METHODS.has(method)) return null;
|
|
15277
|
+
const path = rule.slice(spaceIdx + 1);
|
|
15278
|
+
const specificity = pathSpecificity(path);
|
|
15279
|
+
if (specificity === null) return null;
|
|
15280
|
+
return { permission, raw: rule, method, path, specificity };
|
|
15281
|
+
}
|
|
15282
|
+
function isValidPermissionName(permissionName) {
|
|
15283
|
+
return permissionName !== "" && permissionName !== "all";
|
|
15284
|
+
}
|
|
15285
|
+
function isObjectRecord(value) {
|
|
15286
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
15287
|
+
return false;
|
|
15288
|
+
}
|
|
15289
|
+
const prototype = Object.getPrototypeOf(value);
|
|
15290
|
+
return prototype === Object.prototype || prototype === null;
|
|
15291
|
+
}
|
|
15292
|
+
function isStringRecord(value) {
|
|
15293
|
+
if (!isObjectRecord(value)) return false;
|
|
15294
|
+
return Object.values(value).every((entry) => {
|
|
15295
|
+
return typeof entry === "string";
|
|
15296
|
+
});
|
|
15297
|
+
}
|
|
15298
|
+
function hasEntries(value) {
|
|
15299
|
+
return value !== void 0 && Object.keys(value).length > 0;
|
|
15300
|
+
}
|
|
15301
|
+
function isValidAwsSigv4AuthConfig(value) {
|
|
15302
|
+
if (!isObjectRecord(value)) return false;
|
|
15303
|
+
const allowedKeys = /* @__PURE__ */ new Set([
|
|
15304
|
+
"accessKeyId",
|
|
15305
|
+
"secretAccessKey",
|
|
15306
|
+
"sessionToken"
|
|
15307
|
+
]);
|
|
15308
|
+
if (Object.keys(value).some((key) => {
|
|
15309
|
+
return !allowedKeys.has(key);
|
|
15310
|
+
})) {
|
|
15311
|
+
return false;
|
|
15312
|
+
}
|
|
15313
|
+
if (typeof value.accessKeyId !== "string" || value.accessKeyId === "") {
|
|
15314
|
+
return false;
|
|
15315
|
+
}
|
|
15316
|
+
if (typeof value.secretAccessKey !== "string" || value.secretAccessKey === "") {
|
|
15317
|
+
return false;
|
|
15318
|
+
}
|
|
15319
|
+
const optionalValue = value.sessionToken;
|
|
15320
|
+
if (optionalValue !== void 0 && (typeof optionalValue !== "string" || optionalValue === "")) {
|
|
15321
|
+
return false;
|
|
15322
|
+
}
|
|
15323
|
+
return true;
|
|
15324
|
+
}
|
|
15325
|
+
function isValidAuthConfig(auth, serviceName) {
|
|
15326
|
+
if (!isObjectRecord(auth)) return false;
|
|
15327
|
+
if (auth.headers !== void 0 && !isStringRecord(auth.headers)) return false;
|
|
15328
|
+
if (auth.query !== void 0 && !isStringRecord(auth.query)) return false;
|
|
15329
|
+
if (auth.awsSigv4 !== void 0 && !isValidAwsSigv4AuthConfig(auth.awsSigv4)) {
|
|
15330
|
+
return false;
|
|
15331
|
+
}
|
|
15332
|
+
if (auth.awsSigv4 !== void 0) {
|
|
15333
|
+
if (hasEntries(auth.headers)) {
|
|
15334
|
+
return false;
|
|
15335
|
+
}
|
|
15336
|
+
if (hasEntries(auth.query)) {
|
|
15337
|
+
return false;
|
|
15338
|
+
}
|
|
15339
|
+
}
|
|
15340
|
+
if (auth.base !== void 0) {
|
|
15341
|
+
if (typeof auth.base !== "string") return false;
|
|
15342
|
+
validateAuthBaseUrl(auth.base, serviceName);
|
|
15343
|
+
if (auth.awsSigv4 !== void 0) return false;
|
|
15344
|
+
}
|
|
15345
|
+
return true;
|
|
15346
|
+
}
|
|
15347
|
+
function rawObjectHasOwn(value, key) {
|
|
15348
|
+
return Object.prototype.hasOwnProperty.call(value, key);
|
|
15349
|
+
}
|
|
15350
|
+
function isValidAuthConfigForDecision(auth, serviceName) {
|
|
15351
|
+
try {
|
|
15352
|
+
return isValidAuthConfig(auth, serviceName);
|
|
15353
|
+
} catch {
|
|
15354
|
+
return false;
|
|
15355
|
+
}
|
|
15356
|
+
}
|
|
15357
|
+
function canonicalJson(value) {
|
|
15358
|
+
if (value === null) return "null";
|
|
15359
|
+
if (typeof value === "string" || typeof value === "boolean") {
|
|
15360
|
+
return JSON.stringify(value);
|
|
15361
|
+
}
|
|
15362
|
+
if (typeof value === "number") {
|
|
15363
|
+
return Number.isFinite(value) ? JSON.stringify(value) : void 0;
|
|
15364
|
+
}
|
|
15365
|
+
if (Array.isArray(value)) {
|
|
15366
|
+
const items = [];
|
|
15367
|
+
for (const item of value) {
|
|
15368
|
+
const encoded = canonicalJson(item);
|
|
15369
|
+
if (encoded === void 0) return void 0;
|
|
15370
|
+
items.push(encoded);
|
|
15371
|
+
}
|
|
15372
|
+
return `[${items.join(",")}]`;
|
|
15373
|
+
}
|
|
15374
|
+
if (!isObjectRecord(value)) return void 0;
|
|
15375
|
+
const entries = [];
|
|
15376
|
+
for (const key of Object.keys(value).sort()) {
|
|
15377
|
+
const item = value[key];
|
|
15378
|
+
if (item === void 0) continue;
|
|
15379
|
+
const encoded = canonicalJson(item);
|
|
15380
|
+
if (encoded === void 0) return void 0;
|
|
15381
|
+
entries.push(`${JSON.stringify(key)}:${encoded}`);
|
|
15382
|
+
}
|
|
15383
|
+
return `{${entries.join(",")}}`;
|
|
15384
|
+
}
|
|
15385
|
+
function decisionApiRoutingIdentity(api) {
|
|
15386
|
+
return canonicalJson({
|
|
15387
|
+
base: api.base,
|
|
15388
|
+
hostPolicy: api.hostPolicy,
|
|
15389
|
+
auth: api.auth
|
|
15390
|
+
}) ?? null;
|
|
15391
|
+
}
|
|
15392
|
+
function compileDecisionApi(api, serviceName, nameMalformed) {
|
|
15393
|
+
if (typeof api.base !== "string") return null;
|
|
15394
|
+
let baseMalformed = false;
|
|
15395
|
+
try {
|
|
15396
|
+
validateBaseUrl(api.base, serviceName);
|
|
15397
|
+
} catch {
|
|
15398
|
+
baseMalformed = true;
|
|
15399
|
+
}
|
|
15400
|
+
const authMalformed = !isValidAuthConfigForDecision(api.auth, serviceName);
|
|
15401
|
+
const routingIdentity = decisionApiRoutingIdentity(api);
|
|
15402
|
+
const rules = [];
|
|
15403
|
+
const seenPermissionNames = /* @__PURE__ */ new Set();
|
|
15404
|
+
let hasMalformedRules = nameMalformed;
|
|
15405
|
+
const rawPermissions = api.permissions;
|
|
15406
|
+
if (Array.isArray(rawPermissions)) {
|
|
15407
|
+
for (const rawPermission of rawPermissions) {
|
|
15408
|
+
if (!isObjectRecord(rawPermission)) {
|
|
15409
|
+
hasMalformedRules = true;
|
|
15410
|
+
continue;
|
|
15411
|
+
}
|
|
15412
|
+
const permissionName = rawPermission.name;
|
|
15413
|
+
if (typeof permissionName !== "string" || !isValidPermissionName(permissionName)) {
|
|
15414
|
+
hasMalformedRules = true;
|
|
15415
|
+
continue;
|
|
15416
|
+
}
|
|
15417
|
+
if (seenPermissionNames.has(permissionName)) {
|
|
15418
|
+
hasMalformedRules = true;
|
|
15419
|
+
continue;
|
|
15420
|
+
}
|
|
15421
|
+
seenPermissionNames.add(permissionName);
|
|
15422
|
+
const rawRules = rawPermission.rules;
|
|
15423
|
+
if (!Array.isArray(rawRules)) {
|
|
15424
|
+
hasMalformedRules = true;
|
|
15425
|
+
continue;
|
|
15426
|
+
}
|
|
15427
|
+
if (rawRules.length === 0) {
|
|
15428
|
+
hasMalformedRules = true;
|
|
15429
|
+
}
|
|
15430
|
+
for (const rawRule of rawRules) {
|
|
15431
|
+
if (typeof rawRule !== "string") {
|
|
15432
|
+
hasMalformedRules = true;
|
|
15433
|
+
continue;
|
|
15434
|
+
}
|
|
15435
|
+
const compiledRule = compileDecisionRule(permissionName, rawRule);
|
|
15436
|
+
if (compiledRule === null) {
|
|
15437
|
+
hasMalformedRules = true;
|
|
15438
|
+
continue;
|
|
15439
|
+
}
|
|
15440
|
+
rules.push(compiledRule);
|
|
15441
|
+
}
|
|
15442
|
+
}
|
|
15443
|
+
} else if (rawObjectHasOwn(api, "permissions")) {
|
|
15444
|
+
hasMalformedRules = true;
|
|
15445
|
+
}
|
|
15446
|
+
return {
|
|
15447
|
+
rawBase: api.base,
|
|
15448
|
+
baseMalformed,
|
|
15449
|
+
authMalformed,
|
|
15450
|
+
hasMalformedRules,
|
|
15451
|
+
routingIdentity,
|
|
15452
|
+
rules
|
|
15453
|
+
};
|
|
15454
|
+
}
|
|
15455
|
+
function compileDecisionFirewall(rawFirewall) {
|
|
15456
|
+
if (!isObjectRecord(rawFirewall)) return null;
|
|
15457
|
+
const rawName = rawFirewall.name;
|
|
15458
|
+
const nameMalformed = typeof rawName !== "string" || rawName === "";
|
|
15459
|
+
const name = typeof rawName === "string" ? rawName : "";
|
|
15460
|
+
const rawApis = rawFirewall.apis;
|
|
15461
|
+
if (!Array.isArray(rawApis)) return null;
|
|
15462
|
+
const apis = [];
|
|
15463
|
+
for (const rawApi of rawApis) {
|
|
15464
|
+
if (!isObjectRecord(rawApi)) continue;
|
|
15465
|
+
const api = compileDecisionApi(rawApi, name, nameMalformed);
|
|
15466
|
+
if (api !== null) {
|
|
15467
|
+
apis.push(api);
|
|
15468
|
+
}
|
|
15469
|
+
}
|
|
15470
|
+
if (apis.length === 0) return null;
|
|
15471
|
+
return { name, nameMalformed, apis };
|
|
15472
|
+
}
|
|
15473
|
+
function compileDecisionFirewalls(rawFirewalls) {
|
|
15474
|
+
if (!Array.isArray(rawFirewalls) || rawFirewalls.length === 0) return [];
|
|
15475
|
+
const firewalls = [];
|
|
15476
|
+
for (const rawFirewall of rawFirewalls) {
|
|
15477
|
+
const firewall = compileDecisionFirewall(rawFirewall);
|
|
15478
|
+
if (firewall !== null) {
|
|
15479
|
+
firewalls.push(firewall);
|
|
15480
|
+
}
|
|
15481
|
+
}
|
|
15482
|
+
return firewalls;
|
|
15483
|
+
}
|
|
15484
|
+
function compilePermissionSet(rawValue) {
|
|
15485
|
+
if (rawValue === void 0 || rawValue === null) {
|
|
15486
|
+
return { values: /* @__PURE__ */ new Set(), malformed: false };
|
|
15487
|
+
}
|
|
15488
|
+
if (!Array.isArray(rawValue) || rawValue.some((item) => {
|
|
15489
|
+
return typeof item !== "string";
|
|
15490
|
+
})) {
|
|
15491
|
+
return { values: /* @__PURE__ */ new Set(), malformed: true };
|
|
15492
|
+
}
|
|
15493
|
+
return { values: new Set(rawValue), malformed: false };
|
|
15494
|
+
}
|
|
15495
|
+
function compileNetworkPolicies(rawNetworkPolicies) {
|
|
15496
|
+
if (rawNetworkPolicies === void 0 || rawNetworkPolicies === null) {
|
|
15497
|
+
return { policies: /* @__PURE__ */ new Map(), topLevelMalformed: false };
|
|
15498
|
+
}
|
|
15499
|
+
if (!isObjectRecord(rawNetworkPolicies)) {
|
|
15500
|
+
return { policies: /* @__PURE__ */ new Map(), topLevelMalformed: true };
|
|
15501
|
+
}
|
|
15502
|
+
const policies = /* @__PURE__ */ new Map();
|
|
15503
|
+
for (const [firewallName, grant] of Object.entries(rawNetworkPolicies)) {
|
|
15504
|
+
if (!isObjectRecord(grant)) {
|
|
15505
|
+
policies.set(firewallName, {
|
|
15506
|
+
blockedPermissions: /* @__PURE__ */ new Set(),
|
|
15507
|
+
unknownPolicy: "allow",
|
|
15508
|
+
permissionMalformed: true,
|
|
15509
|
+
unknownPolicyMalformed: false
|
|
15510
|
+
});
|
|
15511
|
+
continue;
|
|
15512
|
+
}
|
|
15513
|
+
const allow = compilePermissionSet(grant.allow);
|
|
15514
|
+
const deny = compilePermissionSet(grant.deny);
|
|
15515
|
+
const ask = compilePermissionSet(grant.ask);
|
|
15516
|
+
const blockedPermissions = /* @__PURE__ */ new Set([...deny.values, ...ask.values]);
|
|
15517
|
+
let unknownPolicy = "allow";
|
|
15518
|
+
let unknownPolicyMalformed = false;
|
|
15519
|
+
const rawUnknownPolicy = grant.unknownPolicy;
|
|
15520
|
+
if (rawUnknownPolicy === "allow" || rawUnknownPolicy === "deny" || rawUnknownPolicy === "ask") {
|
|
15521
|
+
unknownPolicy = rawUnknownPolicy;
|
|
15522
|
+
} else if (rawUnknownPolicy !== void 0 && rawUnknownPolicy !== null) {
|
|
15523
|
+
unknownPolicyMalformed = true;
|
|
15524
|
+
}
|
|
15525
|
+
policies.set(firewallName, {
|
|
15526
|
+
blockedPermissions,
|
|
15527
|
+
unknownPolicy,
|
|
15528
|
+
permissionMalformed: allow.malformed || deny.malformed || ask.malformed,
|
|
15529
|
+
unknownPolicyMalformed
|
|
15530
|
+
});
|
|
15531
|
+
}
|
|
15532
|
+
return { policies, topLevelMalformed: false };
|
|
15533
|
+
}
|
|
15534
|
+
function relativePathFromSegments(segments, consumed) {
|
|
15535
|
+
const rest = segments.slice(consumed).join("/");
|
|
15536
|
+
return rest === "" ? "/" : `/${rest}`;
|
|
15537
|
+
}
|
|
15538
|
+
function stripUrlQueryAndFragment(url) {
|
|
15539
|
+
const queryIndex = url.indexOf("?");
|
|
15540
|
+
const fragmentIndex = url.indexOf("#");
|
|
15541
|
+
let end = url.length;
|
|
15542
|
+
if (queryIndex !== -1) end = Math.min(end, queryIndex);
|
|
15543
|
+
if (fragmentIndex !== -1) end = Math.min(end, fragmentIndex);
|
|
15544
|
+
return url.slice(0, end);
|
|
15545
|
+
}
|
|
15546
|
+
function rawUrlAuthorityBounds(url) {
|
|
15547
|
+
const schemeEnd = url.indexOf("://");
|
|
15548
|
+
if (schemeEnd === -1) return null;
|
|
15549
|
+
const authorityStart = schemeEnd + 3;
|
|
15550
|
+
let authorityEnd = url.length;
|
|
15551
|
+
for (const delimiter of ["/", "?", "#"]) {
|
|
15552
|
+
const delimiterIndex = url.indexOf(delimiter, authorityStart);
|
|
15553
|
+
if (delimiterIndex !== -1)
|
|
15554
|
+
authorityEnd = Math.min(authorityEnd, delimiterIndex);
|
|
15555
|
+
}
|
|
15556
|
+
return { authorityStart, authorityEnd };
|
|
15557
|
+
}
|
|
15558
|
+
function replaceRawUrlAuthority(url, bounds, authority) {
|
|
15559
|
+
return `${url.slice(0, bounds.authorityStart)}${authority}${url.slice(bounds.authorityEnd)}`;
|
|
15560
|
+
}
|
|
15561
|
+
function stripRawUrlUserinfo(url) {
|
|
15562
|
+
const bounds = rawUrlAuthorityBounds(url);
|
|
15563
|
+
if (bounds === null) return url;
|
|
15564
|
+
const authority = url.slice(bounds.authorityStart, bounds.authorityEnd);
|
|
15565
|
+
const userinfoEnd = authority.lastIndexOf("@");
|
|
15566
|
+
if (userinfoEnd === -1) return url;
|
|
15567
|
+
return replaceRawUrlAuthority(url, bounds, authority.slice(userinfoEnd + 1));
|
|
15568
|
+
}
|
|
15569
|
+
function rawAuthorityPortIsMalformed(port) {
|
|
15570
|
+
if (port === "") return true;
|
|
15571
|
+
if (![...port].every((char) => {
|
|
15572
|
+
return char >= "0" && char <= "9";
|
|
15573
|
+
})) {
|
|
15574
|
+
return true;
|
|
15575
|
+
}
|
|
15576
|
+
return Number(port) > 65535;
|
|
15577
|
+
}
|
|
15578
|
+
function stripRawUrlMalformedPort(url) {
|
|
15579
|
+
const bounds = rawUrlAuthorityBounds(url);
|
|
15580
|
+
if (bounds === null) return url;
|
|
15581
|
+
const authority = url.slice(bounds.authorityStart, bounds.authorityEnd);
|
|
15582
|
+
if (authority.startsWith("[")) {
|
|
15583
|
+
const closeBracketIndex = authority.indexOf("]");
|
|
15584
|
+
if (closeBracketIndex === -1) return url;
|
|
15585
|
+
const portPrefix = authority.slice(closeBracketIndex + 1);
|
|
15586
|
+
if (!portPrefix.startsWith(":")) return url;
|
|
15587
|
+
if (!rawAuthorityPortIsMalformed(portPrefix.slice(1))) return url;
|
|
15588
|
+
return replaceRawUrlAuthority(
|
|
15589
|
+
url,
|
|
15590
|
+
bounds,
|
|
15591
|
+
authority.slice(0, closeBracketIndex + 1)
|
|
15592
|
+
);
|
|
15593
|
+
}
|
|
15594
|
+
const portSeparator = authority.lastIndexOf(":");
|
|
15595
|
+
if (portSeparator === -1) return url;
|
|
15596
|
+
if (authority.indexOf(":") !== portSeparator) return url;
|
|
15597
|
+
if (!rawAuthorityPortIsMalformed(authority.slice(portSeparator + 1))) {
|
|
15598
|
+
return url;
|
|
15599
|
+
}
|
|
15600
|
+
return replaceRawUrlAuthority(url, bounds, authority.slice(0, portSeparator));
|
|
15601
|
+
}
|
|
15602
|
+
function rawBaseForDecisionMatch(rawBase) {
|
|
15603
|
+
if (stripUrlQueryAndFragment(rawBase).includes("\\")) return null;
|
|
15604
|
+
return stripRawUrlMalformedPort(stripRawUrlUserinfo(rawBase));
|
|
15605
|
+
}
|
|
15606
|
+
function rawPathFromUrl(url) {
|
|
15607
|
+
const urlWithoutQuery = stripUrlQueryAndFragment(url);
|
|
15608
|
+
const schemeEnd = urlWithoutQuery.indexOf("://");
|
|
15609
|
+
const authorityStart = schemeEnd === -1 ? 0 : schemeEnd + 3;
|
|
15610
|
+
const pathStart = urlWithoutQuery.indexOf("/", authorityStart);
|
|
15611
|
+
return pathStart === -1 ? "/" : urlWithoutQuery.slice(pathStart);
|
|
15612
|
+
}
|
|
15613
|
+
function rawBasePathFromUrl(url) {
|
|
15614
|
+
const urlWithoutQuery = stripUrlQueryAndFragment(url);
|
|
15615
|
+
const schemeEnd = urlWithoutQuery.indexOf("://");
|
|
15616
|
+
const authorityStart = schemeEnd === -1 ? 0 : schemeEnd + 3;
|
|
15617
|
+
const pathStart = urlWithoutQuery.indexOf("/", authorityStart);
|
|
15618
|
+
return pathStart === -1 ? "" : urlWithoutQuery.slice(pathStart);
|
|
15619
|
+
}
|
|
15620
|
+
function rawAuthorityFromUrl(url) {
|
|
15621
|
+
const urlWithoutQuery = stripUrlQueryAndFragment(url);
|
|
15622
|
+
const schemeEnd = urlWithoutQuery.indexOf("://");
|
|
15623
|
+
if (schemeEnd === -1) return null;
|
|
15624
|
+
const authorityStart = schemeEnd + 3;
|
|
15625
|
+
const pathStart = urlWithoutQuery.indexOf("/", authorityStart);
|
|
15626
|
+
const authority = pathStart === -1 ? urlWithoutQuery.slice(authorityStart) : urlWithoutQuery.slice(authorityStart, pathStart);
|
|
15627
|
+
return authority === "" ? null : authority;
|
|
15628
|
+
}
|
|
15629
|
+
function hasNonAscii(value) {
|
|
15630
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
15631
|
+
if (value.charCodeAt(index) > 127) return true;
|
|
15632
|
+
}
|
|
15633
|
+
return false;
|
|
15634
|
+
}
|
|
15635
|
+
function rawHostFromAuthority(authority) {
|
|
15636
|
+
const withoutUserinfo = authority.slice(authority.lastIndexOf("@") + 1);
|
|
15637
|
+
if (withoutUserinfo.startsWith("[")) {
|
|
15638
|
+
const closeBracket = withoutUserinfo.indexOf("]");
|
|
15639
|
+
return closeBracket === -1 ? withoutUserinfo : withoutUserinfo.slice(0, closeBracket + 1);
|
|
15640
|
+
}
|
|
15641
|
+
const portSeparator = withoutUserinfo.lastIndexOf(":");
|
|
15642
|
+
return portSeparator === -1 ? withoutUserinfo : withoutUserinfo.slice(0, portSeparator);
|
|
15643
|
+
}
|
|
15644
|
+
function authorityHasEmptyPort(authority) {
|
|
15645
|
+
const withoutUserinfo = authority.slice(authority.lastIndexOf("@") + 1);
|
|
15646
|
+
if (withoutUserinfo.startsWith("[")) {
|
|
15647
|
+
const closeBracket = withoutUserinfo.indexOf("]");
|
|
15648
|
+
if (closeBracket === -1) return false;
|
|
15649
|
+
return withoutUserinfo.slice(closeBracket + 1) === ":";
|
|
15650
|
+
}
|
|
15651
|
+
const portSeparator = withoutUserinfo.lastIndexOf(":");
|
|
15652
|
+
if (portSeparator === -1) return false;
|
|
15653
|
+
return withoutUserinfo.indexOf(":") === portSeparator && portSeparator === withoutUserinfo.length - 1;
|
|
15654
|
+
}
|
|
15655
|
+
function rawAuthorityHostStartsWithDigit(authority) {
|
|
15656
|
+
const firstChar = rawHostFromAuthority(authority)[0];
|
|
15657
|
+
return firstChar !== void 0 && firstChar >= "0" && firstChar <= "9";
|
|
15658
|
+
}
|
|
15659
|
+
function runtimeAuthorityOriginForHostValidation(url) {
|
|
15660
|
+
const authority = rawAuthorityFromUrl(url);
|
|
15661
|
+
if (authority === null) return null;
|
|
15662
|
+
if (!authority.includes("%") && !hasNonAscii(authority) && !rawAuthorityHostStartsWithDigit(authority)) {
|
|
15663
|
+
return null;
|
|
15664
|
+
}
|
|
15665
|
+
const schemeEnd = url.indexOf("://");
|
|
15666
|
+
if (schemeEnd === -1) return null;
|
|
15667
|
+
return `${url.slice(0, schemeEnd)}://${authority}`;
|
|
15668
|
+
}
|
|
15669
|
+
function hasPercentEncodedAuthoritySyntax(value) {
|
|
15670
|
+
let index = value.indexOf("%");
|
|
15671
|
+
while (index !== -1) {
|
|
15672
|
+
let runEnd = index;
|
|
15673
|
+
while (runEnd < value.length && value[runEnd] === "%") {
|
|
15674
|
+
const firstHexDigit = value[runEnd + 1];
|
|
15675
|
+
const secondHexDigit = value[runEnd + 2];
|
|
15676
|
+
if (!firstHexDigit || !secondHexDigit || !HEX_DIGITS.has(firstHexDigit) || !HEX_DIGITS.has(secondHexDigit)) {
|
|
15677
|
+
return true;
|
|
15678
|
+
}
|
|
15679
|
+
runEnd += PERCENT_ESCAPE_LENGTH;
|
|
15680
|
+
}
|
|
15681
|
+
let decodedRun;
|
|
15682
|
+
try {
|
|
15683
|
+
decodedRun = decodeURIComponent(value.slice(index, runEnd));
|
|
15684
|
+
} catch {
|
|
15685
|
+
return true;
|
|
15686
|
+
}
|
|
15687
|
+
for (const char of decodedRun) {
|
|
15688
|
+
if (PERCENT_DECODED_AUTHORITY_SYNTAX_CHARS.has(char)) {
|
|
15689
|
+
return true;
|
|
15690
|
+
}
|
|
15691
|
+
}
|
|
15692
|
+
index = value.indexOf("%", runEnd);
|
|
15693
|
+
}
|
|
15694
|
+
return false;
|
|
15695
|
+
}
|
|
15696
|
+
function hasMalformedRuntimeAuthoritySyntax(url) {
|
|
15697
|
+
const authority = rawAuthorityFromUrl(url);
|
|
15698
|
+
if (authority === null) return false;
|
|
15699
|
+
return authority.includes("\\") || authorityHasEmptyPort(authority) || hasPercentEncodedAuthoritySyntax(authority);
|
|
15700
|
+
}
|
|
15701
|
+
function scoreLiteralSegment(segment2) {
|
|
15702
|
+
return LITERAL_SEGMENT_SCORE + codePointLength(segment2);
|
|
15703
|
+
}
|
|
15704
|
+
function scoreParsedPatternSegment(parsed) {
|
|
15705
|
+
if (parsed.kind === "literal") {
|
|
15706
|
+
return scoreLiteralSegment(parsed.value);
|
|
15707
|
+
}
|
|
15708
|
+
const literalChars = codePointLength(parsed.prefix) + codePointLength(parsed.suffix);
|
|
15709
|
+
if (parsed.prefix !== "" || parsed.suffix !== "") {
|
|
15710
|
+
return MIXED_PARAM_SEGMENT_SCORE + literalChars;
|
|
15711
|
+
}
|
|
15712
|
+
if (parsed.greedy === "+") return PLUS_GREEDY_SEGMENT_SCORE;
|
|
15713
|
+
if (parsed.greedy === "*") return 0;
|
|
15714
|
+
return PLAIN_PARAM_SEGMENT_SCORE;
|
|
15715
|
+
}
|
|
15716
|
+
function scoreStaticSegments(segments) {
|
|
15717
|
+
return segments.reduce((score, segment2) => {
|
|
15718
|
+
return score + scoreLiteralSegment(segment2);
|
|
15719
|
+
}, 0);
|
|
15720
|
+
}
|
|
15721
|
+
function scorePatternSegmentsWithParser(segments, parsePatternSegment) {
|
|
15722
|
+
const lastPatternIndex = segments.length - 1;
|
|
15723
|
+
let score = 0;
|
|
15724
|
+
for (let index = 0; index < segments.length; index += 1) {
|
|
15725
|
+
const segment2 = segments[index];
|
|
15726
|
+
const parsed = parsePatternSegment(segment2, index, lastPatternIndex);
|
|
15727
|
+
if (parsed !== null) {
|
|
15728
|
+
score += scoreParsedPatternSegment(parsed);
|
|
15729
|
+
}
|
|
15730
|
+
}
|
|
15731
|
+
return score;
|
|
15732
|
+
}
|
|
15733
|
+
function scorePathPattern(path, parsePatternSegment) {
|
|
15734
|
+
if (path === "") return 0;
|
|
15735
|
+
if (path === "/") return ROOT_PATH_SCORE;
|
|
15736
|
+
const segments = splitPathSegments(path);
|
|
15737
|
+
return parsePatternSegment === null ? scoreStaticSegments(segments) : scorePatternSegmentsWithParser(segments, parsePatternSegment);
|
|
15738
|
+
}
|
|
15739
|
+
function splitAuthoritySegments(authority) {
|
|
15740
|
+
if (authority.startsWith("[")) return [authority];
|
|
15741
|
+
const normalized = authority.endsWith(".") ? authority.slice(0, -1) : authority;
|
|
15742
|
+
return normalized === "" ? [] : normalized.split(".");
|
|
15743
|
+
}
|
|
15744
|
+
function baseUrlSpecificityScore({
|
|
15745
|
+
authority,
|
|
15746
|
+
path,
|
|
15747
|
+
hasParams,
|
|
15748
|
+
tolerateMalformedBaseParams = false
|
|
15749
|
+
}) {
|
|
15750
|
+
const patternParser = hasParams ? tolerateMalformedBaseParams ? parseMalformedTolerantBaseSegment : parseStrictMatchSegment : null;
|
|
15751
|
+
const authoritySegments = splitAuthoritySegments(authority);
|
|
15752
|
+
const authorityScore = patternParser === null ? scoreStaticSegments(authoritySegments) : scorePatternSegmentsWithParser(
|
|
15753
|
+
[...authoritySegments].reverse(),
|
|
15754
|
+
patternParser
|
|
15755
|
+
);
|
|
15756
|
+
const pathScore = scorePathPattern(path, patternParser);
|
|
15757
|
+
return pathScore * PATH_SCORE_MULTIPLIER + authorityScore * AUTHORITY_SCORE_MULTIPLIER + (hasParams ? 0 : STATIC_BASE_SCORE_BONUS);
|
|
15758
|
+
}
|
|
15759
|
+
function matchStaticBasePathPrefix(path, pattern) {
|
|
15760
|
+
if (pattern === "") {
|
|
15761
|
+
return path === "" ? "/" : path;
|
|
15762
|
+
}
|
|
15763
|
+
if (pattern === "/") {
|
|
15764
|
+
if (!path.startsWith(pattern)) return null;
|
|
15765
|
+
const relativePath2 = path.slice(pattern.length);
|
|
15766
|
+
if (relativePath2 !== "" && !relativePath2.startsWith("/")) return null;
|
|
15767
|
+
return relativePath2 === "" ? "/" : relativePath2;
|
|
15768
|
+
}
|
|
15769
|
+
if (!path.startsWith(pattern)) return null;
|
|
15770
|
+
const relativePath = path.slice(pattern.length);
|
|
15771
|
+
if (relativePath !== "" && !relativePath.startsWith("/")) return null;
|
|
15772
|
+
return relativePath === "" ? "/" : relativePath;
|
|
15773
|
+
}
|
|
15774
|
+
function normalizeUrlHostname(hostname, options = {}) {
|
|
15775
|
+
let normalized = hostname.toLowerCase();
|
|
15776
|
+
if (normalized.endsWith(".")) {
|
|
15777
|
+
normalized = normalized.slice(0, -1);
|
|
15778
|
+
if (normalized === "" || normalized.endsWith(".")) {
|
|
15779
|
+
return null;
|
|
15780
|
+
}
|
|
15781
|
+
}
|
|
15782
|
+
if (normalized.split(".").some((label) => {
|
|
15783
|
+
return label === "";
|
|
15784
|
+
})) {
|
|
15785
|
+
return null;
|
|
15786
|
+
}
|
|
15787
|
+
const forbiddenChars = options.allowHostParams === true ? FORBIDDEN_BASE_PATTERN_HOST_CHARS : FORBIDDEN_RUNTIME_HOST_CHARS;
|
|
15788
|
+
if (!normalized.startsWith("[") && [...normalized].some((char) => {
|
|
15789
|
+
return forbiddenChars.has(char);
|
|
15790
|
+
})) {
|
|
15791
|
+
return null;
|
|
15792
|
+
}
|
|
15793
|
+
return normalized;
|
|
15794
|
+
}
|
|
15795
|
+
function normalizedUrlAuthority(parsed, options = {}) {
|
|
15796
|
+
if (parsed.username !== "" || parsed.password !== "") {
|
|
15797
|
+
return null;
|
|
15798
|
+
}
|
|
15799
|
+
const hostname = normalizeUrlHostname(parsed.hostname, options);
|
|
15800
|
+
if (hostname === null || hostname === "") {
|
|
15801
|
+
return null;
|
|
15802
|
+
}
|
|
15803
|
+
return parsed.port === "" ? hostname : `${hostname}:${parsed.port}`;
|
|
15804
|
+
}
|
|
15805
|
+
function matchStaticFirewallBaseUrl(url, rawBase, options = {}) {
|
|
15806
|
+
const parsedUrl = new URL(url);
|
|
15807
|
+
const parsedBase = new URL(rawBase);
|
|
15808
|
+
if (parsedUrl.protocol.toLowerCase() !== parsedBase.protocol.toLowerCase()) {
|
|
15809
|
+
return null;
|
|
15810
|
+
}
|
|
15811
|
+
const baseHasParams = hasBaseUrlParams(rawBase);
|
|
15812
|
+
const baseForMatch = stripTrailingSlash(rawBase);
|
|
15813
|
+
const urlAuthority = normalizedUrlAuthority(parsedUrl);
|
|
15814
|
+
const baseAuthority = normalizedUrlAuthority(parsedBase, {
|
|
15815
|
+
allowHostParams: baseHasParams
|
|
15816
|
+
});
|
|
15817
|
+
if (urlAuthority === null || baseAuthority === null) return null;
|
|
15818
|
+
if (baseHasParams) {
|
|
15819
|
+
const hostParams = options.tolerateMalformedBaseParams === true ? matchFirewallHostForMalformedBaseDecision(urlAuthority, baseAuthority) : matchFirewallHost(urlAuthority, baseAuthority);
|
|
15820
|
+
if (hostParams === null) return null;
|
|
15821
|
+
} else if (urlAuthority !== baseAuthority) {
|
|
15822
|
+
return null;
|
|
15823
|
+
}
|
|
15824
|
+
const basePath = rawBasePathFromUrl(baseForMatch);
|
|
15825
|
+
const relativePath = baseHasParams ? options.tolerateMalformedBaseParams === true ? matchFirewallPathPrefixForMalformedBaseDecision(
|
|
15826
|
+
rawPathFromUrl(url),
|
|
15827
|
+
basePath
|
|
15828
|
+
) : matchFirewallPathPrefix(rawPathFromUrl(url), basePath) : matchStaticBasePathPrefix(rawPathFromUrl(url), basePath);
|
|
15829
|
+
if (relativePath === null) return null;
|
|
15830
|
+
const displayBase = stripTrailingSlash(rawBase);
|
|
15831
|
+
return {
|
|
15832
|
+
displayBase,
|
|
15833
|
+
relativePath,
|
|
15834
|
+
score: baseUrlSpecificityScore({
|
|
15835
|
+
authority: baseAuthority,
|
|
15836
|
+
path: basePath,
|
|
15837
|
+
hasParams: baseHasParams,
|
|
15838
|
+
tolerateMalformedBaseParams: options.tolerateMalformedBaseParams === true
|
|
15839
|
+
})
|
|
15840
|
+
};
|
|
15841
|
+
}
|
|
15842
|
+
function runtimeUrlCanMatchFirewallBase(url) {
|
|
15843
|
+
if (hasUnsafeUrlCodepoint(url) || hasRawWhitespace(url) || !url.includes("://") || hasMalformedRuntimeAuthoritySyntax(url)) {
|
|
15844
|
+
return false;
|
|
15845
|
+
}
|
|
15846
|
+
const runtimeAuthorityOrigin = runtimeAuthorityOriginForHostValidation(url);
|
|
15847
|
+
if (runtimeAuthorityOrigin === null) return true;
|
|
15848
|
+
try {
|
|
15849
|
+
validateBaseUrl(runtimeAuthorityOrigin, "runtime");
|
|
15850
|
+
return true;
|
|
15851
|
+
} catch {
|
|
15852
|
+
return false;
|
|
15853
|
+
}
|
|
15854
|
+
}
|
|
15855
|
+
function matchFirewallBaseUrlForDecision(url, rawBase) {
|
|
15856
|
+
if (!runtimeUrlCanMatchFirewallBase(url)) return null;
|
|
15857
|
+
const baseForMatch = rawBaseForDecisionMatch(rawBase);
|
|
15858
|
+
if (baseForMatch === null) return null;
|
|
15859
|
+
try {
|
|
15860
|
+
const match = matchStaticFirewallBaseUrl(url, baseForMatch, {
|
|
15861
|
+
tolerateMalformedBaseParams: true
|
|
15862
|
+
});
|
|
15863
|
+
if (match === null) return null;
|
|
15864
|
+
return { ...match, displayBase: stripTrailingSlash(rawBase) };
|
|
15865
|
+
} catch {
|
|
15866
|
+
return null;
|
|
15867
|
+
}
|
|
15868
|
+
}
|
|
15869
|
+
function createDecisionState() {
|
|
15870
|
+
return {
|
|
15871
|
+
bestBaseScore: null,
|
|
15872
|
+
bestRuleSpecificity: null,
|
|
15873
|
+
baseMatch: null,
|
|
15874
|
+
allowedMatch: null,
|
|
15875
|
+
deniedMatch: null,
|
|
15876
|
+
deniedPermissionNames: [],
|
|
15877
|
+
malformedConfigMatch: null,
|
|
15878
|
+
malformedPolicyMatch: null
|
|
15879
|
+
};
|
|
15880
|
+
}
|
|
15881
|
+
function acceptDecisionBaseMatch(state, match, score) {
|
|
15882
|
+
if (state.bestBaseScore === null || score > state.bestBaseScore) {
|
|
15883
|
+
state.bestBaseScore = score;
|
|
15884
|
+
state.bestRuleSpecificity = null;
|
|
15885
|
+
state.baseMatch = null;
|
|
15886
|
+
state.allowedMatch = null;
|
|
15887
|
+
state.deniedMatch = null;
|
|
15888
|
+
state.deniedPermissionNames = [];
|
|
15889
|
+
state.malformedConfigMatch = null;
|
|
15890
|
+
state.malformedPolicyMatch = null;
|
|
15891
|
+
} else if (score < state.bestBaseScore) {
|
|
15892
|
+
return false;
|
|
15893
|
+
}
|
|
15894
|
+
state.baseMatch ??= match;
|
|
15895
|
+
return true;
|
|
15896
|
+
}
|
|
15897
|
+
function acceptRuleSpecificity(state, specificity) {
|
|
15898
|
+
if (state.bestRuleSpecificity === null) {
|
|
15899
|
+
state.bestRuleSpecificity = specificity;
|
|
15900
|
+
return true;
|
|
15901
|
+
}
|
|
15902
|
+
const comparison = comparePathSpecificity(
|
|
15903
|
+
specificity,
|
|
15904
|
+
state.bestRuleSpecificity
|
|
15905
|
+
);
|
|
15906
|
+
if (comparison > 0) {
|
|
15907
|
+
state.bestRuleSpecificity = specificity;
|
|
15908
|
+
state.allowedMatch = null;
|
|
15909
|
+
state.deniedMatch = null;
|
|
15910
|
+
state.deniedPermissionNames = [];
|
|
15911
|
+
return true;
|
|
15912
|
+
}
|
|
15913
|
+
return comparison === 0;
|
|
15914
|
+
}
|
|
15915
|
+
function recordDeniedRule(state, match, permission) {
|
|
15916
|
+
if (!state.deniedPermissionNames.includes(permission)) {
|
|
15917
|
+
state.deniedPermissionNames.push(permission);
|
|
15918
|
+
}
|
|
15919
|
+
state.deniedMatch ??= match;
|
|
15920
|
+
}
|
|
15921
|
+
function resolveFirewallDecision(state, networkPolicies) {
|
|
15922
|
+
const baseMatch = state.baseMatch;
|
|
15923
|
+
if (baseMatch === null) {
|
|
15924
|
+
return { kind: "no_match" };
|
|
15925
|
+
}
|
|
15926
|
+
if (state.allowedMatch !== null) {
|
|
15927
|
+
return {
|
|
15928
|
+
kind: "allow",
|
|
15929
|
+
firewallName: state.allowedMatch.firewallName,
|
|
15930
|
+
base: state.allowedMatch.base,
|
|
15931
|
+
relativePath: state.allowedMatch.relativePath,
|
|
15932
|
+
permission: state.allowedMatch.permission,
|
|
15933
|
+
rule: state.allowedMatch.rule
|
|
15934
|
+
};
|
|
15935
|
+
}
|
|
15936
|
+
if (state.deniedMatch !== null) {
|
|
15937
|
+
return {
|
|
15938
|
+
kind: "block",
|
|
15939
|
+
firewallName: state.deniedMatch.firewallName,
|
|
15940
|
+
base: state.deniedMatch.base,
|
|
15941
|
+
relativePath: state.deniedMatch.relativePath,
|
|
15942
|
+
reason: "permission_denied",
|
|
15943
|
+
permissions: state.deniedPermissionNames
|
|
15944
|
+
};
|
|
15945
|
+
}
|
|
15946
|
+
if (state.malformedPolicyMatch !== null) {
|
|
15947
|
+
return {
|
|
15948
|
+
kind: "block",
|
|
15949
|
+
firewallName: state.malformedPolicyMatch.firewallName,
|
|
15950
|
+
base: state.malformedPolicyMatch.base,
|
|
15951
|
+
relativePath: state.malformedPolicyMatch.relativePath,
|
|
15952
|
+
reason: "malformed_network_policy",
|
|
15953
|
+
permissions: []
|
|
15954
|
+
};
|
|
15955
|
+
}
|
|
15956
|
+
if (state.malformedConfigMatch !== null) {
|
|
15957
|
+
return {
|
|
15958
|
+
kind: "block",
|
|
15959
|
+
firewallName: state.malformedConfigMatch.firewallName,
|
|
15960
|
+
base: state.malformedConfigMatch.base,
|
|
15961
|
+
relativePath: state.malformedConfigMatch.relativePath,
|
|
15962
|
+
reason: "malformed_firewall_config",
|
|
15963
|
+
permissions: []
|
|
15964
|
+
};
|
|
15965
|
+
}
|
|
15966
|
+
const policy = networkPolicies.policies.get(baseMatch.firewallName);
|
|
15967
|
+
if (policy === void 0) {
|
|
15968
|
+
return {
|
|
15969
|
+
kind: "allow",
|
|
15970
|
+
firewallName: baseMatch.firewallName,
|
|
15971
|
+
base: baseMatch.allowBase,
|
|
15972
|
+
relativePath: baseMatch.relativePath
|
|
15973
|
+
};
|
|
15974
|
+
}
|
|
15975
|
+
if (policy.unknownPolicyMalformed) {
|
|
15976
|
+
return {
|
|
15977
|
+
kind: "block",
|
|
15978
|
+
firewallName: baseMatch.firewallName,
|
|
15979
|
+
base: baseMatch.base,
|
|
15980
|
+
relativePath: baseMatch.relativePath,
|
|
15981
|
+
reason: "malformed_network_policy",
|
|
15982
|
+
permissions: []
|
|
15983
|
+
};
|
|
15984
|
+
}
|
|
15985
|
+
if (policy.unknownPolicy === "allow") {
|
|
15986
|
+
return {
|
|
15987
|
+
kind: "allow",
|
|
15988
|
+
firewallName: baseMatch.firewallName,
|
|
15989
|
+
base: baseMatch.allowBase,
|
|
15990
|
+
relativePath: baseMatch.relativePath
|
|
15991
|
+
};
|
|
15992
|
+
}
|
|
15993
|
+
return {
|
|
15994
|
+
kind: "block",
|
|
15995
|
+
firewallName: baseMatch.firewallName,
|
|
15996
|
+
base: baseMatch.base,
|
|
15997
|
+
relativePath: baseMatch.relativePath,
|
|
15998
|
+
reason: "unknown_endpoint",
|
|
15999
|
+
permissions: []
|
|
16000
|
+
};
|
|
16001
|
+
}
|
|
16002
|
+
function unsafePathBlockDecision(firewall, baseMatch) {
|
|
16003
|
+
return {
|
|
16004
|
+
kind: "block",
|
|
16005
|
+
firewallName: firewall.name,
|
|
16006
|
+
base: baseMatch.displayBase,
|
|
16007
|
+
relativePath: baseMatch.relativePath,
|
|
16008
|
+
reason: "unsafe_path",
|
|
16009
|
+
permissions: []
|
|
16010
|
+
};
|
|
16011
|
+
}
|
|
16012
|
+
function recordMalformedDecisionState(state, api, blockMatch) {
|
|
16013
|
+
if (api.baseMalformed || api.authMalformed || api.hasMalformedRules || api.routingIdentity === null) {
|
|
16014
|
+
state.malformedConfigMatch ??= blockMatch;
|
|
16015
|
+
}
|
|
16016
|
+
}
|
|
16017
|
+
function apiCannotEvaluateRules(firewall, api) {
|
|
16018
|
+
return firewall.nameMalformed || api.baseMalformed || api.authMalformed || api.routingIdentity === null;
|
|
16019
|
+
}
|
|
16020
|
+
function policyCannotEvaluateRules(networkPolicies, policy) {
|
|
16021
|
+
return networkPolicies.topLevelMalformed || policy !== void 0 && policy.permissionMalformed;
|
|
16022
|
+
}
|
|
16023
|
+
function createMatchCollection() {
|
|
16024
|
+
return {
|
|
16025
|
+
bestBaseScore: null,
|
|
16026
|
+
bestRuleSpecificity: null,
|
|
16027
|
+
apiMatches: [],
|
|
16028
|
+
ruleMatches: []
|
|
16029
|
+
};
|
|
16030
|
+
}
|
|
16031
|
+
function acceptCollectedApi(collection, match) {
|
|
16032
|
+
if (collection.bestBaseScore === null || match.score > collection.bestBaseScore) {
|
|
16033
|
+
collection.bestBaseScore = match.score;
|
|
16034
|
+
collection.bestRuleSpecificity = null;
|
|
16035
|
+
collection.apiMatches = [];
|
|
16036
|
+
collection.ruleMatches = [];
|
|
16037
|
+
} else if (match.score < collection.bestBaseScore) {
|
|
16038
|
+
return false;
|
|
16039
|
+
}
|
|
16040
|
+
collection.apiMatches.push(match);
|
|
16041
|
+
return true;
|
|
16042
|
+
}
|
|
16043
|
+
function canRuleAffectCollection(collection, specificity) {
|
|
16044
|
+
if (collection.bestRuleSpecificity === null) return true;
|
|
16045
|
+
return comparePathSpecificity(specificity, collection.bestRuleSpecificity) >= 0;
|
|
16046
|
+
}
|
|
16047
|
+
function recordCollectedRule(collection, match) {
|
|
16048
|
+
const bestSpecificity = collection.bestRuleSpecificity;
|
|
16049
|
+
if (bestSpecificity === null || comparePathSpecificity(match.rule.specificity, bestSpecificity) > 0) {
|
|
16050
|
+
collection.bestRuleSpecificity = match.rule.specificity;
|
|
16051
|
+
collection.ruleMatches = [];
|
|
16052
|
+
} else if (comparePathSpecificity(match.rule.specificity, bestSpecificity) < 0) {
|
|
16053
|
+
return;
|
|
16054
|
+
}
|
|
16055
|
+
collection.ruleMatches.push(match);
|
|
16056
|
+
}
|
|
16057
|
+
function collectDecisionRules(collection, apiMatch, upperMethod) {
|
|
16058
|
+
for (const rule of apiMatch.api.rules) {
|
|
16059
|
+
if (rule.method !== "ANY" && rule.method !== upperMethod) continue;
|
|
16060
|
+
if (!canRuleAffectCollection(collection, rule.specificity)) continue;
|
|
16061
|
+
if (matchFirewallPath(apiMatch.baseMatch.relativePath, rule.path) === null) {
|
|
16062
|
+
continue;
|
|
16063
|
+
}
|
|
16064
|
+
recordCollectedRule(collection, { apiMatch, rule });
|
|
16065
|
+
}
|
|
16066
|
+
}
|
|
16067
|
+
function winningApiMatches(collection) {
|
|
16068
|
+
if (collection.ruleMatches.length === 0) {
|
|
16069
|
+
return collection.apiMatches;
|
|
16070
|
+
}
|
|
16071
|
+
const matches = [];
|
|
16072
|
+
const seenOrders = /* @__PURE__ */ new Set();
|
|
16073
|
+
for (const ruleMatch of collection.ruleMatches) {
|
|
16074
|
+
if (seenOrders.has(ruleMatch.apiMatch.order)) continue;
|
|
16075
|
+
seenOrders.add(ruleMatch.apiMatch.order);
|
|
16076
|
+
matches.push(ruleMatch.apiMatch);
|
|
16077
|
+
}
|
|
16078
|
+
return matches;
|
|
16079
|
+
}
|
|
16080
|
+
function winningOwnerNames(collection) {
|
|
16081
|
+
const names = /* @__PURE__ */ new Set();
|
|
16082
|
+
for (const apiMatch of winningApiMatches(collection)) {
|
|
16083
|
+
if (!apiMatch.firewall.nameMalformed) {
|
|
16084
|
+
names.add(apiMatch.firewall.name);
|
|
16085
|
+
}
|
|
16086
|
+
}
|
|
16087
|
+
return [...names].sort();
|
|
16088
|
+
}
|
|
16089
|
+
function connectorAmbiguityReason(intent) {
|
|
16090
|
+
if (intent.status === "absent") return "connector_intent_required";
|
|
16091
|
+
if (intent.status === "malformed") return "malformed_connector_intent";
|
|
16092
|
+
return "connector_intent_not_candidate";
|
|
16093
|
+
}
|
|
16094
|
+
function selectOwner(collection, intent, upperMethod, path) {
|
|
16095
|
+
const [owner, ...otherOwners] = winningOwnerNames(collection);
|
|
16096
|
+
if (owner === void 0) return { kind: "selected", name: null };
|
|
16097
|
+
if (otherOwners.length === 0) {
|
|
16098
|
+
return { kind: "selected", name: owner };
|
|
16099
|
+
}
|
|
16100
|
+
const owners = [owner, ...otherOwners];
|
|
16101
|
+
if (intent.status === "present" && owners.includes(intent.value)) {
|
|
16102
|
+
return { kind: "selected", name: intent.value };
|
|
16103
|
+
}
|
|
16104
|
+
return {
|
|
16105
|
+
kind: "ambiguous",
|
|
16106
|
+
decision: {
|
|
16107
|
+
kind: "ambiguous",
|
|
16108
|
+
method: upperMethod,
|
|
16109
|
+
path,
|
|
16110
|
+
candidates: owners,
|
|
16111
|
+
reason: connectorAmbiguityReason(intent)
|
|
16112
|
+
}
|
|
16113
|
+
};
|
|
16114
|
+
}
|
|
16115
|
+
function conflictingSelectedApiDecision(collection, selectedName) {
|
|
16116
|
+
const [first, ...otherMatches] = winningApiMatches(collection).filter(
|
|
16117
|
+
(match) => {
|
|
16118
|
+
return match.firewall.name === selectedName && !match.firewall.nameMalformed && !match.api.baseMalformed && !match.api.authMalformed && match.api.routingIdentity !== null;
|
|
16119
|
+
}
|
|
16120
|
+
);
|
|
16121
|
+
if (first === void 0 || otherMatches.length === 0) return null;
|
|
16122
|
+
if (otherMatches.every((match) => {
|
|
16123
|
+
return match.api.routingIdentity === first.api.routingIdentity;
|
|
16124
|
+
})) {
|
|
16125
|
+
return null;
|
|
16126
|
+
}
|
|
16127
|
+
return {
|
|
16128
|
+
kind: "block",
|
|
16129
|
+
firewallName: selectedName,
|
|
16130
|
+
base: first.blockMatch.base,
|
|
16131
|
+
relativePath: first.blockMatch.relativePath,
|
|
16132
|
+
reason: "malformed_firewall_config",
|
|
16133
|
+
permissions: []
|
|
16134
|
+
};
|
|
16135
|
+
}
|
|
16136
|
+
function reduceSelectedOwner(collection, selectedName, networkPolicies) {
|
|
16137
|
+
if (selectedName !== null) {
|
|
16138
|
+
const conflict = conflictingSelectedApiDecision(collection, selectedName);
|
|
16139
|
+
if (conflict !== null) return conflict;
|
|
16140
|
+
}
|
|
16141
|
+
const state = createDecisionState();
|
|
16142
|
+
const evaluableApiOrders = /* @__PURE__ */ new Set();
|
|
16143
|
+
for (const apiMatch of collection.apiMatches) {
|
|
16144
|
+
const { firewall, api, baseMatch, blockMatch } = apiMatch;
|
|
16145
|
+
if (selectedName !== null && firewall.name !== selectedName && !firewall.nameMalformed) {
|
|
16146
|
+
continue;
|
|
16147
|
+
}
|
|
16148
|
+
const policy = networkPolicies.policies.get(firewall.name);
|
|
16149
|
+
acceptDecisionBaseMatch(state, baseMatch, apiMatch.score);
|
|
16150
|
+
recordMalformedDecisionState(state, api, blockMatch);
|
|
16151
|
+
if (apiCannotEvaluateRules(firewall, api)) continue;
|
|
16152
|
+
if (policyCannotEvaluateRules(networkPolicies, policy)) {
|
|
16153
|
+
state.malformedPolicyMatch ??= blockMatch;
|
|
16154
|
+
continue;
|
|
16155
|
+
}
|
|
16156
|
+
evaluableApiOrders.add(apiMatch.order);
|
|
16157
|
+
}
|
|
16158
|
+
for (const ruleMatch of collection.ruleMatches) {
|
|
16159
|
+
const { apiMatch, rule } = ruleMatch;
|
|
16160
|
+
if (!evaluableApiOrders.has(apiMatch.order)) continue;
|
|
16161
|
+
if (selectedName !== null && apiMatch.firewall.name !== selectedName) {
|
|
16162
|
+
continue;
|
|
16163
|
+
}
|
|
16164
|
+
const policy = networkPolicies.policies.get(apiMatch.firewall.name);
|
|
16165
|
+
if (!acceptRuleSpecificity(state, rule.specificity)) continue;
|
|
16166
|
+
if (policy !== void 0 && policy.blockedPermissions.has(rule.permission)) {
|
|
16167
|
+
recordDeniedRule(state, apiMatch.blockMatch, rule.permission);
|
|
16168
|
+
continue;
|
|
16169
|
+
}
|
|
16170
|
+
state.allowedMatch ??= {
|
|
16171
|
+
firewallName: apiMatch.baseMatch.firewallName,
|
|
16172
|
+
base: apiMatch.baseMatch.allowBase,
|
|
16173
|
+
relativePath: apiMatch.baseMatch.relativePath,
|
|
16174
|
+
permission: rule.permission,
|
|
16175
|
+
rule: rule.raw
|
|
16176
|
+
};
|
|
16177
|
+
}
|
|
16178
|
+
return resolveFirewallDecision(state, networkPolicies);
|
|
16179
|
+
}
|
|
16180
|
+
function matchFirewallBaseUrl(url, rawBase) {
|
|
16181
|
+
if (hasUnsafeRuntimeUrlSyntax(url) || hasMalformedRuntimeAuthoritySyntax(url)) {
|
|
16182
|
+
return null;
|
|
16183
|
+
}
|
|
16184
|
+
const runtimeAuthorityOrigin = runtimeAuthorityOriginForHostValidation(url);
|
|
16185
|
+
try {
|
|
16186
|
+
if (runtimeAuthorityOrigin !== null) {
|
|
16187
|
+
validateBaseUrl(runtimeAuthorityOrigin, "runtime");
|
|
16188
|
+
}
|
|
16189
|
+
validateBaseUrl(rawBase, "firewall");
|
|
16190
|
+
return matchStaticFirewallBaseUrl(url, rawBase);
|
|
16191
|
+
} catch {
|
|
16192
|
+
return null;
|
|
16193
|
+
}
|
|
16194
|
+
}
|
|
16195
|
+
function matchFirewallRequestDecision(firewalls, method, url, networkPolicies = void 0, connectorIntent = { status: "absent" }) {
|
|
16196
|
+
const decisionFirewalls = compileDecisionFirewalls(firewalls);
|
|
16197
|
+
if (decisionFirewalls.length === 0) return { kind: "no_match" };
|
|
16198
|
+
const compiledNetworkPolicies = compileNetworkPolicies(networkPolicies);
|
|
16199
|
+
const upperMethod = method.toUpperCase();
|
|
16200
|
+
const collection = createMatchCollection();
|
|
16201
|
+
const unsafePath = url.includes("\\") || hasUnsafeFirewallPath(rawPathFromUrl(url));
|
|
16202
|
+
let apiOrder = 0;
|
|
16203
|
+
for (const firewall of decisionFirewalls) {
|
|
16204
|
+
for (const api of firewall.apis) {
|
|
16205
|
+
const order = apiOrder;
|
|
16206
|
+
apiOrder += 1;
|
|
16207
|
+
const baseMatch = matchFirewallBaseUrlForDecision(url, api.rawBase);
|
|
16208
|
+
if (baseMatch === null) continue;
|
|
16209
|
+
if (unsafePath) return unsafePathBlockDecision(firewall, baseMatch);
|
|
16210
|
+
const decisionBaseMatch = {
|
|
16211
|
+
firewallName: firewall.name,
|
|
16212
|
+
base: baseMatch.displayBase,
|
|
16213
|
+
allowBase: api.rawBase,
|
|
16214
|
+
relativePath: baseMatch.relativePath
|
|
16215
|
+
};
|
|
16216
|
+
const apiMatch = {
|
|
16217
|
+
order,
|
|
16218
|
+
firewall,
|
|
16219
|
+
api,
|
|
16220
|
+
baseMatch: decisionBaseMatch,
|
|
16221
|
+
blockMatch: {
|
|
16222
|
+
firewallName: decisionBaseMatch.firewallName,
|
|
16223
|
+
base: decisionBaseMatch.base,
|
|
16224
|
+
relativePath: decisionBaseMatch.relativePath
|
|
16225
|
+
},
|
|
16226
|
+
score: baseMatch.score
|
|
16227
|
+
};
|
|
16228
|
+
if (!acceptCollectedApi(collection, apiMatch)) continue;
|
|
16229
|
+
collectDecisionRules(collection, apiMatch, upperMethod);
|
|
16230
|
+
}
|
|
16231
|
+
}
|
|
16232
|
+
const selection = selectOwner(
|
|
16233
|
+
collection,
|
|
16234
|
+
connectorIntent,
|
|
16235
|
+
upperMethod,
|
|
16236
|
+
rawPathFromUrl(url)
|
|
16237
|
+
);
|
|
16238
|
+
if (selection.kind === "ambiguous") return selection.decision;
|
|
16239
|
+
return reduceSelectedOwner(
|
|
16240
|
+
collection,
|
|
16241
|
+
selection.name,
|
|
16242
|
+
compiledNetworkPolicies
|
|
16243
|
+
);
|
|
16244
|
+
}
|
|
16245
|
+
function matchFirewallHostWithParser(host, pattern, parsePatternSegment) {
|
|
16246
|
+
const hostSegsOrig = host.split(".");
|
|
16247
|
+
const hostSegsLower = hostSegsOrig.map((segment2) => {
|
|
16248
|
+
return segment2.toLowerCase();
|
|
16249
|
+
});
|
|
16250
|
+
const patternSegs = pattern.split(".").reverse();
|
|
16251
|
+
hostSegsOrig.reverse();
|
|
16252
|
+
hostSegsLower.reverse();
|
|
16253
|
+
const params = {};
|
|
16254
|
+
let hi = 0;
|
|
16255
|
+
const lastPatternIndex = patternSegs.length - 1;
|
|
16256
|
+
for (let patternIndex = 0; patternIndex < patternSegs.length; patternIndex++) {
|
|
16257
|
+
const seg = patternSegs[patternIndex];
|
|
16258
|
+
const parsed = parsePatternSegment(seg, patternIndex, lastPatternIndex);
|
|
16259
|
+
if (parsed === null) return null;
|
|
16260
|
+
if (parsed.kind === "literal") {
|
|
16261
|
+
if (hi >= hostSegsLower.length || hostSegsLower[hi] !== parsed.value.toLowerCase()) {
|
|
16262
|
+
return null;
|
|
16263
|
+
}
|
|
16264
|
+
hi += 1;
|
|
16265
|
+
continue;
|
|
16266
|
+
}
|
|
16267
|
+
const { name, prefix, suffix, greedy } = parsed;
|
|
16268
|
+
if (greedy === "+") {
|
|
16269
|
+
if (hi >= hostSegsOrig.length) return null;
|
|
16270
|
+
params[name] = hostSegsOrig.slice(hi).reverse().join(".");
|
|
16271
|
+
return params;
|
|
16272
|
+
}
|
|
16273
|
+
if (greedy === "*") {
|
|
16274
|
+
params[name] = hostSegsOrig.slice(hi).reverse().join(".");
|
|
16275
|
+
return params;
|
|
16276
|
+
}
|
|
16277
|
+
if (hi >= hostSegsOrig.length) return null;
|
|
16278
|
+
if (prefix === "" && suffix === "") {
|
|
16279
|
+
params[name] = hostSegsLower[hi];
|
|
16280
|
+
} else {
|
|
16281
|
+
const captured = matchMixedSegment(
|
|
16282
|
+
hostSegsLower[hi],
|
|
16283
|
+
prefix.toLowerCase(),
|
|
16284
|
+
suffix.toLowerCase()
|
|
16285
|
+
);
|
|
16286
|
+
if (captured === null) return null;
|
|
16287
|
+
params[name] = captured;
|
|
16288
|
+
}
|
|
16289
|
+
hi += 1;
|
|
16290
|
+
}
|
|
16291
|
+
return hi === hostSegsOrig.length ? params : null;
|
|
16292
|
+
}
|
|
16293
|
+
function matchFirewallHost(host, pattern) {
|
|
16294
|
+
return matchFirewallHostWithParser(host, pattern, parseStrictMatchSegment);
|
|
16295
|
+
}
|
|
16296
|
+
function parseMalformedTolerantBaseSegment(segment2, patternIndex, lastPatternIndex) {
|
|
16297
|
+
const parsed = parseSegment(segment2);
|
|
16298
|
+
if (parsed.kind === "error") {
|
|
16299
|
+
return {
|
|
16300
|
+
kind: "param",
|
|
16301
|
+
prefix: "",
|
|
16302
|
+
name: `__malformed_base_segment_${patternIndex}`,
|
|
16303
|
+
suffix: "",
|
|
16304
|
+
greedy: ""
|
|
16305
|
+
};
|
|
16306
|
+
}
|
|
16307
|
+
if (parsed.kind === "param" && parsed.greedy !== "" && isInvalidGreedyParam(
|
|
16308
|
+
patternIndex,
|
|
16309
|
+
lastPatternIndex,
|
|
16310
|
+
parsed.prefix,
|
|
16311
|
+
parsed.suffix
|
|
16312
|
+
)) {
|
|
16313
|
+
return { ...parsed, greedy: "" };
|
|
16314
|
+
}
|
|
16315
|
+
return parsed;
|
|
16316
|
+
}
|
|
16317
|
+
function matchFirewallHostForMalformedBaseDecision(host, pattern) {
|
|
16318
|
+
return matchFirewallHostWithParser(
|
|
16319
|
+
host,
|
|
16320
|
+
pattern,
|
|
16321
|
+
parseMalformedTolerantBaseSegment
|
|
16322
|
+
);
|
|
16323
|
+
}
|
|
16324
|
+
function matchFirewallPathPrefixWithParser(path, pattern, parsePatternSegment) {
|
|
16325
|
+
const pathSegs = splitPathSegments(path);
|
|
16326
|
+
const patternSegs = splitPathSegments(pattern);
|
|
16327
|
+
let pi = 0;
|
|
16328
|
+
const lastPatternIndex = patternSegs.length - 1;
|
|
16329
|
+
for (let patternIndex = 0; patternIndex < patternSegs.length; patternIndex++) {
|
|
16330
|
+
const seg = patternSegs[patternIndex];
|
|
16331
|
+
const parsed = parsePatternSegment(seg, patternIndex, lastPatternIndex);
|
|
16332
|
+
if (parsed === null) return null;
|
|
16333
|
+
if (parsed.kind === "literal") {
|
|
16334
|
+
if (pi >= pathSegs.length || pathSegs[pi] !== parsed.value) return null;
|
|
16335
|
+
pi += 1;
|
|
16336
|
+
continue;
|
|
16337
|
+
}
|
|
16338
|
+
const { prefix, suffix, greedy } = parsed;
|
|
16339
|
+
if (greedy === "+") {
|
|
16340
|
+
if (pi >= pathSegs.length || !hasNonEmptySegment(pathSegs, pi)) {
|
|
16341
|
+
return null;
|
|
16342
|
+
}
|
|
16343
|
+
return "/";
|
|
16344
|
+
}
|
|
16345
|
+
if (greedy === "*") {
|
|
16346
|
+
return "/";
|
|
16347
|
+
}
|
|
16348
|
+
if (pi >= pathSegs.length) return null;
|
|
16349
|
+
const runtime2 = pathSegs[pi];
|
|
16350
|
+
if (prefix === "" && suffix === "") {
|
|
16351
|
+
if (runtime2 === "") return null;
|
|
16352
|
+
} else if (matchMixedSegment(runtime2, prefix, suffix) === null) {
|
|
16353
|
+
return null;
|
|
16354
|
+
}
|
|
16355
|
+
pi += 1;
|
|
16356
|
+
}
|
|
16357
|
+
return relativePathFromSegments(pathSegs, pi);
|
|
16358
|
+
}
|
|
16359
|
+
function matchFirewallPathPrefix(path, pattern) {
|
|
16360
|
+
return matchFirewallPathPrefixWithParser(
|
|
16361
|
+
path,
|
|
16362
|
+
pattern,
|
|
16363
|
+
parseStrictMatchSegment
|
|
16364
|
+
);
|
|
16365
|
+
}
|
|
16366
|
+
function matchFirewallPathPrefixForMalformedBaseDecision(path, pattern) {
|
|
16367
|
+
return matchFirewallPathPrefixWithParser(
|
|
16368
|
+
path,
|
|
16369
|
+
pattern,
|
|
16370
|
+
parseMalformedTolerantBaseSegment
|
|
16371
|
+
);
|
|
16372
|
+
}
|
|
16373
|
+
function matchFirewallPath(path, pattern) {
|
|
16374
|
+
const pathSegs = splitPathSegments(path);
|
|
16375
|
+
const patternSegs = splitPathSegments(pattern);
|
|
16376
|
+
const params = {};
|
|
16377
|
+
let pi = 0;
|
|
16378
|
+
const lastPatternIndex = patternSegs.length - 1;
|
|
16379
|
+
for (let patternIndex = 0; patternIndex < patternSegs.length; patternIndex++) {
|
|
16380
|
+
const seg = patternSegs[patternIndex];
|
|
16381
|
+
const parsed = parseSegment(seg);
|
|
16382
|
+
if (parsed.kind === "error") return null;
|
|
16383
|
+
if (parsed.kind === "literal") {
|
|
16384
|
+
if (pi >= pathSegs.length || pathSegs[pi] !== parsed.value) return null;
|
|
16385
|
+
pi++;
|
|
16386
|
+
continue;
|
|
16387
|
+
}
|
|
16388
|
+
const { name, prefix, suffix, greedy } = parsed;
|
|
16389
|
+
if (greedy === "+") {
|
|
16390
|
+
if (isInvalidGreedyParam(patternIndex, lastPatternIndex, prefix, suffix))
|
|
16391
|
+
return null;
|
|
16392
|
+
if (pi >= pathSegs.length || !hasNonEmptySegment(pathSegs, pi)) {
|
|
16393
|
+
return null;
|
|
16394
|
+
}
|
|
16395
|
+
params[name] = pathSegs.slice(pi).join("/");
|
|
16396
|
+
return params;
|
|
16397
|
+
}
|
|
16398
|
+
if (greedy === "*") {
|
|
16399
|
+
if (isInvalidGreedyParam(patternIndex, lastPatternIndex, prefix, suffix))
|
|
16400
|
+
return null;
|
|
16401
|
+
params[name] = pathSegs.slice(pi).join("/");
|
|
16402
|
+
return params;
|
|
16403
|
+
}
|
|
16404
|
+
if (pi >= pathSegs.length) return null;
|
|
16405
|
+
const runtime2 = pathSegs[pi];
|
|
16406
|
+
if (prefix === "" && suffix === "") {
|
|
16407
|
+
if (runtime2 === "") return null;
|
|
16408
|
+
params[name] = runtime2;
|
|
16409
|
+
} else {
|
|
16410
|
+
const captured = matchMixedSegment(runtime2, prefix, suffix);
|
|
16411
|
+
if (captured === null) return null;
|
|
16412
|
+
params[name] = captured;
|
|
16413
|
+
}
|
|
16414
|
+
pi++;
|
|
16415
|
+
}
|
|
16416
|
+
if (pi !== pathSegs.length) return null;
|
|
16417
|
+
return params;
|
|
16418
|
+
}
|
|
16419
|
+
|
|
14552
16420
|
export {
|
|
14553
16421
|
CONNECTOR_TYPES,
|
|
14554
16422
|
getConnectorEnvBindingEntries,
|
|
14555
|
-
|
|
14556
|
-
|
|
16423
|
+
getDiagnosticConnectorTypeForRuntimeEnvName,
|
|
16424
|
+
matchFirewallBaseUrl,
|
|
16425
|
+
matchFirewallRequestDecision
|
|
14557
16426
|
};
|
|
14558
|
-
//# sourceMappingURL=chunk-
|
|
16427
|
+
//# sourceMappingURL=chunk-H4Y7JDZB.js.map
|