@droz-js/sdk 0.6.10 → 0.6.12
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/package.json +1 -1
- package/src/drozai.d.ts +20 -0
- package/src/logger.d.ts +7 -0
- package/src/mercadolivre.d.ts +24 -0
- package/src/mercadolivre.js +21 -0
- package/src/nucleus.d.ts +6 -0
- package/src/sdks/ai.d.ts +116 -1
- package/src/sdks/ai.js +77 -1
- package/src/sdks/drozchat.d.ts +1 -0
- package/src/sdks/drozcommons.d.ts +19 -11
- package/src/sdks/drozcommons.js +5 -1
- package/src/sdks/logger.d.ts +28 -2
- package/src/sdks/logger.js +37 -11
- package/src/sdks/mercadolivre.d.ts +308 -0
- package/src/sdks/mercadolivre.js +91 -0
- package/src/sdks/nucleus.d.ts +72 -28
- package/src/sdks/nucleus.js +41 -7
- package/src/sdks/whatsapp.d.ts +50 -20
- package/src/sdks/whatsapp.js +35 -7
- package/src/whatsapp.d.ts +9 -3
package/src/sdks/logger.d.ts
CHANGED
|
@@ -171,6 +171,10 @@ export type NumberMatcherInput = {
|
|
|
171
171
|
lte?: InputMaybe<Scalars['Number']['input']>;
|
|
172
172
|
ne?: InputMaybe<Scalars['Number']['input']>;
|
|
173
173
|
};
|
|
174
|
+
export declare enum Order {
|
|
175
|
+
Asc = "ASC",
|
|
176
|
+
Desc = "DESC"
|
|
177
|
+
}
|
|
174
178
|
export type PageInfo = {
|
|
175
179
|
hasNext: Scalars['Boolean']['output'];
|
|
176
180
|
next?: Maybe<Scalars['Base64']['output']>;
|
|
@@ -178,12 +182,20 @@ export type PageInfo = {
|
|
|
178
182
|
export type Query = {
|
|
179
183
|
app?: Maybe<Scalars['DRN']['output']>;
|
|
180
184
|
getHttpEndpoint?: Maybe<Scalars['String']['output']>;
|
|
185
|
+
getLastMessage?: Maybe<Message>;
|
|
181
186
|
listMessages: MessageConnection;
|
|
182
187
|
version?: Maybe<Scalars['String']['output']>;
|
|
183
188
|
};
|
|
189
|
+
export type QueryGetLastMessageArgs = {
|
|
190
|
+
sessionId: Scalars['ID']['input'];
|
|
191
|
+
type?: InputMaybe<Scalars['String']['input']>;
|
|
192
|
+
};
|
|
184
193
|
export type QueryListMessagesArgs = {
|
|
194
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
185
195
|
next?: InputMaybe<Scalars['Base64']['input']>;
|
|
196
|
+
order?: InputMaybe<Order>;
|
|
186
197
|
sessionId: Scalars['ID']['input'];
|
|
198
|
+
type?: InputMaybe<Scalars['String']['input']>;
|
|
187
199
|
};
|
|
188
200
|
export type SearchResultsFacet = {
|
|
189
201
|
name: Scalars['String']['output'];
|
|
@@ -237,19 +249,33 @@ export declare enum Typenames {
|
|
|
237
249
|
GraphqlConnections = "GraphqlConnections",
|
|
238
250
|
GraphqlSubscriptions = "GraphqlSubscriptions"
|
|
239
251
|
}
|
|
252
|
+
export type MessageFragment = Pick<Message, 'sessionId' | 'messageId' | 'type' | 'session' | 'sender' | 'recipient' | 'payload'>;
|
|
253
|
+
export type GetLastMessageQueryVariables = Exact<{
|
|
254
|
+
sessionId: Scalars['ID']['input'];
|
|
255
|
+
type?: InputMaybe<Scalars['String']['input']>;
|
|
256
|
+
}>;
|
|
257
|
+
export type GetLastMessageQuery = {
|
|
258
|
+
getLastMessage?: Maybe<MessageFragment>;
|
|
259
|
+
};
|
|
240
260
|
export type ListMessagesQueryVariables = Exact<{
|
|
241
261
|
sessionId: Scalars['ID']['input'];
|
|
262
|
+
type?: InputMaybe<Scalars['String']['input']>;
|
|
263
|
+
limit?: InputMaybe<Scalars['Int']['input']>;
|
|
264
|
+
order?: InputMaybe<Order>;
|
|
242
265
|
next?: InputMaybe<Scalars['Base64']['input']>;
|
|
243
266
|
}>;
|
|
244
267
|
export type ListMessagesQuery = {
|
|
245
268
|
listMessages: {
|
|
246
|
-
nodes: Array<
|
|
269
|
+
nodes: Array<MessageFragment>;
|
|
247
270
|
pageInfo: Pick<PageInfo, 'hasNext' | 'next'>;
|
|
248
271
|
};
|
|
249
272
|
};
|
|
250
|
-
export declare const
|
|
273
|
+
export declare const MessageFragmentDoc = "\n fragment message on Message {\n sessionId\n messageId\n type\n session\n sender\n recipient\n payload\n}\n ";
|
|
274
|
+
export declare const GetLastMessageDocument = "\n query getLastMessage($sessionId: ID!, $type: String) {\n getLastMessage(sessionId: $sessionId, type: $type) {\n ...message\n }\n}\n \n fragment message on Message {\n sessionId\n messageId\n type\n session\n sender\n recipient\n payload\n}\n ";
|
|
275
|
+
export declare const ListMessagesDocument = "\n query listMessages($sessionId: ID!, $type: String, $limit: Int, $order: Order, $next: Base64) {\n listMessages(\n sessionId: $sessionId\n type: $type\n limit: $limit\n order: $order\n next: $next\n ) {\n nodes {\n ...message\n }\n pageInfo {\n hasNext\n next\n }\n }\n}\n \n fragment message on Message {\n sessionId\n messageId\n type\n session\n sender\n recipient\n payload\n}\n ";
|
|
251
276
|
export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
|
|
252
277
|
export declare function getSdk<C>(requester: Requester<C>): {
|
|
278
|
+
getLastMessage(variables: GetLastMessageQueryVariables, options?: C): Promise<GetLastMessageQuery>;
|
|
253
279
|
listMessages(variables: ListMessagesQueryVariables, options?: C): Promise<ListMessagesQuery>;
|
|
254
280
|
};
|
|
255
281
|
export type Sdk = ReturnType<typeof getSdk>;
|
package/src/sdks/logger.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* istanbul ignore file */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.serviceName = exports.getSdk = exports.ListMessagesDocument = exports.Typenames = exports.Can = exports.AppInstanceStatus = void 0;
|
|
4
|
+
exports.serviceName = exports.getSdk = exports.ListMessagesDocument = exports.GetLastMessageDocument = exports.MessageFragmentDoc = exports.Typenames = exports.Order = exports.Can = exports.AppInstanceStatus = void 0;
|
|
5
5
|
var AppInstanceStatus;
|
|
6
6
|
(function (AppInstanceStatus) {
|
|
7
7
|
AppInstanceStatus["Active"] = "Active";
|
|
@@ -15,23 +15,46 @@ var Can;
|
|
|
15
15
|
Can["Remove"] = "remove";
|
|
16
16
|
Can["Write"] = "write";
|
|
17
17
|
})(Can || (exports.Can = Can = {}));
|
|
18
|
+
var Order;
|
|
19
|
+
(function (Order) {
|
|
20
|
+
Order["Asc"] = "ASC";
|
|
21
|
+
Order["Desc"] = "DESC";
|
|
22
|
+
})(Order || (exports.Order = Order = {}));
|
|
18
23
|
var Typenames;
|
|
19
24
|
(function (Typenames) {
|
|
20
25
|
Typenames["Any"] = "Any";
|
|
21
26
|
Typenames["GraphqlConnections"] = "GraphqlConnections";
|
|
22
27
|
Typenames["GraphqlSubscriptions"] = "GraphqlSubscriptions";
|
|
23
28
|
})(Typenames || (exports.Typenames = Typenames = {}));
|
|
29
|
+
exports.MessageFragmentDoc = `
|
|
30
|
+
fragment message on Message {
|
|
31
|
+
sessionId
|
|
32
|
+
messageId
|
|
33
|
+
type
|
|
34
|
+
session
|
|
35
|
+
sender
|
|
36
|
+
recipient
|
|
37
|
+
payload
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
exports.GetLastMessageDocument = `
|
|
41
|
+
query getLastMessage($sessionId: ID!, $type: String) {
|
|
42
|
+
getLastMessage(sessionId: $sessionId, type: $type) {
|
|
43
|
+
...message
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
${exports.MessageFragmentDoc}`;
|
|
24
47
|
exports.ListMessagesDocument = `
|
|
25
|
-
query listMessages($sessionId: ID!, $next: Base64) {
|
|
26
|
-
listMessages(
|
|
48
|
+
query listMessages($sessionId: ID!, $type: String, $limit: Int, $order: Order, $next: Base64) {
|
|
49
|
+
listMessages(
|
|
50
|
+
sessionId: $sessionId
|
|
51
|
+
type: $type
|
|
52
|
+
limit: $limit
|
|
53
|
+
order: $order
|
|
54
|
+
next: $next
|
|
55
|
+
) {
|
|
27
56
|
nodes {
|
|
28
|
-
|
|
29
|
-
messageId
|
|
30
|
-
type
|
|
31
|
-
session
|
|
32
|
-
sender
|
|
33
|
-
recipient
|
|
34
|
-
payload
|
|
57
|
+
...message
|
|
35
58
|
}
|
|
36
59
|
pageInfo {
|
|
37
60
|
hasNext
|
|
@@ -39,9 +62,12 @@ exports.ListMessagesDocument = `
|
|
|
39
62
|
}
|
|
40
63
|
}
|
|
41
64
|
}
|
|
42
|
-
`;
|
|
65
|
+
${exports.MessageFragmentDoc}`;
|
|
43
66
|
function getSdk(requester) {
|
|
44
67
|
return {
|
|
68
|
+
getLastMessage(variables, options) {
|
|
69
|
+
return requester(exports.GetLastMessageDocument, variables, options);
|
|
70
|
+
},
|
|
45
71
|
listMessages(variables, options) {
|
|
46
72
|
return requester(exports.ListMessagesDocument, variables, options);
|
|
47
73
|
}
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
export type Maybe<T> = T;
|
|
2
|
+
export type InputMaybe<T> = T;
|
|
3
|
+
export type Exact<T extends {
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
}> = {
|
|
6
|
+
[K in keyof T]: T[K];
|
|
7
|
+
};
|
|
8
|
+
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
9
|
+
[SubKey in K]?: Maybe<T[SubKey]>;
|
|
10
|
+
};
|
|
11
|
+
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
|
12
|
+
[SubKey in K]: Maybe<T[SubKey]>;
|
|
13
|
+
};
|
|
14
|
+
export type MakeEmpty<T extends {
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}, K extends keyof T> = {
|
|
17
|
+
[_ in K]?: never;
|
|
18
|
+
};
|
|
19
|
+
export type Incremental<T> = T | {
|
|
20
|
+
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
|
21
|
+
};
|
|
22
|
+
/** All built-in and custom scalars, mapped to their actual values */
|
|
23
|
+
export type Scalars = {
|
|
24
|
+
ID: {
|
|
25
|
+
input: string;
|
|
26
|
+
output: string;
|
|
27
|
+
};
|
|
28
|
+
String: {
|
|
29
|
+
input: string;
|
|
30
|
+
output: string;
|
|
31
|
+
};
|
|
32
|
+
Boolean: {
|
|
33
|
+
input: boolean;
|
|
34
|
+
output: boolean;
|
|
35
|
+
};
|
|
36
|
+
Int: {
|
|
37
|
+
input: number;
|
|
38
|
+
output: number;
|
|
39
|
+
};
|
|
40
|
+
Float: {
|
|
41
|
+
input: number;
|
|
42
|
+
output: number;
|
|
43
|
+
};
|
|
44
|
+
Base64: {
|
|
45
|
+
input: object;
|
|
46
|
+
output: string;
|
|
47
|
+
};
|
|
48
|
+
CountryCode: {
|
|
49
|
+
input: string;
|
|
50
|
+
output: string;
|
|
51
|
+
};
|
|
52
|
+
Currency: {
|
|
53
|
+
input: string;
|
|
54
|
+
output: string;
|
|
55
|
+
};
|
|
56
|
+
DRN: {
|
|
57
|
+
input: string;
|
|
58
|
+
output: string;
|
|
59
|
+
};
|
|
60
|
+
Date: {
|
|
61
|
+
input: Date;
|
|
62
|
+
output: Date;
|
|
63
|
+
};
|
|
64
|
+
DateTime: {
|
|
65
|
+
input: Date;
|
|
66
|
+
output: Date;
|
|
67
|
+
};
|
|
68
|
+
EmailAddress: {
|
|
69
|
+
input: string;
|
|
70
|
+
output: string;
|
|
71
|
+
};
|
|
72
|
+
IPAddress: {
|
|
73
|
+
input: string;
|
|
74
|
+
output: string;
|
|
75
|
+
};
|
|
76
|
+
JSON: {
|
|
77
|
+
input: any;
|
|
78
|
+
output: any;
|
|
79
|
+
};
|
|
80
|
+
JSONObject: {
|
|
81
|
+
input: any;
|
|
82
|
+
output: any;
|
|
83
|
+
};
|
|
84
|
+
Locale: {
|
|
85
|
+
input: string;
|
|
86
|
+
output: string;
|
|
87
|
+
};
|
|
88
|
+
Number: {
|
|
89
|
+
input: string | number;
|
|
90
|
+
output: number;
|
|
91
|
+
};
|
|
92
|
+
PhoneNumber: {
|
|
93
|
+
input: string;
|
|
94
|
+
output: string;
|
|
95
|
+
};
|
|
96
|
+
Set: {
|
|
97
|
+
input: any;
|
|
98
|
+
output: any[];
|
|
99
|
+
};
|
|
100
|
+
Tag: {
|
|
101
|
+
input: string;
|
|
102
|
+
output: string;
|
|
103
|
+
};
|
|
104
|
+
Timezone: {
|
|
105
|
+
input: string;
|
|
106
|
+
output: string;
|
|
107
|
+
};
|
|
108
|
+
URL: {
|
|
109
|
+
input: string;
|
|
110
|
+
output: string;
|
|
111
|
+
};
|
|
112
|
+
VariableName: {
|
|
113
|
+
input: string;
|
|
114
|
+
output: string;
|
|
115
|
+
};
|
|
116
|
+
Void: {
|
|
117
|
+
input: void;
|
|
118
|
+
output: void;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
export declare enum AppInstanceStatus {
|
|
122
|
+
Active = "Active",
|
|
123
|
+
Failing = "Failing",
|
|
124
|
+
Inactive = "Inactive"
|
|
125
|
+
}
|
|
126
|
+
export declare enum Can {
|
|
127
|
+
Manage = "manage",
|
|
128
|
+
Read = "read",
|
|
129
|
+
Remove = "remove",
|
|
130
|
+
Write = "write"
|
|
131
|
+
}
|
|
132
|
+
export type CreateMercadoLivreInstanceInput = {
|
|
133
|
+
credentialsId: Scalars['ID']['input'];
|
|
134
|
+
name: Scalars['String']['input'];
|
|
135
|
+
sellerId: Scalars['String']['input'];
|
|
136
|
+
};
|
|
137
|
+
export type I18nText = {
|
|
138
|
+
lang: Scalars['Locale']['output'];
|
|
139
|
+
value: Scalars['String']['output'];
|
|
140
|
+
};
|
|
141
|
+
export type I18nTextInput = {
|
|
142
|
+
lang: Scalars['Locale']['input'];
|
|
143
|
+
value: Scalars['String']['input'];
|
|
144
|
+
};
|
|
145
|
+
export type MercadoLivreInstance = {
|
|
146
|
+
createdAt: Scalars['DateTime']['output'];
|
|
147
|
+
credentialsId: Scalars['ID']['output'];
|
|
148
|
+
id: Scalars['ID']['output'];
|
|
149
|
+
name: Scalars['String']['output'];
|
|
150
|
+
sellerId: Scalars['String']['output'];
|
|
151
|
+
status?: Maybe<AppInstanceStatus>;
|
|
152
|
+
updatedAt: Scalars['DateTime']['output'];
|
|
153
|
+
};
|
|
154
|
+
export type Mutation = {
|
|
155
|
+
createMercadoLivreInstance?: Maybe<MercadoLivreInstance>;
|
|
156
|
+
removeMercadoLivreInstance?: Maybe<MercadoLivreInstance>;
|
|
157
|
+
updateMercadoLivreInstance?: Maybe<MercadoLivreInstance>;
|
|
158
|
+
version?: Maybe<Scalars['String']['output']>;
|
|
159
|
+
};
|
|
160
|
+
export type MutationCreateMercadoLivreInstanceArgs = {
|
|
161
|
+
input: CreateMercadoLivreInstanceInput;
|
|
162
|
+
};
|
|
163
|
+
export type MutationRemoveMercadoLivreInstanceArgs = {
|
|
164
|
+
input: RemoveMercadoLivreInstanceInput;
|
|
165
|
+
};
|
|
166
|
+
export type MutationUpdateMercadoLivreInstanceArgs = {
|
|
167
|
+
input: UpdateMercadoLivreInstanceInput;
|
|
168
|
+
};
|
|
169
|
+
export type NumberMatcher = {
|
|
170
|
+
btw?: Maybe<Array<Scalars['Number']['output']>>;
|
|
171
|
+
eq?: Maybe<Scalars['Number']['output']>;
|
|
172
|
+
gt?: Maybe<Scalars['Number']['output']>;
|
|
173
|
+
gte?: Maybe<Scalars['Number']['output']>;
|
|
174
|
+
lt?: Maybe<Scalars['Number']['output']>;
|
|
175
|
+
lte?: Maybe<Scalars['Number']['output']>;
|
|
176
|
+
ne?: Maybe<Scalars['Number']['output']>;
|
|
177
|
+
};
|
|
178
|
+
export type NumberMatcherInput = {
|
|
179
|
+
btw?: InputMaybe<Array<Scalars['Number']['input']>>;
|
|
180
|
+
eq?: InputMaybe<Scalars['Number']['input']>;
|
|
181
|
+
gt?: InputMaybe<Scalars['Number']['input']>;
|
|
182
|
+
gte?: InputMaybe<Scalars['Number']['input']>;
|
|
183
|
+
lt?: InputMaybe<Scalars['Number']['input']>;
|
|
184
|
+
lte?: InputMaybe<Scalars['Number']['input']>;
|
|
185
|
+
ne?: InputMaybe<Scalars['Number']['input']>;
|
|
186
|
+
};
|
|
187
|
+
export type PageInfo = {
|
|
188
|
+
hasNext: Scalars['Boolean']['output'];
|
|
189
|
+
next?: Maybe<Scalars['Base64']['output']>;
|
|
190
|
+
};
|
|
191
|
+
export type Query = {
|
|
192
|
+
app?: Maybe<Scalars['DRN']['output']>;
|
|
193
|
+
getHttpEndpoint?: Maybe<Scalars['String']['output']>;
|
|
194
|
+
getMercadoLivreInstance?: Maybe<MercadoLivreInstance>;
|
|
195
|
+
listMercadoLivreInstances?: Maybe<Array<Maybe<MercadoLivreInstance>>>;
|
|
196
|
+
version?: Maybe<Scalars['String']['output']>;
|
|
197
|
+
};
|
|
198
|
+
export type QueryGetMercadoLivreInstanceArgs = {
|
|
199
|
+
id: Scalars['ID']['input'];
|
|
200
|
+
};
|
|
201
|
+
export type RemoveMercadoLivreInstanceInput = {
|
|
202
|
+
id: Scalars['ID']['input'];
|
|
203
|
+
};
|
|
204
|
+
export type SearchResultsFacet = {
|
|
205
|
+
name: Scalars['String']['output'];
|
|
206
|
+
stats?: Maybe<SearchResultsFacetStats>;
|
|
207
|
+
values?: Maybe<Array<SearchResultsFacetValue>>;
|
|
208
|
+
};
|
|
209
|
+
export type SearchResultsFacetStats = {
|
|
210
|
+
max?: Maybe<Scalars['Float']['output']>;
|
|
211
|
+
min?: Maybe<Scalars['Float']['output']>;
|
|
212
|
+
};
|
|
213
|
+
export type SearchResultsFacetValue = {
|
|
214
|
+
count: Scalars['Float']['output'];
|
|
215
|
+
value: Scalars['String']['output'];
|
|
216
|
+
};
|
|
217
|
+
export type SearchResultsStats = {
|
|
218
|
+
found: Scalars['Float']['output'];
|
|
219
|
+
outOf: Scalars['Float']['output'];
|
|
220
|
+
page: Scalars['Float']['output'];
|
|
221
|
+
perPage: Scalars['Float']['output'];
|
|
222
|
+
searchTime: Scalars['Float']['output'];
|
|
223
|
+
totalPages: Scalars['Float']['output'];
|
|
224
|
+
};
|
|
225
|
+
export type StringMatcher = {
|
|
226
|
+
btw?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
|
227
|
+
ct?: Maybe<Scalars['String']['output']>;
|
|
228
|
+
cti?: Maybe<Scalars['String']['output']>;
|
|
229
|
+
eq?: Maybe<Scalars['String']['output']>;
|
|
230
|
+
eqi?: Maybe<Scalars['String']['output']>;
|
|
231
|
+
gt?: Maybe<Scalars['String']['output']>;
|
|
232
|
+
gte?: Maybe<Scalars['String']['output']>;
|
|
233
|
+
in?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
|
|
234
|
+
lt?: Maybe<Scalars['String']['output']>;
|
|
235
|
+
lte?: Maybe<Scalars['String']['output']>;
|
|
236
|
+
ne?: Maybe<Scalars['String']['output']>;
|
|
237
|
+
};
|
|
238
|
+
export type StringMatcherInput = {
|
|
239
|
+
btw?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
240
|
+
ct?: InputMaybe<Scalars['String']['input']>;
|
|
241
|
+
cti?: InputMaybe<Scalars['String']['input']>;
|
|
242
|
+
eq?: InputMaybe<Scalars['String']['input']>;
|
|
243
|
+
eqi?: InputMaybe<Scalars['String']['input']>;
|
|
244
|
+
gt?: InputMaybe<Scalars['String']['input']>;
|
|
245
|
+
gte?: InputMaybe<Scalars['String']['input']>;
|
|
246
|
+
in?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
|
|
247
|
+
lt?: InputMaybe<Scalars['String']['input']>;
|
|
248
|
+
lte?: InputMaybe<Scalars['String']['input']>;
|
|
249
|
+
ne?: InputMaybe<Scalars['String']['input']>;
|
|
250
|
+
};
|
|
251
|
+
export declare enum Typenames {
|
|
252
|
+
Any = "Any",
|
|
253
|
+
GraphqlConnections = "GraphqlConnections",
|
|
254
|
+
GraphqlSubscriptions = "GraphqlSubscriptions",
|
|
255
|
+
MercadoLivreInstance = "MercadoLivreInstance"
|
|
256
|
+
}
|
|
257
|
+
export type UpdateMercadoLivreInstanceInput = {
|
|
258
|
+
credentialsId?: InputMaybe<Scalars['ID']['input']>;
|
|
259
|
+
name?: InputMaybe<Scalars['String']['input']>;
|
|
260
|
+
sellerId?: InputMaybe<Scalars['String']['input']>;
|
|
261
|
+
};
|
|
262
|
+
export type MercadoLivreInstanceFragment = Pick<MercadoLivreInstance, 'id' | 'name' | 'sellerId' | 'credentialsId' | 'status' | 'createdAt' | 'updatedAt'>;
|
|
263
|
+
export type GetMercadoLivreInstanceQueryVariables = Exact<{
|
|
264
|
+
id: Scalars['ID']['input'];
|
|
265
|
+
}>;
|
|
266
|
+
export type GetMercadoLivreInstanceQuery = {
|
|
267
|
+
getMercadoLivreInstance?: Maybe<MercadoLivreInstanceFragment>;
|
|
268
|
+
};
|
|
269
|
+
export type ListMercadoLivreInstancesQueryVariables = Exact<{
|
|
270
|
+
[key: string]: never;
|
|
271
|
+
}>;
|
|
272
|
+
export type ListMercadoLivreInstancesQuery = {
|
|
273
|
+
listMercadoLivreInstances?: Maybe<Array<Maybe<MercadoLivreInstanceFragment>>>;
|
|
274
|
+
};
|
|
275
|
+
export type CreateMercadoLivreInstanceMutationVariables = Exact<{
|
|
276
|
+
input: CreateMercadoLivreInstanceInput;
|
|
277
|
+
}>;
|
|
278
|
+
export type CreateMercadoLivreInstanceMutation = {
|
|
279
|
+
createMercadoLivreInstance?: Maybe<MercadoLivreInstanceFragment>;
|
|
280
|
+
};
|
|
281
|
+
export type UpdateMercadoLivreInstanceMutationVariables = Exact<{
|
|
282
|
+
input: UpdateMercadoLivreInstanceInput;
|
|
283
|
+
}>;
|
|
284
|
+
export type UpdateMercadoLivreInstanceMutation = {
|
|
285
|
+
updateMercadoLivreInstance?: Maybe<MercadoLivreInstanceFragment>;
|
|
286
|
+
};
|
|
287
|
+
export type RemoveMercadoLivreInstanceMutationVariables = Exact<{
|
|
288
|
+
input: RemoveMercadoLivreInstanceInput;
|
|
289
|
+
}>;
|
|
290
|
+
export type RemoveMercadoLivreInstanceMutation = {
|
|
291
|
+
removeMercadoLivreInstance?: Maybe<MercadoLivreInstanceFragment>;
|
|
292
|
+
};
|
|
293
|
+
export declare const MercadoLivreInstanceFragmentDoc = "\n fragment mercadoLivreInstance on MercadoLivreInstance {\n id\n name\n sellerId\n credentialsId\n status\n createdAt\n updatedAt\n}\n ";
|
|
294
|
+
export declare const GetMercadoLivreInstanceDocument = "\n query getMercadoLivreInstance($id: ID!) {\n getMercadoLivreInstance(id: $id) {\n ...mercadoLivreInstance\n }\n}\n \n fragment mercadoLivreInstance on MercadoLivreInstance {\n id\n name\n sellerId\n credentialsId\n status\n createdAt\n updatedAt\n}\n ";
|
|
295
|
+
export declare const ListMercadoLivreInstancesDocument = "\n query listMercadoLivreInstances {\n listMercadoLivreInstances {\n ...mercadoLivreInstance\n }\n}\n \n fragment mercadoLivreInstance on MercadoLivreInstance {\n id\n name\n sellerId\n credentialsId\n status\n createdAt\n updatedAt\n}\n ";
|
|
296
|
+
export declare const CreateMercadoLivreInstanceDocument = "\n mutation createMercadoLivreInstance($input: CreateMercadoLivreInstanceInput!) {\n createMercadoLivreInstance(input: $input) {\n ...mercadoLivreInstance\n }\n}\n \n fragment mercadoLivreInstance on MercadoLivreInstance {\n id\n name\n sellerId\n credentialsId\n status\n createdAt\n updatedAt\n}\n ";
|
|
297
|
+
export declare const UpdateMercadoLivreInstanceDocument = "\n mutation updateMercadoLivreInstance($input: UpdateMercadoLivreInstanceInput!) {\n updateMercadoLivreInstance(input: $input) {\n ...mercadoLivreInstance\n }\n}\n \n fragment mercadoLivreInstance on MercadoLivreInstance {\n id\n name\n sellerId\n credentialsId\n status\n createdAt\n updatedAt\n}\n ";
|
|
298
|
+
export declare const RemoveMercadoLivreInstanceDocument = "\n mutation removeMercadoLivreInstance($input: RemoveMercadoLivreInstanceInput!) {\n removeMercadoLivreInstance(input: $input) {\n ...mercadoLivreInstance\n }\n}\n \n fragment mercadoLivreInstance on MercadoLivreInstance {\n id\n name\n sellerId\n credentialsId\n status\n createdAt\n updatedAt\n}\n ";
|
|
299
|
+
export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
|
|
300
|
+
export declare function getSdk<C>(requester: Requester<C>): {
|
|
301
|
+
getMercadoLivreInstance(variables: GetMercadoLivreInstanceQueryVariables, options?: C): Promise<GetMercadoLivreInstanceQuery>;
|
|
302
|
+
listMercadoLivreInstances(variables?: ListMercadoLivreInstancesQueryVariables, options?: C): Promise<ListMercadoLivreInstancesQuery>;
|
|
303
|
+
createMercadoLivreInstance(variables: CreateMercadoLivreInstanceMutationVariables, options?: C): Promise<CreateMercadoLivreInstanceMutation>;
|
|
304
|
+
updateMercadoLivreInstance(variables: UpdateMercadoLivreInstanceMutationVariables, options?: C): Promise<UpdateMercadoLivreInstanceMutation>;
|
|
305
|
+
removeMercadoLivreInstance(variables: RemoveMercadoLivreInstanceMutationVariables, options?: C): Promise<RemoveMercadoLivreInstanceMutation>;
|
|
306
|
+
};
|
|
307
|
+
export type Sdk = ReturnType<typeof getSdk>;
|
|
308
|
+
export declare const serviceName = "@droz/mercadolivre";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* istanbul ignore file */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.serviceName = exports.getSdk = exports.RemoveMercadoLivreInstanceDocument = exports.UpdateMercadoLivreInstanceDocument = exports.CreateMercadoLivreInstanceDocument = exports.ListMercadoLivreInstancesDocument = exports.GetMercadoLivreInstanceDocument = exports.MercadoLivreInstanceFragmentDoc = exports.Typenames = exports.Can = exports.AppInstanceStatus = void 0;
|
|
5
|
+
var AppInstanceStatus;
|
|
6
|
+
(function (AppInstanceStatus) {
|
|
7
|
+
AppInstanceStatus["Active"] = "Active";
|
|
8
|
+
AppInstanceStatus["Failing"] = "Failing";
|
|
9
|
+
AppInstanceStatus["Inactive"] = "Inactive";
|
|
10
|
+
})(AppInstanceStatus || (exports.AppInstanceStatus = AppInstanceStatus = {}));
|
|
11
|
+
var Can;
|
|
12
|
+
(function (Can) {
|
|
13
|
+
Can["Manage"] = "manage";
|
|
14
|
+
Can["Read"] = "read";
|
|
15
|
+
Can["Remove"] = "remove";
|
|
16
|
+
Can["Write"] = "write";
|
|
17
|
+
})(Can || (exports.Can = Can = {}));
|
|
18
|
+
var Typenames;
|
|
19
|
+
(function (Typenames) {
|
|
20
|
+
Typenames["Any"] = "Any";
|
|
21
|
+
Typenames["GraphqlConnections"] = "GraphqlConnections";
|
|
22
|
+
Typenames["GraphqlSubscriptions"] = "GraphqlSubscriptions";
|
|
23
|
+
Typenames["MercadoLivreInstance"] = "MercadoLivreInstance";
|
|
24
|
+
})(Typenames || (exports.Typenames = Typenames = {}));
|
|
25
|
+
exports.MercadoLivreInstanceFragmentDoc = `
|
|
26
|
+
fragment mercadoLivreInstance on MercadoLivreInstance {
|
|
27
|
+
id
|
|
28
|
+
name
|
|
29
|
+
sellerId
|
|
30
|
+
credentialsId
|
|
31
|
+
status
|
|
32
|
+
createdAt
|
|
33
|
+
updatedAt
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
exports.GetMercadoLivreInstanceDocument = `
|
|
37
|
+
query getMercadoLivreInstance($id: ID!) {
|
|
38
|
+
getMercadoLivreInstance(id: $id) {
|
|
39
|
+
...mercadoLivreInstance
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
${exports.MercadoLivreInstanceFragmentDoc}`;
|
|
43
|
+
exports.ListMercadoLivreInstancesDocument = `
|
|
44
|
+
query listMercadoLivreInstances {
|
|
45
|
+
listMercadoLivreInstances {
|
|
46
|
+
...mercadoLivreInstance
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
${exports.MercadoLivreInstanceFragmentDoc}`;
|
|
50
|
+
exports.CreateMercadoLivreInstanceDocument = `
|
|
51
|
+
mutation createMercadoLivreInstance($input: CreateMercadoLivreInstanceInput!) {
|
|
52
|
+
createMercadoLivreInstance(input: $input) {
|
|
53
|
+
...mercadoLivreInstance
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
${exports.MercadoLivreInstanceFragmentDoc}`;
|
|
57
|
+
exports.UpdateMercadoLivreInstanceDocument = `
|
|
58
|
+
mutation updateMercadoLivreInstance($input: UpdateMercadoLivreInstanceInput!) {
|
|
59
|
+
updateMercadoLivreInstance(input: $input) {
|
|
60
|
+
...mercadoLivreInstance
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
${exports.MercadoLivreInstanceFragmentDoc}`;
|
|
64
|
+
exports.RemoveMercadoLivreInstanceDocument = `
|
|
65
|
+
mutation removeMercadoLivreInstance($input: RemoveMercadoLivreInstanceInput!) {
|
|
66
|
+
removeMercadoLivreInstance(input: $input) {
|
|
67
|
+
...mercadoLivreInstance
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
${exports.MercadoLivreInstanceFragmentDoc}`;
|
|
71
|
+
function getSdk(requester) {
|
|
72
|
+
return {
|
|
73
|
+
getMercadoLivreInstance(variables, options) {
|
|
74
|
+
return requester(exports.GetMercadoLivreInstanceDocument, variables, options);
|
|
75
|
+
},
|
|
76
|
+
listMercadoLivreInstances(variables, options) {
|
|
77
|
+
return requester(exports.ListMercadoLivreInstancesDocument, variables, options);
|
|
78
|
+
},
|
|
79
|
+
createMercadoLivreInstance(variables, options) {
|
|
80
|
+
return requester(exports.CreateMercadoLivreInstanceDocument, variables, options);
|
|
81
|
+
},
|
|
82
|
+
updateMercadoLivreInstance(variables, options) {
|
|
83
|
+
return requester(exports.UpdateMercadoLivreInstanceDocument, variables, options);
|
|
84
|
+
},
|
|
85
|
+
removeMercadoLivreInstance(variables, options) {
|
|
86
|
+
return requester(exports.RemoveMercadoLivreInstanceDocument, variables, options);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
exports.getSdk = getSdk;
|
|
91
|
+
exports.serviceName = '@droz/mercadolivre';
|