@cinerino/sdk 12.6.0-alpha.4 → 12.6.0-alpha.5

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.
@@ -72,22 +72,6 @@ export declare class EventService extends Service {
72
72
  * max: 10
73
73
  */
74
74
  params: IUpdateEventSellerMakesOfferParamsByIdentifier[]): Promise<void>;
75
- /**
76
- * イベント冪等複数作成
77
- * 特定の追加特性をキーにして、存在しなければ作成する
78
- * 存在すれば、一部属性を更新する(eventStatus,superEvent,offers.seller.makesOffer)
79
- */
80
- upsertManyByAdditionalProperty(params: factory.event.screeningEvent.ICreateParams[], options: {
81
- filter: {
82
- /**
83
- * キーにする追加特性name
84
- */
85
- name: string;
86
- };
87
- update: boolean;
88
- superEventId: string;
89
- locationBranchCode: string;
90
- }): Promise<void>;
91
75
  /**
92
76
  * イベント部分更新
93
77
  */
@@ -53,7 +53,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
53
53
  Object.defineProperty(exports, "__esModule", { value: true });
54
54
  exports.EventService = void 0;
55
55
  var http_status_1 = require("http-status");
56
- var factory = require("../factory");
57
56
  var service_1 = require("../service");
58
57
  /**
59
58
  * イベントサービス
@@ -153,48 +152,6 @@ var EventService = /** @class */ (function (_super) {
153
152
  });
154
153
  });
155
154
  };
156
- /**
157
- * イベント冪等複数作成
158
- * 特定の追加特性をキーにして、存在しなければ作成する
159
- * 存在すれば、一部属性を更新する(eventStatus,superEvent,offers.seller.makesOffer)
160
- */
161
- EventService.prototype.upsertManyByAdditionalProperty = function (params, options) {
162
- return __awaiter(this, void 0, void 0, function () {
163
- var superEventId, locationBranchCode;
164
- return __generator(this, function (_a) {
165
- switch (_a.label) {
166
- case 0:
167
- if (!Array.isArray(params) || params.length === 0) {
168
- throw new factory.errors.ArgumentNull('body');
169
- }
170
- superEventId = options.superEventId;
171
- locationBranchCode = options.locationBranchCode;
172
- if (typeof superEventId !== 'string' || superEventId === '') {
173
- throw new factory.errors.ArgumentNull('superEventId');
174
- }
175
- if (typeof locationBranchCode !== 'string' || locationBranchCode === '') {
176
- throw new factory.errors.ArgumentNull('locationBranchCode');
177
- }
178
- return [4 /*yield*/, this.fetch({
179
- uri: '/events',
180
- method: 'PUT',
181
- body: params,
182
- qs: {
183
- filter: options.filter,
184
- update: options.update === true,
185
- typeOf: factory.eventType.ScreeningEvent,
186
- superEventId: superEventId,
187
- locationBranchCode: locationBranchCode // add query(2025-08-27~)
188
- },
189
- expectedStatusCodes: [http_status_1.NO_CONTENT]
190
- })];
191
- case 1:
192
- _a.sent();
193
- return [2 /*return*/];
194
- }
195
- });
196
- });
197
- };
198
155
  /**
199
156
  * イベント部分更新
200
157
  */
