@paymanai/payman-ask-sdk 1.2.24 → 1.2.26
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.d.mts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +601 -151
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +601 -152
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.js +47 -0
- package/dist/index.native.js.map +1 -1
- package/dist/styles.css +79 -21
- package/dist/styles.css.map +1 -1
- package/package.json +4 -2
package/dist/index.native.js
CHANGED
|
@@ -9,12 +9,32 @@ var Animated2 = require('react-native-reanimated');
|
|
|
9
9
|
var Markdown = require('react-native-markdown-display');
|
|
10
10
|
var clsx = require('clsx');
|
|
11
11
|
var tailwindMerge = require('tailwind-merge');
|
|
12
|
+
var Sentry = require('@sentry/react');
|
|
12
13
|
|
|
13
14
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
15
|
|
|
16
|
+
function _interopNamespace(e) {
|
|
17
|
+
if (e && e.__esModule) return e;
|
|
18
|
+
var n = Object.create(null);
|
|
19
|
+
if (e) {
|
|
20
|
+
Object.keys(e).forEach(function (k) {
|
|
21
|
+
if (k !== 'default') {
|
|
22
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
23
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return e[k]; }
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
n.default = e;
|
|
31
|
+
return Object.freeze(n);
|
|
32
|
+
}
|
|
33
|
+
|
|
15
34
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
16
35
|
var Animated2__default = /*#__PURE__*/_interopDefault(Animated2);
|
|
17
36
|
var Markdown__default = /*#__PURE__*/_interopDefault(Markdown);
|
|
37
|
+
var Sentry__namespace = /*#__PURE__*/_interopNamespace(Sentry);
|
|
18
38
|
|
|
19
39
|
// src/components/PaymanChat/index.native.tsx
|
|
20
40
|
var PaymanChatContext = React.createContext(void 0);
|
|
@@ -1126,6 +1146,32 @@ function formatDate(timestamp) {
|
|
|
1126
1146
|
year: date.getFullYear() !== now.getFullYear() ? "numeric" : void 0
|
|
1127
1147
|
});
|
|
1128
1148
|
}
|
|
1149
|
+
function captureSentryError(error, context) {
|
|
1150
|
+
if (!Sentry__namespace.getClient()) return;
|
|
1151
|
+
const tags = {};
|
|
1152
|
+
if (context.executionId) tags.executionId = context.executionId;
|
|
1153
|
+
if (context.sessionId) tags.sessionId = context.sessionId;
|
|
1154
|
+
if (context.route) tags.route = context.route;
|
|
1155
|
+
if (context.cfRay) tags.cfRay = context.cfRay;
|
|
1156
|
+
if (context.customerId) tags.customerId = context.customerId;
|
|
1157
|
+
if (context.customerEmail) tags.customerEmail = context.customerEmail;
|
|
1158
|
+
const contexts = {
|
|
1159
|
+
chat_session: {
|
|
1160
|
+
sessionId: context.sessionId ?? null,
|
|
1161
|
+
sessionOwnerId: context.sessionOwnerId ?? null,
|
|
1162
|
+
executionId: context.executionId ?? null,
|
|
1163
|
+
workflowName: context.workflowName ?? null,
|
|
1164
|
+
cfRay: context.cfRay ?? null,
|
|
1165
|
+
customerId: context.customerId ?? null,
|
|
1166
|
+
customerEmail: context.customerEmail ?? null
|
|
1167
|
+
}
|
|
1168
|
+
};
|
|
1169
|
+
if (typeof error === "string") {
|
|
1170
|
+
Sentry__namespace.captureMessage(error, { level: "error", tags, contexts });
|
|
1171
|
+
} else {
|
|
1172
|
+
Sentry__namespace.captureException(error, { tags, contexts });
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1129
1175
|
function UserMessage({
|
|
1130
1176
|
message,
|
|
1131
1177
|
animated = false,
|
|
@@ -2431,6 +2477,7 @@ Object.defineProperty(exports, "useVoice", {
|
|
|
2431
2477
|
});
|
|
2432
2478
|
exports.PaymanChat = PaymanChat;
|
|
2433
2479
|
exports.PaymanChatContext = PaymanChatContext;
|
|
2480
|
+
exports.captureSentryError = captureSentryError;
|
|
2434
2481
|
exports.cn = cn;
|
|
2435
2482
|
exports.formatDate = formatDate;
|
|
2436
2483
|
exports.usePaymanChat = usePaymanChat;
|