@azure/arm-datamigration 3.0.0-alpha.20221026.1 → 3.0.0-alpha.20221129.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/CHANGELOG.md +3 -13
  2. package/dist/index.js +629 -109
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/databaseMigrationsSqlMiCreateOrUpdateSample.js +2 -2
  7. package/dist-esm/samples-dev/databaseMigrationsSqlMiCreateOrUpdateSample.js.map +1 -1
  8. package/dist-esm/samples-dev/databaseMigrationsSqlVMCreateOrUpdateSample.js +2 -2
  9. package/dist-esm/samples-dev/databaseMigrationsSqlVMCreateOrUpdateSample.js.map +1 -1
  10. package/dist-esm/src/dataMigrationManagementClient.d.ts +2 -0
  11. package/dist-esm/src/dataMigrationManagementClient.d.ts.map +1 -1
  12. package/dist-esm/src/dataMigrationManagementClient.js +48 -17
  13. package/dist-esm/src/dataMigrationManagementClient.js.map +1 -1
  14. package/dist-esm/src/index.d.ts +1 -0
  15. package/dist-esm/src/index.d.ts.map +1 -1
  16. package/dist-esm/src/index.js +1 -0
  17. package/dist-esm/src/index.js.map +1 -1
  18. package/dist-esm/src/models/index.d.ts +556 -240
  19. package/dist-esm/src/models/index.d.ts.map +1 -1
  20. package/dist-esm/src/models/index.js +314 -0
  21. package/dist-esm/src/models/index.js.map +1 -1
  22. package/dist-esm/src/operations/files.d.ts.map +1 -1
  23. package/dist-esm/src/operations/files.js +19 -7
  24. package/dist-esm/src/operations/files.js.map +1 -1
  25. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  26. package/dist-esm/src/operations/operations.js +19 -7
  27. package/dist-esm/src/operations/operations.js.map +1 -1
  28. package/dist-esm/src/operations/projects.d.ts.map +1 -1
  29. package/dist-esm/src/operations/projects.js +19 -7
  30. package/dist-esm/src/operations/projects.js.map +1 -1
  31. package/dist-esm/src/operations/resourceSkus.d.ts.map +1 -1
  32. package/dist-esm/src/operations/resourceSkus.js +19 -7
  33. package/dist-esm/src/operations/resourceSkus.js.map +1 -1
  34. package/dist-esm/src/operations/serviceTasks.d.ts.map +1 -1
  35. package/dist-esm/src/operations/serviceTasks.js +19 -7
  36. package/dist-esm/src/operations/serviceTasks.js.map +1 -1
  37. package/dist-esm/src/operations/services.d.ts.map +1 -1
  38. package/dist-esm/src/operations/services.js +55 -21
  39. package/dist-esm/src/operations/services.js.map +1 -1
  40. package/dist-esm/src/operations/sqlMigrationServices.d.ts.map +1 -1
  41. package/dist-esm/src/operations/sqlMigrationServices.js +55 -21
  42. package/dist-esm/src/operations/sqlMigrationServices.js.map +1 -1
  43. package/dist-esm/src/operations/tasks.d.ts.map +1 -1
  44. package/dist-esm/src/operations/tasks.js +19 -7
  45. package/dist-esm/src/operations/tasks.js.map +1 -1
  46. package/dist-esm/src/operations/usages.d.ts.map +1 -1
  47. package/dist-esm/src/operations/usages.js +19 -7
  48. package/dist-esm/src/operations/usages.js.map +1 -1
  49. package/dist-esm/src/pagingHelper.d.ts +13 -0
  50. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  51. package/dist-esm/src/pagingHelper.js +32 -0
  52. package/dist-esm/src/pagingHelper.js.map +1 -0
  53. package/dist-esm/test/sampleTest.js +11 -13
  54. package/dist-esm/test/sampleTest.js.map +1 -1
  55. package/package.json +12 -8
  56. package/review/arm-datamigration.api.md +564 -872
  57. package/src/dataMigrationManagementClient.ts +59 -19
  58. package/src/index.ts +1 -0
  59. package/src/models/index.ts +646 -246
  60. package/src/operations/files.ts +22 -8
  61. package/src/operations/operations.ts +21 -8
  62. package/src/operations/projects.ts +21 -8
  63. package/src/operations/resourceSkus.ts +21 -8
  64. package/src/operations/serviceTasks.ts +21 -8
  65. package/src/operations/services.ts +67 -25
  66. package/src/operations/sqlMigrationServices.ts +71 -29
  67. package/src/operations/tasks.ts +22 -8
  68. package/src/operations/usages.ts +21 -8
  69. package/src/pagingHelper.ts +39 -0
  70. package/types/arm-datamigration.d.ts +567 -240
  71. package/types/tsdoc-metadata.json +1 -1
