@slotchain/sdk 1.2.0 → 1.2.3
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.js +3 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.esm.js +3 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/clients/document-client.ts +1 -0
- package/src/clients/tenant-client.ts +2 -3
- package/src/types/api.ts +4 -0
package/package.json
CHANGED
|
@@ -55,6 +55,7 @@ export class DocumentClient {
|
|
|
55
55
|
form.append('file', blob, options.filename);
|
|
56
56
|
form.append('related_entity_type', options.related_entity_type);
|
|
57
57
|
form.append('related_entity_id', options.related_entity_id);
|
|
58
|
+
if (options.tenant_id) form.append('tenant_id', options.tenant_id);
|
|
58
59
|
if (options.label) form.append('label', options.label);
|
|
59
60
|
if (options.mime_type) form.append('mime_type', options.mime_type);
|
|
60
61
|
if (options.metadata) form.append('metadata', JSON.stringify(options.metadata));
|
|
@@ -6,12 +6,11 @@ export class TenantClient {
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Get tenant configuration by slug
|
|
9
|
-
* GET /api/v1/
|
|
9
|
+
* GET /api/v1/tenants/:slug
|
|
10
10
|
*/
|
|
11
11
|
async getBySlug(slug: string): Promise<ApiResponse<Tenant>> {
|
|
12
|
-
// TODO: Replace with actual endpoint when available
|
|
13
12
|
const response = await this.client.get<ApiResponse<Tenant>>(
|
|
14
|
-
`/api/v1/
|
|
13
|
+
`/api/v1/tenants/${slug}`
|
|
15
14
|
);
|
|
16
15
|
return response.data;
|
|
17
16
|
}
|
package/src/types/api.ts
CHANGED
|
@@ -390,6 +390,8 @@ export interface ArtifactWithUrl extends Artifact {
|
|
|
390
390
|
}
|
|
391
391
|
|
|
392
392
|
export interface ListArtifactsOptions {
|
|
393
|
+
/** Required by the API to scope results to the correct tenant */
|
|
394
|
+
tenant_id?: string;
|
|
393
395
|
related_entity_type?: ArtifactEntityType;
|
|
394
396
|
related_entity_id?: string;
|
|
395
397
|
/** Include signed download URLs in each result (adds latency) */
|
|
@@ -408,6 +410,8 @@ export interface UploadArtifactOptions {
|
|
|
408
410
|
/** The entity this artifact belongs to */
|
|
409
411
|
related_entity_type: ArtifactEntityType;
|
|
410
412
|
related_entity_id: string;
|
|
413
|
+
/** Tenant ID — required by the API to scope the artifact */
|
|
414
|
+
tenant_id?: string;
|
|
411
415
|
/** Optional label for the UI, e.g. "CV", "Invoice" */
|
|
412
416
|
label?: string;
|
|
413
417
|
mime_type?: string;
|