feat: Passwordless cross-device authentication

- Arkitektur: docs/auth/passwordless-architecture.md
- Backend: iom/quixzoom-auth-service/ (FastAPI + Redis)
- Webb: quixzoom-market-pages/se/login/ (QR-kod + polling)
- App: iom/quixzoom-app/src/features/auth/ (push + deep links)

Flöde: QR-kod → app-godkännande → webb-inloggad
This commit is contained in:
Bernt
2026-07-07 07:11:50 +00:00
parent 4aa984ad74
commit 6989a98d75
61843 changed files with 5491611 additions and 872231 deletions
+292
View File
@@ -0,0 +1,292 @@
import { APIResource } from "../../core/resource.mjs";
import * as ResponsesAPI from "../responses/responses.mjs";
import * as FilesAPI from "./files/files.mjs";
import { FileCreateParams, FileCreateResponse, FileDeleteParams, FileListParams, FileListResponse, FileListResponsesPage, FileRetrieveParams, FileRetrieveResponse, Files } from "./files/files.mjs";
import { APIPromise } from "../../core/api-promise.mjs";
import { CursorPage, type CursorPageParams, PagePromise } from "../../core/pagination.mjs";
import { RequestOptions } from "../../internal/request-options.mjs";
export declare class Containers extends APIResource {
files: FilesAPI.Files;
/**
* Create Container
*/
create(body: ContainerCreateParams, options?: RequestOptions): APIPromise<ContainerCreateResponse>;
/**
* Retrieve Container
*/
retrieve(containerID: string, options?: RequestOptions): APIPromise<ContainerRetrieveResponse>;
/**
* List Containers
*/
list(query?: ContainerListParams | null | undefined, options?: RequestOptions): PagePromise<ContainerListResponsesPage, ContainerListResponse>;
/**
* Delete Container
*/
delete(containerID: string, options?: RequestOptions): APIPromise<void>;
}
export type ContainerListResponsesPage = CursorPage<ContainerListResponse>;
export interface ContainerCreateResponse {
/**
* Unique identifier for the container.
*/
id: string;
/**
* Unix timestamp (in seconds) when the container was created.
*/
created_at: number;
/**
* Name of the container.
*/
name: string;
/**
* The type of this object.
*/
object: string;
/**
* Status of the container (e.g., active, deleted).
*/
status: string;
/**
* The container will expire after this time period. The anchor is the reference
* point for the expiration. The minutes is the number of minutes after the anchor
* before the container expires.
*/
expires_after?: ContainerCreateResponse.ExpiresAfter;
/**
* Unix timestamp (in seconds) when the container was last active.
*/
last_active_at?: number;
/**
* The memory limit configured for the container.
*/
memory_limit?: '1g' | '4g' | '16g' | '64g';
/**
* Network access policy for the container.
*/
network_policy?: ContainerCreateResponse.NetworkPolicy;
}
export declare namespace ContainerCreateResponse {
/**
* The container will expire after this time period. The anchor is the reference
* point for the expiration. The minutes is the number of minutes after the anchor
* before the container expires.
*/
interface ExpiresAfter {
/**
* The reference point for the expiration.
*/
anchor?: 'last_active_at';
/**
* The number of minutes after the anchor before the container expires.
*/
minutes?: number;
}
/**
* Network access policy for the container.
*/
interface NetworkPolicy {
/**
* The network policy mode.
*/
type: 'allowlist' | 'disabled';
/**
* Allowed outbound domains when `type` is `allowlist`.
*/
allowed_domains?: Array<string>;
}
}
export interface ContainerRetrieveResponse {
/**
* Unique identifier for the container.
*/
id: string;
/**
* Unix timestamp (in seconds) when the container was created.
*/
created_at: number;
/**
* Name of the container.
*/
name: string;
/**
* The type of this object.
*/
object: string;
/**
* Status of the container (e.g., active, deleted).
*/
status: string;
/**
* The container will expire after this time period. The anchor is the reference
* point for the expiration. The minutes is the number of minutes after the anchor
* before the container expires.
*/
expires_after?: ContainerRetrieveResponse.ExpiresAfter;
/**
* Unix timestamp (in seconds) when the container was last active.
*/
last_active_at?: number;
/**
* The memory limit configured for the container.
*/
memory_limit?: '1g' | '4g' | '16g' | '64g';
/**
* Network access policy for the container.
*/
network_policy?: ContainerRetrieveResponse.NetworkPolicy;
}
export declare namespace ContainerRetrieveResponse {
/**
* The container will expire after this time period. The anchor is the reference
* point for the expiration. The minutes is the number of minutes after the anchor
* before the container expires.
*/
interface ExpiresAfter {
/**
* The reference point for the expiration.
*/
anchor?: 'last_active_at';
/**
* The number of minutes after the anchor before the container expires.
*/
minutes?: number;
}
/**
* Network access policy for the container.
*/
interface NetworkPolicy {
/**
* The network policy mode.
*/
type: 'allowlist' | 'disabled';
/**
* Allowed outbound domains when `type` is `allowlist`.
*/
allowed_domains?: Array<string>;
}
}
export interface ContainerListResponse {
/**
* Unique identifier for the container.
*/
id: string;
/**
* Unix timestamp (in seconds) when the container was created.
*/
created_at: number;
/**
* Name of the container.
*/
name: string;
/**
* The type of this object.
*/
object: string;
/**
* Status of the container (e.g., active, deleted).
*/
status: string;
/**
* The container will expire after this time period. The anchor is the reference
* point for the expiration. The minutes is the number of minutes after the anchor
* before the container expires.
*/
expires_after?: ContainerListResponse.ExpiresAfter;
/**
* Unix timestamp (in seconds) when the container was last active.
*/
last_active_at?: number;
/**
* The memory limit configured for the container.
*/
memory_limit?: '1g' | '4g' | '16g' | '64g';
/**
* Network access policy for the container.
*/
network_policy?: ContainerListResponse.NetworkPolicy;
}
export declare namespace ContainerListResponse {
/**
* The container will expire after this time period. The anchor is the reference
* point for the expiration. The minutes is the number of minutes after the anchor
* before the container expires.
*/
interface ExpiresAfter {
/**
* The reference point for the expiration.
*/
anchor?: 'last_active_at';
/**
* The number of minutes after the anchor before the container expires.
*/
minutes?: number;
}
/**
* Network access policy for the container.
*/
interface NetworkPolicy {
/**
* The network policy mode.
*/
type: 'allowlist' | 'disabled';
/**
* Allowed outbound domains when `type` is `allowlist`.
*/
allowed_domains?: Array<string>;
}
}
export interface ContainerCreateParams {
/**
* Name of the container to create.
*/
name: string;
/**
* Container expiration time in seconds relative to the 'anchor' time.
*/
expires_after?: ContainerCreateParams.ExpiresAfter;
/**
* IDs of files to copy to the container.
*/
file_ids?: Array<string>;
/**
* Optional memory limit for the container. Defaults to "1g".
*/
memory_limit?: '1g' | '4g' | '16g' | '64g';
/**
* Network access policy for the container.
*/
network_policy?: ResponsesAPI.ContainerNetworkPolicyDisabled | ResponsesAPI.ContainerNetworkPolicyAllowlist;
/**
* An optional list of skills referenced by id or inline data.
*/
skills?: Array<ResponsesAPI.SkillReference | ResponsesAPI.InlineSkill>;
}
export declare namespace ContainerCreateParams {
/**
* Container expiration time in seconds relative to the 'anchor' time.
*/
interface ExpiresAfter {
/**
* Time anchor for the expiration time. Currently only 'last_active_at' is
* supported.
*/
anchor: 'last_active_at';
minutes: number;
}
}
export interface ContainerListParams extends CursorPageParams {
/**
* Filter results by container name.
*/
name?: string;
/**
* Sort order by the `created_at` timestamp of the objects. `asc` for ascending
* order and `desc` for descending order.
*/
order?: 'asc' | 'desc';
}
export declare namespace Containers {
export { type ContainerCreateResponse as ContainerCreateResponse, type ContainerRetrieveResponse as ContainerRetrieveResponse, type ContainerListResponse as ContainerListResponse, type ContainerListResponsesPage as ContainerListResponsesPage, type ContainerCreateParams as ContainerCreateParams, type ContainerListParams as ContainerListParams, };
export { Files as Files, type FileCreateResponse as FileCreateResponse, type FileRetrieveResponse as FileRetrieveResponse, type FileListResponse as FileListResponse, type FileListResponsesPage as FileListResponsesPage, type FileCreateParams as FileCreateParams, type FileRetrieveParams as FileRetrieveParams, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, };
}
//# sourceMappingURL=containers.d.mts.map
@@ -0,0 +1 @@
{"version":3,"file":"containers.d.mts","sourceRoot":"","sources":["../../src/resources/containers/containers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,YAAY,mCAA+B;AACvD,OAAO,KAAK,QAAQ,0BAAsB;AAC1C,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,EACN,0BAAsB;AACvB,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,kCAA8B;AAEvF,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,UAAW,SAAQ,WAAW;IACzC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IA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H,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACxB;AAID,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
+292
View File
@@ -0,0 +1,292 @@
import { APIResource } from "../../core/resource.js";
import * as ResponsesAPI from "../responses/responses.js";
import * as FilesAPI from "./files/files.js";
import { FileCreateParams, FileCreateResponse, FileDeleteParams, FileListParams, FileListResponse, FileListResponsesPage, FileRetrieveParams, FileRetrieveResponse, Files } from "./files/files.js";
import { APIPromise } from "../../core/api-promise.js";
import { CursorPage, type CursorPageParams, PagePromise } from "../../core/pagination.js";
import { RequestOptions } from "../../internal/request-options.js";
export declare class Containers extends APIResource {
files: FilesAPI.Files;
/**
* Create Container
*/
create(body: ContainerCreateParams, options?: RequestOptions): APIPromise<ContainerCreateResponse>;
/**
* Retrieve Container
*/
retrieve(containerID: string, options?: RequestOptions): APIPromise<ContainerRetrieveResponse>;
/**
* List Containers
*/
list(query?: ContainerListParams | null | undefined, options?: RequestOptions): PagePromise<ContainerListResponsesPage, ContainerListResponse>;
/**
* Delete Container
*/
delete(containerID: string, options?: RequestOptions): APIPromise<void>;
}
export type ContainerListResponsesPage = CursorPage<ContainerListResponse>;
export interface ContainerCreateResponse {
/**
* Unique identifier for the container.
*/
id: string;
/**
* Unix timestamp (in seconds) when the container was created.
*/
created_at: number;
/**
* Name of the container.
*/
name: string;
/**
* The type of this object.
*/
object: string;
/**
* Status of the container (e.g., active, deleted).
*/
status: string;
/**
* The container will expire after this time period. The anchor is the reference
* point for the expiration. The minutes is the number of minutes after the anchor
* before the container expires.
*/
expires_after?: ContainerCreateResponse.ExpiresAfter;
/**
* Unix timestamp (in seconds) when the container was last active.
*/
last_active_at?: number;
/**
* The memory limit configured for the container.
*/
memory_limit?: '1g' | '4g' | '16g' | '64g';
/**
* Network access policy for the container.
*/
network_policy?: ContainerCreateResponse.NetworkPolicy;
}
export declare namespace ContainerCreateResponse {
/**
* The container will expire after this time period. The anchor is the reference
* point for the expiration. The minutes is the number of minutes after the anchor
* before the container expires.
*/
interface ExpiresAfter {
/**
* The reference point for the expiration.
*/
anchor?: 'last_active_at';
/**
* The number of minutes after the anchor before the container expires.
*/
minutes?: number;
}
/**
* Network access policy for the container.
*/
interface NetworkPolicy {
/**
* The network policy mode.
*/
type: 'allowlist' | 'disabled';
/**
* Allowed outbound domains when `type` is `allowlist`.
*/
allowed_domains?: Array<string>;
}
}
export interface ContainerRetrieveResponse {
/**
* Unique identifier for the container.
*/
id: string;
/**
* Unix timestamp (in seconds) when the container was created.
*/
created_at: number;
/**
* Name of the container.
*/
name: string;
/**
* The type of this object.
*/
object: string;
/**
* Status of the container (e.g., active, deleted).
*/
status: string;
/**
* The container will expire after this time period. The anchor is the reference
* point for the expiration. The minutes is the number of minutes after the anchor
* before the container expires.
*/
expires_after?: ContainerRetrieveResponse.ExpiresAfter;
/**
* Unix timestamp (in seconds) when the container was last active.
*/
last_active_at?: number;
/**
* The memory limit configured for the container.
*/
memory_limit?: '1g' | '4g' | '16g' | '64g';
/**
* Network access policy for the container.
*/
network_policy?: ContainerRetrieveResponse.NetworkPolicy;
}
export declare namespace ContainerRetrieveResponse {
/**
* The container will expire after this time period. The anchor is the reference
* point for the expiration. The minutes is the number of minutes after the anchor
* before the container expires.
*/
interface ExpiresAfter {
/**
* The reference point for the expiration.
*/
anchor?: 'last_active_at';
/**
* The number of minutes after the anchor before the container expires.
*/
minutes?: number;
}
/**
* Network access policy for the container.
*/
interface NetworkPolicy {
/**
* The network policy mode.
*/
type: 'allowlist' | 'disabled';
/**
* Allowed outbound domains when `type` is `allowlist`.
*/
allowed_domains?: Array<string>;
}
}
export interface ContainerListResponse {
/**
* Unique identifier for the container.
*/
id: string;
/**
* Unix timestamp (in seconds) when the container was created.
*/
created_at: number;
/**
* Name of the container.
*/
name: string;
/**
* The type of this object.
*/
object: string;
/**
* Status of the container (e.g., active, deleted).
*/
status: string;
/**
* The container will expire after this time period. The anchor is the reference
* point for the expiration. The minutes is the number of minutes after the anchor
* before the container expires.
*/
expires_after?: ContainerListResponse.ExpiresAfter;
/**
* Unix timestamp (in seconds) when the container was last active.
*/
last_active_at?: number;
/**
* The memory limit configured for the container.
*/
memory_limit?: '1g' | '4g' | '16g' | '64g';
/**
* Network access policy for the container.
*/
network_policy?: ContainerListResponse.NetworkPolicy;
}
export declare namespace ContainerListResponse {
/**
* The container will expire after this time period. The anchor is the reference
* point for the expiration. The minutes is the number of minutes after the anchor
* before the container expires.
*/
interface ExpiresAfter {
/**
* The reference point for the expiration.
*/
anchor?: 'last_active_at';
/**
* The number of minutes after the anchor before the container expires.
*/
minutes?: number;
}
/**
* Network access policy for the container.
*/
interface NetworkPolicy {
/**
* The network policy mode.
*/
type: 'allowlist' | 'disabled';
/**
* Allowed outbound domains when `type` is `allowlist`.
*/
allowed_domains?: Array<string>;
}
}
export interface ContainerCreateParams {
/**
* Name of the container to create.
*/
name: string;
/**
* Container expiration time in seconds relative to the 'anchor' time.
*/
expires_after?: ContainerCreateParams.ExpiresAfter;
/**
* IDs of files to copy to the container.
*/
file_ids?: Array<string>;
/**
* Optional memory limit for the container. Defaults to "1g".
*/
memory_limit?: '1g' | '4g' | '16g' | '64g';
/**
* Network access policy for the container.
*/
network_policy?: ResponsesAPI.ContainerNetworkPolicyDisabled | ResponsesAPI.ContainerNetworkPolicyAllowlist;
/**
* An optional list of skills referenced by id or inline data.
*/
skills?: Array<ResponsesAPI.SkillReference | ResponsesAPI.InlineSkill>;
}
export declare namespace ContainerCreateParams {
/**
* Container expiration time in seconds relative to the 'anchor' time.
*/
interface ExpiresAfter {
/**
* Time anchor for the expiration time. Currently only 'last_active_at' is
* supported.
*/
anchor: 'last_active_at';
minutes: number;
}
}
export interface ContainerListParams extends CursorPageParams {
/**
* Filter results by container name.
*/
name?: string;
/**
* Sort order by the `created_at` timestamp of the objects. `asc` for ascending
* order and `desc` for descending order.
*/
order?: 'asc' | 'desc';
}
export declare namespace Containers {
export { type ContainerCreateResponse as ContainerCreateResponse, type ContainerRetrieveResponse as ContainerRetrieveResponse, type ContainerListResponse as ContainerListResponse, type ContainerListResponsesPage as ContainerListResponsesPage, type ContainerCreateParams as ContainerCreateParams, type ContainerListParams as ContainerListParams, };
export { Files as Files, type FileCreateResponse as FileCreateResponse, type FileRetrieveResponse as FileRetrieveResponse, type FileListResponse as FileListResponse, type FileListResponsesPage as FileListResponsesPage, type FileCreateParams as FileCreateParams, type FileRetrieveParams as FileRetrieveParams, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, };
}
//# sourceMappingURL=containers.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"containers.d.ts","sourceRoot":"","sources":["../../src/resources/containers/containers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,YAAY,kCAA+B;AACvD,OAAO,KAAK,QAAQ,yBAAsB;AAC1C,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,K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E5G;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,cAAc,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;CACxE;AAED,yBAAiB,qBAAqB,CAAC;IACrC;;OAEG;IACH,UAAiB,YAAY;QAC3B;;;WAGG;QACH,MAAM,EAAE,gBAAgB,CAAC;QAEzB,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACxB;AAID,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
+55
View File
@@ -0,0 +1,55 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Containers = void 0;
const tslib_1 = require("../../internal/tslib.js");
const resource_1 = require("../../core/resource.js");
const FilesAPI = tslib_1.__importStar(require("./files/files.js"));
const files_1 = require("./files/files.js");
const pagination_1 = require("../../core/pagination.js");
const headers_1 = require("../../internal/headers.js");
const path_1 = require("../../internal/utils/path.js");
class Containers extends resource_1.APIResource {
constructor() {
super(...arguments);
this.files = new FilesAPI.Files(this._client);
}
/**
* Create Container
*/
create(body, options) {
return this._client.post('/containers', { body, ...options, __security: { bearerAuth: true } });
}
/**
* Retrieve Container
*/
retrieve(containerID, options) {
return this._client.get((0, path_1.path) `/containers/${containerID}`, {
...options,
__security: { bearerAuth: true },
});
}
/**
* List Containers
*/
list(query = {}, options) {
return this._client.getAPIList('/containers', (pagination_1.CursorPage), {
query,
...options,
__security: { bearerAuth: true },
});
}
/**
* Delete Container
*/
delete(containerID, options) {
return this._client.delete((0, path_1.path) `/containers/${containerID}`, {
...options,
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
__security: { bearerAuth: true },
});
}
}
exports.Containers = Containers;
Containers.Files = files_1.Files;
//# sourceMappingURL=containers.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"containers.js","sourceRoot":"","sources":["../../src/resources/containers/containers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,mEAA0C;AAC1C,4CAUuB;AAEvB,yDAAuF;AACvF,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,UAAW,SAAQ,sBAAW;IAA3C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2C3D,CAAC;IAzCC;;OAEG;IACH,MAAM,CAAC,IAA2B,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IAClG,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,WAAmB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,WAAW,EAAE,EAAE;YACxD,GAAG,OAAO;YACV,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,uBAAiC,CAAA,EAAE;YAC/E,KAAK;YACL,GAAG,OAAO;YACV,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,WAAmB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,eAAe,WAAW,EAAE,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC5D,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;CACF;AA5CD,gCA4CC;AAyTD,UAAU,CAAC,KAAK,GAAG,aAAK,CAAC"}
+50
View File
@@ -0,0 +1,50 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../core/resource.mjs";
import * as FilesAPI from "./files/files.mjs";
import { Files, } from "./files/files.mjs";
import { CursorPage } from "../../core/pagination.mjs";
import { buildHeaders } from "../../internal/headers.mjs";
import { path } from "../../internal/utils/path.mjs";
export class Containers extends APIResource {
constructor() {
super(...arguments);
this.files = new FilesAPI.Files(this._client);
}
/**
* Create Container
*/
create(body, options) {
return this._client.post('/containers', { body, ...options, __security: { bearerAuth: true } });
}
/**
* Retrieve Container
*/
retrieve(containerID, options) {
return this._client.get(path `/containers/${containerID}`, {
...options,
__security: { bearerAuth: true },
});
}
/**
* List Containers
*/
list(query = {}, options) {
return this._client.getAPIList('/containers', (CursorPage), {
query,
...options,
__security: { bearerAuth: true },
});
}
/**
* Delete Container
*/
delete(containerID, options) {
return this._client.delete(path `/containers/${containerID}`, {
...options,
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
__security: { bearerAuth: true },
});
}
}
Containers.Files = Files;
//# sourceMappingURL=containers.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"containers.mjs","sourceRoot":"","sources":["../../src/resources/containers/containers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,QAAQ,0BAAsB;AAC1C,OAAO,EASL,KAAK,GACN,0BAAsB;AAEvB,OAAO,EAAE,UAAU,EAAsC,kCAA8B;AACvF,OAAO,EAAE,YAAY,EAAE,mCAA+B;AAEtD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,UAAW,SAAQ,WAAW;IAA3C;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA2C3D,CAAC;IAzCC;;OAEG;IACH,MAAM,CAAC,IAA2B,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IAClG,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,WAAmB,EAAE,OAAwB;QACpD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,WAAW,EAAE,EAAE;YACxD,GAAG,OAAO;YACV,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,UAAiC,CAAA,EAAE;YAC/E,KAAK;YACL,GAAG,OAAO;YACV,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,WAAmB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,eAAe,WAAW,EAAE,EAAE;YAC3D,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC5D,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;CACF;AAyTD,UAAU,CAAC,KAAK,GAAG,KAAK,CAAC"}
+2
View File
@@ -0,0 +1,2 @@
export * from "./files/index.mjs";
//# sourceMappingURL=files.d.mts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../../src/resources/containers/files.ts"],"names":[],"mappings":"AAEA,kCAA8B"}
+2
View File
@@ -0,0 +1,2 @@
export * from "./files/index.js";
//# sourceMappingURL=files.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/resources/containers/files.ts"],"names":[],"mappings":"AAEA,iCAA8B"}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("../../internal/tslib.js");
tslib_1.__exportStar(require("./files/index.js"), exports);
//# sourceMappingURL=files.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/containers/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAA8B"}
+3
View File
@@ -0,0 +1,3 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export * from "./files/index.mjs";
//# sourceMappingURL=files.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../../src/resources/containers/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,kCAA8B"}
+16
View File
@@ -0,0 +1,16 @@
import { APIResource } from "../../../core/resource.mjs";
import { APIPromise } from "../../../core/api-promise.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class Content extends APIResource {
/**
* Retrieve Container File Content
*/
retrieve(fileID: string, params: ContentRetrieveParams, options?: RequestOptions): APIPromise<Response>;
}
export interface ContentRetrieveParams {
container_id: string;
}
export declare namespace Content {
export { type ContentRetrieveParams as ContentRetrieveParams };
}
//# sourceMappingURL=content.d.mts.map
@@ -0,0 +1 @@
{"version":3,"file":"content.d.mts","sourceRoot":"","sources":["../../../src/resources/containers/files/content.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,sCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,8CAA0C;AAGnE,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;CASxG;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAChE"}
+16
View File
@@ -0,0 +1,16 @@
import { APIResource } from "../../../core/resource.js";
import { APIPromise } from "../../../core/api-promise.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class Content extends APIResource {
/**
* Retrieve Container File Content
*/
retrieve(fileID: string, params: ContentRetrieveParams, options?: RequestOptions): APIPromise<Response>;
}
export interface ContentRetrieveParams {
container_id: string;
}
export declare namespace Content {
export { type ContentRetrieveParams as ContentRetrieveParams };
}
//# sourceMappingURL=content.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/resources/containers/files/content.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,EAAE,UAAU,EAAE,qCAAkC;AAEvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAGnE,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;CASxG;AAED,MAAM,WAAW,qBAAqB;IACpC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CAChE"}
+23
View File
@@ -0,0 +1,23 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Content = void 0;
const resource_1 = require("../../../core/resource.js");
const headers_1 = require("../../../internal/headers.js");
const path_1 = require("../../../internal/utils/path.js");
class Content extends resource_1.APIResource {
/**
* Retrieve Container File Content
*/
retrieve(fileID, params, options) {
const { container_id } = params;
return this._client.get((0, path_1.path) `/containers/${container_id}/files/${fileID}/content`, {
...options,
headers: (0, headers_1.buildHeaders)([{ Accept: 'application/binary' }, options?.headers]),
__security: { bearerAuth: true },
__binaryResponse: true,
});
}
}
exports.Content = Content;
//# sourceMappingURL=content.js.map
@@ -0,0 +1 @@
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/resources/containers/files/content.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAoD;AAEpD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;OAEG;IACH,QAAQ,CAAC,MAAc,EAAE,MAA6B,EAAE,OAAwB;QAC9E,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,YAAY,UAAU,MAAM,UAAU,EAAE;YACjF,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,oBAAoB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC3E,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;YAChC,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF;AAbD,0BAaC"}
+19
View File
@@ -0,0 +1,19 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import { buildHeaders } from "../../../internal/headers.mjs";
import { path } from "../../../internal/utils/path.mjs";
export class Content extends APIResource {
/**
* Retrieve Container File Content
*/
retrieve(fileID, params, options) {
const { container_id } = params;
return this._client.get(path `/containers/${container_id}/files/${fileID}/content`, {
...options,
headers: buildHeaders([{ Accept: 'application/binary' }, options?.headers]),
__security: { bearerAuth: true },
__binaryResponse: true,
});
}
}
//# sourceMappingURL=content.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"content.mjs","sourceRoot":"","sources":["../../../src/resources/containers/files/content.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAErD,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,QAAQ,CAAC,MAAc,EAAE,MAA6B,EAAE,OAAwB;QAC9E,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,YAAY,UAAU,MAAM,UAAU,EAAE;YACjF,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,oBAAoB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC3E,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;YAChC,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF"}
+148
View File
@@ -0,0 +1,148 @@
import { APIResource } from "../../../core/resource.mjs";
import * as ContentAPI from "./content.mjs";
import { Content, ContentRetrieveParams } from "./content.mjs";
import { APIPromise } from "../../../core/api-promise.mjs";
import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.mjs";
import { type Uploadable } from "../../../core/uploads.mjs";
import { RequestOptions } from "../../../internal/request-options.mjs";
export declare class Files extends APIResource {
content: ContentAPI.Content;
/**
* Create a Container File
*
* You can send either a multipart/form-data request with the raw file content, or
* a JSON request with a file ID.
*/
create(containerID: string, body: FileCreateParams, options?: RequestOptions): APIPromise<FileCreateResponse>;
/**
* Retrieve Container File
*/
retrieve(fileID: string, params: FileRetrieveParams, options?: RequestOptions): APIPromise<FileRetrieveResponse>;
/**
* List Container files
*/
list(containerID: string, query?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<FileListResponsesPage, FileListResponse>;
/**
* Delete Container File
*/
delete(fileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<void>;
}
export type FileListResponsesPage = CursorPage<FileListResponse>;
export interface FileCreateResponse {
/**
* Unique identifier for the file.
*/
id: string;
/**
* Size of the file in bytes.
*/
bytes: number;
/**
* The container this file belongs to.
*/
container_id: string;
/**
* Unix timestamp (in seconds) when the file was created.
*/
created_at: number;
/**
* The type of this object (`container.file`).
*/
object: 'container.file';
/**
* Path of the file in the container.
*/
path: string;
/**
* Source of the file (e.g., `user`, `assistant`).
*/
source: string;
}
export interface FileRetrieveResponse {
/**
* Unique identifier for the file.
*/
id: string;
/**
* Size of the file in bytes.
*/
bytes: number;
/**
* The container this file belongs to.
*/
container_id: string;
/**
* Unix timestamp (in seconds) when the file was created.
*/
created_at: number;
/**
* The type of this object (`container.file`).
*/
object: 'container.file';
/**
* Path of the file in the container.
*/
path: string;
/**
* Source of the file (e.g., `user`, `assistant`).
*/
source: string;
}
export interface FileListResponse {
/**
* Unique identifier for the file.
*/
id: string;
/**
* Size of the file in bytes.
*/
bytes: number;
/**
* The container this file belongs to.
*/
container_id: string;
/**
* Unix timestamp (in seconds) when the file was created.
*/
created_at: number;
/**
* The type of this object (`container.file`).
*/
object: 'container.file';
/**
* Path of the file in the container.
*/
path: string;
/**
* Source of the file (e.g., `user`, `assistant`).
*/
source: string;
}
export interface FileCreateParams {
/**
* The File object (not file name) to be uploaded.
*/
file?: Uploadable;
/**
* Name of the file to create.
*/
file_id?: string;
}
export interface FileRetrieveParams {
container_id: string;
}
export interface FileListParams extends CursorPageParams {
/**
* Sort order by the `created_at` timestamp of the objects. `asc` for ascending
* order and `desc` for descending order.
*/
order?: 'asc' | 'desc';
}
export interface FileDeleteParams {
container_id: string;
}
export declare namespace Files {
export { type FileCreateResponse as FileCreateResponse, type FileRetrieveResponse as FileRetrieveResponse, type FileListResponse as FileListResponse, type FileListResponsesPage as FileListResponsesPage, type FileCreateParams as FileCreateParams, type FileRetrieveParams as FileRetrieveParams, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, };
export { Content as Content, type ContentRetrieveParams as ContentRetrieveParams };
}
//# sourceMappingURL=files.d.mts.map
@@ -0,0 +1 @@
{"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../../../src/resources/containers/files/files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;A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7C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CACpF"}
+148
View File
@@ -0,0 +1,148 @@
import { APIResource } from "../../../core/resource.js";
import * as ContentAPI from "./content.js";
import { Content, ContentRetrieveParams } from "./content.js";
import { APIPromise } from "../../../core/api-promise.js";
import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.js";
import { type Uploadable } from "../../../core/uploads.js";
import { RequestOptions } from "../../../internal/request-options.js";
export declare class Files extends APIResource {
content: ContentAPI.Content;
/**
* Create a Container File
*
* You can send either a multipart/form-data request with the raw file content, or
* a JSON request with a file ID.
*/
create(containerID: string, body: FileCreateParams, options?: RequestOptions): APIPromise<FileCreateResponse>;
/**
* Retrieve Container File
*/
retrieve(fileID: string, params: FileRetrieveParams, options?: RequestOptions): APIPromise<FileRetrieveResponse>;
/**
* List Container files
*/
list(containerID: string, query?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<FileListResponsesPage, FileListResponse>;
/**
* Delete Container File
*/
delete(fileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<void>;
}
export type FileListResponsesPage = CursorPage<FileListResponse>;
export interface FileCreateResponse {
/**
* Unique identifier for the file.
*/
id: string;
/**
* Size of the file in bytes.
*/
bytes: number;
/**
* The container this file belongs to.
*/
container_id: string;
/**
* Unix timestamp (in seconds) when the file was created.
*/
created_at: number;
/**
* The type of this object (`container.file`).
*/
object: 'container.file';
/**
* Path of the file in the container.
*/
path: string;
/**
* Source of the file (e.g., `user`, `assistant`).
*/
source: string;
}
export interface FileRetrieveResponse {
/**
* Unique identifier for the file.
*/
id: string;
/**
* Size of the file in bytes.
*/
bytes: number;
/**
* The container this file belongs to.
*/
container_id: string;
/**
* Unix timestamp (in seconds) when the file was created.
*/
created_at: number;
/**
* The type of this object (`container.file`).
*/
object: 'container.file';
/**
* Path of the file in the container.
*/
path: string;
/**
* Source of the file (e.g., `user`, `assistant`).
*/
source: string;
}
export interface FileListResponse {
/**
* Unique identifier for the file.
*/
id: string;
/**
* Size of the file in bytes.
*/
bytes: number;
/**
* The container this file belongs to.
*/
container_id: string;
/**
* Unix timestamp (in seconds) when the file was created.
*/
created_at: number;
/**
* The type of this object (`container.file`).
*/
object: 'container.file';
/**
* Path of the file in the container.
*/
path: string;
/**
* Source of the file (e.g., `user`, `assistant`).
*/
source: string;
}
export interface FileCreateParams {
/**
* The File object (not file name) to be uploaded.
*/
file?: Uploadable;
/**
* Name of the file to create.
*/
file_id?: string;
}
export interface FileRetrieveParams {
container_id: string;
}
export interface FileListParams extends CursorPageParams {
/**
* Sort order by the `created_at` timestamp of the objects. `asc` for ascending
* order and `desc` for descending order.
*/
order?: 'asc' | 'desc';
}
export interface FileDeleteParams {
container_id: string;
}
export declare namespace Files {
export { type FileCreateResponse as FileCreateResponse, type FileRetrieveResponse as FileRetrieveResponse, type FileListResponse as FileListResponse, type FileListResponsesPage as FileListResponsesPage, type FileCreateParams as FileCreateParams, type FileRetrieveParams as FileRetrieveParams, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, };
export { Content as Content, type ContentRetrieveParams as ContentRetrieveParams };
}
//# sourceMappingURL=files.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../src/resources/containers/files/files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,UAAU,qBAAkB;AACxC,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAE,qBAAkB;AAC3D,OAAO,EAAE,UAA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,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CACpF"}
+61
View File
@@ -0,0 +1,61 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Files = void 0;
const tslib_1 = require("../../../internal/tslib.js");
const resource_1 = require("../../../core/resource.js");
const ContentAPI = tslib_1.__importStar(require("./content.js"));
const content_1 = require("./content.js");
const pagination_1 = require("../../../core/pagination.js");
const headers_1 = require("../../../internal/headers.js");
const uploads_1 = require("../../../internal/uploads.js");
const path_1 = require("../../../internal/utils/path.js");
class Files extends resource_1.APIResource {
constructor() {
super(...arguments);
this.content = new ContentAPI.Content(this._client);
}
/**
* Create a Container File
*
* You can send either a multipart/form-data request with the raw file content, or
* a JSON request with a file ID.
*/
create(containerID, body, options) {
return this._client.post((0, path_1.path) `/containers/${containerID}/files`, (0, uploads_1.maybeMultipartFormRequestOptions)({ body, ...options, __security: { bearerAuth: true } }, this._client));
}
/**
* Retrieve Container File
*/
retrieve(fileID, params, options) {
const { container_id } = params;
return this._client.get((0, path_1.path) `/containers/${container_id}/files/${fileID}`, {
...options,
__security: { bearerAuth: true },
});
}
/**
* List Container files
*/
list(containerID, query = {}, options) {
return this._client.getAPIList((0, path_1.path) `/containers/${containerID}/files`, (pagination_1.CursorPage), {
query,
...options,
__security: { bearerAuth: true },
});
}
/**
* Delete Container File
*/
delete(fileID, params, options) {
const { container_id } = params;
return this._client.delete((0, path_1.path) `/containers/${container_id}/files/${fileID}`, {
...options,
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
__security: { bearerAuth: true },
});
}
}
exports.Files = Files;
Files.Content = content_1.Content;
//# sourceMappingURL=files.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../../src/resources/containers/files/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,iEAAwC;AACxC,0CAA2D;AAE3D,4DAA0F;AAE1F,0DAAyD;AAEzD,0DAA6E;AAC7E,0DAAoD;AAEpD,MAAa,KAAM,SAAQ,sBAAW;IAAtC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA4DrE,CAAC;IA1DC;;;;;OAKG;IACH,MAAM,CACJ,WAAmB,EACnB,IAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAA,WAAI,EAAA,eAAe,WAAW,QAAQ,EACtC,IAAA,0CAAgC,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CACvG,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,MAAc,EACd,MAA0B,EAC1B,OAAwB;QAExB,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,YAAY,UAAU,MAAM,EAAE,EAAE;YACzE,GAAG,OAAO;YACV,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI,CACF,WAAmB,EACnB,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,eAAe,WAAW,QAAQ,EAAE,CAAA,uBAA4B,CAAA,EAAE;YACnG,KAAK;YACL,GAAG,OAAO;YACV,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,MAAwB,EAAE,OAAwB;QACvE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,eAAe,YAAY,UAAU,MAAM,EAAE,EAAE;YAC5E,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC5D,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;CACF;AA7DD,sBA6DC;AA+ID,KAAK,CAAC,OAAO,GAAG,iBAAO,CAAC"}
+56
View File
@@ -0,0 +1,56 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from "../../../core/resource.mjs";
import * as ContentAPI from "./content.mjs";
import { Content } from "./content.mjs";
import { CursorPage } from "../../../core/pagination.mjs";
import { buildHeaders } from "../../../internal/headers.mjs";
import { maybeMultipartFormRequestOptions } from "../../../internal/uploads.mjs";
import { path } from "../../../internal/utils/path.mjs";
export class Files extends APIResource {
constructor() {
super(...arguments);
this.content = new ContentAPI.Content(this._client);
}
/**
* Create a Container File
*
* You can send either a multipart/form-data request with the raw file content, or
* a JSON request with a file ID.
*/
create(containerID, body, options) {
return this._client.post(path `/containers/${containerID}/files`, maybeMultipartFormRequestOptions({ body, ...options, __security: { bearerAuth: true } }, this._client));
}
/**
* Retrieve Container File
*/
retrieve(fileID, params, options) {
const { container_id } = params;
return this._client.get(path `/containers/${container_id}/files/${fileID}`, {
...options,
__security: { bearerAuth: true },
});
}
/**
* List Container files
*/
list(containerID, query = {}, options) {
return this._client.getAPIList(path `/containers/${containerID}/files`, (CursorPage), {
query,
...options,
__security: { bearerAuth: true },
});
}
/**
* Delete Container File
*/
delete(fileID, params, options) {
const { container_id } = params;
return this._client.delete(path `/containers/${container_id}/files/${fileID}`, {
...options,
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
__security: { bearerAuth: true },
});
}
}
Files.Content = Content;
//# sourceMappingURL=files.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../../../src/resources/containers/files/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,UAAU,sBAAkB;AACxC,OAAO,EAAE,OAAO,EAAyB,sBAAkB;AAE3D,OAAO,EAAE,UAAU,EAAsC,qCAAiC;AAE1F,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,gCAAgC,EAAE,sCAAkC;AAC7E,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA4DrE,CAAC;IA1DC;;;;;OAKG;IACH,MAAM,CACJ,WAAmB,EACnB,IAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAI,CAAA,eAAe,WAAW,QAAQ,EACtC,gCAAgC,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CACvG,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,MAAc,EACd,MAA0B,EAC1B,OAAwB;QAExB,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,YAAY,UAAU,MAAM,EAAE,EAAE;YACzE,GAAG,OAAO;YACV,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI,CACF,WAAmB,EACnB,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,eAAe,WAAW,QAAQ,EAAE,CAAA,UAA4B,CAAA,EAAE;YACnG,KAAK;YACL,GAAG,OAAO;YACV,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,MAAwB,EAAE,OAAwB;QACvE,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,eAAe,YAAY,UAAU,MAAM,EAAE,EAAE;YAC5E,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC5D,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;SACjC,CAAC,CAAC;IACL,CAAC;CACF;AA+ID,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC"}
+3
View File
@@ -0,0 +1,3 @@
export { Content, type ContentRetrieveParams } from "./content.mjs";
export { Files, type FileCreateResponse, type FileRetrieveResponse, type FileListResponse, type FileCreateParams, type FileRetrieveParams, type FileListParams, type FileDeleteParams, type FileListResponsesPage, } from "./files.mjs";
//# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/resources/containers/files/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,qBAAqB,EAAE,sBAAkB;AAChE,OAAO,EACL,KAAK,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,GAC3B,oBAAgB"}
+3
View File
@@ -0,0 +1,3 @@
export { Content, type ContentRetrieveParams } from "./content.js";
export { Files, type FileCreateResponse, type FileRetrieveResponse, type FileListResponse, type FileCreateParams, type FileRetrieveParams, type FileListParams, type FileDeleteParams, type FileListResponsesPage, } from "./files.js";
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/containers/files/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,qBAAqB,EAAE,qBAAkB;AAChE,OAAO,EACL,KAAK,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,GAC3B,mBAAgB"}
+9
View File
@@ -0,0 +1,9 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Files = exports.Content = void 0;
var content_1 = require("./content.js");
Object.defineProperty(exports, "Content", { enumerable: true, get: function () { return content_1.Content; } });
var files_1 = require("./files.js");
Object.defineProperty(exports, "Files", { enumerable: true, get: function () { return files_1.Files; } });
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/containers/files/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAAgE;AAAvD,kGAAA,OAAO,OAAA;AAChB,oCAUiB;AATf,8FAAA,KAAK,OAAA"}
+4
View File
@@ -0,0 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export { Content } from "./content.mjs";
export { Files, } from "./files.mjs";
//# sourceMappingURL=index.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/containers/files/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,OAAO,EAA8B,sBAAkB;AAChE,OAAO,EACL,KAAK,GASN,oBAAgB"}
+3
View File
@@ -0,0 +1,3 @@
export { Containers, type ContainerCreateResponse, type ContainerRetrieveResponse, type ContainerListResponse, type ContainerCreateParams, type ContainerListParams, type ContainerListResponsesPage, } from "./containers.mjs";
export { Files, type FileCreateResponse, type FileRetrieveResponse, type FileListResponse, type FileCreateParams, type FileRetrieveParams, type FileListParams, type FileDeleteParams, type FileListResponsesPage, } from "./files/index.mjs";
//# sourceMappingURL=index.d.mts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/containers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,GAChC,yBAAqB;AACtB,OAAO,EACL,KAAK,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,GAC3B,0BAAsB"}
+3
View File
@@ -0,0 +1,3 @@
export { Containers, type ContainerCreateResponse, type ContainerRetrieveResponse, type ContainerListResponse, type ContainerCreateParams, type ContainerListParams, type ContainerListResponsesPage, } from "./containers.js";
export { Files, type FileCreateResponse, type FileRetrieveResponse, type FileListResponse, type FileCreateParams, type FileRetrieveParams, type FileListParams, type FileDeleteParams, type FileListResponsesPage, } from "./files/index.js";
//# sourceMappingURL=index.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/containers/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,UAAU,EACV,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,GAChC,wBAAqB;AACtB,OAAO,EACL,KAAK,EACL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,GAC3B,yBAAsB"}
+9
View File
@@ -0,0 +1,9 @@
"use strict";
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.Files = exports.Containers = void 0;
var containers_1 = require("./containers.js");
Object.defineProperty(exports, "Containers", { enumerable: true, get: function () { return containers_1.Containers; } });
var index_1 = require("./files/index.js");
Object.defineProperty(exports, "Files", { enumerable: true, get: function () { return index_1.Files; } });
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/containers/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8CAQsB;AAPpB,wGAAA,UAAU,OAAA;AAQZ,0CAUuB;AATrB,8FAAA,KAAK,OAAA"}
+4
View File
@@ -0,0 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
export { Containers, } from "./containers.mjs";
export { Files, } from "./files/index.mjs";
//# sourceMappingURL=index.mjs.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/containers/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,UAAU,GAOX,yBAAqB;AACtB,OAAO,EACL,KAAK,GASN,0BAAsB"}