@zodiac-os/sdk 1.0.0 → 1.0.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.js +28 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ var ApiClient = class {
|
|
|
47
47
|
"content-type": "application/json",
|
|
48
48
|
authorization: `Bearer ${this.apiKey}`
|
|
49
49
|
},
|
|
50
|
-
body:
|
|
50
|
+
body: jsonStringify(payload)
|
|
51
51
|
});
|
|
52
52
|
if (!res.ok) {
|
|
53
53
|
await handleApiError(res);
|
|
@@ -58,10 +58,6 @@ var ApiClient = class {
|
|
|
58
58
|
* Applies an accounts specification to Zodiac OS.
|
|
59
59
|
*/
|
|
60
60
|
async applyConstellation(payload) {
|
|
61
|
-
this.resolveConstellation({
|
|
62
|
-
specification: payload.specification,
|
|
63
|
-
source: payload.source
|
|
64
|
-
});
|
|
65
61
|
return await this.postJson("constellation/apply", payload);
|
|
66
62
|
}
|
|
67
63
|
/**
|
|
@@ -90,7 +86,7 @@ var ApiRequestError = class _ApiRequestError extends Error {
|
|
|
90
86
|
if (details == null) return message;
|
|
91
87
|
let detailsString;
|
|
92
88
|
try {
|
|
93
|
-
detailsString = typeof details === "string" ? details :
|
|
89
|
+
detailsString = typeof details === "string" ? details : jsonStringify(details, 2);
|
|
94
90
|
} catch (_err) {
|
|
95
91
|
detailsString = String(details);
|
|
96
92
|
}
|
|
@@ -102,33 +98,45 @@ Details: ${detailsString}`;
|
|
|
102
98
|
}
|
|
103
99
|
};
|
|
104
100
|
async function handleApiError(response) {
|
|
105
|
-
|
|
101
|
+
const contentType = response.headers.get("content-type");
|
|
102
|
+
if (contentType?.includes("application/json")) {
|
|
106
103
|
const errorData = await response.json();
|
|
107
|
-
|
|
108
|
-
status: response.status,
|
|
109
|
-
statusText: response.statusText,
|
|
110
|
-
details: errorData.error.details
|
|
111
|
-
});
|
|
112
|
-
} catch (jsonError) {
|
|
104
|
+
let error;
|
|
113
105
|
try {
|
|
114
|
-
|
|
115
|
-
throw new ApiRequestError(`Unexpected error: ${text}`, {
|
|
106
|
+
error = new ApiRequestError(errorData.error.message, {
|
|
116
107
|
status: response.status,
|
|
117
108
|
statusText: response.statusText,
|
|
118
|
-
|
|
109
|
+
details: errorData.error.details
|
|
119
110
|
});
|
|
120
|
-
} catch (
|
|
121
|
-
|
|
122
|
-
`
|
|
111
|
+
} catch (jsonShapeError) {
|
|
112
|
+
error = new ApiRequestError(
|
|
113
|
+
`Failed parsing error response: ${jsonShapeError}`,
|
|
123
114
|
{
|
|
124
115
|
status: response.status,
|
|
125
116
|
statusText: response.statusText,
|
|
126
|
-
|
|
117
|
+
details: errorData
|
|
127
118
|
}
|
|
128
119
|
);
|
|
129
120
|
}
|
|
121
|
+
throw error;
|
|
122
|
+
} else {
|
|
123
|
+
const text = await response.text();
|
|
124
|
+
throw new ApiRequestError(`Unexpected error: ${text}`, {
|
|
125
|
+
status: response.status,
|
|
126
|
+
statusText: response.statusText
|
|
127
|
+
});
|
|
130
128
|
}
|
|
131
129
|
}
|
|
130
|
+
var jsonStringify = (value, indent) => JSON.stringify(
|
|
131
|
+
value,
|
|
132
|
+
(_, value2) => {
|
|
133
|
+
if (typeof value2 === "bigint") {
|
|
134
|
+
return value2.toString();
|
|
135
|
+
}
|
|
136
|
+
return value2;
|
|
137
|
+
},
|
|
138
|
+
indent
|
|
139
|
+
);
|
|
132
140
|
// Annotate the CommonJS export names for ESM import in node:
|
|
133
141
|
0 && (module.exports = {
|
|
134
142
|
ApiClient
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/api.ts"],"sourcesContent":["export { ApiClient } from './api'\n","import type {\n ApplyConstellationPayload,\n ApplyConstellationResult,\n ResolveConstellationPayload,\n ResolveConstellationResult,\n ApiError as ApiErrorResponse,\n} from '@zodiac-os/api-types'\n\nexport type Options = {\n workspace: string\n apiKey: string\n baseUrl?: string\n fetch?: typeof globalThis.fetch\n headers?: Record<string, string>\n}\n\nconst DEFAULT_BASE_URL = 'https://app.pilot.gnosisguild.org/api/v1'\n\nexport class ApiClient {\n private apiKey: string\n private baseUrl: string\n private _fetch: typeof fetch\n private headers: Record<string, string>\n\n constructor(opts: Options) {\n this.baseUrl =\n (opts.baseUrl ?? DEFAULT_BASE_URL).replace(/\\/$/, '') +\n '/workspace/' +\n opts.workspace\n\n this._fetch = opts.fetch ?? fetch\n this.headers = opts.headers ?? {}\n this.apiKey = opts.apiKey\n }\n\n private async postJson(endpoint: string, payload: unknown) {\n const res = await this._fetch(`${this.baseUrl}/${endpoint}`, {\n method: 'POST',\n headers: {\n ...this.headers,\n 'content-type': 'application/json',\n authorization: `Bearer ${this.apiKey}`,\n },\n body:
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/api.ts"],"sourcesContent":["export { ApiClient } from './api'\n","import type {\n ApplyConstellationPayload,\n ApplyConstellationResult,\n ResolveConstellationPayload,\n ResolveConstellationResult,\n ApiError as ApiErrorResponse,\n} from '@zodiac-os/api-types'\n\nexport type Options = {\n workspace: string\n apiKey: string\n baseUrl?: string\n fetch?: typeof globalThis.fetch\n headers?: Record<string, string>\n}\n\nconst DEFAULT_BASE_URL = 'https://app.pilot.gnosisguild.org/api/v1'\n\nexport class ApiClient {\n private apiKey: string\n private baseUrl: string\n private _fetch: typeof fetch\n private headers: Record<string, string>\n\n constructor(opts: Options) {\n this.baseUrl =\n (opts.baseUrl ?? DEFAULT_BASE_URL).replace(/\\/$/, '') +\n '/workspace/' +\n opts.workspace\n\n this._fetch = opts.fetch ?? fetch\n this.headers = opts.headers ?? {}\n this.apiKey = opts.apiKey\n }\n\n private async postJson(endpoint: string, payload: unknown) {\n const res = await this._fetch(`${this.baseUrl}/${endpoint}`, {\n method: 'POST',\n headers: {\n ...this.headers,\n 'content-type': 'application/json',\n authorization: `Bearer ${this.apiKey}`,\n },\n body: jsonStringify(payload),\n })\n if (!res.ok) {\n await handleApiError(res)\n }\n\n return await res.json()\n }\n\n /**\n * Applies an accounts specification to Zodiac OS.\n */\n async applyConstellation(\n payload: ApplyConstellationPayload\n ): Promise<ApplyConstellationResult> {\n return await this.postJson('constellation/apply', payload)\n }\n\n /**\n * Resolves an accounts specification to Zodiac OS.\n */\n async resolveConstellation(\n payload: ResolveConstellationPayload\n ): Promise<ResolveConstellationResult> {\n return await this.postJson('constellation/resolve', payload)\n }\n}\n\nexport class ApiRequestError extends Error {\n public readonly status: number\n public readonly statusText: string\n public readonly details?: unknown\n\n constructor(\n message: string,\n opts: {\n status: number\n statusText: string\n details?: unknown\n cause?: unknown\n }\n ) {\n super(ApiRequestError.composeMessage(message, opts.details))\n this.name = 'ApiRequestError'\n this.status = opts.status\n this.statusText = opts.statusText\n this.details = opts.details\n if (opts.cause !== undefined) {\n ;(this as any).cause = opts.cause\n }\n }\n\n private static composeMessage(message: string, details?: unknown) {\n if (details == null) return message\n let detailsString: string\n try {\n detailsString =\n typeof details === 'string' ? details : jsonStringify(details, 2)\n } catch (_err) {\n detailsString = String(details)\n }\n return `${message}\\nDetails: ${detailsString}`\n }\n\n toString() {\n return `${this.name}: ${this.message}`\n }\n}\n\nasync function handleApiError(response: Response): Promise<never> {\n const contentType = response.headers.get('content-type')\n if (contentType?.includes('application/json')) {\n const errorData = (await response.json()) as ApiErrorResponse\n let error: ApiRequestError\n try {\n error = new ApiRequestError(errorData.error.message, {\n status: response.status,\n statusText: response.statusText,\n details: errorData.error.details,\n })\n } catch (jsonShapeError) {\n error = new ApiRequestError(\n `Failed parsing error response: ${jsonShapeError}`,\n {\n status: response.status,\n statusText: response.statusText,\n details: errorData,\n }\n )\n }\n throw error\n } else {\n // Not JSON, read as text directly\n const text = await response.text()\n throw new ApiRequestError(`Unexpected error: ${text}`, {\n status: response.status,\n statusText: response.statusText,\n })\n }\n}\n\n/** JSON.stringify with bigint support */\nconst jsonStringify = (value: unknown, indent?: number) =>\n JSON.stringify(\n value,\n (_, value) => {\n if (typeof value === 'bigint') {\n return value.toString()\n }\n\n return value\n },\n indent\n )\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACgBA,IAAM,mBAAmB;AAElB,IAAM,YAAN,MAAgB;AAAA,EAMrB,YAAY,MAAe;AAL3B,wBAAQ;AACR,wBAAQ;AACR,wBAAQ;AACR,wBAAQ;AAGN,SAAK,WACF,KAAK,WAAW,kBAAkB,QAAQ,OAAO,EAAE,IACpD,gBACA,KAAK;AAEP,SAAK,SAAS,KAAK,SAAS;AAC5B,SAAK,UAAU,KAAK,WAAW,CAAC;AAChC,SAAK,SAAS,KAAK;AAAA,EACrB;AAAA,EAEA,MAAc,SAAS,UAAkB,SAAkB;AACzD,UAAM,MAAM,MAAM,KAAK,OAAO,GAAG,KAAK,OAAO,IAAI,QAAQ,IAAI;AAAA,MAC3D,QAAQ;AAAA,MACR,SAAS;AAAA,QACP,GAAG,KAAK;AAAA,QACR,gBAAgB;AAAA,QAChB,eAAe,UAAU,KAAK,MAAM;AAAA,MACtC;AAAA,MACA,MAAM,cAAc,OAAO;AAAA,IAC7B,CAAC;AACD,QAAI,CAAC,IAAI,IAAI;AACX,YAAM,eAAe,GAAG;AAAA,IAC1B;AAEA,WAAO,MAAM,IAAI,KAAK;AAAA,EACxB;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,mBACJ,SACmC;AACnC,WAAO,MAAM,KAAK,SAAS,uBAAuB,OAAO;AAAA,EAC3D;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,qBACJ,SACqC;AACrC,WAAO,MAAM,KAAK,SAAS,yBAAyB,OAAO;AAAA,EAC7D;AACF;AAEO,IAAM,kBAAN,MAAM,yBAAwB,MAAM;AAAA,EAKzC,YACE,SACA,MAMA;AACA,UAAM,iBAAgB,eAAe,SAAS,KAAK,OAAO,CAAC;A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B,CAAC;AAAA,EACH;AACF;AAGA,IAAM,gBAAgB,CAAC,OAAgB,WACrC,KAAK;AAAA,EACH;AAAA,EACA,CAAC,GAAGA,WAAU;AACZ,QAAI,OAAOA,WAAU,UAAU;AAC7B,aAAOA,OAAM,SAAS;AAAA,IACxB;AAEA,WAAOA;AAAA,EACT;AAAA,EACA;AACF;","names":["value"]}
|
package/dist/index.mjs
CHANGED
|
@@ -23,7 +23,7 @@ var ApiClient = class {
|
|
|
23
23
|
"content-type": "application/json",
|
|
24
24
|
authorization: `Bearer ${this.apiKey}`
|
|
25
25
|
},
|
|
26
|
-
body:
|
|
26
|
+
body: jsonStringify(payload)
|
|
27
27
|
});
|
|
28
28
|
if (!res.ok) {
|
|
29
29
|
await handleApiError(res);
|
|
@@ -34,10 +34,6 @@ var ApiClient = class {
|
|
|
34
34
|
* Applies an accounts specification to Zodiac OS.
|
|
35
35
|
*/
|
|
36
36
|
async applyConstellation(payload) {
|
|
37
|
-
this.resolveConstellation({
|
|
38
|
-
specification: payload.specification,
|
|
39
|
-
source: payload.source
|
|
40
|
-
});
|
|
41
37
|
return await this.postJson("constellation/apply", payload);
|
|
42
38
|
}
|
|
43
39
|
/**
|
|
@@ -66,7 +62,7 @@ var ApiRequestError = class _ApiRequestError extends Error {
|
|
|
66
62
|
if (details == null) return message;
|
|
67
63
|
let detailsString;
|
|
68
64
|
try {
|
|
69
|
-
detailsString = typeof details === "string" ? details :
|
|
65
|
+
detailsString = typeof details === "string" ? details : jsonStringify(details, 2);
|
|
70
66
|
} catch (_err) {
|
|
71
67
|
detailsString = String(details);
|
|
72
68
|
}
|
|
@@ -78,33 +74,45 @@ Details: ${detailsString}`;
|
|
|
78
74
|
}
|
|
79
75
|
};
|
|
80
76
|
async function handleApiError(response) {
|
|
81
|
-
|
|
77
|
+
const contentType = response.headers.get("content-type");
|
|
78
|
+
if (contentType?.includes("application/json")) {
|
|
82
79
|
const errorData = await response.json();
|
|
83
|
-
|
|
84
|
-
status: response.status,
|
|
85
|
-
statusText: response.statusText,
|
|
86
|
-
details: errorData.error.details
|
|
87
|
-
});
|
|
88
|
-
} catch (jsonError) {
|
|
80
|
+
let error;
|
|
89
81
|
try {
|
|
90
|
-
|
|
91
|
-
throw new ApiRequestError(`Unexpected error: ${text}`, {
|
|
82
|
+
error = new ApiRequestError(errorData.error.message, {
|
|
92
83
|
status: response.status,
|
|
93
84
|
statusText: response.statusText,
|
|
94
|
-
|
|
85
|
+
details: errorData.error.details
|
|
95
86
|
});
|
|
96
|
-
} catch (
|
|
97
|
-
|
|
98
|
-
`
|
|
87
|
+
} catch (jsonShapeError) {
|
|
88
|
+
error = new ApiRequestError(
|
|
89
|
+
`Failed parsing error response: ${jsonShapeError}`,
|
|
99
90
|
{
|
|
100
91
|
status: response.status,
|
|
101
92
|
statusText: response.statusText,
|
|
102
|
-
|
|
93
|
+
details: errorData
|
|
103
94
|
}
|
|
104
95
|
);
|
|
105
96
|
}
|
|
97
|
+
throw error;
|
|
98
|
+
} else {
|
|
99
|
+
const text = await response.text();
|
|
100
|
+
throw new ApiRequestError(`Unexpected error: ${text}`, {
|
|
101
|
+
status: response.status,
|
|
102
|
+
statusText: response.statusText
|
|
103
|
+
});
|
|
106
104
|
}
|
|
107
105
|
}
|
|
106
|
+
var jsonStringify = (value, indent) => JSON.stringify(
|
|
107
|
+
value,
|
|
108
|
+
(_, value2) => {
|
|
109
|
+
if (typeof value2 === "bigint") {
|
|
110
|
+
return value2.toString();
|
|
111
|
+
}
|
|
112
|
+
return value2;
|
|
113
|
+
},
|
|
114
|
+
indent
|
|
115
|
+
);
|
|
108
116
|
export {
|
|
109
117
|
ApiClient
|
|
110
118
|
};
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api.ts"],"sourcesContent":["import type {\n ApplyConstellationPayload,\n ApplyConstellationResult,\n ResolveConstellationPayload,\n ResolveConstellationResult,\n ApiError as ApiErrorResponse,\n} from '@zodiac-os/api-types'\n\nexport type Options = {\n workspace: string\n apiKey: string\n baseUrl?: string\n fetch?: typeof globalThis.fetch\n headers?: Record<string, string>\n}\n\nconst DEFAULT_BASE_URL = 'https://app.pilot.gnosisguild.org/api/v1'\n\nexport class ApiClient {\n private apiKey: string\n private baseUrl: string\n private _fetch: typeof fetch\n private headers: Record<string, string>\n\n constructor(opts: Options) {\n this.baseUrl =\n (opts.baseUrl ?? DEFAULT_BASE_URL).replace(/\\/$/, '') +\n '/workspace/' +\n opts.workspace\n\n this._fetch = opts.fetch ?? fetch\n this.headers = opts.headers ?? {}\n this.apiKey = opts.apiKey\n }\n\n private async postJson(endpoint: string, payload: unknown) {\n const res = await this._fetch(`${this.baseUrl}/${endpoint}`, {\n method: 'POST',\n headers: {\n ...this.headers,\n 'content-type': 'application/json',\n authorization: `Bearer ${this.apiKey}`,\n },\n body:
|
|
1
|
+
{"version":3,"sources":["../src/api.ts"],"sourcesContent":["import type {\n ApplyConstellationPayload,\n ApplyConstellationResult,\n ResolveConstellationPayload,\n ResolveConstellationResult,\n ApiError as ApiErrorResponse,\n} from '@zodiac-os/api-types'\n\nexport type Options = {\n workspace: string\n apiKey: string\n baseUrl?: string\n fetch?: typeof globalThis.fetch\n headers?: Record<string, string>\n}\n\nconst DEFAULT_BASE_URL = 'https://app.pilot.gnosisguild.org/api/v1'\n\nexport class ApiClient {\n private apiKey: string\n private baseUrl: string\n private _fetch: typeof fetch\n private headers: Record<string, string>\n\n constructor(opts: Options) {\n this.baseUrl =\n (opts.baseUrl ?? DEFAULT_BASE_URL).replace(/\\/$/, '') +\n '/workspace/' +\n opts.workspace\n\n this._fetch = opts.fetch ?? fetch\n this.headers = opts.headers ?? {}\n this.apiKey = opts.apiKey\n }\n\n private async postJson(endpoint: string, payload: unknown) {\n const res = await this._fetch(`${this.baseUrl}/${endpoint}`, {\n method: 'POST',\n headers: {\n ...this.headers,\n 'content-type': 'application/json',\n authorization: `Bearer ${this.apiKey}`,\n },\n body: jsonStringify(payload),\n })\n if (!res.ok) {\n await handleApiError(res)\n }\n\n return await res.json()\n }\n\n /**\n * Applies an accounts specification to Zodiac OS.\n */\n async applyConstellation(\n payload: ApplyConstellationPayload\n ): Promise<ApplyConstellationResult> {\n return await this.postJson('constellation/apply', payload)\n }\n\n /**\n * Resolves an accounts specification to Zodiac OS.\n */\n async resolveConstellation(\n payload: ResolveConstellationPayload\n ): Promise<ResolveConstellationResult> {\n return await this.postJson('constellation/resolve', payload)\n }\n}\n\nexport class ApiRequestError extends Error {\n public readonly status: number\n public readonly statusText: string\n public readonly details?: unknown\n\n constructor(\n message: string,\n opts: {\n status: number\n statusText: string\n details?: unknown\n cause?: unknown\n }\n ) {\n super(ApiRequestError.composeMessage(message, opts.details))\n this.name = 'ApiRequestError'\n this.status = opts.status\n this.statusText = opts.statusText\n this.details = opts.details\n if (opts.cause !== undefined) {\n ;(this as any).cause = opts.cause\n }\n }\n\n private static composeMessage(message: string, details?: unknown) {\n if (details == null) return message\n let detailsString: string\n try {\n detailsString =\n typeof details === 'string' ? details : jsonStringify(details, 2)\n } catch (_err) {\n detailsString = String(details)\n }\n return `${message}\\nDetails: ${detailsString}`\n }\n\n toString() {\n return `${this.name}: ${this.message}`\n }\n}\n\nasync function handleApiError(response: Response): Promise<never> {\n const contentType = response.headers.get('content-type')\n if (contentType?.includes('application/json')) {\n const errorData = (await response.json()) as ApiErrorResponse\n let error: ApiRequestError\n try {\n error = new ApiRequestError(errorData.error.message, {\n status: response.status,\n statusText: response.statusText,\n details: errorData.error.details,\n })\n } catch (jsonShapeError) {\n error = new ApiRequestError(\n `Failed parsing error response: ${jsonShapeError}`,\n {\n status: response.status,\n statusText: response.statusText,\n details: errorData,\n }\n )\n }\n throw error\n } else {\n // Not JSON, read as text directly\n const text = await response.text()\n throw new ApiRequestError(`Unexpected error: ${text}`, {\n status: response.status,\n statusText: response.statusText,\n })\n }\n}\n\n/** JSON.stringify with bigint support */\nconst jsonStringify = (value: unknown, indent?: number) =>\n JSON.stringify(\n value,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,QAAI,OAAOA,WAAU,UAAU;AAC7B,aAAOA,OAAM,SAAS;AAAA,IACxB;AAEA,WAAOA;AAAA,EACT;AAAA,EACA;AACF;","names":["value"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zodiac-os/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"author": "Gnosis Guild",
|
|
5
5
|
"license": "LGPL-3.0-only",
|
|
6
6
|
"homepage": "https://github.com/gnosisguild/zodiac-os-sdk",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@epic-web/invariant": "1.0.0",
|
|
37
|
-
"@zodiac-os/api-types": "^1.
|
|
38
|
-
"zodiac-roles-sdk": "^3.2
|
|
37
|
+
"@zodiac-os/api-types": "^1.3.0",
|
|
38
|
+
"zodiac-roles-sdk": "^3.3.2"
|
|
39
39
|
}
|
|
40
40
|
}
|