Skip to content

Commit

Permalink
feat: add new v2 endpoints to openapi.json
Browse files Browse the repository at this point in the history
  • Loading branch information
jboolean authored Feb 8, 2025
1 parent b1c82f1 commit 1c5f511
Show file tree
Hide file tree
Showing 104 changed files with 5,552 additions and 780 deletions.
3,693 changes: 3,261 additions & 432 deletions openapi.json

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions src/PrintfulClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,29 @@
import type { BaseHttpRequest } from './core/BaseHttpRequest';
import type { OpenAPIConfig } from './core/OpenAPI';
import { FetchHttpRequest } from './core/FetchHttpRequest';
import { ApprovalSheetsV2Service } from './services/ApprovalSheetsV2Service';
import { CatalogV2Service } from './services/CatalogV2Service';
import { CountriesV2Service } from './services/CountriesV2Service';
import { FilesV2Service } from './services/FilesV2Service';
import { MockupGeneratorV2Service } from './services/MockupGeneratorV2Service';
import { OAuthScopesV2Service } from './services/OAuthScopesV2Service';
import { OrdersV2Service } from './services/OrdersV2Service';
import { ShippingRatesV2Service } from './services/ShippingRatesV2Service';
import { StoresV2Service } from './services/StoresV2Service';
import { WarehouseProductsV2Service } from './services/WarehouseProductsV2Service';
import { WebhookV2Service } from './services/WebhookV2Service';
type HttpRequestConstructor = new (config: OpenAPIConfig) => BaseHttpRequest;
export class PrintfulClient {
public readonly approvalSheetsV2: ApprovalSheetsV2Service;
public readonly catalogV2: CatalogV2Service;
public readonly countriesV2: CountriesV2Service;
public readonly filesV2: FilesV2Service;
public readonly mockupGeneratorV2: MockupGeneratorV2Service;
public readonly oAuthScopesV2: OAuthScopesV2Service;
public readonly ordersV2: OrdersV2Service;
public readonly shippingRatesV2: ShippingRatesV2Service;
public readonly storesV2: StoresV2Service;
public readonly warehouseProductsV2: WarehouseProductsV2Service;
public readonly webhookV2: WebhookV2Service;
public readonly request: BaseHttpRequest;
constructor(config?: Partial<OpenAPIConfig>, HttpRequest: HttpRequestConstructor = FetchHttpRequest) {
Expand All @@ -34,12 +42,16 @@ export class PrintfulClient {
HEADERS: config?.HEADERS,
ENCODE_PATH: config?.ENCODE_PATH,
});
this.approvalSheetsV2 = new ApprovalSheetsV2Service(this.request);
this.catalogV2 = new CatalogV2Service(this.request);
this.countriesV2 = new CountriesV2Service(this.request);
this.filesV2 = new FilesV2Service(this.request);
this.mockupGeneratorV2 = new MockupGeneratorV2Service(this.request);
this.oAuthScopesV2 = new OAuthScopesV2Service(this.request);
this.ordersV2 = new OrdersV2Service(this.request);
this.shippingRatesV2 = new ShippingRatesV2Service(this.request);
this.storesV2 = new StoresV2Service(this.request);
this.warehouseProductsV2 = new WarehouseProductsV2Service(this.request);
this.webhookV2 = new WebhookV2Service(this.request);
}
}
Expand Down
56 changes: 50 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ export { CancelablePromise, CancelError } from './core/CancelablePromise';
export { OpenAPI } from './core/OpenAPI';
export type { OpenAPIConfig } from './core/OpenAPI';

