@remit/backend 2.1.3 → 2.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/dist/src/handlers/classification-settings.d.ts +44 -0
- package/dist/src/handlers/classification-settings.js +182 -0
- package/dist/src/handlers/index.d.ts +1 -0
- package/dist/src/handlers/user-settings.d.ts +3 -1
- package/dist/src/handlers/user-settings.js +15 -0
- package/dist/src/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ClassificationConfigured, ClassificationNotConfigured, ClassificationPreset, UpdateUserSettingsInput } from "@remit/api-openapi-types";
|
|
2
|
+
import type { IAccountSettingRepository } from "@remit/data-ports";
|
|
3
|
+
import { type SecretsService } from "@remit/secrets-service";
|
|
4
|
+
import type { UserSettingsOutcome } from "./user-settings.js";
|
|
5
|
+
export declare const CLASSIFICATION_SETTING_NAMES: readonly ["ClassificationPresetId", "ClassificationModel", "ClassificationBaseUrl", "ClassificationApiKey", "ClassificationEnabled", "ClassificationDailyLimit"];
|
|
6
|
+
export type ClassificationSettingsDeps = {
|
|
7
|
+
accountSetting: Pick<IAccountSettingRepository, "getMany" | "upsert" | "delete">;
|
|
8
|
+
secrets: Pick<SecretsService, "encrypt">;
|
|
9
|
+
};
|
|
10
|
+
export type StoredClassification = ClassificationNotConfigured | ClassificationConfigured;
|
|
11
|
+
type Refusal = Extract<UserSettingsOutcome, {
|
|
12
|
+
ok: false;
|
|
13
|
+
}>;
|
|
14
|
+
type Decision<T> = {
|
|
15
|
+
ok: true;
|
|
16
|
+
value: T;
|
|
17
|
+
} | Refusal;
|
|
18
|
+
type ApiKeyChange = {
|
|
19
|
+
action: "Keep";
|
|
20
|
+
} | {
|
|
21
|
+
action: "Replace";
|
|
22
|
+
apiKey: string;
|
|
23
|
+
} | {
|
|
24
|
+
action: "Delete";
|
|
25
|
+
};
|
|
26
|
+
export interface ClassificationProviderSave {
|
|
27
|
+
preset: ClassificationPreset;
|
|
28
|
+
model: string;
|
|
29
|
+
baseUrl: string;
|
|
30
|
+
apiKey: ApiKeyChange;
|
|
31
|
+
}
|
|
32
|
+
type ClassificationInput = Pick<UpdateUserSettingsInput, "classificationPresetId" | "classificationModel" | "classificationBaseUrl" | "classificationApiKey" | "classificationEnabled" | "classificationDailyLimit">;
|
|
33
|
+
export declare const decideClassificationProvider: (input: ClassificationInput, stored: StoredClassification) => Decision<ClassificationProviderSave>;
|
|
34
|
+
export declare const readStoredClassification: (accountSetting: Pick<IAccountSettingRepository, "getMany">, accountConfigId: string) => Promise<StoredClassification>;
|
|
35
|
+
export declare const classificationPresetsResponse: () => ClassificationPreset[];
|
|
36
|
+
interface ClassificationChange {
|
|
37
|
+
provider: ClassificationProviderSave | undefined;
|
|
38
|
+
enabled: boolean | undefined;
|
|
39
|
+
dailyLimit: number | undefined;
|
|
40
|
+
}
|
|
41
|
+
export declare const decideClassificationChange: (input: ClassificationInput, stored: StoredClassification) => Decision<ClassificationChange>;
|
|
42
|
+
export declare const writeClassificationChange: (deps: ClassificationSettingsDeps, accountConfigId: string, change: ClassificationChange) => Promise<void>;
|
|
43
|
+
export declare const clearClassification: (accountSetting: Pick<IAccountSettingRepository, "delete">, accountConfigId: string) => Promise<void>;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { parseAccountSettingValue } from "@remit/data-ports/account-settings";
|
|
2
|
+
import { CLASSIFICATION_PRESETS, DEFAULT_CLASSIFICATION_DAILY_LIMIT, isClassificationPresetId, } from "@remit/data-ports/classification-presets";
|
|
3
|
+
import { AccountSettingName } from "@remit/domain-enums";
|
|
4
|
+
import { serializeEncryptedPayload, } from "@remit/secrets-service";
|
|
5
|
+
export const CLASSIFICATION_SETTING_NAMES = [
|
|
6
|
+
AccountSettingName.ClassificationPresetId,
|
|
7
|
+
AccountSettingName.ClassificationModel,
|
|
8
|
+
AccountSettingName.ClassificationBaseUrl,
|
|
9
|
+
AccountSettingName.ClassificationApiKey,
|
|
10
|
+
AccountSettingName.ClassificationEnabled,
|
|
11
|
+
AccountSettingName.ClassificationDailyLimit,
|
|
12
|
+
];
|
|
13
|
+
const refuse = (code, message) => ({
|
|
14
|
+
ok: false,
|
|
15
|
+
error: { code, message },
|
|
16
|
+
});
|
|
17
|
+
const isHttpUrl = (value) => {
|
|
18
|
+
if (!URL.canParse(value))
|
|
19
|
+
return false;
|
|
20
|
+
const { protocol } = new URL(value);
|
|
21
|
+
return protocol === "http:" || protocol === "https:";
|
|
22
|
+
};
|
|
23
|
+
const savesClassificationProvider = (input) => input.classificationPresetId !== undefined ||
|
|
24
|
+
input.classificationModel !== undefined ||
|
|
25
|
+
input.classificationBaseUrl !== undefined ||
|
|
26
|
+
input.classificationApiKey !== undefined;
|
|
27
|
+
const baseUrlFor = (preset, requested) => {
|
|
28
|
+
if (requested === "") {
|
|
29
|
+
if (preset.defaultBaseUrl === undefined) {
|
|
30
|
+
return refuse("InvalidClassificationBaseUrl", `classificationBaseUrl is required for ${preset.label}`);
|
|
31
|
+
}
|
|
32
|
+
return { ok: true, value: preset.defaultBaseUrl };
|
|
33
|
+
}
|
|
34
|
+
if (!isHttpUrl(requested)) {
|
|
35
|
+
return refuse("InvalidClassificationBaseUrl", "classificationBaseUrl must be an http or https URL");
|
|
36
|
+
}
|
|
37
|
+
return { ok: true, value: requested };
|
|
38
|
+
};
|
|
39
|
+
const apiKeyFor = (preset, requested, keptKey) => {
|
|
40
|
+
if (!preset.needsKey)
|
|
41
|
+
return { ok: true, value: { action: "Delete" } };
|
|
42
|
+
if (requested !== "") {
|
|
43
|
+
return { ok: true, value: { action: "Replace", apiKey: requested } };
|
|
44
|
+
}
|
|
45
|
+
if (keptKey)
|
|
46
|
+
return { ok: true, value: { action: "Keep" } };
|
|
47
|
+
return refuse("ClassificationApiKeyRequired", `classificationApiKey is required for ${preset.label}`);
|
|
48
|
+
};
|
|
49
|
+
export const decideClassificationProvider = (input, stored) => {
|
|
50
|
+
const saved = stored.state === "Configured" ? stored : undefined;
|
|
51
|
+
const presetId = input.classificationPresetId ?? saved?.presetId;
|
|
52
|
+
if (presetId === undefined) {
|
|
53
|
+
return refuse("ClassificationNotConfigured", "classificationPresetId is required: no classification provider is saved");
|
|
54
|
+
}
|
|
55
|
+
const preset = CLASSIFICATION_PRESETS[presetId];
|
|
56
|
+
const kept = saved?.presetId === presetId ? saved : undefined;
|
|
57
|
+
const baseUrl = baseUrlFor(preset, (input.classificationBaseUrl ?? kept?.baseUrl ?? "").trim());
|
|
58
|
+
if (!baseUrl.ok)
|
|
59
|
+
return baseUrl;
|
|
60
|
+
const apiKey = apiKeyFor(preset, (input.classificationApiKey ?? "").trim(), kept?.apiKeySaved ?? false);
|
|
61
|
+
if (!apiKey.ok)
|
|
62
|
+
return apiKey;
|
|
63
|
+
const model = (input.classificationModel ?? kept?.model ?? "").trim();
|
|
64
|
+
return {
|
|
65
|
+
ok: true,
|
|
66
|
+
value: {
|
|
67
|
+
preset,
|
|
68
|
+
model: model === "" ? preset.defaultModel : model,
|
|
69
|
+
baseUrl: baseUrl.value,
|
|
70
|
+
apiKey: apiKey.value,
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
const settingOf = (rows, name) => rows.find((row) => row.name === name);
|
|
75
|
+
export const readStoredClassification = async (accountSetting, accountConfigId) => {
|
|
76
|
+
const rows = await accountSetting.getMany([accountConfigId], CLASSIFICATION_SETTING_NAMES);
|
|
77
|
+
const presetRow = settingOf(rows, AccountSettingName.ClassificationPresetId);
|
|
78
|
+
if (!presetRow)
|
|
79
|
+
return { state: "NotConfigured" };
|
|
80
|
+
const presetId = parseAccountSettingValue(AccountSettingName.ClassificationPresetId, presetRow.value).value;
|
|
81
|
+
if (!isClassificationPresetId(presetId)) {
|
|
82
|
+
throw new Error(`Stored classification preset is unknown: ${presetId}`);
|
|
83
|
+
}
|
|
84
|
+
const stringOf = (name) => {
|
|
85
|
+
const row = settingOf(rows, name);
|
|
86
|
+
return row ? parseAccountSettingValue(name, row.value).value : "";
|
|
87
|
+
};
|
|
88
|
+
const enabledRow = settingOf(rows, AccountSettingName.ClassificationEnabled);
|
|
89
|
+
const limitRow = settingOf(rows, AccountSettingName.ClassificationDailyLimit);
|
|
90
|
+
return {
|
|
91
|
+
state: "Configured",
|
|
92
|
+
presetId,
|
|
93
|
+
model: stringOf(AccountSettingName.ClassificationModel),
|
|
94
|
+
baseUrl: stringOf(AccountSettingName.ClassificationBaseUrl),
|
|
95
|
+
apiKeySaved: settingOf(rows, AccountSettingName.ClassificationApiKey) !== undefined,
|
|
96
|
+
enabled: enabledRow
|
|
97
|
+
? parseAccountSettingValue(AccountSettingName.ClassificationEnabled, enabledRow.value).value
|
|
98
|
+
: false,
|
|
99
|
+
dailyLimit: limitRow
|
|
100
|
+
? parseAccountSettingValue(AccountSettingName.ClassificationDailyLimit, limitRow.value).value
|
|
101
|
+
: DEFAULT_CLASSIFICATION_DAILY_LIMIT,
|
|
102
|
+
savedAt: presetRow.updatedAt,
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
export const classificationPresetsResponse = () => Object.values(CLASSIFICATION_PRESETS);
|
|
106
|
+
export const decideClassificationChange = (input, stored) => {
|
|
107
|
+
let provider;
|
|
108
|
+
if (savesClassificationProvider(input)) {
|
|
109
|
+
const decided = decideClassificationProvider(input, stored);
|
|
110
|
+
if (!decided.ok)
|
|
111
|
+
return decided;
|
|
112
|
+
provider = decided.value;
|
|
113
|
+
}
|
|
114
|
+
const configured = provider !== undefined || stored.state === "Configured";
|
|
115
|
+
if (input.classificationEnabled === true && !configured) {
|
|
116
|
+
return refuse("ClassificationNotConfigured", "classificationEnabled needs a saved classification provider");
|
|
117
|
+
}
|
|
118
|
+
if (input.classificationDailyLimit !== undefined && !configured) {
|
|
119
|
+
return refuse("ClassificationNotConfigured", "classificationDailyLimit needs a saved classification provider");
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
ok: true,
|
|
123
|
+
value: {
|
|
124
|
+
provider,
|
|
125
|
+
enabled: configured ? input.classificationEnabled : undefined,
|
|
126
|
+
dailyLimit: input.classificationDailyLimit,
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
const writeProvider = async (deps, accountConfigId, save) => {
|
|
131
|
+
const { accountSetting } = deps;
|
|
132
|
+
if (save.apiKey.action === "Delete") {
|
|
133
|
+
await accountSetting.delete(accountConfigId, AccountSettingName.ClassificationApiKey);
|
|
134
|
+
}
|
|
135
|
+
if (save.apiKey.action === "Replace") {
|
|
136
|
+
const ciphertext = serializeEncryptedPayload(await deps.secrets.encrypt(save.apiKey.apiKey));
|
|
137
|
+
await accountSetting.upsert({
|
|
138
|
+
accountConfigId,
|
|
139
|
+
name: AccountSettingName.ClassificationApiKey,
|
|
140
|
+
value: { kind: "Map", value: { ...ciphertext } },
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
await accountSetting.upsert({
|
|
144
|
+
accountConfigId,
|
|
145
|
+
name: AccountSettingName.ClassificationModel,
|
|
146
|
+
value: { kind: "String", value: save.model },
|
|
147
|
+
});
|
|
148
|
+
await accountSetting.upsert({
|
|
149
|
+
accountConfigId,
|
|
150
|
+
name: AccountSettingName.ClassificationBaseUrl,
|
|
151
|
+
value: { kind: "String", value: save.baseUrl },
|
|
152
|
+
});
|
|
153
|
+
await accountSetting.upsert({
|
|
154
|
+
accountConfigId,
|
|
155
|
+
name: AccountSettingName.ClassificationPresetId,
|
|
156
|
+
value: { kind: "String", value: save.preset.presetId },
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
export const writeClassificationChange = async (deps, accountConfigId, change) => {
|
|
160
|
+
if (change.provider) {
|
|
161
|
+
await writeProvider(deps, accountConfigId, change.provider);
|
|
162
|
+
}
|
|
163
|
+
if (change.enabled !== undefined) {
|
|
164
|
+
await deps.accountSetting.upsert({
|
|
165
|
+
accountConfigId,
|
|
166
|
+
name: AccountSettingName.ClassificationEnabled,
|
|
167
|
+
value: { kind: "Boolean", value: change.enabled },
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
if (change.dailyLimit !== undefined) {
|
|
171
|
+
await deps.accountSetting.upsert({
|
|
172
|
+
accountConfigId,
|
|
173
|
+
name: AccountSettingName.ClassificationDailyLimit,
|
|
174
|
+
value: { kind: "Number", value: change.dailyLimit },
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
export const clearClassification = async (accountSetting, accountConfigId) => {
|
|
179
|
+
for (const name of CLASSIFICATION_SETTING_NAMES) {
|
|
180
|
+
await accountSetting.delete(accountConfigId, name);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
@@ -124,6 +124,7 @@ export declare const handlers: {
|
|
|
124
124
|
CalendarTaskOperations_createCalendarTask: OperationHandler<import("../types.js").CalendarTaskOperationIds>;
|
|
125
125
|
UserSettingsOperations_getUserSettings: OperationHandler<import("../types.js").UserSettingsOperationIds>;
|
|
126
126
|
UserSettingsOperations_updateUserSettings: OperationHandler<import("../types.js").UserSettingsOperationIds>;
|
|
127
|
+
UserSettingsOperations_clearClassificationProvider: OperationHandler<import("../types.js").UserSettingsOperationIds>;
|
|
127
128
|
UserSettingsOperations_clearDefaultInvitationSender: OperationHandler<import("../types.js").UserSettingsOperationIds>;
|
|
128
129
|
CalendarFreeBusyOperations_listCalendarFreeBusy: OperationHandler<"CalendarFreeBusyOperations_listCalendarFreeBusy">;
|
|
129
130
|
CalendarEventDetailOperations_getCalendarEvent: OperationHandler<import("../types.js").CalendarEventDetailOperationIds, "smtp">;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import type { UpdateUserSettingsInput, UserSettingsResponse } from "@remit/api-openapi-types";
|
|
2
2
|
import type { IAccountRepository, IAccountSettingRepository } from "@remit/data-ports";
|
|
3
|
+
import type { SecretsService } from "@remit/secrets-service";
|
|
3
4
|
import type { OperationHandler, UserSettingsOperationIds } from "../types.js";
|
|
4
5
|
export interface UserSettingsDeps {
|
|
5
|
-
accountSetting: Pick<IAccountSettingRepository, "get" | "upsert" | "delete">;
|
|
6
|
+
accountSetting: Pick<IAccountSettingRepository, "get" | "getMany" | "upsert" | "delete">;
|
|
6
7
|
accounts: Pick<IAccountRepository, "listAllByAccountConfig">;
|
|
8
|
+
secrets: Pick<SecretsService, "encrypt">;
|
|
7
9
|
}
|
|
8
10
|
/** The account the reader chose to send invitations from, if they chose one. */
|
|
9
11
|
export declare const chosenInvitationSender: (accountSetting: Pick<IAccountSettingRepository, "get">, accountConfigId: string) => Promise<string | undefined>;
|
|
@@ -2,6 +2,7 @@ import { invitationSenderInEffect, sendingAccountFor, } from "@remit/calendar-se
|
|
|
2
2
|
import { parseAccountSettingValue } from "@remit/data-ports/account-settings";
|
|
3
3
|
import { AccountSettingName } from "@remit/domain-enums";
|
|
4
4
|
import { badRequest } from "./calendar.js";
|
|
5
|
+
import { classificationPresetsResponse, clearClassification, decideClassificationChange, readStoredClassification, writeClassificationChange, } from "./classification-settings.js";
|
|
5
6
|
/** The account the reader chose to send invitations from, if they chose one. */
|
|
6
7
|
export const chosenInvitationSender = async (accountSetting, accountConfigId) => {
|
|
7
8
|
const stored = await accountSetting.get(accountConfigId, AccountSettingName.DefaultInvitationSenderAccountId);
|
|
@@ -15,9 +16,14 @@ export const readUserSettings = async (deps, accountConfigId) => {
|
|
|
15
16
|
return {
|
|
16
17
|
...(inEffect && { defaultInvitationSenderAccountId: inEffect.accountId }),
|
|
17
18
|
defaultInvitationSenderChosen: inEffect !== undefined && inEffect.accountId === chosen,
|
|
19
|
+
classificationPresets: classificationPresetsResponse(),
|
|
20
|
+
classification: await readStoredClassification(deps.accountSetting, accountConfigId),
|
|
18
21
|
};
|
|
19
22
|
};
|
|
20
23
|
export const updateUserSettingsFor = async (deps, accountConfigId, input) => {
|
|
24
|
+
const classification = decideClassificationChange(input, await readStoredClassification(deps.accountSetting, accountConfigId));
|
|
25
|
+
if (!classification.ok)
|
|
26
|
+
return classification;
|
|
21
27
|
const sender = input.defaultInvitationSenderAccountId;
|
|
22
28
|
if (sender !== undefined) {
|
|
23
29
|
const account = sendingAccountFor(await deps.accounts.listAllByAccountConfig(accountConfigId), sender);
|
|
@@ -27,6 +33,9 @@ export const updateUserSettingsFor = async (deps, accountConfigId, input) => {
|
|
|
27
33
|
error: { code: "UnknownSender", message: account.error.message },
|
|
28
34
|
};
|
|
29
35
|
}
|
|
36
|
+
}
|
|
37
|
+
await writeClassificationChange(deps, accountConfigId, classification.value);
|
|
38
|
+
if (sender !== undefined) {
|
|
30
39
|
await deps.accountSetting.upsert({
|
|
31
40
|
accountConfigId,
|
|
32
41
|
name: AccountSettingName.DefaultInvitationSenderAccountId,
|
|
@@ -38,6 +47,7 @@ export const updateUserSettingsFor = async (deps, accountConfigId, input) => {
|
|
|
38
47
|
const depsOf = (ctx) => ({
|
|
39
48
|
accountSetting: ctx.client.accountSetting,
|
|
40
49
|
accounts: ctx.client.account,
|
|
50
|
+
secrets: ctx.client.secrets,
|
|
41
51
|
});
|
|
42
52
|
export const UserSettingsOperations = {
|
|
43
53
|
UserSettingsOperations_getUserSettings: async (_context, ctx) => readUserSettings(depsOf(ctx), ctx.identity.accountConfigId),
|
|
@@ -52,4 +62,9 @@ export const UserSettingsOperations = {
|
|
|
52
62
|
await deps.accountSetting.delete(ctx.identity.accountConfigId, AccountSettingName.DefaultInvitationSenderAccountId);
|
|
53
63
|
return readUserSettings(deps, ctx.identity.accountConfigId);
|
|
54
64
|
},
|
|
65
|
+
UserSettingsOperations_clearClassificationProvider: async (_context, ctx) => {
|
|
66
|
+
const deps = depsOf(ctx);
|
|
67
|
+
await clearClassification(deps.accountSetting, ctx.identity.accountConfigId);
|
|
68
|
+
return readUserSettings(deps, ctx.identity.accountConfigId);
|
|
69
|
+
},
|
|
55
70
|
};
|
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" | "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" | "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>;
|