@@ -0,0 +1,13 @@
1
+ export interface PageInfo {
2
+ continuationToken?: string;
3
+ }
4
+ /**
5
+ * Given a result page from a pageable operation, returns a
6
+ * continuation token that can be used to begin paging from
7
+ * that point later.
8
+ * @param page A result object from calling .byPage() on a paged operation.
9
+ * @returns The continuation token that can be passed into byPage().
10
+ */
11
+ export declare function getContinuationToken(page: unknown): string | undefined;
12
+ export declare function setContinuationToken(page: unknown, continuationToken: string | undefined): void;
13
+ //# sourceMappingURL=pagingHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagingHelper.d.ts","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,QAAQ;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAID;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAKtE;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,EACb,iBAAiB,EAAE,MAAM,GAAG,SAAS,GACpC,IAAI,CAON"}
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ const pageMap = new WeakMap();
9
+ /**
10
+ * Given a result page from a pageable operation, returns a
11
+ * continuation token that can be used to begin paging from
12
+ * that point later.
13
+ * @param page A result object from calling .byPage() on a paged operation.
14
+ * @returns The continuation token that can be passed into byPage().
15
+ */
16
+ export function getContinuationToken(page) {
17
+ var _a;
18
+ if (typeof page !== "object" || page === null) {
19
+ return undefined;
20
+ }
21
+ return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
22
+ }
23
+ export function setContinuationToken(page, continuationToken) {
24
+ var _a;
25
+ if (typeof page !== "object" || page === null || !continuationToken) {
26
+ return;
27
+ }
28
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
29
+ pageInfo.continuationToken = continuationToken;
30
+ pageMap.set(page, pageInfo);
31
+ }
32
+ //# sourceMappingURL=pagingHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;QAC7C,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE;QACnE,OAAO;KACR;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC"}
@@ -6,24 +6,22 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
  import { __awaiter } from "tslib";
