@datadog/datadog-api-client 1.42.0 → 1.43.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/CHANGELOG.md +15 -0
- package/dist/packages/datadog-api-client-common/configuration.js +5 -8
- package/dist/packages/datadog-api-client-common/configuration.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/index.d.ts +2 -0
- package/dist/packages/datadog-api-client-v1/index.js +14 -12
- package/dist/packages/datadog-api-client-v1/index.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/GCPAccount.d.ts +10 -3
- package/dist/packages/datadog-api-client-v1/models/GCPAccount.js +4 -5
- package/dist/packages/datadog-api-client-v1/models/GCPAccount.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/GCPMonitoredResourceConfig.d.ts +42 -0
- package/dist/packages/datadog-api-client-v1/models/GCPMonitoredResourceConfig.js +34 -0
- package/dist/packages/datadog-api-client-v1/models/GCPMonitoredResourceConfig.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/GCPMonitoredResourceConfigType.d.ts +13 -0
- package/dist/packages/datadog-api-client-v1/models/GCPMonitoredResourceConfigType.js +12 -0
- package/dist/packages/datadog-api-client-v1/models/GCPMonitoredResourceConfigType.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js +7 -0
- package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/AWSIntegrationApi.js +0 -28
- package/dist/packages/datadog-api-client-v2/apis/AWSIntegrationApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/AWSLogsIntegrationApi.js +0 -4
- package/dist/packages/datadog-api-client-v2/apis/AWSLogsIntegrationApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/ActionsDatastoresApi.d.ts +247 -0
- package/dist/packages/datadog-api-client-v2/apis/ActionsDatastoresApi.js +840 -0
- package/dist/packages/datadog-api-client-v2/apis/ActionsDatastoresApi.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/apis/CIVisibilityPipelinesApi.d.ts +2 -0
- package/dist/packages/datadog-api-client-v2/apis/CIVisibilityPipelinesApi.js +2 -0
- package/dist/packages/datadog-api-client-v2/apis/CIVisibilityPipelinesApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/IncidentsApi.d.ts +127 -0
- package/dist/packages/datadog-api-client-v2/apis/IncidentsApi.js +433 -0
- package/dist/packages/datadog-api-client-v2/apis/IncidentsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/OrgConnectionsApi.d.ts +24 -2
- package/dist/packages/datadog-api-client-v2/apis/OrgConnectionsApi.js +16 -3
- package/dist/packages/datadog-api-client-v2/apis/OrgConnectionsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/index.d.ts +67 -2
- package/dist/packages/datadog-api-client-v2/index.js +153 -46
- package/dist/packages/datadog-api-client-v2/index.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/BulkPutAppsDatastoreItemsRequest.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/BulkPutAppsDatastoreItemsRequest.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/BulkPutAppsDatastoreItemsRequest.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/BulkPutAppsDatastoreItemsRequestData.d.ts +42 -0
- package/dist/packages/datadog-api-client-v2/models/BulkPutAppsDatastoreItemsRequestData.js +35 -0
- package/dist/packages/datadog-api-client-v2/models/BulkPutAppsDatastoreItemsRequestData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/BulkPutAppsDatastoreItemsRequestDataAttributes.d.ts +43 -0
- package/dist/packages/datadog-api-client-v2/models/BulkPutAppsDatastoreItemsRequestDataAttributes.js +35 -0
- package/dist/packages/datadog-api-client-v2/models/BulkPutAppsDatastoreItemsRequestDataAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/CIAppCreatePipelineEventRequest.d.ts +3 -3
- package/dist/packages/datadog-api-client-v2/models/CIAppCreatePipelineEventRequest.js +1 -1
- package/dist/packages/datadog-api-client-v2/models/CIAppCreatePipelineEventRequest.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/CIAppCreatePipelineEventRequestDataSingleOrArray.d.ts +11 -0
- package/dist/packages/datadog-api-client-v2/models/CIAppCreatePipelineEventRequestDataSingleOrArray.js +3 -0
- package/dist/packages/datadog-api-client-v2/models/CIAppCreatePipelineEventRequestDataSingleOrArray.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreRequest.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreRequest.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreRequest.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreRequestData.d.ts +46 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreRequestData.js +39 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreRequestData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreRequestDataAttributes.d.ts +56 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreRequestDataAttributes.js +48 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreRequestDataAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreRequestDataAttributesOrgAccess.d.ts +13 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreRequestDataAttributesOrgAccess.js +12 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreRequestDataAttributesOrgAccess.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreResponse.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreResponse.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreResponse.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreResponseData.d.ts +41 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreResponseData.js +35 -0
- package/dist/packages/datadog-api-client-v2/models/CreateAppsDatastoreResponseData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/CreateIncidentNotificationRuleRequest.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/CreateIncidentNotificationRuleRequest.js +31 -0
- package/dist/packages/datadog-api-client-v2/models/CreateIncidentNotificationRuleRequest.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DORAFailureRequestAttributes.d.ts +1 -1
- package/dist/packages/datadog-api-client-v2/models/Datastore.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/Datastore.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/Datastore.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreArray.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreArray.js +31 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreArray.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreData.d.ts +46 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreData.js +39 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreDataAttributes.d.ts +71 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreDataAttributes.js +66 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreDataAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreDataType.d.ts +11 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreDataType.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreDataType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreItemConflictMode.d.ts +12 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreItemConflictMode.js +11 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreItemConflictMode.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreItemsDataType.d.ts +11 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreItemsDataType.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/DatastoreItemsDataType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DatastorePrimaryKeyGenerationStrategy.d.ts +12 -0
- package/dist/packages/datadog-api-client-v2/models/DatastorePrimaryKeyGenerationStrategy.js +11 -0
- package/dist/packages/datadog-api-client-v2/models/DatastorePrimaryKeyGenerationStrategy.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemRequest.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemRequest.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemRequest.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemRequestData.d.ts +42 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemRequestData.js +35 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemRequestData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemRequestDataAttributes.d.ts +40 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemRequestDataAttributes.js +40 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemRequestDataAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemResponse.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemResponse.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemResponse.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemResponseData.d.ts +41 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemResponseData.js +35 -0
- package/dist/packages/datadog-api-client-v2/models/DeleteAppsDatastoreItemResponseData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/GCPMonitoredResourceConfig.d.ts +42 -0
- package/dist/packages/datadog-api-client-v2/models/GCPMonitoredResourceConfig.js +34 -0
- package/dist/packages/datadog-api-client-v2/models/GCPMonitoredResourceConfig.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/GCPMonitoredResourceConfigType.d.ts +13 -0
- package/dist/packages/datadog-api-client-v2/models/GCPMonitoredResourceConfigType.js +12 -0
- package/dist/packages/datadog-api-client-v2/models/GCPMonitoredResourceConfigType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/GCPSTSServiceAccountAttributes.d.ts +9 -1
- package/dist/packages/datadog-api-client-v2/models/GCPSTSServiceAccountAttributes.js +4 -0
- package/dist/packages/datadog-api-client-v2/models/GCPSTSServiceAccountAttributes.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRule.d.ts +42 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRule.js +35 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRule.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleArray.d.ts +47 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleArray.js +39 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleArray.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleArrayMeta.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleArrayMeta.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleArrayMeta.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleArrayMetaPage.d.ts +44 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleArrayMetaPage.js +46 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleArrayMetaPage.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleAttributes.d.ts +66 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleAttributes.js +67 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleAttributesVisibility.d.ts +13 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleAttributesVisibility.js +12 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleAttributesVisibility.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleConditionsItems.d.ts +40 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleConditionsItems.js +41 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleConditionsItems.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleCreateAttributes.d.ts +58 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleCreateAttributes.js +53 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleCreateAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleCreateAttributesVisibility.d.ts +13 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleCreateAttributesVisibility.js +12 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleCreateAttributesVisibility.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleCreateData.d.ts +47 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleCreateData.js +40 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleCreateData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleCreateDataRelationships.d.ts +42 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleCreateDataRelationships.js +34 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleCreateDataRelationships.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleIncludedItems.d.ts +13 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleIncludedItems.js +3 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleIncludedItems.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleRelationships.d.ts +51 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleRelationships.js +42 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleRelationships.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleResponseData.d.ts +51 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleResponseData.js +45 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleResponseData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleType.d.ts +11 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleType.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleUpdateData.d.ts +51 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleUpdateData.js +46 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationRuleUpdateData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationTemplateObject.d.ts +51 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationTemplateObject.js +45 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentNotificationTemplateObject.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayload.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayload.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayload.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadArray.d.ts +42 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadArray.js +35 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadArray.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadData.d.ts +46 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadData.js +39 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadDataAttributes.d.ts +64 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadDataAttributes.js +62 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadDataAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadMeta.d.ts +42 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadMeta.js +34 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadMeta.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadMetaPage.d.ts +44 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadMetaPage.js +45 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadMetaPage.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadMetaSchema.d.ts +41 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadMetaSchema.js +34 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadMetaSchema.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadMetaSchemaField.d.ts +40 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadMetaSchemaField.js +41 -0
- package/dist/packages/datadog-api-client-v2/models/ItemApiPayloadMetaSchemaField.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js +139 -0
- package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/PutAppsDatastoreItemResponseArray.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/PutAppsDatastoreItemResponseArray.js +31 -0
- package/dist/packages/datadog-api-client-v2/models/PutAppsDatastoreItemResponseArray.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/PutAppsDatastoreItemResponseData.d.ts +41 -0
- package/dist/packages/datadog-api-client-v2/models/PutAppsDatastoreItemResponseData.js +35 -0
- package/dist/packages/datadog-api-client-v2/models/PutAppsDatastoreItemResponseData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/PutIncidentNotificationRuleRequest.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/PutIncidentNotificationRuleRequest.js +31 -0
- package/dist/packages/datadog-api-client-v2/models/PutIncidentNotificationRuleRequest.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentNotificationTemplate.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentNotificationTemplate.js +31 -0
- package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentNotificationTemplate.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentNotificationTemplateData.d.ts +41 -0
- package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentNotificationTemplateData.js +37 -0
- package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentNotificationTemplateData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleConvertResponse.d.ts +4 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleConvertResponse.js +4 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleConvertResponse.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequest.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequest.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequest.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequestData.d.ts +46 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequestData.js +39 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequestData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequestDataAttributes.d.ts +45 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequestDataAttributes.js +40 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequestDataAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequestDataAttributesItemChanges.d.ts +38 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequestDataAttributesItemChanges.js +35 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequestDataAttributesItemChanges.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequestDataType.d.ts +11 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequestDataType.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreItemRequestDataType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreRequest.d.ts +37 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreRequest.js +30 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreRequest.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreRequestData.d.ts +46 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreRequestData.js +39 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreRequestData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreRequestDataAttributes.d.ts +40 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreRequestDataAttributes.js +39 -0
- package/dist/packages/datadog-api-client-v2/models/UpdateAppsDatastoreRequestDataAttributes.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,840 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ActionsDatastoresApi = exports.ActionsDatastoresApiResponseProcessor = exports.ActionsDatastoresApiRequestFactory = void 0;
|
|
13
|
+
const baseapi_1 = require("../../datadog-api-client-common/baseapi");
|
|
14
|
+
const configuration_1 = require("../../datadog-api-client-common/configuration");
|
|
15
|
+
const http_1 = require("../../datadog-api-client-common/http/http");
|
|
16
|
+
const logger_1 = require("../../../logger");
|
|
17
|
+
const ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
18
|
+
const exception_1 = require("../../datadog-api-client-common/exception");
|
|
19
|
+
class ActionsDatastoresApiRequestFactory extends baseapi_1.BaseAPIRequestFactory {
|
|
20
|
+
bulkWriteDatastoreItems(datastoreId, body, _options) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const _config = _options || this.configuration;
|
|
23
|
+
// verify required parameter 'datastoreId' is not null or undefined
|
|
24
|
+
if (datastoreId === null || datastoreId === undefined) {
|
|
25
|
+
throw new baseapi_1.RequiredError("datastoreId", "bulkWriteDatastoreItems");
|
|
26
|
+
}
|
|
27
|
+
// verify required parameter 'body' is not null or undefined
|
|
28
|
+
if (body === null || body === undefined) {
|
|
29
|
+
throw new baseapi_1.RequiredError("body", "bulkWriteDatastoreItems");
|
|
30
|
+
}
|
|
31
|
+
// Path Params
|
|
32
|
+
const localVarPath = "/api/v2/actions-datastores/{datastore_id}/items/bulk".replace("{datastore_id}", encodeURIComponent(String(datastoreId)));
|
|
33
|
+
// Make Request Context
|
|
34
|
+
const requestContext = _config
|
|
35
|
+
.getServer("v2.ActionsDatastoresApi.bulkWriteDatastoreItems")
|
|
36
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
37
|
+
requestContext.setHeaderParam("Accept", "application/json");
|
|
38
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
39
|
+
// Body Params
|
|
40
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
41
|
+
"application/json",
|
|
42
|
+
]);
|
|
43
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
44
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "BulkPutAppsDatastoreItemsRequest", ""), contentType);
|
|
45
|
+
requestContext.setBody(serializedBody);
|
|
46
|
+
// Apply auth methods
|
|
47
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
48
|
+
"apiKeyAuth",
|
|
49
|
+
"appKeyAuth",
|
|
50
|
+
]);
|
|
51
|
+
return requestContext;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
createDatastore(body, _options) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
const _config = _options || this.configuration;
|
|
57
|
+
// verify required parameter 'body' is not null or undefined
|
|
58
|
+
if (body === null || body === undefined) {
|
|
59
|
+
throw new baseapi_1.RequiredError("body", "createDatastore");
|
|
60
|
+
}
|
|
61
|
+
// Path Params
|
|
62
|
+
const localVarPath = "/api/v2/actions-datastores";
|
|
63
|
+
// Make Request Context
|
|
64
|
+
const requestContext = _config
|
|
65
|
+
.getServer("v2.ActionsDatastoresApi.createDatastore")
|
|
66
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.POST);
|
|
67
|
+
requestContext.setHeaderParam("Accept", "application/json");
|
|
68
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
69
|
+
// Body Params
|
|
70
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
71
|
+
"application/json",
|
|
72
|
+
]);
|
|
73
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
74
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "CreateAppsDatastoreRequest", ""), contentType);
|
|
75
|
+
requestContext.setBody(serializedBody);
|
|
76
|
+
// Apply auth methods
|
|
77
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
78
|
+
"apiKeyAuth",
|
|
79
|
+
"appKeyAuth",
|
|
80
|
+
]);
|
|
81
|
+
return requestContext;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
deleteDatastore(datastoreId, _options) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
const _config = _options || this.configuration;
|
|
87
|
+
// verify required parameter 'datastoreId' is not null or undefined
|
|
88
|
+
if (datastoreId === null || datastoreId === undefined) {
|
|
89
|
+
throw new baseapi_1.RequiredError("datastoreId", "deleteDatastore");
|
|
90
|
+
}
|
|
91
|
+
// Path Params
|
|
92
|
+
const localVarPath = "/api/v2/actions-datastores/{datastore_id}".replace("{datastore_id}", encodeURIComponent(String(datastoreId)));
|
|
93
|
+
// Make Request Context
|
|
94
|
+
const requestContext = _config
|
|
95
|
+
.getServer("v2.ActionsDatastoresApi.deleteDatastore")
|
|
96
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
97
|
+
requestContext.setHeaderParam("Accept", "*/*");
|
|
98
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
99
|
+
// Apply auth methods
|
|
100
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
101
|
+
"apiKeyAuth",
|
|
102
|
+
"appKeyAuth",
|
|
103
|
+
]);
|
|
104
|
+
return requestContext;
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
deleteDatastoreItem(datastoreId, body, _options) {
|
|
108
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
109
|
+
const _config = _options || this.configuration;
|
|
110
|
+
// verify required parameter 'datastoreId' is not null or undefined
|
|
111
|
+
if (datastoreId === null || datastoreId === undefined) {
|
|
112
|
+
throw new baseapi_1.RequiredError("datastoreId", "deleteDatastoreItem");
|
|
113
|
+
}
|
|
114
|
+
// verify required parameter 'body' is not null or undefined
|
|
115
|
+
if (body === null || body === undefined) {
|
|
116
|
+
throw new baseapi_1.RequiredError("body", "deleteDatastoreItem");
|
|
117
|
+
}
|
|
118
|
+
// Path Params
|
|
119
|
+
const localVarPath = "/api/v2/actions-datastores/{datastore_id}/items".replace("{datastore_id}", encodeURIComponent(String(datastoreId)));
|
|
120
|
+
// Make Request Context
|
|
121
|
+
const requestContext = _config
|
|
122
|
+
.getServer("v2.ActionsDatastoresApi.deleteDatastoreItem")
|
|
123
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.DELETE);
|
|
124
|
+
requestContext.setHeaderParam("Accept", "application/json");
|
|
125
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
126
|
+
// Body Params
|
|
127
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
128
|
+
"application/json",
|
|
129
|
+
]);
|
|
130
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
131
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "DeleteAppsDatastoreItemRequest", ""), contentType);
|
|
132
|
+
requestContext.setBody(serializedBody);
|
|
133
|
+
// Apply auth methods
|
|
134
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
135
|
+
"apiKeyAuth",
|
|
136
|
+
"appKeyAuth",
|
|
137
|
+
]);
|
|
138
|
+
return requestContext;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
getDatastore(datastoreId, _options) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
const _config = _options || this.configuration;
|
|
144
|
+
// verify required parameter 'datastoreId' is not null or undefined
|
|
145
|
+
if (datastoreId === null || datastoreId === undefined) {
|
|
146
|
+
throw new baseapi_1.RequiredError("datastoreId", "getDatastore");
|
|
147
|
+
}
|
|
148
|
+
// Path Params
|
|
149
|
+
const localVarPath = "/api/v2/actions-datastores/{datastore_id}".replace("{datastore_id}", encodeURIComponent(String(datastoreId)));
|
|
150
|
+
// Make Request Context
|
|
151
|
+
const requestContext = _config
|
|
152
|
+
.getServer("v2.ActionsDatastoresApi.getDatastore")
|
|
153
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
154
|
+
requestContext.setHeaderParam("Accept", "application/json");
|
|
155
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
156
|
+
// Apply auth methods
|
|
157
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
158
|
+
"apiKeyAuth",
|
|
159
|
+
"appKeyAuth",
|
|
160
|
+
]);
|
|
161
|
+
return requestContext;
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
listDatastoreItems(datastoreId, filter, itemKey, pageLimit, pageOffset, sort, _options) {
|
|
165
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
const _config = _options || this.configuration;
|
|
167
|
+
// verify required parameter 'datastoreId' is not null or undefined
|
|
168
|
+
if (datastoreId === null || datastoreId === undefined) {
|
|
169
|
+
throw new baseapi_1.RequiredError("datastoreId", "listDatastoreItems");
|
|
170
|
+
}
|
|
171
|
+
// Path Params
|
|
172
|
+
const localVarPath = "/api/v2/actions-datastores/{datastore_id}/items".replace("{datastore_id}", encodeURIComponent(String(datastoreId)));
|
|
173
|
+
// Make Request Context
|
|
174
|
+
const requestContext = _config
|
|
175
|
+
.getServer("v2.ActionsDatastoresApi.listDatastoreItems")
|
|
176
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
177
|
+
requestContext.setHeaderParam("Accept", "application/json");
|
|
178
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
179
|
+
// Query Params
|
|
180
|
+
if (filter !== undefined) {
|
|
181
|
+
requestContext.setQueryParam("filter", ObjectSerializer_1.ObjectSerializer.serialize(filter, "string", ""), "");
|
|
182
|
+
}
|
|
183
|
+
if (itemKey !== undefined) {
|
|
184
|
+
requestContext.setQueryParam("item_key", ObjectSerializer_1.ObjectSerializer.serialize(itemKey, "string", ""), "");
|
|
185
|
+
}
|
|
186
|
+
if (pageLimit !== undefined) {
|
|
187
|
+
requestContext.setQueryParam("page[limit]", ObjectSerializer_1.ObjectSerializer.serialize(pageLimit, "number", "int64"), "");
|
|
188
|
+
}
|
|
189
|
+
if (pageOffset !== undefined) {
|
|
190
|
+
requestContext.setQueryParam("page[offset]", ObjectSerializer_1.ObjectSerializer.serialize(pageOffset, "number", "int64"), "");
|
|
191
|
+
}
|
|
192
|
+
if (sort !== undefined) {
|
|
193
|
+
requestContext.setQueryParam("sort", ObjectSerializer_1.ObjectSerializer.serialize(sort, "string", ""), "");
|
|
194
|
+
}
|
|
195
|
+
// Apply auth methods
|
|
196
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
197
|
+
"apiKeyAuth",
|
|
198
|
+
"appKeyAuth",
|
|
199
|
+
]);
|
|
200
|
+
return requestContext;
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
listDatastores(_options) {
|
|
204
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
205
|
+
const _config = _options || this.configuration;
|
|
206
|
+
// Path Params
|
|
207
|
+
const localVarPath = "/api/v2/actions-datastores";
|
|
208
|
+
// Make Request Context
|
|
209
|
+
const requestContext = _config
|
|
210
|
+
.getServer("v2.ActionsDatastoresApi.listDatastores")
|
|
211
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.GET);
|
|
212
|
+
requestContext.setHeaderParam("Accept", "application/json");
|
|
213
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
214
|
+
// Apply auth methods
|
|
215
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
216
|
+
"apiKeyAuth",
|
|
217
|
+
"appKeyAuth",
|
|
218
|
+
]);
|
|
219
|
+
return requestContext;
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
updateDatastore(datastoreId, body, _options) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
const _config = _options || this.configuration;
|
|
225
|
+
// verify required parameter 'datastoreId' is not null or undefined
|
|
226
|
+
if (datastoreId === null || datastoreId === undefined) {
|
|
227
|
+
throw new baseapi_1.RequiredError("datastoreId", "updateDatastore");
|
|
228
|
+
}
|
|
229
|
+
// verify required parameter 'body' is not null or undefined
|
|
230
|
+
if (body === null || body === undefined) {
|
|
231
|
+
throw new baseapi_1.RequiredError("body", "updateDatastore");
|
|
232
|
+
}
|
|
233
|
+
// Path Params
|
|
234
|
+
const localVarPath = "/api/v2/actions-datastores/{datastore_id}".replace("{datastore_id}", encodeURIComponent(String(datastoreId)));
|
|
235
|
+
// Make Request Context
|
|
236
|
+
const requestContext = _config
|
|
237
|
+
.getServer("v2.ActionsDatastoresApi.updateDatastore")
|
|
238
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
239
|
+
requestContext.setHeaderParam("Accept", "application/json");
|
|
240
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
241
|
+
// Body Params
|
|
242
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
243
|
+
"application/json",
|
|
244
|
+
]);
|
|
245
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
246
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "UpdateAppsDatastoreRequest", ""), contentType);
|
|
247
|
+
requestContext.setBody(serializedBody);
|
|
248
|
+
// Apply auth methods
|
|
249
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
250
|
+
"apiKeyAuth",
|
|
251
|
+
"appKeyAuth",
|
|
252
|
+
]);
|
|
253
|
+
return requestContext;
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
updateDatastoreItem(datastoreId, body, _options) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
const _config = _options || this.configuration;
|
|
259
|
+
// verify required parameter 'datastoreId' is not null or undefined
|
|
260
|
+
if (datastoreId === null || datastoreId === undefined) {
|
|
261
|
+
throw new baseapi_1.RequiredError("datastoreId", "updateDatastoreItem");
|
|
262
|
+
}
|
|
263
|
+
// verify required parameter 'body' is not null or undefined
|
|
264
|
+
if (body === null || body === undefined) {
|
|
265
|
+
throw new baseapi_1.RequiredError("body", "updateDatastoreItem");
|
|
266
|
+
}
|
|
267
|
+
// Path Params
|
|
268
|
+
const localVarPath = "/api/v2/actions-datastores/{datastore_id}/items".replace("{datastore_id}", encodeURIComponent(String(datastoreId)));
|
|
269
|
+
// Make Request Context
|
|
270
|
+
const requestContext = _config
|
|
271
|
+
.getServer("v2.ActionsDatastoresApi.updateDatastoreItem")
|
|
272
|
+
.makeRequestContext(localVarPath, http_1.HttpMethod.PATCH);
|
|
273
|
+
requestContext.setHeaderParam("Accept", "application/json");
|
|
274
|
+
requestContext.setHttpConfig(_config.httpConfig);
|
|
275
|
+
// Body Params
|
|
276
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
|
|
277
|
+
"application/json",
|
|
278
|
+
]);
|
|
279
|
+
requestContext.setHeaderParam("Content-Type", contentType);
|
|
280
|
+
const serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(body, "UpdateAppsDatastoreItemRequest", ""), contentType);
|
|
281
|
+
requestContext.setBody(serializedBody);
|
|
282
|
+
// Apply auth methods
|
|
283
|
+
(0, configuration_1.applySecurityAuthentication)(_config, requestContext, [
|
|
284
|
+
"apiKeyAuth",
|
|
285
|
+
"appKeyAuth",
|
|
286
|
+
]);
|
|
287
|
+
return requestContext;
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
exports.ActionsDatastoresApiRequestFactory = ActionsDatastoresApiRequestFactory;
|
|
292
|
+
class ActionsDatastoresApiResponseProcessor {
|
|
293
|
+
/**
|
|
294
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
295
|
+
* to the expected objects
|
|
296
|
+
*
|
|
297
|
+
* @params response Response returned by the server for a request to bulkWriteDatastoreItems
|
|
298
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
299
|
+
*/
|
|
300
|
+
bulkWriteDatastoreItems(response) {
|
|
301
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
302
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
303
|
+
if (response.httpStatusCode === 200) {
|
|
304
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "PutAppsDatastoreItemResponseArray");
|
|
305
|
+
return body;
|
|
306
|
+
}
|
|
307
|
+
if (response.httpStatusCode === 400 || response.httpStatusCode === 404) {
|
|
308
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
309
|
+
let body;
|
|
310
|
+
try {
|
|
311
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "JSONAPIErrorResponse");
|
|
312
|
+
}
|
|
313
|
+
catch (error) {
|
|
314
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
315
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
316
|
+
}
|
|
317
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
318
|
+
}
|
|
319
|
+
if (response.httpStatusCode === 429) {
|
|
320
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
321
|
+
let body;
|
|
322
|
+
try {
|
|
323
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
324
|
+
}
|
|
325
|
+
catch (error) {
|
|
326
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
327
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
328
|
+
}
|
|
329
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
330
|
+
}
|
|
331
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
332
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
333
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "PutAppsDatastoreItemResponseArray", "");
|
|
334
|
+
return body;
|
|
335
|
+
}
|
|
336
|
+
const body = (yield response.body.text()) || "";
|
|
337
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
342
|
+
* to the expected objects
|
|
343
|
+
*
|
|
344
|
+
* @params response Response returned by the server for a request to createDatastore
|
|
345
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
346
|
+
*/
|
|
347
|
+
createDatastore(response) {
|
|
348
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
349
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
350
|
+
if (response.httpStatusCode === 200) {
|
|
351
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CreateAppsDatastoreResponse");
|
|
352
|
+
return body;
|
|
353
|
+
}
|
|
354
|
+
if (response.httpStatusCode === 400) {
|
|
355
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
356
|
+
let body;
|
|
357
|
+
try {
|
|
358
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "JSONAPIErrorResponse");
|
|
359
|
+
}
|
|
360
|
+
catch (error) {
|
|
361
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
362
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
363
|
+
}
|
|
364
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
365
|
+
}
|
|
366
|
+
if (response.httpStatusCode === 429) {
|
|
367
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
368
|
+
let body;
|
|
369
|
+
try {
|
|
370
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
371
|
+
}
|
|
372
|
+
catch (error) {
|
|
373
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
374
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
375
|
+
}
|
|
376
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
377
|
+
}
|
|
378
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
379
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
380
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "CreateAppsDatastoreResponse", "");
|
|
381
|
+
return body;
|
|
382
|
+
}
|
|
383
|
+
const body = (yield response.body.text()) || "";
|
|
384
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
389
|
+
* to the expected objects
|
|
390
|
+
*
|
|
391
|
+
* @params response Response returned by the server for a request to deleteDatastore
|
|
392
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
393
|
+
*/
|
|
394
|
+
deleteDatastore(response) {
|
|
395
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
396
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
397
|
+
if (response.httpStatusCode === 200) {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
if (response.httpStatusCode === 400) {
|
|
401
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
402
|
+
let body;
|
|
403
|
+
try {
|
|
404
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "JSONAPIErrorResponse");
|
|
405
|
+
}
|
|
406
|
+
catch (error) {
|
|
407
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
408
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
409
|
+
}
|
|
410
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
411
|
+
}
|
|
412
|
+
if (response.httpStatusCode === 429) {
|
|
413
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
414
|
+
let body;
|
|
415
|
+
try {
|
|
416
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
417
|
+
}
|
|
418
|
+
catch (error) {
|
|
419
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
420
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
421
|
+
}
|
|
422
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
423
|
+
}
|
|
424
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
425
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
426
|
+
return;
|
|
427
|
+
}
|
|
428
|
+
const body = (yield response.body.text()) || "";
|
|
429
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
434
|
+
* to the expected objects
|
|
435
|
+
*
|
|
436
|
+
* @params response Response returned by the server for a request to deleteDatastoreItem
|
|
437
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
438
|
+
*/
|
|
439
|
+
deleteDatastoreItem(response) {
|
|
440
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
441
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
442
|
+
if (response.httpStatusCode === 200) {
|
|
443
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "DeleteAppsDatastoreItemResponse");
|
|
444
|
+
return body;
|
|
445
|
+
}
|
|
446
|
+
if (response.httpStatusCode === 400 || response.httpStatusCode === 404) {
|
|
447
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
448
|
+
let body;
|
|
449
|
+
try {
|
|
450
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "JSONAPIErrorResponse");
|
|
451
|
+
}
|
|
452
|
+
catch (error) {
|
|
453
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
454
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
455
|
+
}
|
|
456
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
457
|
+
}
|
|
458
|
+
if (response.httpStatusCode === 429) {
|
|
459
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
460
|
+
let body;
|
|
461
|
+
try {
|
|
462
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
463
|
+
}
|
|
464
|
+
catch (error) {
|
|
465
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
466
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
467
|
+
}
|
|
468
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
469
|
+
}
|
|
470
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
471
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
472
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "DeleteAppsDatastoreItemResponse", "");
|
|
473
|
+
return body;
|
|
474
|
+
}
|
|
475
|
+
const body = (yield response.body.text()) || "";
|
|
476
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
481
|
+
* to the expected objects
|
|
482
|
+
*
|
|
483
|
+
* @params response Response returned by the server for a request to getDatastore
|
|
484
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
485
|
+
*/
|
|
486
|
+
getDatastore(response) {
|
|
487
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
488
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
489
|
+
if (response.httpStatusCode === 200) {
|
|
490
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Datastore");
|
|
491
|
+
return body;
|
|
492
|
+
}
|
|
493
|
+
if (response.httpStatusCode === 400 || response.httpStatusCode === 404) {
|
|
494
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
495
|
+
let body;
|
|
496
|
+
try {
|
|
497
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "JSONAPIErrorResponse");
|
|
498
|
+
}
|
|
499
|
+
catch (error) {
|
|
500
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
501
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
502
|
+
}
|
|
503
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
504
|
+
}
|
|
505
|
+
if (response.httpStatusCode === 429) {
|
|
506
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
507
|
+
let body;
|
|
508
|
+
try {
|
|
509
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
510
|
+
}
|
|
511
|
+
catch (error) {
|
|
512
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
513
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
514
|
+
}
|
|
515
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
516
|
+
}
|
|
517
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
518
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
519
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Datastore", "");
|
|
520
|
+
return body;
|
|
521
|
+
}
|
|
522
|
+
const body = (yield response.body.text()) || "";
|
|
523
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
528
|
+
* to the expected objects
|
|
529
|
+
*
|
|
530
|
+
* @params response Response returned by the server for a request to listDatastoreItems
|
|
531
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
532
|
+
*/
|
|
533
|
+
listDatastoreItems(response) {
|
|
534
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
535
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
536
|
+
if (response.httpStatusCode === 200) {
|
|
537
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "ItemApiPayloadArray");
|
|
538
|
+
return body;
|
|
539
|
+
}
|
|
540
|
+
if (response.httpStatusCode === 400 || response.httpStatusCode === 404) {
|
|
541
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
542
|
+
let body;
|
|
543
|
+
try {
|
|
544
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "JSONAPIErrorResponse");
|
|
545
|
+
}
|
|
546
|
+
catch (error) {
|
|
547
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
548
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
549
|
+
}
|
|
550
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
551
|
+
}
|
|
552
|
+
if (response.httpStatusCode === 429) {
|
|
553
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
554
|
+
let body;
|
|
555
|
+
try {
|
|
556
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
557
|
+
}
|
|
558
|
+
catch (error) {
|
|
559
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
560
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
561
|
+
}
|
|
562
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
563
|
+
}
|
|
564
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
565
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
566
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "ItemApiPayloadArray", "");
|
|
567
|
+
return body;
|
|
568
|
+
}
|
|
569
|
+
const body = (yield response.body.text()) || "";
|
|
570
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
575
|
+
* to the expected objects
|
|
576
|
+
*
|
|
577
|
+
* @params response Response returned by the server for a request to listDatastores
|
|
578
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
579
|
+
*/
|
|
580
|
+
listDatastores(response) {
|
|
581
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
582
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
583
|
+
if (response.httpStatusCode === 200) {
|
|
584
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "DatastoreArray");
|
|
585
|
+
return body;
|
|
586
|
+
}
|
|
587
|
+
if (response.httpStatusCode === 429) {
|
|
588
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
589
|
+
let body;
|
|
590
|
+
try {
|
|
591
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
592
|
+
}
|
|
593
|
+
catch (error) {
|
|
594
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
595
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
596
|
+
}
|
|
597
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
598
|
+
}
|
|
599
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
600
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
601
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "DatastoreArray", "");
|
|
602
|
+
return body;
|
|
603
|
+
}
|
|
604
|
+
const body = (yield response.body.text()) || "";
|
|
605
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
610
|
+
* to the expected objects
|
|
611
|
+
*
|
|
612
|
+
* @params response Response returned by the server for a request to updateDatastore
|
|
613
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
614
|
+
*/
|
|
615
|
+
updateDatastore(response) {
|
|
616
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
617
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
618
|
+
if (response.httpStatusCode === 200) {
|
|
619
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Datastore");
|
|
620
|
+
return body;
|
|
621
|
+
}
|
|
622
|
+
if (response.httpStatusCode === 400 || response.httpStatusCode === 404) {
|
|
623
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
624
|
+
let body;
|
|
625
|
+
try {
|
|
626
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "JSONAPIErrorResponse");
|
|
627
|
+
}
|
|
628
|
+
catch (error) {
|
|
629
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
630
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
631
|
+
}
|
|
632
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
633
|
+
}
|
|
634
|
+
if (response.httpStatusCode === 429) {
|
|
635
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
636
|
+
let body;
|
|
637
|
+
try {
|
|
638
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
639
|
+
}
|
|
640
|
+
catch (error) {
|
|
641
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
642
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
643
|
+
}
|
|
644
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
645
|
+
}
|
|
646
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
647
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
648
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "Datastore", "");
|
|
649
|
+
return body;
|
|
650
|
+
}
|
|
651
|
+
const body = (yield response.body.text()) || "";
|
|
652
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* Unwraps the actual response sent by the server from the response context and deserializes the response content
|
|
657
|
+
* to the expected objects
|
|
658
|
+
*
|
|
659
|
+
* @params response Response returned by the server for a request to updateDatastoreItem
|
|
660
|
+
* @throws ApiException if the response code was not in [200, 299]
|
|
661
|
+
*/
|
|
662
|
+
updateDatastoreItem(response) {
|
|
663
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
664
|
+
const contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
665
|
+
if (response.httpStatusCode === 200) {
|
|
666
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "ItemApiPayload");
|
|
667
|
+
return body;
|
|
668
|
+
}
|
|
669
|
+
if (response.httpStatusCode === 400 || response.httpStatusCode === 404) {
|
|
670
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
671
|
+
let body;
|
|
672
|
+
try {
|
|
673
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "JSONAPIErrorResponse");
|
|
674
|
+
}
|
|
675
|
+
catch (error) {
|
|
676
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
677
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
678
|
+
}
|
|
679
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
680
|
+
}
|
|
681
|
+
if (response.httpStatusCode === 429) {
|
|
682
|
+
const bodyText = ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType);
|
|
683
|
+
let body;
|
|
684
|
+
try {
|
|
685
|
+
body = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
686
|
+
}
|
|
687
|
+
catch (error) {
|
|
688
|
+
logger_1.logger.debug(`Got error deserializing error: ${error}`);
|
|
689
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
690
|
+
}
|
|
691
|
+
throw new exception_1.ApiException(response.httpStatusCode, body);
|
|
692
|
+
}
|
|
693
|
+
// Work around for missing responses in specification, e.g. for petstore.yaml
|
|
694
|
+
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
|
|
695
|
+
const body = ObjectSerializer_1.ObjectSerializer.deserialize(ObjectSerializer_1.ObjectSerializer.parse(yield response.body.text(), contentType), "ItemApiPayload", "");
|
|
696
|
+
return body;
|
|
697
|
+
}
|
|
698
|
+
const body = (yield response.body.text()) || "";
|
|
699
|
+
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
exports.ActionsDatastoresApiResponseProcessor = ActionsDatastoresApiResponseProcessor;
|
|
704
|
+
class ActionsDatastoresApi {
|
|
705
|
+
constructor(configuration, requestFactory, responseProcessor) {
|
|
706
|
+
this.configuration = configuration;
|
|
707
|
+
this.requestFactory =
|
|
708
|
+
requestFactory || new ActionsDatastoresApiRequestFactory(configuration);
|
|
709
|
+
this.responseProcessor =
|
|
710
|
+
responseProcessor || new ActionsDatastoresApiResponseProcessor();
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Creates or replaces multiple items in a datastore by their keys in a single operation.
|
|
714
|
+
* @param param The request object
|
|
715
|
+
*/
|
|
716
|
+
bulkWriteDatastoreItems(param, options) {
|
|
717
|
+
const requestContextPromise = this.requestFactory.bulkWriteDatastoreItems(param.datastoreId, param.body, options);
|
|
718
|
+
return requestContextPromise.then((requestContext) => {
|
|
719
|
+
return this.configuration.httpApi
|
|
720
|
+
.send(requestContext)
|
|
721
|
+
.then((responseContext) => {
|
|
722
|
+
return this.responseProcessor.bulkWriteDatastoreItems(responseContext);
|
|
723
|
+
});
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
/**
|
|
727
|
+
* Creates a new datastore.
|
|
728
|
+
* @param param The request object
|
|
729
|
+
*/
|
|
730
|
+
createDatastore(param, options) {
|
|
731
|
+
const requestContextPromise = this.requestFactory.createDatastore(param.body, options);
|
|
732
|
+
return requestContextPromise.then((requestContext) => {
|
|
733
|
+
return this.configuration.httpApi
|
|
734
|
+
.send(requestContext)
|
|
735
|
+
.then((responseContext) => {
|
|
736
|
+
return this.responseProcessor.createDatastore(responseContext);
|
|
737
|
+
});
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
/**
|
|
741
|
+
* Deletes a datastore by its unique identifier.
|
|
742
|
+
* @param param The request object
|
|
743
|
+
*/
|
|
744
|
+
deleteDatastore(param, options) {
|
|
745
|
+
const requestContextPromise = this.requestFactory.deleteDatastore(param.datastoreId, options);
|
|
746
|
+
return requestContextPromise.then((requestContext) => {
|
|
747
|
+
return this.configuration.httpApi
|
|
748
|
+
.send(requestContext)
|
|
749
|
+
.then((responseContext) => {
|
|
750
|
+
return this.responseProcessor.deleteDatastore(responseContext);
|
|
751
|
+
});
|
|
752
|
+
});
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Deletes an item from a datastore by its key.
|
|
756
|
+
* @param param The request object
|
|
757
|
+
*/
|
|
758
|
+
deleteDatastoreItem(param, options) {
|
|
759
|
+
const requestContextPromise = this.requestFactory.deleteDatastoreItem(param.datastoreId, param.body, options);
|
|
760
|
+
return requestContextPromise.then((requestContext) => {
|
|
761
|
+
return this.configuration.httpApi
|
|
762
|
+
.send(requestContext)
|
|
763
|
+
.then((responseContext) => {
|
|
764
|
+
return this.responseProcessor.deleteDatastoreItem(responseContext);
|
|
765
|
+
});
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* Retrieves a specific datastore by its ID.
|
|
770
|
+
* @param param The request object
|
|
771
|
+
*/
|
|
772
|
+
getDatastore(param, options) {
|
|
773
|
+
const requestContextPromise = this.requestFactory.getDatastore(param.datastoreId, options);
|
|
774
|
+
return requestContextPromise.then((requestContext) => {
|
|
775
|
+
return this.configuration.httpApi
|
|
776
|
+
.send(requestContext)
|
|
777
|
+
.then((responseContext) => {
|
|
778
|
+
return this.responseProcessor.getDatastore(responseContext);
|
|
779
|
+
});
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* Lists items from a datastore. You can filter the results by specifying either an item key or a filter query parameter, but not both at the same time. Supports server-side pagination for large datasets.
|
|
784
|
+
* @param param The request object
|
|
785
|
+
*/
|
|
786
|
+
listDatastoreItems(param, options) {
|
|
787
|
+
const requestContextPromise = this.requestFactory.listDatastoreItems(param.datastoreId, param.filter, param.itemKey, param.pageLimit, param.pageOffset, param.sort, options);
|
|
788
|
+
return requestContextPromise.then((requestContext) => {
|
|
789
|
+
return this.configuration.httpApi
|
|
790
|
+
.send(requestContext)
|
|
791
|
+
.then((responseContext) => {
|
|
792
|
+
return this.responseProcessor.listDatastoreItems(responseContext);
|
|
793
|
+
});
|
|
794
|
+
});
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* Lists all datastores for the organization.
|
|
798
|
+
* @param param The request object
|
|
799
|
+
*/
|
|
800
|
+
listDatastores(options) {
|
|
801
|
+
const requestContextPromise = this.requestFactory.listDatastores(options);
|
|
802
|
+
return requestContextPromise.then((requestContext) => {
|
|
803
|
+
return this.configuration.httpApi
|
|
804
|
+
.send(requestContext)
|
|
805
|
+
.then((responseContext) => {
|
|
806
|
+
return this.responseProcessor.listDatastores(responseContext);
|
|
807
|
+
});
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Updates an existing datastore's attributes.
|
|
812
|
+
* @param param The request object
|
|
813
|
+
*/
|
|
814
|
+
updateDatastore(param, options) {
|
|
815
|
+
const requestContextPromise = this.requestFactory.updateDatastore(param.datastoreId, param.body, options);
|
|
816
|
+
return requestContextPromise.then((requestContext) => {
|
|
817
|
+
return this.configuration.httpApi
|
|
818
|
+
.send(requestContext)
|
|
819
|
+
.then((responseContext) => {
|
|
820
|
+
return this.responseProcessor.updateDatastore(responseContext);
|
|
821
|
+
});
|
|
822
|
+
});
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* Partially updates an item in a datastore by its key.
|
|
826
|
+
* @param param The request object
|
|
827
|
+
*/
|
|
828
|
+
updateDatastoreItem(param, options) {
|
|
829
|
+
const requestContextPromise = this.requestFactory.updateDatastoreItem(param.datastoreId, param.body, options);
|
|
830
|
+
return requestContextPromise.then((requestContext) => {
|
|
831
|
+
return this.configuration.httpApi
|
|
832
|
+
.send(requestContext)
|
|
833
|
+
.then((responseContext) => {
|
|
834
|
+
return this.responseProcessor.updateDatastoreItem(responseContext);
|
|
835
|
+
});
|
|
836
|
+
});
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
exports.ActionsDatastoresApi = ActionsDatastoresApi;
|
|
840
|
+
//# sourceMappingURL=ActionsDatastoresApi.js.map
|