Skip to content

Commit 9c86ec9

Browse files
release(v2.1.2-beta): update the OpenAPI spec.json (#32)
> - source: blob:https://developers.printful.com/11c34042-9e1f-4afc-8f97-06c2a7b5968c > - docs: https://developers.printful.com/docs/v2-beta/
1 parent 4c5d377 commit 9c86ec9

File tree

10 files changed

+187
-6
lines changed

10 files changed

+187
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.1.2-beta] - 2025-07-24
8+
9+
- Updated to the latest OpenAPI spec (Jul 2025).
10+
> - source: blob:https://developers.printful.com/11c34042-9e1f-4afc-8f97-06c2a7b5968c
11+
> - docs: https://developers.printful.com/docs/v2-beta/
12+
713
## [2.1.0-beta] - 2025-04-15
814

915
- Updated to the latest OpenAPI spec (Apr 2025).

openapi.json

Lines changed: 131 additions & 4 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "printful-sdk-js-v2",
3-
"version": "2.1.1-beta",
3+
"version": "2.1.2-beta",
44
"description": "Printful SDK for Node.js / TypeScript. A wrapper for the Printful REST API (v2)",
55
"author": "Spencer Lepine <spencer.sayhello@gmail.com>",
66
"license": "MIT",

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export type { CustomizationReadonly } from './models/CustomizationReadonly';
4242
export type { DateFrom } from './models/DateFrom';
4343
export type { DateTo } from './models/DateTo';
4444
export type { DefaultEventConfigurationRequest } from './models/DefaultEventConfigurationRequest';
45+
export type { DefaultMockupStylesFilter } from './models/DefaultMockupStylesFilter';
4546
export type { DesignPlacement } from './models/DesignPlacement';
4647
export type { DestinationCountry } from './models/DestinationCountry';
4748
export { dPuffOption } from './models/dPuffOption';
@@ -61,7 +62,7 @@ export type { HeaderSource } from './models/HeaderSource';
6162
export { InsideLabelTypeOption } from './models/InsideLabelTypeOption';
6263
export { InsidePocketOption } from './models/InsidePocketOption';
6364
export type { InternalId } from './models/InternalId';
64-
export type { Item } from './models/Item';
65+
export { Item } from './models/Item';
6566
export type { ItemExternalId } from './models/ItemExternalId';
6667
export type { ItemId } from './models/ItemId';
6768
export type { ItemReadonly } from './models/ItemReadonly';
@@ -123,6 +124,7 @@ export type { ProductCategoryIds } from './models/ProductCategoryIds';
123124
export type { ProductData } from './models/ProductData';
124125
export type { ProductId } from './models/ProductId';
125126
export type { ProductInfo } from './models/ProductInfo';
127+
export type { ProductionCurrency } from './models/ProductionCurrency';
126128
export type { ProductLinks } from './models/ProductLinks';
127129
export type { ProductOptions } from './models/ProductOptions';
128130
export type { ProductPrices } from './models/ProductPrices';
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* generated using openapi-typescript-codegen -- do not edit */
2+
/* istanbul ignore file */
3+
/* tslint:disable */
4+
/* eslint-disable */
5+
export type DefaultMockupStylesFilter = boolean;

src/models/Item.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ export type Item = {
2828
*/
2929
name?: string;
3030
placements?: PlacementsList;
31+
/**
32+
* Orientation of the design. Applies only to the products that allow multiple orientations such as framed posters.
33+
*/
34+
orientation?: Item.orientation | null;
3135
product_options?: ProductOptions;
3236
/**
3337
* HATEOAS links
@@ -36,4 +40,14 @@ export type Item = {
3640
self?: HateoasLink;
3741
};
3842
};
43+
export namespace Item {
44+
/**
45+
* Orientation of the design. Applies only to the products that allow multiple orientations such as framed posters.
46+
*/
47+
export enum orientation {
48+
HORIZONTAL = 'horizontal',
49+
VERTICAL = 'vertical',
50+
ANY = 'any',
51+
}
52+
}
3953

