@remit/backend 2.2.0 → 2.4.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/dist/src/handlers/classification-settings.d.ts +8 -2
- package/dist/src/handlers/classification-settings.js +19 -4
- package/dist/src/handlers/classification-test.d.ts +17 -0
- package/dist/src/handlers/classification-test.js +76 -0
- package/dist/src/handlers/index.d.ts +1 -0
- package/dist/src/handlers/user-settings.d.ts +2 -0
- package/dist/src/handlers/user-settings.js +15 -2
- package/dist/src/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import type { ClassificationConfigured, ClassificationNotConfigured, ClassificationPreset, UpdateUserSettingsInput } from "@remit/api-openapi-types";
|
|
2
2
|
import type { IAccountSettingRepository } from "@remit/data-ports";
|
|
3
|
-
import { type
|
|
3
|
+
import { type ClassificationLabelDeps } from "@remit/mailbox-service";
|
|
4
|
+
import { type SecretsService, type SerializedEncryptedPayload } from "@remit/secrets-service";
|
|
4
5
|
import type { UserSettingsOutcome } from "./user-settings.js";
|
|
5
6
|
export declare const CLASSIFICATION_SETTING_NAMES: readonly ["ClassificationPresetId", "ClassificationModel", "ClassificationBaseUrl", "ClassificationApiKey", "ClassificationEnabled", "ClassificationDailyLimit"];
|
|
6
7
|
export type ClassificationSettingsDeps = {
|
|
7
8
|
accountSetting: Pick<IAccountSettingRepository, "getMany" | "upsert" | "delete">;
|
|
8
9
|
secrets: Pick<SecretsService, "encrypt">;
|
|
10
|
+
label: ClassificationLabelDeps;
|
|
9
11
|
};
|
|
10
|
-
export type StoredClassification = ClassificationNotConfigured | ClassificationConfigured
|
|
12
|
+
export type StoredClassification = ClassificationNotConfigured | (ClassificationConfigured & {
|
|
13
|
+
apiKeyCiphertext: SerializedEncryptedPayload | undefined;
|
|
14
|
+
});
|
|
11
15
|
type Refusal = Extract<UserSettingsOutcome, {
|
|
12
16
|
ok: false;
|
|
13
17
|
}>;
|
|
@@ -17,6 +21,7 @@ type Decision<T> = {
|
|
|
17
21
|
} | Refusal;
|
|
18
22
|
type ApiKeyChange = {
|
|
19
23
|
action: "Keep";
|
|
24
|
+
ciphertext: SerializedEncryptedPayload;
|
|
20
25
|
} | {
|
|
21
26
|
action: "Replace";
|
|
22
27
|
apiKey: string;
|
|
@@ -32,6 +37,7 @@ export interface ClassificationProviderSave {
|
|
|
32
37
|
type ClassificationInput = Pick<UpdateUserSettingsInput, "classificationPresetId" | "classificationModel" | "classificationBaseUrl" | "classificationApiKey" | "classificationEnabled" | "classificationDailyLimit">;
|
|
33
38
|
export declare const decideClassificationProvider: (input: ClassificationInput, stored: StoredClassification) => Decision<ClassificationProviderSave>;
|
|
34
39
|
export declare const readStoredClassification: (accountSetting: Pick<IAccountSettingRepository, "getMany">, accountConfigId: string) => Promise<StoredClassification>;
|
|
40
|
+
export declare const publicClassification: (stored: StoredClassification) => ClassificationNotConfigured | ClassificationConfigured;
|
|
35
41
|
export declare const classificationPresetsResponse: () => ClassificationPreset[];
|
|
36
42
|
interface ClassificationChange {
|
|
37
43
|
provider: ClassificationProviderSave | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { parseAccountSettingValue } from "@remit/data-ports/account-settings";
|
|
2
2
|
import { CLASSIFICATION_PRESETS, DEFAULT_CLASSIFICATION_DAILY_LIMIT, isClassificationPresetId, } from "@remit/data-ports/classification-presets";
|
|
3
3
|
import { AccountSettingName } from "@remit/domain-enums";
|
|
4
|
+
import { ensureClassificationLabels, } from "@remit/mailbox-service";
|
|
4
5
|
import { serializeEncryptedPayload, } from "@remit/secrets-service";
|
|
5
6
|
export const CLASSIFICATION_SETTING_NAMES = [
|
|
6
7
|
AccountSettingName.ClassificationPresetId,
|
|
@@ -42,8 +43,9 @@ const apiKeyFor = (preset, requested, keptKey) => {
|
|
|
42
43
|
if (requested !== "") {
|
|
43
44
|
return { ok: true, value: { action: "Replace", apiKey: requested } };
|
|
44
45
|
}
|
|
45
|
-
if (keptKey)
|
|
46
|
-
return { ok: true, value: { action: "Keep" } };
|
|
46
|
+
if (keptKey) {
|
|
47
|
+
return { ok: true, value: { action: "Keep", ciphertext: keptKey } };
|
|
48
|
+
}
|
|
47
49
|
return refuse("ClassificationApiKeyRequired", `classificationApiKey is required for ${preset.label}`);
|
|
48
50
|
};
|
|
49
51
|
export const decideClassificationProvider = (input, stored) => {
|
|
@@ -57,7 +59,7 @@ export const decideClassificationProvider = (input, stored) => {
|
|
|
57
59
|
const baseUrl = baseUrlFor(preset, (input.classificationBaseUrl ?? kept?.baseUrl ?? "").trim());
|
|
58
60
|
if (!baseUrl.ok)
|
|
59
61
|
return baseUrl;
|
|
60
|
-
const apiKey = apiKeyFor(preset, (input.classificationApiKey ?? "").trim(), kept?.
|
|
62
|
+
const apiKey = apiKeyFor(preset, (input.classificationApiKey ?? "").trim(), kept?.apiKeyCiphertext);
|
|
61
63
|
if (!apiKey.ok)
|
|
62
64
|
return apiKey;
|
|
63
65
|
const model = (input.classificationModel ?? kept?.model ?? "").trim();
|
|
@@ -85,6 +87,7 @@ export const readStoredClassification = async (accountSetting, accountConfigId)
|
|
|
85
87
|
const row = settingOf(rows, name);
|
|
86
88
|
return row ? parseAccountSettingValue(name, row.value).value : "";
|
|
87
89
|
};
|
|
90
|
+
const keyRow = settingOf(rows, AccountSettingName.ClassificationApiKey);
|
|
88
91
|
const enabledRow = settingOf(rows, AccountSettingName.ClassificationEnabled);
|
|
89
92
|
const limitRow = settingOf(rows, AccountSettingName.ClassificationDailyLimit);
|
|
90
93
|
return {
|
|
@@ -92,7 +95,10 @@ export const readStoredClassification = async (accountSetting, accountConfigId)
|
|
|
92
95
|
presetId,
|
|
93
96
|
model: stringOf(AccountSettingName.ClassificationModel),
|
|
94
97
|
baseUrl: stringOf(AccountSettingName.ClassificationBaseUrl),
|
|
95
|
-
apiKeySaved:
|
|
98
|
+
apiKeySaved: keyRow !== undefined,
|
|
99
|
+
apiKeyCiphertext: keyRow
|
|
100
|
+
? parseAccountSettingValue(AccountSettingName.ClassificationApiKey, keyRow.value).value
|
|
101
|
+
: undefined,
|
|
96
102
|
enabled: enabledRow
|
|
97
103
|
? parseAccountSettingValue(AccountSettingName.ClassificationEnabled, enabledRow.value).value
|
|
98
104
|
: false,
|
|
@@ -102,6 +108,12 @@ export const readStoredClassification = async (accountSetting, accountConfigId)
|
|
|
102
108
|
savedAt: presetRow.updatedAt,
|
|
103
109
|
};
|
|
104
110
|
};
|
|
111
|
+
export const publicClassification = (stored) => {
|
|
112
|
+
if (stored.state === "NotConfigured")
|
|
113
|
+
return stored;
|
|
114
|
+
const { apiKeyCiphertext: _ciphertext, ...configured } = stored;
|
|
115
|
+
return configured;
|
|
116
|
+
};
|
|
105
117
|
export const classificationPresetsResponse = () => Object.values(CLASSIFICATION_PRESETS);
|
|
106
118
|
export const decideClassificationChange = (input, stored) => {
|
|
107
119
|
let provider;
|
|
@@ -167,6 +179,9 @@ export const writeClassificationChange = async (deps, accountConfigId, change) =
|
|
|
167
179
|
value: { kind: "Boolean", value: change.enabled },
|
|
168
180
|
});
|
|
169
181
|
}
|
|
182
|
+
if (change.enabled === true) {
|
|
183
|
+
await ensureClassificationLabels(deps.label, accountConfigId);
|
|
184
|
+
}
|
|
170
185
|
if (change.dailyLimit !== undefined) {
|
|
171
186
|
await deps.accountSetting.upsert({
|
|
172
187
|
accountConfigId,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ClassificationTestFailed, ClassificationTestInput, ClassificationTestPassed } from "@remit/api-openapi-types";
|
|
2
|
+
import type { IAccountSettingRepository } from "@remit/data-ports";
|
|
3
|
+
import { type ClassifierLogger } from "@remit/mailbox-service/classifier";
|
|
4
|
+
import { type SecretsService } from "@remit/secrets-service";
|
|
5
|
+
import type { UserSettingsOutcome } from "./user-settings.js";
|
|
6
|
+
export interface ClassificationTestDeps {
|
|
7
|
+
accountSetting: Pick<IAccountSettingRepository, "getMany">;
|
|
8
|
+
secrets: Pick<SecretsService, "decrypt">;
|
|
9
|
+
logger: ClassifierLogger;
|
|
10
|
+
}
|
|
11
|
+
export type ClassificationTestOutcome = {
|
|
12
|
+
ok: true;
|
|
13
|
+
value: ClassificationTestPassed | ClassificationTestFailed;
|
|
14
|
+
} | Extract<UserSettingsOutcome, {
|
|
15
|
+
ok: false;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const testClassificationProvider: (deps: ClassificationTestDeps, accountConfigId: string, input: ClassificationTestInput) => Promise<ClassificationTestOutcome>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { ClassificationFailureKind as FailureKind, ClassificationField as Field, } from "@remit/domain-enums";
|
|
2
|
+
import { CLASSIFIER_LABELS, CLASSIFIER_SAMPLE_MESSAGE, classifyWithProvider, } from "@remit/mailbox-service/classifier";
|
|
3
|
+
import { deserializeEncryptedPayload, } from "@remit/secrets-service";
|
|
4
|
+
import { decideClassificationProvider, readStoredClassification, } from "./classification-settings.js";
|
|
5
|
+
const REACH_FIX = "Check the endpoint runs and the Remit server can reach it";
|
|
6
|
+
const DEFAULT_MODEL_FIX = "Use the preset's default model";
|
|
7
|
+
const FAILURE_HELP = {
|
|
8
|
+
[FailureKind.Unauthorized]: {
|
|
9
|
+
field: Field.ApiKey,
|
|
10
|
+
fix: "Replace the key, save, test again",
|
|
11
|
+
},
|
|
12
|
+
[FailureKind.ModelNotFound]: {
|
|
13
|
+
field: Field.Model,
|
|
14
|
+
fix: "Check the model name, or empty it for the default",
|
|
15
|
+
},
|
|
16
|
+
[FailureKind.RateLimited]: {
|
|
17
|
+
fix: "Raise the limit at the provider, or lower the daily limit",
|
|
18
|
+
},
|
|
19
|
+
[FailureKind.Rejected]: { field: Field.Model, fix: DEFAULT_MODEL_FIX },
|
|
20
|
+
[FailureKind.ProviderError]: {
|
|
21
|
+
fix: "The provider is failing; built-in rules cover until it recovers",
|
|
22
|
+
},
|
|
23
|
+
[FailureKind.Unreachable]: { field: Field.BaseUrl, fix: REACH_FIX },
|
|
24
|
+
[FailureKind.TimedOut]: { field: Field.BaseUrl, fix: REACH_FIX },
|
|
25
|
+
[FailureKind.Unparseable]: { field: Field.Model, fix: DEFAULT_MODEL_FIX },
|
|
26
|
+
};
|
|
27
|
+
const apiKeyOf = (deps, save) => {
|
|
28
|
+
if (save.apiKey.action === "Replace") {
|
|
29
|
+
return Promise.resolve(save.apiKey.apiKey);
|
|
30
|
+
}
|
|
31
|
+
if (save.apiKey.action === "Keep") {
|
|
32
|
+
return deps.secrets.decrypt(deserializeEncryptedPayload(save.apiKey.ciphertext));
|
|
33
|
+
}
|
|
34
|
+
return Promise.resolve("");
|
|
35
|
+
};
|
|
36
|
+
const topScore = (scores) => scores.reduce((best, score) => score.confidence > best.confidence ? score : best);
|
|
37
|
+
const answerOf = (result) => {
|
|
38
|
+
if (result.ok) {
|
|
39
|
+
const top = topScore(result.scores);
|
|
40
|
+
return {
|
|
41
|
+
state: "Passed",
|
|
42
|
+
latencyMs: result.latencyMs,
|
|
43
|
+
label: top.label,
|
|
44
|
+
confidence: top.confidence,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
state: "Failed",
|
|
49
|
+
latencyMs: result.latencyMs,
|
|
50
|
+
...(result.status === undefined ? {} : { status: result.status }),
|
|
51
|
+
kind: result.kind,
|
|
52
|
+
...FAILURE_HELP[result.kind],
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export const testClassificationProvider = async (deps, accountConfigId, input) => {
|
|
56
|
+
const decided = decideClassificationProvider({
|
|
57
|
+
classificationPresetId: input.presetId,
|
|
58
|
+
classificationModel: input.model,
|
|
59
|
+
classificationBaseUrl: input.baseUrl,
|
|
60
|
+
classificationApiKey: input.apiKey,
|
|
61
|
+
}, await readStoredClassification(deps.accountSetting, accountConfigId));
|
|
62
|
+
if (!decided.ok)
|
|
63
|
+
return decided;
|
|
64
|
+
const save = decided.value;
|
|
65
|
+
const result = await classifyWithProvider({
|
|
66
|
+
provider: {
|
|
67
|
+
adapterShape: save.preset.adapterShape,
|
|
68
|
+
baseUrl: save.baseUrl,
|
|
69
|
+
model: save.model,
|
|
70
|
+
apiKey: await apiKeyOf(deps, save),
|
|
71
|
+
},
|
|
72
|
+
labels: CLASSIFIER_LABELS,
|
|
73
|
+
message: CLASSIFIER_SAMPLE_MESSAGE,
|
|
74
|
+
}, { logger: deps.logger });
|
|
75
|
+
return { ok: true, value: answerOf(result) };
|
|
76
|
+
};
|
|
@@ -125,6 +125,7 @@ export declare const handlers: {
|
|
|
125
125
|
UserSettingsOperations_getUserSettings: OperationHandler<import("../types.js").UserSettingsOperationIds>;
|
|
126
126
|
UserSettingsOperations_updateUserSettings: OperationHandler<import("../types.js").UserSettingsOperationIds>;
|
|
127
127
|
UserSettingsOperations_clearClassificationProvider: OperationHandler<import("../types.js").UserSettingsOperationIds>;
|
|
128
|
+
UserSettingsOperations_testClassificationProvider: OperationHandler<import("../types.js").UserSettingsOperationIds>;
|
|
128
129
|
UserSettingsOperations_clearDefaultInvitationSender: OperationHandler<import("../types.js").UserSettingsOperationIds>;
|
|
129
130
|
CalendarFreeBusyOperations_listCalendarFreeBusy: OperationHandler<"CalendarFreeBusyOperations_listCalendarFreeBusy">;
|
|
130
131
|
CalendarEventDetailOperations_getCalendarEvent: OperationHandler<import("../types.js").CalendarEventDetailOperationIds, "smtp">;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { UpdateUserSettingsInput, UserSettingsResponse } from "@remit/api-openapi-types";
|
|
2
2
|
import type { IAccountRepository, IAccountSettingRepository } from "@remit/data-ports";
|
|
3
|
+
import type { ClassificationLabelDeps } from "@remit/mailbox-service";
|
|
3
4
|
import type { SecretsService } from "@remit/secrets-service";
|
|
4
5
|
import type { OperationHandler, UserSettingsOperationIds } from "../types.js";
|
|
5
6
|
export interface UserSettingsDeps {
|
|
6
7
|
accountSetting: Pick<IAccountSettingRepository, "get" | "getMany" | "upsert" | "delete">;
|
|
7
8
|
accounts: Pick<IAccountRepository, "listAllByAccountConfig">;
|
|
8
9
|
secrets: Pick<SecretsService, "encrypt">;
|
|
10
|
+
label: ClassificationLabelDeps;
|
|
9
11
|
}
|
|
10
12
|
/** The account the reader chose to send invitations from, if they chose one. */
|
|
11
13
|
export declare const chosenInvitationSender: (accountSetting: Pick<IAccountSettingRepository, "get">, accountConfigId: string) => Promise<string | undefined>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { invitationSenderInEffect, sendingAccountFor, } from "@remit/calendar-service";
|
|
2
2
|
import { parseAccountSettingValue } from "@remit/data-ports/account-settings";
|
|
3
3
|
import { AccountSettingName } from "@remit/domain-enums";
|
|
4
|
+
import { logger } from "@remit/logger";
|
|
4
5
|
import { badRequest } from "./calendar.js";
|
|
5
|
-
import { classificationPresetsResponse, clearClassification, decideClassificationChange, readStoredClassification, writeClassificationChange, } from "./classification-settings.js";
|
|
6
|
+
import { classificationPresetsResponse, clearClassification, decideClassificationChange, publicClassification, readStoredClassification, writeClassificationChange, } from "./classification-settings.js";
|
|
7
|
+
import { testClassificationProvider } from "./classification-test.js";
|
|
6
8
|
/** The account the reader chose to send invitations from, if they chose one. */
|
|
7
9
|
export const chosenInvitationSender = async (accountSetting, accountConfigId) => {
|
|
8
10
|
const stored = await accountSetting.get(accountConfigId, AccountSettingName.DefaultInvitationSenderAccountId);
|
|
@@ -17,7 +19,7 @@ export const readUserSettings = async (deps, accountConfigId) => {
|
|
|
17
19
|
...(inEffect && { defaultInvitationSenderAccountId: inEffect.accountId }),
|
|
18
20
|
defaultInvitationSenderChosen: inEffect !== undefined && inEffect.accountId === chosen,
|
|
19
21
|
classificationPresets: classificationPresetsResponse(),
|
|
20
|
-
classification: await readStoredClassification(deps.accountSetting, accountConfigId),
|
|
22
|
+
classification: publicClassification(await readStoredClassification(deps.accountSetting, accountConfigId)),
|
|
21
23
|
};
|
|
22
24
|
};
|
|
23
25
|
export const updateUserSettingsFor = async (deps, accountConfigId, input) => {
|
|
@@ -48,6 +50,7 @@ const depsOf = (ctx) => ({
|
|
|
48
50
|
accountSetting: ctx.client.accountSetting,
|
|
49
51
|
accounts: ctx.client.account,
|
|
50
52
|
secrets: ctx.client.secrets,
|
|
53
|
+
label: ctx.client.label,
|
|
51
54
|
});
|
|
52
55
|
export const UserSettingsOperations = {
|
|
53
56
|
UserSettingsOperations_getUserSettings: async (_context, ctx) => readUserSettings(depsOf(ctx), ctx.identity.accountConfigId),
|
|
@@ -67,4 +70,14 @@ export const UserSettingsOperations = {
|
|
|
67
70
|
await clearClassification(deps.accountSetting, ctx.identity.accountConfigId);
|
|
68
71
|
return readUserSettings(deps, ctx.identity.accountConfigId);
|
|
69
72
|
},
|
|
73
|
+
UserSettingsOperations_testClassificationProvider: async (context, ctx) => {
|
|
74
|
+
const tested = await testClassificationProvider({
|
|
75
|
+
accountSetting: ctx.client.accountSetting,
|
|
76
|
+
secrets: ctx.client.secrets,
|
|
77
|
+
logger,
|
|
78
|
+
}, ctx.identity.accountConfigId, context.request.requestBody);
|
|
79
|
+
if (!tested.ok)
|
|
80
|
+
return badRequest(tested.error);
|
|
81
|
+
return tested.value;
|
|
82
|
+
},
|
|
70
83
|
};
|
package/dist/src/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { ApiConfig } from "./config/api-config.js";
|
|
|
3
3
|
import type { RemitClient } from "./service/create-remit-client.js";
|
|
4
4
|
import type { QueueName } from "./service/queues.js";
|
|
5
5
|
type MatchPrefix<Prefix extends string, S extends string> = S extends `${Prefix}${infer _}` ? S : never;
|
|
6
|
-
export type OperationIds = "MeOperations_deleteMe" | "MeOperations_listVipSuggestions" | "MeOperations_createExport" | "MeOperations_getExport" | "MeOperations_listQuarantine" | "ConfigOperations_getConfig" | "ConfigOperations_exportConfig" | "ConfigOperations_importConfig" | "SystemOperations_getSystemUpdate" | "SystemOperations_applySystemUpdate" | "PeopleOperations_listPeople" | "PeopleOperations_createStepUp" | "PeopleOperations_signOutPerson" | "PeopleOperations_updatePerson" | "PeopleOperations_createPasswordReset" | "AccountOperations_createAccount" | "AccountOperations_testConnection" | "AccountDetailOperations_updateAccount" | "AccountDetailOperations_deleteAccount" | "MicrosoftOAuthOperations_microsoftOAuthStart" | "MicrosoftOAuthOperations_microsoftOAuthCallback" | "MailboxOperations_listMailboxes" | "MailboxOperations_createMailbox" | "MailboxDetailOperations_getMailbox" | "MailboxDetailOperations_renameMailbox" | "MailboxDetailOperations_deleteMailbox" | "FolderRoleOperations_appointFolderRole" | "FilterOperations_listFilters" | "FilterOperations_createFilter" | "FilterDetailOperations_getFilter" | "FilterDetailOperations_updateFilter" | "FilterDetailOperations_deleteFilter" | "LabelOperations_listLabels" | "LabelOperations_createLabel" | "LabelDetailOperations_getLabel" | "LabelDetailOperations_updateLabel" | "LabelDetailOperations_deleteLabel" | "OrganizeOperations_createOrganizeJob" | "OrganizeOperations_previewOrganize" | "OrganizeJobDetailOperations_getOrganizeJob" | "SyncOperations_triggerSync" | "SyncOperations_getSyncStatus" | "ThreadDetailOperations_listThreadMessages" | "UnifiedThreadOperations_listAllThreads" | "ThreadOperations_listThreads" | "ThreadOperations_searchThreads" | "MessageOperations_describeMessage" | "MessageOperations_getRawMessage" | "MessageOperations_updateMessageFlags" | "MessageBulkOperations_deleteMessages" | "MessageBulkOperations_moveMessages" | "MessageBulkOperations_updateFlags" | "MessageBulkOperations_copyMessages" | "MessageBulkOperations_updateMessageLabels" | "MessageBulkOperations_reportSpam" | "MessageBulkOperations_notSpam" | "CalendarOperations_listCalendars" | "CalendarOperations_createCalendar" | "CalendarDetailOperations_getCalendar" | "CalendarDetailOperations_updateCalendar" | "CalendarDetailOperations_deleteCalendar" | "CalendarDetailOperations_getCalendarFeed" | "CalendarDetailOperations_putCalendarFeed" | "CalendarDetailOperations_revokeCalendarFeed" | "CalendarFeedOperations_getCalendarFeedIcal" | "CalendarEventOperations_listCalendarEvents" | "CalendarEventOperations_createCalendarEvent" | "CalendarEventDetailOperations_getCalendarEvent" | "CalendarEventDetailOperations_updateCalendarEvent" | "CalendarEventDetailOperations_deleteCalendarEvent" | "CalendarFreeBusyOperations_listCalendarFreeBusy" | "UserSettingsOperations_getUserSettings" | "UserSettingsOperations_updateUserSettings" | "UserSettingsOperations_clearDefaultInvitationSender" | "UserSettingsOperations_clearClassificationProvider" | "CalendarTaskOperations_listCalendarTasks" | "CalendarTaskOperations_createCalendarTask" | "CalendarTaskDetailOperations_getCalendarTask" | "CalendarTaskDetailOperations_updateCalendarTask" | "CalendarTaskDetailOperations_deleteCalendarTask" | "TrashOperations_emptyTrash" | "OutboxOperations_createOutboxMessage" | "OutboxOperations_listOutboxMessages" | "OutboxDetailOperations_getOutboxMessage" | "OutboxDetailOperations_updateOutboxMessage" | "OutboxDetailOperations_deleteOutboxMessage" | "OutboxDetailOperations_sendOutboxMessage" | "OutboxDetailOperations_mintOutboxAttachment" | "OutboxAttachmentOperations_completeOutboxAttachment" | "AddressOperations_searchAddresses" | "AddressDetailOperations_updateAddress" | "CalendarSuggestionOperations_listCalendarSuggestions" | "MessageCalendarSuggestionOperations_listMessageCalendarSuggestions" | "CalendarSuggestionActionOperations_acceptCalendarSuggestion" | "CalendarSuggestionActionOperations_declineCalendarSuggestion" | "CalendarSuggestionActionOperations_dismissCalendarSuggestion" | "CalendarSuggestionActionOperations_reopenCalendarSuggestion";
|
|
6
|
+
export type OperationIds = "MeOperations_deleteMe" | "MeOperations_listVipSuggestions" | "MeOperations_createExport" | "MeOperations_getExport" | "MeOperations_listQuarantine" | "ConfigOperations_getConfig" | "ConfigOperations_exportConfig" | "ConfigOperations_importConfig" | "SystemOperations_getSystemUpdate" | "SystemOperations_applySystemUpdate" | "PeopleOperations_listPeople" | "PeopleOperations_createStepUp" | "PeopleOperations_signOutPerson" | "PeopleOperations_updatePerson" | "PeopleOperations_createPasswordReset" | "AccountOperations_createAccount" | "AccountOperations_testConnection" | "AccountDetailOperations_updateAccount" | "AccountDetailOperations_deleteAccount" | "MicrosoftOAuthOperations_microsoftOAuthStart" | "MicrosoftOAuthOperations_microsoftOAuthCallback" | "MailboxOperations_listMailboxes" | "MailboxOperations_createMailbox" | "MailboxDetailOperations_getMailbox" | "MailboxDetailOperations_renameMailbox" | "MailboxDetailOperations_deleteMailbox" | "FolderRoleOperations_appointFolderRole" | "FilterOperations_listFilters" | "FilterOperations_createFilter" | "FilterDetailOperations_getFilter" | "FilterDetailOperations_updateFilter" | "FilterDetailOperations_deleteFilter" | "LabelOperations_listLabels" | "LabelOperations_createLabel" | "LabelDetailOperations_getLabel" | "LabelDetailOperations_updateLabel" | "LabelDetailOperations_deleteLabel" | "OrganizeOperations_createOrganizeJob" | "OrganizeOperations_previewOrganize" | "OrganizeJobDetailOperations_getOrganizeJob" | "SyncOperations_triggerSync" | "SyncOperations_getSyncStatus" | "ThreadDetailOperations_listThreadMessages" | "UnifiedThreadOperations_listAllThreads" | "ThreadOperations_listThreads" | "ThreadOperations_searchThreads" | "MessageOperations_describeMessage" | "MessageOperations_getRawMessage" | "MessageOperations_updateMessageFlags" | "MessageBulkOperations_deleteMessages" | "MessageBulkOperations_moveMessages" | "MessageBulkOperations_updateFlags" | "MessageBulkOperations_copyMessages" | "MessageBulkOperations_updateMessageLabels" | "MessageBulkOperations_reportSpam" | "MessageBulkOperations_notSpam" | "CalendarOperations_listCalendars" | "CalendarOperations_createCalendar" | "CalendarDetailOperations_getCalendar" | "CalendarDetailOperations_updateCalendar" | "CalendarDetailOperations_deleteCalendar" | "CalendarDetailOperations_getCalendarFeed" | "CalendarDetailOperations_putCalendarFeed" | "CalendarDetailOperations_revokeCalendarFeed" | "CalendarFeedOperations_getCalendarFeedIcal" | "CalendarEventOperations_listCalendarEvents" | "CalendarEventOperations_createCalendarEvent" | "CalendarEventDetailOperations_getCalendarEvent" | "CalendarEventDetailOperations_updateCalendarEvent" | "CalendarEventDetailOperations_deleteCalendarEvent" | "CalendarFreeBusyOperations_listCalendarFreeBusy" | "UserSettingsOperations_getUserSettings" | "UserSettingsOperations_updateUserSettings" | "UserSettingsOperations_clearDefaultInvitationSender" | "UserSettingsOperations_clearClassificationProvider" | "UserSettingsOperations_testClassificationProvider" | "CalendarTaskOperations_listCalendarTasks" | "CalendarTaskOperations_createCalendarTask" | "CalendarTaskDetailOperations_getCalendarTask" | "CalendarTaskDetailOperations_updateCalendarTask" | "CalendarTaskDetailOperations_deleteCalendarTask" | "TrashOperations_emptyTrash" | "OutboxOperations_createOutboxMessage" | "OutboxOperations_listOutboxMessages" | "OutboxDetailOperations_getOutboxMessage" | "OutboxDetailOperations_updateOutboxMessage" | "OutboxDetailOperations_deleteOutboxMessage" | "OutboxDetailOperations_sendOutboxMessage" | "OutboxDetailOperations_mintOutboxAttachment" | "OutboxAttachmentOperations_completeOutboxAttachment" | "AddressOperations_searchAddresses" | "AddressDetailOperations_updateAddress" | "CalendarSuggestionOperations_listCalendarSuggestions" | "MessageCalendarSuggestionOperations_listMessageCalendarSuggestions" | "CalendarSuggestionActionOperations_acceptCalendarSuggestion" | "CalendarSuggestionActionOperations_declineCalendarSuggestion" | "CalendarSuggestionActionOperations_dismissCalendarSuggestion" | "CalendarSuggestionActionOperations_reopenCalendarSuggestion";
|
|
7
7
|
export type MeOperationIds = MatchPrefix<"MeOperations_", OperationIds>;
|
|
8
8
|
export type ConfigOperationIds = MatchPrefix<"ConfigOperations_", OperationIds>;
|
|
9
9
|
export type SystemOperationIds = MatchPrefix<"SystemOperations_", OperationIds>;
|