@instantkom/cli 3.130.0 → 3.132.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 +1 -1
- package/dist/commands/tickets/reply.d.ts +22 -0
- package/dist/commands/tickets/reply.js +36 -0
- package/dist/commands/tickets/update.js +5 -3
- package/npm-shrinkwrap.json +1842 -4212
- package/oclif.manifest.json +869 -765
- package/package.json +12 -14
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The instantKOM command-line interface. Built on oclif v4. Ships the `ikm` binary used to drive the instantKOM REST API from terminals, scripts, and CI pipelines.
|
|
4
4
|
|
|
5
|
-
This workspace is part of the instantKOM monorepo. The CLI covers authentication, configuration, channels, contacts, messages, broadcasts, chats, tickets, exports, templates, bots, flows, webhooks,
|
|
5
|
+
This workspace is part of the instantKOM monorepo. The CLI covers authentication, configuration, channels, contacts, messages, broadcasts, chats, tickets, exports, templates, bots, flows, webhooks, shell completion, update handling, packaging, and Docker distribution.
|
|
6
6
|
|
|
7
7
|
## Documentation
|
|
8
8
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base-command.js';
|
|
2
|
+
export default class TicketsReply extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/interfaces").Arg<number, {
|
|
6
|
+
max?: number;
|
|
7
|
+
min?: number;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
10
|
+
static flags: {
|
|
11
|
+
message: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
close: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
16
|
+
quiet: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
'no-color': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
profile: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'api-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
};
|
|
21
|
+
run(): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base-command.js';
|
|
3
|
+
import { createCliApiClient } from '../../send/api.js';
|
|
4
|
+
export default class TicketsReply extends BaseCommand {
|
|
5
|
+
static description = 'Send a real support reply on a ticket. Delivers the message to the ' +
|
|
6
|
+
'customer and records it in both the ticket history and the ' +
|
|
7
|
+
'Nachrichtenprotokoll. Provide raw body text only; the ticket system ' +
|
|
8
|
+
'auto-prepends the personalised salutation and auto-appends the localised ' +
|
|
9
|
+
'footer for email-channel tickets. Adding your own greetings causes ' +
|
|
10
|
+
'duplicated headers/footers.';
|
|
11
|
+
static args = {
|
|
12
|
+
id: Args.integer({ description: 'Ticket ID', required: true }),
|
|
13
|
+
};
|
|
14
|
+
static flags = {
|
|
15
|
+
...BaseCommand.baseFlags,
|
|
16
|
+
message: Flags.string({
|
|
17
|
+
description: 'Reply body (raw text, no salutation or sign-off)',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
close: Flags.boolean({
|
|
21
|
+
description: 'Close the ticket after sending the reply',
|
|
22
|
+
default: false,
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
async run() {
|
|
26
|
+
const { args, flags } = await this.parse(TicketsReply);
|
|
27
|
+
this.flags = flags;
|
|
28
|
+
const payload = { message: flags.message };
|
|
29
|
+
if (flags.close)
|
|
30
|
+
payload.close = true;
|
|
31
|
+
const client = await createCliApiClient(flags);
|
|
32
|
+
const reply = await client.post(`/v1/tickets/${args.id}/reply`, payload);
|
|
33
|
+
if (!flags.quiet)
|
|
34
|
+
this.log(this.toFormatted(reply));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -17,9 +17,11 @@ export default class TicketsUpdate extends BaseCommand {
|
|
|
17
17
|
description: 'User ID to assign the ticket to (use -1 or omit to leave unchanged)',
|
|
18
18
|
}),
|
|
19
19
|
notify: Flags.boolean({
|
|
20
|
-
description: '
|
|
21
|
-
'
|
|
22
|
-
'
|
|
20
|
+
description: 'Trigger the legacy notification chain for transitions that have one. ' +
|
|
21
|
+
'On --assigned-to change: fires TICKET_ASSIGN (assignee email plus ' +
|
|
22
|
+
'optional customer reply via tickets_assign_reply_sts). On --status closed ' +
|
|
23
|
+
'transition: fires TICKET_CLOSE (optional customer reply via ' +
|
|
24
|
+
'tickets_close_reply_sts). Defaults to true. Use --no-notify for silent updates.',
|
|
23
25
|
allowNo: true,
|
|
24
26
|
default: true,
|
|
25
27
|
}),
|