@bigbinary/neeto-integrations-frontend 4.0.40 → 4.0.42
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/app/javascript/src/translations/ar.json +3 -0
- package/app/javascript/src/translations/bg.json +3 -0
- package/app/javascript/src/translations/ca.json +3 -0
- package/app/javascript/src/translations/cs.json +3 -0
- package/app/javascript/src/translations/da.json +3 -0
- package/app/javascript/src/translations/de.json +3 -0
- package/app/javascript/src/translations/en.json +3 -0
- package/app/javascript/src/translations/es-MX.json +3 -0
- package/app/javascript/src/translations/es.json +3 -0
- package/app/javascript/src/translations/et.json +3 -0
- package/app/javascript/src/translations/fi.json +3 -0
- package/app/javascript/src/translations/fil.json +3 -0
- package/app/javascript/src/translations/fr.json +3 -0
- package/app/javascript/src/translations/he.json +3 -0
- package/app/javascript/src/translations/hi.json +3 -0
- package/app/javascript/src/translations/hr.json +3 -0
- package/app/javascript/src/translations/hu.json +3 -0
- package/app/javascript/src/translations/id.json +3 -0
- package/app/javascript/src/translations/it.json +3 -0
- package/app/javascript/src/translations/ja.json +3 -0
- package/app/javascript/src/translations/ko.json +3 -0
- package/app/javascript/src/translations/nl.json +3 -0
- package/app/javascript/src/translations/pl.json +3 -0
- package/app/javascript/src/translations/pt-BR.json +3 -0
- package/app/javascript/src/translations/pt.json +3 -0
- package/app/javascript/src/translations/ro.json +3 -0
- package/app/javascript/src/translations/ru.json +3 -0
- package/app/javascript/src/translations/sk.json +3 -0
- package/app/javascript/src/translations/sl.json +3 -0
- package/app/javascript/src/translations/sv.json +3 -0
- package/app/javascript/src/translations/th.json +3 -0
- package/app/javascript/src/translations/tr.json +3 -0
- package/app/javascript/src/translations/uk.json +3 -0
- package/app/javascript/src/translations/vi.json +3 -0
- package/app/javascript/src/translations/zh-CN.json +3 -0
- package/app/javascript/src/translations/zh-TW.json +3 -0
- package/dist/.ready +1 -1
- package/dist/Telnyx.js +20 -6
- package/dist/Telnyx.js.map +1 -1
- package/dist/cjs/Telnyx.js +20 -6
- package/dist/cjs/Telnyx.js.map +1 -1
- package/dist/cjs/v2/Telnyx.js +20 -6
- package/dist/cjs/v2/Telnyx.js.map +1 -1
- package/dist/v2/Telnyx.js +20 -6
- package/dist/v2/Telnyx.js.map +1 -1
- package/package.json +20 -20
- package/typeTemplates-v2/index.d.ts +1 -0
- package/types.d.ts +1 -0
|
@@ -121,6 +121,9 @@
|
|
|
121
121
|
"label": "Messaging profile",
|
|
122
122
|
"placeholder": "Select a messaging profile"
|
|
123
123
|
},
|
|
124
|
+
"publicKey": {
|
|
125
|
+
"label": "Public key"
|
|
126
|
+
},
|
|
124
127
|
"validations": {
|
|
125
128
|
"apiKeyRequired": "API key is required.",
|
|
126
129
|
"messagingProfileIdRequired": "Messaging Profile ID is required.",
|
package/dist/.ready
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Built at 2026-
|
|
1
|
+
Built at 2026-06-30T22:05:32.789Z
|
package/dist/Telnyx.js
CHANGED
|
@@ -102,7 +102,9 @@ var Form = function Form(_ref) {
|
|
|
102
102
|
senderOptionsAvailable = _ref.senderOptionsAvailable,
|
|
103
103
|
formikProps = _ref.formikProps,
|
|
104
104
|
_ref$initialFocusRef = _ref.initialFocusRef,
|
|
105
|
-
initialFocusRef = _ref$initialFocusRef === void 0 ? null : _ref$initialFocusRef
|
|
105
|
+
initialFocusRef = _ref$initialFocusRef === void 0 ? null : _ref$initialFocusRef,
|
|
106
|
+
_ref$isWebhooksRequir = _ref.isWebhooksRequired,
|
|
107
|
+
isWebhooksRequired = _ref$isWebhooksRequir === void 0 ? false : _ref$isWebhooksRequir;
|
|
106
108
|
var _useTranslation = useTranslation(),
|
|
107
109
|
t = _useTranslation.t;
|
|
108
110
|
var setFieldValue = formikProps.setFieldValue,
|
|
@@ -126,6 +128,11 @@ var Form = function Form(_ref) {
|
|
|
126
128
|
label: t("neetoIntegrations.telnyx.apiKey"),
|
|
127
129
|
name: "apiKey",
|
|
128
130
|
ref: initialFocusRef
|
|
131
|
+
}), isWebhooksRequired && /*#__PURE__*/jsx(Input, {
|
|
132
|
+
required: true,
|
|
133
|
+
"data-testid": "integrations-telnyx-public-key",
|
|
134
|
+
label: t("neetoIntegrations.telnyx.publicKey.label"),
|
|
135
|
+
name: "publicKey"
|
|
129
136
|
}), senderOptionsAvailable && /*#__PURE__*/jsxs("div", {
|
|
130
137
|
className: "flex w-full flex-col gap-y-4",
|
|
131
138
|
children: [/*#__PURE__*/jsxs("div", {
|
|
@@ -193,8 +200,10 @@ var buildMessagingProfileOptions = function buildMessagingProfileOptions() {
|
|
|
193
200
|
};
|
|
194
201
|
var buildTelnyxConfigurationValidationSchema = function buildTelnyxConfigurationValidationSchema() {
|
|
195
202
|
var hasSenderOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
203
|
+
var isWebhooksRequired = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
196
204
|
return yup.object().shape({
|
|
197
205
|
apiKey: yup.string().required(t("neetoIntegrations.common.required")),
|
|
206
|
+
publicKey: isWebhooksRequired ? yup.string().required(t("neetoIntegrations.common.required")) : yup.string().nullable(),
|
|
198
207
|
connectionType: yup.string().oneOf(Object.values(CONNECTION_TYPES)).required(t("neetoIntegrations.common.required")),
|
|
199
208
|
phoneNumber: hasSenderOptions ? yup.mixed().when("connectionType", {
|
|
200
209
|
is: CONNECTION_TYPES.PHONE_NUMBER,
|
|
@@ -255,7 +264,7 @@ var useTelnyxForm = function useTelnyxForm(_ref) {
|
|
|
255
264
|
return buildMessagingProfileOptions((_senderOptions$messag = senderOptions === null || senderOptions === void 0 ? void 0 : senderOptions.messagingProfiles) !== null && _senderOptions$messag !== void 0 ? _senderOptions$messag : []);
|
|
256
265
|
}, [senderOptions]);
|
|
257
266
|
var initialValues = useMemo(function () {
|
|
258
|
-
var _configuration$apiKey, _configuration$connec;
|
|
267
|
+
var _configuration$apiKey, _configuration$connec, _configuration$public;
|
|
259
268
|
var selectedPhone = _findBy({
|
|
260
269
|
label: configuration === null || configuration === void 0 ? void 0 : configuration.phoneNumber
|
|
261
270
|
}, phoneNumberOptions);
|
|
@@ -266,7 +275,8 @@ var useTelnyxForm = function useTelnyxForm(_ref) {
|
|
|
266
275
|
apiKey: (_configuration$apiKey = configuration === null || configuration === void 0 ? void 0 : configuration.apiKey) !== null && _configuration$apiKey !== void 0 ? _configuration$apiKey : "",
|
|
267
276
|
connectionType: (_configuration$connec = configuration === null || configuration === void 0 ? void 0 : configuration.connectionType) !== null && _configuration$connec !== void 0 ? _configuration$connec : CONNECTION_TYPES.PHONE_NUMBER,
|
|
268
277
|
phoneNumber: selectedPhone !== null && selectedPhone !== void 0 ? selectedPhone : null,
|
|
269
|
-
messagingProfile: selectedProfile !== null && selectedProfile !== void 0 ? selectedProfile : null
|
|
278
|
+
messagingProfile: selectedProfile !== null && selectedProfile !== void 0 ? selectedProfile : null,
|
|
279
|
+
publicKey: (_configuration$public = configuration === null || configuration === void 0 ? void 0 : configuration.publicKey) !== null && _configuration$public !== void 0 ? _configuration$public : ""
|
|
270
280
|
};
|
|
271
281
|
}, [configuration, phoneNumberOptions, messagingProfileOptions]);
|
|
272
282
|
var hasCredentials = typeof (credentials === null || credentials === void 0 ? void 0 : credentials.apiKey) === "string" && credentials.apiKey.trim().length > 0;
|
|
@@ -298,6 +308,7 @@ var useTelnyxForm = function useTelnyxForm(_ref) {
|
|
|
298
308
|
payload.messaging_profile_id = (_values$messagingProf = values.messagingProfile) === null || _values$messagingProf === void 0 ? void 0 : _values$messagingProf.value;
|
|
299
309
|
payload.messaging_profile_name = (_values$messagingProf2 = values.messagingProfile) === null || _values$messagingProf2 === void 0 ? void 0 : _values$messagingProf2.label;
|
|
300
310
|
}
|
|
311
|
+
if (values.publicKey) payload.public_key = values.publicKey;
|
|
301
312
|
_context.n = 2;
|
|
302
313
|
return upsert(payload);
|
|
303
314
|
case 2:
|
|
@@ -327,7 +338,9 @@ var Telnyx = function Telnyx(_ref) {
|
|
|
327
338
|
_ref$onClose = _ref.onClose,
|
|
328
339
|
onClose = _ref$onClose === void 0 ? noop : _ref$onClose,
|
|
329
340
|
_ref$onConnect = _ref.onConnect,
|
|
330
|
-
onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect
|
|
341
|
+
onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect,
|
|
342
|
+
_ref$isWebhooksRequir = _ref.isWebhooksRequired,
|
|
343
|
+
isWebhooksRequired = _ref$isWebhooksRequir === void 0 ? false : _ref$isWebhooksRequir;
|
|
331
344
|
var _useTranslation = useTranslation(),
|
|
332
345
|
t = _useTranslation.t;
|
|
333
346
|
var initialFocusRef = useRef();
|
|
@@ -346,8 +359,8 @@ var Telnyx = function Telnyx(_ref) {
|
|
|
346
359
|
return equals(initialValues, values) || isLoading;
|
|
347
360
|
};
|
|
348
361
|
var validationSchema = useMemo(function () {
|
|
349
|
-
return buildTelnyxConfigurationValidationSchema(senderOptionsAvailable);
|
|
350
|
-
}, [senderOptionsAvailable]);
|
|
362
|
+
return buildTelnyxConfigurationValidationSchema(senderOptionsAvailable, isWebhooksRequired);
|
|
363
|
+
}, [senderOptionsAvailable, isWebhooksRequired]);
|
|
351
364
|
return /*#__PURE__*/jsx(FormikFormWrapper, {
|
|
352
365
|
className: "w-full",
|
|
353
366
|
formikProps: {
|
|
@@ -373,6 +386,7 @@ var Telnyx = function Telnyx(_ref) {
|
|
|
373
386
|
children: /*#__PURE__*/jsx(Form, {
|
|
374
387
|
formikProps: formikProps,
|
|
375
388
|
initialFocusRef: initialFocusRef,
|
|
389
|
+
isWebhooksRequired: isWebhooksRequired,
|
|
376
390
|
messagingProfileOptions: messagingProfileOptions,
|
|
377
391
|
phoneNumberOptions: phoneNumberOptions,
|
|
378
392
|
senderOptionsAvailable: senderOptionsAvailable
|