nylas 6.0.0 → 6.1.0
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/lib/models/access-token.d.ts +2 -0
- package/lib/models/access-token.js +21 -21
- package/lib/models/account.d.ts +4 -0
- package/lib/models/account.js +25 -25
- package/lib/models/application-details.d.ts +2 -0
- package/lib/models/application-details.js +14 -14
- package/lib/models/calendar-availability.d.ts +9 -3
- package/lib/models/calendar-availability.js +41 -41
- package/lib/models/calendar-restful-model-collection.d.ts +2 -0
- package/lib/models/calendar-restful-model-collection.js +72 -55
- package/lib/models/calendar.d.ts +3 -0
- package/lib/models/calendar.js +24 -24
- package/lib/models/component.d.ts +3 -0
- package/lib/models/component.js +33 -33
- package/lib/models/connect.d.ts +3 -0
- package/lib/models/connect.js +47 -47
- package/lib/models/contact.d.ts +9 -0
- package/lib/models/contact.js +144 -144
- package/lib/models/draft.d.ts +3 -0
- package/lib/models/draft.js +10 -10
- package/lib/models/email-participant.d.ts +2 -0
- package/lib/models/email-participant.js +8 -8
- package/lib/models/event-conferencing.d.ts +3 -0
- package/lib/models/event-conferencing.js +30 -30
- package/lib/models/event-notification.d.ts +2 -0
- package/lib/models/event-notification.js +24 -24
- package/lib/models/event-participant.d.ts +6 -0
- package/lib/models/event-participant.js +19 -12
- package/lib/models/event.d.ts +17 -0
- package/lib/models/event.js +92 -61
- package/lib/models/file.d.ts +3 -0
- package/lib/models/file.js +21 -21
- package/lib/models/folder.d.ts +4 -0
- package/lib/models/folder.js +13 -13
- package/lib/models/free-busy.d.ts +15 -1
- package/lib/models/free-busy.js +51 -29
- package/lib/models/job-status.d.ts +3 -0
- package/lib/models/job-status.js +20 -20
- package/lib/models/management-account.d.ts +5 -0
- package/lib/models/management-account.js +46 -46
- package/lib/models/message.d.ts +3 -0
- package/lib/models/message.js +54 -54
- package/lib/models/model.d.ts +1 -0
- package/lib/models/model.js +5 -0
- package/lib/models/neural-categorizer.d.ts +4 -0
- package/lib/models/neural-categorizer.js +21 -21
- package/lib/models/neural-clean-conversation.d.ts +3 -0
- package/lib/models/neural-clean-conversation.js +7 -7
- package/lib/models/neural-ocr.d.ts +3 -0
- package/lib/models/neural-ocr.js +7 -7
- package/lib/models/neural-sentiment-analysis.d.ts +3 -0
- package/lib/models/neural-sentiment-analysis.js +21 -21
- package/lib/models/neural-signature-contact.d.ts +4 -0
- package/lib/models/neural-signature-contact.js +39 -39
- package/lib/models/neural-signature-extraction.d.ts +3 -0
- package/lib/models/neural-signature-extraction.js +10 -10
- package/lib/models/neural.d.ts +2 -0
- package/lib/models/neural.js +26 -26
- package/lib/models/resource.d.ts +3 -0
- package/lib/models/resource.js +31 -31
- package/lib/models/restful-model.d.ts +2 -1
- package/lib/models/restful-model.js +15 -20
- package/lib/models/scheduler-booking-request.d.ts +3 -0
- package/lib/models/scheduler-booking-request.js +93 -93
- package/lib/models/scheduler-time-slot.d.ts +2 -0
- package/lib/models/scheduler-time-slot.js +23 -23
- package/lib/models/scheduler.d.ts +10 -0
- package/lib/models/scheduler.js +247 -247
- package/lib/models/thread.d.ts +3 -0
- package/lib/models/thread.js +50 -50
- package/lib/models/webhook.d.ts +3 -0
- package/lib/models/webhook.js +23 -23
- package/lib/models/when.d.ts +3 -0
- package/lib/models/when.js +35 -27
- package/package.json +1 -1
|
@@ -30,27 +30,27 @@ var NeuralSentimentAnalysis = /** @class */ (function (_super) {
|
|
|
30
30
|
_this.initAttributes(props);
|
|
31
31
|
return _this;
|
|
32
32
|
}
|
|
33
|
+
NeuralSentimentAnalysis.collectionName = 'sentiment';
|
|
34
|
+
NeuralSentimentAnalysis.attributes = {
|
|
35
|
+
accountId: attributes_1.default.String({
|
|
36
|
+
modelKey: 'accountId',
|
|
37
|
+
jsonKey: 'account_id',
|
|
38
|
+
}),
|
|
39
|
+
sentiment: attributes_1.default.String({
|
|
40
|
+
modelKey: 'sentiment',
|
|
41
|
+
}),
|
|
42
|
+
sentimentScore: attributes_1.default.Number({
|
|
43
|
+
modelKey: 'sentimentScore',
|
|
44
|
+
jsonKey: 'sentiment_score',
|
|
45
|
+
}),
|
|
46
|
+
processedLength: attributes_1.default.Number({
|
|
47
|
+
modelKey: 'processedLength',
|
|
48
|
+
jsonKey: 'processed_length',
|
|
49
|
+
}),
|
|
50
|
+
text: attributes_1.default.String({
|
|
51
|
+
modelKey: 'text',
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
33
54
|
return NeuralSentimentAnalysis;
|
|
34
55
|
}(restful_model_1.default));
|
|
35
56
|
exports.default = NeuralSentimentAnalysis;
|
|
36
|
-
NeuralSentimentAnalysis.collectionName = 'sentiment';
|
|
37
|
-
NeuralSentimentAnalysis.attributes = {
|
|
38
|
-
accountId: attributes_1.default.String({
|
|
39
|
-
modelKey: 'accountId',
|
|
40
|
-
jsonKey: 'account_id',
|
|
41
|
-
}),
|
|
42
|
-
sentiment: attributes_1.default.String({
|
|
43
|
-
modelKey: 'sentiment',
|
|
44
|
-
}),
|
|
45
|
-
sentimentScore: attributes_1.default.Number({
|
|
46
|
-
modelKey: 'sentimentScore',
|
|
47
|
-
jsonKey: 'sentiment_score',
|
|
48
|
-
}),
|
|
49
|
-
processedLength: attributes_1.default.Number({
|
|
50
|
-
modelKey: 'processedLength',
|
|
51
|
-
jsonKey: 'processed_length',
|
|
52
|
-
}),
|
|
53
|
-
text: attributes_1.default.String({
|
|
54
|
-
modelKey: 'text',
|
|
55
|
-
}),
|
|
56
|
-
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Attribute } from './attributes';
|
|
1
2
|
import Contact from './contact';
|
|
2
3
|
import Model from './model';
|
|
3
4
|
import NylasConnection from '../nylas-connection';
|
|
@@ -8,6 +9,7 @@ declare type LinkProperties = {
|
|
|
8
9
|
declare class Link extends Model implements LinkProperties {
|
|
9
10
|
description: string;
|
|
10
11
|
url: string;
|
|
12
|
+
static attributes: Record<string, Attribute>;
|
|
11
13
|
constructor(props?: LinkProperties);
|
|
12
14
|
}
|
|
13
15
|
declare type NameProperties = {
|
|
@@ -17,6 +19,7 @@ declare type NameProperties = {
|
|
|
17
19
|
declare class Name extends Model implements NameProperties {
|
|
18
20
|
firstName: string;
|
|
19
21
|
lastName: string;
|
|
22
|
+
static attributes: Record<string, Attribute>;
|
|
20
23
|
constructor(props?: NameProperties);
|
|
21
24
|
}
|
|
22
25
|
export declare type NeuralSignatureContactProperties = {
|
|
@@ -32,6 +35,7 @@ export default class NeuralSignatureContact extends Model implements NeuralSigna
|
|
|
32
35
|
phoneNumbers?: string[];
|
|
33
36
|
emails?: string[];
|
|
34
37
|
names?: Name[];
|
|
38
|
+
static attributes: Record<string, Attribute>;
|
|
35
39
|
constructor(props?: NeuralSignatureContactProperties);
|
|
36
40
|
toJSON(): Record<string, unknown>;
|
|
37
41
|
toContactObject(connection: NylasConnection): Contact;
|
|
@@ -35,16 +35,16 @@ var Link = /** @class */ (function (_super) {
|
|
|
35
35
|
_this.initAttributes(props);
|
|
36
36
|
return _this;
|
|
37
37
|
}
|
|
38
|
+
Link.attributes = {
|
|
39
|
+
description: attributes_1.default.String({
|
|
40
|
+
modelKey: 'description',
|
|
41
|
+
}),
|
|
42
|
+
url: attributes_1.default.String({
|
|
43
|
+
modelKey: 'url',
|
|
44
|
+
}),
|
|
45
|
+
};
|
|
38
46
|
return Link;
|
|
39
47
|
}(model_1.default));
|
|
40
|
-
Link.attributes = {
|
|
41
|
-
description: attributes_1.default.String({
|
|
42
|
-
modelKey: 'description',
|
|
43
|
-
}),
|
|
44
|
-
url: attributes_1.default.String({
|
|
45
|
-
modelKey: 'url',
|
|
46
|
-
}),
|
|
47
|
-
};
|
|
48
48
|
var Name = /** @class */ (function (_super) {
|
|
49
49
|
__extends(Name, _super);
|
|
50
50
|
function Name(props) {
|
|
@@ -54,18 +54,18 @@ var Name = /** @class */ (function (_super) {
|
|
|
54
54
|
_this.initAttributes(props);
|
|
55
55
|
return _this;
|
|
56
56
|
}
|
|
57
|
+
Name.attributes = {
|
|
58
|
+
firstName: attributes_1.default.String({
|
|
59
|
+
modelKey: 'firstName',
|
|
60
|
+
jsonKey: 'first_name',
|
|
61
|
+
}),
|
|
62
|
+
lastName: attributes_1.default.String({
|
|
63
|
+
modelKey: 'lastName',
|
|
64
|
+
jsonKey: 'last_name',
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
57
67
|
return Name;
|
|
58
68
|
}(model_1.default));
|
|
59
|
-
Name.attributes = {
|
|
60
|
-
firstName: attributes_1.default.String({
|
|
61
|
-
modelKey: 'firstName',
|
|
62
|
-
jsonKey: 'first_name',
|
|
63
|
-
}),
|
|
64
|
-
lastName: attributes_1.default.String({
|
|
65
|
-
modelKey: 'lastName',
|
|
66
|
-
jsonKey: 'last_name',
|
|
67
|
-
}),
|
|
68
|
-
};
|
|
69
69
|
var NeuralSignatureContact = /** @class */ (function (_super) {
|
|
70
70
|
__extends(NeuralSignatureContact, _super);
|
|
71
71
|
function NeuralSignatureContact(props) {
|
|
@@ -116,27 +116,27 @@ var NeuralSignatureContact = /** @class */ (function (_super) {
|
|
|
116
116
|
}
|
|
117
117
|
return contact;
|
|
118
118
|
};
|
|
119
|
+
NeuralSignatureContact.attributes = {
|
|
120
|
+
jobTitles: attributes_1.default.StringList({
|
|
121
|
+
modelKey: 'jobTitles',
|
|
122
|
+
jsonKey: 'job_titles',
|
|
123
|
+
}),
|
|
124
|
+
links: attributes_1.default.Collection({
|
|
125
|
+
modelKey: 'links',
|
|
126
|
+
itemClass: Link,
|
|
127
|
+
}),
|
|
128
|
+
phoneNumbers: attributes_1.default.StringList({
|
|
129
|
+
modelKey: 'phoneNumbers',
|
|
130
|
+
jsonKey: 'phone_numbers',
|
|
131
|
+
}),
|
|
132
|
+
emails: attributes_1.default.StringList({
|
|
133
|
+
modelKey: 'emails',
|
|
134
|
+
}),
|
|
135
|
+
names: attributes_1.default.Collection({
|
|
136
|
+
modelKey: 'names',
|
|
137
|
+
itemClass: Name,
|
|
138
|
+
}),
|
|
139
|
+
};
|
|
119
140
|
return NeuralSignatureContact;
|
|
120
141
|
}(model_1.default));
|
|
121
142
|
exports.default = NeuralSignatureContact;
|
|
122
|
-
NeuralSignatureContact.attributes = {
|
|
123
|
-
jobTitles: attributes_1.default.StringList({
|
|
124
|
-
modelKey: 'jobTitles',
|
|
125
|
-
jsonKey: 'job_titles',
|
|
126
|
-
}),
|
|
127
|
-
links: attributes_1.default.Collection({
|
|
128
|
-
modelKey: 'links',
|
|
129
|
-
itemClass: Link,
|
|
130
|
-
}),
|
|
131
|
-
phoneNumbers: attributes_1.default.StringList({
|
|
132
|
-
modelKey: 'phoneNumbers',
|
|
133
|
-
jsonKey: 'phone_numbers',
|
|
134
|
-
}),
|
|
135
|
-
emails: attributes_1.default.StringList({
|
|
136
|
-
modelKey: 'emails',
|
|
137
|
-
}),
|
|
138
|
-
names: attributes_1.default.Collection({
|
|
139
|
-
modelKey: 'names',
|
|
140
|
-
itemClass: Name,
|
|
141
|
-
}),
|
|
142
|
-
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import NeuralSignatureContact from './neural-signature-contact';
|
|
2
|
+
import { Attribute } from './attributes';
|
|
2
3
|
import Message, { MessageProperties } from './message';
|
|
3
4
|
import NylasConnection from '../nylas-connection';
|
|
4
5
|
export declare type NeuralSignatureExtractionProperties = MessageProperties & {
|
|
@@ -10,5 +11,7 @@ export default class NeuralSignatureExtraction extends Message implements Neural
|
|
|
10
11
|
signature: string;
|
|
11
12
|
modelVersion: string;
|
|
12
13
|
contacts?: NeuralSignatureContact;
|
|
14
|
+
static collectionName: string;
|
|
15
|
+
static attributes: Record<string, Attribute>;
|
|
13
16
|
constructor(connection: NylasConnection, props?: NeuralSignatureExtractionProperties);
|
|
14
17
|
}
|
|
@@ -39,16 +39,16 @@ var NeuralSignatureExtraction = /** @class */ (function (_super) {
|
|
|
39
39
|
_this.initAttributes(props);
|
|
40
40
|
return _this;
|
|
41
41
|
}
|
|
42
|
+
NeuralSignatureExtraction.collectionName = 'signature';
|
|
43
|
+
NeuralSignatureExtraction.attributes = __assign(__assign({}, message_1.default.attributes), { signature: attributes_1.default.String({
|
|
44
|
+
modelKey: 'signature',
|
|
45
|
+
}), modelVersion: attributes_1.default.String({
|
|
46
|
+
modelKey: 'modelVersion',
|
|
47
|
+
jsonKey: 'model_version',
|
|
48
|
+
}), contacts: attributes_1.default.Object({
|
|
49
|
+
modelKey: 'contacts',
|
|
50
|
+
itemClass: neural_signature_contact_1.default,
|
|
51
|
+
}) });
|
|
42
52
|
return NeuralSignatureExtraction;
|
|
43
53
|
}(message_1.default));
|
|
44
54
|
exports.default = NeuralSignatureExtraction;
|
|
45
|
-
NeuralSignatureExtraction.collectionName = 'signature';
|
|
46
|
-
NeuralSignatureExtraction.attributes = __assign(__assign({}, message_1.default.attributes), { signature: attributes_1.default.String({
|
|
47
|
-
modelKey: 'signature',
|
|
48
|
-
}), modelVersion: attributes_1.default.String({
|
|
49
|
-
modelKey: 'modelVersion',
|
|
50
|
-
jsonKey: 'model_version',
|
|
51
|
-
}), contacts: attributes_1.default.Object({
|
|
52
|
-
modelKey: 'contacts',
|
|
53
|
-
itemClass: neural_signature_contact_1.default,
|
|
54
|
-
}) });
|
package/lib/models/neural.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import NeuralOcr from './neural-ocr';
|
|
|
5
5
|
import NeuralCategorizer from './neural-categorizer';
|
|
6
6
|
import NeuralCleanConversation from './neural-clean-conversation';
|
|
7
7
|
import Model from './model';
|
|
8
|
+
import { Attribute } from './attributes';
|
|
8
9
|
export declare type NeuralMessageOptionsProperties = {
|
|
9
10
|
ignoreLinks?: boolean;
|
|
10
11
|
ignoreImages?: boolean;
|
|
@@ -20,6 +21,7 @@ export declare class NeuralMessageOptions extends Model implements NeuralMessage
|
|
|
20
21
|
removeConclusionPhrases?: boolean;
|
|
21
22
|
imagesAsMarkdown?: boolean;
|
|
22
23
|
parseContacts?: boolean;
|
|
24
|
+
static attributes: Record<string, Attribute>;
|
|
23
25
|
constructor(props?: NeuralMessageOptionsProperties);
|
|
24
26
|
toJSON(writeParseContact?: boolean): Record<string, boolean>;
|
|
25
27
|
}
|
package/lib/models/neural.js
CHANGED
|
@@ -49,35 +49,35 @@ var NeuralMessageOptions = /** @class */ (function (_super) {
|
|
|
49
49
|
}
|
|
50
50
|
return body;
|
|
51
51
|
};
|
|
52
|
+
NeuralMessageOptions.attributes = {
|
|
53
|
+
ignoreLinks: attributes_1.default.Boolean({
|
|
54
|
+
modelKey: 'ignoreLinks',
|
|
55
|
+
jsonKey: 'ignore_links',
|
|
56
|
+
}),
|
|
57
|
+
ignoreImages: attributes_1.default.Boolean({
|
|
58
|
+
modelKey: 'ignoreImages',
|
|
59
|
+
jsonKey: 'ignore_images',
|
|
60
|
+
}),
|
|
61
|
+
ignoreTables: attributes_1.default.Boolean({
|
|
62
|
+
modelKey: 'ignoreTables',
|
|
63
|
+
jsonKey: 'ignore_tables',
|
|
64
|
+
}),
|
|
65
|
+
removeConclusionPhrases: attributes_1.default.Boolean({
|
|
66
|
+
modelKey: 'removeConclusionPhrases',
|
|
67
|
+
jsonKey: 'remove_conclusion_phrases',
|
|
68
|
+
}),
|
|
69
|
+
imagesAsMarkdown: attributes_1.default.Boolean({
|
|
70
|
+
modelKey: 'imagesAsMarkdown',
|
|
71
|
+
jsonKey: 'images_as_markdown',
|
|
72
|
+
}),
|
|
73
|
+
parseContacts: attributes_1.default.Boolean({
|
|
74
|
+
modelKey: 'parseContacts',
|
|
75
|
+
jsonKey: 'parse_contacts',
|
|
76
|
+
}),
|
|
77
|
+
};
|
|
52
78
|
return NeuralMessageOptions;
|
|
53
79
|
}(model_1.default));
|
|
54
80
|
exports.NeuralMessageOptions = NeuralMessageOptions;
|
|
55
|
-
NeuralMessageOptions.attributes = {
|
|
56
|
-
ignoreLinks: attributes_1.default.Boolean({
|
|
57
|
-
modelKey: 'ignoreLinks',
|
|
58
|
-
jsonKey: 'ignore_links',
|
|
59
|
-
}),
|
|
60
|
-
ignoreImages: attributes_1.default.Boolean({
|
|
61
|
-
modelKey: 'ignoreImages',
|
|
62
|
-
jsonKey: 'ignore_images',
|
|
63
|
-
}),
|
|
64
|
-
ignoreTables: attributes_1.default.Boolean({
|
|
65
|
-
modelKey: 'ignoreTables',
|
|
66
|
-
jsonKey: 'ignore_tables',
|
|
67
|
-
}),
|
|
68
|
-
removeConclusionPhrases: attributes_1.default.Boolean({
|
|
69
|
-
modelKey: 'removeConclusionPhrases',
|
|
70
|
-
jsonKey: 'remove_conclusion_phrases',
|
|
71
|
-
}),
|
|
72
|
-
imagesAsMarkdown: attributes_1.default.Boolean({
|
|
73
|
-
modelKey: 'imagesAsMarkdown',
|
|
74
|
-
jsonKey: 'images_as_markdown',
|
|
75
|
-
}),
|
|
76
|
-
parseContacts: attributes_1.default.Boolean({
|
|
77
|
-
modelKey: 'parseContacts',
|
|
78
|
-
jsonKey: 'parse_contacts',
|
|
79
|
-
}),
|
|
80
|
-
};
|
|
81
81
|
var Neural = /** @class */ (function (_super) {
|
|
82
82
|
__extends(Neural, _super);
|
|
83
83
|
function Neural() {
|
package/lib/models/resource.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import RestfulModel from './restful-model';
|
|
2
|
+
import { Attribute } from './attributes';
|
|
2
3
|
import NylasConnection from '../nylas-connection';
|
|
3
4
|
export declare type ResourceProperties = {
|
|
4
5
|
email: string;
|
|
@@ -15,5 +16,7 @@ export default class Resource extends RestfulModel {
|
|
|
15
16
|
building: string;
|
|
16
17
|
floorNumber: string;
|
|
17
18
|
floorName?: string;
|
|
19
|
+
static collectionName: string;
|
|
20
|
+
static attributes: Record<string, Attribute>;
|
|
18
21
|
constructor(connection: NylasConnection, props?: ResourceProperties);
|
|
19
22
|
}
|
package/lib/models/resource.js
CHANGED
|
@@ -30,37 +30,37 @@ var Resource = /** @class */ (function (_super) {
|
|
|
30
30
|
_this.initAttributes(props);
|
|
31
31
|
return _this;
|
|
32
32
|
}
|
|
33
|
+
Resource.collectionName = 'resources';
|
|
34
|
+
Resource.attributes = {
|
|
35
|
+
object: attributes_1.default.String({
|
|
36
|
+
modelKey: 'object',
|
|
37
|
+
readOnly: true,
|
|
38
|
+
}),
|
|
39
|
+
email: attributes_1.default.String({
|
|
40
|
+
modelKey: 'email',
|
|
41
|
+
}),
|
|
42
|
+
name: attributes_1.default.String({
|
|
43
|
+
modelKey: 'name',
|
|
44
|
+
}),
|
|
45
|
+
capacity: attributes_1.default.String({
|
|
46
|
+
modelKey: 'capacity',
|
|
47
|
+
readOnly: true,
|
|
48
|
+
}),
|
|
49
|
+
building: attributes_1.default.String({
|
|
50
|
+
modelKey: 'building',
|
|
51
|
+
readOnly: true,
|
|
52
|
+
}),
|
|
53
|
+
floorName: attributes_1.default.String({
|
|
54
|
+
modelKey: 'floorName',
|
|
55
|
+
jsonKey: 'floor_name',
|
|
56
|
+
readOnly: true,
|
|
57
|
+
}),
|
|
58
|
+
floorNumber: attributes_1.default.String({
|
|
59
|
+
modelKey: 'floorNumber',
|
|
60
|
+
jsonKey: 'floor_number',
|
|
61
|
+
readOnly: true,
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
33
64
|
return Resource;
|
|
34
65
|
}(restful_model_1.default));
|
|
35
66
|
exports.default = Resource;
|
|
36
|
-
Resource.collectionName = 'resources';
|
|
37
|
-
Resource.attributes = {
|
|
38
|
-
object: attributes_1.default.String({
|
|
39
|
-
modelKey: 'object',
|
|
40
|
-
readOnly: true,
|
|
41
|
-
}),
|
|
42
|
-
email: attributes_1.default.String({
|
|
43
|
-
modelKey: 'email',
|
|
44
|
-
}),
|
|
45
|
-
name: attributes_1.default.String({
|
|
46
|
-
modelKey: 'name',
|
|
47
|
-
}),
|
|
48
|
-
capacity: attributes_1.default.String({
|
|
49
|
-
modelKey: 'capacity',
|
|
50
|
-
readOnly: true,
|
|
51
|
-
}),
|
|
52
|
-
building: attributes_1.default.String({
|
|
53
|
-
modelKey: 'building',
|
|
54
|
-
readOnly: true,
|
|
55
|
-
}),
|
|
56
|
-
floorName: attributes_1.default.String({
|
|
57
|
-
modelKey: 'floorName',
|
|
58
|
-
jsonKey: 'floor_name',
|
|
59
|
-
readOnly: true,
|
|
60
|
-
}),
|
|
61
|
-
floorNumber: attributes_1.default.String({
|
|
62
|
-
modelKey: 'floorNumber',
|
|
63
|
-
jsonKey: 'floor_number',
|
|
64
|
-
readOnly: true,
|
|
65
|
-
}),
|
|
66
|
-
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Attribute } from './attributes';
|
|
1
2
|
import NylasConnection from '../nylas-connection';
|
|
2
3
|
import Model from './model';
|
|
3
4
|
export declare type SaveCallback = (error: Error | null, result?: RestfulModel) => void;
|
|
@@ -19,13 +20,13 @@ export default class RestfulModel extends Model {
|
|
|
19
20
|
id?: string;
|
|
20
21
|
object?: string;
|
|
21
22
|
baseUrl?: string;
|
|
23
|
+
static attributes: Record<string, Attribute>;
|
|
22
24
|
constructor(connection: NylasConnection, props?: Partial<RestfulModelJSON>);
|
|
23
25
|
static propsFromJSON(json: Partial<RestfulModelJSON> | undefined, parent: unknown): Partial<RestfulModelJSON>;
|
|
24
26
|
isEqual(other: RestfulModel): boolean;
|
|
25
27
|
fromJSON(json?: Partial<RestfulModelJSON>): this;
|
|
26
28
|
pathPrefix(): string;
|
|
27
29
|
saveEndpoint(): string;
|
|
28
|
-
saveRequestBody(): Record<string, unknown>;
|
|
29
30
|
deleteRequestQueryString(_params: Record<string, unknown>): Record<string, unknown>;
|
|
30
31
|
deleteRequestBody(_params: Record<string, unknown>): Record<string, unknown>;
|
|
31
32
|
deleteRequestOptions(params: Record<string, unknown>): requestOptions;
|
|
@@ -51,11 +51,6 @@ var RestfulModel = /** @class */ (function (_super) {
|
|
|
51
51
|
var collectionName = this.constructor.collectionName;
|
|
52
52
|
return this.pathPrefix() + "/" + collectionName;
|
|
53
53
|
};
|
|
54
|
-
// saveRequestBody is used by save(). It returns a JSON dict containing only the
|
|
55
|
-
// fields the API allows updating. Subclasses should override this method.
|
|
56
|
-
RestfulModel.prototype.saveRequestBody = function () {
|
|
57
|
-
return this.toJSON(true);
|
|
58
|
-
};
|
|
59
54
|
// deleteRequestQueryString is used by delete(). Subclasses should override this method.
|
|
60
55
|
RestfulModel.prototype.deleteRequestQueryString = function (_params) {
|
|
61
56
|
return {};
|
|
@@ -131,21 +126,21 @@ var RestfulModel = /** @class */ (function (_super) {
|
|
|
131
126
|
};
|
|
132
127
|
RestfulModel.endpointName = ''; // overrridden in subclasses
|
|
133
128
|
RestfulModel.collectionName = ''; // overrridden in subclasses
|
|
129
|
+
RestfulModel.attributes = {
|
|
130
|
+
id: attributes_1.default.String({
|
|
131
|
+
modelKey: 'id',
|
|
132
|
+
readOnly: true,
|
|
133
|
+
}),
|
|
134
|
+
object: attributes_1.default.String({
|
|
135
|
+
modelKey: 'object',
|
|
136
|
+
readOnly: true,
|
|
137
|
+
}),
|
|
138
|
+
accountId: attributes_1.default.String({
|
|
139
|
+
modelKey: 'accountId',
|
|
140
|
+
jsonKey: 'account_id',
|
|
141
|
+
readOnly: true,
|
|
142
|
+
}),
|
|
143
|
+
};
|
|
134
144
|
return RestfulModel;
|
|
135
145
|
}(model_1.default));
|
|
136
146
|
exports.default = RestfulModel;
|
|
137
|
-
RestfulModel.attributes = {
|
|
138
|
-
id: attributes_1.default.String({
|
|
139
|
-
modelKey: 'id',
|
|
140
|
-
readOnly: true,
|
|
141
|
-
}),
|
|
142
|
-
object: attributes_1.default.String({
|
|
143
|
-
modelKey: 'object',
|
|
144
|
-
readOnly: true,
|
|
145
|
-
}),
|
|
146
|
-
accountId: attributes_1.default.String({
|
|
147
|
-
modelKey: 'accountId',
|
|
148
|
-
jsonKey: 'account_id',
|
|
149
|
-
readOnly: true,
|
|
150
|
-
}),
|
|
151
|
-
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Attribute } from './attributes';
|
|
1
2
|
import SchedulerTimeSlot from './scheduler-time-slot';
|
|
2
3
|
import Model from './model';
|
|
3
4
|
export declare type SchedulerBookingConfirmationProperties = {
|
|
@@ -33,6 +34,7 @@ export declare class SchedulerBookingConfirmation extends Model implements Sched
|
|
|
33
34
|
recipientName?: string;
|
|
34
35
|
recipientTz?: string;
|
|
35
36
|
title?: string;
|
|
37
|
+
static attributes: Record<string, Attribute>;
|
|
36
38
|
constructor(props?: SchedulerBookingConfirmationProperties);
|
|
37
39
|
}
|
|
38
40
|
export declare type SchedulerBookingRequestProperties = {
|
|
@@ -56,6 +58,7 @@ export default class SchedulerBookingRequest extends Model implements SchedulerB
|
|
|
56
58
|
replacesBookingHash?: string;
|
|
57
59
|
slot?: SchedulerTimeSlot;
|
|
58
60
|
timezone?: string;
|
|
61
|
+
static attributes: Record<string, Attribute>;
|
|
59
62
|
constructor(props?: SchedulerBookingRequestProperties);
|
|
60
63
|
toJSON(enforceReadOnly?: boolean): Record<string, any>;
|
|
61
64
|
}
|
|
@@ -26,68 +26,68 @@ var SchedulerBookingConfirmation = /** @class */ (function (_super) {
|
|
|
26
26
|
_this.initAttributes(props);
|
|
27
27
|
return _this;
|
|
28
28
|
}
|
|
29
|
+
SchedulerBookingConfirmation.attributes = {
|
|
30
|
+
id: attributes_1.default.Number({
|
|
31
|
+
modelKey: 'id',
|
|
32
|
+
}),
|
|
33
|
+
accountId: attributes_1.default.String({
|
|
34
|
+
modelKey: 'accountId',
|
|
35
|
+
jsonKey: 'account_id',
|
|
36
|
+
}),
|
|
37
|
+
additionalFieldValues: attributes_1.default.Object({
|
|
38
|
+
modelKey: 'additionalFieldValues',
|
|
39
|
+
jsonKey: 'additional_field_values',
|
|
40
|
+
}),
|
|
41
|
+
calendarEventId: attributes_1.default.String({
|
|
42
|
+
modelKey: 'calendarEventId',
|
|
43
|
+
jsonKey: 'calendar_event_id',
|
|
44
|
+
}),
|
|
45
|
+
calendarId: attributes_1.default.String({
|
|
46
|
+
modelKey: 'calendarId',
|
|
47
|
+
jsonKey: 'calendar_id',
|
|
48
|
+
}),
|
|
49
|
+
editHash: attributes_1.default.String({
|
|
50
|
+
modelKey: 'editHash',
|
|
51
|
+
jsonKey: 'edit_hash',
|
|
52
|
+
}),
|
|
53
|
+
startTime: attributes_1.default.DateTime({
|
|
54
|
+
modelKey: 'startTime',
|
|
55
|
+
jsonKey: 'start_time',
|
|
56
|
+
}),
|
|
57
|
+
endTime: attributes_1.default.DateTime({
|
|
58
|
+
modelKey: 'endTime',
|
|
59
|
+
jsonKey: 'end_time',
|
|
60
|
+
}),
|
|
61
|
+
isConfirmed: attributes_1.default.Boolean({
|
|
62
|
+
modelKey: 'isConfirmed',
|
|
63
|
+
jsonKey: 'is_confirmed',
|
|
64
|
+
}),
|
|
65
|
+
location: attributes_1.default.String({
|
|
66
|
+
modelKey: 'location',
|
|
67
|
+
}),
|
|
68
|
+
recipientEmail: attributes_1.default.String({
|
|
69
|
+
modelKey: 'recipientEmail',
|
|
70
|
+
jsonKey: 'recipient_email',
|
|
71
|
+
}),
|
|
72
|
+
recipientLocale: attributes_1.default.String({
|
|
73
|
+
modelKey: 'recipientLocale',
|
|
74
|
+
jsonKey: 'recipient_locale',
|
|
75
|
+
}),
|
|
76
|
+
recipientName: attributes_1.default.String({
|
|
77
|
+
modelKey: 'recipientName',
|
|
78
|
+
jsonKey: 'recipient_name',
|
|
79
|
+
}),
|
|
80
|
+
recipientTz: attributes_1.default.String({
|
|
81
|
+
modelKey: 'recipientTz',
|
|
82
|
+
jsonKey: 'recipient_tz',
|
|
83
|
+
}),
|
|
84
|
+
title: attributes_1.default.String({
|
|
85
|
+
modelKey: 'title',
|
|
86
|
+
}),
|
|
87
|
+
};
|
|
29
88
|
return SchedulerBookingConfirmation;
|
|
30
89
|
}(model_1.default));
|
|
31
90
|
exports.SchedulerBookingConfirmation = SchedulerBookingConfirmation;
|
|
32
|
-
SchedulerBookingConfirmation.attributes = {
|
|
33
|
-
id: attributes_1.default.Number({
|
|
34
|
-
modelKey: 'id',
|
|
35
|
-
}),
|
|
36
|
-
accountId: attributes_1.default.String({
|
|
37
|
-
modelKey: 'accountId',
|
|
38
|
-
jsonKey: 'account_id',
|
|
39
|
-
}),
|
|
40
|
-
additionalFieldValues: attributes_1.default.Object({
|
|
41
|
-
modelKey: 'additionalFieldValues',
|
|
42
|
-
jsonKey: 'additional_field_values',
|
|
43
|
-
}),
|
|
44
|
-
calendarEventId: attributes_1.default.String({
|
|
45
|
-
modelKey: 'calendarEventId',
|
|
46
|
-
jsonKey: 'calendar_event_id',
|
|
47
|
-
}),
|
|
48
|
-
calendarId: attributes_1.default.String({
|
|
49
|
-
modelKey: 'calendarId',
|
|
50
|
-
jsonKey: 'calendar_id',
|
|
51
|
-
}),
|
|
52
|
-
editHash: attributes_1.default.String({
|
|
53
|
-
modelKey: 'editHash',
|
|
54
|
-
jsonKey: 'edit_hash',
|
|
55
|
-
}),
|
|
56
|
-
startTime: attributes_1.default.DateTime({
|
|
57
|
-
modelKey: 'startTime',
|
|
58
|
-
jsonKey: 'start_time',
|
|
59
|
-
}),
|
|
60
|
-
endTime: attributes_1.default.DateTime({
|
|
61
|
-
modelKey: 'endTime',
|
|
62
|
-
jsonKey: 'end_time',
|
|
63
|
-
}),
|
|
64
|
-
isConfirmed: attributes_1.default.Boolean({
|
|
65
|
-
modelKey: 'isConfirmed',
|
|
66
|
-
jsonKey: 'is_confirmed',
|
|
67
|
-
}),
|
|
68
|
-
location: attributes_1.default.String({
|
|
69
|
-
modelKey: 'location',
|
|
70
|
-
}),
|
|
71
|
-
recipientEmail: attributes_1.default.String({
|
|
72
|
-
modelKey: 'recipientEmail',
|
|
73
|
-
jsonKey: 'recipient_email',
|
|
74
|
-
}),
|
|
75
|
-
recipientLocale: attributes_1.default.String({
|
|
76
|
-
modelKey: 'recipientLocale',
|
|
77
|
-
jsonKey: 'recipient_locale',
|
|
78
|
-
}),
|
|
79
|
-
recipientName: attributes_1.default.String({
|
|
80
|
-
modelKey: 'recipientName',
|
|
81
|
-
jsonKey: 'recipient_name',
|
|
82
|
-
}),
|
|
83
|
-
recipientTz: attributes_1.default.String({
|
|
84
|
-
modelKey: 'recipientTz',
|
|
85
|
-
jsonKey: 'recipient_tz',
|
|
86
|
-
}),
|
|
87
|
-
title: attributes_1.default.String({
|
|
88
|
-
modelKey: 'title',
|
|
89
|
-
}),
|
|
90
|
-
};
|
|
91
91
|
var SchedulerBookingRequest = /** @class */ (function (_super) {
|
|
92
92
|
__extends(SchedulerBookingRequest, _super);
|
|
93
93
|
function SchedulerBookingRequest(props) {
|
|
@@ -109,40 +109,40 @@ var SchedulerBookingRequest = /** @class */ (function (_super) {
|
|
|
109
109
|
}
|
|
110
110
|
return json;
|
|
111
111
|
};
|
|
112
|
+
SchedulerBookingRequest.attributes = {
|
|
113
|
+
additionalEmails: attributes_1.default.StringList({
|
|
114
|
+
modelKey: 'additionalEmails',
|
|
115
|
+
jsonKey: 'additional_emails',
|
|
116
|
+
}),
|
|
117
|
+
additionalValues: attributes_1.default.Object({
|
|
118
|
+
modelKey: 'additionalValues',
|
|
119
|
+
jsonKey: 'additional_values',
|
|
120
|
+
}),
|
|
121
|
+
email: attributes_1.default.String({
|
|
122
|
+
modelKey: 'email',
|
|
123
|
+
}),
|
|
124
|
+
locale: attributes_1.default.String({
|
|
125
|
+
modelKey: 'locale',
|
|
126
|
+
}),
|
|
127
|
+
name: attributes_1.default.String({
|
|
128
|
+
modelKey: 'name',
|
|
129
|
+
}),
|
|
130
|
+
pageHostname: attributes_1.default.String({
|
|
131
|
+
modelKey: 'pageHostname',
|
|
132
|
+
jsonKey: 'page_hostname',
|
|
133
|
+
}),
|
|
134
|
+
replacesBookingHash: attributes_1.default.String({
|
|
135
|
+
modelKey: 'replacesBookingHash',
|
|
136
|
+
jsonKey: 'replaces_booking_hash',
|
|
137
|
+
}),
|
|
138
|
+
slot: attributes_1.default.Object({
|
|
139
|
+
modelKey: 'slot',
|
|
140
|
+
itemClass: scheduler_time_slot_1.default,
|
|
141
|
+
}),
|
|
142
|
+
timezone: attributes_1.default.String({
|
|
143
|
+
modelKey: 'timezone',
|
|
144
|
+
}),
|
|
145
|
+
};
|
|
112
146
|
return SchedulerBookingRequest;
|
|
113
147
|
}(model_1.default));
|
|
114
148
|
exports.default = SchedulerBookingRequest;
|
|
115
|
-
SchedulerBookingRequest.attributes = {
|
|
116
|
-
additionalEmails: attributes_1.default.StringList({
|
|
117
|
-
modelKey: 'additionalEmails',
|
|
118
|
-
jsonKey: 'additional_emails',
|
|
119
|
-
}),
|
|
120
|
-
additionalValues: attributes_1.default.Object({
|
|
121
|
-
modelKey: 'additionalValues',
|
|
122
|
-
jsonKey: 'additional_values',
|
|
123
|
-
}),
|
|
124
|
-
email: attributes_1.default.String({
|
|
125
|
-
modelKey: 'email',
|
|
126
|
-
}),
|
|
127
|
-
locale: attributes_1.default.String({
|
|
128
|
-
modelKey: 'locale',
|
|
129
|
-
}),
|
|
130
|
-
name: attributes_1.default.String({
|
|
131
|
-
modelKey: 'name',
|
|
132
|
-
}),
|
|
133
|
-
pageHostname: attributes_1.default.String({
|
|
134
|
-
modelKey: 'pageHostname',
|
|
135
|
-
jsonKey: 'page_hostname',
|
|
136
|
-
}),
|
|
137
|
-
replacesBookingHash: attributes_1.default.String({
|
|
138
|
-
modelKey: 'replacesBookingHash',
|
|
139
|
-
jsonKey: 'replaces_booking_hash',
|
|
140
|
-
}),
|
|
141
|
-
slot: attributes_1.default.Object({
|
|
142
|
-
modelKey: 'slot',
|
|
143
|
-
itemClass: scheduler_time_slot_1.default,
|
|
144
|
-
}),
|
|
145
|
-
timezone: attributes_1.default.String({
|
|
146
|
-
modelKey: 'timezone',
|
|
147
|
-
}),
|
|
148
|
-
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Attribute } from './attributes';
|
|
1
2
|
import Model from './model';
|
|
2
3
|
export declare type SchedulerTimeSlotProperties = {
|
|
3
4
|
accountId?: string;
|
|
@@ -14,5 +15,6 @@ export default class SchedulerTimeSlot extends Model implements SchedulerTimeSlo
|
|
|
14
15
|
emails?: string[];
|
|
15
16
|
start?: Date;
|
|
16
17
|
end?: Date;
|
|
18
|
+
static attributes: Record<string, Attribute>;
|
|
17
19
|
constructor(props?: SchedulerTimeSlotProperties);
|
|
18
20
|
}
|