@deliverart/sdk-js-image 1.1.6

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.
@@ -0,0 +1,167 @@
1
+ import { z } from 'zod';
2
+ import { AbstractApiRequest } from '@deliverart/sdk-js-core';
3
+ import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
4
+ import { Paginated } from '@deliverart/sdk-js-global-types';
5
+ import { AxiosResponse } from 'axios';
6
+
7
+ declare const imageSchema: z.ZodObject<{
8
+ id: z.ZodString;
9
+ variant: z.ZodNullable<z.ZodString>;
10
+ contentUrl: z.ZodURL;
11
+ filePath: z.ZodString;
12
+ createdAt: z.ZodString;
13
+ updatedAt: z.ZodString;
14
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
15
+ id: z.ZodString;
16
+ variant: z.ZodNullable<z.ZodString>;
17
+ contentUrl: z.ZodURL;
18
+ filePath: z.ZodString;
19
+ createdAt: z.ZodString;
20
+ updatedAt: z.ZodString;
21
+ }, z.core.$strip>>>;
22
+ }, z.core.$strip>;
23
+ type Image = z.infer<typeof imageSchema>;
24
+
25
+ declare const deleteImageInputSchema: z.ZodUndefined;
26
+ declare const deleteImageResponseSchema: z.ZodUndefined;
27
+ declare class DeleteImage extends AbstractApiRequest<typeof deleteImageInputSchema, typeof deleteImageResponseSchema> {
28
+ readonly method = "DELETE";
29
+ readonly contentType = "application/json";
30
+ readonly accept = "application/json";
31
+ readonly inputSchema: z.ZodUndefined;
32
+ readonly outputSchema: z.ZodUndefined;
33
+ readonly querySchema: undefined;
34
+ readonly headersSchema: undefined;
35
+ private readonly imageId;
36
+ constructor(imageId: string);
37
+ getPath(): string;
38
+ }
39
+
40
+ declare const getImageDetailsInputSchema: z.ZodUndefined;
41
+ type GetImageDetailsInput = z.input<typeof getImageDetailsInputSchema>;
42
+ declare const getImageDetailsResponseSchema: z.ZodObject<{
43
+ id: z.ZodString;
44
+ variant: z.ZodNullable<z.ZodString>;
45
+ contentUrl: z.ZodURL;
46
+ filePath: z.ZodString;
47
+ createdAt: z.ZodString;
48
+ updatedAt: z.ZodString;
49
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
50
+ id: z.ZodString;
51
+ variant: z.ZodNullable<z.ZodString>;
52
+ contentUrl: z.ZodURL;
53
+ filePath: z.ZodString;
54
+ createdAt: z.ZodString;
55
+ updatedAt: z.ZodString;
56
+ }, z.core.$strip>>>;
57
+ }, z.core.$strip>;
58
+ type GetImageDetailsResponse = z.infer<typeof getImageDetailsResponseSchema>;
59
+ declare class GetImageDetails extends AbstractApiRequest<typeof getImageDetailsInputSchema, typeof getImageDetailsResponseSchema> {
60
+ readonly method = "GET";
61
+ readonly contentType = "application/json";
62
+ readonly accept = "application/json";
63
+ readonly inputSchema: z.ZodUndefined;
64
+ readonly outputSchema: z.ZodObject<{
65
+ id: z.ZodString;
66
+ variant: z.ZodNullable<z.ZodString>;
67
+ contentUrl: z.ZodURL;
68
+ filePath: z.ZodString;
69
+ createdAt: z.ZodString;
70
+ updatedAt: z.ZodString;
71
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
72
+ id: z.ZodString;
73
+ variant: z.ZodNullable<z.ZodString>;
74
+ contentUrl: z.ZodURL;
75
+ filePath: z.ZodString;
76
+ createdAt: z.ZodString;
77
+ updatedAt: z.ZodString;
78
+ }, z.core.$strip>>>;
79
+ }, z.core.$strip>;
80
+ readonly querySchema: undefined;
81
+ readonly headersSchema: undefined;
82
+ private readonly imageId;
83
+ constructor(imageId: string);
84
+ getPath(): string;
85
+ }
86
+
87
+ declare const getImagesQuerySchema: z.ZodObject<{
88
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
89
+ }, z.core.$strip>;
90
+ type GetImagesQueryParams = z.infer<typeof getImagesQuerySchema>;
91
+ declare const getImagesInputSchema: z.ZodUndefined;
92
+ type GetImagesInput = z.infer<typeof getImagesInputSchema>;
93
+ declare const getImagesResponseSchema: z.ZodObject<{
94
+ data: z.ZodArray<z.ZodObject<{
95
+ id: z.ZodString;
96
+ variant: z.ZodNullable<z.ZodString>;
97
+ contentUrl: z.ZodURL;
98
+ filePath: z.ZodString;
99
+ createdAt: z.ZodString;
100
+ updatedAt: z.ZodString;
101
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
102
+ id: z.ZodString;
103
+ variant: z.ZodNullable<z.ZodString>;
104
+ contentUrl: z.ZodURL;
105
+ filePath: z.ZodString;
106
+ createdAt: z.ZodString;
107
+ updatedAt: z.ZodString;
108
+ }, z.core.$strip>>>;
109
+ }, z.core.$strip>>;
110
+ pagination: z.ZodObject<{
111
+ from: z.ZodNumber;
112
+ to: z.ZodNumber;
113
+ itemsPerPage: z.ZodNumber;
114
+ totalItems: z.ZodNumber;
115
+ currentPage: z.ZodNumber;
116
+ lastPage: z.ZodNumber;
117
+ }, z.core.$strip>;
118
+ }, z.core.$strip>;
119
+ type GetImagesResponse = z.infer<typeof getImagesResponseSchema>;
120
+ declare class GetImages extends AbstractApiRequest<typeof getImagesInputSchema, typeof getImagesResponseSchema, GetImagesQueryParams> {
121
+ readonly method = "GET";
122
+ readonly contentType = "application/json";
123
+ readonly accept = "application/json";
124
+ readonly inputSchema: z.ZodUndefined;
125
+ readonly outputSchema: z.ZodObject<{
126
+ data: z.ZodArray<z.ZodObject<{
127
+ id: z.ZodString;
128
+ variant: z.ZodNullable<z.ZodString>;
129
+ contentUrl: z.ZodURL;
130
+ filePath: z.ZodString;
131
+ createdAt: z.ZodString;
132
+ updatedAt: z.ZodString;
133
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
134
+ id: z.ZodString;
135
+ variant: z.ZodNullable<z.ZodString>;
136
+ contentUrl: z.ZodURL;
137
+ filePath: z.ZodString;
138
+ createdAt: z.ZodString;
139
+ updatedAt: z.ZodString;
140
+ }, z.core.$strip>>>;
141
+ }, z.core.$strip>>;
142
+ pagination: z.ZodObject<{
143
+ from: z.ZodNumber;
144
+ to: z.ZodNumber;
145
+ itemsPerPage: z.ZodNumber;
146
+ totalItems: z.ZodNumber;
147
+ currentPage: z.ZodNumber;
148
+ lastPage: z.ZodNumber;
149
+ }, z.core.$strip>;
150
+ }, z.core.$strip>;
151
+ readonly querySchema: z.ZodObject<{
152
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
153
+ }, z.core.$strip>;
154
+ readonly headersSchema: undefined;
155
+ constructor(options?: {
156
+ query?: GetImagesQueryParams;
157
+ });
158
+ getPath(): string;
159
+ parseResponse(data: unknown, rawResponse: AxiosResponse): Paginated<Image>;
160
+ }
161
+
162
+ declare const imageIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/images/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/images/:id">, unknown>>;
163
+ type imageIri = z.infer<typeof imageIriSchema>;
164
+ declare const imageNullableIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/images/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/images/:id"> | null, unknown>>;
165
+ type imageNullableIri = z.infer<typeof imageNullableIriSchema>;
166
+
167
+ export { DeleteImage, GetImageDetails, type GetImageDetailsInput, type GetImageDetailsResponse, GetImages, type GetImagesInput, type GetImagesQueryParams, type GetImagesResponse, type Image, deleteImageInputSchema, deleteImageResponseSchema, getImageDetailsInputSchema, getImageDetailsResponseSchema, getImagesInputSchema, getImagesQuerySchema, getImagesResponseSchema, type imageIri, imageIriSchema, type imageNullableIri, imageNullableIriSchema, imageSchema };
@@ -0,0 +1,167 @@
1
+ import { z } from 'zod';
2
+ import { AbstractApiRequest } from '@deliverart/sdk-js-core';
3
+ import * as _deliverart_sdk_js_global_types from '@deliverart/sdk-js-global-types';
4
+ import { Paginated } from '@deliverart/sdk-js-global-types';
5
+ import { AxiosResponse } from 'axios';
6
+
7
+ declare const imageSchema: z.ZodObject<{
8
+ id: z.ZodString;
9
+ variant: z.ZodNullable<z.ZodString>;
10
+ contentUrl: z.ZodURL;
11
+ filePath: z.ZodString;
12
+ createdAt: z.ZodString;
13
+ updatedAt: z.ZodString;
14
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
15
+ id: z.ZodString;
16
+ variant: z.ZodNullable<z.ZodString>;
17
+ contentUrl: z.ZodURL;
18
+ filePath: z.ZodString;
19
+ createdAt: z.ZodString;
20
+ updatedAt: z.ZodString;
21
+ }, z.core.$strip>>>;
22
+ }, z.core.$strip>;
23
+ type Image = z.infer<typeof imageSchema>;
24
+
25
+ declare const deleteImageInputSchema: z.ZodUndefined;
26
+ declare const deleteImageResponseSchema: z.ZodUndefined;
27
+ declare class DeleteImage extends AbstractApiRequest<typeof deleteImageInputSchema, typeof deleteImageResponseSchema> {
28
+ readonly method = "DELETE";
29
+ readonly contentType = "application/json";
30
+ readonly accept = "application/json";
31
+ readonly inputSchema: z.ZodUndefined;
32
+ readonly outputSchema: z.ZodUndefined;
33
+ readonly querySchema: undefined;
34
+ readonly headersSchema: undefined;
35
+ private readonly imageId;
36
+ constructor(imageId: string);
37
+ getPath(): string;
38
+ }
39
+
40
+ declare const getImageDetailsInputSchema: z.ZodUndefined;
41
+ type GetImageDetailsInput = z.input<typeof getImageDetailsInputSchema>;
42
+ declare const getImageDetailsResponseSchema: z.ZodObject<{
43
+ id: z.ZodString;
44
+ variant: z.ZodNullable<z.ZodString>;
45
+ contentUrl: z.ZodURL;
46
+ filePath: z.ZodString;
47
+ createdAt: z.ZodString;
48
+ updatedAt: z.ZodString;
49
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
50
+ id: z.ZodString;
51
+ variant: z.ZodNullable<z.ZodString>;
52
+ contentUrl: z.ZodURL;
53
+ filePath: z.ZodString;
54
+ createdAt: z.ZodString;
55
+ updatedAt: z.ZodString;
56
+ }, z.core.$strip>>>;
57
+ }, z.core.$strip>;
58
+ type GetImageDetailsResponse = z.infer<typeof getImageDetailsResponseSchema>;
59
+ declare class GetImageDetails extends AbstractApiRequest<typeof getImageDetailsInputSchema, typeof getImageDetailsResponseSchema> {
60
+ readonly method = "GET";
61
+ readonly contentType = "application/json";
62
+ readonly accept = "application/json";
63
+ readonly inputSchema: z.ZodUndefined;
64
+ readonly outputSchema: z.ZodObject<{
65
+ id: z.ZodString;
66
+ variant: z.ZodNullable<z.ZodString>;
67
+ contentUrl: z.ZodURL;
68
+ filePath: z.ZodString;
69
+ createdAt: z.ZodString;
70
+ updatedAt: z.ZodString;
71
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
72
+ id: z.ZodString;
73
+ variant: z.ZodNullable<z.ZodString>;
74
+ contentUrl: z.ZodURL;
75
+ filePath: z.ZodString;
76
+ createdAt: z.ZodString;
77
+ updatedAt: z.ZodString;
78
+ }, z.core.$strip>>>;
79
+ }, z.core.$strip>;
80
+ readonly querySchema: undefined;
81
+ readonly headersSchema: undefined;
82
+ private readonly imageId;
83
+ constructor(imageId: string);
84
+ getPath(): string;
85
+ }
86
+
87
+ declare const getImagesQuerySchema: z.ZodObject<{
88
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
89
+ }, z.core.$strip>;
90
+ type GetImagesQueryParams = z.infer<typeof getImagesQuerySchema>;
91
+ declare const getImagesInputSchema: z.ZodUndefined;
92
+ type GetImagesInput = z.infer<typeof getImagesInputSchema>;
93
+ declare const getImagesResponseSchema: z.ZodObject<{
94
+ data: z.ZodArray<z.ZodObject<{
95
+ id: z.ZodString;
96
+ variant: z.ZodNullable<z.ZodString>;
97
+ contentUrl: z.ZodURL;
98
+ filePath: z.ZodString;
99
+ createdAt: z.ZodString;
100
+ updatedAt: z.ZodString;
101
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
102
+ id: z.ZodString;
103
+ variant: z.ZodNullable<z.ZodString>;
104
+ contentUrl: z.ZodURL;
105
+ filePath: z.ZodString;
106
+ createdAt: z.ZodString;
107
+ updatedAt: z.ZodString;
108
+ }, z.core.$strip>>>;
109
+ }, z.core.$strip>>;
110
+ pagination: z.ZodObject<{
111
+ from: z.ZodNumber;
112
+ to: z.ZodNumber;
113
+ itemsPerPage: z.ZodNumber;
114
+ totalItems: z.ZodNumber;
115
+ currentPage: z.ZodNumber;
116
+ lastPage: z.ZodNumber;
117
+ }, z.core.$strip>;
118
+ }, z.core.$strip>;
119
+ type GetImagesResponse = z.infer<typeof getImagesResponseSchema>;
120
+ declare class GetImages extends AbstractApiRequest<typeof getImagesInputSchema, typeof getImagesResponseSchema, GetImagesQueryParams> {
121
+ readonly method = "GET";
122
+ readonly contentType = "application/json";
123
+ readonly accept = "application/json";
124
+ readonly inputSchema: z.ZodUndefined;
125
+ readonly outputSchema: z.ZodObject<{
126
+ data: z.ZodArray<z.ZodObject<{
127
+ id: z.ZodString;
128
+ variant: z.ZodNullable<z.ZodString>;
129
+ contentUrl: z.ZodURL;
130
+ filePath: z.ZodString;
131
+ createdAt: z.ZodString;
132
+ updatedAt: z.ZodString;
133
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
134
+ id: z.ZodString;
135
+ variant: z.ZodNullable<z.ZodString>;
136
+ contentUrl: z.ZodURL;
137
+ filePath: z.ZodString;
138
+ createdAt: z.ZodString;
139
+ updatedAt: z.ZodString;
140
+ }, z.core.$strip>>>;
141
+ }, z.core.$strip>>;
142
+ pagination: z.ZodObject<{
143
+ from: z.ZodNumber;
144
+ to: z.ZodNumber;
145
+ itemsPerPage: z.ZodNumber;
146
+ totalItems: z.ZodNumber;
147
+ currentPage: z.ZodNumber;
148
+ lastPage: z.ZodNumber;
149
+ }, z.core.$strip>;
150
+ }, z.core.$strip>;
151
+ readonly querySchema: z.ZodObject<{
152
+ page: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
153
+ }, z.core.$strip>;
154
+ readonly headersSchema: undefined;
155
+ constructor(options?: {
156
+ query?: GetImagesQueryParams;
157
+ });
158
+ getPath(): string;
159
+ parseResponse(data: unknown, rawResponse: AxiosResponse): Paginated<Image>;
160
+ }
161
+
162
+ declare const imageIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/images/:id">, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/images/:id">, unknown>>;
163
+ type imageIri = z.infer<typeof imageIriSchema>;
164
+ declare const imageNullableIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/images/:id"> | null, unknown, z.core.$ZodTypeInternals<_deliverart_sdk_js_global_types.IriObject<"/images/:id"> | null, unknown>>;
165
+ type imageNullableIri = z.infer<typeof imageNullableIriSchema>;
166
+
167
+ export { DeleteImage, GetImageDetails, type GetImageDetailsInput, type GetImageDetailsResponse, GetImages, type GetImagesInput, type GetImagesQueryParams, type GetImagesResponse, type Image, deleteImageInputSchema, deleteImageResponseSchema, getImageDetailsInputSchema, getImageDetailsResponseSchema, getImagesInputSchema, getImagesQuerySchema, getImagesResponseSchema, type imageIri, imageIriSchema, type imageNullableIri, imageNullableIriSchema, imageSchema };