Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix union in header query issue #2189

Merged
merged 19 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export interface DimensionValue {
// @public (undocumented)
export interface DimensionValueList {
// (undocumented)
readonly value: string[];
value: string[];
}

// @public
Expand Down Expand Up @@ -294,7 +294,7 @@ export interface LoadTestRunClientDimensionValue {
// @public (undocumented)
export interface LoadTestRunClientDimensionValueList {
// (undocumented)
readonly value: string[];
value: string[];
}

// @public
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,5 +512,5 @@ export interface DimensionValue {
export type Interval = string;

export interface DimensionValueList {
readonly value: string[];
value: string[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -543,5 +543,5 @@ export interface PagedDimensionValueList {
}

export interface DimensionValueList {
readonly value: string[];
value: string[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export interface CreateChatCompletionRequest {
model: string | "gpt4" | "gpt-4-0314" | "gpt-4-0613" | "gpt-4-32k" | "gpt-4-32k-0314" | "gpt-4-32k-0613" | "gpt-3.5-turbo" | "gpt-3.5-turbo-16k" | "gpt-3.5-turbo-0301" | "gpt-3.5-turbo-0613" | "gpt-3.5-turbo-16k-0613";
n?: number | null;
presencePenalty?: number | null;
stop?: string | string[];
stop?: Stop;
stream?: boolean | null;
temperature?: number | null;
topP?: number | null;
Expand Down Expand Up @@ -151,8 +151,8 @@ export interface CreateCompletionRequest {
model: string | "babbage-002" | "davinci-002" | "text-davinci-003" | "text-davinci-002" | "text-davinci-001" | "code-davinci-002" | "text-curie-001" | "text-babbage-001" | "text-ada-001";
n?: number | null;
presencePenalty?: number | null;
prompt: string | string[] | number[] | number[][];
stop?: string | string[];
prompt: Prompt;
stop?: Stop;
stream?: boolean | null;
suffix?: string | null;
temperature?: number | null;
Expand Down Expand Up @@ -774,6 +774,12 @@ export interface OpenAIFile {
statusDetails?: string | null;
}

// @public
export type Prompt = string | string[] | number[] | number[][];

// @public
export type Stop = string | string[];

// (No @packageDocumentation comment for this package)

```
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export {
CreateImageVariationRequest,
CreateModerationRequest,
CreateModerationResponse,
Stop,
Prompt,
AudioTranscriptionsCreateOptions,
AudioTranslationsCreateOptions,
ChatCompletionsCreateOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export {
CreateImageVariationRequest,
CreateModerationRequest,
CreateModerationResponse,
Stop,
Prompt,
} from "./models.js";
export {
AudioTranscriptionsCreateOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export interface CreateChatCompletionRequest {
*/
maxTokens?: number | null;
/** Up to 4 sequences where the API will stop generating further tokens. */
stop?: string | string[];
stop?: Stop;
/**
* Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear
* in the text so far, increasing the model's likelihood to talk about new topics.
Expand Down Expand Up @@ -408,7 +408,7 @@ export interface CreateCompletionRequest {
* Note that <|endoftext|> is the document separator that the model sees during training, so if a
* prompt is not specified the model will generate as if from the beginning of a new document.
*/
prompt: string | string[] | number[] | number[][];
prompt: Prompt;
/** The suffix that comes after a completion of inserted text. */
suffix?: string | null;
/**
Expand Down Expand Up @@ -441,7 +441,7 @@ export interface CreateCompletionRequest {
*/
maxTokens?: number | null;
/** Up to 4 sequences where the API will stop generating further tokens. */
stop?: string | string[];
stop?: Stop;
/**
* Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear
* in the text so far, increasing the model's likelihood to talk about new topics.
Expand Down Expand Up @@ -971,3 +971,8 @@ export interface CreateModerationResponse {
};
}[];
}

/** Alias for Stop */
export type Stop = string | string[];
/** Alias for Prompt */
export type Prompt = string | string[] | number[] | number[][];
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export interface CreateChatCompletionRequest {
model: string | "gpt4" | "gpt-4-0314" | "gpt-4-0613" | "gpt-4-32k" | "gpt-4-32k-0314" | "gpt-4-32k-0613" | "gpt-3.5-turbo" | "gpt-3.5-turbo-16k" | "gpt-3.5-turbo-0301" | "gpt-3.5-turbo-0613" | "gpt-3.5-turbo-16k-0613";
n?: number | null;
presencePenalty?: number | null;
stop?: string | string[];
stop?: Stop;
stream?: boolean | null;
temperature?: number | null;
topP?: number | null;
Expand Down Expand Up @@ -151,8 +151,8 @@ export interface CreateCompletionRequest {
model: string | "babbage-002" | "davinci-002" | "text-davinci-003" | "text-davinci-002" | "text-davinci-001" | "code-davinci-002" | "text-curie-001" | "text-babbage-001" | "text-ada-001";
n?: number | null;
presencePenalty?: number | null;
prompt: string | string[] | number[] | number[][];
stop?: string | string[];
prompt: Prompt;
stop?: Stop;
stream?: boolean | null;
suffix?: string | null;
temperature?: number | null;
Expand Down Expand Up @@ -774,6 +774,12 @@ export interface OpenAIFile {
statusDetails?: string | null;
}

// @public
export type Prompt = string | string[] | number[] | number[][];

// @public
export type Stop = string | string[];

// (No @packageDocumentation comment for this package)

```
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export {
CreateImageVariationRequest,
CreateModerationRequest,
CreateModerationResponse,
Stop,
Prompt,
AudioTranscriptionsCreateOptions,
AudioTranslationsCreateOptions,
ChatCompletionsCreateOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ export {
CreateImageVariationRequest,
CreateModerationRequest,
CreateModerationResponse,
Stop,
Prompt,
} from "./models.js";
export {
AudioTranscriptionsCreateOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export interface CreateChatCompletionRequest {
*/
maxTokens?: number | null;
/** Up to 4 sequences where the API will stop generating further tokens. */
stop?: string | string[];
stop?: Stop;
/**
* Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear
* in the text so far, increasing the model's likelihood to talk about new topics.
Expand Down Expand Up @@ -407,7 +407,7 @@ export interface CreateCompletionRequest {
* Note that <|endoftext|> is the document separator that the model sees during training, so if a
* prompt is not specified the model will generate as if from the beginning of a new document.
*/
prompt: string | string[] | number[] | number[][];
prompt: Prompt;
/** The suffix that comes after a completion of inserted text. */
suffix?: string | null;
/**
Expand Down Expand Up @@ -440,7 +440,7 @@ export interface CreateCompletionRequest {
*/
maxTokens?: number | null;
/** Up to 4 sequences where the API will stop generating further tokens. */
stop?: string | string[];
stop?: Stop;
/**
* Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear
* in the text so far, increasing the model's likelihood to talk about new topics.
Expand Down Expand Up @@ -970,3 +970,8 @@ export interface CreateModerationResponse {
};
}[];
}

/** Alias for Stop */
export type Stop = string | string[];
/** Alias for Prompt */
export type Prompt = string | string[] | number[] | number[][];
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plugins": ["@azure/azure-sdk"],
"extends": ["plugin:@azure/azure-sdk/azure-sdk-base"],
"rules": {
"@azure/azure-sdk/ts-modules-only-named": "warn",
"@azure/azure-sdk/ts-apiextractor-json-types": "warn",
"@azure/azure-sdk/ts-package-json-types": "warn",
"@azure/azure-sdk/ts-package-json-engine-is-present": "warn",
"tsdoc/syntax": "warn"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# SchemaRegistry REST client library for JavaScript

SchemaRegistryClient is a client for registering and retrieving schemas from the Azure Schema Registry service.

**Please rely heavily on our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library**

Key links:

- [Package (NPM)](https://www.npmjs.com/package/@msinternal/schema-registry)

## Getting started

### Currently supported environments

- LTS versions of Node.js

### Prerequisites

- You must have an [Azure subscription](https://azure.microsoft.com/free/) to use this package.

### Install the `@msinternal/schema-registry` package

Install the SchemaRegistry REST client REST client library for JavaScript with `npm`:

```bash
npm install @msinternal/schema-registry
```

### Create and authenticate a `SchemaRegistryClient`

To use an [Azure Active Directory (AAD) token credential](https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token),
provide an instance of the desired credential type obtained from the
[@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library.

To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity)

After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use.
As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential)
can be used to authenticate the client.

Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables:
AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET

## Troubleshooting

### Logging

Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:

```javascript
const { setLogLevel } = require("@azure/logger");

setLogLevel("info");
```

For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "./types/src/index.d.ts",
"docModel": { "enabled": true },
"apiReport": { "enabled": true, "reportFolder": "./review" },
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "",
"publicTrimmedFilePath": "./types/schema-registry.d.ts"
},
"messages": {
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
"extractorMessageReporting": {
"ae-missing-release-tag": { "logLevel": "none" },
"ae-unresolved-link": { "logLevel": "none" }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"name": "@msinternal/schema-registry",
"sdk-type": "client",
"author": "Microsoft Corporation",
"version": "1.0.0-beta.1",
"description": "Schema Registry test",
"keywords": ["node", "azure", "cloud", "typescript", "browser", "isomorphic"],
"license": "MIT",
"type": "module",
"main": "dist/index.js",
"module": "./dist-esm/src/index.js",
"types": "./types/schema-registry.d.ts",
"exports": {
".": {
"types": "./types/src/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist-esm/src/index.js"
},
"./api": {
"types": "./types/src/api/index.d.ts",
"import": "./dist-esm/src/api/index.js"
},
"./models": {
"types": "./types/src/models/index.d.ts",
"import": "./dist-esm/src/models/index.js"
},
"./api/schemaOperations": {
"types": "./types/src/api/schemaOperations/index.d.ts",
"import": "./dist-esm/src/api/schemaOperations/index.js"
}
},
"repository": "github:Azure/azure-sdk-for-js",
"bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
"files": [
"dist/",
"dist-esm/",
"types/schema-registry.d.ts",
"README.md",
"LICENSE",
"review/*"
],
"engines": { "node": ">=18.0.0" },
"scripts": {
"build:browser": "echo skipped.",
"build:node": "echo skipped.",
"build:samples": "echo skipped.",
"build:test": "echo skipped.",
"build:debug": "echo skipped.",
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" ",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "echo skipped",
"extract-api": "rimraf review && mkdirp ./review && api-extractor run --local",
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" ",
"generate:client": "echo skipped",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"integration-test": "echo skipped",
"lint:fix": "eslint package.json api-extractor.json src --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src --ext .ts",
"pack": "npm pack 2>&1",
"test:browser": "echo skipped",
"test:node": "echo skipped",
"test": "echo \"Error: no test specified\" && exit 1",
"unit-test": "echo skipped",
"unit-test:node": "echo skipped",
"unit-test:browser": "echo skipped",
"build": "npm run clean && tsc && rollup -c 2>&1 && npm run minify && mkdirp ./review && npm run extract-api",
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js"
},
"sideEffects": false,
"autoPublish": false,
"dependencies": {
"@azure/core-auth": "^1.3.0",
"@azure-rest/core-client": "^1.1.6",
"@azure/core-rest-pipeline": "^1.12.0",
"@azure/logger": "^1.0.0",
"tslib": "^2.2.0",
"@azure/core-paging": "^1.5.0",
"@azure/core-util": "^1.4.0"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
"autorest": "latest",
"@types/node": "^18.0.0",
"dotenv": "^16.0.0",
"eslint": "^8.0.0",
"mkdirp": "^2.1.2",
"prettier": "^3.1.0",
"rimraf": "^5.0.0",
"source-map-support": "^0.5.9",
"typescript": "~5.2.0",
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-multi-entry": "^6.0.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"uglify-js": "^3.4.9"
}
}
Loading
Loading