9
- import { record } from "@azure-tools/test-recorder";
10
- const recorderEnvSetup = {
11
- replaceableVariables: {
12
- AZURE_CLIENT_ID: "azure_client_id",
13
- AZURE_CLIENT_SECRET: "azure_client_secret",
14
- AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
15
- SUBSCRIPTION_ID: "azure_subscription_id"
16
- },
17
- customizationsOnRecordings: [
18
- (recording) => recording.replace(/"access_token":"[^"]*"/g, `"access_token":"access_token"`)
19
- ],
20
- queryParametersToSkip: []
9
+ import { Recorder } from "@azure-tools/test-recorder";
10
+ const replaceableVariables = {
11
+ AZURE_CLIENT_ID: "azure_client_id",
12
+ AZURE_CLIENT_SECRET: "azure_client_secret",
13
+ AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
14
+ SUBSCRIPTION_ID: "azure_subscription_id"
15
+ };
16
+ const recorderOptions = {
17
+ envSetupForPlayback: replaceableVariables
21
18
  };
22
19
  describe("My test", () => {
23
20
  let recorder;
24
21
  beforeEach(function () {
25
22
  return __awaiter(this, void 0, void 0, function* () {
26
- recorder = record(this, recorderEnvSetup);
23
+ recorder = new Recorder(this.currentTest);
24
+ yield recorder.start(recorderOptions);
27
25
  });
28
26
  });
29
27
  afterEach(function () {
@@ -1 +1 @@
1
- {"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EAEL,MAAM,EAGP,MAAM,4BAA4B,CAAC;AAGpC,MAAM,gBAAgB,GAA6B;IACjD,oBAAoB,EAAE;QACpB,eAAe,EAAE,iBAAiB;QAClC,mBAAmB,EAAE,qBAAqB;QAC1C,eAAe,EAAE,sCAAsC;QACvD,eAAe,EAAE,uBAAuB;KACzC;IACD,0BAA0B,EAAE;QAC1B,CAAC,SAAc,EAAO,EAAE,CACtB,SAAS,CAAC,OAAO,CACf,yBAAyB,EACzB,+BAA+B,CAChC;KACJ;IACD,qBAAqB,EAAE,EAAE;CAC1B,CAAC;AAEF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,IAAI,QAAkB,CAAC;IAEvB,UAAU,CAAC;;YACT,QAAQ,GAAG,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QAC5C,CAAC;KAAA,CAAC,CAAC;IAEH,SAAS,CAAC;;YACR,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,EAAE;;YAChB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;KAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,QAAQ,EAGT,MAAM,4BAA4B,CAAC;AAIpC,MAAM,oBAAoB,GAA2B;IACnD,eAAe,EAAE,iBAAiB;IAClC,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,sCAAsC;IACvD,eAAe,EAAE,uBAAuB;CACzC,CAAC;AAEF,MAAM,eAAe,GAAyB;IAC5C,mBAAmB,EAAE,oBAAoB;CAC1C,CAAC;AAEF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,IAAI,QAAkB,CAAC;IAEvB,UAAU,CAAC;;YACT,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC1C,MAAM,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QACxC,CAAC;KAAA,CAAC,CAAC;IAEH,SAAS,CAAC;;YACR,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,EAAE;;YAChB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;KAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "sdk-type": "mgmt",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "A generated SDK for DataMigrationManagementClient.",
6
- "version": "3.0.0-alpha.20221026.1",
6
+ "version": "3.0.0-alpha.20221129.1",
7
7
  "engines": {
8
8
  "node": ">=14.0.0"
9
9
  },
@@ -11,7 +11,7 @@
11
11
  "@azure/core-lro": "^2.2.0",
12
12
  "@azure/abort-controller": "^1.0.0",
13
13
  "@azure/core-paging": "^1.2.0",
14
- "@azure/core-client": "^1.5.0",
14
+ "@azure/core-client": "^1.6.1",
15
15
  "@azure/core-auth": "^1.3.0",
16
16
  "@azure/core-rest-pipeline": "^1.8.0",
17
17
  "tslib": "^2.2.0"
@@ -36,13 +36,18 @@
36
36
  "mkdirp": "^1.0.4",
37
37
  "rollup": "^2.66.1",
38
38
  "rollup-plugin-sourcemaps": "^0.6.3",
39
- "typescript": "~4.2.0",
39
+ "typescript": "~4.8.0",
40
40
  "uglify-js": "^3.4.9",
41
41
  "rimraf": "^3.0.0",
42
42
  "@azure/identity": "^2.0.1",
43
- "@azure-tools/test-recorder": "^1.0.0",
43
+ "@azure-tools/test-recorder": "^2.0.0",
44
+ "@azure-tools/test-credential": ">=1.0.0-alpha <1.0.0-alphb",
44
45
  "mocha": "^7.1.1",
45
- "cross-env": "^7.0.2"
46
+ "@types/chai": "^4.2.8",
47
+ "chai": "^4.2.0",
48
+ "cross-env": "^7.0.2",
49
+ "@types/node": "^14.0.0",
50
+ "@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb"
46
51
  },
47
52
  "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/datamigration/arm-datamigration",
48
53
  "repository": {
@@ -93,9 +98,8 @@
93
98
  "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
94
99
  "unit-test:browser": "echo skipped",
95
100
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
96
- "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
97
- "integration-test:browser": "echo skipped",
98
- "docs": "echo skipped"
101
+ "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
102
+ "integration-test:browser": "echo skipped"
99
103
  },
100
104
  "sideEffects": false,
101
105
  "//metadata": {