@cinerino/sdk 3.52.0 → 3.53.0
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.
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
/**
|
|
3
|
+
* 注文オファー検索
|
|
4
|
+
*/
|
|
5
|
+
// tslint:disable-next-line:no-implicit-dependencies
|
|
6
|
+
import * as client from '../../lib/index';
|
|
7
|
+
import * as auth from './auth/authAsAdmin';
|
|
8
|
+
|
|
9
|
+
async function main() {
|
|
10
|
+
const authClient = await auth.login();
|
|
11
|
+
await authClient.refreshAccessToken();
|
|
12
|
+
const loginTicket = authClient.verifyIdToken({});
|
|
13
|
+
console.log('username is', loginTicket.getUsername());
|
|
14
|
+
|
|
15
|
+
const orderService = new client.service.Order({
|
|
16
|
+
endpoint: <string>process.env.API_ENDPOINT,
|
|
17
|
+
auth: authClient,
|
|
18
|
+
project: { id: 'cinerino' }
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const acceptedOffers = await orderService.searchAcceptedOffersByOrderNumber(
|
|
22
|
+
{
|
|
23
|
+
orderNumber: 'xxx'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
limit: 10,
|
|
27
|
+
page: 1
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
console.log(acceptedOffers);
|
|
31
|
+
console.log(acceptedOffers.length, 'acceptedOffers found');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
main()
|
|
35
|
+
.then(() => {
|
|
36
|
+
console.log('success!');
|
|
37
|
+
})
|
|
38
|
+
.catch(console.error);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cinerino/sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.53.0",
|
|
4
4
|
"description": "Cinerino SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"browser": {
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"watchify": "^3.11.1"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
|
-
"@cinerino/api-abstract-client": "3.
|
|
100
|
+
"@cinerino/api-abstract-client": "3.53.0",
|
|
101
101
|
"debug": "^3.2.6",
|
|
102
102
|
"http-status": "^1.4.2",
|
|
103
103
|
"idtoken-verifier": "^2.0.3",
|