@teemill/orders 1.5.5 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/.openapi-generator/FILES +7 -25
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +3 -3
  4. package/api.ts +1526 -0
  5. package/base.ts +86 -0
  6. package/common.ts +150 -0
  7. package/configuration.ts +110 -0
  8. package/dist/api.d.ts +1103 -0
  9. package/dist/api.js +632 -0
  10. package/dist/base.d.ts +66 -0
  11. package/dist/base.js +65 -0
  12. package/dist/common.d.ts +65 -0
  13. package/dist/common.js +161 -0
  14. package/dist/configuration.d.ts +91 -0
  15. package/dist/configuration.js +43 -0
  16. package/dist/esm/api.d.ts +1103 -0
  17. package/dist/esm/api.js +625 -0
  18. package/dist/esm/base.d.ts +66 -0
  19. package/dist/esm/base.js +60 -0
  20. package/dist/esm/common.d.ts +65 -0
  21. package/dist/esm/common.js +149 -0
  22. package/dist/esm/configuration.d.ts +91 -0
  23. package/dist/esm/configuration.js +39 -0
  24. package/dist/{models/Status.d.ts → esm/index.d.ts} +3 -16
  25. package/dist/esm/index.js +15 -0
  26. package/dist/index.d.ts +13 -3
  27. package/dist/index.js +15 -5
  28. package/git_push.sh +57 -0
  29. package/{src/models/Status.ts → index.ts} +3 -26
  30. package/package.json +18 -4
  31. package/tsconfig.esm.json +7 -0
  32. package/tsconfig.json +4 -6
  33. package/dist/apis/OrdersApi.d.ts +0 -100
  34. package/dist/apis/OrdersApi.js +0 -464
  35. package/dist/apis/index.d.ts +0 -1
  36. package/dist/apis/index.js +0 -19
  37. package/dist/models/Address.d.ts +0 -73
  38. package/dist/models/Address.js +0 -68
  39. package/dist/models/ApiError.d.ts +0 -37
  40. package/dist/models/ApiError.js +0 -53
  41. package/dist/models/ConfirmOrderFulfillment.d.ts +0 -37
  42. package/dist/models/ConfirmOrderFulfillment.js +0 -53
  43. package/dist/models/ConfirmOrderRequest.d.ts +0 -32
  44. package/dist/models/ConfirmOrderRequest.js +0 -51
  45. package/dist/models/ConfirmOrderValidationError.d.ts +0 -47
  46. package/dist/models/ConfirmOrderValidationError.js +0 -62
  47. package/dist/models/ContactInformation.d.ts +0 -37
  48. package/dist/models/ContactInformation.js +0 -53
  49. package/dist/models/DeliveryEstimates.d.ts +0 -37
  50. package/dist/models/DeliveryEstimates.js +0 -52
  51. package/dist/models/ExportOrders202Response.d.ts +0 -31
  52. package/dist/models/ExportOrders202Response.js +0 -50
  53. package/dist/models/Fulfillment.d.ts +0 -71
  54. package/dist/models/Fulfillment.js +0 -66
  55. package/dist/models/FulfillmentItem.d.ts +0 -43
  56. package/dist/models/FulfillmentItem.js +0 -54
  57. package/dist/models/Order.d.ts +0 -135
  58. package/dist/models/Order.js +0 -92
  59. package/dist/models/OrderItem.d.ts +0 -75
  60. package/dist/models/OrderItem.js +0 -64
  61. package/dist/models/OrderItemTaxPrice.d.ts +0 -37
  62. package/dist/models/OrderItemTaxPrice.js +0 -52
  63. package/dist/models/OrderTracking.d.ts +0 -43
  64. package/dist/models/OrderTracking.js +0 -54
  65. package/dist/models/OrdersResponse.d.ts +0 -38
  66. package/dist/models/OrdersResponse.js +0 -53
  67. package/dist/models/Origin.d.ts +0 -37
  68. package/dist/models/Origin.js +0 -52
  69. package/dist/models/Price.d.ts +0 -37
  70. package/dist/models/Price.js +0 -52
  71. package/dist/models/ShippingMethod.d.ts +0 -75
  72. package/dist/models/ShippingMethod.js +0 -66
  73. package/dist/models/Status.js +0 -39
  74. package/dist/models/StatusHistoryItem.d.ts +0 -38
  75. package/dist/models/StatusHistoryItem.js +0 -53
  76. package/dist/models/index.d.ts +0 -20
  77. package/dist/models/index.js +0 -38
  78. package/dist/runtime.d.ts +0 -187
  79. package/dist/runtime.js +0 -565
  80. package/src/apis/OrdersApi.ts +0 -443
  81. package/src/apis/index.ts +0 -3
  82. package/src/index.ts +0 -5
  83. package/src/models/Address.ts +0 -125
  84. package/src/models/ApiError.ts +0 -74
  85. package/src/models/ConfirmOrderFulfillment.ts +0 -75
  86. package/src/models/ConfirmOrderRequest.ts +0 -73
  87. package/src/models/ConfirmOrderValidationError.ts +0 -88
  88. package/src/models/ContactInformation.ts +0 -74
  89. package/src/models/DeliveryEstimates.ts +0 -73
  90. package/src/models/ExportOrders202Response.ts +0 -65
  91. package/src/models/Fulfillment.ts +0 -138
  92. package/src/models/FulfillmentItem.ts +0 -81
  93. package/src/models/Order.ts +0 -244
  94. package/src/models/OrderItem.ts +0 -132
  95. package/src/models/OrderItemTaxPrice.ts +0 -73
  96. package/src/models/OrderTracking.ts +0 -81
  97. package/src/models/OrdersResponse.ts +0 -80
  98. package/src/models/Origin.ts +0 -73
  99. package/src/models/Price.ts +0 -73
  100. package/src/models/ShippingMethod.ts +0 -134
  101. package/src/models/StatusHistoryItem.ts +0 -80
  102. package/src/models/index.ts +0 -22
  103. package/src/runtime.ts +0 -441
