@dev-fastn-ai/react-core 1.0.8 → 1.0.10

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.
@@ -15,21 +15,72 @@ declare const UPDATE_TENANT_CONFIGURATION = "\n mutation UpdateTenantConfigurat
15
15
  declare const DELETE_TENANT_CONFIG = "\n mutation DeleteTenantConfig($input: GetTenantConfigurationsInput!) {\n deleteTenantConfig(input: $input) {\n id\n }\n }\n";
16
16
  declare const DISABLE_TENANT_CONFIG = "\n mutation DisableTenantConfig($input: GetTenantConfigurationsInput!) {\n disableTenantConfig(input: $input) {\n id\n }\n }\n";
17
17
  declare const GENERATE_ACCESS_TOKEN = "\n query GenerateAccessToken($input: ConnectorConnectionInput!) {\n connectorConnection(input: $input) \n }\n";
18
- declare function getConnectors(variables: any): Promise<any>;
19
- declare function getApi(variables: any): Promise<any>;
20
- declare function saveActivateConnectorState(variables: any): Promise<any>;
21
- declare function saveActivateConnectorStatus(variables: any): Promise<any>;
22
- declare function getMetaData(variables: any): Promise<any>;
23
- declare function deactivateConnector(variables: any): Promise<any>;
24
- declare function getTenantFlow(variables: any): Promise<any>;
25
- declare function configureTenantFlow(variables: any): Promise<any>;
26
- declare function deleteTenantConfiguration(variables: any): Promise<any>;
27
- declare function getFieldData(variables: any): Promise<any>;
28
- declare function getConfigurationSubscriptions(variables: any): Promise<any>;
29
- declare function getConfigurationSubscriptionById(variables: any): Promise<any>;
30
- declare function createTenantConfiguration(variables: any): Promise<any>;
31
- declare function updateTenantConfiguration(variables: any): Promise<any>;
32
- declare function deleteTenantConfig(variables: any): Promise<any>;
33
- declare function disableTenantConfig(variables: any): Promise<any>;
34
- declare function generateAccessToken(variables: any): Promise<any>;
18
+ declare function getConnectors(variables: any): Promise<{
19
+ data: any;
20
+ errors: any;
21
+ }>;
22
+ declare function getApi(variables: any): Promise<{
23
+ data: any;
24
+ errors: any;
25
+ }>;
26
+ declare function saveActivateConnectorState(variables: any): Promise<{
27
+ data: any;
28
+ errors: any;
29
+ }>;
30
+ declare function saveActivateConnectorStatus(variables: any): Promise<{
31
+ data: any;
32
+ errors: any;
33
+ }>;
34
+ declare function getMetaData(variables: any): Promise<{
35
+ data: any;
36
+ errors: any;
37
+ }>;
38
+ declare function deactivateConnector(variables: any): Promise<{
39
+ data: any;
40
+ errors: any;
41
+ }>;
42
+ declare function getTenantFlow(variables: any): Promise<{
43
+ data: any;
44
+ errors: any;
45
+ }>;
46
+ declare function configureTenantFlow(variables: any): Promise<{
47
+ data: any;
48
+ errors: any;
49
+ }>;
50
+ declare function deleteTenantConfiguration(variables: any): Promise<{
51
+ data: any;
52
+ errors: any;
53
+ }>;
54
+ declare function getFieldData(variables: any): Promise<{
55
+ data: any;
56
+ errors: any;
57
+ }>;
58
+ declare function getConfigurationSubscriptions(variables: any): Promise<{
59
+ data: any;
60
+ errors: any;
61
+ }>;
62
+ declare function getConfigurationSubscriptionById(variables: any): Promise<{
63
+ data: any;
64
+ errors: any;
65
+ }>;
66
+ declare function createTenantConfiguration(variables: any): Promise<{
67
+ data: any;
68
+ errors: any;
69
+ }>;
70
+ declare function updateTenantConfiguration(variables: any): Promise<{
71
+ data: any;
72
+ errors: any;
73
+ }>;
74
+ declare function deleteTenantConfig(variables: any): Promise<{
75
+ data: any;
76
+ errors: any;
77
+ }>;
78
+ declare function disableTenantConfig(variables: any): Promise<{
79
+ data: any;
80
+ errors: any;
81
+ }>;
82
+ declare function generateAccessToken(variables: any): Promise<{
83
+ data: any;
84
+ errors: any;
85
+ }>;
35
86
  export { GET_WIDGET_CONNECTORS, GET_API, SAVE_ACTIVATE_CONNECTOR_STATE, SAVE_ACTIVATE_CONNECTOR_STATUS, GET_METADATA, DEACTIVATE_CONNECTOR, GET_TENANT_FLOW, CONFIGURE_TENANT_FLOW, DELETE_TENANT_CONFIGURATION, GET_FIELD_DATA_QUERY, GET_TENANT_CONFIGURATIONS, GET_TENANT_CONFIGURATIONS_BY_ID, CREATE_TENANT_CONFIGURATION, UPDATE_TENANT_CONFIGURATION, DELETE_TENANT_CONFIG, DISABLE_TENANT_CONFIG, GENERATE_ACCESS_TOKEN, getConnectors, getApi, saveActivateConnectorState, saveActivateConnectorStatus, getMetaData, deactivateConnector, getTenantFlow, configureTenantFlow, deleteTenantConfiguration, getFieldData, getConfigurationSubscriptions, getConfigurationSubscriptionById, createTenantConfiguration, updateTenantConfiguration, deleteTenantConfig, disableTenantConfig, generateAccessToken };