@@ -8,6 +8,10 @@ declare type IProjection = {
8
8
  declare type IUnset = {
9
9
  [key in keyof factory.event.screeningEvent.IEvent]?: 1;
10
10
  };
11
+ declare type IUpdateEventByIdAttributes = Pick<factory.event.screeningEvent.IUpdateParams, 'additionalProperty' | 'doorTime' | 'endDate' | 'eventStatus' | 'location' | 'maximumPhysicalAttendeeCapacity' | 'offers' | 'startDate'> & {
12
+ offers: Pick<factory.event.screeningEvent.IOffers4create, 'eligibleQuantity' | 'identifier' | 'itemOffered' | 'seller' | 'unacceptedPaymentMethod'> & {};
13
+ $unset?: IUnset;
14
+ };
11
15
  /**
12
16
  * イベントサービス
13
17
  */
@@ -39,9 +43,7 @@ export declare class EventService extends Service {
39
43
  */
40
44
  updateEventById(params: {
41
45
  id: string;
42
- attributes: factory.event.screeningEvent.IUpdateParams & {
43
- $unset?: IUnset;
44
- };
46
+ attributes: IUpdateEventByIdAttributes;
45
47
  options: {
46
48
  disableOverwriteMakesOffer: boolean;
47
49
  };
@@ -4,22 +4,6 @@ import { ICreateParamsByIdentifier, IUpdateEventSellerMakesOfferParamsByIdentifi
4
4
  declare type ISendEmailMessageOnEventUpdated = Pick<factory.action.transfer.send.message.email.IAttributes, 'purpose' | 'recipient'> & {
5
5
  object: factory.action.transfer.send.message.email.IObjectAsEmailMessage;
6
6
  };
7
- declare type ICreateScreeningEventParams = Omit<factory.event.screeningEvent.ICreateParams, 'location' | 'superEvent'> & {
8
- typeOf?: never;
9
- project?: never;
10
- /**
11
- * ルームコードを指定
12
- */
13
- location: {
14
- branchCode: string;
15
- };
16
- /**
17
- * 施設コンテンツIDを指定
18
- */
19
- superEvent: {
20
- id: string;
21
- };
22
- };
23
7
  /**
24
8
  * イベントサービス
25
9
  */
@@ -62,23 +46,6 @@ export declare class EventService extends Service {
62
46
  * max: 10
63
47
  */
64
48
  params: IUpdateEventSellerMakesOfferParamsByIdentifier[]): Promise<void>;
65
- /**
66
- * イベント冪等複数作成
67
- * 特定の追加特性をキーにして、存在しなければ作成する
68
- * 存在すれば、一部属性を更新する(eventStatus,superEvent,offers.seller.makesOffer)
69
- */
70
- upsertManyByAdditionalProperty(params: {
71
- /**
72
- * 最大長:10
73
- */
74
- attributes: ICreateScreeningEventParams[];
75
- filter: {
76
- /**
77
- * キーにする追加特性name
78
- */
79
- name: string;
80
- };
81
- }): Promise<void>;
82
49
  /**
83
50
  * イベントステータス更新
84
51
  */
@@ -61,41 +61,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
61
61
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
62
62
  }
63
63
  };
64
- var __rest = (this && this.__rest) || function (s, e) {
65
- var t = {};
66
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
67
- t[p] = s[p];
68
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
69
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
70
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
71
- t[p[i]] = s[p[i]];
72
- }
73
- return t;
74
- };
75
64
  Object.defineProperty(exports, "__esModule", { value: true });
76
65
  exports.EventService = void 0;
77
66
  var factory = require("../../factory");
78
67
  var index_1 = require("../../index");
79
68
  var service_1 = require("../../service");
80
- function createUpsertParams(params) {
81
- var _a, _b, _c, _d;
82
- if (!Array.isArray(params.attributes) || params.attributes.length === 0) {
83
- throw new factory.errors.ArgumentNull('body');
84
- }
85
- var superEventId = (_b = (_a = params.attributes[0]) === null || _a === void 0 ? void 0 : _a.superEvent) === null || _b === void 0 ? void 0 : _b.id;
86
- var locationBranchCode = (_d = (_c = params.attributes[0]) === null || _c === void 0 ? void 0 : _c.location) === null || _d === void 0 ? void 0 : _d.branchCode;
87
- if (typeof superEventId !== 'string' || superEventId === '') {
88
- throw new factory.errors.ArgumentNull('superEvent.id');
89
- }
90
- if (typeof locationBranchCode !== 'string' || locationBranchCode === '') {
91
- throw new factory.errors.ArgumentNull('location.branchCode');
92
- }
93
- var upsertParams = params.attributes.map(function (_a) {
94
- var location = _a.location, superEvent = _a.superEvent, identifier = _a.identifier, typeOf = _a.typeOf, project = _a.project, createFields = __rest(_a, ["location", "superEvent", "identifier", "typeOf", "project"]);
95
- return createFields;
96
- });
97
- return { upsertParams: upsertParams, superEventId: superEventId, locationBranchCode: locationBranchCode };
98
- }
99
69
  /**
100
70
  * イベントサービス
101
71
  */
@@ -197,56 +167,6 @@ var EventService = /** @class */ (function (_super) {
197
167
  });
198
168
  });
