@superblocksteam/shared 0.9421.0 → 0.9422.0
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/plugins/index.d.ts.map +1 -1
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/index.js.map +1 -1
- package/dist/plugins/registry.d.ts.map +1 -1
- package/dist/plugins/registry.js +1 -0
- package/dist/plugins/registry.js.map +1 -1
- package/dist/plugins/templates/index.d.ts +1 -0
- package/dist/plugins/templates/index.d.ts.map +1 -1
- package/dist/plugins/templates/index.js +1 -0
- package/dist/plugins/templates/index.js.map +1 -1
- package/dist/plugins/templates/openai.js +1 -1
- package/dist/plugins/templates/openai.js.map +1 -1
- package/dist/plugins/templates/openai_v2.d.ts +3 -0
- package/dist/plugins/templates/openai_v2.d.ts.map +1 -0
- package/dist/plugins/templates/openai_v2.js +22 -0
- package/dist/plugins/templates/openai_v2.js.map +1 -0
- package/dist/plugins/templates/shared/auth.d.ts +2 -0
- package/dist/plugins/templates/shared/auth.d.ts.map +1 -1
- package/dist/plugins/templates/shared/auth.js +22 -1
- package/dist/plugins/templates/shared/auth.js.map +1 -1
- package/dist/types/plugin/integration.d.ts +1 -0
- package/dist/types/plugin/integration.d.ts.map +1 -1
- package/dist/types/plugin/integration.js +3 -1
- package/dist/types/plugin/integration.js.map +1 -1
- package/dist-esm/plugins/index.d.ts.map +1 -1
- package/dist-esm/plugins/index.js +2 -1
- package/dist-esm/plugins/index.js.map +1 -1
- package/dist-esm/plugins/registry.d.ts.map +1 -1
- package/dist-esm/plugins/registry.js +2 -1
- package/dist-esm/plugins/registry.js.map +1 -1
- package/dist-esm/plugins/templates/index.d.ts +1 -0
- package/dist-esm/plugins/templates/index.d.ts.map +1 -1
- package/dist-esm/plugins/templates/index.js +1 -0
- package/dist-esm/plugins/templates/index.js.map +1 -1
- package/dist-esm/plugins/templates/openai.js +1 -1
- package/dist-esm/plugins/templates/openai.js.map +1 -1
- package/dist-esm/plugins/templates/openai_v2.d.ts +3 -0
- package/dist-esm/plugins/templates/openai_v2.d.ts.map +1 -0
- package/dist-esm/plugins/templates/openai_v2.js +19 -0
- package/dist-esm/plugins/templates/openai_v2.js.map +1 -0
- package/dist-esm/plugins/templates/shared/auth.d.ts +2 -0
- package/dist-esm/plugins/templates/shared/auth.d.ts.map +1 -1
- package/dist-esm/plugins/templates/shared/auth.js +22 -1
- package/dist-esm/plugins/templates/shared/auth.js.map +1 -1
- package/dist-esm/types/plugin/integration.d.ts +1 -0
- package/dist-esm/types/plugin/integration.d.ts.map +1 -1
- package/dist-esm/types/plugin/integration.js +3 -1
- package/dist-esm/types/plugin/integration.js.map +1 -1
- package/package.json +1 -1
- package/src/plugins/index.ts +2 -0
- package/src/plugins/registry.ts +2 -0
- package/src/plugins/templates/index.ts +1 -0
- package/src/plugins/templates/openai.ts +1 -1
- package/src/plugins/templates/openai_v2.ts +19 -0
- package/src/plugins/templates/shared/auth.ts +28 -1
- package/src/types/plugin/integration.ts +3 -1
|
@@ -27,6 +27,8 @@ type ApiKeyFormItem = {
|
|
|
27
27
|
label: string; // The label for the form
|
|
28
28
|
header: string; // The HTTP header key
|
|
29
29
|
key: string; // Unique key for the form
|
|
30
|
+
required?: boolean; // Whether the field is required
|
|
31
|
+
valuePrefix?: string; // A string that should be prefixed to the value
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
type BasicAuthConfig = {
|
|
@@ -353,6 +355,26 @@ export const authSections = ({
|
|
|
353
355
|
],
|
|
354
356
|
fieldNamesToHide
|
|
355
357
|
);
|
|
358
|
+
addField(
|
|
359
|
+
authFields,
|
|
360
|
+
[
|
|
361
|
+
{
|
|
362
|
+
label: '',
|
|
363
|
+
name: `authConfig.apiKeys.${apiKey.key}.prefix`,
|
|
364
|
+
startVersion: RestApiIntegrationPluginVersions.V13,
|
|
365
|
+
componentType: FormComponentType.INPUT_TEXT,
|
|
366
|
+
initialValue: apiKey.valuePrefix || '',
|
|
367
|
+
display: {
|
|
368
|
+
show: {
|
|
369
|
+
authType: [IntegrationAuthType.API_KEY_FORM]
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
hidden: true,
|
|
373
|
+
disabled: true
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
fieldNamesToHide
|
|
377
|
+
);
|
|
356
378
|
addField(
|
|
357
379
|
authFields,
|
|
358
380
|
[
|
|
@@ -363,7 +385,12 @@ export const authSections = ({
|
|
|
363
385
|
componentType: FormComponentType.INPUT_TEXT,
|
|
364
386
|
dataType: InputDataType.PASSWORD,
|
|
365
387
|
singleLine: false,
|
|
366
|
-
rules: [
|
|
388
|
+
rules: [
|
|
389
|
+
{
|
|
390
|
+
required: apiKey.required ?? true,
|
|
391
|
+
message: `${apiKey.label} is required`
|
|
392
|
+
}
|
|
393
|
+
],
|
|
367
394
|
display: {
|
|
368
395
|
show: {
|
|
369
396
|
authType: [IntegrationAuthType.API_KEY_FORM]
|
|
@@ -43,6 +43,7 @@ export enum ExtendedIntegrationPluginId {
|
|
|
43
43
|
STABILITYAI = 'stabilityai',
|
|
44
44
|
COHERE = 'cohere',
|
|
45
45
|
GEMINI = 'gemini',
|
|
46
|
+
OPENAI_V2 = 'openai_v2',
|
|
46
47
|
// Not native OpenAPI-backed integrations, but leveraging the same auth system
|
|
47
48
|
GOOGLE_SHEETS_PLUGIN_ID = 'gsheets',
|
|
48
49
|
SNOWFLAKE = 'snowflake'
|
|
@@ -88,7 +89,8 @@ export const ExtendedIntegrationPluginMap: Record<string, string> = {
|
|
|
88
89
|
[ExtendedIntegrationPluginId.FIREWORKS]: ExtendedIntegrationPluginId.REST_API,
|
|
89
90
|
[ExtendedIntegrationPluginId.STABILITYAI]: ExtendedIntegrationPluginId.REST_API,
|
|
90
91
|
[ExtendedIntegrationPluginId.COHERE]: ExtendedIntegrationPluginId.REST_API,
|
|
91
|
-
[ExtendedIntegrationPluginId.GEMINI]: ExtendedIntegrationPluginId.REST_API
|
|
92
|
+
[ExtendedIntegrationPluginId.GEMINI]: ExtendedIntegrationPluginId.REST_API,
|
|
93
|
+
[ExtendedIntegrationPluginId.OPENAI_V2]: ExtendedIntegrationPluginId.REST_API
|
|
92
94
|
};
|
|
93
95
|
|
|
94
96
|
export const EXTENDED_INTEGRATION_PLUGIN_IDS = Object.values(ExtendedIntegrationPluginId).map((val) => val as string);
|