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
106 changes: 106 additions & 0 deletions docs/changelog/0.0.1-alpha.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Interface Change Summary: 0.0.1-alpha.2

## New files
```diff
+ tax_customers.v3.ts
```
## Modified files
### `catalog/category_trees_catalog.v3.ts`

components.schemas.CategoryNode:
```diff
+ readonly url?: string;
```

### `customers.v3.ts`

components.schemas.MetaFieldCollectionResponse:
```diff
+ readonly meta?: components["schemas"]["CollectionMeta"];
```

components.responses:
```diff
- readonly MetafieldCollectionResponse: {
- headers: {
- readonly [name: string]: unknown;
- };
- content: {
- readonly "application/json": {
- readonly items?: {
- readonly id: number;
- readonly key: string;
- readonly value: string;
- readonly namespace: string;
- readonly permission_set: "app_only" | "read" | "write" | "read_and_sf_access" | "write_and_sf_access";
- readonly resource_type: "brand" | "product" | "variant" | "category" | "cart" | "channel" | "location" | "order" | "customer";
- readonly resource_id: number;
- readonly description: string;
- readonly date_created: string;
- readonly date_modified: string;
- readonly owner_client_id?: string;
- };
- };
- };
- };
```

operations.getCustomersMetafields.responses:
```diff
- readonly 200: components["responses"]["MetafieldCollectionResponse"];
+ readonly 200: {
```

operations.getCustomersMetafields.responses.200:
```diff
+ headers: {
+ readonly [name: string]: unknown;
+ content: {
+ readonly "application/json": {
+ readonly data?: readonly components["schemas"]["metafield_Full"][];
+ readonly meta?: components["schemas"]["metaCollection_Full"];
+ };
+ };
+ };
+ };
```

operations.getMetafieldsCustomerId.responses:
```diff
- readonly 200: components["responses"]["MetafieldCollectionResponse"];
+ readonly 200: {
```

operations.getMetafieldsCustomerId.responses.200:
```diff
+ headers: {
+ readonly [name: string]: unknown;
+ };
+ content: {
+ readonly "application/json": {
+ readonly data?: components["schemas"]["metafield_Full"];
+ readonly meta?: components["schemas"]["metaEmpty_Full"];
+ };
+ };
+ };
```

### `tax_properties.v3.ts`

components.schemas.Property:
```diff
+ readonly type?: "PRODUCT" | "CUSTOMER";
```

components.schemas.PropertyPOST:
```diff
+ readonly type: "PRODUCT" | "CUSTOMER";
```

### `tax_provider.ts`

