Feat/s3 storage #2

Closed
maaz519 wants to merge 30 commits from feat/s3-storage into main
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 9e0411bfe6 - Show all commits
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@insignia/iios-kernel-client", "name": "@insignia/iios-kernel-client",
"version": "0.1.2", "version": "0.1.3",
"type": "module", "type": "module",
"main": "dist/index.js", "main": "dist/index.js",
"module": "dist/index.js", "module": "dist/index.js",
+3 -1
View File
@@ -4,6 +4,8 @@ import type { Message, InboxItem, InboxState, Ticket, TicketState, CallbackReque
export interface RestConfig { export interface RestConfig {
serviceUrl: string; serviceUrl: string;
token?: string; token?: string;
/** Extra headers sent on every request — e.g. `x-context-attestation` (the July 12 trust proof). */
headers?: Record<string, string>;
} }
/** REST/polling client for kernel reads and the native-send fallback. */ /** REST/polling client for kernel reads and the native-send fallback. */
@@ -15,7 +17,7 @@ export class RestClient {
} }
private headers(extra: Record<string, string> = {}): Record<string, string> { private headers(extra: Record<string, string> = {}): Record<string, string> {
const h: Record<string, string> = { 'content-type': 'application/json', ...extra }; const h: Record<string, string> = { 'content-type': 'application/json', ...this.config.headers, ...extra };
if (this.config.token) h.authorization = `Bearer ${this.config.token}`; if (this.config.token) h.authorization = `Bearer ${this.config.token}`;
return h; return h;
} }