199
169
  };
200
- /**
201
- * イベント冪等複数作成
202
- * 特定の追加特性をキーにして、存在しなければ作成する
203
- * 存在すれば、一部属性を更新する(eventStatus,superEvent,offers.seller.makesOffer)
204
- */
205
- EventService.prototype.upsertManyByAdditionalProperty = function (params) {
206
- return __awaiter(this, void 0, void 0, function () {
207
- var _a, upsertParams, superEventId, locationBranchCode, _b, auth, endpoint, project, seller, chevreAdmin, eventService;
208
- return __generator(this, function (_c) {
209
- switch (_c.label) {
210
- case 0:
211
- _a = createUpsertParams(params), upsertParams = _a.upsertParams, superEventId = _a.superEventId, locationBranchCode = _a.locationBranchCode;
212
- _b = this.options, auth = _b.auth, endpoint = _b.endpoint, project = _b.project, seller = _b.seller;
213
- return [4 /*yield*/, index_1.loadChevreAdmin({ auth: auth, endpoint: endpoint })];
214
- case 1:
215
- chevreAdmin = _c.sent();
216
- return [4 /*yield*/, chevreAdmin.createEventInstance({
217
- project: project,
218
- seller: { id: (typeof (seller === null || seller === void 0 ? void 0 : seller.id) === 'string') ? seller.id : '' }
219
- })];
220
- case 2:
221
- eventService = _c.sent();
222
- return [4 /*yield*/, eventService.upsertManyByAdditionalProperty(upsertParams, {
223
- filter: { name: params.filter.name },
224
- update: false,
225
- superEventId: superEventId,
226
- locationBranchCode: locationBranchCode
227
- })];
228
- case 3:
229
- _c.sent();
230
- return [4 /*yield*/, new Promise(function (resolve) {
231
- setTimeout(function () { resolve(); },
232
- // tslint:disable-next-line:no-magic-numbers
233
- 1000);
234
- })];
235
- case 4:
236
- _c.sent();
237
- return [4 /*yield*/, eventService.upsertManyByAdditionalProperty(upsertParams, {
238
- filter: { name: params.filter.name },
239
- update: true,
240
- superEventId: superEventId,
241
- locationBranchCode: locationBranchCode
242
- })];
243
- case 5:
244
- _c.sent();
245
- return [2 /*return*/];
246
- }
247
- });
248
- });
249
- };
250
170
  /**
251
171
  * イベントステータス更新
252
172
  */
package/lib/bundle.js CHANGED
@@ -2833,7 +2833,6 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
2833
2833
  Object.defineProperty(exports, "__esModule", { value: true });
2834
2834
  exports.EventService = void 0;
2835
2835
  var http_status_1 = require("http-status");
2836
- var factory = require("../factory");
2837
2836
  var service_1 = require("../service");
2838
2837
  /**
2839
2838
  * イベントサービス
@@ -2933,48 +2932,6 @@ var EventService = /** @class */ (function (_super) {
2933
2932
  });
2934
2933
  });
2935
2934
  };
