@app-connect/core 1.7.37 → 1.7.38
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 +17 -16
- package/dist/connector/developerPortal.d.ts +6 -0
- package/{connector → dist/connector}/developerPortal.js +29 -12
- package/dist/connector/mock.d.ts +1 -0
- package/{connector → dist/connector}/mock.js +33 -17
- package/dist/connector/proxy/engine.d.ts +10 -0
- package/dist/connector/proxy/engine.js +222 -0
- package/dist/connector/proxy/index.d.ts +5 -0
- package/dist/connector/proxy/index.js +511 -0
- package/dist/connector/registry.d.ts +1 -0
- package/dist/connector/registry.js +243 -0
- package/dist/handlers/admin.d.ts +1 -0
- package/{handlers → dist/handlers}/admin.js +137 -78
- package/dist/handlers/appointment.d.ts +9 -0
- package/{handlers → dist/handlers}/appointment.js +58 -29
- package/dist/handlers/auth.d.ts +9 -0
- package/{handlers → dist/handlers}/auth.js +68 -40
- package/dist/handlers/calldown.d.ts +10 -0
- package/dist/handlers/calldown.js +134 -0
- package/dist/handlers/contact.d.ts +1 -0
- package/{handlers → dist/handlers}/contact.js +61 -39
- package/dist/handlers/disposition.d.ts +1 -0
- package/{handlers → dist/handlers}/disposition.js +20 -10
- package/dist/handlers/log.d.ts +1 -0
- package/{handlers → dist/handlers}/log.js +91 -124
- package/dist/handlers/managedAuth.d.ts +1 -0
- package/{handlers → dist/handlers}/managedAuth.js +134 -61
- package/dist/handlers/managedOAuth.d.ts +13 -0
- package/{handlers → dist/handlers}/managedOAuth.js +102 -30
- package/dist/handlers/plugin.d.ts +1 -0
- package/{handlers → dist/handlers}/plugin.js +59 -27
- package/dist/handlers/user.d.ts +1 -0
- package/{handlers → dist/handlers}/user.js +45 -27
- package/dist/index.d.ts +1 -0
- package/{index.js → dist/index.js} +538 -449
- package/dist/jest.config.d.ts +1 -0
- package/dist/jest.config.js +65 -0
- package/dist/lib/analytics.d.ts +4 -0
- package/{lib → dist/lib}/analytics.js +8 -6
- package/dist/lib/authSession.d.ts +5 -0
- package/{lib → dist/lib}/authSession.js +15 -43
- package/dist/lib/cacheCleanup.d.ts +4 -0
- package/{lib → dist/lib}/cacheCleanup.js +5 -17
- package/dist/lib/callLogComposer.d.ts +109 -0
- package/{lib → dist/lib}/callLogComposer.js +157 -197
- package/dist/lib/callLogLookup.d.ts +6 -0
- package/{lib → dist/lib}/callLogLookup.js +12 -34
- package/dist/lib/constants.d.ts +6 -0
- package/dist/lib/constants.js +9 -0
- package/dist/lib/debugTracer.d.ts +17 -0
- package/{lib → dist/lib}/debugTracer.js +7 -83
- package/dist/lib/encode.d.ts +3 -0
- package/dist/lib/encode.js +50 -0
- package/dist/lib/errorHandler.d.ts +7 -0
- package/dist/lib/errorHandler.js +161 -0
- package/dist/lib/generalErrorMessage.d.ts +7 -0
- package/{lib → dist/lib}/generalErrorMessage.js +6 -6
- package/dist/lib/jwt.d.ts +4 -0
- package/dist/lib/jwt.js +18 -0
- package/dist/lib/logger.d.ts +24 -0
- package/dist/lib/logger.js +126 -0
- package/dist/lib/migrateCallLogsSchema.d.ts +32 -0
- package/{lib → dist/lib}/migrateCallLogsSchema.js +75 -160
- package/dist/lib/oauth.d.ts +4 -0
- package/{lib → dist/lib}/oauth.js +157 -160
- package/dist/lib/ringcentral.d.ts +24 -0
- package/dist/lib/ringcentral.js +226 -0
- package/dist/lib/s3ErrorLogReport.d.ts +4 -0
- package/{lib → dist/lib}/s3ErrorLogReport.js +11 -23
- package/dist/lib/sharedSMSComposer.d.ts +7 -0
- package/{lib → dist/lib}/sharedSMSComposer.js +21 -107
- package/dist/lib/util.d.ts +7 -0
- package/{lib → dist/lib}/util.js +9 -20
- package/dist/mcp/lib/oauthError.d.ts +1 -0
- package/dist/mcp/lib/oauthError.js +25 -0
- package/dist/mcp/lib/validator.d.ts +1 -0
- package/{mcp → dist/mcp}/lib/validator.js +16 -20
- package/dist/mcp/lib/widgetSessionToken.d.ts +1 -0
- package/dist/mcp/lib/widgetSessionToken.js +46 -0
- package/dist/mcp/mcpHandler.d.ts +8 -0
- package/{mcp → dist/mcp}/mcpHandler.js +98 -88
- package/dist/mcp/tools/cancelAppointment.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/cancelAppointment.js +7 -16
- package/dist/mcp/tools/checkAuthStatus.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/checkAuthStatus.js +21 -14
- package/dist/mcp/tools/confirmAppointment.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/confirmAppointment.js +7 -16
- package/dist/mcp/tools/createAppointment.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/createAppointment.js +7 -19
- package/dist/mcp/tools/createCallLog.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/createCallLog.js +18 -29
- package/dist/mcp/tools/createContact.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/createContact.js +8 -20
- package/dist/mcp/tools/createMessageLog.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/createMessageLog.js +14 -26
- package/dist/mcp/tools/doAuth.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/doAuth.js +17 -13
- package/dist/mcp/tools/findContactByName.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/findContactByName.js +9 -15
- package/dist/mcp/tools/findContactByPhone.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/findContactByPhone.js +8 -15
- package/dist/mcp/tools/getCallLog.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/getCallLog.js +12 -21
- package/dist/mcp/tools/getGoogleFilePicker.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/getGoogleFilePicker.js +9 -18
- package/dist/mcp/tools/getHelp.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/getHelp.js +5 -6
- package/dist/mcp/tools/getPublicConnectors.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/getPublicConnectors.js +19 -18
- package/dist/mcp/tools/getSessionInfo.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/getSessionInfo.js +10 -16
- package/dist/mcp/tools/index.d.ts +8 -0
- package/dist/mcp/tools/index.js +50 -0
- package/dist/mcp/tools/listAppointments.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/listAppointments.js +7 -19
- package/dist/mcp/tools/logout.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/logout.js +16 -14
- package/dist/mcp/tools/rcGetCallLogs.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/rcGetCallLogs.js +10 -8
- package/dist/mcp/tools/updateAppointment.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/updateAppointment.js +17 -22
- package/dist/mcp/tools/updateCallLog.d.ts +1 -0
- package/{mcp → dist/mcp}/tools/updateCallLog.js +16 -26
- package/dist/models/accountDataModel.d.ts +3 -0
- package/dist/models/accountDataModel.js +39 -0
- package/dist/models/adminConfigModel.d.ts +2 -0
- package/dist/models/adminConfigModel.js +39 -0
- package/dist/models/cacheModel.d.ts +2 -0
- package/{models → dist/models}/cacheModel.js +7 -3
- package/dist/models/callDownListModel.d.ts +2 -0
- package/{models → dist/models}/callDownListModel.js +8 -4
- package/dist/models/callLogModel.d.ts +2 -0
- package/dist/models/callLogModel.js +43 -0
- package/dist/models/dynamo/connectorSchema.d.ts +2 -0
- package/dist/models/dynamo/connectorSchema.js +141 -0
- package/dist/models/dynamo/lockSchema.d.ts +2 -0
- package/{models → dist/models}/dynamo/lockSchema.js +5 -7
- package/dist/models/dynamo/noteCacheSchema.d.ts +2 -0
- package/{models → dist/models}/dynamo/noteCacheSchema.js +4 -6
- package/dist/models/llmSessionModel.d.ts +2 -0
- package/dist/models/llmSessionModel.js +21 -0
- package/dist/models/messageLogModel.d.ts +2 -0
- package/{models → dist/models}/messageLogModel.js +8 -4
- package/dist/models/sequelize.d.ts +2 -0
- package/dist/models/sequelize.js +68 -0
- package/dist/models/userModel.d.ts +2 -0
- package/dist/models/userModel.js +49 -0
- package/dist/package.json +100 -0
- package/dist/releaseNotes.json +1222 -0
- package/dist/tsconfig.json +14 -0
- package/dist/types/admin.d.ts +141 -0
- package/dist/types/analytics.d.ts +14 -0
- package/dist/types/appointment.d.ts +50 -0
- package/dist/types/auth.d.ts +137 -0
- package/dist/types/authSession.d.ts +35 -0
- package/dist/types/cacheCleanup.d.ts +12 -0
- package/dist/types/calldown.d.ts +54 -0
- package/dist/types/common.d.ts +46 -0
- package/dist/types/connector.d.ts +165 -0
- package/dist/types/contact.d.ts +125 -0
- package/dist/types/errorHandler.d.ts +60 -0
- package/dist/types/index.d.ts +76 -0
- package/dist/types/json.d.ts +9 -0
- package/dist/types/jwt.d.ts +8 -0
- package/dist/types/logging.d.ts +224 -0
- package/dist/types/managedAuth.d.ts +114 -0
- package/dist/types/managedOAuth.d.ts +59 -0
- package/dist/types/manifest.d.ts +120 -0
- package/dist/types/migration.d.ts +15 -0
- package/dist/types/plugin.d.ts +74 -0
- package/dist/types/ringcentral.d.ts +61 -0
- package/dist/types/s3ErrorLogReport.d.ts +16 -0
- package/dist/types/sharedSMSComposer.d.ts +105 -0
- package/dist/types/user.d.ts +46 -0
- package/dist/types/util.d.ts +7 -0
- package/package.json +34 -6
- package/releaseNotes.json +8 -0
- package/.env.test +0 -5
- package/connector/proxy/engine.js +0 -165
- package/connector/proxy/index.js +0 -500
- package/connector/registry.js +0 -252
- package/docs/README.md +0 -50
- package/docs/architecture.md +0 -94
- package/docs/connectors.md +0 -116
- package/docs/handlers.md +0 -128
- package/docs/libraries.md +0 -98
- package/docs/models.md +0 -146
- package/docs/routes.md +0 -119
- package/docs/tests.md +0 -73
- package/handlers/calldown.js +0 -99
- package/jest.config.js +0 -57
- package/lib/constants.js +0 -9
- package/lib/encode.js +0 -30
- package/lib/errorHandler.js +0 -218
- package/lib/jwt.js +0 -18
- package/lib/logger.js +0 -190
- package/lib/ringcentral.js +0 -267
- package/mcp/README.md +0 -420
- package/mcp/tools/index.js +0 -51
- package/mcp/ui/App/App.tsx +0 -358
- package/mcp/ui/App/components/AuthInfoForm.tsx +0 -113
- package/mcp/ui/App/components/AuthSuccess.tsx +0 -22
- package/mcp/ui/App/components/ConnectorList.tsx +0 -82
- package/mcp/ui/App/components/DebugPanel.tsx +0 -43
- package/mcp/ui/App/components/OAuthConnect.tsx +0 -270
- package/mcp/ui/App/lib/callTool.ts +0 -130
- package/mcp/ui/App/lib/debugLog.ts +0 -41
- package/mcp/ui/App/lib/developerPortal.ts +0 -111
- package/mcp/ui/App/main.css +0 -6
- package/mcp/ui/App/root.tsx +0 -13
- package/mcp/ui/dist/index.html +0 -53
- package/mcp/ui/vite.config.ts +0 -16
- package/models/accountDataModel.js +0 -34
- package/models/adminConfigModel.js +0 -35
- package/models/callLogModel.js +0 -39
- package/models/dynamo/connectorSchema.js +0 -146
- package/models/llmSessionModel.js +0 -17
- package/models/sequelize.js +0 -17
- package/models/userModel.js +0 -45
- package/test/connector/developerPortal.test.js +0 -166
- package/test/connector/mock.test.js +0 -131
- package/test/connector/proxy/engine.test.js +0 -211
- package/test/connector/proxy/index.test.js +0 -525
- package/test/connector/proxy/sample.json +0 -162
- package/test/connector/registry.test.js +0 -416
- package/test/handlers/admin.test.js +0 -960
- package/test/handlers/appointment.test.js +0 -260
- package/test/handlers/auth.test.js +0 -1096
- package/test/handlers/calldown.test.js +0 -310
- package/test/handlers/contact.test.js +0 -1014
- package/test/handlers/disposition.test.js +0 -396
- package/test/handlers/log.test.js +0 -1847
- package/test/handlers/managedAuth.test.js +0 -458
- package/test/handlers/managedOAuth.test.js +0 -262
- package/test/handlers/plugin.test.js +0 -429
- package/test/handlers/user.test.js +0 -381
- package/test/index.test.js +0 -301
- package/test/lib/analytics.test.js +0 -146
- package/test/lib/authSession.test.js +0 -173
- package/test/lib/cacheCleanup.test.js +0 -127
- package/test/lib/callLogComposer.test.js +0 -1231
- package/test/lib/debugTracer.test.js +0 -328
- package/test/lib/encode.test.js +0 -59
- package/test/lib/errorHandler.test.js +0 -246
- package/test/lib/generalErrorMessage.test.js +0 -82
- package/test/lib/jwt.test.js +0 -176
- package/test/lib/logger.test.js +0 -206
- package/test/lib/oauth.test.js +0 -359
- package/test/lib/ringcentral.test.js +0 -467
- package/test/lib/s3ErrorLogReport.test.js +0 -187
- package/test/lib/sharedSMSComposer.test.js +0 -1084
- package/test/lib/util.test.js +0 -329
- package/test/mcp/mcpHandler.test.js +0 -73
- package/test/mcp/mcpHandlerMore.test.js +0 -384
- package/test/mcp/tools/appointmentTools.test.js +0 -362
- package/test/mcp/tools/checkAuthStatus.test.js +0 -83
- package/test/mcp/tools/createCallLog.test.js +0 -436
- package/test/mcp/tools/createContact.test.js +0 -58
- package/test/mcp/tools/createMessageLog.test.js +0 -595
- package/test/mcp/tools/doAuth.test.js +0 -113
- package/test/mcp/tools/findContactByName.test.js +0 -275
- package/test/mcp/tools/findContactByPhone.test.js +0 -296
- package/test/mcp/tools/getCallLog.test.js +0 -298
- package/test/mcp/tools/getGoogleFilePicker.test.js +0 -281
- package/test/mcp/tools/getPublicConnectors.test.js +0 -107
- package/test/mcp/tools/getSessionInfo.test.js +0 -127
- package/test/mcp/tools/logout.test.js +0 -233
- package/test/mcp/tools/rcGetCallLogs.test.js +0 -56
- package/test/mcp/tools/updateCallLog.test.js +0 -360
- package/test/models/accountDataModel.test.js +0 -98
- package/test/models/callDownListModel.test.js +0 -125
- package/test/models/dynamo/connectorSchema.test.js +0 -189
- package/test/models/dynamo/lockSchema.test.js +0 -37
- package/test/models/dynamo/noteCacheSchema.test.js +0 -45
- package/test/models/llmSessionModel.test.js +0 -91
- package/test/models/models.test.js +0 -660
- package/test/routes/calldownRoutes.test.js +0 -224
- package/test/routes/coreRouterBroadRoutes.test.js +0 -855
- package/test/routes/dispositionRoutes.test.js +0 -192
- package/test/routes/managedAuthRoutes.test.js +0 -386
- package/test/routes/pluginRoutes.test.js +0 -262
- package/test/setup.js +0 -178
- /package/{mcp → dist/mcp}/ui/index.html +0 -0
- /package/{mcp → dist/mcp}/ui/package-lock.json +0 -0
- /package/{mcp → dist/mcp}/ui/package.json +0 -0
- /package/{mcp → dist/mcp}/ui/tsconfig.json +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type { OAuthInfo } from './auth';
|
|
2
|
+
import type { ContactInfo, ReturnMessage } from './common';
|
|
3
|
+
import type { ProxyConfig } from './connector';
|
|
4
|
+
import type { TraceLogger } from './user';
|
|
5
|
+
|
|
6
|
+
export interface ContactHandlerUser {
|
|
7
|
+
id: string | number;
|
|
8
|
+
platform?: string;
|
|
9
|
+
accessToken?: string | null;
|
|
10
|
+
refreshToken?: unknown;
|
|
11
|
+
tokenExpiry?: unknown;
|
|
12
|
+
hostname?: string;
|
|
13
|
+
rcAccountId?: string | number;
|
|
14
|
+
platformAdditionalInfo?: {
|
|
15
|
+
proxyId?: string;
|
|
16
|
+
tokenUrl?: string;
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
} | null;
|
|
19
|
+
save?(): Promise<unknown>;
|
|
20
|
+
[key: string]: any;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface AccountContactDataRecord {
|
|
24
|
+
data?: ContactInfo[] | unknown;
|
|
25
|
+
update(values: { data: unknown }): Promise<unknown>;
|
|
26
|
+
destroy(): Promise<unknown>;
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type ContactAuthType = 'oauth' | 'apiKey' | (string & {});
|
|
31
|
+
|
|
32
|
+
export interface ContactAuthParams {
|
|
33
|
+
proxyId?: string;
|
|
34
|
+
proxyConfig?: ProxyConfig | null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ContactOAuthInfoParams extends ContactAuthParams {
|
|
38
|
+
tokenUrl?: unknown;
|
|
39
|
+
hostname?: unknown;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface FindContactParams {
|
|
43
|
+
platform: string;
|
|
44
|
+
userId: string | number;
|
|
45
|
+
phoneNumber: string;
|
|
46
|
+
overridingFormat?: unknown;
|
|
47
|
+
isExtension?: boolean;
|
|
48
|
+
tracer?: TraceLogger;
|
|
49
|
+
isForceRefreshAccountData?: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface CreateContactParams {
|
|
53
|
+
platform: string;
|
|
54
|
+
userId: string | number;
|
|
55
|
+
phoneNumber: string;
|
|
56
|
+
newContactName?: string;
|
|
57
|
+
newContactType?: string;
|
|
58
|
+
additionalSubmission?: unknown;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface FindContactWithNameParams {
|
|
62
|
+
platform: string;
|
|
63
|
+
userId: string | number;
|
|
64
|
+
name: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface ContactHandlerResult {
|
|
68
|
+
successful: boolean;
|
|
69
|
+
returnMessage?: ReturnMessage | null;
|
|
70
|
+
message?: string;
|
|
71
|
+
contact?: ContactInfo[] | ContactInfo | null | unknown;
|
|
72
|
+
extraDataTracking?: unknown;
|
|
73
|
+
isRevokeUserSession?: boolean;
|
|
74
|
+
[key: string]: unknown;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface FindContactConnectorParams {
|
|
78
|
+
user: ContactHandlerUser;
|
|
79
|
+
authHeader: string;
|
|
80
|
+
phoneNumber: string;
|
|
81
|
+
overridingFormat?: unknown;
|
|
82
|
+
isExtension?: boolean;
|
|
83
|
+
proxyConfig?: ProxyConfig | null;
|
|
84
|
+
tracer?: TraceLogger;
|
|
85
|
+
isForceRefreshAccountData?: boolean;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface FindContactConnectorResult {
|
|
89
|
+
successful: boolean;
|
|
90
|
+
matchedContactInfo?: ContactInfo[] | null;
|
|
91
|
+
returnMessage?: ReturnMessage | null;
|
|
92
|
+
extraDataTracking?: unknown;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface CreateContactConnectorParams {
|
|
96
|
+
user: ContactHandlerUser;
|
|
97
|
+
authHeader: string;
|
|
98
|
+
phoneNumber: string;
|
|
99
|
+
newContactName?: string;
|
|
100
|
+
newContactType?: string;
|
|
101
|
+
additionalSubmission?: unknown;
|
|
102
|
+
proxyConfig?: ProxyConfig | null;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface CreateContactConnectorResult {
|
|
106
|
+
contactInfo?: ContactInfo | ContactInfo[] | null;
|
|
107
|
+
returnMessage?: ReturnMessage | null;
|
|
108
|
+
extraDataTracking?: unknown;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface FindContactWithNameConnectorParams {
|
|
112
|
+
user: ContactHandlerUser;
|
|
113
|
+
authHeader: string;
|
|
114
|
+
name: string;
|
|
115
|
+
proxyConfig?: ProxyConfig | null;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface ContactConnectorImplementation {
|
|
119
|
+
getAuthType(params: ContactAuthParams): ContactAuthType | Promise<ContactAuthType>;
|
|
120
|
+
getBasicAuth(params: { apiKey?: unknown }): string;
|
|
121
|
+
getOauthInfo(params: ContactOAuthInfoParams): OAuthInfo | Promise<OAuthInfo>;
|
|
122
|
+
findContact(params: FindContactConnectorParams): FindContactConnectorResult | Promise<FindContactConnectorResult>;
|
|
123
|
+
createContact(params: CreateContactConnectorParams): CreateContactConnectorResult | Promise<CreateContactConnectorResult>;
|
|
124
|
+
findContactWithName(params: FindContactWithNameConnectorParams): FindContactConnectorResult | Promise<FindContactConnectorResult>;
|
|
125
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ReturnMessage } from './common';
|
|
2
|
+
|
|
3
|
+
export type ErrorStatusCode = number | 'unknown';
|
|
4
|
+
|
|
5
|
+
export interface ProviderError extends Error {
|
|
6
|
+
response?: {
|
|
7
|
+
status?: number;
|
|
8
|
+
data?: unknown;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
statusCode?: number;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface OperationFailureResult {
|
|
16
|
+
successful: false;
|
|
17
|
+
returnMessage: ReturnMessage;
|
|
18
|
+
extraDataTracking?: {
|
|
19
|
+
statusCode: ErrorStatusCode;
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
};
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface OperationErrorMessageConfig {
|
|
26
|
+
message: string;
|
|
27
|
+
details: string[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type OperationMessageMap = Record<string, OperationErrorMessageConfig>;
|
|
31
|
+
|
|
32
|
+
export interface ExpressLikeRequest {
|
|
33
|
+
platform?: string;
|
|
34
|
+
query?: {
|
|
35
|
+
platform?: string;
|
|
36
|
+
[key: string]: unknown;
|
|
37
|
+
};
|
|
38
|
+
route?: {
|
|
39
|
+
path?: string;
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
};
|
|
42
|
+
method?: string;
|
|
43
|
+
path?: string;
|
|
44
|
+
correlationId?: string;
|
|
45
|
+
[key: string]: unknown;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ExpressLikeResponse {
|
|
49
|
+
status(code: number): ExpressLikeResponse;
|
|
50
|
+
json(body: unknown): unknown;
|
|
51
|
+
[key: string]: unknown;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type ExpressLikeNext = (error?: unknown) => void;
|
|
55
|
+
|
|
56
|
+
export type AsyncRouteHandler = (
|
|
57
|
+
req: ExpressLikeRequest,
|
|
58
|
+
res: ExpressLikeResponse,
|
|
59
|
+
next: ExpressLikeNext,
|
|
60
|
+
) => unknown | Promise<unknown>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { Application, RequestHandler, Router } from 'express';
|
|
2
|
+
import type {
|
|
3
|
+
ConnectorCapabilities,
|
|
4
|
+
ConnectorImplementation,
|
|
5
|
+
ConnectorInterfaceFunction,
|
|
6
|
+
ConnectorManifest,
|
|
7
|
+
} from './connector';
|
|
8
|
+
|
|
9
|
+
export interface CoreInitializationOptions {
|
|
10
|
+
skipDatabaseInit?: boolean;
|
|
11
|
+
skipAnalyticsInit?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ConnectorRegistry {
|
|
15
|
+
readonly connectors: Map<string, ConnectorImplementation>;
|
|
16
|
+
readonly manifests: Map<string, ConnectorManifest>;
|
|
17
|
+
readonly releaseNotes: unknown;
|
|
18
|
+
readonly platformInterfaces: Map<string, Map<string, ConnectorInterfaceFunction>>;
|
|
19
|
+
setDefaultManifest(manifest: ConnectorManifest): void;
|
|
20
|
+
registerConnectorInterface(
|
|
21
|
+
platformName: string,
|
|
22
|
+
interfaceName: string,
|
|
23
|
+
interfaceFunction: ConnectorInterfaceFunction,
|
|
24
|
+
): void;
|
|
25
|
+
getPlatformInterfaces(platformName: string): Map<string, ConnectorInterfaceFunction>;
|
|
26
|
+
hasPlatformInterface(platformName: string, interfaceName: string): boolean;
|
|
27
|
+
unregisterConnectorInterface(platformName: string, interfaceName: string): void;
|
|
28
|
+
registerConnector(
|
|
29
|
+
platform: string,
|
|
30
|
+
connector: ConnectorImplementation,
|
|
31
|
+
manifest?: ConnectorManifest | null,
|
|
32
|
+
): void;
|
|
33
|
+
getConnector(platform: string): ConnectorImplementation;
|
|
34
|
+
getOriginalConnector(platform: string): ConnectorImplementation;
|
|
35
|
+
getManifest(platform: string, fallbackToDefault?: boolean): ConnectorManifest;
|
|
36
|
+
getRegisteredPlatforms(): string[];
|
|
37
|
+
isRegistered(platform: string): boolean;
|
|
38
|
+
validateConnectorInterface(platform: string, connector: ConnectorImplementation): void;
|
|
39
|
+
unregisterConnector(platform: string): void;
|
|
40
|
+
setReleaseNotes(releaseNotes: unknown): void;
|
|
41
|
+
getReleaseNotes(): unknown;
|
|
42
|
+
getConnectorCapabilities(platform: string): Promise<ConnectorCapabilities>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function createCoreRouter(): Router;
|
|
46
|
+
export function createCoreMiddleware(): RequestHandler[];
|
|
47
|
+
export function initializeCore(options?: CoreInitializationOptions): Promise<void>;
|
|
48
|
+
export function createCoreApp(options?: CoreInitializationOptions): Application;
|
|
49
|
+
export const connectorRegistry: ConnectorRegistry;
|
|
50
|
+
export const proxyConnector: ConnectorImplementation;
|
|
51
|
+
export { DebugTracer } from '../lib/debugTracer';
|
|
52
|
+
|
|
53
|
+
export * from './analytics';
|
|
54
|
+
export * from './admin';
|
|
55
|
+
export * from './appointment';
|
|
56
|
+
export * from './auth';
|
|
57
|
+
export * from './authSession';
|
|
58
|
+
export * from './calldown';
|
|
59
|
+
export * from './cacheCleanup';
|
|
60
|
+
export * from './common';
|
|
61
|
+
export * from './connector';
|
|
62
|
+
export * from './contact';
|
|
63
|
+
export * from './errorHandler';
|
|
64
|
+
export * from './json';
|
|
65
|
+
export * from './jwt';
|
|
66
|
+
export * from './logging';
|
|
67
|
+
export * from './managedAuth';
|
|
68
|
+
export * from './managedOAuth';
|
|
69
|
+
export * from './manifest';
|
|
70
|
+
export * from './migration';
|
|
71
|
+
export * from './plugin';
|
|
72
|
+
export * from './ringcentral';
|
|
73
|
+
export * from './s3ErrorLogReport';
|
|
74
|
+
export * from './sharedSMSComposer';
|
|
75
|
+
export * from './user';
|
|
76
|
+
export * from './util';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
2
|
+
|
|
3
|
+
export type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
4
|
+
|
|
5
|
+
export interface JsonObject {
|
|
6
|
+
[key: string]: JsonValue | undefined;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface JsonArray extends Array<JsonValue> {}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import type { AppConnectUser, ContactInfo, ReturnMessage } from './common';
|
|
2
|
+
import type { JsonObject, JsonValue } from './json';
|
|
3
|
+
|
|
4
|
+
export type LoggerLevelName = 'ERROR' | 'WARN' | 'INFO' | 'DEBUG';
|
|
5
|
+
|
|
6
|
+
export type LoggerContext = Record<string, any>;
|
|
7
|
+
|
|
8
|
+
export interface LoggerOptions {
|
|
9
|
+
level?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ChildLogger {
|
|
13
|
+
error(message: string, context?: LoggerContext): void;
|
|
14
|
+
warn(message: string, context?: LoggerContext): void;
|
|
15
|
+
info(message: string, context?: LoggerContext): void;
|
|
16
|
+
debug(message: string, context?: LoggerContext): void;
|
|
17
|
+
child(additionalContext?: LoggerContext): ChildLogger;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface ApiRequestLogOptions {
|
|
21
|
+
method?: string;
|
|
22
|
+
url?: string;
|
|
23
|
+
status?: number;
|
|
24
|
+
duration?: number;
|
|
25
|
+
platform?: string;
|
|
26
|
+
error?: unknown;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface DatabaseQueryLogOptions {
|
|
30
|
+
operation?: string;
|
|
31
|
+
table?: string;
|
|
32
|
+
duration?: number;
|
|
33
|
+
error?: unknown;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type TraceLevel = 'info' | 'warn' | 'error' | (string & {});
|
|
37
|
+
|
|
38
|
+
export interface TraceOptions {
|
|
39
|
+
includeStack?: boolean;
|
|
40
|
+
level?: TraceLevel;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface TraceEntry {
|
|
44
|
+
timestamp: string;
|
|
45
|
+
elapsed: number;
|
|
46
|
+
methodName: string;
|
|
47
|
+
level: TraceLevel;
|
|
48
|
+
data: unknown;
|
|
49
|
+
stackTrace?: string[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface TraceActionSummary {
|
|
53
|
+
index: number;
|
|
54
|
+
timestamp: string;
|
|
55
|
+
level: string;
|
|
56
|
+
method: string;
|
|
57
|
+
elapsedMs: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface DebugTraceData {
|
|
61
|
+
sum: TraceActionSummary[];
|
|
62
|
+
requestId: string;
|
|
63
|
+
totalDuration: string;
|
|
64
|
+
traceCount: number;
|
|
65
|
+
traces: TraceEntry[];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface RequestWithHeaders {
|
|
69
|
+
headers?: Record<string, unknown>;
|
|
70
|
+
[key: string]: unknown;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type LogDetailsFormatType = 'text/plain' | 'text/html' | 'text/markdown';
|
|
74
|
+
|
|
75
|
+
export type CallDirection = 'Inbound' | 'Outbound' | (string & {});
|
|
76
|
+
|
|
77
|
+
export interface PhoneParty {
|
|
78
|
+
phoneNumber?: string;
|
|
79
|
+
extensionNumber?: string;
|
|
80
|
+
name?: string;
|
|
81
|
+
[key: string]: unknown;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface RingCentralCallLog {
|
|
85
|
+
id?: string;
|
|
86
|
+
telephonySessionId?: string;
|
|
87
|
+
sessionId?: string;
|
|
88
|
+
direction?: CallDirection;
|
|
89
|
+
from?: PhoneParty;
|
|
90
|
+
to?: PhoneParty;
|
|
91
|
+
startTime?: string | Date;
|
|
92
|
+
duration?: number;
|
|
93
|
+
result?: string;
|
|
94
|
+
legs?: JsonObject[];
|
|
95
|
+
[key: string]: unknown;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface CallLogLookupInput {
|
|
99
|
+
extensionNumber?: string | number | null;
|
|
100
|
+
hashedExtensionId?: string | number | null;
|
|
101
|
+
rcExtensionId?: string | number | null;
|
|
102
|
+
logInfo?: {
|
|
103
|
+
extensionNumber?: string | number | null;
|
|
104
|
+
hashedExtensionId?: string | number | null;
|
|
105
|
+
rcExtensionId?: string | number | null;
|
|
106
|
+
[key: string]: unknown;
|
|
107
|
+
} | null;
|
|
108
|
+
[key: string]: unknown;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface PersistedCallLogIdentity {
|
|
112
|
+
sessionId?: string;
|
|
113
|
+
extensionNumber?: string | number | null;
|
|
114
|
+
hashedExtensionId?: string | number | null;
|
|
115
|
+
[key: string]: unknown;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface BuildCallLogSessionWhereParams {
|
|
119
|
+
sessionId?: string;
|
|
120
|
+
sessionIds?: string[];
|
|
121
|
+
extensionNumber?: string | number | null;
|
|
122
|
+
hashedExtensionId?: string | number | null;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface CallLogSubmission {
|
|
126
|
+
logInfo?: JsonObject;
|
|
127
|
+
callLog?: RingCentralCallLog;
|
|
128
|
+
contactInfo?: ContactInfo;
|
|
129
|
+
contactId?: string | number;
|
|
130
|
+
note?: string;
|
|
131
|
+
aiNote?: string;
|
|
132
|
+
transcript?: string;
|
|
133
|
+
recordingLink?: string;
|
|
134
|
+
subject?: string;
|
|
135
|
+
startTime?: string | Date;
|
|
136
|
+
duration?: number;
|
|
137
|
+
result?: string;
|
|
138
|
+
[key: string]: unknown;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface ComposeCallLogParams {
|
|
142
|
+
logFormat?: LogDetailsFormatType;
|
|
143
|
+
existingBody?: string;
|
|
144
|
+
callLog?: RingCentralCallLog;
|
|
145
|
+
contactInfo?: ContactInfo;
|
|
146
|
+
user: AppConnectUser;
|
|
147
|
+
note?: string;
|
|
148
|
+
aiNote?: string;
|
|
149
|
+
transcript?: string;
|
|
150
|
+
recordingLink?: string;
|
|
151
|
+
subject?: string;
|
|
152
|
+
startTime?: string | Date;
|
|
153
|
+
duration?: number;
|
|
154
|
+
result?: string;
|
|
155
|
+
ringSenseTranscript?: string;
|
|
156
|
+
ringSenseSummary?: string;
|
|
157
|
+
ringSenseAIScore?: string | number;
|
|
158
|
+
ringSenseBulletedSummary?: string;
|
|
159
|
+
ringSenseLink?: string;
|
|
160
|
+
[key: string]: unknown;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface MessageLogSubmission {
|
|
164
|
+
messageId?: string;
|
|
165
|
+
conversationId?: string;
|
|
166
|
+
direction?: CallDirection;
|
|
167
|
+
from?: PhoneParty;
|
|
168
|
+
to?: PhoneParty[];
|
|
169
|
+
text?: string;
|
|
170
|
+
attachments?: JsonValue[];
|
|
171
|
+
[key: string]: unknown;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export interface AppointmentSubmission {
|
|
175
|
+
id?: string;
|
|
176
|
+
subject?: string;
|
|
177
|
+
startTime?: string | Date;
|
|
178
|
+
endTime?: string | Date;
|
|
179
|
+
contactId?: string | number;
|
|
180
|
+
thirdPartyAppointmentId?: string | number;
|
|
181
|
+
[key: string]: unknown;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export interface CallDispositionItem {
|
|
185
|
+
id?: string | number;
|
|
186
|
+
value?: unknown;
|
|
187
|
+
[key: string]: unknown;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface UpsertCallDispositionParams {
|
|
191
|
+
platform: string;
|
|
192
|
+
userId: string | number;
|
|
193
|
+
sessionId: string;
|
|
194
|
+
extensionNumber?: string | number | null;
|
|
195
|
+
hashedExtensionId?: string | number | null;
|
|
196
|
+
dispositions?: CallDispositionItem[];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface UpsertCallDispositionResult {
|
|
200
|
+
successful: boolean;
|
|
201
|
+
logId?: string | number;
|
|
202
|
+
returnMessage?: ReturnMessage;
|
|
203
|
+
extraDataTracking?: unknown;
|
|
204
|
+
isRevokeUserSession?: boolean;
|
|
205
|
+
[key: string]: unknown;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface MockGetCallLogParams {
|
|
209
|
+
sessionIds: string;
|
|
210
|
+
extensionNumber?: string | number | null;
|
|
211
|
+
hashedExtensionId?: string | number | null;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface MockCreateCallLogParams {
|
|
215
|
+
sessionId: string;
|
|
216
|
+
extensionNumber?: string | number | null;
|
|
217
|
+
hashedExtensionId?: string | number | null;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export interface MockCallLogMatchResult {
|
|
221
|
+
sessionId: string;
|
|
222
|
+
matched: boolean;
|
|
223
|
+
logId?: string;
|
|
224
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { AppConnectManifest } from './manifest';
|
|
2
|
+
|
|
3
|
+
export type ManagedAuthValue = unknown;
|
|
4
|
+
|
|
5
|
+
export type ManagedAuthValues = Record<string, ManagedAuthValue>;
|
|
6
|
+
|
|
7
|
+
export interface ManagedAuthStoredValue {
|
|
8
|
+
version?: number;
|
|
9
|
+
encrypted?: boolean;
|
|
10
|
+
value?: string;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ManagedAuthStoredData {
|
|
15
|
+
rcExtensionId?: string | number;
|
|
16
|
+
rcUserName?: string;
|
|
17
|
+
fields?: Record<string, ManagedAuthStoredValue | unknown>;
|
|
18
|
+
failedAt?: string;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ManagedAuthRecord {
|
|
23
|
+
id?: string;
|
|
24
|
+
dataKey?: string;
|
|
25
|
+
data?: ManagedAuthStoredData;
|
|
26
|
+
update(values: Record<string, unknown>): Promise<unknown>;
|
|
27
|
+
destroy?(): Promise<unknown>;
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ManagedAuthFieldDefinition {
|
|
32
|
+
const: string;
|
|
33
|
+
required?: boolean;
|
|
34
|
+
managed?: boolean;
|
|
35
|
+
managedScope?: 'account' | 'user' | (string & {});
|
|
36
|
+
[key: string]: unknown;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ManagedAuthAccountParams {
|
|
40
|
+
rcAccountId?: string | number;
|
|
41
|
+
platform?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ManagedAuthFieldDefinitionParams extends ManagedAuthAccountParams {
|
|
45
|
+
connectorId?: string;
|
|
46
|
+
isPrivate?: boolean;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface ManagedAuthUserParams extends ManagedAuthAccountParams {
|
|
50
|
+
rcExtensionId?: string | number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface ManagedAuthLoginFailureParams extends ManagedAuthUserParams {}
|
|
54
|
+
|
|
55
|
+
export interface UpsertOrgManagedAuthValuesParams extends ManagedAuthAccountParams {
|
|
56
|
+
values?: ManagedAuthValues;
|
|
57
|
+
fieldsToRemove?: string[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface UpsertUserManagedAuthValuesParams extends ManagedAuthUserParams {
|
|
61
|
+
rcUserName?: string;
|
|
62
|
+
values?: ManagedAuthValues;
|
|
63
|
+
fieldsToRemove?: string[];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface ManagedAuthAdminSettingsParams extends ManagedAuthFieldDefinitionParams {}
|
|
67
|
+
|
|
68
|
+
export interface ManagedAuthStateParams extends ManagedAuthFieldDefinitionParams {
|
|
69
|
+
rcExtensionId?: string | number;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface ResolveApiKeyLoginFieldsParams extends ManagedAuthStateParams {
|
|
73
|
+
apiKey?: unknown;
|
|
74
|
+
additionalInfo?: ManagedAuthValues;
|
|
75
|
+
preferSubmittedValuesForManagedFields?: boolean;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface PersistSubmittedManagedValuesParams extends ManagedAuthUserParams {
|
|
79
|
+
rcUserName?: string;
|
|
80
|
+
submittedManagedValues?: {
|
|
81
|
+
org?: ManagedAuthValues;
|
|
82
|
+
user?: ManagedAuthValues;
|
|
83
|
+
[key: string]: unknown;
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface StoredFieldValue {
|
|
88
|
+
hasValue: boolean;
|
|
89
|
+
value: unknown;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface ManagedAuthAdminUserEntry {
|
|
93
|
+
rcExtensionId: string | number;
|
|
94
|
+
rcUserName: string;
|
|
95
|
+
fields: Record<string, ManagedAuthStoredValue | unknown>;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface ManagedAuthState {
|
|
99
|
+
hasManagedAuth: boolean;
|
|
100
|
+
allRequiredFieldsSatisfied: boolean;
|
|
101
|
+
visibleFieldConsts: string[] | null;
|
|
102
|
+
missingRequiredFieldConsts: string[];
|
|
103
|
+
fallbackToManualAuth: boolean;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface ResolveApiKeyLoginFieldsResult {
|
|
107
|
+
resolvedAdditionalInfo: ManagedAuthValues;
|
|
108
|
+
resolvedApiKey?: unknown;
|
|
109
|
+
missingRequiredFieldConsts: string[];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface DeveloperPortalManifestProvider {
|
|
113
|
+
getConnectorManifest(params: ManagedAuthFieldDefinitionParams): Promise<AppConnectManifest | null | undefined>;
|
|
114
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export type ManagedOAuthValue = unknown;
|
|
2
|
+
|
|
3
|
+
export type ManagedOAuthValues = Record<string, ManagedOAuthValue>;
|
|
4
|
+
|
|
5
|
+
export interface ManagedOAuthStoredValue {
|
|
6
|
+
version?: number;
|
|
7
|
+
encrypted?: boolean;
|
|
8
|
+
value?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface ManagedOAuthStoredData {
|
|
13
|
+
fields?: Record<string, ManagedOAuthStoredValue | unknown>;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ManagedOAuthRecord {
|
|
18
|
+
id?: string;
|
|
19
|
+
data?: ManagedOAuthStoredData;
|
|
20
|
+
expiry?: Date | string | number;
|
|
21
|
+
update(values: Record<string, unknown>): Promise<unknown>;
|
|
22
|
+
destroy(): Promise<unknown>;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface ManagedOAuthAccountParams {
|
|
27
|
+
rcAccountId?: string | number;
|
|
28
|
+
platform?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ManagedOAuthPendingParams {
|
|
32
|
+
rcAccountId?: string | number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ManagedOAuthStateParams extends ManagedOAuthAccountParams {
|
|
36
|
+
isAdmin?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface UpsertPendingManagedOAuthParams extends ManagedOAuthPendingParams {
|
|
40
|
+
values?: ManagedOAuthValues;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ManagedOAuthState {
|
|
44
|
+
isAdmin: boolean;
|
|
45
|
+
hasAccountOAuth: boolean;
|
|
46
|
+
hasPendingOAuth: boolean;
|
|
47
|
+
oauthValues?: ManagedOAuthValues;
|
|
48
|
+
pendingValues?: ManagedOAuthValues;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ManagedOAuthResolution {
|
|
52
|
+
source: 'account' | 'pending' | null;
|
|
53
|
+
oauthInfo: ManagedOAuthValues | null;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface ResetManagedOAuthResult {
|
|
57
|
+
deletedAccountCount: number;
|
|
58
|
+
deletedPendingCount: number;
|
|
59
|
+
}
|