FilesClientOptions
Defined in: libs/ccs-files-client/src/files-client.ts:55
Properties
Section titled “Properties”issuerUrl?
Section titled “issuerUrl?”
optionalissuerUrl?:string
Defined in: libs/ccs-files-client/src/files-client.ts:61
Identity Server v3 bare issuer origin, e.g. https://auth.centralcodestation.com (no /api).
Omitted: the platform’s Identity Server for the environment (CCS_ISSUER_URL, else
CCS_ENVIRONMENT, else production), read from env.
clientId
Section titled “clientId”clientId:
string
Defined in: libs/ccs-files-client/src/files-client.ts:66
A CONFIDENTIAL client with the client_credentials grant and a resource permission on the Files
API (files:manage, or files:read / files:config.manage).
clientSecret
Section titled “clientSecret”clientSecret:
string
Defined in: libs/ccs-files-client/src/files-client.ts:68
Keep server-side only, never ship it to a browser.
apiUrl?
Section titled “apiUrl?”
optionalapiUrl?:string
Defined in: libs/ccs-files-client/src/files-client.ts:75
File Service API base URL, e.g. https://files.centralcodestation.com/api/v1. Omitted:
FILES_API_URL, else derived from resource / FILES_API_RESOURCE (…/api → …/api/v1), else
the CCS_ENVIRONMENT preset (local | staging | production, default production), read from
env.
resource?
Section titled “resource?”
optionalresource?:string
Defined in: libs/ccs-files-client/src/files-client.ts:81
RFC 8707 resource identifier of the Files API, e.g. https://files.centralcodestation.com/api
(never the audience). Omitted: FILES_API_RESOURCE, else derived from apiUrl / FILES_API_URL
(…/api/v1 → …/api), else the CCS_ENVIRONMENT preset, read from env.
optionalenv?:Readonly<Record<string,string|undefined>>
Defined in: libs/ccs-files-client/src/files-client.ts:87
Where the defaults of issuerUrl, apiUrl and resource read CCS_ENVIRONMENT,
FILES_API_URL, FILES_API_RESOURCE and CCS_ISSUER_URL. Default process.env; {} ignores the
environment (the production defaults). Unused when all three are given.
tenantId?
Section titled “tenantId?”
optionaltenantId?:string
Defined in: libs/ccs-files-client/src/files-client.ts:92
Default context for a tenant backend (its own tenant and application). Omit both in a platform
consumer (Chat) and pass context per call. A per-call context field wins over the default.
applicationId?
Section titled “applicationId?”
optionalapplicationId?:string
Defined in: libs/ccs-files-client/src/files-client.ts:93
scope?
Section titled “scope?”
optionalscope?:string|FilesMachineScope[]
Defined in: libs/ccs-files-client/src/files-client.ts:95
Default 'files:manage'; 'files:read' for a read-only backend; an array is joined with spaces.
fetch?
Section titled “fetch?”
optionalfetch?: (input,init?) =>Promise<Response>
Defined in: libs/ccs-files-client/src/files-client.ts:97
Override fetch (tests, runtimes without a global fetch). Also used for the store PUTs of upload().
Parameters
Section titled “Parameters”string | URL | Request
RequestInit
Returns
Section titled “Returns”Promise<Response>
maxRetries?
Section titled “maxRetries?”
optionalmaxRetries?:number
Defined in: libs/ccs-files-client/src/files-client.ts:99
Retries after the first attempt, for 5xx and network errors on retryable requests. Default 3; 0 disables.