src/models/MockupTaskCreation.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ export type MockupTaskCreation = {
99
* Generated file format. PNG will have a transparent background, JPG will have a smaller file size.
1010
*/
1111
format?: MockupTaskCreation.format;
12+
/**
13+
* Width of the mockup image in pixels. If not specified, the default value will be used. The default value is 1000px.
14+
* If the value is specified as 2000 that means that resulting mockups will be 2000x2000px.
15+
*
16+
*/
17+
mockup_width_px?: number;
1218
products: Array<(CatalogMockupProduct | TemplateMockupProduct)>;
1319
};
1420
export namespace MockupTaskCreation {

src/models/ProductionCurrency.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* generated using openapi-typescript-codegen -- do not edit */
2+
/* istanbul ignore file */
3+
/* tslint:disable */
4+
/* eslint-disable */
5+
/**
6+
* The production currency (3-letter code) used to determine currency in which the prices will be calculated. The active user production currency will be used by default. The format is compliant with ISO 4217 standard.
7+
*/
8+
export type ProductionCurrency = string;

src/models/Variant.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ export type Variant = {
3232
* Secondary hexadecimal RGB color code. May not exactly reflect the real-world color
3333
*/
3434
color_code2: string | null;
35+
/**
36+
* A list of placement configuration objects, each specifying the layout details for a particular placement.
37+
*/
38+
placement_dimensions?: any;
3539
/**
3640
* URL of a preview image for this variant
3741
*/

src/services/CatalogV2Service.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ export class CatalogV2Service {
303303
* @param id Product ID.
304304
* @param sellingRegionName Specifies the region production currency that the product prices will be calculated in
305305
* @param currency The currency (3-letter code) used to determine currency in which the prices will be displayed. The store currency will be used by default. The format is compliant with ISO 4217 standard.
306+
* @param productionCurrency The production currency (3-letter code) used to determine currency in which the prices will be calculated. The active user production currency will be used by default. The format is compliant with ISO 4217 standard.
306307
* @param xPfLanguage Use this to specify which locale you would like to use in the responses, for some endpoints this can affect translations.
307308
*
308309
* @returns any OK
@@ -312,6 +313,7 @@ export class CatalogV2Service {
312313
id: number,
313314
sellingRegionName?: string,
314315
currency?: string,
316+
productionCurrency?: string,
315317
xPfLanguage?: string,
316318
): CancelablePromise<any> {
317319
return this.httpRequest.request({
@@ -326,6 +328,7 @@ export class CatalogV2Service {
326328
query: {
327329
'selling_region_name': sellingRegionName,
328330
'currency': currency,
331+
'production_currency': productionCurrency,
329332
},
330333
errors: {
331334
404: `Not found`,
@@ -338,6 +341,7 @@ export class CatalogV2Service {
338341
* @param id Variant ID
339342
* @param sellingRegionName Specifies the region production currency that the product prices will be calculated in
340343
* @param currency The currency (3-letter code) used to determine currency in which the prices will be displayed. The store currency will be used by default. The format is compliant with ISO 4217 standard.
344+
* @param productionCurrency The production currency (3-letter code) used to determine currency in which the prices will be calculated. The active user production currency will be used by default. The format is compliant with ISO 4217 standard.
341345
* @param xPfLanguage Use this to specify which locale you would like to use in the responses, for some endpoints this can affect translations.
342346
*
343347
* @returns any OK
@@ -347,6 +351,7 @@ export class CatalogV2Service {
347351
id: number,
348352
sellingRegionName?: string,
349353
currency?: string,
354+
productionCurrency?: string,
350355
xPfLanguage?: string,
351356
): CancelablePromise<any> {
352357
return this.httpRequest.request({
@@ -361,6 +366,7 @@ export class CatalogV2Service {
361366
query: {
362367
'selling_region_name': sellingRegionName,
363368
'currency': currency,
369+
'production_currency': productionCurrency,
364370
},
365371
errors: {
366372
404: `Not found`,
@@ -486,6 +492,7 @@ export class CatalogV2Service {
486492
*
487493
* @param id Product ID.
488494
* @param placements One or more placement idenitifiers used to filter in mockup styles that match a given placement. The complete list of placements can be found [here](https://developers.printful.com/docs/#tag/Common/Placements).
495+
* @param defaultMockupStyles
489496
* @param sellingRegionName Only returns the products that can be sold in the specified region. If is set to 'all' returns each region availability for specified product.
490497
* @param offset Result set offset
491498
* @param limit Number of items per page (max 100)
@@ -497,6 +504,7 @@ export class CatalogV2Service {
497504
public retrieveMockupStylesByProductId(
498505
id: number,
499506
placements?: Array<string>,
507+
defaultMockupStyles: boolean = false,
500508
sellingRegionName: 'worldwide' | 'north_america' | 'canada' | 'europe' | 'spain' | 'latvia' | 'uk' | 'france' | 'germany' | 'australia' | 'japan' | 'new_zealand' | 'italy' | 'brazil' | 'southeast_asia' | 'republic_of_korea' | 'all' = 'worldwide',
501509
offset?: number,
502510
limit?: number,
@@ -513,6 +521,7 @@ export class CatalogV2Service {
513521
},
514522
query: {
515523
'placements': placements,
524+
'default_mockup_styles': defaultMockupStyles,
516525
'selling_region_name': sellingRegionName,
517526
'offset': offset,
518527
'limit': limit,

0 commit comments

Comments
 (0)