@cinerino/sdk 3.86.0 → 3.87.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.
@@ -152,7 +152,7 @@ async function main() {
152
152
  object: {
153
153
  // 顧客指定の場合↓
154
154
  ...(customer !== undefined)
155
- ? { customer: { id: customer.id } }
155
+ ? { customer: { id: customer.id, typeOf: customer.typeOf } }
156
156
  : undefined
157
157
  // passport: { token: passportToken }
158
158
  }
package/lib/bundle.js CHANGED
@@ -8673,6 +8673,25 @@ var PersonService = /** @class */ (function (_super) {
8673
8673
  function PersonService() {
8674
8674
  return _super !== null && _super.apply(this, arguments) || this;
8675
8675
  }
8676
+ /**
8677
+ * 会員作成
8678
+ */
8679
+ PersonService.prototype.createIfNotExist = function (params) {
8680
+ return __awaiter(this, void 0, void 0, function () {
8681
+ var _this = this;
8682
+ return __generator(this, function (_a) {
8683
+ return [2 /*return*/, this.fetch({
8684
+ uri: "/people/createIfNotExist",
8685
+ method: 'PUT',
8686
+ body: params,
8687
+ expectedStatusCodes: [http_status_1.OK]
8688
+ })
8689
+ .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
8690
+ return [2 /*return*/, response.json()];
8691
+ }); }); })];
8692
+ });
8693
+ });
8694
+ };
8676
8695
  /**
8677
8696
  * プロフィール検索
8678
8697
  */
