@evergis/api 4.1.21 → 4.1.23

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/dist/Api.d.ts CHANGED
@@ -6,7 +6,7 @@ import { QueryTokenAccessService } from './__generated__/QueryTokenAccessService
6
6
  import { SpatialReferencesService } from './__generated__/SpatialReferencesService';
7
7
  import { CatalogService } from './__generated__/CatalogService';
8
8
  import { EventEmitter } from './EventEmitter';
9
- import { Account, AccountPreview, BulkOperations, Cameras, ClientSettings, Eql, Feedback, FileUpload, Filters, Geocode, Import, Layers, Names, Notification, PortalSettings, Projects, RemoteTaskManager, Resources, Security, Statistic, Tables, Tools, VectorTiles } from './services';
9
+ import { Account, AccountPreview, External, BulkOperations, Cameras, ClientSettings, Eql, Feedback, FileUpload, Filters, Geocode, Import, Layers, Names, Notification, PortalSettings, Projects, RemoteTaskManager, Resources, Security, Statistic, Tables, Tools, VectorTiles } from './services';
10
10
  import { AuthenticateParams, LoginDc } from './__generated__/data-contracts';
11
11
  export type ApiParams = {
12
12
  url: string;
@@ -37,6 +37,7 @@ export declare class Api extends EventEmitter {
37
37
  readonly resources: Resources;
38
38
  readonly geocode: Geocode;
39
39
  readonly tools: Tools;
40
+ readonly external: External;
40
41
  readonly account: Account;
41
42
  readonly accountPreview: AccountPreview;
42
43
  readonly clientSettings: ClientSettings;
@@ -0,0 +1,176 @@
1
+ import { Service } from './Service';
2
+ /**
3
+ * @title Spatial Processing Core API
4
+ * @version 1.5.1.0
5
+ * @baseUrl /sp
6
+ */
7
+ export declare class ExternalProvidersService extends Service {
8
+ /**
9
+ * No description
10
+ *
11
+ * @tags ExternalProviders
12
+ * @name FacebookLogin
13
+ * @operationId ExternalProvidersController_FacebookLogin
14
+ * @summary The external login by facebook.
15
+ * @request GET:/account/external/login/facebook
16
+ * @secure
17
+ * @response `200` OK
18
+ */
19
+ facebookLogin(): string;
20
+ /**
21
+ * No description
22
+ *
23
+ * @tags ExternalProviders
24
+ * @name GoogleLogin
25
+ * @operationId ExternalProvidersController_GoogleLogin
26
+ * @summary The external login by google.
27
+ * @request GET:/account/external/login/google
28
+ * @secure
29
+ * @response `200` OK
30
+ */
31
+ googleLogin(): string;
32
+ /**
33
+ * No description
34
+ *
35
+ * @tags ExternalProviders
36
+ * @name VkLogin
37
+ * @operationId ExternalProvidersController_VkLogin
38
+ * @summary The external login by vk.
39
+ * @request GET:/account/external/login/vk
40
+ * @secure
41
+ * @response `200` OK
42
+ */
43
+ vkLogin(): string;
44
+ /**
45
+ * No description
46
+ *
47
+ * @tags ExternalProviders
48
+ * @name YandexLogin
49
+ * @operationId ExternalProvidersController_YandexLogin
50
+ * @summary The external login by yandex.
51
+ * @request GET:/account/external/login/yandex
52
+ * @secure
53
+ * @response `200` OK
54
+ */
55
+ yandexLogin(): Promise<void>;
56
+ /**
57
+ * No description
58
+ *
59
+ * @tags ExternalProviders
60
+ * @name LoginCallback
61
+ * @operationId ExternalProvidersController_LoginCallback
62
+ * @summary The external login callback.
63
+ * @request GET:/account/external/login/callback
64
+ * @secure
65
+ * @response `200` OK
66
+ */
67
+ loginCallback(): Promise<void>;
68
+ /**
69
+ * No description
70
+ *
71
+ * @tags ExternalProviders
72
+ * @name UnbindFacebook
73
+ * @operationId ExternalProvidersController_UnbindFacebook
74
+ * @summary Unbind external login from current user account (google).
75
+ * @request DELETE:/account/external/unbind/facebook
76
+ * @secure
77
+ * @response `200` OK
78
+ */
79
+ unbindFacebook(): Promise<void>;
80
+ /**
81
+ * No description
82
+ *
83
+ * @tags ExternalProviders
84
+ * @name UnbindGoogle
85
+ * @operationId ExternalProvidersController_UnbindGoogle
86
+ * @summary Unbind external login from current user account (google).
87
+ * @request DELETE:/account/external/unbind/google
88
+ * @secure
89
+ * @response `200` OK
90
+ */
91
+ unbindGoogle(): Promise<void>;
92
+ /**
93
+ * No description
94
+ *
95
+ * @tags ExternalProviders
96
+ * @name UnbindVk
97
+ * @operationId ExternalProvidersController_UnbindVk
98
+ * @summary Unbind external login from current user account (google).
99
+ * @request DELETE:/account/external/unbind/vk
100
+ * @secure
101
+ * @response `200` OK
102
+ */
103
+ unbindVk(): Promise<void>;
104
+ /**
105
+ * No description
106
+ *
107
+ * @tags ExternalProviders
108
+ * @name UnbindYandex
109
+ * @operationId ExternalProvidersController_UnbindYandex
110
+ * @summary Unbind external login from current user account (yandex).
111
+ * @request DELETE:/account/external/unbind/yandex
112
+ * @secure
113
+ * @response `200` OK
114
+ */
115
+ unbindYandex(): Promise<void>;
116
+ /**
117
+ * No description
118
+ *
119
+ * @tags ExternalProviders
120
+ * @name BindFacebook
121
+ * @operationId ExternalProvidersController_BindFacebook
122
+ * @summary The external login by vk.
123
+ * @request GET:/account/external/bind/facebook
124
+ * @secure
125
+ * @response `200` OK
126
+ */
127
+ bindFacebook(): string;
128
+ /**
129
+ * No description
130
+ *
131
+ * @tags ExternalProviders
132
+ * @name BindGoogle
133
+ * @operationId ExternalProvidersController_BindGoogle
134
+ * @summary The external login by vk.
135
+ * @request GET:/account/external/bind/google
136
+ * @secure
137
+ * @response `200` OK
138
+ */
139
+ bindGoogle(): string;
140
+ /**
141
+ * No description
142
+ *
143
+ * @tags ExternalProviders
144
+ * @name BindVk
145
+ * @operationId ExternalProvidersController_BindVk
146
+ * @summary The external login by vk.
147
+ * @request GET:/account/external/bind/vk
148
+ * @secure
149
+ * @response `200` OK
150
+ */
151
+ bindVk(): string;
152
+ /**
153
+ * No description
154
+ *
155
+ * @tags ExternalProviders
156
+ * @name BindYandex
157
+ * @operationId ExternalProvidersController_BindYandex
158
+ * @summary The external login by yandex.
159
+ * @request GET:/account/external/bind/yandex
160
+ * @secure
161
+ * @response `200` OK
162
+ */
163
+ bindYandex(): Promise<void>;
164
+ /**
165
+ * No description
166
+ *
167
+ * @tags ExternalProviders
168
+ * @name BindCallback
169
+ * @operationId ExternalProvidersController_BindCallback
170
+ * @summary Bind external login to current user account.
171
+ * @request GET:/account/external/bind/callback
172
+ * @secure
173
+ * @response `200` OK
174
+ */
175
+ bindCallback(): Promise<void>;
176
+ }
package/dist/api.esm.js CHANGED
@@ -887,6 +887,266 @@ class AccountPreviewService extends Service {
887
887
  class AccountPreview extends AccountPreviewService {
888
888
  }
889
889
 
890
+ /* eslint-disable */
891
+ /* tslint:disable */
892
+ /*
893
+ * ---------------------------------------------------------------
894
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
895
+ * ## ##
896
+ * ## AUTHOR: acacode ##
897
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
898
+ * ---------------------------------------------------------------
899
+ */
900
+ // @ts-nocheck
901
+ /**
902
+ * @title Spatial Processing Core API
903
+ * @version 1.5.1.0
904
+ * @baseUrl /sp
905
+ */
906
+ class ExternalProvidersService extends Service {
907
+ /**
908
+ * No description
909
+ *
910
+ * @tags ExternalProviders
911
+ * @name FacebookLogin
912
+ * @operationId ExternalProvidersController_FacebookLogin
913
+ * @summary The external login by facebook.
914
+ * @request GET:/account/external/login/facebook
915
+ * @secure
916
+ * @response `200` OK
917
+ */
918
+ facebookLogin() {
919
+ return this.http.createUrl(`/account/external/login/facebook`);
920
+ }
921
+ /**
922
+ * No description
923
+ *
924
+ * @tags ExternalProviders
925
+ * @name GoogleLogin
926
+ * @operationId ExternalProvidersController_GoogleLogin
927
+ * @summary The external login by google.
928
+ * @request GET:/account/external/login/google
929
+ * @secure
930
+ * @response `200` OK
931
+ */
932
+ googleLogin() {
933
+ return this.http.createUrl(`/account/external/login/google`);
934
+ }
935
+ /**
936
+ * No description
937
+ *
938
+ * @tags ExternalProviders
939
+ * @name VkLogin
940
+ * @operationId ExternalProvidersController_VkLogin
941
+ * @summary The external login by vk.
942
+ * @request GET:/account/external/login/vk
943
+ * @secure
944
+ * @response `200` OK
945
+ */
946
+ vkLogin() {
947
+ return this.http.createUrl(`/account/external/login/vk`);
948
+ }
949
+ /**
950
+ * No description
951
+ *
952
+ * @tags ExternalProviders
953
+ * @name YandexLogin
954
+ * @operationId ExternalProvidersController_YandexLogin
955
+ * @summary The external login by yandex.
956
+ * @request GET:/account/external/login/yandex
957
+ * @secure
958
+ * @response `200` OK
959
+ */
960
+ yandexLogin() {
961
+ return this.http.get(`/account/external/login/yandex`).then(() => { });
962
+ }
963
+ /**
964
+ * No description
965
+ *
966
+ * @tags ExternalProviders
967
+ * @name LoginCallback
968
+ * @operationId ExternalProvidersController_LoginCallback
969
+ * @summary The external login callback.
970
+ * @request GET:/account/external/login/callback
971
+ * @secure
972
+ * @response `200` OK
973
+ */
974
+ loginCallback() {
975
+ return this.http.get(`/account/external/login/callback`).then(() => { });
976
+ }
977
+ /**
978
+ * No description
979
+ *
980
+ * @tags ExternalProviders
981
+ * @name UnbindFacebook
982
+ * @operationId ExternalProvidersController_UnbindFacebook
983
+ * @summary Unbind external login from current user account (google).
984
+ * @request DELETE:/account/external/unbind/facebook
985
+ * @secure
986
+ * @response `200` OK
987
+ */
988
+ unbindFacebook() {
989
+ return this.http.delete(`/account/external/unbind/facebook`, null).then(() => { });
990
+ }
991
+ /**
992
+ * No description
993
+ *
994
+ * @tags ExternalProviders
995
+ * @name UnbindGoogle
996
+ * @operationId ExternalProvidersController_UnbindGoogle
997
+ * @summary Unbind external login from current user account (google).
998
+ * @request DELETE:/account/external/unbind/google
999
+ * @secure
1000
+ * @response `200` OK
1001
+ */
1002
+ unbindGoogle() {
1003
+ return this.http.delete(`/account/external/unbind/google`, null).then(() => { });
1004
+ }
1005
+ /**
1006
+ * No description
1007
+ *
1008
+ * @tags ExternalProviders
1009
+ * @name UnbindVk
1010
+ * @operationId ExternalProvidersController_UnbindVk
1011
+ * @summary Unbind external login from current user account (google).
1012
+ * @request DELETE:/account/external/unbind/vk
1013
+ * @secure
1014
+ * @response `200` OK
1015
+ */
1016
+ unbindVk() {
1017
+ return this.http.delete(`/account/external/unbind/vk`, null).then(() => { });
1018
+ }
1019
+ /**
1020
+ * No description
1021
+ *
1022
+ * @tags ExternalProviders
1023
+ * @name UnbindYandex
1024
+ * @operationId ExternalProvidersController_UnbindYandex
1025
+ * @summary Unbind external login from current user account (yandex).
1026
+ * @request DELETE:/account/external/unbind/yandex
1027
+ * @secure
1028
+ * @response `200` OK
1029
+ */
1030
+ unbindYandex() {
1031
+ return this.http.delete(`/account/external/unbind/yandex`, null).then(() => { });
1032
+ }
1033
+ /**
1034
+ * No description
1035
+ *
1036
+ * @tags ExternalProviders
1037
+ * @name BindFacebook
1038
+ * @operationId ExternalProvidersController_BindFacebook
1039
+ * @summary The external login by vk.
1040
+ * @request GET:/account/external/bind/facebook
1041
+ * @secure
1042
+ * @response `200` OK
1043
+ */
1044
+ bindFacebook() {
1045
+ return this.http.createUrl(`/account/external/bind/facebook`);
1046
+ }
1047
+ /**
1048
+ * No description
1049
+ *
1050
+ * @tags ExternalProviders
1051
+ * @name BindGoogle
1052
+ * @operationId ExternalProvidersController_BindGoogle
1053
+ * @summary The external login by vk.
1054
+ * @request GET:/account/external/bind/google
1055
+ * @secure
1056
+ * @response `200` OK
1057
+ */
1058
+ bindGoogle() {
1059
+ return this.http.createUrl(`/account/external/bind/google`);
1060
+ }
1061
+ /**
1062
+ * No description
1063
+ *
1064
+ * @tags ExternalProviders
1065
+ * @name BindVk
1066
+ * @operationId ExternalProvidersController_BindVk
1067
+ * @summary The external login by vk.
1068
+ * @request GET:/account/external/bind/vk
1069
+ * @secure
1070
+ * @response `200` OK
1071
+ */
1072
+ bindVk() {
1073
+ return this.http.createUrl(`/account/external/bind/vk`);
1074
+ }
1075
+ /**
1076
+ * No description
1077
+ *
1078
+ * @tags ExternalProviders
1079
+ * @name BindYandex
1080
+ * @operationId ExternalProvidersController_BindYandex
1081
+ * @summary The external login by yandex.
1082
+ * @request GET:/account/external/bind/yandex
1083
+ * @secure
1084
+ * @response `200` OK
1085
+ */
1086
+ bindYandex() {
1087
+ return this.http.get(`/account/external/bind/yandex`).then(() => { });
1088
+ }
1089
+ /**
1090
+ * No description
1091
+ *
1092
+ * @tags ExternalProviders
1093
+ * @name BindCallback
1094
+ * @operationId ExternalProvidersController_BindCallback
1095
+ * @summary Bind external login to current user account.
1096
+ * @request GET:/account/external/bind/callback
1097
+ * @secure
1098
+ * @response `200` OK
1099
+ */
1100
+ bindCallback() {
1101
+ return this.http.get(`/account/external/bind/callback`).then(() => { });
1102
+ }
1103
+ }
1104
+
1105
+ class External extends ExternalProvidersService {
1106
+ login(network) {
1107
+ switch (network) {
1108
+ case 'vk':
1109
+ return this.vkLogin();
1110
+ case 'google':
1111
+ return this.googleLogin();
1112
+ case 'facebook':
1113
+ return this.facebookLogin();
1114
+ case 'yandex':
1115
+ return this.yandexLogin();
1116
+ default:
1117
+ return '';
1118
+ }
1119
+ }
1120
+ bind(network) {
1121
+ switch (network) {
1122
+ case 'vk':
1123
+ return this.bindVk();
1124
+ case 'google':
1125
+ return this.bindGoogle();
1126
+ case 'facebook':
1127
+ return this.bindFacebook();
1128
+ case 'yandex':
1129
+ return this.bindYandex();
1130
+ default:
1131
+ return '';
1132
+ }
1133
+ }
1134
+ unbind(network) {
1135
+ switch (network) {
1136
+ case 'vk':
1137
+ return this.unbindVk();
1138
+ case 'google':
1139
+ return this.unbindGoogle();
1140
+ case 'facebook':
1141
+ return this.unbindFacebook();
1142
+ case 'yandex':
1143
+ return this.unbindYandex();
1144
+ default:
1145
+ return '';
1146
+ }
1147
+ }
1148
+ }
1149
+
890
1150
  /* eslint-disable */
891
1151
  /* tslint:disable */
892
1152
  /*
@@ -2595,6 +2855,7 @@ class Api extends EventEmitter {
2595
2855
  resources;
2596
2856
  geocode;
2597
2857
  tools;
2858
+ external;
2598
2859
  account;
2599
2860
  accountPreview;
2600
2861
  clientSettings;
@@ -2683,6 +2944,7 @@ class Api extends EventEmitter {
2683
2944
  this.tables = new Tables(this.http);
2684
2945
  this.projects = new Projects(this.http);
2685
2946
  this.resources = new Resources(this.projects, this.layers, this.tables);
2947
+ this.external = new External(this.http);
2686
2948
  this.account = new Account(this.http);
2687
2949
  this.accountPreview = new AccountPreview(this.http);
2688
2950
  this.bulk = new BulkOperations(this.http);
@@ -2746,7 +3008,7 @@ class Api extends EventEmitter {
2746
3008
  }
2747
3009
  }
2748
3010
  isAcceptedNetwork(network) {
2749
- return ["vk", "google", "facebook"].includes(network);
3011
+ return ["vk", "google", "facebook", "yandex"].includes(network);
2750
3012
  }
2751
3013
  async socAuthLogin(network) {
2752
3014
  if (!this.isAcceptedNetwork(network))
@@ -5923,5 +6185,5 @@ var WorkerSettingsFieldType;
5923
6185
  WorkerSettingsFieldType["AttributeArray"] = "AttributeArray";
5924
6186
  })(WorkerSettingsFieldType || (WorkerSettingsFieldType = {}));
5925
6187
 
5926
- export { AccessMode, Account, AccountPreview, AggregationFunction, Api, ApiEvent, AttributeIconType, AttributeSelectorType, AttributeType, AuthorizationGrant, BulkOperations, Cameras, CatalogResourceType, ClassificationType, ClassifyAttributeType, ClientSettings, ConfigurationErrorEnum, ConfigurationType, ConflictResolutionStrategy, ConnectionStatus, DataSourceConnectionType, DataSourceType, DependencyType, Eql, ErrorDetailsType, ErrorReason, ErrorType, Feedback, FileUpload, Filters, GEOCODE_PROVIDER, Geocode, GeometryType, HttpClient, Import, Layers, Names, Notification, NotificationEvent, PbfSchema, Permissions, PolicyType, PortalSettings, Projects, Quality, RemoteTaskManager, RemoteTaskStatus, ResourceSeparator, ResourceSubTypeFilter, ResourceType, ResourceTypeFilter, ResourceTypeLink, Resources, ResponseType, STORAGE_REFRESH_TOKEN_KEY, STORAGE_TOKEN_KEY, Security, SimplifyType, Statistic, StringSubType, Tables, TaskResourceSubType, Tools, UrlPath, VectorTiles, WorkerMethodType, WorkerSettingsFieldType, addSubDomainToLocation, errorHandler, formDataFromFile, generateId, getFetchingUrlPath, isHTTPError, isHandledError, isProjectContentItems, isString, isTileLayerService, parseJwt, promiseAllIgnoreErrors, stripUselessSlashes, toFormData, unique, useToken };
6188
+ export { AccessMode, Account, AccountPreview, AggregationFunction, Api, ApiEvent, AttributeIconType, AttributeSelectorType, AttributeType, AuthorizationGrant, BulkOperations, Cameras, CatalogResourceType, ClassificationType, ClassifyAttributeType, ClientSettings, ConfigurationErrorEnum, ConfigurationType, ConflictResolutionStrategy, ConnectionStatus, DataSourceConnectionType, DataSourceType, DependencyType, Eql, ErrorDetailsType, ErrorReason, ErrorType, External, Feedback, FileUpload, Filters, GEOCODE_PROVIDER, Geocode, GeometryType, HttpClient, Import, Layers, Names, Notification, NotificationEvent, PbfSchema, Permissions, PolicyType, PortalSettings, Projects, Quality, RemoteTaskManager, RemoteTaskStatus, ResourceSeparator, ResourceSubTypeFilter, ResourceType, ResourceTypeFilter, ResourceTypeLink, Resources, ResponseType, STORAGE_REFRESH_TOKEN_KEY, STORAGE_TOKEN_KEY, Security, SimplifyType, Statistic, StringSubType, Tables, TaskResourceSubType, Tools, UrlPath, VectorTiles, WorkerMethodType, WorkerSettingsFieldType, addSubDomainToLocation, errorHandler, formDataFromFile, generateId, getFetchingUrlPath, isHTTPError, isHandledError, isProjectContentItems, isString, isTileLayerService, parseJwt, promiseAllIgnoreErrors, stripUselessSlashes, toFormData, unique, useToken };
5927
6189
  //# sourceMappingURL=api.esm.js.map