@orvello/sdk 0.2.3 → 0.2.4

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 = "bfd85f17c2aa38bf82c759d02eefaecde34d402f7704d074e5fcdc8cb35c3990";
5
5
 
6
6
  // src/diagnose.ts
7
- var SDK_VERSION = "0.2.3" ;
7
+ var SDK_VERSION = "0.2.4" ;
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],
@@ -726,7 +720,7 @@ function buildPath(operationId, params) {
726
720
  }
727
721
 
728
722
  // src/capabilities.ts
729
- var SDK_VERSION2 = "0.2.3" ;
723
+ var SDK_VERSION2 = "0.2.4" ;
730
724
  var CLIENT_MANAGEMENT_OPS = [
731
725
  "oauth2_external_clients_list",
732
726
  "oauth2_external_clients_get",
@@ -1566,10 +1560,12 @@ var OrvelloClient = class _OrvelloClient {
1566
1560
  const baseUrl = await this.resolveBaseUrl();
1567
1561
  const targetUrl = pdfUrl.startsWith("http://") || pdfUrl.startsWith("https://") ? pdfUrl : `${baseUrl}${pdfUrl.startsWith("/") ? "" : "/"}${pdfUrl}`;
1568
1562
  const doFetch = this.doFetch;
1569
- const authHeader = await this.getAuthHeader();
1570
1563
  const headers = new Headers(options?.headers);
1571
- if (authHeader && !headers.has("Authorization")) {
1572
- headers.set("Authorization", authHeader);
1564
+ if (new URL(targetUrl).origin === new URL(baseUrl).origin) {
1565
+ const authHeader = await this.getAuthHeader();
1566
+ if (authHeader && !headers.has("Authorization")) {
1567
+ headers.set("Authorization", authHeader);
1568
+ }
1573
1569
  }
1574
1570
  const resp = await doFetch(targetUrl, {
1575
1571
  method: "GET",