Skip to content

Commit f25d5db

Browse files
Merge pull request #13 from aspose-email-cloud/develop
Develop
2 parents e693fbd + e93fcee commit f25d5db

File tree

536 files changed

+25792
-1785
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

536 files changed

+25792
-1785
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,16 @@ Aspose.Email Cloud is a REST API for creating email applications that work with
2222
- Email configuration discovery.
2323
- Disposable email address detection.
2424

25-
## New features in version 20.9
25+
## New features in version 20.10
2626

27-
Aspose.Email Cloud SDK 20.9.0 is based on a new v4.0 REST API.
27+
Aspose.Email Cloud 20.10.0 comes with SDK improvements:
2828

29-
- All SDK functions are divided into groups (Email, Calendar, Contact, Client, Ai, Mapi, etc.).
30-
- Unified file API provided for supported file types (Save, Get, Convert, AsFile, FromFile, AsMapi/AsDto).
31-
- HierarchicalObject based API is removed.
32-
- All models are stored in one folder/namespace.
33-
- The request models are simplified.
29+
- Typescript, PHP, Java SDKs now have model builders to simplify their initialization.
30+
- All SDK methods now have code examples with parameters initialization.
31+
- Some models now have initialization examples for all SDKs.
32+
- SDK reference documentation with examples now available at url [docs.aspose.cloud/email/reference-api](https://docs.aspose.cloud/email/reference-api/)
3433

35-
See [Release notes](https://docs.aspose.cloud/email/aspose-email-cloud-20-9-release-notes/).
34+
See [Release notes](https://docs.aspose.cloud/email/aspose-email-cloud-20-10-release-notes/).
3635

3736
## How to use the SDK?
3837
The complete source code is available in the [GIT repository](https://github.com/aspose-email-cloud/aspose-email-cloud-node/tree/master/src).

doc/AiBcrApi.md

Lines changed: 241 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,266 @@
1-
# AiBcrApi
1+
# AiBcrApi (EmailCloud.ai.bcr)
2+
3+
AI Business card recognition operations.
24

3-
45
<a name="parse"></a>
5-
# **parse**
6+
## **parse**
7+
8+
Description: Parse images to vCard document models
9+
10+
Returns: List of vCards
11+
12+
Method call example:
613
```typescript
7-
public async parse(request: AiBcrParseRequest): Promise< ContactList >
14+
let result = await api.ai.bcr.parse(request);
815
```
916

10-
Parse images to vCard document models
17+
### Parameter: request
18+
19+
Description: parse method request.
20+
21+
See parameter model documentation at [AiBcrParseRequest](AiBcrParseRequest.md).
1122

12-
### Request Parameters
23+
<details>
24+
<summary>Parameter initialization example:</summary>
25+
1326
```typescript
14-
new AiBcrParse(
15-
file,
16-
countries=countries,
17-
languages=languages,
18-
isSingle=isSingle)
27+
let request = Models.AiBcrParseRequest()
28+
.file(fs.readFileSync('/path/to/image.png'))
29+
.countries('us')
30+
.languages('en')
31+
.isSingle(true)
32+
.build();
1933
```
2034

21-
Name | Type | Description | Notes
22-
---- | ---- | ----------- | -----
23-
**file** | **byte[]**| File to parse |
24-
**countries** | **string**| Comma-separated codes of countries. | [optional] [default to ]
25-
**languages** | **string**| Comma-separated ISO-639 codes of languages (either 639-1 or 639-3; i.e. \&quot;it\&quot; or \&quot;ita\&quot; for Italian); it&#39;s \&quot;\&quot; by default. | [optional] [default to ]
26-
**isSingle** | **boolean**| Determines that image contains single VCard or more. | [optional] [default to true]
35+
</details>
2736

28-
### Return type
37+
### Result
38+
39+
Description: List of vCards
40+
41+
Return type: Promise< [ContactList](ContactList.md) >
42+
43+
<details>
44+
<summary>Result example</summary>
45+
46+
```typescript
47+
let result = Models.contactList()
48+
.value([
49+
Models.contactDto()
50+
.attachments([
51+
Models.attachment()
52+
.name('attachment.txt')
53+
.base64Data('U29tZSBmaWxlIGNvbnRlbnQ=')
54+
.build()])
55+
.displayName('Alex Thomas')
56+
.emailAddresses([
57+
Models.emailAddress()
58+
.category(Models.enumWithCustomOfEmailAddressCategory()
59+
.value('Custom')
60+
.description('Partners')
61+
.build())
62+
.displayName('Alex Thomas Partners')
63+
.preferred(true)
64+
.address('email@aspose.com')
65+
.build()])
66+
.gender('Male')
67+
.givenName('Alex')
68+
.phoneNumbers([
69+
Models.phoneNumber()
70+
.category(Models.enumWithCustomOfPhoneNumberCategory()
71+
.value('Office')
72+
.build())
73+
.number('+49 211 4247 21')
74+
.preferred(true)
75+
.build()])
76+
.profession('GENERAL DIRECTOR')
77+
.surname('Thomas')
78+
.urls([
79+
Models.url()
80+
.category(Models.enumWithCustomOfUrlCategory()
81+
.value('Work')
82+
.build())
83+
.preferred(true)
84+
.href('www.aspose.com')
85+
.build()])
86+
.build()])
87+
.build();
88+
```
2989

30-
Promise< [ContactList](ContactList.md) >
90+
</details>
91+
92+
93+
### Complete example
94+
95+
<details>
96+
<summary>Method call example:</summary>
97+
98+
```typescript
99+
const api = new EmailCloud(app_key, app_sid);
100+
101+
// Prepare parameters:
102+
let request = Models.AiBcrParseRequest()
103+
.file(fs.readFileSync('/path/to/image.png'))
104+
.countries('us')
105+
.languages('en')
106+
.isSingle(true)
107+
.build();
108+
109+
// Call method:
110+
let result = await api.ai.bcr.parse(request);
111+
112+
// Result example:
113+
result = Models.contactList()
114+
.value([
115+
Models.contactDto()
116+
.attachments([
117+
Models.attachment()
118+
.name('attachment.txt')
119+
.base64Data('U29tZSBmaWxlIGNvbnRlbnQ=')
120+
.build()])
121+
.displayName('Alex Thomas')
122+
.emailAddresses([
123+
Models.emailAddress()
124+
.category(Models.enumWithCustomOfEmailAddressCategory()
125+
.value('Custom')
126+
.description('Partners')
127+
.build())
128+
.displayName('Alex Thomas Partners')
129+
.preferred(true)
130+
.address('email@aspose.com')
131+
.build()])
132+
.gender('Male')
133+
.givenName('Alex')
134+
.phoneNumbers([
135+
Models.phoneNumber()
136+
.category(Models.enumWithCustomOfPhoneNumberCategory()
137+
.value('Office')
138+
.build())
139+
.number('+49 211 4247 21')
140+
.preferred(true)
141+
.build()])
142+
.profession('GENERAL DIRECTOR')
143+
.surname('Thomas')
144+
.urls([
145+
Models.url()
146+
.category(Models.enumWithCustomOfUrlCategory()
147+
.value('Work')
148+
.build())
149+
.preferred(true)
150+
.href('www.aspose.com')
151+
.build()])
152+
.build()])
153+
.build();
154+
```
155+
156+
</details>
31157

32158
[[Back to top]](#) [[Back to Model list]](Models.md) [[Back to API README]](README.md)
33-
159+
34160
<a name="parseStorage"></a>
35-
# **parseStorage**
161+
## **parseStorage**
162+
163+
Description: Parse images from storage to vCard files
164+
165+
Returns: List of vCard files located on storage
166+
167+
Method call example:
36168
```typescript
37-
public async parseStorage(request: model.AiBcrParseStorageRequest): Promise< StorageFileLocationList >
169+
let result = await api.ai.bcr.parseStorage(request);
38170
```
39171

40-
Parse images from storage to vCard files
172+
### Parameter: request
41173

42-
### request Parameter
174+
Description: Request with images located on storage
43175

44176
See parameter model documentation at [AiBcrParseStorageRequest](AiBcrParseStorageRequest.md)
45177

46-
### Return type
178+
<details>
179+
<summary>Parameter initialization example:</summary>
180+
181+
```typescript
182+
let request = Models.aiBcrParseStorageRequest()
183+
.outFolder(Models.storageFolderLocation()
184+
.storage('First Storage')
185+
.folderPath('VCard/files/produced/by/parser/will/be/placed/here')
186+
.build())
187+
.images([
188+
Models.aiBcrImageStorageFile()
189+
.file(Models.storageFileLocation()
190+
.fileName('VCardScanImage.jpg')
191+
.storage('First Storage')
192+
.folderPath('image/location/on/storage')
193+
.build())
194+
.isSingle(true)
195+
.build()])
196+
.build();
197+
```
198+
199+
</details>
200+
201+
### Result
202+
203+
Description: List of vCard files located on storage
204+
205+
Return type: Promise< [StorageFileLocationList](StorageFileLocationList.md) >
206+
207+
<details>
208+
<summary>Result example</summary>
209+
210+
```typescript
211+
let result = Models.storageFileLocationList()
212+
.value([
213+
Models.storageFileLocation()
214+
.fileName('fileOnStorage.txt')
215+
.storage('First Storage')
216+
.folderPath('file/location/folder/on/storage')
217+
.build()])
218+
.build();
219+
```
220+
221+
</details>
222+
223+
224+
### Complete example
225+
226+
<details>
227+
<summary>Method call example:</summary>
228+
229+
```typescript
230+
const api = new EmailCloud(app_key, app_sid);
231+
232+
// Prepare parameters:
233+
let request = Models.aiBcrParseStorageRequest()
234+
.outFolder(Models.storageFolderLocation()
235+
.storage('First Storage')
236+
.folderPath('VCard/files/produced/by/parser/will/be/placed/here')
237+
.build())
238+
.images([
239+
Models.aiBcrImageStorageFile()
240+
.file(Models.storageFileLocation()
241+
.fileName('VCardScanImage.jpg')
242+
.storage('First Storage')
243+
.folderPath('image/location/on/storage')
244+
.build())
245+
.isSingle(true)
246+
.build()])
247+
.build();
248+
249+
// Call method:
250+
let result = await api.ai.bcr.parseStorage(request);
251+
252+
// Result example:
253+
result = Models.storageFileLocationList()
254+
.value([
255+
Models.storageFileLocation()
256+
.fileName('fileOnStorage.txt')
257+
.storage('First Storage')
258+
.folderPath('file/location/folder/on/storage')
259+
.build()])
260+
.build();
261+
```
47262

48-
Promise< [StorageFileLocationList](StorageFileLocationList.md) >
263+
</details>
49264

50265
[[Back to top]](#) [[Back to Model list]](Models.md) [[Back to API README]](README.md)
51266

doc/AiBcrImage.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# AiBcrImage
22

3+
Image for recognition
4+
35
## Properties
46
Name | Type | Description | Notes
5-
------------ | ------------- | ------------- | -------------
7+
---- | ---- | ----------- | -----
68
**isSingle** | **boolean** | Determines that image contains single VCard or more. | [default to undefined]
79

810

9-
1011
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)

doc/AiBcrImageStorageFile.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
# AiBcrImageStorageFile
22

3+
Image from storage for recognition
4+
35
## Properties
46
Name | Type | Description | Notes
5-
------------ | ------------- | ------------- | -------------
7+
---- | ---- | ----------- | -----
68
**file** | [**StorageFileLocation**](StorageFileLocation.md) | Image location | [default to undefined]
79

810
Parent class: [AiBcrImage](AiBcrImage.md)
911

12+
13+
## Example
14+
```typescript
15+
let aiBcrImageStorageFile = Models.aiBcrImageStorageFile()
16+
.file(Models.storageFileLocation()
17+
.fileName('VCardScanImage.jpg')
18+
.storage('First Storage')
19+
.folderPath('image/location/on/storage')
20+
.build())
21+
.isSingle(true)
22+
.build();
23+
```
24+
25+
1026
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)

doc/AiBcrOptions.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# AiBcrOptions
22

3+
Recognition options.
4+
35
## Properties
46
Name | Type | Description | Notes
5-
------------ | ------------- | ------------- | -------------
7+
---- | ---- | ----------- | -----
68
**languages** | **string** | Comma-separated ISO-639 codes of languages (either 639-1 or 639-3; i.e. \"it\" or \"ita\" for Italian); it's \"\" by default. | [optional] [default to undefined]
79
**countries** | **string** | Comma-separated codes of countries. | [optional] [default to undefined]
810

911

10-
1112
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)

doc/AiBcrParseRequest.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# AiBcrParseRequest
2+
3+
Request model for AiBcrApi.parse
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
---- | ---- | ----------- | -----
9+
**file** | **byte[]**| File to parse |
10+
**countries** | **string**| Comma-separated codes of countries. | [optional] [default to ]
11+
**languages** | **string**| Comma-separated ISO-639 codes of languages (either 639-1 or 639-3; i.e. \"it\" or \"ita\" for Italian); it's \"\" by default. | [optional] [default to ]
12+
**isSingle** | **boolean**| Determines that image contains single VCard or more. | [optional] [default to true]
13+
14+
## Example
15+
```typescript
16+
let request = Models.AiBcrParseRequest()
17+
.file(fs.readFileSync('/path/to/image.png'))
18+
.countries('us')
19+
.languages('en')
20+
.isSingle(true)
21+
.build();
22+
```

0 commit comments

Comments
 (0)