@fusebase/fusebase-gate-sdk 2.1.1-sdk.4 → 2.1.1-sdk.5
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/apis/EmailsApi.d.ts +23 -0
- package/dist/apis/EmailsApi.js +30 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/types/email/email.d.ts +32 -0
- package/dist/types/email/email.js +2 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Emails API
|
|
3
|
+
*
|
|
4
|
+
* Generated from contract introspection
|
|
5
|
+
* Domain: emails
|
|
6
|
+
*/
|
|
7
|
+
import type { Client } from "../runtime/transport";
|
|
8
|
+
import type { OrgEmailSendRequestContract, OrgEmailSendResponseContract, orgIdInPathRequired } from "../types";
|
|
9
|
+
export declare class EmailsApi {
|
|
10
|
+
private client;
|
|
11
|
+
constructor(client: Client);
|
|
12
|
+
/**
|
|
13
|
+
* Send an email to one organization member
|
|
14
|
+
* Sends an email to exactly one organization member identified by a recipient string that is interpreted as a digit-only userId or an email. The target must already belong to the provided organization.
|
|
15
|
+
*/
|
|
16
|
+
sendOrgEmail(params: {
|
|
17
|
+
path: {
|
|
18
|
+
orgId: orgIdInPathRequired;
|
|
19
|
+
};
|
|
20
|
+
headers?: Record<string, string>;
|
|
21
|
+
body: OrgEmailSendRequestContract;
|
|
22
|
+
}): Promise<OrgEmailSendResponseContract>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Emails API
|
|
4
|
+
*
|
|
5
|
+
* Generated from contract introspection
|
|
6
|
+
* Domain: emails
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.EmailsApi = void 0;
|
|
10
|
+
class EmailsApi {
|
|
11
|
+
constructor(client) {
|
|
12
|
+
this.client = client;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Send an email to one organization member
|
|
16
|
+
* Sends an email to exactly one organization member identified by a recipient string that is interpreted as a digit-only userId or an email. The target must already belong to the provided organization.
|
|
17
|
+
*/
|
|
18
|
+
async sendOrgEmail(params) {
|
|
19
|
+
return this.client.request({
|
|
20
|
+
method: "POST",
|
|
21
|
+
path: "/:orgId/email",
|
|
22
|
+
pathParams: params.path,
|
|
23
|
+
headers: params.headers,
|
|
24
|
+
body: params.body,
|
|
25
|
+
opId: "sendOrgEmail",
|
|
26
|
+
expectedContentType: "application/json",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.EmailsApi = EmailsApi;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -19,9 +19,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
19
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.TokensApi = exports.SystemApi = exports.OrgUsersApi = exports.HealthApi = void 0;
|
|
22
|
+
exports.TokensApi = exports.SystemApi = exports.OrgUsersApi = exports.HealthApi = exports.EmailsApi = void 0;
|
|
23
23
|
__exportStar(require("./runtime"), exports);
|
|
24
24
|
__exportStar(require("./types"), exports);
|
|
25
|
+
var EmailsApi_1 = require("./apis/EmailsApi");
|
|
26
|
+
Object.defineProperty(exports, "EmailsApi", { enumerable: true, get: function () { return EmailsApi_1.EmailsApi; } });
|
|
25
27
|
var HealthApi_1 = require("./apis/HealthApi");
|
|
26
28
|
Object.defineProperty(exports, "HealthApi", { enumerable: true, get: function () { return HealthApi_1.HealthApi; } });
|
|
27
29
|
var OrgUsersApi_1 = require("./apis/OrgUsersApi");
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface OrgEmailSendRequestContract {
|
|
2
|
+
subject: string;
|
|
3
|
+
body: string;
|
|
4
|
+
/**
|
|
5
|
+
* Recipient user id or email.
|
|
6
|
+
* Digit-only strings are treated as user ids.
|
|
7
|
+
* Strings containing `@` are treated as emails.
|
|
8
|
+
* The resolved user must already belong to the organization.
|
|
9
|
+
*/
|
|
10
|
+
recipient: string;
|
|
11
|
+
/**
|
|
12
|
+
* Optional variables that the mail rendering layer may use.
|
|
13
|
+
* Currently accepted for forward compatibility and not yet applied during sending.
|
|
14
|
+
*/
|
|
15
|
+
variables?: Record<string, string>;
|
|
16
|
+
/**
|
|
17
|
+
* Optional link variables that the mail rendering layer may use.
|
|
18
|
+
* Currently accepted for forward compatibility and not yet applied during sending.
|
|
19
|
+
*/
|
|
20
|
+
links?: Record<string, string>;
|
|
21
|
+
}
|
|
22
|
+
export interface OrgEmailSendResponseContract {
|
|
23
|
+
requestId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Organization member user id accepted for delivery.
|
|
26
|
+
*/
|
|
27
|
+
sentUserId: number;
|
|
28
|
+
/**
|
|
29
|
+
* Recipient email accepted for delivery when known.
|
|
30
|
+
*/
|
|
31
|
+
sentEmail?: string;
|
|
32
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Re-exports all Contract types used by the SDK
|
|
5
5
|
* Generated by SDK codegen
|
|
6
6
|
*/
|
|
7
|
+
export type { OrgEmailSendRequestContract, OrgEmailSendResponseContract } from "./email/email";
|
|
7
8
|
export type { OrgInviteContract, OrgUserAddRequestContract, OrgUserAddResponseContract, OrgUserContract, OrgUserListResponseContract } from "./org-user/org-user";
|
|
8
9
|
export * from "./shared/common";
|
|
9
10
|
export * from "./shared/enums";
|
package/package.json
CHANGED