@onesignal/node-onesignal 5.7.0 → 5.8.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/dist/apis/DefaultApi.js +2282 -4372
- package/dist/apis/baseapi.js +11 -30
- package/dist/apis/exception.js +9 -26
- package/dist/auth/auth.js +17 -83
- package/dist/configuration.js +9 -9
- package/dist/http/http.js +53 -132
- package/dist/http/isomorphic-fetch.js +15 -18
- package/dist/middleware.js +8 -9
- package/dist/models/ApiKeyToken.js +45 -46
- package/dist/models/ApiKeyTokensListResponse.js +15 -16
- package/dist/models/App.js +213 -214
- package/dist/models/BasicNotification.js +711 -712
- package/dist/models/BasicNotificationAllOf.js +627 -628
- package/dist/models/BasicNotificationAllOfAndroidBackgroundLayout.js +27 -28
- package/dist/models/Button.js +27 -28
- package/dist/models/CopyTemplateRequest.js +15 -16
- package/dist/models/CreateApiKeyRequest.js +27 -28
- package/dist/models/CreateApiKeyResponse.js +21 -22
- package/dist/models/CreateNotificationSuccessResponse.js +27 -28
- package/dist/models/CreateSegmentConflictResponse.js +21 -22
- package/dist/models/CreateSegmentSuccessResponse.js +21 -22
- package/dist/models/CreateTemplateRequest.js +75 -76
- package/dist/models/CreateUserConflictResponse.js +15 -16
- package/dist/models/CreateUserConflictResponseErrorsInner.js +27 -28
- package/dist/models/CreateUserConflictResponseErrorsItemsMeta.js +15 -16
- package/dist/models/CustomEvent.js +39 -40
- package/dist/models/CustomEventsRequest.js +15 -16
- package/dist/models/DeliveryData.js +39 -40
- package/dist/models/ExportEventsSuccessResponse.js +15 -16
- package/dist/models/ExportSubscriptionsRequestBody.js +27 -28
- package/dist/models/ExportSubscriptionsSuccessResponse.js +15 -16
- package/dist/models/Filter.js +57 -58
- package/dist/models/FilterExpression.js +63 -64
- package/dist/models/GenericError.js +27 -28
- package/dist/models/GenericSuccessBoolResponse.js +15 -16
- package/dist/models/GetNotificationHistoryRequestBody.js +27 -28
- package/dist/models/GetSegmentsSuccessResponse.js +33 -34
- package/dist/models/LanguageStringMap.js +267 -268
- package/dist/models/Notification.js +717 -718
- package/dist/models/NotificationAllOf.js +15 -16
- package/dist/models/NotificationHistorySuccessResponse.js +21 -22
- package/dist/models/NotificationSlice.js +33 -34
- package/dist/models/NotificationTarget.js +93 -94
- package/dist/models/NotificationWithMeta.js +789 -790
- package/dist/models/NotificationWithMetaAllOf.js +93 -94
- package/dist/models/ObjectSerializer.js +111 -115
- package/dist/models/Operator.js +15 -16
- package/dist/models/OutcomeData.js +27 -28
- package/dist/models/OutcomesData.js +15 -16
- package/dist/models/PlatformDeliveryData.js +57 -58
- package/dist/models/PlatformDeliveryDataEmailAllOf.js +51 -52
- package/dist/models/PlatformDeliveryDataSmsAllOf.js +27 -28
- package/dist/models/PropertiesBody.js +15 -16
- package/dist/models/PropertiesDeltas.js +27 -28
- package/dist/models/PropertiesObject.js +75 -76
- package/dist/models/Purchase.js +33 -34
- package/dist/models/RateLimitError.js +21 -22
- package/dist/models/Segment.js +27 -28
- package/dist/models/SegmentData.js +51 -52
- package/dist/models/SegmentNotificationTarget.js +21 -22
- package/dist/models/StartLiveActivityRequest.js +105 -106
- package/dist/models/StartLiveActivitySuccessResponse.js +15 -16
- package/dist/models/Subscription.js +111 -112
- package/dist/models/SubscriptionBody.js +15 -16
- package/dist/models/SubscriptionNotificationTarget.js +81 -82
- package/dist/models/TemplateResource.js +45 -46
- package/dist/models/TemplatesListResponse.js +15 -16
- package/dist/models/TransferSubscriptionRequestBody.js +15 -16
- package/dist/models/UpdateApiKeyRequest.js +27 -28
- package/dist/models/UpdateLiveActivityRequest.js +63 -64
- package/dist/models/UpdateLiveActivitySuccessResponse.js +15 -16
- package/dist/models/UpdateTemplateRequest.js +69 -70
- package/dist/models/UpdateUserRequest.js +27 -28
- package/dist/models/User.js +27 -28
- package/dist/models/UserIdentityBody.js +15 -16
- package/dist/models/WebButton.js +33 -34
- package/dist/rxjsStub.js +8 -9
- package/dist/servers.js +14 -15
- package/dist/types/ObjectParamAPI.js +92 -94
- package/dist/types/ObservableAPI.js +534 -931
- package/dist/types/PromiseAPI.js +136 -137
- package/dist/util.js +2 -2
- package/package.json +4 -2
|
@@ -1,100 +1,99 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NotificationWithMetaAllOf = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
NotificationWithMetaAllOf.getAttributeTypeMap = function () {
|
|
4
|
+
class NotificationWithMetaAllOf {
|
|
5
|
+
static getAttributeTypeMap() {
|
|
8
6
|
return NotificationWithMetaAllOf.attributeTypeMap;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"name": "remaining",
|
|
14
|
-
"baseName": "remaining",
|
|
15
|
-
"type": "number",
|
|
16
|
-
"format": ""
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "successful",
|
|
20
|
-
"baseName": "successful",
|
|
21
|
-
"type": "number",
|
|
22
|
-
"format": ""
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "failed",
|
|
26
|
-
"baseName": "failed",
|
|
27
|
-
"type": "number",
|
|
28
|
-
"format": ""
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"name": "errored",
|
|
32
|
-
"baseName": "errored",
|
|
33
|
-
"type": "number",
|
|
34
|
-
"format": ""
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"name": "converted",
|
|
38
|
-
"baseName": "converted",
|
|
39
|
-
"type": "number",
|
|
40
|
-
"format": ""
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "queued_at",
|
|
44
|
-
"baseName": "queued_at",
|
|
45
|
-
"type": "number",
|
|
46
|
-
"format": "int64"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"name": "send_after",
|
|
50
|
-
"baseName": "send_after",
|
|
51
|
-
"type": "number",
|
|
52
|
-
"format": "int64"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"name": "completed_at",
|
|
56
|
-
"baseName": "completed_at",
|
|
57
|
-
"type": "number",
|
|
58
|
-
"format": "int64"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"name": "platform_delivery_stats",
|
|
62
|
-
"baseName": "platform_delivery_stats",
|
|
63
|
-
"type": "PlatformDeliveryData",
|
|
64
|
-
"format": ""
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"name": "received",
|
|
68
|
-
"baseName": "received",
|
|
69
|
-
"type": "number",
|
|
70
|
-
"format": ""
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"name": "throttle_rate_per_minute",
|
|
74
|
-
"baseName": "throttle_rate_per_minute",
|
|
75
|
-
"type": "number",
|
|
76
|
-
"format": ""
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"name": "canceled",
|
|
80
|
-
"baseName": "canceled",
|
|
81
|
-
"type": "boolean",
|
|
82
|
-
"format": ""
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"name": "email_bcc",
|
|
86
|
-
"baseName": "email_bcc",
|
|
87
|
-
"type": "Array<string>",
|
|
88
|
-
"format": ""
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"name": "bcc_sent",
|
|
92
|
-
"baseName": "bcc_sent",
|
|
93
|
-
"type": "number",
|
|
94
|
-
"format": ""
|
|
95
|
-
}
|
|
96
|
-
];
|
|
97
|
-
return NotificationWithMetaAllOf;
|
|
98
|
-
}());
|
|
7
|
+
}
|
|
8
|
+
constructor() {
|
|
9
|
+
}
|
|
10
|
+
}
|
|
99
11
|
exports.NotificationWithMetaAllOf = NotificationWithMetaAllOf;
|
|
12
|
+
NotificationWithMetaAllOf.discriminator = undefined;
|
|
13
|
+
NotificationWithMetaAllOf.attributeTypeMap = [
|
|
14
|
+
{
|
|
15
|
+
"name": "remaining",
|
|
16
|
+
"baseName": "remaining",
|
|
17
|
+
"type": "number",
|
|
18
|
+
"format": ""
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "successful",
|
|
22
|
+
"baseName": "successful",
|
|
23
|
+
"type": "number",
|
|
24
|
+
"format": ""
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "failed",
|
|
28
|
+
"baseName": "failed",
|
|
29
|
+
"type": "number",
|
|
30
|
+
"format": ""
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "errored",
|
|
34
|
+
"baseName": "errored",
|
|
35
|
+
"type": "number",
|
|
36
|
+
"format": ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "converted",
|
|
40
|
+
"baseName": "converted",
|
|
41
|
+
"type": "number",
|
|
42
|
+
"format": ""
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "queued_at",
|
|
46
|
+
"baseName": "queued_at",
|
|
47
|
+
"type": "number",
|
|
48
|
+
"format": "int64"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "send_after",
|
|
52
|
+
"baseName": "send_after",
|
|
53
|
+
"type": "number",
|
|
54
|
+
"format": "int64"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "completed_at",
|
|
58
|
+
"baseName": "completed_at",
|
|
59
|
+
"type": "number",
|
|
60
|
+
"format": "int64"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "platform_delivery_stats",
|
|
64
|
+
"baseName": "platform_delivery_stats",
|
|
65
|
+
"type": "PlatformDeliveryData",
|
|
66
|
+
"format": ""
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "received",
|
|
70
|
+
"baseName": "received",
|
|
71
|
+
"type": "number",
|
|
72
|
+
"format": ""
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "throttle_rate_per_minute",
|
|
76
|
+
"baseName": "throttle_rate_per_minute",
|
|
77
|
+
"type": "number",
|
|
78
|
+
"format": ""
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "canceled",
|
|
82
|
+
"baseName": "canceled",
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"format": ""
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "email_bcc",
|
|
88
|
+
"baseName": "email_bcc",
|
|
89
|
+
"type": "Array<string>",
|
|
90
|
+
"format": ""
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "bcc_sent",
|
|
94
|
+
"baseName": "bcc_sent",
|
|
95
|
+
"type": "number",
|
|
96
|
+
"format": ""
|
|
97
|
+
}
|
|
98
|
+
];
|
|
100
99
|
//# sourceMappingURL=NotificationWithMetaAllOf.js.map
|
|
@@ -82,74 +82,74 @@ __exportStar(require("./UpdateUserRequest"), exports);
|
|
|
82
82
|
__exportStar(require("./User"), exports);
|
|
83
83
|
__exportStar(require("./UserIdentityBody"), exports);
|
|
84
84
|
__exportStar(require("./WebButton"), exports);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
85
|
+
const ApiKeyToken_1 = require("./ApiKeyToken");
|
|
86
|
+
const ApiKeyTokensListResponse_1 = require("./ApiKeyTokensListResponse");
|
|
87
|
+
const App_1 = require("./App");
|
|
88
|
+
const BasicNotification_1 = require("./BasicNotification");
|
|
89
|
+
const BasicNotificationAllOf_1 = require("./BasicNotificationAllOf");
|
|
90
|
+
const BasicNotificationAllOfAndroidBackgroundLayout_1 = require("./BasicNotificationAllOfAndroidBackgroundLayout");
|
|
91
|
+
const Button_1 = require("./Button");
|
|
92
|
+
const CopyTemplateRequest_1 = require("./CopyTemplateRequest");
|
|
93
|
+
const CreateApiKeyRequest_1 = require("./CreateApiKeyRequest");
|
|
94
|
+
const CreateApiKeyResponse_1 = require("./CreateApiKeyResponse");
|
|
95
|
+
const CreateNotificationSuccessResponse_1 = require("./CreateNotificationSuccessResponse");
|
|
96
|
+
const CreateSegmentConflictResponse_1 = require("./CreateSegmentConflictResponse");
|
|
97
|
+
const CreateSegmentSuccessResponse_1 = require("./CreateSegmentSuccessResponse");
|
|
98
|
+
const CreateTemplateRequest_1 = require("./CreateTemplateRequest");
|
|
99
|
+
const CreateUserConflictResponse_1 = require("./CreateUserConflictResponse");
|
|
100
|
+
const CreateUserConflictResponseErrorsInner_1 = require("./CreateUserConflictResponseErrorsInner");
|
|
101
|
+
const CreateUserConflictResponseErrorsItemsMeta_1 = require("./CreateUserConflictResponseErrorsItemsMeta");
|
|
102
|
+
const CustomEvent_1 = require("./CustomEvent");
|
|
103
|
+
const CustomEventsRequest_1 = require("./CustomEventsRequest");
|
|
104
|
+
const DeliveryData_1 = require("./DeliveryData");
|
|
105
|
+
const ExportEventsSuccessResponse_1 = require("./ExportEventsSuccessResponse");
|
|
106
|
+
const ExportSubscriptionsRequestBody_1 = require("./ExportSubscriptionsRequestBody");
|
|
107
|
+
const ExportSubscriptionsSuccessResponse_1 = require("./ExportSubscriptionsSuccessResponse");
|
|
108
|
+
const Filter_1 = require("./Filter");
|
|
109
|
+
const FilterExpression_1 = require("./FilterExpression");
|
|
110
|
+
const GenericError_1 = require("./GenericError");
|
|
111
|
+
const GenericSuccessBoolResponse_1 = require("./GenericSuccessBoolResponse");
|
|
112
|
+
const GetNotificationHistoryRequestBody_1 = require("./GetNotificationHistoryRequestBody");
|
|
113
|
+
const GetSegmentsSuccessResponse_1 = require("./GetSegmentsSuccessResponse");
|
|
114
|
+
const LanguageStringMap_1 = require("./LanguageStringMap");
|
|
115
|
+
const Notification_1 = require("./Notification");
|
|
116
|
+
const NotificationAllOf_1 = require("./NotificationAllOf");
|
|
117
|
+
const NotificationHistorySuccessResponse_1 = require("./NotificationHistorySuccessResponse");
|
|
118
|
+
const NotificationSlice_1 = require("./NotificationSlice");
|
|
119
|
+
const NotificationTarget_1 = require("./NotificationTarget");
|
|
120
|
+
const NotificationWithMeta_1 = require("./NotificationWithMeta");
|
|
121
|
+
const NotificationWithMetaAllOf_1 = require("./NotificationWithMetaAllOf");
|
|
122
|
+
const Operator_1 = require("./Operator");
|
|
123
|
+
const OutcomeData_1 = require("./OutcomeData");
|
|
124
|
+
const OutcomesData_1 = require("./OutcomesData");
|
|
125
|
+
const PlatformDeliveryData_1 = require("./PlatformDeliveryData");
|
|
126
|
+
const PlatformDeliveryDataEmailAllOf_1 = require("./PlatformDeliveryDataEmailAllOf");
|
|
127
|
+
const PlatformDeliveryDataSmsAllOf_1 = require("./PlatformDeliveryDataSmsAllOf");
|
|
128
|
+
const PropertiesBody_1 = require("./PropertiesBody");
|
|
129
|
+
const PropertiesDeltas_1 = require("./PropertiesDeltas");
|
|
130
|
+
const PropertiesObject_1 = require("./PropertiesObject");
|
|
131
|
+
const Purchase_1 = require("./Purchase");
|
|
132
|
+
const RateLimitError_1 = require("./RateLimitError");
|
|
133
|
+
const Segment_1 = require("./Segment");
|
|
134
|
+
const SegmentData_1 = require("./SegmentData");
|
|
135
|
+
const SegmentNotificationTarget_1 = require("./SegmentNotificationTarget");
|
|
136
|
+
const StartLiveActivityRequest_1 = require("./StartLiveActivityRequest");
|
|
137
|
+
const StartLiveActivitySuccessResponse_1 = require("./StartLiveActivitySuccessResponse");
|
|
138
|
+
const Subscription_1 = require("./Subscription");
|
|
139
|
+
const SubscriptionBody_1 = require("./SubscriptionBody");
|
|
140
|
+
const SubscriptionNotificationTarget_1 = require("./SubscriptionNotificationTarget");
|
|
141
|
+
const TemplateResource_1 = require("./TemplateResource");
|
|
142
|
+
const TemplatesListResponse_1 = require("./TemplatesListResponse");
|
|
143
|
+
const TransferSubscriptionRequestBody_1 = require("./TransferSubscriptionRequestBody");
|
|
144
|
+
const UpdateApiKeyRequest_1 = require("./UpdateApiKeyRequest");
|
|
145
|
+
const UpdateLiveActivityRequest_1 = require("./UpdateLiveActivityRequest");
|
|
146
|
+
const UpdateLiveActivitySuccessResponse_1 = require("./UpdateLiveActivitySuccessResponse");
|
|
147
|
+
const UpdateTemplateRequest_1 = require("./UpdateTemplateRequest");
|
|
148
|
+
const UpdateUserRequest_1 = require("./UpdateUserRequest");
|
|
149
|
+
const User_1 = require("./User");
|
|
150
|
+
const UserIdentityBody_1 = require("./UserIdentityBody");
|
|
151
|
+
const WebButton_1 = require("./WebButton");
|
|
152
|
+
let primitives = [
|
|
153
153
|
"string",
|
|
154
154
|
"boolean",
|
|
155
155
|
"double",
|
|
@@ -159,12 +159,12 @@ var primitives = [
|
|
|
159
159
|
"number",
|
|
160
160
|
"any"
|
|
161
161
|
];
|
|
162
|
-
|
|
162
|
+
const supportedMediaTypes = {
|
|
163
163
|
"application/json": Infinity,
|
|
164
164
|
"application/octet-stream": 0,
|
|
165
165
|
"application/x-www-form-urlencoded": 0
|
|
166
166
|
};
|
|
167
|
-
|
|
167
|
+
let enumsMap = new Set([
|
|
168
168
|
"ApiKeyTokenIpAllowlistModeEnum",
|
|
169
169
|
"AppApnsEnvEnum",
|
|
170
170
|
"BasicNotificationTargetChannelEnum",
|
|
@@ -193,7 +193,7 @@ var enumsMap = new Set([
|
|
|
193
193
|
"UpdateApiKeyRequestIpAllowlistModeEnum",
|
|
194
194
|
"UpdateLiveActivityRequestEventEnum",
|
|
195
195
|
]);
|
|
196
|
-
|
|
196
|
+
let typeMap = {
|
|
197
197
|
"ApiKeyToken": ApiKeyToken_1.ApiKeyToken,
|
|
198
198
|
"ApiKeyTokensListResponse": ApiKeyTokensListResponse_1.ApiKeyTokensListResponse,
|
|
199
199
|
"App": App_1.App,
|
|
@@ -262,10 +262,8 @@ var typeMap = {
|
|
|
262
262
|
"UserIdentityBody": UserIdentityBody_1.UserIdentityBody,
|
|
263
263
|
"WebButton": WebButton_1.WebButton,
|
|
264
264
|
};
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
}
|
|
268
|
-
ObjectSerializer.findCorrectType = function (data, expectedType) {
|
|
265
|
+
class ObjectSerializer {
|
|
266
|
+
static findCorrectType(data, expectedType) {
|
|
269
267
|
if (data == undefined) {
|
|
270
268
|
return expectedType;
|
|
271
269
|
}
|
|
@@ -282,7 +280,7 @@ var ObjectSerializer = (function () {
|
|
|
282
280
|
if (!typeMap[expectedType]) {
|
|
283
281
|
return expectedType;
|
|
284
282
|
}
|
|
285
|
-
|
|
283
|
+
let discriminatorProperty = typeMap[expectedType].discriminator;
|
|
286
284
|
if (discriminatorProperty == null) {
|
|
287
285
|
return expectedType;
|
|
288
286
|
}
|
|
@@ -301,8 +299,8 @@ var ObjectSerializer = (function () {
|
|
|
301
299
|
}
|
|
302
300
|
}
|
|
303
301
|
}
|
|
304
|
-
}
|
|
305
|
-
|
|
302
|
+
}
|
|
303
|
+
static serialize(data, type, format) {
|
|
306
304
|
if (data == undefined) {
|
|
307
305
|
return data;
|
|
308
306
|
}
|
|
@@ -310,20 +308,20 @@ var ObjectSerializer = (function () {
|
|
|
310
308
|
return data;
|
|
311
309
|
}
|
|
312
310
|
else if (type.lastIndexOf("Array<", 0) === 0) {
|
|
313
|
-
|
|
311
|
+
let subType = type.replace("Array<", "");
|
|
314
312
|
subType = subType.substring(0, subType.length - 1);
|
|
315
|
-
|
|
316
|
-
for (
|
|
317
|
-
|
|
313
|
+
let transformedData = [];
|
|
314
|
+
for (let index in data) {
|
|
315
|
+
let date = data[index];
|
|
318
316
|
transformedData.push(ObjectSerializer.serialize(date, subType, format));
|
|
319
317
|
}
|
|
320
318
|
return transformedData;
|
|
321
319
|
}
|
|
322
320
|
else if (type === "Date") {
|
|
323
321
|
if (format == "date") {
|
|
324
|
-
|
|
322
|
+
let month = data.getMonth() + 1;
|
|
325
323
|
month = month < 10 ? "0" + month.toString() : month.toString();
|
|
326
|
-
|
|
324
|
+
let day = data.getDate();
|
|
327
325
|
day = day < 10 ? "0" + day.toString() : day.toString();
|
|
328
326
|
return data.getFullYear() + "-" + month + "-" + day;
|
|
329
327
|
}
|
|
@@ -339,16 +337,16 @@ var ObjectSerializer = (function () {
|
|
|
339
337
|
return data;
|
|
340
338
|
}
|
|
341
339
|
type = this.findCorrectType(data, type);
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
for (
|
|
345
|
-
|
|
340
|
+
let attributeTypes = typeMap[type].getAttributeTypeMap();
|
|
341
|
+
let instance = {};
|
|
342
|
+
for (let index in attributeTypes) {
|
|
343
|
+
let attributeType = attributeTypes[index];
|
|
346
344
|
instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type, attributeType.format);
|
|
347
345
|
}
|
|
348
346
|
return instance;
|
|
349
347
|
}
|
|
350
|
-
}
|
|
351
|
-
|
|
348
|
+
}
|
|
349
|
+
static deserialize(data, type, format) {
|
|
352
350
|
type = ObjectSerializer.findCorrectType(data, type);
|
|
353
351
|
if (data == undefined) {
|
|
354
352
|
return data;
|
|
@@ -357,11 +355,11 @@ var ObjectSerializer = (function () {
|
|
|
357
355
|
return data;
|
|
358
356
|
}
|
|
359
357
|
else if (type.lastIndexOf("Array<", 0) === 0) {
|
|
360
|
-
|
|
358
|
+
let subType = type.replace("Array<", "");
|
|
361
359
|
subType = subType.substring(0, subType.length - 1);
|
|
362
|
-
|
|
363
|
-
for (
|
|
364
|
-
|
|
360
|
+
let transformedData = [];
|
|
361
|
+
for (let index in data) {
|
|
362
|
+
let date = data[index];
|
|
365
363
|
transformedData.push(ObjectSerializer.deserialize(date, subType, format));
|
|
366
364
|
}
|
|
367
365
|
return transformedData;
|
|
@@ -376,33 +374,32 @@ var ObjectSerializer = (function () {
|
|
|
376
374
|
if (!typeMap[type]) {
|
|
377
375
|
return data;
|
|
378
376
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
for (
|
|
382
|
-
|
|
383
|
-
|
|
377
|
+
let instance = new typeMap[type]();
|
|
378
|
+
let attributeTypes = typeMap[type].getAttributeTypeMap();
|
|
379
|
+
for (let index in attributeTypes) {
|
|
380
|
+
let attributeType = attributeTypes[index];
|
|
381
|
+
let value = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format);
|
|
384
382
|
if (value !== undefined) {
|
|
385
383
|
instance[attributeType.name] = value;
|
|
386
384
|
}
|
|
387
385
|
}
|
|
388
386
|
return instance;
|
|
389
387
|
}
|
|
390
|
-
}
|
|
391
|
-
|
|
388
|
+
}
|
|
389
|
+
static normalizeMediaType(mediaType) {
|
|
392
390
|
if (mediaType === undefined) {
|
|
393
391
|
return undefined;
|
|
394
392
|
}
|
|
395
393
|
return mediaType.split(";")[0].trim().toLowerCase();
|
|
396
|
-
}
|
|
397
|
-
|
|
394
|
+
}
|
|
395
|
+
static getPreferredMediaType(mediaTypes) {
|
|
398
396
|
if (!mediaTypes) {
|
|
399
397
|
return "application/json";
|
|
400
398
|
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
for (
|
|
405
|
-
var mediaType = normalMediaTypes_1[_i];
|
|
399
|
+
const normalMediaTypes = mediaTypes.map(this.normalizeMediaType);
|
|
400
|
+
let selectedMediaType = undefined;
|
|
401
|
+
let selectedRank = -Infinity;
|
|
402
|
+
for (const mediaType of normalMediaTypes) {
|
|
406
403
|
if (supportedMediaTypes[mediaType] > selectedRank) {
|
|
407
404
|
selectedMediaType = mediaType;
|
|
408
405
|
selectedRank = supportedMediaTypes[mediaType];
|
|
@@ -412,14 +409,14 @@ var ObjectSerializer = (function () {
|
|
|
412
409
|
throw new Error("None of the given media types are supported: " + mediaTypes.join(", "));
|
|
413
410
|
}
|
|
414
411
|
return selectedMediaType;
|
|
415
|
-
}
|
|
416
|
-
|
|
412
|
+
}
|
|
413
|
+
static stringify(data, mediaType) {
|
|
417
414
|
if (mediaType === "application/json") {
|
|
418
415
|
return JSON.stringify(data);
|
|
419
416
|
}
|
|
420
417
|
throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.stringify.");
|
|
421
|
-
}
|
|
422
|
-
|
|
418
|
+
}
|
|
419
|
+
static parse(rawData, mediaType) {
|
|
423
420
|
if (mediaType === undefined) {
|
|
424
421
|
throw new Error("Cannot parse content. No Content-Type defined.");
|
|
425
422
|
}
|
|
@@ -427,8 +424,7 @@ var ObjectSerializer = (function () {
|
|
|
427
424
|
return JSON.parse(rawData);
|
|
428
425
|
}
|
|
429
426
|
throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.parse.");
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
}());
|
|
427
|
+
}
|
|
428
|
+
}
|
|
433
429
|
exports.ObjectSerializer = ObjectSerializer;
|
|
434
430
|
//# sourceMappingURL=ObjectSerializer.js.map
|
package/dist/models/Operator.js
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Operator = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
Operator.getAttributeTypeMap = function () {
|
|
4
|
+
class Operator {
|
|
5
|
+
static getAttributeTypeMap() {
|
|
8
6
|
return Operator.attributeTypeMap;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"name": "operator",
|
|
14
|
-
"baseName": "operator",
|
|
15
|
-
"type": "OperatorOperatorEnum",
|
|
16
|
-
"format": ""
|
|
17
|
-
}
|
|
18
|
-
];
|
|
19
|
-
return Operator;
|
|
20
|
-
}());
|
|
7
|
+
}
|
|
8
|
+
constructor() {
|
|
9
|
+
}
|
|
10
|
+
}
|
|
21
11
|
exports.Operator = Operator;
|
|
12
|
+
Operator.discriminator = undefined;
|
|
13
|
+
Operator.attributeTypeMap = [
|
|
14
|
+
{
|
|
15
|
+
"name": "operator",
|
|
16
|
+
"baseName": "operator",
|
|
17
|
+
"type": "OperatorOperatorEnum",
|
|
18
|
+
"format": ""
|
|
19
|
+
}
|
|
20
|
+
];
|
|
22
21
|
//# sourceMappingURL=Operator.js.map
|
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OutcomeData = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
OutcomeData.getAttributeTypeMap = function () {
|
|
4
|
+
class OutcomeData {
|
|
5
|
+
static getAttributeTypeMap() {
|
|
8
6
|
return OutcomeData.attributeTypeMap;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"name": "id",
|
|
14
|
-
"baseName": "id",
|
|
15
|
-
"type": "string",
|
|
16
|
-
"format": ""
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "value",
|
|
20
|
-
"baseName": "value",
|
|
21
|
-
"type": "number",
|
|
22
|
-
"format": ""
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"name": "aggregation",
|
|
26
|
-
"baseName": "aggregation",
|
|
27
|
-
"type": "OutcomeDataAggregationEnum",
|
|
28
|
-
"format": ""
|
|
29
|
-
}
|
|
30
|
-
];
|
|
31
|
-
return OutcomeData;
|
|
32
|
-
}());
|
|
7
|
+
}
|
|
8
|
+
constructor() {
|
|
9
|
+
}
|
|
10
|
+
}
|
|
33
11
|
exports.OutcomeData = OutcomeData;
|
|
12
|
+
OutcomeData.discriminator = undefined;
|
|
13
|
+
OutcomeData.attributeTypeMap = [
|
|
14
|
+
{
|
|
15
|
+
"name": "id",
|
|
16
|
+
"baseName": "id",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"format": ""
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "value",
|
|
22
|
+
"baseName": "value",
|
|
23
|
+
"type": "number",
|
|
24
|
+
"format": ""
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "aggregation",
|
|
28
|
+
"baseName": "aggregation",
|
|
29
|
+
"type": "OutcomeDataAggregationEnum",
|
|
30
|
+
"format": ""
|
|
31
|
+
}
|
|
32
|
+
];
|
|
34
33
|
//# sourceMappingURL=OutcomeData.js.map
|