components.schemas."request-quote".customer:
```diff
+ readonly tax_properties?: readonly components["schemas"]["request-item-tax-property"][];
```

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aligent/bigcommerce-api",
"version": "0.0.1-alpha.1",
"version": "0.0.1-alpha.2",
"type": "module",
"scripts": {
"test": "tsd",
Expand Down Expand Up @@ -55,7 +55,6 @@
"prettier": "^3.5.3",
"rimraf": "^6.0.1",
"simple-git": "^3.27.0",
"temp-dir": "^3.0.0",
"ts-morph": "^25.0.1",
"tsd": "^0.32.0",
"tshy": "^3.0.2",
Expand Down
1 change: 1 addition & 0 deletions src/internal/reference/files.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"subscriptions.sf.yml",
"tax.v3.yml",
"tax_classes.v2.yml",
"tax_customers.v3.yml",
"tax_properties.v3.yml",
"tax_provider.yml",
"tax_rates_zones.v3.yml",
Expand Down
6 changes: 4 additions & 2 deletions src/internal/reference/generate.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { mkdir, rename, rm, writeFile } from 'fs/promises';
import { basename, dirname, join } from 'node:path';
import openapiTS, { astToString } from 'openapi-typescript';
import tempDir from 'temp-dir';
import { Project } from 'ts-morph';
import { v4 as uuid } from 'uuid';
import packageJson from '../../../package.json' with { type: 'json' };
Expand Down Expand Up @@ -188,7 +187,10 @@ async function main() {
await replaceDir(tempOutputDir, outputDir);
} catch (error) {
console.error('Failed to generate TypeScript types:', error);
process.exit(1);
process.exitCode = 1;
} finally {
// Clean up the temporary build directory
await rm(tempOutputDir, { recursive: true, force: true });
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ export interface components {
readonly name?: string;
readonly is_visible?: boolean;
readonly children?: readonly components["schemas"]["CategoryNode"][];
readonly url?: string;
};
readonly MetaPaginationObject: {
readonly pagination?: {
Expand Down
28 changes: 28 additions & 0 deletions src/internal/reference/generated/channels.v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,13 @@ export interface paths {
/**
* Upsert a Siteʼs Checkout URL
* @description Creates or updates (upserts) a siteʼs checkout URL
*
* <Callout type="info">
* For the "urls" object, we no longer modify the `www` prefix of the primary URL. The API returns URLs exactly as the customer enters them, similar to the "url" field.
*
* * If the customer saves a URL with `www`, the API returns it with `www`.
* * If the customer saves a URL without `www`, the API returns it without `www`.
* </Callout>
*/
readonly put: operations["updateCheckoutUrl"];
/**
Expand Down Expand Up @@ -247,16 +254,37 @@ export interface paths {
*
* Returns site data for the specified channel.
*
* <Callout type="info">
* For the "urls" object, we no longer modify the `www` prefix of the primary URL. The API returns URLs exactly as the customer enters them, similar to the "url" field.
*
* * If the customer saves a URL with `www`, the API returns it with `www`.
* * If the customer saves a URL without `www`, the API returns it without `www`.
* </Callout>
*
*/
readonly get: operations["getChannelSite"];
/**
* Update a Channel Site
* @description Updates a site for provided channel.
*
* <Callout type="info">
* For the "urls" object, we no longer modify the `www` prefix of the primary URL. The API returns URLs exactly as the customer enters them, similar to the "url" field.
*
* * If the customer saves a URL with `www`, the API returns it with `www`.
* * If the customer saves a URL without `www`, the API returns it without `www`.
* </Callout>
*/
readonly put: operations["updateChannelSite"];
/**
* Create a Channel Site
* @description Alias of POST `/sites`. Creates a site for provided channel.
*
* <Callout type="info">
* For the "urls" object, we no longer modify the `www` prefix of the primary URL. The API returns URLs exactly as the customer enters them, similar to the "url" field.
*
* * If the customer saves a URL with `www`, the API returns it with `www`.
* * If the customer saves a URL without `www`, the API returns it without `www`.
* </Callout>
*/
readonly post: operations["createChannelSite"];
/**
Expand Down
110 changes: 25 additions & 85 deletions src/internal/reference/generated/customers.v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export interface paths {
};
/**
* Get a Customer Metafield
* @description Lists available metafields for a customer. To retrieve the list, use `customerId` and `metafieldId` in the query parameters.
* @description Returns a single *Customer Metafield*.
*
*/
readonly get: operations["getMetafieldsCustomerId"];
Expand Down Expand Up @@ -1442,6 +1442,7 @@ export interface components {
* */
readonly MetaFieldCollectionResponse: {
readonly data?: readonly components["schemas"]["Metafield"][];
readonly meta?: components["schemas"]["CollectionMeta"];
};
/** @description Response payload for the BigCommerce API. */
readonly MetaFieldCollectionPostPutResponses: {
Expand Down Expand Up @@ -2249,88 +2250,6 @@ export interface components {
};
};
};
/** @description Response payload for the BigCommerce API. */
readonly MetafieldCollectionResponse: {
headers: {
readonly [name: string]: unknown;
};
content: {
readonly "application/json": {
readonly items?: {
/**
* @description Unique ID of the *Metafield*. Read-Only.
* @example 0
*/
readonly id: number;
/**
* @description The key for the metafields.
* @example Staff Name
*/
readonly key: string;
/**
* @description The description for the metafield.
* @example Ronaldo
*/
readonly value: string;
/**
* @description Namespace for the metafield, for organizational purposes.
*
* @example Sales Department
*/
readonly namespace: string;
/**
* @description Determines the visibility and writeability of the field by other API consumers.
* | Value | Description |
* | :--- | :--- |
* | `app_only` | Private to the app that owns the field. |
* | `read` | Visible to other API consumers. |
* | `write` | Open for reading and writing by other API consumers. |
* | `read_and_sf_access` | Visible to other API consumers, including on storefront. |
* | `write_and_sf_access` | Open for reading and writing by other API consumers, including on storefront. |
*
* @enum {string}
*/
readonly permission_set: "app_only" | "read" | "write" | "read_and_sf_access" | "write_and_sf_access";
/**
* @description The type of resource with which the metafield is associated.
*
* @example cart
* @enum {string}
*/
readonly resource_type: "brand" | "product" | "variant" | "category" | "cart" | "channel" | "location" | "order" | "customer";
/**
* @description The unique identifier for the resource with which the metafield is associated.
*
* @example 0
*/
readonly resource_id: number;
/**
* @description Description for the metafields.
*
* @example order
*/
readonly description: string;
/**
* Format: date-time
* @description Date and time of the metafieldʼs creation.
* @example 2022-06-16T18:39:00+00:00
*/
readonly date_created: string;
/**
* Format: date-time
* @description Date and time when the metafield was last updated.
* @example 2022-06-16T18:39:00+00:00
*/
readonly date_modified: string;
/**
* @description Client ID for the metafield's creator.
* @example ramciw4fnoz87it3ynjfif2zrkil5p
*/
readonly owner_client_id?: string;
};
};
};
};
readonly consent_Resp: {
headers: {
readonly [name: string]: unknown;
Expand Down Expand Up @@ -3246,7 +3165,18 @@ export interface operations {
};
readonly requestBody?: never;
readonly responses: {
readonly 200: components["responses"]["MetafieldCollectionResponse"];
/** @description Response payload for the BigCommerce API. */
readonly 200: {
headers: {
readonly [name: string]: unknown;
};
content: {
readonly "application/json": {
readonly data?: readonly components["schemas"]["metafield_Full"][];
readonly meta?: components["schemas"]["metaCollection_Full"];
};
};
};
};
};
readonly createCustomerMetafields: {
Expand Down Expand Up @@ -3323,7 +3253,17 @@ export interface operations {
};
readonly requestBody?: never;
readonly responses: {
readonly 200: components["responses"]["MetafieldCollectionResponse"];
readonly 200: {
headers: {
readonly [name: string]: unknown;
};
content: {
readonly "application/json": {
readonly data?: components["schemas"]["metafield_Full"];
readonly meta?: components["schemas"]["metaEmpty_Full"];
};
};
};
/** @description Not found (A metafield was not found with this query).
* */
readonly 404: {
Expand Down
2 changes: 2 additions & 0 deletions src/internal/reference/generated/exports/v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import type * as store_logs from "../store_logs.v3.js";
import type * as storefront_tokens from "../storefront_tokens.v3.js";
import type * as subscribers from "../subscribers.v3.js";
import type * as tax from "../tax.v3.js";
import type * as tax_customers from "../tax_customers.v3.js";
import type * as tax_properties from "../tax_properties.v3.js";
import type * as tax_rates_zones from "../tax_rates_zones.v3.js";
import type * as tax_settings from "../tax_settings.v3.js";
Expand Down Expand Up @@ -91,6 +92,7 @@ export type Operation =
& InferOperationIndex<storefront_tokens.paths>
& InferOperationIndex<subscribers.paths>
& InferOperationIndex<tax.paths>
& InferOperationIndex<tax_customers.paths>
& InferOperationIndex<tax_properties.paths>
& InferOperationIndex<tax_rates_zones.paths>
& InferOperationIndex<tax_settings.paths>
Expand Down
Loading