Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
379 changes: 379 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions features/v2/product_catalog.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@endpoint(product-catalog) @endpoint(product-catalog-v2)
Feature: Product Catalog
Look up the Datadog SKUs that are generally available, together with the
public list prices, allotments, and tiered pricing that apply to them on a
given date.

Background:
Given a valid "apiKeyAuth" key in the system
And a valid "appKeyAuth" key in the system
And an instance of "ProductCatalog" API
And operation "ListProductCatalogSKUs" enabled
And new "ListProductCatalogSKUs" request

@generated @skip @team:DataDog/red-zone-product-catalog
Scenario: List SKUs returns "Bad Request - version is missing or invalid, or as_of_date is malformed or in the future" response
Given request contains "version" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request - version is missing or invalid, or as_of_date is malformed or in the future

@generated @skip @team:DataDog/red-zone-product-catalog
Scenario: List SKUs returns "Not Found - the requested catalog version is not supported" response
Given request contains "version" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found - the requested catalog version is not supported

@generated @skip @team:DataDog/red-zone-product-catalog
Scenario: List SKUs returns "OK" response
Given request contains "version" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK
6 changes: 6 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -6611,6 +6611,12 @@
"type": "safe"
}
},
"ListProductCatalogSKUs": {
"tag": "Product Catalog",
"undo": {
"type": "safe"
}
},
"GetPrunedTraceByID": {
"tag": "APM Trace",
"undo": {
Expand Down
1 change: 1 addition & 0 deletions packages/datadog-api-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ apiInstance
| Powerpack | @datadog/datadog-api-client-powerpack | [README.md](../../services/powerpack/README.md) |
| Processes | @datadog/datadog-api-client-processes | [README.md](../../services/processes/README.md) |
| Product Analytics | @datadog/datadog-api-client-product-analytics | [README.md](../../services/product-analytics/README.md) |
| Product Catalog | @datadog/datadog-api-client-product-catalog | [README.md](../../services/product-catalog/README.md) |
| Reference Tables | @datadog/datadog-api-client-reference-tables | [README.md](../../services/reference-tables/README.md) |
| Report Schedules | @datadog/datadog-api-client-report-schedules | [README.md](../../services/report-schedules/README.md) |
| Reporting And Sharing | @datadog/datadog-api-client-reporting-and-sharing | [README.md](../../services/reporting-and-sharing/README.md) |
Expand Down
11 changes: 11 additions & 0 deletions private/bdd_runner/src/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14668,6 +14668,17 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
},
operationResponseType: "ListConnectionsResponse",
},
"ProductCatalogApi.V2.ListProductCatalogSKUs": {
version: {
type: "ProductCatalogSKUsAPIVersion",
format: "",
},
asOfDate: {
type: "Date",
format: "date",
},
operationResponseType: "ProductCatalogSKUsResponse",
},
"APMTraceApi.V2.GetPrunedTraceByID": {
traceId: {
type: "string",
Expand Down
1 change: 1 addition & 0 deletions services/product_catalog/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
45 changes: 45 additions & 0 deletions services/product_catalog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# @datadog/datadog-api-client-product-catalog

## Description

Look up the Datadog SKUs that are generally available, together with the public list
prices, allotments, and tiered pricing that apply to them on a given date.

## Navigation

- [Installation](#installation)
- [Getting Started](#getting-started)

## Installation

```sh
# NPM
npm install @datadog/datadog-api-client-product-catalog
# Yarn
yarn add @datadog/datadog-api-client-product-catalog
```

## Getting Started
```ts
import { createConfiguration } from "@datadog/datadog-api-client";
import { ProductCatalogApiV2 } from "@datadog/datadog-api-client-product-catalog";
import { v2 } from "@datadog/datadog-api-client-product-catalog";

const configuration = createConfiguration();
// Enable unstable operations
const configurationOpts = {
unstableOperations: {
"ProductCatalogApi.v2.listProductCatalogSKUs": true
}
}

const configuration = createConfiguration(configurationOpts);
const apiInstance = new ProductCatalogApiV2(configuration);
const params = {/* parameters */};

apiInstance.listProductCatalogSKUs(params).then((data) => {
console.log("API called successfully. Returned data: " + JSON.stringify(data));
}).catch((error) => {
console.error("Error calling API: " + error);
});
```
43 changes: 43 additions & 0 deletions services/product_catalog/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "@datadog/datadog-api-client-product-catalog",
"description": "",
"author": "",
"keywords": [
"api",
"fetch",
"typescript"
],
"license": "Apache-2.0",
"licenses": [
{
"type": "Apache-2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}
],
"repository": {
"type": "git",
"url": "https://github.com/DataDog/datadog-api-client-typescript.git",
"directory": "services/product-catalog"
},
"files": [
"dist/**/*"
],
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"scripts": {
"prepack": "yarn workspace @datadog/datadog-api-client build && yarn build",
"build": "yarn generate-version-files && tsc",
"generate-version-files": "node -p \"'export const version = ' + JSON.stringify(require('./package.json').version)\" > src/version.ts"
},
"dependencies": {
"@datadog/datadog-api-client": "^2.0.0-beta.2"
},
"devDependencies": {
"typescript": "5.8.3"
},
"engines": {
"node": ">=18.0.0"
},
"version": "0.0.1",
"packageManager": "yarn@4.9.1"
}
3 changes: 3 additions & 0 deletions services/product_catalog/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * as v2 from "./v2";

export { ProductCatalogApi as ProductCatalogApiV2 } from "./v2/ProductCatalogApi";
Loading
Loading