@azure/app-configuration 1.10.0-alpha.20251128.1 → 1.10.0-alpha.20251202.1
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/dist/browser/internal/helpers.d.ts.map +1 -1
- package/dist/browser/internal/helpers.js.map +1 -1
- package/dist/browser/models.d.ts.map +1 -1
- package/dist/browser/models.js.map +1 -1
- package/dist/commonjs/internal/helpers.d.ts.map +1 -1
- package/dist/commonjs/internal/helpers.js.map +1 -1
- package/dist/commonjs/models.d.ts.map +1 -1
- package/dist/commonjs/models.js.map +1 -1
- package/dist/esm/internal/helpers.d.ts.map +1 -1
- package/dist/esm/internal/helpers.js.map +1 -1
- package/dist/esm/models.d.ts.map +1 -1
- package/dist/esm/models.js.map +1 -1
- package/dist/react-native/internal/helpers.d.ts.map +1 -1
- package/dist/react-native/internal/helpers.js.map +1 -1
- package/dist/react-native/models.d.ts.map +1 -1
- package/dist/react-native/models.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/internal/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,iBAAiB,EAEvB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,KAAK,EACV,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,QAAQ,EACT,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,oBAAoB,EAAE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,GAAG,sBAAsB,CAAC,eAAe,WAAW,CAAC;IAC9D,CAAC;SAAM,IACL,iBAAiB,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC/C,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAChD,CAAC;QACD,OAAO,GAAG,sBAAsB,CAAC,UAAU,WAAW,CAAC;IACzD,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,sBAAsB,CAAC,gBAAgB,WAAW,CAAC;IAC/D,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n type ConfigurationSetting,\n type ConfigurationSettingParam,\n type HttpOnlyIfChangedField,\n type HttpOnlyIfUnchangedField,\n type HttpResponseField,\n type HttpResponseFields,\n type ListRevisionsOptions,\n type ListSettingsOptions,\n type ListSnapshotsOptions,\n type ConfigurationSnapshot,\n type SnapshotResponse,\n type EtagEntity,\n type ListLabelsOptions,\n KnownAppConfigAudience,\n} from \"../models.js\";\nimport type { FeatureFlagValue } from \"../featureFlag.js\";\nimport { FeatureFlagHelper, featureFlagContentType } from \"../featureFlag.js\";\nimport type {\n GetKeyValuesOptionalParams,\n GetLabelsOptionalParams,\n GetSnapshotsOptionalParams,\n KeyValue,\n} from \"../generated/src/models/index.js\";\nimport type { SecretReferenceValue } from \"../secretReference.js\";\nimport { SecretReferenceHelper, secretReferenceContentType } from \"../secretReference.js\";\nimport type { SnapshotReferenceValue } from \"../snapshotReference.js\";\nimport { SnapshotReferenceHelper, snapshotReferenceContentType } from \"../snapshotReference.js\";\nimport { isDefined } from \"@azure/core-util\";\nimport { logger } from \"../logger.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendConfigurationSettingsOptions\n extends OperationOptions,\n ListSettingsOptions,\n EtagEntity {\n /**\n * A filter used get configuration setting for a snapshot. Not valid when used with 'key' and 'label' filters\n */\n snapshotName?: string;\n}\n\n/**\n * Options for listLabels that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendLabelsRequestOptions extends ListLabelsOptions {}\n\n/**\n * Formats the etag so it can be used with a If-Match/If-None-Match header\n * @internal\n */\nexport function quoteETag(etag: string | undefined): string | undefined {\n // https://tools.ietf.org/html/rfc7232#section-3.1\n if (etag === undefined || etag === \"*\") {\n return etag;\n }\n\n if (etag.startsWith('\"') && etag.endsWith('\"')) {\n return etag;\n }\n\n if (etag.startsWith(\"'\") && etag.endsWith(\"'\")) {\n return etag;\n }\n\n return `\"${etag}\"`;\n}\n\n/**\n * Checks the onlyIfChanged/onlyIfUnchanged properties to make sure we haven't specified both\n * and throws an Error. Otherwise, returns the properties properly quoted.\n * @param options - An options object with onlyIfChanged/onlyIfUnchanged fields\n * @internal\n */\nexport function checkAndFormatIfAndIfNoneMatch(\n objectWithEtag: EtagEntity,\n options: HttpOnlyIfChangedField & HttpOnlyIfUnchangedField,\n): { ifMatch: string | undefined; ifNoneMatch: string | undefined } {\n if (options.onlyIfChanged && options.onlyIfUnchanged) {\n logger.error(\n \"onlyIfChanged and onlyIfUnchanged are both specified\",\n options.onlyIfChanged,\n options.onlyIfUnchanged,\n );\n throw new Error(\"onlyIfChanged and onlyIfUnchanged are mutually-exclusive\");\n }\n\n let ifMatch;\n let ifNoneMatch;\n\n if (options.onlyIfUnchanged) {\n ifMatch = quoteETag(objectWithEtag.etag);\n }\n\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(objectWithEtag.etag);\n }\n\n return {\n ifMatch: ifMatch,\n ifNoneMatch: ifNoneMatch,\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions and ListRevisionsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatFiltersAndSelect(\n listConfigOptions: ListRevisionsOptions,\n): Pick<GetKeyValuesOptionalParams, \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"tags\"> {\n let acceptDatetime: string | undefined = undefined;\n\n if (listConfigOptions.acceptDateTime) {\n acceptDatetime = listConfigOptions.acceptDateTime.toISOString();\n }\n return {\n key: listConfigOptions.keyFilter,\n label: listConfigOptions.labelFilter,\n tags: listConfigOptions.tagsFilter,\n acceptDatetime,\n select: formatFieldsForSelect(listConfigOptions.fields),\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter, labelFilter, snapshotName are moved to key, label, and snapshot respectively.\n *\n * @internal\n */\nexport function formatConfigurationSettingsFiltersAndSelect(\n listConfigOptions: SendConfigurationSettingsOptions,\n): Pick<\n GetKeyValuesOptionalParams,\n \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"snapshot\" | \"tags\"\n> {\n const { snapshotName: snapshot, ...options } = listConfigOptions;\n return {\n ...formatFiltersAndSelect(options),\n snapshot,\n };\n}\n/**\n * Transforms some of the key fields in ListSnapshotsOptions\n * so they can be added to a request using AppConfigurationGetSnapshotsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatSnapshotFiltersAndSelect(\n listSnapshotOptions: ListSnapshotsOptions,\n): Pick<GetSnapshotsOptionalParams, \"name\" | \"select\" | \"status\"> {\n return {\n name: listSnapshotOptions.nameFilter,\n status: listSnapshotOptions.statusFilter,\n select: listSnapshotOptions.fields,\n };\n}\n\n/**\n * Transforms some of the key fields in ListLabelsOptions\n * so they can be added to a request using AppConfigurationGetLabelsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - `nameFilter` are moved to name\n *\n * @internal\n */\nexport function formatLabelsFiltersAndSelect(\n listLabelsOptions: ListLabelsOptions,\n): Pick<GetLabelsOptionalParams, \"name\" | \"select\"> {\n return {\n name: listLabelsOptions.nameFilter,\n select: listLabelsOptions.fields,\n };\n}\n/**\n * Handles translating a Date acceptDateTime into a string as needed by the API\n * @param newOptions - A newer style options with acceptDateTime as a date (and with proper casing!)\n * @internal\n */\nexport function formatAcceptDateTime(newOptions: { acceptDateTime?: Date }): {\n acceptDatetime?: string;\n} {\n return {\n acceptDatetime: newOptions.acceptDateTime && newOptions.acceptDateTime.toISOString(),\n };\n}\n\n/**\n * Take the URL that gets returned from next link and extract the 'after' token needed\n * to get the next page of results.\n * @internal\n */\nexport function extractAfterTokenFromNextLink(nextLink: string): string {\n const searchParams = new URLSearchParams(nextLink);\n const afterToken = searchParams.get(\"after\");\n\n if (afterToken == null || Array.isArray(afterToken)) {\n logger.error(\"Invalid nextLink - invalid after token\", afterToken, Array.isArray(afterToken));\n throw new Error(\"Invalid nextLink - invalid after token\");\n }\n\n return decodeURIComponent(afterToken);\n}\n\n/**\n * Take the header link that gets returned from 304 response and extract the 'after' token needed\n * to get the next page of results.\n *\n * @internal\n */\nexport function extractAfterTokenFromLinkHeader(link: string): string {\n // Example transformation of the link header\n // link:\n // '</kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>; rel=\"next\"'\n //\n // linkValue:\n // </kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>\n //\n // nextLink:\n // /kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4\n const linkValue = link.split(\";\")[0];\n const nextLink = linkValue.substring(1, linkValue.length - 1);\n return extractAfterTokenFromNextLink(nextLink);\n}\n\n/**\n * Makes a ConfigurationSetting-based response throw for all of the data members. Used primarily\n * to prevent possible errors by the user in accessing a model that is uninitialized. This can happen\n * in cases like HTTP status code 204 or 304, which return an empty response body.\n *\n * @param configurationSetting - The configuration setting to alter\n */\nexport function makeConfigurationSettingEmpty(\n configurationSetting: Partial<Record<Exclude<keyof ConfigurationSetting, \"key\">, any>>,\n): void {\n const names: Exclude<keyof ConfigurationSetting, \"key\">[] = [\n \"contentType\",\n \"etag\",\n \"label\",\n \"lastModified\",\n \"isReadOnly\",\n \"tags\",\n \"value\",\n ];\n\n for (const name of names) {\n configurationSetting[name] = undefined;\n }\n}\n\n/**\n * @internal\n */\nexport function transformKeyValue<T>(kvp: T & KeyValue): T & ConfigurationSetting {\n const setting: T & ConfigurationSetting & KeyValue = {\n value: undefined,\n ...kvp,\n isReadOnly: !!kvp.locked,\n };\n delete setting.locked;\n if (!setting.label) {\n delete setting.label;\n }\n if (!setting.contentType) {\n delete setting.contentType;\n }\n return setting;\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSecretReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SecretReferenceValue> {\n return (\n setting.contentType === secretReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSnapshotReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SnapshotReferenceValue> {\n return (\n setting.contentType === snapshotReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithFeatureFlagValue(\n setting: any,\n): setting is ConfigurationSetting<FeatureFlagValue> {\n return (\n setting.contentType === featureFlagContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isSimpleConfigSetting(setting: any): setting is ConfigurationSetting {\n return typeof setting.value === \"string\" || !isDefined(setting.value);\n}\n\n/**\n * @internal\n */\nexport function serializeAsConfigurationSettingParam(\n setting:\n | ConfigurationSettingParam\n | ConfigurationSettingParam<FeatureFlagValue>\n | ConfigurationSettingParam<SecretReferenceValue>\n | ConfigurationSettingParam<SnapshotReferenceValue>,\n): ConfigurationSettingParam {\n if (isSimpleConfigSetting(setting)) {\n return setting as ConfigurationSettingParam;\n }\n try {\n if (isConfigSettingWithFeatureFlagValue(setting)) {\n return FeatureFlagHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSecretReferenceValue(setting)) {\n return SecretReferenceHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSnapshotReferenceValue(setting)) {\n return SnapshotReferenceHelper.toConfigurationSettingParam(setting);\n }\n } catch (error: any) {\n return setting as ConfigurationSettingParam;\n }\n logger.error(\"Unable to serialize to a configuration setting\", setting);\n throw new TypeError(\n `Unable to serialize the setting with key \"${setting.key}\" as a configuration setting`,\n );\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponseWithStatusCode<T extends KeyValue>(\n kvp: T,\n status: number | undefined,\n): ConfigurationSetting & { eTag?: string } & HttpResponseFields {\n const response = {\n ...transformKeyValue(kvp),\n statusCode: status ?? -1,\n };\n\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(response, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n return response;\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponse<T extends KeyValue & { eTag?: string }>(\n kvp: T,\n): ConfigurationSetting {\n const setting = transformKeyValue(kvp);\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(setting, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n\n delete setting.eTag;\n return setting;\n}\n\n/**\n * @internal\n */\nexport function transformSnapshotResponse<T extends ConfigurationSnapshot>(\n snapshot: T,\n): SnapshotResponse {\n if (hasUnderscoreResponse(snapshot)) {\n Object.defineProperty(snapshot, \"_response\", {\n enumerable: false,\n value: snapshot._response,\n });\n }\n return snapshot as any;\n}\n\n/**\n * Translates user-facing field names into their `select` equivalents (these can be\n * seen in the `KnownEnum5`)\n *\n * @param fieldNames - fieldNames from users.\n * @returns The field names translated into the `select` field equivalents.\n *\n * @internal\n */\nexport function formatFieldsForSelect(\n fieldNames: (keyof ConfigurationSetting)[] | undefined,\n): string[] | undefined {\n if (fieldNames == null) {\n return undefined;\n }\n\n const mappedFieldNames = fieldNames.map((fn) => {\n switch (fn) {\n case \"lastModified\":\n return \"last_modified\";\n case \"contentType\":\n return \"content_type\";\n case \"isReadOnly\":\n return \"locked\";\n default:\n return fn;\n }\n });\n\n return mappedFieldNames;\n}\n\n/**\n * @internal\n */\nexport function errorMessageForUnexpectedSetting(\n key: string,\n expectedType: \"FeatureFlag\" | \"SecretReference\",\n): string {\n return `Setting with key ${key} is not a valid ${expectedType}, make sure to have the correct content-type and a valid non-null value.`;\n}\n\nexport function assertResponse<T extends object>(\n result: T,\n): asserts result is T & HttpResponseField<any> {\n if (!hasUnderscoreResponse(result)) {\n Object.defineProperty(result, \"_response\", {\n enumerable: false,\n value:\n \"Something went wrong, _response(raw response) is supposed to be part of the response. Please file a bug at https://github.com/Azure/azure-sdk-for-js\",\n });\n }\n}\n\nexport function hasUnderscoreResponse<T extends object>(\n result: T,\n): result is T & HttpResponseField<any> {\n return Object.prototype.hasOwnProperty.call(result, \"_response\");\n}\n\n/**\n * Get the scope for the App Configuration service based on the endpoint and audience.\n * If the audience is provided, it will be used as the scope.\n * If not, the scope is defaulted to Azure Public Cloud when not specified.\n *\n * @internal\n */\nexport function getScope(appConfigEndpoint: string, appConfigAudience?: string): string {\n if (appConfigAudience) {\n return `${appConfigAudience}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.us\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.us\")\n ) {\n return `${KnownAppConfigAudience.AzureGovernment}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.cn\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.cn\")\n ) {\n return `${KnownAppConfigAudience.AzureChina}/.default`;\n } else {\n return `${KnownAppConfigAudience.AzurePublicCloud}/.default`;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/internal/helpers.ts"],"names":[],"mappings":"AAAA,uC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etting,\n type ConfigurationSettingParam,\n type HttpOnlyIfChangedField,\n type HttpOnlyIfUnchangedField,\n type HttpResponseField,\n type HttpResponseFields,\n type ListRevisionsOptions,\n type ListSettingsOptions,\n type ListSnapshotsOptions,\n type ConfigurationSnapshot,\n type SnapshotResponse,\n type EtagEntity,\n type ListLabelsOptions,\n KnownAppConfigAudience,\n} from \"../models.js\";\nimport type { FeatureFlagValue } from \"../featureFlag.js\";\nimport { FeatureFlagHelper, featureFlagContentType } from \"../featureFlag.js\";\nimport type {\n GetKeyValuesOptionalParams,\n GetLabelsOptionalParams,\n GetSnapshotsOptionalParams,\n KeyValue,\n} from \"../generated/src/models/index.js\";\nimport type { SecretReferenceValue } from \"../secretReference.js\";\nimport { SecretReferenceHelper, secretReferenceContentType } from \"../secretReference.js\";\nimport type { SnapshotReferenceValue } from \"../snapshotReference.js\";\nimport { SnapshotReferenceHelper, snapshotReferenceContentType } from \"../snapshotReference.js\";\nimport { isDefined } from \"@azure/core-util\";\nimport { logger } from \"../logger.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendConfigurationSettingsOptions\n extends OperationOptions, ListSettingsOptions, EtagEntity {\n /**\n * A filter used get configuration setting for a snapshot. Not valid when used with 'key' and 'label' filters\n */\n snapshotName?: string;\n}\n\n/**\n * Options for listLabels that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendLabelsRequestOptions extends ListLabelsOptions {}\n\n/**\n * Formats the etag so it can be used with a If-Match/If-None-Match header\n * @internal\n */\nexport function quoteETag(etag: string | undefined): string | undefined {\n // https://tools.ietf.org/html/rfc7232#section-3.1\n if (etag === undefined || etag === \"*\") {\n return etag;\n }\n\n if (etag.startsWith('\"') && etag.endsWith('\"')) {\n return etag;\n }\n\n if (etag.startsWith(\"'\") && etag.endsWith(\"'\")) {\n return etag;\n }\n\n return `\"${etag}\"`;\n}\n\n/**\n * Checks the onlyIfChanged/onlyIfUnchanged properties to make sure we haven't specified both\n * and throws an Error. Otherwise, returns the properties properly quoted.\n * @param options - An options object with onlyIfChanged/onlyIfUnchanged fields\n * @internal\n */\nexport function checkAndFormatIfAndIfNoneMatch(\n objectWithEtag: EtagEntity,\n options: HttpOnlyIfChangedField & HttpOnlyIfUnchangedField,\n): { ifMatch: string | undefined; ifNoneMatch: string | undefined } {\n if (options.onlyIfChanged && options.onlyIfUnchanged) {\n logger.error(\n \"onlyIfChanged and onlyIfUnchanged are both specified\",\n options.onlyIfChanged,\n options.onlyIfUnchanged,\n );\n throw new Error(\"onlyIfChanged and onlyIfUnchanged are mutually-exclusive\");\n }\n\n let ifMatch;\n let ifNoneMatch;\n\n if (options.onlyIfUnchanged) {\n ifMatch = quoteETag(objectWithEtag.etag);\n }\n\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(objectWithEtag.etag);\n }\n\n return {\n ifMatch: ifMatch,\n ifNoneMatch: ifNoneMatch,\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions and ListRevisionsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatFiltersAndSelect(\n listConfigOptions: ListRevisionsOptions,\n): Pick<GetKeyValuesOptionalParams, \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"tags\"> {\n let acceptDatetime: string | undefined = undefined;\n\n if (listConfigOptions.acceptDateTime) {\n acceptDatetime = listConfigOptions.acceptDateTime.toISOString();\n }\n return {\n key: listConfigOptions.keyFilter,\n label: listConfigOptions.labelFilter,\n tags: listConfigOptions.tagsFilter,\n acceptDatetime,\n select: formatFieldsForSelect(listConfigOptions.fields),\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter, labelFilter, snapshotName are moved to key, label, and snapshot respectively.\n *\n * @internal\n */\nexport function formatConfigurationSettingsFiltersAndSelect(\n listConfigOptions: SendConfigurationSettingsOptions,\n): Pick<\n GetKeyValuesOptionalParams,\n \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"snapshot\" | \"tags\"\n> {\n const { snapshotName: snapshot, ...options } = listConfigOptions;\n return {\n ...formatFiltersAndSelect(options),\n snapshot,\n };\n}\n/**\n * Transforms some of the key fields in ListSnapshotsOptions\n * so they can be added to a request using AppConfigurationGetSnapshotsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatSnapshotFiltersAndSelect(\n listSnapshotOptions: ListSnapshotsOptions,\n): Pick<GetSnapshotsOptionalParams, \"name\" | \"select\" | \"status\"> {\n return {\n name: listSnapshotOptions.nameFilter,\n status: listSnapshotOptions.statusFilter,\n select: listSnapshotOptions.fields,\n };\n}\n\n/**\n * Transforms some of the key fields in ListLabelsOptions\n * so they can be added to a request using AppConfigurationGetLabelsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - `nameFilter` are moved to name\n *\n * @internal\n */\nexport function formatLabelsFiltersAndSelect(\n listLabelsOptions: ListLabelsOptions,\n): Pick<GetLabelsOptionalParams, \"name\" | \"select\"> {\n return {\n name: listLabelsOptions.nameFilter,\n select: listLabelsOptions.fields,\n };\n}\n/**\n * Handles translating a Date acceptDateTime into a string as needed by the API\n * @param newOptions - A newer style options with acceptDateTime as a date (and with proper casing!)\n * @internal\n */\nexport function formatAcceptDateTime(newOptions: { acceptDateTime?: Date }): {\n acceptDatetime?: string;\n} {\n return {\n acceptDatetime: newOptions.acceptDateTime && newOptions.acceptDateTime.toISOString(),\n };\n}\n\n/**\n * Take the URL that gets returned from next link and extract the 'after' token needed\n * to get the next page of results.\n * @internal\n */\nexport function extractAfterTokenFromNextLink(nextLink: string): string {\n const searchParams = new URLSearchParams(nextLink);\n const afterToken = searchParams.get(\"after\");\n\n if (afterToken == null || Array.isArray(afterToken)) {\n logger.error(\"Invalid nextLink - invalid after token\", afterToken, Array.isArray(afterToken));\n throw new Error(\"Invalid nextLink - invalid after token\");\n }\n\n return decodeURIComponent(afterToken);\n}\n\n/**\n * Take the header link that gets returned from 304 response and extract the 'after' token needed\n * to get the next page of results.\n *\n * @internal\n */\nexport function extractAfterTokenFromLinkHeader(link: string): string {\n // Example transformation of the link header\n // link:\n // '</kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>; rel=\"next\"'\n //\n // linkValue:\n // </kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>\n //\n // nextLink:\n // /kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4\n const linkValue = link.split(\";\")[0];\n const nextLink = linkValue.substring(1, linkValue.length - 1);\n return extractAfterTokenFromNextLink(nextLink);\n}\n\n/**\n * Makes a ConfigurationSetting-based response throw for all of the data members. Used primarily\n * to prevent possible errors by the user in accessing a model that is uninitialized. This can happen\n * in cases like HTTP status code 204 or 304, which return an empty response body.\n *\n * @param configurationSetting - The configuration setting to alter\n */\nexport function makeConfigurationSettingEmpty(\n configurationSetting: Partial<Record<Exclude<keyof ConfigurationSetting, \"key\">, any>>,\n): void {\n const names: Exclude<keyof ConfigurationSetting, \"key\">[] = [\n \"contentType\",\n \"etag\",\n \"label\",\n \"lastModified\",\n \"isReadOnly\",\n \"tags\",\n \"value\",\n ];\n\n for (const name of names) {\n configurationSetting[name] = undefined;\n }\n}\n\n/**\n * @internal\n */\nexport function transformKeyValue<T>(kvp: T & KeyValue): T & ConfigurationSetting {\n const setting: T & ConfigurationSetting & KeyValue = {\n value: undefined,\n ...kvp,\n isReadOnly: !!kvp.locked,\n };\n delete setting.locked;\n if (!setting.label) {\n delete setting.label;\n }\n if (!setting.contentType) {\n delete setting.contentType;\n }\n return setting;\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSecretReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SecretReferenceValue> {\n return (\n setting.contentType === secretReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSnapshotReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SnapshotReferenceValue> {\n return (\n setting.contentType === snapshotReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithFeatureFlagValue(\n setting: any,\n): setting is ConfigurationSetting<FeatureFlagValue> {\n return (\n setting.contentType === featureFlagContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isSimpleConfigSetting(setting: any): setting is ConfigurationSetting {\n return typeof setting.value === \"string\" || !isDefined(setting.value);\n}\n\n/**\n * @internal\n */\nexport function serializeAsConfigurationSettingParam(\n setting:\n | ConfigurationSettingParam\n | ConfigurationSettingParam<FeatureFlagValue>\n | ConfigurationSettingParam<SecretReferenceValue>\n | ConfigurationSettingParam<SnapshotReferenceValue>,\n): ConfigurationSettingParam {\n if (isSimpleConfigSetting(setting)) {\n return setting as ConfigurationSettingParam;\n }\n try {\n if (isConfigSettingWithFeatureFlagValue(setting)) {\n return FeatureFlagHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSecretReferenceValue(setting)) {\n return SecretReferenceHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSnapshotReferenceValue(setting)) {\n return SnapshotReferenceHelper.toConfigurationSettingParam(setting);\n }\n } catch (error: any) {\n return setting as ConfigurationSettingParam;\n }\n logger.error(\"Unable to serialize to a configuration setting\", setting);\n throw new TypeError(\n `Unable to serialize the setting with key \"${setting.key}\" as a configuration setting`,\n );\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponseWithStatusCode<T extends KeyValue>(\n kvp: T,\n status: number | undefined,\n): ConfigurationSetting & { eTag?: string } & HttpResponseFields {\n const response = {\n ...transformKeyValue(kvp),\n statusCode: status ?? -1,\n };\n\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(response, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n return response;\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponse<T extends KeyValue & { eTag?: string }>(\n kvp: T,\n): ConfigurationSetting {\n const setting = transformKeyValue(kvp);\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(setting, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n\n delete setting.eTag;\n return setting;\n}\n\n/**\n * @internal\n */\nexport function transformSnapshotResponse<T extends ConfigurationSnapshot>(\n snapshot: T,\n): SnapshotResponse {\n if (hasUnderscoreResponse(snapshot)) {\n Object.defineProperty(snapshot, \"_response\", {\n enumerable: false,\n value: snapshot._response,\n });\n }\n return snapshot as any;\n}\n\n/**\n * Translates user-facing field names into their `select` equivalents (these can be\n * seen in the `KnownEnum5`)\n *\n * @param fieldNames - fieldNames from users.\n * @returns The field names translated into the `select` field equivalents.\n *\n * @internal\n */\nexport function formatFieldsForSelect(\n fieldNames: (keyof ConfigurationSetting)[] | undefined,\n): string[] | undefined {\n if (fieldNames == null) {\n return undefined;\n }\n\n const mappedFieldNames = fieldNames.map((fn) => {\n switch (fn) {\n case \"lastModified\":\n return \"last_modified\";\n case \"contentType\":\n return \"content_type\";\n case \"isReadOnly\":\n return \"locked\";\n default:\n return fn;\n }\n });\n\n return mappedFieldNames;\n}\n\n/**\n * @internal\n */\nexport function errorMessageForUnexpectedSetting(\n key: string,\n expectedType: \"FeatureFlag\" | \"SecretReference\",\n): string {\n return `Setting with key ${key} is not a valid ${expectedType}, make sure to have the correct content-type and a valid non-null value.`;\n}\n\nexport function assertResponse<T extends object>(\n result: T,\n): asserts result is T & HttpResponseField<any> {\n if (!hasUnderscoreResponse(result)) {\n Object.defineProperty(result, \"_response\", {\n enumerable: false,\n value:\n \"Something went wrong, _response(raw response) is supposed to be part of the response. Please file a bug at https://github.com/Azure/azure-sdk-for-js\",\n });\n }\n}\n\nexport function hasUnderscoreResponse<T extends object>(\n result: T,\n): result is T & HttpResponseField<any> {\n return Object.prototype.hasOwnProperty.call(result, \"_response\");\n}\n\n/**\n * Get the scope for the App Configuration service based on the endpoint and audience.\n * If the audience is provided, it will be used as the scope.\n * If not, the scope is defaulted to Azure Public Cloud when not specified.\n *\n * @internal\n */\nexport function getScope(appConfigEndpoint: string, appConfigAudience?: string): string {\n if (appConfigAudience) {\n return `${appConfigAudience}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.us\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.us\")\n ) {\n return `${KnownAppConfigAudience.AzureGovernment}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.cn\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.cn\")\n ) {\n return `${KnownAppConfigAudience.AzureChina}/.default`;\n } else {\n return `${KnownAppConfigAudience.AzurePublicCloud}/.default`;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,qBAAqB,EACrB,2BAA2B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
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAiClC;;GAEG;AACH,MAAM,CAAN,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IAChC;;OAEG;IACH,mEAAyC,CAAA;IACzC;;OAEG;IACH,wEAA8C,CAAA;IAC9C;;OAEG;IACH,0EAAgD,CAAA;AAClD,CAAC,EAbW,sBAAsB,KAAtB,sBAAsB,QAajC;AAwgBD,OAAO,EAIL,wBAAwB,EACxB,gCAAgC,GAGjC,MAAM,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CompatResponse } from \"@azure/core-http-compat\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport type {\n SnapshotComposition,\n ConfigurationSettingsFilter,\n ConfigurationSnapshot,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n\n/**\n * Provides configuration options for AppConfigurationClient.\n */\nexport interface AppConfigurationClientOptions extends CommonClientOptions {\n /**\n * The API version to use when interacting with the service. The default value is `2023-11-01`.\n * Note that overriding this default value may result in unsupported behavior.\n */\n apiVersion?: string;\n\n /**\n * The Audience to use for authentication with Azure Active Directory (AAD).\n * {@link KnownAppConfigAudience} can be used interchangeably with audience.\n * If not specified, the default audience will be set to Azure Public Cloud.\n */\n audience?: string;\n}\n\n/**\n * Known values for Azure App Configuration Audience\n */\nexport enum KnownAppConfigAudience {\n /**\n * Audience for Azure China\n */\n AzureChina = \"https://appconfig.azure.cn\",\n /**\n * Audience for Azure Government\n */\n AzureGovernment = \"https://appconfig.azure.us\",\n /**\n * Audience for Azure Public\n */\n AzurePublicCloud = \"https://appconfig.azure.com\",\n}\n\n/**\n * Fields that uniquely identify a configuration setting\n */\nexport interface ConfigurationSettingId {\n /**\n * The etag for this setting\n */\n etag?: string;\n /**\n * The key for this setting.\n * Feature flags must be prefixed with `.appconfig.featureflag/<feature-flag-name>`.\n */\n key: string;\n\n /**\n * The label for this setting. Leaving this undefined means this\n * setting does not have a label.\n */\n label?: string;\n}\n/**\n * Necessary fields for updating or creating a new configuration setting\n */\nexport type ConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingId & {\n /**\n * The content type of the setting's value\n */\n contentType?: string;\n\n /**\n * Tags for this key\n */\n tags?: { [propertyName: string]: string };\n} & (T extends string\n ? {\n /**\n * The setting's value\n */\n value?: string;\n }\n : {\n /**\n * The setting's value\n */\n value: T;\n });\n\n/**\n * Configuration setting with extra metadata from the server, indicating\n * its etag, whether it is currently readOnly and when it was last modified.\n */\nexport type ConfigurationSetting<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T> & {\n /**\n * Whether or not the setting is read-only\n */\n isReadOnly: boolean;\n\n /**\n * The date when this setting was last modified\n */\n lastModified?: Date;\n};\n\n/**\n * Fields that are hoisted up from the _response field of the object\n * Used in cases where individual HTTP response fields are important for\n * the user to use in common-use cases like handling http status codes 204 or 304.\n */\nexport interface HttpResponseFields {\n /**\n * The HTTP status code for the response\n */\n statusCode: number;\n}\n/**\n * HTTP response related information - headers and raw body.\n */\nexport interface HttpResponseField<HeadersT> {\n /**\n * The underlying HTTP response.\n */\n _response: CompatResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: HeadersT;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n };\n}\n/**\n * Parameters for adding a new configuration setting\n */\nexport type AddConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Parameters for creating or updating a new configuration setting\n */\nexport type SetConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Standard base response for getting, deleting or updating a configuration setting\n */\nexport type ConfigurationSettingResponse<HeadersT> = ConfigurationSetting &\n HttpResponseField<HeadersT> &\n Pick<HeadersT, Exclude<keyof HeadersT, \"eTag\">>;\n\n/**\n * Options used to provide if-none-match for an HTTP request\n */\nexport interface HttpOnlyIfChangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag does not match the value\n * provided.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Options used to provide if-match for an HTTP request\n */\nexport interface HttpOnlyIfUnchangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag matches the value provided.\n */\n onlyIfUnchanged?: boolean;\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSetting)[];\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalSnapshotFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSnapshot)[];\n}\n\n/**\n * Used when the API supports selectively returning labels fields.\n */\nexport interface OptionalLabelsFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof SettingLabel)[];\n}\n/**\n * Sync token header field\n */\nexport interface SyncTokenHeaderField {\n /**\n * Enables real-time consistency between requests by providing the returned value in the next\n * request made to the server.\n */\n syncToken?: string;\n}\n\n/**\n * Options used when adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingOptions extends OperationOptions {}\n\n/**\n * Response from adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingResponse\n extends ConfigurationSetting,\n SyncTokenHeaderField,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Response from deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingResponse\n extends SyncTokenHeaderField,\n HttpResponseFields,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options for deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField,\n OperationOptions {}\n\n/**\n * Options used when saving a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField,\n OperationOptions {}\n\n/**\n * Response from setting a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingResponse\n extends ConfigurationSetting,\n SyncTokenHeaderField,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Headers from getting a ConfigurationSetting.\n */\nexport interface GetConfigurationHeaders extends SyncTokenHeaderField {}\n\n/**\n * Response from retrieving a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingResponse\n extends ConfigurationSetting,\n GetConfigurationHeaders,\n HttpResponseFields,\n HttpResponseField<GetConfigurationHeaders> {}\n\n/**\n * Options for getting a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingOptions\n extends OperationOptions,\n HttpOnlyIfChangedField,\n OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSettingsOptions extends OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n\n /**\n * Filters for keys. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 key names are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|---------------------------------------|\n * | omitted or * | Matches any key |\n * | abc | Matches a key named abc |\n * | abc* | Matches key names that start with abc |\n *\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n */\n keyFilter?: string;\n\n /* eslint-disable tsdoc/syntax */\n /**\n * Filters for labels. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 labels are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|------------------------------------------------------|\n * | omitted or * | Matches any key |\n * | \\0 | Matches any key without a label (URL encoded as %00) |\n * | prod | Matches a key with label named prod |\n * | prod* | Matches key with label names that start with prod |\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n *\n * Reference: https://learn.microsoft.com/azure/azure-app-configuration/rest-api-key-value\n */\n labelFilter?: string;\n\n /** A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering */\n tagsFilter?: string[];\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListConfigurationSettingsForSnapshotOptions\n extends OperationOptions,\n OptionalFields {}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListConfigurationSettingsOptions extends OperationOptions, ListSettingsOptions {\n /**\n * Etags list for page\n */\n pageEtags?: string[];\n}\n\n/**\n * Options for listLabels\n */\nexport interface ListLabelsOptions extends OperationOptions, OptionalLabelsFields {\n /** A filter for the name of the returned labels. */\n nameFilter?: string;\n\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSnapshots extends OptionalSnapshotFields {\n /** A filter for the name of the returned snapshots. */\n nameFilter?: string;\n\n /** Used to filter returned snapshots by their status property. */\n statusFilter?: ConfigurationSnapshotStatus[];\n}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListSnapshotsOptions\n extends OperationOptions,\n ListSnapshots,\n OptionalSnapshotFields {}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n // The appconfig service doesn't currently support letting you select a page size\n // so we're ignoring their setting for now.\n}\n\n/**\n * Entity with etag.\n */\nexport interface EtagEntity {\n /**\n * The etag for this entity\n */\n etag?: string;\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListConfigurationSettingPage\n extends HttpResponseField<SyncTokenHeaderField>,\n PageSettings,\n EtagEntity {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListLabelsPage\n extends HttpResponseField<SyncTokenHeaderField>,\n PageSettings,\n EtagEntity {\n /**\n * The collection of labels\n */\n items: SettingLabel[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListSnapshotsPage extends SyncTokenHeaderField, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSnapshot[];\n}\n\n/**\n * Options for listRevisions that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListRevisionsOptions extends OperationOptions, ListSettingsOptions {}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListRevisionsPage extends HttpResponseField<SyncTokenHeaderField>, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * Options for setReadOnly\n */\nexport interface SetReadOnlyOptions extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Response when setting a value to read-only.\n */\nexport interface SetReadOnlyResponse\n extends ConfigurationSetting,\n SyncTokenHeaderField,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface RetryOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation.\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * Options used when creating a Snapshot.\n */\nexport interface CreateSnapshotOptions extends OperationOptions {\n /**\n * The amount of time to wait (in milliseconds) between subsequent requests relating to the same operation.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Response from adding a Snapshot.\n */\nexport interface SnapshotResponse extends ConfigurationSnapshot, SyncTokenHeaderField {}\n\n/**\n * Options used when getting a Snapshot.\n */\nexport interface GetSnapshotOptions extends OperationOptions, OptionalSnapshotFields {}\n\n/**\n * Response from getting a Snapshot.\n */\nexport interface GetSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Options used when updating a Snapshot.\n */\nexport interface UpdateSnapshotOptions extends OperationOptions {\n /**\n * The etag for this snapshot\n */\n etag?: string;\n}\n\n/**\n * Response from updating a Snapshot.\n */\nexport interface UpdateSnapshotResponse extends SnapshotResponse {}\n/**\n * Response from updating a Snapshot.\n */\nexport interface CreateSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Fields that uniquely identify a snapshot\n */\nexport interface SnapshotInfo {\n /** The name for this snapshot */\n name: string;\n /** A list of filters used to filter the key-values included in the snapshot. */\n filters: ConfigurationSettingsFilter[];\n /** The composition type describes how the key-values within the snapshot are composed. The 'all' composition type includes all key-values. The 'group_by_key' composition type ensures there are no two key-values containing the same key. */\n compositionType?: SnapshotComposition;\n /** The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used. */\n retentionPeriodInSeconds?: number;\n /** The tags of the snapshot. */\n tags?: { [propertyName: string]: string };\n}\n\nexport {\n ConfigurationSnapshot,\n ConfigurationSettingsFilter,\n SnapshotComposition,\n KnownSnapshotComposition,\n KnownConfigurationSnapshotStatus,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAiClC;;GAEG;AACH,MAAM,CAAN,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IAChC;;OAEG;IACH,mEAAyC,CAAA;IACzC;;OAEG;IACH,wEAA8C,CAAA;IAC9C;;OAEG;IACH,0EAAgD,CAAA;AAClD,CAAC,EAbW,sBAAsB,KAAtB,sBAAsB,QAajC;AAsfD,OAAO,EAIL,wBAAwB,EACxB,gCAAgC,GAGjC,MAAM,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CompatResponse } from \"@azure/core-http-compat\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport type {\n SnapshotComposition,\n ConfigurationSettingsFilter,\n ConfigurationSnapshot,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n\n/**\n * Provides configuration options for AppConfigurationClient.\n */\nexport interface AppConfigurationClientOptions extends CommonClientOptions {\n /**\n * The API version to use when interacting with the service. The default value is `2023-11-01`.\n * Note that overriding this default value may result in unsupported behavior.\n */\n apiVersion?: string;\n\n /**\n * The Audience to use for authentication with Azure Active Directory (AAD).\n * {@link KnownAppConfigAudience} can be used interchangeably with audience.\n * If not specified, the default audience will be set to Azure Public Cloud.\n */\n audience?: string;\n}\n\n/**\n * Known values for Azure App Configuration Audience\n */\nexport enum KnownAppConfigAudience {\n /**\n * Audience for Azure China\n */\n AzureChina = \"https://appconfig.azure.cn\",\n /**\n * Audience for Azure Government\n */\n AzureGovernment = \"https://appconfig.azure.us\",\n /**\n * Audience for Azure Public\n */\n AzurePublicCloud = \"https://appconfig.azure.com\",\n}\n\n/**\n * Fields that uniquely identify a configuration setting\n */\nexport interface ConfigurationSettingId {\n /**\n * The etag for this setting\n */\n etag?: string;\n /**\n * The key for this setting.\n * Feature flags must be prefixed with `.appconfig.featureflag/<feature-flag-name>`.\n */\n key: string;\n\n /**\n * The label for this setting. Leaving this undefined means this\n * setting does not have a label.\n */\n label?: string;\n}\n/**\n * Necessary fields for updating or creating a new configuration setting\n */\nexport type ConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingId & {\n /**\n * The content type of the setting's value\n */\n contentType?: string;\n\n /**\n * Tags for this key\n */\n tags?: { [propertyName: string]: string };\n} & (T extends string\n ? {\n /**\n * The setting's value\n */\n value?: string;\n }\n : {\n /**\n * The setting's value\n */\n value: T;\n });\n\n/**\n * Configuration setting with extra metadata from the server, indicating\n * its etag, whether it is currently readOnly and when it was last modified.\n */\nexport type ConfigurationSetting<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T> & {\n /**\n * Whether or not the setting is read-only\n */\n isReadOnly: boolean;\n\n /**\n * The date when this setting was last modified\n */\n lastModified?: Date;\n};\n\n/**\n * Fields that are hoisted up from the _response field of the object\n * Used in cases where individual HTTP response fields are important for\n * the user to use in common-use cases like handling http status codes 204 or 304.\n */\nexport interface HttpResponseFields {\n /**\n * The HTTP status code for the response\n */\n statusCode: number;\n}\n/**\n * HTTP response related information - headers and raw body.\n */\nexport interface HttpResponseField<HeadersT> {\n /**\n * The underlying HTTP response.\n */\n _response: CompatResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: HeadersT;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n };\n}\n/**\n * Parameters for adding a new configuration setting\n */\nexport type AddConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Parameters for creating or updating a new configuration setting\n */\nexport type SetConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Standard base response for getting, deleting or updating a configuration setting\n */\nexport type ConfigurationSettingResponse<HeadersT> = ConfigurationSetting &\n HttpResponseField<HeadersT> &\n Pick<HeadersT, Exclude<keyof HeadersT, \"eTag\">>;\n\n/**\n * Options used to provide if-none-match for an HTTP request\n */\nexport interface HttpOnlyIfChangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag does not match the value\n * provided.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Options used to provide if-match for an HTTP request\n */\nexport interface HttpOnlyIfUnchangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag matches the value provided.\n */\n onlyIfUnchanged?: boolean;\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSetting)[];\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalSnapshotFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSnapshot)[];\n}\n\n/**\n * Used when the API supports selectively returning labels fields.\n */\nexport interface OptionalLabelsFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof SettingLabel)[];\n}\n/**\n * Sync token header field\n */\nexport interface SyncTokenHeaderField {\n /**\n * Enables real-time consistency between requests by providing the returned value in the next\n * request made to the server.\n */\n syncToken?: string;\n}\n\n/**\n * Options used when adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingOptions extends OperationOptions {}\n\n/**\n * Response from adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingResponse\n extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Response from deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingResponse\n extends SyncTokenHeaderField, HttpResponseFields, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options for deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Options used when saving a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Response from setting a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingResponse\n extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Headers from getting a ConfigurationSetting.\n */\nexport interface GetConfigurationHeaders extends SyncTokenHeaderField {}\n\n/**\n * Response from retrieving a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingResponse\n extends\n ConfigurationSetting,\n GetConfigurationHeaders,\n HttpResponseFields,\n HttpResponseField<GetConfigurationHeaders> {}\n\n/**\n * Options for getting a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingOptions\n extends OperationOptions, HttpOnlyIfChangedField, OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSettingsOptions extends OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n\n /**\n * Filters for keys. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 key names are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|---------------------------------------|\n * | omitted or * | Matches any key |\n * | abc | Matches a key named abc |\n * | abc* | Matches key names that start with abc |\n *\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n */\n keyFilter?: string;\n\n /* eslint-disable tsdoc/syntax */\n /**\n * Filters for labels. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 labels are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|------------------------------------------------------|\n * | omitted or * | Matches any key |\n * | \\0 | Matches any key without a label (URL encoded as %00) |\n * | prod | Matches a key with label named prod |\n * | prod* | Matches key with label names that start with prod |\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n *\n * Reference: https://learn.microsoft.com/azure/azure-app-configuration/rest-api-key-value\n */\n labelFilter?: string;\n\n /** A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering */\n tagsFilter?: string[];\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListConfigurationSettingsForSnapshotOptions\n extends OperationOptions, OptionalFields {}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListConfigurationSettingsOptions extends OperationOptions, ListSettingsOptions {\n /**\n * Etags list for page\n */\n pageEtags?: string[];\n}\n\n/**\n * Options for listLabels\n */\nexport interface ListLabelsOptions extends OperationOptions, OptionalLabelsFields {\n /** A filter for the name of the returned labels. */\n nameFilter?: string;\n\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSnapshots extends OptionalSnapshotFields {\n /** A filter for the name of the returned snapshots. */\n nameFilter?: string;\n\n /** Used to filter returned snapshots by their status property. */\n statusFilter?: ConfigurationSnapshotStatus[];\n}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListSnapshotsOptions\n extends OperationOptions, ListSnapshots, OptionalSnapshotFields {}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n // The appconfig service doesn't currently support letting you select a page size\n // so we're ignoring their setting for now.\n}\n\n/**\n * Entity with etag.\n */\nexport interface EtagEntity {\n /**\n * The etag for this entity\n */\n etag?: string;\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListConfigurationSettingPage\n extends HttpResponseField<SyncTokenHeaderField>, PageSettings, EtagEntity {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListLabelsPage\n extends HttpResponseField<SyncTokenHeaderField>, PageSettings, EtagEntity {\n /**\n * The collection of labels\n */\n items: SettingLabel[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListSnapshotsPage extends SyncTokenHeaderField, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSnapshot[];\n}\n\n/**\n * Options for listRevisions that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListRevisionsOptions extends OperationOptions, ListSettingsOptions {}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListRevisionsPage extends HttpResponseField<SyncTokenHeaderField>, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * Options for setReadOnly\n */\nexport interface SetReadOnlyOptions extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Response when setting a value to read-only.\n */\nexport interface SetReadOnlyResponse\n extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface RetryOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation.\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * Options used when creating a Snapshot.\n */\nexport interface CreateSnapshotOptions extends OperationOptions {\n /**\n * The amount of time to wait (in milliseconds) between subsequent requests relating to the same operation.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Response from adding a Snapshot.\n */\nexport interface SnapshotResponse extends ConfigurationSnapshot, SyncTokenHeaderField {}\n\n/**\n * Options used when getting a Snapshot.\n */\nexport interface GetSnapshotOptions extends OperationOptions, OptionalSnapshotFields {}\n\n/**\n * Response from getting a Snapshot.\n */\nexport interface GetSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Options used when updating a Snapshot.\n */\nexport interface UpdateSnapshotOptions extends OperationOptions {\n /**\n * The etag for this snapshot\n */\n etag?: string;\n}\n\n/**\n * Response from updating a Snapshot.\n */\nexport interface UpdateSnapshotResponse extends SnapshotResponse {}\n/**\n * Response from updating a Snapshot.\n */\nexport interface CreateSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Fields that uniquely identify a snapshot\n */\nexport interface SnapshotInfo {\n /** The name for this snapshot */\n name: string;\n /** A list of filters used to filter the key-values included in the snapshot. */\n filters: ConfigurationSettingsFilter[];\n /** The composition type describes how the key-values within the snapshot are composed. The 'all' composition type includes all key-values. The 'group_by_key' composition type ensures there are no two key-values containing the same key. */\n compositionType?: SnapshotComposition;\n /** The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used. */\n retentionPeriodInSeconds?: number;\n /** The tags of the snapshot. */\n tags?: { [propertyName: string]: string };\n}\n\nexport {\n ConfigurationSnapshot,\n ConfigurationSettingsFilter,\n SnapshotComposition,\n KnownSnapshotComposition,\n KnownConfigurationSnapshotStatus,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/internal/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,iBAAiB,EAEv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GAAG,iBAAiB,WAAW,CAAC;IACzC,CAAC;SAAM,IACL,iBAAiB,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC/C,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAChD,CAAC;QACD,OAAO,GAAG,kCAAsB,CAAC,eAAe,WAAW,CAAC;IAC9D,CAAC;SAAM,IACL,iBAAiB,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC/C,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAChD,CAAC;QACD,OAAO,GAAG,kCAAsB,CAAC,UAAU,WAAW,CAAC;IACzD,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,kCAAsB,CAAC,gBAAgB,WAAW,CAAC;IAC/D,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n type ConfigurationSetting,\n type ConfigurationSettingParam,\n type HttpOnlyIfChangedField,\n type HttpOnlyIfUnchangedField,\n type HttpResponseField,\n type HttpResponseFields,\n type ListRevisionsOptions,\n type ListSettingsOptions,\n type ListSnapshotsOptions,\n type ConfigurationSnapshot,\n type SnapshotResponse,\n type EtagEntity,\n type ListLabelsOptions,\n KnownAppConfigAudience,\n} from \"../models.js\";\nimport type { FeatureFlagValue } from \"../featureFlag.js\";\nimport { FeatureFlagHelper, featureFlagContentType } from \"../featureFlag.js\";\nimport type {\n GetKeyValuesOptionalParams,\n GetLabelsOptionalParams,\n GetSnapshotsOptionalParams,\n KeyValue,\n} from \"../generated/src/models/index.js\";\nimport type { SecretReferenceValue } from \"../secretReference.js\";\nimport { SecretReferenceHelper, secretReferenceContentType } from \"../secretReference.js\";\nimport type { SnapshotReferenceValue } from \"../snapshotReference.js\";\nimport { SnapshotReferenceHelper, snapshotReferenceContentType } from \"../snapshotReference.js\";\nimport { isDefined } from \"@azure/core-util\";\nimport { logger } from \"../logger.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendConfigurationSettingsOptions\n extends OperationOptions,\n ListSettingsOptions,\n EtagEntity {\n /**\n * A filter used get configuration setting for a snapshot. Not valid when used with 'key' and 'label' filters\n */\n snapshotName?: string;\n}\n\n/**\n * Options for listLabels that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendLabelsRequestOptions extends ListLabelsOptions {}\n\n/**\n * Formats the etag so it can be used with a If-Match/If-None-Match header\n * @internal\n */\nexport function quoteETag(etag: string | undefined): string | undefined {\n // https://tools.ietf.org/html/rfc7232#section-3.1\n if (etag === undefined || etag === \"*\") {\n return etag;\n }\n\n if (etag.startsWith('\"') && etag.endsWith('\"')) {\n return etag;\n }\n\n if (etag.startsWith(\"'\") && etag.endsWith(\"'\")) {\n return etag;\n }\n\n return `\"${etag}\"`;\n}\n\n/**\n * Checks the onlyIfChanged/onlyIfUnchanged properties to make sure we haven't specified both\n * and throws an Error. Otherwise, returns the properties properly quoted.\n * @param options - An options object with onlyIfChanged/onlyIfUnchanged fields\n * @internal\n */\nexport function checkAndFormatIfAndIfNoneMatch(\n objectWithEtag: EtagEntity,\n options: HttpOnlyIfChangedField & HttpOnlyIfUnchangedField,\n): { ifMatch: string | undefined; ifNoneMatch: string | undefined } {\n if (options.onlyIfChanged && options.onlyIfUnchanged) {\n logger.error(\n \"onlyIfChanged and onlyIfUnchanged are both specified\",\n options.onlyIfChanged,\n options.onlyIfUnchanged,\n );\n throw new Error(\"onlyIfChanged and onlyIfUnchanged are mutually-exclusive\");\n }\n\n let ifMatch;\n let ifNoneMatch;\n\n if (options.onlyIfUnchanged) {\n ifMatch = quoteETag(objectWithEtag.etag);\n }\n\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(objectWithEtag.etag);\n }\n\n return {\n ifMatch: ifMatch,\n ifNoneMatch: ifNoneMatch,\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions and ListRevisionsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatFiltersAndSelect(\n listConfigOptions: ListRevisionsOptions,\n): Pick<GetKeyValuesOptionalParams, \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"tags\"> {\n let acceptDatetime: string | undefined = undefined;\n\n if (listConfigOptions.acceptDateTime) {\n acceptDatetime = listConfigOptions.acceptDateTime.toISOString();\n }\n return {\n key: listConfigOptions.keyFilter,\n label: listConfigOptions.labelFilter,\n tags: listConfigOptions.tagsFilter,\n acceptDatetime,\n select: formatFieldsForSelect(listConfigOptions.fields),\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter, labelFilter, snapshotName are moved to key, label, and snapshot respectively.\n *\n * @internal\n */\nexport function formatConfigurationSettingsFiltersAndSelect(\n listConfigOptions: SendConfigurationSettingsOptions,\n): Pick<\n GetKeyValuesOptionalParams,\n \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"snapshot\" | \"tags\"\n> {\n const { snapshotName: snapshot, ...options } = listConfigOptions;\n return {\n ...formatFiltersAndSelect(options),\n snapshot,\n };\n}\n/**\n * Transforms some of the key fields in ListSnapshotsOptions\n * so they can be added to a request using AppConfigurationGetSnapshotsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatSnapshotFiltersAndSelect(\n listSnapshotOptions: ListSnapshotsOptions,\n): Pick<GetSnapshotsOptionalParams, \"name\" | \"select\" | \"status\"> {\n return {\n name: listSnapshotOptions.nameFilter,\n status: listSnapshotOptions.statusFilter,\n select: listSnapshotOptions.fields,\n };\n}\n\n/**\n * Transforms some of the key fields in ListLabelsOptions\n * so they can be added to a request using AppConfigurationGetLabelsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - `nameFilter` are moved to name\n *\n * @internal\n */\nexport function formatLabelsFiltersAndSelect(\n listLabelsOptions: ListLabelsOptions,\n): Pick<GetLabelsOptionalParams, \"name\" | \"select\"> {\n return {\n name: listLabelsOptions.nameFilter,\n select: listLabelsOptions.fields,\n };\n}\n/**\n * Handles translating a Date acceptDateTime into a string as needed by the API\n * @param newOptions - A newer style options with acceptDateTime as a date (and with proper casing!)\n * @internal\n */\nexport function formatAcceptDateTime(newOptions: { acceptDateTime?: Date }): {\n acceptDatetime?: string;\n} {\n return {\n acceptDatetime: newOptions.acceptDateTime && newOptions.acceptDateTime.toISOString(),\n };\n}\n\n/**\n * Take the URL that gets returned from next link and extract the 'after' token needed\n * to get the next page of results.\n * @internal\n */\nexport function extractAfterTokenFromNextLink(nextLink: string): string {\n const searchParams = new URLSearchParams(nextLink);\n const afterToken = searchParams.get(\"after\");\n\n if (afterToken == null || Array.isArray(afterToken)) {\n logger.error(\"Invalid nextLink - invalid after token\", afterToken, Array.isArray(afterToken));\n throw new Error(\"Invalid nextLink - invalid after token\");\n }\n\n return decodeURIComponent(afterToken);\n}\n\n/**\n * Take the header link that gets returned from 304 response and extract the 'after' token needed\n * to get the next page of results.\n *\n * @internal\n */\nexport function extractAfterTokenFromLinkHeader(link: string): string {\n // Example transformation of the link header\n // link:\n // '</kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>; rel=\"next\"'\n //\n // linkValue:\n // </kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>\n //\n // nextLink:\n // /kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4\n const linkValue = link.split(\";\")[0];\n const nextLink = linkValue.substring(1, linkValue.length - 1);\n return extractAfterTokenFromNextLink(nextLink);\n}\n\n/**\n * Makes a ConfigurationSetting-based response throw for all of the data members. Used primarily\n * to prevent possible errors by the user in accessing a model that is uninitialized. This can happen\n * in cases like HTTP status code 204 or 304, which return an empty response body.\n *\n * @param configurationSetting - The configuration setting to alter\n */\nexport function makeConfigurationSettingEmpty(\n configurationSetting: Partial<Record<Exclude<keyof ConfigurationSetting, \"key\">, any>>,\n): void {\n const names: Exclude<keyof ConfigurationSetting, \"key\">[] = [\n \"contentType\",\n \"etag\",\n \"label\",\n \"lastModified\",\n \"isReadOnly\",\n \"tags\",\n \"value\",\n ];\n\n for (const name of names) {\n configurationSetting[name] = undefined;\n }\n}\n\n/**\n * @internal\n */\nexport function transformKeyValue<T>(kvp: T & KeyValue): T & ConfigurationSetting {\n const setting: T & ConfigurationSetting & KeyValue = {\n value: undefined,\n ...kvp,\n isReadOnly: !!kvp.locked,\n };\n delete setting.locked;\n if (!setting.label) {\n delete setting.label;\n }\n if (!setting.contentType) {\n delete setting.contentType;\n }\n return setting;\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSecretReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SecretReferenceValue> {\n return (\n setting.contentType === secretReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSnapshotReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SnapshotReferenceValue> {\n return (\n setting.contentType === snapshotReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithFeatureFlagValue(\n setting: any,\n): setting is ConfigurationSetting<FeatureFlagValue> {\n return (\n setting.contentType === featureFlagContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isSimpleConfigSetting(setting: any): setting is ConfigurationSetting {\n return typeof setting.value === \"string\" || !isDefined(setting.value);\n}\n\n/**\n * @internal\n */\nexport function serializeAsConfigurationSettingParam(\n setting:\n | ConfigurationSettingParam\n | ConfigurationSettingParam<FeatureFlagValue>\n | ConfigurationSettingParam<SecretReferenceValue>\n | ConfigurationSettingParam<SnapshotReferenceValue>,\n): ConfigurationSettingParam {\n if (isSimpleConfigSetting(setting)) {\n return setting as ConfigurationSettingParam;\n }\n try {\n if (isConfigSettingWithFeatureFlagValue(setting)) {\n return FeatureFlagHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSecretReferenceValue(setting)) {\n return SecretReferenceHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSnapshotReferenceValue(setting)) {\n return SnapshotReferenceHelper.toConfigurationSettingParam(setting);\n }\n } catch (error: any) {\n return setting as ConfigurationSettingParam;\n }\n logger.error(\"Unable to serialize to a configuration setting\", setting);\n throw new TypeError(\n `Unable to serialize the setting with key \"${setting.key}\" as a configuration setting`,\n );\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponseWithStatusCode<T extends KeyValue>(\n kvp: T,\n status: number | undefined,\n): ConfigurationSetting & { eTag?: string } & HttpResponseFields {\n const response = {\n ...transformKeyValue(kvp),\n statusCode: status ?? -1,\n };\n\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(response, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n return response;\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponse<T extends KeyValue & { eTag?: string }>(\n kvp: T,\n): ConfigurationSetting {\n const setting = transformKeyValue(kvp);\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(setting, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n\n delete setting.eTag;\n return setting;\n}\n\n/**\n * @internal\n */\nexport function transformSnapshotResponse<T extends ConfigurationSnapshot>(\n snapshot: T,\n): SnapshotResponse {\n if (hasUnderscoreResponse(snapshot)) {\n Object.defineProperty(snapshot, \"_response\", {\n enumerable: false,\n value: snapshot._response,\n });\n }\n return snapshot as any;\n}\n\n/**\n * Translates user-facing field names into their `select` equivalents (these can be\n * seen in the `KnownEnum5`)\n *\n * @param fieldNames - fieldNames from users.\n * @returns The field names translated into the `select` field equivalents.\n *\n * @internal\n */\nexport function formatFieldsForSelect(\n fieldNames: (keyof ConfigurationSetting)[] | undefined,\n): string[] | undefined {\n if (fieldNames == null) {\n return undefined;\n }\n\n const mappedFieldNames = fieldNames.map((fn) => {\n switch (fn) {\n case \"lastModified\":\n return \"last_modified\";\n case \"contentType\":\n return \"content_type\";\n case \"isReadOnly\":\n return \"locked\";\n default:\n return fn;\n }\n });\n\n return mappedFieldNames;\n}\n\n/**\n * @internal\n */\nexport function errorMessageForUnexpectedSetting(\n key: string,\n expectedType: \"FeatureFlag\" | \"SecretReference\",\n): string {\n return `Setting with key ${key} is not a valid ${expectedType}, make sure to have the correct content-type and a valid non-null value.`;\n}\n\nexport function assertResponse<T extends object>(\n result: T,\n): asserts result is T & HttpResponseField<any> {\n if (!hasUnderscoreResponse(result)) {\n Object.defineProperty(result, \"_response\", {\n enumerable: false,\n value:\n \"Something went wrong, _response(raw response) is supposed to be part of the response. Please file a bug at https://github.com/Azure/azure-sdk-for-js\",\n });\n }\n}\n\nexport function hasUnderscoreResponse<T extends object>(\n result: T,\n): result is T & HttpResponseField<any> {\n return Object.prototype.hasOwnProperty.call(result, \"_response\");\n}\n\n/**\n * Get the scope for the App Configuration service based on the endpoint and audience.\n * If the audience is provided, it will be used as the scope.\n * If not, the scope is defaulted to Azure Public Cloud when not specified.\n *\n * @internal\n */\nexport function getScope(appConfigEndpoint: string, appConfigAudience?: string): string {\n if (appConfigAudience) {\n return `${appConfigAudience}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.us\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.us\")\n ) {\n return `${KnownAppConfigAudience.AzureGovernment}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.cn\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.cn\")\n ) {\n return `${KnownAppConfigAudience.AzureChina}/.default`;\n } else {\n return `${KnownAppConfigAudience.AzurePublicCloud}/.default`;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/internal/helpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA0DlC,8BAeC;AAQD,wEA4BC;AAWD,wDAeC;AAWD,kGAWC;AASD,wEAQC;AAUD,oEAOC;AAMD,oDAMC;AAOD,sEAUC;AAQD,0EAaC;AASD,sEAgBC;AAKD,8CAcC;AAmDD,oFA2BC;AAKD,0FAgBC;AAKD,8DAaC;AAKD,8DAUC;AAWD,sDAqBC;AAKD,4EAKC;AAED,wCAUC;AAED,sDAIC;AASD,4BAgBC;AApfD,4CAesB;AAEtB,sDAA8E;AAQ9E,8DAA0F;AAE1F,kEAAgG;AAChG,gDAA6C;AAC7C,4CAAsC;AAuBtC;;;GAGG;AACH,SAAgB,SAAS,CAAC,IAAwB;IAChD,kDAAkD;IAClD,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,IAAI,IAAI,GAAG,CAAC;AACrB,CAAC;AAED;;;;;GAKG;AACH,SAAgB,8BAA8B,CAC5C,cAA0B,EAC1B,OAA0D;IAE1D,IAAI,OAAO,CAAC,aAAa,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;QACrD,kBAAM,CAAC,KAAK,CACV,sDAAsD,EACtD,OAAO,CAAC,aAAa,EACrB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AAW,CAAC;IAC/D,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n type ConfigurationSetting,\n type ConfigurationSettingParam,\n type HttpOnlyIfChangedField,\n type HttpOnlyIfUnchangedField,\n type HttpResponseField,\n type HttpResponseFields,\n type ListRevisionsOptions,\n type ListSettingsOptions,\n type ListSnapshotsOptions,\n type ConfigurationSnapshot,\n type SnapshotResponse,\n type EtagEntity,\n type ListLabelsOptions,\n KnownAppConfigAudience,\n} from \"../models.js\";\nimport type { FeatureFlagValue } from \"../featureFlag.js\";\nimport { FeatureFlagHelper, featureFlagContentType } from \"../featureFlag.js\";\nimport type {\n GetKeyValuesOptionalParams,\n GetLabelsOptionalParams,\n GetSnapshotsOptionalParams,\n KeyValue,\n} from \"../generated/src/models/index.js\";\nimport type { SecretReferenceValue } from \"../secretReference.js\";\nimport { SecretReferenceHelper, secretReferenceContentType } from \"../secretReference.js\";\nimport type { SnapshotReferenceValue } from \"../snapshotReference.js\";\nimport { SnapshotReferenceHelper, snapshotReferenceContentType } from \"../snapshotReference.js\";\nimport { isDefined } from \"@azure/core-util\";\nimport { logger } from \"../logger.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendConfigurationSettingsOptions\n extends OperationOptions, ListSettingsOptions, EtagEntity {\n /**\n * A filter used get configuration setting for a snapshot. Not valid when used with 'key' and 'label' filters\n */\n snapshotName?: string;\n}\n\n/**\n * Options for listLabels that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendLabelsRequestOptions extends ListLabelsOptions {}\n\n/**\n * Formats the etag so it can be used with a If-Match/If-None-Match header\n * @internal\n */\nexport function quoteETag(etag: string | undefined): string | undefined {\n // https://tools.ietf.org/html/rfc7232#section-3.1\n if (etag === undefined || etag === \"*\") {\n return etag;\n }\n\n if (etag.startsWith('\"') && etag.endsWith('\"')) {\n return etag;\n }\n\n if (etag.startsWith(\"'\") && etag.endsWith(\"'\")) {\n return etag;\n }\n\n return `\"${etag}\"`;\n}\n\n/**\n * Checks the onlyIfChanged/onlyIfUnchanged properties to make sure we haven't specified both\n * and throws an Error. Otherwise, returns the properties properly quoted.\n * @param options - An options object with onlyIfChanged/onlyIfUnchanged fields\n * @internal\n */\nexport function checkAndFormatIfAndIfNoneMatch(\n objectWithEtag: EtagEntity,\n options: HttpOnlyIfChangedField & HttpOnlyIfUnchangedField,\n): { ifMatch: string | undefined; ifNoneMatch: string | undefined } {\n if (options.onlyIfChanged && options.onlyIfUnchanged) {\n logger.error(\n \"onlyIfChanged and onlyIfUnchanged are both specified\",\n options.onlyIfChanged,\n options.onlyIfUnchanged,\n );\n throw new Error(\"onlyIfChanged and onlyIfUnchanged are mutually-exclusive\");\n }\n\n let ifMatch;\n let ifNoneMatch;\n\n if (options.onlyIfUnchanged) {\n ifMatch = quoteETag(objectWithEtag.etag);\n }\n\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(objectWithEtag.etag);\n }\n\n return {\n ifMatch: ifMatch,\n ifNoneMatch: ifNoneMatch,\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions and ListRevisionsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatFiltersAndSelect(\n listConfigOptions: ListRevisionsOptions,\n): Pick<GetKeyValuesOptionalParams, \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"tags\"> {\n let acceptDatetime: string | undefined = undefined;\n\n if (listConfigOptions.acceptDateTime) {\n acceptDatetime = listConfigOptions.acceptDateTime.toISOString();\n }\n return {\n key: listConfigOptions.keyFilter,\n label: listConfigOptions.labelFilter,\n tags: listConfigOptions.tagsFilter,\n acceptDatetime,\n select: formatFieldsForSelect(listConfigOptions.fields),\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter, labelFilter, snapshotName are moved to key, label, and snapshot respectively.\n *\n * @internal\n */\nexport function formatConfigurationSettingsFiltersAndSelect(\n listConfigOptions: SendConfigurationSettingsOptions,\n): Pick<\n GetKeyValuesOptionalParams,\n \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"snapshot\" | \"tags\"\n> {\n const { snapshotName: snapshot, ...options } = listConfigOptions;\n return {\n ...formatFiltersAndSelect(options),\n snapshot,\n };\n}\n/**\n * Transforms some of the key fields in ListSnapshotsOptions\n * so they can be added to a request using AppConfigurationGetSnapshotsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatSnapshotFiltersAndSelect(\n listSnapshotOptions: ListSnapshotsOptions,\n): Pick<GetSnapshotsOptionalParams, \"name\" | \"select\" | \"status\"> {\n return {\n name: listSnapshotOptions.nameFilter,\n status: listSnapshotOptions.statusFilter,\n select: listSnapshotOptions.fields,\n };\n}\n\n/**\n * Transforms some of the key fields in ListLabelsOptions\n * so they can be added to a request using AppConfigurationGetLabelsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - `nameFilter` are moved to name\n *\n * @internal\n */\nexport function formatLabelsFiltersAndSelect(\n listLabelsOptions: ListLabelsOptions,\n): Pick<GetLabelsOptionalParams, \"name\" | \"select\"> {\n return {\n name: listLabelsOptions.nameFilter,\n select: listLabelsOptions.fields,\n };\n}\n/**\n * Handles translating a Date acceptDateTime into a string as needed by the API\n * @param newOptions - A newer style options with acceptDateTime as a date (and with proper casing!)\n * @internal\n */\nexport function formatAcceptDateTime(newOptions: { acceptDateTime?: Date }): {\n acceptDatetime?: string;\n} {\n return {\n acceptDatetime: newOptions.acceptDateTime && newOptions.acceptDateTime.toISOString(),\n };\n}\n\n/**\n * Take the URL that gets returned from next link and extract the 'after' token needed\n * to get the next page of results.\n * @internal\n */\nexport function extractAfterTokenFromNextLink(nextLink: string): string {\n const searchParams = new URLSearchParams(nextLink);\n const afterToken = searchParams.get(\"after\");\n\n if (afterToken == null || Array.isArray(afterToken)) {\n logger.error(\"Invalid nextLink - invalid after token\", afterToken, Array.isArray(afterToken));\n throw new Error(\"Invalid nextLink - invalid after token\");\n }\n\n return decodeURIComponent(afterToken);\n}\n\n/**\n * Take the header link that gets returned from 304 response and extract the 'after' token needed\n * to get the next page of results.\n *\n * @internal\n */\nexport function extractAfterTokenFromLinkHeader(link: string): string {\n // Example transformation of the link header\n // link:\n // '</kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>; rel=\"next\"'\n //\n // linkValue:\n // </kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>\n //\n // nextLink:\n // /kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4\n const linkValue = link.split(\";\")[0];\n const nextLink = linkValue.substring(1, linkValue.length - 1);\n return extractAfterTokenFromNextLink(nextLink);\n}\n\n/**\n * Makes a ConfigurationSetting-based response throw for all of the data members. Used primarily\n * to prevent possible errors by the user in accessing a model that is uninitialized. This can happen\n * in cases like HTTP status code 204 or 304, which return an empty response body.\n *\n * @param configurationSetting - The configuration setting to alter\n */\nexport function makeConfigurationSettingEmpty(\n configurationSetting: Partial<Record<Exclude<keyof ConfigurationSetting, \"key\">, any>>,\n): void {\n const names: Exclude<keyof ConfigurationSetting, \"key\">[] = [\n \"contentType\",\n \"etag\",\n \"label\",\n \"lastModified\",\n \"isReadOnly\",\n \"tags\",\n \"value\",\n ];\n\n for (const name of names) {\n configurationSetting[name] = undefined;\n }\n}\n\n/**\n * @internal\n */\nexport function transformKeyValue<T>(kvp: T & KeyValue): T & ConfigurationSetting {\n const setting: T & ConfigurationSetting & KeyValue = {\n value: undefined,\n ...kvp,\n isReadOnly: !!kvp.locked,\n };\n delete setting.locked;\n if (!setting.label) {\n delete setting.label;\n }\n if (!setting.contentType) {\n delete setting.contentType;\n }\n return setting;\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSecretReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SecretReferenceValue> {\n return (\n setting.contentType === secretReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSnapshotReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SnapshotReferenceValue> {\n return (\n setting.contentType === snapshotReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithFeatureFlagValue(\n setting: any,\n): setting is ConfigurationSetting<FeatureFlagValue> {\n return (\n setting.contentType === featureFlagContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isSimpleConfigSetting(setting: any): setting is ConfigurationSetting {\n return typeof setting.value === \"string\" || !isDefined(setting.value);\n}\n\n/**\n * @internal\n */\nexport function serializeAsConfigurationSettingParam(\n setting:\n | ConfigurationSettingParam\n | ConfigurationSettingParam<FeatureFlagValue>\n | ConfigurationSettingParam<SecretReferenceValue>\n | ConfigurationSettingParam<SnapshotReferenceValue>,\n): ConfigurationSettingParam {\n if (isSimpleConfigSetting(setting)) {\n return setting as ConfigurationSettingParam;\n }\n try {\n if (isConfigSettingWithFeatureFlagValue(setting)) {\n return FeatureFlagHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSecretReferenceValue(setting)) {\n return SecretReferenceHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSnapshotReferenceValue(setting)) {\n return SnapshotReferenceHelper.toConfigurationSettingParam(setting);\n }\n } catch (error: any) {\n return setting as ConfigurationSettingParam;\n }\n logger.error(\"Unable to serialize to a configuration setting\", setting);\n throw new TypeError(\n `Unable to serialize the setting with key \"${setting.key}\" as a configuration setting`,\n );\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponseWithStatusCode<T extends KeyValue>(\n kvp: T,\n status: number | undefined,\n): ConfigurationSetting & { eTag?: string } & HttpResponseFields {\n const response = {\n ...transformKeyValue(kvp),\n statusCode: status ?? -1,\n };\n\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(response, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n return response;\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponse<T extends KeyValue & { eTag?: string }>(\n kvp: T,\n): ConfigurationSetting {\n const setting = transformKeyValue(kvp);\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(setting, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n\n delete setting.eTag;\n return setting;\n}\n\n/**\n * @internal\n */\nexport function transformSnapshotResponse<T extends ConfigurationSnapshot>(\n snapshot: T,\n): SnapshotResponse {\n if (hasUnderscoreResponse(snapshot)) {\n Object.defineProperty(snapshot, \"_response\", {\n enumerable: false,\n value: snapshot._response,\n });\n }\n return snapshot as any;\n}\n\n/**\n * Translates user-facing field names into their `select` equivalents (these can be\n * seen in the `KnownEnum5`)\n *\n * @param fieldNames - fieldNames from users.\n * @returns The field names translated into the `select` field equivalents.\n *\n * @internal\n */\nexport function formatFieldsForSelect(\n fieldNames: (keyof ConfigurationSetting)[] | undefined,\n): string[] | undefined {\n if (fieldNames == null) {\n return undefined;\n }\n\n const mappedFieldNames = fieldNames.map((fn) => {\n switch (fn) {\n case \"lastModified\":\n return \"last_modified\";\n case \"contentType\":\n return \"content_type\";\n case \"isReadOnly\":\n return \"locked\";\n default:\n return fn;\n }\n });\n\n return mappedFieldNames;\n}\n\n/**\n * @internal\n */\nexport function errorMessageForUnexpectedSetting(\n key: string,\n expectedType: \"FeatureFlag\" | \"SecretReference\",\n): string {\n return `Setting with key ${key} is not a valid ${expectedType}, make sure to have the correct content-type and a valid non-null value.`;\n}\n\nexport function assertResponse<T extends object>(\n result: T,\n): asserts result is T & HttpResponseField<any> {\n if (!hasUnderscoreResponse(result)) {\n Object.defineProperty(result, \"_response\", {\n enumerable: false,\n value:\n \"Something went wrong, _response(raw response) is supposed to be part of the response. Please file a bug at https://github.com/Azure/azure-sdk-for-js\",\n });\n }\n}\n\nexport function hasUnderscoreResponse<T extends object>(\n result: T,\n): result is T & HttpResponseField<any> {\n return Object.prototype.hasOwnProperty.call(result, \"_response\");\n}\n\n/**\n * Get the scope for the App Configuration service based on the endpoint and audience.\n * If the audience is provided, it will be used as the scope.\n * If not, the scope is defaulted to Azure Public Cloud when not specified.\n *\n * @internal\n */\nexport function getScope(appConfigEndpoint: string, appConfigAudience?: string): string {\n if (appConfigAudience) {\n return `${appConfigAudience}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.us\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.us\")\n ) {\n return `${KnownAppConfigAudience.AzureGovernment}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.cn\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.cn\")\n ) {\n return `${KnownAppConfigAudience.AzureChina}/.default`;\n } else {\n return `${KnownAppConfigAudience.AzurePublicCloud}/.default`;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAs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B,wBAAwB,EACxB,gCAAgC,EAChC,2BAA2B,EAC3B,YAAY,GACb,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAiClC;;GAEG;AACH,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IAChC;;OAEG;IACH,mEAAyC,CAAA;IACzC;;OAEG;IACH,wEAA8C,CAAA;IAC9C;;OAEG;IACH,0EAAgD,CAAA;AAClD,CAAC,EAbW,sBAAsB,sCAAtB,sBAAsB,QAajC;AAwgBD,qDAQkC;AAJhC,oHAAA,wBAAwB,OAAA;AACxB,4HAAA,gCAAgC,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CompatResponse } from \"@azure/core-http-compat\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport type {\n SnapshotComposition,\n ConfigurationSettingsFilter,\n ConfigurationSnapshot,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n\n/**\n * Provides configuration options for AppConfigurationClient.\n */\nexport interface AppConfigurationClientOptions extends CommonClientOptions {\n /**\n * The API version to use when interacting with the service. The default value is `2023-11-01`.\n * Note that overriding this default value may result in unsupported behavior.\n */\n apiVersion?: string;\n\n /**\n * The Audience to use for authentication with Azure Active Directory (AAD).\n * {@link KnownAppConfigAudience} can be used interchangeably with audience.\n * If not specified, the default audience will be set to Azure Public Cloud.\n */\n audience?: string;\n}\n\n/**\n * Known values for Azure App Configuration Audience\n */\nexport enum KnownAppConfigAudience {\n /**\n * Audience for Azure China\n */\n AzureChina = \"https://appconfig.azure.cn\",\n /**\n * Audience for Azure Government\n */\n AzureGovernment = \"https://appconfig.azure.us\",\n /**\n * Audience for Azure Public\n */\n AzurePublicCloud = \"https://appconfig.azure.com\",\n}\n\n/**\n * Fields that uniquely identify a configuration setting\n */\nexport interface ConfigurationSettingId {\n /**\n * The etag for this setting\n */\n etag?: string;\n /**\n * The key for this setting.\n * Feature flags must be prefixed with `.appconfig.featureflag/<feature-flag-name>`.\n */\n key: string;\n\n /**\n * The label for this setting. Leaving this undefined means this\n * setting does not have a label.\n */\n label?: string;\n}\n/**\n * Necessary fields for updating or creating a new configuration setting\n */\nexport type ConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingId & {\n /**\n * The content type of the setting's value\n */\n contentType?: string;\n\n /**\n * Tags for this key\n */\n tags?: { [propertyName: string]: string };\n} & (T extends string\n ? {\n /**\n * The setting's value\n */\n value?: string;\n }\n : {\n /**\n * The setting's value\n */\n value: T;\n });\n\n/**\n * Configuration setting with extra metadata from the server, indicating\n * its etag, whether it is currently readOnly and when it was last modified.\n */\nexport type ConfigurationSetting<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T> & {\n /**\n * Whether or not the setting is read-only\n */\n isReadOnly: boolean;\n\n /**\n * The date when this setting was last modified\n */\n lastModified?: Date;\n};\n\n/**\n * Fields that are hoisted up from the _response field of the object\n * Used in cases where individual HTTP response fields are important for\n * the user to use in common-use cases like handling http status codes 204 or 304.\n */\nexport interface HttpResponseFields {\n /**\n * The HTTP status code for the response\n */\n statusCode: number;\n}\n/**\n * HTTP response related information - headers and raw body.\n */\nexport interface HttpResponseField<HeadersT> {\n /**\n * The underlying HTTP response.\n */\n _response: CompatResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: HeadersT;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n };\n}\n/**\n * Parameters for adding a new configuration setting\n */\nexport type AddConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Parameters for creating or updating a new configuration setting\n */\nexport type SetConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Standard base response for getting, deleting or updating a configuration setting\n */\nexport type ConfigurationSettingResponse<HeadersT> = ConfigurationSetting &\n HttpResponseField<HeadersT> &\n Pick<HeadersT, Exclude<keyof HeadersT, \"eTag\">>;\n\n/**\n * Options used to provide if-none-match for an HTTP request\n */\nexport interface HttpOnlyIfChangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag does not match the value\n * provided.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Options used to provide if-match for an HTTP request\n */\nexport interface HttpOnlyIfUnchangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag matches the value provided.\n */\n onlyIfUnchanged?: boolean;\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSetting)[];\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalSnapshotFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSnapshot)[];\n}\n\n/**\n * Used when the API supports selectively returning labels fields.\n */\nexport interface OptionalLabelsFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof SettingLabel)[];\n}\n/**\n * Sync token header field\n */\nexport interface SyncTokenHeaderField {\n /**\n * Enables real-time consistency between requests by providing the returned value in the next\n * request made to the server.\n */\n syncToken?: string;\n}\n\n/**\n * Options used when adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingOptions extends OperationOptions {}\n\n/**\n * Response from adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingResponse\n extends ConfigurationSetting,\n SyncTokenHeaderField,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Response from deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingResponse\n extends SyncTokenHeaderField,\n HttpResponseFields,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options for deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField,\n OperationOptions {}\n\n/**\n * Options used when saving a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField,\n OperationOptions {}\n\n/**\n * Response from setting a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingResponse\n extends ConfigurationSetting,\n SyncTokenHeaderField,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Headers from getting a ConfigurationSetting.\n */\nexport interface GetConfigurationHeaders extends SyncTokenHeaderField {}\n\n/**\n * Response from retrieving a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingResponse\n extends ConfigurationSetting,\n GetConfigurationHeaders,\n HttpResponseFields,\n HttpResponseField<GetConfigurationHeaders> {}\n\n/**\n * Options for getting a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingOptions\n extends OperationOptions,\n HttpOnlyIfChangedField,\n OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSettingsOptions extends OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n\n /**\n * Filters for keys. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 key names are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|---------------------------------------|\n * | omitted or * | Matches any key |\n * | abc | Matches a key named abc |\n * | abc* | Matches key names that start with abc |\n *\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n */\n keyFilter?: string;\n\n /* eslint-disable tsdoc/syntax */\n /**\n * Filters for labels. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 labels are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|------------------------------------------------------|\n * | omitted or * | Matches any key |\n * | \\0 | Matches any key without a label (URL encoded as %00) |\n * | prod | Matches a key with label named prod |\n * | prod* | Matches key with label names that start with prod |\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n *\n * Reference: https://learn.microsoft.com/azure/azure-app-configuration/rest-api-key-value\n */\n labelFilter?: string;\n\n /** A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering */\n tagsFilter?: string[];\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListConfigurationSettingsForSnapshotOptions\n extends OperationOptions,\n OptionalFields {}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListConfigurationSettingsOptions extends OperationOptions, ListSettingsOptions {\n /**\n * Etags list for page\n */\n pageEtags?: string[];\n}\n\n/**\n * Options for listLabels\n */\nexport interface ListLabelsOptions extends OperationOptions, OptionalLabelsFields {\n /** A filter for the name of the returned labels. */\n nameFilter?: string;\n\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSnapshots extends OptionalSnapshotFields {\n /** A filter for the name of the returned snapshots. */\n nameFilter?: string;\n\n /** Used to filter returned snapshots by their status property. */\n statusFilter?: ConfigurationSnapshotStatus[];\n}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListSnapshotsOptions\n extends OperationOptions,\n ListSnapshots,\n OptionalSnapshotFields {}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n // The appconfig service doesn't currently support letting you select a page size\n // so we're ignoring their setting for now.\n}\n\n/**\n * Entity with etag.\n */\nexport interface EtagEntity {\n /**\n * The etag for this entity\n */\n etag?: string;\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListConfigurationSettingPage\n extends HttpResponseField<SyncTokenHeaderField>,\n PageSettings,\n EtagEntity {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListLabelsPage\n extends HttpResponseField<SyncTokenHeaderField>,\n PageSettings,\n EtagEntity {\n /**\n * The collection of labels\n */\n items: SettingLabel[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListSnapshotsPage extends SyncTokenHeaderField, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSnapshot[];\n}\n\n/**\n * Options for listRevisions that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListRevisionsOptions extends OperationOptions, ListSettingsOptions {}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListRevisionsPage extends HttpResponseField<SyncTokenHeaderField>, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * Options for setReadOnly\n */\nexport interface SetReadOnlyOptions extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Response when setting a value to read-only.\n */\nexport interface SetReadOnlyResponse\n extends ConfigurationSetting,\n SyncTokenHeaderField,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface RetryOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation.\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * Options used when creating a Snapshot.\n */\nexport interface CreateSnapshotOptions extends OperationOptions {\n /**\n * The amount of time to wait (in milliseconds) between subsequent requests relating to the same operation.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Response from adding a Snapshot.\n */\nexport interface SnapshotResponse extends ConfigurationSnapshot, SyncTokenHeaderField {}\n\n/**\n * Options used when getting a Snapshot.\n */\nexport interface GetSnapshotOptions extends OperationOptions, OptionalSnapshotFields {}\n\n/**\n * Response from getting a Snapshot.\n */\nexport interface GetSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Options used when updating a Snapshot.\n */\nexport interface UpdateSnapshotOptions extends OperationOptions {\n /**\n * The etag for this snapshot\n */\n etag?: string;\n}\n\n/**\n * Response from updating a Snapshot.\n */\nexport interface UpdateSnapshotResponse extends SnapshotResponse {}\n/**\n * Response from updating a Snapshot.\n */\nexport interface CreateSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Fields that uniquely identify a snapshot\n */\nexport interface SnapshotInfo {\n /** The name for this snapshot */\n name: string;\n /** A list of filters used to filter the key-values included in the snapshot. */\n filters: ConfigurationSettingsFilter[];\n /** The composition type describes how the key-values within the snapshot are composed. The 'all' composition type includes all key-values. The 'group_by_key' composition type ensures there are no two key-values containing the same key. */\n compositionType?: SnapshotComposition;\n /** The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used. */\n retentionPeriodInSeconds?: number;\n /** The tags of the snapshot. */\n tags?: { [propertyName: string]: string };\n}\n\nexport {\n ConfigurationSnapshot,\n ConfigurationSettingsFilter,\n SnapshotComposition,\n KnownSnapshotComposition,\n KnownConfigurationSnapshotStatus,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAiClC;;GAEG;AACH,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IAChC;;OAEG;IACH,mEAAyC,CAAA;IACzC;;OAEG;IACH,wEAA8C,CAAA;IAC9C;;OAEG;IACH,0EAAgD,CAAA;AAClD,CAAC,EAbW,sBAAsB,sCAAtB,sBAAsB,QAajC;AAsfD,qDAQkC;AAJhC,oHAAA,wBAAwB,OAAA;AACxB,4HAAA,gCAAgC,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CompatResponse } from \"@azure/core-http-compat\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport type {\n SnapshotComposition,\n ConfigurationSettingsFilter,\n ConfigurationSnapshot,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n\n/**\n * Provides configuration options for AppConfigurationClient.\n */\nexport interface AppConfigurationClientOptions extends CommonClientOptions {\n /**\n * The API version to use when interacting with the service. The default value is `2023-11-01`.\n * Note that overriding this default value may result in unsupported behavior.\n */\n apiVersion?: string;\n\n /**\n * The Audience to use for authentication with Azure Active Directory (AAD).\n * {@link KnownAppConfigAudience} can be used interchangeably with audience.\n * If not specified, the default audience will be set to Azure Public Cloud.\n */\n audience?: string;\n}\n\n/**\n * Known values for Azure App Configuration Audience\n */\nexport enum KnownAppConfigAudience {\n /**\n * Audience for Azure China\n */\n AzureChina = \"https://appconfig.azure.cn\",\n /**\n * Audience for Azure Government\n */\n AzureGovernment = \"https://appconfig.azure.us\",\n /**\n * Audience for Azure Public\n */\n AzurePublicCloud = \"https://appconfig.azure.com\",\n}\n\n/**\n * Fields that uniquely identify a configuration setting\n */\nexport interface ConfigurationSettingId {\n /**\n * The etag for this setting\n */\n etag?: string;\n /**\n * The key for this setting.\n * Feature flags must be prefixed with `.appconfig.featureflag/<feature-flag-name>`.\n */\n key: string;\n\n /**\n * The label for this setting. Leaving this undefined means this\n * setting does not have a label.\n */\n label?: string;\n}\n/**\n * Necessary fields for updating or creating a new configuration setting\n */\nexport type ConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingId & {\n /**\n * The content type of the setting's value\n */\n contentType?: string;\n\n /**\n * Tags for this key\n */\n tags?: { [propertyName: string]: string };\n} & (T extends string\n ? {\n /**\n * The setting's value\n */\n value?: string;\n }\n : {\n /**\n * The setting's value\n */\n value: T;\n });\n\n/**\n * Configuration setting with extra metadata from the server, indicating\n * its etag, whether it is currently readOnly and when it was last modified.\n */\nexport type ConfigurationSetting<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T> & {\n /**\n * Whether or not the setting is read-only\n */\n isReadOnly: boolean;\n\n /**\n * The date when this setting was last modified\n */\n lastModified?: Date;\n};\n\n/**\n * Fields that are hoisted up from the _response field of the object\n * Used in cases where individual HTTP response fields are important for\n * the user to use in common-use cases like handling http status codes 204 or 304.\n */\nexport interface HttpResponseFields {\n /**\n * The HTTP status code for the response\n */\n statusCode: number;\n}\n/**\n * HTTP response related information - headers and raw body.\n */\nexport interface HttpResponseField<HeadersT> {\n /**\n * The underlying HTTP response.\n */\n _response: CompatResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: HeadersT;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n };\n}\n/**\n * Parameters for adding a new configuration setting\n */\nexport type AddConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Parameters for creating or updating a new configuration setting\n */\nexport type SetConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Standard base response for getting, deleting or updating a configuration setting\n */\nexport type ConfigurationSettingResponse<HeadersT> = ConfigurationSetting &\n HttpResponseField<HeadersT> &\n Pick<HeadersT, Exclude<keyof HeadersT, \"eTag\">>;\n\n/**\n * Options used to provide if-none-match for an HTTP request\n */\nexport interface HttpOnlyIfChangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag does not match the value\n * provided.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Options used to provide if-match for an HTTP request\n */\nexport interface HttpOnlyIfUnchangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag matches the value provided.\n */\n onlyIfUnchanged?: boolean;\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSetting)[];\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalSnapshotFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSnapshot)[];\n}\n\n/**\n * Used when the API supports selectively returning labels fields.\n */\nexport interface OptionalLabelsFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof SettingLabel)[];\n}\n/**\n * Sync token header field\n */\nexport interface SyncTokenHeaderField {\n /**\n * Enables real-time consistency between requests by providing the returned value in the next\n * request made to the server.\n */\n syncToken?: string;\n}\n\n/**\n * Options used when adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingOptions extends OperationOptions {}\n\n/**\n * Response from adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingResponse\n extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Response from deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingResponse\n extends SyncTokenHeaderField, HttpResponseFields, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options for deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Options used when saving a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Response from setting a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingResponse\n extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Headers from getting a ConfigurationSetting.\n */\nexport interface GetConfigurationHeaders extends SyncTokenHeaderField {}\n\n/**\n * Response from retrieving a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingResponse\n extends\n ConfigurationSetting,\n GetConfigurationHeaders,\n HttpResponseFields,\n HttpResponseField<GetConfigurationHeaders> {}\n\n/**\n * Options for getting a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingOptions\n extends OperationOptions, HttpOnlyIfChangedField, OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSettingsOptions extends OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n\n /**\n * Filters for keys. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 key names are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|---------------------------------------|\n * | omitted or * | Matches any key |\n * | abc | Matches a key named abc |\n * | abc* | Matches key names that start with abc |\n *\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n */\n keyFilter?: string;\n\n /* eslint-disable tsdoc/syntax */\n /**\n * Filters for labels. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 labels are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|------------------------------------------------------|\n * | omitted or * | Matches any key |\n * | \\0 | Matches any key without a label (URL encoded as %00) |\n * | prod | Matches a key with label named prod |\n * | prod* | Matches key with label names that start with prod |\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n *\n * Reference: https://learn.microsoft.com/azure/azure-app-configuration/rest-api-key-value\n */\n labelFilter?: string;\n\n /** A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering */\n tagsFilter?: string[];\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListConfigurationSettingsForSnapshotOptions\n extends OperationOptions, OptionalFields {}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListConfigurationSettingsOptions extends OperationOptions, ListSettingsOptions {\n /**\n * Etags list for page\n */\n pageEtags?: string[];\n}\n\n/**\n * Options for listLabels\n */\nexport interface ListLabelsOptions extends OperationOptions, OptionalLabelsFields {\n /** A filter for the name of the returned labels. */\n nameFilter?: string;\n\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSnapshots extends OptionalSnapshotFields {\n /** A filter for the name of the returned snapshots. */\n nameFilter?: string;\n\n /** Used to filter returned snapshots by their status property. */\n statusFilter?: ConfigurationSnapshotStatus[];\n}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListSnapshotsOptions\n extends OperationOptions, ListSnapshots, OptionalSnapshotFields {}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n // The appconfig service doesn't currently support letting you select a page size\n // so we're ignoring their setting for now.\n}\n\n/**\n * Entity with etag.\n */\nexport interface EtagEntity {\n /**\n * The etag for this entity\n */\n etag?: string;\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListConfigurationSettingPage\n extends HttpResponseField<SyncTokenHeaderField>, PageSettings, EtagEntity {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListLabelsPage\n extends HttpResponseField<SyncTokenHeaderField>, PageSettings, EtagEntity {\n /**\n * The collection of labels\n */\n items: SettingLabel[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListSnapshotsPage extends SyncTokenHeaderField, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSnapshot[];\n}\n\n/**\n * Options for listRevisions that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListRevisionsOptions extends OperationOptions, ListSettingsOptions {}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListRevisionsPage extends HttpResponseField<SyncTokenHeaderField>, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * Options for setReadOnly\n */\nexport interface SetReadOnlyOptions extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Response when setting a value to read-only.\n */\nexport interface SetReadOnlyResponse\n extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface RetryOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation.\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * Options used when creating a Snapshot.\n */\nexport interface CreateSnapshotOptions extends OperationOptions {\n /**\n * The amount of time to wait (in milliseconds) between subsequent requests relating to the same operation.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Response from adding a Snapshot.\n */\nexport interface SnapshotResponse extends ConfigurationSnapshot, SyncTokenHeaderField {}\n\n/**\n * Options used when getting a Snapshot.\n */\nexport interface GetSnapshotOptions extends OperationOptions, OptionalSnapshotFields {}\n\n/**\n * Response from getting a Snapshot.\n */\nexport interface GetSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Options used when updating a Snapshot.\n */\nexport interface UpdateSnapshotOptions extends OperationOptions {\n /**\n * The etag for this snapshot\n */\n etag?: string;\n}\n\n/**\n * Response from updating a Snapshot.\n */\nexport interface UpdateSnapshotResponse extends SnapshotResponse {}\n/**\n * Response from updating a Snapshot.\n */\nexport interface CreateSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Fields that uniquely identify a snapshot\n */\nexport interface SnapshotInfo {\n /** The name for this snapshot */\n name: string;\n /** A list of filters used to filter the key-values included in the snapshot. */\n filters: ConfigurationSettingsFilter[];\n /** The composition type describes how the key-values within the snapshot are composed. The 'all' composition type includes all key-values. The 'group_by_key' composition type ensures there are no two key-values containing the same key. */\n compositionType?: SnapshotComposition;\n /** The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used. */\n retentionPeriodInSeconds?: number;\n /** The tags of the snapshot. */\n tags?: { [propertyName: string]: string };\n}\n\nexport {\n ConfigurationSnapshot,\n ConfigurationSettingsFilter,\n SnapshotComposition,\n KnownSnapshotComposition,\n KnownConfigurationSnapshotStatus,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/internal/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,o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AE,WAAW,CAAC,CAAC;AACnE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,iBAAyB,EAAE,iBAA0B;IAC5E,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO,GAAG,iBAAiB,WAAW,CAAC;IACzC,CAAC;SAAM,IACL,iBAAiB,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC/C,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAChD,CAAC;QACD,OAAO,GAAG,sBAAsB,CAAC,eAAe,WAAW,CAAC;IAC9D,CAAC;SAAM,IACL,iBAAiB,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC/C,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAChD,CAAC;QACD,OAAO,GAAG,sBAAsB,CAAC,UAAU,WAAW,CAAC;IACzD,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,sBAAsB,CAAC,gBAAgB,WAAW,CAAC;IAC/D,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n type ConfigurationSetting,\n type ConfigurationSettingParam,\n type HttpOnlyIfChangedField,\n type HttpOnlyIfUnchangedField,\n type HttpResponseField,\n type HttpResponseFields,\n type ListRevisionsOptions,\n type ListSettingsOptions,\n type ListSnapshotsOptions,\n type ConfigurationSnapshot,\n type SnapshotResponse,\n type EtagEntity,\n type ListLabelsOptions,\n KnownAppConfigAudience,\n} from \"../models.js\";\nimport type { FeatureFlagValue } from \"../featureFlag.js\";\nimport { FeatureFlagHelper, featureFlagContentType } from \"../featureFlag.js\";\nimport type {\n GetKeyValuesOptionalParams,\n GetLabelsOptionalParams,\n GetSnapshotsOptionalParams,\n KeyValue,\n} from \"../generated/src/models/index.js\";\nimport type { SecretReferenceValue } from \"../secretReference.js\";\nimport { SecretReferenceHelper, secretReferenceContentType } from \"../secretReference.js\";\nimport type { SnapshotReferenceValue } from \"../snapshotReference.js\";\nimport { SnapshotReferenceHelper, snapshotReferenceContentType } from \"../snapshotReference.js\";\nimport { isDefined } from \"@azure/core-util\";\nimport { logger } from \"../logger.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendConfigurationSettingsOptions\n extends OperationOptions,\n ListSettingsOptions,\n EtagEntity {\n /**\n * A filter used get configuration setting for a snapshot. Not valid when used with 'key' and 'label' filters\n */\n snapshotName?: string;\n}\n\n/**\n * Options for listLabels that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendLabelsRequestOptions extends ListLabelsOptions {}\n\n/**\n * Formats the etag so it can be used with a If-Match/If-None-Match header\n * @internal\n */\nexport function quoteETag(etag: string | undefined): string | undefined {\n // https://tools.ietf.org/html/rfc7232#section-3.1\n if (etag === undefined || etag === \"*\") {\n return etag;\n }\n\n if (etag.startsWith('\"') && etag.endsWith('\"')) {\n return etag;\n }\n\n if (etag.startsWith(\"'\") && etag.endsWith(\"'\")) {\n return etag;\n }\n\n return `\"${etag}\"`;\n}\n\n/**\n * Checks the onlyIfChanged/onlyIfUnchanged properties to make sure we haven't specified both\n * and throws an Error. Otherwise, returns the properties properly quoted.\n * @param options - An options object with onlyIfChanged/onlyIfUnchanged fields\n * @internal\n */\nexport function checkAndFormatIfAndIfNoneMatch(\n objectWithEtag: EtagEntity,\n options: HttpOnlyIfChangedField & HttpOnlyIfUnchangedField,\n): { ifMatch: string | undefined; ifNoneMatch: string | undefined } {\n if (options.onlyIfChanged && options.onlyIfUnchanged) {\n logger.error(\n \"onlyIfChanged and onlyIfUnchanged are both specified\",\n options.onlyIfChanged,\n options.onlyIfUnchanged,\n );\n throw new Error(\"onlyIfChanged and onlyIfUnchanged are mutually-exclusive\");\n }\n\n let ifMatch;\n let ifNoneMatch;\n\n if (options.onlyIfUnchanged) {\n ifMatch = quoteETag(objectWithEtag.etag);\n }\n\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(objectWithEtag.etag);\n }\n\n return {\n ifMatch: ifMatch,\n ifNoneMatch: ifNoneMatch,\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions and ListRevisionsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatFiltersAndSelect(\n listConfigOptions: ListRevisionsOptions,\n): Pick<GetKeyValuesOptionalParams, \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"tags\"> {\n let acceptDatetime: string | undefined = undefined;\n\n if (listConfigOptions.acceptDateTime) {\n acceptDatetime = listConfigOptions.acceptDateTime.toISOString();\n }\n return {\n key: listConfigOptions.keyFilter,\n label: listConfigOptions.labelFilter,\n tags: listConfigOptions.tagsFilter,\n acceptDatetime,\n select: formatFieldsForSelect(listConfigOptions.fields),\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter, labelFilter, snapshotName are moved to key, label, and snapshot respectively.\n *\n * @internal\n */\nexport function formatConfigurationSettingsFiltersAndSelect(\n listConfigOptions: SendConfigurationSettingsOptions,\n): Pick<\n GetKeyValuesOptionalParams,\n \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"snapshot\" | \"tags\"\n> {\n const { snapshotName: snapshot, ...options } = listConfigOptions;\n return {\n ...formatFiltersAndSelect(options),\n snapshot,\n };\n}\n/**\n * Transforms some of the key fields in ListSnapshotsOptions\n * so they can be added to a request using AppConfigurationGetSnapshotsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatSnapshotFiltersAndSelect(\n listSnapshotOptions: ListSnapshotsOptions,\n): Pick<GetSnapshotsOptionalParams, \"name\" | \"select\" | \"status\"> {\n return {\n name: listSnapshotOptions.nameFilter,\n status: listSnapshotOptions.statusFilter,\n select: listSnapshotOptions.fields,\n };\n}\n\n/**\n * Transforms some of the key fields in ListLabelsOptions\n * so they can be added to a request using AppConfigurationGetLabelsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - `nameFilter` are moved to name\n *\n * @internal\n */\nexport function formatLabelsFiltersAndSelect(\n listLabelsOptions: ListLabelsOptions,\n): Pick<GetLabelsOptionalParams, \"name\" | \"select\"> {\n return {\n name: listLabelsOptions.nameFilter,\n select: listLabelsOptions.fields,\n };\n}\n/**\n * Handles translating a Date acceptDateTime into a string as needed by the API\n * @param newOptions - A newer style options with acceptDateTime as a date (and with proper casing!)\n * @internal\n */\nexport function formatAcceptDateTime(newOptions: { acceptDateTime?: Date }): {\n acceptDatetime?: string;\n} {\n return {\n acceptDatetime: newOptions.acceptDateTime && newOptions.acceptDateTime.toISOString(),\n };\n}\n\n/**\n * Take the URL that gets returned from next link and extract the 'after' token needed\n * to get the next page of results.\n * @internal\n */\nexport function extractAfterTokenFromNextLink(nextLink: string): string {\n const searchParams = new URLSearchParams(nextLink);\n const afterToken = searchParams.get(\"after\");\n\n if (afterToken == null || Array.isArray(afterToken)) {\n logger.error(\"Invalid nextLink - invalid after token\", afterToken, Array.isArray(afterToken));\n throw new Error(\"Invalid nextLink - invalid after token\");\n }\n\n return decodeURIComponent(afterToken);\n}\n\n/**\n * Take the header link that gets returned from 304 response and extract the 'after' token needed\n * to get the next page of results.\n *\n * @internal\n */\nexport function extractAfterTokenFromLinkHeader(link: string): string {\n // Example transformation of the link header\n // link:\n // '</kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>; rel=\"next\"'\n //\n // linkValue:\n // </kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>\n //\n // nextLink:\n // /kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4\n const linkValue = link.split(\";\")[0];\n const nextLink = linkValue.substring(1, linkValue.length - 1);\n return extractAfterTokenFromNextLink(nextLink);\n}\n\n/**\n * Makes a ConfigurationSetting-based response throw for all of the data members. Used primarily\n * to prevent possible errors by the user in accessing a model that is uninitialized. This can happen\n * in cases like HTTP status code 204 or 304, which return an empty response body.\n *\n * @param configurationSetting - The configuration setting to alter\n */\nexport function makeConfigurationSettingEmpty(\n configurationSetting: Partial<Record<Exclude<keyof ConfigurationSetting, \"key\">, any>>,\n): void {\n const names: Exclude<keyof ConfigurationSetting, \"key\">[] = [\n \"contentType\",\n \"etag\",\n \"label\",\n \"lastModified\",\n \"isReadOnly\",\n \"tags\",\n \"value\",\n ];\n\n for (const name of names) {\n configurationSetting[name] = undefined;\n }\n}\n\n/**\n * @internal\n */\nexport function transformKeyValue<T>(kvp: T & KeyValue): T & ConfigurationSetting {\n const setting: T & ConfigurationSetting & KeyValue = {\n value: undefined,\n ...kvp,\n isReadOnly: !!kvp.locked,\n };\n delete setting.locked;\n if (!setting.label) {\n delete setting.label;\n }\n if (!setting.contentType) {\n delete setting.contentType;\n }\n return setting;\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSecretReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SecretReferenceValue> {\n return (\n setting.contentType === secretReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSnapshotReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SnapshotReferenceValue> {\n return (\n setting.contentType === snapshotReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithFeatureFlagValue(\n setting: any,\n): setting is ConfigurationSetting<FeatureFlagValue> {\n return (\n setting.contentType === featureFlagContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isSimpleConfigSetting(setting: any): setting is ConfigurationSetting {\n return typeof setting.value === \"string\" || !isDefined(setting.value);\n}\n\n/**\n * @internal\n */\nexport function serializeAsConfigurationSettingParam(\n setting:\n | ConfigurationSettingParam\n | ConfigurationSettingParam<FeatureFlagValue>\n | ConfigurationSettingParam<SecretReferenceValue>\n | ConfigurationSettingParam<SnapshotReferenceValue>,\n): ConfigurationSettingParam {\n if (isSimpleConfigSetting(setting)) {\n return setting as ConfigurationSettingParam;\n }\n try {\n if (isConfigSettingWithFeatureFlagValue(setting)) {\n return FeatureFlagHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSecretReferenceValue(setting)) {\n return SecretReferenceHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSnapshotReferenceValue(setting)) {\n return SnapshotReferenceHelper.toConfigurationSettingParam(setting);\n }\n } catch (error: any) {\n return setting as ConfigurationSettingParam;\n }\n logger.error(\"Unable to serialize to a configuration setting\", setting);\n throw new TypeError(\n `Unable to serialize the setting with key \"${setting.key}\" as a configuration setting`,\n );\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponseWithStatusCode<T extends KeyValue>(\n kvp: T,\n status: number | undefined,\n): ConfigurationSetting & { eTag?: string } & HttpResponseFields {\n const response = {\n ...transformKeyValue(kvp),\n statusCode: status ?? -1,\n };\n\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(response, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n return response;\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponse<T extends KeyValue & { eTag?: string }>(\n kvp: T,\n): ConfigurationSetting {\n const setting = transformKeyValue(kvp);\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(setting, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n\n delete setting.eTag;\n return setting;\n}\n\n/**\n * @internal\n */\nexport function transformSnapshotResponse<T extends ConfigurationSnapshot>(\n snapshot: T,\n): SnapshotResponse {\n if (hasUnderscoreResponse(snapshot)) {\n Object.defineProperty(snapshot, \"_response\", {\n enumerable: false,\n value: snapshot._response,\n });\n }\n return snapshot as any;\n}\n\n/**\n * Translates user-facing field names into their `select` equivalents (these can be\n * seen in the `KnownEnum5`)\n *\n * @param fieldNames - fieldNames from users.\n * @returns The field names translated into the `select` field equivalents.\n *\n * @internal\n */\nexport function formatFieldsForSelect(\n fieldNames: (keyof ConfigurationSetting)[] | undefined,\n): string[] | undefined {\n if (fieldNames == null) {\n return undefined;\n }\n\n const mappedFieldNames = fieldNames.map((fn) => {\n switch (fn) {\n case \"lastModified\":\n return \"last_modified\";\n case \"contentType\":\n return \"content_type\";\n case \"isReadOnly\":\n return \"locked\";\n default:\n return fn;\n }\n });\n\n return mappedFieldNames;\n}\n\n/**\n * @internal\n */\nexport function errorMessageForUnexpectedSetting(\n key: string,\n expectedType: \"FeatureFlag\" | \"SecretReference\",\n): string {\n return `Setting with key ${key} is not a valid ${expectedType}, make sure to have the correct content-type and a valid non-null value.`;\n}\n\nexport function assertResponse<T extends object>(\n result: T,\n): asserts result is T & HttpResponseField<any> {\n if (!hasUnderscoreResponse(result)) {\n Object.defineProperty(result, \"_response\", {\n enumerable: false,\n value:\n \"Something went wrong, _response(raw response) is supposed to be part of the response. Please file a bug at https://github.com/Azure/azure-sdk-for-js\",\n });\n }\n}\n\nexport function hasUnderscoreResponse<T extends object>(\n result: T,\n): result is T & HttpResponseField<any> {\n return Object.prototype.hasOwnProperty.call(result, \"_response\");\n}\n\n/**\n * Get the scope for the App Configuration service based on the endpoint and audience.\n * If the audience is provided, it will be used as the scope.\n * If not, the scope is defaulted to Azure Public Cloud when not specified.\n *\n * @internal\n */\nexport function getScope(appConfigEndpoint: string, appConfigAudience?: string): string {\n if (appConfigAudience) {\n return `${appConfigAudience}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.us\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.us\")\n ) {\n return `${KnownAppConfigAudience.AzureGovernment}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.cn\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.cn\")\n ) {\n return `${KnownAppConfigAudience.AzureChina}/.default`;\n } else {\n return `${KnownAppConfigAudience.AzurePublicCloud}/.default`;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/internal/helpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAcL,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAQ9E,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAE1F,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAuBtC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,IAAwB;IAChD,kDAAkD;IAClD,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,IAAI,IAAI,GAAG,CAAC;AACrB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,8BAA8B,CAC5C,cA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AAC,QAAQ,CAAC,mBAAmB,CAAC;QAC/C,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAChD,CAAC;QACD,OAAO,GAAG,sBAAsB,CAAC,UAAU,WAAW,CAAC;IACzD,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,sBAAsB,CAAC,gBAAgB,WAAW,CAAC;IAC/D,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n type ConfigurationSetting,\n type ConfigurationSettingParam,\n type HttpOnlyIfChangedField,\n type HttpOnlyIfUnchangedField,\n type HttpResponseField,\n type HttpResponseFields,\n type ListRevisionsOptions,\n type ListSettingsOptions,\n type ListSnapshotsOptions,\n type ConfigurationSnapshot,\n type SnapshotResponse,\n type EtagEntity,\n type ListLabelsOptions,\n KnownAppConfigAudience,\n} from \"../models.js\";\nimport type { FeatureFlagValue } from \"../featureFlag.js\";\nimport { FeatureFlagHelper, featureFlagContentType } from \"../featureFlag.js\";\nimport type {\n GetKeyValuesOptionalParams,\n GetLabelsOptionalParams,\n GetSnapshotsOptionalParams,\n KeyValue,\n} from \"../generated/src/models/index.js\";\nimport type { SecretReferenceValue } from \"../secretReference.js\";\nimport { SecretReferenceHelper, secretReferenceContentType } from \"../secretReference.js\";\nimport type { SnapshotReferenceValue } from \"../snapshotReference.js\";\nimport { SnapshotReferenceHelper, snapshotReferenceContentType } from \"../snapshotReference.js\";\nimport { isDefined } from \"@azure/core-util\";\nimport { logger } from \"../logger.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendConfigurationSettingsOptions\n extends OperationOptions, ListSettingsOptions, EtagEntity {\n /**\n * A filter used get configuration setting for a snapshot. Not valid when used with 'key' and 'label' filters\n */\n snapshotName?: string;\n}\n\n/**\n * Options for listLabels that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendLabelsRequestOptions extends ListLabelsOptions {}\n\n/**\n * Formats the etag so it can be used with a If-Match/If-None-Match header\n * @internal\n */\nexport function quoteETag(etag: string | undefined): string | undefined {\n // https://tools.ietf.org/html/rfc7232#section-3.1\n if (etag === undefined || etag === \"*\") {\n return etag;\n }\n\n if (etag.startsWith('\"') && etag.endsWith('\"')) {\n return etag;\n }\n\n if (etag.startsWith(\"'\") && etag.endsWith(\"'\")) {\n return etag;\n }\n\n return `\"${etag}\"`;\n}\n\n/**\n * Checks the onlyIfChanged/onlyIfUnchanged properties to make sure we haven't specified both\n * and throws an Error. Otherwise, returns the properties properly quoted.\n * @param options - An options object with onlyIfChanged/onlyIfUnchanged fields\n * @internal\n */\nexport function checkAndFormatIfAndIfNoneMatch(\n objectWithEtag: EtagEntity,\n options: HttpOnlyIfChangedField & HttpOnlyIfUnchangedField,\n): { ifMatch: string | undefined; ifNoneMatch: string | undefined } {\n if (options.onlyIfChanged && options.onlyIfUnchanged) {\n logger.error(\n \"onlyIfChanged and onlyIfUnchanged are both specified\",\n options.onlyIfChanged,\n options.onlyIfUnchanged,\n );\n throw new Error(\"onlyIfChanged and onlyIfUnchanged are mutually-exclusive\");\n }\n\n let ifMatch;\n let ifNoneMatch;\n\n if (options.onlyIfUnchanged) {\n ifMatch = quoteETag(objectWithEtag.etag);\n }\n\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(objectWithEtag.etag);\n }\n\n return {\n ifMatch: ifMatch,\n ifNoneMatch: ifNoneMatch,\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions and ListRevisionsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatFiltersAndSelect(\n listConfigOptions: ListRevisionsOptions,\n): Pick<GetKeyValuesOptionalParams, \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"tags\"> {\n let acceptDatetime: string | undefined = undefined;\n\n if (listConfigOptions.acceptDateTime) {\n acceptDatetime = listConfigOptions.acceptDateTime.toISOString();\n }\n return {\n key: listConfigOptions.keyFilter,\n label: listConfigOptions.labelFilter,\n tags: listConfigOptions.tagsFilter,\n acceptDatetime,\n select: formatFieldsForSelect(listConfigOptions.fields),\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter, labelFilter, snapshotName are moved to key, label, and snapshot respectively.\n *\n * @internal\n */\nexport function formatConfigurationSettingsFiltersAndSelect(\n listConfigOptions: SendConfigurationSettingsOptions,\n): Pick<\n GetKeyValuesOptionalParams,\n \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"snapshot\" | \"tags\"\n> {\n const { snapshotName: snapshot, ...options } = listConfigOptions;\n return {\n ...formatFiltersAndSelect(options),\n snapshot,\n };\n}\n/**\n * Transforms some of the key fields in ListSnapshotsOptions\n * so they can be added to a request using AppConfigurationGetSnapshotsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatSnapshotFiltersAndSelect(\n listSnapshotOptions: ListSnapshotsOptions,\n): Pick<GetSnapshotsOptionalParams, \"name\" | \"select\" | \"status\"> {\n return {\n name: listSnapshotOptions.nameFilter,\n status: listSnapshotOptions.statusFilter,\n select: listSnapshotOptions.fields,\n };\n}\n\n/**\n * Transforms some of the key fields in ListLabelsOptions\n * so they can be added to a request using AppConfigurationGetLabelsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - `nameFilter` are moved to name\n *\n * @internal\n */\nexport function formatLabelsFiltersAndSelect(\n listLabelsOptions: ListLabelsOptions,\n): Pick<GetLabelsOptionalParams, \"name\" | \"select\"> {\n return {\n name: listLabelsOptions.nameFilter,\n select: listLabelsOptions.fields,\n };\n}\n/**\n * Handles translating a Date acceptDateTime into a string as needed by the API\n * @param newOptions - A newer style options with acceptDateTime as a date (and with proper casing!)\n * @internal\n */\nexport function formatAcceptDateTime(newOptions: { acceptDateTime?: Date }): {\n acceptDatetime?: string;\n} {\n return {\n acceptDatetime: newOptions.acceptDateTime && newOptions.acceptDateTime.toISOString(),\n };\n}\n\n/**\n * Take the URL that gets returned from next link and extract the 'after' token needed\n * to get the next page of results.\n * @internal\n */\nexport function extractAfterTokenFromNextLink(nextLink: string): string {\n const searchParams = new URLSearchParams(nextLink);\n const afterToken = searchParams.get(\"after\");\n\n if (afterToken == null || Array.isArray(afterToken)) {\n logger.error(\"Invalid nextLink - invalid after token\", afterToken, Array.isArray(afterToken));\n throw new Error(\"Invalid nextLink - invalid after token\");\n }\n\n return decodeURIComponent(afterToken);\n}\n\n/**\n * Take the header link that gets returned from 304 response and extract the 'after' token needed\n * to get the next page of results.\n *\n * @internal\n */\nexport function extractAfterTokenFromLinkHeader(link: string): string {\n // Example transformation of the link header\n // link:\n // '</kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>; rel=\"next\"'\n //\n // linkValue:\n // </kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>\n //\n // nextLink:\n // /kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4\n const linkValue = link.split(\";\")[0];\n const nextLink = linkValue.substring(1, linkValue.length - 1);\n return extractAfterTokenFromNextLink(nextLink);\n}\n\n/**\n * Makes a ConfigurationSetting-based response throw for all of the data members. Used primarily\n * to prevent possible errors by the user in accessing a model that is uninitialized. This can happen\n * in cases like HTTP status code 204 or 304, which return an empty response body.\n *\n * @param configurationSetting - The configuration setting to alter\n */\nexport function makeConfigurationSettingEmpty(\n configurationSetting: Partial<Record<Exclude<keyof ConfigurationSetting, \"key\">, any>>,\n): void {\n const names: Exclude<keyof ConfigurationSetting, \"key\">[] = [\n \"contentType\",\n \"etag\",\n \"label\",\n \"lastModified\",\n \"isReadOnly\",\n \"tags\",\n \"value\",\n ];\n\n for (const name of names) {\n configurationSetting[name] = undefined;\n }\n}\n\n/**\n * @internal\n */\nexport function transformKeyValue<T>(kvp: T & KeyValue): T & ConfigurationSetting {\n const setting: T & ConfigurationSetting & KeyValue = {\n value: undefined,\n ...kvp,\n isReadOnly: !!kvp.locked,\n };\n delete setting.locked;\n if (!setting.label) {\n delete setting.label;\n }\n if (!setting.contentType) {\n delete setting.contentType;\n }\n return setting;\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSecretReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SecretReferenceValue> {\n return (\n setting.contentType === secretReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSnapshotReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SnapshotReferenceValue> {\n return (\n setting.contentType === snapshotReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithFeatureFlagValue(\n setting: any,\n): setting is ConfigurationSetting<FeatureFlagValue> {\n return (\n setting.contentType === featureFlagContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isSimpleConfigSetting(setting: any): setting is ConfigurationSetting {\n return typeof setting.value === \"string\" || !isDefined(setting.value);\n}\n\n/**\n * @internal\n */\nexport function serializeAsConfigurationSettingParam(\n setting:\n | ConfigurationSettingParam\n | ConfigurationSettingParam<FeatureFlagValue>\n | ConfigurationSettingParam<SecretReferenceValue>\n | ConfigurationSettingParam<SnapshotReferenceValue>,\n): ConfigurationSettingParam {\n if (isSimpleConfigSetting(setting)) {\n return setting as ConfigurationSettingParam;\n }\n try {\n if (isConfigSettingWithFeatureFlagValue(setting)) {\n return FeatureFlagHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSecretReferenceValue(setting)) {\n return SecretReferenceHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSnapshotReferenceValue(setting)) {\n return SnapshotReferenceHelper.toConfigurationSettingParam(setting);\n }\n } catch (error: any) {\n return setting as ConfigurationSettingParam;\n }\n logger.error(\"Unable to serialize to a configuration setting\", setting);\n throw new TypeError(\n `Unable to serialize the setting with key \"${setting.key}\" as a configuration setting`,\n );\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponseWithStatusCode<T extends KeyValue>(\n kvp: T,\n status: number | undefined,\n): ConfigurationSetting & { eTag?: string } & HttpResponseFields {\n const response = {\n ...transformKeyValue(kvp),\n statusCode: status ?? -1,\n };\n\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(response, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n return response;\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponse<T extends KeyValue & { eTag?: string }>(\n kvp: T,\n): ConfigurationSetting {\n const setting = transformKeyValue(kvp);\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(setting, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n\n delete setting.eTag;\n return setting;\n}\n\n/**\n * @internal\n */\nexport function transformSnapshotResponse<T extends ConfigurationSnapshot>(\n snapshot: T,\n): SnapshotResponse {\n if (hasUnderscoreResponse(snapshot)) {\n Object.defineProperty(snapshot, \"_response\", {\n enumerable: false,\n value: snapshot._response,\n });\n }\n return snapshot as any;\n}\n\n/**\n * Translates user-facing field names into their `select` equivalents (these can be\n * seen in the `KnownEnum5`)\n *\n * @param fieldNames - fieldNames from users.\n * @returns The field names translated into the `select` field equivalents.\n *\n * @internal\n */\nexport function formatFieldsForSelect(\n fieldNames: (keyof ConfigurationSetting)[] | undefined,\n): string[] | undefined {\n if (fieldNames == null) {\n return undefined;\n }\n\n const mappedFieldNames = fieldNames.map((fn) => {\n switch (fn) {\n case \"lastModified\":\n return \"last_modified\";\n case \"contentType\":\n return \"content_type\";\n case \"isReadOnly\":\n return \"locked\";\n default:\n return fn;\n }\n });\n\n return mappedFieldNames;\n}\n\n/**\n * @internal\n */\nexport function errorMessageForUnexpectedSetting(\n key: string,\n expectedType: \"FeatureFlag\" | \"SecretReference\",\n): string {\n return `Setting with key ${key} is not a valid ${expectedType}, make sure to have the correct content-type and a valid non-null value.`;\n}\n\nexport function assertResponse<T extends object>(\n result: T,\n): asserts result is T & HttpResponseField<any> {\n if (!hasUnderscoreResponse(result)) {\n Object.defineProperty(result, \"_response\", {\n enumerable: false,\n value:\n \"Something went wrong, _response(raw response) is supposed to be part of the response. Please file a bug at https://github.com/Azure/azure-sdk-for-js\",\n });\n }\n}\n\nexport function hasUnderscoreResponse<T extends object>(\n result: T,\n): result is T & HttpResponseField<any> {\n return Object.prototype.hasOwnProperty.call(result, \"_response\");\n}\n\n/**\n * Get the scope for the App Configuration service based on the endpoint and audience.\n * If the audience is provided, it will be used as the scope.\n * If not, the scope is defaulted to Azure Public Cloud when not specified.\n *\n * @internal\n */\nexport function getScope(appConfigEndpoint: string, appConfigAudience?: string): string {\n if (appConfigAudience) {\n return `${appConfigAudience}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.us\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.us\")\n ) {\n return `${KnownAppConfigAudience.AzureGovernment}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.cn\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.cn\")\n ) {\n return `${KnownAppConfigAudience.AzureChina}/.default`;\n } else {\n return `${KnownAppConfigAudience.AzurePublicCloud}/.default`;\n }\n}\n"]}
|
package/dist/esm/models.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,y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AAE,mBAAmB,CAAC;IACtC,uPAAuP;IACvP,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,gCAAgC;IAChC,IAAI,CAAC,EAAE;QAAE,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC3C;AAED,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,EACxB,gCAAgC,EAChC,2BAA2B,EAC3B,YAAY,GACb,MAAM,0BAA0B,CAAC"}
|
package/dist/esm/models.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAiClC;;GAEG;AACH,MAAM,CAAN,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IAChC;;OAEG;IACH,mEAAyC,CAAA;IACzC;;OAEG;IACH,wEAA8C,CAAA;IAC9C;;OAEG;IACH,0EAAgD,CAAA;AAClD,CAAC,EAbW,sBAAsB,KAAtB,sBAAsB,QAajC;AAwgBD,OAAO,EAIL,wBAAwB,EACxB,gCAAgC,GAGjC,MAAM,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CompatResponse } from \"@azure/core-http-compat\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport type {\n SnapshotComposition,\n ConfigurationSettingsFilter,\n ConfigurationSnapshot,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n\n/**\n * Provides configuration options for AppConfigurationClient.\n */\nexport interface AppConfigurationClientOptions extends CommonClientOptions {\n /**\n * The API version to use when interacting with the service. The default value is `2023-11-01`.\n * Note that overriding this default value may result in unsupported behavior.\n */\n apiVersion?: string;\n\n /**\n * The Audience to use for authentication with Azure Active Directory (AAD).\n * {@link KnownAppConfigAudience} can be used interchangeably with audience.\n * If not specified, the default audience will be set to Azure Public Cloud.\n */\n audience?: string;\n}\n\n/**\n * Known values for Azure App Configuration Audience\n */\nexport enum KnownAppConfigAudience {\n /**\n * Audience for Azure China\n */\n AzureChina = \"https://appconfig.azure.cn\",\n /**\n * Audience for Azure Government\n */\n AzureGovernment = \"https://appconfig.azure.us\",\n /**\n * Audience for Azure Public\n */\n AzurePublicCloud = \"https://appconfig.azure.com\",\n}\n\n/**\n * Fields that uniquely identify a configuration setting\n */\nexport interface ConfigurationSettingId {\n /**\n * The etag for this setting\n */\n etag?: string;\n /**\n * The key for this setting.\n * Feature flags must be prefixed with `.appconfig.featureflag/<feature-flag-name>`.\n */\n key: string;\n\n /**\n * The label for this setting. Leaving this undefined means this\n * setting does not have a label.\n */\n label?: string;\n}\n/**\n * Necessary fields for updating or creating a new configuration setting\n */\nexport type ConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingId & {\n /**\n * The content type of the setting's value\n */\n contentType?: string;\n\n /**\n * Tags for this key\n */\n tags?: { [propertyName: string]: string };\n} & (T extends string\n ? {\n /**\n * The setting's value\n */\n value?: string;\n }\n : {\n /**\n * The setting's value\n */\n value: T;\n });\n\n/**\n * Configuration setting with extra metadata from the server, indicating\n * its etag, whether it is currently readOnly and when it was last modified.\n */\nexport type ConfigurationSetting<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T> & {\n /**\n * Whether or not the setting is read-only\n */\n isReadOnly: boolean;\n\n /**\n * The date when this setting was last modified\n */\n lastModified?: Date;\n};\n\n/**\n * Fields that are hoisted up from the _response field of the object\n * Used in cases where individual HTTP response fields are important for\n * the user to use in common-use cases like handling http status codes 204 or 304.\n */\nexport interface HttpResponseFields {\n /**\n * The HTTP status code for the response\n */\n statusCode: number;\n}\n/**\n * HTTP response related information - headers and raw body.\n */\nexport interface HttpResponseField<HeadersT> {\n /**\n * The underlying HTTP response.\n */\n _response: CompatResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: HeadersT;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n };\n}\n/**\n * Parameters for adding a new configuration setting\n */\nexport type AddConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Parameters for creating or updating a new configuration setting\n */\nexport type SetConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Standard base response for getting, deleting or updating a configuration setting\n */\nexport type ConfigurationSettingResponse<HeadersT> = ConfigurationSetting &\n HttpResponseField<HeadersT> &\n Pick<HeadersT, Exclude<keyof HeadersT, \"eTag\">>;\n\n/**\n * Options used to provide if-none-match for an HTTP request\n */\nexport interface HttpOnlyIfChangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag does not match the value\n * provided.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Options used to provide if-match for an HTTP request\n */\nexport interface HttpOnlyIfUnchangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag matches the value provided.\n */\n onlyIfUnchanged?: boolean;\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSetting)[];\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalSnapshotFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSnapshot)[];\n}\n\n/**\n * Used when the API supports selectively returning labels fields.\n */\nexport interface OptionalLabelsFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof SettingLabel)[];\n}\n/**\n * Sync token header field\n */\nexport interface SyncTokenHeaderField {\n /**\n * Enables real-time consistency between requests by providing the returned value in the next\n * request made to the server.\n */\n syncToken?: string;\n}\n\n/**\n * Options used when adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingOptions extends OperationOptions {}\n\n/**\n * Response from adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingResponse\n extends ConfigurationSetting,\n SyncTokenHeaderField,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Response from deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingResponse\n extends SyncTokenHeaderField,\n HttpResponseFields,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options for deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField,\n OperationOptions {}\n\n/**\n * Options used when saving a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField,\n OperationOptions {}\n\n/**\n * Response from setting a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingResponse\n extends ConfigurationSetting,\n SyncTokenHeaderField,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Headers from getting a ConfigurationSetting.\n */\nexport interface GetConfigurationHeaders extends SyncTokenHeaderField {}\n\n/**\n * Response from retrieving a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingResponse\n extends ConfigurationSetting,\n GetConfigurationHeaders,\n HttpResponseFields,\n HttpResponseField<GetConfigurationHeaders> {}\n\n/**\n * Options for getting a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingOptions\n extends OperationOptions,\n HttpOnlyIfChangedField,\n OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSettingsOptions extends OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n\n /**\n * Filters for keys. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 key names are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|---------------------------------------|\n * | omitted or * | Matches any key |\n * | abc | Matches a key named abc |\n * | abc* | Matches key names that start with abc |\n *\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n */\n keyFilter?: string;\n\n /* eslint-disable tsdoc/syntax */\n /**\n * Filters for labels. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 labels are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|------------------------------------------------------|\n * | omitted or * | Matches any key |\n * | \\0 | Matches any key without a label (URL encoded as %00) |\n * | prod | Matches a key with label named prod |\n * | prod* | Matches key with label names that start with prod |\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n *\n * Reference: https://learn.microsoft.com/azure/azure-app-configuration/rest-api-key-value\n */\n labelFilter?: string;\n\n /** A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering */\n tagsFilter?: string[];\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListConfigurationSettingsForSnapshotOptions\n extends OperationOptions,\n OptionalFields {}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListConfigurationSettingsOptions extends OperationOptions, ListSettingsOptions {\n /**\n * Etags list for page\n */\n pageEtags?: string[];\n}\n\n/**\n * Options for listLabels\n */\nexport interface ListLabelsOptions extends OperationOptions, OptionalLabelsFields {\n /** A filter for the name of the returned labels. */\n nameFilter?: string;\n\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSnapshots extends OptionalSnapshotFields {\n /** A filter for the name of the returned snapshots. */\n nameFilter?: string;\n\n /** Used to filter returned snapshots by their status property. */\n statusFilter?: ConfigurationSnapshotStatus[];\n}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListSnapshotsOptions\n extends OperationOptions,\n ListSnapshots,\n OptionalSnapshotFields {}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n // The appconfig service doesn't currently support letting you select a page size\n // so we're ignoring their setting for now.\n}\n\n/**\n * Entity with etag.\n */\nexport interface EtagEntity {\n /**\n * The etag for this entity\n */\n etag?: string;\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListConfigurationSettingPage\n extends HttpResponseField<SyncTokenHeaderField>,\n PageSettings,\n EtagEntity {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListLabelsPage\n extends HttpResponseField<SyncTokenHeaderField>,\n PageSettings,\n EtagEntity {\n /**\n * The collection of labels\n */\n items: SettingLabel[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListSnapshotsPage extends SyncTokenHeaderField, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSnapshot[];\n}\n\n/**\n * Options for listRevisions that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListRevisionsOptions extends OperationOptions, ListSettingsOptions {}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListRevisionsPage extends HttpResponseField<SyncTokenHeaderField>, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * Options for setReadOnly\n */\nexport interface SetReadOnlyOptions extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Response when setting a value to read-only.\n */\nexport interface SetReadOnlyResponse\n extends ConfigurationSetting,\n SyncTokenHeaderField,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface RetryOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation.\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * Options used when creating a Snapshot.\n */\nexport interface CreateSnapshotOptions extends OperationOptions {\n /**\n * The amount of time to wait (in milliseconds) between subsequent requests relating to the same operation.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Response from adding a Snapshot.\n */\nexport interface SnapshotResponse extends ConfigurationSnapshot, SyncTokenHeaderField {}\n\n/**\n * Options used when getting a Snapshot.\n */\nexport interface GetSnapshotOptions extends OperationOptions, OptionalSnapshotFields {}\n\n/**\n * Response from getting a Snapshot.\n */\nexport interface GetSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Options used when updating a Snapshot.\n */\nexport interface UpdateSnapshotOptions extends OperationOptions {\n /**\n * The etag for this snapshot\n */\n etag?: string;\n}\n\n/**\n * Response from updating a Snapshot.\n */\nexport interface UpdateSnapshotResponse extends SnapshotResponse {}\n/**\n * Response from updating a Snapshot.\n */\nexport interface CreateSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Fields that uniquely identify a snapshot\n */\nexport interface SnapshotInfo {\n /** The name for this snapshot */\n name: string;\n /** A list of filters used to filter the key-values included in the snapshot. */\n filters: ConfigurationSettingsFilter[];\n /** The composition type describes how the key-values within the snapshot are composed. The 'all' composition type includes all key-values. The 'group_by_key' composition type ensures there are no two key-values containing the same key. */\n compositionType?: SnapshotComposition;\n /** The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used. */\n retentionPeriodInSeconds?: number;\n /** The tags of the snapshot. */\n tags?: { [propertyName: string]: string };\n}\n\nexport {\n ConfigurationSnapshot,\n ConfigurationSettingsFilter,\n SnapshotComposition,\n KnownSnapshotComposition,\n KnownConfigurationSnapshotStatus,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAiClC;;GAEG;AACH,MAAM,CAAN,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IAChC;;OAEG;IACH,mEAAyC,CAAA;IACzC;;OAEG;IACH,wEAA8C,CAAA;IAC9C;;OAEG;IACH,0EAAgD,CAAA;AAClD,CAAC,EAbW,sBAAsB,KAAtB,sBAAsB,QAajC;AAsfD,OAAO,EAIL,wBAAwB,EACxB,gCAAgC,GAGjC,MAAM,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CompatResponse } from \"@azure/core-http-compat\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport type {\n SnapshotComposition,\n ConfigurationSettingsFilter,\n ConfigurationSnapshot,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n\n/**\n * Provides configuration options for AppConfigurationClient.\n */\nexport interface AppConfigurationClientOptions extends CommonClientOptions {\n /**\n * The API version to use when interacting with the service. The default value is `2023-11-01`.\n * Note that overriding this default value may result in unsupported behavior.\n */\n apiVersion?: string;\n\n /**\n * The Audience to use for authentication with Azure Active Directory (AAD).\n * {@link KnownAppConfigAudience} can be used interchangeably with audience.\n * If not specified, the default audience will be set to Azure Public Cloud.\n */\n audience?: string;\n}\n\n/**\n * Known values for Azure App Configuration Audience\n */\nexport enum KnownAppConfigAudience {\n /**\n * Audience for Azure China\n */\n AzureChina = \"https://appconfig.azure.cn\",\n /**\n * Audience for Azure Government\n */\n AzureGovernment = \"https://appconfig.azure.us\",\n /**\n * Audience for Azure Public\n */\n AzurePublicCloud = \"https://appconfig.azure.com\",\n}\n\n/**\n * Fields that uniquely identify a configuration setting\n */\nexport interface ConfigurationSettingId {\n /**\n * The etag for this setting\n */\n etag?: string;\n /**\n * The key for this setting.\n * Feature flags must be prefixed with `.appconfig.featureflag/<feature-flag-name>`.\n */\n key: string;\n\n /**\n * The label for this setting. Leaving this undefined means this\n * setting does not have a label.\n */\n label?: string;\n}\n/**\n * Necessary fields for updating or creating a new configuration setting\n */\nexport type ConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingId & {\n /**\n * The content type of the setting's value\n */\n contentType?: string;\n\n /**\n * Tags for this key\n */\n tags?: { [propertyName: string]: string };\n} & (T extends string\n ? {\n /**\n * The setting's value\n */\n value?: string;\n }\n : {\n /**\n * The setting's value\n */\n value: T;\n });\n\n/**\n * Configuration setting with extra metadata from the server, indicating\n * its etag, whether it is currently readOnly and when it was last modified.\n */\nexport type ConfigurationSetting<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T> & {\n /**\n * Whether or not the setting is read-only\n */\n isReadOnly: boolean;\n\n /**\n * The date when this setting was last modified\n */\n lastModified?: Date;\n};\n\n/**\n * Fields that are hoisted up from the _response field of the object\n * Used in cases where individual HTTP response fields are important for\n * the user to use in common-use cases like handling http status codes 204 or 304.\n */\nexport interface HttpResponseFields {\n /**\n * The HTTP status code for the response\n */\n statusCode: number;\n}\n/**\n * HTTP response related information - headers and raw body.\n */\nexport interface HttpResponseField<HeadersT> {\n /**\n * The underlying HTTP response.\n */\n _response: CompatResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: HeadersT;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n };\n}\n/**\n * Parameters for adding a new configuration setting\n */\nexport type AddConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Parameters for creating or updating a new configuration setting\n */\nexport type SetConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Standard base response for getting, deleting or updating a configuration setting\n */\nexport type ConfigurationSettingResponse<HeadersT> = ConfigurationSetting &\n HttpResponseField<HeadersT> &\n Pick<HeadersT, Exclude<keyof HeadersT, \"eTag\">>;\n\n/**\n * Options used to provide if-none-match for an HTTP request\n */\nexport interface HttpOnlyIfChangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag does not match the value\n * provided.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Options used to provide if-match for an HTTP request\n */\nexport interface HttpOnlyIfUnchangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag matches the value provided.\n */\n onlyIfUnchanged?: boolean;\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSetting)[];\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalSnapshotFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSnapshot)[];\n}\n\n/**\n * Used when the API supports selectively returning labels fields.\n */\nexport interface OptionalLabelsFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof SettingLabel)[];\n}\n/**\n * Sync token header field\n */\nexport interface SyncTokenHeaderField {\n /**\n * Enables real-time consistency between requests by providing the returned value in the next\n * request made to the server.\n */\n syncToken?: string;\n}\n\n/**\n * Options used when adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingOptions extends OperationOptions {}\n\n/**\n * Response from adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingResponse\n extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Response from deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingResponse\n extends SyncTokenHeaderField, HttpResponseFields, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options for deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Options used when saving a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Response from setting a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingResponse\n extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Headers from getting a ConfigurationSetting.\n */\nexport interface GetConfigurationHeaders extends SyncTokenHeaderField {}\n\n/**\n * Response from retrieving a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingResponse\n extends\n ConfigurationSetting,\n GetConfigurationHeaders,\n HttpResponseFields,\n HttpResponseField<GetConfigurationHeaders> {}\n\n/**\n * Options for getting a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingOptions\n extends OperationOptions, HttpOnlyIfChangedField, OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSettingsOptions extends OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n\n /**\n * Filters for keys. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 key names are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|---------------------------------------|\n * | omitted or * | Matches any key |\n * | abc | Matches a key named abc |\n * | abc* | Matches key names that start with abc |\n *\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n */\n keyFilter?: string;\n\n /* eslint-disable tsdoc/syntax */\n /**\n * Filters for labels. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 labels are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|------------------------------------------------------|\n * | omitted or * | Matches any key |\n * | \\0 | Matches any key without a label (URL encoded as %00) |\n * | prod | Matches a key with label named prod |\n * | prod* | Matches key with label names that start with prod |\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n *\n * Reference: https://learn.microsoft.com/azure/azure-app-configuration/rest-api-key-value\n */\n labelFilter?: string;\n\n /** A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering */\n tagsFilter?: string[];\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListConfigurationSettingsForSnapshotOptions\n extends OperationOptions, OptionalFields {}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListConfigurationSettingsOptions extends OperationOptions, ListSettingsOptions {\n /**\n * Etags list for page\n */\n pageEtags?: string[];\n}\n\n/**\n * Options for listLabels\n */\nexport interface ListLabelsOptions extends OperationOptions, OptionalLabelsFields {\n /** A filter for the name of the returned labels. */\n nameFilter?: string;\n\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSnapshots extends OptionalSnapshotFields {\n /** A filter for the name of the returned snapshots. */\n nameFilter?: string;\n\n /** Used to filter returned snapshots by their status property. */\n statusFilter?: ConfigurationSnapshotStatus[];\n}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListSnapshotsOptions\n extends OperationOptions, ListSnapshots, OptionalSnapshotFields {}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n // The appconfig service doesn't currently support letting you select a page size\n // so we're ignoring their setting for now.\n}\n\n/**\n * Entity with etag.\n */\nexport interface EtagEntity {\n /**\n * The etag for this entity\n */\n etag?: string;\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListConfigurationSettingPage\n extends HttpResponseField<SyncTokenHeaderField>, PageSettings, EtagEntity {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListLabelsPage\n extends HttpResponseField<SyncTokenHeaderField>, PageSettings, EtagEntity {\n /**\n * The collection of labels\n */\n items: SettingLabel[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListSnapshotsPage extends SyncTokenHeaderField, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSnapshot[];\n}\n\n/**\n * Options for listRevisions that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListRevisionsOptions extends OperationOptions, ListSettingsOptions {}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListRevisionsPage extends HttpResponseField<SyncTokenHeaderField>, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * Options for setReadOnly\n */\nexport interface SetReadOnlyOptions extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Response when setting a value to read-only.\n */\nexport interface SetReadOnlyResponse\n extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface RetryOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation.\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * Options used when creating a Snapshot.\n */\nexport interface CreateSnapshotOptions extends OperationOptions {\n /**\n * The amount of time to wait (in milliseconds) between subsequent requests relating to the same operation.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Response from adding a Snapshot.\n */\nexport interface SnapshotResponse extends ConfigurationSnapshot, SyncTokenHeaderField {}\n\n/**\n * Options used when getting a Snapshot.\n */\nexport interface GetSnapshotOptions extends OperationOptions, OptionalSnapshotFields {}\n\n/**\n * Response from getting a Snapshot.\n */\nexport interface GetSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Options used when updating a Snapshot.\n */\nexport interface UpdateSnapshotOptions extends OperationOptions {\n /**\n * The etag for this snapshot\n */\n etag?: string;\n}\n\n/**\n * Response from updating a Snapshot.\n */\nexport interface UpdateSnapshotResponse extends SnapshotResponse {}\n/**\n * Response from updating a Snapshot.\n */\nexport interface CreateSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Fields that uniquely identify a snapshot\n */\nexport interface SnapshotInfo {\n /** The name for this snapshot */\n name: string;\n /** A list of filters used to filter the key-values included in the snapshot. */\n filters: ConfigurationSettingsFilter[];\n /** The composition type describes how the key-values within the snapshot are composed. The 'all' composition type includes all key-values. The 'group_by_key' composition type ensures there are no two key-values containing the same key. */\n compositionType?: SnapshotComposition;\n /** The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used. */\n retentionPeriodInSeconds?: number;\n /** The tags of the snapshot. */\n tags?: { [propertyName: string]: string };\n}\n\nexport {\n ConfigurationSnapshot,\n ConfigurationSettingsFilter,\n SnapshotComposition,\n KnownSnapshotComposition,\n KnownConfigurationSnapshotStatus,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/internal/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,iBAAiB,EAEvB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,KAAK,EACV,0BAA0B,EAC1B,uBAAuB,EACvB,0BAA0B,EAC1B,QAAQ,EACT,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAItE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,WAAW,gCACf,SAAQ,gBAAgB,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/internal/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,iBAAiB,EAEvB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,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AM,CAAC,EAAE,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE;YACzC,UAAU,EAAE,KAAK;YACjB,KAAK,EACH,sJAAsJ;SACzJ,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,MAAS;IAET,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AACnE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,iBAAyB,EAAE,iBAA0B;IAC5E,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO,GAAG,iBAAiB,WAAW,CAAC;IACzC,CAAC;SAAM,IACL,iBAAiB,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC/C,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAChD,CAAC;QACD,OAAO,GAAG,sBAAsB,CAAC,eAAe,WAAW,CAAC;IAC9D,CAAC;SAAM,IACL,iBAAiB,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC/C,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAChD,CAAC;QACD,OAAO,GAAG,sBAAsB,CAAC,UAAU,WAAW,CAAC;IACzD,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,sBAAsB,CAAC,gBAAgB,WAAW,CAAC;IAC/D,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n type ConfigurationSetting,\n type ConfigurationSettingParam,\n type HttpOnlyIfChangedField,\n type HttpOnlyIfUnchangedField,\n type HttpResponseField,\n type HttpResponseFields,\n type ListRevisionsOptions,\n type ListSettingsOptions,\n type ListSnapshotsOptions,\n type ConfigurationSnapshot,\n type SnapshotResponse,\n type EtagEntity,\n type ListLabelsOptions,\n KnownAppConfigAudience,\n} from \"../models.js\";\nimport type { FeatureFlagValue } from \"../featureFlag.js\";\nimport { FeatureFlagHelper, featureFlagContentType } from \"../featureFlag.js\";\nimport type {\n GetKeyValuesOptionalParams,\n GetLabelsOptionalParams,\n GetSnapshotsOptionalParams,\n KeyValue,\n} from \"../generated/src/models/index.js\";\nimport type { SecretReferenceValue } from \"../secretReference.js\";\nimport { SecretReferenceHelper, secretReferenceContentType } from \"../secretReference.js\";\nimport type { SnapshotReferenceValue } from \"../snapshotReference.js\";\nimport { SnapshotReferenceHelper, snapshotReferenceContentType } from \"../snapshotReference.js\";\nimport { isDefined } from \"@azure/core-util\";\nimport { logger } from \"../logger.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendConfigurationSettingsOptions\n extends OperationOptions,\n ListSettingsOptions,\n EtagEntity {\n /**\n * A filter used get configuration setting for a snapshot. Not valid when used with 'key' and 'label' filters\n */\n snapshotName?: string;\n}\n\n/**\n * Options for listLabels that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendLabelsRequestOptions extends ListLabelsOptions {}\n\n/**\n * Formats the etag so it can be used with a If-Match/If-None-Match header\n * @internal\n */\nexport function quoteETag(etag: string | undefined): string | undefined {\n // https://tools.ietf.org/html/rfc7232#section-3.1\n if (etag === undefined || etag === \"*\") {\n return etag;\n }\n\n if (etag.startsWith('\"') && etag.endsWith('\"')) {\n return etag;\n }\n\n if (etag.startsWith(\"'\") && etag.endsWith(\"'\")) {\n return etag;\n }\n\n return `\"${etag}\"`;\n}\n\n/**\n * Checks the onlyIfChanged/onlyIfUnchanged properties to make sure we haven't specified both\n * and throws an Error. Otherwise, returns the properties properly quoted.\n * @param options - An options object with onlyIfChanged/onlyIfUnchanged fields\n * @internal\n */\nexport function checkAndFormatIfAndIfNoneMatch(\n objectWithEtag: EtagEntity,\n options: HttpOnlyIfChangedField & HttpOnlyIfUnchangedField,\n): { ifMatch: string | undefined; ifNoneMatch: string | undefined } {\n if (options.onlyIfChanged && options.onlyIfUnchanged) {\n logger.error(\n \"onlyIfChanged and onlyIfUnchanged are both specified\",\n options.onlyIfChanged,\n options.onlyIfUnchanged,\n );\n throw new Error(\"onlyIfChanged and onlyIfUnchanged are mutually-exclusive\");\n }\n\n let ifMatch;\n let ifNoneMatch;\n\n if (options.onlyIfUnchanged) {\n ifMatch = quoteETag(objectWithEtag.etag);\n }\n\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(objectWithEtag.etag);\n }\n\n return {\n ifMatch: ifMatch,\n ifNoneMatch: ifNoneMatch,\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions and ListRevisionsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatFiltersAndSelect(\n listConfigOptions: ListRevisionsOptions,\n): Pick<GetKeyValuesOptionalParams, \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"tags\"> {\n let acceptDatetime: string | undefined = undefined;\n\n if (listConfigOptions.acceptDateTime) {\n acceptDatetime = listConfigOptions.acceptDateTime.toISOString();\n }\n return {\n key: listConfigOptions.keyFilter,\n label: listConfigOptions.labelFilter,\n tags: listConfigOptions.tagsFilter,\n acceptDatetime,\n select: formatFieldsForSelect(listConfigOptions.fields),\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter, labelFilter, snapshotName are moved to key, label, and snapshot respectively.\n *\n * @internal\n */\nexport function formatConfigurationSettingsFiltersAndSelect(\n listConfigOptions: SendConfigurationSettingsOptions,\n): Pick<\n GetKeyValuesOptionalParams,\n \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"snapshot\" | \"tags\"\n> {\n const { snapshotName: snapshot, ...options } = listConfigOptions;\n return {\n ...formatFiltersAndSelect(options),\n snapshot,\n };\n}\n/**\n * Transforms some of the key fields in ListSnapshotsOptions\n * so they can be added to a request using AppConfigurationGetSnapshotsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatSnapshotFiltersAndSelect(\n listSnapshotOptions: ListSnapshotsOptions,\n): Pick<GetSnapshotsOptionalParams, \"name\" | \"select\" | \"status\"> {\n return {\n name: listSnapshotOptions.nameFilter,\n status: listSnapshotOptions.statusFilter,\n select: listSnapshotOptions.fields,\n };\n}\n\n/**\n * Transforms some of the key fields in ListLabelsOptions\n * so they can be added to a request using AppConfigurationGetLabelsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - `nameFilter` are moved to name\n *\n * @internal\n */\nexport function formatLabelsFiltersAndSelect(\n listLabelsOptions: ListLabelsOptions,\n): Pick<GetLabelsOptionalParams, \"name\" | \"select\"> {\n return {\n name: listLabelsOptions.nameFilter,\n select: listLabelsOptions.fields,\n };\n}\n/**\n * Handles translating a Date acceptDateTime into a string as needed by the API\n * @param newOptions - A newer style options with acceptDateTime as a date (and with proper casing!)\n * @internal\n */\nexport function formatAcceptDateTime(newOptions: { acceptDateTime?: Date }): {\n acceptDatetime?: string;\n} {\n return {\n acceptDatetime: newOptions.acceptDateTime && newOptions.acceptDateTime.toISOString(),\n };\n}\n\n/**\n * Take the URL that gets returned from next link and extract the 'after' token needed\n * to get the next page of results.\n * @internal\n */\nexport function extractAfterTokenFromNextLink(nextLink: string): string {\n const searchParams = new URLSearchParams(nextLink);\n const afterToken = searchParams.get(\"after\");\n\n if (afterToken == null || Array.isArray(afterToken)) {\n logger.error(\"Invalid nextLink - invalid after token\", afterToken, Array.isArray(afterToken));\n throw new Error(\"Invalid nextLink - invalid after token\");\n }\n\n return decodeURIComponent(afterToken);\n}\n\n/**\n * Take the header link that gets returned from 304 response and extract the 'after' token needed\n * to get the next page of results.\n *\n * @internal\n */\nexport function extractAfterTokenFromLinkHeader(link: string): string {\n // Example transformation of the link header\n // link:\n // '</kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>; rel=\"next\"'\n //\n // linkValue:\n // </kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>\n //\n // nextLink:\n // /kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4\n const linkValue = link.split(\";\")[0];\n const nextLink = linkValue.substring(1, linkValue.length - 1);\n return extractAfterTokenFromNextLink(nextLink);\n}\n\n/**\n * Makes a ConfigurationSetting-based response throw for all of the data members. Used primarily\n * to prevent possible errors by the user in accessing a model that is uninitialized. This can happen\n * in cases like HTTP status code 204 or 304, which return an empty response body.\n *\n * @param configurationSetting - The configuration setting to alter\n */\nexport function makeConfigurationSettingEmpty(\n configurationSetting: Partial<Record<Exclude<keyof ConfigurationSetting, \"key\">, any>>,\n): void {\n const names: Exclude<keyof ConfigurationSetting, \"key\">[] = [\n \"contentType\",\n \"etag\",\n \"label\",\n \"lastModified\",\n \"isReadOnly\",\n \"tags\",\n \"value\",\n ];\n\n for (const name of names) {\n configurationSetting[name] = undefined;\n }\n}\n\n/**\n * @internal\n */\nexport function transformKeyValue<T>(kvp: T & KeyValue): T & ConfigurationSetting {\n const setting: T & ConfigurationSetting & KeyValue = {\n value: undefined,\n ...kvp,\n isReadOnly: !!kvp.locked,\n };\n delete setting.locked;\n if (!setting.label) {\n delete setting.label;\n }\n if (!setting.contentType) {\n delete setting.contentType;\n }\n return setting;\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSecretReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SecretReferenceValue> {\n return (\n setting.contentType === secretReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSnapshotReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SnapshotReferenceValue> {\n return (\n setting.contentType === snapshotReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithFeatureFlagValue(\n setting: any,\n): setting is ConfigurationSetting<FeatureFlagValue> {\n return (\n setting.contentType === featureFlagContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isSimpleConfigSetting(setting: any): setting is ConfigurationSetting {\n return typeof setting.value === \"string\" || !isDefined(setting.value);\n}\n\n/**\n * @internal\n */\nexport function serializeAsConfigurationSettingParam(\n setting:\n | ConfigurationSettingParam\n | ConfigurationSettingParam<FeatureFlagValue>\n | ConfigurationSettingParam<SecretReferenceValue>\n | ConfigurationSettingParam<SnapshotReferenceValue>,\n): ConfigurationSettingParam {\n if (isSimpleConfigSetting(setting)) {\n return setting as ConfigurationSettingParam;\n }\n try {\n if (isConfigSettingWithFeatureFlagValue(setting)) {\n return FeatureFlagHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSecretReferenceValue(setting)) {\n return SecretReferenceHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSnapshotReferenceValue(setting)) {\n return SnapshotReferenceHelper.toConfigurationSettingParam(setting);\n }\n } catch (error: any) {\n return setting as ConfigurationSettingParam;\n }\n logger.error(\"Unable to serialize to a configuration setting\", setting);\n throw new TypeError(\n `Unable to serialize the setting with key \"${setting.key}\" as a configuration setting`,\n );\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponseWithStatusCode<T extends KeyValue>(\n kvp: T,\n status: number | undefined,\n): ConfigurationSetting & { eTag?: string } & HttpResponseFields {\n const response = {\n ...transformKeyValue(kvp),\n statusCode: status ?? -1,\n };\n\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(response, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n return response;\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponse<T extends KeyValue & { eTag?: string }>(\n kvp: T,\n): ConfigurationSetting {\n const setting = transformKeyValue(kvp);\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(setting, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n\n delete setting.eTag;\n return setting;\n}\n\n/**\n * @internal\n */\nexport function transformSnapshotResponse<T extends ConfigurationSnapshot>(\n snapshot: T,\n): SnapshotResponse {\n if (hasUnderscoreResponse(snapshot)) {\n Object.defineProperty(snapshot, \"_response\", {\n enumerable: false,\n value: snapshot._response,\n });\n }\n return snapshot as any;\n}\n\n/**\n * Translates user-facing field names into their `select` equivalents (these can be\n * seen in the `KnownEnum5`)\n *\n * @param fieldNames - fieldNames from users.\n * @returns The field names translated into the `select` field equivalents.\n *\n * @internal\n */\nexport function formatFieldsForSelect(\n fieldNames: (keyof ConfigurationSetting)[] | undefined,\n): string[] | undefined {\n if (fieldNames == null) {\n return undefined;\n }\n\n const mappedFieldNames = fieldNames.map((fn) => {\n switch (fn) {\n case \"lastModified\":\n return \"last_modified\";\n case \"contentType\":\n return \"content_type\";\n case \"isReadOnly\":\n return \"locked\";\n default:\n return fn;\n }\n });\n\n return mappedFieldNames;\n}\n\n/**\n * @internal\n */\nexport function errorMessageForUnexpectedSetting(\n key: string,\n expectedType: \"FeatureFlag\" | \"SecretReference\",\n): string {\n return `Setting with key ${key} is not a valid ${expectedType}, make sure to have the correct content-type and a valid non-null value.`;\n}\n\nexport function assertResponse<T extends object>(\n result: T,\n): asserts result is T & HttpResponseField<any> {\n if (!hasUnderscoreResponse(result)) {\n Object.defineProperty(result, \"_response\", {\n enumerable: false,\n value:\n \"Something went wrong, _response(raw response) is supposed to be part of the response. Please file a bug at https://github.com/Azure/azure-sdk-for-js\",\n });\n }\n}\n\nexport function hasUnderscoreResponse<T extends object>(\n result: T,\n): result is T & HttpResponseField<any> {\n return Object.prototype.hasOwnProperty.call(result, \"_response\");\n}\n\n/**\n * Get the scope for the App Configuration service based on the endpoint and audience.\n * If the audience is provided, it will be used as the scope.\n * If not, the scope is defaulted to Azure Public Cloud when not specified.\n *\n * @internal\n */\nexport function getScope(appConfigEndpoint: string, appConfigAudience?: string): string {\n if (appConfigAudience) {\n return `${appConfigAudience}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.us\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.us\")\n ) {\n return `${KnownAppConfigAudience.AzureGovernment}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.cn\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.cn\")\n ) {\n return `${KnownAppConfigAudience.AzureChina}/.default`;\n } else {\n return `${KnownAppConfigAudience.AzurePublicCloud}/.default`;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/internal/helpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAcL,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAQ9E,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAE1F,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAuBtC;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,IAAwB;IAChD,kDAAkD;IAClD,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,GAAG,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;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AI,iBAAiB,EAAE,CAAC;QACtB,OAAO,GAAG,iBAAiB,WAAW,CAAC;IACzC,CAAC;SAAM,IACL,iBAAiB,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC/C,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAChD,CAAC;QACD,OAAO,GAAG,sBAAsB,CAAC,eAAe,WAAW,CAAC;IAC9D,CAAC;SAAM,IACL,iBAAiB,CAAC,QAAQ,CAAC,mBAAmB,CAAC;QAC/C,iBAAiB,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAChD,CAAC;QACD,OAAO,GAAG,sBAAsB,CAAC,UAAU,WAAW,CAAC;IACzD,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,sBAAsB,CAAC,gBAAgB,WAAW,CAAC;IAC/D,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n type ConfigurationSetting,\n type ConfigurationSettingParam,\n type HttpOnlyIfChangedField,\n type HttpOnlyIfUnchangedField,\n type HttpResponseField,\n type HttpResponseFields,\n type ListRevisionsOptions,\n type ListSettingsOptions,\n type ListSnapshotsOptions,\n type ConfigurationSnapshot,\n type SnapshotResponse,\n type EtagEntity,\n type ListLabelsOptions,\n KnownAppConfigAudience,\n} from \"../models.js\";\nimport type { FeatureFlagValue } from \"../featureFlag.js\";\nimport { FeatureFlagHelper, featureFlagContentType } from \"../featureFlag.js\";\nimport type {\n GetKeyValuesOptionalParams,\n GetLabelsOptionalParams,\n GetSnapshotsOptionalParams,\n KeyValue,\n} from \"../generated/src/models/index.js\";\nimport type { SecretReferenceValue } from \"../secretReference.js\";\nimport { SecretReferenceHelper, secretReferenceContentType } from \"../secretReference.js\";\nimport type { SnapshotReferenceValue } from \"../snapshotReference.js\";\nimport { SnapshotReferenceHelper, snapshotReferenceContentType } from \"../snapshotReference.js\";\nimport { isDefined } from \"@azure/core-util\";\nimport { logger } from \"../logger.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendConfigurationSettingsOptions\n extends OperationOptions, ListSettingsOptions, EtagEntity {\n /**\n * A filter used get configuration setting for a snapshot. Not valid when used with 'key' and 'label' filters\n */\n snapshotName?: string;\n}\n\n/**\n * Options for listLabels that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface SendLabelsRequestOptions extends ListLabelsOptions {}\n\n/**\n * Formats the etag so it can be used with a If-Match/If-None-Match header\n * @internal\n */\nexport function quoteETag(etag: string | undefined): string | undefined {\n // https://tools.ietf.org/html/rfc7232#section-3.1\n if (etag === undefined || etag === \"*\") {\n return etag;\n }\n\n if (etag.startsWith('\"') && etag.endsWith('\"')) {\n return etag;\n }\n\n if (etag.startsWith(\"'\") && etag.endsWith(\"'\")) {\n return etag;\n }\n\n return `\"${etag}\"`;\n}\n\n/**\n * Checks the onlyIfChanged/onlyIfUnchanged properties to make sure we haven't specified both\n * and throws an Error. Otherwise, returns the properties properly quoted.\n * @param options - An options object with onlyIfChanged/onlyIfUnchanged fields\n * @internal\n */\nexport function checkAndFormatIfAndIfNoneMatch(\n objectWithEtag: EtagEntity,\n options: HttpOnlyIfChangedField & HttpOnlyIfUnchangedField,\n): { ifMatch: string | undefined; ifNoneMatch: string | undefined } {\n if (options.onlyIfChanged && options.onlyIfUnchanged) {\n logger.error(\n \"onlyIfChanged and onlyIfUnchanged are both specified\",\n options.onlyIfChanged,\n options.onlyIfUnchanged,\n );\n throw new Error(\"onlyIfChanged and onlyIfUnchanged are mutually-exclusive\");\n }\n\n let ifMatch;\n let ifNoneMatch;\n\n if (options.onlyIfUnchanged) {\n ifMatch = quoteETag(objectWithEtag.etag);\n }\n\n if (options.onlyIfChanged) {\n ifNoneMatch = quoteETag(objectWithEtag.etag);\n }\n\n return {\n ifMatch: ifMatch,\n ifNoneMatch: ifNoneMatch,\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions and ListRevisionsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatFiltersAndSelect(\n listConfigOptions: ListRevisionsOptions,\n): Pick<GetKeyValuesOptionalParams, \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"tags\"> {\n let acceptDatetime: string | undefined = undefined;\n\n if (listConfigOptions.acceptDateTime) {\n acceptDatetime = listConfigOptions.acceptDateTime.toISOString();\n }\n return {\n key: listConfigOptions.keyFilter,\n label: listConfigOptions.labelFilter,\n tags: listConfigOptions.tagsFilter,\n acceptDatetime,\n select: formatFieldsForSelect(listConfigOptions.fields),\n };\n}\n\n/**\n * Transforms some of the key fields in SendConfigurationSettingsOptions\n * so they can be added to a request using AppConfigurationGetKeyValuesOptionalParams.\n * - `options.acceptDateTime` is converted into an ISO string\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter, labelFilter, snapshotName are moved to key, label, and snapshot respectively.\n *\n * @internal\n */\nexport function formatConfigurationSettingsFiltersAndSelect(\n listConfigOptions: SendConfigurationSettingsOptions,\n): Pick<\n GetKeyValuesOptionalParams,\n \"key\" | \"label\" | \"select\" | \"acceptDatetime\" | \"snapshot\" | \"tags\"\n> {\n const { snapshotName: snapshot, ...options } = listConfigOptions;\n return {\n ...formatFiltersAndSelect(options),\n snapshot,\n };\n}\n/**\n * Transforms some of the key fields in ListSnapshotsOptions\n * so they can be added to a request using AppConfigurationGetSnapshotsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - keyFilter and labelFilter are moved to key and label, respectively.\n *\n * @internal\n */\nexport function formatSnapshotFiltersAndSelect(\n listSnapshotOptions: ListSnapshotsOptions,\n): Pick<GetSnapshotsOptionalParams, \"name\" | \"select\" | \"status\"> {\n return {\n name: listSnapshotOptions.nameFilter,\n status: listSnapshotOptions.statusFilter,\n select: listSnapshotOptions.fields,\n };\n}\n\n/**\n * Transforms some of the key fields in ListLabelsOptions\n * so they can be added to a request using AppConfigurationGetLabelsOptionalParams.\n * - `select` is populated with the proper field names from `options.fields`\n * - `nameFilter` are moved to name\n *\n * @internal\n */\nexport function formatLabelsFiltersAndSelect(\n listLabelsOptions: ListLabelsOptions,\n): Pick<GetLabelsOptionalParams, \"name\" | \"select\"> {\n return {\n name: listLabelsOptions.nameFilter,\n select: listLabelsOptions.fields,\n };\n}\n/**\n * Handles translating a Date acceptDateTime into a string as needed by the API\n * @param newOptions - A newer style options with acceptDateTime as a date (and with proper casing!)\n * @internal\n */\nexport function formatAcceptDateTime(newOptions: { acceptDateTime?: Date }): {\n acceptDatetime?: string;\n} {\n return {\n acceptDatetime: newOptions.acceptDateTime && newOptions.acceptDateTime.toISOString(),\n };\n}\n\n/**\n * Take the URL that gets returned from next link and extract the 'after' token needed\n * to get the next page of results.\n * @internal\n */\nexport function extractAfterTokenFromNextLink(nextLink: string): string {\n const searchParams = new URLSearchParams(nextLink);\n const afterToken = searchParams.get(\"after\");\n\n if (afterToken == null || Array.isArray(afterToken)) {\n logger.error(\"Invalid nextLink - invalid after token\", afterToken, Array.isArray(afterToken));\n throw new Error(\"Invalid nextLink - invalid after token\");\n }\n\n return decodeURIComponent(afterToken);\n}\n\n/**\n * Take the header link that gets returned from 304 response and extract the 'after' token needed\n * to get the next page of results.\n *\n * @internal\n */\nexport function extractAfterTokenFromLinkHeader(link: string): string {\n // Example transformation of the link header\n // link:\n // '</kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>; rel=\"next\"'\n //\n // linkValue:\n // </kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4>\n //\n // nextLink:\n // /kv?api-version=2023-10-01&key=listResults714&after=bGlzdE4\n const linkValue = link.split(\";\")[0];\n const nextLink = linkValue.substring(1, linkValue.length - 1);\n return extractAfterTokenFromNextLink(nextLink);\n}\n\n/**\n * Makes a ConfigurationSetting-based response throw for all of the data members. Used primarily\n * to prevent possible errors by the user in accessing a model that is uninitialized. This can happen\n * in cases like HTTP status code 204 or 304, which return an empty response body.\n *\n * @param configurationSetting - The configuration setting to alter\n */\nexport function makeConfigurationSettingEmpty(\n configurationSetting: Partial<Record<Exclude<keyof ConfigurationSetting, \"key\">, any>>,\n): void {\n const names: Exclude<keyof ConfigurationSetting, \"key\">[] = [\n \"contentType\",\n \"etag\",\n \"label\",\n \"lastModified\",\n \"isReadOnly\",\n \"tags\",\n \"value\",\n ];\n\n for (const name of names) {\n configurationSetting[name] = undefined;\n }\n}\n\n/**\n * @internal\n */\nexport function transformKeyValue<T>(kvp: T & KeyValue): T & ConfigurationSetting {\n const setting: T & ConfigurationSetting & KeyValue = {\n value: undefined,\n ...kvp,\n isReadOnly: !!kvp.locked,\n };\n delete setting.locked;\n if (!setting.label) {\n delete setting.label;\n }\n if (!setting.contentType) {\n delete setting.contentType;\n }\n return setting;\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSecretReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SecretReferenceValue> {\n return (\n setting.contentType === secretReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithSnapshotReferenceValue(\n setting: any,\n): setting is ConfigurationSetting<SnapshotReferenceValue> {\n return (\n setting.contentType === snapshotReferenceContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isConfigSettingWithFeatureFlagValue(\n setting: any,\n): setting is ConfigurationSetting<FeatureFlagValue> {\n return (\n setting.contentType === featureFlagContentType &&\n isDefined(setting.value) &&\n typeof setting.value !== \"string\"\n );\n}\n\n/**\n * @internal\n */\nfunction isSimpleConfigSetting(setting: any): setting is ConfigurationSetting {\n return typeof setting.value === \"string\" || !isDefined(setting.value);\n}\n\n/**\n * @internal\n */\nexport function serializeAsConfigurationSettingParam(\n setting:\n | ConfigurationSettingParam\n | ConfigurationSettingParam<FeatureFlagValue>\n | ConfigurationSettingParam<SecretReferenceValue>\n | ConfigurationSettingParam<SnapshotReferenceValue>,\n): ConfigurationSettingParam {\n if (isSimpleConfigSetting(setting)) {\n return setting as ConfigurationSettingParam;\n }\n try {\n if (isConfigSettingWithFeatureFlagValue(setting)) {\n return FeatureFlagHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSecretReferenceValue(setting)) {\n return SecretReferenceHelper.toConfigurationSettingParam(setting);\n }\n if (isConfigSettingWithSnapshotReferenceValue(setting)) {\n return SnapshotReferenceHelper.toConfigurationSettingParam(setting);\n }\n } catch (error: any) {\n return setting as ConfigurationSettingParam;\n }\n logger.error(\"Unable to serialize to a configuration setting\", setting);\n throw new TypeError(\n `Unable to serialize the setting with key \"${setting.key}\" as a configuration setting`,\n );\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponseWithStatusCode<T extends KeyValue>(\n kvp: T,\n status: number | undefined,\n): ConfigurationSetting & { eTag?: string } & HttpResponseFields {\n const response = {\n ...transformKeyValue(kvp),\n statusCode: status ?? -1,\n };\n\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(response, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n return response;\n}\n\n/**\n * @internal\n */\nexport function transformKeyValueResponse<T extends KeyValue & { eTag?: string }>(\n kvp: T,\n): ConfigurationSetting {\n const setting = transformKeyValue(kvp);\n if (hasUnderscoreResponse(kvp)) {\n Object.defineProperty(setting, \"_response\", {\n enumerable: false,\n value: kvp._response,\n });\n }\n\n delete setting.eTag;\n return setting;\n}\n\n/**\n * @internal\n */\nexport function transformSnapshotResponse<T extends ConfigurationSnapshot>(\n snapshot: T,\n): SnapshotResponse {\n if (hasUnderscoreResponse(snapshot)) {\n Object.defineProperty(snapshot, \"_response\", {\n enumerable: false,\n value: snapshot._response,\n });\n }\n return snapshot as any;\n}\n\n/**\n * Translates user-facing field names into their `select` equivalents (these can be\n * seen in the `KnownEnum5`)\n *\n * @param fieldNames - fieldNames from users.\n * @returns The field names translated into the `select` field equivalents.\n *\n * @internal\n */\nexport function formatFieldsForSelect(\n fieldNames: (keyof ConfigurationSetting)[] | undefined,\n): string[] | undefined {\n if (fieldNames == null) {\n return undefined;\n }\n\n const mappedFieldNames = fieldNames.map((fn) => {\n switch (fn) {\n case \"lastModified\":\n return \"last_modified\";\n case \"contentType\":\n return \"content_type\";\n case \"isReadOnly\":\n return \"locked\";\n default:\n return fn;\n }\n });\n\n return mappedFieldNames;\n}\n\n/**\n * @internal\n */\nexport function errorMessageForUnexpectedSetting(\n key: string,\n expectedType: \"FeatureFlag\" | \"SecretReference\",\n): string {\n return `Setting with key ${key} is not a valid ${expectedType}, make sure to have the correct content-type and a valid non-null value.`;\n}\n\nexport function assertResponse<T extends object>(\n result: T,\n): asserts result is T & HttpResponseField<any> {\n if (!hasUnderscoreResponse(result)) {\n Object.defineProperty(result, \"_response\", {\n enumerable: false,\n value:\n \"Something went wrong, _response(raw response) is supposed to be part of the response. Please file a bug at https://github.com/Azure/azure-sdk-for-js\",\n });\n }\n}\n\nexport function hasUnderscoreResponse<T extends object>(\n result: T,\n): result is T & HttpResponseField<any> {\n return Object.prototype.hasOwnProperty.call(result, \"_response\");\n}\n\n/**\n * Get the scope for the App Configuration service based on the endpoint and audience.\n * If the audience is provided, it will be used as the scope.\n * If not, the scope is defaulted to Azure Public Cloud when not specified.\n *\n * @internal\n */\nexport function getScope(appConfigEndpoint: string, appConfigAudience?: string): string {\n if (appConfigAudience) {\n return `${appConfigAudience}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.us\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.us\")\n ) {\n return `${KnownAppConfigAudience.AzureGovernment}/.default`;\n } else if (\n appConfigEndpoint.endsWith(\"azconfig.azure.cn\") ||\n appConfigEndpoint.endsWith(\"appconfig.azure.cn\")\n ) {\n return `${KnownAppConfigAudience.AzureChina}/.default`;\n } else {\n return `${KnownAppConfigAudience.AzurePublicCloud}/.default`;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACb,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,mBAAmB;IACxE;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,oBAAY,sBAAsB;IAChC;;OAEG;IACH,UAAU,+BAA+B;IACzC;;OAEG;IACH,eAAe,+BAA+B;IAC9C;;OAEG;IACH,gBAAgB,gCAAgC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD;;GAEG;AACH,MAAM,MAAM,yBAAyB,CACnC,CAAC,SAAS,MAAM,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,sBAAsB,GAAG,MAAM,IAC1F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gBAAgB;CAAG;AACnE;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;CAAG;AAEnE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,OAAO,EAAE,2BAA2B,EAAE,CAAC;IACvC,+OAA+O;IAC/O,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,uPAAuP;IACvP,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,gCAAgC;IAChC,IAAI,CAAC,EAAE;QAAE,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC3C;AAED,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,mBAAmB,EACnB,wBAAwB,EACxB,gCAAgC,EAChC,2BAA2B,EAC3B,YAAY,GACb,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAiClC;;GAEG;AACH,MAAM,CAAN,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IAChC;;OAEG;IACH,mEAAyC,CAAA;IACzC;;OAEG;IACH,wEAA8C,CAAA;IAC9C;;OAEG;IACH,0EAAgD,CAAA;AAClD,CAAC,EAbW,sBAAsB,KAAtB,sBAAsB,QAajC;AAwgBD,OAAO,EAIL,wBAAwB,EACxB,gCAAgC,GAGjC,MAAM,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CompatResponse } from \"@azure/core-http-compat\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport type {\n SnapshotComposition,\n ConfigurationSettingsFilter,\n ConfigurationSnapshot,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n\n/**\n * Provides configuration options for AppConfigurationClient.\n */\nexport interface AppConfigurationClientOptions extends CommonClientOptions {\n /**\n * The API version to use when interacting with the service. The default value is `2023-11-01`.\n * Note that overriding this default value may result in unsupported behavior.\n */\n apiVersion?: string;\n\n /**\n * The Audience to use for authentication with Azure Active Directory (AAD).\n * {@link KnownAppConfigAudience} can be used interchangeably with audience.\n * If not specified, the default audience will be set to Azure Public Cloud.\n */\n audience?: string;\n}\n\n/**\n * Known values for Azure App Configuration Audience\n */\nexport enum KnownAppConfigAudience {\n /**\n * Audience for Azure China\n */\n AzureChina = \"https://appconfig.azure.cn\",\n /**\n * Audience for Azure Government\n */\n AzureGovernment = \"https://appconfig.azure.us\",\n /**\n * Audience for Azure Public\n */\n AzurePublicCloud = \"https://appconfig.azure.com\",\n}\n\n/**\n * Fields that uniquely identify a configuration setting\n */\nexport interface ConfigurationSettingId {\n /**\n * The etag for this setting\n */\n etag?: string;\n /**\n * The key for this setting.\n * Feature flags must be prefixed with `.appconfig.featureflag/<feature-flag-name>`.\n */\n key: string;\n\n /**\n * The label for this setting. Leaving this undefined means this\n * setting does not have a label.\n */\n label?: string;\n}\n/**\n * Necessary fields for updating or creating a new configuration setting\n */\nexport type ConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingId & {\n /**\n * The content type of the setting's value\n */\n contentType?: string;\n\n /**\n * Tags for this key\n */\n tags?: { [propertyName: string]: string };\n} & (T extends string\n ? {\n /**\n * The setting's value\n */\n value?: string;\n }\n : {\n /**\n * The setting's value\n */\n value: T;\n });\n\n/**\n * Configuration setting with extra metadata from the server, indicating\n * its etag, whether it is currently readOnly and when it was last modified.\n */\nexport type ConfigurationSetting<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T> & {\n /**\n * Whether or not the setting is read-only\n */\n isReadOnly: boolean;\n\n /**\n * The date when this setting was last modified\n */\n lastModified?: Date;\n};\n\n/**\n * Fields that are hoisted up from the _response field of the object\n * Used in cases where individual HTTP response fields are important for\n * the user to use in common-use cases like handling http status codes 204 or 304.\n */\nexport interface HttpResponseFields {\n /**\n * The HTTP status code for the response\n */\n statusCode: number;\n}\n/**\n * HTTP response related information - headers and raw body.\n */\nexport interface HttpResponseField<HeadersT> {\n /**\n * The underlying HTTP response.\n */\n _response: CompatResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: HeadersT;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n };\n}\n/**\n * Parameters for adding a new configuration setting\n */\nexport type AddConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Parameters for creating or updating a new configuration setting\n */\nexport type SetConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Standard base response for getting, deleting or updating a configuration setting\n */\nexport type ConfigurationSettingResponse<HeadersT> = ConfigurationSetting &\n HttpResponseField<HeadersT> &\n Pick<HeadersT, Exclude<keyof HeadersT, \"eTag\">>;\n\n/**\n * Options used to provide if-none-match for an HTTP request\n */\nexport interface HttpOnlyIfChangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag does not match the value\n * provided.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Options used to provide if-match for an HTTP request\n */\nexport interface HttpOnlyIfUnchangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag matches the value provided.\n */\n onlyIfUnchanged?: boolean;\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSetting)[];\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalSnapshotFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSnapshot)[];\n}\n\n/**\n * Used when the API supports selectively returning labels fields.\n */\nexport interface OptionalLabelsFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof SettingLabel)[];\n}\n/**\n * Sync token header field\n */\nexport interface SyncTokenHeaderField {\n /**\n * Enables real-time consistency between requests by providing the returned value in the next\n * request made to the server.\n */\n syncToken?: string;\n}\n\n/**\n * Options used when adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingOptions extends OperationOptions {}\n\n/**\n * Response from adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingResponse\n extends ConfigurationSetting,\n SyncTokenHeaderField,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Response from deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingResponse\n extends SyncTokenHeaderField,\n HttpResponseFields,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options for deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField,\n OperationOptions {}\n\n/**\n * Options used when saving a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField,\n OperationOptions {}\n\n/**\n * Response from setting a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingResponse\n extends ConfigurationSetting,\n SyncTokenHeaderField,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Headers from getting a ConfigurationSetting.\n */\nexport interface GetConfigurationHeaders extends SyncTokenHeaderField {}\n\n/**\n * Response from retrieving a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingResponse\n extends ConfigurationSetting,\n GetConfigurationHeaders,\n HttpResponseFields,\n HttpResponseField<GetConfigurationHeaders> {}\n\n/**\n * Options for getting a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingOptions\n extends OperationOptions,\n HttpOnlyIfChangedField,\n OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSettingsOptions extends OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n\n /**\n * Filters for keys. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 key names are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|---------------------------------------|\n * | omitted or * | Matches any key |\n * | abc | Matches a key named abc |\n * | abc* | Matches key names that start with abc |\n *\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n */\n keyFilter?: string;\n\n /* eslint-disable tsdoc/syntax */\n /**\n * Filters for labels. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 labels are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|------------------------------------------------------|\n * | omitted or * | Matches any key |\n * | \\0 | Matches any key without a label (URL encoded as %00) |\n * | prod | Matches a key with label named prod |\n * | prod* | Matches key with label names that start with prod |\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n *\n * Reference: https://learn.microsoft.com/azure/azure-app-configuration/rest-api-key-value\n */\n labelFilter?: string;\n\n /** A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering */\n tagsFilter?: string[];\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListConfigurationSettingsForSnapshotOptions\n extends OperationOptions,\n OptionalFields {}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListConfigurationSettingsOptions extends OperationOptions, ListSettingsOptions {\n /**\n * Etags list for page\n */\n pageEtags?: string[];\n}\n\n/**\n * Options for listLabels\n */\nexport interface ListLabelsOptions extends OperationOptions, OptionalLabelsFields {\n /** A filter for the name of the returned labels. */\n nameFilter?: string;\n\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSnapshots extends OptionalSnapshotFields {\n /** A filter for the name of the returned snapshots. */\n nameFilter?: string;\n\n /** Used to filter returned snapshots by their status property. */\n statusFilter?: ConfigurationSnapshotStatus[];\n}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListSnapshotsOptions\n extends OperationOptions,\n ListSnapshots,\n OptionalSnapshotFields {}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n // The appconfig service doesn't currently support letting you select a page size\n // so we're ignoring their setting for now.\n}\n\n/**\n * Entity with etag.\n */\nexport interface EtagEntity {\n /**\n * The etag for this entity\n */\n etag?: string;\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListConfigurationSettingPage\n extends HttpResponseField<SyncTokenHeaderField>,\n PageSettings,\n EtagEntity {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListLabelsPage\n extends HttpResponseField<SyncTokenHeaderField>,\n PageSettings,\n EtagEntity {\n /**\n * The collection of labels\n */\n items: SettingLabel[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListSnapshotsPage extends SyncTokenHeaderField, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSnapshot[];\n}\n\n/**\n * Options for listRevisions that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListRevisionsOptions extends OperationOptions, ListSettingsOptions {}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListRevisionsPage extends HttpResponseField<SyncTokenHeaderField>, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * Options for setReadOnly\n */\nexport interface SetReadOnlyOptions extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Response when setting a value to read-only.\n */\nexport interface SetReadOnlyResponse\n extends ConfigurationSetting,\n SyncTokenHeaderField,\n HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface RetryOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation.\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * Options used when creating a Snapshot.\n */\nexport interface CreateSnapshotOptions extends OperationOptions {\n /**\n * The amount of time to wait (in milliseconds) between subsequent requests relating to the same operation.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Response from adding a Snapshot.\n */\nexport interface SnapshotResponse extends ConfigurationSnapshot, SyncTokenHeaderField {}\n\n/**\n * Options used when getting a Snapshot.\n */\nexport interface GetSnapshotOptions extends OperationOptions, OptionalSnapshotFields {}\n\n/**\n * Response from getting a Snapshot.\n */\nexport interface GetSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Options used when updating a Snapshot.\n */\nexport interface UpdateSnapshotOptions extends OperationOptions {\n /**\n * The etag for this snapshot\n */\n etag?: string;\n}\n\n/**\n * Response from updating a Snapshot.\n */\nexport interface UpdateSnapshotResponse extends SnapshotResponse {}\n/**\n * Response from updating a Snapshot.\n */\nexport interface CreateSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Fields that uniquely identify a snapshot\n */\nexport interface SnapshotInfo {\n /** The name for this snapshot */\n name: string;\n /** A list of filters used to filter the key-values included in the snapshot. */\n filters: ConfigurationSettingsFilter[];\n /** The composition type describes how the key-values within the snapshot are composed. The 'all' composition type includes all key-values. The 'group_by_key' composition type ensures there are no two key-values containing the same key. */\n compositionType?: SnapshotComposition;\n /** The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used. */\n retentionPeriodInSeconds?: number;\n /** The tags of the snapshot. */\n tags?: { [propertyName: string]: string };\n}\n\nexport {\n ConfigurationSnapshot,\n ConfigurationSettingsFilter,\n SnapshotComposition,\n KnownSnapshotComposition,\n KnownConfigurationSnapshotStatus,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAiClC;;GAEG;AACH,MAAM,CAAN,IAAY,sBAaX;AAbD,WAAY,sBAAsB;IAChC;;OAEG;IACH,mEAAyC,CAAA;IACzC;;OAEG;IACH,wEAA8C,CAAA;IAC9C;;OAEG;IACH,0EAAgD,CAAA;AAClD,CAAC,EAbW,sBAAsB,KAAtB,sBAAsB,QAajC;AAsfD,OAAO,EAIL,wBAAwB,EACxB,gCAAgC,GAGjC,MAAM,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CompatResponse } from \"@azure/core-http-compat\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport type {\n SnapshotComposition,\n ConfigurationSettingsFilter,\n ConfigurationSnapshot,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n\n/**\n * Provides configuration options for AppConfigurationClient.\n */\nexport interface AppConfigurationClientOptions extends CommonClientOptions {\n /**\n * The API version to use when interacting with the service. The default value is `2023-11-01`.\n * Note that overriding this default value may result in unsupported behavior.\n */\n apiVersion?: string;\n\n /**\n * The Audience to use for authentication with Azure Active Directory (AAD).\n * {@link KnownAppConfigAudience} can be used interchangeably with audience.\n * If not specified, the default audience will be set to Azure Public Cloud.\n */\n audience?: string;\n}\n\n/**\n * Known values for Azure App Configuration Audience\n */\nexport enum KnownAppConfigAudience {\n /**\n * Audience for Azure China\n */\n AzureChina = \"https://appconfig.azure.cn\",\n /**\n * Audience for Azure Government\n */\n AzureGovernment = \"https://appconfig.azure.us\",\n /**\n * Audience for Azure Public\n */\n AzurePublicCloud = \"https://appconfig.azure.com\",\n}\n\n/**\n * Fields that uniquely identify a configuration setting\n */\nexport interface ConfigurationSettingId {\n /**\n * The etag for this setting\n */\n etag?: string;\n /**\n * The key for this setting.\n * Feature flags must be prefixed with `.appconfig.featureflag/<feature-flag-name>`.\n */\n key: string;\n\n /**\n * The label for this setting. Leaving this undefined means this\n * setting does not have a label.\n */\n label?: string;\n}\n/**\n * Necessary fields for updating or creating a new configuration setting\n */\nexport type ConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingId & {\n /**\n * The content type of the setting's value\n */\n contentType?: string;\n\n /**\n * Tags for this key\n */\n tags?: { [propertyName: string]: string };\n} & (T extends string\n ? {\n /**\n * The setting's value\n */\n value?: string;\n }\n : {\n /**\n * The setting's value\n */\n value: T;\n });\n\n/**\n * Configuration setting with extra metadata from the server, indicating\n * its etag, whether it is currently readOnly and when it was last modified.\n */\nexport type ConfigurationSetting<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T> & {\n /**\n * Whether or not the setting is read-only\n */\n isReadOnly: boolean;\n\n /**\n * The date when this setting was last modified\n */\n lastModified?: Date;\n};\n\n/**\n * Fields that are hoisted up from the _response field of the object\n * Used in cases where individual HTTP response fields are important for\n * the user to use in common-use cases like handling http status codes 204 or 304.\n */\nexport interface HttpResponseFields {\n /**\n * The HTTP status code for the response\n */\n statusCode: number;\n}\n/**\n * HTTP response related information - headers and raw body.\n */\nexport interface HttpResponseField<HeadersT> {\n /**\n * The underlying HTTP response.\n */\n _response: CompatResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: HeadersT;\n\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n };\n}\n/**\n * Parameters for adding a new configuration setting\n */\nexport type AddConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Parameters for creating or updating a new configuration setting\n */\nexport type SetConfigurationSettingParam<\n T extends string | FeatureFlagValue | SecretReferenceValue | SnapshotReferenceValue = string,\n> = ConfigurationSettingParam<T>;\n\n/**\n * Standard base response for getting, deleting or updating a configuration setting\n */\nexport type ConfigurationSettingResponse<HeadersT> = ConfigurationSetting &\n HttpResponseField<HeadersT> &\n Pick<HeadersT, Exclude<keyof HeadersT, \"eTag\">>;\n\n/**\n * Options used to provide if-none-match for an HTTP request\n */\nexport interface HttpOnlyIfChangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag does not match the value\n * provided.\n */\n onlyIfChanged?: boolean;\n}\n\n/**\n * Options used to provide if-match for an HTTP request\n */\nexport interface HttpOnlyIfUnchangedField {\n /**\n * Used to perform an operation only if the targeted resource's etag matches the value provided.\n */\n onlyIfUnchanged?: boolean;\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSetting)[];\n}\n\n/**\n * Used when the API supports selectively returning fields.\n */\nexport interface OptionalSnapshotFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof ConfigurationSnapshot)[];\n}\n\n/**\n * Used when the API supports selectively returning labels fields.\n */\nexport interface OptionalLabelsFields {\n /**\n * Which fields to return for each ConfigurationSetting\n */\n fields?: (keyof SettingLabel)[];\n}\n/**\n * Sync token header field\n */\nexport interface SyncTokenHeaderField {\n /**\n * Enables real-time consistency between requests by providing the returned value in the next\n * request made to the server.\n */\n syncToken?: string;\n}\n\n/**\n * Options used when adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingOptions extends OperationOptions {}\n\n/**\n * Response from adding a ConfigurationSetting.\n */\nexport interface AddConfigurationSettingResponse\n extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Response from deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingResponse\n extends SyncTokenHeaderField, HttpResponseFields, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options for deleting a ConfigurationSetting.\n */\nexport interface DeleteConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Options used when saving a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingOptions\n extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Response from setting a ConfigurationSetting.\n */\nexport interface SetConfigurationSettingResponse\n extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Headers from getting a ConfigurationSetting.\n */\nexport interface GetConfigurationHeaders extends SyncTokenHeaderField {}\n\n/**\n * Response from retrieving a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingResponse\n extends\n ConfigurationSetting,\n GetConfigurationHeaders,\n HttpResponseFields,\n HttpResponseField<GetConfigurationHeaders> {}\n\n/**\n * Options for getting a ConfigurationSetting.\n */\nexport interface GetConfigurationSettingOptions\n extends OperationOptions, HttpOnlyIfChangedField, OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSettingsOptions extends OptionalFields {\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n\n /**\n * Filters for keys. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 key names are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|---------------------------------------|\n * | omitted or * | Matches any key |\n * | abc | Matches a key named abc |\n * | abc* | Matches key names that start with abc |\n *\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n */\n keyFilter?: string;\n\n /* eslint-disable tsdoc/syntax */\n /**\n * Filters for labels. There are two types of matching:\n *\n * 1. Exact matching. Up to 5 labels are allowed, separated by commas (',')\n * 2. Wildcard matching. A single wildcard expression can be specified.\n *\n * | Value | Matches |\n * |--------------|------------------------------------------------------|\n * | omitted or * | Matches any key |\n * | \\0 | Matches any key without a label (URL encoded as %00) |\n * | prod | Matches a key with label named prod |\n * | prod* | Matches key with label names that start with prod |\n * These characters are reserved and must be prefixed with backslash in order\n * to be specified: * or \\\\ or ,\n *\n * Reference: https://learn.microsoft.com/azure/azure-app-configuration/rest-api-key-value\n */\n labelFilter?: string;\n\n /** A filter used to query by tags. Syntax reference: https://aka.ms/azconfig/docs/keyvaluefiltering */\n tagsFilter?: string[];\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListConfigurationSettingsForSnapshotOptions\n extends OperationOptions, OptionalFields {}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListConfigurationSettingsOptions extends OperationOptions, ListSettingsOptions {\n /**\n * Etags list for page\n */\n pageEtags?: string[];\n}\n\n/**\n * Options for listLabels\n */\nexport interface ListLabelsOptions extends OperationOptions, OptionalLabelsFields {\n /** A filter for the name of the returned labels. */\n nameFilter?: string;\n\n /**\n * Requests the server to respond with the state of the resource at the specified time.\n */\n acceptDateTime?: Date;\n}\n\n/**\n * Common options for 'list' style APIs in AppConfig used to specify wildcards as well as\n * the accept date time header.\n */\nexport interface ListSnapshots extends OptionalSnapshotFields {\n /** A filter for the name of the returned snapshots. */\n nameFilter?: string;\n\n /** Used to filter returned snapshots by their status property. */\n statusFilter?: ConfigurationSnapshotStatus[];\n}\n\n/**\n * Options for listConfigurationSettings that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListSnapshotsOptions\n extends OperationOptions, ListSnapshots, OptionalSnapshotFields {}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n // The appconfig service doesn't currently support letting you select a page size\n // so we're ignoring their setting for now.\n}\n\n/**\n * Entity with etag.\n */\nexport interface EtagEntity {\n /**\n * The etag for this entity\n */\n etag?: string;\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListConfigurationSettingPage\n extends HttpResponseField<SyncTokenHeaderField>, PageSettings, EtagEntity {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListLabelsPage\n extends HttpResponseField<SyncTokenHeaderField>, PageSettings, EtagEntity {\n /**\n * The collection of labels\n */\n items: SettingLabel[];\n}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListSnapshotsPage extends SyncTokenHeaderField, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSnapshot[];\n}\n\n/**\n * Options for listRevisions that allow for filtering based on keys, labels and other fields.\n * Also provides `fields` which allows you to selectively choose which fields are populated in the\n * result.\n */\nexport interface ListRevisionsOptions extends OperationOptions, ListSettingsOptions {}\n\n/**\n * A page of configuration settings and the corresponding HTTP response\n */\nexport interface ListRevisionsPage extends HttpResponseField<SyncTokenHeaderField>, PageSettings {\n /**\n * The configuration settings for this page of results.\n */\n items: ConfigurationSetting[];\n}\n\n/**\n * Options for setReadOnly\n */\nexport interface SetReadOnlyOptions extends HttpOnlyIfUnchangedField, OperationOptions {}\n\n/**\n * Response when setting a value to read-only.\n */\nexport interface SetReadOnlyResponse\n extends ConfigurationSetting, SyncTokenHeaderField, HttpResponseField<SyncTokenHeaderField> {}\n\n/**\n * Options that control how to retry failed requests.\n */\nexport interface RetryOptions {\n /**\n * The maximum number of retry attempts. Defaults to 3.\n */\n maxRetries?: number;\n\n /**\n * The maximum delay in milliseconds allowed before retrying an operation.\n */\n maxRetryDelayInMs?: number;\n}\n\n/**\n * Options used when creating a Snapshot.\n */\nexport interface CreateSnapshotOptions extends OperationOptions {\n /**\n * The amount of time to wait (in milliseconds) between subsequent requests relating to the same operation.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Response from adding a Snapshot.\n */\nexport interface SnapshotResponse extends ConfigurationSnapshot, SyncTokenHeaderField {}\n\n/**\n * Options used when getting a Snapshot.\n */\nexport interface GetSnapshotOptions extends OperationOptions, OptionalSnapshotFields {}\n\n/**\n * Response from getting a Snapshot.\n */\nexport interface GetSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Options used when updating a Snapshot.\n */\nexport interface UpdateSnapshotOptions extends OperationOptions {\n /**\n * The etag for this snapshot\n */\n etag?: string;\n}\n\n/**\n * Response from updating a Snapshot.\n */\nexport interface UpdateSnapshotResponse extends SnapshotResponse {}\n/**\n * Response from updating a Snapshot.\n */\nexport interface CreateSnapshotResponse extends SnapshotResponse {}\n\n/**\n * Fields that uniquely identify a snapshot\n */\nexport interface SnapshotInfo {\n /** The name for this snapshot */\n name: string;\n /** A list of filters used to filter the key-values included in the snapshot. */\n filters: ConfigurationSettingsFilter[];\n /** The composition type describes how the key-values within the snapshot are composed. The 'all' composition type includes all key-values. The 'group_by_key' composition type ensures there are no two key-values containing the same key. */\n compositionType?: SnapshotComposition;\n /** The amount of time, in seconds, that a snapshot will remain in the archived state before expiring. This property is only writable during the creation of a snapshot. If not specified, the default lifetime of key-value revisions will be used. */\n retentionPeriodInSeconds?: number;\n /** The tags of the snapshot. */\n tags?: { [propertyName: string]: string };\n}\n\nexport {\n ConfigurationSnapshot,\n ConfigurationSettingsFilter,\n SnapshotComposition,\n KnownSnapshotComposition,\n KnownConfigurationSnapshotStatus,\n ConfigurationSnapshotStatus,\n SettingLabel,\n} from \"./generated/src/index.js\";\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@azure/app-configuration",
|
|
3
3
|
"author": "Microsoft Corporation",
|
|
4
4
|
"description": "An isomorphic client library for the Azure App Configuration service.",
|
|
5
|
-
"version": "1.10.0-alpha.
|
|
5
|
+
"version": "1.10.0-alpha.20251202.1",
|
|
6
6
|
"sdk-type": "client",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"node",
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
"tshy": "^3.0.3",
|
|
79
79
|
"typescript": "~5.9.3",
|
|
80
80
|
"vitest": "^4.0.8",
|
|
81
|
-
"@azure-tools/test-
|
|
81
|
+
"@azure-tools/test-credential": "^2.1.2",
|
|
82
82
|
"@azure/dev-tool": "^1.0.0",
|
|
83
|
-
"@azure/
|
|
84
|
-
"@azure
|
|
83
|
+
"@azure-tools/test-recorder": "^4.1.1",
|
|
84
|
+
"@azure/eslint-plugin-azure-sdk": "^3.0.0"
|
|
85
85
|
},
|
|
86
86
|
"//sampleConfiguration": {
|
|
87
87
|
"productName": "Azure App Configuration",
|