@cinerino/sdk 12.3.0-alpha.6 → 12.3.0-alpha.8
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/example/src/chevre/admin/adminCreateNotesIfNotExistByIdentifier.ts +71 -0
- package/example/src/cloud/search/findProducts.ts +2 -1
- package/lib/abstract/chevreAdmin/note.d.ts +50 -10
- package/lib/abstract/chevreAdmin/note.js +42 -19
- package/lib/abstract/chevreAdmin/noteAboutOrder.d.ts +21 -0
- package/lib/abstract/chevreAdmin/noteAboutOrder.js +120 -0
- package/lib/abstract/chevreAdmin.d.ts +9 -0
- package/lib/abstract/chevreAdmin.js +20 -0
- package/lib/abstract/cloud/admin/{note.d.ts → noteAboutOrder.d.ts} +17 -3
- package/lib/abstract/cloud/admin/{note.js → noteAboutOrder.js} +18 -13
- package/lib/abstract/cloud/admin.d.ts +6 -6
- package/lib/abstract/cloud/admin.js +8 -8
- package/lib/bundle.js +827 -639
- package/package.json +2 -2
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// tslint:disable:no-console
|
|
2
|
+
// tslint:disable-next-line:no-implicit-dependencies
|
|
3
|
+
import * as client from '../../../../lib/index';
|
|
4
|
+
import * as auth from '../../auth/authAsAdmin';
|
|
5
|
+
|
|
6
|
+
const PROJECT_ID = String(process.env.PROJECT_ID);
|
|
7
|
+
const SELLER_ID = '59d20831e53ebc2b4e774466';
|
|
8
|
+
const EVENT_SERVICE_ID = '656038908b1cd5ce629f5992';
|
|
9
|
+
// const EVENT_SERVICE_ID = '656038908b1cd5ce629f5991';
|
|
10
|
+
|
|
11
|
+
// tslint:disable-next-line:max-func-body-length
|
|
12
|
+
async function main() {
|
|
13
|
+
const authClient = await auth.login();
|
|
14
|
+
await authClient.refreshAccessToken();
|
|
15
|
+
const loginTicket = authClient.verifyIdToken({});
|
|
16
|
+
console.log('username is', loginTicket.getUsername());
|
|
17
|
+
|
|
18
|
+
const noteService = await (await client.loadChevreAdmin({
|
|
19
|
+
endpoint: <string>process.env.CHEVRE_ENDPOINT,
|
|
20
|
+
auth: authClient
|
|
21
|
+
})).createNoteInstance({
|
|
22
|
+
project: { id: PROJECT_ID },
|
|
23
|
+
seller: { id: SELLER_ID }
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
await noteService.createNotesByIdentifier(
|
|
27
|
+
[
|
|
28
|
+
{
|
|
29
|
+
about: { id: EVENT_SERVICE_ID },
|
|
30
|
+
identifier: 'abcdefgh',
|
|
31
|
+
text: 'sample note text...'
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
{
|
|
35
|
+
aboutTypeOf: client.factory.product.ProductType.EventService
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
console.log('created.');
|
|
39
|
+
|
|
40
|
+
await noteService.updateNotesByIdentifier(
|
|
41
|
+
[
|
|
42
|
+
{
|
|
43
|
+
about: { id: EVENT_SERVICE_ID },
|
|
44
|
+
identifier: 'abcdefgh',
|
|
45
|
+
text: 'updated text xxxxx'
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
{
|
|
49
|
+
aboutTypeOf: client.factory.product.ProductType.EventService
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
console.log('updated.');
|
|
53
|
+
|
|
54
|
+
const notes = await noteService.findNotes({
|
|
55
|
+
limit: 10,
|
|
56
|
+
page: 1,
|
|
57
|
+
aboutTypeOf: client.factory.product.ProductType.EventService,
|
|
58
|
+
inclusion: ['id', 'identifier', 'text', 'about']
|
|
59
|
+
// aboutIds: [EVENT_SERVICE_ID],
|
|
60
|
+
// identifiers: ['abcdefgh', 'xxx']
|
|
61
|
+
});
|
|
62
|
+
// tslint:disable-next-line:no-null-keyword
|
|
63
|
+
console.dir(notes, { depth: null });
|
|
64
|
+
console.log(notes.length, 'notes found');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
main()
|
|
68
|
+
.then(() => {
|
|
69
|
+
console.log('success!');
|
|
70
|
+
})
|
|
71
|
+
.catch(console.error);
|
|
@@ -19,7 +19,8 @@ async function main() {
|
|
|
19
19
|
page: 1,
|
|
20
20
|
typeOf: factory.product.ProductType.EventService
|
|
21
21
|
});
|
|
22
|
-
|
|
22
|
+
// tslint:disable-next-line:no-null-keyword
|
|
23
|
+
console.dir(result, { depth: null });
|
|
23
24
|
console.log(result.length, 'data found');
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -1,21 +1,61 @@
|
|
|
1
1
|
import * as factory from '../factory';
|
|
2
2
|
import { Service } from '../service';
|
|
3
3
|
declare type INoteDigitalDocument = factory.creativeWork.noteDigitalDocument.INoteDigitalDocument;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
interface ICreateParams {
|
|
5
|
+
/**
|
|
6
|
+
* メモ識別子
|
|
7
|
+
*/
|
|
8
|
+
identifier: string;
|
|
9
|
+
/**
|
|
10
|
+
* メモコンテンツ
|
|
11
|
+
*/
|
|
12
|
+
text: string;
|
|
13
|
+
about: {
|
|
14
|
+
/**
|
|
15
|
+
* メモの主題リソースID
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
interface IDeleteParams {
|
|
21
|
+
id: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IFindParams {
|
|
24
|
+
limit: number;
|
|
25
|
+
page: number;
|
|
26
|
+
inclusion?: (keyof factory.creativeWork.noteDigitalDocument.INoteDigitalDocument)[];
|
|
27
|
+
/**
|
|
28
|
+
* 主題リソースタイプ
|
|
29
|
+
*/
|
|
30
|
+
aboutTypeOf: factory.creativeWork.noteDigitalDocument.IAbout['typeOf'];
|
|
31
|
+
/**
|
|
32
|
+
* 主題リソースIDリスト
|
|
33
|
+
* max: 10
|
|
34
|
+
*/
|
|
35
|
+
aboutIds?: string[];
|
|
36
|
+
/**
|
|
37
|
+
* メモ識別子リスト
|
|
38
|
+
* max: 10
|
|
39
|
+
*/
|
|
40
|
+
identifiers?: string[];
|
|
41
|
+
/**
|
|
42
|
+
* メモID
|
|
43
|
+
*/
|
|
44
|
+
id?: string;
|
|
45
|
+
}
|
|
8
46
|
/**
|
|
9
47
|
* メモサービス
|
|
10
48
|
*/
|
|
11
49
|
export declare class NoteService extends Service {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
50
|
+
createNotesByIdentifier(params: ICreateParams[], options: {
|
|
51
|
+
aboutTypeOf: factory.creativeWork.noteDigitalDocument.IAbout['typeOf'];
|
|
52
|
+
}): Promise<void>;
|
|
53
|
+
updateNotesByIdentifier(params: ICreateParams[], options: {
|
|
54
|
+
aboutTypeOf: factory.creativeWork.noteDigitalDocument.IAbout['typeOf'];
|
|
55
|
+
}): Promise<void>;
|
|
56
|
+
findNotes(params: IFindParams): Promise<(INoteDigitalDocument & {
|
|
17
57
|
id: string;
|
|
18
58
|
})[]>;
|
|
19
|
-
|
|
59
|
+
deleteNotesByIds(params: IDeleteParams[]): Promise<void>;
|
|
20
60
|
}
|
|
21
61
|
export {};
|
|
@@ -54,6 +54,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
54
54
|
exports.NoteService = void 0;
|
|
55
55
|
var http_status_1 = require("http-status");
|
|
56
56
|
var service_1 = require("../service");
|
|
57
|
+
var BASE_URI = '/creativeWorks/noteDigitalDocument';
|
|
57
58
|
/**
|
|
58
59
|
* メモサービス
|
|
59
60
|
*/
|
|
@@ -62,16 +63,41 @@ var NoteService = /** @class */ (function (_super) {
|
|
|
62
63
|
function NoteService() {
|
|
63
64
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
64
65
|
}
|
|
65
|
-
NoteService.prototype.
|
|
66
|
+
NoteService.prototype.createNotesByIdentifier = function (params, options) {
|
|
66
67
|
return __awaiter(this, void 0, void 0, function () {
|
|
68
|
+
var aboutTypeOf;
|
|
67
69
|
return __generator(this, function (_a) {
|
|
68
70
|
switch (_a.label) {
|
|
69
|
-
case 0:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
case 0:
|
|
72
|
+
aboutTypeOf = options.aboutTypeOf;
|
|
73
|
+
return [4 /*yield*/, this.fetch({
|
|
74
|
+
uri: BASE_URI,
|
|
75
|
+
method: 'POST',
|
|
76
|
+
body: params,
|
|
77
|
+
qs: { aboutTypeOf: aboutTypeOf },
|
|
78
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
79
|
+
})];
|
|
80
|
+
case 1:
|
|
81
|
+
_a.sent();
|
|
82
|
+
return [2 /*return*/];
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
NoteService.prototype.updateNotesByIdentifier = function (params, options) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
89
|
+
var aboutTypeOf;
|
|
90
|
+
return __generator(this, function (_a) {
|
|
91
|
+
switch (_a.label) {
|
|
92
|
+
case 0:
|
|
93
|
+
aboutTypeOf = options.aboutTypeOf;
|
|
94
|
+
return [4 /*yield*/, this.fetch({
|
|
95
|
+
uri: BASE_URI,
|
|
96
|
+
method: 'PUT',
|
|
97
|
+
body: params,
|
|
98
|
+
qs: { aboutTypeOf: aboutTypeOf },
|
|
99
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
100
|
+
})];
|
|
75
101
|
case 1:
|
|
76
102
|
_a.sent();
|
|
77
103
|
return [2 /*return*/];
|
|
@@ -79,12 +105,12 @@ var NoteService = /** @class */ (function (_super) {
|
|
|
79
105
|
});
|
|
80
106
|
});
|
|
81
107
|
};
|
|
82
|
-
NoteService.prototype.
|
|
108
|
+
NoteService.prototype.findNotes = function (params) {
|
|
83
109
|
return __awaiter(this, void 0, void 0, function () {
|
|
84
110
|
var _this = this;
|
|
85
111
|
return __generator(this, function (_a) {
|
|
86
112
|
return [2 /*return*/, this.fetch({
|
|
87
|
-
uri:
|
|
113
|
+
uri: BASE_URI,
|
|
88
114
|
method: 'GET',
|
|
89
115
|
qs: params,
|
|
90
116
|
expectedStatusCodes: [http_status_1.OK]
|
|
@@ -95,19 +121,16 @@ var NoteService = /** @class */ (function (_super) {
|
|
|
95
121
|
});
|
|
96
122
|
});
|
|
97
123
|
};
|
|
98
|
-
NoteService.prototype.
|
|
124
|
+
NoteService.prototype.deleteNotesByIds = function (params) {
|
|
99
125
|
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
-
var text;
|
|
101
126
|
return __generator(this, function (_a) {
|
|
102
127
|
switch (_a.label) {
|
|
103
|
-
case 0:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
110
|
-
})];
|
|
128
|
+
case 0: return [4 /*yield*/, this.fetch({
|
|
129
|
+
uri: BASE_URI,
|
|
130
|
+
method: 'DELETE',
|
|
131
|
+
body: params,
|
|
132
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
133
|
+
})];
|
|
111
134
|
case 1:
|
|
112
135
|
_a.sent();
|
|
113
136
|
return [2 /*return*/];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as factory from '../factory';
|
|
2
|
+
import { Service } from '../service';
|
|
3
|
+
declare type INoteDigitalDocument = factory.creativeWork.noteDigitalDocument.INoteDigitalDocument;
|
|
4
|
+
declare type IKeyOfProjection = keyof INoteDigitalDocument;
|
|
5
|
+
declare type ICreateParams = Pick<INoteDigitalDocument, 'identifier' | 'text'> & {
|
|
6
|
+
about: Pick<factory.creativeWork.noteDigitalDocument.IAbout, 'id' | 'typeOf'>;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* 注文メモサービス
|
|
10
|
+
*/
|
|
11
|
+
export declare class NoteAboutOrderService extends Service {
|
|
12
|
+
upsertByIdentifier(params: ICreateParams[]): Promise<void>;
|
|
13
|
+
search(params: Omit<factory.creativeWork.noteDigitalDocument.ISearchConditions, 'project'> & {
|
|
14
|
+
inclusion: IKeyOfProjection[];
|
|
15
|
+
exclusion: IKeyOfProjection[];
|
|
16
|
+
}): Promise<(INoteDigitalDocument & {
|
|
17
|
+
id: string;
|
|
18
|
+
})[]>;
|
|
19
|
+
updateById(id: string, body: Pick<INoteDigitalDocument, 'text'>): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
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;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
+
exports.NoteAboutOrderService = void 0;
|
|
55
|
+
var http_status_1 = require("http-status");
|
|
56
|
+
var service_1 = require("../service");
|
|
57
|
+
/**
|
|
58
|
+
* 注文メモサービス
|
|
59
|
+
*/
|
|
60
|
+
var NoteAboutOrderService = /** @class */ (function (_super) {
|
|
61
|
+
__extends(NoteAboutOrderService, _super);
|
|
62
|
+
function NoteAboutOrderService() {
|
|
63
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
64
|
+
}
|
|
65
|
+
NoteAboutOrderService.prototype.upsertByIdentifier = function (params) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
+
return __generator(this, function (_a) {
|
|
68
|
+
switch (_a.label) {
|
|
69
|
+
case 0: return [4 /*yield*/, this.fetch({
|
|
70
|
+
uri: '/notes',
|
|
71
|
+
method: 'PUT',
|
|
72
|
+
body: params,
|
|
73
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
74
|
+
})];
|
|
75
|
+
case 1:
|
|
76
|
+
_a.sent();
|
|
77
|
+
return [2 /*return*/];
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
NoteAboutOrderService.prototype.search = function (params) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
var _this = this;
|
|
85
|
+
return __generator(this, function (_a) {
|
|
86
|
+
return [2 /*return*/, this.fetch({
|
|
87
|
+
uri: '/notes',
|
|
88
|
+
method: 'GET',
|
|
89
|
+
qs: params,
|
|
90
|
+
expectedStatusCodes: [http_status_1.OK]
|
|
91
|
+
})
|
|
92
|
+
.then(function (response) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
93
|
+
return [2 /*return*/, response.json()];
|
|
94
|
+
}); }); })];
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
NoteAboutOrderService.prototype.updateById = function (id, body) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
+
var text;
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
switch (_a.label) {
|
|
103
|
+
case 0:
|
|
104
|
+
text = body.text;
|
|
105
|
+
return [4 /*yield*/, this.fetch({
|
|
106
|
+
uri: "/notes/" + String(id),
|
|
107
|
+
method: 'PUT',
|
|
108
|
+
body: { text: text },
|
|
109
|
+
expectedStatusCodes: [http_status_1.NO_CONTENT]
|
|
110
|
+
})];
|
|
111
|
+
case 1:
|
|
112
|
+
_a.sent();
|
|
113
|
+
return [2 /*return*/];
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
return NoteAboutOrderService;
|
|
119
|
+
}(service_1.Service));
|
|
120
|
+
exports.NoteAboutOrderService = NoteAboutOrderService;
|
|
@@ -8,6 +8,7 @@ import type { EventSeriesService } from './chevreAdmin/eventSeries';
|
|
|
8
8
|
import type { MeService } from './chevreAdmin/me';
|
|
9
9
|
import type { MemberService } from './chevreAdmin/member';
|
|
10
10
|
import type { NoteService } from './chevreAdmin/note';
|
|
11
|
+
import type { NoteAboutOrderService } from './chevreAdmin/noteAboutOrder';
|
|
11
12
|
import type { OfferService } from './chevreAdmin/offer';
|
|
12
13
|
import type { OfferCatalogService } from './chevreAdmin/offerCatalog';
|
|
13
14
|
import type { OfferCatalogItemService } from './chevreAdmin/offerCatalogItem';
|
|
@@ -73,6 +74,13 @@ export declare namespace service {
|
|
|
73
74
|
namespace Note {
|
|
74
75
|
let svc: typeof NoteService | undefined;
|
|
75
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* 注文メモサービス
|
|
79
|
+
*/
|
|
80
|
+
type NoteAboutOrder = NoteAboutOrderService;
|
|
81
|
+
namespace NoteAboutOrder {
|
|
82
|
+
let svc: typeof NoteAboutOrderService | undefined;
|
|
83
|
+
}
|
|
76
84
|
/**
|
|
77
85
|
* 注文サービス
|
|
78
86
|
*/
|
|
@@ -146,6 +154,7 @@ export declare class ChevreAdmin {
|
|
|
146
154
|
createMeInstance(): Promise<MeService>;
|
|
147
155
|
createMemberInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<MemberService>;
|
|
148
156
|
createNoteInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<NoteService>;
|
|
157
|
+
createNoteAboutOrderInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<NoteAboutOrderService>;
|
|
149
158
|
createOrderInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OrderService>;
|
|
150
159
|
createProductInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ProductService>;
|
|
151
160
|
createReservationInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<ReservationService>;
|
|
@@ -74,6 +74,9 @@ var service;
|
|
|
74
74
|
var Note;
|
|
75
75
|
(function (Note) {
|
|
76
76
|
})(Note = service.Note || (service.Note = {}));
|
|
77
|
+
var NoteAboutOrder;
|
|
78
|
+
(function (NoteAboutOrder) {
|
|
79
|
+
})(NoteAboutOrder = service.NoteAboutOrder || (service.NoteAboutOrder = {}));
|
|
77
80
|
var Order;
|
|
78
81
|
(function (Order) {
|
|
79
82
|
})(Order = service.Order || (service.Order = {}));
|
|
@@ -245,6 +248,23 @@ var ChevreAdmin = /** @class */ (function () {
|
|
|
245
248
|
});
|
|
246
249
|
});
|
|
247
250
|
};
|
|
251
|
+
ChevreAdmin.prototype.createNoteAboutOrderInstance = function (params) {
|
|
252
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
253
|
+
var _a;
|
|
254
|
+
return __generator(this, function (_b) {
|
|
255
|
+
switch (_b.label) {
|
|
256
|
+
case 0:
|
|
257
|
+
if (!(service.NoteAboutOrder.svc === undefined)) return [3 /*break*/, 2];
|
|
258
|
+
_a = service.NoteAboutOrder;
|
|
259
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./chevreAdmin/noteAboutOrder'); })];
|
|
260
|
+
case 1:
|
|
261
|
+
_a.svc = (_b.sent()).NoteAboutOrderService;
|
|
262
|
+
_b.label = 2;
|
|
263
|
+
case 2: return [2 /*return*/, new service.NoteAboutOrder.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: [] }))];
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
});
|
|
267
|
+
};
|
|
248
268
|
ChevreAdmin.prototype.createOrderInstance = function (params) {
|
|
249
269
|
return __awaiter(this, void 0, void 0, function () {
|
|
250
270
|
var _a;
|
|
@@ -8,9 +8,9 @@ declare type INoteAsSearchResult = Pick<INoteDigitalDocument, 'about' | 'id' | '
|
|
|
8
8
|
id: string;
|
|
9
9
|
};
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* 注文メモサービス
|
|
12
12
|
*/
|
|
13
|
-
export declare class
|
|
13
|
+
export declare class NoteAboutOrderService extends Service {
|
|
14
14
|
/**
|
|
15
15
|
* メモ主題(about.id)とメモ識別子(identifier)に対して、存在しなければ作成する
|
|
16
16
|
* 存在すれば何もしない
|
|
@@ -23,7 +23,21 @@ export declare class NoteService extends Service {
|
|
|
23
23
|
* メモ検索
|
|
24
24
|
* limit最大: 20
|
|
25
25
|
*/
|
|
26
|
-
search(params:
|
|
26
|
+
search(params: {
|
|
27
|
+
limit: number;
|
|
28
|
+
page: number;
|
|
29
|
+
about?: {
|
|
30
|
+
id?: {
|
|
31
|
+
$eq?: string;
|
|
32
|
+
};
|
|
33
|
+
orderNumber?: {
|
|
34
|
+
$eq?: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
identifier?: {
|
|
38
|
+
$eq?: string;
|
|
39
|
+
};
|
|
40
|
+
}): Promise<INoteAsSearchResult[]>;
|
|
27
41
|
/**
|
|
28
42
|
* メモコンテンツを更新する
|
|
29
43
|
*/
|
|
@@ -62,15 +62,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
65
|
-
exports.
|
|
65
|
+
exports.NoteAboutOrderService = void 0;
|
|
66
66
|
var index_1 = require("../../index");
|
|
67
67
|
var service_1 = require("../../service");
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* 注文メモサービス
|
|
70
70
|
*/
|
|
71
|
-
var
|
|
72
|
-
__extends(
|
|
73
|
-
function
|
|
71
|
+
var NoteAboutOrderService = /** @class */ (function (_super) {
|
|
72
|
+
__extends(NoteAboutOrderService, _super);
|
|
73
|
+
function NoteAboutOrderService() {
|
|
74
74
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
75
75
|
}
|
|
76
76
|
/**
|
|
@@ -80,7 +80,7 @@ var NoteService = /** @class */ (function (_super) {
|
|
|
80
80
|
* 識別子(identifier): 8~32文字の英字
|
|
81
81
|
* コンテンツ(text)最大文字数: 512
|
|
82
82
|
*/
|
|
83
|
-
|
|
83
|
+
NoteAboutOrderService.prototype.createByIdentifierIfNotExist = function (params) {
|
|
84
84
|
return __awaiter(this, void 0, void 0, function () {
|
|
85
85
|
var _a, auth, endpoint, project, seller, chevreAdmin, noteService;
|
|
86
86
|
return __generator(this, function (_b) {
|
|
@@ -90,7 +90,7 @@ var NoteService = /** @class */ (function (_super) {
|
|
|
90
90
|
return [4 /*yield*/, index_1.loadChevreAdmin({ auth: auth, endpoint: endpoint })];
|
|
91
91
|
case 1:
|
|
92
92
|
chevreAdmin = _b.sent();
|
|
93
|
-
return [4 /*yield*/, chevreAdmin.
|
|
93
|
+
return [4 /*yield*/, chevreAdmin.createNoteAboutOrderInstance({
|
|
94
94
|
project: project,
|
|
95
95
|
seller: { id: (typeof (seller === null || seller === void 0 ? void 0 : seller.id) === 'string') ? seller.id : '' }
|
|
96
96
|
})];
|
|
@@ -108,7 +108,12 @@ var NoteService = /** @class */ (function (_super) {
|
|
|
108
108
|
* メモ検索
|
|
109
109
|
* limit最大: 20
|
|
110
110
|
*/
|
|
111
|
-
|
|
111
|
+
NoteAboutOrderService.prototype.search = function (params
|
|
112
|
+
// Pick<
|
|
113
|
+
// factory.creativeWork.noteDigitalDocument.ISearchConditions,
|
|
114
|
+
// 'about' | 'id' | 'identifier' | 'limit' | 'page' | 'sort'
|
|
115
|
+
// >
|
|
116
|
+
) {
|
|
112
117
|
return __awaiter(this, void 0, void 0, function () {
|
|
113
118
|
var _a, auth, endpoint, project, seller, chevreAdmin, noteService;
|
|
114
119
|
return __generator(this, function (_b) {
|
|
@@ -118,7 +123,7 @@ var NoteService = /** @class */ (function (_super) {
|
|
|
118
123
|
return [4 /*yield*/, index_1.loadChevreAdmin({ auth: auth, endpoint: endpoint })];
|
|
119
124
|
case 1:
|
|
120
125
|
chevreAdmin = _b.sent();
|
|
121
|
-
return [4 /*yield*/, chevreAdmin.
|
|
126
|
+
return [4 /*yield*/, chevreAdmin.createNoteAboutOrderInstance({
|
|
122
127
|
project: project,
|
|
123
128
|
seller: { id: (typeof (seller === null || seller === void 0 ? void 0 : seller.id) === 'string') ? seller.id : '' }
|
|
124
129
|
})];
|
|
@@ -132,7 +137,7 @@ var NoteService = /** @class */ (function (_super) {
|
|
|
132
137
|
/**
|
|
133
138
|
* メモコンテンツを更新する
|
|
134
139
|
*/
|
|
135
|
-
|
|
140
|
+
NoteAboutOrderService.prototype.updateById = function (
|
|
136
141
|
/**
|
|
137
142
|
* メモID
|
|
138
143
|
*/
|
|
@@ -147,7 +152,7 @@ var NoteService = /** @class */ (function (_super) {
|
|
|
147
152
|
return [4 /*yield*/, index_1.loadChevreAdmin({ auth: auth, endpoint: endpoint })];
|
|
148
153
|
case 1:
|
|
149
154
|
chevreAdmin = _b.sent();
|
|
150
|
-
return [4 /*yield*/, chevreAdmin.
|
|
155
|
+
return [4 /*yield*/, chevreAdmin.createNoteAboutOrderInstance({
|
|
151
156
|
project: project,
|
|
152
157
|
seller: { id: (typeof (seller === null || seller === void 0 ? void 0 : seller.id) === 'string') ? seller.id : '' }
|
|
153
158
|
})];
|
|
@@ -161,6 +166,6 @@ var NoteService = /** @class */ (function (_super) {
|
|
|
161
166
|
});
|
|
162
167
|
});
|
|
163
168
|
};
|
|
164
|
-
return
|
|
169
|
+
return NoteAboutOrderService;
|
|
165
170
|
}(service_1.Service));
|
|
166
|
-
exports.
|
|
171
|
+
exports.NoteAboutOrderService = NoteAboutOrderService;
|
|
@@ -3,7 +3,7 @@ import type { CreativeWorkService } from './admin/creativeWork';
|
|
|
3
3
|
import type { CustomerService } from './admin/customer';
|
|
4
4
|
import type { EventService } from './admin/event';
|
|
5
5
|
import type { MeService } from './admin/me';
|
|
6
|
-
import type {
|
|
6
|
+
import type { NoteAboutOrderService } from './admin/noteAboutOrder';
|
|
7
7
|
import type { OfferService } from './admin/offer';
|
|
8
8
|
import type { OfferCatalogService } from './admin/offerCatalog';
|
|
9
9
|
import type { OfferCatalogItemService } from './admin/offerCatalogItem';
|
|
@@ -42,11 +42,11 @@ export declare namespace service {
|
|
|
42
42
|
let svc: typeof MeService | undefined;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* 注文メモサービス
|
|
46
46
|
*/
|
|
47
|
-
type
|
|
48
|
-
namespace
|
|
49
|
-
let svc: typeof
|
|
47
|
+
type NoteAboutOrder = NoteAboutOrderService;
|
|
48
|
+
namespace NoteAboutOrder {
|
|
49
|
+
let svc: typeof NoteAboutOrderService | undefined;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* 単価オファーサービス
|
|
@@ -108,7 +108,7 @@ export declare class CloudAdmin {
|
|
|
108
108
|
createCustomerInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<CustomerService>;
|
|
109
109
|
createEventInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<EventService>;
|
|
110
110
|
createMeInstance(): Promise<MeService>;
|
|
111
|
-
createNoteInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<
|
|
111
|
+
createNoteInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<NoteAboutOrderService>;
|
|
112
112
|
createOfferInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferService>;
|
|
113
113
|
createOfferCatalogInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferCatalogService>;
|
|
114
114
|
createOfferCatalogItemInstance(params: Pick<IOptions, 'project'> & Pick<IAdditionalOptions, 'seller'>): Promise<OfferCatalogItemService>;
|
|
@@ -62,9 +62,9 @@ var service;
|
|
|
62
62
|
var Me;
|
|
63
63
|
(function (Me) {
|
|
64
64
|
})(Me = service.Me || (service.Me = {}));
|
|
65
|
-
var
|
|
66
|
-
(function (
|
|
67
|
-
})(
|
|
65
|
+
var NoteAboutOrder;
|
|
66
|
+
(function (NoteAboutOrder) {
|
|
67
|
+
})(NoteAboutOrder = service.NoteAboutOrder || (service.NoteAboutOrder = {}));
|
|
68
68
|
var Offer;
|
|
69
69
|
(function (Offer) {
|
|
70
70
|
})(Offer = service.Offer || (service.Offer = {}));
|
|
@@ -176,13 +176,13 @@ var CloudAdmin = /** @class */ (function () {
|
|
|
176
176
|
return __generator(this, function (_b) {
|
|
177
177
|
switch (_b.label) {
|
|
178
178
|
case 0:
|
|
179
|
-
if (!(service.
|
|
180
|
-
_a = service.
|
|
181
|
-
return [4 /*yield*/, Promise.resolve().then(function () { return require('./admin/
|
|
179
|
+
if (!(service.NoteAboutOrder.svc === undefined)) return [3 /*break*/, 2];
|
|
180
|
+
_a = service.NoteAboutOrder;
|
|
181
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./admin/noteAboutOrder'); })];
|
|
182
182
|
case 1:
|
|
183
|
-
_a.svc = (_b.sent()).
|
|
183
|
+
_a.svc = (_b.sent()).NoteAboutOrderService;
|
|
184
184
|
_b.label = 2;
|
|
185
|
-
case 2: return [2 /*return*/, new service.
|
|
185
|
+
case 2: return [2 /*return*/, new service.NoteAboutOrder.svc(__assign(__assign(__assign({}, this.options), params), { retryableStatusCodes: defaultRetryableStatusCodes }))];
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
188
|
});
|