pipedrive 22.3.1-rc.2 → 22.3.1-rc.4
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +17 -4
- package/README.md +29 -24
- package/api/activities-api.ts +1 -24
- package/api/activity-fields-api.ts +1 -24
- package/api/activity-types-api.ts +1 -21
- package/api/billing-api.ts +1 -24
- package/api/call-logs-api.ts +1 -24
- package/api/channels-api.ts +1 -24
- package/api/currencies-api.ts +1 -24
- package/api/deal-fields-api.ts +1 -24
- package/api/deals-api.ts +1 -24
- package/api/files-api.ts +1 -24
- package/api/filters-api.ts +1 -24
- package/api/goals-api.ts +1 -24
- package/api/item-search-api.ts +1 -24
- package/api/lead-labels-api.ts +1 -21
- package/api/lead-sources-api.ts +1 -24
- package/api/leads-api.ts +1 -24
- package/api/legacy-teams-api.ts +1 -24
- package/api/mailbox-api.ts +1 -24
- package/api/note-fields-api.ts +1 -24
- package/api/notes-api.ts +1 -21
- package/api/organization-fields-api.ts +1 -24
- package/api/organization-relationships-api.ts +1 -24
- package/api/organizations-api.ts +1 -24
- package/api/permission-sets-api.ts +1 -24
- package/api/person-fields-api.ts +1 -21
- package/api/persons-api.ts +1 -24
- package/api/pipelines-api.ts +1 -24
- package/api/product-fields-api.ts +1 -24
- package/api/products-api.ts +1 -24
- package/api/project-templates-api.ts +1 -24
- package/api/projects-api.ts +1 -24
- package/api/recents-api.ts +1 -24
- package/api/roles-api.ts +1 -24
- package/api/stages-api.ts +1 -24
- package/api/subscriptions-api.ts +1 -24
- package/api/tasks-api.ts +1 -24
- package/api/user-connections-api.ts +1 -24
- package/api/user-settings-api.ts +1 -24
- package/api/users-api.ts +1 -24
- package/api/webhooks-api.ts +1 -21
- package/base.ts +31 -0
- package/common.ts +0 -1
- package/configuration.ts +11 -2
- package/dist/api/activities-api.js +7 -30
- package/dist/api/activity-fields-api.js +1 -24
- package/dist/api/activity-types-api.js +0 -20
- package/dist/api/billing-api.js +1 -24
- package/dist/api/call-logs-api.js +5 -28
- package/dist/api/channels-api.js +4 -27
- package/dist/api/currencies-api.js +1 -24
- package/dist/api/deal-fields-api.js +6 -29
- package/dist/api/deals-api.js +28 -51
- package/dist/api/files-api.js +11 -34
- package/dist/api/filters-api.js +7 -30
- package/dist/api/goals-api.js +5 -28
- package/dist/api/item-search-api.js +2 -25
- package/dist/api/lead-labels-api.js +0 -20
- package/dist/api/lead-sources-api.js +1 -24
- package/dist/api/leads-api.js +7 -30
- package/dist/api/legacy-teams-api.js +8 -31
- package/dist/api/mailbox-api.js +7 -30
- package/dist/api/note-fields-api.js +1 -24
- package/dist/api/notes-api.js +0 -20
- package/dist/api/organization-fields-api.js +6 -29
- package/dist/api/organization-relationships-api.js +5 -28
- package/dist/api/organizations-api.js +19 -42
- package/dist/api/permission-sets-api.js +3 -26
- package/dist/api/person-fields-api.js +0 -20
- package/dist/api/persons-api.js +21 -44
- package/dist/api/pipelines-api.js +8 -31
- package/dist/api/product-fields-api.js +6 -29
- package/dist/api/products-api.js +12 -35
- package/dist/api/project-templates-api.js +4 -27
- package/dist/api/projects-api.js +14 -37
- package/dist/api/recents-api.js +1 -24
- package/dist/api/roles-api.js +12 -35
- package/dist/api/stages-api.js +7 -30
- package/dist/api/subscriptions-api.js +9 -32
- package/dist/api/tasks-api.js +5 -28
- package/dist/api/user-connections-api.js +1 -24
- package/dist/api/user-settings-api.js +1 -24
- package/dist/api/users-api.js +10 -33
- package/dist/api/webhooks-api.js +0 -20
- package/dist/base.js +26 -0
- package/dist/common.d.ts +0 -1
- package/dist/common.js +1 -2
- package/dist/configuration.d.ts +1 -0
- package/dist/configuration.js +8 -2
- package/dist/esm/api/activities-api.js +0 -23
- package/dist/esm/api/activity-fields-api.js +0 -23
- package/dist/esm/api/activity-types-api.js +0 -20
- package/dist/esm/api/billing-api.js +0 -23
- package/dist/esm/api/call-logs-api.js +0 -23
- package/dist/esm/api/channels-api.js +0 -23
- package/dist/esm/api/currencies-api.js +0 -23
- package/dist/esm/api/deal-fields-api.js +0 -23
- package/dist/esm/api/deals-api.js +0 -23
- package/dist/esm/api/files-api.js +0 -23
- package/dist/esm/api/filters-api.js +0 -23
- package/dist/esm/api/goals-api.js +0 -23
- package/dist/esm/api/item-search-api.js +0 -23
- package/dist/esm/api/lead-labels-api.js +0 -20
- package/dist/esm/api/lead-sources-api.js +0 -23
- package/dist/esm/api/leads-api.js +0 -23
- package/dist/esm/api/legacy-teams-api.js +0 -23
- package/dist/esm/api/mailbox-api.js +0 -23
- package/dist/esm/api/note-fields-api.js +0 -23
- package/dist/esm/api/notes-api.js +0 -20
- package/dist/esm/api/organization-fields-api.js +0 -23
- package/dist/esm/api/organization-relationships-api.js +0 -23
- package/dist/esm/api/organizations-api.js +0 -23
- package/dist/esm/api/permission-sets-api.js +0 -23
- package/dist/esm/api/person-fields-api.js +0 -20
- package/dist/esm/api/persons-api.js +0 -23
- package/dist/esm/api/pipelines-api.js +0 -23
- package/dist/esm/api/product-fields-api.js +0 -23
- package/dist/esm/api/products-api.js +0 -23
- package/dist/esm/api/project-templates-api.js +0 -23
- package/dist/esm/api/projects-api.js +0 -23
- package/dist/esm/api/recents-api.js +0 -23
- package/dist/esm/api/roles-api.js +0 -23
- package/dist/esm/api/stages-api.js +0 -23
- package/dist/esm/api/subscriptions-api.js +0 -23
- package/dist/esm/api/tasks-api.js +0 -23
- package/dist/esm/api/user-connections-api.js +0 -23
- package/dist/esm/api/user-settings-api.js +0 -23
- package/dist/esm/api/users-api.js +0 -23
- package/dist/esm/api/webhooks-api.js +0 -20
- package/dist/esm/base.js +26 -0
- package/dist/esm/common.d.ts +0 -1
- package/dist/esm/common.js +0 -1
- package/dist/esm/configuration.d.ts +1 -0
- package/dist/esm/configuration.js +8 -2
- package/docs/AddWebhookRequest.md +1 -1
- package/docs/BasicDeal.md +3 -0
- package/docs/CallLogObject.md +2 -1
- package/docs/DealParticipantsChangelog.md +12 -0
- package/docs/DealsApi.md +74 -8
- package/docs/FiltersApi.md +4 -1
- package/docs/GetDeal.md +1 -1
- package/docs/GetDealRelatedObjects.md +11 -0
- package/docs/GetDealsRelatedObjects.md +3 -3
- package/docs/ItemSearchApi.md +2 -2
- package/docs/LeadsApi.md +4 -1
- package/docs/MailboxApi.md +2 -2
- package/docs/MeetingsApi.md +118 -0
- package/docs/NewDeal.md +3 -0
- package/docs/OrganizationsApi.md +10 -4
- package/docs/ParticipantsChangelog.md +11 -0
- package/docs/ParticipantsChangelogItem.md +12 -0
- package/docs/PersonsApi.md +14 -5
- package/docs/PostDealParticipants.md +1 -1
- package/docs/PostDealParticipantsRelatedObjects.md +10 -0
- package/docs/ProductsApi.md +2 -2
- package/docs/RecentsApi.md +2 -2
- package/docs/ResponseCallLogObject.md +2 -1
- package/docs/UpdateDealRequest.md +3 -0
- package/docs/UserProviderLinkCreateRequest.md +12 -0
- package/docs/UserProviderLinkErrorResponse.md +10 -0
- package/docs/UserProviderLinkSuccessResponse.md +10 -0
- package/docs/UserProviderLinkSuccessResponseData.md +9 -0
- package/docs/UsersApi.md +2 -2
- package/migration.md +309 -0
- package/package.json +3 -3
- package/src/api/MeetingsApi.js +181 -0
- package/src/model/GetDealRelatedObjects.js +101 -0
- package/src/model/PostDealParticipantsRelatedObjects.js +90 -0
- package/src/model/UserProviderLinkCreateRequest.js +120 -0
- package/src/model/UserProviderLinkErrorResponse.js +90 -0
- package/src/model/UserProviderLinkSuccessResponse.js +90 -0
- package/src/model/UserProviderLinkSuccessResponseData.js +79 -0
- package/test/functional/access-token.test.js +5 -5
- package/test/functional/authorisation.test.js +5 -8
@@ -0,0 +1,120 @@
|
|
1
|
+
/**
|
2
|
+
* Pipedrive API v1
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
*
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*
|
12
|
+
*/
|
13
|
+
|
14
|
+
import ApiClient from '../ApiClient';
|
15
|
+
|
16
|
+
/**
|
17
|
+
* The UserProviderLinkCreateRequest model module.
|
18
|
+
* @module model/UserProviderLinkCreateRequest
|
19
|
+
* @version 1.0.0
|
20
|
+
*/
|
21
|
+
class UserProviderLinkCreateRequest {
|
22
|
+
/**
|
23
|
+
* Constructs a new <code>UserProviderLinkCreateRequest</code>.
|
24
|
+
* @alias module:model/UserProviderLinkCreateRequest
|
25
|
+
* @param userProviderId {String} Unique identifier linking a user to the installed integration. Generated by the integration.
|
26
|
+
* @param userId {Number} Pipedrive user ID
|
27
|
+
* @param companyId {Number} Pipedrive company ID
|
28
|
+
* @param marketplaceClientId {String} Pipedrive Marketplace client ID of the installed integration
|
29
|
+
*/
|
30
|
+
constructor(userProviderId, userId, companyId, marketplaceClientId) {
|
31
|
+
|
32
|
+
UserProviderLinkCreateRequest.initialize(this, userProviderId, userId, companyId, marketplaceClientId);
|
33
|
+
}
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Initializes the fields of this object.
|
37
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
38
|
+
* Only for internal use.
|
39
|
+
*/
|
40
|
+
static initialize(obj, userProviderId, userId, companyId, marketplaceClientId) {
|
41
|
+
obj['user_provider_id'] = userProviderId;
|
42
|
+
obj['user_id'] = userId;
|
43
|
+
obj['company_id'] = companyId;
|
44
|
+
obj['marketplace_client_id'] = marketplaceClientId;
|
45
|
+
}
|
46
|
+
|
47
|
+
/**
|
48
|
+
* Constructs a <code>UserProviderLinkCreateRequest</code> from a plain JavaScript object, optionally creating a new instance.
|
49
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
50
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
51
|
+
* @param {module:model/UserProviderLinkCreateRequest} obj Optional instance to populate.
|
52
|
+
* @return {module:model/UserProviderLinkCreateRequest} The populated <code>UserProviderLinkCreateRequest</code> instance.
|
53
|
+
*/
|
54
|
+
static constructFromObject(data, obj) {
|
55
|
+
if (data) {
|
56
|
+
obj = obj || new UserProviderLinkCreateRequest();
|
57
|
+
|
58
|
+
if (data.hasOwnProperty('user_provider_id')) {
|
59
|
+
obj['user_provider_id'] = ApiClient.convertToType(data['user_provider_id'], 'String');
|
60
|
+
|
61
|
+
delete data['user_provider_id'];
|
62
|
+
}
|
63
|
+
if (data.hasOwnProperty('user_id')) {
|
64
|
+
obj['user_id'] = ApiClient.convertToType(data['user_id'], 'Number');
|
65
|
+
|
66
|
+
delete data['user_id'];
|
67
|
+
}
|
68
|
+
if (data.hasOwnProperty('company_id')) {
|
69
|
+
obj['company_id'] = ApiClient.convertToType(data['company_id'], 'Number');
|
70
|
+
|
71
|
+
delete data['company_id'];
|
72
|
+
}
|
73
|
+
if (data.hasOwnProperty('marketplace_client_id')) {
|
74
|
+
obj['marketplace_client_id'] = ApiClient.convertToType(data['marketplace_client_id'], 'String');
|
75
|
+
|
76
|
+
delete data['marketplace_client_id'];
|
77
|
+
}
|
78
|
+
|
79
|
+
if (Object.keys(data).length > 0) {
|
80
|
+
Object.assign(obj, data);
|
81
|
+
}
|
82
|
+
|
83
|
+
}
|
84
|
+
return obj;
|
85
|
+
}
|
86
|
+
|
87
|
+
|
88
|
+
}
|
89
|
+
|
90
|
+
/**
|
91
|
+
* Unique identifier linking a user to the installed integration. Generated by the integration.
|
92
|
+
* @member {String} user_provider_id
|
93
|
+
*/
|
94
|
+
UserProviderLinkCreateRequest.prototype['user_provider_id'] = undefined;
|
95
|
+
|
96
|
+
/**
|
97
|
+
* Pipedrive user ID
|
98
|
+
* @member {Number} user_id
|
99
|
+
*/
|
100
|
+
UserProviderLinkCreateRequest.prototype['user_id'] = undefined;
|
101
|
+
|
102
|
+
/**
|
103
|
+
* Pipedrive company ID
|
104
|
+
* @member {Number} company_id
|
105
|
+
*/
|
106
|
+
UserProviderLinkCreateRequest.prototype['company_id'] = undefined;
|
107
|
+
|
108
|
+
/**
|
109
|
+
* Pipedrive Marketplace client ID of the installed integration
|
110
|
+
* @member {String} marketplace_client_id
|
111
|
+
*/
|
112
|
+
UserProviderLinkCreateRequest.prototype['marketplace_client_id'] = undefined;
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
export default UserProviderLinkCreateRequest;
|
120
|
+
|
@@ -0,0 +1,90 @@
|
|
1
|
+
/**
|
2
|
+
* Pipedrive API v1
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
*
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*
|
12
|
+
*/
|
13
|
+
|
14
|
+
import ApiClient from '../ApiClient';
|
15
|
+
|
16
|
+
/**
|
17
|
+
* The UserProviderLinkErrorResponse model module.
|
18
|
+
* @module model/UserProviderLinkErrorResponse
|
19
|
+
* @version 1.0.0
|
20
|
+
*/
|
21
|
+
class UserProviderLinkErrorResponse {
|
22
|
+
/**
|
23
|
+
* Constructs a new <code>UserProviderLinkErrorResponse</code>.
|
24
|
+
* @alias module:model/UserProviderLinkErrorResponse
|
25
|
+
*/
|
26
|
+
constructor() {
|
27
|
+
|
28
|
+
UserProviderLinkErrorResponse.initialize(this);
|
29
|
+
}
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Initializes the fields of this object.
|
33
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
34
|
+
* Only for internal use.
|
35
|
+
*/
|
36
|
+
static initialize(obj) {
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Constructs a <code>UserProviderLinkErrorResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
41
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
42
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
43
|
+
* @param {module:model/UserProviderLinkErrorResponse} obj Optional instance to populate.
|
44
|
+
* @return {module:model/UserProviderLinkErrorResponse} The populated <code>UserProviderLinkErrorResponse</code> instance.
|
45
|
+
*/
|
46
|
+
static constructFromObject(data, obj) {
|
47
|
+
if (data) {
|
48
|
+
obj = obj || new UserProviderLinkErrorResponse();
|
49
|
+
|
50
|
+
if (data.hasOwnProperty('success')) {
|
51
|
+
obj['success'] = ApiClient.convertToType(data['success'], 'Boolean');
|
52
|
+
|
53
|
+
delete data['success'];
|
54
|
+
}
|
55
|
+
if (data.hasOwnProperty('message')) {
|
56
|
+
obj['message'] = ApiClient.convertToType(data['message'], 'String');
|
57
|
+
|
58
|
+
delete data['message'];
|
59
|
+
}
|
60
|
+
|
61
|
+
if (Object.keys(data).length > 0) {
|
62
|
+
Object.assign(obj, data);
|
63
|
+
}
|
64
|
+
|
65
|
+
}
|
66
|
+
return obj;
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
}
|
71
|
+
|
72
|
+
/**
|
73
|
+
* Boolean that indicates whether the request was successful or not
|
74
|
+
* @member {Boolean} success
|
75
|
+
*/
|
76
|
+
UserProviderLinkErrorResponse.prototype['success'] = undefined;
|
77
|
+
|
78
|
+
/**
|
79
|
+
* The error message of the request
|
80
|
+
* @member {String} message
|
81
|
+
*/
|
82
|
+
UserProviderLinkErrorResponse.prototype['message'] = undefined;
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
export default UserProviderLinkErrorResponse;
|
90
|
+
|
@@ -0,0 +1,90 @@
|
|
1
|
+
/**
|
2
|
+
* Pipedrive API v1
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
*
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*
|
12
|
+
*/
|
13
|
+
|
14
|
+
import ApiClient from '../ApiClient';
|
15
|
+
import UserProviderLinkSuccessResponseData from './UserProviderLinkSuccessResponseData';
|
16
|
+
|
17
|
+
/**
|
18
|
+
* The UserProviderLinkSuccessResponse model module.
|
19
|
+
* @module model/UserProviderLinkSuccessResponse
|
20
|
+
* @version 1.0.0
|
21
|
+
*/
|
22
|
+
class UserProviderLinkSuccessResponse {
|
23
|
+
/**
|
24
|
+
* Constructs a new <code>UserProviderLinkSuccessResponse</code>.
|
25
|
+
* @alias module:model/UserProviderLinkSuccessResponse
|
26
|
+
*/
|
27
|
+
constructor() {
|
28
|
+
|
29
|
+
UserProviderLinkSuccessResponse.initialize(this);
|
30
|
+
}
|
31
|
+
|
32
|
+
/**
|
33
|
+
* Initializes the fields of this object.
|
34
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
35
|
+
* Only for internal use.
|
36
|
+
*/
|
37
|
+
static initialize(obj) {
|
38
|
+
}
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Constructs a <code>UserProviderLinkSuccessResponse</code> from a plain JavaScript object, optionally creating a new instance.
|
42
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
43
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
44
|
+
* @param {module:model/UserProviderLinkSuccessResponse} obj Optional instance to populate.
|
45
|
+
* @return {module:model/UserProviderLinkSuccessResponse} The populated <code>UserProviderLinkSuccessResponse</code> instance.
|
46
|
+
*/
|
47
|
+
static constructFromObject(data, obj) {
|
48
|
+
if (data) {
|
49
|
+
obj = obj || new UserProviderLinkSuccessResponse();
|
50
|
+
|
51
|
+
if (data.hasOwnProperty('success')) {
|
52
|
+
obj['success'] = ApiClient.convertToType(data['success'], 'Boolean');
|
53
|
+
|
54
|
+
delete data['success'];
|
55
|
+
}
|
56
|
+
if (data.hasOwnProperty('data')) {
|
57
|
+
obj['data'] = UserProviderLinkSuccessResponseData.constructFromObject(data['data']);
|
58
|
+
|
59
|
+
delete data['data'];
|
60
|
+
}
|
61
|
+
|
62
|
+
if (Object.keys(data).length > 0) {
|
63
|
+
Object.assign(obj, data);
|
64
|
+
}
|
65
|
+
|
66
|
+
}
|
67
|
+
return obj;
|
68
|
+
}
|
69
|
+
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
/**
|
74
|
+
* Boolean that indicates whether the request was successful or not
|
75
|
+
* @member {Boolean} success
|
76
|
+
*/
|
77
|
+
UserProviderLinkSuccessResponse.prototype['success'] = undefined;
|
78
|
+
|
79
|
+
/**
|
80
|
+
* @member {module:model/UserProviderLinkSuccessResponseData} data
|
81
|
+
*/
|
82
|
+
UserProviderLinkSuccessResponse.prototype['data'] = undefined;
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
export default UserProviderLinkSuccessResponse;
|
90
|
+
|
@@ -0,0 +1,79 @@
|
|
1
|
+
/**
|
2
|
+
* Pipedrive API v1
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
4
|
+
*
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
6
|
+
*
|
7
|
+
*
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
9
|
+
* https://openapi-generator.tech
|
10
|
+
* Do not edit the class manually.
|
11
|
+
*
|
12
|
+
*/
|
13
|
+
|
14
|
+
import ApiClient from '../ApiClient';
|
15
|
+
|
16
|
+
/**
|
17
|
+
* The UserProviderLinkSuccessResponseData model module.
|
18
|
+
* @module model/UserProviderLinkSuccessResponseData
|
19
|
+
* @version 1.0.0
|
20
|
+
*/
|
21
|
+
class UserProviderLinkSuccessResponseData {
|
22
|
+
/**
|
23
|
+
* Constructs a new <code>UserProviderLinkSuccessResponseData</code>.
|
24
|
+
* @alias module:model/UserProviderLinkSuccessResponseData
|
25
|
+
*/
|
26
|
+
constructor() {
|
27
|
+
|
28
|
+
UserProviderLinkSuccessResponseData.initialize(this);
|
29
|
+
}
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Initializes the fields of this object.
|
33
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
34
|
+
* Only for internal use.
|
35
|
+
*/
|
36
|
+
static initialize(obj) {
|
37
|
+
}
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Constructs a <code>UserProviderLinkSuccessResponseData</code> from a plain JavaScript object, optionally creating a new instance.
|
41
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
42
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
43
|
+
* @param {module:model/UserProviderLinkSuccessResponseData} obj Optional instance to populate.
|
44
|
+
* @return {module:model/UserProviderLinkSuccessResponseData} The populated <code>UserProviderLinkSuccessResponseData</code> instance.
|
45
|
+
*/
|
46
|
+
static constructFromObject(data, obj) {
|
47
|
+
if (data) {
|
48
|
+
obj = obj || new UserProviderLinkSuccessResponseData();
|
49
|
+
|
50
|
+
if (data.hasOwnProperty('message')) {
|
51
|
+
obj['message'] = ApiClient.convertToType(data['message'], 'String');
|
52
|
+
|
53
|
+
delete data['message'];
|
54
|
+
}
|
55
|
+
|
56
|
+
if (Object.keys(data).length > 0) {
|
57
|
+
Object.assign(obj, data);
|
58
|
+
}
|
59
|
+
|
60
|
+
}
|
61
|
+
return obj;
|
62
|
+
}
|
63
|
+
|
64
|
+
|
65
|
+
}
|
66
|
+
|
67
|
+
/**
|
68
|
+
* The success message of the request
|
69
|
+
* @member {String} message
|
70
|
+
*/
|
71
|
+
UserProviderLinkSuccessResponseData.prototype['message'] = undefined;
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
export default UserProviderLinkSuccessResponseData;
|
79
|
+
|
@@ -26,7 +26,7 @@ describe('oauth2 accessToken', () => {
|
|
26
26
|
|
27
27
|
const auth = await configuration.tokenRefresh();
|
28
28
|
|
29
|
-
expect(auth
|
29
|
+
expect(auth).toMatchObject({
|
30
30
|
access_token: 'freshAccessToken',
|
31
31
|
token_type: 'bearer',
|
32
32
|
refresh_token: 'freshRefreshToken',
|
@@ -35,8 +35,8 @@ describe('oauth2 accessToken', () => {
|
|
35
35
|
api_domain: 'localhost',
|
36
36
|
});
|
37
37
|
|
38
|
-
|
39
|
-
|
38
|
+
expect(configuration.accessToken).toBe(auth.access_token);
|
39
|
+
expect(configuration.refreshToken).toBe(auth.refresh_token);
|
40
40
|
});
|
41
41
|
|
42
42
|
it('should throw if refreshToken is not set', async () => {
|
@@ -45,7 +45,7 @@ describe('oauth2 accessToken', () => {
|
|
45
45
|
try {
|
46
46
|
expect(await configuration.tokenRefresh()).toThrow();
|
47
47
|
} catch (error) {
|
48
|
-
expect(error.
|
48
|
+
expect(error.message).toBe('Invalid grant: refresh token is invalid');
|
49
49
|
}
|
50
50
|
});
|
51
51
|
|
@@ -56,7 +56,7 @@ describe('oauth2 accessToken', () => {
|
|
56
56
|
try {
|
57
57
|
expect(await configuration.tokenRefresh()).toThrow();
|
58
58
|
} catch (error) {
|
59
|
-
expect(error
|
59
|
+
expect(error).toEqual(
|
60
60
|
{ success: 'false', message: 'Invalid grant: refresh token is invalid', error: 'invalid_grant' },
|
61
61
|
);
|
62
62
|
}
|
@@ -14,9 +14,6 @@ describe('oauth2 authorization', () => {
|
|
14
14
|
beforeAll(async () => {
|
15
15
|
lib = await getLib();
|
16
16
|
server.listen();
|
17
|
-
// server.events.on('request:start', ({ request }) => {
|
18
|
-
// console.log('MSW intercepted:', request.method, request.url);
|
19
|
-
// });
|
20
17
|
});
|
21
18
|
|
22
19
|
afterEach(() => server.resetHandlers());
|
@@ -27,7 +24,7 @@ describe('oauth2 authorization', () => {
|
|
27
24
|
oauthClient.refreshToken = 'fakeRefreshToken';
|
28
25
|
const auth = await oauthClient.authorize('fakeAuthCode');
|
29
26
|
|
30
|
-
expect(auth
|
27
|
+
expect(auth).toMatchObject({
|
31
28
|
access_token: 'freshAccessToken',
|
32
29
|
token_type: 'bearer',
|
33
30
|
refresh_token: 'freshRefreshToken',
|
@@ -36,8 +33,8 @@ describe('oauth2 authorization', () => {
|
|
36
33
|
api_domain: 'localhost',
|
37
34
|
});
|
38
35
|
|
39
|
-
|
40
|
-
|
36
|
+
expect(oauthClient.accessToken).toEqual(auth.access_token);
|
37
|
+
expect(oauthClient.refreshToken).toEqual(auth.refresh_token);
|
41
38
|
});
|
42
39
|
|
43
40
|
it.skip('should throw if clientId is not set', async () => {
|
@@ -66,7 +63,7 @@ describe('oauth2 authorization', () => {
|
|
66
63
|
try {
|
67
64
|
expect(await oauthClient.authorize('fakeAuthCode')).toThrow();
|
68
65
|
} catch (error) {
|
69
|
-
expect(error.
|
66
|
+
expect(error.message).toBe('OAuth 2 property clientSecret is not set.');
|
70
67
|
}
|
71
68
|
});
|
72
69
|
|
@@ -94,7 +91,7 @@ describe('oauth2 authorization', () => {
|
|
94
91
|
try {
|
95
92
|
expect(await oauthClient.authorize('wrongAuthCode')).toThrow();
|
96
93
|
} catch (error) {
|
97
|
-
expect(error
|
94
|
+
expect(error).toEqual(
|
98
95
|
{ success: 'false', message: 'Invalid grant: refresh token is invalid', error: 'invalid_grant' },
|
99
96
|
);
|
100
97
|
}
|