@epam/ai-dial-typescript-sdk 0.1.0-dev.22 → 0.1.0-dev.24

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
@@ -35,13 +35,13 @@ const embeddings = await sdk.sendEmbeddingsRequest('text-embedding-ada-002', {
35
35
 
36
36
  `createSDK(options: SDKOptions)` accepts the following options:
37
37
 
38
- | Option | Type | Description |
39
- |---|---|---|
40
- | `baseUrl` | `string` | **Required.** Base URL of the DIAL Core API. |
41
- | `apiKey` | `string` | API key — sent as the `Api-Key` header. |
42
- | `token` | `string` | JWT bearer token — sent as `Authorization: Bearer <token>`. |
43
- | `headers` | `Record<string, string>` | Additional custom headers merged into every request. |
44
- | `fetch` | `typeof fetch` | Custom fetch implementation (e.g. for Node.js < 18 or testing). |
38
+ | Option | Type | Description |
39
+ | --------- | ------------------------ | --------------------------------------------------------------- |
40
+ | `baseUrl` | `string` | **Required.** Base URL of the DIAL Core API. |
41
+ | `apiKey` | `string` | API key — sent as the `Api-Key` header. |
42
+ | `token` | `string` | JWT bearer token — sent as `Authorization: Bearer <token>`. |
43
+ | `headers` | `Record<string, string>` | Additional custom headers merged into every request. |
44
+ | `fetch` | `typeof fetch` | Custom fetch implementation (e.g. for Node.js < 18 or testing). |
45
45
 
46
46
  Only one of `apiKey` or `token` is typically needed.
47
47
 
@@ -215,13 +215,13 @@ npm install
215
215
 
216
216
  ### Scripts
217
217
 
218
- | Command | Description |
219
- |---|---|
220
- | `npm run gen` | Bundle the OpenAPI spec and regenerate TypeScript types and SDK client |
221
- | `npm run build` | Generate types and compile to CJS + ESM with type definitions |
222
- | `npm run dev` | Watch mode build |
223
- | `npm run lint` | Run ESLint |
224
- | `npm run format` | Run Prettier |
218
+ | Command | Description |
219
+ | ---------------- | ---------------------------------------------------------------------- |
220
+ | `npm run gen` | Bundle the OpenAPI spec and regenerate TypeScript types and SDK client |
221
+ | `npm run build` | Generate types and compile to CJS + ESM with type definitions |
222
+ | `npm run dev` | Watch mode build |
223
+ | `npm run lint` | Run ESLint |
224
+ | `npm run format` | Run Prettier |
225
225
 
226
226
  ### Code Generation
227
227
 
@@ -232,6 +232,7 @@ npm run gen
232
232
  ```
233
233
 
234
234
  This will:
235
+
235
236
  1. Bundle `openapi.yaml` into `openapi.bundle.yaml` via Redocly CLI
236
237
  2. Generate TypeScript types (`src/schema.ts`) via `openapi-typescript`
237
238
  3. Generate the SDK client (`src/client.ts`) and path helpers (`src/api-paths.ts`)
package/dist/index.d.cts CHANGED
@@ -3858,6 +3858,8 @@ interface operations {
3858
3858
  'dial:applicationTypeEditorUrl'?: string;
3859
3859
  /** @description URL to retrieve JSON schema of the application. */
3860
3860
  'dial:applicationTypeSchemaEndpoint'?: string;
3861
+ /** @description Default icon URL for applications of this type. */
3862
+ 'dial:applicationTypeIconUrl'?: string;
3861
3863
  }[];
3862
3864
  };
3863
3865
  };
@@ -7669,20 +7671,13 @@ type OperationBody<TOperation> = TOperation extends {
7669
7671
  } ? TBody : unknown : never;
7670
7672
  type OperationParameterLocation<TOperation, TLocation extends 'query' | 'header' | 'cookie'> = TOperation extends {
7671
7673
  parameters: infer TParameters;
7672
- } ? TParameters extends {
7673
- [__K in TLocation]?: infer TValue;
7674
- } ? TValue : TParameters extends {
7675
- [__K in TLocation]: infer TValue;
7676
- } ? TValue : never : never;
7674
+ } ? TLocation extends keyof TParameters ? NonNullable<TParameters[TLocation]> : never : never;
7677
7675
  type OperationParams<TOperation> = {
7678
7676
  query?: OperationParameterLocation<TOperation, 'query'>;
7679
7677
  header?: OperationParameterLocation<TOperation, 'header'>;
7680
7678
  cookie?: OperationParameterLocation<TOperation, 'cookie'>;
7681
7679
  };
7682
- type EmptyObject = Record<string, never>;
7683
- type SDKOperationParams<TOperation> = OperationParams<TOperation> extends EmptyObject ? {
7684
- params?: never;
7685
- } : {
7680
+ type SDKOperationParams<TOperation> = {
7686
7681
  params?: OperationParams<TOperation>;
7687
7682
  };
7688
7683
  type SDKOperationBody<TOperation> = OperationBody<TOperation> extends never ? {
package/dist/index.d.ts CHANGED
@@ -3858,6 +3858,8 @@ interface operations {
3858
3858
  'dial:applicationTypeEditorUrl'?: string;
3859
3859
  /** @description URL to retrieve JSON schema of the application. */
3860
3860
  'dial:applicationTypeSchemaEndpoint'?: string;
3861
+ /** @description Default icon URL for applications of this type. */
3862
+ 'dial:applicationTypeIconUrl'?: string;
3861
3863
  }[];
3862
3864
  };
3863
3865
  };
@@ -7669,20 +7671,13 @@ type OperationBody<TOperation> = TOperation extends {
7669
7671
  } ? TBody : unknown : never;
7670
7672
  type OperationParameterLocation<TOperation, TLocation extends 'query' | 'header' | 'cookie'> = TOperation extends {
7671
7673
  parameters: infer TParameters;
7672
- } ? TParameters extends {
7673
- [__K in TLocation]?: infer TValue;
7674
- } ? TValue : TParameters extends {
7675
- [__K in TLocation]: infer TValue;
7676
- } ? TValue : never : never;
7674
+ } ? TLocation extends keyof TParameters ? NonNullable<TParameters[TLocation]> : never : never;
7677
7675
  type OperationParams<TOperation> = {
7678
7676
  query?: OperationParameterLocation<TOperation, 'query'>;
7679
7677
  header?: OperationParameterLocation<TOperation, 'header'>;
7680
7678
  cookie?: OperationParameterLocation<TOperation, 'cookie'>;
7681
7679
  };
7682
- type EmptyObject = Record<string, never>;
7683
- type SDKOperationParams<TOperation> = OperationParams<TOperation> extends EmptyObject ? {
7684
- params?: never;
7685
- } : {
7680
+ type SDKOperationParams<TOperation> = {
7686
7681
  params?: OperationParams<TOperation>;
7687
7682
  };
7688
7683
  type SDKOperationBody<TOperation> = OperationBody<TOperation> extends never ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-typescript-sdk",
3
- "version": "0.1.0-dev.22",
3
+ "version": "0.1.0-dev.24",
4
4
  "description": "Type-safe SDK (openapi-typescript + openapi-fetch)",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",