2936
- /**
2937
- * イベント冪等複数作成
2938
- * 特定の追加特性をキーにして、存在しなければ作成する
2939
- * 存在すれば、一部属性を更新する(eventStatus,superEvent,offers.seller.makesOffer)
2940
- */
2941
- EventService.prototype.upsertManyByAdditionalProperty = function (params, options) {
2942
- return __awaiter(this, void 0, void 0, function () {
2943
- var superEventId, locationBranchCode;
2944
- return __generator(this, function (_a) {
2945
- switch (_a.label) {
2946
- case 0:
2947
- if (!Array.isArray(params) || params.length === 0) {
2948
- throw new factory.errors.ArgumentNull('body');
2949
- }
2950
- superEventId = options.superEventId;
2951
- locationBranchCode = options.locationBranchCode;
2952
- if (typeof superEventId !== 'string' || superEventId === '') {
2953
- throw new factory.errors.ArgumentNull('superEventId');
2954
- }
2955
- if (typeof locationBranchCode !== 'string' || locationBranchCode === '') {
2956
- throw new factory.errors.ArgumentNull('locationBranchCode');
2957
- }
2958
- return [4 /*yield*/, this.fetch({
2959
- uri: '/events',
2960
- method: 'PUT',
2961
- body: params,
2962
- qs: {
2963
- filter: options.filter,
2964
- update: options.update === true,
2965
- typeOf: factory.eventType.ScreeningEvent,
2966
- superEventId: superEventId,
2967
- locationBranchCode: locationBranchCode // add query(2025-08-27~)
2968
- },
2969
- expectedStatusCodes: [http_status_1.NO_CONTENT]
2970
- })];
2971
- case 1:
2972
- _a.sent();
2973
- return [2 /*return*/];
2974
- }
2975
- });
2976
- });
2977
- };
2978
2935
  /**
2979
2936
  * イベント部分更新
2980
2937
  */
@@ -2999,7 +2956,7 @@ var EventService = /** @class */ (function (_super) {
2999
2956
  }(service_1.Service));
3000
2957
  exports.EventService = EventService;
3001
2958
 
3002
- },{"../factory":166,"../service":171,"http-status":456}],23:[function(require,module,exports){
2959
+ },{"../service":171,"http-status":456}],23:[function(require,module,exports){
3003
2960
  "use strict";
3004
2961
  var __extends = (this && this.__extends) || (function () {
3005
2962
  var extendStatics = function (d, b) {
@@ -21477,41 +21434,11 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
21477
21434
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
21478
21435
  }
21479
21436
  };
21480
- var __rest = (this && this.__rest) || function (s, e) {
21481
- var t = {};
21482
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
21483
- t[p] = s[p];
21484
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
21485
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
21486
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
21487
- t[p[i]] = s[p[i]];
21488
- }
21489
- return t;
21490
- };
21491
21437
  Object.defineProperty(exports, "__esModule", { value: true });
21492
21438
  exports.EventService = void 0;
21493
21439
  var factory = require("../../factory");
21494
21440
  var index_1 = require("../../index");
21495
21441
  var service_1 = require("../../service");
21496
- function createUpsertParams(params) {
21497
- var _a, _b, _c, _d;
21498
- if (!Array.isArray(params.attributes) || params.attributes.length === 0) {
21499
- throw new factory.errors.ArgumentNull('body');
21500
- }
21501
- var superEventId = (_b = (_a = params.attributes[0]) === null || _a === void 0 ? void 0 : _a.superEvent) === null || _b === void 0 ? void 0 : _b.id;
21502
- var locationBranchCode = (_d = (_c = params.attributes[0]) === null || _c === void 0 ? void 0 : _c.location) === null || _d === void 0 ? void 0 : _d.branchCode;
21503
- if (typeof superEventId !== 'string' || superEventId === '') {
21504
- throw new factory.errors.ArgumentNull('superEvent.id');
21505
- }
21506
- if (typeof locationBranchCode !== 'string' || locationBranchCode === '') {
21507
- throw new factory.errors.ArgumentNull('location.branchCode');
21508
- }
21509
- var upsertParams = params.attributes.map(function (_a) {
21510
- var location = _a.location, superEvent = _a.superEvent, identifier = _a.identifier, typeOf = _a.typeOf, project = _a.project, createFields = __rest(_a, ["location", "superEvent", "identifier", "typeOf", "project"]);
21511
- return createFields;
21512
- });
21513
- return { upsertParams: upsertParams, superEventId: superEventId, locationBranchCode: locationBranchCode };
21514
- }
21515
21442
  /**
21516
21443
  * イベントサービス
21517
21444
  */
@@ -21613,56 +21540,6 @@ var EventService = /** @class */ (function (_super) {
21613
21540
  });
21614
21541
  });
