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

## Modified files
### `catalog/brands_catalog.v3.ts`

components.parameters:
```diff
+ readonly DirectionQuery: "asc" | "desc";
```

operations.getBrands.parameters.query:
```diff
+ readonly direction?: components["parameters"]["DirectionQuery"];
```

### `pages.v3.ts`

components.schemas.pageMeta:
```diff
- readonly meta_keywords: string;
+ readonly meta_keywords: string | null;
- readonly meta_description: string;
+ readonly meta_description: string | null;
```

components.schemas.searchKeywords:
```diff
- readonly search_keywords: string;
+ readonly search_keywords: string | null;
```

### `promotions.v3.ts`

components.schemas:
```diff
+ readonly CreatedFrom: "react_ui" | "legacy_ui" | "api";
- readonly PromotionCoupon: components["schemas"]["PromotionBase"] & {
+ readonly PatchCouponPromotion: components["schemas"]["PromotionBase"] & {
- readonly PromotionAutomatic: components["schemas"]["PromotionBase"];
+ readonly DraftCouponPromotion: components["schemas"]["PromotionBase"] & {
```

components.schemas.PromotionBase:
```diff
- readonly name: string;
+ readonly name?: string;
- readonly rules: readonly components["schemas"]["Rule"][];
+ readonly rules?: readonly components["schemas"]["Rule"][];
```

components.schemas.PatchCouponPromotion:
```diff
+ readonly codes?: components["schemas"]["CouponCode"];
```

components.schemas.DraftCouponPromotion:
```diff
+ readonly codes?: components["schemas"]["CouponCode"];
+ readonly coupon_overrides_automatic_when_offering_higher_discounts: boolean;
+ readonly redemption_type: "COUPON";
+ };
+ readonly SavedCouponPromotion: WithRequired<components["schemas"]["PromotionBase"], "id" | "name" | "channels" | "customer" | "rules" | "notifications" | "stop" | "currency_code" | "redemption_type" | "current_uses" | "start_date" | "status" | "can_be_used_with_other_promotions"> & {
+ readonly id: number;
+ readonly created_from: components["schemas"]["CreatedFrom"];
+ readonly codes?: components["schemas"]["CouponCode"];
+ readonly coupon_overrides_automatic_when_offering_higher_discounts: boolean;
+ readonly redemption_type: "COUPON";
+ readonly multiple_codes?: {
+ readonly has_multiple_codes: boolean;
+ };
+ };
+ readonly PatchAutomaticPromotion: components["schemas"]["PromotionBase"];
+ readonly DraftAutomaticPromotion: WithRequired<components["schemas"]["PromotionBase"], "redemption_type" | "name" | "rules"> & {
+ readonly redemption_type: "AUTOMATIC";
+ };
+ readonly SavedAutomaticPromotion: WithRequired<components["schemas"]["PromotionBase"], "id" | "name" | "channels" | "customer" | "rules" | "notifications" | "stop" | "currency_code" | "redemption_type" | "current_uses" | "start_date" | "status" | "can_be_used_with_other_promotions"> & {
+ readonly redemption_type: "AUTOMATIC";
+ readonly id: number;
+ readonly created_from: components["schemas"]["CreatedFrom"];
+ };
```

components.schemas.CollectionMeta:
```diff
- readonly pagination?: components["schemas"]["Pagination"];
+ readonly pagination: components["schemas"]["Pagination"];
```

components.schemas.Pagination:
```diff
- readonly total?: number;
+ readonly total: number;
- readonly count?: number;
+ readonly count: number;
- readonly per_page?: number;
+ readonly per_page: number;
- readonly current_page?: number;
+ readonly current_page: number;
- readonly total_pages?: number;
+ readonly total_pages: number;
- readonly links?: {
+ readonly links: {
```

components.schemas.CouponCode:
```diff
- readonly id?: number;
+ readonly id: number;
- readonly current_uses?: number;
+ readonly current_uses: number;
- readonly created?: string;
+ readonly created: string;
```

components.responses.PromotionsCollectionResponse.content."application/json":
```diff
- readonly data?: readonly (components["schemas"]["PromotionAutomatic"] | components["schemas"]["PromotionCoupon"])[];
+ readonly data: readonly (components["schemas"]["SavedAutomaticPromotion"] | components["schemas"]["SavedCouponPromotion"])[];
- readonly meta?: components["schemas"]["CollectionMeta"];
+ readonly meta: components["schemas"]["CollectionMeta"];
```

components.responses.PromotionsResponse.content."application/json":
```diff
- readonly data?: components["schemas"]["PromotionCoupon"] | components["schemas"]["PromotionAutomatic"];
+ readonly data?: components["schemas"]["SavedCouponPromotion"] | components["schemas"]["SavedAutomaticPromotion"];
```

components.parameters:
```diff
+ readonly Query: string;
```

operations.getPromotions.parameters.query:
```diff
+ readonly query?: components["parameters"]["Query"];
```

operations.createPromotion.requestBody.content:
```diff
- readonly "application/json": components["schemas"]["PromotionCoupon"] | components["schemas"]["PromotionAutomatic"];
+ readonly "application/json": components["schemas"]["DraftCouponPromotion"] | components["schemas"]["DraftAutomaticPromotion"];
```

