@sparkrewards/sra-client 0.0.1 → 0.0.3
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 +41 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
## @sparkrewards/app-api-sdk
|
|
2
|
+
|
|
3
|
+
TypeScript / JavaScript client SDK for the Spark Rewards App API, generated from the Smithy service model.
|
|
4
|
+
|
|
5
|
+
### Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @sparkrewards/app-api-sdk
|
|
9
|
+
# or
|
|
10
|
+
yarn add @sparkrewards/app-api-sdk
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Basic usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { AppAPIClient, PlanCommand } from "@sparkrewards/app-api-sdk";
|
|
17
|
+
|
|
18
|
+
const client = new AppAPIClient({
|
|
19
|
+
region: "us-east-1",
|
|
20
|
+
// endpoint, credentials, etc as needed
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
async function getPlan(orgId: string) {
|
|
24
|
+
const result = await client.send(new PlanCommand({ org_id: orgId }));
|
|
25
|
+
console.log(result);
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Regenerating from the Smithy model
|
|
30
|
+
|
|
31
|
+
This package is generated by the `typescript-client-codegen` Smithy plugin. To regenerate it:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
./gradlew :smithy:smithyBuild
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The generated package lives under:
|
|
38
|
+
|
|
39
|
+
- `smithy/build/smithyprojections/smithy/source/typescript-client-codegen`
|
|
40
|
+
|
|
41
|
+
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sparkrewards/sra-client",
|
|
3
3
|
"description": "@sparkrewards/sra-client client",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|