@superdurable/connector-freshdesk 0.1.0 → 0.2.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/README.md +21 -3
- package/dex-connector.json +265 -7
- package/dist/{chunk-CLK5W7ZY.js → chunk-SSAMOXWJ.js} +52 -9
- package/dist/{connection-BRfKrSCD.d.ts → connection-Lx6ZBW6r.d.ts} +29 -24
- package/dist/index.d.ts +205 -12
- package/dist/index.js +424 -6
- package/dist/mock.d.ts +1 -1
- package/dist/mock.js +1 -1
- package/package.json +7 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { A as AddNoteInput, a as AddNoteOutput, C as Connection, b as CreateTicketInput, c as CreateTicketOutput, G as GetTicketInput, T as TicketDetails, S as SearchTicketsInput, d as SearchTicketsOutput, U as UpdateTicketInput, e as UpdateTicketOutput,
|
|
2
|
-
export {
|
|
1
|
+
import { A as AddNoteInput, a as AddNoteOutput, C as Connection, b as CreateTicketInput, c as CreateTicketOutput, G as GetTicketInput, T as TicketDetails, S as SearchTicketsInput, d as SearchTicketsOutput, U as UpdateTicketInput, e as UpdateTicketOutput, f as Credentials, g as Config, O as Operations, h as Ticket } from './connection-Lx6ZBW6r.js';
|
|
2
|
+
export { i as AddNoteInputSchema, j as AddNoteOutputSchema, k as ConfigSchema, l as CreateTicketInputSchema, m as CreateTicketOutputSchema, n as CredentialSource, o as GetTicketInputSchema, p as SearchTicketsInputSchema, q as SearchTicketsOutputSchema, r as TicketConversation, s as TicketConversationSchema, t as TicketDetailsSchema, u as TicketRequester, v as TicketRequesterInput, w as TicketRequesterInputSchema, x as TicketRequesterSchema, y as TicketSchema, z as UpdateTicketInputSchema, B as UpdateTicketOutputSchema, D as decodeCredentials, E as newConnection, F as newConnectionWithOperations } from './connection-Lx6ZBW6r.js';
|
|
3
3
|
import * as _superdurable_connectors_sdk from '@superdurable/connectors-sdk';
|
|
4
|
-
import { MutationDefinition, QueryDefinition, MutationStepConfig, Mutation, MutationResult, QueryStepConfig, Query, QueryResult, MutationStep, QueryStep, Call, QueryAttempt, MutationAttempt, CredentialProvider, Failure, ReceiptDraft } from '@superdurable/connectors-sdk';
|
|
4
|
+
import { MutationDefinition, QueryDefinition, MutationStepConfig, Mutation, MutationResult, QueryStepConfig, Query, QueryResult, MutationStep, QueryStep, Call, QueryAttempt, MutationAttempt, CredentialProvider, TriggerLogger, Failure, ReceiptDraft, ConnectorConfigurationUI, TriggerDefinition, TriggerBindingDefinition, TriggerEvent, ConnectionRef, TriggerContext, TriggerTarget, TriggerRunner } from '@superdurable/connectors-sdk';
|
|
5
5
|
import { StepTarget } from '@superdurable/dex';
|
|
6
6
|
import { LoadedProject } from '@superdurable/connectors-sdk/projectconfig';
|
|
7
7
|
import { ProviderRequest, ProviderResponse } from '@superdurable/connectors-sdk/providerhttp';
|
|
8
|
-
import 'zod';
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
import { ChangeFetcher, Cursor, ChangePage, CursorStore, Runner } from '@superdurable/connectors-sdk/pollingtrigger';
|
|
9
10
|
|
|
10
11
|
/** Stable connector identity. */
|
|
11
12
|
declare const ConnectorID = "freshdesk";
|
|
@@ -238,9 +239,6 @@ interface AddNoteStepConfig<StepInput, OperationInput = AddNoteInput, OperationO
|
|
|
238
239
|
/** Build the addNote Step from a named connection. */
|
|
239
240
|
declare function newAddNoteStep<StepInput, OperationInput = AddNoteInput, OperationOutput = AddNoteOutput>(configuration: AddNoteStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
|
|
240
241
|
|
|
241
|
-
/** Open a configured static Freshdesk connection from a loaded Dex project. */
|
|
242
|
-
declare function newProjectConnection(project: LoadedProject, connectionName: string): Connection<Operations>;
|
|
243
|
-
|
|
244
242
|
/** Search one Freshdesk filter page, optionally using a contact lookup. */
|
|
245
243
|
declare class SearchTicketsOperation implements Query<SearchTicketsInput, SearchTicketsOutput> {
|
|
246
244
|
private readonly client;
|
|
@@ -261,7 +259,7 @@ declare class GetTicketOperation implements Query<GetTicketInput, TicketDetails>
|
|
|
261
259
|
declare class CreateTicketOperation implements Mutation<CreateTicketInput, CreateTicketOutput> {
|
|
262
260
|
private readonly client;
|
|
263
261
|
/** Bind the API client. */ constructor(client: FreshdeskClient);
|
|
264
|
-
/** Return stable manifest metadata. */ definition(): _superdurable_connectors_sdk.
|
|
262
|
+
/** Return stable manifest metadata. */ definition(): _superdurable_connectors_sdk.MutationDefinition;
|
|
265
263
|
/** Correlate the mutation by Call ID; Freshdesk does not receive this key. */ idempotencyKey(callID: string): string;
|
|
266
264
|
/** Validate, checkpoint, and send at most once per safe attempt. */
|
|
267
265
|
invoke(call: Call, input: CreateTicketInput): Promise<MutationAttempt<CreateTicketOutput>>;
|
|
@@ -270,7 +268,7 @@ declare class CreateTicketOperation implements Mutation<CreateTicketInput, Creat
|
|
|
270
268
|
declare class UpdateTicketOperation implements Mutation<UpdateTicketInput, UpdateTicketOutput> {
|
|
271
269
|
private readonly client;
|
|
272
270
|
/** Bind the API client. */ constructor(client: FreshdeskClient);
|
|
273
|
-
/** Return stable manifest metadata. */ definition(): _superdurable_connectors_sdk.
|
|
271
|
+
/** Return stable manifest metadata. */ definition(): _superdurable_connectors_sdk.MutationDefinition;
|
|
274
272
|
/** Correlate the absolute replacement by Call ID. */ idempotencyKey(callID: string): string;
|
|
275
273
|
/** Read, diff, and write only when a field differs. */
|
|
276
274
|
invoke(call: Call, input: UpdateTicketInput): Promise<MutationAttempt<UpdateTicketOutput>>;
|
|
@@ -279,7 +277,7 @@ declare class UpdateTicketOperation implements Mutation<UpdateTicketInput, Updat
|
|
|
279
277
|
declare class AddNoteOperation implements Mutation<AddNoteInput, AddNoteOutput> {
|
|
280
278
|
private readonly client;
|
|
281
279
|
/** Bind the API client. */ constructor(client: FreshdeskClient);
|
|
282
|
-
/** Return stable manifest metadata. */ definition(): _superdurable_connectors_sdk.
|
|
280
|
+
/** Return stable manifest metadata. */ definition(): _superdurable_connectors_sdk.MutationDefinition;
|
|
283
281
|
/** Correlate the mutation by Call ID; Freshdesk does not receive this key. */ idempotencyKey(callID: string): string;
|
|
284
282
|
/** Validate, checkpoint, and send one note or reply. */
|
|
285
283
|
invoke(call: Call, input: AddNoteInput): Promise<MutationAttempt<AddNoteOutput>>;
|
|
@@ -289,7 +287,13 @@ declare class AddNoteOperation implements Mutation<AddNoteInput, AddNoteOutput>
|
|
|
289
287
|
interface FreshdeskClientOptions {
|
|
290
288
|
/** Local Freshdesk-compatible endpoint; production derives it from domain. */ apiBaseURL?: string;
|
|
291
289
|
/** Bounded request sender; production uses the SDK transport. */ send?: (request: ProviderRequest) => Promise<ProviderResponse>;
|
|
292
|
-
/** Receipt
|
|
290
|
+
/** Receipt, Retry-After, and ticketChanged baseline clock. */ now?: () => Date;
|
|
291
|
+
/**
|
|
292
|
+
* Receives the ticketChanged runner's records: seeds, reseeds after a rejected cursor, failed polls, rate-limit
|
|
293
|
+
* pauses, and the durable inboxes newProjectTicketTriggerRunner opens. Records carry binding identity and never
|
|
294
|
+
* ticket contents or credentials. Omitted uses defaultTriggerLogger. Operation Steps do not log.
|
|
295
|
+
*/
|
|
296
|
+
logger?: TriggerLogger;
|
|
293
297
|
}
|
|
294
298
|
/** Classified result of one Freshdesk HTTP exchange. */
|
|
295
299
|
type Exchange = {
|
|
@@ -308,6 +312,8 @@ declare class FreshdeskClient {
|
|
|
308
312
|
private readonly maxResponseBytes;
|
|
309
313
|
private readonly send;
|
|
310
314
|
private readonly now;
|
|
315
|
+
/** Delay between ticketChanged polls in milliseconds, at least 10 seconds; one minute by default. */ readonly pollIntervalMs: number;
|
|
316
|
+
/** Receives the ticketChanged runner's and durable inboxes' records. */ readonly triggerLogger: TriggerLogger;
|
|
311
317
|
/** Bind immutable configuration and a live credential source. */
|
|
312
318
|
constructor(config: Config, credentials: CredentialProvider<Credentials>, options?: FreshdeskClientOptions);
|
|
313
319
|
/** Bind the search query. */ searchTickets(): SearchTicketsOperation;
|
|
@@ -315,6 +321,7 @@ declare class FreshdeskClient {
|
|
|
315
321
|
/** Bind the ticket creation mutation. */ createTicket(): CreateTicketOperation;
|
|
316
322
|
/** Bind the ticket update mutation. */ updateTicket(): UpdateTicketOperation;
|
|
317
323
|
/** Bind the note mutation. */ addNote(): AddNoteOperation;
|
|
324
|
+
/** Return the current time of the injected clock. */ currentTime(): Date;
|
|
318
325
|
/** Resolve the current API key, classifying terminal credential states. */
|
|
319
326
|
resolveCredential(call: Call, operation: string): Promise<{
|
|
320
327
|
key: string;
|
|
@@ -330,4 +337,190 @@ declare class FreshdeskClient {
|
|
|
330
337
|
receipt(call: Call, response?: ProviderResponse, objectID?: number): ReceiptDraft;
|
|
331
338
|
}
|
|
332
339
|
|
|
333
|
-
|
|
340
|
+
/**
|
|
341
|
+
* Open a configured static Freshdesk connection from a loaded Dex project. options, such as a ticketChanged
|
|
342
|
+
* logger or a local apiBaseURL for verification, apply to the connection's client.
|
|
343
|
+
*/
|
|
344
|
+
declare function newProjectConnection(project: LoadedProject, connectionName: string, options?: FreshdeskClientOptions): Connection<Operations>;
|
|
345
|
+
|
|
346
|
+
/** A ticket created inside the poll window that the binding has not delivered before. */
|
|
347
|
+
declare const TicketChangeCreated = "created";
|
|
348
|
+
/** Any later change that moved the ticket's updated_at, such as a status change or a new reply or note. */
|
|
349
|
+
declare const TicketChangeUpdated = "updated";
|
|
350
|
+
/** The derived kind of one ticketChanged delivery; Freshdesk's ticket list reports no change type. */
|
|
351
|
+
type TicketChangeKind = typeof TicketChangeCreated | typeof TicketChangeUpdated;
|
|
352
|
+
/**
|
|
353
|
+
* The ticketChanged binding configuration saved in the project configuration. Freshdesk setup commands
|
|
354
|
+
* cannot send the agent's HTTP Basic API key, so the binding has no provider picker; every field is optional.
|
|
355
|
+
*/
|
|
356
|
+
declare const TicketChangedTriggerConfigurationSchema: z.ZodObject<{
|
|
357
|
+
changeKinds: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
358
|
+
}, z.core.$strict>;
|
|
359
|
+
/** The validated ticketChanged binding configuration. */
|
|
360
|
+
type TicketChangedTriggerConfiguration = z.infer<typeof TicketChangedTriggerConfigurationSchema>;
|
|
361
|
+
/**
|
|
362
|
+
* One created or updated ticket read from Freshdesk's List All Tickets endpoint; field names match the Go
|
|
363
|
+
* connector. Several changes between two polls arrive as one delivery of the latest version. Spam and deleted
|
|
364
|
+
* tickets are not listed, so a ticket moved to spam or trash is not delivered.
|
|
365
|
+
*/
|
|
366
|
+
declare const TicketChangedEventSchema: z.ZodObject<{
|
|
367
|
+
changeKind: z.ZodEnum<{
|
|
368
|
+
created: "created";
|
|
369
|
+
updated: "updated";
|
|
370
|
+
}>;
|
|
371
|
+
ticket: z.ZodObject<{
|
|
372
|
+
id: z.ZodNumber;
|
|
373
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
374
|
+
description: z.ZodOptional<z.ZodString>;
|
|
375
|
+
isDescriptionTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
376
|
+
status: z.ZodNumber;
|
|
377
|
+
priority: z.ZodNumber;
|
|
378
|
+
source: z.ZodOptional<z.ZodNumber>;
|
|
379
|
+
type: z.ZodOptional<z.ZodString>;
|
|
380
|
+
requesterId: z.ZodOptional<z.ZodNumber>;
|
|
381
|
+
responderId: z.ZodOptional<z.ZodNumber>;
|
|
382
|
+
groupId: z.ZodOptional<z.ZodNumber>;
|
|
383
|
+
companyId: z.ZodOptional<z.ZodNumber>;
|
|
384
|
+
productId: z.ZodOptional<z.ZodNumber>;
|
|
385
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
386
|
+
isEscalated: z.ZodOptional<z.ZodBoolean>;
|
|
387
|
+
isSpam: z.ZodOptional<z.ZodBoolean>;
|
|
388
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
389
|
+
updatedAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
390
|
+
dueBy: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
391
|
+
firstResponseDueBy: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
392
|
+
}, z.core.$strict>;
|
|
393
|
+
}, z.core.$strip>;
|
|
394
|
+
/** One created or updated Freshdesk ticket. */
|
|
395
|
+
type TicketChangedEvent = z.infer<typeof TicketChangedEventSchema>;
|
|
396
|
+
/** Manifest definition of ticketChanged. */
|
|
397
|
+
declare const TicketChangedTriggerDefinition: TriggerDefinition;
|
|
398
|
+
/** One static application binding of ticketChanged. */
|
|
399
|
+
interface TicketChangedTriggerBindingConfig {
|
|
400
|
+
/** Static connection name. */ connectionName: string;
|
|
401
|
+
/** Static binding name. */ bindingName: string;
|
|
402
|
+
/** Connector Studio configuration units; ticketChanged has none, so omit it. */ configurationUI?: ConnectorConfigurationUI;
|
|
403
|
+
}
|
|
404
|
+
/** Declare a static ticketChanged binding for Flow Definition tooling and Dex Web. */
|
|
405
|
+
declare function defineTicketChangedTriggerBinding(config: TicketChangedTriggerBindingConfig): TriggerBindingDefinition;
|
|
406
|
+
|
|
407
|
+
/** The per_page of each ticketChanged list request, Freshdesk's maximum of 100. */
|
|
408
|
+
declare const TicketChangePageSize = 100;
|
|
409
|
+
/** The last page Freshdesk serves for List All Tickets (30,000 tickets). */
|
|
410
|
+
declare const MaxTicketListPage = 300;
|
|
411
|
+
/**
|
|
412
|
+
* How far, in milliseconds, before the committed updated_at high-water mark each poll window starts, so a
|
|
413
|
+
* ticket whose update commits a little after its timestamp is still read. Tickets already delivered in the
|
|
414
|
+
* window are recognized by ID and updated_at and not delivered again.
|
|
415
|
+
*/
|
|
416
|
+
declare const TicketChangeOverlapMs = 60000;
|
|
417
|
+
/** Thrown for a ticketChanged cursor token that is not a valid Go cursor document. */
|
|
418
|
+
declare class TicketChangeCursorInvalidError extends Error {
|
|
419
|
+
/** Describe the rejected token without echoing it. */
|
|
420
|
+
constructor();
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Return the Trigger event ID "freshdesk-ticket-<id>-<updated_at Unix seconds>". It is a pure function of the
|
|
424
|
+
* ticket version, so a refetch after a crash yields the same ID and a later change yields a new one.
|
|
425
|
+
*/
|
|
426
|
+
declare function ticketChangeEventId(ticket: Ticket): string;
|
|
427
|
+
/** Report whether the binding delivers kind: every kind when changeKinds is empty or omitted. */
|
|
428
|
+
declare function deliversTicketChangeKind(configuration: TicketChangedTriggerConfiguration, kind: TicketChangeKind): boolean;
|
|
429
|
+
/**
|
|
430
|
+
* Reads Freshdesk's List All Tickets in updated_at order for the poll Trigger kit, at parity with the Go
|
|
431
|
+
* connector: the cursor is the updated_at high-water mark, a one-minute overlap window, and the
|
|
432
|
+
* "<id>@<updated_at>" keys delivered inside it, encoded as Go's cursor document byte for byte. A poller owns
|
|
433
|
+
* one fetcher and calls it one poll at a time.
|
|
434
|
+
*/
|
|
435
|
+
declare class TicketChangeFetcher implements ChangeFetcher<TriggerEvent<TicketChangedEvent>> {
|
|
436
|
+
private readonly client;
|
|
437
|
+
private readonly connection;
|
|
438
|
+
private readonly configuration;
|
|
439
|
+
/** Bind the fetcher to one connection's client and one binding's validated configuration. */
|
|
440
|
+
constructor(client: FreshdeskClient, connection: ConnectionRef, configuration: TicketChangedTriggerConfiguration);
|
|
441
|
+
/**
|
|
442
|
+
* Record the baseline without reporting existing tickets: the high-water mark is Freshdesk's current time
|
|
443
|
+
* from the response Date header, or the local clock without one, and tickets changed within the overlap
|
|
444
|
+
* before it are remembered as delivered.
|
|
445
|
+
*/
|
|
446
|
+
seedCursor(context: TriggerContext): Promise<Cursor>;
|
|
447
|
+
private listSeedWindow;
|
|
448
|
+
/**
|
|
449
|
+
* Read one page of tickets updated since the cursor's window start, oldest first. An undecodable cursor and a
|
|
450
|
+
* Freshdesk 400 for the cursor's query reject with markCursorInvalid, so the kit records a new baseline; a
|
|
451
|
+
* 429 rejects with markRateLimited and Retry-After.
|
|
452
|
+
*/
|
|
453
|
+
fetchChanges(context: TriggerContext, cursor: Cursor): Promise<ChangePage<TriggerEvent<TicketChangedEvent>>>;
|
|
454
|
+
private listTicketPage;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/** Binds one ticketChanged configuration to its application target and cursor. */
|
|
458
|
+
interface TicketChangedTriggerRoute {
|
|
459
|
+
/** The stable application binding name, unique within the runner. */ bindingName: string;
|
|
460
|
+
/** Selects the delivered change kinds; omitted delivers created and updated tickets. */ configuration?: TicketChangedTriggerConfiguration;
|
|
461
|
+
/**
|
|
462
|
+
* Routes each change into the application. A durable target from newDurableTriggerTarget records each change
|
|
463
|
+
* before the cursor commits past it; any other target consumes it first.
|
|
464
|
+
*/
|
|
465
|
+
target: TriggerTarget<TicketChangedEvent>;
|
|
466
|
+
/**
|
|
467
|
+
* Stores the binding's updated_at position, such as LoadedProject.pollCursorStore. Omitted keeps it in memory,
|
|
468
|
+
* so every process start records a new baseline and changes made while stopped are lost.
|
|
469
|
+
*/
|
|
470
|
+
cursor?: CursorStore;
|
|
471
|
+
}
|
|
472
|
+
/** Configures every Freshdesk Trigger binding polled through one connection. */
|
|
473
|
+
interface TicketTriggerRunnerConfig {
|
|
474
|
+
/** A connection from newConnection with a FreshdeskClient or from newProjectConnection; a mock has no client. */ connection: Connection;
|
|
475
|
+
/** The ticketChanged bindings; at least one is required. */ ticketChangedRoutes: TicketChangedTriggerRoute[];
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Create one poll runner for the configured ticketChanged bindings. run replays each durable target, records a
|
|
479
|
+
* baseline for a binding without a cursor, then polls every binding each pollInterval with jitter. A Freshdesk
|
|
480
|
+
* 400 for the cursor's query or an undecodable cursor records a new baseline and logs a WARN record; changes
|
|
481
|
+
* made between the last poll and the new baseline are not delivered. A 429 pauses every binding of the
|
|
482
|
+
* connection for Retry-After, because Freshdesk's limit is per account, or backs off exponentially without it;
|
|
483
|
+
* other failures back off per binding up to 15 minutes. Delivery is at least once, and each change keeps one
|
|
484
|
+
* Trigger event ID across refetches. Throws for a missing or mock connection, no routes, a blank or duplicated
|
|
485
|
+
* binding name, a missing target, or an invalid configuration.
|
|
486
|
+
*/
|
|
487
|
+
declare function newTicketTriggerRunner(config: TicketTriggerRunnerConfig): Runner;
|
|
488
|
+
/** Validate a ticketChanged configuration; throws for an unknown field or an unknown or repeated change kind. */
|
|
489
|
+
declare function parseTicketChangedTriggerConfiguration(configuration: unknown): TicketChangedTriggerConfiguration;
|
|
490
|
+
/** Decode a replayed Trigger inbox payload that the Go or TypeScript connector recorded. */
|
|
491
|
+
declare function decodeTicketChangedEventPayload(payloadJSON: string): TicketChangedEvent;
|
|
492
|
+
/** Selects one ticketChanged binding saved in the project configuration. */
|
|
493
|
+
interface ProjectTicketChangedTriggerRoute {
|
|
494
|
+
/** The saved binding name. */ bindingName: string;
|
|
495
|
+
/** Routes each change into the application, usually newDexFlowTriggerTarget. */ target: TriggerTarget<TicketChangedEvent>;
|
|
496
|
+
}
|
|
497
|
+
/** Selects Freshdesk Trigger bindings saved in the project configuration. */
|
|
498
|
+
interface ProjectTicketTriggerRunnerConfig {
|
|
499
|
+
/** The ticketChanged bindings; at least one is required. */ ticketChangedRoutes: ProjectTicketChangedTriggerRoute[];
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Create a durable runner for bindings saved in the loaded project. connection is the project connection from
|
|
503
|
+
* newProjectConnection(project, name); its client options, such as logger, also apply to the durable inboxes.
|
|
504
|
+
* Each binding's saved configuration is loaded (an unsaved binding delivers every change kind), and each route
|
|
505
|
+
* records changes in its binding's project Trigger inbox before its updated_at position commits in the
|
|
506
|
+
* binding's project poll cursor, so a restarted or replaced replica neither misses nor repeats a change.
|
|
507
|
+
* Throws as newTicketTriggerRunner does and for an invalid saved configuration.
|
|
508
|
+
*/
|
|
509
|
+
declare function newProjectTicketTriggerRunner(project: LoadedProject, connection: Connection, config: ProjectTicketTriggerRunnerConfig): Runner;
|
|
510
|
+
/** Configuration of one in-memory ticketChanged Trigger. */
|
|
511
|
+
interface TicketChangedTriggerConfig {
|
|
512
|
+
/** A connection with a FreshdeskClient. */ connection: Connection;
|
|
513
|
+
/** Static connection name; must equal the connection's name. */ connectionName: string;
|
|
514
|
+
/** Static binding name. */ bindingName: string;
|
|
515
|
+
/** Selects the delivered change kinds; omitted delivers both. */ configuration?: TicketChangedTriggerConfiguration;
|
|
516
|
+
/** Routes accepted changes into the application. */ target: TriggerTarget<TicketChangedEvent>;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Create one ticketChanged Trigger with an in-memory cursor, as Go's generated NewTicketChangedTrigger. It has no
|
|
520
|
+
* project storage, so it records a new baseline on every start and changes made while it is stopped are lost;
|
|
521
|
+
* use newProjectTicketTriggerRunner for durable delivery. Throws when connectionName differs from the
|
|
522
|
+
* connection's name, for a mock connection, or for an invalid configuration.
|
|
523
|
+
*/
|
|
524
|
+
declare function newTicketChangedTrigger(config: TicketChangedTriggerConfig): TriggerRunner;
|
|
525
|
+
|
|
526
|
+
export { AddNoteBranch, AddNoteBranchAdded, AddNoteBranchDefect, AddNoteBranchNotFound, AddNoteBranchProviderRejected, AddNoteBranchUncertain, AddNoteDefinition, AddNoteInput, AddNoteMetadata, AddNoteOperation, AddNoteOutput, type AddNoteStepConfig, Config, Connection, ConnectorID, CreateTicketBranch, CreateTicketBranchCreated, CreateTicketBranchDefect, CreateTicketBranchProviderRejected, CreateTicketBranchUncertain, CreateTicketDefinition, CreateTicketInput, CreateTicketMetadata, CreateTicketOperation, CreateTicketOutput, type CreateTicketStepConfig, Credentials, FreshdeskClient, type FreshdeskClientOptions, GetTicketBranch, GetTicketBranchDefect, GetTicketBranchFound, GetTicketBranchInvalidResponse, GetTicketBranchNotFound, GetTicketBranchProviderRejected, GetTicketDefinition, GetTicketInput, GetTicketMetadata, GetTicketOperation, type GetTicketStepConfig, MaxTicketListPage, type ProjectTicketChangedTriggerRoute, type ProjectTicketTriggerRunnerConfig, ProviderID, SearchTicketsBranch, SearchTicketsBranchDefect, SearchTicketsBranchInvalidResponse, SearchTicketsBranchProviderRejected, SearchTicketsBranchSearched, SearchTicketsDefinition, SearchTicketsInput, SearchTicketsMetadata, SearchTicketsOperation, SearchTicketsOutput, type SearchTicketsStepConfig, Ticket, TicketChangeCreated, TicketChangeCursorInvalidError, TicketChangeFetcher, type TicketChangeKind, TicketChangeOverlapMs, TicketChangePageSize, TicketChangeUpdated, type TicketChangedEvent, TicketChangedEventSchema, type TicketChangedTriggerBindingConfig, type TicketChangedTriggerConfig, type TicketChangedTriggerConfiguration, TicketChangedTriggerConfigurationSchema, TicketChangedTriggerDefinition, type TicketChangedTriggerRoute, TicketDetails, type TicketTriggerRunnerConfig, UpdateTicketBranch, UpdateTicketBranchDefect, UpdateTicketBranchInvalidResponse, UpdateTicketBranchNotFound, UpdateTicketBranchProviderRejected, UpdateTicketBranchUpdated, UpdateTicketDefinition, UpdateTicketInput, UpdateTicketMetadata, UpdateTicketOperation, UpdateTicketOutput, type UpdateTicketStepConfig, decodeTicketChangedEventPayload, defineTicketChangedTriggerBinding, deliversTicketChangeKind, newAddNoteStep, newCreateTicketStep, newGetTicketStep, newProjectConnection, newProjectTicketTriggerRunner, newSearchTicketsStep, newTicketChangedTrigger, newTicketTriggerRunner, newUpdateTicketStep, parseTicketChangedTriggerConfiguration, ticketChangeEventId };
|