@51eat/sdk 0.0.31 → 0.0.33
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/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/business/resources/auth/client/Client.d.ts +35 -0
- package/dist/cjs/api/resources/business/resources/auth/client/Client.js +115 -0
- package/dist/cjs/api/resources/business/resources/auth/client/requests/ForgotPasswordRequest.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/auth/client/requests/ForgotPasswordRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/auth/client/requests/ResetPasswordRequest.d.ts +15 -0
- package/dist/cjs/api/resources/business/resources/auth/client/requests/ResetPasswordRequest.js +3 -0
- package/dist/cjs/api/resources/business/resources/auth/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/auth/types/ForgotPasswordAuthResponse.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/auth/types/ForgotPasswordAuthResponse.js +10 -0
- package/dist/cjs/api/resources/business/resources/auth/types/ResetPasswordAuthResponse.d.ts +9 -0
- package/dist/cjs/api/resources/business/resources/auth/types/ResetPasswordAuthResponse.js +10 -0
- package/dist/cjs/api/resources/business/resources/auth/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/business/resources/auth/types/index.js +2 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/Client.d.ts +78 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/Client.js +282 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest.d.ts +9 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthResetPasswordRequest.d.ts +15 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthResetPasswordRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/requests/UpdateUserRequest.d.ts +11 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/requests/UpdateUserRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.d.ts +9 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/auth/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/DeleteAvatarAuthResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/DeleteAvatarAuthResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/ForgotPasswordAuthResponse.d.ts +9 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/ForgotPasswordAuthResponse.js +10 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/ResetPasswordAuthResponse.d.ts +9 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/ResetPasswordAuthResponse.js +10 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/UpdateProfileAuthResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/UpdateProfileAuthResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/UploadAvatarAuthResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/UploadAvatarAuthResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/index.d.ts +5 -0
- package/dist/cjs/api/resources/customer/resources/auth/types/index.js +5 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.ts +39 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.js +137 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.d.ts +20 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentReplyRequest.d.ts +18 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentReplyRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.js +3 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.js +2 -0
- package/dist/cjs/api/resources/customer/resources/discovery/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/customer/resources/discovery/client/Client.js +15 -5
- package/dist/cjs/api/resources/customer/resources/discovery/client/requests/CategoriesDiscoveryRequest.d.ts +8 -0
- package/dist/cjs/api/resources/customer/resources/discovery/client/requests/CategoriesDiscoveryRequest.js +3 -0
- package/dist/cjs/api/resources/customer/resources/discovery/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/CustomerReplyResponse.d.ts +5 -0
- package/dist/cjs/api/types/CustomerReplyResponse.js +3 -0
- package/dist/cjs/api/types/CustomerUser.d.ts +1 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/business/resources/auth/client/Client.d.mts +35 -0
- package/dist/esm/api/resources/business/resources/auth/client/Client.mjs +115 -0
- package/dist/esm/api/resources/business/resources/auth/client/requests/ForgotPasswordRequest.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/auth/client/requests/ForgotPasswordRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/auth/client/requests/ResetPasswordRequest.d.mts +15 -0
- package/dist/esm/api/resources/business/resources/auth/client/requests/ResetPasswordRequest.mjs +2 -0
- package/dist/esm/api/resources/business/resources/auth/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/auth/types/ForgotPasswordAuthResponse.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/auth/types/ForgotPasswordAuthResponse.mjs +7 -0
- package/dist/esm/api/resources/business/resources/auth/types/ResetPasswordAuthResponse.d.mts +9 -0
- package/dist/esm/api/resources/business/resources/auth/types/ResetPasswordAuthResponse.mjs +7 -0
- package/dist/esm/api/resources/business/resources/auth/types/index.d.mts +2 -0
- package/dist/esm/api/resources/business/resources/auth/types/index.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/auth/client/Client.d.mts +78 -0
- package/dist/esm/api/resources/customer/resources/auth/client/Client.mjs +282 -0
- package/dist/esm/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest.d.mts +9 -0
- package/dist/esm/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthResetPasswordRequest.d.mts +15 -0
- package/dist/esm/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthResetPasswordRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/auth/client/requests/UpdateUserRequest.d.mts +11 -0
- package/dist/esm/api/resources/customer/resources/auth/client/requests/UpdateUserRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.d.mts +9 -0
- package/dist/esm/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/auth/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/auth/types/DeleteAvatarAuthResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/auth/types/DeleteAvatarAuthResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/auth/types/ForgotPasswordAuthResponse.d.mts +9 -0
- package/dist/esm/api/resources/customer/resources/auth/types/ForgotPasswordAuthResponse.mjs +7 -0
- package/dist/esm/api/resources/customer/resources/auth/types/ResetPasswordAuthResponse.d.mts +9 -0
- package/dist/esm/api/resources/customer/resources/auth/types/ResetPasswordAuthResponse.mjs +7 -0
- package/dist/esm/api/resources/customer/resources/auth/types/UpdateProfileAuthResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/auth/types/UpdateProfileAuthResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/auth/types/UploadAvatarAuthResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/auth/types/UploadAvatarAuthResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/auth/types/index.d.mts +5 -0
- package/dist/esm/api/resources/customer/resources/auth/types/index.mjs +5 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.mts +39 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.mjs +137 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.d.mts +20 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentReplyRequest.d.mts +18 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentReplyRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.d.mts +4 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.d.mts +2 -0
- package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/discovery/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/customer/resources/discovery/client/Client.mjs +15 -5
- package/dist/esm/api/resources/customer/resources/discovery/client/requests/CategoriesDiscoveryRequest.d.mts +8 -0
- package/dist/esm/api/resources/customer/resources/discovery/client/requests/CategoriesDiscoveryRequest.mjs +2 -0
- package/dist/esm/api/resources/customer/resources/discovery/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/CustomerReplyResponse.d.mts +5 -0
- package/dist/esm/api/types/CustomerReplyResponse.mjs +2 -0
- package/dist/esm/api/types/CustomerUser.d.mts +1 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +683 -86
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
export * from "./ForgotPasswordAuthResponse.mjs";
|
|
1
2
|
export * from "./LoginAuthResponse.mjs";
|
|
2
3
|
export * from "./LogoutAllAuthResponse.mjs";
|
|
3
4
|
export * from "./LogoutAuthResponse.mjs";
|
|
4
5
|
export * from "./MeAuthResponse.mjs";
|
|
5
6
|
export * from "./RegisterAuthResponse.mjs";
|
|
7
|
+
export * from "./ResetPasswordAuthResponse.mjs";
|
|
6
8
|
export * from "./SwitchBusinessAuthResponse.mjs";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
export * from "./ForgotPasswordAuthResponse.mjs";
|
|
1
2
|
export * from "./LoginAuthResponse.mjs";
|
|
2
3
|
export * from "./LogoutAllAuthResponse.mjs";
|
|
3
4
|
export * from "./LogoutAuthResponse.mjs";
|
|
4
5
|
export * from "./MeAuthResponse.mjs";
|
|
5
6
|
export * from "./RegisterAuthResponse.mjs";
|
|
7
|
+
export * from "./ResetPasswordAuthResponse.mjs";
|
|
6
8
|
export * from "./SwitchBusinessAuthResponse.mjs";
|
|
@@ -49,6 +49,41 @@ export declare class AuthClient {
|
|
|
49
49
|
*/
|
|
50
50
|
login(request: FiveOneEat.customer.LoginCustomerRequest, requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.LoginAuthResponse>;
|
|
51
51
|
private __login;
|
|
52
|
+
/**
|
|
53
|
+
* Sends a password reset link to the provided email address if an account exists.
|
|
54
|
+
* Always returns a 200 response to prevent email enumeration.
|
|
55
|
+
*
|
|
56
|
+
* @param {FiveOneEat.customer.AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest} request
|
|
57
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
|
+
*
|
|
59
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* await client.customer.auth.forgotPassword({
|
|
63
|
+
* email: "email"
|
|
64
|
+
* })
|
|
65
|
+
*/
|
|
66
|
+
forgotPassword(request: FiveOneEat.customer.AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest, requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.ForgotPasswordAuthResponse>;
|
|
67
|
+
private __forgotPassword;
|
|
68
|
+
/**
|
|
69
|
+
* Validates the reset token and updates the user's password. All existing API tokens
|
|
70
|
+
* are revoked after a successful reset, requiring re-authentication on all devices.
|
|
71
|
+
*
|
|
72
|
+
* @param {FiveOneEat.customer.AppHttpRequestsApiV1CustomerAuthResetPasswordRequest} request
|
|
73
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.customer.auth.resetPassword({
|
|
79
|
+
* token: "token",
|
|
80
|
+
* email: "email",
|
|
81
|
+
* password: "password",
|
|
82
|
+
* password_confirmation: "password_confirmation"
|
|
83
|
+
* })
|
|
84
|
+
*/
|
|
85
|
+
resetPassword(request: FiveOneEat.customer.AppHttpRequestsApiV1CustomerAuthResetPasswordRequest, requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.ResetPasswordAuthResponse>;
|
|
86
|
+
private __resetPassword;
|
|
52
87
|
/**
|
|
53
88
|
* Retrieve the current authenticated user's profile information.
|
|
54
89
|
*
|
|
@@ -61,6 +96,49 @@ export declare class AuthClient {
|
|
|
61
96
|
*/
|
|
62
97
|
me(requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.MeAuthResponse>;
|
|
63
98
|
private __me;
|
|
99
|
+
/**
|
|
100
|
+
* Update name, email, and/or password. All fields are optional. To change the
|
|
101
|
+
* password, `current_password` must be provided alongside `password` and `password_confirmation`.
|
|
102
|
+
*
|
|
103
|
+
* @param {FiveOneEat.customer.UpdateUserRequest} request
|
|
104
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
105
|
+
*
|
|
106
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
107
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* await client.customer.auth.updateProfile()
|
|
111
|
+
*/
|
|
112
|
+
updateProfile(request?: FiveOneEat.customer.UpdateUserRequest, requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.UpdateProfileAuthResponse>;
|
|
113
|
+
private __updateProfile;
|
|
114
|
+
/**
|
|
115
|
+
* Upload and replace the avatar for the authenticated customer. Any existing avatar file will be deleted.
|
|
116
|
+
*
|
|
117
|
+
* @param {FiveOneEat.customer.UploadAvatarRequest} request
|
|
118
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
119
|
+
*
|
|
120
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
121
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* await client.customer.auth.uploadAvatar({
|
|
125
|
+
* avatar: "avatar"
|
|
126
|
+
* })
|
|
127
|
+
*/
|
|
128
|
+
uploadAvatar(request: FiveOneEat.customer.UploadAvatarRequest, requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.UploadAvatarAuthResponse>;
|
|
129
|
+
private __uploadAvatar;
|
|
130
|
+
/**
|
|
131
|
+
* Remove the avatar for the authenticated customer. Returns the updated user with a null avatar_url.
|
|
132
|
+
*
|
|
133
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
134
|
+
*
|
|
135
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
136
|
+
*
|
|
137
|
+
* @example
|
|
138
|
+
* await client.customer.auth.deleteAvatar()
|
|
139
|
+
*/
|
|
140
|
+
deleteAvatar(requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.DeleteAvatarAuthResponse>;
|
|
141
|
+
private __deleteAvatar;
|
|
64
142
|
/**
|
|
65
143
|
* Revoke the current API token and log out the user.
|
|
66
144
|
*
|
|
@@ -140,6 +140,121 @@ export class AuthClient {
|
|
|
140
140
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/login");
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Sends a password reset link to the provided email address if an account exists.
|
|
145
|
+
* Always returns a 200 response to prevent email enumeration.
|
|
146
|
+
*
|
|
147
|
+
* @param {FiveOneEat.customer.AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest} request
|
|
148
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
149
|
+
*
|
|
150
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* await client.customer.auth.forgotPassword({
|
|
154
|
+
* email: "email"
|
|
155
|
+
* })
|
|
156
|
+
*/
|
|
157
|
+
forgotPassword(request, requestOptions) {
|
|
158
|
+
return core.HttpResponsePromise.fromPromise(this.__forgotPassword(request, requestOptions));
|
|
159
|
+
}
|
|
160
|
+
__forgotPassword(request, requestOptions) {
|
|
161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
163
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
164
|
+
const _response = yield core.fetcher({
|
|
165
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/forgot-password"),
|
|
166
|
+
method: "POST",
|
|
167
|
+
headers: _headers,
|
|
168
|
+
contentType: "application/json",
|
|
169
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
170
|
+
requestType: "json",
|
|
171
|
+
body: request,
|
|
172
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
173
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
174
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
175
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
176
|
+
logging: this._options.logging,
|
|
177
|
+
});
|
|
178
|
+
if (_response.ok) {
|
|
179
|
+
return {
|
|
180
|
+
data: _response.body,
|
|
181
|
+
rawResponse: _response.rawResponse,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
if (_response.error.reason === "status-code") {
|
|
185
|
+
switch (_response.error.statusCode) {
|
|
186
|
+
case 422:
|
|
187
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
188
|
+
default:
|
|
189
|
+
throw new errors.FiveOneEatError({
|
|
190
|
+
statusCode: _response.error.statusCode,
|
|
191
|
+
body: _response.error.body,
|
|
192
|
+
rawResponse: _response.rawResponse,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/forgot-password");
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Validates the reset token and updates the user's password. All existing API tokens
|
|
201
|
+
* are revoked after a successful reset, requiring re-authentication on all devices.
|
|
202
|
+
*
|
|
203
|
+
* @param {FiveOneEat.customer.AppHttpRequestsApiV1CustomerAuthResetPasswordRequest} request
|
|
204
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
205
|
+
*
|
|
206
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* await client.customer.auth.resetPassword({
|
|
210
|
+
* token: "token",
|
|
211
|
+
* email: "email",
|
|
212
|
+
* password: "password",
|
|
213
|
+
* password_confirmation: "password_confirmation"
|
|
214
|
+
* })
|
|
215
|
+
*/
|
|
216
|
+
resetPassword(request, requestOptions) {
|
|
217
|
+
return core.HttpResponsePromise.fromPromise(this.__resetPassword(request, requestOptions));
|
|
218
|
+
}
|
|
219
|
+
__resetPassword(request, requestOptions) {
|
|
220
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
222
|
+
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
223
|
+
const _response = yield core.fetcher({
|
|
224
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/reset-password"),
|
|
225
|
+
method: "POST",
|
|
226
|
+
headers: _headers,
|
|
227
|
+
contentType: "application/json",
|
|
228
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
229
|
+
requestType: "json",
|
|
230
|
+
body: request,
|
|
231
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
232
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
233
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
234
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
235
|
+
logging: this._options.logging,
|
|
236
|
+
});
|
|
237
|
+
if (_response.ok) {
|
|
238
|
+
return {
|
|
239
|
+
data: _response.body,
|
|
240
|
+
rawResponse: _response.rawResponse,
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
if (_response.error.reason === "status-code") {
|
|
244
|
+
switch (_response.error.statusCode) {
|
|
245
|
+
case 422:
|
|
246
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
247
|
+
default:
|
|
248
|
+
throw new errors.FiveOneEatError({
|
|
249
|
+
statusCode: _response.error.statusCode,
|
|
250
|
+
body: _response.error.body,
|
|
251
|
+
rawResponse: _response.rawResponse,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/reset-password");
|
|
256
|
+
});
|
|
257
|
+
}
|
|
143
258
|
/**
|
|
144
259
|
* Retrieve the current authenticated user's profile information.
|
|
145
260
|
*
|
|
@@ -187,6 +302,173 @@ export class AuthClient {
|
|
|
187
302
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/user");
|
|
188
303
|
});
|
|
189
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* Update name, email, and/or password. All fields are optional. To change the
|
|
307
|
+
* password, `current_password` must be provided alongside `password` and `password_confirmation`.
|
|
308
|
+
*
|
|
309
|
+
* @param {FiveOneEat.customer.UpdateUserRequest} request
|
|
310
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
311
|
+
*
|
|
312
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
313
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
314
|
+
*
|
|
315
|
+
* @example
|
|
316
|
+
* await client.customer.auth.updateProfile()
|
|
317
|
+
*/
|
|
318
|
+
updateProfile(request = {}, requestOptions) {
|
|
319
|
+
return core.HttpResponsePromise.fromPromise(this.__updateProfile(request, requestOptions));
|
|
320
|
+
}
|
|
321
|
+
__updateProfile() {
|
|
322
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
323
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
324
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
325
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
326
|
+
const _response = yield core.fetcher({
|
|
327
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/user"),
|
|
328
|
+
method: "PUT",
|
|
329
|
+
headers: _headers,
|
|
330
|
+
contentType: "application/json",
|
|
331
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
332
|
+
requestType: "json",
|
|
333
|
+
body: request,
|
|
334
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
335
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
336
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
337
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
338
|
+
logging: this._options.logging,
|
|
339
|
+
});
|
|
340
|
+
if (_response.ok) {
|
|
341
|
+
return {
|
|
342
|
+
data: _response.body,
|
|
343
|
+
rawResponse: _response.rawResponse,
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
if (_response.error.reason === "status-code") {
|
|
347
|
+
switch (_response.error.statusCode) {
|
|
348
|
+
case 401:
|
|
349
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
350
|
+
case 422:
|
|
351
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
352
|
+
default:
|
|
353
|
+
throw new errors.FiveOneEatError({
|
|
354
|
+
statusCode: _response.error.statusCode,
|
|
355
|
+
body: _response.error.body,
|
|
356
|
+
rawResponse: _response.rawResponse,
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/customer/user");
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Upload and replace the avatar for the authenticated customer. Any existing avatar file will be deleted.
|
|
365
|
+
*
|
|
366
|
+
* @param {FiveOneEat.customer.UploadAvatarRequest} request
|
|
367
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
368
|
+
*
|
|
369
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
370
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
371
|
+
*
|
|
372
|
+
* @example
|
|
373
|
+
* await client.customer.auth.uploadAvatar({
|
|
374
|
+
* avatar: "avatar"
|
|
375
|
+
* })
|
|
376
|
+
*/
|
|
377
|
+
uploadAvatar(request, requestOptions) {
|
|
378
|
+
return core.HttpResponsePromise.fromPromise(this.__uploadAvatar(request, requestOptions));
|
|
379
|
+
}
|
|
380
|
+
__uploadAvatar(request, requestOptions) {
|
|
381
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
382
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
383
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
384
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
385
|
+
const _response = yield core.fetcher({
|
|
386
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/user/avatar"),
|
|
387
|
+
method: "POST",
|
|
388
|
+
headers: _headers,
|
|
389
|
+
contentType: "application/json",
|
|
390
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
391
|
+
requestType: "json",
|
|
392
|
+
body: request,
|
|
393
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
394
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
395
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
396
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
397
|
+
logging: this._options.logging,
|
|
398
|
+
});
|
|
399
|
+
if (_response.ok) {
|
|
400
|
+
return {
|
|
401
|
+
data: _response.body,
|
|
402
|
+
rawResponse: _response.rawResponse,
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
if (_response.error.reason === "status-code") {
|
|
406
|
+
switch (_response.error.statusCode) {
|
|
407
|
+
case 401:
|
|
408
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
409
|
+
case 422:
|
|
410
|
+
throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
411
|
+
default:
|
|
412
|
+
throw new errors.FiveOneEatError({
|
|
413
|
+
statusCode: _response.error.statusCode,
|
|
414
|
+
body: _response.error.body,
|
|
415
|
+
rawResponse: _response.rawResponse,
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/user/avatar");
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Remove the avatar for the authenticated customer. Returns the updated user with a null avatar_url.
|
|
424
|
+
*
|
|
425
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
426
|
+
*
|
|
427
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
428
|
+
*
|
|
429
|
+
* @example
|
|
430
|
+
* await client.customer.auth.deleteAvatar()
|
|
431
|
+
*/
|
|
432
|
+
deleteAvatar(requestOptions) {
|
|
433
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteAvatar(requestOptions));
|
|
434
|
+
}
|
|
435
|
+
__deleteAvatar(requestOptions) {
|
|
436
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
437
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
438
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
439
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
440
|
+
const _response = yield core.fetcher({
|
|
441
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "customer/user/avatar"),
|
|
442
|
+
method: "DELETE",
|
|
443
|
+
headers: _headers,
|
|
444
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
445
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
446
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
447
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
448
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
449
|
+
logging: this._options.logging,
|
|
450
|
+
});
|
|
451
|
+
if (_response.ok) {
|
|
452
|
+
return {
|
|
453
|
+
data: _response.body,
|
|
454
|
+
rawResponse: _response.rawResponse,
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
if (_response.error.reason === "status-code") {
|
|
458
|
+
switch (_response.error.statusCode) {
|
|
459
|
+
case 401:
|
|
460
|
+
throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
461
|
+
default:
|
|
462
|
+
throw new errors.FiveOneEatError({
|
|
463
|
+
statusCode: _response.error.statusCode,
|
|
464
|
+
body: _response.error.body,
|
|
465
|
+
rawResponse: _response.rawResponse,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/customer/user/avatar");
|
|
470
|
+
});
|
|
471
|
+
}
|
|
190
472
|
/**
|
|
191
473
|
* Revoke the current API token and log out the user.
|
|
192
474
|
*
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* token: "token",
|
|
5
|
+
* email: "email",
|
|
6
|
+
* password: "password",
|
|
7
|
+
* password_confirmation: "password_confirmation"
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface AppHttpRequestsApiV1CustomerAuthResetPasswordRequest {
|
|
11
|
+
token: string;
|
|
12
|
+
email: string;
|
|
13
|
+
password: string;
|
|
14
|
+
password_confirmation: string;
|
|
15
|
+
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export type { AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest } from "./AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest.mjs";
|
|
2
|
+
export type { AppHttpRequestsApiV1CustomerAuthResetPasswordRequest } from "./AppHttpRequestsApiV1CustomerAuthResetPasswordRequest.mjs";
|
|
1
3
|
export type { LoginCustomerRequest } from "./LoginCustomerRequest.mjs";
|
|
2
4
|
export type { LogoutAuthRequest } from "./LogoutAuthRequest.mjs";
|
|
3
5
|
export type { RegisterCustomerRequest } from "./RegisterCustomerRequest.mjs";
|
|
6
|
+
export type { UpdateUserRequest } from "./UpdateUserRequest.mjs";
|
|
7
|
+
export type { UploadAvatarRequest } from "./UploadAvatarRequest.mjs";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ForgotPasswordAuthResponse {
|
|
2
|
+
message: ForgotPasswordAuthResponse.Message;
|
|
3
|
+
}
|
|
4
|
+
export declare namespace ForgotPasswordAuthResponse {
|
|
5
|
+
const Message: {
|
|
6
|
+
readonly AResetLinkWillBeSentIfTheAccountExists: "A reset link will be sent if the account exists.";
|
|
7
|
+
};
|
|
8
|
+
type Message = (typeof Message)[keyof typeof Message];
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var ForgotPasswordAuthResponse;
|
|
3
|
+
(function (ForgotPasswordAuthResponse) {
|
|
4
|
+
ForgotPasswordAuthResponse.Message = {
|
|
5
|
+
AResetLinkWillBeSentIfTheAccountExists: "A reset link will be sent if the account exists.",
|
|
6
|
+
};
|
|
7
|
+
})(ForgotPasswordAuthResponse || (ForgotPasswordAuthResponse = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ResetPasswordAuthResponse {
|
|
2
|
+
message: ResetPasswordAuthResponse.Message;
|
|
3
|
+
}
|
|
4
|
+
export declare namespace ResetPasswordAuthResponse {
|
|
5
|
+
const Message: {
|
|
6
|
+
readonly YourPasswordHasBeenReset: "Your password has been reset.";
|
|
7
|
+
};
|
|
8
|
+
type Message = (typeof Message)[keyof typeof Message];
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var ResetPasswordAuthResponse;
|
|
3
|
+
(function (ResetPasswordAuthResponse) {
|
|
4
|
+
ResetPasswordAuthResponse.Message = {
|
|
5
|
+
YourPasswordHasBeenReset: "Your password has been reset.",
|
|
6
|
+
};
|
|
7
|
+
})(ResetPasswordAuthResponse || (ResetPasswordAuthResponse = {}));
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
export * from "./DeleteAvatarAuthResponse.mjs";
|
|
2
|
+
export * from "./ForgotPasswordAuthResponse.mjs";
|
|
1
3
|
export * from "./LoginAuthResponse.mjs";
|
|
2
4
|
export * from "./LogoutAllAuthResponse.mjs";
|
|
3
5
|
export * from "./LogoutAuthResponse.mjs";
|
|
4
6
|
export * from "./MeAuthResponse.mjs";
|
|
5
7
|
export * from "./RegisterAuthResponse.mjs";
|
|
8
|
+
export * from "./ResetPasswordAuthResponse.mjs";
|
|
9
|
+
export * from "./UpdateProfileAuthResponse.mjs";
|
|
10
|
+
export * from "./UploadAvatarAuthResponse.mjs";
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
export * from "./DeleteAvatarAuthResponse.mjs";
|
|
2
|
+
export * from "./ForgotPasswordAuthResponse.mjs";
|
|
1
3
|
export * from "./LoginAuthResponse.mjs";
|
|
2
4
|
export * from "./LogoutAllAuthResponse.mjs";
|
|
3
5
|
export * from "./LogoutAuthResponse.mjs";
|
|
4
6
|
export * from "./MeAuthResponse.mjs";
|
|
5
7
|
export * from "./RegisterAuthResponse.mjs";
|
|
8
|
+
export * from "./ResetPasswordAuthResponse.mjs";
|
|
9
|
+
export * from "./UpdateProfileAuthResponse.mjs";
|
|
10
|
+
export * from "./UploadAvatarAuthResponse.mjs";
|
|
@@ -47,4 +47,43 @@ export declare class CommentsClient {
|
|
|
47
47
|
*/
|
|
48
48
|
create(request: FiveOneEat.customer.businesses.bulletins.AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest, requestOptions?: CommentsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.businesses.bulletins.CreateCommentsResponse>;
|
|
49
49
|
private __create;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieve paginated replies for a top-level comment on a published bulletin.
|
|
52
|
+
*
|
|
53
|
+
* @param {FiveOneEat.customer.businesses.bulletins.ListRepliesCommentsRequest} request
|
|
54
|
+
* @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
55
|
+
*
|
|
56
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
57
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
58
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* await client.customer.businesses.bulletins.comments.listReplies({
|
|
62
|
+
* handle: "katzs-deli",
|
|
63
|
+
* bulletin: "01950e7d-1234-7000-abcd-ef0123456789",
|
|
64
|
+
* comment: "01950e7d-5678-7000-abcd-ef0123456789"
|
|
65
|
+
* })
|
|
66
|
+
*/
|
|
67
|
+
listReplies(request: FiveOneEat.customer.businesses.bulletins.ListRepliesCommentsRequest, requestOptions?: CommentsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.businesses.bulletins.ListRepliesCommentsResponse>;
|
|
68
|
+
private __listReplies;
|
|
69
|
+
/**
|
|
70
|
+
* Post a reply to a top-level comment on a published bulletin. Requires authentication.
|
|
71
|
+
*
|
|
72
|
+
* @param {FiveOneEat.customer.businesses.bulletins.StoreBulletinCommentReplyRequest} request
|
|
73
|
+
* @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link FiveOneEat.UnauthorizedError}
|
|
76
|
+
* @throws {@link FiveOneEat.NotFoundError}
|
|
77
|
+
* @throws {@link FiveOneEat.UnprocessableEntityError}
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* await client.customer.businesses.bulletins.comments.reply({
|
|
81
|
+
* handle: "katzs-deli",
|
|
82
|
+
* bulletin: "01950e7d-1234-7000-abcd-ef0123456789",
|
|
83
|
+
* comment: "01950e7d-5678-7000-abcd-ef0123456789",
|
|
84
|
+
* body: "body"
|
|
85
|
+
* })
|
|
86
|
+
*/
|
|
87
|
+
reply(request: FiveOneEat.customer.businesses.bulletins.StoreBulletinCommentReplyRequest, requestOptions?: CommentsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.businesses.bulletins.ReplyCommentsResponse>;
|
|
88
|
+
private __reply;
|
|
50
89
|
}
|