@@ -14232,223 +14251,8 @@ var PermitService = /** @class */ (function (_super) {
14232
14251
  exports.PermitService = PermitService;
14233
14252
 
14234
14253
  },{"../service":211,"http-status":272}],226:[function(require,module,exports){
14235
- "use strict";
14236
- var __extends = (this && this.__extends) || (function () {
14237
- var extendStatics = function (d, b) {
14238
- extendStatics = Object.setPrototypeOf ||
14239
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
14240
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
14241
- return extendStatics(d, b);
14242
- };
14243
- return function (d, b) {
14244
- if (typeof b !== "function" && b !== null)
14245
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
14246
- extendStatics(d, b);
14247
- function __() { this.constructor = d; }
14248
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14249
- };
14250
- })();
14251
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
14252
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14253
- return new (P || (P = Promise))(function (resolve, reject) {
14254
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
14255
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
14256
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
14257
- step((generator = generator.apply(thisArg, _arguments || [])).next());
14258
- });
14259
- };
14260
- var __generator = (this && this.__generator) || function (thisArg, body) {
14261
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
14262
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14263
- function verb(n) { return function (v) { return step([n, v]); }; }
14264
- function step(op) {
14265
- if (f) throw new TypeError("Generator is already executing.");
14266
- while (_) try {
14267
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
14268
- if (y = 0, t) op = [op[0] & 2, t.value];
14269
- switch (op[0]) {
14270
- case 0: case 1: t = op; break;
14271
- case 4: _.label++; return { value: op[1], done: false };
14272
- case 5: _.label++; y = op[1]; op = [0]; continue;
14273
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
14274
- default:
14275
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
14276
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
14277
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
14278
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
14279
- if (t[2]) _.ops.pop();
14280
- _.trys.pop(); continue;
14281
- }
14282
- op = body.call(thisArg, _);
14283
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
14284
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
14285
- }
14286
- };
14287
- Object.defineProperty(exports, "__esModule", { value: true });
14288
- exports.PersonService = void 0;
14289
- var http_status_1 = require("http-status");
14290
- var service_1 = require("../service");
14291
- /**
14292
- * ユーザーサービス
14293
- */
14294
- var PersonService = /** @class */ (function (_super) {
14295
- __extends(PersonService, _super);
14296
- function PersonService() {
14297
- return _super !== null && _super.apply(this, arguments) || this;
14298
- }
14299
- /**
14300
- * プロフィール検索
14301
- */
14302
- PersonService.prototype.getProfile = function (params) {
14303
- return __awaiter(this, void 0, void 0, function () {
14304
- var id;
14305
- var _this = this;
14306
- return __generator(this, function (_a) {
14307
- id = (typeof params.id === 'string') ? params.id : 'me';
14308
- return [2 /*return*/, this.fetch({
14309
- uri: "/people/" + id + "/profile",
14310
- method: 'GET',
14311
- expectedStatusCodes: [http_status_1.OK],
14312
- qs: { iss: params.iss }
14313
- })
14314
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
14315
- return [2 /*return*/, response.json()];
14316
- }); }); })];
14317
- });
14318
- });
14319
- };
14320
- /**
14321
- * プロフィール更新
14322
- */
14323
- PersonService.prototype.updateProfile = function (params) {
14324
- return __awaiter(this, void 0, void 0, function () {
14325
- var id;
14326
- return __generator(this, function (_a) {
14327
- switch (_a.label) {
14328
- case 0:
14329
- id = (typeof params.id === 'string') ? params.id : 'me';
14330
- return [4 /*yield*/, this.fetch({
14331
- uri: "/people/" + id + "/profile",
14332
- method: 'PATCH',
14333
- body: params,
14334
- expectedStatusCodes: [http_status_1.NO_CONTENT],
14335
- qs: { iss: params.iss }
14336
- })];
14337
- case 1:
14338
- _a.sent();
14339
- return [2 /*return*/];
14340
- }
14341
- });
14342
- });
14343
- };
14344
- /**
14345
- * 注文を検索する
14346
- */
14347
- PersonService.prototype.searchOrders = function (params) {
14348
- return __awaiter(this, void 0, void 0, function () {
14349
- var id;
14350
- var _this = this;
14351
- return __generator(this, function (_a) {
14352
- id = (typeof params.id === 'string') ? params.id : 'me';
14353
- return [2 /*return*/, this.fetch({
14354
- uri: "/people/" + id + "/orders",
14355
- method: 'GET',
14356
- qs: params,
14357
- expectedStatusCodes: [http_status_1.OK]
14358
- })
14359
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
14360
- var _a;
14361
- return __generator(this, function (_b) {
14362
- switch (_b.label) {
14363
- case 0:
14364
- _a = {};
14365
- return [4 /*yield*/, response.json()];
14366
- case 1: return [2 /*return*/, (_a.data = _b.sent(),
14367
- _a)];
14368
- }
14369
- });
14370
- }); })];
14371
- });
14372
- });
14373
- };
14374
- /**
14375
- * 会員検索
14376
- */
14377
- PersonService.prototype.search = function (params) {
14378
- return __awaiter(this, void 0, void 0, function () {
14379
- var _this = this;
14380
- return __generator(this, function (_a) {
14381
- return [2 /*return*/, this.fetch({
14382
- uri: '/people',
14383
- method: 'GET',
14384
- qs: params,
14385
- expectedStatusCodes: [http_status_1.OK]
14386
- })
14387
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () {
14388
- var _a;
14389
- return __generator(this, function (_b) {
14390
- switch (_b.label) {
14391
- case 0:
14392
- _a = {};
14393
- return [4 /*yield*/, response.json()];
14394
- case 1: return [2 /*return*/, (_a.data = _b.sent(),
14395
- _a)];
14396
- }
14397
- });
14398
- }); })];
14399
- });
14400
- });
14401
- };
14402
- /**
14403
- * ユーザー取得
14404
- */
14405
- PersonService.prototype.findById = function (params) {
14406
- return __awaiter(this, void 0, void 0, function () {
14407
- var id;
14408
- var _this = this;
14409
- return __generator(this, function (_a) {
14410
- id = (typeof params.id === 'string') ? params.id : 'me';
14411
- return [2 /*return*/, this.fetch({
14412
- uri: "/people/" + id,
14413
- method: 'GET',
14414
- expectedStatusCodes: [http_status_1.OK],
14415
- qs: { iss: params.iss }
14416
- })
14417
- .then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
14418
- return [2 /*return*/, response.json()];
14419
- }); }); })];
14420
- });
14421
- });
14422
- };
14423
- /**
14424
- * 会員削除
14425
- */
14426
- PersonService.prototype.deleteById = function (params) {
14427
- return __awaiter(this, void 0, void 0, function () {
14428
- var id;
14429
- return __generator(this, function (_a) {
14430
- switch (_a.label) {
14431
- case 0:
14432
- id = (typeof params.id === 'string') ? params.id : 'me';
14433
- return [4 /*yield*/, this.fetch({
14434
- uri: "/people/" + id,
14435
- method: 'DELETE',
14436
- body: params,
14437
- expectedStatusCodes: [http_status_1.NO_CONTENT],
14438
- qs: { iss: params.iss }
14439
- })];
14440
- case 1:
14441
- _a.sent();
14442
- return [2 /*return*/];
14443
- }
14444
- });
14445
- });
14446
- };
14447
- return PersonService;
14448
- }(service_1.Service));
14449
- exports.PersonService = PersonService;
14450
-
14451
- },{"../service":211,"http-status":272}],227:[function(require,module,exports){
14254
+ arguments[4][189][0].apply(exports,arguments)
14255
+ },{"../service":211,"dup":189,"http-status":272}],227:[function(require,module,exports){
14452
14256
  "use strict";
14453
14257
  var __extends = (this && this.__extends) || (function () {
14454
14258
  var extendStatics = function (d, b) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "3.86.0",
3
+ "version": "3.87.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.86.0",
100
+ "@cinerino/api-abstract-client": "3.87.0",
101
101
  "debug": "^3.2.6",
102
102
  "http-status": "^1.4.2",
103
103
  "idtoken-verifier": "^2.0.3",