@cinerino/sdk 18.3.0-alpha.7 → 18.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.
@@ -18,9 +18,6 @@ type IEmailMessage = factory.creativeWork.message.email.ICreativeWork & {
18
18
  interface ISearchConditions {
19
19
  limit?: number;
20
20
  page?: number;
21
- sort?: {
22
- datePublished?: factory.sortType;
23
- };
24
21
  project?: {
25
22
  id?: {
26
23
  $eq?: string;
@@ -45,15 +42,11 @@ interface ISearchConditions {
45
42
  };
46
43
  };
47
44
  }
48
- type IKeyOfProjection = keyof IEmailMessage | '_id';
49
45
  /**
50
46
  * メッセージサービス
51
47
  */
52
48
  export declare class MessageService extends Service {
53
- search(params: Omit<ISearchConditions, 'project'> & {
54
- inclusion: IKeyOfProjection[];
55
- exclusion: IKeyOfProjection[];
56
- }): Promise<(IEmailMessage & {
49
+ findMessages(params: Pick<ISearchConditions, 'about' | 'identifier' | 'limit' | 'mainEntity' | 'page' | 'project' | 'provider'>): Promise<(IEmailMessage & {
57
50
  id: string;
58
51
  })[]>;
59
52
  }
@@ -7,7 +7,7 @@ const service_1 = require("../service");
7
7
  * メッセージサービス
8
8
  */
9
9
  class MessageService extends service_1.Service {
10
- async search(params) {
10
+ async findMessages(params) {
11
11
  return this.fetch({
12
12
  uri: '/messages',
13
13
  method: 'GET',
@@ -1,5 +1,9 @@
1
1
  import { factory } from '../factory';
2
2
  import { IOptions, Service } from '../service';
3
+ type IUpdateParams = Pick<factory.project.IProject, 'alternateName' | 'logo' | 'hasMerchantReturnPolicy' | 'name'> & {
4
+ id: string;
5
+ settings?: Pick<factory.project.ISettings, 'sendEmailMessage' | 'sendgridApiKey'>;
6
+ };
3
7
  /**
4
8
  * プロジェクトサービス
5
9
  */
@@ -8,7 +12,11 @@ export declare class ProjectService extends Service<IOptions> {
8
12
  /**
9
13
  * プロジェクト作成
10
14
  */
11
- create(params: Pick<factory.project.IProject, 'alternateName' | 'logo' | 'id' | 'name' | 'settings'>): Promise<Pick<factory.project.IProject, 'id'>>;
15
+ addProject(params: Pick<factory.project.IProject, 'alternateName' | 'logo' | 'id' | 'name'> & {
16
+ settings?: never;
17
+ }): Promise<{
18
+ id: string;
19
+ }>;
12
20
  /**
13
21
  * プロジェクト設定検索
14
22
  */
@@ -18,7 +26,7 @@ export declare class ProjectService extends Service<IOptions> {
18
26
  /**
19
27
  * プロジェクト更新
20
28
  */
21
- update(params: Pick<factory.project.IProject, 'alternateName' | 'id' | 'logo' | 'hasMerchantReturnPolicy' | 'name' | 'settings'>): Promise<void>;
29
+ updateProjectById(params: IUpdateParams): Promise<void>;
22
30
  /**
23
31
  * プロジェクトリソース削除
24
32
  */
@@ -26,3 +34,4 @@ export declare class ProjectService extends Service<IOptions> {
26
34
  id: string;
27
35
  }): Promise<void>;
28
36
  }
37
+ export {};
@@ -13,7 +13,7 @@ class ProjectService extends service_1.Service {
13
13
  /**
14
14
  * プロジェクト作成
15
15
  */
16
- async create(params) {
16
+ async addProject(params) {
17
17
  return this.fetch({
18
18
  uri: '/projects',
19
19
  method: 'POST',
@@ -29,7 +29,6 @@ class ProjectService extends service_1.Service {
29
29
  return this.fetch({
30
30
  uri: `/projects/${params.id}/settings`,
31
31
  method: 'GET',
32
- // qs: query,
33
32
  expectedStatusCodes: [http_status_1.status.OK]
34
33
  })
35
34
  .then(async (response) => response.json());
@@ -37,7 +36,7 @@ class ProjectService extends service_1.Service {
37
36
  /**
38
37
  * プロジェクト更新
39
38
  */
40
- async update(params) {
39
+ async updateProjectById(params) {
41
40
  const { id, ...body } = params;
42
41
  await this.fetch({
43
42
  uri: `/projects/${id}`,