@orvello/sdk 0.2.3 → 0.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/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  // src/contract-hash.ts
4
- var CONTRACT_SHA256 = "d19081d6e7c4efcf54245026a17458d7f8dff002d61ea69cdd8f41c7d0d033ad";
4
+ var CONTRACT_SHA256 = "eb64699e8b371644f2a18619fdd4c65055683b270c6c92577cf8e0df8716d2ca";
5
5
 
6
6
  // src/diagnose.ts
7
- var SDK_VERSION = "0.2.3" ;
7
+ var SDK_VERSION = "0.3.0" ;
8
8
  function normalizeBaseUrl(raw) {
9
9
  const trimmed = raw.trim();
10
10
  if (!trimmed) throw new Error("Base URL cannot be empty");
@@ -185,22 +185,15 @@ function mapPaymentAccountToBankDetails(account) {
185
185
 
186
186
  // src/route-index.generated.ts
187
187
  var ROUTE_INDEX = {
188
- "GET__security_public": ["GET", "/security/public", "n", "public", 0],
188
+ "GET__api_amp_mail_brand_logo": ["GET", "/api/amp-mail/brands/:slug/logo", "n", "public", 1],
189
+ "GET__api_amp_mail_file": ["GET", "/api/amp-mail/files/:token", "n", "public", 1],
190
+ "GET__security_public": ["GET", "/security/public", "k", "x_api_key_https", 0],
189
191
  "admin_vat_create_system_settings": ["POST", "/admin/vat/system-settings", "b", "frontend_permission_http", 4],
190
192
  "admin_vat_get_company_settings_history": ["GET", "/admin/vat/company/:companyId/settings-history", "b", "frontend_permission_http", 1],
191
193
  "admin_vat_get_system_settings": ["GET", "/admin/vat/system-settings", "b", "frontend_permission_http", 0],
192
194
  "admin_vat_get_system_settings_history": ["GET", "/admin/vat/system-settings/history", "b", "frontend_permission_http", 2],
193
195
  "admin_vat_update_company_settings": ["PUT", "/admin/vat/company/:companyId/settings", "b", "frontend_permission_http", 5],
194
196
  "admin_vat_update_system_settings": ["PUT", "/admin/vat/system-settings/:id", "b", "frontend_permission_http", 5],
195
- "api_keys_audit": ["GET", "/api-keys/audit/:apiKeyId", "b", "frontend_bearer_http", 3],
196
- "api_keys_by_id": ["GET", "/api-keys/byId/:apiKeyId", "b", "frontend_bearer_http", 1],
197
- "api_keys_create": ["POST", "/api-keys/create", "b", "frontend_bearer_http", 4],
198
- "api_keys_delete": ["DELETE", "/api-keys/delete/:apiKeyId", "b", "frontend_bearer_http", 1],
199
- "api_keys_list": ["GET", "/api-keys/list", "b", "frontend_bearer_http", 2],
200
- "api_keys_meta_capabilities": ["GET", "/api-keys/meta/capabilities", "b", "frontend_bearer_http", 2],
201
- "api_keys_meta_scopes": ["GET", "/api-keys/meta/scopes", "b", "frontend_bearer_http", 2],
202
- "api_keys_revoke": ["POST", "/api-keys/revoke/:apiKeyId", "b", "frontend_bearer_http", 5],
203
- "api_keys_update": ["PUT", "/api-keys/update/:apiKeyId", "b", "frontend_bearer_http", 5],
204
197
  "app_info_get": ["GET", "/app-info", "b", "frontend_bearer_http", 2],
205
198
  "app_info_health": ["GET", "/app-info/health", "n", "public", 0],
206
199
  "app_info_manifest": ["GET", "/app-info/manifest", "n", "public", 0],
@@ -208,6 +201,7 @@ var ROUTE_INDEX = {
208
201
  "auth_login": ["POST", "/auth/login", "n", "public", 4],
209
202
  "auth_logout": ["POST", "/auth/logout", "n", "public", 4],
210
203
  "auth_me": ["GET", "/auth/me", "b", "frontend_bearer_http", 2],
204
+ "auth_me_profile_update": ["PATCH", "/auth/me/profile", "b", "frontend_bearer_http", 4],
211
205
  "auth_push_token_upsert": ["POST", "/auth/push-token", "b", "frontend_bearer_http", 4],
212
206
  "auth_refresh": ["POST", "/auth/refresh", "n", "public", 4],
213
207
  "auth_register": ["POST", "/auth/register", "n", "public", 4],
@@ -405,6 +399,7 @@ var ROUTE_INDEX = {
405
399
  "invoices_list_overdue": ["GET", "/invoices/overdue", "b", "frontend_permission_http", 2],
406
400
  "invoices_list_pending": ["GET", "/invoices/pending", "b", "frontend_permission_http", 2],
407
401
  "invoices_overdue_external": ["GET", "/invoices/external/overdue", "b", "unified_bearer", 2, ["invoices:read"]],
402
+ "invoices_payment_evidence_external": ["GET", "/invoices/external/:invoiceId/payment-evidence", "b", "unified_bearer", 1, ["invoices:read"]],
408
403
  "invoices_payment_reconciliation": ["GET", "/invoices/:invoiceId/payment-reconciliation", "b", "frontend_permission_http", 1],
409
404
  "invoices_pending_external": ["GET", "/invoices/external/pending", "b", "unified_bearer", 2, ["invoices:read"]],
410
405
  "invoices_repair_pdf": ["POST", "/invoices/:invoiceId/repair-pdf", "b", "frontend_bearer_http", 1],
@@ -726,7 +721,7 @@ function buildPath(operationId, params) {
726
721
  }
727
722
 
728
723
  // src/capabilities.ts
729
- var SDK_VERSION2 = "0.2.3" ;
724
+ var SDK_VERSION2 = "0.3.0" ;
730
725
  var CLIENT_MANAGEMENT_OPS = [
731
726
  "oauth2_external_clients_list",
732
727
  "oauth2_external_clients_get",
@@ -1502,6 +1497,11 @@ var OrvelloClient = class _OrvelloClient {
1502
1497
  }
1503
1498
  // ── Invoices ─────────────────────────────────────────────────────────────
1504
1499
  invoices = {
1500
+ /** Bank evidence, distinct from accounting status; this never initiates a bank call. */
1501
+ getPaymentEvidence: (id, options) => this.request(`/invoices/external/${id}/payment-evidence`, {
1502
+ method: "GET",
1503
+ ...options
1504
+ }),
1505
1505
  search: (query, options) => this.request("/invoices/external", {
1506
1506
  method: "GET",
1507
1507
  query,
@@ -1566,10 +1566,12 @@ var OrvelloClient = class _OrvelloClient {
1566
1566
  const baseUrl = await this.resolveBaseUrl();
1567
1567
  const targetUrl = pdfUrl.startsWith("http://") || pdfUrl.startsWith("https://") ? pdfUrl : `${baseUrl}${pdfUrl.startsWith("/") ? "" : "/"}${pdfUrl}`;
1568
1568
  const doFetch = this.doFetch;
1569
- const authHeader = await this.getAuthHeader();
1570
1569
  const headers = new Headers(options?.headers);
1571
- if (authHeader && !headers.has("Authorization")) {
1572
- headers.set("Authorization", authHeader);
1570
+ if (new URL(targetUrl).origin === new URL(baseUrl).origin) {
1571
+ const authHeader = await this.getAuthHeader();
1572
+ if (authHeader && !headers.has("Authorization")) {
1573
+ headers.set("Authorization", authHeader);
1574
+ }
1573
1575
  }
1574
1576
  const resp = await doFetch(targetUrl, {
1575
1577
  method: "GET",