@orvello/sdk 0.2.0 → 0.2.1
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.cjs +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -273,6 +273,8 @@ declare function orvelloCapabilities(): OrvelloCapabilities;
|
|
|
273
273
|
* schweigende Luecke, die aussieht wie Gesundheit.
|
|
274
274
|
*/
|
|
275
275
|
|
|
276
|
+
/** Der oeffentliche Erreichbarkeits-Endpunkt, wie ihn der Vertrag fuehrt. */
|
|
277
|
+
declare const HEALTH_PATH: string;
|
|
276
278
|
type PreflightStepName = "operation" | "path-parameters" | "request-shape" | "reachable" | "contract" | "credential-configured" | "credential-accepted";
|
|
277
279
|
type PreflightStep = {
|
|
278
280
|
name: PreflightStepName;
|
|
@@ -634,4 +636,4 @@ declare function createOrvelloClient(config?: OrvelloClientConfig): OrvelloClien
|
|
|
634
636
|
|
|
635
637
|
declare const CONTRACT_SHA256 = "4efd4e4b669168c9cab5419fa04dd4e26a2029de2d4b10a59918e366189e1072";
|
|
636
638
|
|
|
637
|
-
export { type AuthProvider, type BankAccountDetails, type BaseUrlProvider, BookkeepingExpensesCreateExternalBody, BookkeepingExpensesCreateExternalResponseData, BookkeepingPaymentsCreateManualExternalBody, BookkeepingPaymentsListAccountsExternalQuery, BookkeepingPaymentsListAccountsExternalResponseData, BookkeepingPaymentsSettleInvoiceExternalBody, BookkeepingPaymentsSettleInvoiceExternalResponseData, BookkeepingRevenue, BookkeepingRevenuesCreateExternalBody, BookkeepingRevenuesInvoiceAdjustmentExternalBody, BookkeepingRevenuesInvoiceAdjustmentExternalResponseData, CONTRACT_SHA256, type CallOptions, type CircuitBreakerConfig, type CircuitBreakerState, CustomerCompaniesCreateExternalBody, CustomerCompaniesSearchExternalQuery, CustomerCompaniesSearchExternalResponseData, CustomerCompaniesUpdateExternalBody, CustomerCompany, DunningGetSettingsExternalResponseData, DunningIssueExternalBody, DunningIssueExternalResponseData, DunningPreviewExternalBody, DunningPreviewExternalResponseData, DunningSuggestionsExternalQuery, DunningSuggestionsExternalResponseData, DunningUpdateSettingsExternalBody, DunningUpdateSettingsExternalResponseData, type ExpenseReceiptUpload, type HeadersProvider, Invoice, InvoicesCreateExternalBody, InvoicesCreateExternalResponseData, InvoicesCreditNoteIssueExternalBody, InvoicesCreditNoteIssueExternalResponseData, InvoicesCreditNotePreviewExternalBody, InvoicesCreditNotePreviewExternalResponseData, InvoicesOverdueExternalResponseData, InvoicesPendingExternalResponseData, InvoicesSearchExternalQuery, InvoicesSearchExternalResponseData, InvoicesSendEmailExternalBody, InvoicesSendEmailExternalResponseData, InvoicesStatusPolicyExternalResponseData, InvoicesUpdateStatusExternalBody, ManagingCompaniesCurrentExternalResponseData, NodeBillUser, Oauth2ExternalClientsCreateBody, Oauth2ExternalClientsCreateResponseData, Oauth2ExternalClientsGetResponseData, Oauth2ExternalClientsListQuery, Oauth2ExternalClientsListResponseData, Oauth2ExternalClientsRetireResponseData, Oauth2ExternalClientsRollbackResponseData, Oauth2ExternalClientsRotateBody, Oauth2ExternalClientsRotateResponseData, Oauth2ExternalClientsUpdateBody, Oauth2ExternalClientsUpdateResponseData, OrvelloApiError, type OrvelloAuthChannel, type OrvelloCapabilities, type OrvelloCapability, OrvelloClient, type OrvelloClientConfig, type OrvelloContractStatus, type OrvelloDiagnoseOptions, type OrvelloDiagnosis, type OrvelloHealth, type OrvelloOperation, OrvelloOperationError, type OrvelloOperationId, Payment, PaymentAccount, type PreflightHost, type PreflightOptions, type PreflightReport, type PreflightStep, type PreflightStepName, type RequestOptions, UsersUpdateExternalBody, type ValueProvider, authChannelForContractType, buildBase64Receipt, buildPath, calculateVat, createOrvelloClient, describeOperation, diagnoseOrvello, formatAmount, isKleinunternehmer, listOperations, mapPaymentAccountToBankDetails, orvelloCapabilities, preflightOrvello, resolveOperation };
|
|
639
|
+
export { type AuthProvider, type BankAccountDetails, type BaseUrlProvider, BookkeepingExpensesCreateExternalBody, BookkeepingExpensesCreateExternalResponseData, BookkeepingPaymentsCreateManualExternalBody, BookkeepingPaymentsListAccountsExternalQuery, BookkeepingPaymentsListAccountsExternalResponseData, BookkeepingPaymentsSettleInvoiceExternalBody, BookkeepingPaymentsSettleInvoiceExternalResponseData, BookkeepingRevenue, BookkeepingRevenuesCreateExternalBody, BookkeepingRevenuesInvoiceAdjustmentExternalBody, BookkeepingRevenuesInvoiceAdjustmentExternalResponseData, CONTRACT_SHA256, type CallOptions, type CircuitBreakerConfig, type CircuitBreakerState, CustomerCompaniesCreateExternalBody, CustomerCompaniesSearchExternalQuery, CustomerCompaniesSearchExternalResponseData, CustomerCompaniesUpdateExternalBody, CustomerCompany, DunningGetSettingsExternalResponseData, DunningIssueExternalBody, DunningIssueExternalResponseData, DunningPreviewExternalBody, DunningPreviewExternalResponseData, DunningSuggestionsExternalQuery, DunningSuggestionsExternalResponseData, DunningUpdateSettingsExternalBody, DunningUpdateSettingsExternalResponseData, type ExpenseReceiptUpload, HEALTH_PATH, type HeadersProvider, Invoice, InvoicesCreateExternalBody, InvoicesCreateExternalResponseData, InvoicesCreditNoteIssueExternalBody, InvoicesCreditNoteIssueExternalResponseData, InvoicesCreditNotePreviewExternalBody, InvoicesCreditNotePreviewExternalResponseData, InvoicesOverdueExternalResponseData, InvoicesPendingExternalResponseData, InvoicesSearchExternalQuery, InvoicesSearchExternalResponseData, InvoicesSendEmailExternalBody, InvoicesSendEmailExternalResponseData, InvoicesStatusPolicyExternalResponseData, InvoicesUpdateStatusExternalBody, ManagingCompaniesCurrentExternalResponseData, NodeBillUser, Oauth2ExternalClientsCreateBody, Oauth2ExternalClientsCreateResponseData, Oauth2ExternalClientsGetResponseData, Oauth2ExternalClientsListQuery, Oauth2ExternalClientsListResponseData, Oauth2ExternalClientsRetireResponseData, Oauth2ExternalClientsRollbackResponseData, Oauth2ExternalClientsRotateBody, Oauth2ExternalClientsRotateResponseData, Oauth2ExternalClientsUpdateBody, Oauth2ExternalClientsUpdateResponseData, OrvelloApiError, type OrvelloAuthChannel, type OrvelloCapabilities, type OrvelloCapability, OrvelloClient, type OrvelloClientConfig, type OrvelloContractStatus, type OrvelloDiagnoseOptions, type OrvelloDiagnosis, type OrvelloHealth, type OrvelloOperation, OrvelloOperationError, type OrvelloOperationId, Payment, PaymentAccount, type PreflightHost, type PreflightOptions, type PreflightReport, type PreflightStep, type PreflightStepName, type RequestOptions, UsersUpdateExternalBody, type ValueProvider, authChannelForContractType, buildBase64Receipt, buildPath, calculateVat, createOrvelloClient, describeOperation, diagnoseOrvello, formatAmount, isKleinunternehmer, listOperations, mapPaymentAccountToBankDetails, orvelloCapabilities, preflightOrvello, resolveOperation };
|
package/dist/index.d.ts
CHANGED
|
@@ -273,6 +273,8 @@ declare function orvelloCapabilities(): OrvelloCapabilities;
|
|
|
273
273
|
* schweigende Luecke, die aussieht wie Gesundheit.
|
|
274
274
|
*/
|
|
275
275
|
|
|
276
|
+
/** Der oeffentliche Erreichbarkeits-Endpunkt, wie ihn der Vertrag fuehrt. */
|
|
277
|
+
declare const HEALTH_PATH: string;
|
|
276
278
|
type PreflightStepName = "operation" | "path-parameters" | "request-shape" | "reachable" | "contract" | "credential-configured" | "credential-accepted";
|
|
277
279
|
type PreflightStep = {
|
|
278
280
|
name: PreflightStepName;
|
|
@@ -634,4 +636,4 @@ declare function createOrvelloClient(config?: OrvelloClientConfig): OrvelloClien
|
|
|
634
636
|
|
|
635
637
|
declare const CONTRACT_SHA256 = "4efd4e4b669168c9cab5419fa04dd4e26a2029de2d4b10a59918e366189e1072";
|
|
636
638
|
|
|
637
|
-
export { type AuthProvider, type BankAccountDetails, type BaseUrlProvider, BookkeepingExpensesCreateExternalBody, BookkeepingExpensesCreateExternalResponseData, BookkeepingPaymentsCreateManualExternalBody, BookkeepingPaymentsListAccountsExternalQuery, BookkeepingPaymentsListAccountsExternalResponseData, BookkeepingPaymentsSettleInvoiceExternalBody, BookkeepingPaymentsSettleInvoiceExternalResponseData, BookkeepingRevenue, BookkeepingRevenuesCreateExternalBody, BookkeepingRevenuesInvoiceAdjustmentExternalBody, BookkeepingRevenuesInvoiceAdjustmentExternalResponseData, CONTRACT_SHA256, type CallOptions, type CircuitBreakerConfig, type CircuitBreakerState, CustomerCompaniesCreateExternalBody, CustomerCompaniesSearchExternalQuery, CustomerCompaniesSearchExternalResponseData, CustomerCompaniesUpdateExternalBody, CustomerCompany, DunningGetSettingsExternalResponseData, DunningIssueExternalBody, DunningIssueExternalResponseData, DunningPreviewExternalBody, DunningPreviewExternalResponseData, DunningSuggestionsExternalQuery, DunningSuggestionsExternalResponseData, DunningUpdateSettingsExternalBody, DunningUpdateSettingsExternalResponseData, type ExpenseReceiptUpload, type HeadersProvider, Invoice, InvoicesCreateExternalBody, InvoicesCreateExternalResponseData, InvoicesCreditNoteIssueExternalBody, InvoicesCreditNoteIssueExternalResponseData, InvoicesCreditNotePreviewExternalBody, InvoicesCreditNotePreviewExternalResponseData, InvoicesOverdueExternalResponseData, InvoicesPendingExternalResponseData, InvoicesSearchExternalQuery, InvoicesSearchExternalResponseData, InvoicesSendEmailExternalBody, InvoicesSendEmailExternalResponseData, InvoicesStatusPolicyExternalResponseData, InvoicesUpdateStatusExternalBody, ManagingCompaniesCurrentExternalResponseData, NodeBillUser, Oauth2ExternalClientsCreateBody, Oauth2ExternalClientsCreateResponseData, Oauth2ExternalClientsGetResponseData, Oauth2ExternalClientsListQuery, Oauth2ExternalClientsListResponseData, Oauth2ExternalClientsRetireResponseData, Oauth2ExternalClientsRollbackResponseData, Oauth2ExternalClientsRotateBody, Oauth2ExternalClientsRotateResponseData, Oauth2ExternalClientsUpdateBody, Oauth2ExternalClientsUpdateResponseData, OrvelloApiError, type OrvelloAuthChannel, type OrvelloCapabilities, type OrvelloCapability, OrvelloClient, type OrvelloClientConfig, type OrvelloContractStatus, type OrvelloDiagnoseOptions, type OrvelloDiagnosis, type OrvelloHealth, type OrvelloOperation, OrvelloOperationError, type OrvelloOperationId, Payment, PaymentAccount, type PreflightHost, type PreflightOptions, type PreflightReport, type PreflightStep, type PreflightStepName, type RequestOptions, UsersUpdateExternalBody, type ValueProvider, authChannelForContractType, buildBase64Receipt, buildPath, calculateVat, createOrvelloClient, describeOperation, diagnoseOrvello, formatAmount, isKleinunternehmer, listOperations, mapPaymentAccountToBankDetails, orvelloCapabilities, preflightOrvello, resolveOperation };
|
|
639
|
+
export { type AuthProvider, type BankAccountDetails, type BaseUrlProvider, BookkeepingExpensesCreateExternalBody, BookkeepingExpensesCreateExternalResponseData, BookkeepingPaymentsCreateManualExternalBody, BookkeepingPaymentsListAccountsExternalQuery, BookkeepingPaymentsListAccountsExternalResponseData, BookkeepingPaymentsSettleInvoiceExternalBody, BookkeepingPaymentsSettleInvoiceExternalResponseData, BookkeepingRevenue, BookkeepingRevenuesCreateExternalBody, BookkeepingRevenuesInvoiceAdjustmentExternalBody, BookkeepingRevenuesInvoiceAdjustmentExternalResponseData, CONTRACT_SHA256, type CallOptions, type CircuitBreakerConfig, type CircuitBreakerState, CustomerCompaniesCreateExternalBody, CustomerCompaniesSearchExternalQuery, CustomerCompaniesSearchExternalResponseData, CustomerCompaniesUpdateExternalBody, CustomerCompany, DunningGetSettingsExternalResponseData, DunningIssueExternalBody, DunningIssueExternalResponseData, DunningPreviewExternalBody, DunningPreviewExternalResponseData, DunningSuggestionsExternalQuery, DunningSuggestionsExternalResponseData, DunningUpdateSettingsExternalBody, DunningUpdateSettingsExternalResponseData, type ExpenseReceiptUpload, HEALTH_PATH, type HeadersProvider, Invoice, InvoicesCreateExternalBody, InvoicesCreateExternalResponseData, InvoicesCreditNoteIssueExternalBody, InvoicesCreditNoteIssueExternalResponseData, InvoicesCreditNotePreviewExternalBody, InvoicesCreditNotePreviewExternalResponseData, InvoicesOverdueExternalResponseData, InvoicesPendingExternalResponseData, InvoicesSearchExternalQuery, InvoicesSearchExternalResponseData, InvoicesSendEmailExternalBody, InvoicesSendEmailExternalResponseData, InvoicesStatusPolicyExternalResponseData, InvoicesUpdateStatusExternalBody, ManagingCompaniesCurrentExternalResponseData, NodeBillUser, Oauth2ExternalClientsCreateBody, Oauth2ExternalClientsCreateResponseData, Oauth2ExternalClientsGetResponseData, Oauth2ExternalClientsListQuery, Oauth2ExternalClientsListResponseData, Oauth2ExternalClientsRetireResponseData, Oauth2ExternalClientsRollbackResponseData, Oauth2ExternalClientsRotateBody, Oauth2ExternalClientsRotateResponseData, Oauth2ExternalClientsUpdateBody, Oauth2ExternalClientsUpdateResponseData, OrvelloApiError, type OrvelloAuthChannel, type OrvelloCapabilities, type OrvelloCapability, OrvelloClient, type OrvelloClientConfig, type OrvelloContractStatus, type OrvelloDiagnoseOptions, type OrvelloDiagnosis, type OrvelloHealth, type OrvelloOperation, OrvelloOperationError, type OrvelloOperationId, Payment, PaymentAccount, type PreflightHost, type PreflightOptions, type PreflightReport, type PreflightStep, type PreflightStepName, type RequestOptions, UsersUpdateExternalBody, type ValueProvider, authChannelForContractType, buildBase64Receipt, buildPath, calculateVat, createOrvelloClient, describeOperation, diagnoseOrvello, formatAmount, isKleinunternehmer, listOperations, mapPaymentAccountToBankDetails, orvelloCapabilities, preflightOrvello, resolveOperation };
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var CONTRACT_SHA256 = "4efd4e4b669168c9cab5419fa04dd4e26a2029de2d4b10a59918e366189e1072";
|
|
3
3
|
|
|
4
4
|
// src/diagnose.ts
|
|
5
|
-
var SDK_VERSION = "0.2.
|
|
5
|
+
var SDK_VERSION = "0.2.1" ;
|
|
6
6
|
function normalizeBaseUrl(raw) {
|
|
7
7
|
const trimmed = raw.trim();
|
|
8
8
|
if (!trimmed) throw new Error("Base URL cannot be empty");
|
|
@@ -706,7 +706,7 @@ function buildPath(operationId, params) {
|
|
|
706
706
|
}
|
|
707
707
|
|
|
708
708
|
// src/capabilities.ts
|
|
709
|
-
var SDK_VERSION2 = "0.2.
|
|
709
|
+
var SDK_VERSION2 = "0.2.1" ;
|
|
710
710
|
var CLIENT_MANAGEMENT_OPS = [
|
|
711
711
|
"oauth2_external_clients_list",
|
|
712
712
|
"oauth2_external_clients_get",
|
|
@@ -789,6 +789,7 @@ function orvelloCapabilities() {
|
|
|
789
789
|
}
|
|
790
790
|
|
|
791
791
|
// src/preflight.ts
|
|
792
|
+
var HEALTH_PATH = describeOperation("app_info_health")?.path ?? "/app-info/health";
|
|
792
793
|
function step(name, ok, detail, skipped = false) {
|
|
793
794
|
return { name, ok, skipped, detail };
|
|
794
795
|
}
|
|
@@ -931,7 +932,7 @@ async function probeReachable(host, baseUrl, timeoutMs, signal) {
|
|
|
931
932
|
const timer = setTimeout(() => controller.abort(new Error(`Reachability probe timed out after ${timeoutMs}ms`)), timeoutMs);
|
|
932
933
|
const started = Date.now();
|
|
933
934
|
try {
|
|
934
|
-
const response = await doFetch(`${baseUrl}
|
|
935
|
+
const response = await doFetch(`${baseUrl}${HEALTH_PATH}`, {
|
|
935
936
|
method: "GET",
|
|
936
937
|
headers: { accept: "application/json" },
|
|
937
938
|
signal: controller.signal
|
|
@@ -1361,7 +1362,7 @@ var OrvelloClient = class _OrvelloClient {
|
|
|
1361
1362
|
if (options.signal?.aborted) controller.abort(options.signal.reason);
|
|
1362
1363
|
const timer = setTimeout(() => controller.abort(new Error(`Health check timed out after ${timeoutMs}ms`)), timeoutMs);
|
|
1363
1364
|
try {
|
|
1364
|
-
const response = await this.doFetch(`${baseUrl}
|
|
1365
|
+
const response = await this.doFetch(`${baseUrl}${HEALTH_PATH}`, {
|
|
1365
1366
|
method: "GET",
|
|
1366
1367
|
headers: { accept: "application/json" },
|
|
1367
1368
|
signal: controller.signal
|
|
@@ -1372,7 +1373,7 @@ var OrvelloClient = class _OrvelloClient {
|
|
|
1372
1373
|
available: false,
|
|
1373
1374
|
responseTimeMs: Date.now() - started,
|
|
1374
1375
|
authenticated: null,
|
|
1375
|
-
error: `orvello answered ${response.status} on
|
|
1376
|
+
error: `orvello answered ${response.status} on ${HEALTH_PATH}`
|
|
1376
1377
|
};
|
|
1377
1378
|
}
|
|
1378
1379
|
this.recordSuccess();
|
|
@@ -1786,6 +1787,6 @@ function createOrvelloClient(config) {
|
|
|
1786
1787
|
return new OrvelloClient(config);
|
|
1787
1788
|
}
|
|
1788
1789
|
|
|
1789
|
-
export { CONTRACT_SHA256, OrvelloApiError, OrvelloClient, OrvelloOperationError, authChannelForContractType, buildBase64Receipt, buildPath, calculateVat, createOrvelloClient, describeOperation, diagnoseOrvello, formatAmount, isKleinunternehmer, listOperations, mapPaymentAccountToBankDetails, orvelloCapabilities, preflightOrvello, resolveOperation };
|
|
1790
|
+
export { CONTRACT_SHA256, HEALTH_PATH, OrvelloApiError, OrvelloClient, OrvelloOperationError, authChannelForContractType, buildBase64Receipt, buildPath, calculateVat, createOrvelloClient, describeOperation, diagnoseOrvello, formatAmount, isKleinunternehmer, listOperations, mapPaymentAccountToBankDetails, orvelloCapabilities, preflightOrvello, resolveOperation };
|
|
1790
1791
|
//# sourceMappingURL=index.js.map
|
|
1791
1792
|
//# sourceMappingURL=index.js.map
|