@aouda/client 0.0.1 → 0.0.2
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 +2 -0
- package/dist/cli/index.cjs +74 -0
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +74 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/{client-DXT2ZAeO.d.cts → client-otKeBYQG.d.cts} +121 -0
- package/dist/{client-DXT2ZAeO.d.ts → client-otKeBYQG.d.ts} +121 -0
- package/dist/index.cjs +75 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +75 -1
- package/dist/index.js.map +1 -1
- package/package.json +16 -2
|
@@ -1862,6 +1862,126 @@ declare class NodeAdminApi {
|
|
|
1862
1862
|
private buildLogsPath;
|
|
1863
1863
|
}
|
|
1864
1864
|
|
|
1865
|
+
/**
|
|
1866
|
+
* Notification provider settings types.
|
|
1867
|
+
* Mirrors Aouda server JSON payloads under /admin/notifications.
|
|
1868
|
+
*/
|
|
1869
|
+
/** Where the current provider config comes from. */
|
|
1870
|
+
type NotificationProviderSource = "db" | "env" | "none";
|
|
1871
|
+
/** Information about one configured notification provider (email or SMS). */
|
|
1872
|
+
interface NotificationProviderInfo {
|
|
1873
|
+
/** Provider identifier, e.g. "sendgrid", "gatewayapi", "console", "none". */
|
|
1874
|
+
provider: string;
|
|
1875
|
+
/**
|
|
1876
|
+
* Where the provider config was loaded from.
|
|
1877
|
+
* "db" = persisted in _settings DB; "env" = appsettings/env var; "none" = no provider.
|
|
1878
|
+
*/
|
|
1879
|
+
source: NotificationProviderSource;
|
|
1880
|
+
/** Masked API key: "****" + last 4 chars, or null if not set. */
|
|
1881
|
+
apiKeyMasked: string | null;
|
|
1882
|
+
/** From address (email only). */
|
|
1883
|
+
fromAddress?: string | null;
|
|
1884
|
+
/** From display name (email only). */
|
|
1885
|
+
fromName?: string | null;
|
|
1886
|
+
/** Invite URL template (email only). */
|
|
1887
|
+
inviteUrl?: string | null;
|
|
1888
|
+
/** Password reset URL template (email only). */
|
|
1889
|
+
passwordResetUrl?: string | null;
|
|
1890
|
+
/** Sender name / short-code (SMS only). */
|
|
1891
|
+
sender?: string | null;
|
|
1892
|
+
/** SMS gateway base URL override (SMS only). */
|
|
1893
|
+
baseUrl?: string | null;
|
|
1894
|
+
}
|
|
1895
|
+
/** Response from GET /admin/notifications. */
|
|
1896
|
+
interface NotificationSettingsResponse {
|
|
1897
|
+
email: NotificationProviderInfo;
|
|
1898
|
+
sms: NotificationProviderInfo;
|
|
1899
|
+
availableEmailProviders: string[];
|
|
1900
|
+
availableSmsProviders: string[];
|
|
1901
|
+
}
|
|
1902
|
+
/** Request body for PUT /admin/notifications/email. */
|
|
1903
|
+
interface PutEmailProviderRequest {
|
|
1904
|
+
provider: string;
|
|
1905
|
+
/**
|
|
1906
|
+
* New API key. Omit or set to undefined/null to keep the existing stored key.
|
|
1907
|
+
* Empty string "" is rejected with 400.
|
|
1908
|
+
*/
|
|
1909
|
+
apiKey?: string | null;
|
|
1910
|
+
fromAddress?: string | null;
|
|
1911
|
+
fromName?: string | null;
|
|
1912
|
+
inviteUrl?: string | null;
|
|
1913
|
+
passwordResetUrl?: string | null;
|
|
1914
|
+
}
|
|
1915
|
+
/** Request body for PUT /admin/notifications/sms. */
|
|
1916
|
+
interface PutSmsProviderRequest {
|
|
1917
|
+
provider: string;
|
|
1918
|
+
/** New API key. Omit or null to keep the existing stored key. Empty string "" is rejected. */
|
|
1919
|
+
apiKey?: string | null;
|
|
1920
|
+
sender?: string | null;
|
|
1921
|
+
baseUrl?: string | null;
|
|
1922
|
+
}
|
|
1923
|
+
/** Request body for POST /admin/notifications/email/test. */
|
|
1924
|
+
interface TestEmailRequest {
|
|
1925
|
+
/** Recipient address for the test message. */
|
|
1926
|
+
to: string;
|
|
1927
|
+
}
|
|
1928
|
+
/** Request body for POST /admin/notifications/sms/test. */
|
|
1929
|
+
interface TestSmsRequest {
|
|
1930
|
+
/** Recipient phone number in E.164 format. */
|
|
1931
|
+
to: string;
|
|
1932
|
+
}
|
|
1933
|
+
/** Response from POST /admin/notifications/{email|sms}/test. */
|
|
1934
|
+
interface TestSendResult {
|
|
1935
|
+
success: boolean;
|
|
1936
|
+
/** Error message if success is false. */
|
|
1937
|
+
error?: string | null;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* Admin notification provider settings API.
|
|
1942
|
+
* Access via client.admin.notifications.
|
|
1943
|
+
*/
|
|
1944
|
+
|
|
1945
|
+
declare class NotificationsAdminApi {
|
|
1946
|
+
private readonly transport;
|
|
1947
|
+
constructor(transport: Transport);
|
|
1948
|
+
/**
|
|
1949
|
+
* Get current notification provider state.
|
|
1950
|
+
* GET /admin/notifications
|
|
1951
|
+
*/
|
|
1952
|
+
get(): Promise<NotificationSettingsResponse>;
|
|
1953
|
+
/**
|
|
1954
|
+
* Set or update the email notification provider.
|
|
1955
|
+
* PUT /admin/notifications/email
|
|
1956
|
+
*/
|
|
1957
|
+
putEmail(request: PutEmailProviderRequest): Promise<NotificationSettingsResponse>;
|
|
1958
|
+
/**
|
|
1959
|
+
* Remove the email notification provider (reverts to env/appsettings).
|
|
1960
|
+
* DELETE /admin/notifications/email
|
|
1961
|
+
*/
|
|
1962
|
+
deleteEmail(): Promise<NotificationSettingsResponse>;
|
|
1963
|
+
/**
|
|
1964
|
+
* Set or update the SMS notification provider.
|
|
1965
|
+
* PUT /admin/notifications/sms
|
|
1966
|
+
*/
|
|
1967
|
+
putSms(request: PutSmsProviderRequest): Promise<NotificationSettingsResponse>;
|
|
1968
|
+
/**
|
|
1969
|
+
* Remove the SMS notification provider (reverts to env/appsettings).
|
|
1970
|
+
* DELETE /admin/notifications/sms
|
|
1971
|
+
*/
|
|
1972
|
+
deleteSms(): Promise<NotificationSettingsResponse>;
|
|
1973
|
+
/**
|
|
1974
|
+
* Send a test email via the currently configured provider.
|
|
1975
|
+
* POST /admin/notifications/email/test
|
|
1976
|
+
*/
|
|
1977
|
+
testEmail(request: TestEmailRequest): Promise<TestSendResult>;
|
|
1978
|
+
/**
|
|
1979
|
+
* Send a test SMS via the currently configured provider.
|
|
1980
|
+
* POST /admin/notifications/sms/test
|
|
1981
|
+
*/
|
|
1982
|
+
testSms(request: TestSmsRequest): Promise<TestSendResult>;
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1865
1985
|
/**
|
|
1866
1986
|
* Admin API: server info, memory, metrics, health, replication.
|
|
1867
1987
|
* Access via client.admin.
|
|
@@ -1877,6 +1997,7 @@ declare class AdminApi {
|
|
|
1877
1997
|
readonly backup: BackupAdminApi;
|
|
1878
1998
|
readonly config: ConfigAdminApi;
|
|
1879
1999
|
readonly node: NodeAdminApi;
|
|
2000
|
+
readonly notifications: NotificationsAdminApi;
|
|
1880
2001
|
constructor(transport: Transport);
|
|
1881
2002
|
}
|
|
1882
2003
|
|
|
@@ -1862,6 +1862,126 @@ declare class NodeAdminApi {
|
|
|
1862
1862
|
private buildLogsPath;
|
|
1863
1863
|
}
|
|
1864
1864
|
|
|
1865
|
+
/**
|
|
1866
|
+
* Notification provider settings types.
|
|
1867
|
+
* Mirrors Aouda server JSON payloads under /admin/notifications.
|
|
1868
|
+
*/
|
|
1869
|
+
/** Where the current provider config comes from. */
|
|
1870
|
+
type NotificationProviderSource = "db" | "env" | "none";
|
|
1871
|
+
/** Information about one configured notification provider (email or SMS). */
|
|
1872
|
+
interface NotificationProviderInfo {
|
|
1873
|
+
/** Provider identifier, e.g. "sendgrid", "gatewayapi", "console", "none". */
|
|
1874
|
+
provider: string;
|
|
1875
|
+
/**
|
|
1876
|
+
* Where the provider config was loaded from.
|
|
1877
|
+
* "db" = persisted in _settings DB; "env" = appsettings/env var; "none" = no provider.
|
|
1878
|
+
*/
|
|
1879
|
+
source: NotificationProviderSource;
|
|
1880
|
+
/** Masked API key: "****" + last 4 chars, or null if not set. */
|
|
1881
|
+
apiKeyMasked: string | null;
|
|
1882
|
+
/** From address (email only). */
|
|
1883
|
+
fromAddress?: string | null;
|
|
1884
|
+
/** From display name (email only). */
|
|
1885
|
+
fromName?: string | null;
|
|
1886
|
+
/** Invite URL template (email only). */
|
|
1887
|
+
inviteUrl?: string | null;
|
|
1888
|
+
/** Password reset URL template (email only). */
|
|
1889
|
+
passwordResetUrl?: string | null;
|
|
1890
|
+
/** Sender name / short-code (SMS only). */
|
|
1891
|
+
sender?: string | null;
|
|
1892
|
+
/** SMS gateway base URL override (SMS only). */
|
|
1893
|
+
baseUrl?: string | null;
|
|
1894
|
+
}
|
|
1895
|
+
/** Response from GET /admin/notifications. */
|
|
1896
|
+
interface NotificationSettingsResponse {
|
|
1897
|
+
email: NotificationProviderInfo;
|
|
1898
|
+
sms: NotificationProviderInfo;
|
|
1899
|
+
availableEmailProviders: string[];
|
|
1900
|
+
availableSmsProviders: string[];
|
|
1901
|
+
}
|
|
1902
|
+
/** Request body for PUT /admin/notifications/email. */
|
|
1903
|
+
interface PutEmailProviderRequest {
|
|
1904
|
+
provider: string;
|
|
1905
|
+
/**
|
|
1906
|
+
* New API key. Omit or set to undefined/null to keep the existing stored key.
|
|
1907
|
+
* Empty string "" is rejected with 400.
|
|
1908
|
+
*/
|
|
1909
|
+
apiKey?: string | null;
|
|
1910
|
+
fromAddress?: string | null;
|
|
1911
|
+
fromName?: string | null;
|
|
1912
|
+
inviteUrl?: string | null;
|
|
1913
|
+
passwordResetUrl?: string | null;
|
|
1914
|
+
}
|
|
1915
|
+
/** Request body for PUT /admin/notifications/sms. */
|
|
1916
|
+
interface PutSmsProviderRequest {
|
|
1917
|
+
provider: string;
|
|
1918
|
+
/** New API key. Omit or null to keep the existing stored key. Empty string "" is rejected. */
|
|
1919
|
+
apiKey?: string | null;
|
|
1920
|
+
sender?: string | null;
|
|
1921
|
+
baseUrl?: string | null;
|
|
1922
|
+
}
|
|
1923
|
+
/** Request body for POST /admin/notifications/email/test. */
|
|
1924
|
+
interface TestEmailRequest {
|
|
1925
|
+
/** Recipient address for the test message. */
|
|
1926
|
+
to: string;
|
|
1927
|
+
}
|
|
1928
|
+
/** Request body for POST /admin/notifications/sms/test. */
|
|
1929
|
+
interface TestSmsRequest {
|
|
1930
|
+
/** Recipient phone number in E.164 format. */
|
|
1931
|
+
to: string;
|
|
1932
|
+
}
|
|
1933
|
+
/** Response from POST /admin/notifications/{email|sms}/test. */
|
|
1934
|
+
interface TestSendResult {
|
|
1935
|
+
success: boolean;
|
|
1936
|
+
/** Error message if success is false. */
|
|
1937
|
+
error?: string | null;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
/**
|
|
1941
|
+
* Admin notification provider settings API.
|
|
1942
|
+
* Access via client.admin.notifications.
|
|
1943
|
+
*/
|
|
1944
|
+
|
|
1945
|
+
declare class NotificationsAdminApi {
|
|
1946
|
+
private readonly transport;
|
|
1947
|
+
constructor(transport: Transport);
|
|
1948
|
+
/**
|
|
1949
|
+
* Get current notification provider state.
|
|
1950
|
+
* GET /admin/notifications
|
|
1951
|
+
*/
|
|
1952
|
+
get(): Promise<NotificationSettingsResponse>;
|
|
1953
|
+
/**
|
|
1954
|
+
* Set or update the email notification provider.
|
|
1955
|
+
* PUT /admin/notifications/email
|
|
1956
|
+
*/
|
|
1957
|
+
putEmail(request: PutEmailProviderRequest): Promise<NotificationSettingsResponse>;
|
|
1958
|
+
/**
|
|
1959
|
+
* Remove the email notification provider (reverts to env/appsettings).
|
|
1960
|
+
* DELETE /admin/notifications/email
|
|
1961
|
+
*/
|
|
1962
|
+
deleteEmail(): Promise<NotificationSettingsResponse>;
|
|
1963
|
+
/**
|
|
1964
|
+
* Set or update the SMS notification provider.
|
|
1965
|
+
* PUT /admin/notifications/sms
|
|
1966
|
+
*/
|
|
1967
|
+
putSms(request: PutSmsProviderRequest): Promise<NotificationSettingsResponse>;
|
|
1968
|
+
/**
|
|
1969
|
+
* Remove the SMS notification provider (reverts to env/appsettings).
|
|
1970
|
+
* DELETE /admin/notifications/sms
|
|
1971
|
+
*/
|
|
1972
|
+
deleteSms(): Promise<NotificationSettingsResponse>;
|
|
1973
|
+
/**
|
|
1974
|
+
* Send a test email via the currently configured provider.
|
|
1975
|
+
* POST /admin/notifications/email/test
|
|
1976
|
+
*/
|
|
1977
|
+
testEmail(request: TestEmailRequest): Promise<TestSendResult>;
|
|
1978
|
+
/**
|
|
1979
|
+
* Send a test SMS via the currently configured provider.
|
|
1980
|
+
* POST /admin/notifications/sms/test
|
|
1981
|
+
*/
|
|
1982
|
+
testSms(request: TestSmsRequest): Promise<TestSendResult>;
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1865
1985
|
/**
|
|
1866
1986
|
* Admin API: server info, memory, metrics, health, replication.
|
|
1867
1987
|
* Access via client.admin.
|
|
@@ -1877,6 +1997,7 @@ declare class AdminApi {
|
|
|
1877
1997
|
readonly backup: BackupAdminApi;
|
|
1878
1998
|
readonly config: ConfigAdminApi;
|
|
1879
1999
|
readonly node: NodeAdminApi;
|
|
2000
|
+
readonly notifications: NotificationsAdminApi;
|
|
1880
2001
|
constructor(transport: Transport);
|
|
1881
2002
|
}
|
|
1882
2003
|
|
package/dist/index.cjs
CHANGED
|
@@ -4112,6 +4112,79 @@ function parseSseLogEvent(rawEvent) {
|
|
|
4112
4112
|
return null;
|
|
4113
4113
|
}
|
|
4114
4114
|
|
|
4115
|
+
// src/admin/notifications.ts
|
|
4116
|
+
var BASE_PATH7 = "/admin/notifications";
|
|
4117
|
+
var NotificationsAdminApi = class {
|
|
4118
|
+
constructor(transport) {
|
|
4119
|
+
this.transport = transport;
|
|
4120
|
+
}
|
|
4121
|
+
/**
|
|
4122
|
+
* Get current notification provider state.
|
|
4123
|
+
* GET /admin/notifications
|
|
4124
|
+
*/
|
|
4125
|
+
async get() {
|
|
4126
|
+
return this.transport.get(BASE_PATH7);
|
|
4127
|
+
}
|
|
4128
|
+
/**
|
|
4129
|
+
* Set or update the email notification provider.
|
|
4130
|
+
* PUT /admin/notifications/email
|
|
4131
|
+
*/
|
|
4132
|
+
async putEmail(request) {
|
|
4133
|
+
return this.transport.put(
|
|
4134
|
+
`${BASE_PATH7}/email`,
|
|
4135
|
+
request
|
|
4136
|
+
);
|
|
4137
|
+
}
|
|
4138
|
+
/**
|
|
4139
|
+
* Remove the email notification provider (reverts to env/appsettings).
|
|
4140
|
+
* DELETE /admin/notifications/email
|
|
4141
|
+
*/
|
|
4142
|
+
async deleteEmail() {
|
|
4143
|
+
return this.transport.delete(
|
|
4144
|
+
`${BASE_PATH7}/email`
|
|
4145
|
+
);
|
|
4146
|
+
}
|
|
4147
|
+
/**
|
|
4148
|
+
* Set or update the SMS notification provider.
|
|
4149
|
+
* PUT /admin/notifications/sms
|
|
4150
|
+
*/
|
|
4151
|
+
async putSms(request) {
|
|
4152
|
+
return this.transport.put(
|
|
4153
|
+
`${BASE_PATH7}/sms`,
|
|
4154
|
+
request
|
|
4155
|
+
);
|
|
4156
|
+
}
|
|
4157
|
+
/**
|
|
4158
|
+
* Remove the SMS notification provider (reverts to env/appsettings).
|
|
4159
|
+
* DELETE /admin/notifications/sms
|
|
4160
|
+
*/
|
|
4161
|
+
async deleteSms() {
|
|
4162
|
+
return this.transport.delete(
|
|
4163
|
+
`${BASE_PATH7}/sms`
|
|
4164
|
+
);
|
|
4165
|
+
}
|
|
4166
|
+
/**
|
|
4167
|
+
* Send a test email via the currently configured provider.
|
|
4168
|
+
* POST /admin/notifications/email/test
|
|
4169
|
+
*/
|
|
4170
|
+
async testEmail(request) {
|
|
4171
|
+
return this.transport.post(
|
|
4172
|
+
`${BASE_PATH7}/email/test`,
|
|
4173
|
+
request
|
|
4174
|
+
);
|
|
4175
|
+
}
|
|
4176
|
+
/**
|
|
4177
|
+
* Send a test SMS via the currently configured provider.
|
|
4178
|
+
* POST /admin/notifications/sms/test
|
|
4179
|
+
*/
|
|
4180
|
+
async testSms(request) {
|
|
4181
|
+
return this.transport.post(
|
|
4182
|
+
`${BASE_PATH7}/sms/test`,
|
|
4183
|
+
request
|
|
4184
|
+
);
|
|
4185
|
+
}
|
|
4186
|
+
};
|
|
4187
|
+
|
|
4115
4188
|
// src/admin/index.ts
|
|
4116
4189
|
var AdminApi = class {
|
|
4117
4190
|
constructor(transport) {
|
|
@@ -4123,6 +4196,7 @@ var AdminApi = class {
|
|
|
4123
4196
|
this.backup = new BackupAdminApi(transport);
|
|
4124
4197
|
this.config = new ConfigAdminApi(transport);
|
|
4125
4198
|
this.node = new NodeAdminApi(transport);
|
|
4199
|
+
this.notifications = new NotificationsAdminApi(transport);
|
|
4126
4200
|
}
|
|
4127
4201
|
};
|
|
4128
4202
|
|
|
@@ -5489,7 +5563,7 @@ function createAoudaClusterMcpToolSet(client) {
|
|
|
5489
5563
|
}
|
|
5490
5564
|
|
|
5491
5565
|
// src/index.ts
|
|
5492
|
-
var version = "0.0.
|
|
5566
|
+
var version = "0.0.2";
|
|
5493
5567
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5494
5568
|
0 && (module.exports = {
|
|
5495
5569
|
AOUDA_DATA_TYPES,
|