@azure/template-dpg 1.0.0-beta.1 → 1.0.0-beta.2
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/LICENSE +4 -3
- package/README.md +4 -6
- package/{types/src/src → dist/browser}/WidgetServiceClient.d.ts +3 -2
- package/dist/browser/WidgetServiceClient.d.ts.map +1 -0
- package/{dist-esm/src/src → dist/browser}/WidgetServiceClient.js +3 -9
- package/dist/browser/WidgetServiceClient.js.map +1 -0
- package/{types/src/src → dist/browser}/api/WidgetServiceContext.d.ts +3 -3
- package/dist/browser/api/WidgetServiceContext.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/api/WidgetServiceContext.js +2 -2
- package/dist/browser/api/WidgetServiceContext.js.map +1 -0
- package/dist/browser/api/foo.d.ts.map +1 -0
- package/{dist-esm/src/src → dist/browser}/api/foo.js +1 -1
- package/dist/browser/api/foo.js.map +1 -0
- package/dist/browser/api/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/api/index.js +1 -1
- package/dist/browser/api/index.js.map +1 -0
- package/dist/browser/api/models.d.ts.map +1 -0
- package/dist/browser/api/models.js +4 -0
- package/dist/browser/api/models.js.map +1 -0
- package/{types/src/src → dist/browser}/api/operations.d.ts +5 -4
- package/dist/browser/api/operations.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/api/operations.js +2 -2
- package/dist/browser/api/operations.js.map +1 -0
- package/{types/src/src → dist/browser}/common/interfaces.d.ts +1 -1
- package/dist/browser/common/interfaces.d.ts.map +1 -0
- package/dist/browser/common/interfaces.js +4 -0
- package/dist/browser/common/interfaces.js.map +1 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/{dist-esm/src/src → dist/browser}/index.js +1 -1
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/{dist-esm/src/src → dist/browser}/logger.js +1 -1
- package/dist/browser/logger.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/{types/src/src → dist/browser}/rest/clientDefinitions.d.ts +3 -3
- package/{types/src → dist/browser}/rest/clientDefinitions.d.ts.map +1 -1
- package/dist/browser/rest/clientDefinitions.js +4 -0
- package/dist/browser/rest/clientDefinitions.js.map +1 -0
- package/dist/browser/rest/index.d.ts.map +1 -0
- package/{dist-esm/src/src → dist/browser}/rest/index.js +1 -1
- package/dist/browser/rest/index.js.map +1 -0
- package/{types/src/src → dist/browser}/rest/isUnexpected.d.ts +1 -1
- package/dist/browser/rest/isUnexpected.d.ts.map +1 -0
- package/{dist-esm/src/src → dist/browser}/rest/isUnexpected.js +1 -1
- package/dist/browser/rest/isUnexpected.js.map +1 -0
- package/dist/browser/rest/models.d.ts.map +1 -0
- package/dist/browser/rest/models.js +4 -0
- package/dist/browser/rest/models.js.map +1 -0
- package/dist/browser/rest/outputModels.d.ts.map +1 -0
- package/dist/browser/rest/outputModels.js +4 -0
- package/dist/browser/rest/outputModels.js.map +1 -0
- package/{types/src/src → dist/browser}/rest/parameters.d.ts +2 -2
- package/dist/browser/rest/parameters.d.ts.map +1 -0
- package/dist/browser/rest/parameters.js +4 -0
- package/dist/browser/rest/parameters.js.map +1 -0
- package/{types/src/src → dist/browser}/rest/responses.d.ts +2 -2
- package/dist/browser/rest/responses.d.ts.map +1 -0
- package/dist/browser/rest/responses.js +4 -0
- package/dist/browser/rest/responses.js.map +1 -0
- package/{types/src/src → dist/browser}/rest/widgetServiceClient.d.ts +3 -3
- package/dist/browser/rest/widgetServiceClient.d.ts.map +1 -0
- package/{dist-esm/src/src → dist/browser}/rest/widgetServiceClient.js +2 -9
- package/dist/browser/rest/widgetServiceClient.js.map +1 -0
- package/{types/src → dist/commonjs}/WidgetServiceClient.d.ts +3 -9
- package/dist/commonjs/WidgetServiceClient.d.ts.map +1 -0
- package/dist/commonjs/WidgetServiceClient.js +56 -0
- package/dist/commonjs/WidgetServiceClient.js.map +1 -0
- package/{types/src → dist/commonjs}/api/WidgetServiceContext.d.ts +3 -10
- package/dist/commonjs/api/WidgetServiceContext.d.ts.map +1 -0
- package/dist/commonjs/api/WidgetServiceContext.js +18 -0
- package/dist/commonjs/api/WidgetServiceContext.js.map +1 -0
- package/{types/src → dist/commonjs}/api/foo.d.ts +0 -7
- package/dist/commonjs/api/foo.d.ts.map +1 -0
- package/dist/commonjs/api/foo.js +16 -0
- package/dist/commonjs/api/foo.js.map +1 -0
- package/{types/src → dist/commonjs}/api/index.d.ts +0 -7
- package/dist/commonjs/api/index.d.ts.map +1 -0
- package/dist/commonjs/api/index.js +15 -0
- package/dist/commonjs/api/index.js.map +1 -0
- package/{types/src → dist/commonjs}/api/models.d.ts +0 -7
- package/dist/commonjs/api/models.d.ts.map +1 -0
- package/dist/commonjs/api/models.js +5 -0
- package/dist/commonjs/api/models.js.map +1 -0
- package/{types/src → dist/commonjs}/api/operations.d.ts +5 -11
- package/dist/commonjs/api/operations.d.ts.map +1 -0
- package/dist/commonjs/api/operations.js +191 -0
- package/dist/commonjs/api/operations.js.map +1 -0
- package/{types/src → dist/commonjs}/common/interfaces.d.ts +1 -8
- package/dist/commonjs/common/interfaces.d.ts.map +1 -0
- package/dist/commonjs/common/interfaces.js +5 -0
- package/dist/commonjs/common/interfaces.js.map +1 -0
- package/{types/src → dist/commonjs}/index.d.ts +0 -7
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +8 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +15 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/{types/src → dist/commonjs}/rest/clientDefinitions.d.ts +3 -10
- package/dist/commonjs/rest/clientDefinitions.d.ts.map +1 -0
- package/dist/commonjs/rest/clientDefinitions.js +5 -0
- package/dist/commonjs/rest/clientDefinitions.js.map +1 -0
- package/{types/src → dist/commonjs}/rest/index.d.ts +0 -7
- package/dist/commonjs/rest/index.d.ts.map +1 -0
- package/dist/commonjs/rest/index.js +22 -0
- package/dist/commonjs/rest/index.js.map +1 -0
- package/{types/src → dist/commonjs}/rest/isUnexpected.d.ts +1 -8
- package/dist/commonjs/rest/isUnexpected.d.ts.map +1 -0
- package/dist/commonjs/rest/isUnexpected.js +78 -0
- package/dist/commonjs/rest/isUnexpected.js.map +1 -0
- package/{types/src → dist/commonjs}/rest/models.d.ts +0 -7
- package/dist/commonjs/rest/models.d.ts.map +1 -0
- package/dist/commonjs/rest/models.js +5 -0
- package/dist/commonjs/rest/models.js.map +1 -0
- package/{types/src → dist/commonjs}/rest/outputModels.d.ts +0 -7
- package/dist/commonjs/rest/outputModels.d.ts.map +1 -0
- package/dist/commonjs/rest/outputModels.js +5 -0
- package/dist/commonjs/rest/outputModels.js.map +1 -0
- package/{types/src → dist/commonjs}/rest/parameters.d.ts +2 -9
- package/dist/commonjs/rest/parameters.d.ts.map +1 -0
- package/dist/commonjs/rest/parameters.js +5 -0
- package/dist/commonjs/rest/parameters.js.map +1 -0
- package/{types/src → dist/commonjs}/rest/responses.d.ts +2 -9
- package/dist/commonjs/rest/responses.d.ts.map +1 -0
- package/dist/commonjs/rest/responses.js +5 -0
- package/dist/commonjs/rest/responses.js.map +1 -0
- package/{types/src → dist/commonjs}/rest/widgetServiceClient.d.ts +3 -10
- package/dist/commonjs/rest/widgetServiceClient.d.ts.map +1 -0
- package/dist/commonjs/rest/widgetServiceClient.js +42 -0
- package/dist/commonjs/rest/widgetServiceClient.js.map +1 -0
- package/{types/latest → dist/commonjs}/tsdoc-metadata.json +1 -1
- package/dist/esm/WidgetServiceClient.d.ts +42 -0
- package/dist/esm/WidgetServiceClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/WidgetServiceClient.js +3 -16
- package/dist/esm/WidgetServiceClient.js.map +1 -0
- package/dist/esm/api/WidgetServiceContext.d.ts +19 -0
- package/dist/esm/api/WidgetServiceContext.d.ts.map +1 -0
- package/{dist-esm/src/src → dist/esm}/api/WidgetServiceContext.js +2 -2
- package/dist/esm/api/WidgetServiceContext.js.map +1 -0
- package/dist/esm/api/foo.d.ts +9 -0
- package/dist/esm/api/foo.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/api/foo.js +1 -8
- package/dist/esm/api/foo.js.map +1 -0
- package/dist/esm/api/index.d.ts +11 -0
- package/dist/esm/api/index.d.ts.map +1 -0
- package/{dist-esm/src/src → dist/esm}/api/index.js +1 -1
- package/dist/esm/api/index.js.map +1 -0
- package/dist/esm/api/models.d.ts +25 -0
- package/dist/esm/api/models.d.ts.map +1 -0
- package/dist/esm/api/models.js +4 -0
- package/dist/esm/api/models.js.map +1 -0
- package/dist/esm/api/operations.d.ts +68 -0
- package/dist/esm/api/operations.d.ts.map +1 -0
- package/{dist-esm/src/src → dist/esm}/api/operations.js +2 -2
- package/dist/esm/api/operations.js.map +1 -0
- package/dist/esm/common/interfaces.d.ts +21 -0
- package/dist/esm/common/interfaces.d.ts.map +1 -0
- package/dist/esm/common/interfaces.js +4 -0
- package/dist/esm/common/interfaces.js.map +1 -0
- package/dist/esm/index.d.ts +12 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/index.js +1 -1
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/logger.js +1 -8
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/rest/clientDefinitions.d.ts +52 -0
- package/dist/esm/rest/clientDefinitions.d.ts.map +1 -0
- package/dist/esm/rest/clientDefinitions.js +4 -0
- package/dist/esm/rest/clientDefinitions.js.map +1 -0
- package/dist/esm/rest/index.d.ts +17 -0
- package/dist/esm/rest/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/rest/index.js +1 -8
- package/dist/esm/rest/index.js.map +1 -0
- package/dist/esm/rest/isUnexpected.d.ts +15 -0
- package/dist/esm/rest/isUnexpected.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/rest/isUnexpected.js +1 -1
- package/dist/esm/rest/isUnexpected.js.map +1 -0
- package/dist/esm/rest/models.d.ts +20 -0
- package/dist/esm/rest/models.d.ts.map +1 -0
- package/dist/esm/rest/models.js +4 -0
- package/dist/esm/rest/models.js.map +1 -0
- package/dist/esm/rest/outputModels.d.ts +25 -0
- package/dist/esm/rest/outputModels.d.ts.map +1 -0
- package/dist/esm/rest/outputModels.js +4 -0
- package/dist/esm/rest/outputModels.js.map +1 -0
- package/dist/esm/rest/parameters.d.ts +22 -0
- package/dist/esm/rest/parameters.d.ts.map +1 -0
- package/dist/esm/rest/parameters.js +4 -0
- package/dist/esm/rest/parameters.js.map +1 -0
- package/dist/esm/rest/responses.d.ts +63 -0
- package/dist/esm/rest/responses.d.ts.map +1 -0
- package/dist/esm/rest/responses.js +4 -0
- package/dist/esm/rest/responses.js.map +1 -0
- package/dist/esm/rest/widgetServiceClient.d.ts +16 -0
- package/dist/esm/rest/widgetServiceClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/rest/widgetServiceClient.js +2 -16
- package/dist/esm/rest/widgetServiceClient.js.map +1 -0
- package/dist/react-native/WidgetServiceClient.d.ts +42 -0
- package/dist/react-native/WidgetServiceClient.d.ts.map +1 -0
- package/dist/react-native/WidgetServiceClient.js +52 -0
- package/dist/react-native/WidgetServiceClient.js.map +1 -0
- package/dist/react-native/api/WidgetServiceContext.d.ts +19 -0
- package/dist/react-native/api/WidgetServiceContext.d.ts.map +1 -0
- package/dist/react-native/api/WidgetServiceContext.js +14 -0
- package/dist/react-native/api/WidgetServiceContext.js.map +1 -0
- package/dist/react-native/api/foo.d.ts +9 -0
- package/dist/react-native/api/foo.d.ts.map +1 -0
- package/dist/react-native/api/foo.js +13 -0
- package/dist/react-native/api/foo.js.map +1 -0
- package/dist/react-native/api/index.d.ts +11 -0
- package/dist/react-native/api/index.d.ts.map +1 -0
- package/dist/react-native/api/index.js +5 -0
- package/dist/react-native/api/index.js.map +1 -0
- package/dist/react-native/api/models.d.ts +25 -0
- package/dist/react-native/api/models.d.ts.map +1 -0
- package/dist/react-native/api/models.js +4 -0
- package/dist/react-native/api/models.js.map +1 -0
- package/dist/react-native/api/operations.d.ts +68 -0
- package/dist/react-native/api/operations.d.ts.map +1 -0
- package/dist/react-native/api/operations.js +171 -0
- package/dist/react-native/api/operations.js.map +1 -0
- package/dist/react-native/common/interfaces.d.ts +21 -0
- package/dist/react-native/common/interfaces.d.ts.map +1 -0
- package/dist/react-native/common/interfaces.js +4 -0
- package/dist/react-native/common/interfaces.js.map +1 -0
- package/dist/react-native/index.d.ts +12 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +4 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/logger.d.ts +2 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +12 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/rest/clientDefinitions.d.ts +52 -0
- package/dist/react-native/rest/clientDefinitions.d.ts.map +1 -0
- package/dist/react-native/rest/clientDefinitions.js +4 -0
- package/dist/react-native/rest/clientDefinitions.js.map +1 -0
- package/dist/react-native/rest/index.d.ts +17 -0
- package/dist/react-native/rest/index.d.ts.map +1 -0
- package/dist/react-native/rest/index.js +19 -0
- package/dist/react-native/rest/index.js.map +1 -0
- package/dist/react-native/rest/isUnexpected.d.ts +15 -0
- package/dist/react-native/rest/isUnexpected.d.ts.map +1 -0
- package/dist/react-native/rest/isUnexpected.js +75 -0
- package/dist/react-native/rest/isUnexpected.js.map +1 -0
- package/dist/react-native/rest/models.d.ts +20 -0
- package/dist/react-native/rest/models.d.ts.map +1 -0
- package/dist/react-native/rest/models.js +4 -0
- package/dist/react-native/rest/models.js.map +1 -0
- package/dist/react-native/rest/outputModels.d.ts +25 -0
- package/dist/react-native/rest/outputModels.d.ts.map +1 -0
- package/dist/react-native/rest/outputModels.js +4 -0
- package/dist/react-native/rest/outputModels.js.map +1 -0
- package/dist/react-native/rest/parameters.d.ts +22 -0
- package/dist/react-native/rest/parameters.d.ts.map +1 -0
- package/dist/react-native/rest/parameters.js +4 -0
- package/dist/react-native/rest/parameters.js.map +1 -0
- package/dist/react-native/rest/responses.d.ts +63 -0
- package/dist/react-native/rest/responses.d.ts.map +1 -0
- package/dist/react-native/rest/responses.js +4 -0
- package/dist/react-native/rest/responses.js.map +1 -0
- package/dist/react-native/rest/widgetServiceClient.d.ts +16 -0
- package/dist/react-native/rest/widgetServiceClient.d.ts.map +1 -0
- package/dist/react-native/rest/widgetServiceClient.js +39 -0
- package/dist/react-native/rest/widgetServiceClient.js.map +1 -0
- package/package.json +108 -74
- package/dist/index.cjs +0 -370
- package/dist/index.cjs.map +0 -1
- package/dist-esm/src/WidgetServiceClient.js.map +0 -1
- package/dist-esm/src/api/WidgetServiceContext.js.map +0 -1
- package/dist-esm/src/api/foo.js.map +0 -1
- package/dist-esm/src/api/index.js.map +0 -1
- package/dist-esm/src/api/models.js +0 -4
- package/dist-esm/src/api/models.js.map +0 -1
- package/dist-esm/src/api/operations.js.map +0 -1
- package/dist-esm/src/common/interfaces.js +0 -4
- package/dist-esm/src/common/interfaces.js.map +0 -1
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/logger.js.map +0 -1
- package/dist-esm/src/rest/clientDefinitions.js +0 -4
- package/dist-esm/src/rest/clientDefinitions.js.map +0 -1
- package/dist-esm/src/rest/index.js.map +0 -1
- package/dist-esm/src/rest/isUnexpected.js.map +0 -1
- package/dist-esm/src/rest/models.js +0 -4
- package/dist-esm/src/rest/models.js.map +0 -1
- package/dist-esm/src/rest/outputModels.js +0 -4
- package/dist-esm/src/rest/outputModels.js.map +0 -1
- package/dist-esm/src/rest/parameters.js +0 -4
- package/dist-esm/src/rest/parameters.js.map +0 -1
- package/dist-esm/src/rest/responses.js +0 -4
- package/dist-esm/src/rest/responses.js.map +0 -1
- package/dist-esm/src/rest/widgetServiceClient.js.map +0 -1
- package/dist-esm/src/src/WidgetServiceClient.js.map +0 -1
- package/dist-esm/src/src/api/WidgetServiceContext.js.map +0 -1
- package/dist-esm/src/src/api/foo.js.map +0 -1
- package/dist-esm/src/src/api/index.js.map +0 -1
- package/dist-esm/src/src/api/models.js +0 -4
- package/dist-esm/src/src/api/models.js.map +0 -1
- package/dist-esm/src/src/api/operations.js.map +0 -1
- package/dist-esm/src/src/common/interfaces.js +0 -4
- package/dist-esm/src/src/common/interfaces.js.map +0 -1
- package/dist-esm/src/src/index.js.map +0 -1
- package/dist-esm/src/src/logger.js.map +0 -1
- package/dist-esm/src/src/rest/clientDefinitions.js +0 -4
- package/dist-esm/src/src/rest/clientDefinitions.js.map +0 -1
- package/dist-esm/src/src/rest/index.js.map +0 -1
- package/dist-esm/src/src/rest/isUnexpected.js.map +0 -1
- package/dist-esm/src/src/rest/models.js +0 -4
- package/dist-esm/src/src/rest/models.js.map +0 -1
- package/dist-esm/src/src/rest/outputModels.js +0 -4
- package/dist-esm/src/src/rest/outputModels.js.map +0 -1
- package/dist-esm/src/src/rest/parameters.js +0 -4
- package/dist-esm/src/src/rest/parameters.js.map +0 -1
- package/dist-esm/src/src/rest/responses.js +0 -4
- package/dist-esm/src/src/rest/responses.js.map +0 -1
- package/dist-esm/src/src/rest/widgetServiceClient.js.map +0 -1
- package/types/latest/template-dpg.d.ts +0 -108
- package/types/samples-dev/createWidget.d.ts +0 -2
- package/types/samples-dev/createWidget.d.ts.map +0 -1
- package/types/src/WidgetServiceClient.d.ts.map +0 -1
- package/types/src/api/WidgetServiceContext.d.ts.map +0 -1
- package/types/src/api/foo.d.ts.map +0 -1
- package/types/src/api/index.d.ts.map +0 -1
- package/types/src/api/models.d.ts.map +0 -1
- package/types/src/api/operations.d.ts.map +0 -1
- package/types/src/common/interfaces.d.ts.map +0 -1
- package/types/src/index.d.ts.map +0 -1
- package/types/src/logger.d.ts.map +0 -1
- package/types/src/rest/index.d.ts.map +0 -1
- package/types/src/rest/isUnexpected.d.ts.map +0 -1
- package/types/src/rest/models.d.ts.map +0 -1
- package/types/src/rest/outputModels.d.ts.map +0 -1
- package/types/src/rest/parameters.d.ts.map +0 -1
- package/types/src/rest/responses.d.ts.map +0 -1
- package/types/src/rest/widgetServiceClient.d.ts.map +0 -1
- package/types/src/src/WidgetServiceClient.d.ts.map +0 -1
- package/types/src/src/api/WidgetServiceContext.d.ts.map +0 -1
- package/types/src/src/api/foo.d.ts.map +0 -1
- package/types/src/src/api/index.d.ts.map +0 -1
- package/types/src/src/api/models.d.ts.map +0 -1
- package/types/src/src/api/operations.d.ts.map +0 -1
- package/types/src/src/common/interfaces.d.ts.map +0 -1
- package/types/src/src/index.d.ts.map +0 -1
- package/types/src/src/logger.d.ts.map +0 -1
- package/types/src/src/rest/clientDefinitions.d.ts.map +0 -1
- package/types/src/src/rest/index.d.ts.map +0 -1
- package/types/src/src/rest/isUnexpected.d.ts.map +0 -1
- package/types/src/src/rest/models.d.ts.map +0 -1
- package/types/src/src/rest/outputModels.d.ts.map +0 -1
- package/types/src/src/rest/parameters.d.ts.map +0 -1
- package/types/src/src/rest/responses.d.ts.map +0 -1
- package/types/src/src/rest/widgetServiceClient.d.ts.map +0 -1
- package/types/test/public/widgetService.spec.d.ts +0 -2
- package/types/test/public/widgetService.spec.d.ts.map +0 -1
- /package/{types/src/src → dist/browser}/api/foo.d.ts +0 -0
- /package/{types/src/src → dist/browser}/api/index.d.ts +0 -0
- /package/{types/src/src → dist/browser}/api/models.d.ts +0 -0
- /package/{types/src/src → dist/browser}/index.d.ts +0 -0
- /package/{types/src → dist/browser}/logger.d.ts +0 -0
- /package/{types/src/src → dist/browser}/rest/index.d.ts +0 -0
- /package/{types/src/src → dist/browser}/rest/models.d.ts +0 -0
- /package/{types/src/src → dist/browser}/rest/outputModels.d.ts +0 -0
- /package/{types/src/src → dist/commonjs}/logger.d.ts +0 -0
|
@@ -5,16 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* Any changes you make here may be lost.
|
|
12
|
-
*
|
|
13
|
-
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
14
|
-
*/
|
|
15
|
-
import { ListWidgetsParameters, CreateWidgetParameters, GetWidgetParameters, UpdateWidgetParameters, DeleteWidgetParameters, AnalyzeWidgetParameters } from "./parameters.js";
|
|
16
|
-
import { ListWidgets200Response, ListWidgetsDefaultResponse, CreateWidget201Response, CreateWidgetDefaultResponse, GetWidget200Response, GetWidgetDefaultResponse, UpdateWidget200Response, UpdateWidgetDefaultResponse, DeleteWidget204Response, DeleteWidgetDefaultResponse, AnalyzeWidget200Response, AnalyzeWidgetDefaultResponse } from "./responses.js";
|
|
17
|
-
import { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
8
|
+
import type { ListWidgetsParameters, CreateWidgetParameters, GetWidgetParameters, UpdateWidgetParameters, DeleteWidgetParameters, AnalyzeWidgetParameters } from "./parameters.js";
|
|
9
|
+
import type { ListWidgets200Response, ListWidgetsDefaultResponse, CreateWidget201Response, CreateWidgetDefaultResponse, GetWidget200Response, GetWidgetDefaultResponse, UpdateWidget200Response, UpdateWidgetDefaultResponse, DeleteWidget204Response, DeleteWidgetDefaultResponse, AnalyzeWidget200Response, AnalyzeWidgetDefaultResponse } from "./responses.js";
|
|
10
|
+
import type { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
18
11
|
export interface ListWidgets {
|
|
19
12
|
/**
|
|
20
13
|
* List all widgets in the system. This operation is not paginated, and returns a simple array of widgets.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../../src/rest/clientDefinitions.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB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C,IAAI,EAAE,eAAe,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/C,uFAAuF;IACvF,CAAC,IAAI,EAAE,uBAAuB,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa,CAAC;CAC5D;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG;IAC1C,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../../src/rest/clientDefinitions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport type {\n ListWidgetsParameters,\n CreateWidgetParameters,\n GetWidgetParameters,\n UpdateWidgetParameters,\n DeleteWidgetParameters,\n AnalyzeWidgetParameters,\n} from \"./parameters.js\";\nimport type {\n ListWidgets200Response,\n ListWidgetsDefaultResponse,\n CreateWidget201Response,\n CreateWidgetDefaultResponse,\n GetWidget200Response,\n GetWidgetDefaultResponse,\n UpdateWidget200Response,\n UpdateWidgetDefaultResponse,\n DeleteWidget204Response,\n DeleteWidgetDefaultResponse,\n AnalyzeWidget200Response,\n AnalyzeWidgetDefaultResponse,\n} from \"./responses.js\";\nimport type { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface ListWidgets {\n /**\n * List all widgets in the system. This operation is not paginated, and returns a simple array of widgets.\n *\n * It does not accept any options or parameters.\n */\n get(\n options?: ListWidgetsParameters,\n ): StreamableMethod<ListWidgets200Response | ListWidgetsDefaultResponse>;\n /**\n * Create a new widget.\n *\n * The widget ID is not required during creation, as it is automatically set by the server. Providing an ID will\n * result in an error.\n */\n post(\n options?: CreateWidgetParameters,\n ): StreamableMethod<CreateWidget201Response | CreateWidgetDefaultResponse>;\n}\n\nexport interface GetWidget {\n /** Get a widget by ID. */\n get(\n options?: GetWidgetParameters,\n ): StreamableMethod<GetWidget200Response | GetWidgetDefaultResponse>;\n /**\n * Update the contents of the widget. The widget ID is required in the input, but cannot be changed. All other fields\n * are optional and will be updated within the widget if provided.\n */\n patch(\n options?: UpdateWidgetParameters,\n ): StreamableMethod<UpdateWidget200Response | UpdateWidgetDefaultResponse>;\n /** Delete a widget by ID. */\n delete(\n options?: DeleteWidgetParameters,\n ): StreamableMethod<DeleteWidget204Response | DeleteWidgetDefaultResponse>;\n}\n\nexport interface AnalyzeWidget {\n /** Analyze a widget. The only guarantee is that this method will return a string containing the results of the analysis. */\n post(\n options?: AnalyzeWidgetParameters,\n ): StreamableMethod<AnalyzeWidget200Response | AnalyzeWidgetDefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/widgets' has methods for the following verbs: get, post */\n (path: \"/widgets\"): ListWidgets;\n /** Resource for '/widgets/\\{id\\}' has methods for the following verbs: get, patch, delete */\n (path: \"/widgets/{id}\", id: string): GetWidget;\n /** Resource for '/widgets/\\{id\\}/analyze' has methods for the following verbs: post */\n (path: \"/widgets/{id}/analyze\", id: string): AnalyzeWidget;\n}\n\nexport type WidgetServiceContext = Client & {\n path: Routes;\n};\n"]}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
3
|
-
*
|
|
4
|
-
* Any changes you make here may be lost.
|
|
5
|
-
*
|
|
6
|
-
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
7
|
-
*/
|
|
8
1
|
/**
|
|
9
2
|
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
10
3
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rest/index.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,OAAO,mBAAmB,MAAM,0BAA0B,CAAC;AAE3D,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAElC,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
/**
|
|
7
|
+
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
8
|
+
*
|
|
9
|
+
* Any changes you make here may be lost.
|
|
10
|
+
*
|
|
11
|
+
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
12
|
+
*/
|
|
13
|
+
const widgetServiceClient_js_1 = tslib_1.__importDefault(require("./widgetServiceClient.js"));
|
|
14
|
+
tslib_1.__exportStar(require("./widgetServiceClient.js"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./parameters.js"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./responses.js"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./clientDefinitions.js"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./isUnexpected.js"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./models.js"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./outputModels.js"), exports);
|
|
21
|
+
exports.default = widgetServiceClient_js_1.default;
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rest/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;;;;;GAMG;AAEH,8FAA2D;AAE3D,mEAAyC;AACzC,0DAAgC;AAChC,yDAA+B;AAC/B,iEAAuC;AACvC,4DAAkC;AAClC,sDAA4B;AAC5B,4DAAkC;AAElC,kBAAe,gCAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport WidgetServiceClient from \"./widgetServiceClient.js\";\n\nexport * from \"./widgetServiceClient.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\n\nexport default WidgetServiceClient;\n"]}
|
|
@@ -5,14 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
10
|
-
*
|
|
11
|
-
* Any changes you make here may be lost.
|
|
12
|
-
*
|
|
13
|
-
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
14
|
-
*/
|
|
15
|
-
import { ListWidgets200Response, ListWidgetsDefaultResponse, CreateWidget201Response, CreateWidgetDefaultResponse, GetWidget200Response, GetWidgetDefaultResponse, UpdateWidget200Response, UpdateWidgetDefaultResponse, DeleteWidget204Response, DeleteWidgetDefaultResponse, AnalyzeWidget200Response, AnalyzeWidgetDefaultResponse } from "./responses.js";
|
|
8
|
+
import type { ListWidgets200Response, ListWidgetsDefaultResponse, CreateWidget201Response, CreateWidgetDefaultResponse, GetWidget200Response, GetWidgetDefaultResponse, UpdateWidget200Response, UpdateWidgetDefaultResponse, DeleteWidget204Response, DeleteWidgetDefaultResponse, AnalyzeWidget200Response, AnalyzeWidgetDefaultResponse } from "./responses.js";
|
|
16
9
|
export declare function isUnexpected(response: ListWidgets200Response | ListWidgetsDefaultResponse): response is ListWidgetsDefaultResponse;
|
|
17
10
|
export declare function isUnexpected(response: CreateWidget201Response | CreateWidgetDefaultResponse): response is CreateWidgetDefaultResponse;
|
|
18
11
|
export declare function isUnexpected(response: GetWidget200Response | GetWidgetDefaultResponse): response is GetWidgetDefaultResponse;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../../src/rest/isUnexpected.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,EACvB,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AAWxB,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,sBAAsB,GAAG,0BAA0B,GAC5D,QAAQ,IAAI,0BAA0B,CAAC;AAC1C,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,uBAAuB,GAAG,2BAA2B,GAC9D,QAAQ,IAAI,2BAA2B,CAAC;AAC3C,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,oBAAoB,GAAG,wBAAwB,GACxD,QAAQ,IAAI,wBAAwB,CAAC;AACxC,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,uBAAuB,GAAG,2BAA2B,GAC9D,QAAQ,IAAI,2BAA2B,CAAC;AAC3C,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,uBAAuB,GAAG,2BAA2B,GAC9D,QAAQ,IAAI,2BAA2B,CAAC;AAC3C,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,wBAAwB,GAAG,4BAA4B,GAChE,QAAQ,IAAI,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.isUnexpected = isUnexpected;
|
|
6
|
+
const responseMap = {
|
|
7
|
+
"GET /widgets": ["200"],
|
|
8
|
+
"POST /widgets": ["201"],
|
|
9
|
+
"GET /widgets/{id}": ["200"],
|
|
10
|
+
"PATCH /widgets/{id}": ["200"],
|
|
11
|
+
"DELETE /widgets/{id}": ["204"],
|
|
12
|
+
"POST /widgets/{id}/analyze": ["200"],
|
|
13
|
+
};
|
|
14
|
+
function isUnexpected(response) {
|
|
15
|
+
const lroOriginal = response.headers["x-ms-original-url"];
|
|
16
|
+
const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
|
|
17
|
+
const method = response.request.method;
|
|
18
|
+
let pathDetails = responseMap[`${method} ${url.pathname}`];
|
|
19
|
+
if (!pathDetails) {
|
|
20
|
+
pathDetails = getParametrizedPathSuccess(method, url.pathname);
|
|
21
|
+
}
|
|
22
|
+
return !pathDetails.includes(response.status);
|
|
23
|
+
}
|
|
24
|
+
function getParametrizedPathSuccess(method, path) {
|
|
25
|
+
var _a, _b, _c, _d;
|
|
26
|
+
const pathParts = path.split("/");
|
|
27
|
+
// Traverse list to match the longest candidate
|
|
28
|
+
// matchedLen: the length of candidate path
|
|
29
|
+
// matchedValue: the matched status code array
|
|
30
|
+
let matchedLen = -1, matchedValue = [];
|
|
31
|
+
// Iterate the responseMap to find a match
|
|
32
|
+
for (const [key, value] of Object.entries(responseMap)) {
|
|
33
|
+
// Extracting the path from the map key which is in format
|
|
34
|
+
// GET /path/foo
|
|
35
|
+
if (!key.startsWith(method)) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
const candidatePath = getPathFromMapKey(key);
|
|
39
|
+
// Get each part of the url path
|
|
40
|
+
const candidateParts = candidatePath.split("/");
|
|
41
|
+
// track if we have found a match to return the values found.
|
|
42
|
+
let found = true;
|
|
43
|
+
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
44
|
+
if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
|
|
45
|
+
const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
|
|
46
|
+
// If the current part of the candidate is a "template" part
|
|
47
|
+
// Try to use the suffix of pattern to match the path
|
|
48
|
+
// {guid} ==> $
|
|
49
|
+
// {guid}:export ==> :export$
|
|
50
|
+
const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
|
|
51
|
+
if (!isMatched) {
|
|
52
|
+
found = false;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
// If the candidate part is not a template and
|
|
58
|
+
// the parts don't match mark the candidate as not found
|
|
59
|
+
// to move on with the next candidate path.
|
|
60
|
+
if (candidateParts[i] !== pathParts[j]) {
|
|
61
|
+
found = false;
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// We finished evaluating the current candidate parts
|
|
66
|
+
// Update the matched value if and only if we found the longer pattern
|
|
67
|
+
if (found && candidatePath.length > matchedLen) {
|
|
68
|
+
matchedLen = candidatePath.length;
|
|
69
|
+
matchedValue = value;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return matchedValue;
|
|
73
|
+
}
|
|
74
|
+
function getPathFromMapKey(mapKey) {
|
|
75
|
+
const pathStart = mapKey.indexOf("/");
|
|
76
|
+
return mapKey.slice(pathStart);
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=isUnexpected.js.map
|
|
@@ -0,0 +1 @@
|
|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EF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport type {\n ListWidgets200Response,\n ListWidgetsDefaultResponse,\n CreateWidget201Response,\n CreateWidgetDefaultResponse,\n GetWidget200Response,\n GetWidgetDefaultResponse,\n UpdateWidget200Response,\n UpdateWidgetDefaultResponse,\n DeleteWidget204Response,\n DeleteWidgetDefaultResponse,\n AnalyzeWidget200Response,\n AnalyzeWidgetDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /widgets\": [\"200\"],\n \"POST /widgets\": [\"201\"],\n \"GET /widgets/{id}\": [\"200\"],\n \"PATCH /widgets/{id}\": [\"200\"],\n \"DELETE /widgets/{id}\": [\"204\"],\n \"POST /widgets/{id}/analyze\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: ListWidgets200Response | ListWidgetsDefaultResponse,\n): response is ListWidgetsDefaultResponse;\nexport function isUnexpected(\n response: CreateWidget201Response | CreateWidgetDefaultResponse,\n): response is CreateWidgetDefaultResponse;\nexport function isUnexpected(\n response: GetWidget200Response | GetWidgetDefaultResponse,\n): response is GetWidgetDefaultResponse;\nexport function isUnexpected(\n response: UpdateWidget200Response | UpdateWidgetDefaultResponse,\n): response is UpdateWidgetDefaultResponse;\nexport function isUnexpected(\n response: DeleteWidget204Response | DeleteWidgetDefaultResponse,\n): response is DeleteWidgetDefaultResponse;\nexport function isUnexpected(\n response: AnalyzeWidget200Response | AnalyzeWidgetDefaultResponse,\n): response is AnalyzeWidgetDefaultResponse;\nexport function isUnexpected(\n response:\n | ListWidgets200Response\n | ListWidgetsDefaultResponse\n | CreateWidget201Response\n | CreateWidgetDefaultResponse\n | GetWidget200Response\n | GetWidgetDefaultResponse\n | UpdateWidget200Response\n | UpdateWidgetDefaultResponse\n | DeleteWidget204Response\n | DeleteWidgetDefaultResponse\n | AnalyzeWidget200Response\n | AnalyzeWidgetDefaultResponse,\n): response is\n | ListWidgetsDefaultResponse\n | CreateWidgetDefaultResponse\n | GetWidgetDefaultResponse\n | UpdateWidgetDefaultResponse\n | DeleteWidgetDefaultResponse\n | AnalyzeWidgetDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
3
|
-
*
|
|
4
|
-
* Any changes you make here may be lost.
|
|
5
|
-
*
|
|
6
|
-
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
7
|
-
*/
|
|
8
1
|
/**
|
|
9
2
|
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
10
3
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/rest/models.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,MAAM,WAAW,YAAY;IAC3B,iFAAiF;IACjF,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/rest/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nexport interface CreateWidget {\n /** The weight of the widget. This is an int32, but must be greater than zero. */\n weight: number;\n /** The color of the widget. */\n color: \"red\" | \"blue\";\n}\n\nexport interface UpdateWidget {\n /** The weight of the widget. This is an int32, but must be greater than zero. */\n weight?: number;\n /** The color of the widget. */\n color?: \"red\" | \"blue\";\n}\n"]}
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
3
|
-
*
|
|
4
|
-
* Any changes you make here may be lost.
|
|
5
|
-
*
|
|
6
|
-
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
7
|
-
*/
|
|
8
1
|
/**
|
|
9
2
|
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
10
3
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../../src/rest/outputModels.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,MAAM,WAAW,YAAY;IAC3B,+EAA+E;IAC/E,EAAE,EAAE,MAAM,CAAC;IACX,iFAAiF;IACjF,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../../src/rest/outputModels.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nexport interface WidgetOutput {\n /** The UUID of this widget. This is generated automatically by the service. */\n id: string;\n /** The weight of the widget. This is an int32, but must be greater than zero. */\n weight: number;\n /** The color of the widget. */\n color: \"red\" | \"blue\";\n}\n\nexport interface WidgetErrorOutput {\n /** The HTTP error code. */\n code: number;\n /** A human-readable message describing the error. */\n message: string;\n}\n\nexport interface AnalyzeResultOutput {\n summary: string;\n}\n"]}
|
|
@@ -5,15 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
* Any changes you make here may be lost.
|
|
12
|
-
*
|
|
13
|
-
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
14
|
-
*/
|
|
15
|
-
import { RequestParameters } from "@azure-rest/core-client";
|
|
16
|
-
import { CreateWidget, UpdateWidget } from "./models.js";
|
|
8
|
+
import type { RequestParameters } from "@azure-rest/core-client";
|
|
9
|
+
import type { CreateWidget, UpdateWidget } from "./models.js";
|
|
17
10
|
export type ListWidgetsParameters = RequestParameters;
|
|
18
11
|
export type GetWidgetParameters = RequestParameters;
|
|
19
12
|
export interface CreateWidgetBodyParam {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../src/rest/parameters.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE9D,MAAM,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AACtD,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAEpD,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,GAAG,iBAAiB,CAAC;AAE/E,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,GAAG,iBAAiB,CAAC;AAC/E,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;AACvD,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../src/rest/parameters.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type { CreateWidget, UpdateWidget } from \"./models.js\";\n\nexport type ListWidgetsParameters = RequestParameters;\nexport type GetWidgetParameters = RequestParameters;\n\nexport interface CreateWidgetBodyParam {\n body?: CreateWidget;\n}\n\nexport type CreateWidgetParameters = CreateWidgetBodyParam & RequestParameters;\n\nexport interface UpdateWidgetBodyParam {\n body?: UpdateWidget;\n}\n\nexport type UpdateWidgetParameters = UpdateWidgetBodyParam & RequestParameters;\nexport type DeleteWidgetParameters = RequestParameters;\nexport type AnalyzeWidgetParameters = RequestParameters;\n"]}
|
|
@@ -5,15 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
* Any changes you make here may be lost.
|
|
12
|
-
*
|
|
13
|
-
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
14
|
-
*/
|
|
15
|
-
import { HttpResponse } from "@azure-rest/core-client";
|
|
16
|
-
import { WidgetOutput, WidgetErrorOutput, AnalyzeResultOutput } from "./outputModels.js";
|
|
8
|
+
import type { HttpResponse } from "@azure-rest/core-client";
|
|
9
|
+
import type { WidgetOutput, WidgetErrorOutput, AnalyzeResultOutput } from "./outputModels.js";
|
|
17
10
|
/** The request has succeeded. */
|
|
18
11
|
export interface ListWidgets200Response extends HttpResponse {
|
|
19
12
|
status: "200";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/rest/responses.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AA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C;CAC3B;AAED,MAAM,WAAW,4BAA6B,SAAQ,YAAY;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,iBAAiB,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/rest/responses.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport type { HttpResponse } from \"@azure-rest/core-client\";\nimport type { WidgetOutput, WidgetErrorOutput, AnalyzeResultOutput } from \"./outputModels.js\";\n\n/** The request has succeeded. */\nexport interface ListWidgets200Response extends HttpResponse {\n status: \"200\";\n body: Array<WidgetOutput>;\n}\n\nexport interface ListWidgetsDefaultResponse extends HttpResponse {\n status: string;\n body: WidgetErrorOutput;\n}\n\n/** The request has succeeded. */\nexport interface GetWidget200Response extends HttpResponse {\n status: \"200\";\n body: WidgetOutput;\n}\n\nexport interface GetWidgetDefaultResponse extends HttpResponse {\n status: string;\n body: WidgetErrorOutput;\n}\n\n/** The request has succeeded and a new resource has been created as a result. */\nexport interface CreateWidget201Response extends HttpResponse {\n status: \"201\";\n body: WidgetOutput;\n}\n\nexport interface CreateWidgetDefaultResponse extends HttpResponse {\n status: string;\n body: WidgetErrorOutput;\n}\n\n/** The request has succeeded. */\nexport interface UpdateWidget200Response extends HttpResponse {\n status: \"200\";\n body: WidgetOutput;\n}\n\nexport interface UpdateWidgetDefaultResponse extends HttpResponse {\n status: string;\n body: WidgetErrorOutput;\n}\n\n/** There is no content to send for this request, but the headers may be useful. */\nexport interface DeleteWidget204Response extends HttpResponse {\n status: \"204\";\n}\n\nexport interface DeleteWidgetDefaultResponse extends HttpResponse {\n status: string;\n body: WidgetErrorOutput;\n}\n\n/** The request has succeeded. */\nexport interface AnalyzeWidget200Response extends HttpResponse {\n status: \"200\";\n body: AnalyzeResultOutput;\n}\n\nexport interface AnalyzeWidgetDefaultResponse extends HttpResponse {\n status: string;\n body: WidgetErrorOutput;\n}\n"]}
|
|
@@ -5,16 +5,9 @@
|
|
|
5
5
|
*
|
|
6
6
|
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* Any changes you make here may be lost.
|
|
12
|
-
*
|
|
13
|
-
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
14
|
-
*/
|
|
15
|
-
import { ClientOptions } from "@azure-rest/core-client";
|
|
16
|
-
import { TokenCredential } from "@azure/core-auth";
|
|
17
|
-
import { WidgetServiceContext } from "./clientDefinitions.js";
|
|
8
|
+
import type { ClientOptions } from "@azure-rest/core-client";
|
|
9
|
+
import type { TokenCredential } from "@azure/core-auth";
|
|
10
|
+
import type { WidgetServiceContext } from "./clientDefinitions.js";
|
|
18
11
|
/**
|
|
19
12
|
* This customization adds credential support to the client. And overloads for when it is optional
|
|
20
13
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetServiceClient.d.ts","sourceRoot":"","sources":["../../../src/rest/widgetServiceClient.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,eAAe,EAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,oBAAoB,CAAC;AACxB,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,aAAa,GACtB,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.default = createClient;
|
|
6
|
+
const core_client_1 = require("@azure-rest/core-client");
|
|
7
|
+
const core_auth_1 = require("@azure/core-auth");
|
|
8
|
+
const logger_js_1 = require("../logger.js");
|
|
9
|
+
function createClient(endpoint, credentialOrOptions, options = {}) {
|
|
10
|
+
let credential;
|
|
11
|
+
if ((0, core_auth_1.isTokenCredential)(credentialOrOptions)) {
|
|
12
|
+
credential = credentialOrOptions;
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
options = credentialOrOptions !== null && credentialOrOptions !== void 0 ? credentialOrOptions : {};
|
|
16
|
+
}
|
|
17
|
+
const client = _createClient(endpoint, options);
|
|
18
|
+
(0, core_client_1.addCredentialPipelinePolicy)(client.pipeline, endpoint, { credential, clientOptions: options });
|
|
19
|
+
return client;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Initialize a new instance of `WidgetServiceContext`
|
|
23
|
+
* @param endpoint - The parameter endpoint
|
|
24
|
+
* @param options - the parameter for all optional parameters
|
|
25
|
+
*/
|
|
26
|
+
function _createClient(endpoint, options = {}) {
|
|
27
|
+
var _a, _b, _c, _d;
|
|
28
|
+
const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}`;
|
|
29
|
+
options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "1.0.0";
|
|
30
|
+
const userAgentInfo = `azsdk-js-widget-rest/1.0.0-beta.2`;
|
|
31
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
32
|
+
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
33
|
+
: `${userAgentInfo}`;
|
|
34
|
+
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
|
|
35
|
+
userAgentPrefix,
|
|
36
|
+
}, loggingOptions: {
|
|
37
|
+
logger: (_d = (_c = options.loggingOptions) === null || _c === void 0 ? void 0 : _c.logger) !== null && _d !== void 0 ? _d : logger_js_1.logger.info,
|
|
38
|
+
} });
|
|
39
|
+
const client = (0, core_client_1.getClient)(baseUrl, options);
|
|
40
|
+
return client;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=widgetServiceClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widgetServiceClient.js","sourceRoot":"","sources":["../../../src/rest/widgetServiceClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA6BlC,+BAeC;AAjCD,yDAAiF;AAEjF,gDAAqD;AACrD,4CAAsC;AAetC,SAAwB,YAAY,CAClC,QAAgB,EAChB,mBAAqD,EACrD,UAAyB,EAAE;IAE3B,IAAI,UAAuC,CAAC;IAC5C,IAAI,IAAA,6BAAiB,EAAC,mBAAmB,CAAC,EAAE,CAAC;QAC3C,UAAU,GAAG,mBAAmB,CAAC;IACnC,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,mBAAmB,aAAnB,mBAAmB,cAAnB,mBAAmB,GAAI,EAAE,CAAC;IACtC,CAAC;IAED,MAAM,MAAM,GAAG,aAAa,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAChD,IAAA,yCAA2B,EAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/F,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,SAAS,aAAa,CAAC,QAAgB,EAAE,UAAyB,EAAE;;IAClE,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,EAAE,CAAC;IACjD,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,OAAO,CAAC;IACnD,MAAM,aAAa,GAAG,mCAAmC,CAAC;IAC1D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,kBAAM,CAAC,IAAI;SACtD,GACF,CAAC;IACF,MAAM,MAAM,GAAG,IAAA,uBAAS,EAAC,OAAO,EAAE,OAAO,CAAyB,CAAC;IACnE,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { addCredentialPipelinePolicy, getClient } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { logger } from \"../logger.js\";\nimport type { WidgetServiceContext } from \"./clientDefinitions.js\";\n\n/**\n * This customization adds credential support to the client. And overloads for when it is optional\n */\nexport default function createClient(\n endpoint: string,\n credential: TokenCredential,\n options?: ClientOptions,\n): WidgetServiceContext;\nexport default function createClient(\n endpoint: string,\n options?: ClientOptions,\n): WidgetServiceContext;\nexport default function createClient(\n endpoint: string,\n credentialOrOptions?: TokenCredential | ClientOptions,\n options: ClientOptions = {},\n): WidgetServiceContext {\n let credential: TokenCredential | undefined;\n if (isTokenCredential(credentialOrOptions)) {\n credential = credentialOrOptions;\n } else {\n options = credentialOrOptions ?? {};\n }\n\n const client = _createClient(endpoint, options);\n addCredentialPipelinePolicy(client.pipeline, endpoint, { credential, clientOptions: options });\n return client;\n}\n\n/**\n * Initialize a new instance of `WidgetServiceContext`\n * @param endpoint - The parameter endpoint\n * @param options - the parameter for all optional parameters\n */\nfunction _createClient(endpoint: string, options: ClientOptions = {}): WidgetServiceContext {\n const baseUrl = options.baseUrl ?? `${endpoint}`;\n options.apiVersion = options.apiVersion ?? \"1.0.0\";\n const userAgentInfo = `azsdk-js-widget-rest/1.0.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n };\n const client = getClient(baseUrl, options) as WidgetServiceContext;\n return client;\n}\n"]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
3
|
+
*
|
|
4
|
+
* Any changes you make here may be lost.
|
|
5
|
+
*
|
|
6
|
+
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
7
|
+
*/
|
|
8
|
+
import type { TokenCredential } from "@azure/core-auth";
|
|
9
|
+
import type { WidgetServiceClientOptions } from "./api/WidgetServiceContext.js";
|
|
10
|
+
import type { AnalyzeResult, AnalyzeWidgetOptions, ColorType, CreateWidgetOptions, DeleteWidgetOptions, GetWidgetOptions, ListWidgetsOptions, UpdateWidgetOptions, Widget } from "./api/index.js";
|
|
11
|
+
export { WidgetServiceClientOptions } from "./api/WidgetServiceContext.js";
|
|
12
|
+
export declare class WidgetServiceClient {
|
|
13
|
+
private _client;
|
|
14
|
+
/** */
|
|
15
|
+
constructor(endpoint: string, options?: WidgetServiceClientOptions);
|
|
16
|
+
constructor(endpoint: string, credential: TokenCredential, options?: WidgetServiceClientOptions);
|
|
17
|
+
/**
|
|
18
|
+
* List all widgets in the system. This operation is not paginated, and returns a simple array of widgets.
|
|
19
|
+
*
|
|
20
|
+
* It does not accept any options or parameters.
|
|
21
|
+
*/
|
|
22
|
+
listWidgets(options?: ListWidgetsOptions): Promise<Widget[]>;
|
|
23
|
+
/** Get a widget by ID. */
|
|
24
|
+
getWidget(id: string, options?: GetWidgetOptions): Promise<Widget>;
|
|
25
|
+
/**
|
|
26
|
+
* Create a new widget.
|
|
27
|
+
*
|
|
28
|
+
* The widget ID is not required during creation, as it is automatically set by the server. Providing an ID will
|
|
29
|
+
* result in an error.
|
|
30
|
+
*/
|
|
31
|
+
createWidget(weight: number, color: ColorType, options?: CreateWidgetOptions): Promise<Widget>;
|
|
32
|
+
/**
|
|
33
|
+
* Update the contents of the widget. The widget ID is required in the input, but cannot be changed. All other fields
|
|
34
|
+
* are optional and will be updated within the widget if provided.
|
|
35
|
+
*/
|
|
36
|
+
updateWidget(id: string, options?: UpdateWidgetOptions): Promise<Widget>;
|
|
37
|
+
/** Delete a widget by ID. */
|
|
38
|
+
deleteWidget(id: string, options?: DeleteWidgetOptions): Promise<void>;
|
|
39
|
+
/** Analyze a widget. The only guarantee is that this method will return a string containing the results of the analysis. */
|
|
40
|
+
analyzeWidget(id: string, options?: AnalyzeWidgetOptions): Promise<AnalyzeResult>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=WidgetServiceClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetServiceClient.d.ts","sourceRoot":"","sources":["../../src/WidgetServiceClient.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+BAA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ENERATED FILE - DO NOT EDIT!
|
|
5
|
-
*
|
|
6
|
-
* Any changes you make here may be lost.
|
|
7
|
-
*
|
|
8
|
-
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
12
|
-
*
|
|
13
|
-
* Any changes you make here may be lost.
|
|
14
|
-
*
|
|
15
|
-
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
16
|
-
*/
|
|
2
|
+
// Licensed under the MIT License.
|
|
17
3
|
import { isTokenCredential } from "@azure/core-auth";
|
|
18
|
-
import {
|
|
4
|
+
import { createWidgetService } from "./api/WidgetServiceContext.js";
|
|
5
|
+
import { analyzeWidget, createWidget, deleteWidget, getWidget, listWidgets, updateWidget, } from "./api/index.js";
|
|
19
6
|
export class WidgetServiceClient {
|
|
20
7
|
constructor(endpoint, credentialOrOptions, options = {}) {
|
|
21
8
|
if (isTokenCredential(credentialOrOptions)) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetServiceClient.js","sourceRoot":"","sources":["../../src/WidgetServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAYpE,OAAO,EACL,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,WAAW,EACX,YAAY,GACb,MAAM,gBAAgB,CAAC;AAKxB,MAAM,OAAO,mBAAmB;IAM9B,YACE,QAAgB,EAChB,mBAAkE,EAClE,UAAsC,EAAE;QAExC,IAAI,iBAAiB,CAAC,mBAAmB,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,EAAE,OAAO,CAAC,CAAC;QAC7E,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ERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { WidgetServiceClientOptions } from \"./api/WidgetServiceContext.js\";\nimport { createWidgetService } from \"./api/WidgetServiceContext.js\";\nimport type {\n AnalyzeResult,\n AnalyzeWidgetOptions,\n ColorType,\n CreateWidgetOptions,\n DeleteWidgetOptions,\n GetWidgetOptions,\n ListWidgetsOptions,\n UpdateWidgetOptions,\n Widget,\n} from \"./api/index.js\";\nimport {\n analyzeWidget,\n createWidget,\n deleteWidget,\n getWidget,\n listWidgets,\n updateWidget,\n} from \"./api/index.js\";\nimport type { WidgetServiceContext } from \"./rest/clientDefinitions.js\";\n\nexport { WidgetServiceClientOptions } from \"./api/WidgetServiceContext.js\";\n\nexport class WidgetServiceClient {\n private _client: WidgetServiceContext;\n\n /** */\n constructor(endpoint: string, options?: WidgetServiceClientOptions);\n constructor(endpoint: string, credential: TokenCredential, options?: WidgetServiceClientOptions);\n constructor(\n endpoint: string,\n credentialOrOptions?: TokenCredential | WidgetServiceClientOptions,\n options: WidgetServiceClientOptions = {},\n ) {\n if (isTokenCredential(credentialOrOptions)) {\n this._client = createWidgetService(endpoint, credentialOrOptions, options);\n } else {\n this._client = createWidgetService(endpoint, credentialOrOptions);\n }\n }\n\n /**\n * List all widgets in the system. This operation is not paginated, and returns a simple array of widgets.\n *\n * It does not accept any options or parameters.\n */\n listWidgets(options: ListWidgetsOptions = { requestOptions: {} }): Promise<Widget[]> {\n return listWidgets(this._client, options);\n }\n\n /** Get a widget by ID. */\n getWidget(id: string, options: GetWidgetOptions = { requestOptions: {} }): Promise<Widget> {\n return getWidget(this._client, id, options);\n }\n\n /**\n * Create a new widget.\n *\n * The widget ID is not required during creation, as it is automatically set by the server. Providing an ID will\n * result in an error.\n */\n createWidget(\n weight: number,\n color: ColorType,\n options: CreateWidgetOptions = { requestOptions: {} },\n ): Promise<Widget> {\n return createWidget(this._client, weight, color, options);\n }\n\n /**\n * Update the contents of the widget. The widget ID is required in the input, but cannot be changed. All other fields\n * are optional and will be updated within the widget if provided.\n */\n updateWidget(id: string, options: UpdateWidgetOptions = { requestOptions: {} }): Promise<Widget> {\n return updateWidget(this._client, id, options);\n }\n\n /** Delete a widget by ID. */\n deleteWidget(id: string, options: DeleteWidgetOptions = { requestOptions: {} }): Promise<void> {\n return deleteWidget(this._client, id, options);\n }\n\n /** Analyze a widget. The only guarantee is that this method will return a string containing the results of the analysis. */\n analyzeWidget(\n id: string,\n options: AnalyzeWidgetOptions = { requestOptions: {} },\n ): Promise<AnalyzeResult> {\n return analyzeWidget(this._client, id, options);\n }\n}\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
3
|
+
*
|
|
4
|
+
* Any changes you make here may be lost.
|
|
5
|
+
*
|
|
6
|
+
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
7
|
+
*/
|
|
8
|
+
import type { ClientOptions } from "@azure-rest/core-client";
|
|
9
|
+
import type { TokenCredential } from "@azure/core-auth";
|
|
10
|
+
import type { WidgetServiceContext } from "../rest/index.js";
|
|
11
|
+
export { WidgetServiceContext } from "../rest/index.js";
|
|
12
|
+
export interface WidgetServiceClientOptions extends ClientOptions {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* This customization adds authentication to the client.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createWidgetService(endpoint: string, options?: ClientOptions): WidgetServiceContext;
|
|
18
|
+
export declare function createWidgetService(endpoint: string, credential: TokenCredential, options?: ClientOptions): WidgetServiceContext;
|
|
19
|
+
//# sourceMappingURL=WidgetServiceContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetServiceContext.d.ts","sourceRoot":"","sources":["../../../src/api/WidgetServiceContext.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAG7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,WAAW,0BAA2B,SAAQ,aAAa;CAAG;AAEpE;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,aAAa,GACtB,oBAAoB,CAAC;AACxB,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,eAAe,EAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,oBAAoB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
3
|
import { isTokenCredential } from "@azure/core-auth";
|
|
4
|
-
import getClient from "../rest/
|
|
4
|
+
import getClient from "../rest/widgetServiceClient.js";
|
|
5
5
|
export function createWidgetService(endpoint, credentialOrOptions, options = {}) {
|
|
6
6
|
const baseUrl = endpoint;
|
|
7
7
|
if (isTokenCredential(credentialOrOptions)) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WidgetServiceContext.js","sourceRoot":"","sources":["../../../src/api/WidgetServiceContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAYlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,SAAS,MAAM,gCAAgC,CAAC;AAkBvD,MAAM,UAAU,mBAAmB,CACjC,QAAgB,EAChB,mBAAqD,EACrD,UAAyB,EAAE;IAE3B,MAAM,OAAO,GAAG,QAAQ,CAAC;IACzB,IAAI,iBAAiB,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAC3C,OAAO,SAAS,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;SAAM,CAAC;QACN,OAAO,SAAS,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;IACjD,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { WidgetServiceContext } from \"../rest/index.js\";\nimport getClient from \"../rest/widgetServiceClient.js\";\n\nexport { WidgetServiceContext } from \"../rest/index.js\";\n\nexport interface WidgetServiceClientOptions extends ClientOptions {}\n\n/**\n * This customization adds authentication to the client.\n */\nexport function createWidgetService(\n endpoint: string,\n options?: ClientOptions,\n): WidgetServiceContext;\nexport function createWidgetService(\n endpoint: string,\n credential: TokenCredential,\n options?: ClientOptions,\n): WidgetServiceContext;\nexport function createWidgetService(\n endpoint: string,\n credentialOrOptions?: TokenCredential | ClientOptions,\n options: ClientOptions = {},\n): WidgetServiceContext {\n const baseUrl = endpoint;\n if (isTokenCredential(credentialOrOptions)) {\n return getClient(baseUrl, credentialOrOptions, options);\n } else {\n return getClient(baseUrl, credentialOrOptions);\n }\n}\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
3
|
+
*
|
|
4
|
+
* Any changes you make here may be lost.
|
|
5
|
+
*
|
|
6
|
+
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
7
|
+
*/
|
|
8
|
+
export declare function foo(): void;
|
|
9
|
+
//# sourceMappingURL=foo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foo.d.ts","sourceRoot":"","sources":["../../../src/api/foo.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,wBAAgB,GAAG,IAAI,IAAI,CAE1B"}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT
|
|
3
|
-
/**
|
|
4
|
-
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
5
|
-
*
|
|
6
|
-
* Any changes you make here may be lost.
|
|
7
|
-
*
|
|
8
|
-
* If you need to make changes, please do so in the original source file, \{project-root\}/sources/custom
|
|
9
|
-
*/
|
|
2
|
+
// Licensed under the MIT License.
|
|
10
3
|
/**
|
|
11
4
|
* THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!
|
|
12
5
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foo.js","sourceRoot":"","sources":["../../../src/api/foo.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;GAMG;AACH,MAAM,UAAU,GAAG;IACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACrB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * THIS IS AN AUTO-GENERATED FILE - DO NOT EDIT!\n *\n * Any changes you make here may be lost.\n *\n * If you need to make changes, please do so in the original source file, \\{project-root\\}/sources/custom\n */\nexport function foo(): void {\n console.log(\"foo\");\n}\n"]}
|