operations.updatePromotion.requestBody.content:
```diff
- readonly "application/json": components["schemas"]["PromotionCoupon"] | components["schemas"]["PromotionAutomatic"];
+ readonly "application/json": components["schemas"]["PatchCouponPromotion"] | components["schemas"]["PatchAutomaticPromotion"];
```

:
```diff
+ type WithRequired<T, K extends keyof T> = T & {
+ [P in K]-?: T[P];
+ };
```

9 changes: 6 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { eslintConfigs } from '@aligent/ts-code-standards';
import { defineConfig } from 'eslint/config';

export default [
export default defineConfig([
...eslintConfigs.base,
{ ignores: ['**/*.{js,mjs}', '**/generated', '**/dist'] },
];
{
ignores: ['**/*.{js,mjs}', '**/generated', '**/.tmp-generate', '**/dist'],
},
]);
4 changes: 2 additions & 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.3",
"version": "1.0.0",
"type": "module",
"scripts": {
"test": "tsd",
Expand Down Expand Up @@ -66,5 +66,5 @@
"node-fetch": "^3.3.2",
"query-string": "^9.1.1"
},
"packageManager": "yarn@4.9.1+sha512.f95ce356460e05be48d66401c1ae64ef84d163dd689964962c6888a9810865e39097a5e9de748876c2e0bf89b232d583c33982773e9903ae7a76257270986538"
"packageManager": "yarn@4.9.2"
}
5 changes: 5 additions & 0 deletions src/internal/reference/generated/carts.sf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,11 @@ export interface components {
readonly [name: string]: unknown;
};
content: {
/** @example {
* "status": 409,
* "title": "The request cannot be processed due to a possible conflict. Please review the changes and try again.",
* "type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes"
* } */
readonly "application/json": {
readonly status?: number;
readonly title?: string;
Expand Down
62 changes: 62 additions & 0 deletions src/internal/reference/generated/carts.v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2047,6 +2047,11 @@ export interface components {
readonly [name: string]: unknown;
};
content: {
/** @example {
* "status": 409,
* "title": "The request cannot be processed due to a possible conflict. Please review the changes and try again.",
* "type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes"
* } */
readonly "application/json": components["schemas"]["ErrorResponse"];
};
};
Expand Down Expand Up @@ -2451,6 +2456,12 @@ export interface operations {
readonly [name: string]: unknown;
};
content: {
/** @example {
* "status": 400,
* "title": "Input is invalid",
* "type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes",
* "detail": "Syntax error"
* } */
readonly "application/json": {
readonly status?: number;
readonly title?: string;
Expand Down Expand Up @@ -2563,6 +2574,12 @@ export interface operations {
readonly [name: string]: unknown;
};
content: {
/** @example {
* "status": 400,
* "title": "Input is invalid",
* "type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes",
* "detail": "Syntax error"
* } */
readonly "application/json": {
readonly status?: number;
readonly title?: string;
Expand Down Expand Up @@ -2666,6 +2683,21 @@ export interface operations {
readonly [name: string]: unknown;
};
content: {
/** @example {
* "data": {
* "id": "24",
* "key": "Staff Name",
* "value": "Sam",
* "namespace": "Sales Department",
* "permission_set": "app_only",
* "resource_type": "cart",
* "resource_id": "b810114d-9926-45b7-bba5-7633b251154b",
* "description": "Name of staff member",
* "date_created": "2023-11-15T15:16:35+00:00",
* "date_modified": "2023-11-15T15:16:35+00:00"
* },
* "meta": {}
* } */
readonly "application/json": components["schemas"]["MetaFieldCollectionResponse"];
};
};
Expand All @@ -2675,6 +2707,12 @@ export interface operations {
readonly [name: string]: unknown;
};
content: {
/** @example {
* "status": 400,
* "title": "Input is invalid",
* "type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes",
* "detail": "Syntax error"
* } */
readonly "application/json": {
readonly status?: number;
readonly title?: string;
Expand Down Expand Up @@ -2797,6 +2835,12 @@ export interface operations {
readonly [name: string]: unknown;
};
content: {
/** @example {
* "status": 400,
* "title": "Input is invalid",
* "type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes",
* "detail": "Syntax error"
* } */
readonly "application/json": {
readonly status?: number;
readonly title?: string;
Expand Down Expand Up @@ -2943,6 +2987,12 @@ export interface operations {
readonly [name: string]: unknown;
};
content: {
/** @example {
* "status": 400,
* "title": "Input is invalid",
* "type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes",
* "detail": "Syntax error"
* } */
readonly "application/json": {
readonly status?: number;
readonly title?: string;
Expand Down Expand Up @@ -2999,6 +3049,12 @@ export interface operations {
readonly [name: string]: unknown;
};
content: {
/** @example {
* "status": 400,
* "title": "Input is invalid",
* "type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes",
* "detail": "Syntax error"
* } */
readonly "application/json": {
readonly status?: number;
readonly title?: string;
Expand Down Expand Up @@ -3049,6 +3105,12 @@ export interface operations {
readonly [name: string]: unknown;
};
content: {
/** @example {
* "status": 400,
* "title": "Input is invalid",
* "type": "https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes",
* "detail": "Syntax error"
* } */
readonly "application/json": {
readonly status?: number;
readonly title?: string;
Expand Down
Loading