@gobodo/gobodo-api 0.1.4 → 0.1.6
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/README.md +25 -29
- package/dist/ApiClient.js +76 -139
- package/dist/api/ActionTypesApi.js +27 -27
- package/dist/api/AdCampaignsApi.js +84 -90
- package/dist/api/AdManagementApi.js +119 -129
- package/dist/api/AdminDataManagementApi.js +31 -31
- package/dist/api/AdsApi.js +67 -69
- package/dist/api/AttachmentsApi.js +70 -72
- package/dist/api/AuthenticationApi.js +45 -43
- package/dist/api/CategoriesApi.js +67 -72
- package/dist/api/CommentsApi.js +69 -76
- package/dist/api/ContentManagementApi.js +191 -225
- package/dist/api/ConversationsApi.js +67 -74
- package/dist/api/DataSheetImportsApi.js +151 -169
- package/dist/api/DefaultApi.js +106 -116
- package/dist/api/DocumentsApi.js +105 -121
- package/dist/api/EntryPartsApi.js +118 -137
- package/dist/api/FacebookApi.js +23 -21
- package/dist/api/FieldsApi.js +43 -47
- package/dist/api/FilesApi.js +35 -31
- package/dist/api/FormsApi.js +142 -165
- package/dist/api/FunctionsApi.js +32 -32
- package/dist/api/GeocodeApi.js +55 -62
- package/dist/api/GoogleApi.js +23 -21
- package/dist/api/GraphActionsApi.js +94 -106
- package/dist/api/GraphObjectTypesApi.js +86 -90
- package/dist/api/GraphObjectsApi.js +590 -606
- package/dist/api/GraphRelationshipTypesApi.js +157 -177
- package/dist/api/GraphRelationshipsApi.js +257 -296
- package/dist/api/GraphSchemasApi.js +75 -82
- package/dist/api/GraphTraversalApi.js +55 -64
- package/dist/api/GraphsApi.js +100 -116
- package/dist/api/GroupsApi.js +95 -108
- package/dist/api/IAMApi.js +52 -52
- package/dist/api/ImagesApi.js +85 -87
- package/dist/api/InvitesApi.js +49 -53
- package/dist/api/LikesApi.js +102 -114
- package/dist/api/LinkedINApi.js +23 -21
- package/dist/api/LiveMeetingsApi.js +43 -45
- package/dist/api/MeetingEventsApi.js +53 -58
- package/dist/api/PagesApi.js +82 -94
- package/dist/api/PostsApi.js +49 -52
- package/dist/api/PrivateMessagesApi.js +113 -129
- package/dist/api/PublicationsApi.js +25 -23
- package/dist/api/ScreensApi.js +39 -41
- package/dist/api/SocialIntegrationApi.js +35 -33
- package/dist/api/StripeAccountsApi.js +77 -91
- package/dist/api/TagsApi.js +28 -28
- package/dist/api/TemplatesApi.js +39 -41
- package/dist/api/ThemeMappingsApi.js +38 -40
- package/dist/api/TransactionsApi.js +26 -26
- package/dist/api/TwitterApi.js +23 -21
- package/dist/api/UserTagsApi.js +85 -97
- package/dist/api/UsersApi.js +75 -87
- package/dist/api/UtilsApi.js +22 -20
- package/dist/api/VideosApi.js +101 -115
- package/dist/index.js +350 -512
- package/dist/model/APIClient.js +67 -47
- package/dist/model/Article.js +110 -89
- package/dist/model/Authorization.js +45 -24
- package/dist/model/Comment.js +73 -61
- package/dist/model/Coordinates.js +32 -22
- package/dist/model/CreateAccountResponse.js +46 -25
- package/dist/model/CreateCustomerResponse.js +46 -25
- package/dist/model/CreateStripeAccountInput.js +47 -29
- package/dist/model/CreateStripeCustomerInput.js +41 -24
- package/dist/model/DataObject.js +32 -22
- package/dist/model/DataSheetImport.js +122 -85
- package/dist/model/DataSheetImportPrivacySettings.js +33 -24
- package/dist/model/DataSheetImportSummary.js +62 -28
- package/dist/model/Document.js +136 -94
- package/dist/model/DocumentPart.js +129 -84
- package/dist/model/DocumentPartType.js +67 -40
- package/dist/model/DocumentType.js +77 -54
- package/dist/model/FieldMapping.js +41 -30
- package/dist/model/Fields.js +93 -108
- package/dist/model/File.js +58 -44
- package/dist/model/FileAttachmentUploadObject.js +63 -58
- package/dist/model/Filter.js +40 -22
- package/dist/model/FilterManager.js +56 -23
- package/dist/model/Form.js +112 -47
- package/dist/model/FormSection.js +86 -33
- package/dist/model/FormSubmission.js +50 -32
- package/dist/model/Geocode.js +44 -28
- package/dist/model/GeocodePayload.js +42 -24
- package/dist/model/GeolocationInput.js +62 -30
- package/dist/model/Graph.js +77 -69
- package/dist/model/GraphAction.js +47 -39
- package/dist/model/GraphDatabaseService.js +43 -38
- package/dist/model/GraphGeocode.js +56 -35
- package/dist/model/GraphIteratorEntryPart.js +58 -24
- package/dist/model/GraphIteratorEntryPartStackTraceInner.js +166 -0
- package/dist/model/GraphObject.js +78 -55
- package/dist/model/GraphObjectPayload.js +86 -36
- package/dist/model/GraphObjectSchema.js +90 -62
- package/dist/model/GraphObjectType.js +91 -67
- package/dist/model/GraphObjectTypeSchema.js +110 -67
- package/dist/model/GraphOwner.js +37 -24
- package/dist/model/GraphRelation.js +48 -39
- package/dist/model/GraphRelationObjectObject.js +48 -39
- package/dist/model/GraphRelationship.js +48 -40
- package/dist/model/GraphRelationshipPayload.js +38 -26
- package/dist/model/GraphRelationshipType.js +100 -73
- package/dist/model/GraphSchema.js +89 -69
- package/dist/model/GraphTraversalInput.js +99 -60
- package/dist/model/Image.js +79 -61
- package/dist/model/ImageUploadObject.js +91 -73
- package/dist/model/InputPart.js +52 -36
- package/dist/model/InputPartMediaType.js +43 -28
- package/dist/model/Link.js +63 -35
- package/dist/model/LiveStreamInfo.js +45 -24
- package/dist/model/MeetingEvent.js +109 -76
- package/dist/model/MeetingEventTimezone.js +42 -26
- package/dist/model/MeetingInfo.js +48 -29
- package/dist/model/Member.js +108 -68
- package/dist/model/MemberGroupCategory.js +44 -30
- package/dist/model/MemberList.js +35 -39
- package/dist/model/MessageGroup.js +43 -30
- package/dist/model/MultipartBody.js +36 -22
- package/dist/model/Objecttype.js +104 -64
- package/dist/model/Page.js +60 -47
- package/dist/model/PageSchema.js +79 -65
- package/dist/model/Pageable.js +41 -31
- package/dist/model/Path.js +36 -21
- package/dist/model/PaymentIntentInput.js +38 -26
- package/dist/model/PaymentIntentResponse.js +40 -22
- package/dist/model/PaymentMethod.js +52 -30
- package/dist/model/Post.js +60 -47
- package/dist/model/PrivateMessage.js +78 -62
- package/dist/model/PrivateMessageConversation.js +118 -81
- package/dist/model/PrivateMessageConversationSchema.js +75 -28
- package/dist/model/Profile.js +44 -28
- package/dist/model/Profiletype.js +63 -28
- package/dist/model/PropertyContainer.js +38 -25
- package/dist/model/PurgeDataDefaultResponseValue.js +133 -0
- package/dist/model/RelationshipMapping.js +71 -35
- package/dist/model/ScreenSchema.js +230 -89
- package/dist/model/SimulcastInfo.js +45 -24
- package/dist/model/SkinField.js +93 -108
- package/dist/model/SocialGroup.js +91 -69
- package/dist/model/SocialGroupType.js +61 -37
- package/dist/model/Sort.js +33 -24
- package/dist/model/StatusUpdate.js +53 -42
- package/dist/model/StreetAddress.js +55 -28
- package/dist/model/StripeAccount.js +43 -28
- package/dist/model/StripeCustomerAccount.js +43 -28
- package/dist/model/Template.js +49 -32
- package/dist/model/TemplateSchema.js +50 -35
- package/dist/model/ThemeMapping.js +50 -32
- package/dist/model/ThemeMappingPayload.js +45 -31
- package/dist/model/Transaction.js +40 -22
- package/dist/model/User.js +108 -68
- package/dist/model/UserDataPayload.js +108 -68
- package/dist/model/UserDomain.js +46 -26
- package/dist/model/UserInvite.js +66 -43
- package/dist/model/UserInviteInput.js +52 -30
- package/dist/model/UserSchema.js +108 -68
- package/dist/model/UserTag.js +51 -32
- package/dist/model/Video.js +104 -85
- package/dist/model/VideoLiveUrl.js +46 -28
- package/dist/model/VideoSchema.js +122 -98
- package/dist/model/VideoUploadObject.js +129 -83
- package/dist/model/ZeusPortalCategory.js +72 -45
- package/package.json +3 -3
- package/dist/model/Account.js +0 -315
- package/dist/model/AchCreditTransfer.js +0 -122
- package/dist/model/AchDebit.js +0 -140
- package/dist/model/AcssDebit.js +0 -106
- package/dist/model/AddInvoiceItem.js +0 -126
- package/dist/model/Address.js +0 -140
- package/dist/model/Affirm.js +0 -104
- package/dist/model/AfterpayClearpay.js +0 -113
- package/dist/model/Alipay.js +0 -95
- package/dist/model/AlternateStatementDescriptors.js +0 -104
- package/dist/model/Alternative.js +0 -104
- package/dist/model/AmexExpressCheckout.js +0 -86
- package/dist/model/AmountDetails.js +0 -97
- package/dist/model/ApplePay.js +0 -86
- package/dist/model/Application.js +0 -122
- package/dist/model/ApplicationFee.js +0 -267
- package/dist/model/AppliesTo.js +0 -95
- package/dist/model/AuBecsDebit.js +0 -95
- package/dist/model/AutomaticPaymentMethodsPaymentIntent.js +0 -95
- package/dist/model/AutomaticTax.js +0 -95
- package/dist/model/BacsDebit.js +0 -95
- package/dist/model/BacsDebitPayments.js +0 -95
- package/dist/model/BalanceSettings.js +0 -95
- package/dist/model/BalanceTransaction.js +0 -234
- package/dist/model/BalanceTransactionSource.js +0 -84
- package/dist/model/Bancontact.js +0 -180
- package/dist/model/BankTransfer.js +0 -106
- package/dist/model/BillingDetails.js +0 -124
- package/dist/model/BillingThresholds.js +0 -95
- package/dist/model/Blik.js +0 -86
- package/dist/model/BlikMandateOptions.js +0 -115
- package/dist/model/BlikMandateOptionsOffSessionDetails.js +0 -122
- package/dist/model/Boleto.js +0 -95
- package/dist/model/Breakdown.js +0 -108
- package/dist/model/BusinessProfile.js +0 -160
- package/dist/model/Capabilities.js +0 -383
- package/dist/model/Card.js +0 -247
- package/dist/model/CardPresent.js +0 -268
- package/dist/model/CashBalance.js +0 -135
- package/dist/model/Charge.js +0 -706
- package/dist/model/ChargeCollection.js +0 -146
- package/dist/model/Checks.js +0 -113
- package/dist/model/Company.js +0 -238
- package/dist/model/Computed.js +0 -108
- package/dist/model/Controller.js +0 -104
- package/dist/model/Coupon.js +0 -256
- package/dist/model/CreateAccountResponseFailureException.js +0 -117
- package/dist/model/CreateAccountResponseFailureExceptionCause.js +0 -106
- package/dist/model/CreateAccountResponseFailureExceptionCauseStackTrace.js +0 -138
- package/dist/model/CreateAccountResponseFailureExceptionCauseSuppressed.js +0 -95
- package/dist/model/CreditedItems.js +0 -104
- package/dist/model/CurrencyOption.js +0 -135
- package/dist/model/CurrentPhase.js +0 -104
- package/dist/model/CustomField.js +0 -104
- package/dist/model/CustomUnitAmount.js +0 -113
- package/dist/model/Customer.js +0 -400
- package/dist/model/CustomerAcceptance.js +0 -126
- package/dist/model/CustomerBalance.js +0 -86
- package/dist/model/CustomerNotification.js +0 -104
- package/dist/model/CustomerTaxId.js +0 -104
- package/dist/model/DateOfBirth.js +0 -113
- package/dist/model/DeclineChargeOn.js +0 -104
- package/dist/model/DefaultSettings.js +0 -177
- package/dist/model/Discount.js +0 -104
- package/dist/model/DiscountAmount.js +0 -115
- package/dist/model/Dispute.js +0 -260
- package/dist/model/EmailSent.js +0 -104
- package/dist/model/Eps.js +0 -104
- package/dist/model/Errors.js +0 -113
- package/dist/model/EuBankTransfer.js +0 -95
- package/dist/model/Evidence.js +0 -410
- package/dist/model/EvidenceDetails.js +0 -122
- package/dist/model/ExternalAccount.js +0 -84
- package/dist/model/ExternalAccountCollection.js +0 -146
- package/dist/model/Familymart.js +0 -104
- package/dist/model/Fee.js +0 -131
- package/dist/model/FeeRefund.js +0 -182
- package/dist/model/FeeRefundCollection.js +0 -146
- package/dist/model/FileAttachmentUpload.js +0 -88
- package/dist/model/FileLink.js +0 -178
- package/dist/model/FileLinkCollection.js +0 -146
- package/dist/model/FinancialAddress.js +0 -148
- package/dist/model/FinancialConnections.js +0 -95
- package/dist/model/Fpx.js +0 -113
- package/dist/model/FraudDetails.js +0 -104
- package/dist/model/FromQuote.js +0 -115
- package/dist/model/FutureRequirements.js +0 -144
- package/dist/model/GeneratedFrom.js +0 -126
- package/dist/model/Giropay.js +0 -122
- package/dist/model/GooglePay.js +0 -86
- package/dist/model/Grabpay.js +0 -95
- package/dist/model/GraphIteratorEntryPartStackTrace.js +0 -138
- package/dist/model/GraphObjectDescriptorSchema.js +0 -179
- package/dist/model/Iban.js +0 -122
- package/dist/model/Ideal.js +0 -162
- package/dist/model/ImageUpload.js +0 -88
- package/dist/model/InlineObject.js +0 -124
- package/dist/model/InlineObject1.js +0 -124
- package/dist/model/InlineObject2.js +0 -124
- package/dist/model/InlineObject3.js +0 -124
- package/dist/model/InlineObject4.js +0 -124
- package/dist/model/InlineObject5.js +0 -124
- package/dist/model/InlineResponseDefault.js +0 -124
- package/dist/model/Installments.js +0 -97
- package/dist/model/InteracPresent.js +0 -241
- package/dist/model/Invoice.js +0 -925
- package/dist/model/InvoiceLineItem.js +0 -329
- package/dist/model/InvoiceLineItemCollection.js +0 -146
- package/dist/model/InvoiceLineItemPeriod.js +0 -104
- package/dist/model/InvoiceSettings.js +0 -95
- package/dist/model/JapanAddress.js +0 -149
- package/dist/model/JsonArray.js +0 -252
- package/dist/model/JsonNull.js +0 -252
- package/dist/model/JsonObject.js +0 -252
- package/dist/model/JsonPrimitive.js +0 -288
- package/dist/model/Klarna.js +0 -104
- package/dist/model/Konbini.js +0 -97
- package/dist/model/Lawson.js +0 -104
- package/dist/model/Level3.js +0 -142
- package/dist/model/LineItem.js +0 -220
- package/dist/model/LineItemCollection.js +0 -146
- package/dist/model/Location.js +0 -113
- package/dist/model/Mandate.js +0 -195
- package/dist/model/MandateOptions.js +0 -95
- package/dist/model/Masterpass.js +0 -124
- package/dist/model/Ministop.js +0 -104
- package/dist/model/MultiUse.js +0 -86
- package/dist/model/Multibanco.js +0 -104
- package/dist/model/MultipartFormDataInput.js +0 -108
- package/dist/model/Networks.js +0 -104
- package/dist/model/NextAction.js +0 -249
- package/dist/model/NextActionAlipayHandleRedirect.js +0 -122
- package/dist/model/NextActionCardAwaitNotification.js +0 -104
- package/dist/model/NextActionDisplayBankTransferInstructions.js +0 -142
- package/dist/model/NextActionDisplayBoletoDetails.js +0 -122
- package/dist/model/NextActionDisplayDetails.js +0 -106
- package/dist/model/NextActionKonbiniDisplayDetails.js +0 -115
- package/dist/model/NextActionOxxoDisplayDetails.js +0 -113
- package/dist/model/NextActionRedirectToUrl.js +0 -104
- package/dist/model/Offline.js +0 -86
- package/dist/model/Online.js +0 -104
- package/dist/model/Outcome.js +0 -160
- package/dist/model/OwnershipDeclaration.js +0 -113
- package/dist/model/Oxxo.js +0 -95
- package/dist/model/P24.js +0 -113
- package/dist/model/PackageDimensions.js +0 -122
- package/dist/model/PauseCollection.js +0 -104
- package/dist/model/PaymentIntent.js +0 -534
- package/dist/model/PaymentMethodDetails.js +0 -480
- package/dist/model/PaymentMethodOptions.js +0 -152
- package/dist/model/PaymentSettings.js +0 -115
- package/dist/model/PaymentSource.js +0 -84
- package/dist/model/PaymentSourceCollection.js +0 -146
- package/dist/model/Paynow.js +0 -95
- package/dist/model/PaynowDisplayQrCode.js +0 -113
- package/dist/model/PayoutSchedule.js +0 -122
- package/dist/model/PendingInvoiceItemInterval.js +0 -104
- package/dist/model/PendingUpdate.js +0 -133
- package/dist/model/Person.js +0 -381
- package/dist/model/Phase.js +0 -286
- package/dist/model/PhaseItem.js +0 -157
- package/dist/model/Plan.js +0 -292
- package/dist/model/Price.js +0 -309
- package/dist/model/Processing.js +0 -106
- package/dist/model/Product.js +0 -310
- package/dist/model/PromotionCode.js +0 -220
- package/dist/model/Promptpay.js +0 -95
- package/dist/model/PromptpayDisplayQrCode.js +0 -122
- package/dist/model/ProrationDetails.js +0 -97
- package/dist/model/Quote.js +0 -520
- package/dist/model/RadarOptions.js +0 -95
- package/dist/model/Receipt.js +0 -167
- package/dist/model/Recurring.js +0 -133
- package/dist/model/Refund.js +0 -332
- package/dist/model/RefundCollection.js +0 -146
- package/dist/model/Relationship.js +0 -140
- package/dist/model/RenderingOptions.js +0 -95
- package/dist/model/RequestOptions.js +0 -167
- package/dist/model/RequestOptionsProxyCredential.js +0 -84
- package/dist/model/Requirements.js +0 -162
- package/dist/model/Restrictions.js +0 -126
- package/dist/model/Review.js +0 -238
- package/dist/model/Rule.js +0 -113
- package/dist/model/SamsungPay.js +0 -86
- package/dist/model/Seicomart.js +0 -104
- package/dist/model/SepaCreditTransfer.js +0 -113
- package/dist/model/SepaDebit.js +0 -142
- package/dist/model/SepaDebitMandateOptions.js +0 -86
- package/dist/model/SepaDebitPayments.js +0 -95
- package/dist/model/Session.js +0 -122
- package/dist/model/Settings.js +0 -185
- package/dist/model/SettingsBranding.js +0 -140
- package/dist/model/SettingsCardIssuing.js +0 -97
- package/dist/model/SettingsCardPayments.js +0 -124
- package/dist/model/SettingsDashboard.js +0 -104
- package/dist/model/SettingsPayments.js +0 -131
- package/dist/model/SettingsPayouts.js +0 -115
- package/dist/model/SettingsTreasury.js +0 -97
- package/dist/model/SetupAttempt.js +0 -280
- package/dist/model/SetupIntent.js +0 -376
- package/dist/model/ShippingDetails.js +0 -133
- package/dist/model/SingleUse.js +0 -104
- package/dist/model/Sofort.js +0 -189
- package/dist/model/SortCode.js +0 -113
- package/dist/model/Spei.js +0 -113
- package/dist/model/StatusTransitions.js +0 -113
- package/dist/model/Store.js +0 -95
- package/dist/model/Stores.js +0 -130
- package/dist/model/StripeError.js +0 -202
- package/dist/model/Subscription.js +0 -556
- package/dist/model/SubscriptionCollection.js +0 -146
- package/dist/model/SubscriptionData.js +0 -104
- package/dist/model/SubscriptionItem.js +0 -195
- package/dist/model/SubscriptionItemCollection.js +0 -146
- package/dist/model/SubscriptionSchedule.js +0 -300
- package/dist/model/Tax.js +0 -115
- package/dist/model/TaxAmount.js +0 -124
- package/dist/model/TaxCode.js +0 -122
- package/dist/model/TaxId.js +0 -189
- package/dist/model/TaxIdCollection.js +0 -146
- package/dist/model/TaxRate.js +0 -214
- package/dist/model/TestClock.js +0 -167
- package/dist/model/ThreeDSecure.js +0 -122
- package/dist/model/ThreeDSecureUsage.js +0 -95
- package/dist/model/ThresholdItemReason.js +0 -104
- package/dist/model/ThresholdReason.js +0 -106
- package/dist/model/Tier.js +0 -131
- package/dist/model/Tip.js +0 -95
- package/dist/model/TosAcceptance.js +0 -122
- package/dist/model/TotalDetails.js +0 -124
- package/dist/model/Transfer.js +0 -285
- package/dist/model/TransferData.js +0 -124
- package/dist/model/TransferReversal.js +0 -220
- package/dist/model/TransferReversalCollection.js +0 -146
- package/dist/model/TransformQuantity.js +0 -104
- package/dist/model/TransformUsage.js +0 -104
- package/dist/model/TraversalQuery.js +0 -209
- package/dist/model/TraversalQueryStartobjecttypes.js +0 -179
- package/dist/model/USBankAccount.js +0 -140
- package/dist/model/Upfront.js +0 -126
- package/dist/model/Verification.js +0 -113
- package/dist/model/VerificationDocument.js +0 -140
- package/dist/model/VerifyWithMicrodeposits.js +0 -113
- package/dist/model/VideoUpload.js +0 -88
- package/dist/model/VisaCheckout.js +0 -124
- package/dist/model/Wallet.js +0 -170
- package/dist/model/Wechat.js +0 -86
- package/dist/model/WechatPay.js +0 -104
- package/dist/model/WechatPayDisplayQrCode.js +0 -122
- package/dist/model/WechatPayRedirectToAndroidApp.js +0 -158
- package/dist/model/WechatPayRedirectToIosApp.js +0 -95
- package/dist/model/Zengin.js +0 -149
package/dist/ApiClient.js
CHANGED
|
@@ -4,26 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _superagent = _interopRequireDefault(require("superagent"));
|
|
9
|
-
|
|
10
8
|
var _querystring = _interopRequireDefault(require("querystring"));
|
|
11
|
-
|
|
12
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
15
|
-
|
|
10
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
16
11
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
12
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
13
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
|
|
16
|
+
* Gobodo API
|
|
17
|
+
* REST Interface for Gobodo API
|
|
18
|
+
*
|
|
19
|
+
* The version of the OpenAPI document: 0.1.6
|
|
20
|
+
* Contact: info@gobodo.io
|
|
21
|
+
*
|
|
22
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
23
|
+
* https://openapi-generator.tech
|
|
24
|
+
* Do not edit the class manually.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
22
27
|
/**
|
|
23
28
|
* @module ApiClient
|
|
24
|
-
* @version 0.1.
|
|
29
|
+
* @version 0.1.6
|
|
25
30
|
*/
|
|
26
|
-
|
|
27
31
|
/**
|
|
28
32
|
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
|
|
29
33
|
* application to use this class directly - the *Api and model classes provide the public API for the service. The
|
|
@@ -32,20 +36,25 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
32
36
|
* @class
|
|
33
37
|
*/
|
|
34
38
|
var ApiClient = /*#__PURE__*/function () {
|
|
39
|
+
/**
|
|
40
|
+
* The base URL against which to resolve every API call's (relative) path.
|
|
41
|
+
* Overrides the default value set in spec file if present
|
|
42
|
+
* @param {String} basePath
|
|
43
|
+
*/
|
|
35
44
|
function ApiClient() {
|
|
45
|
+
var basePath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'https://test.api.gobodo.io';
|
|
36
46
|
_classCallCheck(this, ApiClient);
|
|
37
|
-
|
|
38
47
|
/**
|
|
39
48
|
* The base URL against which to resolve every API call's (relative) path.
|
|
40
49
|
* @type {String}
|
|
41
50
|
* @default https://test.api.gobodo.io
|
|
42
51
|
*/
|
|
43
|
-
this.basePath =
|
|
52
|
+
this.basePath = basePath.replace(/\/+$/, '');
|
|
53
|
+
|
|
44
54
|
/**
|
|
45
55
|
* The authentication methods to be included for all API calls.
|
|
46
56
|
* @type {Array.<String>}
|
|
47
57
|
*/
|
|
48
|
-
|
|
49
58
|
this.authentications = {
|
|
50
59
|
'NexusGraphAPIAuth': {
|
|
51
60
|
type: 'apiKey',
|
|
@@ -58,87 +67,82 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
58
67
|
name: 'apiKey'
|
|
59
68
|
}
|
|
60
69
|
};
|
|
70
|
+
|
|
61
71
|
/**
|
|
62
72
|
* The default HTTP headers to be included for all API calls.
|
|
63
73
|
* @type {Array.<String>}
|
|
64
74
|
* @default {}
|
|
65
75
|
*/
|
|
66
|
-
|
|
67
76
|
this.defaultHeaders = {
|
|
68
|
-
'User-Agent': 'OpenAPI-Generator/0.1.
|
|
77
|
+
'User-Agent': 'OpenAPI-Generator/0.1.6/Javascript'
|
|
69
78
|
};
|
|
79
|
+
|
|
70
80
|
/**
|
|
71
81
|
* The default HTTP timeout for all API calls.
|
|
72
82
|
* @type {Number}
|
|
73
83
|
* @default 60000
|
|
74
84
|
*/
|
|
75
|
-
|
|
76
85
|
this.timeout = 60000;
|
|
86
|
+
|
|
77
87
|
/**
|
|
78
88
|
* If set to false an additional timestamp parameter is added to all API GET calls to
|
|
79
89
|
* prevent browser caching
|
|
80
90
|
* @type {Boolean}
|
|
81
91
|
* @default true
|
|
82
92
|
*/
|
|
83
|
-
|
|
84
93
|
this.cache = true;
|
|
94
|
+
|
|
85
95
|
/**
|
|
86
96
|
* If set to true, the client will save the cookies from each server
|
|
87
97
|
* response, and return them in the next request.
|
|
88
98
|
* @default false
|
|
89
99
|
*/
|
|
90
|
-
|
|
91
100
|
this.enableCookies = false;
|
|
101
|
+
|
|
92
102
|
/*
|
|
93
103
|
* Used to save and return cookies in a node.js (non-browser) setting,
|
|
94
104
|
* if this.enableCookies is set to true.
|
|
95
105
|
*/
|
|
96
|
-
|
|
97
106
|
if (typeof window === 'undefined') {
|
|
98
107
|
this.agent = new _superagent["default"].agent();
|
|
99
108
|
}
|
|
109
|
+
|
|
100
110
|
/*
|
|
101
111
|
* Allow user to override superagent agent
|
|
102
112
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
113
|
this.requestAgent = null;
|
|
114
|
+
|
|
106
115
|
/*
|
|
107
116
|
* Allow user to add superagent plugins
|
|
108
117
|
*/
|
|
109
|
-
|
|
110
118
|
this.plugins = null;
|
|
111
119
|
}
|
|
120
|
+
|
|
112
121
|
/**
|
|
113
122
|
* Returns a string representation for an actual parameter.
|
|
114
123
|
* @param param The actual parameter.
|
|
115
124
|
* @returns {String} The string representation of <code>param</code>.
|
|
116
125
|
*/
|
|
117
|
-
|
|
118
|
-
|
|
119
126
|
_createClass(ApiClient, [{
|
|
120
127
|
key: "paramToString",
|
|
121
128
|
value: function paramToString(param) {
|
|
122
129
|
if (param == undefined || param == null) {
|
|
123
130
|
return '';
|
|
124
131
|
}
|
|
125
|
-
|
|
126
132
|
if (param instanceof Date) {
|
|
127
133
|
return param.toJSON();
|
|
128
134
|
}
|
|
129
|
-
|
|
130
135
|
if (ApiClient.canBeJsonified(param)) {
|
|
131
136
|
return JSON.stringify(param);
|
|
132
137
|
}
|
|
133
|
-
|
|
134
138
|
return param.toString();
|
|
135
139
|
}
|
|
140
|
+
|
|
136
141
|
/**
|
|
137
142
|
* Returns a boolean indicating if the parameter could be JSON.stringified
|
|
138
143
|
* @param param The actual parameter
|
|
139
144
|
* @returns {Boolean} Flag indicating if <code>param</code> can be JSON.stringified
|
|
140
145
|
*/
|
|
141
|
-
|
|
142
146
|
}, {
|
|
143
147
|
key: "buildUrl",
|
|
144
148
|
value:
|
|
@@ -152,30 +156,27 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
152
156
|
*/
|
|
153
157
|
function buildUrl(path, pathParams, apiBasePath) {
|
|
154
158
|
var _this = this;
|
|
155
|
-
|
|
156
159
|
if (!path.match(/^\//)) {
|
|
157
160
|
path = '/' + path;
|
|
158
161
|
}
|
|
162
|
+
var url = this.basePath + path;
|
|
159
163
|
|
|
160
|
-
|
|
161
|
-
|
|
164
|
+
// use API (operation, path) base path if defined
|
|
162
165
|
if (apiBasePath !== null && apiBasePath !== undefined) {
|
|
163
166
|
url = apiBasePath + path;
|
|
164
167
|
}
|
|
165
|
-
|
|
166
168
|
url = url.replace(/\{([\w-\.]+)\}/g, function (fullMatch, key) {
|
|
167
169
|
var value;
|
|
168
|
-
|
|
169
170
|
if (pathParams.hasOwnProperty(key)) {
|
|
170
171
|
value = _this.paramToString(pathParams[key]);
|
|
171
172
|
} else {
|
|
172
173
|
value = fullMatch;
|
|
173
174
|
}
|
|
174
|
-
|
|
175
175
|
return encodeURIComponent(value);
|
|
176
176
|
});
|
|
177
177
|
return url;
|
|
178
178
|
}
|
|
179
|
+
|
|
179
180
|
/**
|
|
180
181
|
* Checks whether the given content type represents JSON.<br>
|
|
181
182
|
* JSON content type examples:<br>
|
|
@@ -187,18 +188,17 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
187
188
|
* @param {String} contentType The MIME content type to check.
|
|
188
189
|
* @returns {Boolean} <code>true</code> if <code>contentType</code> represents JSON, otherwise <code>false</code>.
|
|
189
190
|
*/
|
|
190
|
-
|
|
191
191
|
}, {
|
|
192
192
|
key: "isJsonMime",
|
|
193
193
|
value: function isJsonMime(contentType) {
|
|
194
194
|
return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i));
|
|
195
195
|
}
|
|
196
|
+
|
|
196
197
|
/**
|
|
197
198
|
* Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first.
|
|
198
199
|
* @param {Array.<String>} contentTypes
|
|
199
200
|
* @returns {String} The chosen content type, preferring JSON.
|
|
200
201
|
*/
|
|
201
|
-
|
|
202
202
|
}, {
|
|
203
203
|
key: "jsonPreferredMime",
|
|
204
204
|
value: function jsonPreferredMime(contentTypes) {
|
|
@@ -207,48 +207,45 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
207
207
|
return contentTypes[i];
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
|
|
211
210
|
return contentTypes[0];
|
|
212
211
|
}
|
|
212
|
+
|
|
213
213
|
/**
|
|
214
214
|
* Checks whether the given parameter value represents file-like content.
|
|
215
215
|
* @param param The parameter to check.
|
|
216
216
|
* @returns {Boolean} <code>true</code> if <code>param</code> represents a file.
|
|
217
217
|
*/
|
|
218
|
-
|
|
219
218
|
}, {
|
|
220
219
|
key: "isFileParam",
|
|
221
220
|
value: function isFileParam(param) {
|
|
222
221
|
// fs.ReadStream in Node.js and Electron (but not in runtime like browserify)
|
|
223
222
|
if (typeof require === 'function') {
|
|
224
223
|
var fs;
|
|
225
|
-
|
|
226
224
|
try {
|
|
227
225
|
fs = require('fs');
|
|
228
226
|
} catch (err) {}
|
|
229
|
-
|
|
230
227
|
if (fs && fs.ReadStream && param instanceof fs.ReadStream) {
|
|
231
228
|
return true;
|
|
232
229
|
}
|
|
233
|
-
}
|
|
234
|
-
|
|
230
|
+
}
|
|
235
231
|
|
|
232
|
+
// Buffer in Node.js
|
|
236
233
|
if (typeof Buffer === 'function' && param instanceof Buffer) {
|
|
237
234
|
return true;
|
|
238
|
-
}
|
|
239
|
-
|
|
235
|
+
}
|
|
240
236
|
|
|
237
|
+
// Blob in browser
|
|
241
238
|
if (typeof Blob === 'function' && param instanceof Blob) {
|
|
242
239
|
return true;
|
|
243
|
-
}
|
|
244
|
-
|
|
240
|
+
}
|
|
245
241
|
|
|
242
|
+
// File in browser (it seems File object is also instance of Blob, but keep this for safe)
|
|
246
243
|
if (typeof File === 'function' && param instanceof File) {
|
|
247
244
|
return true;
|
|
248
245
|
}
|
|
249
|
-
|
|
250
246
|
return false;
|
|
251
247
|
}
|
|
248
|
+
|
|
252
249
|
/**
|
|
253
250
|
* Normalizes parameter values:
|
|
254
251
|
* <ul>
|
|
@@ -259,16 +256,13 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
259
256
|
* @param {Object.<String, Object>} params The parameters as object properties.
|
|
260
257
|
* @returns {Object.<String, Object>} normalized parameters.
|
|
261
258
|
*/
|
|
262
|
-
|
|
263
259
|
}, {
|
|
264
260
|
key: "normalizeParams",
|
|
265
261
|
value: function normalizeParams(params) {
|
|
266
262
|
var newParams = {};
|
|
267
|
-
|
|
268
263
|
for (var key in params) {
|
|
269
264
|
if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) {
|
|
270
265
|
var value = params[key];
|
|
271
|
-
|
|
272
266
|
if (this.isFileParam(value) || Array.isArray(value)) {
|
|
273
267
|
newParams[key] = value;
|
|
274
268
|
} else {
|
|
@@ -276,9 +270,9 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
276
270
|
}
|
|
277
271
|
}
|
|
278
272
|
}
|
|
279
|
-
|
|
280
273
|
return newParams;
|
|
281
274
|
}
|
|
275
|
+
|
|
282
276
|
/**
|
|
283
277
|
* Builds a string representation of an array-type actual parameter, according to the given collection format.
|
|
284
278
|
* @param {Array} param An array parameter.
|
|
@@ -286,60 +280,48 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
286
280
|
* @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns
|
|
287
281
|
* <code>param</code> as is if <code>collectionFormat</code> is <code>multi</code>.
|
|
288
282
|
*/
|
|
289
|
-
|
|
290
283
|
}, {
|
|
291
284
|
key: "buildCollectionParam",
|
|
292
285
|
value: function buildCollectionParam(param, collectionFormat) {
|
|
293
286
|
if (param == null) {
|
|
294
287
|
return null;
|
|
295
288
|
}
|
|
296
|
-
|
|
297
289
|
switch (collectionFormat) {
|
|
298
290
|
case 'csv':
|
|
299
291
|
return param.map(this.paramToString, this).join(',');
|
|
300
|
-
|
|
301
292
|
case 'ssv':
|
|
302
293
|
return param.map(this.paramToString, this).join(' ');
|
|
303
|
-
|
|
304
294
|
case 'tsv':
|
|
305
295
|
return param.map(this.paramToString, this).join('\t');
|
|
306
|
-
|
|
307
296
|
case 'pipes':
|
|
308
297
|
return param.map(this.paramToString, this).join('|');
|
|
309
|
-
|
|
310
298
|
case 'multi':
|
|
311
299
|
//return the array directly as SuperAgent will handle it as expected
|
|
312
300
|
return param.map(this.paramToString, this);
|
|
313
|
-
|
|
314
301
|
case 'passthrough':
|
|
315
302
|
return param;
|
|
316
|
-
|
|
317
303
|
default:
|
|
318
304
|
throw new Error('Unknown collection format: ' + collectionFormat);
|
|
319
305
|
}
|
|
320
306
|
}
|
|
307
|
+
|
|
321
308
|
/**
|
|
322
309
|
* Applies authentication headers to the request.
|
|
323
310
|
* @param {Object} request The request object created by a <code>superagent()</code> call.
|
|
324
311
|
* @param {Array.<String>} authNames An array of authentication method names.
|
|
325
312
|
*/
|
|
326
|
-
|
|
327
313
|
}, {
|
|
328
314
|
key: "applyAuthToRequest",
|
|
329
315
|
value: function applyAuthToRequest(request, authNames) {
|
|
330
316
|
var _this2 = this;
|
|
331
|
-
|
|
332
317
|
authNames.forEach(function (authName) {
|
|
333
318
|
var auth = _this2.authentications[authName];
|
|
334
|
-
|
|
335
319
|
switch (auth.type) {
|
|
336
320
|
case 'basic':
|
|
337
321
|
if (auth.username || auth.password) {
|
|
338
322
|
request.auth(auth.username || '', auth.password || '');
|
|
339
323
|
}
|
|
340
|
-
|
|
341
324
|
break;
|
|
342
|
-
|
|
343
325
|
case 'bearer':
|
|
344
326
|
if (auth.accessToken) {
|
|
345
327
|
var localVarBearerToken = typeof auth.accessToken === 'function' ? auth.accessToken() : auth.accessToken;
|
|
@@ -347,42 +329,35 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
347
329
|
'Authorization': 'Bearer ' + localVarBearerToken
|
|
348
330
|
});
|
|
349
331
|
}
|
|
350
|
-
|
|
351
332
|
break;
|
|
352
|
-
|
|
353
333
|
case 'apiKey':
|
|
354
334
|
if (auth.apiKey) {
|
|
355
335
|
var data = {};
|
|
356
|
-
|
|
357
336
|
if (auth.apiKeyPrefix) {
|
|
358
337
|
data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey;
|
|
359
338
|
} else {
|
|
360
339
|
data[auth.name] = auth.apiKey;
|
|
361
340
|
}
|
|
362
|
-
|
|
363
341
|
if (auth['in'] === 'header') {
|
|
364
342
|
request.set(data);
|
|
365
343
|
} else {
|
|
366
344
|
request.query(data);
|
|
367
345
|
}
|
|
368
346
|
}
|
|
369
|
-
|
|
370
347
|
break;
|
|
371
|
-
|
|
372
348
|
case 'oauth2':
|
|
373
349
|
if (auth.accessToken) {
|
|
374
350
|
request.set({
|
|
375
351
|
'Authorization': 'Bearer ' + auth.accessToken
|
|
376
352
|
});
|
|
377
353
|
}
|
|
378
|
-
|
|
379
354
|
break;
|
|
380
|
-
|
|
381
355
|
default:
|
|
382
356
|
throw new Error('Unknown authentication type: ' + auth.type);
|
|
383
357
|
}
|
|
384
358
|
});
|
|
385
359
|
}
|
|
360
|
+
|
|
386
361
|
/**
|
|
387
362
|
* Deserializes an HTTP response body into a value of the specified type.
|
|
388
363
|
* @param {Object} response A SuperAgent response object.
|
|
@@ -392,25 +367,23 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
392
367
|
* all properties on <code>data<code> will be converted to this type.
|
|
393
368
|
* @returns A value of the specified type.
|
|
394
369
|
*/
|
|
395
|
-
|
|
396
370
|
}, {
|
|
397
371
|
key: "deserialize",
|
|
398
372
|
value: function deserialize(response, returnType) {
|
|
399
373
|
if (response == null || returnType == null || response.status == 204) {
|
|
400
374
|
return null;
|
|
401
|
-
}
|
|
402
|
-
// See http://visionmedia.github.io/superagent/#parsing-response-bodies
|
|
403
|
-
|
|
375
|
+
}
|
|
404
376
|
|
|
377
|
+
// Rely on SuperAgent for parsing response body.
|
|
378
|
+
// See http://visionmedia.github.io/superagent/#parsing-response-bodies
|
|
405
379
|
var data = response.body;
|
|
406
|
-
|
|
407
380
|
if (data == null || _typeof(data) === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length) {
|
|
408
381
|
// SuperAgent does not always produce a body; use the unparsed response as a fallback
|
|
409
382
|
data = response.text;
|
|
410
383
|
}
|
|
411
|
-
|
|
412
384
|
return ApiClient.convertToType(data, returnType);
|
|
413
385
|
}
|
|
386
|
+
|
|
414
387
|
/**
|
|
415
388
|
* Callback function to receive the result of the operation.
|
|
416
389
|
* @callback module:ApiClient~callApiCallback
|
|
@@ -437,58 +410,53 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
437
410
|
* @param {module:ApiClient~callApiCallback} callback The callback function.
|
|
438
411
|
* @returns {Object} The SuperAgent request object.
|
|
439
412
|
*/
|
|
440
|
-
|
|
441
413
|
}, {
|
|
442
414
|
key: "callApi",
|
|
443
415
|
value: function callApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType, apiBasePath, callback) {
|
|
444
416
|
var _this3 = this;
|
|
445
|
-
|
|
446
417
|
var url = this.buildUrl(path, pathParams, apiBasePath);
|
|
447
418
|
var request = (0, _superagent["default"])(httpMethod, url);
|
|
448
|
-
|
|
449
419
|
if (this.plugins !== null) {
|
|
450
420
|
for (var index in this.plugins) {
|
|
451
421
|
if (this.plugins.hasOwnProperty(index)) {
|
|
452
422
|
request.use(this.plugins[index]);
|
|
453
423
|
}
|
|
454
424
|
}
|
|
455
|
-
}
|
|
456
|
-
|
|
425
|
+
}
|
|
457
426
|
|
|
458
|
-
|
|
427
|
+
// apply authentications
|
|
428
|
+
this.applyAuthToRequest(request, authNames);
|
|
459
429
|
|
|
430
|
+
// set query parameters
|
|
460
431
|
if (httpMethod.toUpperCase() === 'GET' && this.cache === false) {
|
|
461
432
|
queryParams['_'] = new Date().getTime();
|
|
462
433
|
}
|
|
434
|
+
request.query(this.normalizeParams(queryParams));
|
|
463
435
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); // set requestAgent if it is set by user
|
|
436
|
+
// set header parameters
|
|
437
|
+
request.set(this.defaultHeaders).set(this.normalizeParams(headerParams));
|
|
467
438
|
|
|
439
|
+
// set requestAgent if it is set by user
|
|
468
440
|
if (this.requestAgent) {
|
|
469
441
|
request.agent(this.requestAgent);
|
|
470
|
-
}
|
|
471
|
-
|
|
442
|
+
}
|
|
472
443
|
|
|
444
|
+
// set request timeout
|
|
473
445
|
request.timeout(this.timeout);
|
|
474
446
|
var contentType = this.jsonPreferredMime(contentTypes);
|
|
475
|
-
|
|
476
447
|
if (contentType) {
|
|
477
448
|
// Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746)
|
|
478
449
|
if (contentType != 'multipart/form-data') {
|
|
479
450
|
request.type(contentType);
|
|
480
451
|
}
|
|
481
452
|
}
|
|
482
|
-
|
|
483
453
|
if (contentType === 'application/x-www-form-urlencoded') {
|
|
484
454
|
request.send(_querystring["default"].stringify(this.normalizeParams(formParams)));
|
|
485
455
|
} else if (contentType == 'multipart/form-data') {
|
|
486
456
|
var _formParams = this.normalizeParams(formParams);
|
|
487
|
-
|
|
488
457
|
for (var key in _formParams) {
|
|
489
458
|
if (_formParams.hasOwnProperty(key)) {
|
|
490
459
|
var _formParamsValue = _formParams[key];
|
|
491
|
-
|
|
492
460
|
if (this.isFileParam(_formParamsValue)) {
|
|
493
461
|
// file field
|
|
494
462
|
request.attach(key, _formParamsValue);
|
|
@@ -506,23 +474,19 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
506
474
|
if (!request.header['Content-Type']) {
|
|
507
475
|
request.type('application/json');
|
|
508
476
|
}
|
|
509
|
-
|
|
510
477
|
request.send(bodyParam);
|
|
511
478
|
}
|
|
512
|
-
|
|
513
479
|
var accept = this.jsonPreferredMime(accepts);
|
|
514
|
-
|
|
515
480
|
if (accept) {
|
|
516
481
|
request.accept(accept);
|
|
517
482
|
}
|
|
518
|
-
|
|
519
483
|
if (returnType === 'Blob') {
|
|
520
484
|
request.responseType('blob');
|
|
521
485
|
} else if (returnType === 'String') {
|
|
522
|
-
request.responseType('
|
|
523
|
-
}
|
|
524
|
-
|
|
486
|
+
request.responseType('text');
|
|
487
|
+
}
|
|
525
488
|
|
|
489
|
+
// Attach previously saved cookies, if enabled
|
|
526
490
|
if (this.enableCookies) {
|
|
527
491
|
if (typeof window === 'undefined') {
|
|
528
492
|
this.agent._attachCookies(request);
|
|
@@ -530,15 +494,12 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
530
494
|
request.withCredentials();
|
|
531
495
|
}
|
|
532
496
|
}
|
|
533
|
-
|
|
534
497
|
request.end(function (error, response) {
|
|
535
498
|
if (callback) {
|
|
536
499
|
var data = null;
|
|
537
|
-
|
|
538
500
|
if (!error) {
|
|
539
501
|
try {
|
|
540
502
|
data = _this3.deserialize(response, returnType);
|
|
541
|
-
|
|
542
503
|
if (_this3.enableCookies && typeof window === 'undefined') {
|
|
543
504
|
_this3.agent._saveCookies(response);
|
|
544
505
|
}
|
|
@@ -546,18 +507,17 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
546
507
|
error = err;
|
|
547
508
|
}
|
|
548
509
|
}
|
|
549
|
-
|
|
550
510
|
callback(error, data, response);
|
|
551
511
|
}
|
|
552
512
|
});
|
|
553
513
|
return request;
|
|
554
514
|
}
|
|
515
|
+
|
|
555
516
|
/**
|
|
556
517
|
* Parses an ISO-8601 string representation or epoch representation of a date value.
|
|
557
518
|
* @param {String} str The date value as a string.
|
|
558
519
|
* @returns {Date} The parsed date object.
|
|
559
520
|
*/
|
|
560
|
-
|
|
561
521
|
}, {
|
|
562
522
|
key: "hostSettings",
|
|
563
523
|
value:
|
|
@@ -586,19 +546,19 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
586
546
|
key: "getBasePathFromSettings",
|
|
587
547
|
value: function getBasePathFromSettings(index) {
|
|
588
548
|
var variables = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
589
|
-
var servers = this.hostSettings();
|
|
549
|
+
var servers = this.hostSettings();
|
|
590
550
|
|
|
551
|
+
// check array index out of bound
|
|
591
552
|
if (index < 0 || index >= servers.length) {
|
|
592
553
|
throw new Error("Invalid index " + index + " when selecting the host settings. Must be less than " + servers.length);
|
|
593
554
|
}
|
|
594
|
-
|
|
595
555
|
var server = servers[index];
|
|
596
|
-
var url = server['url'];
|
|
556
|
+
var url = server['url'];
|
|
597
557
|
|
|
558
|
+
// go through variable and assign a value
|
|
598
559
|
for (var variable_name in server['variables']) {
|
|
599
560
|
if (variable_name in variables) {
|
|
600
561
|
var variable = server['variables'][variable_name];
|
|
601
|
-
|
|
602
562
|
if (!('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name])) {
|
|
603
563
|
url = url.replace("{" + variable_name + "}", variables[variable_name]);
|
|
604
564
|
} else {
|
|
@@ -609,20 +569,18 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
609
569
|
url = url.replace("{" + variable_name + "}", server['variables'][variable_name]['default_value']);
|
|
610
570
|
}
|
|
611
571
|
}
|
|
612
|
-
|
|
613
572
|
return url;
|
|
614
573
|
}
|
|
574
|
+
|
|
615
575
|
/**
|
|
616
576
|
* Constructs a new map or array model from REST data.
|
|
617
577
|
* @param data {Object|Array} The REST data.
|
|
618
578
|
* @param obj {Object|Array} The target object or array.
|
|
619
579
|
*/
|
|
620
|
-
|
|
621
580
|
}], [{
|
|
622
581
|
key: "canBeJsonified",
|
|
623
582
|
value: function canBeJsonified(str) {
|
|
624
583
|
if (typeof str !== 'string' && _typeof(str) !== 'object') return false;
|
|
625
|
-
|
|
626
584
|
try {
|
|
627
585
|
var type = str.toString();
|
|
628
586
|
return type === '[object Object]' || type === '[object Array]';
|
|
@@ -636,9 +594,9 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
636
594
|
if (isNaN(str)) {
|
|
637
595
|
return new Date(str.replace(/(\d)(T)(\d)/i, '$1 $3'));
|
|
638
596
|
}
|
|
639
|
-
|
|
640
597
|
return new Date(+str);
|
|
641
598
|
}
|
|
599
|
+
|
|
642
600
|
/**
|
|
643
601
|
* Converts a value to the specified type.
|
|
644
602
|
* @param {(String|Object)} data The data to convert, as a string or object.
|
|
@@ -648,31 +606,23 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
648
606
|
* all properties on <code>data<code> will be converted to this type.
|
|
649
607
|
* @returns An instance of the specified type or null or undefined if data is null or undefined.
|
|
650
608
|
*/
|
|
651
|
-
|
|
652
609
|
}, {
|
|
653
610
|
key: "convertToType",
|
|
654
611
|
value: function convertToType(data, type) {
|
|
655
612
|
if (data === null || data === undefined) return data;
|
|
656
|
-
|
|
657
613
|
switch (type) {
|
|
658
614
|
case 'Boolean':
|
|
659
615
|
return Boolean(data);
|
|
660
|
-
|
|
661
616
|
case 'Integer':
|
|
662
617
|
return parseInt(data, 10);
|
|
663
|
-
|
|
664
618
|
case 'Number':
|
|
665
619
|
return parseFloat(data);
|
|
666
|
-
|
|
667
620
|
case 'String':
|
|
668
621
|
return String(data);
|
|
669
|
-
|
|
670
622
|
case 'Date':
|
|
671
623
|
return ApiClient.parseDate(String(data));
|
|
672
|
-
|
|
673
624
|
case 'Blob':
|
|
674
625
|
return data;
|
|
675
|
-
|
|
676
626
|
default:
|
|
677
627
|
if (type === Object) {
|
|
678
628
|
// generic object, return directly
|
|
@@ -689,7 +639,6 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
689
639
|
} else if (_typeof(type) === 'object') {
|
|
690
640
|
// for plain object type like: {'String': 'Integer'}
|
|
691
641
|
var keyType, valueType;
|
|
692
|
-
|
|
693
642
|
for (var k in type) {
|
|
694
643
|
if (type.hasOwnProperty(k)) {
|
|
695
644
|
keyType = k;
|
|
@@ -697,9 +646,7 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
697
646
|
break;
|
|
698
647
|
}
|
|
699
648
|
}
|
|
700
|
-
|
|
701
649
|
var result = {};
|
|
702
|
-
|
|
703
650
|
for (var k in data) {
|
|
704
651
|
if (data.hasOwnProperty(k)) {
|
|
705
652
|
var key = ApiClient.convertToType(k, keyType);
|
|
@@ -707,13 +654,11 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
707
654
|
result[key] = value;
|
|
708
655
|
}
|
|
709
656
|
}
|
|
710
|
-
|
|
711
657
|
return result;
|
|
712
658
|
} else {
|
|
713
659
|
// for unknown type, return the data directly
|
|
714
660
|
return data;
|
|
715
661
|
}
|
|
716
|
-
|
|
717
662
|
}
|
|
718
663
|
}
|
|
719
664
|
}, {
|
|
@@ -730,7 +675,6 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
730
675
|
}
|
|
731
676
|
}
|
|
732
677
|
}]);
|
|
733
|
-
|
|
734
678
|
return ApiClient;
|
|
735
679
|
}();
|
|
736
680
|
/**
|
|
@@ -738,44 +682,37 @@ var ApiClient = /*#__PURE__*/function () {
|
|
|
738
682
|
* @enum {String}
|
|
739
683
|
* @readonly
|
|
740
684
|
*/
|
|
741
|
-
|
|
742
|
-
|
|
743
685
|
ApiClient.CollectionFormatEnum = {
|
|
744
686
|
/**
|
|
745
687
|
* Comma-separated values. Value: <code>csv</code>
|
|
746
688
|
* @const
|
|
747
689
|
*/
|
|
748
690
|
CSV: ',',
|
|
749
|
-
|
|
750
691
|
/**
|
|
751
692
|
* Space-separated values. Value: <code>ssv</code>
|
|
752
693
|
* @const
|
|
753
694
|
*/
|
|
754
695
|
SSV: ' ',
|
|
755
|
-
|
|
756
696
|
/**
|
|
757
697
|
* Tab-separated values. Value: <code>tsv</code>
|
|
758
698
|
* @const
|
|
759
699
|
*/
|
|
760
700
|
TSV: '\t',
|
|
761
|
-
|
|
762
701
|
/**
|
|
763
702
|
* Pipe(|)-separated values. Value: <code>pipes</code>
|
|
764
703
|
* @const
|
|
765
704
|
*/
|
|
766
705
|
PIPES: '|',
|
|
767
|
-
|
|
768
706
|
/**
|
|
769
707
|
* Native array. Value: <code>multi</code>
|
|
770
708
|
* @const
|
|
771
709
|
*/
|
|
772
710
|
MULTI: 'multi'
|
|
773
711
|
};
|
|
712
|
+
|
|
774
713
|
/**
|
|
775
714
|
* The default API client implementation.
|
|
776
715
|
* @type {module:ApiClient}
|
|
777
716
|
*/
|
|
778
|
-
|
|
779
717
|
ApiClient.instance = new ApiClient();
|
|
780
|
-
var _default = ApiClient;
|
|
781
|
-
exports["default"] = _default;
|
|
718
|
+
var _default = exports["default"] = ApiClient;
|