@@ -127,9 +127,9 @@ export interface Configuration {
127
127
  export interface ConfigurationAction {
128
128
  readonly name: string;
129
129
  readonly actionType: ConfigurationActionType;
130
- readonly onClick?: () => Promise<void>;
130
+ readonly onClick?: () => Promise<ConnectorActionResult>;
131
131
  readonly form?: ConnectorForm | null;
132
- readonly onSubmit?: (formData: unknown) => Promise<void>;
132
+ readonly onSubmit?: (formData: unknown) => Promise<ConnectorActionResult>;
133
133
  }
134
134
  /**
135
135
  * Represents a selectable option in a dropdown or select field.
package/dist/index.cjs.js CHANGED
@@ -125,7 +125,10 @@ async function fetchGraphQL({ query, variables }) {
125
125
  if (result.errors) {
126
126
  throw new Error(result.errors.map((e) => e.message).join("; "));
127
127
  }
128
- return result.data;
128
+ return {
129
+ data: result.data,
130
+ errors: result.errors
131
+ };
129
132
  }
130
133
  // GraphQL Queries & Mutations (as plain strings)
131
134
  const GET_WIDGET_CONNECTORS = `
@@ -1191,6 +1194,7 @@ async function getConfigurations({ configurationId, status = "ALL", }) {
1191
1194
  var _a;
1192
1195
  await handleDisableConfiguration({ connectorId: configSubscription.connector.id, id: configurationId });
1193
1196
  await ((_a = refetchFunctions[REFETCH_KEY$1]) === null || _a === void 0 ? void 0 : _a.call(refetchFunctions));
1197
+ return { data: null, status: "SUCCESS" };
1194
1198
  },
1195
1199
  });
1196
1200
  actions.push({
@@ -1200,6 +1204,7 @@ async function getConfigurations({ configurationId, status = "ALL", }) {
1200
1204
  var _a;
1201
1205
  await handleDeleteConfiguration({ connectorId: configSubscription.connector.id, id: configurationId });
1202
1206
  await ((_a = refetchFunctions[REFETCH_KEY$1]) === null || _a === void 0 ? void 0 : _a.call(refetchFunctions));
1207
+ return { data: null, status: "SUCCESS" };
1203
1208
  },
1204
1209
  });
1205
1210
  }
@@ -1208,14 +1213,15 @@ async function getConfigurations({ configurationId, status = "ALL", }) {
1208
1213
  const handler = async (formData = {}) => {
1209
1214
  var _a, _b, _c, _d, _e, _f, _g, _h;
1210
1215
  if (((_a = configSubscription === null || configSubscription === void 0 ? void 0 : configSubscription.connector) === null || _a === void 0 ? void 0 : _a.status) === "ACTIVE")
1211
- return;
1212
- await activateConnector({
1216
+ return { data: null, status: "SUCCESS" };
1217
+ const result = await activateConnector({
1213
1218
  connectorId: configSubscription.connector.id,
1214
1219
  action: (_c = (_b = configSubscription === null || configSubscription === void 0 ? void 0 : configSubscription.connector) === null || _b === void 0 ? void 0 : _b.actions) === null || _c === void 0 ? void 0 : _c.find((action) => action.actionType === ResourceAction.ACTIVATION),
1215
1220
  dependencyConnector: (_e = (_d = configSubscription === null || configSubscription === void 0 ? void 0 : configSubscription.connector) === null || _d === void 0 ? void 0 : _d.connectedConnectors) === null || _e === void 0 ? void 0 : _e[0],
1216
1221
  authMethod: (_h = (_g = (_f = configSubscription === null || configSubscription === void 0 ? void 0 : configSubscription.connector) === null || _f === void 0 ? void 0 : _f.connectedConnectors) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.authMethods[0],
1217
1222
  input: formData,
1218
1223
  });
1224
+ return { data: result, status: "SUCCESS" };
1219
1225
  };
1220
1226
  actions.push({
1221
1227
  name: "Enable",
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../core/node_modules/uuid/dist/esm-browser/rng.js","../../core/node_modules/uuid/dist/esm-browser/stringify.js","../../core/node_modules/uuid/dist/esm-browser/native.js","../../core/node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA,IAAI,eAAe;AACnB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC;AACjB,SAAS,GAAG,GAAG;AAC9B;AACA,EAAE,IAAI,CAAC,eAAe,EAAE;AACxB;AACA,IAAI,eAAe,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC;;AAEpH,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,MAAM,MAAM,IAAI,KAAK,CAAC,0GAA0G,CAAC;AACjI,IAAI;AACJ,EAAE;;AAEF,EAAE,OAAO,eAAe,CAAC,KAAK,CAAC;AAC/B;;AChBA;AACA;AACA;AACA;;AAEA,MAAM,SAAS,GAAG,EAAE;;AAEpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,EAAE,EAAE,CAAC,EAAE;AAC9B,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3]}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../core/node_modules/uuid/dist/esm-browser/rng.js","../../core/node_modules/uuid/dist/esm-browser/stringify.js","../../core/node_modules/uuid/dist/esm-browser/native.js","../../core/node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA,IAAI,eAAe;AACnB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC;AACjB,SAAS,GAAG,GAAG;AAC9B;AACA,EAAE,IAAI,CAAC,eAAe,EAAE;AACxB;AACA,IAAI,eAAe,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC;;AAEpH,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3]}
package/dist/index.d.ts CHANGED
@@ -89,9 +89,9 @@ interface Configuration {
89
89
  interface ConfigurationAction {
90
90
  readonly name: string;
91
91
  readonly actionType: ConfigurationActionType;
92
- readonly onClick?: () => Promise<void>;
92
+ readonly onClick?: () => Promise<ConnectorActionResult>;
93
93
  readonly form?: ConnectorForm | null;
94
- readonly onSubmit?: (formData: unknown) => Promise<void>;
94
+ readonly onSubmit?: (formData: unknown) => Promise<ConnectorActionResult>;
95
95
  }
96
96
  /**
97
97
  * Represents a selectable option in a dropdown or select field.
package/dist/index.esm.js CHANGED
@@ -123,7 +123,10 @@ async function fetchGraphQL({ query, variables }) {
123
123
  if (result.errors) {
124
124
  throw new Error(result.errors.map((e) => e.message).join("; "));
125
125
  }
126
- return result.data;
126
+ return {
127
+ data: result.data,
128
+ errors: result.errors
129
+ };
127
130
  }
128
131
  // GraphQL Queries & Mutations (as plain strings)
129
132
  const GET_WIDGET_CONNECTORS = `
@@ -1189,6 +1192,7 @@ async function getConfigurations({ configurationId, status = "ALL", }) {
1189
1192
  var _a;
1190
1193
  await handleDisableConfiguration({ connectorId: configSubscription.connector.id, id: configurationId });
1191
1194
  await ((_a = refetchFunctions[REFETCH_KEY$1]) === null || _a === void 0 ? void 0 : _a.call(refetchFunctions));
1195
+ return { data: null, status: "SUCCESS" };
1192
1196
  },
1193
1197
  });
1194
1198
  actions.push({
@@ -1198,6 +1202,7 @@ async function getConfigurations({ configurationId, status = "ALL", }) {
1198
1202
  var _a;
1199
1203
  await handleDeleteConfiguration({ connectorId: configSubscription.connector.id, id: configurationId });
1200
1204
  await ((_a = refetchFunctions[REFETCH_KEY$1]) === null || _a === void 0 ? void 0 : _a.call(refetchFunctions));
1205
+ return { data: null, status: "SUCCESS" };
1201
1206
  },
1202
1207
  });
1203
1208
  }
@@ -1206,14 +1211,15 @@ async function getConfigurations({ configurationId, status = "ALL", }) {
1206
1211
  const handler = async (formData = {}) => {
1207
1212
  var _a, _b, _c, _d, _e, _f, _g, _h;
1208
1213
  if (((_a = configSubscription === null || configSubscription === void 0 ? void 0 : configSubscription.connector) === null || _a === void 0 ? void 0 : _a.status) === "ACTIVE")
1209
- return;
1210
- await activateConnector({
1214
+ return { data: null, status: "SUCCESS" };
1215
+ const result = await activateConnector({
1211
1216
  connectorId: configSubscription.connector.id,
1212
1217
  action: (_c = (_b = configSubscription === null || configSubscription === void 0 ? void 0 : configSubscription.connector) === null || _b === void 0 ? void 0 : _b.actions) === null || _c === void 0 ? void 0 : _c.find((action) => action.actionType === ResourceAction.ACTIVATION),
1213
1218
  dependencyConnector: (_e = (_d = configSubscription === null || configSubscription === void 0 ? void 0 : configSubscription.connector) === null || _d === void 0 ? void 0 : _d.connectedConnectors) === null || _e === void 0 ? void 0 : _e[0],
1214
1219
  authMethod: (_h = (_g = (_f = configSubscription === null || configSubscription === void 0 ? void 0 : configSubscription.connector) === null || _f === void 0 ? void 0 : _f.connectedConnectors) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.authMethods[0],
1215
1220
  input: formData,
1216
1221
  });
1222
+ return { data: result, status: "SUCCESS" };
1217
1223
  };
1218
1224
  actions.push({
1219
1225
  name: "Enable",
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../core/node_modules/uuid/dist/esm-browser/rng.js","../../core/node_modules/uuid/dist/esm-browser/stringify.js","../../core/node_modules/uuid/dist/esm-browser/native.js","../../core/node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA,IAAI,eAAe;AACnB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC;AACjB,SAAS,GAAG,GAAG;AAC9B;AACA,EAAE,IAAI,CAAC,eAAe,EAAE;AACxB;AACA,IAAI,eAAe,GAAG,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC;;AAEpH,IAAI,IAAI,CAAC,eAAe,EAAE;AAC1B,MAAM,MAAM,IAAI,KAAK,CAAC,0GAA0G,CAAC;AACjI,IAAI;AACJ,EAAE;;AAEF,EAAE,OAAO,eAAe,CAAC,KAAK,CAAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3]}
1
+ {"version":3,"file":"index.esm.js","sources":["../../core/node_modules/uuid/dist/esm-browser/rng.js","../../core/node_modules/uuid/dist/esm-browser/stringify.js","../../core/node_modules/uuid/dist/esm-browser/native.js","../../core/node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA,IAAI,eAAe;AACnB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1,2,3]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-fastn-ai/react-core",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "React hooks and components for integrating Fastn AI connector marketplace into your applications. Built on top of @fastn-ai/core with React Query for optimal performance.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "homepage": "https://docs.fastn.ai",
61
61
  "dependencies": {
62
- "@dev-fastn-ai/core": "^1.0.4"
62
+ "@dev-fastn-ai/core": "^1.0.6"
63
63
  },
64
64
  "peerDependencies": {
65
65
  "@tanstack/react-query": "^5.0.0",