@ossy/sdk 3.4.0 → 3.11.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.
@@ -13,12 +13,23 @@ declare function resolveActionsUrl(apiUrl: string): string;
13
13
  /** Resolve GET /events SSE URL from an SDK `apiUrl`. */
14
14
  declare function resolveEventsUrl(apiUrl: string): string;
15
15
 
16
+ /**
17
+ * Whether `sdk.invoke` can send `payload` through a manifest HTTP action route.
18
+ *
19
+ * GET/HEAD adapters only forward `route.query` keys. Extra payload fields (e.g.
20
+ * `{ email, code }` on verify-sign-in while the adapter only accepts `token`)
21
+ * must use `POST /actions` instead — otherwise the adapter drops them and auth
22
+ * fails silently from the caller's perspective (#751).
23
+ */
24
+ declare function canUseHttpActionRoute(route: ActionRoute, payload?: Record<string, unknown>): boolean;
16
25
  /**
17
26
  * Resolve a manifest HTTP action route to a fetch URL.
18
27
  * Supports same-origin `/@ossy` proxy and absolute `/api/v0` bases.
19
28
  */
20
29
  declare function resolveHttpActionUrl(apiUrl: string, route: ActionRoute, payload?: Record<string, unknown>): string;
21
30
 
31
+ /** Detect filesystem-backend upload URLs; S3 URLs must not get session headers. */
32
+ declare function isLocalStorageUploadUrl(url: string): boolean;
22
33
  declare class SDK {
23
34
  workspaceId?: string;
24
35
  authorization?: string;
@@ -193,7 +204,9 @@ declare const AuthSignIn: PlatformAction<{
193
204
  email: string;
194
205
  }>;
195
206
  declare const AuthVerifySignIn: PlatformAction<{
196
- token: string;
207
+ token?: string;
208
+ email?: string;
209
+ code?: string;
197
210
  }>;
198
211
  declare const AuthVerifyInvitation: PlatformAction<{
199
212
  workspaceId: string;
@@ -208,5 +221,5 @@ declare const AuthSignOff: PlatformAction;
208
221
  /** @deprecated Use `PlatformAction`. */
209
222
  type RestAction<TPayload = Record<string, unknown>> = PlatformAction<TPayload>;
210
223
 
211
- export { ApiTokenCreate, ApiTokenGetAll, ApiTokenInvalidate, AuthGetAuthenticatedUser, AuthGetAuthenticatedUserHistory, AuthGetUser, AuthSignIn, AuthSignOff, AuthSignUp, AuthVerifyInvitation, AuthVerifySignIn, ResourceUpdateAccess, ResourcesCreate, ResourcesCreateDirectory, ResourcesGet, ResourcesList, ResourcesMove, ResourcesRemove, ResourcesRename, ResourcesSearch, ResourcesUpdateContent, ResourcesUpload, ResourcesUploadNamedVersion, SDK, UserCurrentGet, UserCurrentGetHistory, UserCurrentUpdate, WorkspacesAddMember, WorkspacesCreate, WorkspacesCreateApiToken, WorkspacesDisableService, WorkspacesEnableService, WorkspacesGet, WorkspacesGetApiTokens, WorkspacesGetCurrent, WorkspacesGetSchemas, WorkspacesGetUsers, WorkspacesImportSchemas, WorkspacesInviteUser, WorkspacesList, WorkspacesRemoveMember, resolveActionId, resolveActionsUrl, resolveEventsUrl, resolveHttpActionUrl };
224
+ export { ApiTokenCreate, ApiTokenGetAll, ApiTokenInvalidate, AuthGetAuthenticatedUser, AuthGetAuthenticatedUserHistory, AuthGetUser, AuthSignIn, AuthSignOff, AuthSignUp, AuthVerifyInvitation, AuthVerifySignIn, ResourceUpdateAccess, ResourcesCreate, ResourcesCreateDirectory, ResourcesGet, ResourcesList, ResourcesMove, ResourcesRemove, ResourcesRename, ResourcesSearch, ResourcesUpdateContent, ResourcesUpload, ResourcesUploadNamedVersion, SDK, UserCurrentGet, UserCurrentGetHistory, UserCurrentUpdate, WorkspacesAddMember, WorkspacesCreate, WorkspacesCreateApiToken, WorkspacesDisableService, WorkspacesEnableService, WorkspacesGet, WorkspacesGetApiTokens, WorkspacesGetCurrent, WorkspacesGetSchemas, WorkspacesGetUsers, WorkspacesImportSchemas, WorkspacesInviteUser, WorkspacesList, WorkspacesRemoveMember, canUseHttpActionRoute, isLocalStorageUploadUrl, resolveActionId, resolveActionsUrl, resolveEventsUrl, resolveHttpActionUrl };
212
225
  export type { ActionRef, PlatformAction, PushMessage, RestAction };
@@ -1 +1 @@
1
- const s={VisualContentDescriptors:"@ossy/tasks/visual-content-descriptors",ResizeCommonWeb:"@ossy/tasks/resize-common-web"},e={Queued:"queued",InProgress:"in progress",Success:"success",Failed:"failed"},t={id:"@ossy/users/actions/get-api-tokens"},o={id:"@ossy/users/actions/create-api-token"},i={id:"@ossy/users/actions/invalidate-api-token"},n={id:"@ossy/workspaces/actions/list"},a={id:"@ossy/workspaces/actions/get"},r={id:"@ossy/workspaces/actions/get"},c={id:"@ossy/workspaces/actions/create"},d={id:"@ossy/workspaces/actions/import-schemas"},u={id:"@ossy/workspaces/actions/get-schemas"},h={id:"@ossy/workspaces/actions/create-api-token"},p={id:"@ossy/workspaces/actions/get-api-tokens"},l={id:"@ossy/workspaces/actions/invite-user"},y={id:"@ossy/workspaces/actions/enable-service"},g={id:"@ossy/workspaces/actions/disable-service"},k={id:"@ossy/workspaces/actions/get-users"},v={id:"@ossy/users/actions/join-workspace"},m={id:"@ossy/workspaces/actions/remove-member"},w={id:"@ossy/authentication/actions/get-current-user"},f={id:"@ossy/users/actions/get-current-user-history"},b={id:"@ossy/users/actions/update-details"},j={id:"@ossy/resources/actions/create",payload:{type:"directory"}},$={id:"@ossy/resources/actions/create"},z={id:"@ossy/resources/actions/create"},O={id:"@ossy/resources/actions/upload-named-version"},R={id:"@ossy/resources/actions/get"},S={id:"@ossy/resources/actions/list"},U={id:"@ossy/resources/actions/search"},T={id:"@ossy/resources/actions/update-access"},P={id:"@ossy/resources/actions/delete"},I={id:"@ossy/resources/actions/update-content"},E={id:"@ossy/resources/actions/update-location"},C={id:"@ossy/resources/actions/update-name"},A={id:"@ossy/authentication/actions/sign-up"},W={id:"@ossy/authentication/actions/request-sign-in"},G={id:"@ossy/authentication/actions/verify-sign-in"},H={id:"@ossy/workspaces/actions/accept-invitation"},N={id:"@ossy/authentication/actions/get-current-user"},q={id:"@ossy/users/actions/get-current-user-history"},D={id:"@ossy/authentication/actions/get-current-user"},J={id:"@ossy/authentication/actions/sign-out"};function V(s){const e="string"==typeof s?s:s.id;return e.includes(".")?e.replace(/\./g,"/"):e}function L(s){const e=(null!=s?s:"").replace(/\/$/,"");if(!e||"/@ossy"===e||e.endsWith("/@ossy"))return"/actions";const t=e.replace(/\/api\/v0\/?$/,"").replace(/\/$/,"");return t?`${t}/actions`:"/actions"}function x(s){const e=(null!=s?s:"").replace(/\/$/,"");if(!e||"/@ossy"===e||e.endsWith("/@ossy"))return"/events";const t=e.replace(/\/api\/v0\/?$/,"").replace(/\/$/,"");return t?`${t}/events`:"/events"}function F(s,e,t){var o,i;const n=e.path.startsWith("/")?e.path:`/${e.path}`,a=(null!=s?s:"").replace(/\/$/,"");let r;r=!a||"/@ossy"===a||a.endsWith("/@ossy")?`/@ossy${n.replace(/^\/api\/v0/,"")}`:a.includes("/api/v0")?`${a.replace(/\/api\/v0\/?$/,"")}${n}`:`${a}${n}`;const c=null!==(o=e.method)&&void 0!==o?o:"GET";if("GET"===c||"HEAD"===c){const s=new URLSearchParams;for(const o of null!==(i=e.query)&&void 0!==i?i:[]){const e=null==t?void 0:t[o];null!=e&&""!==e&&s.set(o,String(e))}const o=s.toString();o&&(r+=`${r.includes("?")?"&":"?"}${o}`)}return r}class M{static of(s){return new M(s)}constructor(s){this.baseUrl="https://api.ossy.se/api/v0",this.actionRoutes={},this.invoke=(s,e)=>this.invokePlatformAction(V(s),e),this.invokePlatformAction=(s,e)=>{const t=this.actionRoutes[s];if(t)return this.invokeHttpRoute(t,e);const o={method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,payload:null!=e?e:{}})};this.workspaceId&&(o.headers=Object.assign(Object.assign({},o.headers),{workspaceId:this.workspaceId})),this.authorization&&(o.headers=Object.assign(Object.assign({},o.headers),{Authorization:this.authorization}));const i=L(this.baseUrl);return fetch(i,o).then(this.handleResponse)},this.invokeHttpRoute=(s,e)=>{var t;const o=null!==(t=s.method)&&void 0!==t?t:"GET",i=F(this.baseUrl,s,e),n={method:o,credentials:"include",headers:{}};return this.workspaceId&&(n.headers=Object.assign(Object.assign({},n.headers),{workspaceId:this.workspaceId})),this.authorization&&(n.headers=Object.assign(Object.assign({},n.headers),{Authorization:this.authorization})),"GET"!==o&&"HEAD"!==o&&(n.headers=Object.assign(Object.assign({},n.headers),{"Content-Type":"application/json"}),n.body=JSON.stringify(null!=e?e:{})),fetch(i,n).then(this.handleResponse)},this.handleResponse=s=>{const e=s.headers.get("Content-Type")||"",t=s.status;return 400===t?s.json().then(s=>Promise.reject(s.error)):[200,204].includes(t)?e.includes("application/json")?s.json():s:Promise.reject(s)},this.subscribePush=s=>{if("undefined"==typeof EventSource)return()=>{};const e=x(this.baseUrl),t=new EventSource(e,{withCredentials:!0});return t.onmessage=e=>{try{const t=JSON.parse(e.data);s.onMessage(t)}catch(s){}},t.onerror=e=>{var t;null===(t=s.onError)||void 0===t||t.call(s,e)},()=>{t.close()}},this.updateConfig(s)}updateConfig(s){var e;this.baseUrl=s.apiUrl||this.baseUrl,this.workspaceId=s.workspaceId||this.workspaceId,this.authorization=s.authorization||this.authorization,this.actionRoutes=null!==(e=s.actionRoutes)&&void 0!==e?e:this.actionRoutes}get resources(){return{upload:({location:s="/",file:e})=>{const t={type:e.type,location:s,name:e.name,size:e.size};return this.invoke(z,t).then(s=>fetch(s.content.uploadUrl,{method:"PUT",body:e}).then(()=>s))},list:s=>{const e=new URLSearchParams(Object.assign({},s)).toString();return this.invoke(S,{search:e})},uploadNamedVersion:({id:s,name:e,file:t})=>{const o={id:s,namedVersion:e,name:e,size:t.size,type:t.type};return this.invoke(O,o).then(s=>fetch(s.content.uploadUrl,{method:"PUT",body:t}).then(()=>s))}}}}export{o as ApiTokenCreate,t as ApiTokenGetAll,i as ApiTokenInvalidate,N as AuthGetAuthenticatedUser,q as AuthGetAuthenticatedUserHistory,D as AuthGetUser,W as AuthSignIn,J as AuthSignOff,A as AuthSignUp,H as AuthVerifyInvitation,G as AuthVerifySignIn,T as ResourceUpdateAccess,$ as ResourcesCreate,j as ResourcesCreateDirectory,R as ResourcesGet,S as ResourcesList,E as ResourcesMove,P as ResourcesRemove,C as ResourcesRename,U as ResourcesSearch,I as ResourcesUpdateContent,z as ResourcesUpload,O as ResourcesUploadNamedVersion,M as SDK,e as TaskStatus,s as Tasks,w as UserCurrentGet,f as UserCurrentGetHistory,b as UserCurrentUpdate,v as WorkspacesAddMember,c as WorkspacesCreate,h as WorkspacesCreateApiToken,g as WorkspacesDisableService,y as WorkspacesEnableService,r as WorkspacesGet,p as WorkspacesGetApiTokens,a as WorkspacesGetCurrent,u as WorkspacesGetSchemas,k as WorkspacesGetUsers,d as WorkspacesImportSchemas,l as WorkspacesInviteUser,n as WorkspacesList,m as WorkspacesRemoveMember,V as resolveActionId,L as resolveActionsUrl,x as resolveEventsUrl,F as resolveHttpActionUrl};
1
+ const s={VisualContentDescriptors:"@ossy/tasks/visual-content-descriptors",ResizeCommonWeb:"@ossy/tasks/resize-common-web"},e={Queued:"queued",InProgress:"in progress",Success:"success",Failed:"failed"},t={id:"@ossy/users/actions/get-api-tokens"},o={id:"@ossy/users/actions/create-api-token"},i={id:"@ossy/users/actions/invalidate-api-token"},n={id:"@ossy/workspaces/actions/list"},a={id:"@ossy/workspaces/actions/get"},r={id:"@ossy/workspaces/actions/get"},c={id:"@ossy/workspaces/actions/create"},u={id:"@ossy/workspaces/actions/import-schemas"},d={id:"@ossy/workspaces/actions/get-schemas"},h={id:"@ossy/workspaces/actions/create-api-token"},p={id:"@ossy/workspaces/actions/get-api-tokens"},l={id:"@ossy/workspaces/actions/invite-user"},y={id:"@ossy/workspaces/actions/enable-service"},k={id:"@ossy/workspaces/actions/disable-service"},g={id:"@ossy/workspaces/actions/get-users"},v={id:"@ossy/users/actions/join-workspace"},w={id:"@ossy/workspaces/actions/remove-member"},f={id:"@ossy/authentication/actions/get-current-user"},m={id:"@ossy/users/actions/get-current-user-history"},b={id:"@ossy/users/actions/update-details"},z={id:"@ossy/resources/actions/create",payload:{type:"directory"}},j={id:"@ossy/resources/actions/create"},$={id:"@ossy/resources/actions/create"},I={id:"@ossy/resources/actions/upload-named-version"},O={id:"@ossy/resources/actions/get"},T={id:"@ossy/resources/actions/list"},R={id:"@ossy/resources/actions/search"},S={id:"@ossy/resources/actions/update-access"},U={id:"@ossy/resources/actions/delete"},E={id:"@ossy/resources/actions/update-content"},P={id:"@ossy/resources/actions/update-location"},C={id:"@ossy/resources/actions/update-name"},A={id:"@ossy/authentication/actions/sign-up"},G={id:"@ossy/authentication/actions/request-sign-in"},W={id:"@ossy/authentication/actions/verify-sign-in"},H={id:"@ossy/workspaces/actions/accept-invitation"},q={id:"@ossy/authentication/actions/get-current-user"},D={id:"@ossy/users/actions/get-current-user-history"},N={id:"@ossy/authentication/actions/get-current-user"},J={id:"@ossy/authentication/actions/sign-out"};function L(s){const e="string"==typeof s?s:s.id;return e.includes(".")?e.replace(/\./g,"/"):e}function V(s){const e=(null!=s?s:"").replace(/\/$/,"");if(!e||"/@ossy"===e||e.endsWith("/@ossy"))return"/actions";const t=e.replace(/\/api\/v0\/?$/,"").replace(/\/$/,"");return t?`${t}/actions`:"/actions"}function x(s){const e=(null!=s?s:"").replace(/\/$/,"");if(!e||"/@ossy"===e||e.endsWith("/@ossy"))return"/events";const t=e.replace(/\/api\/v0\/?$/,"").replace(/\/$/,"");return t?`${t}/events`:"/events"}function F(s,e){var t,o;const i=null!==(t=s.method)&&void 0!==t?t:"GET";if("GET"!==i&&"HEAD"!==i)return!0;const n=new Set(null!==(o=s.query)&&void 0!==o?o:[]);return Object.entries(null!=e?e:{}).every(([s,e])=>null==e||""===e||n.has(s))}function M(s,e,t){var o,i;const n=e.path.startsWith("/")?e.path:`/${e.path}`,a=(null!=s?s:"").replace(/\/$/,"");let r;r=!a||"/@ossy"===a||a.endsWith("/@ossy")?`/@ossy${n.replace(/^\/api\/v0/,"")}`:a.includes("/api/v0")?`${a.replace(/\/api\/v0\/?$/,"")}${n}`:`${a}${n}`;const c=null!==(o=e.method)&&void 0!==o?o:"GET";if("GET"===c||"HEAD"===c){const s=new URLSearchParams;for(const o of null!==(i=e.query)&&void 0!==i?i:[]){const e=null==t?void 0:t[o];null!=e&&""!==e&&s.set(o,String(e))}const o=s.toString();o&&(r+=`${r.includes("?")?"&":"?"}${o}`)}return r}function Q(s){if(!s||"string"!=typeof s)return!1;try{const e=new URL(s,"http://localhost");return"/local-storage"===e.pathname||e.pathname.endsWith("/local-storage")}catch(s){return!1}}class B{static of(s){return new B(s)}constructor(s){this.baseUrl="https://api.ossy.se/api/v0",this.actionRoutes={},this.invoke=(s,e)=>this.invokePlatformAction(L(s),e),this.invokePlatformAction=(s,e)=>{const t=this.actionRoutes[s];if(t&&F(t,e))return this.invokeHttpRoute(t,e);const o={method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,payload:null!=e?e:{}})};this.workspaceId&&(o.headers=Object.assign(Object.assign({},o.headers),{workspaceId:this.workspaceId})),this.authorization&&(o.headers=Object.assign(Object.assign({},o.headers),{Authorization:this.authorization}));const i=V(this.baseUrl);return fetch(i,o).then(this.handleResponse)},this.invokeHttpRoute=(s,e)=>{var t;const o=null!==(t=s.method)&&void 0!==t?t:"GET",i=M(this.baseUrl,s,e),n={method:o,credentials:"include",headers:{}};return this.workspaceId&&(n.headers=Object.assign(Object.assign({},n.headers),{workspaceId:this.workspaceId})),this.authorization&&(n.headers=Object.assign(Object.assign({},n.headers),{Authorization:this.authorization})),"GET"!==o&&"HEAD"!==o&&(n.headers=Object.assign(Object.assign({},n.headers),{"Content-Type":"application/json"}),n.body=JSON.stringify(null!=e?e:{})),fetch(i,n).then(this.handleResponse)},this.handleResponse=s=>{const e=s.headers.get("Content-Type")||"",t=s.status;return 400===t?s.json().then(s=>Promise.reject(s.error)):[200,204].includes(t)?e.includes("application/json")?s.json():s:Promise.reject(s)},this.subscribePush=s=>{if("undefined"==typeof EventSource)return()=>{};const e=x(this.baseUrl),t=new EventSource(e,{withCredentials:!0});return t.onmessage=e=>{try{const t=JSON.parse(e.data);s.onMessage(t)}catch(s){}},t.onerror=e=>{var t;null===(t=s.onError)||void 0===t||t.call(s,e)},()=>{t.close()}},this.updateConfig(s)}updateConfig(s){var e;this.baseUrl=s.apiUrl||this.baseUrl,this.workspaceId=s.workspaceId||this.workspaceId,this.authorization=s.authorization||this.authorization,this.actionRoutes=null!==(e=s.actionRoutes)&&void 0!==e?e:this.actionRoutes}get resources(){return{upload:({location:s="/",file:e})=>{const t={type:e.type,location:s,name:e.name,size:e.size};return this.invoke($,t).then(s=>{const t=s.content.uploadUrl,o={};e.type&&(o["Content-Type"]=e.type);const i={method:"PUT",headers:o,body:e};return Q(t)&&(i.credentials="include",this.workspaceId&&(o.workspaceId=this.workspaceId),this.authorization&&(o.Authorization=this.authorization)),fetch(t,i).then(()=>s)})},list:s=>{const e=new URLSearchParams(Object.assign({},s)).toString();return this.invoke(T,{search:e})},uploadNamedVersion:({id:s,name:e,file:t})=>{const o={id:s,namedVersion:e,name:e,size:t.size,type:t.type};return this.invoke(I,o).then(s=>{const e=s.content.uploadUrl,o={};t.type&&(o["Content-Type"]=t.type);const i={method:"PUT",headers:o,body:t};return Q(e)&&(i.credentials="include",this.workspaceId&&(o.workspaceId=this.workspaceId),this.authorization&&(o.Authorization=this.authorization)),fetch(e,i).then(()=>s)})}}}}export{o as ApiTokenCreate,t as ApiTokenGetAll,i as ApiTokenInvalidate,q as AuthGetAuthenticatedUser,D as AuthGetAuthenticatedUserHistory,N as AuthGetUser,G as AuthSignIn,J as AuthSignOff,A as AuthSignUp,H as AuthVerifyInvitation,W as AuthVerifySignIn,S as ResourceUpdateAccess,j as ResourcesCreate,z as ResourcesCreateDirectory,O as ResourcesGet,T as ResourcesList,P as ResourcesMove,U as ResourcesRemove,C as ResourcesRename,R as ResourcesSearch,E as ResourcesUpdateContent,$ as ResourcesUpload,I as ResourcesUploadNamedVersion,B as SDK,e as TaskStatus,s as Tasks,f as UserCurrentGet,m as UserCurrentGetHistory,b as UserCurrentUpdate,v as WorkspacesAddMember,c as WorkspacesCreate,h as WorkspacesCreateApiToken,k as WorkspacesDisableService,y as WorkspacesEnableService,r as WorkspacesGet,p as WorkspacesGetApiTokens,a as WorkspacesGetCurrent,d as WorkspacesGetSchemas,g as WorkspacesGetUsers,u as WorkspacesImportSchemas,l as WorkspacesInviteUser,n as WorkspacesList,w as WorkspacesRemoveMember,F as canUseHttpActionRoute,Q as isLocalStorageUploadUrl,L as resolveActionId,V as resolveActionsUrl,x as resolveEventsUrl,M as resolveHttpActionUrl};
@@ -116,7 +116,9 @@ export declare const AuthSignIn: PlatformAction<{
116
116
  email: string;
117
117
  }>;
