@cinerino/sdk 16.3.0-alpha.7 → 16.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.
@@ -1,15 +1,20 @@
1
1
  import { factory } from '../factory';
2
- import { ISearchResult, IUnset, Service } from '../service';
3
- export type IEmailMessage = Omit<factory.creativeWork.message.email.ICreativeWork, 'toRecipient'>;
2
+ import { IUnset, Service } from '../service';
3
+ export type IEmailMessage = Pick<factory.creativeWork.message.email.ICreativeWork, 'about' | 'identifier' | 'name' | 'project' | 'sender' | 'text' | 'typeOf'> & {
4
+ id: string;
5
+ };
4
6
  export interface ISearchConditions {
5
7
  limit?: number;
6
8
  page?: number;
9
+ id?: {
10
+ $eq?: string;
11
+ };
7
12
  identifier?: {
8
13
  $eq?: string;
9
14
  };
10
15
  about?: {
11
16
  identifier?: {
12
- $eq?: factory.creativeWork.message.email.AboutIdentifier;
17
+ $eq?: factory.creativeWork.message.email.AboutIdentifier.OnEventStatusChanged;
13
18
  };
14
19
  };
15
20
  }
@@ -20,25 +25,19 @@ export declare class EmailMessageService extends Service {
20
25
  /**
21
26
  * 作成
22
27
  */
23
- create(params: IEmailMessage): Promise<{
28
+ create(params: Omit<IEmailMessage, 'id' | 'project'>): Promise<{
24
29
  id: string;
25
30
  }>;
26
- /**
27
- * 取得
28
- */
29
- findById(params: {
30
- id: string;
31
- }): Promise<IEmailMessage>;
32
31
  /**
33
32
  * 検索
34
33
  */
35
- search(params: ISearchConditions): Promise<ISearchResult<IEmailMessage[]>>;
34
+ findEmailMessages(params: ISearchConditions): Promise<IEmailMessage[]>;
36
35
  /**
37
36
  * 編集
38
37
  */
39
38
  update(params: {
40
39
  id: string;
41
- attributes: IEmailMessage & IUnset;
40
+ attributes: Omit<IEmailMessage, 'id' | 'project'> & IUnset;
42
41
  }): Promise<void>;
43
42
  /**
44
43
  * 削除
@@ -19,33 +19,17 @@ class EmailMessageService extends service_1.Service {
19
19
  })
20
20
  .then(async (response) => response.json());
21
21
  }
22
- /**
23
- * 取得
24
- */
25
- async findById(params) {
26
- return this.fetch({
27
- uri: `/emailMessages/${params.id}`,
28
- method: 'GET',
29
- // qs: params,
30
- expectedStatusCodes: [http_status_1.status.OK]
31
- })
32
- .then(async (response) => response.json());
33
- }
34
22
  /**
35
23
  * 検索
36
24
  */
37
- async search(params) {
25
+ async findEmailMessages(params) {
38
26
  return this.fetch({
39
27
  uri: '/emailMessages',
40
28
  method: 'GET',
41
29
  qs: params,
42
30
  expectedStatusCodes: [http_status_1.status.OK]
43
31
  })
44
- .then(async (response) => {
45
- return {
46
- data: await response.json()
47
- };
48
- });
32
+ .then(async (response) => response.json());
49
33
  }
50
34
  /**
51
35
  * 編集