@qelos/global-types 4.2.1 → 4.3.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/LICENSE +20 -0
- package/package.json +5 -5
- package/payments.ts +18 -0
- package/dist/ai-models.d.ts +0 -32
- package/dist/ai-models.js +0 -279
- package/dist/ai-models.js.map +0 -1
- package/dist/app-configuration-metadata.d.ts +0 -18
- package/dist/app-configuration-metadata.js +0 -3
- package/dist/app-configuration-metadata.js.map +0 -1
- package/dist/auth-configuration-metadata.d.ts +0 -41
- package/dist/auth-configuration-metadata.js +0 -3
- package/dist/auth-configuration-metadata.js.map +0 -1
- package/dist/blueprint.d.ts +0 -74
- package/dist/blueprint.js +0 -33
- package/dist/blueprint.js.map +0 -1
- package/dist/event-subscriber.d.ts +0 -6
- package/dist/event-subscriber.js +0 -3
- package/dist/event-subscriber.js.map +0 -1
- package/dist/index.d.ts +0 -23
- package/dist/index.js.map +0 -1
- package/dist/injectable.d.ts +0 -6
- package/dist/injectable.js +0 -3
- package/dist/injectable.js.map +0 -1
- package/dist/integration-source-status.d.ts +0 -20
- package/dist/integration-source-status.js +0 -21
- package/dist/integration-source-status.js.map +0 -1
- package/dist/integration-sources.d.ts +0 -351
- package/dist/integration-sources.js +0 -141
- package/dist/integration-sources.js.map +0 -1
- package/dist/integration-targets.d.ts +0 -58
- package/dist/integration-targets.js +0 -3
- package/dist/integration-targets.js.map +0 -1
- package/dist/integration.d.ts +0 -39
- package/dist/integration.js +0 -12
- package/dist/integration.js.map +0 -1
- package/dist/mcp-configuration-metadata.d.ts +0 -19
- package/dist/mcp-configuration-metadata.js +0 -14
- package/dist/mcp-configuration-metadata.js.map +0 -1
- package/dist/mcp-endpoint.d.ts +0 -5
- package/dist/mcp-endpoint.js +0 -13
- package/dist/mcp-endpoint.js.map +0 -1
- package/dist/micro-frontend.d.ts +0 -43
- package/dist/micro-frontend.js +0 -3
- package/dist/micro-frontend.js.map +0 -1
- package/dist/navbar-group.d.ts +0 -7
- package/dist/navbar-group.js +0 -3
- package/dist/navbar-group.js.map +0 -1
- package/dist/no-code-components.d.ts +0 -34
- package/dist/no-code-components.js +0 -3
- package/dist/no-code-components.js.map +0 -1
- package/dist/payment-event-resolution.d.ts +0 -31
- package/dist/payment-event-resolution.js +0 -302
- package/dist/payment-event-resolution.js.map +0 -1
- package/dist/payments.d.ts +0 -165
- package/dist/payments.js +0 -3
- package/dist/payments.js.map +0 -1
- package/dist/plugin-crud.d.ts +0 -11
- package/dist/plugin-crud.js +0 -3
- package/dist/plugin-crud.js.map +0 -1
- package/dist/plugin.d.ts +0 -30
- package/dist/plugin.js +0 -3
- package/dist/plugin.js.map +0 -1
- package/dist/qelos-integrator.d.ts +0 -112
- package/dist/qelos-integrator.js +0 -14
- package/dist/qelos-integrator.js.map +0 -1
- package/dist/query-filters.d.ts +0 -7
- package/dist/query-filters.js +0 -3
- package/dist/query-filters.js.map +0 -1
- package/dist/screen-requirement.d.ts +0 -22
- package/dist/screen-requirement.js +0 -3
- package/dist/screen-requirement.js.map +0 -1
- package/dist/workspace-configuration-metadata.d.ts +0 -17
- package/dist/workspace-configuration-metadata.js +0 -3
- package/dist/workspace-configuration-metadata.js.map +0 -1
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MCP_FORBIDDEN_TOOL_IDS = void 0;
|
|
4
|
-
exports.sanitizeMcpConfigurationMetadata = sanitizeMcpConfigurationMetadata;
|
|
5
|
-
/** Tool categories that must never be exposed via MCP (e.g. secrets vault). */
|
|
6
|
-
exports.MCP_FORBIDDEN_TOOL_IDS = ['secrets'];
|
|
7
|
-
function sanitizeMcpConfigurationMetadata(configuration) {
|
|
8
|
-
const forbidden = new Set(exports.MCP_FORBIDDEN_TOOL_IDS);
|
|
9
|
-
return {
|
|
10
|
-
...configuration,
|
|
11
|
-
exposedTools: (configuration.exposedTools || []).filter((tool) => !forbidden.has(tool.toolId)),
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=mcp-configuration-metadata.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-configuration-metadata.js","sourceRoot":"","sources":["../mcp-configuration-metadata.ts"],"names":[],"mappings":";;;AAqBA,4EAWC;AAhCD,+EAA+E;AAClE,QAAA,sBAAsB,GAAG,CAAC,SAAS,CAAU,CAAC;AAoB3D,SAAgB,gCAAgC,CAC9C,aAAwC;IAExC,MAAM,SAAS,GAAG,IAAI,GAAG,CAAS,8BAAsB,CAAC,CAAC;IAE1D,OAAO;QACL,GAAG,aAAa;QAChB,YAAY,EAAE,CAAC,aAAa,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,MAAM,CACrD,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CACtC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/mcp-endpoint.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const MCP_ADMIN_PATH = "/api/mcp/admin";
|
|
2
|
-
export declare const MCP_DOCS_BASE_URL = "https://docs.qelos.io/mcp";
|
|
3
|
-
export declare const MCP_DOCS_CONFIGURATION_URL = "https://docs.qelos.io/mcp/configuration.html";
|
|
4
|
-
export declare const MCP_DOCS_CLIENTS_URL = "https://docs.qelos.io/mcp/clients.html";
|
|
5
|
-
export declare function buildMcpAdminEndpointUrl(origin: string): string;
|
package/dist/mcp-endpoint.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MCP_DOCS_CLIENTS_URL = exports.MCP_DOCS_CONFIGURATION_URL = exports.MCP_DOCS_BASE_URL = exports.MCP_ADMIN_PATH = void 0;
|
|
4
|
-
exports.buildMcpAdminEndpointUrl = buildMcpAdminEndpointUrl;
|
|
5
|
-
exports.MCP_ADMIN_PATH = '/api/mcp/admin';
|
|
6
|
-
exports.MCP_DOCS_BASE_URL = 'https://docs.qelos.io/mcp';
|
|
7
|
-
exports.MCP_DOCS_CONFIGURATION_URL = `${exports.MCP_DOCS_BASE_URL}/configuration.html`;
|
|
8
|
-
exports.MCP_DOCS_CLIENTS_URL = `${exports.MCP_DOCS_BASE_URL}/clients.html`;
|
|
9
|
-
function buildMcpAdminEndpointUrl(origin) {
|
|
10
|
-
const trimmedOrigin = origin.replace(/\/+$/, '');
|
|
11
|
-
return `${trimmedOrigin}${exports.MCP_ADMIN_PATH}`;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=mcp-endpoint.js.map
|
package/dist/mcp-endpoint.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-endpoint.js","sourceRoot":"","sources":["../mcp-endpoint.ts"],"names":[],"mappings":";;;AAQA,4DAGC;AAXY,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAElC,QAAA,iBAAiB,GAAG,2BAA2B,CAAC;AAEhD,QAAA,0BAA0B,GAAG,GAAG,yBAAiB,qBAAqB,CAAC;AAEvE,QAAA,oBAAoB,GAAG,GAAG,yBAAiB,eAAe,CAAC;AAExE,SAAgB,wBAAwB,CAAC,MAAc;IACrD,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACjD,OAAO,GAAG,aAAa,GAAG,sBAAc,EAAE,CAAC;AAC7C,CAAC"}
|
package/dist/micro-frontend.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { IScreenRequirement } from './screen-requirement';
|
|
2
|
-
export interface IMicroFrontend {
|
|
3
|
-
_id?: string;
|
|
4
|
-
name: string;
|
|
5
|
-
description: string;
|
|
6
|
-
manifestUrl: string;
|
|
7
|
-
guest?: boolean;
|
|
8
|
-
url: string;
|
|
9
|
-
active: boolean;
|
|
10
|
-
opened: boolean;
|
|
11
|
-
roles: string[];
|
|
12
|
-
workspaceRoles: string[];
|
|
13
|
-
workspaceLabels?: string[];
|
|
14
|
-
crud?: string;
|
|
15
|
-
use?: string;
|
|
16
|
-
structure?: string;
|
|
17
|
-
searchQuery?: boolean;
|
|
18
|
-
searchPlaceholder?: string;
|
|
19
|
-
requirements?: IScreenRequirement[];
|
|
20
|
-
navigateAfterSubmit?: {
|
|
21
|
-
name: string;
|
|
22
|
-
params: Record<string, string>;
|
|
23
|
-
query: Record<string, string>;
|
|
24
|
-
};
|
|
25
|
-
clearAfterSubmit?: boolean;
|
|
26
|
-
route?: {
|
|
27
|
-
name: string;
|
|
28
|
-
path: string;
|
|
29
|
-
roles: string[];
|
|
30
|
-
navBarPosition: 'top' | 'bottom' | 'user-dropdown' | false;
|
|
31
|
-
group?: string;
|
|
32
|
-
iconName?: string;
|
|
33
|
-
iconSvg?: string;
|
|
34
|
-
};
|
|
35
|
-
global?: {
|
|
36
|
-
position: string;
|
|
37
|
-
};
|
|
38
|
-
modal?: {
|
|
39
|
-
name: string;
|
|
40
|
-
params: string[] | Record<string, string>;
|
|
41
|
-
size: 'sm' | 'md' | 'lg' | 'full';
|
|
42
|
-
};
|
|
43
|
-
}
|
package/dist/micro-frontend.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"micro-frontend.js","sourceRoot":"","sources":["../micro-frontend.ts"],"names":[],"mappings":""}
|
package/dist/navbar-group.d.ts
DELETED
package/dist/navbar-group.js
DELETED
package/dist/navbar-group.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navbar-group.js","sourceRoot":"","sources":["../navbar-group.ts"],"names":[],"mappings":""}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export interface INoCodeComponent {
|
|
2
|
-
/**
|
|
3
|
-
* MongoDB document ID
|
|
4
|
-
*/
|
|
5
|
-
_id?: string;
|
|
6
|
-
/**
|
|
7
|
-
* Tenant identifier
|
|
8
|
-
*/
|
|
9
|
-
tenant: string;
|
|
10
|
-
/**
|
|
11
|
-
* Unique identifier for the component
|
|
12
|
-
*/
|
|
13
|
-
identifier: string;
|
|
14
|
-
/**
|
|
15
|
-
* Name of the component used in templates
|
|
16
|
-
*/
|
|
17
|
-
componentName: string;
|
|
18
|
-
/**
|
|
19
|
-
* Optional description of the component
|
|
20
|
-
*/
|
|
21
|
-
description?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Creation timestamp
|
|
24
|
-
*/
|
|
25
|
-
created: string | Date;
|
|
26
|
-
/**
|
|
27
|
-
* Last update timestamp
|
|
28
|
-
*/
|
|
29
|
-
updated: string | Date;
|
|
30
|
-
/**
|
|
31
|
-
* Additional component properties can be added here as the schema evolves
|
|
32
|
-
*/
|
|
33
|
-
[key: string]: any;
|
|
34
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"no-code-components.js","sourceRoot":"","sources":["../no-code-components.ts"],"names":[],"mappings":""}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export type PaymentAdminSuggestion = {
|
|
2
|
-
summary: string;
|
|
3
|
-
action: string;
|
|
4
|
-
};
|
|
5
|
-
export type PaymentProviderPublicContext = {
|
|
6
|
-
providerSourceId?: string;
|
|
7
|
-
providerPublicAccountId?: string;
|
|
8
|
-
providerEnvironment?: string;
|
|
9
|
-
};
|
|
10
|
-
export type PaymentResolutionContext = {
|
|
11
|
-
providerKind?: string;
|
|
12
|
-
operation?: string;
|
|
13
|
-
code?: string;
|
|
14
|
-
status?: number;
|
|
15
|
-
message?: string;
|
|
16
|
-
providerError?: Record<string, unknown> | null;
|
|
17
|
-
};
|
|
18
|
-
export type PaymentEventDocsContext = {
|
|
19
|
-
providerKind?: string;
|
|
20
|
-
eventName?: string;
|
|
21
|
-
operation?: string;
|
|
22
|
-
code?: string;
|
|
23
|
-
};
|
|
24
|
-
export declare const PAYMENTS_DOCS_BASE_URL = "https://docs.qelos.io/payments";
|
|
25
|
-
export declare function resolvePaymentEventDocsUrl(context: PaymentEventDocsContext): string;
|
|
26
|
-
export declare function sanitizeProviderErrorBody(value: unknown): Record<string, unknown> | null;
|
|
27
|
-
export declare function extractSumitProviderError(responseBody: unknown): Record<string, unknown> | null;
|
|
28
|
-
export declare function resolvePaymentProviderPublicContext(providerKind: string | undefined, metadata?: Record<string, unknown> | null, providerSourceId?: string): PaymentProviderPublicContext;
|
|
29
|
-
export declare function appendPaymentProviderContext<T extends Record<string, unknown>>(metadata: T, providerContext?: PaymentProviderPublicContext): T & Partial<PaymentProviderPublicContext>;
|
|
30
|
-
export declare function buildPaymentAdminSuggestions(context: PaymentResolutionContext): PaymentAdminSuggestion[];
|
|
31
|
-
export declare function buildPaymentEventDescription(baseDescription: string, providerError?: Record<string, unknown> | null): string;
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PAYMENTS_DOCS_BASE_URL = void 0;
|
|
4
|
-
exports.resolvePaymentEventDocsUrl = resolvePaymentEventDocsUrl;
|
|
5
|
-
exports.sanitizeProviderErrorBody = sanitizeProviderErrorBody;
|
|
6
|
-
exports.extractSumitProviderError = extractSumitProviderError;
|
|
7
|
-
exports.resolvePaymentProviderPublicContext = resolvePaymentProviderPublicContext;
|
|
8
|
-
exports.appendPaymentProviderContext = appendPaymentProviderContext;
|
|
9
|
-
exports.buildPaymentAdminSuggestions = buildPaymentAdminSuggestions;
|
|
10
|
-
exports.buildPaymentEventDescription = buildPaymentEventDescription;
|
|
11
|
-
exports.PAYMENTS_DOCS_BASE_URL = 'https://docs.qelos.io/payments';
|
|
12
|
-
const TROUBLESHOOTING_ERROR_CODES = new Set([
|
|
13
|
-
'PAYMENTS_NOT_CONFIGURED',
|
|
14
|
-
'ACTIVE_SUBSCRIPTION_EXISTS',
|
|
15
|
-
'DYNAMIC_AMOUNT_NOT_SET',
|
|
16
|
-
'DYNAMIC_PLAN_REQUIRES_SUBSCRIPTION',
|
|
17
|
-
'DYNAMIC_PLAN_UNSUPPORTED_PROVIDER',
|
|
18
|
-
'MISSING_REDIRECT_URLS',
|
|
19
|
-
'INVALID_CHECKOUT_AMOUNT',
|
|
20
|
-
'INVALID_SUMIT_COMPANY_ID',
|
|
21
|
-
'MISSING_SUMIT_CREDENTIALS',
|
|
22
|
-
'UNSUPPORTED_SUMIT_CURRENCY',
|
|
23
|
-
'INTEGRATION_SOURCE_NOT_FOUND',
|
|
24
|
-
'MISSING_EXTERNAL_PRICE_ID',
|
|
25
|
-
'PLAN_NOT_ACTIVE',
|
|
26
|
-
'SUBSCRIPTION_NOT_PENDING',
|
|
27
|
-
'INVALID_SIGNATURE',
|
|
28
|
-
'WEBHOOK_SECRET_NOT_CONFIGURED',
|
|
29
|
-
'TENANT_NOT_FOUND',
|
|
30
|
-
]);
|
|
31
|
-
function troubleshootingCodeAnchor(code) {
|
|
32
|
-
return code.toLowerCase().replace(/_/g, '-');
|
|
33
|
-
}
|
|
34
|
-
function resolveProviderEventDocsUrl(providerKind, eventName) {
|
|
35
|
-
const provider = providerKind.toLowerCase();
|
|
36
|
-
if (eventName === 'payment-method-save-failed') {
|
|
37
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/events#failed-credit-card-capture-payment-method-save-failed`;
|
|
38
|
-
}
|
|
39
|
-
if (eventName === 'payment-failed' || eventName === 'webhook-processing-failed') {
|
|
40
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/events#${provider}-troubleshooting`;
|
|
41
|
-
}
|
|
42
|
-
if (eventName === 'checkout-failed' || eventName === 'provider-call-failed') {
|
|
43
|
-
switch (provider) {
|
|
44
|
-
case 'sumit':
|
|
45
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/events#checkout-initiation-failure-checkout-failed-or-provider-call-failed`;
|
|
46
|
-
case 'paddle':
|
|
47
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/events#checkout-validation-failure-checkout-failed`;
|
|
48
|
-
case 'paypal':
|
|
49
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/events#checkout-and-subscription-setup-failure-checkout-failed-or-provider-call-failed`;
|
|
50
|
-
case 'dodopayments':
|
|
51
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/events#checkout-failure-checkout-failed-or-provider-call-failed`;
|
|
52
|
-
default:
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
switch (provider) {
|
|
57
|
-
case 'sumit':
|
|
58
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/events#sumit-troubleshooting`;
|
|
59
|
-
case 'paddle':
|
|
60
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/events#paddle-troubleshooting`;
|
|
61
|
-
case 'paypal':
|
|
62
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/events#paypal-troubleshooting`;
|
|
63
|
-
case 'dodopayments':
|
|
64
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/events#dodopayments-troubleshooting`;
|
|
65
|
-
default:
|
|
66
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/troubleshooting`;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
function resolvePaymentEventDocsUrl(context) {
|
|
70
|
-
const code = context.code?.toUpperCase();
|
|
71
|
-
if (code && TROUBLESHOOTING_ERROR_CODES.has(code)) {
|
|
72
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/troubleshooting#${troubleshootingCodeAnchor(code)}`;
|
|
73
|
-
}
|
|
74
|
-
if (context.providerKind) {
|
|
75
|
-
return resolveProviderEventDocsUrl(context.providerKind, context.eventName);
|
|
76
|
-
}
|
|
77
|
-
return `${exports.PAYMENTS_DOCS_BASE_URL}/troubleshooting`;
|
|
78
|
-
}
|
|
79
|
-
function pushUnique(suggestions, suggestion) {
|
|
80
|
-
if (suggestions.some((s) => s.summary === suggestion.summary)) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
suggestions.push(suggestion);
|
|
84
|
-
}
|
|
85
|
-
function sumitCredentialsSuggestions(suggestions, message, providerError) {
|
|
86
|
-
const combined = [
|
|
87
|
-
message,
|
|
88
|
-
providerError?.UserErrorMessage,
|
|
89
|
-
providerError?.TechnicalErrorDetails,
|
|
90
|
-
]
|
|
91
|
-
.filter(Boolean)
|
|
92
|
-
.join(' ')
|
|
93
|
-
.toLowerCase();
|
|
94
|
-
if (combined.includes('credential')
|
|
95
|
-
|| combined.includes('apikey')
|
|
96
|
-
|| combined.includes('api key')
|
|
97
|
-
|| combined.includes('companyid')
|
|
98
|
-
|| combined.includes('company id')
|
|
99
|
-
|| combined.includes('unauthorized')
|
|
100
|
-
|| combined.includes('authentication')) {
|
|
101
|
-
pushUnique(suggestions, {
|
|
102
|
-
summary: 'Verify Sumit API credentials',
|
|
103
|
-
action: 'Open Admin → Integrations → Sumit, confirm Company ID matches https://app.sumit.co.il/developers/keys/ and re-save a freshly generated API key.',
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
function sanitizeProviderErrorBody(value) {
|
|
108
|
-
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
|
-
const sanitized = {};
|
|
112
|
-
for (const [key, nestedValue] of Object.entries(value)) {
|
|
113
|
-
const normalized = key.replace(/[_-]/g, '').toLowerCase();
|
|
114
|
-
if (normalized === 'credentials'
|
|
115
|
-
|| normalized === 'apikey'
|
|
116
|
-
|| normalized === 'companyid'
|
|
117
|
-
|| normalized === 'singleusetoken'
|
|
118
|
-
|| normalized === 'cardnumber'
|
|
119
|
-
|| normalized === 'creditcardnumber'
|
|
120
|
-
|| normalized === 'cvv'
|
|
121
|
-
|| normalized === 'cvc'
|
|
122
|
-
|| normalized === 'password'
|
|
123
|
-
|| normalized === 'secret') {
|
|
124
|
-
continue;
|
|
125
|
-
}
|
|
126
|
-
sanitized[key] = nestedValue;
|
|
127
|
-
}
|
|
128
|
-
return sanitized;
|
|
129
|
-
}
|
|
130
|
-
function extractSumitProviderError(responseBody) {
|
|
131
|
-
const sanitized = sanitizeProviderErrorBody(responseBody);
|
|
132
|
-
if (!sanitized) {
|
|
133
|
-
return null;
|
|
134
|
-
}
|
|
135
|
-
if (sanitized.providerError && typeof sanitized.providerError === 'object') {
|
|
136
|
-
return sanitizeProviderErrorBody(sanitized.providerError);
|
|
137
|
-
}
|
|
138
|
-
if (sanitized.UserErrorMessage
|
|
139
|
-
|| sanitized.TechnicalErrorDetails
|
|
140
|
-
|| sanitized.Status) {
|
|
141
|
-
return sanitized;
|
|
142
|
-
}
|
|
143
|
-
if (sanitized.Data && typeof sanitized.Data === 'object') {
|
|
144
|
-
return sanitizeProviderErrorBody(sanitized.Data);
|
|
145
|
-
}
|
|
146
|
-
return sanitized;
|
|
147
|
-
}
|
|
148
|
-
function resolvePaymentProviderPublicContext(providerKind, metadata, providerSourceId) {
|
|
149
|
-
const context = {};
|
|
150
|
-
if (providerSourceId) {
|
|
151
|
-
context.providerSourceId = providerSourceId;
|
|
152
|
-
}
|
|
153
|
-
if (!providerKind || !metadata) {
|
|
154
|
-
return context;
|
|
155
|
-
}
|
|
156
|
-
switch (providerKind) {
|
|
157
|
-
case 'sumit':
|
|
158
|
-
if (metadata.companyId != null && metadata.companyId !== '') {
|
|
159
|
-
context.providerPublicAccountId = String(metadata.companyId);
|
|
160
|
-
}
|
|
161
|
-
break;
|
|
162
|
-
case 'paypal':
|
|
163
|
-
if (typeof metadata.clientId === 'string' && metadata.clientId) {
|
|
164
|
-
context.providerPublicAccountId = metadata.clientId;
|
|
165
|
-
}
|
|
166
|
-
if (typeof metadata.environment === 'string' && metadata.environment) {
|
|
167
|
-
context.providerEnvironment = metadata.environment;
|
|
168
|
-
}
|
|
169
|
-
break;
|
|
170
|
-
case 'paddle':
|
|
171
|
-
if (typeof metadata.environment === 'string' && metadata.environment) {
|
|
172
|
-
context.providerEnvironment = metadata.environment;
|
|
173
|
-
}
|
|
174
|
-
break;
|
|
175
|
-
case 'dodopayments':
|
|
176
|
-
if (typeof metadata.environment === 'string' && metadata.environment) {
|
|
177
|
-
context.providerEnvironment = metadata.environment;
|
|
178
|
-
}
|
|
179
|
-
break;
|
|
180
|
-
default:
|
|
181
|
-
break;
|
|
182
|
-
}
|
|
183
|
-
return context;
|
|
184
|
-
}
|
|
185
|
-
function appendPaymentProviderContext(metadata, providerContext) {
|
|
186
|
-
if (!providerContext) {
|
|
187
|
-
return metadata;
|
|
188
|
-
}
|
|
189
|
-
return {
|
|
190
|
-
...metadata,
|
|
191
|
-
...(providerContext.providerSourceId ? { providerSourceId: providerContext.providerSourceId } : {}),
|
|
192
|
-
...(providerContext.providerPublicAccountId ? { providerPublicAccountId: providerContext.providerPublicAccountId } : {}),
|
|
193
|
-
...(providerContext.providerEnvironment ? { providerEnvironment: providerContext.providerEnvironment } : {}),
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
function buildPaymentAdminSuggestions(context) {
|
|
197
|
-
const suggestions = [];
|
|
198
|
-
const code = context.code?.toUpperCase();
|
|
199
|
-
const message = context.message?.toLowerCase() || '';
|
|
200
|
-
const providerError = context.providerError;
|
|
201
|
-
if (code === 'PAYMENTS_NOT_CONFIGURED') {
|
|
202
|
-
pushUnique(suggestions, {
|
|
203
|
-
summary: 'Configure payments for this tenant',
|
|
204
|
-
action: 'Open Admin → Pricing Plans → Configuration, enable payments, and select a payment provider integration source.',
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
if (code === 'ACTIVE_SUBSCRIPTION_EXISTS') {
|
|
208
|
-
pushUnique(suggestions, {
|
|
209
|
-
summary: 'Cancel the existing subscription before checkout',
|
|
210
|
-
action: 'The billable entity already has an active or trialing subscription. Cancel it with sdk.payments.cancelSubscription(existingSubscriptionId), or pass reset: true on checkout to cancel automatically and start a new subscription.',
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
if (code === 'DYNAMIC_AMOUNT_NOT_SET') {
|
|
214
|
-
pushUnique(suggestions, {
|
|
215
|
-
summary: 'Set the subscription amount before checkout',
|
|
216
|
-
action: 'This plan is dynamic-priced. An admin must set dynamicAmount on the pending subscription before the user can pay.',
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
if (code === 'DYNAMIC_PLAN_REQUIRES_SUBSCRIPTION' || code === 'DYNAMIC_PLAN_UNSUPPORTED_PROVIDER') {
|
|
220
|
-
pushUnique(suggestions, {
|
|
221
|
-
summary: 'Use the dynamic-plan checkout flow',
|
|
222
|
-
action: 'Create a pending subscription first, set dynamicAmount (admin), then call checkout with subscriptionId. Dynamic plans require Sumit.',
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
if (code === 'MISSING_REDIRECT_URLS') {
|
|
226
|
-
pushUnique(suggestions, {
|
|
227
|
-
summary: 'Configure checkout redirect URLs',
|
|
228
|
-
action: 'Add successUrl and cancelUrl in Admin → Pricing Plans → Configuration, or pass them in the checkout request.',
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
if (code === 'INVALID_CHECKOUT_AMOUNT') {
|
|
232
|
-
pushUnique(suggestions, {
|
|
233
|
-
summary: 'Set a positive checkout amount',
|
|
234
|
-
action: 'For dynamic plans, an admin must set dynamicAmount on the pending subscription before checkout. Static plans need a non-zero monthly/yearly price.',
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
if (code === 'INVALID_SUMIT_COMPANY_ID' || code === 'MISSING_SUMIT_CREDENTIALS') {
|
|
238
|
-
pushUnique(suggestions, {
|
|
239
|
-
summary: 'Fix Sumit Company ID',
|
|
240
|
-
action: 'Open Admin → Integrations → Sumit and enter the numeric Company ID from https://app.sumit.co.il/developers/keys/.',
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
if (code === 'UNSUPPORTED_SUMIT_CURRENCY') {
|
|
244
|
-
pushUnique(suggestions, {
|
|
245
|
-
summary: 'Use a Sumit-supported plan currency',
|
|
246
|
-
action: 'Change the plan currency to ILS, USD, or EUR. Sumit does not support other currencies.',
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
if (code === 'INTEGRATION_SOURCE_NOT_FOUND') {
|
|
250
|
-
pushUnique(suggestions, {
|
|
251
|
-
summary: 'Reconnect the payment provider',
|
|
252
|
-
action: 'The configured paymentSourceId no longer exists. Re-select the Sumit integration in Admin → Pricing Plans → Configuration.',
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
if (context.providerKind === 'sumit') {
|
|
256
|
-
sumitCredentialsSuggestions(suggestions, context.message, providerError);
|
|
257
|
-
if (context.operation === 'beginCheckoutRedirect') {
|
|
258
|
-
pushUnique(suggestions, {
|
|
259
|
-
summary: 'Confirm Sumit hosted checkout is enabled',
|
|
260
|
-
action: 'In the Sumit account, verify redirect/hosted checkout is enabled for the merchant and that the API key has billing permissions.',
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
if (message.includes('unsupported sumit currency')) {
|
|
264
|
-
pushUnique(suggestions, {
|
|
265
|
-
summary: 'Use a Sumit-supported plan currency',
|
|
266
|
-
action: 'Set the plan currency to ILS, USD, or EUR before retrying checkout.',
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
if (message.includes('missing api key or company id')) {
|
|
270
|
-
pushUnique(suggestions, {
|
|
271
|
-
summary: 'Complete the Sumit integration credentials',
|
|
272
|
-
action: 'Open Admin → Integrations → Sumit and save both Company ID and API key.',
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
if (context.status === 401
|
|
277
|
-
|| context.status === 403
|
|
278
|
-
|| message.includes('401')
|
|
279
|
-
|| message.includes('403')) {
|
|
280
|
-
pushUnique(suggestions, {
|
|
281
|
-
summary: 'Payment provider rejected the credentials',
|
|
282
|
-
action: 'Regenerate the provider API key/secret in the provider dashboard and update the integration source in Admin → Integrations.',
|
|
283
|
-
});
|
|
284
|
-
}
|
|
285
|
-
if (code === 'INTEGRATION_TARGET_FAILED'
|
|
286
|
-
&& suggestions.length === 0
|
|
287
|
-
&& context.providerKind === 'sumit') {
|
|
288
|
-
pushUnique(suggestions, {
|
|
289
|
-
summary: 'Review Sumit account configuration',
|
|
290
|
-
action: 'Verify Company ID and API key in Admin → Integrations → Sumit, then retry checkout. If it still fails, check Sumit developer logs for the rejected beginredirect request.',
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
return suggestions;
|
|
294
|
-
}
|
|
295
|
-
function buildPaymentEventDescription(baseDescription, providerError) {
|
|
296
|
-
const userMessage = providerError?.UserErrorMessage;
|
|
297
|
-
if (typeof userMessage === 'string' && userMessage.trim()) {
|
|
298
|
-
return `${baseDescription}: ${userMessage.trim()}`;
|
|
299
|
-
}
|
|
300
|
-
return baseDescription;
|
|
301
|
-
}
|
|
302
|
-
//# sourceMappingURL=payment-event-resolution.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"payment-event-resolution.js","sourceRoot":"","sources":["../payment-event-resolution.ts"],"names":[],"mappings":";;;AA6FA,gEAYC;AAuCD,8DAyBC;AAED,8DAuBC;AAED,kFA4CC;AAED,oEAcC;AAED,oEAsHC;AAED,oEASC;AAxWY,QAAA,sBAAsB,GAAG,gCAAgC,CAAC;AAEvE,MAAM,2BAA2B,GAAG,IAAI,GAAG,CAAC;IAC1C,yBAAyB;IACzB,4BAA4B;IAC5B,wBAAwB;IACxB,oCAAoC;IACpC,mCAAmC;IACnC,uBAAuB;IACvB,yBAAyB;IACzB,0BAA0B;IAC1B,2BAA2B;IAC3B,4BAA4B;IAC5B,8BAA8B;IAC9B,2BAA2B;IAC3B,iBAAiB;IACjB,0BAA0B;IAC1B,mBAAmB;IACnB,+BAA+B;IAC/B,kBAAkB;CACnB,CAAC,CAAC;AAEH,SAAS,yBAAyB,CAAC,IAAY;IAC7C,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,2BAA2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