118
118
  export declare const AuthVerifySignIn: PlatformAction<{
119
- token: string;
119
+ token?: string;
120
+ email?: string;
121
+ code?: string;
120
122
  }>;
121
123
  export declare const AuthVerifyInvitation: PlatformAction<{
122
124
  workspaceId: string;
@@ -1,4 +1,13 @@
1
1
  import type { ActionRoute } from '@ossy/types';
2
+ /**
3
+ * Whether `sdk.invoke` can send `payload` through a manifest HTTP action route.
4
+ *
5
+ * GET/HEAD adapters only forward `route.query` keys. Extra payload fields (e.g.
6
+ * `{ email, code }` on verify-sign-in while the adapter only accepts `token`)
7
+ * must use `POST /actions` instead — otherwise the adapter drops them and auth
8
+ * fails silently from the caller's perspective (#751).
9
+ */
10
+ export declare function canUseHttpActionRoute(route: ActionRoute, payload?: Record<string, unknown>): boolean;
2
11
  /**
3
12
  * Resolve a manifest HTTP action route to a fetch URL.
4
13
  * Supports same-origin `/@ossy` proxy and absolute `/api/v0` bases.
@@ -0,0 +1 @@
1
+ export {};
@@ -1,9 +1,11 @@
1
1
  import { SDKConfig } from './config';
2
2
  import { resolveActionId, resolveActionsUrl, resolveEventsUrl, type ActionRef } from './platform-action';
3
- import { resolveHttpActionUrl } from './resolve-http-action-url';
3
+ import { canUseHttpActionRoute, resolveHttpActionUrl } from './resolve-http-action-url';
4
4
  import type { ActionRoute } from '@ossy/types';
5
- export { resolveActionId, resolveActionsUrl, resolveEventsUrl, resolveHttpActionUrl, type ActionRef };
5
+ export { resolveActionId, resolveActionsUrl, resolveEventsUrl, canUseHttpActionRoute, resolveHttpActionUrl, type ActionRef, };
6
6
  export type { ActionRoute };
7
+ /** Detect filesystem-backend upload URLs; S3 URLs must not get session headers. */
8
+ export declare function isLocalStorageUploadUrl(url: string): boolean;
7
9
  export declare class SDK {
8
10
  workspaceId?: string;
9
11
  authorization?: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ossy/sdk",
3
3
  "description": "Software Development Kit for interacting with our services",
4
- "version": "3.4.0",
4
+ "version": "3.11.1",
5
5
  "url": "git://github.com/ossy-se/packages/sdk",
6
6
  "source": "src/public.index.ts",
7
7
  "main": "build/public.index.js",
@@ -21,12 +21,12 @@
21
21
  },
22
22
  "license": "MIT",
23
23
  "dependencies": {
24
- "@ossy/types": "^3.3.0"
24
+ "@ossy/types": "^3.5.0"
25
25
  },
26
26
  "scripts": {
27
27
  "start": "",
28
28
  "build": "rollup -c rollup.config.js",
29
- "test": ""
29
+ "test": "node --test --experimental-strip-types src/*.spec.js"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public",
@@ -36,5 +36,5 @@
36
36
  "/build",
37
37
  "README.md"
38
38
  ],
39
- "gitHead": "d36b69444268d172bc3e8e1dc77e67afc63f8650"
39
+ "gitHead": "f279de3535b6bc76631cbc6b943dae8f92a1565f"
40
40
  }