@cinerino/sdk 5.11.0-alpha.2 → 5.11.0-alpha.4

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.
@@ -1,16 +1,18 @@
1
1
  import * as factory from '../factory';
2
2
  import { Service } from '../service';
3
3
  declare type INoteDigitalDocument = factory.creativeWork.noteDigitalDocument.INoteDigitalDocument;
4
- declare type IProjection = {
5
- [key in keyof INoteDigitalDocument]?: 0;
6
- };
4
+ declare type IKeyOfProjection = keyof INoteDigitalDocument;
7
5
  /**
8
- * ノートサービス
6
+ * メモサービス
9
7
  */
10
8
  export declare class NoteService extends Service {
11
9
  upsertByIdentifier(params: Pick<INoteDigitalDocument, 'about' | 'identifier' | 'text'>[]): Promise<void>;
12
10
  search(params: Omit<factory.creativeWork.noteDigitalDocument.ISearchConditions, 'project'> & {
13
- $projection?: IProjection;
14
- }): Promise<INoteDigitalDocument[]>;
11
+ inclusion: IKeyOfProjection[];
12
+ exclusion: IKeyOfProjection[];
13
+ }): Promise<(INoteDigitalDocument & {
14
+ id: string;
15
+ })[]>;
16
+ updateById(id: string, body: Pick<INoteDigitalDocument, 'text'>): Promise<void>;
15
17
  }
16
18
  export {};
@@ -55,7 +55,7 @@ exports.NoteService = void 0;
55
55
  var http_status_1 = require("http-status");
56
56
  var service_1 = require("../service");
57
57
  /**
58
- * ノートサービス
58
+ * メモサービス
59
59
  */
60
60
  var NoteService = /** @class */ (function (_super) {
61
61
  __extends(NoteService, _super);
@@ -95,6 +95,26 @@ var NoteService = /** @class */ (function (_super) {
95
95
  });
96
96
  });
97
97
  };
98
+ NoteService.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
+ };
98
118
  return NoteService;
99
119
  }(service_1.Service));
100
120
  exports.NoteService = NoteService;
@@ -180,7 +180,7 @@ export declare namespace service {
180
180
  let svc: typeof MerchantReturnPolicyService | undefined;
181
181
  }
182
182
  /**
183
- * ノートサービス
183
+ * メモサービス
184
184
  */
185
185
  type Note = NoteService;
186
186
  namespace Note {
package/lib/bundle.js CHANGED
@@ -8843,7 +8843,7 @@ exports.NoteService = void 0;
8843
8843
  var http_status_1 = require("http-status");
8844
8844
  var service_1 = require("../service");
8845
8845
  /**
8846
- * ノートサービス
8846
+ * メモサービス
8847
8847
  */
8848
8848
  var NoteService = /** @class */ (function (_super) {
8849
8849
  __extends(NoteService, _super);
@@ -8883,6 +8883,26 @@ var NoteService = /** @class */ (function (_super) {
8883
8883
  });
8884
8884
  });
8885
8885
  };
8886
+ NoteService.prototype.updateById = function (id, body) {
8887
+ return __awaiter(this, void 0, void 0, function () {
8888
+ var text;
8889
+ return __generator(this, function (_a) {
8890
+ switch (_a.label) {
8891
+ case 0:
8892
+ text = body.text;
8893
+ return [4 /*yield*/, this.fetch({
8894
+ uri: "/notes/" + String(id),
8895
+ method: 'PUT',
8896
+ body: { text: text },
8897
+ expectedStatusCodes: [http_status_1.NO_CONTENT]
8898
+ })];
8899
+ case 1:
8900
+ _a.sent();
8901
+ return [2 /*return*/];
8902
+ }
8903
+ });
8904
+ });
8905
+ };
8886
8906
  return NoteService;
8887
8907
  }(service_1.Service));
8888
8908
  exports.NoteService = NoteService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cinerino/sdk",
3
- "version": "5.11.0-alpha.2",
3
+ "version": "5.11.0-alpha.4",
4
4
  "description": "Cinerino SDK",
5
5
  "main": "./lib/index.js",
6
6
  "browser": {
@@ -92,7 +92,7 @@
92
92
  "watchify": "^3.11.1"
93
93
  },
94
94
  "dependencies": {
95
- "@chevre/factory": "4.354.0-alpha.0",
95
+ "@chevre/factory": "4.354.0-alpha.1",
96
96
  "debug": "^3.2.6",
97
97
  "http-status": "^1.4.2",
98
98
  "idtoken-verifier": "^2.0.3",