@revenexx/integrations-node-sdk 1.3.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +49 -5
- package/dist/index.d.cts +62 -2
- package/dist/index.d.ts +62 -2
- package/dist/index.js +49 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -671,7 +671,11 @@ async function readJsonOrText(res, maxBytes = DEFAULT_MAX_RESPONSE_BYTES) {
|
|
|
671
671
|
function maxBytesConfigField(opts) {
|
|
672
672
|
return {
|
|
673
673
|
key: "maxBytes",
|
|
674
|
-
label: "Max response size (bytes)",
|
|
674
|
+
label: { en: "Max response size (bytes)", de: "Maximale Antwortgr\xF6\xDFe (Bytes)" },
|
|
675
|
+
description: {
|
|
676
|
+
en: "An answer larger than this is refused instead of read, counted per answer rather than per run. This package enforces a ceiling of its own above it, so a larger value buys nothing.",
|
|
677
|
+
de: "Eine gr\xF6\xDFere Antwort wird abgelehnt statt gelesen; gez\xE4hlt wird je Antwort, nicht je Lauf. Dar\xFCber liegt zus\xE4tzlich die feste Obergrenze dieses Pakets, ein h\xF6herer Wert bringt also nichts."
|
|
678
|
+
},
|
|
675
679
|
type: "number",
|
|
676
680
|
default: opts?.default ?? DEFAULT_MAX_RESPONSE_BYTES,
|
|
677
681
|
validation: { min: 1, max: Math.min(opts?.max ?? MAX_RESPONSE_BYTES, MAX_RESPONSE_BYTES) }
|
|
@@ -680,7 +684,11 @@ function maxBytesConfigField(opts) {
|
|
|
680
684
|
function timeoutConfigField(opts) {
|
|
681
685
|
return {
|
|
682
686
|
key: "timeoutMs",
|
|
683
|
-
label: "Timeout (ms)",
|
|
687
|
+
label: { en: "Timeout (ms)", de: "Zeitlimit (ms)" },
|
|
688
|
+
description: {
|
|
689
|
+
en: "How long one attempt may take before it fails as a timeout. Counted per attempt and per redirect hop, not across the whole call.",
|
|
690
|
+
de: "Wie lange ein einzelner Versuch dauern darf, bevor er als Zeit\xFCberschreitung fehlschl\xE4gt. Gilt je Versuch und je Weiterleitung, nicht f\xFCr den gesamten Aufruf."
|
|
691
|
+
},
|
|
684
692
|
type: "number",
|
|
685
693
|
default: opts?.default ?? DEFAULT_TIMEOUT_MS,
|
|
686
694
|
validation: { min: 100, max: opts?.max ?? MAX_TIMEOUT_MS }
|
|
@@ -690,14 +698,22 @@ function retryConfigFields(opts) {
|
|
|
690
698
|
return [
|
|
691
699
|
{
|
|
692
700
|
key: "retryAttempts",
|
|
693
|
-
label: "Retry attempts",
|
|
701
|
+
label: { en: "Retry attempts", de: "Wiederholungsversuche" },
|
|
702
|
+
description: {
|
|
703
|
+
en: "How often a failed attempt is repeated. 0 sends the request once and reports the first failure.",
|
|
704
|
+
de: "Wie oft ein fehlgeschlagener Versuch wiederholt wird. 0 sendet die Anfrage einmal und meldet den ersten Fehler."
|
|
705
|
+
},
|
|
694
706
|
type: "number",
|
|
695
707
|
default: opts?.defaultAttempts ?? DEFAULT_RETRY_ATTEMPTS,
|
|
696
708
|
validation: { min: 0, max: MAX_RETRY_ATTEMPTS }
|
|
697
709
|
},
|
|
698
710
|
{
|
|
699
711
|
key: "retryDelayMs",
|
|
700
|
-
label: "Retry delay (ms)",
|
|
712
|
+
label: { en: "Retry delay (ms)", de: "Wartezeit vor Wiederholung (ms)" },
|
|
713
|
+
description: {
|
|
714
|
+
en: "How long to wait before the next attempt.",
|
|
715
|
+
de: "Wie lange vor dem n\xE4chsten Versuch gewartet wird."
|
|
716
|
+
},
|
|
701
717
|
type: "number",
|
|
702
718
|
default: opts?.defaultDelayMs ?? DEFAULT_RETRY_DELAY_MS,
|
|
703
719
|
validation: { min: 100 }
|
|
@@ -898,11 +914,39 @@ var SimpleValueCredential = class extends BaseCredential {
|
|
|
898
914
|
}
|
|
899
915
|
};
|
|
900
916
|
var ApiKeyCredential = class extends BaseCredential {
|
|
917
|
+
/**
|
|
918
|
+
* Which field of the credential form the key is typed into. Override it to
|
|
919
|
+
* name the form field this provider calls its key — `botToken`, `authKey`,
|
|
920
|
+
* `webhookUrl`.
|
|
921
|
+
*
|
|
922
|
+
* **What this does not do** (PO-497): it does not decide what a node looks
|
|
923
|
+
* the key up under at run time. It used to do only half of that — it changed
|
|
924
|
+
* which field was *read* while {@link credentialShape} went on emitting
|
|
925
|
+
* `apiKey` — so a credential that renamed its form field alone handed the
|
|
926
|
+
* node a key under a name it was never told to expect, and the node refused
|
|
927
|
+
* a perfectly good key as a missing one. The default shape now follows this
|
|
928
|
+
* name, so overriding this alone is correct on both sides. Overriding
|
|
929
|
+
* {@link credentialShape} as well is still how a credential emits a
|
|
930
|
+
* different name, or more than the key.
|
|
931
|
+
*
|
|
932
|
+
* Note that no node test can see a mismatch between the two: a mocked node
|
|
933
|
+
* context is seeded with the resolved blob directly and never calls
|
|
934
|
+
* `resolve`. Only a credential test asserting the whole resolved shape
|
|
935
|
+
* catches it, and asserting it loosely still misses — a partial match is
|
|
936
|
+
* happy with the wrong key present beside the right one.
|
|
937
|
+
*/
|
|
901
938
|
apiKeyField() {
|
|
902
939
|
return "apiKey";
|
|
903
940
|
}
|
|
941
|
+
/**
|
|
942
|
+
* What the node receives. Defaults to the key under the name
|
|
943
|
+
* {@link apiKeyField} returns, so the two cannot drift apart by default.
|
|
944
|
+
*
|
|
945
|
+
* Override it where the node needs a different name than the form uses, or
|
|
946
|
+
* needs more than the key — a base URL derived from it, say.
|
|
947
|
+
*/
|
|
904
948
|
credentialShape(apiKey) {
|
|
905
|
-
return { apiKey };
|
|
949
|
+
return { [this.apiKeyField()]: apiKey };
|
|
906
950
|
}
|
|
907
951
|
async resolve(_ctx, config, _durableCreds) {
|
|
908
952
|
const apiKey = requireString(config, this.apiKeyField(), this.description.slug);
|
package/dist/index.d.cts
CHANGED
|
@@ -771,14 +771,45 @@ declare function readText(res: Response, maxBytes?: number): Promise<string>;
|
|
|
771
771
|
* rather than a raw `SyntaxError`, keeping to the SDK error contract.
|
|
772
772
|
*/
|
|
773
773
|
declare function readJsonOrText(res: Response, maxBytes?: number): Promise<unknown>;
|
|
774
|
+
/**
|
|
775
|
+
* The setting a node offers its workflow author for the response size cap,
|
|
776
|
+
* ready to spread into `description.config`.
|
|
777
|
+
*
|
|
778
|
+
* **What the node still has to do** (PO-497): declaring the setting does not
|
|
779
|
+
* wire it up. Read the configured value in `execute` and pass it on — the
|
|
780
|
+
* helpers here only produce the declaration, and a node that spreads this and
|
|
781
|
+
* never reads `config.maxBytes` offers a setting that does nothing.
|
|
782
|
+
*
|
|
783
|
+
* Everything an author reads is supplied in both languages the node packages
|
|
784
|
+
* write, so spreading this unchanged already satisfies the rule they hold.
|
|
785
|
+
* Nothing is left to the caller on that side: a node that wants different
|
|
786
|
+
* words replaces the field rather than completing it.
|
|
787
|
+
*/
|
|
774
788
|
declare function maxBytesConfigField(opts?: {
|
|
775
789
|
default?: number;
|
|
776
790
|
max?: number;
|
|
777
791
|
}): IConfigField;
|
|
792
|
+
/**
|
|
793
|
+
* The setting a node offers its workflow author for the request budget, ready
|
|
794
|
+
* to spread into `description.config`.
|
|
795
|
+
*
|
|
796
|
+
* **What the node still has to do** (PO-497): pass the configured value to
|
|
797
|
+
* `safeFetch` as `timeoutMs`. See {@link maxBytesConfigField} for the same note
|
|
798
|
+
* and for why the label and description are not the caller's to complete.
|
|
799
|
+
*/
|
|
778
800
|
declare function timeoutConfigField(opts?: {
|
|
779
801
|
default?: number;
|
|
780
802
|
max?: number;
|
|
781
803
|
}): IConfigField;
|
|
804
|
+
/**
|
|
805
|
+
* The two settings a node offers its workflow author for the retry budget,
|
|
806
|
+
* ready to spread into `description.config`.
|
|
807
|
+
*
|
|
808
|
+
* **What the node still has to do** (PO-497): pass both configured values to
|
|
809
|
+
* `safeFetch` as `retry.attempts` and `retry.delayMs`. See
|
|
810
|
+
* {@link maxBytesConfigField} for the same note and for why the labels and
|
|
811
|
+
* descriptions are not the caller's to complete.
|
|
812
|
+
*/
|
|
782
813
|
declare function retryConfigFields(opts?: {
|
|
783
814
|
defaultAttempts?: number;
|
|
784
815
|
defaultDelayMs?: number;
|
|
@@ -1043,11 +1074,40 @@ declare abstract class SimpleValueCredential extends BaseCredential {
|
|
|
1043
1074
|
resolve(_ctx: ICredentialContext, config: Config, _durableCreds: DurableCreds): Promise<ICredentialResolveResult>;
|
|
1044
1075
|
}
|
|
1045
1076
|
/**
|
|
1046
|
-
* API-key credential.
|
|
1047
|
-
*
|
|
1077
|
+
* API-key credential. Reads the key from the configured field and hands it to
|
|
1078
|
+
* the node under that same name; override {@link credentialShape} where the
|
|
1079
|
+
* node needs something else, or more than the key alone.
|
|
1048
1080
|
*/
|
|
1049
1081
|
declare abstract class ApiKeyCredential extends BaseCredential {
|
|
1082
|
+
/**
|
|
1083
|
+
* Which field of the credential form the key is typed into. Override it to
|
|
1084
|
+
* name the form field this provider calls its key — `botToken`, `authKey`,
|
|
1085
|
+
* `webhookUrl`.
|
|
1086
|
+
*
|
|
1087
|
+
* **What this does not do** (PO-497): it does not decide what a node looks
|
|
1088
|
+
* the key up under at run time. It used to do only half of that — it changed
|
|
1089
|
+
* which field was *read* while {@link credentialShape} went on emitting
|
|
1090
|
+
* `apiKey` — so a credential that renamed its form field alone handed the
|
|
1091
|
+
* node a key under a name it was never told to expect, and the node refused
|
|
1092
|
+
* a perfectly good key as a missing one. The default shape now follows this
|
|
1093
|
+
* name, so overriding this alone is correct on both sides. Overriding
|
|
1094
|
+
* {@link credentialShape} as well is still how a credential emits a
|
|
1095
|
+
* different name, or more than the key.
|
|
1096
|
+
*
|
|
1097
|
+
* Note that no node test can see a mismatch between the two: a mocked node
|
|
1098
|
+
* context is seeded with the resolved blob directly and never calls
|
|
1099
|
+
* `resolve`. Only a credential test asserting the whole resolved shape
|
|
1100
|
+
* catches it, and asserting it loosely still misses — a partial match is
|
|
1101
|
+
* happy with the wrong key present beside the right one.
|
|
1102
|
+
*/
|
|
1050
1103
|
protected apiKeyField(): string;
|
|
1104
|
+
/**
|
|
1105
|
+
* What the node receives. Defaults to the key under the name
|
|
1106
|
+
* {@link apiKeyField} returns, so the two cannot drift apart by default.
|
|
1107
|
+
*
|
|
1108
|
+
* Override it where the node needs a different name than the form uses, or
|
|
1109
|
+
* needs more than the key — a base URL derived from it, say.
|
|
1110
|
+
*/
|
|
1051
1111
|
protected credentialShape(apiKey: string): Record<string, unknown>;
|
|
1052
1112
|
resolve(_ctx: ICredentialContext, config: Config, _durableCreds: DurableCreds): Promise<ICredentialResolveResult>;
|
|
1053
1113
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -771,14 +771,45 @@ declare function readText(res: Response, maxBytes?: number): Promise<string>;
|
|
|
771
771
|
* rather than a raw `SyntaxError`, keeping to the SDK error contract.
|
|
772
772
|
*/
|
|
773
773
|
declare function readJsonOrText(res: Response, maxBytes?: number): Promise<unknown>;
|
|
774
|
+
/**
|
|
775
|
+
* The setting a node offers its workflow author for the response size cap,
|
|
776
|
+
* ready to spread into `description.config`.
|
|
777
|
+
*
|
|
778
|
+
* **What the node still has to do** (PO-497): declaring the setting does not
|
|
779
|
+
* wire it up. Read the configured value in `execute` and pass it on — the
|
|
780
|
+
* helpers here only produce the declaration, and a node that spreads this and
|
|
781
|
+
* never reads `config.maxBytes` offers a setting that does nothing.
|
|
782
|
+
*
|
|
783
|
+
* Everything an author reads is supplied in both languages the node packages
|
|
784
|
+
* write, so spreading this unchanged already satisfies the rule they hold.
|
|
785
|
+
* Nothing is left to the caller on that side: a node that wants different
|
|
786
|
+
* words replaces the field rather than completing it.
|
|
787
|
+
*/
|
|
774
788
|
declare function maxBytesConfigField(opts?: {
|
|
775
789
|
default?: number;
|
|
776
790
|
max?: number;
|
|
777
791
|
}): IConfigField;
|
|
792
|
+
/**
|
|
793
|
+
* The setting a node offers its workflow author for the request budget, ready
|
|
794
|
+
* to spread into `description.config`.
|
|
795
|
+
*
|
|
796
|
+
* **What the node still has to do** (PO-497): pass the configured value to
|
|
797
|
+
* `safeFetch` as `timeoutMs`. See {@link maxBytesConfigField} for the same note
|
|
798
|
+
* and for why the label and description are not the caller's to complete.
|
|
799
|
+
*/
|
|
778
800
|
declare function timeoutConfigField(opts?: {
|
|
779
801
|
default?: number;
|
|
780
802
|
max?: number;
|
|
781
803
|
}): IConfigField;
|
|
804
|
+
/**
|
|
805
|
+
* The two settings a node offers its workflow author for the retry budget,
|
|
806
|
+
* ready to spread into `description.config`.
|
|
807
|
+
*
|
|
808
|
+
* **What the node still has to do** (PO-497): pass both configured values to
|
|
809
|
+
* `safeFetch` as `retry.attempts` and `retry.delayMs`. See
|
|
810
|
+
* {@link maxBytesConfigField} for the same note and for why the labels and
|
|
811
|
+
* descriptions are not the caller's to complete.
|
|
812
|
+
*/
|
|
782
813
|
declare function retryConfigFields(opts?: {
|
|
783
814
|
defaultAttempts?: number;
|
|
784
815
|
defaultDelayMs?: number;
|
|
@@ -1043,11 +1074,40 @@ declare abstract class SimpleValueCredential extends BaseCredential {
|
|
|
1043
1074
|
resolve(_ctx: ICredentialContext, config: Config, _durableCreds: DurableCreds): Promise<ICredentialResolveResult>;
|
|
1044
1075
|
}
|
|
1045
1076
|
/**
|
|
1046
|
-
* API-key credential.
|
|
1047
|
-
*
|
|
1077
|
+
* API-key credential. Reads the key from the configured field and hands it to
|
|
1078
|
+
* the node under that same name; override {@link credentialShape} where the
|
|
1079
|
+
* node needs something else, or more than the key alone.
|
|
1048
1080
|
*/
|
|
1049
1081
|
declare abstract class ApiKeyCredential extends BaseCredential {
|
|
1082
|
+
/**
|
|
1083
|
+
* Which field of the credential form the key is typed into. Override it to
|
|
1084
|
+
* name the form field this provider calls its key — `botToken`, `authKey`,
|
|
1085
|
+
* `webhookUrl`.
|
|
1086
|
+
*
|
|
1087
|
+
* **What this does not do** (PO-497): it does not decide what a node looks
|
|
1088
|
+
* the key up under at run time. It used to do only half of that — it changed
|
|
1089
|
+
* which field was *read* while {@link credentialShape} went on emitting
|
|
1090
|
+
* `apiKey` — so a credential that renamed its form field alone handed the
|
|
1091
|
+
* node a key under a name it was never told to expect, and the node refused
|
|
1092
|
+
* a perfectly good key as a missing one. The default shape now follows this
|
|
1093
|
+
* name, so overriding this alone is correct on both sides. Overriding
|
|
1094
|
+
* {@link credentialShape} as well is still how a credential emits a
|
|
1095
|
+
* different name, or more than the key.
|
|
1096
|
+
*
|
|
1097
|
+
* Note that no node test can see a mismatch between the two: a mocked node
|
|
1098
|
+
* context is seeded with the resolved blob directly and never calls
|
|
1099
|
+
* `resolve`. Only a credential test asserting the whole resolved shape
|
|
1100
|
+
* catches it, and asserting it loosely still misses — a partial match is
|
|
1101
|
+
* happy with the wrong key present beside the right one.
|
|
1102
|
+
*/
|
|
1050
1103
|
protected apiKeyField(): string;
|
|
1104
|
+
/**
|
|
1105
|
+
* What the node receives. Defaults to the key under the name
|
|
1106
|
+
* {@link apiKeyField} returns, so the two cannot drift apart by default.
|
|
1107
|
+
*
|
|
1108
|
+
* Override it where the node needs a different name than the form uses, or
|
|
1109
|
+
* needs more than the key — a base URL derived from it, say.
|
|
1110
|
+
*/
|
|
1051
1111
|
protected credentialShape(apiKey: string): Record<string, unknown>;
|
|
1052
1112
|
resolve(_ctx: ICredentialContext, config: Config, _durableCreds: DurableCreds): Promise<ICredentialResolveResult>;
|
|
1053
1113
|
}
|
package/dist/index.js
CHANGED
|
@@ -580,7 +580,11 @@ async function readJsonOrText(res, maxBytes = DEFAULT_MAX_RESPONSE_BYTES) {
|
|
|
580
580
|
function maxBytesConfigField(opts) {
|
|
581
581
|
return {
|
|
582
582
|
key: "maxBytes",
|
|
583
|
-
label: "Max response size (bytes)",
|
|
583
|
+
label: { en: "Max response size (bytes)", de: "Maximale Antwortgr\xF6\xDFe (Bytes)" },
|
|
584
|
+
description: {
|
|
585
|
+
en: "An answer larger than this is refused instead of read, counted per answer rather than per run. This package enforces a ceiling of its own above it, so a larger value buys nothing.",
|
|
586
|
+
de: "Eine gr\xF6\xDFere Antwort wird abgelehnt statt gelesen; gez\xE4hlt wird je Antwort, nicht je Lauf. Dar\xFCber liegt zus\xE4tzlich die feste Obergrenze dieses Pakets, ein h\xF6herer Wert bringt also nichts."
|
|
587
|
+
},
|
|
584
588
|
type: "number",
|
|
585
589
|
default: opts?.default ?? DEFAULT_MAX_RESPONSE_BYTES,
|
|
586
590
|
validation: { min: 1, max: Math.min(opts?.max ?? MAX_RESPONSE_BYTES, MAX_RESPONSE_BYTES) }
|
|
@@ -589,7 +593,11 @@ function maxBytesConfigField(opts) {
|
|
|
589
593
|
function timeoutConfigField(opts) {
|
|
590
594
|
return {
|
|
591
595
|
key: "timeoutMs",
|
|
592
|
-
label: "Timeout (ms)",
|
|
596
|
+
label: { en: "Timeout (ms)", de: "Zeitlimit (ms)" },
|
|
597
|
+
description: {
|
|
598
|
+
en: "How long one attempt may take before it fails as a timeout. Counted per attempt and per redirect hop, not across the whole call.",
|
|
599
|
+
de: "Wie lange ein einzelner Versuch dauern darf, bevor er als Zeit\xFCberschreitung fehlschl\xE4gt. Gilt je Versuch und je Weiterleitung, nicht f\xFCr den gesamten Aufruf."
|
|
600
|
+
},
|
|
593
601
|
type: "number",
|
|
594
602
|
default: opts?.default ?? DEFAULT_TIMEOUT_MS,
|
|
595
603
|
validation: { min: 100, max: opts?.max ?? MAX_TIMEOUT_MS }
|
|
@@ -599,14 +607,22 @@ function retryConfigFields(opts) {
|
|
|
599
607
|
return [
|
|
600
608
|
{
|
|
601
609
|
key: "retryAttempts",
|
|
602
|
-
label: "Retry attempts",
|
|
610
|
+
label: { en: "Retry attempts", de: "Wiederholungsversuche" },
|
|
611
|
+
description: {
|
|
612
|
+
en: "How often a failed attempt is repeated. 0 sends the request once and reports the first failure.",
|
|
613
|
+
de: "Wie oft ein fehlgeschlagener Versuch wiederholt wird. 0 sendet die Anfrage einmal und meldet den ersten Fehler."
|
|
614
|
+
},
|
|
603
615
|
type: "number",
|
|
604
616
|
default: opts?.defaultAttempts ?? DEFAULT_RETRY_ATTEMPTS,
|
|
605
617
|
validation: { min: 0, max: MAX_RETRY_ATTEMPTS }
|
|
606
618
|
},
|
|
607
619
|
{
|
|
608
620
|
key: "retryDelayMs",
|
|
609
|
-
label: "Retry delay (ms)",
|
|
621
|
+
label: { en: "Retry delay (ms)", de: "Wartezeit vor Wiederholung (ms)" },
|
|
622
|
+
description: {
|
|
623
|
+
en: "How long to wait before the next attempt.",
|
|
624
|
+
de: "Wie lange vor dem n\xE4chsten Versuch gewartet wird."
|
|
625
|
+
},
|
|
610
626
|
type: "number",
|
|
611
627
|
default: opts?.defaultDelayMs ?? DEFAULT_RETRY_DELAY_MS,
|
|
612
628
|
validation: { min: 100 }
|
|
@@ -780,11 +796,39 @@ var SimpleValueCredential = class extends BaseCredential {
|
|
|
780
796
|
}
|
|
781
797
|
};
|
|
782
798
|
var ApiKeyCredential = class extends BaseCredential {
|
|
799
|
+
/**
|
|
800
|
+
* Which field of the credential form the key is typed into. Override it to
|
|
801
|
+
* name the form field this provider calls its key — `botToken`, `authKey`,
|
|
802
|
+
* `webhookUrl`.
|
|
803
|
+
*
|
|
804
|
+
* **What this does not do** (PO-497): it does not decide what a node looks
|
|
805
|
+
* the key up under at run time. It used to do only half of that — it changed
|
|
806
|
+
* which field was *read* while {@link credentialShape} went on emitting
|
|
807
|
+
* `apiKey` — so a credential that renamed its form field alone handed the
|
|
808
|
+
* node a key under a name it was never told to expect, and the node refused
|
|
809
|
+
* a perfectly good key as a missing one. The default shape now follows this
|
|
810
|
+
* name, so overriding this alone is correct on both sides. Overriding
|
|
811
|
+
* {@link credentialShape} as well is still how a credential emits a
|
|
812
|
+
* different name, or more than the key.
|
|
813
|
+
*
|
|
814
|
+
* Note that no node test can see a mismatch between the two: a mocked node
|
|
815
|
+
* context is seeded with the resolved blob directly and never calls
|
|
816
|
+
* `resolve`. Only a credential test asserting the whole resolved shape
|
|
817
|
+
* catches it, and asserting it loosely still misses — a partial match is
|
|
818
|
+
* happy with the wrong key present beside the right one.
|
|
819
|
+
*/
|
|
783
820
|
apiKeyField() {
|
|
784
821
|
return "apiKey";
|
|
785
822
|
}
|
|
823
|
+
/**
|
|
824
|
+
* What the node receives. Defaults to the key under the name
|
|
825
|
+
* {@link apiKeyField} returns, so the two cannot drift apart by default.
|
|
826
|
+
*
|
|
827
|
+
* Override it where the node needs a different name than the form uses, or
|
|
828
|
+
* needs more than the key — a base URL derived from it, say.
|
|
829
|
+
*/
|
|
786
830
|
credentialShape(apiKey) {
|
|
787
|
-
return { apiKey };
|
|
831
|
+
return { [this.apiKeyField()]: apiKey };
|
|
788
832
|
}
|
|
789
833
|
async resolve(_ctx, config, _durableCreds) {
|
|
790
834
|
const apiKey = requireString(config, this.apiKeyField(), this.description.slug);
|