dataforseo-client 1.0.5 → 1.0.7

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.
Files changed (6) hide show
  1. package/README.md +1 -0
  2. package/main.d.ts +93543 -0
  3. package/main.js +151 -211
  4. package/main.ts +224 -344
  5. package/package.json +11 -5
  6. package/README.txt +0 -3
package/main.ts CHANGED
@@ -20204,13 +20204,13 @@ export class BaseOnPageResourceItemInfo implements IBaseOnPageResourceItemInfo {
20204
20204
  result.init(data);
20205
20205
  return result;
20206
20206
  }
20207
- if (data["resource_type"] === "stylesheet") {
20208
- let result = new StylesheetResourceElementItem();
20207
+ if (data["resource_type"] === "script") {
20208
+ let result = new ScriptResourceElementItem();
20209
20209
  result.init(data);
20210
20210
  return result;
20211
20211
  }
20212
- if (data["resource_type"] === "script") {
20213
- let result = new ScriptResourceElementItem();
20212
+ if (data["resource_type"] === "stylesheet") {
20213
+ let result = new StylesheetResourceElementItem();
20214
20214
  result.init(data);
20215
20215
  return result;
20216
20216
  }
@@ -21596,148 +21596,6 @@ export interface ISocialMetricsInfo {
21596
21596
  [key: string]: any;
21597
21597
  }
21598
21598
 
21599
- export class ConnotationTypeInfo implements IConnotationTypeInfo {
21600
- /** positive connotation */
21601
- positive?: number | undefined;
21602
- /** negative connotation */
21603
- negative?: number | undefined;
21604
- /** neutral connotation */
21605
- neutral?: number | undefined;
21606
-
21607
- [key: string]: any;
21608
-
21609
- constructor(data?: IConnotationTypeInfo) {
21610
- if (data) {
21611
- for (var property in data) {
21612
- if (data.hasOwnProperty(property))
21613
- (<any>this)[property] = (<any>data)[property];
21614
- }
21615
- }
21616
- }
21617
-
21618
- init(_data?: any) {
21619
- if (_data) {
21620
- for (var property in _data) {
21621
- if (_data.hasOwnProperty(property))
21622
- this[property] = _data[property];
21623
- }
21624
- this.positive = _data["positive"];
21625
- this.negative = _data["negative"];
21626
- this.neutral = _data["neutral"];
21627
- }
21628
- }
21629
-
21630
- static fromJS(data: any): ConnotationTypeInfo {
21631
- data = typeof data === 'object' ? data : {};
21632
- let result = new ConnotationTypeInfo();
21633
- result.init(data);
21634
- return result;
21635
- }
21636
-
21637
- toJSON(data?: any) {
21638
- data = typeof data === 'object' ? data : {};
21639
- for (var property in this) {
21640
- if (this.hasOwnProperty(property))
21641
- data[property] = this[property];
21642
- }
21643
- data["positive"] = this.positive;
21644
- data["negative"] = this.negative;
21645
- data["neutral"] = this.neutral;
21646
- return data;
21647
- }
21648
- }
21649
-
21650
- export interface IConnotationTypeInfo {
21651
- /** positive connotation */
21652
- positive?: number | undefined;
21653
- /** negative connotation */
21654
- negative?: number | undefined;
21655
- /** neutral connotation */
21656
- neutral?: number | undefined;
21657
-
21658
- [key: string]: any;
21659
- }
21660
-
21661
- export class SentimentConnotationInfo implements ISentimentConnotationInfo {
21662
- /** anger */
21663
- anger?: number | undefined;
21664
- /** happiness */
21665
- happiness?: number | undefined;
21666
- /** love */
21667
- love?: number | undefined;
21668
- /** sadness */
21669
- sadness?: number | undefined;
21670
- /** share */
21671
- share?: number | undefined;
21672
- /** fun */
21673
- fun?: number | undefined;
21674
-
21675
- [key: string]: any;
21676
-
21677
- constructor(data?: ISentimentConnotationInfo) {
21678
- if (data) {
21679
- for (var property in data) {
21680
- if (data.hasOwnProperty(property))
21681
- (<any>this)[property] = (<any>data)[property];
21682
- }
21683
- }
21684
- }
21685
-
21686
- init(_data?: any) {
21687
- if (_data) {
21688
- for (var property in _data) {
21689
- if (_data.hasOwnProperty(property))
21690
- this[property] = _data[property];
21691
- }
21692
- this.anger = _data["anger"];
21693
- this.happiness = _data["happiness"];
21694
- this.love = _data["love"];
21695
- this.sadness = _data["sadness"];
21696
- this.share = _data["share"];
21697
- this.fun = _data["fun"];
21698
- }
21699
- }
21700
-
21701
- static fromJS(data: any): SentimentConnotationInfo {
21702
- data = typeof data === 'object' ? data : {};
21703
- let result = new SentimentConnotationInfo();
21704
- result.init(data);
21705
- return result;
21706
- }
21707
-
21708
- toJSON(data?: any) {
21709
- data = typeof data === 'object' ? data : {};
21710
- for (var property in this) {
21711
- if (this.hasOwnProperty(property))
21712
- data[property] = this[property];
21713
- }
21714
- data["anger"] = this.anger;
21715
- data["happiness"] = this.happiness;
21716
- data["love"] = this.love;
21717
- data["sadness"] = this.sadness;
21718
- data["share"] = this.share;
21719
- data["fun"] = this.fun;
21720
- return data;
21721
- }
21722
- }
21723
-
21724
- export interface ISentimentConnotationInfo {
21725
- /** anger */
21726
- anger?: number | undefined;
21727
- /** happiness */
21728
- happiness?: number | undefined;
21729
- /** love */
21730
- love?: number | undefined;
21731
- /** sadness */
21732
- sadness?: number | undefined;
21733
- /** share */
21734
- share?: number | undefined;
21735
- /** fun */
21736
- fun?: number | undefined;
21737
-
21738
- [key: string]: any;
21739
- }
21740
-
21741
21599
  export class TopDomainInfo implements ITopDomainInfo {
21742
21600
  domain?: string | undefined;
21743
21601
  count?: number | undefined;
@@ -55379,8 +55237,7 @@ answer_box, carousel, events, featured_snippet, hotels_pack, images, jobs, local
55379
55237
  se_results_count?: number | undefined;
55380
55238
  /** the number of results returned in the items array */
55381
55239
  items_count?: number | undefined;
55382
- /** additional items present in the element
55383
- if there are none, equals null */
55240
+ /** items featured in the faq_box */
55384
55241
  items?: (BaseSerpElementItem | undefined)[] | undefined;
55385
55242
 
55386
55243
  [key: string]: any;
@@ -55492,8 +55349,7 @@ answer_box, carousel, events, featured_snippet, hotels_pack, images, jobs, local
55492
55349
  se_results_count?: number | undefined;
55493
55350
  /** the number of results returned in the items array */
55494
55351
  items_count?: number | undefined;
55495
- /** additional items present in the element
55496
- if there are none, equals null */
55352
+ /** items featured in the faq_box */
55497
55353
  items?: (BaseSerpElementItem | undefined)[] | undefined;
55498
55354
 
55499
55355
  [key: string]: any;
@@ -146218,6 +146074,192 @@ the amount of time a browser needs to complete downloading a resource */
146218
146074
  [key: string]: any;
146219
146075
  }
146220
146076
 
146077
+ export class ScriptResourceElementItem extends BaseOnPageResourceItemInfo implements IScriptResourceElementItem {
146078
+ /** resource properties
146079
+ the value depends on the resource_type
146080
+ note that if you do not indicate a url when setting a task, resource’s meta is returned based on the data from the page where our crawler first saw the resource;
146081
+ to obtain resource’s meta from a particular url, specify that URL when setting a task */
146082
+ meta?: ResourceMetaInfo | undefined;
146083
+ /** status code of the page where a given resource is located */
146084
+ status_code?: number | undefined;
146085
+ /** location header
146086
+ indicates the URL to redirect a page to */
146087
+ location?: string | undefined;
146088
+ /** resource URL */
146089
+ url?: string | undefined;
146090
+ /** resource size
146091
+ indicates the size of a given resource measured in bytes */
146092
+ size?: number | undefined;
146093
+ /** resource size after encoding
146094
+ indicates the size of the encoded resource measured in bytes */
146095
+ encoded_size?: number | undefined;
146096
+ /** compressed resource size
146097
+ indicates the compressed size of a given resource in bytes */
146098
+ total_transfer_size?: number | undefined;
146099
+ /** date and time when a resource was fetched
146100
+ in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”
146101
+ example:
146102
+ 2021-02-17 13:54:15 +00:00 */
146103
+ fetch_time?: string | undefined;
146104
+ /** resource fething time range */
146105
+ fetch_timing?: FetchTiming | undefined;
146106
+ /** instructions for caching */
146107
+ cache_control?: CacheControl | undefined;
146108
+ /** resource check-ups
146109
+ contents of the array depend on the resource_type */
146110
+ checks?: { [key: string]: boolean; } | undefined;
146111
+ /** resource errors and warnings */
146112
+ resource_errors?: OnPageResourceIssueInfo | undefined;
146113
+ /** type of encoding */
146114
+ content_encoding?: string | undefined;
146115
+ /** types of media used to display a resource */
146116
+ media_type?: string | undefined;
146117
+ /** indicates the expected type of resource
146118
+ for example, if "resource_type": "broken", accept_type will indicate the type of the broken resource
146119
+ possible values:
146120
+ any, none, image, sitemap, robots, script, stylesheet, redirect, html, text, other, font */
146121
+ accept_type?: string | undefined;
146122
+ /** server version */
146123
+ server?: string | undefined;
146124
+ /** contains data on changes related to the resource
146125
+ if there is no data, the value will be null */
146126
+ last_modified?: LastModified | undefined;
146127
+
146128
+ [key: string]: any;
146129
+
146130
+ constructor(data?: IScriptResourceElementItem) {
146131
+ super(data);
146132
+ this._discriminator = "script";
146133
+ }
146134
+
146135
+ init(_data?: any) {
146136
+ super.init(_data);
146137
+ if (_data) {
146138
+ for (var property in _data) {
146139
+ if (_data.hasOwnProperty(property))
146140
+ this[property] = _data[property];
146141
+ }
146142
+ this.meta = _data["meta"] ? ResourceMetaInfo.fromJS(_data["meta"]) : <any>undefined;
146143
+ this.status_code = _data["status_code"];
146144
+ this.location = _data["location"];
146145
+ this.url = _data["url"];
146146
+ this.size = _data["size"];
146147
+ this.encoded_size = _data["encoded_size"];
146148
+ this.total_transfer_size = _data["total_transfer_size"];
146149
+ this.fetch_time = _data["fetch_time"];
146150
+ this.fetch_timing = _data["fetch_timing"] ? FetchTiming.fromJS(_data["fetch_timing"]) : <any>undefined;
146151
+ this.cache_control = _data["cache_control"] ? CacheControl.fromJS(_data["cache_control"]) : <any>undefined;
146152
+ if (_data["checks"]) {
146153
+ this.checks = {} as any;
146154
+ for (let key in _data["checks"]) {
146155
+ if (_data["checks"].hasOwnProperty(key))
146156
+ (<any>this.checks)![key] = _data["checks"][key];
146157
+ }
146158
+ }
146159
+ this.resource_errors = _data["resource_errors"] ? OnPageResourceIssueInfo.fromJS(_data["resource_errors"]) : <any>undefined;
146160
+ this.content_encoding = _data["content_encoding"];
146161
+ this.media_type = _data["media_type"];
146162
+ this.accept_type = _data["accept_type"];
146163
+ this.server = _data["server"];
146164
+ this.last_modified = _data["last_modified"] ? LastModified.fromJS(_data["last_modified"]) : <any>undefined;
146165
+ }
146166
+ }
146167
+
146168
+ static fromJS(data: any): ScriptResourceElementItem {
146169
+ data = typeof data === 'object' ? data : {};
146170
+ let result = new ScriptResourceElementItem();
146171
+ result.init(data);
146172
+ return result;
146173
+ }
146174
+
146175
+ toJSON(data?: any) {
146176
+ data = typeof data === 'object' ? data : {};
146177
+ for (var property in this) {
146178
+ if (this.hasOwnProperty(property))
146179
+ data[property] = this[property];
146180
+ }
146181
+ data["meta"] = this.meta ? this.meta.toJSON() : <any>undefined;
146182
+ data["status_code"] = this.status_code;
146183
+ data["location"] = this.location;
146184
+ data["url"] = this.url;
146185
+ data["size"] = this.size;
146186
+ data["encoded_size"] = this.encoded_size;
146187
+ data["total_transfer_size"] = this.total_transfer_size;
146188
+ data["fetch_time"] = this.fetch_time;
146189
+ data["fetch_timing"] = this.fetch_timing ? this.fetch_timing.toJSON() : <any>undefined;
146190
+ data["cache_control"] = this.cache_control ? this.cache_control.toJSON() : <any>undefined;
146191
+ if (this.checks) {
146192
+ data["checks"] = {};
146193
+ for (let key in this.checks) {
146194
+ if (this.checks.hasOwnProperty(key))
146195
+ (<any>data["checks"])[key] = (<any>this.checks)[key];
146196
+ }
146197
+ }
146198
+ data["resource_errors"] = this.resource_errors ? this.resource_errors.toJSON() : <any>undefined;
146199
+ data["content_encoding"] = this.content_encoding;
146200
+ data["media_type"] = this.media_type;
146201
+ data["accept_type"] = this.accept_type;
146202
+ data["server"] = this.server;
146203
+ data["last_modified"] = this.last_modified ? this.last_modified.toJSON() : <any>undefined;
146204
+ super.toJSON(data);
146205
+ return data;
146206
+ }
146207
+ }
146208
+
146209
+ export interface IScriptResourceElementItem extends IBaseOnPageResourceItemInfo {
146210
+ /** resource properties
146211
+ the value depends on the resource_type
146212
+ note that if you do not indicate a url when setting a task, resource’s meta is returned based on the data from the page where our crawler first saw the resource;
146213
+ to obtain resource’s meta from a particular url, specify that URL when setting a task */
146214
+ meta?: ResourceMetaInfo | undefined;
146215
+ /** status code of the page where a given resource is located */
146216
+ status_code?: number | undefined;
146217
+ /** location header
146218
+ indicates the URL to redirect a page to */
146219
+ location?: string | undefined;
146220
+ /** resource URL */
146221
+ url?: string | undefined;
146222
+ /** resource size
146223
+ indicates the size of a given resource measured in bytes */
146224
+ size?: number | undefined;
146225
+ /** resource size after encoding
146226
+ indicates the size of the encoded resource measured in bytes */
146227
+ encoded_size?: number | undefined;
146228
+ /** compressed resource size
146229
+ indicates the compressed size of a given resource in bytes */
146230
+ total_transfer_size?: number | undefined;
146231
+ /** date and time when a resource was fetched
146232
+ in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”
146233
+ example:
146234
+ 2021-02-17 13:54:15 +00:00 */
146235
+ fetch_time?: string | undefined;
146236
+ /** resource fething time range */
146237
+ fetch_timing?: FetchTiming | undefined;
146238
+ /** instructions for caching */
146239
+ cache_control?: CacheControl | undefined;
146240
+ /** resource check-ups
146241
+ contents of the array depend on the resource_type */
146242
+ checks?: { [key: string]: boolean; } | undefined;
146243
+ /** resource errors and warnings */
146244
+ resource_errors?: OnPageResourceIssueInfo | undefined;
146245
+ /** type of encoding */
146246
+ content_encoding?: string | undefined;
146247
+ /** types of media used to display a resource */
146248
+ media_type?: string | undefined;
146249
+ /** indicates the expected type of resource
146250
+ for example, if "resource_type": "broken", accept_type will indicate the type of the broken resource
146251
+ possible values:
146252
+ any, none, image, sitemap, robots, script, stylesheet, redirect, html, text, other, font */
146253
+ accept_type?: string | undefined;
146254
+ /** server version */
146255
+ server?: string | undefined;
146256
+ /** contains data on changes related to the resource
146257
+ if there is no data, the value will be null */
146258
+ last_modified?: LastModified | undefined;
146259
+
146260
+ [key: string]: any;
146261
+ }
146262
+
146221
146263
  export class StylesheetResourceElementItem extends BaseOnPageResourceItemInfo implements IStylesheetResourceElementItem {
146222
146264
  /** resource properties
146223
146265
  the value depends on the resource_type
@@ -146577,192 +146619,6 @@ export interface IOnPageResourcesTaskInfo extends IBaseResponseTaskInfo {
146577
146619
  [key: string]: any;
146578
146620
  }
146579
146621
 
146580
- export class ScriptResourceElementItem extends BaseOnPageResourceItemInfo implements IScriptResourceElementItem {
146581
- /** resource properties
146582
- the value depends on the resource_type
146583
- note that if you do not indicate a url when setting a task, resource’s meta is returned based on the data from the page where our crawler first saw the resource;
146584
- to obtain resource’s meta from a particular url, specify that URL when setting a task */
146585
- meta?: ResourceMetaInfo | undefined;
146586
- /** status code of the page where a given resource is located */
146587
- status_code?: number | undefined;
146588
- /** location header
146589
- indicates the URL to redirect a page to */
146590
- location?: string | undefined;
146591
- /** resource URL */
146592
- url?: string | undefined;
146593
- /** resource size
146594
- indicates the size of a given resource measured in bytes */
146595
- size?: number | undefined;
146596
- /** resource size after encoding
146597
- indicates the size of the encoded resource measured in bytes */
146598
- encoded_size?: number | undefined;
146599
- /** compressed resource size
146600
- indicates the compressed size of a given resource in bytes */
146601
- total_transfer_size?: number | undefined;
146602
- /** date and time when a resource was fetched
146603
- in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”
146604
- example:
146605
- 2021-02-17 13:54:15 +00:00 */
146606
- fetch_time?: string | undefined;
146607
- /** resource fething time range */
146608
- fetch_timing?: FetchTiming | undefined;
146609
- /** instructions for caching */
146610
- cache_control?: CacheControl | undefined;
146611
- /** resource check-ups
146612
- contents of the array depend on the resource_type */
146613
- checks?: { [key: string]: boolean; } | undefined;
146614
- /** type of encoding */
146615
- content_encoding?: string | undefined;
146616
- /** types of media used to display a resource */
146617
- media_type?: string | undefined;
146618
- /** indicates the expected type of resource
146619
- for example, if "resource_type": "broken", accept_type will indicate the type of the broken resource
146620
- possible values:
146621
- any, none, image, sitemap, robots, script, stylesheet, redirect, html, text, other, font */
146622
- accept_type?: string | undefined;
146623
- /** server version */
146624
- server?: string | undefined;
146625
- /** contains data on changes related to the resource
146626
- if there is no data, the value will be null */
146627
- last_modified?: LastModified | undefined;
146628
- /** resource errors and warnings */
146629
- resource_errors?: OnPageResourceIssueInfo | undefined;
146630
-
146631
- [key: string]: any;
146632
-
146633
- constructor(data?: IScriptResourceElementItem) {
146634
- super(data);
146635
- this._discriminator = "script";
146636
- }
146637
-
146638
- init(_data?: any) {
146639
- super.init(_data);
146640
- if (_data) {
146641
- for (var property in _data) {
146642
- if (_data.hasOwnProperty(property))
146643
- this[property] = _data[property];
146644
- }
146645
- this.meta = _data["meta"] ? ResourceMetaInfo.fromJS(_data["meta"]) : <any>undefined;
146646
- this.status_code = _data["status_code"];
146647
- this.location = _data["location"];
146648
- this.url = _data["url"];
146649
- this.size = _data["size"];
146650
- this.encoded_size = _data["encoded_size"];
146651
- this.total_transfer_size = _data["total_transfer_size"];
146652
- this.fetch_time = _data["fetch_time"];
146653
- this.fetch_timing = _data["fetch_timing"] ? FetchTiming.fromJS(_data["fetch_timing"]) : <any>undefined;
146654
- this.cache_control = _data["cache_control"] ? CacheControl.fromJS(_data["cache_control"]) : <any>undefined;
146655
- if (_data["checks"]) {
146656
- this.checks = {} as any;
146657
- for (let key in _data["checks"]) {
146658
- if (_data["checks"].hasOwnProperty(key))
146659
- (<any>this.checks)![key] = _data["checks"][key];
146660
- }
146661
- }
146662
- this.content_encoding = _data["content_encoding"];
146663
- this.media_type = _data["media_type"];
146664
- this.accept_type = _data["accept_type"];
146665
- this.server = _data["server"];
146666
- this.last_modified = _data["last_modified"] ? LastModified.fromJS(_data["last_modified"]) : <any>undefined;
146667
- this.resource_errors = _data["resource_errors"] ? OnPageResourceIssueInfo.fromJS(_data["resource_errors"]) : <any>undefined;
146668
- }
146669
- }
146670
-
146671
- static fromJS(data: any): ScriptResourceElementItem {
146672
- data = typeof data === 'object' ? data : {};
146673
- let result = new ScriptResourceElementItem();
146674
- result.init(data);
146675
- return result;
146676
- }
146677
-
146678
- toJSON(data?: any) {
146679
- data = typeof data === 'object' ? data : {};
146680
- for (var property in this) {
146681
- if (this.hasOwnProperty(property))
146682
- data[property] = this[property];
146683
- }
146684
- data["meta"] = this.meta ? this.meta.toJSON() : <any>undefined;
146685
- data["status_code"] = this.status_code;
146686
- data["location"] = this.location;
146687
- data["url"] = this.url;
146688
- data["size"] = this.size;
146689
- data["encoded_size"] = this.encoded_size;
146690
- data["total_transfer_size"] = this.total_transfer_size;
146691
- data["fetch_time"] = this.fetch_time;
146692
- data["fetch_timing"] = this.fetch_timing ? this.fetch_timing.toJSON() : <any>undefined;
146693
- data["cache_control"] = this.cache_control ? this.cache_control.toJSON() : <any>undefined;
146694
- if (this.checks) {
146695
- data["checks"] = {};
146696
- for (let key in this.checks) {
146697
- if (this.checks.hasOwnProperty(key))
146698
- (<any>data["checks"])[key] = (<any>this.checks)[key];
146699
- }
146700
- }
146701
- data["content_encoding"] = this.content_encoding;
146702
- data["media_type"] = this.media_type;
146703
- data["accept_type"] = this.accept_type;
146704
- data["server"] = this.server;
146705
- data["last_modified"] = this.last_modified ? this.last_modified.toJSON() : <any>undefined;
146706
- data["resource_errors"] = this.resource_errors ? this.resource_errors.toJSON() : <any>undefined;
146707
- super.toJSON(data);
146708
- return data;
146709
- }
146710
- }
146711
-
146712
- export interface IScriptResourceElementItem extends IBaseOnPageResourceItemInfo {
146713
- /** resource properties
146714
- the value depends on the resource_type
146715
- note that if you do not indicate a url when setting a task, resource’s meta is returned based on the data from the page where our crawler first saw the resource;
146716
- to obtain resource’s meta from a particular url, specify that URL when setting a task */
146717
- meta?: ResourceMetaInfo | undefined;
146718
- /** status code of the page where a given resource is located */
146719
- status_code?: number | undefined;
146720
- /** location header
146721
- indicates the URL to redirect a page to */
146722
- location?: string | undefined;
146723
- /** resource URL */
146724
- url?: string | undefined;
146725
- /** resource size
146726
- indicates the size of a given resource measured in bytes */
146727
- size?: number | undefined;
146728
- /** resource size after encoding
146729
- indicates the size of the encoded resource measured in bytes */
146730
- encoded_size?: number | undefined;
146731
- /** compressed resource size
146732
- indicates the compressed size of a given resource in bytes */
146733
- total_transfer_size?: number | undefined;
146734
- /** date and time when a resource was fetched
146735
- in the UTC format: “yyyy-mm-dd hh-mm-ss +00:00”
146736
- example:
146737
- 2021-02-17 13:54:15 +00:00 */
146738
- fetch_time?: string | undefined;
146739
- /** resource fething time range */
146740
- fetch_timing?: FetchTiming | undefined;
146741
- /** instructions for caching */
146742
- cache_control?: CacheControl | undefined;
146743
- /** resource check-ups
146744
- contents of the array depend on the resource_type */
146745
- checks?: { [key: string]: boolean; } | undefined;
146746
- /** type of encoding */
146747
- content_encoding?: string | undefined;
146748
- /** types of media used to display a resource */
146749
- media_type?: string | undefined;
146750
- /** indicates the expected type of resource
146751
- for example, if "resource_type": "broken", accept_type will indicate the type of the broken resource
146752
- possible values:
146753
- any, none, image, sitemap, robots, script, stylesheet, redirect, html, text, other, font */
146754
- accept_type?: string | undefined;
146755
- /** server version */
146756
- server?: string | undefined;
146757
- /** contains data on changes related to the resource
146758
- if there is no data, the value will be null */
146759
- last_modified?: LastModified | undefined;
146760
- /** resource errors and warnings */
146761
- resource_errors?: OnPageResourceIssueInfo | undefined;
146762
-
146763
- [key: string]: any;
146764
- }
146765
-
146766
146622
  export class ImageResourceElementItem extends BaseOnPageResourceItemInfo implements IImageResourceElementItem {
146767
146623
  /** resource properties
146768
146624
  the value depends on the resource_type
@@ -156571,11 +156427,11 @@ to obtain a full list of available languages, refer to the Languages endpoint */
156571
156427
  /** sentiment connotations
156572
156428
  contains sentiments (emotional reactions) related to the given citation and probability index per each sentiment
156573
156429
  possible sentiment connotations: anger, happiness, love, sadness, share, fun */
156574
- sentiment_connotations?: SentimentConnotationInfo | undefined;
156430
+ sentiment_connotations?: { [key: string]: number; } | undefined;
156575
156431
  /** connotation types
156576
156432
  contains types of sentiments (sentiment polarity) related to the given citation and probability index per each sentiment type
156577
156433
  possible sentiment connotation types: positive, negative, neutral */
156578
- connotation_types?: ConnotationTypeInfo | undefined;
156434
+ connotation_types?: { [key: string]: number; } | undefined;
156579
156435
  /** text category
156580
156436
  to obtain a full list of available categories, refer to the Categories endpoint */
156581
156437
  text_category?: number[] | undefined;
@@ -156635,8 +156491,20 @@ example:
156635
156491
  }
156636
156492
  this.highlighted_text = _data["highlighted_text"];
156637
156493
  this.language = _data["language"];
156638
- this.sentiment_connotations = _data["sentiment_connotations"] ? SentimentConnotationInfo.fromJS(_data["sentiment_connotations"]) : <any>undefined;
156639
- this.connotation_types = _data["connotation_types"] ? ConnotationTypeInfo.fromJS(_data["connotation_types"]) : <any>undefined;
156494
+ if (_data["sentiment_connotations"]) {
156495
+ this.sentiment_connotations = {} as any;
156496
+ for (let key in _data["sentiment_connotations"]) {
156497
+ if (_data["sentiment_connotations"].hasOwnProperty(key))
156498
+ (<any>this.sentiment_connotations)![key] = _data["sentiment_connotations"][key];
156499
+ }
156500
+ }
156501
+ if (_data["connotation_types"]) {
156502
+ this.connotation_types = {} as any;
156503
+ for (let key in _data["connotation_types"]) {
156504
+ if (_data["connotation_types"].hasOwnProperty(key))
156505
+ (<any>this.connotation_types)![key] = _data["connotation_types"][key];
156506
+ }
156507
+ }
156640
156508
  if (Array.isArray(_data["text_category"])) {
156641
156509
  this.text_category = [] as any;
156642
156510
  for (let item of _data["text_category"])
@@ -156678,8 +156546,20 @@ example:
156678
156546
  }
156679
156547
  data["highlighted_text"] = this.highlighted_text;
156680
156548
  data["language"] = this.language;
156681
- data["sentiment_connotations"] = this.sentiment_connotations ? this.sentiment_connotations.toJSON() : <any>undefined;
156682
- data["connotation_types"] = this.connotation_types ? this.connotation_types.toJSON() : <any>undefined;
156549
+ if (this.sentiment_connotations) {
156550
+ data["sentiment_connotations"] = {};
156551
+ for (let key in this.sentiment_connotations) {
156552
+ if (this.sentiment_connotations.hasOwnProperty(key))
156553
+ (<any>data["sentiment_connotations"])[key] = (<any>this.sentiment_connotations)[key];
156554
+ }
156555
+ }
156556
+ if (this.connotation_types) {
156557
+ data["connotation_types"] = {};
156558
+ for (let key in this.connotation_types) {
156559
+ if (this.connotation_types.hasOwnProperty(key))
156560
+ (<any>data["connotation_types"])[key] = (<any>this.connotation_types)[key];
156561
+ }
156562
+ }
156683
156563
  if (Array.isArray(this.text_category)) {
156684
156564
  data["text_category"] = [];
156685
156565
  for (let item of this.text_category)
@@ -156725,11 +156605,11 @@ to obtain a full list of available languages, refer to the Languages endpoint */
156725
156605
  /** sentiment connotations
156726
156606
  contains sentiments (emotional reactions) related to the given citation and probability index per each sentiment
156727
156607
  possible sentiment connotations: anger, happiness, love, sadness, share, fun */
156728
- sentiment_connotations?: SentimentConnotationInfo | undefined;
156608
+ sentiment_connotations?: { [key: string]: number; } | undefined;
156729
156609
  /** connotation types
156730
156610
  contains types of sentiments (sentiment polarity) related to the given citation and probability index per each sentiment type
156731
156611
  possible sentiment connotation types: positive, negative, neutral */
156732
- connotation_types?: ConnotationTypeInfo | undefined;
156612
+ connotation_types?: { [key: string]: number; } | undefined;
156733
156613
  /** text category
156734
156614
  to obtain a full list of available categories, refer to the Categories endpoint */
156735
156615
  text_category?: number[] | undefined;
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "dataforseo-client",
3
- "version": "1.0.5",
4
- "description": "there is api client that provide services of DataForSeo API",
3
+ "version": "1.0.7",
4
+ "description": "API client that provide services of DataForSeo API (https://dataforseo.com/) \n\n For more information about client code generation, please follow to github (https://github.com/dataforseo/JavascriptClient)",
5
5
  "main": "main.js",
6
+ "types": "main.d.ts",
6
7
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
+ "build": "tsc"
8
9
  },
9
- "author": "DataForSeo",
10
- "license": "ISC"
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/dataforseo/TypeScriptClient.git"
13
+ },
14
+ "author": "dataforseo",
15
+ "license": "ISC",
16
+ "homepage": "https://dataforseo.com/"
11
17
  }
package/README.txt DELETED
@@ -1,3 +0,0 @@
1
- API client that provide services of DataForSeo API (https://dataforseo.com/)
2
-
3
- For more information about client code generation, please follow to github (https://github.com/dataforseo/TypeScriptClient)