@bigbinary/neeto-webhooks-frontend 3.0.5 → 3.0.7
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.
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"event_one": "Event",
|
|
62
62
|
"event_other": "Events",
|
|
63
63
|
"endpointPlaceholder": "Enter endpoint URL",
|
|
64
|
+
"postRequestIsSentToEndpointURL": "When a matching event is triggered, we'll send a POST request to the endpoint URL.",
|
|
64
65
|
"eventPlaceholder": "Select webhook events",
|
|
65
66
|
"secret": "Secret key (optional)",
|
|
66
67
|
"secretkeyHelpTitle": "Secret key",
|
package/dist/NeetoWebhooks.js
CHANGED
|
@@ -152,11 +152,11 @@ var DELIVERY_TAB = {
|
|
|
152
152
|
|
|
153
153
|
var Snippet = function Snippet(_ref) {
|
|
154
154
|
var children = _ref.children,
|
|
155
|
-
_ref$
|
|
156
|
-
|
|
155
|
+
_ref$dataTestid = _ref.dataTestid,
|
|
156
|
+
dataTestid = _ref$dataTestid === void 0 ? "" : _ref$dataTestid;
|
|
157
157
|
return /*#__PURE__*/jsx("div", {
|
|
158
158
|
className: "neeto-ui-rounded neeto-ui-border-gray-300 neeto-ui-bg-gray-100 my-2 whitespace-pre-wrap break-all border p-4",
|
|
159
|
-
"data-
|
|
159
|
+
"data-testid": dataTestid,
|
|
160
160
|
children: children
|
|
161
161
|
});
|
|
162
162
|
};
|
|
@@ -189,7 +189,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
189
189
|
className: "flex items-center space-x-1",
|
|
190
190
|
children: [t("neetoWebhooks.delivery.sid"), ":", /*#__PURE__*/jsx(Typography, {
|
|
191
191
|
className: "px-2 font-bold",
|
|
192
|
-
"data-
|
|
192
|
+
"data-testid": "delivery-sid",
|
|
193
193
|
style: "body2",
|
|
194
194
|
children: sid
|
|
195
195
|
})]
|
|
@@ -197,7 +197,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
197
197
|
className: "flex items-center space-x-1",
|
|
198
198
|
children: [t("neetoWebhooks.delivery.deliveryId"), ":", /*#__PURE__*/jsx(Typography, {
|
|
199
199
|
className: "px-2 font-bold",
|
|
200
|
-
"data-
|
|
200
|
+
"data-testid": "delivery-identifier",
|
|
201
201
|
style: "body2",
|
|
202
202
|
children: identifier
|
|
203
203
|
})]
|
|
@@ -205,7 +205,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
205
205
|
className: "flex items-center",
|
|
206
206
|
children: [t("neetoWebhooks.common.responseStatus"), ":", /*#__PURE__*/jsx(Typography, {
|
|
207
207
|
className: "px-2 font-bold",
|
|
208
|
-
"data-
|
|
208
|
+
"data-testid": "delivery-response-code",
|
|
209
209
|
style: "body2",
|
|
210
210
|
children: responseStatusCode
|
|
211
211
|
}), /*#__PURE__*/jsx(Tag, {
|
|
@@ -237,7 +237,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
237
237
|
style: "h5",
|
|
238
238
|
children: t("neetoWebhooks.delivery.header")
|
|
239
239
|
}), /*#__PURE__*/jsx(Snippet, {
|
|
240
|
-
|
|
240
|
+
dataTestid: "delivery-request-header",
|
|
241
241
|
children: delivery.requestHeader
|
|
242
242
|
})]
|
|
243
243
|
}), /*#__PURE__*/jsxs("div", {
|
|
@@ -245,7 +245,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
245
245
|
style: "h5",
|
|
246
246
|
children: t("neetoWebhooks.delivery.payload")
|
|
247
247
|
}), /*#__PURE__*/jsx(Snippet, {
|
|
248
|
-
|
|
248
|
+
dataTestid: "delivery-request-payload",
|
|
249
249
|
children: renderPayload()
|
|
250
250
|
})]
|
|
251
251
|
})]
|
|
@@ -256,7 +256,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
256
256
|
style: "h5",
|
|
257
257
|
children: t("neetoWebhooks.delivery.header")
|
|
258
258
|
}), /*#__PURE__*/jsx(Snippet, {
|
|
259
|
-
|
|
259
|
+
dataTestid: "delivery-response-header",
|
|
260
260
|
children: delivery.responseHeader
|
|
261
261
|
})]
|
|
262
262
|
}), /*#__PURE__*/jsxs("div", {
|
|
@@ -264,7 +264,7 @@ var TransactionDetails = function TransactionDetails(_ref) {
|
|
|
264
264
|
style: "h5",
|
|
265
265
|
children: t("neetoWebhooks.delivery.body")
|
|
266
266
|
}), /*#__PURE__*/jsx(Snippet, {
|
|
267
|
-
|
|
267
|
+
dataTestid: "delivery-response-body",
|
|
268
268
|
children: delivery.responseBody
|
|
269
269
|
})]
|
|
270
270
|
})]
|
|
@@ -767,12 +767,12 @@ var getMenuItems = function getMenuItems(_ref) {
|
|
|
767
767
|
return [{
|
|
768
768
|
key: MENU_ITEMS.EDIT,
|
|
769
769
|
label: t$1("neetoWebhooks.buttons.edit"),
|
|
770
|
-
"data-
|
|
770
|
+
"data-testid": "neeto-webhooks-edit-button",
|
|
771
771
|
onClick: onEdit
|
|
772
772
|
}, {
|
|
773
773
|
key: MENU_ITEMS.DELETE,
|
|
774
774
|
label: t$1("neetoWebhooks.buttons.delete"),
|
|
775
|
-
"data-
|
|
775
|
+
"data-testid": "neeto-webhooks-delete-button",
|
|
776
776
|
onClick: onDelete
|
|
777
777
|
}];
|
|
778
778
|
};
|
|
@@ -1030,7 +1030,7 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1030
1030
|
children: [/*#__PURE__*/jsxs(Pane.Header, {
|
|
1031
1031
|
className: "flex items-center gap-x-2",
|
|
1032
1032
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
1033
|
-
"data-
|
|
1033
|
+
"data-testid": "add-new-webhook-pane-header",
|
|
1034
1034
|
style: "h2",
|
|
1035
1035
|
weight: "semibold",
|
|
1036
1036
|
children: editingWebhookId ? t("neetoWebhooks.webhook.edit") : t("neetoWebhooks.webhook.add")
|
|
@@ -1063,9 +1063,13 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1063
1063
|
className: "pb-6",
|
|
1064
1064
|
children: /*#__PURE__*/jsxs("div", {
|
|
1065
1065
|
className: "w-full space-y-4 md:space-y-6",
|
|
1066
|
-
children: [/*#__PURE__*/jsx(
|
|
1066
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
1067
|
+
className: "mb-2",
|
|
1068
|
+
style: "body2",
|
|
1069
|
+
children: t("neetoWebhooks.webhook.postRequestIsSentToEndpointURL")
|
|
1070
|
+
}), /*#__PURE__*/jsx(Textarea, {
|
|
1067
1071
|
required: true,
|
|
1068
|
-
"data-
|
|
1072
|
+
"data-testid": "endpoint-input-field",
|
|
1069
1073
|
label: t("neetoWebhooks.webhook.endpoint"),
|
|
1070
1074
|
name: "endpoint",
|
|
1071
1075
|
placeholder: t("neetoWebhooks.webhook.endpointPlaceholder"),
|
|
@@ -1088,28 +1092,28 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1088
1092
|
}), isSecretInputFieldVisible ? /*#__PURE__*/jsxs("div", {
|
|
1089
1093
|
className: "flex items-center justify-between space-x-2",
|
|
1090
1094
|
children: [/*#__PURE__*/jsx(Input, {
|
|
1091
|
-
"data-
|
|
1095
|
+
"data-testid": "secret-key-input-field",
|
|
1092
1096
|
name: "secret",
|
|
1093
1097
|
placeholder: t("neetoWebhooks.webhook.secretPlaceholder")
|
|
1094
1098
|
}), /*#__PURE__*/jsx(MoreDropdown, {
|
|
1095
1099
|
menuItems: [{
|
|
1096
1100
|
key: "regenerate-secret",
|
|
1097
1101
|
label: t("neetoWebhooks.buttons.regenerate"),
|
|
1098
|
-
"data-
|
|
1102
|
+
"data-testid": "regenerate-secret",
|
|
1099
1103
|
onClick: function onClick() {
|
|
1100
1104
|
return handleRegenerate(setFieldValue);
|
|
1101
1105
|
}
|
|
1102
1106
|
}, {
|
|
1103
1107
|
key: "delete-secret",
|
|
1104
1108
|
label: t("neetoWebhooks.buttons.delete"),
|
|
1105
|
-
"data-
|
|
1109
|
+
"data-testid": "delete-secret",
|
|
1106
1110
|
onClick: function onClick() {
|
|
1107
1111
|
return handleDelete(setFieldValue);
|
|
1108
1112
|
}
|
|
1109
1113
|
}]
|
|
1110
1114
|
})]
|
|
1111
1115
|
}) : /*#__PURE__*/jsx(Button, {
|
|
1112
|
-
"data-
|
|
1116
|
+
"data-testid": "add-secret-key",
|
|
1113
1117
|
icon: Plus,
|
|
1114
1118
|
iconPosition: "left",
|
|
1115
1119
|
label: t("neetoWebhooks.buttons.generateSecretKey"),
|
|
@@ -1133,7 +1137,7 @@ var AddWebhookPane = function AddWebhookPane(_ref) {
|
|
|
1133
1137
|
values: values
|
|
1134
1138
|
}), touched.events && errors.events && /*#__PURE__*/jsx("div", {
|
|
1135
1139
|
className: "neeto-ui-text-error-800 text-xs mt-1",
|
|
1136
|
-
"data-
|
|
1140
|
+
"data-testid": "event-error-text",
|
|
1137
1141
|
children: errors.events
|
|
1138
1142
|
})]
|
|
1139
1143
|
});
|
|
@@ -1174,7 +1178,7 @@ var Header = withT(function (_ref) {
|
|
|
1174
1178
|
size: headerSize,
|
|
1175
1179
|
title: title || t("neetoWebhooks.webhook.title"),
|
|
1176
1180
|
actionBlock: /*#__PURE__*/jsx(Button, {
|
|
1177
|
-
"data-
|
|
1181
|
+
"data-testid": "add-new-webhook-button",
|
|
1178
1182
|
label: t("neetoWebhooks.webhook.add"),
|
|
1179
1183
|
onClick: function onClick() {
|
|
1180
1184
|
return setIsAddWebhookPaneOpen(true);
|