export { AddFile } from './models/AddFile';
export type { AdditionalPlacements } from './models/AdditionalPlacements';
export type { Address } from './models/Address';
export type { AddressReadonly } from './models/AddressReadonly';
export { ApprovalSheet } from './models/ApprovalSheet';
export type { ApprovalSheetWebhookFile } from './models/ApprovalSheetWebhookFile';
export type { AvailabilityStatus } from './models/AvailabilityStatus';
export type { AverageFulfillmentTime } from './models/AverageFulfillmentTime';
export type { BaseMockupProduct } from './models/BaseMockupProduct';
export { CalculationStatus } from './models/CalculationStatus';
export { CatalogItem } from './models/CatalogItem';
export { CatalogItemReadonly } from './models/CatalogItemReadonly';
export { CatalogItemSummary } from './models/CatalogItemSummary';
export type { CatalogMockupProduct } from './models/CatalogMockupProduct';
export type { CatalogOption } from './models/CatalogOption';
Expand All @@ -26,30 +30,46 @@ export type { Category } from './models/Category';
export type { CategoryId } from './models/CategoryId';
export type { ColorsFilter } from './models/ColorsFilter';
export type { Costs } from './models/Costs';
export type { CostsByAmount } from './models/CostsByAmount';
export type { CostsByProduct } from './models/CostsByProduct';
export type { CostsByVariant } from './models/CostsByVariant';
export type { Country } from './models/Country';
export type { Currency } from './models/Currency';
export type { Currency_2 } from './models/Currency_2';
export { CustomBorderColorOption } from './models/CustomBorderColorOption';
export type { Customization } from './models/Customization';
export type { CustomizationReadonly } from './models/CustomizationReadonly';
export type { DateFrom } from './models/DateFrom';
export type { DateTo } from './models/DateTo';
export type { DefaultEventConfigurationRequest } from './models/DefaultEventConfigurationRequest';
export type { DesignPlacement } from './models/DesignPlacement';
export { dPuffOption } from './models/dPuffOption';
export type { Error } from './models/Error';
export type { EstimationAddress } from './models/EstimationAddress';
export type { EventConfigurationRequest } from './models/EventConfigurationRequest';
export type { EventConfigurationResponse } from './models/EventConfigurationResponse';
export type { EventType } from './models/EventType';
export { File } from './models/File';
export type { FileId } from './models/FileId';
export type { FileLayer } from './models/FileLayer';
export type { FileOptionPrices } from './models/FileOptionPrices';
export type { FilterSettings } from './models/FilterSettings';
export type { Gift } from './models/Gift';
export type { HateoasLink } from './models/HateoasLink';
export type { HateoasLink_2 } from './models/HateoasLink_2';
export type { HeaderSource } from './models/HeaderSource';
export { InsideLabelTypeOption } from './models/InsideLabelTypeOption';
export { InsidePocketOption } from './models/InsidePocketOption';
export type { InternalId } from './models/InternalId';
export type { Item } from './models/Item';
export type { ItemExternalId } from './models/ItemExternalId';
export type { ItemId } from './models/ItemId';
export type { ItemWithoutPlacements } from './models/ItemWithoutPlacements';
export type { ItemReadonly } from './models/ItemReadonly';
export type { ItemWithoutPlacementsReadonly } from './models/ItemWithoutPlacementsReadonly';
export { KnitwearBaseColor } from './models/KnitwearBaseColor';
export { KnitwearColorReductionMode } from './models/KnitwearColorReductionMode';
export { KnitwearOptionValue } from './models/KnitwearOptionValue';
export { KnitwearTrimColor } from './models/KnitwearTrimColor';
export { KnitwearYarnColor } from './models/KnitwearYarnColor';
export type { Layer } from './models/Layer';
export type { LayerOptionPrices } from './models/LayerOptionPrices';
export type { LayerOptions } from './models/LayerOptions';
Expand All @@ -67,26 +87,32 @@ export type { MockupGeneratorIds } from './models/MockupGeneratorIds';
export { MockupGeneratorTask } from './models/MockupGeneratorTask';
export type { MockupPlacementsFilter } from './models/MockupPlacementsFilter';
export type { MockupStyleIds } from './models/MockupStyleIds';
export type { MockupStyles } from './models/MockupStyles';
export { MockupStyles } from './models/MockupStyles';
export { MockupTaskCreation } from './models/MockupTaskCreation';
export { MockupTemplates } from './models/MockupTemplates';
export type { NameFilter } from './models/NameFilter';
export type { NewFilter } from './models/NewFilter';
export { NotesOption } from './models/NotesOption';
export { OAuthScope } from './models/OAuthScope';
export type { Offset } from './models/Offset';
export type { Offset_2 } from './models/Offset_2';
export type { Order } from './models/Order';
export type { OrderEstimationTaskId } from './models/OrderEstimationTaskId';
export type { OrderId } from './models/OrderId';
export type { OrderId_2 } from './models/OrderId_2';
export type { OrderSummary } from './models/OrderSummary';
export type { PackingSlip } from './models/PackingSlip';
export type { PackingSlipReadonly } from './models/PackingSlipReadonly';
export type { Paging } from './models/Paging';
export type { ParameterSource } from './models/ParameterSource';
export type { PathStoreId } from './models/PathStoreId';
export { Placement } from './models/Placement';
export type { Placement as PlacementType } from './models/Placement';
export type { PlacementFilter } from './models/PlacementFilter';
export type { PlacementOptions } from './models/PlacementOptions';
export type { PlacementsFilter } from './models/PlacementsFilter';
export type { PlacementsList } from './models/PlacementsList';
export type { PointerSource } from './models/PointerSource';
export type { PrintfulCosts } from './models/PrintfulCosts';
export type { ProblemDetails } from './models/ProblemDetails';
export type { Product } from './models/Product';
export type { ProductCategoryIds } from './models/ProductCategoryIds';
Expand All @@ -99,28 +125,41 @@ export type { ProductPrices } from './models/ProductPrices';
export type { ProductSizeGuide } from './models/ProductSizeGuide';
export type { ProductsLinks } from './models/ProductsLinks';
export type { ProductsParam } from './models/ProductsParam';
export type { Profit } from './models/Profit';
export { ReportTypes } from './models/ReportTypes';
export type { Response200 } from './models/Response200';
export type { RetailCosts } from './models/RetailCosts';
export type { RetailCosts_2 } from './models/RetailCosts_2';
export type { SalesAndCosts } from './models/SalesAndCosts';
export type { SalesAndCostsSummary } from './models/SalesAndCostsSummary';
export { SellingRegion } from './models/SellingRegion';
export { SellingRegionAll } from './models/SellingRegionAll';
export type { SellingRegionPrice } from './models/SellingRegionPrice';
export { SellingRegionStockAvailability } from './models/SellingRegionStockAvailability';
export type { ServerErrorDetails } from './models/ServerErrorDetails';
export { Shipment } from './models/Shipment';
export type { Shipment_2 } from './models/Shipment_2';
export type { ShipmentItem } from './models/ShipmentItem';
export type { ShipmentItem_2 } from './models/ShipmentItem_2';
export type { ShippingRatesAddress } from './models/ShippingRatesAddress';
export type { ShowExpired } from './models/ShowExpired';
export { SizeTable } from './models/SizeTable';
export { SortDirection } from './models/SortDirection';
export { SortType } from './models/SortType';
export { StitchColorOption } from './models/StitchColorOption';
export type { StoreId } from './models/StoreId';
export type { StoreId_2 } from './models/StoreId_2';
export type { StoreIdNotRequired } from './models/StoreIdNotRequired';
export type { StoreSchema } from './models/StoreSchema';
export type { StoreStatistics } from './models/StoreStatistics';
export { TaskSummary } from './models/TaskSummary';
export { TechniqueEnum } from './models/TechniqueEnum';
export type { Techniques } from './models/Techniques';
export type { TechniquesFilter } from './models/TechniquesFilter';
export type { TechniqueStockAvailability } from './models/TechniqueStockAvailability';
export type { TemplateMockupProduct } from './models/TemplateMockupProduct';
export { ThreadColorsOption } from './models/ThreadColorsOption';
export type { TotalPaidOrders } from './models/TotalPaidOrders';
export type { TrackingEvent } from './models/TrackingEvent';
export type { Type } from './models/Type';
export { UnlimitedColorOption } from './models/UnlimitedColorOption';
Expand All @@ -133,8 +172,9 @@ export type { VariantPrices } from './models/VariantPrices';
export type { VariantsPriceData } from './models/VariantsPriceData';
export type { VariantStockAvailability } from './models/VariantStockAvailability';
export type { VariantTechniquePrice } from './models/VariantTechniquePrice';
export { WarehouseItem } from './models/WarehouseItem';
export { WarehouseItemReadonly } from './models/WarehouseItemReadonly';
export { WarehouseItemSummary } from './models/WarehouseItemSummary';
export type { WarehouseProductId } from './models/WarehouseProductId';
export { WarehouseShippingRateItem } from './models/WarehouseShippingRateItem';
export type { Webhook } from './models/Webhook';
export type { WebhookCreated } from './models/WebhookCreated';
Expand All @@ -143,10 +183,14 @@ export type { WebhookInfoResponse } from './models/WebhookInfoResponse';
export type { WebhookOrderData } from './models/WebhookOrderData';
export type { WebhookShipmentData } from './models/WebhookShipmentData';

