@azure/digital-twins-core 1.1.1-alpha.20221107.1 → 2.0.0-alpha.20230111.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/README.md +7 -7
- package/dist/index.js +575 -610
- package/dist/index.js.map +1 -1
- package/dist-esm/src/constants.js +1 -1
- package/dist-esm/src/constants.js.map +1 -1
- package/dist-esm/src/digitalTwinsClient.js +69 -364
- package/dist-esm/src/digitalTwinsClient.js.map +1 -1
- package/dist-esm/src/generated/azureDigitalTwinsAPI.js +52 -13
- package/dist-esm/src/generated/azureDigitalTwinsAPI.js.map +1 -1
- package/dist-esm/src/generated/index.js +13 -0
- package/dist-esm/src/generated/index.js.map +1 -0
- package/dist-esm/src/generated/models/index.js.map +1 -1
- package/dist-esm/src/generated/models/mappers.js +35 -7
- package/dist-esm/src/generated/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/models/parameters.js +45 -30
- package/dist-esm/src/generated/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/operations/digitalTwinModels.js +87 -47
- package/dist-esm/src/generated/operations/digitalTwinModels.js.map +1 -1
- package/dist-esm/src/generated/operations/digitalTwins.js +190 -80
- package/dist-esm/src/generated/operations/digitalTwins.js.map +1 -1
- package/dist-esm/src/generated/operations/eventRoutes.js +79 -35
- package/dist-esm/src/generated/operations/eventRoutes.js.map +1 -1
- package/dist-esm/src/generated/operations/query.js +10 -12
- package/dist-esm/src/generated/operations/query.js.map +1 -1
- package/dist-esm/src/generated/operationsInterfaces/digitalTwinModels.js +9 -0
- package/dist-esm/src/generated/operationsInterfaces/digitalTwinModels.js.map +1 -0
- package/dist-esm/src/generated/operationsInterfaces/digitalTwins.js +9 -0
- package/dist-esm/src/generated/operationsInterfaces/digitalTwins.js.map +1 -0
- package/dist-esm/src/generated/operationsInterfaces/eventRoutes.js +9 -0
- package/dist-esm/src/generated/operationsInterfaces/eventRoutes.js.map +1 -0
- package/dist-esm/src/generated/operationsInterfaces/index.js +12 -0
- package/dist-esm/src/generated/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/generated/operationsInterfaces/query.js +9 -0
- package/dist-esm/src/generated/operationsInterfaces/query.js.map +1 -0
- package/dist-esm/src/generated/pagingHelper.js +32 -0
- package/dist-esm/src/generated/pagingHelper.js.map +1 -0
- package/dist-esm/src/index.js +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/package.json +12 -10
- package/types/digital-twins-core.d.ts +196 -693
- package/dist-esm/src/generated/azureDigitalTwinsAPIContext.js +0 -35
- package/dist-esm/src/generated/azureDigitalTwinsAPIContext.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventRoutes.js","sourceRoot":"","sources":["../../../../src/generated/operationsInterfaces/eventRoutes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport {\n EventRoute,\n EventRoutesListOptionalParams,\n EventRoutesGetByIdOptionalParams,\n EventRoutesGetByIdResponse,\n EventRoutesAddOptionalParams,\n EventRoutesDeleteOptionalParams\n} from \"../models\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Interface representing a EventRoutes. */\nexport interface EventRoutes {\n /**\n * Retrieves all event routes.\n * Status codes:\n * * 200 OK\n * @param options The options parameters.\n */\n list(\n options?: EventRoutesListOptionalParams\n ): PagedAsyncIterableIterator<EventRoute>;\n /**\n * Retrieves an event route.\n * Status codes:\n * * 200 OK\n * * 404 Not Found\n * * EventRouteNotFound - The event route was not found.\n * @param id The id for an event route. The id is unique within event routes and case sensitive.\n * @param options The options parameters.\n */\n getById(\n id: string,\n options?: EventRoutesGetByIdOptionalParams\n ): Promise<EventRoutesGetByIdResponse>;\n /**\n * Adds or replaces an event route.\n * Status codes:\n * * 204 No Content\n * * 400 Bad Request\n * * EventRouteEndpointInvalid - The endpoint provided does not exist or is not active.\n * * EventRouteFilterInvalid - The event route filter is invalid.\n * * EventRouteIdInvalid - The event route id is invalid.\n * * LimitExceeded - The maximum number of event routes allowed has been reached.\n * @param id The id for an event route. The id is unique within event routes and case sensitive.\n * @param options The options parameters.\n */\n add(id: string, options?: EventRoutesAddOptionalParams): Promise<void>;\n /**\n * Deletes an event route.\n * Status codes:\n * * 204 No Content\n * * 404 Not Found\n * * EventRouteNotFound - The event route was not found.\n * @param id The id for an event route. The id is unique within event routes and case sensitive.\n * @param options The options parameters.\n */\n delete(id: string, options?: EventRoutesDeleteOptionalParams): Promise<void>;\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
export * from "./digitalTwinModels";
|
|
9
|
+
export * from "./query";
|
|
10
|
+
export * from "./digitalTwins";
|
|
11
|
+
export * from "./eventRoutes";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/operationsInterfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./digitalTwinModels\";\nexport * from \"./query\";\nexport * from \"./digitalTwins\";\nexport * from \"./eventRoutes\";\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/generated/operationsInterfaces/query.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n QuerySpecification,\n QueryQueryTwinsOptionalParams,\n QueryQueryTwinsResponse\n} from \"../models\";\n\n/** Interface representing a Query. */\nexport interface Query {\n /**\n * Executes a query that allows traversing relationships and filtering by property values.\n * Status codes:\n * * 200 OK\n * * 400 Bad Request\n * * BadRequest - The continuation token is invalid.\n * * SqlQueryError - The query contains some errors.\n * * TimeoutError - The query execution timed out after 60 seconds. Try simplifying the query or\n * adding conditions to reduce the result size.\n * * 429 Too Many Requests\n * * QuotaReachedError - The maximum query rate limit has been reached.\n * @param querySpecification The query specification to execute.\n * @param options The options parameters.\n */\n queryTwins(\n querySpecification: QuerySpecification,\n options?: QueryQueryTwinsOptionalParams\n ): Promise<QueryQueryTwinsResponse>;\n}\n"]}
|
|
@@ -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 the last `.value` produced by the `byPage` iterator,
|
|
11
|
+
* returns a continuation token that can be used to begin paging from
|
|
12
|
+
* that point later.
|
|
13
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
14
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
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/generated/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","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
|
package/dist-esm/src/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,kBAAkB,GAQnB,MAAM,sBAAsB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport {\n DigitalTwinsClient,\n DigitalTwinsClientOptions,\n GetModelOptions,\n ListEventRoutesOptions,\n ListModelsOptions,\n QueryTwinsOptions,\n ListIncomingRelationshipsOptions,\n ListRelationshipsOptions,\n} from \"./digitalTwinsClient\";\n\nexport {\n DigitalTwinsAddOptionalParams,\n DigitalTwinsAddHeaders,\n DigitalTwinsAddResponse,\n DigitalTwinsGetByIdResponse,\n DigitalTwinsUpdateOptionalParams,\n DigitalTwinsUpdateHeaders,\n DigitalTwinsDeleteOptionalParams,\n DigitalTwinsGetByIdHeaders,\n DigitalTwinsAddRelationshipOptionalParams,\n DigitalTwinsAddRelationshipHeaders,\n DigitalTwinsAddRelationshipResponse,\n DigitalTwinsUpdateRelationshipOptionalParams,\n DigitalTwinsUpdateRelationshipResponse,\n DigitalTwinsUpdateRelationshipHeaders,\n DigitalTwinsDeleteRelationshipOptionalParams,\n DigitalTwinsListRelationshipsResponse,\n RelationshipCollection,\n DigitalTwinsListIncomingRelationshipsResponse,\n IncomingRelationship,\n IncomingRelationshipCollection,\n DigitalTwinsGetRelationshipByIdHeaders,\n DigitalTwinsGetRelationshipByIdResponse,\n DigitalTwinsUpdateComponentOptionalParams,\n DigitalTwinsUpdateComponentHeaders,\n DigitalTwinsGetComponentHeaders,\n DigitalTwinsUpdateComponentResponse,\n DigitalTwinsGetComponentResponse,\n DigitalTwinModelsGetByIdResponse,\n DigitalTwinModelsListResponse,\n DigitalTwinModelsAddResponse,\n DigitalTwinsUpdateResponse,\n EventRoute,\n EventRouteCollection,\n EventRoutesGetByIdResponse,\n EventRoutesListNextResponse,\n DigitalTwinsModelData,\n QueryQueryTwinsHeaders,\n QueryQueryTwinsResponse,\n QueryResult,\n QuerySpecification,\n PagedDigitalTwinsModelDataCollection,\n} from \"./generated/models\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/digital-twins-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.20230111.2",
|
|
4
4
|
"description": "An isomorphic client library for Azure Digital Twins",
|
|
5
5
|
"sdk-type": "client",
|
|
6
6
|
"author": "Microsoft Corporation",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"execute:samples": "dev-tool samples run samples-dev",
|
|
28
28
|
"extract-api": "tsc -p . && api-extractor run --local",
|
|
29
29
|
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
|
|
30
|
-
"integration-test:browser": "
|
|
31
|
-
"integration-test:node": "
|
|
30
|
+
"integration-test:browser": "dev-tool run test:browser",
|
|
31
|
+
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
|
|
32
32
|
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
|
33
33
|
"lint:fix": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js --fix --fix-type [problem,suggestion]",
|
|
34
34
|
"lint": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"test:node": "npm run clean && npm run build:test:node && npm run unit-test:node",
|
|
37
37
|
"test:browser": "npm run clean && npm run build:test:browser && npm run unit-test:browser",
|
|
38
38
|
"test": "npm run clean && npm run build:test && npm run unit-test",
|
|
39
|
-
"unit-test:browser": "
|
|
40
|
-
"unit-test:node": "
|
|
39
|
+
"unit-test:browser": "dev-tool run test:browser",
|
|
40
|
+
"unit-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 --exclude 'test/**/browser/*.spec.ts' 'test/**/*.spec.ts'",
|
|
41
41
|
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
|
|
42
42
|
},
|
|
43
43
|
"files": [
|
|
@@ -64,18 +64,22 @@
|
|
|
64
64
|
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@azure/core-
|
|
67
|
+
"@azure/core-auth": "^1.3.0",
|
|
68
|
+
"@azure/core-client": ">=1.7.1-alpha <1.7.1-alphb",
|
|
69
|
+
"@azure/core-rest-pipeline": "^1.8.0",
|
|
68
70
|
"@azure/core-paging": "^1.1.1",
|
|
69
71
|
"@azure/core-tracing": "^1.0.0",
|
|
72
|
+
"@azure/core-util": "^1.0.0",
|
|
70
73
|
"@azure/logger": "^1.0.0",
|
|
71
|
-
"tslib": "^2.2.0"
|
|
74
|
+
"tslib": "^2.2.0",
|
|
75
|
+
"uuid": "^8.3.0"
|
|
72
76
|
},
|
|
73
77
|
"devDependencies": {
|
|
74
78
|
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
|
|
75
79
|
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
|
|
76
80
|
"@azure/identity": "^2.0.1",
|
|
77
81
|
"@azure-tools/test-credential": ">=1.0.0-alpha <1.0.0-alphb",
|
|
78
|
-
"@azure-tools/test-recorder": "^
|
|
82
|
+
"@azure-tools/test-recorder": "^2.0.0",
|
|
79
83
|
"@microsoft/api-extractor": "^7.31.1",
|
|
80
84
|
"@types/chai": "^4.1.6",
|
|
81
85
|
"@types/mocha": "^7.0.2",
|
|
@@ -93,8 +97,6 @@
|
|
|
93
97
|
"karma-env-preprocessor": "^0.1.1",
|
|
94
98
|
"karma-firefox-launcher": "^1.1.0",
|
|
95
99
|
"karma-ie-launcher": "^1.0.0",
|
|
96
|
-
"karma-json-preprocessor": "^0.3.3",
|
|
97
|
-
"karma-json-to-file-reporter": "^1.0.1",
|
|
98
100
|
"karma-junit-reporter": "^2.0.1",
|
|
99
101
|
"karma-mocha": "^2.0.1",
|
|
100
102
|
"karma-mocha-reporter": "^2.2.5",
|