mitra-interactions-sdk 1.0.60-beta.16 → 1.0.60-beta.17
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/index.d.mts +1 -78
- package/dist/index.d.ts +1 -78
- package/dist/index.js +35 -189
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -184
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -47,54 +47,6 @@ interface EmailLoginOptions {
|
|
|
47
47
|
/** Senha */
|
|
48
48
|
password: string;
|
|
49
49
|
}
|
|
50
|
-
interface EmailVerifyCodeOptions {
|
|
51
|
-
/** URL da página de auth. Opcional se já configurado via configureSdkMitra. */
|
|
52
|
-
authUrl?: string;
|
|
53
|
-
/** ID do projeto. Opcional se já configurado via configureSdkMitra. */
|
|
54
|
-
projectId?: number | string;
|
|
55
|
-
/** Email do usuário */
|
|
56
|
-
email: string;
|
|
57
|
-
/** Código de verificação de 6 dígitos */
|
|
58
|
-
code: string;
|
|
59
|
-
/** Senha do usuário (necessário para login automático após verificação) */
|
|
60
|
-
password: string;
|
|
61
|
-
}
|
|
62
|
-
interface EmailResendCodeOptions {
|
|
63
|
-
/** URL da página de auth. Opcional se já configurado via configureSdkMitra. */
|
|
64
|
-
authUrl?: string;
|
|
65
|
-
/** ID do projeto. Opcional se já configurado via configureSdkMitra. */
|
|
66
|
-
projectId?: number | string;
|
|
67
|
-
/** Email do usuário */
|
|
68
|
-
email: string;
|
|
69
|
-
}
|
|
70
|
-
interface SendPasswordResetCodeOptions {
|
|
71
|
-
/** Email do usuário que esqueceu a senha */
|
|
72
|
-
email: string;
|
|
73
|
-
/** ID do projeto. Default: do config global. */
|
|
74
|
-
projectId?: number | string;
|
|
75
|
-
/** URL da página de auth (opcional — usado pra derivar a API base). Default: do config global. */
|
|
76
|
-
authUrl?: string;
|
|
77
|
-
/** Override explícito da API base (ex: https://api0.mitraecp.com:1005). Default: derivado do authUrl. */
|
|
78
|
-
authApiURL?: string;
|
|
79
|
-
}
|
|
80
|
-
interface ValidatePasswordResetCodeOptions {
|
|
81
|
-
email: string;
|
|
82
|
-
/** Código de 6 dígitos recebido por email */
|
|
83
|
-
code: string;
|
|
84
|
-
projectId?: number | string;
|
|
85
|
-
authUrl?: string;
|
|
86
|
-
authApiURL?: string;
|
|
87
|
-
}
|
|
88
|
-
interface ResetPasswordOptions {
|
|
89
|
-
email: string;
|
|
90
|
-
/** Código de 6 dígitos recebido por email */
|
|
91
|
-
code: string;
|
|
92
|
-
/** Nova senha */
|
|
93
|
-
newPassword: string;
|
|
94
|
-
projectId?: number | string;
|
|
95
|
-
authUrl?: string;
|
|
96
|
-
authApiURL?: string;
|
|
97
|
-
}
|
|
98
50
|
interface ExecuteDataLoaderOptions {
|
|
99
51
|
projectId?: number | string;
|
|
100
52
|
dataLoaderId: number | string;
|
|
@@ -275,9 +227,6 @@ interface MitraInstance {
|
|
|
275
227
|
patchRecord(options: PatchRecordOptions): Promise<Record<string, any>>;
|
|
276
228
|
deleteRecord(options: DeleteRecordOptions): Promise<void>;
|
|
277
229
|
createRecordsBatch(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
|
|
278
|
-
sendPasswordResetCode(options: SendPasswordResetCodeOptions): Promise<Record<string, unknown>>;
|
|
279
|
-
validatePasswordResetCode(options: ValidatePasswordResetCodeOptions): Promise<Record<string, unknown>>;
|
|
280
|
-
resetPassword(options: ResetPasswordOptions): Promise<Record<string, unknown>>;
|
|
281
230
|
}
|
|
282
231
|
declare function createMitraInstance(initialConfig: Partial<MitraConfig>): MitraInstance;
|
|
283
232
|
|
|
@@ -330,8 +279,6 @@ declare function loginWithGoogleMitra(options?: LoginOptions): Promise<LoginResp
|
|
|
330
279
|
declare function loginWithMicrosoftMitra(options?: LoginOptions): Promise<LoginResponse>;
|
|
331
280
|
declare function emailSignupMitra(options: EmailSignupOptions): Promise<void>;
|
|
332
281
|
declare function emailLoginMitra(options: EmailLoginOptions): Promise<LoginResponse>;
|
|
333
|
-
declare function emailVerifyCodeMitra(options: EmailVerifyCodeOptions): Promise<LoginResponse>;
|
|
334
|
-
declare function emailResendCodeMitra(options: EmailResendCodeOptions): Promise<void>;
|
|
335
282
|
declare function refreshTokenSilently(authUrl: string, projectId: number | string): Promise<LoginResponse>;
|
|
336
283
|
/**
|
|
337
284
|
* Gera o JWT a partir do code do SSO (novo Mitra). O app lê codeMitra/stateMitra
|
|
@@ -344,30 +291,6 @@ declare function exchangeSsoCodeMitra(options: {
|
|
|
344
291
|
state: string;
|
|
345
292
|
}): Promise<LoginResponse>;
|
|
346
293
|
|
|
347
|
-
/**
|
|
348
|
-
* Mitra Interactions SDK - Password Reset (legacy backend)
|
|
349
|
-
*
|
|
350
|
-
* Endpoints públicos (sem auth) para fluxo de "esqueci minha senha".
|
|
351
|
-
* Usa um backend separado (porta 1005 ou 4133 dependendo do ambiente),
|
|
352
|
-
* resolvido a partir do `authUrl` configurado.
|
|
353
|
-
*/
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* POST /mitraspace/auth/resetPassword
|
|
357
|
-
* Envia um código de verificação por email para iniciar o fluxo de reset de senha.
|
|
358
|
-
*/
|
|
359
|
-
declare function sendPasswordResetCodeMitra(options: SendPasswordResetCodeOptions): Promise<Record<string, unknown>>;
|
|
360
|
-
/**
|
|
361
|
-
* POST /mitraspace/auth/resetPassword/validateCode
|
|
362
|
-
* Valida o código recebido por email (sem trocar a senha ainda).
|
|
363
|
-
*/
|
|
364
|
-
declare function validatePasswordResetCodeMitra(options: ValidatePasswordResetCodeOptions): Promise<Record<string, unknown>>;
|
|
365
|
-
/**
|
|
366
|
-
* PUT /mitraspace/auth/resetPassword
|
|
367
|
-
* Troca a senha usando email + código + nova senha.
|
|
368
|
-
*/
|
|
369
|
-
declare function resetPasswordMitra(options: ResetPasswordOptions): Promise<Record<string, unknown>>;
|
|
370
|
-
|
|
371
294
|
/**
|
|
372
295
|
* Mitra Interactions SDK - Services
|
|
373
296
|
*/
|
|
@@ -411,4 +334,4 @@ declare function patchRecordMitra(options: PatchRecordOptions): Promise<Record<s
|
|
|
411
334
|
declare function deleteRecordMitra(options: DeleteRecordOptions): Promise<void>;
|
|
412
335
|
declare function createRecordsBatchMitra(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
|
|
413
336
|
|
|
414
|
-
export { type CallIntegrationOptions, type CallIntegrationResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type DeleteRecordOptions, type EmailLoginOptions, type
|
|
337
|
+
export { type CallIntegrationOptions, type CallIntegrationResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type DeleteRecordOptions, type EmailLoginOptions, type EmailSignupOptions, type ExecuteDataLoaderOptions, type ExecuteDataLoaderResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type GetRecordOptions, type IntegrationResponse, type ListIntegrationsOptions, type ListRecordsOptions, type ListRecordsResponse, type LoginOptions, type LoginResponse, type MitraConfig, type MitraInstance, type PatchRecordOptions, type StopServerFunctionExecutionOptions, type StopServerFunctionExecutionResponse, type UpdateRecordOptions, callIntegrationMitra, configureSdkMitra, createMitraInstance, createRecordMitra, createRecordsBatchMitra, deleteRecordMitra, emailLoginMitra, emailSignupMitra, exchangeSsoCodeMitra, executeDataLoaderMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getConfig, getRecordMitra, listIntegrationsMitra, listRecordsMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, patchRecordMitra, refreshTokenSilently, resolveProjectId, stopServerFunctionExecutionMitra, updateRecordMitra };
|
package/dist/index.d.ts
CHANGED
|
@@ -47,54 +47,6 @@ interface EmailLoginOptions {
|
|
|
47
47
|
/** Senha */
|
|
48
48
|
password: string;
|
|
49
49
|
}
|
|
50
|
-
interface EmailVerifyCodeOptions {
|
|
51
|
-
/** URL da página de auth. Opcional se já configurado via configureSdkMitra. */
|
|
52
|
-
authUrl?: string;
|
|
53
|
-
/** ID do projeto. Opcional se já configurado via configureSdkMitra. */
|
|
54
|
-
projectId?: number | string;
|
|
55
|
-
/** Email do usuário */
|
|
56
|
-
email: string;
|
|
57
|
-
/** Código de verificação de 6 dígitos */
|
|
58
|
-
code: string;
|
|
59
|
-
/** Senha do usuário (necessário para login automático após verificação) */
|
|
60
|
-
password: string;
|
|
61
|
-
}
|
|
62
|
-
interface EmailResendCodeOptions {
|
|
63
|
-
/** URL da página de auth. Opcional se já configurado via configureSdkMitra. */
|
|
64
|
-
authUrl?: string;
|
|
65
|
-
/** ID do projeto. Opcional se já configurado via configureSdkMitra. */
|
|
66
|
-
projectId?: number | string;
|
|
67
|
-
/** Email do usuário */
|
|
68
|
-
email: string;
|
|
69
|
-
}
|
|
70
|
-
interface SendPasswordResetCodeOptions {
|
|
71
|
-
/** Email do usuário que esqueceu a senha */
|
|
72
|
-
email: string;
|
|
73
|
-
/** ID do projeto. Default: do config global. */
|
|
74
|
-
projectId?: number | string;
|
|
75
|
-
/** URL da página de auth (opcional — usado pra derivar a API base). Default: do config global. */
|
|
76
|
-
authUrl?: string;
|
|
77
|
-
/** Override explícito da API base (ex: https://api0.mitraecp.com:1005). Default: derivado do authUrl. */
|
|
78
|
-
authApiURL?: string;
|
|
79
|
-
}
|
|
80
|
-
interface ValidatePasswordResetCodeOptions {
|
|
81
|
-
email: string;
|
|
82
|
-
/** Código de 6 dígitos recebido por email */
|
|
83
|
-
code: string;
|
|
84
|
-
projectId?: number | string;
|
|
85
|
-
authUrl?: string;
|
|
86
|
-
authApiURL?: string;
|
|
87
|
-
}
|
|
88
|
-
interface ResetPasswordOptions {
|
|
89
|
-
email: string;
|
|
90
|
-
/** Código de 6 dígitos recebido por email */
|
|
91
|
-
code: string;
|
|
92
|
-
/** Nova senha */
|
|
93
|
-
newPassword: string;
|
|
94
|
-
projectId?: number | string;
|
|
95
|
-
authUrl?: string;
|
|
96
|
-
authApiURL?: string;
|
|
97
|
-
}
|
|
98
50
|
interface ExecuteDataLoaderOptions {
|
|
99
51
|
projectId?: number | string;
|
|
100
52
|
dataLoaderId: number | string;
|
|
@@ -275,9 +227,6 @@ interface MitraInstance {
|
|
|
275
227
|
patchRecord(options: PatchRecordOptions): Promise<Record<string, any>>;
|
|
276
228
|
deleteRecord(options: DeleteRecordOptions): Promise<void>;
|
|
277
229
|
createRecordsBatch(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
|
|
278
|
-
sendPasswordResetCode(options: SendPasswordResetCodeOptions): Promise<Record<string, unknown>>;
|
|
279
|
-
validatePasswordResetCode(options: ValidatePasswordResetCodeOptions): Promise<Record<string, unknown>>;
|
|
280
|
-
resetPassword(options: ResetPasswordOptions): Promise<Record<string, unknown>>;
|
|
281
230
|
}
|
|
282
231
|
declare function createMitraInstance(initialConfig: Partial<MitraConfig>): MitraInstance;
|
|
283
232
|
|
|
@@ -330,8 +279,6 @@ declare function loginWithGoogleMitra(options?: LoginOptions): Promise<LoginResp
|
|
|
330
279
|
declare function loginWithMicrosoftMitra(options?: LoginOptions): Promise<LoginResponse>;
|
|
331
280
|
declare function emailSignupMitra(options: EmailSignupOptions): Promise<void>;
|
|
332
281
|
declare function emailLoginMitra(options: EmailLoginOptions): Promise<LoginResponse>;
|
|
333
|
-
declare function emailVerifyCodeMitra(options: EmailVerifyCodeOptions): Promise<LoginResponse>;
|
|
334
|
-
declare function emailResendCodeMitra(options: EmailResendCodeOptions): Promise<void>;
|
|
335
282
|
declare function refreshTokenSilently(authUrl: string, projectId: number | string): Promise<LoginResponse>;
|
|
336
283
|
/**
|
|
337
284
|
* Gera o JWT a partir do code do SSO (novo Mitra). O app lê codeMitra/stateMitra
|
|
@@ -344,30 +291,6 @@ declare function exchangeSsoCodeMitra(options: {
|
|
|
344
291
|
state: string;
|
|
345
292
|
}): Promise<LoginResponse>;
|
|
346
293
|
|
|
347
|
-
/**
|
|
348
|
-
* Mitra Interactions SDK - Password Reset (legacy backend)
|
|
349
|
-
*
|
|
350
|
-
* Endpoints públicos (sem auth) para fluxo de "esqueci minha senha".
|
|
351
|
-
* Usa um backend separado (porta 1005 ou 4133 dependendo do ambiente),
|
|
352
|
-
* resolvido a partir do `authUrl` configurado.
|
|
353
|
-
*/
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* POST /mitraspace/auth/resetPassword
|
|
357
|
-
* Envia um código de verificação por email para iniciar o fluxo de reset de senha.
|
|
358
|
-
*/
|
|
359
|
-
declare function sendPasswordResetCodeMitra(options: SendPasswordResetCodeOptions): Promise<Record<string, unknown>>;
|
|
360
|
-
/**
|
|
361
|
-
* POST /mitraspace/auth/resetPassword/validateCode
|
|
362
|
-
* Valida o código recebido por email (sem trocar a senha ainda).
|
|
363
|
-
*/
|
|
364
|
-
declare function validatePasswordResetCodeMitra(options: ValidatePasswordResetCodeOptions): Promise<Record<string, unknown>>;
|
|
365
|
-
/**
|
|
366
|
-
* PUT /mitraspace/auth/resetPassword
|
|
367
|
-
* Troca a senha usando email + código + nova senha.
|
|
368
|
-
*/
|
|
369
|
-
declare function resetPasswordMitra(options: ResetPasswordOptions): Promise<Record<string, unknown>>;
|
|
370
|
-
|
|
371
294
|
/**
|
|
372
295
|
* Mitra Interactions SDK - Services
|
|
373
296
|
*/
|
|
@@ -411,4 +334,4 @@ declare function patchRecordMitra(options: PatchRecordOptions): Promise<Record<s
|
|
|
411
334
|
declare function deleteRecordMitra(options: DeleteRecordOptions): Promise<void>;
|
|
412
335
|
declare function createRecordsBatchMitra(options: CreateRecordsBatchOptions): Promise<Record<string, any>[]>;
|
|
413
336
|
|
|
414
|
-
export { type CallIntegrationOptions, type CallIntegrationResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type DeleteRecordOptions, type EmailLoginOptions, type
|
|
337
|
+
export { type CallIntegrationOptions, type CallIntegrationResponse, type CreateRecordOptions, type CreateRecordsBatchOptions, type DeleteRecordOptions, type EmailLoginOptions, type EmailSignupOptions, type ExecuteDataLoaderOptions, type ExecuteDataLoaderResponse, type ExecuteServerFunctionAsyncOptions, type ExecuteServerFunctionAsyncResponse, type ExecuteServerFunctionOptions, type ExecuteServerFunctionResponse, type GetRecordOptions, type IntegrationResponse, type ListIntegrationsOptions, type ListRecordsOptions, type ListRecordsResponse, type LoginOptions, type LoginResponse, type MitraConfig, type MitraInstance, type PatchRecordOptions, type StopServerFunctionExecutionOptions, type StopServerFunctionExecutionResponse, type UpdateRecordOptions, callIntegrationMitra, configureSdkMitra, createMitraInstance, createRecordMitra, createRecordsBatchMitra, deleteRecordMitra, emailLoginMitra, emailSignupMitra, exchangeSsoCodeMitra, executeDataLoaderMitra, executeServerFunctionAsyncMitra, executeServerFunctionMitra, getConfig, getRecordMitra, listIntegrationsMitra, listRecordsMitra, loginMitra, loginWithEmailMitra, loginWithGoogleMitra, loginWithMicrosoftMitra, patchRecordMitra, refreshTokenSilently, resolveProjectId, stopServerFunctionExecutionMitra, updateRecordMitra };
|