21615
21542
  };
21616
- /**
21617
- * イベント冪等複数作成
21618
- * 特定の追加特性をキーにして、存在しなければ作成する
21619
- * 存在すれば、一部属性を更新する(eventStatus,superEvent,offers.seller.makesOffer)
21620
- */
21621
- EventService.prototype.upsertManyByAdditionalProperty = function (params) {
21622
- return __awaiter(this, void 0, void 0, function () {
21623
- var _a, upsertParams, superEventId, locationBranchCode, _b, auth, endpoint, project, seller, chevreAdmin, eventService;
21624
- return __generator(this, function (_c) {
21625
- switch (_c.label) {
21626
- case 0:
21627
- _a = createUpsertParams(params), upsertParams = _a.upsertParams, superEventId = _a.superEventId, locationBranchCode = _a.locationBranchCode;
21628
- _b = this.options, auth = _b.auth, endpoint = _b.endpoint, project = _b.project, seller = _b.seller;
21629
- return [4 /*yield*/, index_1.loadChevreAdmin({ auth: auth, endpoint: endpoint })];
21630
- case 1:
21631
- chevreAdmin = _c.sent();
21632
- return [4 /*yield*/, chevreAdmin.createEventInstance({
21633
- project: project,
21634
- seller: { id: (typeof (seller === null || seller === void 0 ? void 0 : seller.id) === 'string') ? seller.id : '' }
21635
- })];
21636
- case 2:
21637
- eventService = _c.sent();
21638
- return [4 /*yield*/, eventService.upsertManyByAdditionalProperty(upsertParams, {
21639
- filter: { name: params.filter.name },
21640
- update: false,
21641
- superEventId: superEventId,
21642
- locationBranchCode: locationBranchCode
21643
- })];
21644
- case 3:
21645
- _c.sent();
21646
- return [4 /*yield*/, new Promise(function (resolve) {
21647
- setTimeout(function () { resolve(); },
21648
- // tslint:disable-next-line:no-magic-numbers
21649
- 1000);
21650
- })];
21651
- case 4:
21652
- _c.sent();
21653
- return [4 /*yield*/, eventService.upsertManyByAdditionalProperty(upsertParams, {
21654
- filter: { name: params.filter.name },
21655
- update: true,
21656
- superEventId: superEventId,
21657
- locationBranchCode: locationBranchCode
21658
- })];
21659
- case 5:
21660
- _c.sent();
21661
- return [2 /*return*/];
21662
- }
21663
- });
21664
- });
21665
- };
21666
21543
  /**
21667
21544
  * イベントステータス更新
21668
21545
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "12.6.0-alpha.4",
3
+ "version": "12.6.0-alpha.5",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -93,7 +93,7 @@
93
93
  "watchify": "^3.11.1"
94
94
  },
95
95
  "dependencies": {
96
- "@chevre/factory": "5.1.0-alpha.5",
96
+ "@chevre/factory": "5.1.0",
97
97
  "debug": "3.2.7",
98
98
  "http-status": "1.7.4",
99
99
  "idtoken-verifier": "2.0.3",
@@ -1,107 +0,0 @@
1
- // tslint:disable:no-console
2
- // tslint:disable-next-line:no-implicit-dependencies
3
- import * as moment from 'moment-timezone';
4
- import * as client from '../../../../lib/index';
5
- import * as auth from '../../auth/authAsAdmin';
6
-
7
- const PROJECT_ID = String(process.env.PROJECT_ID);
8
- const SELLER_ID = '59d20831e53ebc2b4e774466';
9
- const EVENT_SERVICE_ID = '681aa7c1b53b6dbbe5efbec7';
10
- const AVAILABLE_AT_OR_FROM_ID = '51qbjcfr72h62m06vtv5kkhgje';
11
- const ADDITIONAL_PROPERTY_NAME = 'sampleCreateId';
12
-
13
- async function main() {
14
- const authClient = await auth.login();
15
- await authClient.refreshAccessToken();
16
- const loginTicket = authClient.verifyIdToken({});
17
- console.log('username is', loginTicket.getUsername());
18
-
19
- const eventService = await (await client.loadCloudAdmin({
20
- endpoint: <string>process.env.API_ADMIN_ENDPOINT,
21
- auth: authClient
22
- })).createEventInstance({
23
- project: { id: PROJECT_ID },
24
- seller: { id: SELLER_ID }
25
- });
26
-
27
- const today = moment()
28
- .tz('Asia/Tokyo')
29
- .format('YYYY-MM-DD');
30
- await eventService.upsertManyByAdditionalProperty({
31
- filter: { name: ADDITIONAL_PROPERTY_NAME },
32
- attributes: [
33
- {
34
- doorTime: moment(`${today}T13:00:00Z`)
35
- .toDate(),
36
- startDate: moment(`${today}T13:00:00Z`)
37
- .toDate(),
38
- endDate: moment(`${today}T14:00:00Z`)
39
- .toDate(),
40
- eventStatus: client.factory.eventStatusType.EventScheduled,
41
- additionalProperty: [
42
- // { name: ADDITIONAL_PROPERTY_NAME, value: `fromSamples:${Date.now()}` }
43
- {
44
- name: ADDITIONAL_PROPERTY_NAME, value: `fromSamples:${moment()
45
- .format('YYYY-MM-DD HH:mm')}`
46
- }
47
- ],
48
- // maximumPhysicalAttendeeCapacity: 3,
49
- location: {
50
- branchCode: '10'
51
- },
52
- superEvent: {
53
- id: '7k9ayl8hc'
54
- },
55
- offers: {
56
- identifier: '12345678', // <-プロダクトオファーでメンバープログラムティアごとのオファーを定義する場合に指定
57
- unacceptedPaymentMethod: [],
58
- eligibleQuantity: {
59
- maxValue: 6
60
- },
61
- itemOffered: {
62
- id: EVENT_SERVICE_ID,
63
- serviceOutput: {
64
- typeOf: client.factory.reservationType.EventReservation,
65
- reservedTicket: { typeOf: 'Ticket', ticketedSeat: { typeOf: client.factory.placeType.Seat } }
66
- }
67
- },
68
- seller: {
69
- makesOffer: [
70
- {
71
- typeOf: client.factory.offerType.Offer,
72
- availableAtOrFrom: { id: AVAILABLE_AT_OR_FROM_ID }, // <-販売アプリケーションIDを指定する
73
- availabilityStarts: moment(`${today}T13:00:00Z`)
74
- .toDate(),
75
- availabilityEnds: moment(`${today}T14:00:00Z`)
76
- .toDate(),
77
- validFrom: moment(`${today}T13:00:00Z`)
78
- .toDate(),
79
- validThrough: moment(`${today}T14:00:00Z`)
80
- .toDate(),
81
- validForMemberTier: { typeOf: 'MemberProgramTier' } // <-プロダクトオファーでメンバープログラムティアごとのオファーを定義する場合に指定
82
- }
83
- ]
84
- // makesOfferDefaultを指定するとmakesOfferよりも優先される
85
- // makesOfferDefault: {
86
- // typeOf: client.factory.offerType.Offer,
87
- // availabilityStarts: moment('2024-05-11T00:00:00.000Z')
88
- // .toDate(),
89
- // availabilityEnds: moment('2024-05-12T00:00:00.000Z')
90
- // .toDate(),
91
- // validFrom: moment('2024-05-11T00:00:00.000Z')
92
- // .toDate(),
93
- // validThrough: moment('2024-05-12T00:00:00.000Z')
94
- // .toDate()
95
- // }
96
- }
97
- }
98
- }
99
- ]
100
- });
101
- }
102
-
103
- main()
104
- .then(() => {
105
- console.log('success!');
106
- })
107
- .catch(console.error);