@@ -1,39 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Orders API
6
- * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
7
- *
8
- * The version of the OpenAPI document: 1.5.5
9
- * Contact: hello@teemill.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.StatusToJSON = exports.StatusFromJSONTyped = exports.StatusFromJSON = exports.Status = void 0;
17
- /**
18
- *
19
- * @export
20
- */
21
- exports.Status = {
22
- New: 'new',
23
- Paid: 'paid',
24
- Processing: 'processing',
25
- Complete: 'complete',
26
- Refunded: 'refunded'
27
- };
28
- function StatusFromJSON(json) {
29
- return StatusFromJSONTyped(json, false);
30
- }
31
- exports.StatusFromJSON = StatusFromJSON;
32
- function StatusFromJSONTyped(json, ignoreDiscriminator) {
33
- return json;
34
- }
35
- exports.StatusFromJSONTyped = StatusFromJSONTyped;
36
- function StatusToJSON(value) {
37
- return value;
38
- }
39
- exports.StatusToJSON = StatusToJSON;
@@ -1,38 +0,0 @@
1
- /**
2
- * Orders API
3
- * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
4
- *
5
- * The version of the OpenAPI document: 1.5.5
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Status } from './Status';
13
- /**
14
- *
15
- * @export
16
- * @interface StatusHistoryItem
17
- */
18
- export interface StatusHistoryItem {
19
- /**
20
- *
21
- * @type {Status}
22
- * @memberof StatusHistoryItem
23
- */
24
- status?: Status;
25
- /**
26
- * ISO 8601 Timestamp
27
- * @type {Date}
28
- * @memberof StatusHistoryItem
29
- */
30
- createdAt?: Date;
31
- }
32
- /**
33
- * Check if a given object implements the StatusHistoryItem interface.
34
- */
35
- export declare function instanceOfStatusHistoryItem(value: object): boolean;
36
- export declare function StatusHistoryItemFromJSON(json: any): StatusHistoryItem;
37
- export declare function StatusHistoryItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusHistoryItem;
38
- export declare function StatusHistoryItemToJSON(value?: StatusHistoryItem | null): any;
@@ -1,53 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * Orders API
6
- * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
7
- *
8
- * The version of the OpenAPI document: 1.5.5
9
- * Contact: hello@teemill.com
10
- *
11
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
- * https://openapi-generator.tech
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.StatusHistoryItemToJSON = exports.StatusHistoryItemFromJSONTyped = exports.StatusHistoryItemFromJSON = exports.instanceOfStatusHistoryItem = void 0;
17
- var runtime_1 = require("../runtime");
18
- var Status_1 = require("./Status");
19
- /**
20
- * Check if a given object implements the StatusHistoryItem interface.
21
- */
22
- function instanceOfStatusHistoryItem(value) {
23
- var isInstance = true;
24
- return isInstance;
25
- }
26
- exports.instanceOfStatusHistoryItem = instanceOfStatusHistoryItem;
27
- function StatusHistoryItemFromJSON(json) {
28
- return StatusHistoryItemFromJSONTyped(json, false);
29
- }
30
- exports.StatusHistoryItemFromJSON = StatusHistoryItemFromJSON;
31
- function StatusHistoryItemFromJSONTyped(json, ignoreDiscriminator) {
32
- if ((json === undefined) || (json === null)) {
33
- return json;
34
- }
35
- return {
36
- 'status': !(0, runtime_1.exists)(json, 'status') ? undefined : (0, Status_1.StatusFromJSON)(json['status']),
37
- 'createdAt': !(0, runtime_1.exists)(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
38
- };
39
- }
40
- exports.StatusHistoryItemFromJSONTyped = StatusHistoryItemFromJSONTyped;
41
- function StatusHistoryItemToJSON(value) {
42
- if (value === undefined) {
43
- return undefined;
44
- }
45
- if (value === null) {
46
- return null;
47
- }
48
- return {
49
- 'status': (0, Status_1.StatusToJSON)(value.status),
50
- 'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
51
- };
52
- }
53
- exports.StatusHistoryItemToJSON = StatusHistoryItemToJSON;
@@ -1,20 +0,0 @@
1
- export * from './Address';
2
- export * from './ApiError';
3
- export * from './ConfirmOrderFulfillment';
4
- export * from './ConfirmOrderRequest';
5
- export * from './ConfirmOrderValidationError';
6
- export * from './ContactInformation';
7
- export * from './DeliveryEstimates';
8
- export * from './ExportOrders202Response';
9
- export * from './Fulfillment';
10
- export * from './FulfillmentItem';
11
- export * from './Order';
12
- export * from './OrderItem';
13
- export * from './OrderItemTaxPrice';
14
- export * from './OrderTracking';
15
- export * from './OrdersResponse';
16
- export * from './Origin';
17
- export * from './Price';
18
- export * from './ShippingMethod';
19
- export * from './Status';
20
- export * from './StatusHistoryItem';
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- /* tslint:disable */
18
- /* eslint-disable */
19
- __exportStar(require("./Address"), exports);
20
- __exportStar(require("./ApiError"), exports);
21
- __exportStar(require("./ConfirmOrderFulfillment"), exports);
22
- __exportStar(require("./ConfirmOrderRequest"), exports);
23
- __exportStar(require("./ConfirmOrderValidationError"), exports);
24
- __exportStar(require("./ContactInformation"), exports);
25
- __exportStar(require("./DeliveryEstimates"), exports);
26
- __exportStar(require("./ExportOrders202Response"), exports);
27
- __exportStar(require("./Fulfillment"), exports);
28
- __exportStar(require("./FulfillmentItem"), exports);
29
- __exportStar(require("./Order"), exports);
30
- __exportStar(require("./OrderItem"), exports);
31
- __exportStar(require("./OrderItemTaxPrice"), exports);
32
- __exportStar(require("./OrderTracking"), exports);
33
- __exportStar(require("./OrdersResponse"), exports);
34
- __exportStar(require("./Origin"), exports);
35
- __exportStar(require("./Price"), exports);
36
- __exportStar(require("./ShippingMethod"), exports);
37
- __exportStar(require("./Status"), exports);
38
- __exportStar(require("./StatusHistoryItem"), exports);
package/dist/runtime.d.ts DELETED
@@ -1,187 +0,0 @@
1
- /**
2
- * Orders API
3
- * Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API. For full documentation on functionality and account auth settings go to [teemill.com](https://teemill.com/api-docs/orders)
4
- *
5
- * The version of the OpenAPI document: 1.5.5
6
- * Contact: hello@teemill.com
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- export type OptionalProperties<T> = {
13
- [K in keyof T]-?: undefined extends T[K] ? K : never;
14
- }[keyof T];
15
- export type OptionalOnly<T> = Partial<Pick<T, OptionalProperties<T>>>;
16
- export declare const BASE_PATH: string;
17
- export interface ConfigurationParameters {
18
- basePath?: string;
19
- fetchApi?: FetchAPI;
20
- middleware?: Middleware[];
21
- queryParamsStringify?: (params: HTTPQuery) => string;
22
- username?: string;
23
- password?: string;
24
- apiKey?: string | ((name: string) => string);
25
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
26
- headers?: HTTPHeaders;
27
- credentials?: RequestCredentials;
28
- }
29
- export declare class Configuration {
30
- private configuration;
31
- constructor(configuration?: ConfigurationParameters);
32
- set config(configuration: Configuration);
33
- get basePath(): string;
34
- get fetchApi(): FetchAPI | undefined;
35
- get middleware(): Middleware[];
36
- get queryParamsStringify(): (params: HTTPQuery) => string;
37
- get username(): string | undefined;
38
- get password(): string | undefined;
39
- get apiKey(): ((name: string) => string) | undefined;
40
- get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
41
- get headers(): HTTPHeaders | undefined;
42
- get credentials(): RequestCredentials | undefined;
43
- }
44
- export declare const DefaultConfig: Configuration;
45
- /**
46
- * This is the base class for all generated API classes.
47
- */
48
- export declare class BaseAPI {
49
- protected configuration: Configuration;
50
- private static readonly jsonRegex;
51
- private middleware;
52
- constructor(configuration?: Configuration);
53
- isResponseError(error: any): error is ResponseError;
54
- withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
55
- withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
56
- withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
57
- /**
58
- * Check if the given MIME is a JSON MIME.
59
- * JSON MIME examples:
60
- * application/json
61
- * application/json; charset=UTF8
62
- * APPLICATION/JSON
63
- * application/vnd.company+json
64
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
65
- * @return True if the given MIME is JSON, false otherwise.
66
- */
67
- protected isJsonMime(mime: string | null | undefined): boolean;
68
- protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
69
- private createFetchParams;
70
- private fetchApi;
71
- /**
72
- * Create a shallow clone of `this` by constructing a new instance
73
- * and then shallow cloning data members.
74
- */
75
- private clone;
76
- }
77
- export declare class ResponseError extends Error {
78
- response: Response;
79
- name: "ResponseError";
80
- constructor(response: Response, msg?: string);
81
- }
82
- export declare class FetchError extends Error {
83
- cause: Error;
84
- name: "FetchError";
85
- constructor(cause: Error, msg?: string);
86
- }
87
- export declare class RequiredError extends Error {
88
- field: string;
89
- name: "RequiredError";
90
- constructor(field: string, msg?: string);
91
- }
92
- export declare const COLLECTION_FORMATS: {
93
- csv: string;
94
- ssv: string;
95
- tsv: string;
96
- pipes: string;
97
- };
98
- export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
99
- export type Json = any;
100
- export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
101
- export type HTTPHeaders = {
102
- [key: string]: string;
103
- };
104
- export type HTTPQuery = {
105
- [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
106
- };
107
- export type HTTPBody = Json | FormData | URLSearchParams;
108
- export type HTTPRequestInit = {
109
- headers?: HTTPHeaders;
110
- method: HTTPMethod;
111
- credentials?: RequestCredentials;
112
- body?: HTTPBody;
113
- };
114
- export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
115
- export type InitOverrideFunction = (requestContext: {
116
- init: HTTPRequestInit;
117
- context: RequestOpts;
118
- }) => Promise<RequestInit>;
119
- export interface FetchParams {
120
- url: string;
121
- init: RequestInit;
122
- }
123
- export interface RequestOpts {
124
- path: string;
125
- method: HTTPMethod;
126
- headers: HTTPHeaders;
127
- query?: HTTPQuery;
128
- body?: HTTPBody;
129
- }
130
- export declare function exists(json: any, key: string): boolean;
131
- export declare function querystring(params: HTTPQuery, prefix?: string): string;
132
- export declare function mapValues(data: any, fn: (item: any) => any): {};
133
- export declare function canConsumeForm(consumes: Consume[]): boolean;
134
- export interface Consume {
135
- contentType: string;
136
- }
137
- export interface RequestContext {
138
- fetch: FetchAPI;
139
- url: string;
140
- init: RequestInit;
141
- }
142
- export interface ResponseContext {
143
- fetch: FetchAPI;
144
- url: string;
145
- init: RequestInit;
146
- response: Response;
147
- }
148
- export interface ErrorContext {
149
- fetch: FetchAPI;
150
- url: string;
151
- init: RequestInit;
152
- error: unknown;
153
- response?: Response;
154
- }
155
- export interface Middleware {
156
- pre?(context: RequestContext): Promise<FetchParams | void>;
157
- post?(context: ResponseContext): Promise<Response | void>;
158
- onError?(context: ErrorContext): Promise<Response | void>;
159
- }
160
- export interface ApiResponse<T> {
161
- raw: Response;
162
- value(): Promise<T>;
163
- }
164
- export interface ResponseTransformer<T> {
165
- (json: any): T;
166
- }
167
- export declare class JSONApiResponse<T> {
168
- raw: Response;
169
- private transformer;
170
- constructor(raw: Response, transformer?: ResponseTransformer<T>);
171
- value(): Promise<T>;
172
- }
173
- export declare class VoidApiResponse {
174
- raw: Response;
175
- constructor(raw: Response);
176
- value(): Promise<void>;
177
- }
178
- export declare class BlobApiResponse {
179
- raw: Response;
180
- constructor(raw: Response);
181
- value(): Promise<Blob>;
182
- }
183
- export declare class TextApiResponse {
184
- raw: Response;
185
- constructor(raw: Response);
186
- value(): Promise<string>;
187
- }