@cinerino/sdk 3.35.0 → 3.36.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.
@@ -8344,7 +8344,7 @@ var PersonService = /** @class */ (function (_super) {
8344
8344
  uri: "/people/" + id,
8345
8345
  method: 'GET',
8346
8346
  expectedStatusCodes: [http_status_1.OK],
8347
- qs: { iss: params.iss }
8347
+ qs: { iss: params.iss, replaceNewUserPool: params.replaceNewUserPool }
8348
8348
  })
8349
8349
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
8350
8350
  return [2 /*return*/, response.json()];
@@ -0,0 +1,33 @@
1
+ // tslint:disable:no-implicit-dependencies no-console no-magic-numbers
2
+ import * as client from '../../../lib/';
3
+
4
+ const project = { id: process.env.PROJECT_ID };
5
+
6
+ async function main() {
7
+ const authClient = new client.auth.ClientCredentials({
8
+ domain: <string>process.env.CHEVRE_AUTHORIZE_SERVER_DOMAIN,
9
+ clientId: <string>process.env.CHEVRE_CLIENT_ID,
10
+ clientSecret: <string>process.env.CHEVRE_CLIENT_SECRET,
11
+ scopes: [],
12
+ state: ''
13
+ });
14
+
15
+ const personService = new client.chevre.service.Person({
16
+ endpoint: <string>process.env.CHEVRE_ENDPOINT,
17
+ auth: authClient,
18
+ project
19
+ });
20
+
21
+ const data = await personService.findById({
22
+ iss: '',
23
+ id: '708b007c-79e2-4a3f-8f7a-4bcfc56f4583',
24
+ replaceNewUserPool: '1'
25
+ });
26
+ console.log(data);
27
+ }
28
+
29
+ main()
30
+ .then(() => {
31
+ console.log('main processed.');
32
+ })
33
+ .catch(console.error);
@@ -31,6 +31,19 @@ async function main() {
31
31
  console.log(result);
32
32
  console.log(result.map((o: any) => o.typeOfGood));
33
33
  console.log(result.map((o: any) => o.typeOfGood.reservationFor.superEvent));
34
+
35
+ if (result.length > 0) {
36
+ // 所有権削除
37
+ // const reservationOwnershipInfo = result[result.length - 1];
38
+ // console.log('deleting...', reservationOwnershipInfo.id);
39
+ // await personService.fetch({
40
+ // uri: `/people/me/ownershipInfos/${reservationOwnershipInfo.id}`,
41
+ // method: 'DELETE',
42
+ // expectedStatusCodes: [httpStatus.NO_CONTENT]
43
+ // });
44
+ // console.log('deleted', reservationOwnershipInfo.id);
45
+
46
+ }
34
47
  }
35
48
 
36
49
  main()
@@ -0,0 +1,45 @@
1
+ // tslint:disable:no-console no-implicit-dependencies no-magic-numbers
2
+ import * as httpStatus from 'http-status';
3
+
4
+ import * as client from '../../../lib/index';
5
+
6
+ const auth = new client.auth.ClientCredentials({
7
+ domain: <string>process.env.ST_AUTHORIZE_SERVER_DOMAIN,
8
+ clientId: <string>process.env.ST_CLIENT_ID,
9
+ clientSecret: <string>process.env.ST_CLIENT_SECRET,
10
+ scopes: [],
11
+ state: 'teststate'
12
+ });
13
+
14
+ const sellerService = new client.service.Seller({
15
+ endpoint: <string>process.env.ST_API_ENDPOINT,
16
+ auth: auth
17
+ });
18
+
19
+ // tslint:disable-next-line:max-func-body-length
20
+ async function main() {
21
+ console.log('ルームを検索しています...');
22
+ const searchResult = await sellerService.fetch({
23
+ uri: '/places/ScreeningRoom',
24
+ method: 'GET',
25
+ qs: {
26
+ limit: 100
27
+ },
28
+ expectedStatusCodes: [httpStatus.OK]
29
+ })
30
+ .then(async (response) => {
31
+ return {
32
+ data: await response.json()
33
+ };
34
+ });
35
+ console.log(searchResult.data);
36
+ console.log(searchResult.data.length);
37
+ }
38
+
39
+ main()
40
+ .then(() => {
41
+ console.log('main processed.');
42
+ })
43
+ .catch((err) => {
44
+ console.error(err);
45
+ });
package/lib/bundle.js CHANGED
@@ -8344,7 +8344,7 @@ var PersonService = /** @class */ (function (_super) {
8344
8344
  uri: "/people/" + id,
8345
8345
  method: 'GET',
8346
8346
  expectedStatusCodes: [http_status_1.OK],
8347
- qs: { iss: params.iss }
8347
+ qs: { iss: params.iss, replaceNewUserPool: params.replaceNewUserPool }
8348
8348
  })
8349
8349
  .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
8350
8350
  return [2 /*return*/, response.json()];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "3.35.0",
3
+ "version": "3.36.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.35.0",
100
+ "@cinerino/api-abstract-client": "3.36.0",
101
101
  "debug": "^3.2.6",
102
102
  "http-status": "^1.4.2",
103
103
  "idtoken-verifier": "^2.0.3",