@droz-js/sdk 0.12.19 → 0.13.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@droz-js/sdk",
3
3
  "description": "Droz SDK",
4
- "version": "0.12.19",
4
+ "version": "0.13.0",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",
@@ -0,0 +1,424 @@
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
+ TenantId: {
105
+ input: string;
106
+ output: string;
107
+ };
108
+ Timezone: {
109
+ input: string;
110
+ output: string;
111
+ };
112
+ URL: {
113
+ input: string;
114
+ output: string;
115
+ };
116
+ VariableName: {
117
+ input: string;
118
+ output: string;
119
+ };
120
+ Void: {
121
+ input: void;
122
+ output: void;
123
+ };
124
+ };
125
+ export type AgentInfo = {
126
+ id: Scalars['ID']['output'];
127
+ name: Scalars['String']['output'];
128
+ picture?: Maybe<Scalars['String']['output']>;
129
+ };
130
+ export declare enum AppInstanceStatus {
131
+ Active = "Active",
132
+ Failing = "Failing",
133
+ Inactive = "Inactive"
134
+ }
135
+ export declare enum Can {
136
+ Manage = "manage",
137
+ Read = "read",
138
+ Remove = "remove",
139
+ Write = "write"
140
+ }
141
+ export type CreateEmailInstanceInput = {
142
+ domain: Scalars['String']['input'];
143
+ name: Scalars['String']['input'];
144
+ senderName: Scalars['String']['input'];
145
+ subdomain: Scalars['String']['input'];
146
+ };
147
+ export type EmailAttachmentMetadata = {
148
+ checksum?: Maybe<Scalars['String']['output']>;
149
+ filename?: Maybe<Scalars['String']['output']>;
150
+ mime?: Maybe<Scalars['String']['output']>;
151
+ origin?: Maybe<Scalars['String']['output']>;
152
+ size?: Maybe<Scalars['Int']['output']>;
153
+ sourceId?: Maybe<Scalars['String']['output']>;
154
+ url: Scalars['String']['output'];
155
+ };
156
+ export declare enum EmailDirection {
157
+ Inbound = "Inbound",
158
+ Outbound = "Outbound"
159
+ }
160
+ export type EmailDns = {
161
+ dkim1?: Maybe<EmailDnsRecord>;
162
+ dkim2?: Maybe<EmailDnsRecord>;
163
+ mailCname?: Maybe<EmailDnsRecord>;
164
+ };
165
+ export type EmailDnsRecord = {
166
+ data?: Maybe<Scalars['String']['output']>;
167
+ host?: Maybe<Scalars['String']['output']>;
168
+ type?: Maybe<Scalars['String']['output']>;
169
+ };
170
+ export type EmailInstance = {
171
+ createdAt: Scalars['DateTime']['output'];
172
+ credentialId: Scalars['ID']['output'];
173
+ dns: EmailDns;
174
+ domain: Scalars['String']['output'];
175
+ drn: Scalars['DRN']['output'];
176
+ failingReason?: Maybe<Scalars['String']['output']>;
177
+ id: Scalars['ID']['output'];
178
+ name: Scalars['String']['output'];
179
+ senderEmail: Scalars['EmailAddress']['output'];
180
+ senderName: Scalars['String']['output'];
181
+ status: AppInstanceStatus;
182
+ subdomain: Scalars['String']['output'];
183
+ updatedAt: Scalars['DateTime']['output'];
184
+ };
185
+ export declare enum EmailStatus {
186
+ Bounce = "Bounce",
187
+ Deferred = "Deferred",
188
+ Delivered = "Delivered",
189
+ Dropped = "Dropped",
190
+ Processed = "Processed",
191
+ Sent = "Sent"
192
+ }
193
+ export type EmailThread = {
194
+ replies: Array<EmailThreadReply>;
195
+ root: EmailThreadRoot;
196
+ };
197
+ export type EmailThreadReply = {
198
+ attachments: Array<EmailAttachmentMetadata>;
199
+ createdAt: Scalars['DateTime']['output'];
200
+ direction: EmailDirection;
201
+ id: Scalars['ID']['output'];
202
+ messageId?: Maybe<Scalars['String']['output']>;
203
+ replyId: Scalars['String']['output'];
204
+ status: EmailStatus;
205
+ updatedAt: Scalars['DateTime']['output'];
206
+ };
207
+ export type EmailThreadRoot = {
208
+ attachments: Array<EmailAttachmentMetadata>;
209
+ createdAt: Scalars['DateTime']['output'];
210
+ direction: EmailDirection;
211
+ instanceId: Scalars['String']['output'];
212
+ messageId: Scalars['String']['output'];
213
+ sessionId: Scalars['String']['output'];
214
+ status: EmailStatus;
215
+ subject: Scalars['String']['output'];
216
+ updatedAt: Scalars['DateTime']['output'];
217
+ };
218
+ export type I18nText = {
219
+ lang: Scalars['Locale']['output'];
220
+ value: Scalars['String']['output'];
221
+ };
222
+ export type I18nTextInput = {
223
+ lang: Scalars['Locale']['input'];
224
+ value: Scalars['String']['input'];
225
+ };
226
+ export type Mutation = {
227
+ createEmailInstance: EmailInstance;
228
+ removeEmailInstance?: Maybe<Scalars['Void']['output']>;
229
+ updateEmailInstance: EmailInstance;
230
+ validateInstanceDomain: Scalars['Boolean']['output'];
231
+ version?: Maybe<Scalars['String']['output']>;
232
+ };
233
+ export type MutationCreateEmailInstanceArgs = {
234
+ input: CreateEmailInstanceInput;
235
+ };
236
+ export type MutationRemoveEmailInstanceArgs = {
237
+ input: RemoveEmailInstanceInput;
238
+ };
239
+ export type MutationUpdateEmailInstanceArgs = {
240
+ input: UpdateEmailInstanceInput;
241
+ };
242
+ export type MutationValidateInstanceDomainArgs = {
243
+ input: ValidateInstanceDomainInput;
244
+ };
245
+ export type NumberMatcher = {
246
+ btw?: Maybe<Array<Scalars['Number']['output']>>;
247
+ eq?: Maybe<Scalars['Number']['output']>;
248
+ gt?: Maybe<Scalars['Number']['output']>;
249
+ gte?: Maybe<Scalars['Number']['output']>;
250
+ lt?: Maybe<Scalars['Number']['output']>;
251
+ lte?: Maybe<Scalars['Number']['output']>;
252
+ ne?: Maybe<Scalars['Number']['output']>;
253
+ };
254
+ export type NumberMatcherInput = {
255
+ btw?: InputMaybe<Array<Scalars['Number']['input']>>;
256
+ eq?: InputMaybe<Scalars['Number']['input']>;
257
+ gt?: InputMaybe<Scalars['Number']['input']>;
258
+ gte?: InputMaybe<Scalars['Number']['input']>;
259
+ lt?: InputMaybe<Scalars['Number']['input']>;
260
+ lte?: InputMaybe<Scalars['Number']['input']>;
261
+ ne?: InputMaybe<Scalars['Number']['input']>;
262
+ };
263
+ export type PageInfo = {
264
+ hasNext: Scalars['Boolean']['output'];
265
+ next?: Maybe<Scalars['Base64']['output']>;
266
+ };
267
+ export type Query = {
268
+ app?: Maybe<Scalars['DRN']['output']>;
269
+ getEmailInstance?: Maybe<EmailInstance>;
270
+ getHttpEndpoint?: Maybe<Scalars['String']['output']>;
271
+ listEmailInstances: Array<EmailInstance>;
272
+ listThreadingBySessionId?: Maybe<EmailThread>;
273
+ version?: Maybe<Scalars['String']['output']>;
274
+ };
275
+ export type QueryGetEmailInstanceArgs = {
276
+ id: Scalars['ID']['input'];
277
+ };
278
+ export type QueryListThreadingBySessionIdArgs = {
279
+ sessionId: Scalars['ID']['input'];
280
+ };
281
+ export type RemoveEmailInstanceInput = {
282
+ id: Scalars['ID']['input'];
283
+ };
284
+ export type SearchResultsFacet = {
285
+ name: Scalars['String']['output'];
286
+ stats?: Maybe<SearchResultsFacetStats>;
287
+ values?: Maybe<Array<SearchResultsFacetValue>>;
288
+ };
289
+ export type SearchResultsFacetStats = {
290
+ max?: Maybe<Scalars['Float']['output']>;
291
+ min?: Maybe<Scalars['Float']['output']>;
292
+ };
293
+ export type SearchResultsFacetValue = {
294
+ count: Scalars['Float']['output'];
295
+ value: Scalars['String']['output'];
296
+ };
297
+ export type SearchResultsStats = {
298
+ found: Scalars['Float']['output'];
299
+ outOf: Scalars['Float']['output'];
300
+ page: Scalars['Float']['output'];
301
+ perPage: Scalars['Float']['output'];
302
+ searchTime: Scalars['Float']['output'];
303
+ totalPages: Scalars['Float']['output'];
304
+ };
305
+ export type StringMatcher = {
306
+ btw?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
307
+ ct?: Maybe<Scalars['String']['output']>;
308
+ cti?: Maybe<Scalars['String']['output']>;
309
+ eq?: Maybe<Scalars['String']['output']>;
310
+ eqi?: Maybe<Scalars['String']['output']>;
311
+ gt?: Maybe<Scalars['String']['output']>;
312
+ gte?: Maybe<Scalars['String']['output']>;
313
+ in?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
314
+ lt?: Maybe<Scalars['String']['output']>;
315
+ lte?: Maybe<Scalars['String']['output']>;
316
+ ne?: Maybe<Scalars['String']['output']>;
317
+ };
318
+ export type StringMatcherInput = {
319
+ btw?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
320
+ ct?: InputMaybe<Scalars['String']['input']>;
321
+ cti?: InputMaybe<Scalars['String']['input']>;
322
+ eq?: InputMaybe<Scalars['String']['input']>;
323
+ eqi?: InputMaybe<Scalars['String']['input']>;
324
+ gt?: InputMaybe<Scalars['String']['input']>;
325
+ gte?: InputMaybe<Scalars['String']['input']>;
326
+ in?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
327
+ lt?: InputMaybe<Scalars['String']['input']>;
328
+ lte?: InputMaybe<Scalars['String']['input']>;
329
+ ne?: InputMaybe<Scalars['String']['input']>;
330
+ };
331
+ export declare enum Typenames {
332
+ Any = "Any",
333
+ EmailData = "EmailData",
334
+ EmailInstance = "EmailInstance",
335
+ EmailReplyData = "EmailReplyData",
336
+ GraphqlConnections = "GraphqlConnections",
337
+ GraphqlSubscriptions = "GraphqlSubscriptions"
338
+ }
339
+ export type UpdateEmailInstanceInput = {
340
+ id: Scalars['ID']['input'];
341
+ name?: InputMaybe<Scalars['String']['input']>;
342
+ senderName?: InputMaybe<Scalars['String']['input']>;
343
+ };
344
+ export type ValidateInstanceDomainInput = {
345
+ id: Scalars['ID']['input'];
346
+ };
347
+ export type EmailInstanceFieldsFragment = (Pick<EmailInstance, 'id' | 'name' | 'drn' | 'credentialId' | 'senderEmail' | 'senderName' | 'domain' | 'subdomain' | 'status' | 'failingReason' | 'createdAt' | 'updatedAt'> & {
348
+ dns: {
349
+ mailCname?: Maybe<Pick<EmailDnsRecord, 'type' | 'host' | 'data'>>;
350
+ dkim1?: Maybe<Pick<EmailDnsRecord, 'type' | 'host' | 'data'>>;
351
+ dkim2?: Maybe<Pick<EmailDnsRecord, 'type' | 'host' | 'data'>>;
352
+ };
353
+ });
354
+ export type EmailAttachmentMetadataFieldsFragment = Pick<EmailAttachmentMetadata, 'sourceId' | 'filename' | 'mime' | 'size' | 'checksum' | 'url' | 'origin'>;
355
+ export type EmailThreadRootFieldsFragment = (Pick<EmailThreadRoot, 'messageId' | 'sessionId' | 'instanceId' | 'direction' | 'status' | 'subject' | 'createdAt' | 'updatedAt'> & {
356
+ attachments: Array<EmailAttachmentMetadataFieldsFragment>;
357
+ });
358
+ export type EmailThreadReplyFieldsFragment = (Pick<EmailThreadReply, 'id' | 'replyId' | 'messageId' | 'direction' | 'status' | 'createdAt' | 'updatedAt'> & {
359
+ attachments: Array<EmailAttachmentMetadataFieldsFragment>;
360
+ });
361
+ export type GetEmailInstanceQueryVariables = Exact<{
362
+ id: Scalars['ID']['input'];
363
+ }>;
364
+ export type GetEmailInstanceQuery = {
365
+ getEmailInstance?: Maybe<EmailInstanceFieldsFragment>;
366
+ };
367
+ export type ListEmailInstancesQueryVariables = Exact<{
368
+ [key: string]: never;
369
+ }>;
370
+ export type ListEmailInstancesQuery = {
371
+ listEmailInstances: Array<EmailInstanceFieldsFragment>;
372
+ };
373
+ export type CreateEmailInstanceMutationVariables = Exact<{
374
+ input: CreateEmailInstanceInput;
375
+ }>;
376
+ export type CreateEmailInstanceMutation = {
377
+ createEmailInstance: EmailInstanceFieldsFragment;
378
+ };
379
+ export type UpdateEmailInstanceMutationVariables = Exact<{
380
+ input: UpdateEmailInstanceInput;
381
+ }>;
382
+ export type UpdateEmailInstanceMutation = {
383
+ updateEmailInstance: EmailInstanceFieldsFragment;
384
+ };
385
+ export type RemoveEmailInstanceMutationVariables = Exact<{
386
+ input: RemoveEmailInstanceInput;
387
+ }>;
388
+ export type RemoveEmailInstanceMutation = Pick<Mutation, 'removeEmailInstance'>;
389
+ export type ValidateInstanceDomainMutationVariables = Exact<{
390
+ input: ValidateInstanceDomainInput;
391
+ }>;
392
+ export type ValidateInstanceDomainMutation = Pick<Mutation, 'validateInstanceDomain'>;
393
+ export type ListThreadingBySessionIdQueryVariables = Exact<{
394
+ sessionId: Scalars['ID']['input'];
395
+ }>;
396
+ export type ListThreadingBySessionIdQuery = {
397
+ listThreadingBySessionId?: Maybe<{
398
+ root: EmailThreadRootFieldsFragment;
399
+ replies: Array<EmailThreadReplyFieldsFragment>;
400
+ }>;
401
+ };
402
+ export declare const EmailInstanceFieldsFragmentDoc = "\n fragment emailInstanceFields on EmailInstance {\n id\n name\n drn\n credentialId\n senderEmail\n senderName\n domain\n subdomain\n dns {\n mailCname {\n type\n host\n data\n }\n dkim1 {\n type\n host\n data\n }\n dkim2 {\n type\n host\n data\n }\n }\n status\n failingReason\n createdAt\n updatedAt\n}\n ";
403
+ export declare const EmailAttachmentMetadataFieldsFragmentDoc = "\n fragment emailAttachmentMetadataFields on EmailAttachmentMetadata {\n sourceId\n filename\n mime\n size\n checksum\n url\n origin\n}\n ";
404
+ export declare const EmailThreadRootFieldsFragmentDoc = "\n fragment emailThreadRootFields on EmailThreadRoot {\n messageId\n sessionId\n instanceId\n direction\n status\n subject\n attachments {\n ...emailAttachmentMetadataFields\n }\n createdAt\n updatedAt\n}\n ";
405
+ export declare const EmailThreadReplyFieldsFragmentDoc = "\n fragment emailThreadReplyFields on EmailThreadReply {\n id\n replyId\n messageId\n direction\n status\n attachments {\n ...emailAttachmentMetadataFields\n }\n createdAt\n updatedAt\n}\n ";
406
+ export declare const GetEmailInstanceDocument = "\n query GetEmailInstance($id: ID!) {\n getEmailInstance(id: $id) {\n ...emailInstanceFields\n }\n}\n \n fragment emailInstanceFields on EmailInstance {\n id\n name\n drn\n credentialId\n senderEmail\n senderName\n domain\n subdomain\n dns {\n mailCname {\n type\n host\n data\n }\n dkim1 {\n type\n host\n data\n }\n dkim2 {\n type\n host\n data\n }\n }\n status\n failingReason\n createdAt\n updatedAt\n}\n ";
407
+ export declare const ListEmailInstancesDocument = "\n query ListEmailInstances {\n listEmailInstances {\n ...emailInstanceFields\n }\n}\n \n fragment emailInstanceFields on EmailInstance {\n id\n name\n drn\n credentialId\n senderEmail\n senderName\n domain\n subdomain\n dns {\n mailCname {\n type\n host\n data\n }\n dkim1 {\n type\n host\n data\n }\n dkim2 {\n type\n host\n data\n }\n }\n status\n failingReason\n createdAt\n updatedAt\n}\n ";
408
+ export declare const CreateEmailInstanceDocument = "\n mutation CreateEmailInstance($input: CreateEmailInstanceInput!) {\n createEmailInstance(input: $input) {\n ...emailInstanceFields\n }\n}\n \n fragment emailInstanceFields on EmailInstance {\n id\n name\n drn\n credentialId\n senderEmail\n senderName\n domain\n subdomain\n dns {\n mailCname {\n type\n host\n data\n }\n dkim1 {\n type\n host\n data\n }\n dkim2 {\n type\n host\n data\n }\n }\n status\n failingReason\n createdAt\n updatedAt\n}\n ";
409
+ export declare const UpdateEmailInstanceDocument = "\n mutation UpdateEmailInstance($input: UpdateEmailInstanceInput!) {\n updateEmailInstance(input: $input) {\n ...emailInstanceFields\n }\n}\n \n fragment emailInstanceFields on EmailInstance {\n id\n name\n drn\n credentialId\n senderEmail\n senderName\n domain\n subdomain\n dns {\n mailCname {\n type\n host\n data\n }\n dkim1 {\n type\n host\n data\n }\n dkim2 {\n type\n host\n data\n }\n }\n status\n failingReason\n createdAt\n updatedAt\n}\n ";
410
+ export declare const RemoveEmailInstanceDocument = "\n mutation RemoveEmailInstance($input: RemoveEmailInstanceInput!) {\n removeEmailInstance(input: $input)\n}\n ";
411
+ export declare const ValidateInstanceDomainDocument = "\n mutation ValidateInstanceDomain($input: ValidateInstanceDomainInput!) {\n validateInstanceDomain(input: $input)\n}\n ";
412
+ export declare const ListThreadingBySessionIdDocument = "\n query ListThreadingBySessionId($sessionId: ID!) {\n listThreadingBySessionId(sessionId: $sessionId) {\n root {\n ...emailThreadRootFields\n }\n replies {\n ...emailThreadReplyFields\n }\n }\n}\n \n fragment emailThreadRootFields on EmailThreadRoot {\n messageId\n sessionId\n instanceId\n direction\n status\n subject\n attachments {\n ...emailAttachmentMetadataFields\n }\n createdAt\n updatedAt\n}\n \n\n fragment emailAttachmentMetadataFields on EmailAttachmentMetadata {\n sourceId\n filename\n mime\n size\n checksum\n url\n origin\n}\n \n\n fragment emailThreadReplyFields on EmailThreadReply {\n id\n replyId\n messageId\n direction\n status\n attachments {\n ...emailAttachmentMetadataFields\n }\n createdAt\n updatedAt\n}\n ";
413
+ export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>;
414
+ export declare function getSdk<C>(requester: Requester<C>): {
415
+ GetEmailInstance(variables: GetEmailInstanceQueryVariables, options?: C): Promise<GetEmailInstanceQuery>;
416
+ ListEmailInstances(variables?: ListEmailInstancesQueryVariables, options?: C): Promise<ListEmailInstancesQuery>;
417
+ CreateEmailInstance(variables: CreateEmailInstanceMutationVariables, options?: C): Promise<CreateEmailInstanceMutation>;
418
+ UpdateEmailInstance(variables: UpdateEmailInstanceMutationVariables, options?: C): Promise<UpdateEmailInstanceMutation>;
419
+ RemoveEmailInstance(variables: RemoveEmailInstanceMutationVariables, options?: C): Promise<RemoveEmailInstanceMutation>;
420
+ ValidateInstanceDomain(variables: ValidateInstanceDomainMutationVariables, options?: C): Promise<ValidateInstanceDomainMutation>;
421
+ ListThreadingBySessionId(variables: ListThreadingBySessionIdQueryVariables, options?: C): Promise<ListThreadingBySessionIdQuery>;
422
+ };
423
+ export type Sdk = ReturnType<typeof getSdk>;
424
+ export declare const serviceName = "@droz/email";
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+ /* istanbul ignore file */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.serviceName = exports.ListThreadingBySessionIdDocument = exports.ValidateInstanceDomainDocument = exports.RemoveEmailInstanceDocument = exports.UpdateEmailInstanceDocument = exports.CreateEmailInstanceDocument = exports.ListEmailInstancesDocument = exports.GetEmailInstanceDocument = exports.EmailThreadReplyFieldsFragmentDoc = exports.EmailThreadRootFieldsFragmentDoc = exports.EmailAttachmentMetadataFieldsFragmentDoc = exports.EmailInstanceFieldsFragmentDoc = exports.Typenames = exports.EmailStatus = exports.EmailDirection = exports.Can = exports.AppInstanceStatus = void 0;
5
+ exports.getSdk = getSdk;
6
+ var AppInstanceStatus;
7
+ (function (AppInstanceStatus) {
8
+ AppInstanceStatus["Active"] = "Active";
9
+ AppInstanceStatus["Failing"] = "Failing";
10
+ AppInstanceStatus["Inactive"] = "Inactive";
11
+ })(AppInstanceStatus || (exports.AppInstanceStatus = AppInstanceStatus = {}));
12
+ var Can;
13
+ (function (Can) {
14
+ Can["Manage"] = "manage";
15
+ Can["Read"] = "read";
16
+ Can["Remove"] = "remove";
17
+ Can["Write"] = "write";
18
+ })(Can || (exports.Can = Can = {}));
19
+ var EmailDirection;
20
+ (function (EmailDirection) {
21
+ EmailDirection["Inbound"] = "Inbound";
22
+ EmailDirection["Outbound"] = "Outbound";
23
+ })(EmailDirection || (exports.EmailDirection = EmailDirection = {}));
24
+ var EmailStatus;
25
+ (function (EmailStatus) {
26
+ EmailStatus["Bounce"] = "Bounce";
27
+ EmailStatus["Deferred"] = "Deferred";
28
+ EmailStatus["Delivered"] = "Delivered";
29
+ EmailStatus["Dropped"] = "Dropped";
30
+ EmailStatus["Processed"] = "Processed";
31
+ EmailStatus["Sent"] = "Sent";
32
+ })(EmailStatus || (exports.EmailStatus = EmailStatus = {}));
33
+ var Typenames;
34
+ (function (Typenames) {
35
+ Typenames["Any"] = "Any";
36
+ Typenames["EmailData"] = "EmailData";
37
+ Typenames["EmailInstance"] = "EmailInstance";
38
+ Typenames["EmailReplyData"] = "EmailReplyData";
39
+ Typenames["GraphqlConnections"] = "GraphqlConnections";
40
+ Typenames["GraphqlSubscriptions"] = "GraphqlSubscriptions";
41
+ })(Typenames || (exports.Typenames = Typenames = {}));
42
+ exports.EmailInstanceFieldsFragmentDoc = `
43
+ fragment emailInstanceFields on EmailInstance {
44
+ id
45
+ name
46
+ drn
47
+ credentialId
48
+ senderEmail
49
+ senderName
50
+ domain
51
+ subdomain
52
+ dns {
53
+ mailCname {
54
+ type
55
+ host
56
+ data
57
+ }
58
+ dkim1 {
59
+ type
60
+ host
61
+ data
62
+ }
63
+ dkim2 {
64
+ type
65
+ host
66
+ data
67
+ }
68
+ }
69
+ status
70
+ failingReason
71
+ createdAt
72
+ updatedAt
73
+ }
74
+ `;
75
+ exports.EmailAttachmentMetadataFieldsFragmentDoc = `
76
+ fragment emailAttachmentMetadataFields on EmailAttachmentMetadata {
77
+ sourceId
78
+ filename
79
+ mime
80
+ size
81
+ checksum
82
+ url
83
+ origin
84
+ }
85
+ `;
86
+ exports.EmailThreadRootFieldsFragmentDoc = `
87
+ fragment emailThreadRootFields on EmailThreadRoot {
88
+ messageId
89
+ sessionId
90
+ instanceId
91
+ direction
92
+ status
93
+ subject
94
+ attachments {
95
+ ...emailAttachmentMetadataFields
96
+ }
97
+ createdAt
98
+ updatedAt
99
+ }
100
+ `;
101
+ exports.EmailThreadReplyFieldsFragmentDoc = `
102
+ fragment emailThreadReplyFields on EmailThreadReply {
103
+ id
104
+ replyId
105
+ messageId
106
+ direction
107
+ status
108
+ attachments {
109
+ ...emailAttachmentMetadataFields
110
+ }
111
+ createdAt
112
+ updatedAt
113
+ }
114
+ `;
115
+ exports.GetEmailInstanceDocument = `
116
+ query GetEmailInstance($id: ID!) {
117
+ getEmailInstance(id: $id) {
118
+ ...emailInstanceFields
119
+ }
120
+ }
121
+ ${exports.EmailInstanceFieldsFragmentDoc}`;
122
+ exports.ListEmailInstancesDocument = `
123
+ query ListEmailInstances {
124
+ listEmailInstances {
125
+ ...emailInstanceFields
126
+ }
127
+ }
128
+ ${exports.EmailInstanceFieldsFragmentDoc}`;
129
+ exports.CreateEmailInstanceDocument = `
130
+ mutation CreateEmailInstance($input: CreateEmailInstanceInput!) {
131
+ createEmailInstance(input: $input) {
132
+ ...emailInstanceFields
133
+ }
134
+ }
135
+ ${exports.EmailInstanceFieldsFragmentDoc}`;
136
+ exports.UpdateEmailInstanceDocument = `
137
+ mutation UpdateEmailInstance($input: UpdateEmailInstanceInput!) {
138
+ updateEmailInstance(input: $input) {
139
+ ...emailInstanceFields
140
+ }
141
+ }
142
+ ${exports.EmailInstanceFieldsFragmentDoc}`;
143
+ exports.RemoveEmailInstanceDocument = `
144
+ mutation RemoveEmailInstance($input: RemoveEmailInstanceInput!) {
145
+ removeEmailInstance(input: $input)
146
+ }
147
+ `;
148
+ exports.ValidateInstanceDomainDocument = `
149
+ mutation ValidateInstanceDomain($input: ValidateInstanceDomainInput!) {
150
+ validateInstanceDomain(input: $input)
151
+ }
152
+ `;
153
+ exports.ListThreadingBySessionIdDocument = `
154
+ query ListThreadingBySessionId($sessionId: ID!) {
155
+ listThreadingBySessionId(sessionId: $sessionId) {
156
+ root {
157
+ ...emailThreadRootFields
158
+ }
159
+ replies {
160
+ ...emailThreadReplyFields
161
+ }
162
+ }
163
+ }
164
+ ${exports.EmailThreadRootFieldsFragmentDoc}
165
+ ${exports.EmailAttachmentMetadataFieldsFragmentDoc}
166
+ ${exports.EmailThreadReplyFieldsFragmentDoc}`;
167
+ function getSdk(requester) {
168
+ return {
169
+ GetEmailInstance(variables, options) {
170
+ return requester(exports.GetEmailInstanceDocument, variables, options);
171
+ },
172
+ ListEmailInstances(variables, options) {
173
+ return requester(exports.ListEmailInstancesDocument, variables, options);
174
+ },
175
+ CreateEmailInstance(variables, options) {
176
+ return requester(exports.CreateEmailInstanceDocument, variables, options);
177
+ },
178
+ UpdateEmailInstance(variables, options) {
179
+ return requester(exports.UpdateEmailInstanceDocument, variables, options);
180
+ },
181
+ RemoveEmailInstance(variables, options) {
182
+ return requester(exports.RemoveEmailInstanceDocument, variables, options);
183
+ },
184
+ ValidateInstanceDomain(variables, options) {
185
+ return requester(exports.ValidateInstanceDomainDocument, variables, options);
186
+ },
187
+ ListThreadingBySessionId(variables, options) {
188
+ return requester(exports.ListThreadingBySessionIdDocument, variables, options);
189
+ }
190
+ };
191
+ }
192
+ exports.serviceName = '@droz/email';