@swishapp/api-client 0.2.0 → 0.4.0
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.
- package/dist/client/sdk.gen.d.ts +19 -16
- package/dist/client/sdk.gen.js +18 -8
- package/dist/client/types.gen.d.ts +382 -360
- package/dist/index.d.ts +19 -18
- package/dist/index.js +13 -12
- package/package.json +1 -1
|
@@ -7,10 +7,6 @@ export type List = {
|
|
|
7
7
|
* The name of the list
|
|
8
8
|
*/
|
|
9
9
|
name: string;
|
|
10
|
-
/**
|
|
11
|
-
* Whether the list is readonly
|
|
12
|
-
*/
|
|
13
|
-
readonly: boolean;
|
|
14
10
|
/**
|
|
15
11
|
* The date and time the list was created
|
|
16
12
|
*/
|
|
@@ -20,13 +16,31 @@ export type List = {
|
|
|
20
16
|
*/
|
|
21
17
|
updatedAt: string;
|
|
22
18
|
};
|
|
23
|
-
export type
|
|
19
|
+
export type _Error = {
|
|
20
|
+
/**
|
|
21
|
+
* The error message
|
|
22
|
+
*/
|
|
24
23
|
message: string;
|
|
24
|
+
/**
|
|
25
|
+
* The error type
|
|
26
|
+
*/
|
|
25
27
|
error: string;
|
|
28
|
+
/**
|
|
29
|
+
* The HTTP status code of the error
|
|
30
|
+
*/
|
|
26
31
|
statusCode: number;
|
|
32
|
+
/**
|
|
33
|
+
* The ID of the request that caused the error
|
|
34
|
+
*/
|
|
27
35
|
requestId: string;
|
|
28
36
|
};
|
|
29
|
-
export type
|
|
37
|
+
export type ErrorResponse = {
|
|
38
|
+
/**
|
|
39
|
+
* Error details
|
|
40
|
+
*/
|
|
41
|
+
error: _Error;
|
|
42
|
+
};
|
|
43
|
+
export type PageInfo = {
|
|
30
44
|
/**
|
|
31
45
|
* The cursor for the next page
|
|
32
46
|
*/
|
|
@@ -40,19 +54,19 @@ export type PageInfoDto = {
|
|
|
40
54
|
[key: string]: unknown;
|
|
41
55
|
} | null;
|
|
42
56
|
};
|
|
43
|
-
export type
|
|
44
|
-
pageInfo:
|
|
57
|
+
export type PaginatedResponse = {
|
|
58
|
+
pageInfo: PageInfo;
|
|
45
59
|
};
|
|
46
|
-
export type
|
|
60
|
+
export type Response = {
|
|
47
61
|
[key: string]: unknown;
|
|
48
62
|
};
|
|
49
|
-
export type
|
|
63
|
+
export type CreateListInput = {
|
|
50
64
|
/**
|
|
51
65
|
* The name of the list
|
|
52
66
|
*/
|
|
53
67
|
name: string;
|
|
54
68
|
};
|
|
55
|
-
export type
|
|
69
|
+
export type UpdateListInput = {
|
|
56
70
|
/**
|
|
57
71
|
* The name of the list
|
|
58
72
|
*/
|
|
@@ -72,7 +86,7 @@ export type Item = {
|
|
|
72
86
|
*/
|
|
73
87
|
variantId: {
|
|
74
88
|
[key: string]: unknown;
|
|
75
|
-
};
|
|
89
|
+
} | null;
|
|
76
90
|
/**
|
|
77
91
|
* The quantity of the item in the list
|
|
78
92
|
*/
|
|
@@ -86,7 +100,7 @@ export type Item = {
|
|
|
86
100
|
*/
|
|
87
101
|
updatedAt: string;
|
|
88
102
|
};
|
|
89
|
-
export type
|
|
103
|
+
export type CreateItemInput = {
|
|
90
104
|
/**
|
|
91
105
|
* The Shopify ID of the product
|
|
92
106
|
*/
|
|
@@ -94,188 +108,182 @@ export type CreateItemDto = {
|
|
|
94
108
|
/**
|
|
95
109
|
* The Shopify ID of the variant
|
|
96
110
|
*/
|
|
97
|
-
variantId
|
|
111
|
+
variantId?: number;
|
|
98
112
|
/**
|
|
99
113
|
* The quantity of the item
|
|
100
114
|
*/
|
|
101
|
-
quantity
|
|
115
|
+
quantity?: number;
|
|
102
116
|
};
|
|
103
|
-
export type
|
|
117
|
+
export type ItemReference = {
|
|
104
118
|
/**
|
|
105
119
|
* The ID of the item
|
|
106
120
|
*/
|
|
107
121
|
id: string;
|
|
108
122
|
};
|
|
109
|
-
export type
|
|
110
|
-
items: Array<
|
|
123
|
+
export type DeleteItemsInput = {
|
|
124
|
+
items: Array<ItemReference>;
|
|
111
125
|
};
|
|
112
|
-
export type
|
|
126
|
+
export type UpdateItemInput = {
|
|
113
127
|
/**
|
|
114
128
|
* The Shopify ID of the product
|
|
115
129
|
*/
|
|
116
|
-
productId
|
|
130
|
+
productId?: number;
|
|
117
131
|
/**
|
|
118
132
|
* The Shopify ID of the variant
|
|
119
133
|
*/
|
|
120
|
-
variantId
|
|
134
|
+
variantId?: number;
|
|
121
135
|
/**
|
|
122
136
|
* The quantity of the item
|
|
123
137
|
*/
|
|
124
|
-
quantity
|
|
138
|
+
quantity?: number;
|
|
139
|
+
};
|
|
140
|
+
export type CreateProfileTokenResponse = {
|
|
141
|
+
/**
|
|
142
|
+
* A Swish API token for the profile
|
|
143
|
+
*/
|
|
144
|
+
token: string;
|
|
145
|
+
/**
|
|
146
|
+
* The profile associated with the token
|
|
147
|
+
*/
|
|
148
|
+
profile: string;
|
|
125
149
|
};
|
|
126
|
-
export type
|
|
150
|
+
export type IdentifyProfileResponse = {
|
|
127
151
|
/**
|
|
128
152
|
* The auth flow to use
|
|
129
153
|
*/
|
|
130
154
|
authFlow: string;
|
|
131
155
|
};
|
|
132
|
-
export type
|
|
156
|
+
export type IdentifyProfileInput = {
|
|
133
157
|
/**
|
|
134
158
|
* The email of the profile to identify
|
|
135
159
|
*/
|
|
136
160
|
email: string;
|
|
137
161
|
};
|
|
138
|
-
export type
|
|
162
|
+
export type CreateProfileTokenInput = {
|
|
163
|
+
/**
|
|
164
|
+
* A customer GID to create a token for.
|
|
165
|
+
*/
|
|
166
|
+
customer?: string;
|
|
167
|
+
/**
|
|
168
|
+
* A session GID to link to the customer.
|
|
169
|
+
*/
|
|
170
|
+
session?: string;
|
|
171
|
+
};
|
|
172
|
+
export type ListControllerFindData = {
|
|
139
173
|
body?: never;
|
|
140
|
-
headers: {
|
|
141
|
-
/**
|
|
142
|
-
* Your Swish API key
|
|
143
|
-
*/
|
|
144
|
-
Authorization: string;
|
|
145
|
-
/**
|
|
146
|
-
* The shop domain
|
|
147
|
-
*/
|
|
148
|
-
Shop: string;
|
|
149
|
-
/**
|
|
150
|
-
* The profile key
|
|
151
|
-
*/
|
|
152
|
-
Key: string;
|
|
153
|
-
};
|
|
154
174
|
path?: never;
|
|
155
175
|
query?: {
|
|
156
176
|
/**
|
|
157
|
-
* The
|
|
177
|
+
* The page cursor
|
|
158
178
|
*/
|
|
159
|
-
|
|
179
|
+
page?: string;
|
|
160
180
|
};
|
|
161
181
|
url: '/lists';
|
|
162
182
|
};
|
|
163
|
-
export type
|
|
183
|
+
export type ListControllerFindErrors = {
|
|
164
184
|
/**
|
|
165
185
|
* Bad Request
|
|
166
186
|
*/
|
|
167
|
-
400:
|
|
168
|
-
|
|
169
|
-
|
|
187
|
+
400: ErrorResponse & {
|
|
188
|
+
error?: {
|
|
189
|
+
statusCode?: number;
|
|
190
|
+
error?: string;
|
|
191
|
+
};
|
|
170
192
|
};
|
|
171
193
|
/**
|
|
172
194
|
* Unauthorized
|
|
173
195
|
*/
|
|
174
|
-
401:
|
|
175
|
-
|
|
176
|
-
|
|
196
|
+
401: ErrorResponse & {
|
|
197
|
+
error?: {
|
|
198
|
+
statusCode?: number;
|
|
199
|
+
error?: string;
|
|
200
|
+
};
|
|
177
201
|
};
|
|
178
202
|
/**
|
|
179
203
|
* Forbidden
|
|
180
204
|
*/
|
|
181
|
-
403:
|
|
182
|
-
|
|
183
|
-
|
|
205
|
+
403: ErrorResponse & {
|
|
206
|
+
error?: {
|
|
207
|
+
statusCode?: number;
|
|
208
|
+
error?: string;
|
|
209
|
+
};
|
|
184
210
|
};
|
|
185
211
|
/**
|
|
186
212
|
* Not Found
|
|
187
213
|
*/
|
|
188
|
-
404:
|
|
189
|
-
|
|
190
|
-
|
|
214
|
+
404: ErrorResponse & {
|
|
215
|
+
error?: {
|
|
216
|
+
statusCode?: number;
|
|
217
|
+
error?: string;
|
|
218
|
+
};
|
|
191
219
|
};
|
|
192
220
|
};
|
|
193
|
-
export type
|
|
194
|
-
export type
|
|
221
|
+
export type ListControllerFindError = ListControllerFindErrors[keyof ListControllerFindErrors];
|
|
222
|
+
export type ListControllerFindResponses = {
|
|
195
223
|
/**
|
|
196
224
|
* Returns all lists as paginated response
|
|
197
225
|
*/
|
|
198
|
-
200:
|
|
226
|
+
200: PaginatedResponse & {
|
|
199
227
|
data?: Array<List>;
|
|
200
228
|
};
|
|
201
229
|
};
|
|
202
|
-
export type
|
|
203
|
-
export type
|
|
204
|
-
body:
|
|
205
|
-
headers: {
|
|
206
|
-
/**
|
|
207
|
-
* Your Swish API key
|
|
208
|
-
*/
|
|
209
|
-
Authorization: string;
|
|
210
|
-
/**
|
|
211
|
-
* The shop domain
|
|
212
|
-
*/
|
|
213
|
-
Shop: string;
|
|
214
|
-
/**
|
|
215
|
-
* The profile key
|
|
216
|
-
*/
|
|
217
|
-
Key: string;
|
|
218
|
-
};
|
|
230
|
+
export type ListControllerFindResponse = ListControllerFindResponses[keyof ListControllerFindResponses];
|
|
231
|
+
export type ListControllerCreateData = {
|
|
232
|
+
body: CreateListInput;
|
|
219
233
|
path?: never;
|
|
220
234
|
query?: never;
|
|
221
235
|
url: '/lists';
|
|
222
236
|
};
|
|
223
|
-
export type
|
|
237
|
+
export type ListControllerCreateErrors = {
|
|
224
238
|
/**
|
|
225
239
|
* Bad Request
|
|
226
240
|
*/
|
|
227
|
-
400:
|
|
228
|
-
|
|
229
|
-
|
|
241
|
+
400: ErrorResponse & {
|
|
242
|
+
error?: {
|
|
243
|
+
statusCode?: number;
|
|
244
|
+
error?: string;
|
|
245
|
+
};
|
|
230
246
|
};
|
|
231
247
|
/**
|
|
232
248
|
* Unauthorized
|
|
233
249
|
*/
|
|
234
|
-
401:
|
|
235
|
-
|
|
236
|
-
|
|
250
|
+
401: ErrorResponse & {
|
|
251
|
+
error?: {
|
|
252
|
+
statusCode?: number;
|
|
253
|
+
error?: string;
|
|
254
|
+
};
|
|
237
255
|
};
|
|
238
256
|
/**
|
|
239
257
|
* Forbidden
|
|
240
258
|
*/
|
|
241
|
-
403:
|
|
242
|
-
|
|
243
|
-
|
|
259
|
+
403: ErrorResponse & {
|
|
260
|
+
error?: {
|
|
261
|
+
statusCode?: number;
|
|
262
|
+
error?: string;
|
|
263
|
+
};
|
|
244
264
|
};
|
|
245
265
|
/**
|
|
246
266
|
* Not Found
|
|
247
267
|
*/
|
|
248
|
-
404:
|
|
249
|
-
|
|
250
|
-
|
|
268
|
+
404: ErrorResponse & {
|
|
269
|
+
error?: {
|
|
270
|
+
statusCode?: number;
|
|
271
|
+
error?: string;
|
|
272
|
+
};
|
|
251
273
|
};
|
|
252
274
|
};
|
|
253
|
-
export type
|
|
254
|
-
export type
|
|
275
|
+
export type ListControllerCreateError = ListControllerCreateErrors[keyof ListControllerCreateErrors];
|
|
276
|
+
export type ListControllerCreateResponses = {
|
|
255
277
|
/**
|
|
256
278
|
* The list has been successfully created.
|
|
257
279
|
*/
|
|
258
|
-
201:
|
|
280
|
+
201: Response & {
|
|
259
281
|
data?: List;
|
|
260
282
|
};
|
|
261
283
|
};
|
|
262
|
-
export type
|
|
263
|
-
export type
|
|
284
|
+
export type ListControllerCreateResponse = ListControllerCreateResponses[keyof ListControllerCreateResponses];
|
|
285
|
+
export type ListControllerDeleteByIdData = {
|
|
264
286
|
body?: never;
|
|
265
|
-
headers: {
|
|
266
|
-
/**
|
|
267
|
-
* Your Swish API key
|
|
268
|
-
*/
|
|
269
|
-
Authorization: string;
|
|
270
|
-
/**
|
|
271
|
-
* The shop domain
|
|
272
|
-
*/
|
|
273
|
-
Shop: string;
|
|
274
|
-
/**
|
|
275
|
-
* The profile key
|
|
276
|
-
*/
|
|
277
|
-
Key: string;
|
|
278
|
-
};
|
|
279
287
|
path: {
|
|
280
288
|
/**
|
|
281
289
|
* The ID of the list
|
|
@@ -285,60 +293,54 @@ export type ListControllerDeleteOneData = {
|
|
|
285
293
|
query?: never;
|
|
286
294
|
url: '/lists/{listId}';
|
|
287
295
|
};
|
|
288
|
-
export type
|
|
296
|
+
export type ListControllerDeleteByIdErrors = {
|
|
289
297
|
/**
|
|
290
298
|
* Bad Request
|
|
291
299
|
*/
|
|
292
|
-
400:
|
|
293
|
-
|
|
294
|
-
|
|
300
|
+
400: ErrorResponse & {
|
|
301
|
+
error?: {
|
|
302
|
+
statusCode?: number;
|
|
303
|
+
error?: string;
|
|
304
|
+
};
|
|
295
305
|
};
|
|
296
306
|
/**
|
|
297
307
|
* Unauthorized
|
|
298
308
|
*/
|
|
299
|
-
401:
|
|
300
|
-
|
|
301
|
-
|
|
309
|
+
401: ErrorResponse & {
|
|
310
|
+
error?: {
|
|
311
|
+
statusCode?: number;
|
|
312
|
+
error?: string;
|
|
313
|
+
};
|
|
302
314
|
};
|
|
303
315
|
/**
|
|
304
316
|
* Forbidden
|
|
305
317
|
*/
|
|
306
|
-
403:
|
|
307
|
-
|
|
308
|
-
|
|
318
|
+
403: ErrorResponse & {
|
|
319
|
+
error?: {
|
|
320
|
+
statusCode?: number;
|
|
321
|
+
error?: string;
|
|
322
|
+
};
|
|
309
323
|
};
|
|
310
324
|
/**
|
|
311
325
|
* Not Found
|
|
312
326
|
*/
|
|
313
|
-
404:
|
|
314
|
-
|
|
315
|
-
|
|
327
|
+
404: ErrorResponse & {
|
|
328
|
+
error?: {
|
|
329
|
+
statusCode?: number;
|
|
330
|
+
error?: string;
|
|
331
|
+
};
|
|
316
332
|
};
|
|
317
333
|
};
|
|
318
|
-
export type
|
|
319
|
-
export type
|
|
334
|
+
export type ListControllerDeleteByIdError = ListControllerDeleteByIdErrors[keyof ListControllerDeleteByIdErrors];
|
|
335
|
+
export type ListControllerDeleteByIdResponses = {
|
|
320
336
|
/**
|
|
321
337
|
* The list has been successfully deleted.
|
|
322
338
|
*/
|
|
323
339
|
204: void;
|
|
324
340
|
};
|
|
325
|
-
export type
|
|
326
|
-
export type
|
|
341
|
+
export type ListControllerDeleteByIdResponse = ListControllerDeleteByIdResponses[keyof ListControllerDeleteByIdResponses];
|
|
342
|
+
export type ListControllerFindByIdData = {
|
|
327
343
|
body?: never;
|
|
328
|
-
headers: {
|
|
329
|
-
/**
|
|
330
|
-
* Your Swish API key
|
|
331
|
-
*/
|
|
332
|
-
Authorization: string;
|
|
333
|
-
/**
|
|
334
|
-
* The shop domain
|
|
335
|
-
*/
|
|
336
|
-
Shop: string;
|
|
337
|
-
/**
|
|
338
|
-
* The profile key
|
|
339
|
-
*/
|
|
340
|
-
Key: string;
|
|
341
|
-
};
|
|
342
344
|
path: {
|
|
343
345
|
/**
|
|
344
346
|
* The ID of the list
|
|
@@ -348,62 +350,56 @@ export type ListControllerFindOneData = {
|
|
|
348
350
|
query?: never;
|
|
349
351
|
url: '/lists/{listId}';
|
|
350
352
|
};
|
|
351
|
-
export type
|
|
353
|
+
export type ListControllerFindByIdErrors = {
|
|
352
354
|
/**
|
|
353
355
|
* Bad Request
|
|
354
356
|
*/
|
|
355
|
-
400:
|
|
356
|
-
|
|
357
|
-
|
|
357
|
+
400: ErrorResponse & {
|
|
358
|
+
error?: {
|
|
359
|
+
statusCode?: number;
|
|
360
|
+
error?: string;
|
|
361
|
+
};
|
|
358
362
|
};
|
|
359
363
|
/**
|
|
360
364
|
* Unauthorized
|
|
361
365
|
*/
|
|
362
|
-
401:
|
|
363
|
-
|
|
364
|
-
|
|
366
|
+
401: ErrorResponse & {
|
|
367
|
+
error?: {
|
|
368
|
+
statusCode?: number;
|
|
369
|
+
error?: string;
|
|
370
|
+
};
|
|
365
371
|
};
|
|
366
372
|
/**
|
|
367
373
|
* Forbidden
|
|
368
374
|
*/
|
|
369
|
-
403:
|
|
370
|
-
|
|
371
|
-
|
|
375
|
+
403: ErrorResponse & {
|
|
376
|
+
error?: {
|
|
377
|
+
statusCode?: number;
|
|
378
|
+
error?: string;
|
|
379
|
+
};
|
|
372
380
|
};
|
|
373
381
|
/**
|
|
374
382
|
* Not Found
|
|
375
383
|
*/
|
|
376
|
-
404:
|
|
377
|
-
|
|
378
|
-
|
|
384
|
+
404: ErrorResponse & {
|
|
385
|
+
error?: {
|
|
386
|
+
statusCode?: number;
|
|
387
|
+
error?: string;
|
|
388
|
+
};
|
|
379
389
|
};
|
|
380
390
|
};
|
|
381
|
-
export type
|
|
382
|
-
export type
|
|
391
|
+
export type ListControllerFindByIdError = ListControllerFindByIdErrors[keyof ListControllerFindByIdErrors];
|
|
392
|
+
export type ListControllerFindByIdResponses = {
|
|
383
393
|
/**
|
|
384
394
|
* The list has been successfully retrieved.
|
|
385
395
|
*/
|
|
386
|
-
200:
|
|
396
|
+
200: Response & {
|
|
387
397
|
data?: List;
|
|
388
398
|
};
|
|
389
399
|
};
|
|
390
|
-
export type
|
|
391
|
-
export type
|
|
392
|
-
body:
|
|
393
|
-
headers: {
|
|
394
|
-
/**
|
|
395
|
-
* Your Swish API key
|
|
396
|
-
*/
|
|
397
|
-
Authorization: string;
|
|
398
|
-
/**
|
|
399
|
-
* The shop domain
|
|
400
|
-
*/
|
|
401
|
-
Shop: string;
|
|
402
|
-
/**
|
|
403
|
-
* The profile key
|
|
404
|
-
*/
|
|
405
|
-
Key: string;
|
|
406
|
-
};
|
|
400
|
+
export type ListControllerFindByIdResponse = ListControllerFindByIdResponses[keyof ListControllerFindByIdResponses];
|
|
401
|
+
export type ListControllerUpdateByIdData = {
|
|
402
|
+
body: UpdateListInput;
|
|
407
403
|
path: {
|
|
408
404
|
/**
|
|
409
405
|
* The ID of the list
|
|
@@ -413,62 +409,56 @@ export type ListControllerUpdateOneData = {
|
|
|
413
409
|
query?: never;
|
|
414
410
|
url: '/lists/{listId}';
|
|
415
411
|
};
|
|
416
|
-
export type
|
|
412
|
+
export type ListControllerUpdateByIdErrors = {
|
|
417
413
|
/**
|
|
418
414
|
* Bad Request
|
|
419
415
|
*/
|
|
420
|
-
400:
|
|
421
|
-
|
|
422
|
-
|
|
416
|
+
400: ErrorResponse & {
|
|
417
|
+
error?: {
|
|
418
|
+
statusCode?: number;
|
|
419
|
+
error?: string;
|
|
420
|
+
};
|
|
423
421
|
};
|
|
424
422
|
/**
|
|
425
423
|
* Unauthorized
|
|
426
424
|
*/
|
|
427
|
-
401:
|
|
428
|
-
|
|
429
|
-
|
|
425
|
+
401: ErrorResponse & {
|
|
426
|
+
error?: {
|
|
427
|
+
statusCode?: number;
|
|
428
|
+
error?: string;
|
|
429
|
+
};
|
|
430
430
|
};
|
|
431
431
|
/**
|
|
432
432
|
* Forbidden
|
|
433
433
|
*/
|
|
434
|
-
403:
|
|
435
|
-
|
|
436
|
-
|
|
434
|
+
403: ErrorResponse & {
|
|
435
|
+
error?: {
|
|
436
|
+
statusCode?: number;
|
|
437
|
+
error?: string;
|
|
438
|
+
};
|
|
437
439
|
};
|
|
438
440
|
/**
|
|
439
441
|
* Not Found
|
|
440
442
|
*/
|
|
441
|
-
404:
|
|
442
|
-
|
|
443
|
-
|
|
443
|
+
404: ErrorResponse & {
|
|
444
|
+
error?: {
|
|
445
|
+
statusCode?: number;
|
|
446
|
+
error?: string;
|
|
447
|
+
};
|
|
444
448
|
};
|
|
445
449
|
};
|
|
446
|
-
export type
|
|
447
|
-
export type
|
|
450
|
+
export type ListControllerUpdateByIdError = ListControllerUpdateByIdErrors[keyof ListControllerUpdateByIdErrors];
|
|
451
|
+
export type ListControllerUpdateByIdResponses = {
|
|
448
452
|
/**
|
|
449
453
|
* The list has been successfully updated.
|
|
450
454
|
*/
|
|
451
|
-
200:
|
|
455
|
+
200: Response & {
|
|
452
456
|
data?: List;
|
|
453
457
|
};
|
|
454
458
|
};
|
|
455
|
-
export type
|
|
459
|
+
export type ListControllerUpdateByIdResponse = ListControllerUpdateByIdResponses[keyof ListControllerUpdateByIdResponses];
|
|
456
460
|
export type ItemControllerDeleteData = {
|
|
457
|
-
body:
|
|
458
|
-
headers: {
|
|
459
|
-
/**
|
|
460
|
-
* Your Swish API key
|
|
461
|
-
*/
|
|
462
|
-
Authorization: string;
|
|
463
|
-
/**
|
|
464
|
-
* The shop domain
|
|
465
|
-
*/
|
|
466
|
-
Shop: string;
|
|
467
|
-
/**
|
|
468
|
-
* The profile key
|
|
469
|
-
*/
|
|
470
|
-
Key: string;
|
|
471
|
-
};
|
|
461
|
+
body: DeleteItemsInput;
|
|
472
462
|
path?: never;
|
|
473
463
|
query?: never;
|
|
474
464
|
url: '/items';
|
|
@@ -477,30 +467,38 @@ export type ItemControllerDeleteErrors = {
|
|
|
477
467
|
/**
|
|
478
468
|
* Bad Request
|
|
479
469
|
*/
|
|
480
|
-
400:
|
|
481
|
-
|
|
482
|
-
|
|
470
|
+
400: ErrorResponse & {
|
|
471
|
+
error?: {
|
|
472
|
+
statusCode?: number;
|
|
473
|
+
error?: string;
|
|
474
|
+
};
|
|
483
475
|
};
|
|
484
476
|
/**
|
|
485
477
|
* Unauthorized
|
|
486
478
|
*/
|
|
487
|
-
401:
|
|
488
|
-
|
|
489
|
-
|
|
479
|
+
401: ErrorResponse & {
|
|
480
|
+
error?: {
|
|
481
|
+
statusCode?: number;
|
|
482
|
+
error?: string;
|
|
483
|
+
};
|
|
490
484
|
};
|
|
491
485
|
/**
|
|
492
486
|
* Forbidden
|
|
493
487
|
*/
|
|
494
|
-
403:
|
|
495
|
-
|
|
496
|
-
|
|
488
|
+
403: ErrorResponse & {
|
|
489
|
+
error?: {
|
|
490
|
+
statusCode?: number;
|
|
491
|
+
error?: string;
|
|
492
|
+
};
|
|
497
493
|
};
|
|
498
494
|
/**
|
|
499
495
|
* Not Found
|
|
500
496
|
*/
|
|
501
|
-
404:
|
|
502
|
-
|
|
503
|
-
|
|
497
|
+
404: ErrorResponse & {
|
|
498
|
+
error?: {
|
|
499
|
+
statusCode?: number;
|
|
500
|
+
error?: string;
|
|
501
|
+
};
|
|
504
502
|
};
|
|
505
503
|
};
|
|
506
504
|
export type ItemControllerDeleteError = ItemControllerDeleteErrors[keyof ItemControllerDeleteErrors];
|
|
@@ -513,26 +511,12 @@ export type ItemControllerDeleteResponses = {
|
|
|
513
511
|
export type ItemControllerDeleteResponse = ItemControllerDeleteResponses[keyof ItemControllerDeleteResponses];
|
|
514
512
|
export type ItemControllerFindData = {
|
|
515
513
|
body?: never;
|
|
516
|
-
headers: {
|
|
517
|
-
/**
|
|
518
|
-
* Your Swish API key
|
|
519
|
-
*/
|
|
520
|
-
Authorization: string;
|
|
521
|
-
/**
|
|
522
|
-
* The shop domain
|
|
523
|
-
*/
|
|
524
|
-
Shop: string;
|
|
525
|
-
/**
|
|
526
|
-
* The profile key
|
|
527
|
-
*/
|
|
528
|
-
Key: string;
|
|
529
|
-
};
|
|
530
514
|
path?: never;
|
|
531
515
|
query?: {
|
|
532
516
|
/**
|
|
533
|
-
* The
|
|
517
|
+
* The page cursor
|
|
534
518
|
*/
|
|
535
|
-
|
|
519
|
+
page?: string;
|
|
536
520
|
};
|
|
537
521
|
url: '/items';
|
|
538
522
|
};
|
|
@@ -540,30 +524,38 @@ export type ItemControllerFindErrors = {
|
|
|
540
524
|
/**
|
|
541
525
|
* Bad Request
|
|
542
526
|
*/
|
|
543
|
-
400:
|
|
544
|
-
|
|
545
|
-
|
|
527
|
+
400: ErrorResponse & {
|
|
528
|
+
error?: {
|
|
529
|
+
statusCode?: number;
|
|
530
|
+
error?: string;
|
|
531
|
+
};
|
|
546
532
|
};
|
|
547
533
|
/**
|
|
548
534
|
* Unauthorized
|
|
549
535
|
*/
|
|
550
|
-
401:
|
|
551
|
-
|
|
552
|
-
|
|
536
|
+
401: ErrorResponse & {
|
|
537
|
+
error?: {
|
|
538
|
+
statusCode?: number;
|
|
539
|
+
error?: string;
|
|
540
|
+
};
|
|
553
541
|
};
|
|
554
542
|
/**
|
|
555
543
|
* Forbidden
|
|
556
544
|
*/
|
|
557
|
-
403:
|
|
558
|
-
|
|
559
|
-
|
|
545
|
+
403: ErrorResponse & {
|
|
546
|
+
error?: {
|
|
547
|
+
statusCode?: number;
|
|
548
|
+
error?: string;
|
|
549
|
+
};
|
|
560
550
|
};
|
|
561
551
|
/**
|
|
562
552
|
* Not Found
|
|
563
553
|
*/
|
|
564
|
-
404:
|
|
565
|
-
|
|
566
|
-
|
|
554
|
+
404: ErrorResponse & {
|
|
555
|
+
error?: {
|
|
556
|
+
statusCode?: number;
|
|
557
|
+
error?: string;
|
|
558
|
+
};
|
|
567
559
|
};
|
|
568
560
|
};
|
|
569
561
|
export type ItemControllerFindError = ItemControllerFindErrors[keyof ItemControllerFindErrors];
|
|
@@ -571,27 +563,13 @@ export type ItemControllerFindResponses = {
|
|
|
571
563
|
/**
|
|
572
564
|
* Returns all items as paginated response
|
|
573
565
|
*/
|
|
574
|
-
200:
|
|
566
|
+
200: PaginatedResponse & {
|
|
575
567
|
data?: Array<Item>;
|
|
576
568
|
};
|
|
577
569
|
};
|
|
578
570
|
export type ItemControllerFindResponse = ItemControllerFindResponses[keyof ItemControllerFindResponses];
|
|
579
571
|
export type ItemControllerCreateData = {
|
|
580
|
-
body:
|
|
581
|
-
headers: {
|
|
582
|
-
/**
|
|
583
|
-
* Your Swish API key
|
|
584
|
-
*/
|
|
585
|
-
Authorization: string;
|
|
586
|
-
/**
|
|
587
|
-
* The shop domain
|
|
588
|
-
*/
|
|
589
|
-
Shop: string;
|
|
590
|
-
/**
|
|
591
|
-
* The profile key
|
|
592
|
-
*/
|
|
593
|
-
Key: string;
|
|
594
|
-
};
|
|
572
|
+
body: CreateItemInput;
|
|
595
573
|
path?: never;
|
|
596
574
|
query?: never;
|
|
597
575
|
url: '/items';
|
|
@@ -600,30 +578,38 @@ export type ItemControllerCreateErrors = {
|
|
|
600
578
|
/**
|
|
601
579
|
* Bad Request
|
|
602
580
|
*/
|
|
603
|
-
400:
|
|
604
|
-
|
|
605
|
-
|
|
581
|
+
400: ErrorResponse & {
|
|
582
|
+
error?: {
|
|
583
|
+
statusCode?: number;
|
|
584
|
+
error?: string;
|
|
585
|
+
};
|
|
606
586
|
};
|
|
607
587
|
/**
|
|
608
588
|
* Unauthorized
|
|
609
589
|
*/
|
|
610
|
-
401:
|
|
611
|
-
|
|
612
|
-
|
|
590
|
+
401: ErrorResponse & {
|
|
591
|
+
error?: {
|
|
592
|
+
statusCode?: number;
|
|
593
|
+
error?: string;
|
|
594
|
+
};
|
|
613
595
|
};
|
|
614
596
|
/**
|
|
615
597
|
* Forbidden
|
|
616
598
|
*/
|
|
617
|
-
403:
|
|
618
|
-
|
|
619
|
-
|
|
599
|
+
403: ErrorResponse & {
|
|
600
|
+
error?: {
|
|
601
|
+
statusCode?: number;
|
|
602
|
+
error?: string;
|
|
603
|
+
};
|
|
620
604
|
};
|
|
621
605
|
/**
|
|
622
606
|
* Not Found
|
|
623
607
|
*/
|
|
624
|
-
404:
|
|
625
|
-
|
|
626
|
-
|
|
608
|
+
404: ErrorResponse & {
|
|
609
|
+
error?: {
|
|
610
|
+
statusCode?: number;
|
|
611
|
+
error?: string;
|
|
612
|
+
};
|
|
627
613
|
};
|
|
628
614
|
};
|
|
629
615
|
export type ItemControllerCreateError = ItemControllerCreateErrors[keyof ItemControllerCreateErrors];
|
|
@@ -631,27 +617,13 @@ export type ItemControllerCreateResponses = {
|
|
|
631
617
|
/**
|
|
632
618
|
* The item has been successfully created.
|
|
633
619
|
*/
|
|
634
|
-
201:
|
|
620
|
+
201: Response & {
|
|
635
621
|
data?: Item;
|
|
636
622
|
};
|
|
637
623
|
};
|
|
638
624
|
export type ItemControllerCreateResponse = ItemControllerCreateResponses[keyof ItemControllerCreateResponses];
|
|
639
625
|
export type ItemControllerDeleteByIdData = {
|
|
640
626
|
body?: never;
|
|
641
|
-
headers: {
|
|
642
|
-
/**
|
|
643
|
-
* Your Swish API key
|
|
644
|
-
*/
|
|
645
|
-
Authorization: string;
|
|
646
|
-
/**
|
|
647
|
-
* The shop domain
|
|
648
|
-
*/
|
|
649
|
-
Shop: string;
|
|
650
|
-
/**
|
|
651
|
-
* The profile key
|
|
652
|
-
*/
|
|
653
|
-
Key: string;
|
|
654
|
-
};
|
|
655
627
|
path: {
|
|
656
628
|
/**
|
|
657
629
|
* The ID of the item
|
|
@@ -665,30 +637,38 @@ export type ItemControllerDeleteByIdErrors = {
|
|
|
665
637
|
/**
|
|
666
638
|
* Bad Request
|
|
667
639
|
*/
|
|
668
|
-
400:
|
|
669
|
-
|
|
670
|
-
|
|
640
|
+
400: ErrorResponse & {
|
|
641
|
+
error?: {
|
|
642
|
+
statusCode?: number;
|
|
643
|
+
error?: string;
|
|
644
|
+
};
|
|
671
645
|
};
|
|
672
646
|
/**
|
|
673
647
|
* Unauthorized
|
|
674
648
|
*/
|
|
675
|
-
401:
|
|
676
|
-
|
|
677
|
-
|
|
649
|
+
401: ErrorResponse & {
|
|
650
|
+
error?: {
|
|
651
|
+
statusCode?: number;
|
|
652
|
+
error?: string;
|
|
653
|
+
};
|
|
678
654
|
};
|
|
679
655
|
/**
|
|
680
656
|
* Forbidden
|
|
681
657
|
*/
|
|
682
|
-
403:
|
|
683
|
-
|
|
684
|
-
|
|
658
|
+
403: ErrorResponse & {
|
|
659
|
+
error?: {
|
|
660
|
+
statusCode?: number;
|
|
661
|
+
error?: string;
|
|
662
|
+
};
|
|
685
663
|
};
|
|
686
664
|
/**
|
|
687
665
|
* Not Found
|
|
688
666
|
*/
|
|
689
|
-
404:
|
|
690
|
-
|
|
691
|
-
|
|
667
|
+
404: ErrorResponse & {
|
|
668
|
+
error?: {
|
|
669
|
+
statusCode?: number;
|
|
670
|
+
error?: string;
|
|
671
|
+
};
|
|
692
672
|
};
|
|
693
673
|
};
|
|
694
674
|
export type ItemControllerDeleteByIdError = ItemControllerDeleteByIdErrors[keyof ItemControllerDeleteByIdErrors];
|
|
@@ -700,21 +680,7 @@ export type ItemControllerDeleteByIdResponses = {
|
|
|
700
680
|
};
|
|
701
681
|
export type ItemControllerDeleteByIdResponse = ItemControllerDeleteByIdResponses[keyof ItemControllerDeleteByIdResponses];
|
|
702
682
|
export type ItemControllerUpdateByIdData = {
|
|
703
|
-
body:
|
|
704
|
-
headers: {
|
|
705
|
-
/**
|
|
706
|
-
* Your Swish API key
|
|
707
|
-
*/
|
|
708
|
-
Authorization: string;
|
|
709
|
-
/**
|
|
710
|
-
* The shop domain
|
|
711
|
-
*/
|
|
712
|
-
Shop: string;
|
|
713
|
-
/**
|
|
714
|
-
* The profile key
|
|
715
|
-
*/
|
|
716
|
-
Key: string;
|
|
717
|
-
};
|
|
683
|
+
body: UpdateItemInput;
|
|
718
684
|
path: {
|
|
719
685
|
/**
|
|
720
686
|
* The ID of the item
|
|
@@ -728,30 +694,38 @@ export type ItemControllerUpdateByIdErrors = {
|
|
|
728
694
|
/**
|
|
729
695
|
* Bad Request
|
|
730
696
|
*/
|
|
731
|
-
400:
|
|
732
|
-
|
|
733
|
-
|
|
697
|
+
400: ErrorResponse & {
|
|
698
|
+
error?: {
|
|
699
|
+
statusCode?: number;
|
|
700
|
+
error?: string;
|
|
701
|
+
};
|
|
734
702
|
};
|
|
735
703
|
/**
|
|
736
704
|
* Unauthorized
|
|
737
705
|
*/
|
|
738
|
-
401:
|
|
739
|
-
|
|
740
|
-
|
|
706
|
+
401: ErrorResponse & {
|
|
707
|
+
error?: {
|
|
708
|
+
statusCode?: number;
|
|
709
|
+
error?: string;
|
|
710
|
+
};
|
|
741
711
|
};
|
|
742
712
|
/**
|
|
743
713
|
* Forbidden
|
|
744
714
|
*/
|
|
745
|
-
403:
|
|
746
|
-
|
|
747
|
-
|
|
715
|
+
403: ErrorResponse & {
|
|
716
|
+
error?: {
|
|
717
|
+
statusCode?: number;
|
|
718
|
+
error?: string;
|
|
719
|
+
};
|
|
748
720
|
};
|
|
749
721
|
/**
|
|
750
722
|
* Not Found
|
|
751
723
|
*/
|
|
752
|
-
404:
|
|
753
|
-
|
|
754
|
-
|
|
724
|
+
404: ErrorResponse & {
|
|
725
|
+
error?: {
|
|
726
|
+
statusCode?: number;
|
|
727
|
+
error?: string;
|
|
728
|
+
};
|
|
755
729
|
};
|
|
756
730
|
};
|
|
757
731
|
export type ItemControllerUpdateByIdError = ItemControllerUpdateByIdErrors[keyof ItemControllerUpdateByIdErrors];
|
|
@@ -759,71 +733,119 @@ export type ItemControllerUpdateByIdResponses = {
|
|
|
759
733
|
/**
|
|
760
734
|
* The item has been successfully updated.
|
|
761
735
|
*/
|
|
762
|
-
200:
|
|
736
|
+
200: Response & {
|
|
763
737
|
data?: Item;
|
|
764
738
|
};
|
|
765
739
|
};
|
|
766
740
|
export type ItemControllerUpdateByIdResponse = ItemControllerUpdateByIdResponses[keyof ItemControllerUpdateByIdResponses];
|
|
767
|
-
export type
|
|
768
|
-
body:
|
|
769
|
-
headers: {
|
|
770
|
-
/**
|
|
771
|
-
* Your Swish API key
|
|
772
|
-
*/
|
|
773
|
-
Authorization: string;
|
|
774
|
-
/**
|
|
775
|
-
* The shop domain
|
|
776
|
-
*/
|
|
777
|
-
Shop: string;
|
|
778
|
-
/**
|
|
779
|
-
* The profile key
|
|
780
|
-
*/
|
|
781
|
-
Key: string;
|
|
782
|
-
};
|
|
741
|
+
export type ProfileControllerIdentifyProfileData = {
|
|
742
|
+
body: IdentifyProfileInput;
|
|
783
743
|
path?: never;
|
|
784
744
|
query?: never;
|
|
785
745
|
url: '/profiles/identify';
|
|
786
746
|
};
|
|
787
|
-
export type
|
|
747
|
+
export type ProfileControllerIdentifyProfileErrors = {
|
|
748
|
+
/**
|
|
749
|
+
* Bad Request
|
|
750
|
+
*/
|
|
751
|
+
400: ErrorResponse & {
|
|
752
|
+
error?: {
|
|
753
|
+
statusCode?: number;
|
|
754
|
+
error?: string;
|
|
755
|
+
};
|
|
756
|
+
};
|
|
757
|
+
/**
|
|
758
|
+
* Unauthorized
|
|
759
|
+
*/
|
|
760
|
+
401: ErrorResponse & {
|
|
761
|
+
error?: {
|
|
762
|
+
statusCode?: number;
|
|
763
|
+
error?: string;
|
|
764
|
+
};
|
|
765
|
+
};
|
|
766
|
+
/**
|
|
767
|
+
* Forbidden
|
|
768
|
+
*/
|
|
769
|
+
403: ErrorResponse & {
|
|
770
|
+
error?: {
|
|
771
|
+
statusCode?: number;
|
|
772
|
+
error?: string;
|
|
773
|
+
};
|
|
774
|
+
};
|
|
775
|
+
/**
|
|
776
|
+
* Not Found
|
|
777
|
+
*/
|
|
778
|
+
404: ErrorResponse & {
|
|
779
|
+
error?: {
|
|
780
|
+
statusCode?: number;
|
|
781
|
+
error?: string;
|
|
782
|
+
};
|
|
783
|
+
};
|
|
784
|
+
};
|
|
785
|
+
export type ProfileControllerIdentifyProfileError = ProfileControllerIdentifyProfileErrors[keyof ProfileControllerIdentifyProfileErrors];
|
|
786
|
+
export type ProfileControllerIdentifyProfileResponses = {
|
|
787
|
+
/**
|
|
788
|
+
* The profile has been identified
|
|
789
|
+
*/
|
|
790
|
+
200: Response & {
|
|
791
|
+
data?: IdentifyProfileResponse;
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
export type ProfileControllerIdentifyProfileResponse = ProfileControllerIdentifyProfileResponses[keyof ProfileControllerIdentifyProfileResponses];
|
|
795
|
+
export type ProfileControllerCreateTokenData = {
|
|
796
|
+
body: CreateProfileTokenInput;
|
|
797
|
+
path?: never;
|
|
798
|
+
query?: never;
|
|
799
|
+
url: '/profiles/token';
|
|
800
|
+
};
|
|
801
|
+
export type ProfileControllerCreateTokenErrors = {
|
|
788
802
|
/**
|
|
789
803
|
* Bad Request
|
|
790
804
|
*/
|
|
791
|
-
400:
|
|
792
|
-
|
|
793
|
-
|
|
805
|
+
400: ErrorResponse & {
|
|
806
|
+
error?: {
|
|
807
|
+
statusCode?: number;
|
|
808
|
+
error?: string;
|
|
809
|
+
};
|
|
794
810
|
};
|
|
795
811
|
/**
|
|
796
812
|
* Unauthorized
|
|
797
813
|
*/
|
|
798
|
-
401:
|
|
799
|
-
|
|
800
|
-
|
|
814
|
+
401: ErrorResponse & {
|
|
815
|
+
error?: {
|
|
816
|
+
statusCode?: number;
|
|
817
|
+
error?: string;
|
|
818
|
+
};
|
|
801
819
|
};
|
|
802
820
|
/**
|
|
803
821
|
* Forbidden
|
|
804
822
|
*/
|
|
805
|
-
403:
|
|
806
|
-
|
|
807
|
-
|
|
823
|
+
403: ErrorResponse & {
|
|
824
|
+
error?: {
|
|
825
|
+
statusCode?: number;
|
|
826
|
+
error?: string;
|
|
827
|
+
};
|
|
808
828
|
};
|
|
809
829
|
/**
|
|
810
830
|
* Not Found
|
|
811
831
|
*/
|
|
812
|
-
404:
|
|
813
|
-
|
|
814
|
-
|
|
832
|
+
404: ErrorResponse & {
|
|
833
|
+
error?: {
|
|
834
|
+
statusCode?: number;
|
|
835
|
+
error?: string;
|
|
836
|
+
};
|
|
815
837
|
};
|
|
816
838
|
};
|
|
817
|
-
export type
|
|
818
|
-
export type
|
|
839
|
+
export type ProfileControllerCreateTokenError = ProfileControllerCreateTokenErrors[keyof ProfileControllerCreateTokenErrors];
|
|
840
|
+
export type ProfileControllerCreateTokenResponses = {
|
|
819
841
|
/**
|
|
820
|
-
*
|
|
842
|
+
* The token has been created
|
|
821
843
|
*/
|
|
822
|
-
|
|
823
|
-
data?:
|
|
844
|
+
201: Response & {
|
|
845
|
+
data?: CreateProfileTokenResponse;
|
|
824
846
|
};
|
|
825
847
|
};
|
|
826
|
-
export type
|
|
848
|
+
export type ProfileControllerCreateTokenResponse = ProfileControllerCreateTokenResponses[keyof ProfileControllerCreateTokenResponses];
|
|
827
849
|
export type ClientOptions = {
|
|
828
850
|
baseUrl: 'https://swish.app/api/unstable' | (string & {});
|
|
829
851
|
};
|