@microsoft/rayfin-lib package
Classes
| ApiClient |
A generic HTTP client to interact with the service API. Uses isomorphic fetch approach that works in both browser and Node.js environments without external dependencies when native fetch is available. |
| AuthError |
Error specifically for issues related to authentication. |
| EntityNameResolver |
Resolves singular and plural forms of entity names. The SDK uses this when deriving collection names for generated data operations, so the plural form an entity resolves to here determines the names you query against. Register overrides with setCustomPlural when the default English pluralization does not match your domain terminology. Example
|
| NetworkError |
Error for network-related issues (e.g., API unreachable, bad response). |
| SdkError |
Base custom error for the SDK. All other custom errors should extend this. |
Interfaces
| ApiClientConfig |
Interface for API Client configuration. Includes an optional function to retrieve the access token dynamically. |
| RequestOptions |
Request options for fetch API. |
Functions
| normalize |
Normalizes a storage container/folder name so it satisfies Azure Blob container naming rules:
Use this to predict the container name the SDK will target for a given logical name. Example
|
Function Details
normalizeContainerName(string)
Normalizes a storage container/folder name so it satisfies Azure Blob container naming rules:
- lowercase letters, numbers, and hyphen (
-) only - must start and end with a letter or number
- no consecutive hyphens
- length between 3 and 63 characters
Use this to predict the container name the SDK will target for a given logical name.
Example
normalizeContainerName('My Photos!'); // 'my-photos'
function normalizeContainerName(input: string): string
Parameters
- input
-
string
The raw container/folder name to normalize.
Returns
string
A name guaranteed to satisfy Azure Blob container naming rules.