export { ApprovalSheetsV2Service } from './services/ApprovalSheetsV2Service';
export { CatalogV2Service } from './services/CatalogV2Service';
export { CountriesV2Service } from './services/CountriesV2Service';
export { FilesV2Service } from './services/FilesV2Service';
export { MockupGeneratorV2Service } from './services/MockupGeneratorV2Service';
export { OAuthScopesV2Service } from './services/OAuthScopesV2Service';
export { OrdersV2Service } from './services/OrdersV2Service';
export { ShippingRatesV2Service } from './services/ShippingRatesV2Service';
export { StoresV2Service } from './services/StoresV2Service';
export { WarehouseProductsV2Service } from './services/WarehouseProductsV2Service';
export { WebhookV2Service } from './services/WebhookV2Service';
38 changes: 38 additions & 0 deletions src/models/AddFile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
/**
* Information about the added File
*/
export type AddFile = {
/**
* Role of the file
*/
role?: AddFile.role;
/**
* Source URL where the file is to be downloaded from. The use of .ai, .psd, and .tiff files has been deprecated, if your application uses these file types or accepts these types from users you will need to add validation.
*/
url: string;
/**
* If the filename is not provided, and something looking like a filename is present in the URL (e.g. "something.jpg"), it will be used.
* Otherwise, it will default to `{file_id}.{file_extension}`, with file extension determined based on the media type of the file.
*
*/
filename?: string;
/**
* Show file in the Printfile Library
*/
visible?: boolean;
};
export namespace AddFile {
/**
* Role of the file
*/
export enum role {
PRINTFILE = 'printfile',
LABEL = 'label',
PREVIEW = 'preview',
}
}

