@coherentglobal/spark-execute-sdk 0.4.5 → 0.4.9

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 CHANGED
@@ -7,13 +7,6 @@
7
7
 
8
8
  A Software Development Kit (SDK) that can run either [Spark](https://coherent.global/spark/) model web-assembly or Calling an HTTPS endpoint.
9
9
 
10
-
11
- # Roadmap
12
-
13
- - Calling an HTTPS endpoint on Spark SaaS.
14
-
15
-
16
-
17
10
  # How to's
18
11
 
19
12
  ## Installation
@@ -32,12 +25,14 @@ yarn add @coherentglobal/spark-execute-sdk
32
25
 
33
26
  ### Configuration
34
27
 
28
+ #### Both Online and Offline Config is enabled
29
+
35
30
  ```js
36
31
  const config = {
37
32
  sparkEndpoint: {
38
- url: "https://excel.dev.coherent.global", // Spark Endpoint to be used on Fallback
33
+ url: "https://excel.dev.coherent.global", // Spark Endpoint to be used to run model using Spark SaaS
39
34
  tenant: "tenant", // Spark tenant name
40
- authType: public | syntheticKey | bearerToken,
35
+ authType: public | syntheticKey | bearerToken, // public endpoint don't require token / synthetic key
41
36
  // If syntheticKey
42
37
  syntheticKey: "apiKey" or generateSyntheticKey(), // value or a func - func call every time making API call, user will do cache
43
38
  // If bearerToken
@@ -56,6 +51,40 @@ const config = {
56
51
  }
57
52
  ```
58
53
 
54
+ #### Online Only Configuration
55
+
56
+ ```js
57
+ const config = {
58
+ sparkEndpoint: {
59
+ url: "https://excel.dev.coherent.global", // Spark Endpoint to be used to run model using Spark SaaS
60
+ tenant: "tenant", // Spark tenant name
61
+ authType: public | syntheticKey | bearerToken, // public endpoint don't require token / synthetic key
62
+ // If syntheticKey
63
+ syntheticKey: "apiKey" || generateSyntheticKey(), // value or a func - func call every time making API call, user will do cache
64
+ // If bearerToken
65
+ bearerToken: "token" || generateToken(), //a func - func call every time making API call, user will do cache
66
+ },
67
+ nodegenModels: [],
68
+ };
69
+ ```
70
+
71
+ #### Offline Only Configuration
72
+
73
+ ```js
74
+ const config = {
75
+ nodegenModels: [
76
+ {
77
+ versionId: "uuid",
78
+ type: "base64",
79
+ binary: Blob | Base64 | BinaryUnit | Func(versionId), // a binary zipped file or a function the will get the zipped file
80
+ metadata: {
81
+ // Spark Model Metadata
82
+ },
83
+ },
84
+ ],
85
+ };
86
+ ```
87
+
59
88
  ## Methods
60
89
 
61
90
  ### Initialize Spark Execute SDK