@degallery/sdk 0.2.1 → 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/README.md CHANGED
@@ -1,11 +1,133 @@
1
- # sdk
1
+ # `@degallery/sdk`
2
2
 
3
- This library was generated with [Nx](https://nx.dev).
3
+ Framework-neutral TypeScript client for the DeGallery API. Use it from a browser, server, worker, or non-React application when you need typed access to galleries, assets, uploads, links, and delivery events.
4
4
 
5
- ## Building
5
+ ## Product and developer links
6
6
 
7
- Run `nx build sdk` to build the library.
7
+ - [DeGallery landing page](https://degallery.dev)
8
+ - [Developer documentation](https://docs.degallery.dev)
9
+ - [Quickstart](https://docs.degallery.dev/docs/quickstart)
10
+ - [JavaScript installation](https://docs.degallery.dev/docs/javascript/installation)
11
+ - [JavaScript client guide](https://docs.degallery.dev/docs/javascript/get-started)
12
+ - [API and error reference](https://docs.degallery.dev/docs/javascript/errors)
13
+ - [Live demo](https://demo.degallery.dev)
14
+ - [Dashboard](https://app.degallery.dev)
15
+ - [Source repository](https://github.com/mmpotulo28/thegallery)
8
16
 
9
- ## Running unit tests
17
+ ## Install
10
18
 
11
- Run `nx test sdk` to execute the unit tests via [Vitest](https://vitest.dev/).
19
+ ```bash
20
+ pnpm add @degallery/sdk
21
+ ```
22
+
23
+ The package is ESM-first and exports its public client and types from the package root:
24
+
25
+ ```ts
26
+ import { GalleryClient, type Gallery } from '@degallery/sdk';
27
+ ```
28
+
29
+ ## Configure a client
30
+
31
+ ```ts
32
+ import { GalleryClient } from '@degallery/sdk';
33
+
34
+ const client = new GalleryClient({
35
+ apiUrl: process.env.DEGALLERY_API_URL ?? 'https://api.degallery.dev',
36
+ apiKey: process.env.DEGALLERY_API_KEY,
37
+ });
38
+ ```
39
+
40
+ `apiUrl` defaults to `https://api.degallery.dev`. The client also accepts `publishableKey`, `readToken`, and a custom `fetch` implementation. Use a custom `fetch` for a worker runtime, request tracing, or test isolation.
41
+
42
+ ### Credential boundary
43
+
44
+ - Keep `apiKey` on a trusted server or worker.
45
+ - Browser reads should use a publishable key, a short-lived `readToken`, or a server-provided public gallery payload.
46
+ - Never expose `DEGALLERY_API_KEY` through `NEXT_PUBLIC_*` variables.
47
+ - Upload credentials and private gallery authorization belong on the server.
48
+
49
+ ## Read a gallery
50
+
51
+ ```ts
52
+ const gallery = await client.getGallery('gallery-id-or-slug');
53
+
54
+ console.log(gallery.name);
55
+ console.log(gallery.layout);
56
+ console.log(gallery.items[0]?.src);
57
+ ```
58
+
59
+ For lower-level list/detail operations, use the `galleries` resource:
60
+
61
+ ```ts
62
+ const result = await client.galleries.list({ limit: 20 });
63
+ const detail = await client.galleries.retrieve('summer-collection', {
64
+ includeAssets: true,
65
+ });
66
+ const shareLinks = await client.galleries.link('summer-collection');
67
+ ```
68
+
69
+ Available gallery operations:
70
+
71
+ - `galleries.list(input?)`
72
+ - `galleries.retrieve(idOrSlug, input?)`
73
+ - `galleries.create(input)`
74
+ - `galleries.update(idOrSlug, input)`
75
+ - `galleries.attachAssets(idOrSlug, assetIds)`
76
+ - `galleries.link(idOrSlug)`
77
+
78
+ ## Upload an image
79
+
80
+ Uploads use a short-lived intent. Create the intent, upload the exact bytes to the returned URL, then complete the asset:
81
+
82
+ ```ts
83
+ const intent = await client.createUpload({
84
+ filename: 'studio.jpg',
85
+ contentType: 'image/jpeg',
86
+ size: imageBytes.byteLength,
87
+ visibility: 'public',
88
+ });
89
+
90
+ await fetch(intent.uploadUrl, {
91
+ method: intent.method ?? 'PUT',
92
+ headers: {
93
+ 'Content-Type': intent.contentType ?? 'image/jpeg',
94
+ },
95
+ body: imageBytes,
96
+ });
97
+
98
+ const asset = await client.completeUpload(intent.intentId);
99
+ ```
100
+
101
+ The upload URL expires. Treat completion as part of the same workflow and retry safely from your server when a network request fails.
102
+
103
+ ## Work with assets
104
+
105
+ ```ts
106
+ const assets = await client.assets.list({
107
+ galleryId: 'gallery-id',
108
+ visibility: 'public',
109
+ limit: 50,
110
+ });
111
+
112
+ const asset = await client.assets.retrieve('asset-id');
113
+ const updated = await client.assets.update('asset-id', {
114
+ alt: 'Updated accessible description',
115
+ });
116
+ ```
117
+
118
+ ## Track delivery events
119
+
120
+ ```ts
121
+ await client.track({
122
+ event: 'gallery_view',
123
+ galleryId: 'gallery-id',
124
+ });
125
+ ```
126
+
127
+ Supported event names are `gallery_view`, `image_view`, `interaction`, and `download`. The client adds `occurredAt` when it is not supplied.
128
+
129
+ ## Public types
130
+
131
+ The package exports `GalleryClient`, `Gallery`, `GalleryDetail`, `GallerySummary`, `GalleryItem`, `GalleryLayout`, `GalleryInput`, `GalleryEvent`, `Asset`, upload inputs, and API response types.
132
+
133
+ Supported layouts are `Grid`, `Masonry`, `Justified`, `Single`, `Carousel`, and `Stack`.
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var g=(n,e)=>{for(var t in e)i(n,t,{get:e[t],enumerable:!0})},y=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of d(e))!c.call(n,s)&&s!==t&&i(n,s,{get:()=>e[s],enumerable:!(a=u(e,s))||a.enumerable});return n};var h=n=>y(i({},"__esModule",{value:!0}),n);var m={};g(m,{GalleryClient:()=>o});module.exports=h(m);var o=class{constructor(e){this.options=e}options;assets={complete:e=>this.post("/api/v1/assets",e),list:(e={})=>this.getList("/api/v1/assets",e),retrieve:e=>this.get(`/api/v1/assets/${encodeURIComponent(e)}`),update:(e,t)=>this.patch(`/api/v1/assets/${encodeURIComponent(e)}`,t),uploadImage:e=>this.createUpload(e)};galleries={attachAssets:(e,t)=>this.post(`/api/v1/galleries/${encodeURIComponent(e)}/assets`,{assetIds:t}),create:e=>this.post("/api/v1/galleries",e),link:e=>this.get(`/api/v1/galleries/${encodeURIComponent(e)}/link`),list:(e={})=>this.getList("/api/v1/galleries",e),retrieve:(e,t={})=>this.get(`/api/v1/galleries/${encodeURIComponent(e)}`,{...t,include:t.includeAssets?"assets":void 0,includeAssets:void 0}),update:(e,t)=>this.patch(`/api/v1/galleries/${encodeURIComponent(e)}`,t)};async createUpload(e){let t=await this.post("/api/v1/uploads",e);return{...t.upload,asset:t.asset,contentType:t.upload.contentType,expiresAt:t.upload.expiresAt,intentId:t.upload.intentId,uploadUrl:t.upload.uploadUrl}}async completeUpload(e){return this.assets.complete({uploadIntentId:e})}async getGallery(e){let t=await this.galleries.retrieve(e,{includeAssets:!0});return{access:t.visibility==="public"?"public":"private",description:t.description,id:t.id,items:t.items?.map(a=>({alt:a.asset.alt,downloadUrl:a.asset.delivery.downloadUrl,id:a.asset.id,src:a.asset.delivery.src}))??[],layout:t.layout,name:t.name,slug:t.slug}}async track(e){let t=await this.rawRequest("/api/v1/events",{body:JSON.stringify({...e,occurredAt:e.occurredAt??new Date().toISOString()}),keepalive:!0,method:"POST"});if(!t.ok)throw new Error(`Event ingestion failed: ${t.status}`)}get(e,t){return this.requestData(e,{method:"GET"},t)}getList(e,t){return this.requestList(e,{method:"GET"},t)}patch(e,t){return this.requestData(e,{body:JSON.stringify(t),method:"PATCH"})}post(e,t){return this.requestData(e,{body:JSON.stringify(t),method:"POST"})}async requestData(e,t={},a){let s=await this.rawRequest(e,t,a);if(!s.ok)throw await this.toError(s);return(await s.json()).data}async requestList(e,t={},a){let s=await this.rawRequest(e,t,a);if(!s.ok)throw await this.toError(s);return await s.json()}rawRequest(e,t={},a){let s=this.options.fetch??fetch,l=new URL(e,this.options.apiUrl);for(let[p,r]of Object.entries(a??{}))r!=null&&l.searchParams.set(p,String(r));return s(l,{...t,headers:{"content-type":"application/json",...this.authToken?{authorization:`Bearer ${this.authToken}`}:{},...t.headers}})}get authToken(){return this.options.apiKey??this.options.readToken??this.options.publishableKey}async toError(e){let t=await e.json().catch(()=>{}),a=t?.error?.message??`The Gallery API request failed: ${e.status}`,s=new Error(a);return s.name=t?.error?.code??"GalleryApiError",s}};0&&(module.exports={GalleryClient});
1
+ "use strict";var p=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var m=(r,t)=>{for(var e in t)p(r,e,{get:t[e],enumerable:!0})},I=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of h(t))!g.call(r,n)&&n!==e&&p(r,n,{get:()=>t[n],enumerable:!(s=y(t,n))||s.enumerable});return r};var C=r=>I(p({},"__esModule",{value:!0}),r);var v={};m(v,{GalleryClient:()=>u});module.exports=C(v);var i=class{constructor(t){this.httpClient=t}httpClient;async complete(t){return this.httpClient.post("/api/v1/assets",t)}async list(t={}){return this.httpClient.getList("/api/v1/assets",t)}async retrieve(t){return this.httpClient.get(`/api/v1/assets/${encodeURIComponent(t)}`)}async update(t,e){return this.httpClient.patch(`/api/v1/assets/${encodeURIComponent(t)}`,e)}};var a=class{constructor(t){this.httpClient=t}httpClient;async attachAssets(t,e){return this.httpClient.post(`/api/v1/galleries/${encodeURIComponent(t)}/assets`,{assetIds:e})}async create(t){return this.httpClient.post("/api/v1/galleries",t)}async link(t){return this.httpClient.get(`/api/v1/galleries/${encodeURIComponent(t)}/link`)}async list(t={}){return this.httpClient.getList("/api/v1/galleries",t)}async retrieve(t,e={}){return this.httpClient.get(`/api/v1/galleries/${encodeURIComponent(t)}`,{...e,include:e.includeAssets?"assets":void 0,includeAssets:void 0})}async update(t,e){this.httpClient.patch(`/api/v1/galleries/${encodeURIComponent(t)}`,e)}};var o=class{constructor(t){this.options=t}options;async get(t,e){return this.requestData(t,{method:"GET"},e)}async getList(t,e){return this.requestList(t,{method:"GET"},e)}async patch(t,e){return this.requestData(t,{body:JSON.stringify(e),method:"PATCH"})}async post(t,e){return this.requestData(t,{body:JSON.stringify(e),method:"POST"})}async requestData(t,e={},s){let n=await this.rawRequest(t,e,s);if(!n.ok)throw await this.toError(n);return(await n.json()).data}async requestList(t,e={},s){let n=await this.rawRequest(t,e,s);if(!n.ok)throw await this.toError(n);return await n.json()}async rawRequest(t,e={},s){let n=this.options.fetch??fetch,c=new URL(t,this.options.apiUrl);for(let[d,l]of Object.entries(s??{}))l!=null&&c.searchParams.set(d,String(l));return n(c,{...e,headers:{"content-type":"application/json",...this.authToken?{authorization:`Bearer ${this.authToken}`}:{},...e.headers}})}get authToken(){return this.options.apiKey??this.options.readToken??this.options.publishableKey}async toError(t){let e=await t.json().catch(()=>{}),s=e?.error?.message??`The Gallery API request failed: ${t.status}`,n=new Error(s);return n.name=e?.error?.code??"GalleryApiError",n}};var u=class r{static DEFAULT_OPTIONS={apiUrl:"https://api.degallery.dev",fetch};galleries;assets;httpClient;constructor(t={}){let e={...r.DEFAULT_OPTIONS,...t},s=new o(e);this.httpClient=s,this.galleries=new a(s),this.assets=new i(s)}async createUpload(t){let e=await this.httpClient.post("/api/v1/uploads",t);return{...e.upload,asset:e.asset,contentType:e.upload.contentType,expiresAt:e.upload.expiresAt,intentId:e.upload.intentId,uploadUrl:e.upload.uploadUrl}}async completeUpload(t){return this.assets.complete({uploadIntentId:t})}async getGallery(t){let e=await this.galleries.retrieve(t,{includeAssets:!0});return{access:e.visibility==="public"?"public":"private",description:e.description,id:e.id,items:e.items?.map(s=>({alt:s.asset.alt,downloadUrl:s.asset.delivery.downloadUrl,id:s.asset.id,src:s.asset.delivery.src}))??[],layout:e.layout,name:e.name,slug:e.slug}}async track(t){let e=await this.httpClient.rawRequest("/api/v1/events",{body:JSON.stringify({...t,occurredAt:t.occurredAt??new Date().toISOString()}),keepalive:!0,method:"POST"});if(!e.ok)throw new Error(`Event ingestion failed: ${e.status}`)}};0&&(module.exports={GalleryClient});
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- var i=class{constructor(e){this.options=e}options;assets={complete:e=>this.post("/api/v1/assets",e),list:(e={})=>this.getList("/api/v1/assets",e),retrieve:e=>this.get(`/api/v1/assets/${encodeURIComponent(e)}`),update:(e,t)=>this.patch(`/api/v1/assets/${encodeURIComponent(e)}`,t),uploadImage:e=>this.createUpload(e)};galleries={attachAssets:(e,t)=>this.post(`/api/v1/galleries/${encodeURIComponent(e)}/assets`,{assetIds:t}),create:e=>this.post("/api/v1/galleries",e),link:e=>this.get(`/api/v1/galleries/${encodeURIComponent(e)}/link`),list:(e={})=>this.getList("/api/v1/galleries",e),retrieve:(e,t={})=>this.get(`/api/v1/galleries/${encodeURIComponent(e)}`,{...t,include:t.includeAssets?"assets":void 0,includeAssets:void 0}),update:(e,t)=>this.patch(`/api/v1/galleries/${encodeURIComponent(e)}`,t)};async createUpload(e){let t=await this.post("/api/v1/uploads",e);return{...t.upload,asset:t.asset,contentType:t.upload.contentType,expiresAt:t.upload.expiresAt,intentId:t.upload.intentId,uploadUrl:t.upload.uploadUrl}}async completeUpload(e){return this.assets.complete({uploadIntentId:e})}async getGallery(e){let t=await this.galleries.retrieve(e,{includeAssets:!0});return{access:t.visibility==="public"?"public":"private",description:t.description,id:t.id,items:t.items?.map(s=>({alt:s.asset.alt,downloadUrl:s.asset.delivery.downloadUrl,id:s.asset.id,src:s.asset.delivery.src}))??[],layout:t.layout,name:t.name,slug:t.slug}}async track(e){let t=await this.rawRequest("/api/v1/events",{body:JSON.stringify({...e,occurredAt:e.occurredAt??new Date().toISOString()}),keepalive:!0,method:"POST"});if(!t.ok)throw new Error(`Event ingestion failed: ${t.status}`)}get(e,t){return this.requestData(e,{method:"GET"},t)}getList(e,t){return this.requestList(e,{method:"GET"},t)}patch(e,t){return this.requestData(e,{body:JSON.stringify(t),method:"PATCH"})}post(e,t){return this.requestData(e,{body:JSON.stringify(t),method:"POST"})}async requestData(e,t={},s){let a=await this.rawRequest(e,t,s);if(!a.ok)throw await this.toError(a);return(await a.json()).data}async requestList(e,t={},s){let a=await this.rawRequest(e,t,s);if(!a.ok)throw await this.toError(a);return await a.json()}rawRequest(e,t={},s){let a=this.options.fetch??fetch,r=new URL(e,this.options.apiUrl);for(let[o,n]of Object.entries(s??{}))n!=null&&r.searchParams.set(o,String(n));return a(r,{...t,headers:{"content-type":"application/json",...this.authToken?{authorization:`Bearer ${this.authToken}`}:{},...t.headers}})}get authToken(){return this.options.apiKey??this.options.readToken??this.options.publishableKey}async toError(e){let t=await e.json().catch(()=>{}),s=t?.error?.message??`The Gallery API request failed: ${e.status}`,a=new Error(s);return a.name=t?.error?.code??"GalleryApiError",a}};export{i as GalleryClient};
1
+ var i=class{constructor(t){this.httpClient=t}httpClient;async complete(t){return this.httpClient.post("/api/v1/assets",t)}async list(t={}){return this.httpClient.getList("/api/v1/assets",t)}async retrieve(t){return this.httpClient.get(`/api/v1/assets/${encodeURIComponent(t)}`)}async update(t,e){return this.httpClient.patch(`/api/v1/assets/${encodeURIComponent(t)}`,e)}};var a=class{constructor(t){this.httpClient=t}httpClient;async attachAssets(t,e){return this.httpClient.post(`/api/v1/galleries/${encodeURIComponent(t)}/assets`,{assetIds:e})}async create(t){return this.httpClient.post("/api/v1/galleries",t)}async link(t){return this.httpClient.get(`/api/v1/galleries/${encodeURIComponent(t)}/link`)}async list(t={}){return this.httpClient.getList("/api/v1/galleries",t)}async retrieve(t,e={}){return this.httpClient.get(`/api/v1/galleries/${encodeURIComponent(t)}`,{...e,include:e.includeAssets?"assets":void 0,includeAssets:void 0})}async update(t,e){this.httpClient.patch(`/api/v1/galleries/${encodeURIComponent(t)}`,e)}};var o=class{constructor(t){this.options=t}options;async get(t,e){return this.requestData(t,{method:"GET"},e)}async getList(t,e){return this.requestList(t,{method:"GET"},e)}async patch(t,e){return this.requestData(t,{body:JSON.stringify(e),method:"PATCH"})}async post(t,e){return this.requestData(t,{body:JSON.stringify(e),method:"POST"})}async requestData(t,e={},s){let n=await this.rawRequest(t,e,s);if(!n.ok)throw await this.toError(n);return(await n.json()).data}async requestList(t,e={},s){let n=await this.rawRequest(t,e,s);if(!n.ok)throw await this.toError(n);return await n.json()}async rawRequest(t,e={},s){let n=this.options.fetch??fetch,p=new URL(t,this.options.apiUrl);for(let[c,l]of Object.entries(s??{}))l!=null&&p.searchParams.set(c,String(l));return n(p,{...e,headers:{"content-type":"application/json",...this.authToken?{authorization:`Bearer ${this.authToken}`}:{},...e.headers}})}get authToken(){return this.options.apiKey??this.options.readToken??this.options.publishableKey}async toError(t){let e=await t.json().catch(()=>{}),s=e?.error?.message??`The Gallery API request failed: ${t.status}`,n=new Error(s);return n.name=e?.error?.code??"GalleryApiError",n}};var u=class r{static DEFAULT_OPTIONS={apiUrl:"https://api.degallery.dev",fetch};galleries;assets;httpClient;constructor(t={}){let e={...r.DEFAULT_OPTIONS,...t},s=new o(e);this.httpClient=s,this.galleries=new a(s),this.assets=new i(s)}async createUpload(t){let e=await this.httpClient.post("/api/v1/uploads",t);return{...e.upload,asset:e.asset,contentType:e.upload.contentType,expiresAt:e.upload.expiresAt,intentId:e.upload.intentId,uploadUrl:e.upload.uploadUrl}}async completeUpload(t){return this.assets.complete({uploadIntentId:t})}async getGallery(t){let e=await this.galleries.retrieve(t,{includeAssets:!0});return{access:e.visibility==="public"?"public":"private",description:e.description,id:e.id,items:e.items?.map(s=>({alt:s.asset.alt,downloadUrl:s.asset.delivery.downloadUrl,id:s.asset.id,src:s.asset.delivery.src}))??[],layout:e.layout,name:e.name,slug:e.slug}}async track(t){let e=await this.httpClient.rawRequest("/api/v1/events",{body:JSON.stringify({...t,occurredAt:t.occurredAt??new Date().toISOString()}),keepalive:!0,method:"POST"});if(!e.ok)throw new Error(`Event ingestion failed: ${e.status}`)}};export{u as GalleryClient};
@@ -0,0 +1,39 @@
1
+ import { HttpClient } from './http.client.js';
2
+ import { CompleteAssetInput, Asset, ListAssetsInput } from './types.js';
3
+ /**
4
+ * Provides operations for creating, listing, retrieving, and updating assets.
5
+ */
6
+ export declare class Assets {
7
+ private readonly httpClient;
8
+ constructor(httpClient: HttpClient);
9
+ /**
10
+ * Completes the creation of an asset.
11
+ *
12
+ * @param input The asset completion details.
13
+ * @returns The newly created asset.
14
+ */
15
+ complete(input: CompleteAssetInput): Promise<Asset>;
16
+ /**
17
+ * Lists assets matching the supplied filters.
18
+ *
19
+ * @param input The optional filters and pagination parameters.
20
+ * @returns A paginated list of matching assets.
21
+ */
22
+ list(input?: ListAssetsInput): Promise<import("./types.js").ApiListResponse<Asset>>;
23
+ /**
24
+ * Retrieves an asset by its identifier.
25
+ *
26
+ * @param assetId The unique identifier of the asset.
27
+ * @returns The requested asset.
28
+ */
29
+ retrieve(assetId: string): Promise<Asset>;
30
+ /**
31
+ * Updates an asset by its identifier.
32
+ *
33
+ * @param assetId The unique identifier of the asset.
34
+ * @param input The asset fields to update.
35
+ * @returns The updated asset.
36
+ */
37
+ update(assetId: string, input: Partial<CompleteAssetInput>): Promise<Asset>;
38
+ }
39
+ //# sourceMappingURL=assets.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assets.client.d.ts","sourceRoot":"","sources":["../../src/lib/assets.client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAExE;;GAEG;AACH,qBAAa,MAAM;IACL,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAEnD;;;;;OAKG;IACG,QAAQ,CAAC,KAAK,EAAE,kBAAkB;IAIxC;;;;;OAKG;IACG,IAAI,CAAC,KAAK,GAAE,eAAoB;IAItC;;;;;OAKG;IACG,QAAQ,CAAC,OAAO,EAAE,MAAM;IAM9B;;;;;;OAMG;IACG,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAMjE"}
@@ -1,36 +1,71 @@
1
- import type { ApiListResponse, Asset, ClientOptions, CompleteAssetInput, Gallery, GalleryDetail, GalleryEvent, GalleryInput, GalleryLinkPayload, GallerySummary, ListAssetsInput, ListInput, UploadImageInput, UploadIntent } from './types.js';
1
+ import { Assets } from './assets.client.js';
2
+ import { Gallery } from './gallery.client.js';
3
+ import type { ClientOptions, GalleryEvent, Gallery as GalleryType, UploadImageInput, UploadIntent } from './types.js';
4
+ /**
5
+ * Client for interacting with the Gallery API.
6
+ *
7
+ * Provides access to gallery and asset operations, upload helpers, and
8
+ * event tracking.
9
+ *
10
+ * @param options Optional configuration overrides for the API URL and fetch
11
+ * implementation.
12
+ * @property galleries - Access to gallery operations.
13
+ * @property assets - Access to asset operations.
14
+ *
15
+ * @method createUpload Creates an upload intent and its associated asset.
16
+ * @method completeUpload Marks an upload intent as complete after the file has
17
+ * been uploaded.
18
+ * @method getGallery Retrieves a gallery and maps it to the client-facing
19
+ * gallery shape.
20
+ * @method track Sends an analytics event to the Gallery API.
21
+ */
2
22
  export declare class GalleryClient {
3
- private readonly options;
4
- readonly assets: {
5
- complete: (input: CompleteAssetInput) => Promise<Asset>;
6
- list: (input?: ListAssetsInput) => Promise<ApiListResponse<Asset>>;
7
- retrieve: (assetId: string) => Promise<Asset>;
8
- update: (assetId: string, input: Partial<CompleteAssetInput>) => Promise<Asset>;
9
- uploadImage: (input: UploadImageInput) => Promise<UploadIntent>;
10
- };
11
- readonly galleries: {
12
- attachAssets: (galleryIdOrSlug: string, assetIds: string[]) => Promise<GalleryDetail>;
13
- create: (input: GalleryInput) => Promise<GallerySummary>;
14
- link: (galleryIdOrSlug: string) => Promise<GalleryLinkPayload>;
15
- list: (input?: ListInput) => Promise<ApiListResponse<GallerySummary>>;
16
- retrieve: (galleryIdOrSlug: string, input?: ListInput & {
17
- includeAssets?: boolean;
18
- }) => Promise<GalleryDetail>;
19
- update: (galleryIdOrSlug: string, input: Partial<GalleryInput>) => Promise<GallerySummary>;
20
- };
21
- constructor(options: ClientOptions);
23
+ private static readonly DEFAULT_OPTIONS;
24
+ readonly galleries: Gallery;
25
+ readonly assets: Assets;
26
+ private readonly httpClient;
27
+ /**
28
+ * Creates a client configured to communicate with the Gallery API.
29
+ *
30
+ * @param options Optional client configuration. Supplied values override the
31
+ * default API URL and fetch implementation.
32
+ */
33
+ constructor(options?: Partial<ClientOptions>);
34
+ /**
35
+ * Creates an upload intent and its associated asset.
36
+ *
37
+ * @param input Image metadata and upload details required by the API.
38
+ * @returns The upload intent, including the asset and signed upload URL.
39
+ */
22
40
  createUpload(input: UploadImageInput): Promise<UploadIntent>;
23
- completeUpload(intentId: string): Promise<Asset>;
24
- getGallery(id: string): Promise<Gallery>;
41
+ /**
42
+ * Marks an upload intent as complete after the file has been uploaded.
43
+ *
44
+ * @param intentId The ID of the upload intent to complete.
45
+ * @returns The completed asset returned by the assets API.
46
+ */
47
+ completeUpload(intentId: string): Promise<import("./types.js").Asset>;
48
+ /**
49
+ * Retrieves a gallery and maps it to the client-facing gallery shape.
50
+ *
51
+ * Assets are included in the request and exposed as gallery items with
52
+ * their display and download URLs.
53
+ *
54
+ * @param id The gallery ID to retrieve.
55
+ * @returns The gallery metadata and its available items.
56
+ */
57
+ getGallery(id: string): Promise<GalleryType>;
58
+ /**
59
+ * Sends an analytics event to the Gallery API.
60
+ *
61
+ * If the event does not provide an occurrence time, the current time is
62
+ * added automatically. The request is sent with `keepalive` enabled so it
63
+ * can complete while a page is unloading.
64
+ *
65
+ * @param event The gallery event to record.
66
+ * @returns A promise that resolves when the event is accepted.
67
+ * @throws Error when the API does not return a successful response.
68
+ */
25
69
  track(event: GalleryEvent): Promise<void>;
26
- private get;
27
- private getList;
28
- private patch;
29
- private post;
30
- private requestData;
31
- private requestList;
32
- private rawRequest;
33
- private get authToken();
34
- private toError;
35
70
  }
36
71
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/lib/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAEf,KAAK,EACL,aAAa,EACb,kBAAkB,EAClB,OAAO,EACP,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,SAAS,EACT,gBAAgB,EAChB,YAAY,E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OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAGrC;IAGF,SAAgB,SAAS,EAAE,OAAO,CAAC;IACnC,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAExC;;;;;OAKG;gBACS,OAAO,GAAE,OAAO,CAAC,aAAa,CAAM;IAahD;;;;;OAKG;IACG,YAAY,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,YAAY,CAAC;IAgBlE;;;;;OAKG;IACG,cAAc,CAAC,QAAQ,EAAE,MAAM;IAIrC;;;;;;;;OAQG;IACG,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAoBlD;;;;;;;;;;OAUG;IACG,KAAK,CAAC,KAAK,EAAE,YAAY;CAYhC"}
@@ -0,0 +1,35 @@
1
+ import { HttpClient } from './http.client.js';
2
+ import { GalleryDetail, GalleryInput, GalleryLinkPayload, GallerySummary, ListInput } from './types.js';
3
+ export declare class Gallery {
4
+ private readonly httpClient;
5
+ constructor(httpClient: HttpClient);
6
+ /**
7
+ * Attaches assets to a gallery.
8
+ * @param galleryIdOrSlug Gallery ID or slug.
9
+ * @param assetIds IDs of the assets to attach.
10
+ */
11
+ attachAssets(galleryIdOrSlug: string, assetIds: string[]): Promise<GalleryDetail>;
12
+ /** Creates a gallery. */
13
+ create(input: GalleryInput): Promise<GallerySummary>;
14
+ /** Retrieves a shareable link for a gallery.
15
+ * @param galleryIdOrSlug Gallery ID or slug.
16
+ */
17
+ link(galleryIdOrSlug: string): Promise<GalleryLinkPayload>;
18
+ /** Lists galleries matching the supplied filters and pagination options. */
19
+ list(input?: ListInput): Promise<import("./types.js").ApiListResponse<GallerySummary>>;
20
+ /**
21
+ * Retrieves a gallery by ID or slug.
22
+ * @param galleryIdOrSlug Gallery ID or slug.
23
+ * @param input Filters and pagination options; set `includeAssets` to include assets.
24
+ */
25
+ retrieve(galleryIdOrSlug: string, input?: ListInput & {
26
+ includeAssets?: boolean;
27
+ }): Promise<GalleryDetail>;
28
+ /**
29
+ * Updates a gallery.
30
+ * @param galleryIdOrSlug Gallery ID or slug.
31
+ * @param input Fields to update.
32
+ */
33
+ update(galleryIdOrSlug: string, input: Partial<GalleryInput>): Promise<void>;
34
+ }
35
+ //# sourceMappingURL=gallery.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gallery.client.d.ts","sourceRoot":"","sources":["../../src/lib/gallery.client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,SAAS,EACV,MAAM,YAAY,CAAC;AAEpB,qBAAa,OAAO;IACN,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,UAAU;IAEnD;;;;OAIG;IACG,YAAY,CAAC,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE;IAO9D,yBAAyB;IACnB,MAAM,CAAC,KAAK,EAAE,YAAY;IAIhC;;OAEG;IACG,IAAI,CAAC,eAAe,EAAE,MAAM;IAMlC,4EAA4E;IACtE,IAAI,CAAC,KAAK,GAAE,SAAc;IAIhC;;;;OAIG;IACG,QAAQ,CACZ,eAAe,EAAE,MAAM,EACvB,KAAK,GAAE,SAAS,GAAG;QAAE,aAAa,CAAC,EAAE,OAAO,CAAA;KAAO;IAYrD;;;;OAIG;IACG,MAAM,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC;CAMnE"}
@@ -0,0 +1,15 @@
1
+ import { ApiListResponse, ClientOptions } from './types.js';
2
+ export declare class HttpClient {
3
+ private readonly options;
4
+ constructor(options: ClientOptions);
5
+ get<T>(path: string, query?: Record<string, unknown>): Promise<T>;
6
+ getList<T>(path: string, query?: Record<string, unknown>): Promise<ApiListResponse<T>>;
7
+ patch<T>(path: string, body: unknown): Promise<T>;
8
+ post<T>(path: string, body: unknown): Promise<T>;
9
+ private requestData;
10
+ private requestList;
11
+ rawRequest(path: string, init?: RequestInit, query?: Record<string, unknown>): Promise<Response>;
12
+ private get authToken();
13
+ private toError;
14
+ }
15
+ //# sourceMappingURL=http.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http.client.d.ts","sourceRoot":"","sources":["../../src/lib/http.client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAe,aAAa,EAAE,MAAM,YAAY,CAAC;AAEzE,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,aAAa;IAE7C,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIpD,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAIxD,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;IAOpC,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;YAO3B,WAAW;YAUX,WAAW;IAUnB,UAAU,CACd,IAAI,EAAE,MAAM,EACZ,IAAI,GAAE,WAAgB,EACtB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAsBjC,OAAO,KAAK,SAAS,GAMpB;YAEa,OAAO;CAWtB"}
@@ -1,5 +1,5 @@
1
1
  export type AccessMode = 'public' | 'private';
2
- export type GalleryLayout = 'Grid' | 'Masonry' | 'Justified' | 'Carousel' | 'Single';
2
+ export type GalleryLayout = 'Grid' | 'Masonry' | 'Justified' | 'Carousel' | 'Single' | 'Stack';
3
3
  export type ApiResponse<T> = {
4
4
  data: T;
5
5
  meta?: Record<string, unknown>;
@@ -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MAAM,SAAS,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@degallery/sdk",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",