zorihq 0.9.0 → 0.10.1
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/CHANGELOG.md +17 -0
- package/README.md +18 -16
- package/package.json +1 -1
- package/resources/v1/analytics/analytics.d.mts +38 -0
- package/resources/v1/analytics/analytics.d.mts.map +1 -1
- package/resources/v1/analytics/analytics.d.ts +38 -0
- package/resources/v1/analytics/analytics.d.ts.map +1 -1
- package/resources/v1/analytics/analytics.js.map +1 -1
- package/resources/v1/analytics/analytics.mjs.map +1 -1
- package/resources/v1/index.d.mts +1 -2
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -2
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +1 -3
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +0 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/payment-providers.d.mts +42 -1
- package/resources/v1/payment-providers.d.mts.map +1 -1
- package/resources/v1/payment-providers.d.ts +42 -1
- package/resources/v1/payment-providers.d.ts.map +1 -1
- package/resources/v1/payment-providers.js +15 -0
- package/resources/v1/payment-providers.js.map +1 -1
- package/resources/v1/payment-providers.mjs +15 -0
- package/resources/v1/payment-providers.mjs.map +1 -1
- package/resources/v1/projects.d.mts +0 -3
- package/resources/v1/projects.d.mts.map +1 -1
- package/resources/v1/projects.d.ts +0 -3
- package/resources/v1/projects.d.ts.map +1 -1
- package/resources/v1/projects.js.map +1 -1
- package/resources/v1/projects.mjs.map +1 -1
- package/resources/v1/revenue/revenue.d.mts +0 -3
- package/resources/v1/revenue/revenue.d.mts.map +1 -1
- package/resources/v1/revenue/revenue.d.ts +0 -3
- package/resources/v1/revenue/revenue.d.ts.map +1 -1
- package/resources/v1/revenue/revenue.js.map +1 -1
- package/resources/v1/revenue/revenue.mjs.map +1 -1
- package/resources/v1/v1.d.mts +2 -6
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -6
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +0 -4
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +0 -4
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/analytics/analytics.ts +64 -0
- package/src/resources/v1/index.ts +3 -13
- package/src/resources/v1/payment-providers.ts +63 -0
- package/src/resources/v1/projects.ts +0 -5
- package/src/resources/v1/revenue/revenue.ts +0 -3
- package/src/resources/v1/v1.ts +6 -30
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/v1/auth.d.mts +0 -141
- package/resources/v1/auth.d.mts.map +0 -1
- package/resources/v1/auth.d.ts +0 -141
- package/resources/v1/auth.d.ts.map +0 -1
- package/resources/v1/auth.js +0 -95
- package/resources/v1/auth.js.map +0 -1
- package/resources/v1/auth.mjs +0 -91
- package/resources/v1/auth.mjs.map +0 -1
- package/src/resources/v1/auth.ts +0 -210
package/src/resources/v1/auth.ts
DELETED
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../core/resource';
|
|
4
|
-
import { APIPromise } from '../../core/api-promise';
|
|
5
|
-
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
-
|
|
7
|
-
export class Auth extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Reset password using recovery token received via email
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const messageResponse =
|
|
14
|
-
* await client.v1.auth.confirmPasswordRecovery({
|
|
15
|
-
* token: 'recovery-token-from-email',
|
|
16
|
-
* password: 'NewSecurePassword123!',
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
confirmPasswordRecovery(
|
|
21
|
-
body: AuthConfirmPasswordRecoveryParams,
|
|
22
|
-
options?: RequestOptions,
|
|
23
|
-
): APIPromise<MessageResponse> {
|
|
24
|
-
return this._client.post('/api/v1/auth/recover-confirm', { body, ...options });
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Authenticate a user with email and password
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* const authResponse = await client.v1.auth.login({
|
|
33
|
-
* email: 'user@example.com',
|
|
34
|
-
* password: 'SecurePassword123!',
|
|
35
|
-
* });
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
login(body: AuthLoginParams, options?: RequestOptions): APIPromise<AuthResponse> {
|
|
39
|
-
return this._client.post('/api/v1/auth/login', { body, ...options });
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Invalidate the current session and refresh token
|
|
44
|
-
*
|
|
45
|
-
* @example
|
|
46
|
-
* ```ts
|
|
47
|
-
* const messageResponse = await client.v1.auth.logout({
|
|
48
|
-
* refresh_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
|
|
49
|
-
* });
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
52
|
-
logout(body: AuthLogoutParams, options?: RequestOptions): APIPromise<MessageResponse> {
|
|
53
|
-
return this._client.post('/api/v1/auth/logout', { body, ...options });
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Exchange a valid refresh token for new access and refresh tokens
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* ```ts
|
|
61
|
-
* const authResponse =
|
|
62
|
-
* await client.v1.auth.refreshAccessToken({
|
|
63
|
-
* refresh_token:
|
|
64
|
-
* 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...',
|
|
65
|
-
* });
|
|
66
|
-
* ```
|
|
67
|
-
*/
|
|
68
|
-
refreshAccessToken(body: AuthRefreshAccessTokenParams, options?: RequestOptions): APIPromise<AuthResponse> {
|
|
69
|
-
return this._client.post('/api/v1/auth/refresh', { body, ...options });
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Create a new user account with an organization
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* ```ts
|
|
77
|
-
* const authResponse = await client.v1.auth.registerAccount({
|
|
78
|
-
* email: 'user@example.com',
|
|
79
|
-
* organization_name: 'Acme Corporation',
|
|
80
|
-
* password: 'SecurePassword123!',
|
|
81
|
-
* });
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
registerAccount(body: AuthRegisterAccountParams, options?: RequestOptions): APIPromise<AuthResponse> {
|
|
85
|
-
return this._client.post('/api/v1/auth/register', { body, ...options });
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Send a password recovery email to the registered email address
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* ```ts
|
|
93
|
-
* const messageResponse =
|
|
94
|
-
* await client.v1.auth.requestPasswordRecovery({
|
|
95
|
-
* email: 'user@example.com',
|
|
96
|
-
* });
|
|
97
|
-
* ```
|
|
98
|
-
*/
|
|
99
|
-
requestPasswordRecovery(
|
|
100
|
-
body: AuthRequestPasswordRecoveryParams,
|
|
101
|
-
options?: RequestOptions,
|
|
102
|
-
): APIPromise<MessageResponse> {
|
|
103
|
-
return this._client.post('/api/v1/auth/recover', { body, ...options });
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export interface Account {
|
|
108
|
-
email: string;
|
|
109
|
-
|
|
110
|
-
id?: string;
|
|
111
|
-
|
|
112
|
-
created_at?: string;
|
|
113
|
-
|
|
114
|
-
email_verified?: boolean;
|
|
115
|
-
|
|
116
|
-
first_name?: string;
|
|
117
|
-
|
|
118
|
-
last_name?: string;
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Relations
|
|
122
|
-
*/
|
|
123
|
-
organizations?: Array<Organization>;
|
|
124
|
-
|
|
125
|
-
updated_at?: string;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export interface AuthResponse {
|
|
129
|
-
access_token?: string;
|
|
130
|
-
|
|
131
|
-
account?: Account;
|
|
132
|
-
|
|
133
|
-
expires_in?: number;
|
|
134
|
-
|
|
135
|
-
organization?: Organization;
|
|
136
|
-
|
|
137
|
-
refresh_token?: string;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export interface MessageResponse {
|
|
141
|
-
message?: string;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export interface Organization {
|
|
145
|
-
name: string;
|
|
146
|
-
|
|
147
|
-
slug: string;
|
|
148
|
-
|
|
149
|
-
id?: string;
|
|
150
|
-
|
|
151
|
-
created_at?: string;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Relations
|
|
155
|
-
*/
|
|
156
|
-
members?: Array<Account>;
|
|
157
|
-
|
|
158
|
-
updated_at?: string;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export interface AuthConfirmPasswordRecoveryParams {
|
|
162
|
-
token: string;
|
|
163
|
-
|
|
164
|
-
password: string;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export interface AuthLoginParams {
|
|
168
|
-
email: string;
|
|
169
|
-
|
|
170
|
-
password: string;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
export interface AuthLogoutParams {
|
|
174
|
-
refresh_token: string;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export interface AuthRefreshAccessTokenParams {
|
|
178
|
-
refresh_token: string;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
export interface AuthRegisterAccountParams {
|
|
182
|
-
email: string;
|
|
183
|
-
|
|
184
|
-
organization_name: string;
|
|
185
|
-
|
|
186
|
-
password: string;
|
|
187
|
-
|
|
188
|
-
first_name?: string;
|
|
189
|
-
|
|
190
|
-
last_name?: string;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export interface AuthRequestPasswordRecoveryParams {
|
|
194
|
-
email: string;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export declare namespace Auth {
|
|
198
|
-
export {
|
|
199
|
-
type Account as Account,
|
|
200
|
-
type AuthResponse as AuthResponse,
|
|
201
|
-
type MessageResponse as MessageResponse,
|
|
202
|
-
type Organization as Organization,
|
|
203
|
-
type AuthConfirmPasswordRecoveryParams as AuthConfirmPasswordRecoveryParams,
|
|
204
|
-
type AuthLoginParams as AuthLoginParams,
|
|
205
|
-
type AuthLogoutParams as AuthLogoutParams,
|
|
206
|
-
type AuthRefreshAccessTokenParams as AuthRefreshAccessTokenParams,
|
|
207
|
-
type AuthRegisterAccountParams as AuthRegisterAccountParams,
|
|
208
|
-
type AuthRequestPasswordRecoveryParams as AuthRequestPasswordRecoveryParams,
|
|
209
|
-
};
|
|
210
|
-
}
|