20 changes: 10 additions & 10 deletions src/models/AdditionalPlacements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@
import type { FileOptionPrices } from './FileOptionPrices';
import type { Layers } from './Layers';
/**
* Info about additional product placements prices
* Info about additional product placements prices.
*/
export type AdditionalPlacements = {
/**
* ID or key of placement
*/
id?: string;
id: string;
/**
* Title of the placement related
*/
title?: string;
title: string;
/**
* Placement type
*/
type?: string;
type: string;
/**
* Key associated to the available technique
*/
technique_key?: string;
technique_key: string;
/**
* Price converted to the region currency
*/
price?: string;
price: string;
/**
* Discounted price per region
*/
discounted_price?: string;
discounted_price: string;
/**
* Array containing the pricing information about the file options used
*/
placement_options?: Array<FileOptionPrices>;
placement_options: Array<FileOptionPrices>;
/**
* Array containing the pricing information about the layers
* Array containing the pricing information about the layers.
*/
layers?: Array<Layers>;
layers: Array<Layers>;
};

62 changes: 62 additions & 0 deletions src/models/AddressReadonly.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
/**
* Information about the address
*/
export type AddressReadonly = {
/**
* Full name
*/
name: string;
/**
* Company name
*/
company: string;
/**
* Address line 1
*/
address1: string;
/**
* Address line 2
*/
address2: string;
/**
* City
*/
city: string;
/**
* State code
*/
state_code: string;
/**
* State name
*/
state_name: string;
/**
* Country code
*/
country_code: string;
/**
* Country name
*/
country_name: string;
/**
* ZIP/Postal code
*/
zip: string;
/**
* Phone number
*/
phone: string;
/**
* Email address
*/
email: string;
/**
* TAX number (`optional`, but in case of Brazil country this field becomes `required` and will be used as CPF/CNPJ number)<br> CPF format is 000.000.000-00 (14 characters);<br> CNPJ format is 00.000.000/0000-00 (18 characters).
*/
tax_number: string;
};

Loading

0 comments on commit 1c5f511

Please sign in to comment.