@azure/app-configuration 1.13.0-beta.1 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -34
- package/dist/browser/appConfigurationClient.d.ts +13 -0
- package/dist/browser/appConfigurationClient.d.ts.map +1 -1
- package/dist/browser/appConfigurationClient.js +117 -15
- package/dist/browser/appConfigurationClient.js.map +1 -1
- package/dist/browser/generated/api/appConfigurationContext.d.ts.map +1 -1
- package/dist/browser/generated/api/appConfigurationContext.js +3 -4
- package/dist/browser/generated/api/appConfigurationContext.js.map +1 -1
- package/dist/browser/generated/api/operations.d.ts +2 -2
- package/dist/browser/generated/api/operations.d.ts.map +1 -1
- package/dist/browser/generated/api/operations.js +30 -35
- package/dist/browser/generated/api/operations.js.map +1 -1
- package/dist/browser/generated/api/options.d.ts +0 -4
- package/dist/browser/generated/api/options.d.ts.map +1 -1
- package/dist/browser/generated/api/options.js.map +1 -1
- package/dist/browser/generated/appConfigurationClient.d.ts +1 -4
- package/dist/browser/generated/appConfigurationClient.d.ts.map +1 -1
- package/dist/browser/generated/appConfigurationClient.js +8 -5
- package/dist/browser/generated/appConfigurationClient.js.map +1 -1
- package/dist/browser/generated/index.d.ts +1 -3
- package/dist/browser/generated/index.d.ts.map +1 -1
- package/dist/browser/generated/index.js.map +1 -1
- package/dist/browser/generated/models/index.d.ts +1 -1
- package/dist/browser/generated/models/index.d.ts.map +1 -1
- package/dist/browser/generated/models/index.js.map +1 -1
- package/dist/browser/generated/models/models.d.ts +5 -144
- package/dist/browser/generated/models/models.d.ts.map +1 -1
- package/dist/browser/generated/models/models.js +0 -231
- package/dist/browser/generated/models/models.js.map +1 -1
- package/dist/browser/generated/restorePollerHelpers.d.ts.map +1 -1
- package/dist/browser/generated/restorePollerHelpers.js.map +1 -1
- package/dist/browser/index.d.ts +0 -1
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +0 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/internal/constants.d.ts +2 -2
- package/dist/browser/internal/constants.d.ts.map +1 -1
- package/dist/browser/internal/constants.js +2 -2
- package/dist/browser/internal/constants.js.map +1 -1
- package/dist/browser/internal/helpers.d.ts +19 -31
- package/dist/browser/internal/helpers.d.ts.map +1 -1
- package/dist/browser/internal/helpers.js +21 -57
- package/dist/browser/internal/helpers.js.map +1 -1
- package/dist/browser/models.d.ts +7 -272
- package/dist/browser/models.d.ts.map +1 -1
- package/dist/browser/models.js +0 -28
- package/dist/browser/models.js.map +1 -1
- package/dist/browser/package.json +6 -1
- package/dist/commonjs/appConfigurationClient.d.ts +13 -0
- package/dist/commonjs/appConfigurationClient.d.ts.map +1 -1
- package/dist/commonjs/appConfigurationClient.js +128 -23
- package/dist/commonjs/appConfigurationClient.js.map +3 -3
- package/dist/commonjs/generated/api/appConfigurationContext.d.ts.map +1 -1
- package/dist/commonjs/generated/api/appConfigurationContext.js +2 -13
- package/dist/commonjs/generated/api/appConfigurationContext.js.map +3 -3
- package/dist/commonjs/generated/api/operations.d.ts +2 -2
- package/dist/commonjs/generated/api/operations.d.ts.map +1 -1
- package/dist/commonjs/generated/api/operations.js +32 -37
- package/dist/commonjs/generated/api/operations.js.map +2 -2
- package/dist/commonjs/generated/api/options.d.ts +0 -4
- package/dist/commonjs/generated/api/options.d.ts.map +1 -1
- package/dist/commonjs/generated/api/options.js.map +1 -1
- package/dist/commonjs/generated/appConfigurationClient.d.ts +1 -4
- package/dist/commonjs/generated/appConfigurationClient.d.ts.map +1 -1
- package/dist/commonjs/generated/appConfigurationClient.js +6 -5
- package/dist/commonjs/generated/appConfigurationClient.js.map +2 -2
- package/dist/commonjs/generated/index.d.ts +1 -3
- package/dist/commonjs/generated/index.d.ts.map +1 -1
- package/dist/commonjs/generated/index.js.map +2 -2
- package/dist/commonjs/generated/models/index.d.ts +1 -1
- package/dist/commonjs/generated/models/index.d.ts.map +1 -1
- package/dist/commonjs/generated/models/index.js.map +2 -2
- package/dist/commonjs/generated/models/models.d.ts +5 -144
- package/dist/commonjs/generated/models/models.d.ts.map +1 -1
- package/dist/commonjs/generated/models/models.js +2 -268
- package/dist/commonjs/generated/models/models.js.map +2 -2
- package/dist/commonjs/generated/restorePollerHelpers.d.ts.map +1 -1
- package/dist/commonjs/generated/restorePollerHelpers.js.map +2 -2
- package/dist/commonjs/index.d.ts +0 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +0 -3
- package/dist/commonjs/index.js.map +2 -2
- package/dist/commonjs/internal/constants.d.ts +2 -2
- package/dist/commonjs/internal/constants.d.ts.map +1 -1
- package/dist/commonjs/internal/constants.js +2 -2
- package/dist/commonjs/internal/constants.js.map +1 -1
- package/dist/commonjs/internal/helpers.d.ts +19 -31
- package/dist/commonjs/internal/helpers.d.ts.map +1 -1
- package/dist/commonjs/internal/helpers.js +23 -46
- package/dist/commonjs/internal/helpers.js.map +2 -2
- package/dist/commonjs/models.d.ts +7 -272
- package/dist/commonjs/models.d.ts.map +1 -1
- package/dist/commonjs/models.js +2 -24
- package/dist/commonjs/models.js.map +3 -3
- package/dist/commonjs/package.json +6 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/appConfigurationClient.d.ts +13 -0
- package/dist/esm/appConfigurationClient.d.ts.map +1 -1
- package/dist/esm/appConfigurationClient.js +117 -15
- package/dist/esm/appConfigurationClient.js.map +1 -1
- package/dist/esm/generated/api/appConfigurationContext.d.ts.map +1 -1
- package/dist/esm/generated/api/appConfigurationContext.js +3 -4
- package/dist/esm/generated/api/appConfigurationContext.js.map +1 -1
- package/dist/esm/generated/api/operations.d.ts +2 -2
- package/dist/esm/generated/api/operations.d.ts.map +1 -1
- package/dist/esm/generated/api/operations.js +30 -35
- package/dist/esm/generated/api/operations.js.map +1 -1
- package/dist/esm/generated/api/options.d.ts +0 -4
- package/dist/esm/generated/api/options.d.ts.map +1 -1
- package/dist/esm/generated/api/options.js.map +1 -1
- package/dist/esm/generated/appConfigurationClient.d.ts +1 -4
- package/dist/esm/generated/appConfigurationClient.d.ts.map +1 -1
- package/dist/esm/generated/appConfigurationClient.js +8 -5
- package/dist/esm/generated/appConfigurationClient.js.map +1 -1
- package/dist/esm/generated/index.d.ts +1 -3
- package/dist/esm/generated/index.d.ts.map +1 -1
- package/dist/esm/generated/index.js.map +1 -1
- package/dist/esm/generated/models/index.d.ts +1 -1
- package/dist/esm/generated/models/index.d.ts.map +1 -1
- package/dist/esm/generated/models/index.js.map +1 -1
- package/dist/esm/generated/models/models.d.ts +5 -144
- package/dist/esm/generated/models/models.d.ts.map +1 -1
- package/dist/esm/generated/models/models.js +0 -231
- package/dist/esm/generated/models/models.js.map +1 -1
- package/dist/esm/generated/restorePollerHelpers.d.ts.map +1 -1
- package/dist/esm/generated/restorePollerHelpers.js.map +1 -1
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/internal/constants.d.ts +2 -2
- package/dist/esm/internal/constants.d.ts.map +1 -1
- package/dist/esm/internal/constants.js +2 -2
- package/dist/esm/internal/constants.js.map +1 -1
- package/dist/esm/internal/helpers.d.ts +19 -31
- package/dist/esm/internal/helpers.d.ts.map +1 -1
- package/dist/esm/internal/helpers.js +21 -57
- package/dist/esm/internal/helpers.js.map +1 -1
- package/dist/esm/models.d.ts +7 -272
- package/dist/esm/models.d.ts.map +1 -1
- package/dist/esm/models.js +0 -28
- package/dist/esm/models.js.map +1 -1
- package/dist/esm/package.json +6 -1
- package/dist/react-native/appConfigurationClient.d.ts +13 -0
- package/dist/react-native/appConfigurationClient.d.ts.map +1 -1
- package/dist/react-native/appConfigurationClient.js +117 -15
- package/dist/react-native/appConfigurationClient.js.map +1 -1
- package/dist/react-native/generated/api/appConfigurationContext.d.ts.map +1 -1
- package/dist/react-native/generated/api/appConfigurationContext.js +3 -4
- package/dist/react-native/generated/api/appConfigurationContext.js.map +1 -1
- package/dist/react-native/generated/api/operations.d.ts +2 -2
- package/dist/react-native/generated/api/operations.d.ts.map +1 -1
- package/dist/react-native/generated/api/operations.js +30 -35
- package/dist/react-native/generated/api/operations.js.map +1 -1
- package/dist/react-native/generated/api/options.d.ts +0 -4
- package/dist/react-native/generated/api/options.d.ts.map +1 -1
- package/dist/react-native/generated/api/options.js.map +1 -1
- package/dist/react-native/generated/appConfigurationClient.d.ts +1 -4
- package/dist/react-native/generated/appConfigurationClient.d.ts.map +1 -1
- package/dist/react-native/generated/appConfigurationClient.js +8 -5
- package/dist/react-native/generated/appConfigurationClient.js.map +1 -1
- package/dist/react-native/generated/index.d.ts +1 -3
- package/dist/react-native/generated/index.d.ts.map +1 -1
- package/dist/react-native/generated/index.js.map +1 -1
- package/dist/react-native/generated/models/index.d.ts +1 -1
- package/dist/react-native/generated/models/index.d.ts.map +1 -1
- package/dist/react-native/generated/models/index.js.map +1 -1
- package/dist/react-native/generated/models/models.d.ts +5 -144
- package/dist/react-native/generated/models/models.d.ts.map +1 -1
- package/dist/react-native/generated/models/models.js +0 -231
- package/dist/react-native/generated/models/models.js.map +1 -1
- package/dist/react-native/generated/restorePollerHelpers.d.ts.map +1 -1
- package/dist/react-native/generated/restorePollerHelpers.js.map +1 -1
- package/dist/react-native/index.d.ts +0 -1
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +0 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/internal/constants.d.ts +2 -2
- package/dist/react-native/internal/constants.d.ts.map +1 -1
- package/dist/react-native/internal/constants.js +2 -2
- package/dist/react-native/internal/constants.js.map +1 -1
- package/dist/react-native/internal/helpers.d.ts +19 -31
- package/dist/react-native/internal/helpers.d.ts.map +1 -1
- package/dist/react-native/internal/helpers.js +21 -57
- package/dist/react-native/internal/helpers.js.map +1 -1
- package/dist/react-native/models.d.ts +7 -272
- package/dist/react-native/models.d.ts.map +1 -1
- package/dist/react-native/models.js +0 -28
- package/dist/react-native/models.js.map +1 -1
- package/dist/react-native/package.json +6 -1
- package/package.json +6 -6
- package/dist/browser/featureFlagClient.d.ts +0 -172
- package/dist/browser/featureFlagClient.d.ts.map +0 -1
- package/dist/browser/featureFlagClient.js +0 -279
- package/dist/browser/featureFlagClient.js.map +0 -1
- package/dist/browser/generated/api/featureFlagClient/index.d.ts +0 -3
- package/dist/browser/generated/api/featureFlagClient/index.d.ts.map +0 -1
- package/dist/browser/generated/api/featureFlagClient/index.js +0 -4
- package/dist/browser/generated/api/featureFlagClient/index.js.map +0 -1
- package/dist/browser/generated/api/featureFlagClient/operations.d.ts +0 -38
- package/dist/browser/generated/api/featureFlagClient/operations.d.ts.map +0 -1
- package/dist/browser/generated/api/featureFlagClient/operations.js +0 -404
- package/dist/browser/generated/api/featureFlagClient/operations.js.map +0 -1
- package/dist/browser/generated/api/featureFlagClient/options.d.ts +0 -240
- package/dist/browser/generated/api/featureFlagClient/options.d.ts.map +0 -1
- package/dist/browser/generated/api/featureFlagClient/options.js +0 -4
- package/dist/browser/generated/api/featureFlagClient/options.js.map +0 -1
- package/dist/browser/generated/classic/featureFlagClient/index.d.ts +0 -25
- package/dist/browser/generated/classic/featureFlagClient/index.d.ts.map +0 -1
- package/dist/browser/generated/classic/featureFlagClient/index.js +0 -21
- package/dist/browser/generated/classic/featureFlagClient/index.js.map +0 -1
- package/dist/browser/generated/classic/index.d.ts +0 -2
- package/dist/browser/generated/classic/index.d.ts.map +0 -1
- package/dist/browser/generated/classic/index.js +0 -4
- package/dist/browser/generated/classic/index.js.map +0 -1
- package/dist/browser/internal/createGeneratedClient.d.ts +0 -35
- package/dist/browser/internal/createGeneratedClient.d.ts.map +0 -1
- package/dist/browser/internal/createGeneratedClient.js +0 -85
- package/dist/browser/internal/createGeneratedClient.js.map +0 -1
- package/dist/browser/internal/doubleEncodedQueryParamNamePolicy.d.ts +0 -7
- package/dist/browser/internal/doubleEncodedQueryParamNamePolicy.d.ts.map +0 -1
- package/dist/browser/internal/doubleEncodedQueryParamNamePolicy.js +0 -49
- package/dist/browser/internal/doubleEncodedQueryParamNamePolicy.js.map +0 -1
- package/dist/browser/internal/listFeatureFlagRevisions.d.ts +0 -16
- package/dist/browser/internal/listFeatureFlagRevisions.d.ts.map +0 -1
- package/dist/browser/internal/listFeatureFlagRevisions.js +0 -54
- package/dist/browser/internal/listFeatureFlagRevisions.js.map +0 -1
- package/dist/browser/internal/listFeatureFlags.d.ts +0 -19
- package/dist/browser/internal/listFeatureFlags.d.ts.map +0 -1
- package/dist/browser/internal/listFeatureFlags.js +0 -77
- package/dist/browser/internal/listFeatureFlags.js.map +0 -1
- package/dist/browser/internal/listLabels.d.ts +0 -12
- package/dist/browser/internal/listLabels.d.ts.map +0 -1
- package/dist/browser/internal/listLabels.js +0 -48
- package/dist/browser/internal/listLabels.js.map +0 -1
- package/dist/commonjs/featureFlagClient.d.ts +0 -172
- package/dist/commonjs/featureFlagClient.d.ts.map +0 -1
- package/dist/commonjs/featureFlagClient.js +0 -339
- package/dist/commonjs/featureFlagClient.js.map +0 -7
- package/dist/commonjs/generated/api/featureFlagClient/index.d.ts +0 -3
- package/dist/commonjs/generated/api/featureFlagClient/index.d.ts.map +0 -1
- package/dist/commonjs/generated/api/featureFlagClient/index.js +0 -42
- package/dist/commonjs/generated/api/featureFlagClient/index.js.map +0 -7
- package/dist/commonjs/generated/api/featureFlagClient/operations.d.ts +0 -38
- package/dist/commonjs/generated/api/featureFlagClient/operations.d.ts.map +0 -1
- package/dist/commonjs/generated/api/featureFlagClient/operations.js +0 -448
- package/dist/commonjs/generated/api/featureFlagClient/operations.js.map +0 -7
- package/dist/commonjs/generated/api/featureFlagClient/options.d.ts +0 -240
- package/dist/commonjs/generated/api/featureFlagClient/options.d.ts.map +0 -1
- package/dist/commonjs/generated/api/featureFlagClient/options.js +0 -16
- package/dist/commonjs/generated/api/featureFlagClient/options.js.map +0 -7
- package/dist/commonjs/generated/classic/featureFlagClient/index.d.ts +0 -25
- package/dist/commonjs/generated/classic/featureFlagClient/index.d.ts.map +0 -1
- package/dist/commonjs/generated/classic/featureFlagClient/index.js +0 -45
- package/dist/commonjs/generated/classic/featureFlagClient/index.js.map +0 -7
- package/dist/commonjs/generated/classic/index.d.ts +0 -2
- package/dist/commonjs/generated/classic/index.d.ts.map +0 -1
- package/dist/commonjs/generated/classic/index.js +0 -16
- package/dist/commonjs/generated/classic/index.js.map +0 -7
- package/dist/commonjs/internal/createGeneratedClient.d.ts +0 -35
- package/dist/commonjs/internal/createGeneratedClient.d.ts.map +0 -1
- package/dist/commonjs/internal/createGeneratedClient.js +0 -101
- package/dist/commonjs/internal/createGeneratedClient.js.map +0 -7
- package/dist/commonjs/internal/doubleEncodedQueryParamNamePolicy.d.ts +0 -7
- package/dist/commonjs/internal/doubleEncodedQueryParamNamePolicy.d.ts.map +0 -1
- package/dist/commonjs/internal/doubleEncodedQueryParamNamePolicy.js +0 -67
- package/dist/commonjs/internal/doubleEncodedQueryParamNamePolicy.js.map +0 -7
- package/dist/commonjs/internal/listFeatureFlagRevisions.d.ts +0 -16
- package/dist/commonjs/internal/listFeatureFlagRevisions.d.ts.map +0 -1
- package/dist/commonjs/internal/listFeatureFlagRevisions.js +0 -68
- package/dist/commonjs/internal/listFeatureFlagRevisions.js.map +0 -7
- package/dist/commonjs/internal/listFeatureFlags.d.ts +0 -19
- package/dist/commonjs/internal/listFeatureFlags.d.ts.map +0 -1
- package/dist/commonjs/internal/listFeatureFlags.js +0 -89
- package/dist/commonjs/internal/listFeatureFlags.js.map +0 -7
- package/dist/commonjs/internal/listLabels.d.ts +0 -12
- package/dist/commonjs/internal/listLabels.d.ts.map +0 -1
- package/dist/commonjs/internal/listLabels.js +0 -67
- package/dist/commonjs/internal/listLabels.js.map +0 -7
- package/dist/esm/featureFlagClient.d.ts +0 -172
- package/dist/esm/featureFlagClient.d.ts.map +0 -1
- package/dist/esm/featureFlagClient.js +0 -279
- package/dist/esm/featureFlagClient.js.map +0 -1
- package/dist/esm/generated/api/featureFlagClient/index.d.ts +0 -3
- package/dist/esm/generated/api/featureFlagClient/index.d.ts.map +0 -1
- package/dist/esm/generated/api/featureFlagClient/index.js +0 -4
- package/dist/esm/generated/api/featureFlagClient/index.js.map +0 -1
- package/dist/esm/generated/api/featureFlagClient/operations.d.ts +0 -38
- package/dist/esm/generated/api/featureFlagClient/operations.d.ts.map +0 -1
- package/dist/esm/generated/api/featureFlagClient/operations.js +0 -404
- package/dist/esm/generated/api/featureFlagClient/operations.js.map +0 -1
- package/dist/esm/generated/api/featureFlagClient/options.d.ts +0 -240
- package/dist/esm/generated/api/featureFlagClient/options.d.ts.map +0 -1
- package/dist/esm/generated/api/featureFlagClient/options.js +0 -4
- package/dist/esm/generated/api/featureFlagClient/options.js.map +0 -1
- package/dist/esm/generated/classic/featureFlagClient/index.d.ts +0 -25
- package/dist/esm/generated/classic/featureFlagClient/index.d.ts.map +0 -1
- package/dist/esm/generated/classic/featureFlagClient/index.js +0 -21
- package/dist/esm/generated/classic/featureFlagClient/index.js.map +0 -1
- package/dist/esm/generated/classic/index.d.ts +0 -2
- package/dist/esm/generated/classic/index.d.ts.map +0 -1
- package/dist/esm/generated/classic/index.js +0 -4
- package/dist/esm/generated/classic/index.js.map +0 -1
- package/dist/esm/internal/createGeneratedClient.d.ts +0 -35
- package/dist/esm/internal/createGeneratedClient.d.ts.map +0 -1
- package/dist/esm/internal/createGeneratedClient.js +0 -85
- package/dist/esm/internal/createGeneratedClient.js.map +0 -1
- package/dist/esm/internal/doubleEncodedQueryParamNamePolicy.d.ts +0 -7
- package/dist/esm/internal/doubleEncodedQueryParamNamePolicy.d.ts.map +0 -1
- package/dist/esm/internal/doubleEncodedQueryParamNamePolicy.js +0 -49
- package/dist/esm/internal/doubleEncodedQueryParamNamePolicy.js.map +0 -1
- package/dist/esm/internal/listFeatureFlagRevisions.d.ts +0 -16
- package/dist/esm/internal/listFeatureFlagRevisions.d.ts.map +0 -1
- package/dist/esm/internal/listFeatureFlagRevisions.js +0 -54
- package/dist/esm/internal/listFeatureFlagRevisions.js.map +0 -1
- package/dist/esm/internal/listFeatureFlags.d.ts +0 -19
- package/dist/esm/internal/listFeatureFlags.d.ts.map +0 -1
- package/dist/esm/internal/listFeatureFlags.js +0 -77
- package/dist/esm/internal/listFeatureFlags.js.map +0 -1
- package/dist/esm/internal/listLabels.d.ts +0 -12
- package/dist/esm/internal/listLabels.d.ts.map +0 -1
- package/dist/esm/internal/listLabels.js +0 -48
- package/dist/esm/internal/listLabels.js.map +0 -1
- package/dist/react-native/featureFlagClient.d.ts +0 -172
- package/dist/react-native/featureFlagClient.d.ts.map +0 -1
- package/dist/react-native/featureFlagClient.js +0 -279
- package/dist/react-native/featureFlagClient.js.map +0 -1
- package/dist/react-native/generated/api/featureFlagClient/index.d.ts +0 -3
- package/dist/react-native/generated/api/featureFlagClient/index.d.ts.map +0 -1
- package/dist/react-native/generated/api/featureFlagClient/index.js +0 -4
- package/dist/react-native/generated/api/featureFlagClient/index.js.map +0 -1
- package/dist/react-native/generated/api/featureFlagClient/operations.d.ts +0 -38
- package/dist/react-native/generated/api/featureFlagClient/operations.d.ts.map +0 -1
- package/dist/react-native/generated/api/featureFlagClient/operations.js +0 -404
- package/dist/react-native/generated/api/featureFlagClient/operations.js.map +0 -1
- package/dist/react-native/generated/api/featureFlagClient/options.d.ts +0 -240
- package/dist/react-native/generated/api/featureFlagClient/options.d.ts.map +0 -1
- package/dist/react-native/generated/api/featureFlagClient/options.js +0 -4
- package/dist/react-native/generated/api/featureFlagClient/options.js.map +0 -1
- package/dist/react-native/generated/classic/featureFlagClient/index.d.ts +0 -25
- package/dist/react-native/generated/classic/featureFlagClient/index.d.ts.map +0 -1
- package/dist/react-native/generated/classic/featureFlagClient/index.js +0 -21
- package/dist/react-native/generated/classic/featureFlagClient/index.js.map +0 -1
- package/dist/react-native/generated/classic/index.d.ts +0 -2
- package/dist/react-native/generated/classic/index.d.ts.map +0 -1
- package/dist/react-native/generated/classic/index.js +0 -4
- package/dist/react-native/generated/classic/index.js.map +0 -1
- package/dist/react-native/internal/createGeneratedClient.d.ts +0 -35
- package/dist/react-native/internal/createGeneratedClient.d.ts.map +0 -1
- package/dist/react-native/internal/createGeneratedClient.js +0 -85
- package/dist/react-native/internal/createGeneratedClient.js.map +0 -1
- package/dist/react-native/internal/doubleEncodedQueryParamNamePolicy.d.ts +0 -7
- package/dist/react-native/internal/doubleEncodedQueryParamNamePolicy.d.ts.map +0 -1
- package/dist/react-native/internal/doubleEncodedQueryParamNamePolicy.js +0 -49
- package/dist/react-native/internal/doubleEncodedQueryParamNamePolicy.js.map +0 -1
- package/dist/react-native/internal/listFeatureFlagRevisions.d.ts +0 -16
- package/dist/react-native/internal/listFeatureFlagRevisions.d.ts.map +0 -1
- package/dist/react-native/internal/listFeatureFlagRevisions.js +0 -54
- package/dist/react-native/internal/listFeatureFlagRevisions.js.map +0 -1
- package/dist/react-native/internal/listFeatureFlags.d.ts +0 -19
- package/dist/react-native/internal/listFeatureFlags.d.ts.map +0 -1
- package/dist/react-native/internal/listFeatureFlags.js +0 -77
- package/dist/react-native/internal/listFeatureFlags.js.map +0 -1
- package/dist/react-native/internal/listLabels.d.ts +0 -12
- package/dist/react-native/internal/listLabels.d.ts.map +0 -1
- package/dist/react-native/internal/listLabels.js +0 -48
- package/dist/react-native/internal/listLabels.js.map +0 -1
package/README.md
CHANGED
|
@@ -335,39 +335,6 @@ const recoverSnapshot = await client.recoverSnapshot("testsnapshot");
|
|
|
335
335
|
console.log("Snapshot updated status is:", recoverSnapshot.status);
|
|
336
336
|
```
|
|
337
337
|
|
|
338
|
-
### Manage feature flags
|
|
339
|
-
|
|
340
|
-
The dedicated feature flag endpoint lets you create, retrieve, list, and delete feature flags directly without manually building the underlying configuration setting key and JSON value. This requires the `2026-05-01-preview` API version or later.
|
|
341
|
-
|
|
342
|
-
```ts snippet:FeatureFlag
|
|
343
|
-
import { DefaultAzureCredential } from "@azure/identity";
|
|
344
|
-
import { FeatureFlagClient } from "@azure/app-configuration";
|
|
345
|
-
|
|
346
|
-
// The endpoint for your App Configuration resource
|
|
347
|
-
const endpoint = "https://example.azconfig.io";
|
|
348
|
-
const credential = new DefaultAzureCredential();
|
|
349
|
-
const client = new FeatureFlagClient(endpoint, credential);
|
|
350
|
-
|
|
351
|
-
// Create or update a feature flag through the dedicated feature flag endpoint.
|
|
352
|
-
await client.setFeatureFlag({
|
|
353
|
-
name: "my-feature",
|
|
354
|
-
enabled: true,
|
|
355
|
-
description: "A feature flag managed through the feature flag endpoint",
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
// Retrieve a single feature flag.
|
|
359
|
-
const flag = await client.getFeatureFlag({ name: "my-feature" });
|
|
360
|
-
console.log(`Feature flag ${flag.name} is enabled: ${flag.enabled}`);
|
|
361
|
-
|
|
362
|
-
// List all feature flags.
|
|
363
|
-
for await (const item of client.listFeatureFlags()) {
|
|
364
|
-
console.log(`Found feature flag: ${item.name}`);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
// Delete a feature flag.
|
|
368
|
-
await client.deleteFeatureFlag({ name: "my-feature" });
|
|
369
|
-
```
|
|
370
|
-
|
|
371
338
|
## Troubleshooting
|
|
372
339
|
|
|
373
340
|
### Logging
|
|
@@ -399,7 +366,6 @@ The following samples show you the various ways you can interact with App Config
|
|
|
399
366
|
- [`secretReference.ts`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration/samples/v1/typescript/src/secretReference.ts) - SecretReference represents a configuration setting that references as KeyVault secret.
|
|
400
367
|
- [`snapshot.ts`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration/samples/v1/typescript/src/snapshot.ts) - Create, list configuration settings, and archive snapshots.
|
|
401
368
|
- [`featureFlag.ts`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration/samples/v1/typescript/src/featureFlag.ts) - Feature flags are settings that follow specific JSON schema for the value.
|
|
402
|
-
- [`featureFlagEndpoint.ts`](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration/samples/v1-beta/typescript/src/featureFlagEndpoint.ts) - Create, retrieve, list, and delete feature flags through the dedicated feature flag endpoint (requires the `2026-05-01-preview` API version or later).
|
|
403
369
|
|
|
404
370
|
More in-depth examples can be found in the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appconfiguration/app-configuration/samples/v1/) folder on GitHub.
|
|
405
371
|
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import { type AddConfigurationSettingOptions, type AddConfigurationSettingParam, type AddConfigurationSettingResponse, type AppConfigurationClientOptions, type CheckConfigurationSettingsOptions, type ConfigurationSetting, type ConfigurationSettingId, type ConfigurationSnapshot, type CreateSnapshotOptions, type CreateSnapshotResponse, type DeleteConfigurationSettingOptions, type DeleteConfigurationSettingResponse, type GetConfigurationSettingOptions, type GetConfigurationSettingResponse, type GetSnapshotOptions, type GetSnapshotResponse, type ListConfigurationSettingPage, type ListConfigurationSettingsForSnapshotOptions, type ListConfigurationSettingsOptions, type ListLabelsOptions, type ListLabelsPage, type ListRevisionsOptions, type ListRevisionsPage, type ListSnapshotsOptions, type ListSnapshotsPage, type PageSettings, type SetConfigurationSettingOptions, type SetConfigurationSettingParam, type SetConfigurationSettingResponse, type SetReadOnlyOptions, type SetReadOnlyResponse, type SettingLabel, type SnapshotInfo, type UpdateSnapshotOptions, type UpdateSnapshotResponse } from "./models.js";
|
|
2
2
|
import type { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
3
|
+
import { SyncTokens } from "./internal/syncTokenPolicy.js";
|
|
3
4
|
import type { TokenCredential } from "@azure/core-auth";
|
|
4
5
|
import type { FeatureFlagValue } from "./featureFlag.js";
|
|
5
6
|
import type { SecretReferenceValue } from "./secretReference.js";
|
|
6
7
|
import type { SnapshotReferenceValue } from "./snapshotReference.js";
|
|
7
8
|
import type { OperationState } from "@azure/core-lro";
|
|
8
9
|
import type { SimplePollerLike } from "./internal/lroShim.js";
|
|
10
|
+
/**
|
|
11
|
+
* Provides internal configuration options for AppConfigurationClient.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export interface InternalAppConfigurationClientOptions extends AppConfigurationClientOptions {
|
|
15
|
+
/**
|
|
16
|
+
* The sync token cache to use for this client.
|
|
17
|
+
* NOTE: this is an internal option, not for general client usage.
|
|
18
|
+
*/
|
|
19
|
+
syncTokens?: SyncTokens;
|
|
20
|
+
}
|
|
9
21
|
/**
|
|
10
22
|
* Client for the Azure App Configuration service.
|
|
11
23
|
*/
|
|
@@ -168,6 +180,7 @@ export declare class AppConfigurationClient {
|
|
|
168
180
|
*/
|
|
169
181
|
listLabels(options?: ListLabelsOptions): PagedAsyncIterableIterator<SettingLabel, ListLabelsPage, PageSettings>;
|
|
170
182
|
private get _context();
|
|
183
|
+
private sendLabelsRequest;
|
|
171
184
|
private sendConfigurationSettingsRequest;
|
|
172
185
|
private checkConfigurationSettingsRequest;
|
|
173
186
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appConfigurationClient.d.ts","sourceRoot":"","sources":["../../src/appConfigurationClient.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,iCAAiC,EACtC,KAAK,kCAAkC,EACvC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EACjC,KAAK,2CAA2C,EAChD,KAAK,gCAAgC,EACrC,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,0BAA0B,EAAe,MAAM,oBAAoB,CAAC;AAKlF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"appConfigurationClient.d.ts","sourceRoot":"","sources":["../../src/appConfigurationClient.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,iCAAiC,EACtC,KAAK,kCAAkC,EACvC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EACjC,KAAK,2CAA2C,EAChD,KAAK,gCAAgC,EACrC,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,8BAA8B,EACnC,KAAK,4BAA4B,EACjC,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,0BAA0B,EAAe,MAAM,oBAAoB,CAAC;AAKlF,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,GAC/B,OAAO,CAAC,mBAAmB,CAAC;IAsC/B;;;;OAIG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAIxC;;;OAGG;IACH,mBAAmB,CACjB,QAAQ,EAAE,YAAY,EAEtB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,gBAAgB,CAAC,cAAc,CAAC,sBAAsB,CAAC,EAAE,sBAAsB,CAAC,CAAC;IAsC5F;;;OAGG;IACH,0BAA0B,CACxB,QAAQ,EAAE,YAAY,EAEtB,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,sBAAsB,CAAC;IAsClC;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAoBzF;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,CACb,IAAI,EAAE,MAAM,EAEZ,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,sBAAsB,CAAC;IA4BlC;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,CACb,IAAI,EAAE,MAAM,EAEZ,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,sBAAsB,CAAC;IA6BlC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,aAAa,CACX,OAAO,GAAE,oBAAyB,GACjC,0BAA0B,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,YAAY,CAAC;YAuBvE,oBAAoB;CAsBnC"}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
import { getPagedAsyncIterator } from "@azure/core-paging";
|
|
4
|
-
import { createHttpHeaders } from "@azure/core-rest-pipeline";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { bearerTokenAuthenticationPolicyName, createHttpHeaders } from "@azure/core-rest-pipeline";
|
|
5
|
+
import { audienceErrorHandlingPolicy } from "./internal/audienceErrorHandlingPolicy.js";
|
|
6
|
+
import { SyncTokens, syncTokenPolicy } from "./internal/syncTokenPolicy.js";
|
|
7
|
+
import { queryParamPolicy } from "./internal/queryParamPolicy.js";
|
|
8
|
+
import { emptyBodyPolicy } from "./internal/emptyBodyPolicy.js";
|
|
9
|
+
import { isTokenCredential } from "@azure/core-auth";
|
|
10
|
+
import { assertResponse, checkAndFormatIfAndIfNoneMatch, encodePathParameter, extractAfterTokenFromLinkHeader, extractAfterTokenFromNextLink, formatAcceptDateTime, formatConfigurationSettingsFiltersAndSelect, formatFieldsForSelect, formatFiltersAndSelect, formatLabelsFiltersAndSelect, formatSnapshotFiltersAndSelect, getScope, makeConfigurationSettingEmpty, serializeAsConfigurationSettingParam, snapshotInfoToGenerated, transformKeyValue, transformKeyValueResponse, transformKeyValueResponseWithStatusCode, transformSnapshotResponse, } from "./internal/helpers.js";
|
|
11
|
+
import { AppConfigurationClient as GeneratedAppConfigurationClient, } from "./generated/appConfigurationClient.js";
|
|
12
|
+
import { _getKeyValuesSend, _getKeyValuesDeserialize, _checkKeyValuesSend, _checkKeyValuesDeserialize, _getRevisionsSend, _getRevisionsDeserialize, _getLabelsSend, _getLabelsDeserialize, _getSnapshotsSend, _getSnapshotsDeserialize, _createSnapshotSend, _createSnapshotDeserialize, } from "./generated/api/operations.js";
|
|
7
13
|
import { getLongRunningPoller } from "./generated/static-helpers/pollingHelpers.js";
|
|
8
|
-
import {
|
|
9
|
-
import { listLabels } from "./internal/listLabels.js";
|
|
14
|
+
import { appConfigKeyCredentialPolicy } from "./appConfigCredential.js";
|
|
10
15
|
import { tracingClient } from "./internal/tracing.js";
|
|
11
16
|
import { logger } from "./logger.js";
|
|
12
17
|
import { wrapPoller } from "./internal/lroShim.js";
|
|
18
|
+
import { appConfigurationApiVersion, packageVersion } from "./internal/constants.js";
|
|
19
|
+
const ConnectionStringRegex = /Endpoint=(.*);Id=(.*);Secret=(.*)/;
|
|
13
20
|
/**
|
|
14
21
|
* Client for the Azure App Configuration service.
|
|
15
22
|
*/
|
|
@@ -17,9 +24,69 @@ export class AppConfigurationClient {
|
|
|
17
24
|
client;
|
|
18
25
|
_syncTokens;
|
|
19
26
|
constructor(connectionStringOrEndpoint, tokenCredentialOrOptions, options) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
let appConfigOptions;
|
|
28
|
+
let appConfigCredential = undefined;
|
|
29
|
+
let appConfigEndpoint;
|
|
30
|
+
let authPolicy;
|
|
31
|
+
let authPolicyName;
|
|
32
|
+
let scope;
|
|
33
|
+
if (isTokenCredential(tokenCredentialOrOptions)) {
|
|
34
|
+
appConfigOptions = options || {};
|
|
35
|
+
appConfigCredential = tokenCredentialOrOptions;
|
|
36
|
+
appConfigEndpoint = connectionStringOrEndpoint.endsWith("/")
|
|
37
|
+
? connectionStringOrEndpoint.slice(0, -1)
|
|
38
|
+
: connectionStringOrEndpoint;
|
|
39
|
+
scope = [getScope(appConfigEndpoint, appConfigOptions.audience)];
|
|
40
|
+
authPolicyName = bearerTokenAuthenticationPolicyName;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
appConfigOptions = tokenCredentialOrOptions || {};
|
|
44
|
+
const regexMatch = connectionStringOrEndpoint?.match(ConnectionStringRegex);
|
|
45
|
+
if (regexMatch) {
|
|
46
|
+
appConfigEndpoint = regexMatch[1];
|
|
47
|
+
authPolicy = appConfigKeyCredentialPolicy(regexMatch[2], regexMatch[3]);
|
|
48
|
+
authPolicyName = authPolicy.name;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
throw new Error(`Invalid connection string. Valid connection strings should match the regex '${ConnectionStringRegex.source}'.` +
|
|
52
|
+
` To mitigate the issue, please refer to the troubleshooting guide here at https://aka.ms/azsdk/js/app-configuration/troubleshoot.`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const generatedClientOptions = {
|
|
56
|
+
...appConfigOptions,
|
|
57
|
+
userAgentOptions: {
|
|
58
|
+
...appConfigOptions.userAgentOptions,
|
|
59
|
+
userAgentPrefix: appConfigOptions.userAgentOptions?.userAgentPrefix
|
|
60
|
+
? `${appConfigOptions.userAgentOptions.userAgentPrefix} azsdk-js-app-configuration/${packageVersion}`
|
|
61
|
+
: `azsdk-js-app-configuration/${packageVersion}`,
|
|
62
|
+
},
|
|
63
|
+
loggingOptions: {
|
|
64
|
+
logger: logger.info,
|
|
65
|
+
},
|
|
66
|
+
apiVersion: options?.apiVersion ?? appConfigurationApiVersion,
|
|
67
|
+
credentials: {},
|
|
68
|
+
};
|
|
69
|
+
generatedClientOptions.credentials = {
|
|
70
|
+
...generatedClientOptions.credentials,
|
|
71
|
+
scopes: scope,
|
|
72
|
+
};
|
|
73
|
+
this._syncTokens = appConfigOptions.syncTokens || new SyncTokens();
|
|
74
|
+
this.client = new GeneratedAppConfigurationClient(appConfigEndpoint,
|
|
75
|
+
// When a connection string is used, appConfigCredential is undefined here. We pass undefined to avoid @azure-rest/core-client's keyCredentialAuthenticationPolicy setting the apiKeyHeader on the request.
|
|
76
|
+
// Connection strings are authenticated by HMAC (appConfigKeyCredentialPolicy) and the secret should never leave the client.
|
|
77
|
+
// The `as TokenCredential` cast bridges a gap between the generated client and the core SDK: the generated constructor types `credential` as required (KeyCredential | TokenCredential),
|
|
78
|
+
// but @azure-rest/core-client's addCredentialPipelinePolicy no-ops when no credential is passed, so handing it undefined is safe at runtime.
|
|
79
|
+
appConfigCredential, generatedClientOptions);
|
|
80
|
+
this.client.pipeline.addPolicy(audienceErrorHandlingPolicy(appConfigOptions?.audience !== undefined), {
|
|
81
|
+
phase: "Sign",
|
|
82
|
+
beforePolicies: [authPolicyName],
|
|
83
|
+
});
|
|
84
|
+
if (authPolicy) {
|
|
85
|
+
this.client.pipeline.addPolicy(authPolicy, { phase: "Sign" });
|
|
86
|
+
}
|
|
87
|
+
this.client.pipeline.addPolicy(queryParamPolicy());
|
|
88
|
+
this.client.pipeline.addPolicy(emptyBodyPolicy());
|
|
89
|
+
this.client.pipeline.addPolicy(syncTokenPolicy(this._syncTokens), { afterPhase: "Retry" });
|
|
23
90
|
}
|
|
24
91
|
/**
|
|
25
92
|
* Add a setting into the Azure App Configuration service, failing if it
|
|
@@ -49,7 +116,7 @@ export class AppConfigurationClient {
|
|
|
49
116
|
const keyValue = serializeAsConfigurationSettingParam(configurationSetting);
|
|
50
117
|
logger.info("[addConfigurationSetting] Creating a key value pair");
|
|
51
118
|
try {
|
|
52
|
-
const originalResponse = await this.client.putKeyValue("application/json", configurationSetting.key, {
|
|
119
|
+
const originalResponse = await this.client.putKeyValue("application/json", encodePathParameter(configurationSetting.key), {
|
|
53
120
|
ifNoneMatch: "*",
|
|
54
121
|
label: configurationSetting.label,
|
|
55
122
|
entity: keyValue,
|
|
@@ -99,7 +166,7 @@ export class AppConfigurationClient {
|
|
|
99
166
|
return tracingClient.withSpan("AppConfigurationClient.deleteConfigurationSetting", options, async (updatedOptions) => {
|
|
100
167
|
let status;
|
|
101
168
|
logger.info("[deleteConfigurationSetting] Deleting key value pair");
|
|
102
|
-
const originalResponse = await this.client.deleteKeyValue(id.key, {
|
|
169
|
+
const originalResponse = await this.client.deleteKeyValue(encodePathParameter(id.key), {
|
|
103
170
|
label: id.label,
|
|
104
171
|
...updatedOptions,
|
|
105
172
|
...checkAndFormatIfAndIfNoneMatch(id, options),
|
|
@@ -140,7 +207,7 @@ export class AppConfigurationClient {
|
|
|
140
207
|
let rawResponse;
|
|
141
208
|
logger.info("[getConfigurationSetting] Getting key value pair");
|
|
142
209
|
try {
|
|
143
|
-
const originalResponse = await this.client.getKeyValue(id.key, {
|
|
210
|
+
const originalResponse = await this.client.getKeyValue(encodePathParameter(id.key), {
|
|
144
211
|
...updatedOptions,
|
|
145
212
|
label: id.label,
|
|
146
213
|
select: formatFieldsForSelect(options.fields),
|
|
@@ -363,11 +430,46 @@ export class AppConfigurationClient {
|
|
|
363
430
|
* @param options - Optional parameters for the request.
|
|
364
431
|
*/
|
|
365
432
|
listLabels(options = {}) {
|
|
366
|
-
|
|
433
|
+
const pagedResult = {
|
|
434
|
+
firstPageLink: undefined,
|
|
435
|
+
getPage: async (pageLink) => {
|
|
436
|
+
const response = await this.sendLabelsRequest(options, pageLink);
|
|
437
|
+
const currentResponse = {
|
|
438
|
+
...response,
|
|
439
|
+
items: response.items ?? [],
|
|
440
|
+
continuationToken: response.nextLink
|
|
441
|
+
? extractAfterTokenFromNextLink(response.nextLink)
|
|
442
|
+
: undefined,
|
|
443
|
+
_response: response._response,
|
|
444
|
+
};
|
|
445
|
+
return {
|
|
446
|
+
page: currentResponse,
|
|
447
|
+
nextPageLink: currentResponse.continuationToken,
|
|
448
|
+
};
|
|
449
|
+
},
|
|
450
|
+
toElements: (page) => page.items,
|
|
451
|
+
};
|
|
452
|
+
return getPagedAsyncIterator(pagedResult);
|
|
367
453
|
}
|
|
368
454
|
get _context() {
|
|
369
455
|
return this.client._client;
|
|
370
456
|
}
|
|
457
|
+
async sendLabelsRequest(options = {}, pageLink) {
|
|
458
|
+
return tracingClient.withSpan("AppConfigurationClient.listConfigurationSettings", options, async (updatedOptions) => {
|
|
459
|
+
const rawResponse = await _getLabelsSend(this._context, {
|
|
460
|
+
...updatedOptions,
|
|
461
|
+
...formatAcceptDateTime(options),
|
|
462
|
+
...formatLabelsFiltersAndSelect(options),
|
|
463
|
+
after: pageLink,
|
|
464
|
+
requestOptions: {
|
|
465
|
+
...updatedOptions.requestOptions,
|
|
466
|
+
skipUrlEncoding: true,
|
|
467
|
+
},
|
|
468
|
+
});
|
|
469
|
+
const parsed = await _getLabelsDeserialize(rawResponse);
|
|
470
|
+
return Object.assign(parsed, { _response: rawResponse });
|
|
471
|
+
});
|
|
472
|
+
}
|
|
371
473
|
async sendConfigurationSettingsRequest(options = {}, pageLink) {
|
|
372
474
|
return tracingClient.withSpan("AppConfigurationClient.listConfigurationSettings", options, async (updatedOptions) => {
|
|
373
475
|
const rawResponse = await _getKeyValuesSend(this._context, {
|
|
@@ -486,7 +588,7 @@ export class AppConfigurationClient {
|
|
|
486
588
|
return tracingClient.withSpan("AppConfigurationClient.setConfigurationSetting", options, async (updatedOptions) => {
|
|
487
589
|
const keyValue = serializeAsConfigurationSettingParam(configurationSetting);
|
|
488
590
|
logger.info("[setConfigurationSetting] Setting new key value");
|
|
489
|
-
const response = transformKeyValueResponse(await this.client.putKeyValue("application/json", configurationSetting.key, {
|
|
591
|
+
const response = transformKeyValueResponse(await this.client.putKeyValue("application/json", encodePathParameter(configurationSetting.key), {
|
|
490
592
|
...updatedOptions,
|
|
491
593
|
label: configurationSetting.label,
|
|
492
594
|
entity: keyValue,
|
|
@@ -509,7 +611,7 @@ export class AppConfigurationClient {
|
|
|
509
611
|
let response;
|
|
510
612
|
if (readOnly) {
|
|
511
613
|
logger.info("[setReadOnly] Setting read-only status to ${readOnly}");
|
|
512
|
-
response = await this.client.putLock(id.key, {
|
|
614
|
+
response = await this.client.putLock(encodePathParameter(id.key), {
|
|
513
615
|
...newOptions,
|
|
514
616
|
label: id.label,
|
|
515
617
|
...checkAndFormatIfAndIfNoneMatch(id, options),
|
|
@@ -521,7 +623,7 @@ export class AppConfigurationClient {
|
|
|
521
623
|
}
|
|
522
624
|
else {
|
|
523
625
|
logger.info("[setReadOnly] Deleting read-only lock");
|
|
524
|
-
response = await this.client.deleteLock(id.key, {
|
|
626
|
+
response = await this.client.deleteLock(encodePathParameter(id.key), {
|
|
525
627
|
...newOptions,
|
|
526
628
|
label: id.label,
|
|
527
629
|
...checkAndFormatIfAndIfNoneMatch(id, options),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appConfigurationClient.js","sourceRoot":"","sources":["../../src/appConfigurationClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AA2ClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAI9D,OAAO,EACL,cAAc,EACd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// Licensed under the MIT License.\n\n// https://azure.github.io/azure-sdk/typescript_design.html#ts-config-lib\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport {\n type AddConfigurationSettingOptions,\n type AddConfigurationSettingParam,\n type AddConfigurationSettingResponse,\n type AppConfigurationClientOptions,\n type CheckConfigurationSettingsOptions,\n type ConfigurationSetting,\n type ConfigurationSettingId,\n type ConfigurationSnapshot,\n type CreateSnapshotOptions,\n type CreateSnapshotResponse,\n type DeleteConfigurationSettingOptions,\n type DeleteConfigurationSettingResponse,\n type GetConfigurationSettingOptions,\n type GetConfigurationSettingResponse,\n type GetSnapshotOptions,\n type GetSnapshotResponse,\n type ListConfigurationSettingPage,\n type ListConfigurationSettingsForSnapshotOptions,\n type ListConfigurationSettingsOptions,\n type ListLabelsOptions,\n type ListLabelsPage,\n type ListRevisionsOptions,\n type ListRevisionsPage,\n type ListSnapshotsOptions,\n type ListSnapshotsPage,\n type PageSettings,\n type SetConfigurationSettingOptions,\n type SetConfigurationSettingParam,\n type SetConfigurationSettingResponse,\n type SetReadOnlyOptions,\n type SetReadOnlyResponse,\n type SettingLabel,\n type SnapshotInfo,\n type UpdateSnapshotOptions,\n type UpdateSnapshotResponse,\n} from \"./models.js\";\nimport type { PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { getPagedAsyncIterator } from \"@azure/core-paging\";\nimport type { RestError } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport type { SyncTokens } from \"./internal/syncTokenPolicy.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { SendConfigurationSettingsOptions } from \"./internal/helpers.js\";\nimport {\n assertResponse,\n checkAndFormatIfAndIfNoneMatch,\n extractAfterTokenFromLinkHeader,\n extractAfterTokenFromNextLink,\n formatAcceptDateTime,\n formatConfigurationSettingsFiltersAndSelect,\n formatFieldsForSelect,\n formatFiltersAndSelect,\n formatSnapshotFiltersAndSelect,\n makeConfigurationSettingEmpty,\n serializeAsConfigurationSettingParam,\n snapshotInfoToGenerated,\n transformKeyValue,\n transformKeyValueResponse,\n transformKeyValueResponseWithStatusCode,\n transformSnapshotResponse,\n} from \"./internal/helpers.js\";\nimport type { AppConfigurationClient as GeneratedAppConfigurationClient } from \"./generated/appConfigurationClient.js\";\nimport type { _KeyValueListResult, _SnapshotListResult } from \"./generated/models/models.js\";\nimport {\n _getKeyValuesSend,\n _getKeyValuesDeserialize,\n _checkKeyValuesSend,\n _checkKeyValuesDeserialize,\n _getRevisionsSend,\n _getRevisionsDeserialize,\n _getSnapshotsSend,\n _getSnapshotsDeserialize,\n _createSnapshotSend,\n _createSnapshotDeserialize,\n} from \"./generated/api/operations.js\";\nimport { getLongRunningPoller } from \"./generated/static-helpers/pollingHelpers.js\";\nimport type { AppConfigurationContext } from \"./generated/api/appConfigurationContext.js\";\nimport { createConfiguredGeneratedClient } from \"./internal/createGeneratedClient.js\";\nimport { listLabels } from \"./internal/listLabels.js\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport { tracingClient } from \"./internal/tracing.js\";\nimport { logger } from \"./logger.js\";\nimport type { OperationState } from \"@azure/core-lro\";\nimport type { SimplePollerLike } from \"./internal/lroShim.js\";\nimport { wrapPoller } from \"./internal/lroShim.js\";\n\n/**\n * Client for the Azure App Configuration service.\n */\nexport class AppConfigurationClient {\n private client: GeneratedAppConfigurationClient;\n private _syncTokens: SyncTokens;\n\n /**\n * Initializes a new instance of the AppConfigurationClient class.\n * @param options - Options for the AppConfigurationClient.\n */\n constructor(connectionString: string, options?: AppConfigurationClientOptions);\n /**\n * Initializes a new instance of the AppConfigurationClient class using\n * a TokenCredential.\n * @param endpoint - The endpoint of the App Configuration service (ex: https://sample.azconfig.io).\n * @param tokenCredential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param options - Options for the AppConfigurationClient.\n */\n constructor(\n endpoint: string,\n tokenCredential: TokenCredential,\n options?: AppConfigurationClientOptions,\n );\n constructor(\n connectionStringOrEndpoint: string,\n tokenCredentialOrOptions?: TokenCredential | AppConfigurationClientOptions,\n options?: AppConfigurationClientOptions,\n ) {\n const { client, syncTokens } = createConfiguredGeneratedClient(\n connectionStringOrEndpoint,\n tokenCredentialOrOptions,\n options,\n );\n this.client = client;\n this._syncTokens = syncTokens;\n }\n\n /**\n * Add a setting into the Azure App Configuration service, failing if it\n * already exists.\n *\n * Example usage:\n * ```ts snippet:AddConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.addConfigurationSetting({\n * key: \"MyKey\",\n * label: \"MyLabel\",\n * value: \"MyValue\",\n * });\n * ```\n * @param configurationSetting - A configuration setting.\n * @param options - Optional parameters for the request.\n */\n addConfigurationSetting(\n configurationSetting:\n | AddConfigurationSettingParam\n | AddConfigurationSettingParam<FeatureFlagValue>\n | AddConfigurationSettingParam<SecretReferenceValue>\n | AddConfigurationSettingParam<SnapshotReferenceValue>,\n options: AddConfigurationSettingOptions = {},\n ): Promise<AddConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.addConfigurationSetting\",\n options,\n async (updatedOptions) => {\n const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n logger.info(\"[addConfigurationSetting] Creating a key value pair\");\n try {\n const originalResponse = await this.client.putKeyValue(\n \"application/json\",\n configurationSetting.key,\n {\n ifNoneMatch: \"*\",\n label: configurationSetting.label,\n entity: keyValue,\n ...updatedOptions,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n },\n );\n const response = transformKeyValueResponse(originalResponse);\n assertResponse(response);\n return response;\n } catch (error) {\n const err = error as RestError;\n // Service does not return an error message. Raise a 412 error similar to .NET\n if (err.statusCode === 412) {\n err.message = `Status 412: Setting was already present`;\n }\n throw err;\n }\n throw new Error(\"Unreachable code\");\n },\n );\n }\n\n /**\n * Delete a setting from the Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:DeleteConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const deletedSetting = await client.deleteConfigurationSetting({\n * key: \"MyKey\",\n * label: \"MyLabel\",\n * });\n * ```\n * @param id - The id of the configuration setting to delete.\n * @param options - Optional parameters for the request (ex: etag, label)\n */\n deleteConfigurationSetting(\n id: ConfigurationSettingId,\n options: DeleteConfigurationSettingOptions = {},\n ): Promise<DeleteConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.deleteConfigurationSetting\",\n options,\n async (updatedOptions) => {\n let status;\n logger.info(\"[deleteConfigurationSetting] Deleting key value pair\");\n const originalResponse = await this.client.deleteKeyValue(id.key, {\n label: id.label,\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n onResponse: (response) => {\n status = response.status;\n },\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n\n const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Gets a setting from the Azure App Configuration service.\n *\n * Example code:\n * ```ts snippet:GetConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const setting = await client.getConfigurationSetting({ key: \"MyKey\", label: \"MyLabel\" });\n * ```\n * @param id - The id of the configuration setting to get.\n * @param options - Optional parameters for the request.\n */\n async getConfigurationSetting(\n id: ConfigurationSettingId,\n options: GetConfigurationSettingOptions = {},\n ): Promise<GetConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.getConfigurationSetting\",\n options,\n async (updatedOptions) => {\n let status;\n let rawResponse: any;\n logger.info(\"[getConfigurationSetting] Getting key value pair\");\n try {\n const originalResponse = await this.client.getKeyValue(id.key, {\n ...updatedOptions,\n label: id.label,\n select: formatFieldsForSelect(options.fields),\n ...formatAcceptDateTime(options),\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n onResponse: (response) => {\n status = response.status;\n rawResponse = response;\n },\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n\n const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n assertResponse(response);\n return response;\n } catch (error) {\n const err = error as RestError;\n // 304 only comes back if the user has passed a conditional option in their\n // request _and_ the remote object has the same etag as what the user passed.\n if (err.statusCode === 304) {\n const response = transformKeyValueResponseWithStatusCode(\n { _response: rawResponse } as any,\n 304,\n );\n // this is one of our few 'required' fields so we'll make sure it does get initialized\n // with a value\n response.key = id.key;\n // and now we'll undefine all the other properties that are not HTTP related\n makeConfigurationSettingEmpty(response);\n assertResponse(response);\n return response;\n }\n throw err;\n }\n },\n );\n }\n\n /**\n * Lists settings from the Azure App Configuration service, optionally\n * filtered by key names, labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListConfigurationSettings\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listConfigurationSettings({ labelFilter: \"MyLabel\" });\n * ```\n * @param options - Optional parameters for the request.\n */\n listConfigurationSettings(\n options: ListConfigurationSettingsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pageEtags = options.pageEtags ? [...options.pageEtags] : undefined;\n delete options.pageEtags;\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const etag = pageEtags?.shift();\n try {\n const response = await this.sendConfigurationSettingsRequest(\n { ...options, etag },\n pageLink,\n );\n const currentResponse: ListConfigurationSettingPage = {\n ...response,\n items: response.items != null ? response.items?.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n } catch (error) {\n const err = error as RestError;\n\n const link = err.response?.headers?.get(\"link\");\n const continuationToken = link ? extractAfterTokenFromLinkHeader(link) : undefined;\n\n if (err.statusCode === 304) {\n err.message = `Status 304: No updates for this page`;\n logger.info(\n `[listConfigurationSettings] No updates for this page. The current etag for the page is ${etag}`,\n );\n return {\n page: {\n items: [],\n etag,\n _response: { ...err.response, status: 304 },\n } as unknown as ListConfigurationSettingPage,\n nextPageLink: continuationToken,\n };\n }\n\n throw err;\n }\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Checks settings from the Azure App Configuration service using a HEAD request, returning only headers without the response body.\n * This is useful for efficiently checking if settings have changed by comparing ETags.\n *\n * Example code:\n * ```ts snippet:CheckConfigurationSettings\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const pageIterator = client.checkConfigurationSettings({ keyFilter: \"MyKey\" }).byPage();\n * ```\n * @param options - Optional parameters for the request.\n */\n checkConfigurationSettings(\n options: CheckConfigurationSettingsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pageEtags = options.pageEtags ? [...options.pageEtags] : undefined;\n delete options.pageEtags;\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const etag = pageEtags?.shift();\n try {\n const response = await this.checkConfigurationSettingsRequest(\n { ...options, etag },\n pageLink,\n );\n const link = response._response?.headers?.get(\"link\") as string | undefined;\n const continuationToken = link ? extractAfterTokenFromLinkHeader(link) : undefined;\n const currentResponse: ListConfigurationSettingPage = {\n ...response,\n etag: response._response?.headers?.get(\"etag\") as string | undefined,\n items: [],\n continuationToken: continuationToken,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n } catch (error) {\n const err = error as RestError;\n\n const link = err.response?.headers?.get(\"link\");\n const continuationToken = link ? extractAfterTokenFromLinkHeader(link) : undefined;\n\n if (err.statusCode === 304) {\n err.message = `Status 304: No updates for this page`;\n logger.info(\n `[checkConfigurationSettings] No updates for this page. The current etag for the page is ${etag}`,\n );\n return {\n page: {\n items: [],\n etag,\n _response: { ...err.response, status: 304 },\n } as unknown as ListConfigurationSettingPage,\n nextPageLink: continuationToken,\n };\n }\n\n throw err;\n }\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Lists settings from the Azure App Configuration service for snapshots based on name, optionally\n * filtered by key names, labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListConfigurationSettingsForSnashots\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listConfigurationSettingsForSnashots({\n * snapshotName: \"MySnapshot\",\n * });\n * ```\n * @param options - Optional parameters for the request.\n */\n listConfigurationSettingsForSnapshot(\n snapshotName: string,\n options: ListConfigurationSettingsForSnapshotOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendConfigurationSettingsRequest(\n { snapshotName, ...options },\n pageLink,\n );\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items?.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Get a list of labels from the Azure App Configuration service\n *\n * Example code:\n * ```ts snippet:ListLabels\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listLabels({ nameFilter: \"prod*\" });\n * ```\n * @param options - Optional parameters for the request.\n */\n listLabels(\n options: ListLabelsOptions = {},\n ): PagedAsyncIterableIterator<SettingLabel, ListLabelsPage, PageSettings> {\n return listLabels(this._context, \"kv\", \"AppConfigurationClient.listLabels\", options);\n }\n\n private get _context(): AppConfigurationContext {\n return (this.client as any)._client as AppConfigurationContext;\n }\n\n private async sendConfigurationSettingsRequest(\n options: SendConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<_KeyValueListResult & { _response: any }> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const rawResponse = await _getKeyValuesSend(this._context, {\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatConfigurationSettingsFiltersAndSelect(options),\n ...checkAndFormatIfAndIfNoneMatch({ etag: options.etag }, { onlyIfChanged: true }),\n after: pageLink,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n const parsed = await _getKeyValuesDeserialize(rawResponse);\n return Object.assign(parsed, { _response: rawResponse });\n },\n );\n }\n\n private async checkConfigurationSettingsRequest(\n options: SendConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<{ _response: any }> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.checkConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const rawResponse = await _checkKeyValuesSend(this._context, {\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatConfigurationSettingsFiltersAndSelect(options),\n ...checkAndFormatIfAndIfNoneMatch({ etag: options.etag }, { onlyIfChanged: true }),\n after: pageLink,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n await _checkKeyValuesDeserialize(rawResponse);\n return {\n _response: {\n ...rawResponse,\n headers: createHttpHeaders(rawResponse.headers),\n },\n };\n },\n );\n }\n\n /**\n * Lists revisions of a set of keys, optionally filtered by key names,\n * labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListRevisions\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const revisionsIterator = client.listRevisions({ keys: [\"MyKey\"] });\n * ```\n * @param options - Optional parameters for the request.\n */\n listRevisions(\n options?: ListRevisionsOptions,\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListRevisionsPage, PageSettings> {\n const pagedResult: PagedResult<ListRevisionsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendRevisionsRequest(options, pageLink);\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n // let itemList = currentResponse.items;\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendRevisionsRequest(\n options: ListConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<_KeyValueListResult & { _response: any }> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listRevisions\",\n options,\n async (updatedOptions) => {\n const rawResponse = await _getRevisionsSend(this._context, {\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatFiltersAndSelect(updatedOptions),\n after: pageLink,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n const parsed = await _getRevisionsDeserialize(rawResponse);\n return Object.assign(parsed, { _response: rawResponse });\n },\n );\n }\n\n /**\n * Sets the value of a key in the Azure App Configuration service, allowing for an optional etag.\n * @param key - The name of the key.\n * @param configurationSetting - A configuration value.\n * @param options - Optional parameters for the request.\n *\n * Example code:\n * ```ts snippet:SetConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * await client.setConfigurationSetting({ key: \"MyKey\", value: \"MyValue\" });\n * ```\n */\n async setConfigurationSetting(\n configurationSetting:\n | SetConfigurationSettingParam\n | SetConfigurationSettingParam<FeatureFlagValue>\n | SetConfigurationSettingParam<SecretReferenceValue>\n | SetConfigurationSettingParam<SnapshotReferenceValue>,\n options: SetConfigurationSettingOptions = {},\n ): Promise<SetConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.setConfigurationSetting\",\n options,\n async (updatedOptions) => {\n const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n logger.info(\"[setConfigurationSetting] Setting new key value\");\n const response = transformKeyValueResponse(\n await this.client.putKeyValue(\"application/json\", configurationSetting.key, {\n ...updatedOptions,\n label: configurationSetting.label,\n entity: keyValue,\n ...checkAndFormatIfAndIfNoneMatch(configurationSetting, options),\n\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n }),\n );\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Sets or clears a key's read-only status.\n * @param id - The id of the configuration setting to modify.\n */\n async setReadOnly(\n id: ConfigurationSettingId,\n readOnly: boolean,\n options: SetReadOnlyOptions = {},\n ): Promise<SetReadOnlyResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.setReadOnly\",\n options,\n async (newOptions) => {\n let response;\n if (readOnly) {\n logger.info(\"[setReadOnly] Setting read-only status to ${readOnly}\");\n response = await this.client.putLock(id.key, {\n ...newOptions,\n label: id.label,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n\n requestOptions: {\n ...newOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n } else {\n logger.info(\"[setReadOnly] Deleting read-only lock\");\n response = await this.client.deleteLock(id.key, {\n ...newOptions,\n label: id.label,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n\n requestOptions: {\n ...newOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n }\n response = transformKeyValueResponse(response);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Adds an external synchronization token to ensure service requests receive up-to-date values.\n *\n * @param syncToken - The synchronization token value.\n */\n updateSyncToken(syncToken: string): void {\n this._syncTokens.addSyncTokenFromHeaderValue(syncToken);\n }\n\n /**\n * Begins creating a snapshot for Azure App Configuration service, fails if it\n * already exists.\n */\n beginCreateSnapshot(\n snapshot: SnapshotInfo,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateSnapshotOptions = {},\n ): Promise<SimplePollerLike<OperationState<CreateSnapshotResponse>, CreateSnapshotResponse>> {\n return tracingClient.withSpan(\n `${AppConfigurationClient.name}.beginCreateSnapshot`,\n options,\n async (updatedOptions) => {\n const generatedSnapshot = snapshotInfoToGenerated(snapshot);\n const poller = getLongRunningPoller(\n this._context,\n async (result) =>\n transformSnapshotResponse(\n await _createSnapshotDeserialize(result),\n ) as CreateSnapshotResponse,\n [\"201\", \"200\", \"202\"],\n {\n updateIntervalInMs: updatedOptions?.updateIntervalInMs,\n abortSignal: updatedOptions?.abortSignal,\n getInitialResponse: () =>\n _createSnapshotSend(\n this._context,\n \"application/vnd.microsoft.appconfig.snapshot+json\",\n snapshot.name,\n generatedSnapshot,\n {\n ...updatedOptions,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n },\n ),\n resourceLocationConfig: \"original-uri\",\n },\n );\n return wrapPoller(poller);\n },\n );\n }\n\n /**\n * Begins creating a snapshot for Azure App Configuration service, waits until it is done,\n * fails if it already exists.\n */\n beginCreateSnapshotAndWait(\n snapshot: SnapshotInfo,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateSnapshotOptions = {},\n ): Promise<CreateSnapshotResponse> {\n return tracingClient.withSpan(\n `${AppConfigurationClient.name}.beginCreateSnapshotAndWait`,\n options,\n async (updatedOptions) => {\n const generatedSnapshot = snapshotInfoToGenerated(snapshot);\n const poller = getLongRunningPoller(\n this._context,\n async (result) =>\n transformSnapshotResponse(\n await _createSnapshotDeserialize(result),\n ) as CreateSnapshotResponse,\n [\"201\", \"200\", \"202\"],\n {\n updateIntervalInMs: updatedOptions?.updateIntervalInMs,\n abortSignal: updatedOptions?.abortSignal,\n getInitialResponse: () =>\n _createSnapshotSend(\n this._context,\n \"application/vnd.microsoft.appconfig.snapshot+json\",\n snapshot.name,\n generatedSnapshot,\n {\n ...updatedOptions,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n },\n ),\n resourceLocationConfig: \"original-uri\",\n },\n );\n return poller.pollUntilDone();\n },\n );\n }\n\n /**\n * Get a snapshot from Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:GetSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const retrievedSnapshot = await client.getSnapshot(\"testsnapshot\");\n * console.log(\"Retrieved snapshot:\", retrievedSnapshot);\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n getSnapshot(name: string, options: GetSnapshotOptions = {}): Promise<GetSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.getSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[getSnapshot] Get a snapshot\");\n const originalResponse = await this.client.getSnapshot(name, {\n ...updatedOptions,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Recover an archived snapshot back to ready status\n *\n * Example usage:\n * ```ts snippet:RecoverSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.recoverSnapshot(\"MySnapshot\");\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n recoverSnapshot(\n name: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: UpdateSnapshotOptions = {},\n ): Promise<UpdateSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.recoverSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[recoverSnapshot] Recover a snapshot\");\n const originalResponse = await this.client.updateSnapshot(\n \"application/merge-patch+json\",\n name,\n { status: \"ready\" },\n {\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(\n { etag: options.etag },\n { onlyIfUnchanged: true, ...options },\n ),\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n },\n );\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n /**\n * Archive a ready snapshot\n *\n * Example usage:\n * ```ts snippet:ArchiveSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.archiveSnapshot({ name: \"MySnapshot\" });\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n archiveSnapshot(\n name: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: UpdateSnapshotOptions = {},\n ): Promise<UpdateSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.archiveSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[archiveSnapshot] Archive a snapshot\");\n const originalResponse = await this.client.updateSnapshot(\n \"application/merge-patch+json\",\n name,\n { status: \"archived\" },\n {\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(\n { etag: options.etag },\n { onlyIfUnchanged: true, ...options },\n ),\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n },\n );\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * List all snapshots from Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:ListSnapshots\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const snapshots = await client.listSnapshots();\n *\n * for await (const snapshot of snapshots) {\n * console.log(`Found snapshot: ${snapshot.name}`);\n * }\n * ```\n * @param options - Optional parameters for the request.\n */\n listSnapshots(\n options: ListSnapshotsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSnapshot, ListSnapshotsPage, PageSettings> {\n const pagedResult: PagedResult<ListSnapshotsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendSnapShotsRequest(options, pageLink);\n const currentResponse = {\n ...response,\n items:\n response.items != null ? response.items.map((s) => transformSnapshotResponse(s)) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendSnapShotsRequest(\n options: ListSnapshotsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<_SnapshotListResult & { _response: any }> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listSnapshots\",\n options,\n async (updatedOptions) => {\n const rawResponse = await _getSnapshotsSend(this._context, {\n ...updatedOptions,\n ...formatSnapshotFiltersAndSelect(options),\n after: pageLink,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n const parsed = await _getSnapshotsDeserialize(rawResponse);\n return Object.assign(parsed, { _response: rawResponse });\n },\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"appConfigurationClient.js","sourceRoot":"","sources":["../../src/appConfigurationClient.ts"],"names":[],"mappings":"AA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AAK,CAAC,oBAAoB,CAChC,UAA+C,EAAE,EACjD,QAA4B;QAE5B,OAAO,aAAa,CAAC,QAAQ,CAC3B,sCAAsC,EACtC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,MAAM,WAAW,GAAG,MAAM,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE;gBACzD,GAAG,cAAc;gBACjB,GAAG,8BAA8B,CAAC,OAAO,CAAC;gBAC1C,KAAK,EAAE,QAAQ;gBACf,cAAc,EAAE;oBACd,GAAG,cAAc,CAAC,cAAc;oBAChC,eAAe,EAAE,IAAI;iBACtB;aACF,CAAC,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,wBAAwB,CAAC,WAAW,CAAC,CAAC;YAC3D,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,CAAC;QAC3D,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// https://azure.github.io/azure-sdk/typescript_design.html#ts-config-lib\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport {\n type AddConfigurationSettingOptions,\n type AddConfigurationSettingParam,\n type AddConfigurationSettingResponse,\n type AppConfigurationClientOptions,\n type CheckConfigurationSettingsOptions,\n type ConfigurationSetting,\n type ConfigurationSettingId,\n type ConfigurationSnapshot,\n type CreateSnapshotOptions,\n type CreateSnapshotResponse,\n type DeleteConfigurationSettingOptions,\n type DeleteConfigurationSettingResponse,\n type GetConfigurationSettingOptions,\n type GetConfigurationSettingResponse,\n type GetSnapshotOptions,\n type GetSnapshotResponse,\n type ListConfigurationSettingPage,\n type ListConfigurationSettingsForSnapshotOptions,\n type ListConfigurationSettingsOptions,\n type ListLabelsOptions,\n type ListLabelsPage,\n type ListRevisionsOptions,\n type ListRevisionsPage,\n type ListSnapshotsOptions,\n type ListSnapshotsPage,\n type PageSettings,\n type SetConfigurationSettingOptions,\n type SetConfigurationSettingParam,\n type SetConfigurationSettingResponse,\n type SetReadOnlyOptions,\n type SetReadOnlyResponse,\n type SettingLabel,\n type SnapshotInfo,\n type UpdateSnapshotOptions,\n type UpdateSnapshotResponse,\n} from \"./models.js\";\nimport type { PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { getPagedAsyncIterator } from \"@azure/core-paging\";\nimport type { PipelinePolicy, RestError } from \"@azure/core-rest-pipeline\";\nimport { bearerTokenAuthenticationPolicyName, createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { audienceErrorHandlingPolicy } from \"./internal/audienceErrorHandlingPolicy.js\";\nimport { SyncTokens, syncTokenPolicy } from \"./internal/syncTokenPolicy.js\";\nimport { queryParamPolicy } from \"./internal/queryParamPolicy.js\";\nimport { emptyBodyPolicy } from \"./internal/emptyBodyPolicy.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type {\n SendConfigurationSettingsOptions,\n SendLabelsRequestOptions,\n} from \"./internal/helpers.js\";\nimport {\n assertResponse,\n checkAndFormatIfAndIfNoneMatch,\n encodePathParameter,\n extractAfterTokenFromLinkHeader,\n extractAfterTokenFromNextLink,\n formatAcceptDateTime,\n formatConfigurationSettingsFiltersAndSelect,\n formatFieldsForSelect,\n formatFiltersAndSelect,\n formatLabelsFiltersAndSelect,\n formatSnapshotFiltersAndSelect,\n getScope,\n makeConfigurationSettingEmpty,\n serializeAsConfigurationSettingParam,\n snapshotInfoToGenerated,\n transformKeyValue,\n transformKeyValueResponse,\n transformKeyValueResponseWithStatusCode,\n transformSnapshotResponse,\n} from \"./internal/helpers.js\";\nimport {\n AppConfigurationClient as GeneratedAppConfigurationClient,\n type AppConfigurationClientOptionalParams as GeneratedAppConfigurationClientOptionalParams,\n} from \"./generated/appConfigurationClient.js\";\nimport type {\n _KeyValueListResult,\n _LabelListResult,\n _SnapshotListResult,\n} from \"./generated/models/models.js\";\nimport {\n _getKeyValuesSend,\n _getKeyValuesDeserialize,\n _checkKeyValuesSend,\n _checkKeyValuesDeserialize,\n _getRevisionsSend,\n _getRevisionsDeserialize,\n _getLabelsSend,\n _getLabelsDeserialize,\n _getSnapshotsSend,\n _getSnapshotsDeserialize,\n _createSnapshotSend,\n _createSnapshotDeserialize,\n} from \"./generated/api/operations.js\";\nimport { getLongRunningPoller } from \"./generated/static-helpers/pollingHelpers.js\";\nimport type { AppConfigurationContext } from \"./generated/api/appConfigurationContext.js\";\nimport type { FeatureFlagValue } from \"./featureFlag.js\";\nimport type { SecretReferenceValue } from \"./secretReference.js\";\nimport type { SnapshotReferenceValue } from \"./snapshotReference.js\";\nimport { appConfigKeyCredentialPolicy } from \"./appConfigCredential.js\";\nimport { tracingClient } from \"./internal/tracing.js\";\nimport { logger } from \"./logger.js\";\nimport type { OperationState } from \"@azure/core-lro\";\nimport type { SimplePollerLike } from \"./internal/lroShim.js\";\nimport { wrapPoller } from \"./internal/lroShim.js\";\nimport { appConfigurationApiVersion, packageVersion } from \"./internal/constants.js\";\n\nconst ConnectionStringRegex = /Endpoint=(.*);Id=(.*);Secret=(.*)/;\n\n/**\n * Provides internal configuration options for AppConfigurationClient.\n * @internal\n */\nexport interface InternalAppConfigurationClientOptions extends AppConfigurationClientOptions {\n /**\n * The sync token cache to use for this client.\n * NOTE: this is an internal option, not for general client usage.\n */\n syncTokens?: SyncTokens;\n}\n\n/**\n * Client for the Azure App Configuration service.\n */\nexport class AppConfigurationClient {\n private client: GeneratedAppConfigurationClient;\n private _syncTokens: SyncTokens;\n\n /**\n * Initializes a new instance of the AppConfigurationClient class.\n * @param options - Options for the AppConfigurationClient.\n */\n constructor(connectionString: string, options?: AppConfigurationClientOptions);\n /**\n * Initializes a new instance of the AppConfigurationClient class using\n * a TokenCredential.\n * @param endpoint - The endpoint of the App Configuration service (ex: https://sample.azconfig.io).\n * @param tokenCredential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param options - Options for the AppConfigurationClient.\n */\n constructor(\n endpoint: string,\n tokenCredential: TokenCredential,\n options?: AppConfigurationClientOptions,\n );\n constructor(\n connectionStringOrEndpoint: string,\n tokenCredentialOrOptions?: TokenCredential | AppConfigurationClientOptions,\n options?: AppConfigurationClientOptions,\n ) {\n let appConfigOptions: InternalAppConfigurationClientOptions;\n let appConfigCredential: TokenCredential | undefined = undefined;\n let appConfigEndpoint: string;\n let authPolicy: PipelinePolicy | undefined;\n let authPolicyName: string;\n let scope: [string] | undefined;\n\n if (isTokenCredential(tokenCredentialOrOptions)) {\n appConfigOptions = (options as InternalAppConfigurationClientOptions) || {};\n appConfigCredential = tokenCredentialOrOptions;\n appConfigEndpoint = connectionStringOrEndpoint.endsWith(\"/\")\n ? connectionStringOrEndpoint.slice(0, -1)\n : connectionStringOrEndpoint;\n scope = [getScope(appConfigEndpoint, appConfigOptions.audience)];\n authPolicyName = bearerTokenAuthenticationPolicyName;\n } else {\n appConfigOptions = (tokenCredentialOrOptions as InternalAppConfigurationClientOptions) || {};\n const regexMatch = connectionStringOrEndpoint?.match(ConnectionStringRegex);\n if (regexMatch) {\n appConfigEndpoint = regexMatch[1];\n authPolicy = appConfigKeyCredentialPolicy(regexMatch[2], regexMatch[3]);\n authPolicyName = authPolicy.name;\n } else {\n throw new Error(\n `Invalid connection string. Valid connection strings should match the regex '${ConnectionStringRegex.source}'.` +\n ` To mitigate the issue, please refer to the troubleshooting guide here at https://aka.ms/azsdk/js/app-configuration/troubleshoot.`,\n );\n }\n }\n\n const generatedClientOptions: GeneratedAppConfigurationClientOptionalParams = {\n ...appConfigOptions,\n userAgentOptions: {\n ...appConfigOptions.userAgentOptions,\n userAgentPrefix: appConfigOptions.userAgentOptions?.userAgentPrefix\n ? `${appConfigOptions.userAgentOptions.userAgentPrefix} azsdk-js-app-configuration/${packageVersion}`\n : `azsdk-js-app-configuration/${packageVersion}`,\n },\n loggingOptions: {\n logger: logger.info,\n },\n apiVersion: options?.apiVersion ?? appConfigurationApiVersion,\n credentials: {},\n };\n\n generatedClientOptions.credentials = {\n ...generatedClientOptions.credentials,\n scopes: scope,\n };\n\n this._syncTokens = appConfigOptions.syncTokens || new SyncTokens();\n this.client = new GeneratedAppConfigurationClient(\n appConfigEndpoint,\n // When a connection string is used, appConfigCredential is undefined here. We pass undefined to avoid @azure-rest/core-client's keyCredentialAuthenticationPolicy setting the apiKeyHeader on the request.\n // Connection strings are authenticated by HMAC (appConfigKeyCredentialPolicy) and the secret should never leave the client.\n // The `as TokenCredential` cast bridges a gap between the generated client and the core SDK: the generated constructor types `credential` as required (KeyCredential | TokenCredential),\n // but @azure-rest/core-client's addCredentialPipelinePolicy no-ops when no credential is passed, so handing it undefined is safe at runtime.\n appConfigCredential as TokenCredential,\n generatedClientOptions,\n );\n this.client.pipeline.addPolicy(\n audienceErrorHandlingPolicy(appConfigOptions?.audience !== undefined),\n {\n phase: \"Sign\",\n beforePolicies: [authPolicyName],\n },\n );\n if (authPolicy) {\n this.client.pipeline.addPolicy(authPolicy, { phase: \"Sign\" });\n }\n\n this.client.pipeline.addPolicy(queryParamPolicy());\n this.client.pipeline.addPolicy(emptyBodyPolicy());\n this.client.pipeline.addPolicy(syncTokenPolicy(this._syncTokens), { afterPhase: \"Retry\" });\n }\n\n /**\n * Add a setting into the Azure App Configuration service, failing if it\n * already exists.\n *\n * Example usage:\n * ```ts snippet:AddConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.addConfigurationSetting({\n * key: \"MyKey\",\n * label: \"MyLabel\",\n * value: \"MyValue\",\n * });\n * ```\n * @param configurationSetting - A configuration setting.\n * @param options - Optional parameters for the request.\n */\n addConfigurationSetting(\n configurationSetting:\n | AddConfigurationSettingParam\n | AddConfigurationSettingParam<FeatureFlagValue>\n | AddConfigurationSettingParam<SecretReferenceValue>\n | AddConfigurationSettingParam<SnapshotReferenceValue>,\n options: AddConfigurationSettingOptions = {},\n ): Promise<AddConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.addConfigurationSetting\",\n options,\n async (updatedOptions) => {\n const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n logger.info(\"[addConfigurationSetting] Creating a key value pair\");\n try {\n const originalResponse = await this.client.putKeyValue(\n \"application/json\",\n encodePathParameter(configurationSetting.key),\n {\n ifNoneMatch: \"*\",\n label: configurationSetting.label,\n entity: keyValue,\n ...updatedOptions,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n },\n );\n const response = transformKeyValueResponse(originalResponse);\n assertResponse(response);\n return response;\n } catch (error) {\n const err = error as RestError;\n // Service does not return an error message. Raise a 412 error similar to .NET\n if (err.statusCode === 412) {\n err.message = `Status 412: Setting was already present`;\n }\n throw err;\n }\n throw new Error(\"Unreachable code\");\n },\n );\n }\n\n /**\n * Delete a setting from the Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:DeleteConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const deletedSetting = await client.deleteConfigurationSetting({\n * key: \"MyKey\",\n * label: \"MyLabel\",\n * });\n * ```\n * @param id - The id of the configuration setting to delete.\n * @param options - Optional parameters for the request (ex: etag, label)\n */\n deleteConfigurationSetting(\n id: ConfigurationSettingId,\n options: DeleteConfigurationSettingOptions = {},\n ): Promise<DeleteConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.deleteConfigurationSetting\",\n options,\n async (updatedOptions) => {\n let status;\n logger.info(\"[deleteConfigurationSetting] Deleting key value pair\");\n const originalResponse = await this.client.deleteKeyValue(encodePathParameter(id.key), {\n label: id.label,\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n onResponse: (response) => {\n status = response.status;\n },\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n\n const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Gets a setting from the Azure App Configuration service.\n *\n * Example code:\n * ```ts snippet:GetConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const setting = await client.getConfigurationSetting({ key: \"MyKey\", label: \"MyLabel\" });\n * ```\n * @param id - The id of the configuration setting to get.\n * @param options - Optional parameters for the request.\n */\n async getConfigurationSetting(\n id: ConfigurationSettingId,\n options: GetConfigurationSettingOptions = {},\n ): Promise<GetConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.getConfigurationSetting\",\n options,\n async (updatedOptions) => {\n let status;\n let rawResponse: any;\n logger.info(\"[getConfigurationSetting] Getting key value pair\");\n try {\n const originalResponse = await this.client.getKeyValue(encodePathParameter(id.key), {\n ...updatedOptions,\n label: id.label,\n select: formatFieldsForSelect(options.fields),\n ...formatAcceptDateTime(options),\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n onResponse: (response) => {\n status = response.status;\n rawResponse = response;\n },\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n\n const response = transformKeyValueResponseWithStatusCode(originalResponse, status);\n assertResponse(response);\n return response;\n } catch (error) {\n const err = error as RestError;\n // 304 only comes back if the user has passed a conditional option in their\n // request _and_ the remote object has the same etag as what the user passed.\n if (err.statusCode === 304) {\n const response = transformKeyValueResponseWithStatusCode(\n { _response: rawResponse } as any,\n 304,\n );\n // this is one of our few 'required' fields so we'll make sure it does get initialized\n // with a value\n response.key = id.key;\n // and now we'll undefine all the other properties that are not HTTP related\n makeConfigurationSettingEmpty(response);\n assertResponse(response);\n return response;\n }\n throw err;\n }\n },\n );\n }\n\n /**\n * Lists settings from the Azure App Configuration service, optionally\n * filtered by key names, labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListConfigurationSettings\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listConfigurationSettings({ labelFilter: \"MyLabel\" });\n * ```\n * @param options - Optional parameters for the request.\n */\n listConfigurationSettings(\n options: ListConfigurationSettingsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pageEtags = options.pageEtags ? [...options.pageEtags] : undefined;\n delete options.pageEtags;\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const etag = pageEtags?.shift();\n try {\n const response = await this.sendConfigurationSettingsRequest(\n { ...options, etag },\n pageLink,\n );\n const currentResponse: ListConfigurationSettingPage = {\n ...response,\n items: response.items != null ? response.items?.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n } catch (error) {\n const err = error as RestError;\n\n const link = err.response?.headers?.get(\"link\");\n const continuationToken = link ? extractAfterTokenFromLinkHeader(link) : undefined;\n\n if (err.statusCode === 304) {\n err.message = `Status 304: No updates for this page`;\n logger.info(\n `[listConfigurationSettings] No updates for this page. The current etag for the page is ${etag}`,\n );\n return {\n page: {\n items: [],\n etag,\n _response: { ...err.response, status: 304 },\n } as unknown as ListConfigurationSettingPage,\n nextPageLink: continuationToken,\n };\n }\n\n throw err;\n }\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Checks settings from the Azure App Configuration service using a HEAD request, returning only headers without the response body.\n * This is useful for efficiently checking if settings have changed by comparing ETags.\n *\n * Example code:\n * ```ts snippet:CheckConfigurationSettings\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const pageIterator = client.checkConfigurationSettings({ keyFilter: \"MyKey\" }).byPage();\n * ```\n * @param options - Optional parameters for the request.\n */\n checkConfigurationSettings(\n options: CheckConfigurationSettingsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pageEtags = options.pageEtags ? [...options.pageEtags] : undefined;\n delete options.pageEtags;\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const etag = pageEtags?.shift();\n try {\n const response = await this.checkConfigurationSettingsRequest(\n { ...options, etag },\n pageLink,\n );\n const link = response._response?.headers?.get(\"link\") as string | undefined;\n const continuationToken = link ? extractAfterTokenFromLinkHeader(link) : undefined;\n const currentResponse: ListConfigurationSettingPage = {\n ...response,\n etag: response._response?.headers?.get(\"etag\") as string | undefined,\n items: [],\n continuationToken: continuationToken,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n } catch (error) {\n const err = error as RestError;\n\n const link = err.response?.headers?.get(\"link\");\n const continuationToken = link ? extractAfterTokenFromLinkHeader(link) : undefined;\n\n if (err.statusCode === 304) {\n err.message = `Status 304: No updates for this page`;\n logger.info(\n `[checkConfigurationSettings] No updates for this page. The current etag for the page is ${etag}`,\n );\n return {\n page: {\n items: [],\n etag,\n _response: { ...err.response, status: 304 },\n } as unknown as ListConfigurationSettingPage,\n nextPageLink: continuationToken,\n };\n }\n\n throw err;\n }\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Lists settings from the Azure App Configuration service for snapshots based on name, optionally\n * filtered by key names, labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListConfigurationSettingsForSnashots\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listConfigurationSettingsForSnashots({\n * snapshotName: \"MySnapshot\",\n * });\n * ```\n * @param options - Optional parameters for the request.\n */\n listConfigurationSettingsForSnapshot(\n snapshotName: string,\n options: ListConfigurationSettingsForSnapshotOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListConfigurationSettingPage, PageSettings> {\n const pagedResult: PagedResult<ListConfigurationSettingPage, PageSettings, string | undefined> =\n {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendConfigurationSettingsRequest(\n { snapshotName, ...options },\n pageLink,\n );\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items?.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n /**\n * Get a list of labels from the Azure App Configuration service\n *\n * Example code:\n * ```ts snippet:ListLabels\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const allSettingsWithLabel = client.listLabels({ nameFilter: \"prod*\" });\n * ```\n * @param options - Optional parameters for the request.\n */\n listLabels(\n options: ListLabelsOptions = {},\n ): PagedAsyncIterableIterator<SettingLabel, ListLabelsPage, PageSettings> {\n const pagedResult: PagedResult<ListLabelsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendLabelsRequest(options, pageLink);\n const currentResponse: ListLabelsPage = {\n ...response,\n items: response.items ?? [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n _response: response._response,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private get _context(): AppConfigurationContext {\n return (this.client as any)._client as AppConfigurationContext;\n }\n\n private async sendLabelsRequest(\n options: SendLabelsRequestOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<_LabelListResult & { _response: any }> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const rawResponse = await _getLabelsSend(this._context, {\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatLabelsFiltersAndSelect(options),\n after: pageLink,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n const parsed = await _getLabelsDeserialize(rawResponse);\n return Object.assign(parsed, { _response: rawResponse });\n },\n );\n }\n\n private async sendConfigurationSettingsRequest(\n options: SendConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<_KeyValueListResult & { _response: any }> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const rawResponse = await _getKeyValuesSend(this._context, {\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatConfigurationSettingsFiltersAndSelect(options),\n ...checkAndFormatIfAndIfNoneMatch({ etag: options.etag }, { onlyIfChanged: true }),\n after: pageLink,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n const parsed = await _getKeyValuesDeserialize(rawResponse);\n return Object.assign(parsed, { _response: rawResponse });\n },\n );\n }\n\n private async checkConfigurationSettingsRequest(\n options: SendConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<{ _response: any }> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.checkConfigurationSettings\",\n options,\n async (updatedOptions) => {\n const rawResponse = await _checkKeyValuesSend(this._context, {\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatConfigurationSettingsFiltersAndSelect(options),\n ...checkAndFormatIfAndIfNoneMatch({ etag: options.etag }, { onlyIfChanged: true }),\n after: pageLink,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n await _checkKeyValuesDeserialize(rawResponse);\n return {\n _response: {\n ...rawResponse,\n headers: createHttpHeaders(rawResponse.headers),\n },\n };\n },\n );\n }\n\n /**\n * Lists revisions of a set of keys, optionally filtered by key names,\n * labels and accept datetime.\n *\n * Example code:\n * ```ts snippet:ListRevisions\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const revisionsIterator = client.listRevisions({ keys: [\"MyKey\"] });\n * ```\n * @param options - Optional parameters for the request.\n */\n listRevisions(\n options?: ListRevisionsOptions,\n ): PagedAsyncIterableIterator<ConfigurationSetting, ListRevisionsPage, PageSettings> {\n const pagedResult: PagedResult<ListRevisionsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendRevisionsRequest(options, pageLink);\n const currentResponse = {\n ...response,\n items: response.items != null ? response.items.map(transformKeyValue) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n // let itemList = currentResponse.items;\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendRevisionsRequest(\n options: ListConfigurationSettingsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<_KeyValueListResult & { _response: any }> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listRevisions\",\n options,\n async (updatedOptions) => {\n const rawResponse = await _getRevisionsSend(this._context, {\n ...updatedOptions,\n ...formatAcceptDateTime(options),\n ...formatFiltersAndSelect(updatedOptions),\n after: pageLink,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n const parsed = await _getRevisionsDeserialize(rawResponse);\n return Object.assign(parsed, { _response: rawResponse });\n },\n );\n }\n\n /**\n * Sets the value of a key in the Azure App Configuration service, allowing for an optional etag.\n * @param key - The name of the key.\n * @param configurationSetting - A configuration value.\n * @param options - Optional parameters for the request.\n *\n * Example code:\n * ```ts snippet:SetConfigurationSetting\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * await client.setConfigurationSetting({ key: \"MyKey\", value: \"MyValue\" });\n * ```\n */\n async setConfigurationSetting(\n configurationSetting:\n | SetConfigurationSettingParam\n | SetConfigurationSettingParam<FeatureFlagValue>\n | SetConfigurationSettingParam<SecretReferenceValue>\n | SetConfigurationSettingParam<SnapshotReferenceValue>,\n options: SetConfigurationSettingOptions = {},\n ): Promise<SetConfigurationSettingResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.setConfigurationSetting\",\n options,\n async (updatedOptions) => {\n const keyValue = serializeAsConfigurationSettingParam(configurationSetting);\n logger.info(\"[setConfigurationSetting] Setting new key value\");\n const response = transformKeyValueResponse(\n await this.client.putKeyValue(\n \"application/json\",\n encodePathParameter(configurationSetting.key),\n {\n ...updatedOptions,\n label: configurationSetting.label,\n entity: keyValue,\n ...checkAndFormatIfAndIfNoneMatch(configurationSetting, options),\n\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n },\n ),\n );\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Sets or clears a key's read-only status.\n * @param id - The id of the configuration setting to modify.\n */\n async setReadOnly(\n id: ConfigurationSettingId,\n readOnly: boolean,\n options: SetReadOnlyOptions = {},\n ): Promise<SetReadOnlyResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.setReadOnly\",\n options,\n async (newOptions) => {\n let response;\n if (readOnly) {\n logger.info(\"[setReadOnly] Setting read-only status to ${readOnly}\");\n response = await this.client.putLock(encodePathParameter(id.key), {\n ...newOptions,\n label: id.label,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n\n requestOptions: {\n ...newOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n } else {\n logger.info(\"[setReadOnly] Deleting read-only lock\");\n response = await this.client.deleteLock(encodePathParameter(id.key), {\n ...newOptions,\n label: id.label,\n ...checkAndFormatIfAndIfNoneMatch(id, options),\n\n requestOptions: {\n ...newOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n }\n response = transformKeyValueResponse(response);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Adds an external synchronization token to ensure service requests receive up-to-date values.\n *\n * @param syncToken - The synchronization token value.\n */\n updateSyncToken(syncToken: string): void {\n this._syncTokens.addSyncTokenFromHeaderValue(syncToken);\n }\n\n /**\n * Begins creating a snapshot for Azure App Configuration service, fails if it\n * already exists.\n */\n beginCreateSnapshot(\n snapshot: SnapshotInfo,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateSnapshotOptions = {},\n ): Promise<SimplePollerLike<OperationState<CreateSnapshotResponse>, CreateSnapshotResponse>> {\n return tracingClient.withSpan(\n `${AppConfigurationClient.name}.beginCreateSnapshot`,\n options,\n async (updatedOptions) => {\n const generatedSnapshot = snapshotInfoToGenerated(snapshot);\n const poller = getLongRunningPoller(\n this._context,\n async (result) =>\n transformSnapshotResponse(\n await _createSnapshotDeserialize(result),\n ) as CreateSnapshotResponse,\n [\"201\", \"200\", \"202\"],\n {\n updateIntervalInMs: updatedOptions?.updateIntervalInMs,\n abortSignal: updatedOptions?.abortSignal,\n getInitialResponse: () =>\n _createSnapshotSend(\n this._context,\n \"application/vnd.microsoft.appconfig.snapshot+json\",\n snapshot.name,\n generatedSnapshot,\n {\n ...updatedOptions,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n },\n ),\n resourceLocationConfig: \"original-uri\",\n },\n );\n return wrapPoller(poller);\n },\n );\n }\n\n /**\n * Begins creating a snapshot for Azure App Configuration service, waits until it is done,\n * fails if it already exists.\n */\n beginCreateSnapshotAndWait(\n snapshot: SnapshotInfo,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateSnapshotOptions = {},\n ): Promise<CreateSnapshotResponse> {\n return tracingClient.withSpan(\n `${AppConfigurationClient.name}.beginCreateSnapshotAndWait`,\n options,\n async (updatedOptions) => {\n const generatedSnapshot = snapshotInfoToGenerated(snapshot);\n const poller = getLongRunningPoller(\n this._context,\n async (result) =>\n transformSnapshotResponse(\n await _createSnapshotDeserialize(result),\n ) as CreateSnapshotResponse,\n [\"201\", \"200\", \"202\"],\n {\n updateIntervalInMs: updatedOptions?.updateIntervalInMs,\n abortSignal: updatedOptions?.abortSignal,\n getInitialResponse: () =>\n _createSnapshotSend(\n this._context,\n \"application/vnd.microsoft.appconfig.snapshot+json\",\n snapshot.name,\n generatedSnapshot,\n {\n ...updatedOptions,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n },\n ),\n resourceLocationConfig: \"original-uri\",\n },\n );\n return poller.pollUntilDone();\n },\n );\n }\n\n /**\n * Get a snapshot from Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:GetSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const retrievedSnapshot = await client.getSnapshot(\"testsnapshot\");\n * console.log(\"Retrieved snapshot:\", retrievedSnapshot);\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n getSnapshot(name: string, options: GetSnapshotOptions = {}): Promise<GetSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.getSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[getSnapshot] Get a snapshot\");\n const originalResponse = await this.client.getSnapshot(name, {\n ...updatedOptions,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * Recover an archived snapshot back to ready status\n *\n * Example usage:\n * ```ts snippet:RecoverSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.recoverSnapshot(\"MySnapshot\");\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n recoverSnapshot(\n name: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: UpdateSnapshotOptions = {},\n ): Promise<UpdateSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.recoverSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[recoverSnapshot] Recover a snapshot\");\n const originalResponse = await this.client.updateSnapshot(\n \"application/merge-patch+json\",\n name,\n { status: \"ready\" },\n {\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(\n { etag: options.etag },\n { onlyIfUnchanged: true, ...options },\n ),\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n },\n );\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n /**\n * Archive a ready snapshot\n *\n * Example usage:\n * ```ts snippet:ArchiveSnapshot\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const result = await client.archiveSnapshot({ name: \"MySnapshot\" });\n * ```\n * @param name - The name of the snapshot.\n * @param options - Optional parameters for the request.\n */\n archiveSnapshot(\n name: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: UpdateSnapshotOptions = {},\n ): Promise<UpdateSnapshotResponse> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.archiveSnapshot\",\n options,\n async (updatedOptions) => {\n logger.info(\"[archiveSnapshot] Archive a snapshot\");\n const originalResponse = await this.client.updateSnapshot(\n \"application/merge-patch+json\",\n name,\n { status: \"archived\" },\n {\n ...updatedOptions,\n ...checkAndFormatIfAndIfNoneMatch(\n { etag: options.etag },\n { onlyIfUnchanged: true, ...options },\n ),\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n },\n );\n const response = transformSnapshotResponse(originalResponse);\n assertResponse(response);\n return response;\n },\n );\n }\n\n /**\n * List all snapshots from Azure App Configuration service\n *\n * Example usage:\n * ```ts snippet:ListSnapshots\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { AppConfigurationClient } from \"@azure/app-configuration\";\n *\n * // The endpoint for your App Configuration resource\n * const endpoint = \"https://example.azconfig.io\";\n * const credential = new DefaultAzureCredential();\n * const client = new AppConfigurationClient(endpoint, credential);\n *\n * const snapshots = await client.listSnapshots();\n *\n * for await (const snapshot of snapshots) {\n * console.log(`Found snapshot: ${snapshot.name}`);\n * }\n * ```\n * @param options - Optional parameters for the request.\n */\n listSnapshots(\n options: ListSnapshotsOptions = {},\n ): PagedAsyncIterableIterator<ConfigurationSnapshot, ListSnapshotsPage, PageSettings> {\n const pagedResult: PagedResult<ListSnapshotsPage, PageSettings, string | undefined> = {\n firstPageLink: undefined,\n getPage: async (pageLink: string | undefined) => {\n const response = await this.sendSnapShotsRequest(options, pageLink);\n const currentResponse = {\n ...response,\n items:\n response.items != null ? response.items.map((s) => transformSnapshotResponse(s)) : [],\n continuationToken: response.nextLink\n ? extractAfterTokenFromNextLink(response.nextLink)\n : undefined,\n };\n return {\n page: currentResponse,\n nextPageLink: currentResponse.continuationToken,\n };\n },\n toElements: (page) => page.items,\n };\n return getPagedAsyncIterator(pagedResult);\n }\n\n private async sendSnapShotsRequest(\n options: ListSnapshotsOptions & PageSettings = {},\n pageLink: string | undefined,\n ): Promise<_SnapshotListResult & { _response: any }> {\n return tracingClient.withSpan(\n \"AppConfigurationClient.listSnapshots\",\n options,\n async (updatedOptions) => {\n const rawResponse = await _getSnapshotsSend(this._context, {\n ...updatedOptions,\n ...formatSnapshotFiltersAndSelect(options),\n after: pageLink,\n requestOptions: {\n ...updatedOptions.requestOptions,\n skipUrlEncoding: true,\n },\n });\n const parsed = await _getSnapshotsDeserialize(rawResponse);\n return Object.assign(parsed, { _response: rawResponse });\n },\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appConfigurationContext.d.ts","sourceRoot":"","sources":["../../../../src/generated/api/appConfigurationContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"appConfigurationContext.d.ts","sourceRoot":"","sources":["../../../../src/generated/api/appConfigurationContext.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAa,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAElE,uCAAuC;AACvC,MAAM,WAAW,uBAAwB,SAAQ,MAAM;IACrD,iDAAiD;IACjD,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,0CAA0C;AAC1C,MAAM,WAAW,oCAAqC,SAAQ,aAAa;IACzE,iDAAiD;IACjD,sEAAsE;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,uCAAuC;AACvC,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,aAAa,GAAG,eAAe,EAC3C,OAAO,GAAE,oCAAyC,GACjD,uBAAuB,CAmBzB"}
|