@ikas/api-client 0.0.1-canary.7 → 1.0.1-alpha.4
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/LICENSE +21 -0
- package/README.md +1 -1
- package/dist/api/admin/admin-client.d.ts +2 -0
- package/dist/api/admin/admin-client.js +2 -0
- package/dist/api/admin/admin-client.js.map +1 -1
- package/dist/api/admin/generated/index.d.ts +631 -7
- package/dist/api/admin/generated/index.js.map +1 -1
- package/dist/api/admin/rest.d.ts +33 -0
- package/dist/api/admin/rest.js +75 -0
- package/dist/api/admin/rest.js.map +1 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/oauth/index.d.ts +2 -1
- package/dist/api/oauth/index.js +11 -0
- package/dist/api/oauth/index.js.map +1 -1
- package/dist/api/oauth/models.d.ts +5 -0
- package/dist/globals/constants.d.ts +9 -0
- package/dist/globals/constants.js +11 -1
- package/dist/globals/constants.js.map +1 -1
- package/dist/helpers/index.d.ts +1 -1
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/webhook-helpers.d.ts +4 -0
- package/dist/helpers/{webhook-validate.js → webhook-helpers.js} +23 -10
- package/dist/helpers/webhook-helpers.js.map +1 -0
- package/dist/models/webhook/models.d.ts +1 -0
- package/package.json +6 -5
- package/Jenkinsfile +0 -92
- package/codegen/admin.yml +0 -9
- package/dist/helpers/webhook-validate.d.ts +0 -1
- package/dist/helpers/webhook-validate.js.map +0 -1
- package/src/api/admin/admin-client.ts +0 -15
- package/src/api/admin/common-gql.ts +0 -425
- package/src/api/admin/generated/index.ts +0 -2708
- package/src/api/admin/index.ts +0 -4
- package/src/api/admin/mutation-gql.ts +0 -255
- package/src/api/admin/mutation.ts +0 -195
- package/src/api/admin/query-gql.ts +0 -521
- package/src/api/admin/query.ts +0 -144
- package/src/api/base.ts +0 -134
- package/src/api/index.ts +0 -2
- package/src/api/oauth/index.ts +0 -47
- package/src/api/oauth/models.ts +0 -37
- package/src/globals/constants.ts +0 -19
- package/src/globals/index.ts +0 -1
- package/src/helpers/index.ts +0 -1
- package/src/helpers/webhook-validate.ts +0 -17
- package/src/index.ts +0 -34
- package/src/models/base.ts +0 -7
- package/src/models/index.ts +0 -1
- package/src/models/webhook/index.ts +0 -1
- package/src/models/webhook/models.ts +0 -90
- package/tsconfig.json +0 -25
|
@@ -1,521 +0,0 @@
|
|
|
1
|
-
import { Query } from './generated';
|
|
2
|
-
import { gql } from 'graphql-request';
|
|
3
|
-
import { CATEGORY_GQL, CUSTOMER_GQL, ORDER_GQL, PRODUCT_GQL } from './common-gql';
|
|
4
|
-
|
|
5
|
-
type Queries = {
|
|
6
|
-
[p in keyof Omit<Query, '__typename' | 'getImageUploadUrl'>]: string;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export const DefaultQueries: Queries = {
|
|
10
|
-
getAuthorizedApp: gql`
|
|
11
|
-
query GetAuthorizedApp {
|
|
12
|
-
getAuthorizedApp {
|
|
13
|
-
id
|
|
14
|
-
storeAppId
|
|
15
|
-
scope
|
|
16
|
-
addedDate
|
|
17
|
-
partnerId
|
|
18
|
-
salesChannelId
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
`,
|
|
22
|
-
getMerchantLicence: gql`
|
|
23
|
-
query GetMerchantLicence {
|
|
24
|
-
getMerchantLicence {
|
|
25
|
-
activeSubscriptionCode
|
|
26
|
-
activeSubscriptionId
|
|
27
|
-
appSubscriptions {
|
|
28
|
-
addedDate
|
|
29
|
-
appPaymentKey
|
|
30
|
-
authorizedAppId
|
|
31
|
-
createdAt
|
|
32
|
-
currency
|
|
33
|
-
deleted
|
|
34
|
-
id
|
|
35
|
-
lastPaymentDate
|
|
36
|
-
lastPaymentPeriod
|
|
37
|
-
lastPaymentPrice
|
|
38
|
-
lastPaymentPriceWithTax
|
|
39
|
-
merchantAppPaymentId
|
|
40
|
-
name
|
|
41
|
-
status
|
|
42
|
-
storeAppId
|
|
43
|
-
updatedAt
|
|
44
|
-
}
|
|
45
|
-
createdAt
|
|
46
|
-
deleted
|
|
47
|
-
fromDate
|
|
48
|
-
id
|
|
49
|
-
licenceActivationDate
|
|
50
|
-
limits {
|
|
51
|
-
code
|
|
52
|
-
value
|
|
53
|
-
}
|
|
54
|
-
period
|
|
55
|
-
region
|
|
56
|
-
status
|
|
57
|
-
statusUpdatedAt
|
|
58
|
-
subscriptions {
|
|
59
|
-
code
|
|
60
|
-
createdAt
|
|
61
|
-
currency
|
|
62
|
-
deleted
|
|
63
|
-
id
|
|
64
|
-
lastPaymentDate
|
|
65
|
-
lastPaymentPeriod
|
|
66
|
-
lastPaymentPrice
|
|
67
|
-
lastPaymentPriceWithTax
|
|
68
|
-
status
|
|
69
|
-
subscriptionId
|
|
70
|
-
updatedAt
|
|
71
|
-
}
|
|
72
|
-
toDate
|
|
73
|
-
updatedAt
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
`,
|
|
77
|
-
getMerchant: gql`
|
|
78
|
-
query GetMerchant {
|
|
79
|
-
getMerchant {
|
|
80
|
-
id
|
|
81
|
-
storeName
|
|
82
|
-
merchantSequence
|
|
83
|
-
merchantName
|
|
84
|
-
firstName
|
|
85
|
-
lastName
|
|
86
|
-
email
|
|
87
|
-
phoneNumber
|
|
88
|
-
address {
|
|
89
|
-
addressLine1
|
|
90
|
-
addressLine2
|
|
91
|
-
country {
|
|
92
|
-
id
|
|
93
|
-
name
|
|
94
|
-
code
|
|
95
|
-
}
|
|
96
|
-
state {
|
|
97
|
-
id
|
|
98
|
-
name
|
|
99
|
-
code
|
|
100
|
-
}
|
|
101
|
-
city {
|
|
102
|
-
id
|
|
103
|
-
name
|
|
104
|
-
code
|
|
105
|
-
}
|
|
106
|
-
district {
|
|
107
|
-
id
|
|
108
|
-
name
|
|
109
|
-
code
|
|
110
|
-
}
|
|
111
|
-
postalCode
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
`,
|
|
116
|
-
getSalesChannel: gql`
|
|
117
|
-
query GetSalesChannel {
|
|
118
|
-
getSalesChannel {
|
|
119
|
-
id
|
|
120
|
-
createdAt
|
|
121
|
-
updatedAt
|
|
122
|
-
deleted
|
|
123
|
-
name
|
|
124
|
-
paymentGateways {
|
|
125
|
-
id
|
|
126
|
-
order
|
|
127
|
-
}
|
|
128
|
-
priceListId
|
|
129
|
-
stockLocations {
|
|
130
|
-
id
|
|
131
|
-
order
|
|
132
|
-
}
|
|
133
|
-
type
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
`,
|
|
137
|
-
listCategory: gql`
|
|
138
|
-
query ListCategories(
|
|
139
|
-
$categoryPath: CategoryPathFilterInput
|
|
140
|
-
$id: StringFilterInput
|
|
141
|
-
$includeDeleted: Boolean
|
|
142
|
-
$name: StringFilterInput
|
|
143
|
-
$search: String
|
|
144
|
-
$updatedAt: DateFilterInput
|
|
145
|
-
) {
|
|
146
|
-
listCategory(categoryPath: $categoryPath, id: $id, includeDeleted: $includeDeleted, name: $name, search: $search, updatedAt: $updatedAt) ${CATEGORY_GQL}
|
|
147
|
-
}
|
|
148
|
-
`,
|
|
149
|
-
listCustomer: gql`
|
|
150
|
-
query ListCustomer($pagination: PaginationInput, $id: StringFilterInput, $sort: String) {
|
|
151
|
-
listCustomer(pagination: $pagination, id: $id, sort: $sort) {
|
|
152
|
-
data ${CUSTOMER_GQL}
|
|
153
|
-
count
|
|
154
|
-
hasNext
|
|
155
|
-
limit
|
|
156
|
-
page
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
`,
|
|
160
|
-
listMerchantAppPayment: gql`
|
|
161
|
-
query ListMerchantAppPayment($id: StringFilterInput, $pagination: PaginationInput) {
|
|
162
|
-
listMerchantAppPayment(id: $id, pagination: $pagination) {
|
|
163
|
-
count
|
|
164
|
-
data {
|
|
165
|
-
appPaymentKey
|
|
166
|
-
createdAt
|
|
167
|
-
deleted
|
|
168
|
-
id
|
|
169
|
-
merchantPaymentUrl
|
|
170
|
-
name
|
|
171
|
-
paymentDate
|
|
172
|
-
prices {
|
|
173
|
-
period
|
|
174
|
-
price
|
|
175
|
-
}
|
|
176
|
-
status
|
|
177
|
-
storeAppId
|
|
178
|
-
type
|
|
179
|
-
updatedAt
|
|
180
|
-
}
|
|
181
|
-
hasNext
|
|
182
|
-
limit
|
|
183
|
-
page
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
`,
|
|
187
|
-
listOrder: gql`
|
|
188
|
-
query ListOrder($pagination: PaginationInput, $id: StringFilterInput) {
|
|
189
|
-
listOrder(pagination: $pagination, id: $id) {
|
|
190
|
-
count
|
|
191
|
-
data ${ORDER_GQL}
|
|
192
|
-
hasNext
|
|
193
|
-
limit
|
|
194
|
-
page
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
`,
|
|
198
|
-
listPriceList: gql`
|
|
199
|
-
query ListPriceList($id: StringFilterInput) {
|
|
200
|
-
listPriceList(id: $id) {
|
|
201
|
-
id
|
|
202
|
-
createdAt
|
|
203
|
-
updatedAt
|
|
204
|
-
deleted
|
|
205
|
-
currency
|
|
206
|
-
name
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
`,
|
|
210
|
-
listProduct: gql`
|
|
211
|
-
query ListProduct($pagination: PaginationInput, $id: StringFilterInput, $sku: StringFilterInput, $barcodeList: StringFilterInput) {
|
|
212
|
-
listProduct(pagination: $pagination, id: $id, sku: $sku, barcodeList: $barcodeList) {
|
|
213
|
-
count
|
|
214
|
-
hasNext
|
|
215
|
-
limit
|
|
216
|
-
page
|
|
217
|
-
data ${PRODUCT_GQL}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
`,
|
|
221
|
-
listProductAttribute: gql`
|
|
222
|
-
query ListProductAttributes($id: StringFilterInput, $includeDeleted: Boolean, $name: StringFilterInput, $updatedAt: DateFilterInput) {
|
|
223
|
-
listProductAttribute(updatedAt: $updatedAt, includeDeleted: $includeDeleted, id: $id, name: $name) {
|
|
224
|
-
id
|
|
225
|
-
createdAt
|
|
226
|
-
updatedAt
|
|
227
|
-
name
|
|
228
|
-
deleted
|
|
229
|
-
type
|
|
230
|
-
description
|
|
231
|
-
tableTemplate {
|
|
232
|
-
rows {
|
|
233
|
-
id
|
|
234
|
-
name
|
|
235
|
-
}
|
|
236
|
-
columns {
|
|
237
|
-
id
|
|
238
|
-
name
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
options {
|
|
242
|
-
createdAt
|
|
243
|
-
id
|
|
244
|
-
name
|
|
245
|
-
updatedAt
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
`,
|
|
250
|
-
listProductBrand: gql`
|
|
251
|
-
query ListProductBrand($id: StringFilterInput, $includeDeleted: Boolean, $name: StringFilterInput, $search: String, $updatedAt: DateFilterInput) {
|
|
252
|
-
listProductBrand(updatedAt: $updatedAt, includeDeleted: $includeDeleted, id: $id, name: $name, search: $search) {
|
|
253
|
-
id
|
|
254
|
-
createdAt
|
|
255
|
-
updatedAt
|
|
256
|
-
name
|
|
257
|
-
imageId
|
|
258
|
-
salesChannelIds
|
|
259
|
-
orderType
|
|
260
|
-
deleted
|
|
261
|
-
metaData {
|
|
262
|
-
id
|
|
263
|
-
createdAt
|
|
264
|
-
updatedAt
|
|
265
|
-
slug
|
|
266
|
-
pageTitle
|
|
267
|
-
description
|
|
268
|
-
targetType
|
|
269
|
-
targetId
|
|
270
|
-
redirectTo
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
`,
|
|
275
|
-
listProductStockLocation: gql`
|
|
276
|
-
query ListProductStockLocation($variantId: StringFilterInput, $productId: StringFilterInput, $pagination: PaginationInput) {
|
|
277
|
-
listProductStockLocation(variantId: $variantId, productId: $productId, pagination: $pagination) {
|
|
278
|
-
count
|
|
279
|
-
data {
|
|
280
|
-
createdAt
|
|
281
|
-
deleted
|
|
282
|
-
id
|
|
283
|
-
productId
|
|
284
|
-
stockCount
|
|
285
|
-
stockLocationId
|
|
286
|
-
updatedAt
|
|
287
|
-
variantId
|
|
288
|
-
}
|
|
289
|
-
hasNext
|
|
290
|
-
limit
|
|
291
|
-
page
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
`,
|
|
295
|
-
listProductTag: gql`
|
|
296
|
-
query ListProductTag($id: StringFilterInput, $includeDeleted: Boolean, $name: StringFilterInput, $updatedAt: DateFilterInput) {
|
|
297
|
-
listProductTag(updatedAt: $updatedAt, includeDeleted: $includeDeleted, id: $id, name: $name) {
|
|
298
|
-
id
|
|
299
|
-
createdAt
|
|
300
|
-
updatedAt
|
|
301
|
-
name
|
|
302
|
-
deleted
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
`,
|
|
306
|
-
listSalesChannel: gql`
|
|
307
|
-
query ListSalesChannel($id: StringFilterInput) {
|
|
308
|
-
listSalesChannel(id: $id) {
|
|
309
|
-
id
|
|
310
|
-
createdAt
|
|
311
|
-
updatedAt
|
|
312
|
-
deleted
|
|
313
|
-
name
|
|
314
|
-
paymentGateways {
|
|
315
|
-
id
|
|
316
|
-
order
|
|
317
|
-
}
|
|
318
|
-
priceListId
|
|
319
|
-
stockLocations {
|
|
320
|
-
id
|
|
321
|
-
order
|
|
322
|
-
}
|
|
323
|
-
type
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
`,
|
|
327
|
-
listStockLocation: gql`
|
|
328
|
-
query ListStockLocation($id: StringFilterInput) {
|
|
329
|
-
listStockLocation(id: $id) {
|
|
330
|
-
id
|
|
331
|
-
createdAt
|
|
332
|
-
updatedAt
|
|
333
|
-
deleted
|
|
334
|
-
name
|
|
335
|
-
type
|
|
336
|
-
address {
|
|
337
|
-
address
|
|
338
|
-
country {
|
|
339
|
-
id
|
|
340
|
-
name
|
|
341
|
-
code
|
|
342
|
-
}
|
|
343
|
-
state {
|
|
344
|
-
id
|
|
345
|
-
name
|
|
346
|
-
code
|
|
347
|
-
}
|
|
348
|
-
city {
|
|
349
|
-
id
|
|
350
|
-
name
|
|
351
|
-
code
|
|
352
|
-
}
|
|
353
|
-
district {
|
|
354
|
-
id
|
|
355
|
-
name
|
|
356
|
-
code
|
|
357
|
-
}
|
|
358
|
-
postalCode
|
|
359
|
-
phone
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
`,
|
|
364
|
-
listStorefront: gql`
|
|
365
|
-
query ListStorefront($id: StringFilterInput) {
|
|
366
|
-
listStorefront(id: $id) {
|
|
367
|
-
id
|
|
368
|
-
name
|
|
369
|
-
createdAt
|
|
370
|
-
updatedAt
|
|
371
|
-
deleted
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
`,
|
|
375
|
-
listStorefrontJSScript: gql`
|
|
376
|
-
query ListStorefrontJSScript($id: StringFilterInput) {
|
|
377
|
-
listStorefrontJSScript(id: $id) {
|
|
378
|
-
authorizedAppId
|
|
379
|
-
createdAt
|
|
380
|
-
deleted
|
|
381
|
-
id
|
|
382
|
-
isActive
|
|
383
|
-
name
|
|
384
|
-
scriptContent
|
|
385
|
-
storeAppId
|
|
386
|
-
storefrontId
|
|
387
|
-
updatedAt
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
`,
|
|
391
|
-
listVariantType: gql`
|
|
392
|
-
query ListVariantTypes($id: StringFilterInput, $includeDeleted: Boolean, $name: StringFilterInput, $updatedAt: DateFilterInput) {
|
|
393
|
-
listVariantType(updatedAt: $updatedAt, includeDeleted: $includeDeleted, id: $id, name: $name) {
|
|
394
|
-
id
|
|
395
|
-
deleted
|
|
396
|
-
createdAt
|
|
397
|
-
updatedAt
|
|
398
|
-
name
|
|
399
|
-
selectionType
|
|
400
|
-
values {
|
|
401
|
-
colorCode
|
|
402
|
-
createdAt
|
|
403
|
-
id
|
|
404
|
-
name
|
|
405
|
-
thumbnailImageId
|
|
406
|
-
updatedAt
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
`,
|
|
411
|
-
listWebhook: gql`
|
|
412
|
-
query ListWebhook {
|
|
413
|
-
listWebhook {
|
|
414
|
-
id
|
|
415
|
-
createdAt
|
|
416
|
-
updatedAt
|
|
417
|
-
deleted
|
|
418
|
-
scope
|
|
419
|
-
endpoint
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
`,
|
|
423
|
-
|
|
424
|
-
searchProducts: gql`
|
|
425
|
-
query SearchProducts($input: SearchInput!) {
|
|
426
|
-
searchProducts(input: $input) {
|
|
427
|
-
data
|
|
428
|
-
count
|
|
429
|
-
totalCount
|
|
430
|
-
page
|
|
431
|
-
limit
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
`,
|
|
435
|
-
|
|
436
|
-
listCity: gql`
|
|
437
|
-
query ListCity($id: StringFilterInput, $countryId: StringFilterInput, $stateId: StringFilterInput, $search: String) {
|
|
438
|
-
listCity(id: $id, countryId: $countryId, stateId: $stateId, search: $search) {
|
|
439
|
-
id
|
|
440
|
-
name
|
|
441
|
-
uName
|
|
442
|
-
cityCode
|
|
443
|
-
latitude
|
|
444
|
-
longitude
|
|
445
|
-
order
|
|
446
|
-
stateId
|
|
447
|
-
countryId
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
`,
|
|
451
|
-
|
|
452
|
-
listCountry: gql`
|
|
453
|
-
query ListCountry($id: StringFilterInput, $iso2: StringFilterInput, $iso3: StringFilterInput, $search: String) {
|
|
454
|
-
listCountry(id: $id, iso2: $iso2, iso3: $iso3, search: $search) {
|
|
455
|
-
id
|
|
456
|
-
name
|
|
457
|
-
uName
|
|
458
|
-
locationTranslations {
|
|
459
|
-
en
|
|
460
|
-
tr
|
|
461
|
-
}
|
|
462
|
-
iso3
|
|
463
|
-
iso2
|
|
464
|
-
phoneCode
|
|
465
|
-
capital
|
|
466
|
-
currency
|
|
467
|
-
native
|
|
468
|
-
region
|
|
469
|
-
subregion
|
|
470
|
-
emoji
|
|
471
|
-
emojiString
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
`,
|
|
475
|
-
|
|
476
|
-
listDistrict: gql`
|
|
477
|
-
query ListDistrict(
|
|
478
|
-
$id: StringFilterInput
|
|
479
|
-
$cityId: StringFilterInput
|
|
480
|
-
$countryId: StringFilterInput
|
|
481
|
-
$stateId: StringFilterInput
|
|
482
|
-
$search: String
|
|
483
|
-
) {
|
|
484
|
-
listDistrict(id: $id, cityId: $cityId, countryId: $countryId, stateId: $stateId, search: $search) {
|
|
485
|
-
id
|
|
486
|
-
name
|
|
487
|
-
uName
|
|
488
|
-
latitude
|
|
489
|
-
longitude
|
|
490
|
-
order
|
|
491
|
-
cityId
|
|
492
|
-
stateId
|
|
493
|
-
countryId
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
`,
|
|
497
|
-
|
|
498
|
-
listState: gql`
|
|
499
|
-
query ListState($id: StringFilterInput, $countryId: StringFilterInput, $search: String) {
|
|
500
|
-
listState(id: $id, countryId: $countryId, search: $search) {
|
|
501
|
-
id
|
|
502
|
-
name
|
|
503
|
-
uName
|
|
504
|
-
stateCode
|
|
505
|
-
countryId
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
`,
|
|
509
|
-
|
|
510
|
-
listTown: gql`
|
|
511
|
-
query ListTown($id: StringFilterInput, $districtId: StringFilterInput, $search: String) {
|
|
512
|
-
listTown(id: $id, districtId: $districtId, search: $search) {
|
|
513
|
-
id
|
|
514
|
-
name
|
|
515
|
-
uName
|
|
516
|
-
order
|
|
517
|
-
districtId
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
`,
|
|
521
|
-
};
|
package/src/api/admin/query.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { ikasAdminGraphQLAPIClient } from './admin-client';
|
|
2
|
-
import {
|
|
3
|
-
Query,
|
|
4
|
-
QuerylistCategoryArgs,
|
|
5
|
-
QuerylistCustomerArgs,
|
|
6
|
-
QuerylistMerchantAppPaymentArgs,
|
|
7
|
-
QuerylistOrderArgs,
|
|
8
|
-
QuerylistPriceListArgs,
|
|
9
|
-
QuerylistProductArgs,
|
|
10
|
-
QuerylistProductAttributeArgs,
|
|
11
|
-
QuerylistProductBrandArgs,
|
|
12
|
-
QuerylistProductStockLocationArgs,
|
|
13
|
-
QuerylistProductTagArgs,
|
|
14
|
-
QuerylistSalesChannelArgs,
|
|
15
|
-
QuerylistStockLocationArgs,
|
|
16
|
-
QuerylistStorefrontArgs,
|
|
17
|
-
QuerylistStorefrontJSScriptArgs,
|
|
18
|
-
QuerylistVariantTypeArgs,
|
|
19
|
-
QuerysearchProductsArgs,
|
|
20
|
-
QuerylistCityArgs,
|
|
21
|
-
QuerylistCountryArgs,
|
|
22
|
-
QuerylistDistrictArgs,
|
|
23
|
-
QuerylistStateArgs,
|
|
24
|
-
QuerylistTownArgs,
|
|
25
|
-
} from './generated';
|
|
26
|
-
import { APIResult, QueryOptions } from '../base';
|
|
27
|
-
|
|
28
|
-
type Result<T> = APIResult<Partial<T>>;
|
|
29
|
-
|
|
30
|
-
type Queries = {
|
|
31
|
-
[p in keyof Omit<Query, '__typename' | 'getImageUploadUrl'>]: (options: QueryOptions<any>) => Promise<Result<Query[p]>>;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export class AdminQuery implements Queries {
|
|
35
|
-
client: ikasAdminGraphQLAPIClient<any>;
|
|
36
|
-
|
|
37
|
-
constructor(client: ikasAdminGraphQLAPIClient<any>) {
|
|
38
|
-
this.client = client;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
async getAuthorizedApp(options: QueryOptions<undefined>): Promise<Result<Query['getAuthorizedApp']>> {
|
|
42
|
-
return this.client.query<Partial<Query['getAuthorizedApp']>>({ ...options, operationName: 'getAuthorizedApp' });
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
async getMerchant(options: QueryOptions<undefined>): Promise<Result<Query['getMerchant']>> {
|
|
46
|
-
return this.client.query<Partial<Query['getMerchant']>>({ ...options, operationName: 'getMerchant' });
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
async getMerchantLicence(options: QueryOptions<undefined>): Promise<Result<Query['getMerchantLicence']>> {
|
|
50
|
-
return this.client.query<Partial<Query['getMerchantLicence']>>({ ...options, operationName: 'getMerchantLicence' });
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
async getSalesChannel(options: QueryOptions<undefined>): Promise<Result<Query['getSalesChannel']>> {
|
|
54
|
-
return this.client.query<Partial<Query['getSalesChannel']>>({ ...options, operationName: 'getSalesChannel' });
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async listCategory(options: QueryOptions<QuerylistCategoryArgs>): Promise<Result<Query['listCategory']>> {
|
|
58
|
-
return this.client.query<Partial<Query['listCategory']>>({ ...options, operationName: 'listCategory' });
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async listCustomer(options: QueryOptions<QuerylistCustomerArgs>): Promise<Result<Query['listCustomer']>> {
|
|
62
|
-
return this.client.query<Partial<Query['listCustomer']>>({ ...options, operationName: 'listCustomer' });
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
async listMerchantAppPayment(options: QueryOptions<QuerylistMerchantAppPaymentArgs>): Promise<Result<Query['listMerchantAppPayment']>> {
|
|
66
|
-
return this.client.query<Partial<Query['listMerchantAppPayment']>>({ ...options, operationName: 'listMerchantAppPayment' });
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
async listOrder(options: QueryOptions<QuerylistOrderArgs>): Promise<Result<Query['listOrder']>> {
|
|
70
|
-
return this.client.query<Partial<Query['listOrder']>>({ ...options, operationName: 'listOrder' });
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
async listPriceList(options: QueryOptions<QuerylistPriceListArgs>): Promise<Result<Query['listPriceList']>> {
|
|
74
|
-
return this.client.query<Partial<Query['listPriceList']>>({ ...options, operationName: 'listPriceList' });
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
async listProduct(options: QueryOptions<QuerylistProductArgs>): Promise<Result<Query['listProduct']>> {
|
|
78
|
-
return this.client.query<Partial<Query['listProduct']>>({ ...options, operationName: 'listProduct' });
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
async listProductAttribute(options: QueryOptions<QuerylistProductAttributeArgs>): Promise<Result<Query['listProductAttribute']>> {
|
|
82
|
-
return this.client.query<Partial<Query['listProductAttribute']>>({ ...options, operationName: 'listProductAttribute' });
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
async listProductBrand(options: QueryOptions<QuerylistProductBrandArgs>): Promise<Result<Query['listProductBrand']>> {
|
|
86
|
-
return this.client.query<Partial<Query['listProductBrand']>>({ ...options, operationName: 'listProductBrand' });
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
async listProductStockLocation(options: QueryOptions<QuerylistProductStockLocationArgs>): Promise<Result<Query['listProductStockLocation']>> {
|
|
90
|
-
return this.client.query<Partial<Query['listProductStockLocation']>>({ ...options, operationName: 'listProductStockLocation' });
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
async listProductTag(options: QueryOptions<QuerylistProductTagArgs>): Promise<Result<Query['listProductTag']>> {
|
|
94
|
-
return this.client.query<Partial<Query['listProductTag']>>({ ...options, operationName: 'listProductTag' });
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
async listSalesChannel(options: QueryOptions<QuerylistSalesChannelArgs>): Promise<Result<Query['listSalesChannel']>> {
|
|
98
|
-
return this.client.query<Partial<Query['listSalesChannel']>>({ ...options, operationName: 'listSalesChannel' });
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
async listStockLocation(options: QueryOptions<QuerylistStockLocationArgs>): Promise<Result<Query['listStockLocation']>> {
|
|
102
|
-
return this.client.query<Partial<Query['listStockLocation']>>({ ...options, operationName: 'listStockLocation' });
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
async listStorefront(options: QueryOptions<QuerylistStorefrontArgs>): Promise<Result<Query['listStorefront']>> {
|
|
106
|
-
return this.client.query<Partial<Query['listStorefront']>>({ ...options, operationName: 'listStorefront' });
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
async listStorefrontJSScript(options: QueryOptions<QuerylistStorefrontJSScriptArgs>): Promise<Result<Query['listStorefrontJSScript']>> {
|
|
110
|
-
return this.client.query<Partial<Query['listStorefrontJSScript']>>({ ...options, operationName: 'listStorefrontJSScript' });
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
async listVariantType(options: QueryOptions<QuerylistVariantTypeArgs>): Promise<Result<Query['listVariantType']>> {
|
|
114
|
-
return this.client.query<Partial<Query['listVariantType']>>({ ...options, operationName: 'listVariantType' });
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
async listWebhook(options: QueryOptions<undefined>): Promise<Result<Query['listWebhook']>> {
|
|
118
|
-
return this.client.query<Partial<Query['listWebhook']>>({ ...options, operationName: 'listWebhook' });
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
async searchProducts(options: QueryOptions<QuerysearchProductsArgs>): Promise<Result<Query['searchProducts']>> {
|
|
122
|
-
return this.client.query<Partial<Query['searchProducts']>>({ ...options, operationName: 'searchProducts' });
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
listCity(options: QueryOptions<QuerylistCityArgs>): Promise<Result<Query["listCity"]>> {
|
|
126
|
-
return this.client.query<Partial<Query['listCity']>>({ ...options, operationName: 'listCity' });
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
listCountry(options: QueryOptions<QuerylistCountryArgs>): Promise<Result<Query["listCountry"]>> {
|
|
130
|
-
return this.client.query<Partial<Query['listCountry']>>({ ...options, operationName: 'listCountry' });
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
listDistrict(options: QueryOptions<QuerylistDistrictArgs>): Promise<Result<Query["listDistrict"]>> {
|
|
134
|
-
return this.client.query<Partial<Query['listDistrict']>>({ ...options, operationName: 'listDistrict' });
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
listState(options: QueryOptions<QuerylistStateArgs>): Promise<Result<Query["listState"]>> {
|
|
138
|
-
return this.client.query<Partial<Query['listState']>>({ ...options, operationName: 'listState' });
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
listTown(options: QueryOptions<QuerylistTownArgs>): Promise<Result<Query["listTown"]>> {
|
|
142
|
-
return this.client.query<Partial<Query['listTown']>>({ ...options, operationName: 'listTown' });
|
|
143
|
-
}
|
|
144
|
-
}
|