@segment/public-api-sdk-typescript 1.0.0 → 1.0.1
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/package.json +2 -1
- package/api/aPICallsApi.ts +0 -1176
- package/api/apis.ts +0 -178
- package/api/auditTrailApi.ts +0 -714
- package/api/catalogApi.ts +0 -2916
- package/api/deletionAndSuppressionApi.ts +0 -4298
- package/api/destinationFiltersApi.ts +0 -3262
- package/api/destinationsApi.ts +0 -3494
- package/api/edgeFunctionsApi.ts +0 -593
- package/api/eventsApi.ts +0 -922
- package/api/functionsApi.ts +0 -3036
- package/api/iAMGroupsApi.ts +0 -6204
- package/api/iAMRolesApi.ts +0 -566
- package/api/iAMUsersApi.ts +0 -4486
- package/api/labelsApi.ts +0 -1488
- package/api/monthlyTrackedUsersApi.ts +0 -1178
- package/api/selectiveSyncApi.ts +0 -3321
- package/api/sourcesApi.ts +0 -5602
- package/api/spacesApi.ts +0 -489
- package/api/testingApi.ts +0 -568
- package/api/trackingPlansApi.ts +0 -6238
- package/api/transformationsApi.ts +0 -1316
- package/api/warehousesApi.ts +0 -5004
- package/api/workspacesApi.ts +0 -513
- package/api.ts +0 -3
- package/jest.config.js +0 -10
- package/model/aPICallSnapshotV1.ts +0 -50
- package/model/accessPermissionV1.ts +0 -60
- package/model/addConnectionFromSourceToWarehouse200Response.ts +0 -36
- package/model/addConnectionFromSourceToWarehouseV1Output.ts +0 -48
- package/model/addLabelsToSource200Response.ts +0 -36
- package/model/addLabelsToSource200Response1.ts +0 -36
- package/model/addLabelsToSourceAlphaInput.ts +0 -42
- package/model/addLabelsToSourceAlphaOutput.ts +0 -42
- package/model/addLabelsToSourceV1Input.ts +0 -42
- package/model/addLabelsToSourceV1Output.ts +0 -42
- package/model/addPermissionsToUser200Response.ts +0 -36
- package/model/addPermissionsToUserGroup200Response.ts +0 -36
- package/model/addPermissionsToUserGroupV1Input.ts +0 -42
- package/model/addPermissionsToUserGroupV1Output.ts +0 -42
- package/model/addPermissionsToUserV1Input.ts +0 -42
- package/model/addPermissionsToUserV1Output.ts +0 -42
- package/model/addSourceToTrackingPlan200Response.ts +0 -36
- package/model/addSourceToTrackingPlanV1Input.ts +0 -41
- package/model/addSourceToTrackingPlanV1Output.ts +0 -47
- package/model/addUsersToUserGroup200Response.ts +0 -36
- package/model/addUsersToUserGroupV1Input.ts +0 -41
- package/model/addUsersToUserGroupV1Output.ts +0 -39
- package/model/advancedWarehouseSyncScheduleV1Input.ts +0 -51
- package/model/advancedWarehouseSyncScheduleV1Output.ts +0 -51
- package/model/allowedLabelBeta.ts +0 -59
- package/model/auditEventV1.ts +0 -95
- package/model/batchQueryMessagingSubscriptionsForSpace200Response.ts +0 -36
- package/model/batchQueryMessagingSubscriptionsForSpaceAlphaInput.ts +0 -42
- package/model/batchQueryMessagingSubscriptionsForSpaceAlphaOutput.ts +0 -69
- package/model/breakdownBeta.ts +0 -50
- package/model/commonSourceSettingsV1.ts +0 -68
- package/model/createCloudSourceRegulation200Response.ts +0 -36
- package/model/createCloudSourceRegulationV1Input.ts +0 -82
- package/model/createCloudSourceRegulationV1Output.ts +0 -41
- package/model/createDestination200Response.ts +0 -36
- package/model/createDestinationSubscription200Response.ts +0 -36
- package/model/createDestinationSubscriptionAlphaInput.ts +0 -77
- package/model/createDestinationSubscriptionAlphaOutput.ts +0 -39
- package/model/createDestinationV1Input.ts +0 -77
- package/model/createDestinationV1Output.ts +0 -39
- package/model/createEdgeFunctions200Response.ts +0 -36
- package/model/createEdgeFunctionsAlphaInput.ts +0 -41
- package/model/createEdgeFunctionsAlphaOutput.ts +0 -39
- package/model/createFilterForDestination200Response.ts +0 -36
- package/model/createFilterForDestinationV1Input.ts +0 -87
- package/model/createFilterForDestinationV1Output.ts +0 -39
- package/model/createFunction200Response.ts +0 -36
- package/model/createFunctionDeployment200Response.ts +0 -36
- package/model/createFunctionDeploymentV1Output.ts +0 -39
- package/model/createFunctionV1Input.ts +0 -94
- package/model/createFunctionV1Output.ts +0 -39
- package/model/createInvites200Response.ts +0 -36
- package/model/createInvitesV1Input.ts +0 -42
- package/model/createInvitesV1Output.ts +0 -41
- package/model/createLabel200Response.ts +0 -36
- package/model/createLabel200Response1.ts +0 -36
- package/model/createLabelAlphaInput.ts +0 -39
- package/model/createLabelAlphaOutput.ts +0 -42
- package/model/createLabelV1Input.ts +0 -39
- package/model/createLabelV1Output.ts +0 -39
- package/model/createSource200Response.ts +0 -36
- package/model/createSource200Response1.ts +0 -36
- package/model/createSourceAlphaInput.ts +0 -77
- package/model/createSourceAlphaOutput.ts +0 -39
- package/model/createSourceRegulation200Response.ts +0 -36
- package/model/createSourceRegulationV1Input.ts +0 -73
- package/model/createSourceRegulationV1Output.ts +0 -41
- package/model/createSourceV1Input.ts +0 -68
- package/model/createSourceV1Output.ts +0 -39
- package/model/createTrackingPlan200Response.ts +0 -36
- package/model/createTrackingPlanV1Input.ts +0 -68
- package/model/createTrackingPlanV1Output.ts +0 -39
- package/model/createTransformation200Response.ts +0 -36
- package/model/createTransformationBetaInput.ts +0 -96
- package/model/createTransformationBetaOutput.ts +0 -39
- package/model/createUserGroup200Response.ts +0 -36
- package/model/createUserGroupV1Input.ts +0 -41
- package/model/createUserGroupV1Output.ts +0 -39
- package/model/createValidationInWarehouse200Response.ts +0 -36
- package/model/createValidationInWarehouseV1Input.ts +0 -50
- package/model/createValidationInWarehouseV1Output.ts +0 -48
- package/model/createWarehouse200Response.ts +0 -36
- package/model/createWarehouseV1Input.ts +0 -68
- package/model/createWarehouseV1Output.ts +0 -39
- package/model/createWorkspaceRegulation200Response.ts +0 -36
- package/model/createWorkspaceRegulationV1Input.ts +0 -74
- package/model/createWorkspaceRegulationV1Output.ts +0 -41
- package/model/deleteDestination200Response.ts +0 -36
- package/model/deleteDestinationV1Output.ts +0 -47
- package/model/deleteFunction200Response.ts +0 -36
- package/model/deleteFunctionV1Output.ts +0 -47
- package/model/deleteInvites200Response.ts +0 -36
- package/model/deleteInvitesV1Output.ts +0 -47
- package/model/deleteLabel200Response.ts +0 -36
- package/model/deleteLabel200Response1.ts +0 -36
- package/model/deleteLabelAlphaOutput.ts +0 -47
- package/model/deleteLabelV1Output.ts +0 -47
- package/model/deleteRegulation200Response.ts +0 -36
- package/model/deleteRegulationV1Output.ts +0 -47
- package/model/deleteSource200Response.ts +0 -36
- package/model/deleteSource200Response1.ts +0 -36
- package/model/deleteSourceAlphaOutput.ts +0 -47
- package/model/deleteSourceV1Output.ts +0 -47
- package/model/deleteTrackingPlan200Response.ts +0 -36
- package/model/deleteTrackingPlanV1Output.ts +0 -47
- package/model/deleteTransformation200Response.ts +0 -36
- package/model/deleteTransformationBetaOutput.ts +0 -47
- package/model/deleteUserGroup200Response.ts +0 -36
- package/model/deleteUserGroupV1Output.ts +0 -47
- package/model/deleteUsers200Response.ts +0 -36
- package/model/deleteUsersV1Output.ts +0 -47
- package/model/deleteWarehouse200Response.ts +0 -36
- package/model/deleteWarehouseV1Output.ts +0 -47
- package/model/deliveryMetricsSummary.ts +0 -60
- package/model/deliveryMetricsSummaryBeta.ts +0 -60
- package/model/destination.ts +0 -84
- package/model/destination1.ts +0 -84
- package/model/destination2.ts +0 -84
- package/model/destinationFilterActionV1.ts +0 -77
- package/model/destinationFilterV1.ts +0 -123
- package/model/destinationMetadata.ts +0 -184
- package/model/destinationMetadataActionFieldV1.ts +0 -163
- package/model/destinationMetadataActionV1.ts +0 -113
- package/model/destinationMetadataComponentV1.ts +0 -72
- package/model/destinationMetadataFeaturesV1.ts +0 -93
- package/model/destinationMetadataMethodsV1.ts +0 -77
- package/model/destinationMetadataPlatformsV1.ts +0 -59
- package/model/destinationMetadataSubscriptionPresetV1.ts +0 -68
- package/model/destinationMetadataV1.ts +0 -184
- package/model/destinationStatusV1.ts +0 -74
- package/model/destinationSubscription.ts +0 -104
- package/model/destinationSubscriptionUpdateInput.ts +0 -68
- package/model/destinationV1.ts +0 -84
- package/model/disableEdgeFunctions200Response.ts +0 -36
- package/model/disableEdgeFunctionsAlphaOutput.ts +0 -39
- package/model/echo200Response.ts +0 -36
- package/model/echo200Response1.ts +0 -36
- package/model/echoAlphaOutput.ts +0 -66
- package/model/echoV1Output.ts +0 -66
- package/model/edgeFunctions.ts +0 -86
- package/model/edgeFunctions1.ts +0 -86
- package/model/edgeFunctionsAlpha.ts +0 -86
- package/model/eventSourceV1.ts +0 -59
- package/model/filter.ts +0 -51
- package/model/filter1.ts +0 -123
- package/model/filter2.ts +0 -123
- package/model/filter3.ts +0 -123
- package/model/function.ts +0 -166
- package/model/function1.ts +0 -166
- package/model/function2.ts +0 -166
- package/model/functionDeployment.ts +0 -44
- package/model/functionSettingV1.ts +0 -92
- package/model/functionV1.ts +0 -166
- package/model/generateUploadURLForEdgeFunctions200Response.ts +0 -36
- package/model/generateUploadURLForEdgeFunctionsAlphaOutput.ts +0 -41
- package/model/getAdvancedSyncScheduleFromWarehouse200Response.ts +0 -36
- package/model/getAdvancedSyncScheduleFromWarehouseV1Output.ts +0 -48
- package/model/getConnectionStateFromWarehouse200Response.ts +0 -36
- package/model/getConnectionStateFromWarehouseV1Output.ts +0 -48
- package/model/getDailyPerSourceAPICallsUsage200Response.ts +0 -36
- package/model/getDailyPerSourceAPICallsUsageV1Output.ts +0 -49
- package/model/getDailyPerSourceMTUUsage200Response.ts +0 -36
- package/model/getDailyPerSourceMTUUsageV1Output.ts +0 -49
- package/model/getDailyWorkspaceAPICallsUsage200Response.ts +0 -36
- package/model/getDailyWorkspaceAPICallsUsageV1Output.ts +0 -49
- package/model/getDailyWorkspaceMTUUsage200Response.ts +0 -36
- package/model/getDailyWorkspaceMTUUsageV1Output.ts +0 -49
- package/model/getDestination200Response.ts +0 -36
- package/model/getDestinationMetadata200Response.ts +0 -36
- package/model/getDestinationMetadataV1Output.ts +0 -39
- package/model/getDestinationV1Output.ts +0 -39
- package/model/getDestinationsCatalog200Response.ts +0 -36
- package/model/getDestinationsCatalogV1Output.ts +0 -49
- package/model/getEventsVolumeFromWorkspace200Response.ts +0 -36
- package/model/getEventsVolumeFromWorkspaceV1Output.ts +0 -49
- package/model/getFilterInDestination200Response.ts +0 -36
- package/model/getFilterInDestinationV1Output.ts +0 -39
- package/model/getFunction200Response.ts +0 -36
- package/model/getFunctionV1Output.ts +0 -39
- package/model/getLatestFromEdgeFunctions200Response.ts +0 -36
- package/model/getLatestFromEdgeFunctionsAlphaOutput.ts +0 -39
- package/model/getMessagingSubscriptionFailureResponse.ts +0 -57
- package/model/getMessagingSubscriptionSuccessResponse.ts +0 -68
- package/model/getRegulation200Response.ts +0 -36
- package/model/getRegulationV1Output.ts +0 -39
- package/model/getSource200Response.ts +0 -36
- package/model/getSource200Response1.ts +0 -36
- package/model/getSourceAlphaOutput.ts +0 -39
- package/model/getSourceMetadata200Response.ts +0 -36
- package/model/getSourceMetadataV1Output.ts +0 -39
- package/model/getSourceV1Output.ts +0 -39
- package/model/getSourcesCatalog200Response.ts +0 -36
- package/model/getSourcesCatalogV1Output.ts +0 -49
- package/model/getSpace200Response.ts +0 -36
- package/model/getSpaceAlphaOutput.ts +0 -39
- package/model/getSubscriptionFromDestination200Response.ts +0 -36
- package/model/getSubscriptionFromDestinationAlphaOutput.ts +0 -39
- package/model/getSubscriptionRequest.ts +0 -54
- package/model/getTrackingPlan200Response.ts +0 -36
- package/model/getTrackingPlanV1Output.ts +0 -39
- package/model/getTransformation200Response.ts +0 -36
- package/model/getTransformationBetaOutput.ts +0 -39
- package/model/getUser200Response.ts +0 -36
- package/model/getUserGroup200Response.ts +0 -36
- package/model/getUserGroupV1Output.ts +0 -39
- package/model/getUserV1Output.ts +0 -39
- package/model/getWarehouse200Response.ts +0 -36
- package/model/getWarehouseMetadata200Response.ts +0 -36
- package/model/getWarehouseMetadataV1Output.ts +0 -39
- package/model/getWarehouseV1Output.ts +0 -39
- package/model/getWarehousesCatalog200Response.ts +0 -36
- package/model/getWarehousesCatalogV1Output.ts +0 -49
- package/model/getWorkspace200Response.ts +0 -36
- package/model/getWorkspaceV1Output.ts +0 -39
- package/model/group.ts +0 -67
- package/model/groupSourceSettingsV1.ts +0 -64
- package/model/identify.ts +0 -67
- package/model/identifySourceSettingsV1.ts +0 -64
- package/model/input.ts +0 -68
- package/model/integrationOptionBeta.ts +0 -86
- package/model/invitePermissionV1.ts +0 -61
- package/model/inviteV1.ts +0 -51
- package/model/label.ts +0 -59
- package/model/label1.ts +0 -59
- package/model/label2.ts +0 -59
- package/model/labelAlpha.ts +0 -59
- package/model/labelV1.ts +0 -59
- package/model/listAuditEvents200Response.ts +0 -36
- package/model/listAuditEventsV1Output.ts +0 -49
- package/model/listConnectedDestinationsFromSource200Response.ts +0 -36
- package/model/listConnectedDestinationsFromSource200Response1.ts +0 -36
- package/model/listConnectedDestinationsFromSourceAlphaOutput.ts +0 -49
- package/model/listConnectedDestinationsFromSourceV1Output.ts +0 -49
- package/model/listConnectedSourcesFromWarehouse200Response.ts +0 -36
- package/model/listConnectedSourcesFromWarehouseV1Output.ts +0 -49
- package/model/listConnectedWarehousesFromSource200Response.ts +0 -36
- package/model/listConnectedWarehousesFromSource200Response1.ts +0 -36
- package/model/listConnectedWarehousesFromSourceAlphaOutput.ts +0 -49
- package/model/listConnectedWarehousesFromSourceV1Output.ts +0 -49
- package/model/listDeliveryMetricsSummaryFromDestination200Response.ts +0 -36
- package/model/listDeliveryMetricsSummaryFromDestinationBetaOutput.ts +0 -39
- package/model/listDestinations200Response.ts +0 -36
- package/model/listDestinationsV1Output.ts +0 -49
- package/model/listFiltersFromDestination200Response.ts +0 -36
- package/model/listFiltersFromDestinationV1Output.ts +0 -49
- package/model/listFunctionItemV1.ts +0 -111
- package/model/listFunctions200Response.ts +0 -36
- package/model/listFunctionsV1Output.ts +0 -49
- package/model/listInvites200Response.ts +0 -36
- package/model/listInvitesFromUserGroup200Response.ts +0 -36
- package/model/listInvitesFromUserGroupV1Output.ts +0 -48
- package/model/listInvitesV1Output.ts +0 -48
- package/model/listLabels200Response.ts +0 -36
- package/model/listLabels200Response1.ts +0 -36
- package/model/listLabelsAlphaOutput.ts +0 -42
- package/model/listLabelsV1Output.ts +0 -42
- package/model/listRegulationsFromSource200Response.ts +0 -36
- package/model/listRegulationsFromSourceV1Output.ts +0 -42
- package/model/listRoles200Response.ts +0 -36
- package/model/listRolesV1Output.ts +0 -49
- package/model/listRulesFromTrackingPlan200Response.ts +0 -36
- package/model/listRulesFromTrackingPlanV1Output.ts +0 -49
- package/model/listSchemaSettingsInSource200Response.ts +0 -36
- package/model/listSchemaSettingsInSourceV1Output.ts +0 -48
- package/model/listSelectiveSyncsFromWarehouseAndSource200Response.ts +0 -36
- package/model/listSelectiveSyncsFromWarehouseAndSourceV1Output.ts +0 -49
- package/model/listSources200Response.ts +0 -36
- package/model/listSources200Response1.ts +0 -36
- package/model/listSourcesAlphaOutput.ts +0 -49
- package/model/listSourcesFromTrackingPlan200Response.ts +0 -36
- package/model/listSourcesFromTrackingPlanV1Output.ts +0 -49
- package/model/listSourcesV1Output.ts +0 -49
- package/model/listSubscriptionsFromDestination200Response.ts +0 -36
- package/model/listSubscriptionsFromDestinationAlphaOutput.ts +0 -49
- package/model/listSuppressions200Response.ts +0 -36
- package/model/listSuppressionsV1Output.ts +0 -49
- package/model/listSyncsFromWarehouse200Response.ts +0 -36
- package/model/listSyncsFromWarehouseAndSource200Response.ts +0 -36
- package/model/listSyncsFromWarehouseAndSourceV1Output.ts +0 -49
- package/model/listSyncsFromWarehouseV1Output.ts +0 -49
- package/model/listTrackingPlans200Response.ts +0 -36
- package/model/listTrackingPlansV1Output.ts +0 -49
- package/model/listTransformations200Response.ts +0 -36
- package/model/listTransformationsBetaOutput.ts +0 -49
- package/model/listUserGroups200Response.ts +0 -36
- package/model/listUserGroupsFromUser200Response.ts +0 -36
- package/model/listUserGroupsFromUserV1Output.ts +0 -49
- package/model/listUserGroupsV1Output.ts +0 -49
- package/model/listUsers200Response.ts +0 -36
- package/model/listUsersFromUserGroup200Response.ts +0 -36
- package/model/listUsersFromUserGroupV1Output.ts +0 -49
- package/model/listUsersV1Output.ts +0 -49
- package/model/listWarehouses200Response.ts +0 -36
- package/model/listWarehousesV1Output.ts +0 -49
- package/model/listWorkspaceRegulations200Response.ts +0 -36
- package/model/listWorkspaceRegulationsV1Output.ts +0 -49
- package/model/logos.ts +0 -59
- package/model/logos1.ts +0 -59
- package/model/logos2.ts +0 -59
- package/model/logosBeta.ts +0 -59
- package/model/messageSubscriptionResponse.ts +0 -78
- package/model/messageSubscriptionResponseError.ts +0 -47
- package/model/messagesSubscriptionRequest.ts +0 -68
- package/model/metadata.ts +0 -184
- package/model/metadata1.ts +0 -103
- package/model/metadata2.ts +0 -85
- package/model/metricBeta.ts +0 -60
- package/model/minimalUserGroupV1.ts +0 -50
- package/model/minimalUserV1.ts +0 -59
- package/model/models.ts +0 -1835
- package/model/mtuSnapshotV1.ts +0 -95
- package/model/pagination.ts +0 -68
- package/model/paginationInput.ts +0 -50
- package/model/paginationOutput.ts +0 -68
- package/model/permissionInputV1.ts +0 -51
- package/model/permissionResourceV1.ts +0 -70
- package/model/permissionV1.ts +0 -70
- package/model/previewDestinationFilter200Response.ts +0 -36
- package/model/previewDestinationFilterV1.ts +0 -51
- package/model/previewDestinationFilterV1Input.ts +0 -48
- package/model/previewDestinationFilterV1Output.ts +0 -50
- package/model/propertyRenameBeta.ts +0 -47
- package/model/regulation.ts +0 -99
- package/model/regulationListEntryV1.ts +0 -77
- package/model/removeFilterFromDestination200Response.ts +0 -36
- package/model/removeFilterFromDestinationV1Output.ts +0 -47
- package/model/removeRuleV1.ts +0 -61
- package/model/removeRulesFromTrackingPlan200Response.ts +0 -36
- package/model/removeRulesFromTrackingPlanV1Output.ts +0 -47
- package/model/removeSourceConnectionFromWarehouse200Response.ts +0 -36
- package/model/removeSourceConnectionFromWarehouseV1Output.ts +0 -47
- package/model/removeSourceFromTrackingPlan200Response.ts +0 -36
- package/model/removeSourceFromTrackingPlanV1Output.ts +0 -47
- package/model/removeSubscriptionFromDestination200Response.ts +0 -36
- package/model/removeSubscriptionFromDestinationAlphaOutput.ts +0 -47
- package/model/removeUsersFromUserGroup200Response.ts +0 -36
- package/model/removeUsersFromUserGroupV1Output.ts +0 -47
- package/model/replaceAdvancedSyncScheduleForWarehouse200Response.ts +0 -36
- package/model/replaceAdvancedSyncScheduleForWarehouseV1Input.ts +0 -48
- package/model/replaceAdvancedSyncScheduleForWarehouseV1Output.ts +0 -48
- package/model/replaceLabelsInSource200Response.ts +0 -36
- package/model/replaceLabelsInSource200Response1.ts +0 -36
- package/model/replaceLabelsInSourceAlphaInput.ts +0 -42
- package/model/replaceLabelsInSourceAlphaOutput.ts +0 -42
- package/model/replaceLabelsInSourceV1Input.ts +0 -42
- package/model/replaceLabelsInSourceV1Output.ts +0 -42
- package/model/replaceMessagingSubscriptionsInSpaces200Response.ts +0 -36
- package/model/replaceMessagingSubscriptionsInSpacesAlphaInput.ts +0 -42
- package/model/replaceMessagingSubscriptionsInSpacesAlphaOutput.ts +0 -58
- package/model/replacePermissionsForUser200Response.ts +0 -36
- package/model/replacePermissionsForUserGroup200Response.ts +0 -36
- package/model/replacePermissionsForUserGroupV1Input.ts +0 -42
- package/model/replacePermissionsForUserGroupV1Output.ts +0 -42
- package/model/replacePermissionsForUserV1Input.ts +0 -42
- package/model/replacePermissionsForUserV1Output.ts +0 -42
- package/model/replaceRulesInTrackingPlan200Response.ts +0 -36
- package/model/replaceRulesInTrackingPlanV1Input.ts +0 -42
- package/model/replaceRulesInTrackingPlanV1Output.ts +0 -47
- package/model/replaceUsersInUserGroup200Response.ts +0 -36
- package/model/replaceUsersInUserGroupV1Input.ts +0 -41
- package/model/replaceUsersInUserGroupV1Output.ts +0 -39
- package/model/requestError.ts +0 -77
- package/model/requestErrorEnvelope.ts +0 -39
- package/model/resourceV1.ts +0 -60
- package/model/roleV1.ts +0 -59
- package/model/ruleV1.ts +0 -106
- package/model/schedule.ts +0 -51
- package/model/schedule1.ts +0 -51
- package/model/schedule2.ts +0 -51
- package/model/settings.ts +0 -71
- package/model/settings1.ts +0 -71
- package/model/source.ts +0 -59
- package/model/source1.ts +0 -112
- package/model/source2.ts +0 -112
- package/model/source3.ts +0 -112
- package/model/source4.ts +0 -112
- package/model/source5.ts +0 -112
- package/model/source6.ts +0 -112
- package/model/sourceAPICallSnapshotV1.ts +0 -59
- package/model/sourceAlpha.ts +0 -112
- package/model/sourceEventVolumeDatapointV1.ts +0 -50
- package/model/sourceEventVolumeV1.ts +0 -76
- package/model/sourceMetadata.ts +0 -103
- package/model/sourceMetadataV1.ts +0 -103
- package/model/sourceSettingsOutputV1.ts +0 -71
- package/model/sourceV1.ts +0 -112
- package/model/space.ts +0 -50
- package/model/streamStatusV1.ts +0 -45
- package/model/subscription.ts +0 -104
- package/model/supportedFeatures.ts +0 -93
- package/model/supportedMethods.ts +0 -77
- package/model/supportedPlatforms.ts +0 -59
- package/model/suppressedInner.ts +0 -41
- package/model/syncNoticeV1.ts +0 -59
- package/model/syncV1.ts +0 -105
- package/model/track.ts +0 -85
- package/model/trackSourceSettingsV1.ts +0 -82
- package/model/trackingPlan.ts +0 -104
- package/model/trackingPlan1.ts +0 -104
- package/model/trackingPlanV1.ts +0 -104
- package/model/transformation.ts +0 -105
- package/model/transformation1.ts +0 -105
- package/model/transformation2.ts +0 -105
- package/model/transformationBeta.ts +0 -105
- package/model/updateDestination200Response.ts +0 -36
- package/model/updateDestinationV1Input.ts +0 -59
- package/model/updateDestinationV1Output.ts +0 -39
- package/model/updateFilterForDestination200Response.ts +0 -36
- package/model/updateFilterForDestinationV1Input.ts +0 -78
- package/model/updateFilterForDestinationV1Output.ts +0 -39
- package/model/updateFunction200Response.ts +0 -36
- package/model/updateFunctionV1Input.ts +0 -78
- package/model/updateFunctionV1Output.ts +0 -39
- package/model/updateRulesInTrackingPlan200Response.ts +0 -36
- package/model/updateRulesInTrackingPlanV1Input.ts +0 -42
- package/model/updateRulesInTrackingPlanV1Output.ts +0 -47
- package/model/updateSchemaSettingsInSource200Response.ts +0 -36
- package/model/updateSchemaSettingsInSourceV1Input.ts +0 -71
- package/model/updateSchemaSettingsInSourceV1Output.ts +0 -48
- package/model/updateSelectiveSyncForWarehouse200Response.ts +0 -36
- package/model/updateSelectiveSyncForWarehouseV1Input.ts +0 -42
- package/model/updateSelectiveSyncForWarehouseV1Output.ts +0 -57
- package/model/updateSource200Response.ts +0 -36
- package/model/updateSource200Response1.ts +0 -36
- package/model/updateSourceAlphaInput.ts +0 -68
- package/model/updateSourceAlphaOutput.ts +0 -39
- package/model/updateSourceV1Input.ts +0 -68
- package/model/updateSourceV1Output.ts +0 -39
- package/model/updateSubscriptionForDestination200Response.ts +0 -36
- package/model/updateSubscriptionForDestinationAlphaInput.ts +0 -39
- package/model/updateSubscriptionForDestinationAlphaOutput.ts +0 -39
- package/model/updateTrackingPlan200Response.ts +0 -36
- package/model/updateTrackingPlanV1Input.ts +0 -50
- package/model/updateTrackingPlanV1Output.ts +0 -47
- package/model/updateTransformation200Response.ts +0 -36
- package/model/updateTransformationBetaInput.ts +0 -96
- package/model/updateTransformationBetaOutput.ts +0 -39
- package/model/updateUserGroup200Response.ts +0 -36
- package/model/updateUserGroupV1Input.ts +0 -41
- package/model/updateUserGroupV1Output.ts +0 -39
- package/model/updateWarehouse200Response.ts +0 -36
- package/model/updateWarehouseV1Input.ts +0 -59
- package/model/updateWarehouseV1Output.ts +0 -39
- package/model/upsertRuleV1.ts +0 -112
- package/model/user.ts +0 -69
- package/model/userGroup.ts +0 -69
- package/model/userGroup1.ts +0 -69
- package/model/userGroup2.ts +0 -69
- package/model/userGroup3.ts +0 -69
- package/model/userGroupV1.ts +0 -69
- package/model/userV1.ts +0 -69
- package/model/usersPerSourceSnapshotV1.ts +0 -104
- package/model/warehouse.ts +0 -75
- package/model/warehouse1.ts +0 -75
- package/model/warehouse2.ts +0 -75
- package/model/warehouseAdvancedSyncV1.ts +0 -50
- package/model/warehouseMetadata.ts +0 -85
- package/model/warehouseMetadataV1.ts +0 -85
- package/model/warehouseSelectiveSyncItemV1.ts +0 -68
- package/model/warehouseSyncOverrideV1.ts +0 -68
- package/model/warehouseV1.ts +0 -75
- package/model/workspace.ts +0 -59
- package/model/workspaceV1.ts +0 -59
- package/tests/__snapshots__/smoke.test.ts.snap +0 -889
- package/tests/smoke.test.ts +0 -267
- package/tsconfig.json +0 -20
|
@@ -1,1178 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Segment Public API
|
|
3
|
-
* The Segment Public API helps you manage your Segment Workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a Workspace. See the next sections for more information on how to use the Segment Public API.
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 32.0.1
|
|
6
|
-
* Contact: friends@segment.com
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import localVarRequest from 'request';
|
|
14
|
-
import http from 'http';
|
|
15
|
-
|
|
16
|
-
/* tslint:disable:no-unused-locals */
|
|
17
|
-
import { GetDailyPerSourceMTUUsage200Response } from '../model/getDailyPerSourceMTUUsage200Response';
|
|
18
|
-
import { GetDailyWorkspaceMTUUsage200Response } from '../model/getDailyWorkspaceMTUUsage200Response';
|
|
19
|
-
import { PaginationInput } from '../model/paginationInput';
|
|
20
|
-
import { RequestErrorEnvelope } from '../model/requestErrorEnvelope';
|
|
21
|
-
|
|
22
|
-
import {
|
|
23
|
-
ObjectSerializer,
|
|
24
|
-
Authentication,
|
|
25
|
-
VoidAuth,
|
|
26
|
-
Interceptor,
|
|
27
|
-
} from '../model/models';
|
|
28
|
-
import {
|
|
29
|
-
HttpBasicAuth,
|
|
30
|
-
HttpBearerAuth,
|
|
31
|
-
ApiKeyAuth,
|
|
32
|
-
OAuth,
|
|
33
|
-
} from '../model/models';
|
|
34
|
-
|
|
35
|
-
import { HttpError, RequestFile } from './apis';
|
|
36
|
-
|
|
37
|
-
let defaultBasePath = 'https://api.segmentapis.com';
|
|
38
|
-
|
|
39
|
-
// ===============================================
|
|
40
|
-
// This file is autogenerated - Please do not edit
|
|
41
|
-
// ===============================================
|
|
42
|
-
|
|
43
|
-
export enum MonthlyTrackedUsersApiApiKeys {}
|
|
44
|
-
|
|
45
|
-
export class MonthlyTrackedUsersApi {
|
|
46
|
-
protected _basePath = defaultBasePath;
|
|
47
|
-
protected _defaultHeaders: any = {};
|
|
48
|
-
protected _useQuerystring: boolean = false;
|
|
49
|
-
|
|
50
|
-
protected authentications = {
|
|
51
|
-
default: <Authentication>new VoidAuth(),
|
|
52
|
-
token: new HttpBearerAuth(),
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
protected interceptors: Interceptor[] = [];
|
|
56
|
-
|
|
57
|
-
constructor(basePath?: string);
|
|
58
|
-
constructor(
|
|
59
|
-
basePathOrUsername: string,
|
|
60
|
-
password?: string,
|
|
61
|
-
basePath?: string
|
|
62
|
-
) {
|
|
63
|
-
if (password) {
|
|
64
|
-
if (basePath) {
|
|
65
|
-
this.basePath = basePath;
|
|
66
|
-
}
|
|
67
|
-
} else {
|
|
68
|
-
if (basePathOrUsername) {
|
|
69
|
-
this.basePath = basePathOrUsername;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
set useQuerystring(value: boolean) {
|
|
75
|
-
this._useQuerystring = value;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
set basePath(basePath: string) {
|
|
79
|
-
this._basePath = basePath;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
set defaultHeaders(defaultHeaders: any) {
|
|
83
|
-
this._defaultHeaders = defaultHeaders;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
get defaultHeaders() {
|
|
87
|
-
return this._defaultHeaders;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
get basePath() {
|
|
91
|
-
return this._basePath;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
public setDefaultAuthentication(auth: Authentication) {
|
|
95
|
-
this.authentications.default = auth;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
public setApiKey(key: MonthlyTrackedUsersApiApiKeys, value: string) {
|
|
99
|
-
(this.authentications as any)[
|
|
100
|
-
MonthlyTrackedUsersApiApiKeys[key]
|
|
101
|
-
].apiKey = value;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
set accessToken(accessToken: string | (() => string)) {
|
|
105
|
-
this.authentications.token.accessToken = accessToken;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
public addInterceptor(interceptor: Interceptor) {
|
|
109
|
-
this.interceptors.push(interceptor);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Provides daily cumulative per-source MTU counts for a usage period.
|
|
114
|
-
* @summary Get Daily Per Source MTU Usage
|
|
115
|
-
* @param period The start of the usage month, in the ISO-8601 format. This parameter exists in alpha.
|
|
116
|
-
* @param pagination Pagination input for per Source MTU counts. This parameter exists in alpha.
|
|
117
|
-
*/
|
|
118
|
-
public async getDailyPerSourceMTUUsageAlpha(
|
|
119
|
-
period: string,
|
|
120
|
-
pagination: PaginationInput,
|
|
121
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
122
|
-
): Promise<{
|
|
123
|
-
response: http.IncomingMessage;
|
|
124
|
-
body: GetDailyPerSourceMTUUsage200Response;
|
|
125
|
-
}> {
|
|
126
|
-
const localVarPath = this.basePath + '/usage/mtu/sources/daily';
|
|
127
|
-
let localVarQueryParameters: any = {};
|
|
128
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
129
|
-
{},
|
|
130
|
-
this._defaultHeaders
|
|
131
|
-
);
|
|
132
|
-
const produces = [
|
|
133
|
-
'application/vnd.segment.v1alpha+json',
|
|
134
|
-
'application/json',
|
|
135
|
-
];
|
|
136
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
137
|
-
localVarHeaderParams.Accept = produces[0];
|
|
138
|
-
} else {
|
|
139
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
140
|
-
}
|
|
141
|
-
let localVarFormParams: any = {};
|
|
142
|
-
|
|
143
|
-
// verify required parameter 'period' is not null or undefined
|
|
144
|
-
if (period === null || period === undefined) {
|
|
145
|
-
throw new Error(
|
|
146
|
-
'Required parameter period was null or undefined when calling getDailyPerSourceMTUUsageAlpha.'
|
|
147
|
-
);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
151
|
-
if (pagination === null || pagination === undefined) {
|
|
152
|
-
throw new Error(
|
|
153
|
-
'Required parameter pagination was null or undefined when calling getDailyPerSourceMTUUsageAlpha.'
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (period !== undefined) {
|
|
158
|
-
localVarQueryParameters['period'] = ObjectSerializer.serialize(
|
|
159
|
-
period,
|
|
160
|
-
'string'
|
|
161
|
-
);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
if (pagination !== undefined) {
|
|
165
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
166
|
-
pagination,
|
|
167
|
-
'PaginationInput'
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
172
|
-
|
|
173
|
-
let localVarUseFormData = false;
|
|
174
|
-
|
|
175
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
176
|
-
method: 'GET',
|
|
177
|
-
qs: localVarQueryParameters,
|
|
178
|
-
headers: localVarHeaderParams,
|
|
179
|
-
uri: localVarPath,
|
|
180
|
-
useQuerystring: this._useQuerystring,
|
|
181
|
-
json: true,
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
let authenticationPromise = Promise.resolve();
|
|
185
|
-
if (this.authentications.token.accessToken) {
|
|
186
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
187
|
-
this.authentications.token.applyToRequest(
|
|
188
|
-
localVarRequestOptions
|
|
189
|
-
)
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
193
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
194
|
-
);
|
|
195
|
-
|
|
196
|
-
let interceptorPromise = authenticationPromise;
|
|
197
|
-
for (const interceptor of this.interceptors) {
|
|
198
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
199
|
-
interceptor(localVarRequestOptions)
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
return interceptorPromise.then(() => {
|
|
204
|
-
if (Object.keys(localVarFormParams).length) {
|
|
205
|
-
if (localVarUseFormData) {
|
|
206
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
207
|
-
} else {
|
|
208
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
return new Promise<{
|
|
212
|
-
response: http.IncomingMessage;
|
|
213
|
-
body: GetDailyPerSourceMTUUsage200Response;
|
|
214
|
-
}>((resolve, reject) => {
|
|
215
|
-
localVarRequest(
|
|
216
|
-
localVarRequestOptions,
|
|
217
|
-
(error, response, body) => {
|
|
218
|
-
if (error) {
|
|
219
|
-
reject(error);
|
|
220
|
-
} else {
|
|
221
|
-
if (
|
|
222
|
-
response.statusCode &&
|
|
223
|
-
response.statusCode >= 200 &&
|
|
224
|
-
response.statusCode <= 299
|
|
225
|
-
) {
|
|
226
|
-
body = ObjectSerializer.deserialize(
|
|
227
|
-
body,
|
|
228
|
-
'GetDailyPerSourceMTUUsage200Response'
|
|
229
|
-
);
|
|
230
|
-
resolve({ response: response, body: body });
|
|
231
|
-
} else {
|
|
232
|
-
reject(
|
|
233
|
-
new HttpError(
|
|
234
|
-
response,
|
|
235
|
-
body,
|
|
236
|
-
response.statusCode
|
|
237
|
-
)
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
);
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Provides daily cumulative per-source MTU counts for a usage period.
|
|
248
|
-
* @summary Get Daily Per Source MTU Usage
|
|
249
|
-
* @param period The start of the usage month, in the ISO-8601 format. This parameter exists in alpha.
|
|
250
|
-
* @param pagination Pagination input for per Source MTU counts. This parameter exists in alpha.
|
|
251
|
-
*/
|
|
252
|
-
public async getDailyPerSourceMTUUsageBeta(
|
|
253
|
-
period: string,
|
|
254
|
-
pagination: PaginationInput,
|
|
255
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
256
|
-
): Promise<{
|
|
257
|
-
response: http.IncomingMessage;
|
|
258
|
-
body: GetDailyPerSourceMTUUsage200Response;
|
|
259
|
-
}> {
|
|
260
|
-
const localVarPath = this.basePath + '/usage/mtu/sources/daily';
|
|
261
|
-
let localVarQueryParameters: any = {};
|
|
262
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
263
|
-
{},
|
|
264
|
-
this._defaultHeaders
|
|
265
|
-
);
|
|
266
|
-
const produces = [
|
|
267
|
-
'application/vnd.segment.v1beta+json',
|
|
268
|
-
'application/json',
|
|
269
|
-
];
|
|
270
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
271
|
-
localVarHeaderParams.Accept = produces[0];
|
|
272
|
-
} else {
|
|
273
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
274
|
-
}
|
|
275
|
-
let localVarFormParams: any = {};
|
|
276
|
-
|
|
277
|
-
// verify required parameter 'period' is not null or undefined
|
|
278
|
-
if (period === null || period === undefined) {
|
|
279
|
-
throw new Error(
|
|
280
|
-
'Required parameter period was null or undefined when calling getDailyPerSourceMTUUsageBeta.'
|
|
281
|
-
);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
285
|
-
if (pagination === null || pagination === undefined) {
|
|
286
|
-
throw new Error(
|
|
287
|
-
'Required parameter pagination was null or undefined when calling getDailyPerSourceMTUUsageBeta.'
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
if (period !== undefined) {
|
|
292
|
-
localVarQueryParameters['period'] = ObjectSerializer.serialize(
|
|
293
|
-
period,
|
|
294
|
-
'string'
|
|
295
|
-
);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
if (pagination !== undefined) {
|
|
299
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
300
|
-
pagination,
|
|
301
|
-
'PaginationInput'
|
|
302
|
-
);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
306
|
-
|
|
307
|
-
let localVarUseFormData = false;
|
|
308
|
-
|
|
309
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
310
|
-
method: 'GET',
|
|
311
|
-
qs: localVarQueryParameters,
|
|
312
|
-
headers: localVarHeaderParams,
|
|
313
|
-
uri: localVarPath,
|
|
314
|
-
useQuerystring: this._useQuerystring,
|
|
315
|
-
json: true,
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
let authenticationPromise = Promise.resolve();
|
|
319
|
-
if (this.authentications.token.accessToken) {
|
|
320
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
321
|
-
this.authentications.token.applyToRequest(
|
|
322
|
-
localVarRequestOptions
|
|
323
|
-
)
|
|
324
|
-
);
|
|
325
|
-
}
|
|
326
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
327
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
328
|
-
);
|
|
329
|
-
|
|
330
|
-
let interceptorPromise = authenticationPromise;
|
|
331
|
-
for (const interceptor of this.interceptors) {
|
|
332
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
333
|
-
interceptor(localVarRequestOptions)
|
|
334
|
-
);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
return interceptorPromise.then(() => {
|
|
338
|
-
if (Object.keys(localVarFormParams).length) {
|
|
339
|
-
if (localVarUseFormData) {
|
|
340
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
341
|
-
} else {
|
|
342
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
return new Promise<{
|
|
346
|
-
response: http.IncomingMessage;
|
|
347
|
-
body: GetDailyPerSourceMTUUsage200Response;
|
|
348
|
-
}>((resolve, reject) => {
|
|
349
|
-
localVarRequest(
|
|
350
|
-
localVarRequestOptions,
|
|
351
|
-
(error, response, body) => {
|
|
352
|
-
if (error) {
|
|
353
|
-
reject(error);
|
|
354
|
-
} else {
|
|
355
|
-
if (
|
|
356
|
-
response.statusCode &&
|
|
357
|
-
response.statusCode >= 200 &&
|
|
358
|
-
response.statusCode <= 299
|
|
359
|
-
) {
|
|
360
|
-
body = ObjectSerializer.deserialize(
|
|
361
|
-
body,
|
|
362
|
-
'GetDailyPerSourceMTUUsage200Response'
|
|
363
|
-
);
|
|
364
|
-
resolve({ response: response, body: body });
|
|
365
|
-
} else {
|
|
366
|
-
reject(
|
|
367
|
-
new HttpError(
|
|
368
|
-
response,
|
|
369
|
-
body,
|
|
370
|
-
response.statusCode
|
|
371
|
-
)
|
|
372
|
-
);
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
);
|
|
377
|
-
});
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* Provides daily cumulative per-source MTU counts for a usage period.
|
|
382
|
-
* @summary Get Daily Per Source MTU Usage
|
|
383
|
-
* @param period The start of the usage month, in the ISO-8601 format. This parameter exists in alpha.
|
|
384
|
-
* @param pagination Pagination input for per Source MTU counts. This parameter exists in alpha.
|
|
385
|
-
*/
|
|
386
|
-
public async getDailyPerSourceMTUUsageCurrent(
|
|
387
|
-
period: string,
|
|
388
|
-
pagination: PaginationInput,
|
|
389
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
390
|
-
): Promise<{
|
|
391
|
-
response: http.IncomingMessage;
|
|
392
|
-
body: GetDailyPerSourceMTUUsage200Response;
|
|
393
|
-
}> {
|
|
394
|
-
const localVarPath = this.basePath + '/usage/mtu/sources/daily';
|
|
395
|
-
let localVarQueryParameters: any = {};
|
|
396
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
397
|
-
{},
|
|
398
|
-
this._defaultHeaders
|
|
399
|
-
);
|
|
400
|
-
const produces = ['application/json'];
|
|
401
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
402
|
-
localVarHeaderParams.Accept = produces[0];
|
|
403
|
-
} else {
|
|
404
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
405
|
-
}
|
|
406
|
-
let localVarFormParams: any = {};
|
|
407
|
-
|
|
408
|
-
// verify required parameter 'period' is not null or undefined
|
|
409
|
-
if (period === null || period === undefined) {
|
|
410
|
-
throw new Error(
|
|
411
|
-
'Required parameter period was null or undefined when calling getDailyPerSourceMTUUsageCurrent.'
|
|
412
|
-
);
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
416
|
-
if (pagination === null || pagination === undefined) {
|
|
417
|
-
throw new Error(
|
|
418
|
-
'Required parameter pagination was null or undefined when calling getDailyPerSourceMTUUsageCurrent.'
|
|
419
|
-
);
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
if (period !== undefined) {
|
|
423
|
-
localVarQueryParameters['period'] = ObjectSerializer.serialize(
|
|
424
|
-
period,
|
|
425
|
-
'string'
|
|
426
|
-
);
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
if (pagination !== undefined) {
|
|
430
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
431
|
-
pagination,
|
|
432
|
-
'PaginationInput'
|
|
433
|
-
);
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
437
|
-
|
|
438
|
-
let localVarUseFormData = false;
|
|
439
|
-
|
|
440
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
441
|
-
method: 'GET',
|
|
442
|
-
qs: localVarQueryParameters,
|
|
443
|
-
headers: localVarHeaderParams,
|
|
444
|
-
uri: localVarPath,
|
|
445
|
-
useQuerystring: this._useQuerystring,
|
|
446
|
-
json: true,
|
|
447
|
-
};
|
|
448
|
-
|
|
449
|
-
let authenticationPromise = Promise.resolve();
|
|
450
|
-
if (this.authentications.token.accessToken) {
|
|
451
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
452
|
-
this.authentications.token.applyToRequest(
|
|
453
|
-
localVarRequestOptions
|
|
454
|
-
)
|
|
455
|
-
);
|
|
456
|
-
}
|
|
457
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
458
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
459
|
-
);
|
|
460
|
-
|
|
461
|
-
let interceptorPromise = authenticationPromise;
|
|
462
|
-
for (const interceptor of this.interceptors) {
|
|
463
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
464
|
-
interceptor(localVarRequestOptions)
|
|
465
|
-
);
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
return interceptorPromise.then(() => {
|
|
469
|
-
if (Object.keys(localVarFormParams).length) {
|
|
470
|
-
if (localVarUseFormData) {
|
|
471
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
472
|
-
} else {
|
|
473
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
return new Promise<{
|
|
477
|
-
response: http.IncomingMessage;
|
|
478
|
-
body: GetDailyPerSourceMTUUsage200Response;
|
|
479
|
-
}>((resolve, reject) => {
|
|
480
|
-
localVarRequest(
|
|
481
|
-
localVarRequestOptions,
|
|
482
|
-
(error, response, body) => {
|
|
483
|
-
if (error) {
|
|
484
|
-
reject(error);
|
|
485
|
-
} else {
|
|
486
|
-
if (
|
|
487
|
-
response.statusCode &&
|
|
488
|
-
response.statusCode >= 200 &&
|
|
489
|
-
response.statusCode <= 299
|
|
490
|
-
) {
|
|
491
|
-
body = ObjectSerializer.deserialize(
|
|
492
|
-
body,
|
|
493
|
-
'GetDailyPerSourceMTUUsage200Response'
|
|
494
|
-
);
|
|
495
|
-
resolve({ response: response, body: body });
|
|
496
|
-
} else {
|
|
497
|
-
reject(
|
|
498
|
-
new HttpError(
|
|
499
|
-
response,
|
|
500
|
-
body,
|
|
501
|
-
response.statusCode
|
|
502
|
-
)
|
|
503
|
-
);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
);
|
|
508
|
-
});
|
|
509
|
-
});
|
|
510
|
-
}
|
|
511
|
-
/**
|
|
512
|
-
* Provides daily cumulative per-source MTU counts for a usage period.
|
|
513
|
-
* @summary Get Daily Per Source MTU Usage
|
|
514
|
-
* @param period The start of the usage month, in the ISO-8601 format. This parameter exists in alpha.
|
|
515
|
-
* @param pagination Pagination input for per Source MTU counts. This parameter exists in alpha.
|
|
516
|
-
*/
|
|
517
|
-
public async getDailyPerSourceMTUUsageV1(
|
|
518
|
-
period: string,
|
|
519
|
-
pagination: PaginationInput,
|
|
520
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
521
|
-
): Promise<{
|
|
522
|
-
response: http.IncomingMessage;
|
|
523
|
-
body: GetDailyPerSourceMTUUsage200Response;
|
|
524
|
-
}> {
|
|
525
|
-
const localVarPath = this.basePath + '/usage/mtu/sources/daily';
|
|
526
|
-
let localVarQueryParameters: any = {};
|
|
527
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
528
|
-
{},
|
|
529
|
-
this._defaultHeaders
|
|
530
|
-
);
|
|
531
|
-
const produces = [
|
|
532
|
-
'application/vnd.segment.v1+json',
|
|
533
|
-
'application/json',
|
|
534
|
-
];
|
|
535
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
536
|
-
localVarHeaderParams.Accept = produces[0];
|
|
537
|
-
} else {
|
|
538
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
539
|
-
}
|
|
540
|
-
let localVarFormParams: any = {};
|
|
541
|
-
|
|
542
|
-
// verify required parameter 'period' is not null or undefined
|
|
543
|
-
if (period === null || period === undefined) {
|
|
544
|
-
throw new Error(
|
|
545
|
-
'Required parameter period was null or undefined when calling getDailyPerSourceMTUUsageV1.'
|
|
546
|
-
);
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
550
|
-
if (pagination === null || pagination === undefined) {
|
|
551
|
-
throw new Error(
|
|
552
|
-
'Required parameter pagination was null or undefined when calling getDailyPerSourceMTUUsageV1.'
|
|
553
|
-
);
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
if (period !== undefined) {
|
|
557
|
-
localVarQueryParameters['period'] = ObjectSerializer.serialize(
|
|
558
|
-
period,
|
|
559
|
-
'string'
|
|
560
|
-
);
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
if (pagination !== undefined) {
|
|
564
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
565
|
-
pagination,
|
|
566
|
-
'PaginationInput'
|
|
567
|
-
);
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
571
|
-
|
|
572
|
-
let localVarUseFormData = false;
|
|
573
|
-
|
|
574
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
575
|
-
method: 'GET',
|
|
576
|
-
qs: localVarQueryParameters,
|
|
577
|
-
headers: localVarHeaderParams,
|
|
578
|
-
uri: localVarPath,
|
|
579
|
-
useQuerystring: this._useQuerystring,
|
|
580
|
-
json: true,
|
|
581
|
-
};
|
|
582
|
-
|
|
583
|
-
let authenticationPromise = Promise.resolve();
|
|
584
|
-
if (this.authentications.token.accessToken) {
|
|
585
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
586
|
-
this.authentications.token.applyToRequest(
|
|
587
|
-
localVarRequestOptions
|
|
588
|
-
)
|
|
589
|
-
);
|
|
590
|
-
}
|
|
591
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
592
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
593
|
-
);
|
|
594
|
-
|
|
595
|
-
let interceptorPromise = authenticationPromise;
|
|
596
|
-
for (const interceptor of this.interceptors) {
|
|
597
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
598
|
-
interceptor(localVarRequestOptions)
|
|
599
|
-
);
|
|
600
|
-
}
|
|
601
|
-
|
|
602
|
-
return interceptorPromise.then(() => {
|
|
603
|
-
if (Object.keys(localVarFormParams).length) {
|
|
604
|
-
if (localVarUseFormData) {
|
|
605
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
606
|
-
} else {
|
|
607
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
return new Promise<{
|
|
611
|
-
response: http.IncomingMessage;
|
|
612
|
-
body: GetDailyPerSourceMTUUsage200Response;
|
|
613
|
-
}>((resolve, reject) => {
|
|
614
|
-
localVarRequest(
|
|
615
|
-
localVarRequestOptions,
|
|
616
|
-
(error, response, body) => {
|
|
617
|
-
if (error) {
|
|
618
|
-
reject(error);
|
|
619
|
-
} else {
|
|
620
|
-
if (
|
|
621
|
-
response.statusCode &&
|
|
622
|
-
response.statusCode >= 200 &&
|
|
623
|
-
response.statusCode <= 299
|
|
624
|
-
) {
|
|
625
|
-
body = ObjectSerializer.deserialize(
|
|
626
|
-
body,
|
|
627
|
-
'GetDailyPerSourceMTUUsage200Response'
|
|
628
|
-
);
|
|
629
|
-
resolve({ response: response, body: body });
|
|
630
|
-
} else {
|
|
631
|
-
reject(
|
|
632
|
-
new HttpError(
|
|
633
|
-
response,
|
|
634
|
-
body,
|
|
635
|
-
response.statusCode
|
|
636
|
-
)
|
|
637
|
-
);
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
);
|
|
642
|
-
});
|
|
643
|
-
});
|
|
644
|
-
}
|
|
645
|
-
/**
|
|
646
|
-
* Provides daily cumulative MTU counts for a usage period.
|
|
647
|
-
* @summary Get Daily Workspace MTU Usage
|
|
648
|
-
* @param period The start of the usage month, in the ISO-8601 format. This parameter exists in alpha.
|
|
649
|
-
* @param pagination Pagination input for Workspace MTU counts. This parameter exists in alpha.
|
|
650
|
-
*/
|
|
651
|
-
public async getDailyWorkspaceMTUUsageAlpha(
|
|
652
|
-
period: string,
|
|
653
|
-
pagination: PaginationInput,
|
|
654
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
655
|
-
): Promise<{
|
|
656
|
-
response: http.IncomingMessage;
|
|
657
|
-
body: GetDailyWorkspaceMTUUsage200Response;
|
|
658
|
-
}> {
|
|
659
|
-
const localVarPath = this.basePath + '/usage/mtu/daily';
|
|
660
|
-
let localVarQueryParameters: any = {};
|
|
661
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
662
|
-
{},
|
|
663
|
-
this._defaultHeaders
|
|
664
|
-
);
|
|
665
|
-
const produces = [
|
|
666
|
-
'application/vnd.segment.v1alpha+json',
|
|
667
|
-
'application/json',
|
|
668
|
-
];
|
|
669
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
670
|
-
localVarHeaderParams.Accept = produces[0];
|
|
671
|
-
} else {
|
|
672
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
673
|
-
}
|
|
674
|
-
let localVarFormParams: any = {};
|
|
675
|
-
|
|
676
|
-
// verify required parameter 'period' is not null or undefined
|
|
677
|
-
if (period === null || period === undefined) {
|
|
678
|
-
throw new Error(
|
|
679
|
-
'Required parameter period was null or undefined when calling getDailyWorkspaceMTUUsageAlpha.'
|
|
680
|
-
);
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
684
|
-
if (pagination === null || pagination === undefined) {
|
|
685
|
-
throw new Error(
|
|
686
|
-
'Required parameter pagination was null or undefined when calling getDailyWorkspaceMTUUsageAlpha.'
|
|
687
|
-
);
|
|
688
|
-
}
|
|
689
|
-
|
|
690
|
-
if (period !== undefined) {
|
|
691
|
-
localVarQueryParameters['period'] = ObjectSerializer.serialize(
|
|
692
|
-
period,
|
|
693
|
-
'string'
|
|
694
|
-
);
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
if (pagination !== undefined) {
|
|
698
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
699
|
-
pagination,
|
|
700
|
-
'PaginationInput'
|
|
701
|
-
);
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
705
|
-
|
|
706
|
-
let localVarUseFormData = false;
|
|
707
|
-
|
|
708
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
709
|
-
method: 'GET',
|
|
710
|
-
qs: localVarQueryParameters,
|
|
711
|
-
headers: localVarHeaderParams,
|
|
712
|
-
uri: localVarPath,
|
|
713
|
-
useQuerystring: this._useQuerystring,
|
|
714
|
-
json: true,
|
|
715
|
-
};
|
|
716
|
-
|
|
717
|
-
let authenticationPromise = Promise.resolve();
|
|
718
|
-
if (this.authentications.token.accessToken) {
|
|
719
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
720
|
-
this.authentications.token.applyToRequest(
|
|
721
|
-
localVarRequestOptions
|
|
722
|
-
)
|
|
723
|
-
);
|
|
724
|
-
}
|
|
725
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
726
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
727
|
-
);
|
|
728
|
-
|
|
729
|
-
let interceptorPromise = authenticationPromise;
|
|
730
|
-
for (const interceptor of this.interceptors) {
|
|
731
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
732
|
-
interceptor(localVarRequestOptions)
|
|
733
|
-
);
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
return interceptorPromise.then(() => {
|
|
737
|
-
if (Object.keys(localVarFormParams).length) {
|
|
738
|
-
if (localVarUseFormData) {
|
|
739
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
740
|
-
} else {
|
|
741
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
return new Promise<{
|
|
745
|
-
response: http.IncomingMessage;
|
|
746
|
-
body: GetDailyWorkspaceMTUUsage200Response;
|
|
747
|
-
}>((resolve, reject) => {
|
|
748
|
-
localVarRequest(
|
|
749
|
-
localVarRequestOptions,
|
|
750
|
-
(error, response, body) => {
|
|
751
|
-
if (error) {
|
|
752
|
-
reject(error);
|
|
753
|
-
} else {
|
|
754
|
-
if (
|
|
755
|
-
response.statusCode &&
|
|
756
|
-
response.statusCode >= 200 &&
|
|
757
|
-
response.statusCode <= 299
|
|
758
|
-
) {
|
|
759
|
-
body = ObjectSerializer.deserialize(
|
|
760
|
-
body,
|
|
761
|
-
'GetDailyWorkspaceMTUUsage200Response'
|
|
762
|
-
);
|
|
763
|
-
resolve({ response: response, body: body });
|
|
764
|
-
} else {
|
|
765
|
-
reject(
|
|
766
|
-
new HttpError(
|
|
767
|
-
response,
|
|
768
|
-
body,
|
|
769
|
-
response.statusCode
|
|
770
|
-
)
|
|
771
|
-
);
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
);
|
|
776
|
-
});
|
|
777
|
-
});
|
|
778
|
-
}
|
|
779
|
-
/**
|
|
780
|
-
* Provides daily cumulative MTU counts for a usage period.
|
|
781
|
-
* @summary Get Daily Workspace MTU Usage
|
|
782
|
-
* @param period The start of the usage month, in the ISO-8601 format. This parameter exists in alpha.
|
|
783
|
-
* @param pagination Pagination input for Workspace MTU counts. This parameter exists in alpha.
|
|
784
|
-
*/
|
|
785
|
-
public async getDailyWorkspaceMTUUsageBeta(
|
|
786
|
-
period: string,
|
|
787
|
-
pagination: PaginationInput,
|
|
788
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
789
|
-
): Promise<{
|
|
790
|
-
response: http.IncomingMessage;
|
|
791
|
-
body: GetDailyWorkspaceMTUUsage200Response;
|
|
792
|
-
}> {
|
|
793
|
-
const localVarPath = this.basePath + '/usage/mtu/daily';
|
|
794
|
-
let localVarQueryParameters: any = {};
|
|
795
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
796
|
-
{},
|
|
797
|
-
this._defaultHeaders
|
|
798
|
-
);
|
|
799
|
-
const produces = [
|
|
800
|
-
'application/vnd.segment.v1beta+json',
|
|
801
|
-
'application/json',
|
|
802
|
-
];
|
|
803
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
804
|
-
localVarHeaderParams.Accept = produces[0];
|
|
805
|
-
} else {
|
|
806
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
807
|
-
}
|
|
808
|
-
let localVarFormParams: any = {};
|
|
809
|
-
|
|
810
|
-
// verify required parameter 'period' is not null or undefined
|
|
811
|
-
if (period === null || period === undefined) {
|
|
812
|
-
throw new Error(
|
|
813
|
-
'Required parameter period was null or undefined when calling getDailyWorkspaceMTUUsageBeta.'
|
|
814
|
-
);
|
|
815
|
-
}
|
|
816
|
-
|
|
817
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
818
|
-
if (pagination === null || pagination === undefined) {
|
|
819
|
-
throw new Error(
|
|
820
|
-
'Required parameter pagination was null or undefined when calling getDailyWorkspaceMTUUsageBeta.'
|
|
821
|
-
);
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
if (period !== undefined) {
|
|
825
|
-
localVarQueryParameters['period'] = ObjectSerializer.serialize(
|
|
826
|
-
period,
|
|
827
|
-
'string'
|
|
828
|
-
);
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
if (pagination !== undefined) {
|
|
832
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
833
|
-
pagination,
|
|
834
|
-
'PaginationInput'
|
|
835
|
-
);
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
839
|
-
|
|
840
|
-
let localVarUseFormData = false;
|
|
841
|
-
|
|
842
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
843
|
-
method: 'GET',
|
|
844
|
-
qs: localVarQueryParameters,
|
|
845
|
-
headers: localVarHeaderParams,
|
|
846
|
-
uri: localVarPath,
|
|
847
|
-
useQuerystring: this._useQuerystring,
|
|
848
|
-
json: true,
|
|
849
|
-
};
|
|
850
|
-
|
|
851
|
-
let authenticationPromise = Promise.resolve();
|
|
852
|
-
if (this.authentications.token.accessToken) {
|
|
853
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
854
|
-
this.authentications.token.applyToRequest(
|
|
855
|
-
localVarRequestOptions
|
|
856
|
-
)
|
|
857
|
-
);
|
|
858
|
-
}
|
|
859
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
860
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
861
|
-
);
|
|
862
|
-
|
|
863
|
-
let interceptorPromise = authenticationPromise;
|
|
864
|
-
for (const interceptor of this.interceptors) {
|
|
865
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
866
|
-
interceptor(localVarRequestOptions)
|
|
867
|
-
);
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
return interceptorPromise.then(() => {
|
|
871
|
-
if (Object.keys(localVarFormParams).length) {
|
|
872
|
-
if (localVarUseFormData) {
|
|
873
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
874
|
-
} else {
|
|
875
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
return new Promise<{
|
|
879
|
-
response: http.IncomingMessage;
|
|
880
|
-
body: GetDailyWorkspaceMTUUsage200Response;
|
|
881
|
-
}>((resolve, reject) => {
|
|
882
|
-
localVarRequest(
|
|
883
|
-
localVarRequestOptions,
|
|
884
|
-
(error, response, body) => {
|
|
885
|
-
if (error) {
|
|
886
|
-
reject(error);
|
|
887
|
-
} else {
|
|
888
|
-
if (
|
|
889
|
-
response.statusCode &&
|
|
890
|
-
response.statusCode >= 200 &&
|
|
891
|
-
response.statusCode <= 299
|
|
892
|
-
) {
|
|
893
|
-
body = ObjectSerializer.deserialize(
|
|
894
|
-
body,
|
|
895
|
-
'GetDailyWorkspaceMTUUsage200Response'
|
|
896
|
-
);
|
|
897
|
-
resolve({ response: response, body: body });
|
|
898
|
-
} else {
|
|
899
|
-
reject(
|
|
900
|
-
new HttpError(
|
|
901
|
-
response,
|
|
902
|
-
body,
|
|
903
|
-
response.statusCode
|
|
904
|
-
)
|
|
905
|
-
);
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
}
|
|
909
|
-
);
|
|
910
|
-
});
|
|
911
|
-
});
|
|
912
|
-
}
|
|
913
|
-
/**
|
|
914
|
-
* Provides daily cumulative MTU counts for a usage period.
|
|
915
|
-
* @summary Get Daily Workspace MTU Usage
|
|
916
|
-
* @param period The start of the usage month, in the ISO-8601 format. This parameter exists in alpha.
|
|
917
|
-
* @param pagination Pagination input for Workspace MTU counts. This parameter exists in alpha.
|
|
918
|
-
*/
|
|
919
|
-
public async getDailyWorkspaceMTUUsageCurrent(
|
|
920
|
-
period: string,
|
|
921
|
-
pagination: PaginationInput,
|
|
922
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
923
|
-
): Promise<{
|
|
924
|
-
response: http.IncomingMessage;
|
|
925
|
-
body: GetDailyWorkspaceMTUUsage200Response;
|
|
926
|
-
}> {
|
|
927
|
-
const localVarPath = this.basePath + '/usage/mtu/daily';
|
|
928
|
-
let localVarQueryParameters: any = {};
|
|
929
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
930
|
-
{},
|
|
931
|
-
this._defaultHeaders
|
|
932
|
-
);
|
|
933
|
-
const produces = ['application/json'];
|
|
934
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
935
|
-
localVarHeaderParams.Accept = produces[0];
|
|
936
|
-
} else {
|
|
937
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
938
|
-
}
|
|
939
|
-
let localVarFormParams: any = {};
|
|
940
|
-
|
|
941
|
-
// verify required parameter 'period' is not null or undefined
|
|
942
|
-
if (period === null || period === undefined) {
|
|
943
|
-
throw new Error(
|
|
944
|
-
'Required parameter period was null or undefined when calling getDailyWorkspaceMTUUsageCurrent.'
|
|
945
|
-
);
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
949
|
-
if (pagination === null || pagination === undefined) {
|
|
950
|
-
throw new Error(
|
|
951
|
-
'Required parameter pagination was null or undefined when calling getDailyWorkspaceMTUUsageCurrent.'
|
|
952
|
-
);
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
if (period !== undefined) {
|
|
956
|
-
localVarQueryParameters['period'] = ObjectSerializer.serialize(
|
|
957
|
-
period,
|
|
958
|
-
'string'
|
|
959
|
-
);
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
if (pagination !== undefined) {
|
|
963
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
964
|
-
pagination,
|
|
965
|
-
'PaginationInput'
|
|
966
|
-
);
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
970
|
-
|
|
971
|
-
let localVarUseFormData = false;
|
|
972
|
-
|
|
973
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
974
|
-
method: 'GET',
|
|
975
|
-
qs: localVarQueryParameters,
|
|
976
|
-
headers: localVarHeaderParams,
|
|
977
|
-
uri: localVarPath,
|
|
978
|
-
useQuerystring: this._useQuerystring,
|
|
979
|
-
json: true,
|
|
980
|
-
};
|
|
981
|
-
|
|
982
|
-
let authenticationPromise = Promise.resolve();
|
|
983
|
-
if (this.authentications.token.accessToken) {
|
|
984
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
985
|
-
this.authentications.token.applyToRequest(
|
|
986
|
-
localVarRequestOptions
|
|
987
|
-
)
|
|
988
|
-
);
|
|
989
|
-
}
|
|
990
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
991
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
992
|
-
);
|
|
993
|
-
|
|
994
|
-
let interceptorPromise = authenticationPromise;
|
|
995
|
-
for (const interceptor of this.interceptors) {
|
|
996
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
997
|
-
interceptor(localVarRequestOptions)
|
|
998
|
-
);
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
return interceptorPromise.then(() => {
|
|
1002
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1003
|
-
if (localVarUseFormData) {
|
|
1004
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1005
|
-
} else {
|
|
1006
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
return new Promise<{
|
|
1010
|
-
response: http.IncomingMessage;
|
|
1011
|
-
body: GetDailyWorkspaceMTUUsage200Response;
|
|
1012
|
-
}>((resolve, reject) => {
|
|
1013
|
-
localVarRequest(
|
|
1014
|
-
localVarRequestOptions,
|
|
1015
|
-
(error, response, body) => {
|
|
1016
|
-
if (error) {
|
|
1017
|
-
reject(error);
|
|
1018
|
-
} else {
|
|
1019
|
-
if (
|
|
1020
|
-
response.statusCode &&
|
|
1021
|
-
response.statusCode >= 200 &&
|
|
1022
|
-
response.statusCode <= 299
|
|
1023
|
-
) {
|
|
1024
|
-
body = ObjectSerializer.deserialize(
|
|
1025
|
-
body,
|
|
1026
|
-
'GetDailyWorkspaceMTUUsage200Response'
|
|
1027
|
-
);
|
|
1028
|
-
resolve({ response: response, body: body });
|
|
1029
|
-
} else {
|
|
1030
|
-
reject(
|
|
1031
|
-
new HttpError(
|
|
1032
|
-
response,
|
|
1033
|
-
body,
|
|
1034
|
-
response.statusCode
|
|
1035
|
-
)
|
|
1036
|
-
);
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
);
|
|
1041
|
-
});
|
|
1042
|
-
});
|
|
1043
|
-
}
|
|
1044
|
-
/**
|
|
1045
|
-
* Provides daily cumulative MTU counts for a usage period.
|
|
1046
|
-
* @summary Get Daily Workspace MTU Usage
|
|
1047
|
-
* @param period The start of the usage month, in the ISO-8601 format. This parameter exists in alpha.
|
|
1048
|
-
* @param pagination Pagination input for Workspace MTU counts. This parameter exists in alpha.
|
|
1049
|
-
*/
|
|
1050
|
-
public async getDailyWorkspaceMTUUsageV1(
|
|
1051
|
-
period: string,
|
|
1052
|
-
pagination: PaginationInput,
|
|
1053
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1054
|
-
): Promise<{
|
|
1055
|
-
response: http.IncomingMessage;
|
|
1056
|
-
body: GetDailyWorkspaceMTUUsage200Response;
|
|
1057
|
-
}> {
|
|
1058
|
-
const localVarPath = this.basePath + '/usage/mtu/daily';
|
|
1059
|
-
let localVarQueryParameters: any = {};
|
|
1060
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1061
|
-
{},
|
|
1062
|
-
this._defaultHeaders
|
|
1063
|
-
);
|
|
1064
|
-
const produces = [
|
|
1065
|
-
'application/vnd.segment.v1+json',
|
|
1066
|
-
'application/json',
|
|
1067
|
-
];
|
|
1068
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1069
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1070
|
-
} else {
|
|
1071
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1072
|
-
}
|
|
1073
|
-
let localVarFormParams: any = {};
|
|
1074
|
-
|
|
1075
|
-
// verify required parameter 'period' is not null or undefined
|
|
1076
|
-
if (period === null || period === undefined) {
|
|
1077
|
-
throw new Error(
|
|
1078
|
-
'Required parameter period was null or undefined when calling getDailyWorkspaceMTUUsageV1.'
|
|
1079
|
-
);
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
1083
|
-
if (pagination === null || pagination === undefined) {
|
|
1084
|
-
throw new Error(
|
|
1085
|
-
'Required parameter pagination was null or undefined when calling getDailyWorkspaceMTUUsageV1.'
|
|
1086
|
-
);
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
if (period !== undefined) {
|
|
1090
|
-
localVarQueryParameters['period'] = ObjectSerializer.serialize(
|
|
1091
|
-
period,
|
|
1092
|
-
'string'
|
|
1093
|
-
);
|
|
1094
|
-
}
|
|
1095
|
-
|
|
1096
|
-
if (pagination !== undefined) {
|
|
1097
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
1098
|
-
pagination,
|
|
1099
|
-
'PaginationInput'
|
|
1100
|
-
);
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1104
|
-
|
|
1105
|
-
let localVarUseFormData = false;
|
|
1106
|
-
|
|
1107
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1108
|
-
method: 'GET',
|
|
1109
|
-
qs: localVarQueryParameters,
|
|
1110
|
-
headers: localVarHeaderParams,
|
|
1111
|
-
uri: localVarPath,
|
|
1112
|
-
useQuerystring: this._useQuerystring,
|
|
1113
|
-
json: true,
|
|
1114
|
-
};
|
|
1115
|
-
|
|
1116
|
-
let authenticationPromise = Promise.resolve();
|
|
1117
|
-
if (this.authentications.token.accessToken) {
|
|
1118
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1119
|
-
this.authentications.token.applyToRequest(
|
|
1120
|
-
localVarRequestOptions
|
|
1121
|
-
)
|
|
1122
|
-
);
|
|
1123
|
-
}
|
|
1124
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1125
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1126
|
-
);
|
|
1127
|
-
|
|
1128
|
-
let interceptorPromise = authenticationPromise;
|
|
1129
|
-
for (const interceptor of this.interceptors) {
|
|
1130
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1131
|
-
interceptor(localVarRequestOptions)
|
|
1132
|
-
);
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
return interceptorPromise.then(() => {
|
|
1136
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1137
|
-
if (localVarUseFormData) {
|
|
1138
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1139
|
-
} else {
|
|
1140
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
return new Promise<{
|
|
1144
|
-
response: http.IncomingMessage;
|
|
1145
|
-
body: GetDailyWorkspaceMTUUsage200Response;
|
|
1146
|
-
}>((resolve, reject) => {
|
|
1147
|
-
localVarRequest(
|
|
1148
|
-
localVarRequestOptions,
|
|
1149
|
-
(error, response, body) => {
|
|
1150
|
-
if (error) {
|
|
1151
|
-
reject(error);
|
|
1152
|
-
} else {
|
|
1153
|
-
if (
|
|
1154
|
-
response.statusCode &&
|
|
1155
|
-
response.statusCode >= 200 &&
|
|
1156
|
-
response.statusCode <= 299
|
|
1157
|
-
) {
|
|
1158
|
-
body = ObjectSerializer.deserialize(
|
|
1159
|
-
body,
|
|
1160
|
-
'GetDailyWorkspaceMTUUsage200Response'
|
|
1161
|
-
);
|
|
1162
|
-
resolve({ response: response, body: body });
|
|
1163
|
-
} else {
|
|
1164
|
-
reject(
|
|
1165
|
-
new HttpError(
|
|
1166
|
-
response,
|
|
1167
|
-
body,
|
|
1168
|
-
response.statusCode
|
|
1169
|
-
)
|
|
1170
|
-
);
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
);
|
|
1175
|
-
});
|
|
1176
|
-
});
|
|
1177
|
-
}
|
|
1178
|
-
}
|