@shapediver/sdk.geometry-api-sdk-v2 1.0.19 → 1.0.20
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 +12 -15
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
<p
|
|
1
|
+
<p align="center">
|
|
2
2
|
<a href="https://www.shapediver.com/">
|
|
3
|
-
<img
|
|
4
|
-
alt="ShapeDiver"
|
|
5
|
-
src="https://sduse1-assets.shapediver.com/production/assets/img/navbar_logo.png"
|
|
6
|
-
width="392"
|
|
7
|
-
/>
|
|
3
|
+
<img src="https://sduse1-assets.shapediver.com/production/assets/img/navbar_logo.png" alt="ShapeDiver" width="392" />
|
|
8
4
|
</a>
|
|
9
5
|
</p>
|
|
10
6
|
|
|
@@ -14,11 +10,12 @@
|
|
|
14
10
|
Using the **ShapeDiver Geometry Backend API** allows accessing ShapeDiver models without using the **ShapeDiver Viewer**.
|
|
15
11
|
The SDKs provide the functionality to communicate with a specific version of our Geometry Backend API, and they expose all TypeScript-types describing request and response objects.
|
|
16
12
|
|
|
17
|
-
This SDK provides functionality to communicate with the **ShapeDiver Geometry Backend API v2** and exposes all TypeScript-types describing request and response objects.
|
|
13
|
+
This SDK provides functionality to communicate with the **ShapeDiver Geometry Backend API v2** and exposes all TypeScript-types describing request and response objects.
|
|
14
|
+
See the [API documentation](https://sdeuc1.eu-central-1.shapediver.com/api/v2/docs/) for more details.
|
|
18
15
|
|
|
19
16
|
## Authentication
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
The authentication system for the Geometry Backend API is based on **ticket objects** and **JWT tokens**, which are handled by the [ShapeDiver Platform](https://www.shapediver.com/app/).
|
|
18
|
+
You can obtain **tickets** and **JWT tokens** by
|
|
22
19
|
|
|
23
20
|
* using your account on the [ShapeDiver Platform](https://www.shapediver.com/app/) (tickets only), or
|
|
24
21
|
* you can obtain them programmatically using the [ShapeDiver Platform API](https://app.shapediver.com/api/documentation) (both tickets and JWT tokens).
|
|
@@ -31,8 +28,8 @@ When obtaining a ticket for your model from the ShapeDiver Platform, please be a
|
|
|
31
28
|
* _ticket for backend access_ in case you are accessing the Geometry Backend API from an arbitrary client application that is not a web browser.
|
|
32
29
|
|
|
33
30
|
## Base URL
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
The base URL to use depends on which ShapeDiver Geometry Backend System your model was uploaded to.
|
|
32
|
+
You can find the base URL in your model's dashboard on the ShapeDiver Platform, it is also called the _model view url_.
|
|
36
33
|
|
|
37
34
|
## Usage - Ticket only
|
|
38
35
|
|
|
@@ -53,8 +50,8 @@ import { create } from "@shapediver/sdk.geometry-api-sdk-v2"
|
|
|
53
50
|
```
|
|
54
51
|
|
|
55
52
|
## Usage - Ticket and JWT
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
It is possible to configure your ShapeDiver models such that JWT tokens are required to communicate with them, which provides a strong authorisation mechanism.
|
|
54
|
+
In this case you will need to use the [ShapeDiver Platform API](https://app.shapediver.com/api/documentation) to obtain a JWT token for your model on demand.
|
|
58
55
|
|
|
59
56
|
```
|
|
60
57
|
import { create } from "@shapediver/sdk.geometry-api-sdk-v2"
|
|
@@ -74,10 +71,10 @@ import { create } from "@shapediver/sdk.geometry-api-sdk-v2"
|
|
|
74
71
|
```
|
|
75
72
|
|
|
76
73
|
## Examples
|
|
77
|
-
|
|
78
74
|
Some practical use cases, we will regularly extend the list:
|
|
79
75
|
|
|
80
|
-
* [A Twitter Bot calling a ShapeDiver Model](https://github.com/shapediver/ServerlessExample-TwitterBot):
|
|
76
|
+
* [A Twitter Bot calling a ShapeDiver Model](https://github.com/shapediver/ServerlessExample-TwitterBot):
|
|
77
|
+
This example shows how to run computations using a ShapeDiver Model which has image and data inputs and outputs.
|
|
81
78
|
|
|
82
79
|
## Support
|
|
83
80
|
If you have questions, please use the [ShapeDiver Help Center](https://help.shapediver.com/).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapediver/sdk.geometry-api-sdk-v2",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"description": "SDK to communicate with the Geometry API version 2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shapediver",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
]
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"jest": "^
|
|
46
|
+
"jest": "^28.0.3",
|
|
47
47
|
"lerna": "3.22.1",
|
|
48
|
-
"typescript": "^4.6.
|
|
48
|
+
"typescript": "^4.6.4",
|
|
49
49
|
"webpack": "^5.72.0",
|
|
50
50
|
"webpack-cli": "^4.9.2",
|
|
51
|
-
"webpack-dev-server": "^4.
|
|
51
|
+
"webpack-dev-server": "^4.9.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@shapediver/sdk.geometry-api-sdk-core": "^1.0.
|
|
54
|
+
"@shapediver/sdk.geometry-api-sdk-core": "^1.0.11",
|
|
55
55
|
"@shapediver/api.geometry-api-dto-v2": "^1.1.9"
|
|
56
56
|
}
|
|
57
57
|
}
|