@extrahorizon/javascript-sdk 8.14.0-dev-196-5b15a56 → 8.14.0-dev-201-d4ed5b4
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/build/index.cjs.js +66 -27
- package/build/index.mjs +67 -28
- package/build/mockType.d.ts +24 -0
- package/build/services/auth/oauth2/accessTokens/index.d.ts +5 -0
- package/build/services/auth/oauth2/accessTokens/types.d.ts +61 -0
- package/build/services/auth/oauth2/authorizations/index.d.ts +5 -0
- package/build/services/auth/oauth2/authorizations/types.d.ts +67 -0
- package/build/services/auth/oauth2/refreshTokens/index.d.ts +5 -0
- package/build/services/auth/oauth2/refreshTokens/types.d.ts +72 -0
- package/build/services/auth/oauth2/types.d.ts +17 -134
- package/build/types/mockType.d.ts +24 -0
- package/build/types/services/auth/oauth2/accessTokens/index.d.ts +5 -0
- package/build/types/services/auth/oauth2/accessTokens/types.d.ts +61 -0
- package/build/types/services/auth/oauth2/authorizations/index.d.ts +5 -0
- package/build/types/services/auth/oauth2/authorizations/types.d.ts +67 -0
- package/build/types/services/auth/oauth2/refreshTokens/index.d.ts +5 -0
- package/build/types/services/auth/oauth2/refreshTokens/types.d.ts +72 -0
- package/build/types/services/auth/oauth2/types.d.ts +17 -134
- package/build/types/version.d.ts +1 -1
- package/build/version.d.ts +1 -1
- package/package.json +1 -1
package/build/index.cjs.js
CHANGED
|
@@ -972,6 +972,12 @@ exports.ApplicationType = void 0;
|
|
|
972
972
|
ApplicationType["oauth2"] = "oauth2";
|
|
973
973
|
})(exports.ApplicationType || (exports.ApplicationType = {}));
|
|
974
974
|
|
|
975
|
+
exports.PKCECodeMethods = void 0;
|
|
976
|
+
(function (PKCECodeMethods) {
|
|
977
|
+
PKCECodeMethods["PLAIN"] = "plain";
|
|
978
|
+
PKCECodeMethods["S256"] = "S256";
|
|
979
|
+
})(exports.PKCECodeMethods || (exports.PKCECodeMethods = {}));
|
|
980
|
+
|
|
975
981
|
exports.LoginAttemptStatus = void 0;
|
|
976
982
|
(function (LoginAttemptStatus) {
|
|
977
983
|
LoginAttemptStatus["SUCCESS"] = "success";
|
|
@@ -3373,7 +3379,7 @@ var applications = (client, httpWithAuth) => ({
|
|
|
3373
3379
|
});
|
|
3374
3380
|
|
|
3375
3381
|
var oauth1 = (client, httpWithAuth) => ({
|
|
3376
|
-
tokens: createTokenService
|
|
3382
|
+
tokens: createTokenService(client, httpWithAuth),
|
|
3377
3383
|
async generateSsoToken() {
|
|
3378
3384
|
return (await client.post(httpWithAuth, '/oauth1/ssoTokens/generate', {}))
|
|
3379
3385
|
.data;
|
|
@@ -3389,7 +3395,7 @@ var oauth1 = (client, httpWithAuth) => ({
|
|
|
3389
3395
|
.data;
|
|
3390
3396
|
},
|
|
3391
3397
|
});
|
|
3392
|
-
function createTokenService
|
|
3398
|
+
function createTokenService(client, httpWithAuth) {
|
|
3393
3399
|
return {
|
|
3394
3400
|
async find(options) {
|
|
3395
3401
|
return (await client.get(httpWithAuth, `/oauth1/tokens${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options)).data;
|
|
@@ -3411,41 +3417,59 @@ function createTokenService$1(client, httpWithAuth) {
|
|
|
3411
3417
|
};
|
|
3412
3418
|
}
|
|
3413
3419
|
|
|
3414
|
-
var
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
async createAuthorization(data, options) {
|
|
3418
|
-
return (await client.post(httpWithAuth, '/oauth2/authorizations', data, options)).data;
|
|
3420
|
+
var accessTokens = (client, httpWithAuth) => ({
|
|
3421
|
+
async find(options) {
|
|
3422
|
+
return (await client.get(httpWithAuth, `/oauth2/tokens${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options)).data;
|
|
3419
3423
|
},
|
|
3420
|
-
async
|
|
3421
|
-
|
|
3424
|
+
async findFirst(options) {
|
|
3425
|
+
const res = await this.find(options);
|
|
3426
|
+
return res.data[0];
|
|
3422
3427
|
},
|
|
3423
|
-
async
|
|
3424
|
-
|
|
3428
|
+
async findById(id, options) {
|
|
3429
|
+
const rqlWithId = rqlBuilder(options === null || options === void 0 ? void 0 : options.rql).eq('id', id).build();
|
|
3430
|
+
return await this.findFirst({ ...options, rql: rqlWithId });
|
|
3431
|
+
},
|
|
3432
|
+
async findAll(options) {
|
|
3433
|
+
return await findAllGeneric(this.find, options);
|
|
3434
|
+
},
|
|
3435
|
+
async remove(id) {
|
|
3436
|
+
return (await client.delete(httpWithAuth, `/oauth2/tokens/${id}`)).data;
|
|
3425
3437
|
},
|
|
3426
3438
|
});
|
|
3427
|
-
|
|
3439
|
+
|
|
3440
|
+
var authorizations = (client, httpWithAuth) => {
|
|
3441
|
+
async function find(options) {
|
|
3442
|
+
const result = await client.get(httpWithAuth, `/oauth2/authorizations${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options);
|
|
3443
|
+
return result.data;
|
|
3444
|
+
}
|
|
3428
3445
|
return {
|
|
3446
|
+
async create(data, options) {
|
|
3447
|
+
const result = await client.post(httpWithAuth, '/oauth2/authorizations', data, options);
|
|
3448
|
+
return result.data;
|
|
3449
|
+
},
|
|
3429
3450
|
async find(options) {
|
|
3430
|
-
|
|
3451
|
+
const result = await find(options);
|
|
3452
|
+
return addPagersFn(find, options, result);
|
|
3431
3453
|
},
|
|
3432
|
-
async
|
|
3433
|
-
|
|
3434
|
-
return res.data[0];
|
|
3454
|
+
async findAll(options) {
|
|
3455
|
+
return findAllGeneric(find, options);
|
|
3435
3456
|
},
|
|
3436
|
-
async
|
|
3437
|
-
const
|
|
3438
|
-
return
|
|
3457
|
+
async findFirst(options) {
|
|
3458
|
+
const result = await find(options);
|
|
3459
|
+
return result.data[0];
|
|
3439
3460
|
},
|
|
3440
|
-
async
|
|
3441
|
-
|
|
3461
|
+
async findById(authorizationId, options) {
|
|
3462
|
+
const rql = rqlBuilder(options === null || options === void 0 ? void 0 : options.rql).eq('id', authorizationId).build();
|
|
3463
|
+
return await this.findFirst({ ...options, rql });
|
|
3442
3464
|
},
|
|
3443
|
-
async remove(
|
|
3444
|
-
|
|
3465
|
+
async remove(authorizationId, options) {
|
|
3466
|
+
const result = await client.delete(httpWithAuth, `/oauth2/authorizations/${authorizationId}`, options);
|
|
3467
|
+
return result.data;
|
|
3445
3468
|
},
|
|
3446
3469
|
};
|
|
3447
|
-
}
|
|
3448
|
-
|
|
3470
|
+
};
|
|
3471
|
+
|
|
3472
|
+
var refreshTokens = (client, httpWithAuth) => {
|
|
3449
3473
|
async function find(options) {
|
|
3450
3474
|
const result = await client.get(httpWithAuth, `/oauth2/refreshTokens${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options);
|
|
3451
3475
|
return result.data;
|
|
@@ -3472,7 +3496,22 @@ function createRefreshTokenService(client, httpWithAuth) {
|
|
|
3472
3496
|
return result.data;
|
|
3473
3497
|
},
|
|
3474
3498
|
};
|
|
3475
|
-
}
|
|
3499
|
+
};
|
|
3500
|
+
|
|
3501
|
+
var oauth2 = (client, httpWithAuth) => ({
|
|
3502
|
+
tokens: accessTokens(client, httpWithAuth),
|
|
3503
|
+
refreshTokens: refreshTokens(client, httpWithAuth),
|
|
3504
|
+
authorizations: authorizations(client, httpWithAuth),
|
|
3505
|
+
async createAuthorization(data, options) {
|
|
3506
|
+
return (await client.post(httpWithAuth, '/oauth2/authorizations', data, options)).data;
|
|
3507
|
+
},
|
|
3508
|
+
async getAuthorizations(options) {
|
|
3509
|
+
return (await client.get(httpWithAuth, `/oauth2/authorizations${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options)).data;
|
|
3510
|
+
},
|
|
3511
|
+
async deleteAuthorization(authorizationId, options) {
|
|
3512
|
+
return (await client.delete(httpWithAuth, `/oauth2/authorizations/${authorizationId}`, options)).data;
|
|
3513
|
+
},
|
|
3514
|
+
});
|
|
3476
3515
|
|
|
3477
3516
|
var loginAttempts = (oidcClient, httpWithAuth) => {
|
|
3478
3517
|
async function query(options) {
|
|
@@ -5696,7 +5735,7 @@ const templatesV2Service = (httpWithAuth) => {
|
|
|
5696
5735
|
};
|
|
5697
5736
|
};
|
|
5698
5737
|
|
|
5699
|
-
const version = '8.14.0-dev-
|
|
5738
|
+
const version = '8.14.0-dev-201-d4ed5b4';
|
|
5700
5739
|
|
|
5701
5740
|
/**
|
|
5702
5741
|
* Create ExtraHorizon client.
|
package/build/index.mjs
CHANGED
|
@@ -942,6 +942,12 @@ var ApplicationType;
|
|
|
942
942
|
ApplicationType["oauth2"] = "oauth2";
|
|
943
943
|
})(ApplicationType || (ApplicationType = {}));
|
|
944
944
|
|
|
945
|
+
var PKCECodeMethods;
|
|
946
|
+
(function (PKCECodeMethods) {
|
|
947
|
+
PKCECodeMethods["PLAIN"] = "plain";
|
|
948
|
+
PKCECodeMethods["S256"] = "S256";
|
|
949
|
+
})(PKCECodeMethods || (PKCECodeMethods = {}));
|
|
950
|
+
|
|
945
951
|
var LoginAttemptStatus;
|
|
946
952
|
(function (LoginAttemptStatus) {
|
|
947
953
|
LoginAttemptStatus["SUCCESS"] = "success";
|
|
@@ -3343,7 +3349,7 @@ var applications = (client, httpWithAuth) => ({
|
|
|
3343
3349
|
});
|
|
3344
3350
|
|
|
3345
3351
|
var oauth1 = (client, httpWithAuth) => ({
|
|
3346
|
-
tokens: createTokenService
|
|
3352
|
+
tokens: createTokenService(client, httpWithAuth),
|
|
3347
3353
|
async generateSsoToken() {
|
|
3348
3354
|
return (await client.post(httpWithAuth, '/oauth1/ssoTokens/generate', {}))
|
|
3349
3355
|
.data;
|
|
@@ -3359,7 +3365,7 @@ var oauth1 = (client, httpWithAuth) => ({
|
|
|
3359
3365
|
.data;
|
|
3360
3366
|
},
|
|
3361
3367
|
});
|
|
3362
|
-
function createTokenService
|
|
3368
|
+
function createTokenService(client, httpWithAuth) {
|
|
3363
3369
|
return {
|
|
3364
3370
|
async find(options) {
|
|
3365
3371
|
return (await client.get(httpWithAuth, `/oauth1/tokens${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options)).data;
|
|
@@ -3381,41 +3387,59 @@ function createTokenService$1(client, httpWithAuth) {
|
|
|
3381
3387
|
};
|
|
3382
3388
|
}
|
|
3383
3389
|
|
|
3384
|
-
var
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
async createAuthorization(data, options) {
|
|
3388
|
-
return (await client.post(httpWithAuth, '/oauth2/authorizations', data, options)).data;
|
|
3390
|
+
var accessTokens = (client, httpWithAuth) => ({
|
|
3391
|
+
async find(options) {
|
|
3392
|
+
return (await client.get(httpWithAuth, `/oauth2/tokens${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options)).data;
|
|
3389
3393
|
},
|
|
3390
|
-
async
|
|
3391
|
-
|
|
3394
|
+
async findFirst(options) {
|
|
3395
|
+
const res = await this.find(options);
|
|
3396
|
+
return res.data[0];
|
|
3392
3397
|
},
|
|
3393
|
-
async
|
|
3394
|
-
|
|
3398
|
+
async findById(id, options) {
|
|
3399
|
+
const rqlWithId = rqlBuilder(options === null || options === void 0 ? void 0 : options.rql).eq('id', id).build();
|
|
3400
|
+
return await this.findFirst({ ...options, rql: rqlWithId });
|
|
3401
|
+
},
|
|
3402
|
+
async findAll(options) {
|
|
3403
|
+
return await findAllGeneric(this.find, options);
|
|
3404
|
+
},
|
|
3405
|
+
async remove(id) {
|
|
3406
|
+
return (await client.delete(httpWithAuth, `/oauth2/tokens/${id}`)).data;
|
|
3395
3407
|
},
|
|
3396
3408
|
});
|
|
3397
|
-
|
|
3409
|
+
|
|
3410
|
+
var authorizations = (client, httpWithAuth) => {
|
|
3411
|
+
async function find(options) {
|
|
3412
|
+
const result = await client.get(httpWithAuth, `/oauth2/authorizations${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options);
|
|
3413
|
+
return result.data;
|
|
3414
|
+
}
|
|
3398
3415
|
return {
|
|
3416
|
+
async create(data, options) {
|
|
3417
|
+
const result = await client.post(httpWithAuth, '/oauth2/authorizations', data, options);
|
|
3418
|
+
return result.data;
|
|
3419
|
+
},
|
|
3399
3420
|
async find(options) {
|
|
3400
|
-
|
|
3421
|
+
const result = await find(options);
|
|
3422
|
+
return addPagersFn(find, options, result);
|
|
3401
3423
|
},
|
|
3402
|
-
async
|
|
3403
|
-
|
|
3404
|
-
return res.data[0];
|
|
3424
|
+
async findAll(options) {
|
|
3425
|
+
return findAllGeneric(find, options);
|
|
3405
3426
|
},
|
|
3406
|
-
async
|
|
3407
|
-
const
|
|
3408
|
-
return
|
|
3427
|
+
async findFirst(options) {
|
|
3428
|
+
const result = await find(options);
|
|
3429
|
+
return result.data[0];
|
|
3409
3430
|
},
|
|
3410
|
-
async
|
|
3411
|
-
|
|
3431
|
+
async findById(authorizationId, options) {
|
|
3432
|
+
const rql = rqlBuilder(options === null || options === void 0 ? void 0 : options.rql).eq('id', authorizationId).build();
|
|
3433
|
+
return await this.findFirst({ ...options, rql });
|
|
3412
3434
|
},
|
|
3413
|
-
async remove(
|
|
3414
|
-
|
|
3435
|
+
async remove(authorizationId, options) {
|
|
3436
|
+
const result = await client.delete(httpWithAuth, `/oauth2/authorizations/${authorizationId}`, options);
|
|
3437
|
+
return result.data;
|
|
3415
3438
|
},
|
|
3416
3439
|
};
|
|
3417
|
-
}
|
|
3418
|
-
|
|
3440
|
+
};
|
|
3441
|
+
|
|
3442
|
+
var refreshTokens = (client, httpWithAuth) => {
|
|
3419
3443
|
async function find(options) {
|
|
3420
3444
|
const result = await client.get(httpWithAuth, `/oauth2/refreshTokens${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options);
|
|
3421
3445
|
return result.data;
|
|
@@ -3442,7 +3466,22 @@ function createRefreshTokenService(client, httpWithAuth) {
|
|
|
3442
3466
|
return result.data;
|
|
3443
3467
|
},
|
|
3444
3468
|
};
|
|
3445
|
-
}
|
|
3469
|
+
};
|
|
3470
|
+
|
|
3471
|
+
var oauth2 = (client, httpWithAuth) => ({
|
|
3472
|
+
tokens: accessTokens(client, httpWithAuth),
|
|
3473
|
+
refreshTokens: refreshTokens(client, httpWithAuth),
|
|
3474
|
+
authorizations: authorizations(client, httpWithAuth),
|
|
3475
|
+
async createAuthorization(data, options) {
|
|
3476
|
+
return (await client.post(httpWithAuth, '/oauth2/authorizations', data, options)).data;
|
|
3477
|
+
},
|
|
3478
|
+
async getAuthorizations(options) {
|
|
3479
|
+
return (await client.get(httpWithAuth, `/oauth2/authorizations${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options)).data;
|
|
3480
|
+
},
|
|
3481
|
+
async deleteAuthorization(authorizationId, options) {
|
|
3482
|
+
return (await client.delete(httpWithAuth, `/oauth2/authorizations/${authorizationId}`, options)).data;
|
|
3483
|
+
},
|
|
3484
|
+
});
|
|
3446
3485
|
|
|
3447
3486
|
var loginAttempts = (oidcClient, httpWithAuth) => {
|
|
3448
3487
|
async function query(options) {
|
|
@@ -5666,7 +5705,7 @@ const templatesV2Service = (httpWithAuth) => {
|
|
|
5666
5705
|
};
|
|
5667
5706
|
};
|
|
5668
5707
|
|
|
5669
|
-
const version = '8.14.0-dev-
|
|
5708
|
+
const version = '8.14.0-dev-201-d4ed5b4';
|
|
5670
5709
|
|
|
5671
5710
|
/**
|
|
5672
5711
|
* Create ExtraHorizon client.
|
|
@@ -5846,4 +5885,4 @@ const parseStoredCredentials = (fileContent) => exhCredentialsDecoder(fileConten
|
|
|
5846
5885
|
.filter(line => line.length === 2)
|
|
5847
5886
|
.reduce((memo, [key, value]) => ({ ...memo, [key]: value }), {}));
|
|
5848
5887
|
|
|
5849
|
-
export { AccessTokenExpiredError, AccessTokenUnknownError, ActionType, ActivationRequestLimitError, ActivationRequestTimeoutError, ActivationUnknownError, AlreadyActivatedError, ApiError, ApiFunctionRequestMethod, ApiRequestErrorType, AppStoreTransactionAlreadyLinked, ApplicationNotAuthenticatedError, ApplicationType, ApplicationUnknownError, AuthenticationError, AuthorizationCodeExpiredError, AuthorizationUnknownError, BadGatewayServerError, BadRequestError, BodyFormatError, CallbackNotValidError, Comorbidities, DefaultLocalizationMissingError, DisabledForOidcUsersError, DuplicateRequestError, EmailUnknownError, EmailUsedError, EmptyBodyError, ErrorClassMap, FieldFormatError, FieldType, FileTooLargeError, FirebaseConnectionError, FirebaseInvalidPlatformDataError, ForbiddenError, ForgotPasswordRequestLimitError, ForgotPasswordRequestTimeoutError, FunctionPermissionMode, Gender, GlobalPermissionName, IDFormatError, IllegalArgumentError, IllegalStateError, Impediments, IncorrectPinCodeError, InvalidClientError, InvalidCurrencyForProductPrice, InvalidGrantError, InvalidMfaCodeError, InvalidMfaTokenError, InvalidNonceError, InvalidPKCEError, InvalidPresenceTokenError, InvalidReceiptDataError, InvalidRequestError, InvalidRqlError, InvalidTokenError, JSONSchemaType, LambdaInvocationError, LocalizationKeyMissingError, LockedDocumentError, LoginAttemptStatus, LoginFreezeError, LoginTimeoutError, MedicationFrequency, MedicationUnit, MfaReattemptDelayError, MfaRequiredError, MissingPKCEVerifierError, MissingRequiredFieldsError, NewMFARequiredError, NewPasswordHashUnknownError, NewPasswordPinCodeUnknownError, NoConfiguredAppStoreProduct, NoConfiguredPlayStoreProduct, NoMatchingPlayStoreLinkedSubscription, NoPermissionError, NotActivatedError, NotEnoughMfaMethodsError, NotFoundError, OAuth2ClientIdError, OAuth2ClientSecretError, OAuth2ErrorClassMap, OAuth2LoginError, OAuth2MissingClientCredentialsError, OauthKeyError, OauthSignatureError, OauthTokenError, OidcIdTokenError, OidcInvalidAuthorizationCodeError, OidcProviderResponseError, OrderSchemaStatus, PasswordError, PaymentIntentCreationSchemaPaymentMethodType, PaymentIntentCreationSchemaSetupPaymentMethodReuse, PinCodesNotEnabledError, PlayStoreTransactionAlreadyLinked, ProfileActivity, ProfileAlreadyExistsError, QueuedMailStatus, RefreshTokenExpiredError, RefreshTokenUnknownError, RemoveFieldError, RequestAbortedError, ResourceAlreadyExistsError, ResourceUnknownError, Results, ServerError, ServiceNotFoundError, ServiceUnavailableError, ServiceUnreachableError, StatusInUseError, StripePaymentMethodError, StripeRequestError, SubscriptionEntitlementSource, SubscriptionEntitlementStatus, SubscriptionEntitlementStatusCategory, SubscriptionEventSource, SubscriptionEventType, SupportedLanguageCodes, TaskStatus, TemplateFillingError, TemplateResolvingError, TemplateSyntaxError, TokenNotDeleteableError, TokenPermission, TooManyFailedAttemptsError, UnauthorizedClientError, UnauthorizedError, UnauthorizedTokenError, UnknownReceiptTransactionError, UnsupportedGrantError, UnsupportedGrantTypeError, UnsupportedResponseTypeError, UserNotAuthenticatedError, createClient, createOAuth1Client, createOAuth2Client, createProxyClient, findAllGeneric, findAllIterator, getMockSdkOAuth2 as getMockSdk, getMockSdkOAuth1, getMockSdkOAuth2, getMockSdkProxy, parseGlobalPermissions, parseStoredCredentials, recursiveMap, rqlBuilder, rqlParser };
|
|
5888
|
+
export { AccessTokenExpiredError, AccessTokenUnknownError, ActionType, ActivationRequestLimitError, ActivationRequestTimeoutError, ActivationUnknownError, AlreadyActivatedError, ApiError, ApiFunctionRequestMethod, ApiRequestErrorType, AppStoreTransactionAlreadyLinked, ApplicationNotAuthenticatedError, ApplicationType, ApplicationUnknownError, AuthenticationError, AuthorizationCodeExpiredError, AuthorizationUnknownError, BadGatewayServerError, BadRequestError, BodyFormatError, CallbackNotValidError, Comorbidities, DefaultLocalizationMissingError, DisabledForOidcUsersError, DuplicateRequestError, EmailUnknownError, EmailUsedError, EmptyBodyError, ErrorClassMap, FieldFormatError, FieldType, FileTooLargeError, FirebaseConnectionError, FirebaseInvalidPlatformDataError, ForbiddenError, ForgotPasswordRequestLimitError, ForgotPasswordRequestTimeoutError, FunctionPermissionMode, Gender, GlobalPermissionName, IDFormatError, IllegalArgumentError, IllegalStateError, Impediments, IncorrectPinCodeError, InvalidClientError, InvalidCurrencyForProductPrice, InvalidGrantError, InvalidMfaCodeError, InvalidMfaTokenError, InvalidNonceError, InvalidPKCEError, InvalidPresenceTokenError, InvalidReceiptDataError, InvalidRequestError, InvalidRqlError, InvalidTokenError, JSONSchemaType, LambdaInvocationError, LocalizationKeyMissingError, LockedDocumentError, LoginAttemptStatus, LoginFreezeError, LoginTimeoutError, MedicationFrequency, MedicationUnit, MfaReattemptDelayError, MfaRequiredError, MissingPKCEVerifierError, MissingRequiredFieldsError, NewMFARequiredError, NewPasswordHashUnknownError, NewPasswordPinCodeUnknownError, NoConfiguredAppStoreProduct, NoConfiguredPlayStoreProduct, NoMatchingPlayStoreLinkedSubscription, NoPermissionError, NotActivatedError, NotEnoughMfaMethodsError, NotFoundError, OAuth2ClientIdError, OAuth2ClientSecretError, OAuth2ErrorClassMap, OAuth2LoginError, OAuth2MissingClientCredentialsError, OauthKeyError, OauthSignatureError, OauthTokenError, OidcIdTokenError, OidcInvalidAuthorizationCodeError, OidcProviderResponseError, OrderSchemaStatus, PKCECodeMethods, PasswordError, PaymentIntentCreationSchemaPaymentMethodType, PaymentIntentCreationSchemaSetupPaymentMethodReuse, PinCodesNotEnabledError, PlayStoreTransactionAlreadyLinked, ProfileActivity, ProfileAlreadyExistsError, QueuedMailStatus, RefreshTokenExpiredError, RefreshTokenUnknownError, RemoveFieldError, RequestAbortedError, ResourceAlreadyExistsError, ResourceUnknownError, Results, ServerError, ServiceNotFoundError, ServiceUnavailableError, ServiceUnreachableError, StatusInUseError, StripePaymentMethodError, StripeRequestError, SubscriptionEntitlementSource, SubscriptionEntitlementStatus, SubscriptionEntitlementStatusCategory, SubscriptionEventSource, SubscriptionEventType, SupportedLanguageCodes, TaskStatus, TemplateFillingError, TemplateResolvingError, TemplateSyntaxError, TokenNotDeleteableError, TokenPermission, TooManyFailedAttemptsError, UnauthorizedClientError, UnauthorizedError, UnauthorizedTokenError, UnknownReceiptTransactionError, UnsupportedGrantError, UnsupportedGrantTypeError, UnsupportedResponseTypeError, UserNotAuthenticatedError, createClient, createOAuth1Client, createOAuth2Client, createProxyClient, findAllGeneric, findAllIterator, getMockSdkOAuth2 as getMockSdk, getMockSdkOAuth1, getMockSdkOAuth2, getMockSdkProxy, parseGlobalPermissions, parseStoredCredentials, recursiveMap, rqlBuilder, rqlParser };
|
package/build/mockType.d.ts
CHANGED
|
@@ -524,6 +524,14 @@ export declare type MockClientOAuth1<MockFn> = {
|
|
|
524
524
|
findById: MockFn;
|
|
525
525
|
remove: MockFn;
|
|
526
526
|
};
|
|
527
|
+
authorizations: {
|
|
528
|
+
create: MockFn;
|
|
529
|
+
find: MockFn;
|
|
530
|
+
findAll: MockFn;
|
|
531
|
+
findFirst: MockFn;
|
|
532
|
+
findById: MockFn;
|
|
533
|
+
remove: MockFn;
|
|
534
|
+
};
|
|
527
535
|
createAuthorization: MockFn;
|
|
528
536
|
getAuthorizations: MockFn;
|
|
529
537
|
deleteAuthorization: MockFn;
|
|
@@ -1118,6 +1126,14 @@ export declare type MockClientOAuth2<MockFn> = {
|
|
|
1118
1126
|
findById: MockFn;
|
|
1119
1127
|
remove: MockFn;
|
|
1120
1128
|
};
|
|
1129
|
+
authorizations: {
|
|
1130
|
+
create: MockFn;
|
|
1131
|
+
find: MockFn;
|
|
1132
|
+
findAll: MockFn;
|
|
1133
|
+
findFirst: MockFn;
|
|
1134
|
+
findById: MockFn;
|
|
1135
|
+
remove: MockFn;
|
|
1136
|
+
};
|
|
1121
1137
|
createAuthorization: MockFn;
|
|
1122
1138
|
getAuthorizations: MockFn;
|
|
1123
1139
|
deleteAuthorization: MockFn;
|
|
@@ -1712,6 +1728,14 @@ export declare type MockClientProxy<MockFn> = {
|
|
|
1712
1728
|
findById: MockFn;
|
|
1713
1729
|
remove: MockFn;
|
|
1714
1730
|
};
|
|
1731
|
+
authorizations: {
|
|
1732
|
+
create: MockFn;
|
|
1733
|
+
find: MockFn;
|
|
1734
|
+
findAll: MockFn;
|
|
1735
|
+
findFirst: MockFn;
|
|
1736
|
+
findById: MockFn;
|
|
1737
|
+
remove: MockFn;
|
|
1738
|
+
};
|
|
1715
1739
|
createAuthorization: MockFn;
|
|
1716
1740
|
getAuthorizations: MockFn;
|
|
1717
1741
|
deleteAuthorization: MockFn;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HttpInstance } from '../../../../http/types';
|
|
2
|
+
import { HttpClient } from '../../../http-client';
|
|
3
|
+
import { AuthOauth2TokenService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => AuthOauth2TokenService;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { AffectedRecords, OptionsWithRql, PagedResult } from '../../../types';
|
|
2
|
+
export interface AuthOauth2TokenService {
|
|
3
|
+
/**
|
|
4
|
+
* Get a list of OAuth2 tokens
|
|
5
|
+
*
|
|
6
|
+
* Permission | Scope | Effect
|
|
7
|
+
* - | - | -
|
|
8
|
+
* none | | Can only see a list of OAuth2 tokens for this account
|
|
9
|
+
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
10
|
+
*/
|
|
11
|
+
find(options?: OptionsWithRql): Promise<PagedResult<OAuth2Token>>;
|
|
12
|
+
/**
|
|
13
|
+
* Get a list of OAuth2 tokens
|
|
14
|
+
*
|
|
15
|
+
* Permission | Scope | Effect
|
|
16
|
+
* - | - | -
|
|
17
|
+
* none | | Can only see a list of OAuth2 tokens for this account
|
|
18
|
+
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
19
|
+
*/
|
|
20
|
+
findAll(options?: OptionsWithRql): Promise<OAuth2Token[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Get the first OAuth2 token found
|
|
23
|
+
*
|
|
24
|
+
* Permission | Scope | Effect
|
|
25
|
+
* - | - | -
|
|
26
|
+
* none | | Can only see a list of OAuth2 tokens for this account
|
|
27
|
+
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
28
|
+
*/
|
|
29
|
+
findFirst(options?: OptionsWithRql): Promise<OAuth2Token | undefined>;
|
|
30
|
+
/**
|
|
31
|
+
* Get an oAuth2 token by its id
|
|
32
|
+
*
|
|
33
|
+
* Permission | Scope | Effect
|
|
34
|
+
* - | - | -
|
|
35
|
+
* none | | Can only see a list of OAuth2 tokens for this account
|
|
36
|
+
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
37
|
+
*/
|
|
38
|
+
findById(id: string, options?: OptionsWithRql): Promise<OAuth2Token | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Remove an oAuth2 token
|
|
41
|
+
*
|
|
42
|
+
* Permission | Scope | Effect
|
|
43
|
+
* - | - | -
|
|
44
|
+
* none | | Can only delete OAuth2 tokens for this account
|
|
45
|
+
* DELETE_AUTHORIZATIONS | global | Delete any OAuth2 tokens belonging to any user
|
|
46
|
+
*/
|
|
47
|
+
remove(id: string): Promise<AffectedRecords>;
|
|
48
|
+
}
|
|
49
|
+
export interface OAuth2Token {
|
|
50
|
+
id: string;
|
|
51
|
+
applicationId: string;
|
|
52
|
+
userId: string;
|
|
53
|
+
refreshTokenId: string;
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated `accessToken` will be removed from responses returned by listing endpoints in a future version.
|
|
56
|
+
*/
|
|
57
|
+
accessToken?: string;
|
|
58
|
+
expiryTimestamp: Date;
|
|
59
|
+
updateTimestamp: Date;
|
|
60
|
+
creationTimestamp: Date;
|
|
61
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HttpInstance } from '../../../../http/types';
|
|
2
|
+
import { HttpClient } from '../../../http-client';
|
|
3
|
+
import { OAuth2AuthorizationsService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => OAuth2AuthorizationsService;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { AffectedRecords, OptionsBase, OptionsWithRql, PagedResult } from '../../../types';
|
|
2
|
+
import { OAuth2Authorization, OAuth2AuthorizationCreation, OAuth2AuthorizationCreationResponse } from '../types';
|
|
3
|
+
export interface OAuth2AuthorizationsService {
|
|
4
|
+
/**
|
|
5
|
+
* Create an OAuth2 authorization
|
|
6
|
+
*
|
|
7
|
+
* Permission | Scope | Effect
|
|
8
|
+
* - | - | -
|
|
9
|
+
* none | | Everyone can use this endpoint
|
|
10
|
+
*/
|
|
11
|
+
create(data: OAuth2AuthorizationCreation, options?: OptionsBase): Promise<OAuth2AuthorizationCreationResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Get a list of OAuth2 authorizations
|
|
14
|
+
*
|
|
15
|
+
* Permission | Scope | Effect
|
|
16
|
+
* - | - | -
|
|
17
|
+
* none | | Can only see a list of OAuth2 authorizations for this account
|
|
18
|
+
* VIEW_AUTHORIZATIONS | global | See any authorizations belonging to any user
|
|
19
|
+
* @param options.rql Add filters to the requested list
|
|
20
|
+
* @returns PagedResult<OAuth2Authorization>
|
|
21
|
+
*/
|
|
22
|
+
find(options?: OptionsWithRql): Promise<PagedResult<OAuth2Authorization>>;
|
|
23
|
+
/**
|
|
24
|
+
* Get a list of OAuth2 authorizations
|
|
25
|
+
*
|
|
26
|
+
* Permission | Scope | Effect
|
|
27
|
+
* - | - | -
|
|
28
|
+
* none | | Can only see a list of OAuth2 authorizations for this account
|
|
29
|
+
* VIEW_AUTHORIZATIONS | global | See any authorizations belonging to any user
|
|
30
|
+
* @param options.rql Add filters to the requested list
|
|
31
|
+
* @returns OAuth2Authorization[]
|
|
32
|
+
*/
|
|
33
|
+
findAll(options?: OptionsWithRql): Promise<OAuth2Authorization[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Get the first OAuth2 authorization found
|
|
36
|
+
*
|
|
37
|
+
* Permission | Scope | Effect
|
|
38
|
+
* - | - | -
|
|
39
|
+
* none | | Can only see a list of OAuth2 authorizations for this account
|
|
40
|
+
* VIEW_AUTHORIZATIONS | global | See any authorizations belonging to any user
|
|
41
|
+
* @param options.rql Add filters to the requested list
|
|
42
|
+
* @returns {Promise<OAuth2Authorization | undefined>}
|
|
43
|
+
*/
|
|
44
|
+
findFirst(options?: OptionsWithRql): Promise<OAuth2Authorization | undefined>;
|
|
45
|
+
/**
|
|
46
|
+
* Get an OAuth2 authorization by its id
|
|
47
|
+
*
|
|
48
|
+
* Permission | Scope | Effect
|
|
49
|
+
* - | - | -
|
|
50
|
+
* none | | Can only see a list of OAuth2 authorizations for this account
|
|
51
|
+
* VIEW_AUTHORIZATIONS | global | See any authorizations belonging to any user
|
|
52
|
+
* @param authorizationId the authorization id
|
|
53
|
+
* @param options.rql Add filters to the requested list
|
|
54
|
+
* @returns {Promise<OAuth2Authorization | undefined>}
|
|
55
|
+
*/
|
|
56
|
+
findById(authorizationId: string, options?: OptionsWithRql): Promise<OAuth2Authorization | undefined>;
|
|
57
|
+
/**
|
|
58
|
+
* Delete an OAuth2 authorization
|
|
59
|
+
*
|
|
60
|
+
* Permission | Scope | Effect
|
|
61
|
+
* - | - | -
|
|
62
|
+
* none | | Can only delete OAuth2 authorizations for this account
|
|
63
|
+
* DELETE_AUTHORIZATIONS | global | Delete any authorizations belonging to any user
|
|
64
|
+
* @param authorizationId the Authorization id
|
|
65
|
+
*/
|
|
66
|
+
remove(authorizationId: string, options?: OptionsBase): Promise<AffectedRecords>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HttpInstance } from '../../../../http/types';
|
|
2
|
+
import { HttpClient } from '../../../http-client';
|
|
3
|
+
import { OAuth2RefreshTokenService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => OAuth2RefreshTokenService;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AffectedRecords, OptionsBase, OptionsWithRql, PagedResult } from '../../../types';
|
|
2
|
+
export interface OAuth2RefreshTokenService {
|
|
3
|
+
/**
|
|
4
|
+
* # Get a list of OAuth2 refresh tokens
|
|
5
|
+
*
|
|
6
|
+
* Permission | Scope | Effect
|
|
7
|
+
* - | - | -
|
|
8
|
+
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
9
|
+
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
10
|
+
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
11
|
+
* @param options.rql Add filters to the requested list
|
|
12
|
+
* @returns PagedResult<OAuth2RefreshToken>
|
|
13
|
+
*/
|
|
14
|
+
find(options?: OptionsWithRql): Promise<PagedResult<OAuth2RefreshToken>>;
|
|
15
|
+
/**
|
|
16
|
+
* Get a list of OAuth2 refresh tokens
|
|
17
|
+
*
|
|
18
|
+
* Permission | Scope | Effect
|
|
19
|
+
* - | - | -
|
|
20
|
+
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
21
|
+
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
22
|
+
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
23
|
+
* @param options.rql Add filters to the requested list
|
|
24
|
+
* @returns OAuth2RefreshToken[]
|
|
25
|
+
*/
|
|
26
|
+
findAll(options?: OptionsWithRql): Promise<OAuth2RefreshToken[]>;
|
|
27
|
+
/**
|
|
28
|
+
* Get the first OAuth2 refresh token found
|
|
29
|
+
*
|
|
30
|
+
* Permission | Scope | Effect
|
|
31
|
+
* - | - | -
|
|
32
|
+
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
33
|
+
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
34
|
+
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
35
|
+
* @param options.rql Add filters to the requested list
|
|
36
|
+
* @returns {Promise<OAuth2RefreshToken | undefined>}
|
|
37
|
+
*/
|
|
38
|
+
findFirst(options?: OptionsWithRql): Promise<OAuth2RefreshToken | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Get an oAuth2 refresh token by its id
|
|
41
|
+
*
|
|
42
|
+
* Permission | Scope | Effect
|
|
43
|
+
* - | - | -
|
|
44
|
+
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
45
|
+
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
46
|
+
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
47
|
+
* @param id the refresh token id
|
|
48
|
+
* @param options.rql Add filters to the requested list
|
|
49
|
+
* @returns {Promise<OAuth2RefreshToken | undefined>}
|
|
50
|
+
*/
|
|
51
|
+
findById(id: string, options?: OptionsWithRql): Promise<OAuth2RefreshToken | undefined>;
|
|
52
|
+
/**
|
|
53
|
+
* Delete an oAuth2 refresh token
|
|
54
|
+
*
|
|
55
|
+
* Permission | Scope | Effect
|
|
56
|
+
* - | - | -
|
|
57
|
+
* none | | Can only delete OAuth2 refresh tokens for this account
|
|
58
|
+
* DELETE_OAUTH2_REFRESH_TOKEN or DELETE_AUTHORIZATIONS | global | Delete any OAuth2 refresh tokens belonging to any user
|
|
59
|
+
* Using DELETE_AUTHORIZATIONS for this endpoint is deprecated; use DELETE_OAUTH2_REFRESH_TOKEN instead
|
|
60
|
+
* @param id the refresh token id
|
|
61
|
+
* @returns AffectedRecords
|
|
62
|
+
*/
|
|
63
|
+
remove(id: string, options?: OptionsBase): Promise<AffectedRecords>;
|
|
64
|
+
}
|
|
65
|
+
export interface OAuth2RefreshToken {
|
|
66
|
+
id: string;
|
|
67
|
+
applicationId: string;
|
|
68
|
+
userId: string;
|
|
69
|
+
expiryTimestamp: Date;
|
|
70
|
+
updateTimestamp: Date;
|
|
71
|
+
creationTimestamp: Date;
|
|
72
|
+
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { AffectedRecords, OptionsBase, OptionsWithRql, PagedResult } from '../../types';
|
|
2
|
+
import { AuthOauth2TokenService } from './accessTokens/types';
|
|
3
|
+
import { OAuth2AuthorizationsService } from './authorizations/types';
|
|
4
|
+
import { OAuth2RefreshTokenService } from './refreshTokens/types';
|
|
5
|
+
export * from './accessTokens/types';
|
|
6
|
+
export * from './authorizations/types';
|
|
7
|
+
export * from './refreshTokens/types';
|
|
2
8
|
export interface AuthOauth2Service {
|
|
3
9
|
tokens: AuthOauth2TokenService;
|
|
4
10
|
refreshTokens: OAuth2RefreshTokenService;
|
|
11
|
+
authorizations: OAuth2AuthorizationsService;
|
|
5
12
|
/**
|
|
6
13
|
* Create an OAuth2 authorization
|
|
7
14
|
*
|
|
@@ -12,6 +19,7 @@ export interface AuthOauth2Service {
|
|
|
12
19
|
* @throws {ApplicationUnknownError}
|
|
13
20
|
* @throws {CallbackNotValidError}
|
|
14
21
|
* @throws {UnsupportedResponseTypeError}
|
|
22
|
+
* @deprecated - Will be removed in a future version, please use `auth.oauth2.authorizations.create` instead
|
|
15
23
|
*/
|
|
16
24
|
createAuthorization(data: OAuth2AuthorizationCreation, options?: OptionsBase): Promise<OAuth2AuthorizationCreationResponse>;
|
|
17
25
|
/**
|
|
@@ -22,6 +30,7 @@ export interface AuthOauth2Service {
|
|
|
22
30
|
* none | | Can only see a list of OAuth2 authorizations for this account
|
|
23
31
|
* VIEW_AUTHORIZATIONS | global | See any authorizations belonging to any user
|
|
24
32
|
* @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/OAuth2/get_oauth2_authorizations
|
|
33
|
+
* @deprecated - Will be removed in a future version, please use `auth.oauth2.authorizations.find*` instead
|
|
25
34
|
*/
|
|
26
35
|
getAuthorizations(options?: OptionsWithRql): Promise<PagedResult<OAuth2Authorization>>;
|
|
27
36
|
/**
|
|
@@ -33,125 +42,16 @@ export interface AuthOauth2Service {
|
|
|
33
42
|
* DELETE_AUTHORIZATIONS | global | Delete any authorizations belonging to any user
|
|
34
43
|
* @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/OAuth2/delete_oauth2_authorizations__authorizationId_
|
|
35
44
|
* @throws {ResourceUnknownError}
|
|
45
|
+
* @deprecated - Will be removed in a future version, please use `auth.oauth2.authorizations.remove` instead
|
|
36
46
|
*/
|
|
37
47
|
deleteAuthorization(authorizationId: string, options?: OptionsWithRql): Promise<AffectedRecords>;
|
|
38
48
|
}
|
|
39
|
-
export interface AuthOauth2TokenService {
|
|
40
|
-
/**
|
|
41
|
-
* Get a list of OAuth2 tokens
|
|
42
|
-
*
|
|
43
|
-
* Permission | Scope | Effect
|
|
44
|
-
* - | - | -
|
|
45
|
-
* none | | Can only see a list of OAuth2 tokens for this account
|
|
46
|
-
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
47
|
-
*/
|
|
48
|
-
find(options?: OptionsWithRql): Promise<PagedResult<OAuth2Token>>;
|
|
49
|
-
/**
|
|
50
|
-
* Get a list of OAuth2 tokens
|
|
51
|
-
*
|
|
52
|
-
* Permission | Scope | Effect
|
|
53
|
-
* - | - | -
|
|
54
|
-
* none | | Can only see a list of OAuth2 tokens for this account
|
|
55
|
-
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
56
|
-
*/
|
|
57
|
-
findAll(options?: OptionsWithRql): Promise<OAuth2Token[]>;
|
|
58
|
-
/**
|
|
59
|
-
* Get the first OAuth2 token found
|
|
60
|
-
*
|
|
61
|
-
* Permission | Scope | Effect
|
|
62
|
-
* - | - | -
|
|
63
|
-
* none | | Can only see a list of OAuth2 tokens for this account
|
|
64
|
-
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
65
|
-
*/
|
|
66
|
-
findFirst(options?: OptionsWithRql): Promise<OAuth2Token | undefined>;
|
|
67
|
-
/**
|
|
68
|
-
* Get an oAuth2 token by its id
|
|
69
|
-
*
|
|
70
|
-
* Permission | Scope | Effect
|
|
71
|
-
* - | - | -
|
|
72
|
-
* none | | Can only see a list of OAuth2 tokens for this account
|
|
73
|
-
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
74
|
-
*/
|
|
75
|
-
findById(id: string, options?: OptionsWithRql): Promise<OAuth2Token | undefined>;
|
|
76
|
-
/**
|
|
77
|
-
* Remove an oAuth2 token
|
|
78
|
-
*
|
|
79
|
-
* Permission | Scope | Effect
|
|
80
|
-
* - | - | -
|
|
81
|
-
* none | | Can only delete OAuth2 tokens for this account
|
|
82
|
-
* DELETE_AUTHORIZATIONS | global | Delete any OAuth2 tokens belonging to any user
|
|
83
|
-
*/
|
|
84
|
-
remove(id: string): Promise<AffectedRecords>;
|
|
85
|
-
}
|
|
86
|
-
export interface OAuth2RefreshTokenService {
|
|
87
|
-
/**
|
|
88
|
-
* # Get a list of OAuth2 refresh tokens
|
|
89
|
-
*
|
|
90
|
-
* Permission | Scope | Effect
|
|
91
|
-
* - | - | -
|
|
92
|
-
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
93
|
-
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
94
|
-
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
95
|
-
* @param options.rql Add filters to the requested list
|
|
96
|
-
* @returns PagedResult<OAuth2RefreshToken>
|
|
97
|
-
*/
|
|
98
|
-
find(options?: OptionsWithRql): Promise<PagedResult<OAuth2RefreshToken>>;
|
|
99
|
-
/**
|
|
100
|
-
* Get a list of OAuth2 refresh tokens
|
|
101
|
-
*
|
|
102
|
-
* Permission | Scope | Effect
|
|
103
|
-
* - | - | -
|
|
104
|
-
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
105
|
-
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
106
|
-
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
107
|
-
* @param options.rql Add filters to the requested list
|
|
108
|
-
* @returns OAuth2RefreshToken[]
|
|
109
|
-
*/
|
|
110
|
-
findAll(options?: OptionsWithRql): Promise<OAuth2RefreshToken[]>;
|
|
111
|
-
/**
|
|
112
|
-
* Get the first OAuth2 refresh token found
|
|
113
|
-
*
|
|
114
|
-
* Permission | Scope | Effect
|
|
115
|
-
* - | - | -
|
|
116
|
-
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
117
|
-
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
118
|
-
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
119
|
-
* @param options.rql Add filters to the requested list
|
|
120
|
-
* @returns {Promise<OAuth2RefreshToken | undefined>}
|
|
121
|
-
*/
|
|
122
|
-
findFirst(options?: OptionsWithRql): Promise<OAuth2RefreshToken | undefined>;
|
|
123
|
-
/**
|
|
124
|
-
* Get an oAuth2 refresh token by its id
|
|
125
|
-
*
|
|
126
|
-
* Permission | Scope | Effect
|
|
127
|
-
* - | - | -
|
|
128
|
-
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
129
|
-
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
130
|
-
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
131
|
-
* @param id the refresh token id
|
|
132
|
-
* @param options.rql Add filters to the requested list
|
|
133
|
-
* @returns {Promise<OAuth2RefreshToken | undefined>}
|
|
134
|
-
*/
|
|
135
|
-
findById(id: string, options?: OptionsWithRql): Promise<OAuth2RefreshToken | undefined>;
|
|
136
|
-
/**
|
|
137
|
-
* Delete an oAuth2 refresh token
|
|
138
|
-
*
|
|
139
|
-
* Permission | Scope | Effect
|
|
140
|
-
* - | - | -
|
|
141
|
-
* none | | Can only delete OAuth2 refresh tokens for this account
|
|
142
|
-
* DELETE_OAUTH2_REFRESH_TOKEN or DELETE_AUTHORIZATIONS | global | Delete any OAuth2 refresh tokens belonging to any user
|
|
143
|
-
* Using DELETE_AUTHORIZATIONS for this endpoint is deprecated; use DELETE_OAUTH2_REFRESH_TOKEN instead
|
|
144
|
-
* @param id the refresh token id
|
|
145
|
-
* @returns AffectedRecords
|
|
146
|
-
*/
|
|
147
|
-
remove(id: string, options?: OptionsBase): Promise<AffectedRecords>;
|
|
148
|
-
}
|
|
149
49
|
export interface OAuth2AuthorizationCreation {
|
|
150
|
-
responseType:
|
|
50
|
+
responseType: 'code';
|
|
151
51
|
clientId: string;
|
|
152
52
|
redirectUri?: string;
|
|
153
53
|
state?: string;
|
|
154
|
-
codeChallengeMethod?:
|
|
54
|
+
codeChallengeMethod?: PKCECodeMethods;
|
|
155
55
|
codeChallenge?: string;
|
|
156
56
|
}
|
|
157
57
|
export interface OAuth2AuthorizationCreationResponse {
|
|
@@ -160,7 +60,7 @@ export interface OAuth2AuthorizationCreationResponse {
|
|
|
160
60
|
userId: string;
|
|
161
61
|
redirectUri: string;
|
|
162
62
|
state?: string;
|
|
163
|
-
codeChallengeMethod?:
|
|
63
|
+
codeChallengeMethod?: PKCECodeMethods;
|
|
164
64
|
codeChallenge?: string;
|
|
165
65
|
authorizationCode: string;
|
|
166
66
|
expiryTimestamp: Date;
|
|
@@ -173,7 +73,7 @@ export interface OAuth2Authorization {
|
|
|
173
73
|
userId: string;
|
|
174
74
|
redirectUri: string;
|
|
175
75
|
state?: string;
|
|
176
|
-
codeChallengeMethod?:
|
|
76
|
+
codeChallengeMethod?: PKCECodeMethods;
|
|
177
77
|
/**
|
|
178
78
|
@deprecated `codeChallenge` will be removed from responses returned by listing endpoints in a future version.
|
|
179
79
|
*/
|
|
@@ -186,24 +86,7 @@ export interface OAuth2Authorization {
|
|
|
186
86
|
updateTimestamp: Date;
|
|
187
87
|
creationTimestamp: Date;
|
|
188
88
|
}
|
|
189
|
-
export
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
userId: string;
|
|
193
|
-
refreshTokenId: string;
|
|
194
|
-
/**
|
|
195
|
-
* @deprecated `accessToken` will be removed from responses returned by listing endpoints in a future version.
|
|
196
|
-
*/
|
|
197
|
-
accessToken?: string;
|
|
198
|
-
expiryTimestamp: Date;
|
|
199
|
-
updateTimestamp: Date;
|
|
200
|
-
creationTimestamp: Date;
|
|
201
|
-
}
|
|
202
|
-
export interface OAuth2RefreshToken {
|
|
203
|
-
id: string;
|
|
204
|
-
applicationId: string;
|
|
205
|
-
userId: string;
|
|
206
|
-
expiryTimestamp: Date;
|
|
207
|
-
updateTimestamp: Date;
|
|
208
|
-
creationTimestamp: Date;
|
|
89
|
+
export declare enum PKCECodeMethods {
|
|
90
|
+
PLAIN = "plain",
|
|
91
|
+
S256 = "S256"
|
|
209
92
|
}
|
|
@@ -524,6 +524,14 @@ export declare type MockClientOAuth1<MockFn> = {
|
|
|
524
524
|
findById: MockFn;
|
|
525
525
|
remove: MockFn;
|
|
526
526
|
};
|
|
527
|
+
authorizations: {
|
|
528
|
+
create: MockFn;
|
|
529
|
+
find: MockFn;
|
|
530
|
+
findAll: MockFn;
|
|
531
|
+
findFirst: MockFn;
|
|
532
|
+
findById: MockFn;
|
|
533
|
+
remove: MockFn;
|
|
534
|
+
};
|
|
527
535
|
createAuthorization: MockFn;
|
|
528
536
|
getAuthorizations: MockFn;
|
|
529
537
|
deleteAuthorization: MockFn;
|
|
@@ -1118,6 +1126,14 @@ export declare type MockClientOAuth2<MockFn> = {
|
|
|
1118
1126
|
findById: MockFn;
|
|
1119
1127
|
remove: MockFn;
|
|
1120
1128
|
};
|
|
1129
|
+
authorizations: {
|
|
1130
|
+
create: MockFn;
|
|
1131
|
+
find: MockFn;
|
|
1132
|
+
findAll: MockFn;
|
|
1133
|
+
findFirst: MockFn;
|
|
1134
|
+
findById: MockFn;
|
|
1135
|
+
remove: MockFn;
|
|
1136
|
+
};
|
|
1121
1137
|
createAuthorization: MockFn;
|
|
1122
1138
|
getAuthorizations: MockFn;
|
|
1123
1139
|
deleteAuthorization: MockFn;
|
|
@@ -1712,6 +1728,14 @@ export declare type MockClientProxy<MockFn> = {
|
|
|
1712
1728
|
findById: MockFn;
|
|
1713
1729
|
remove: MockFn;
|
|
1714
1730
|
};
|
|
1731
|
+
authorizations: {
|
|
1732
|
+
create: MockFn;
|
|
1733
|
+
find: MockFn;
|
|
1734
|
+
findAll: MockFn;
|
|
1735
|
+
findFirst: MockFn;
|
|
1736
|
+
findById: MockFn;
|
|
1737
|
+
remove: MockFn;
|
|
1738
|
+
};
|
|
1715
1739
|
createAuthorization: MockFn;
|
|
1716
1740
|
getAuthorizations: MockFn;
|
|
1717
1741
|
deleteAuthorization: MockFn;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HttpInstance } from '../../../../http/types';
|
|
2
|
+
import { HttpClient } from '../../../http-client';
|
|
3
|
+
import { AuthOauth2TokenService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => AuthOauth2TokenService;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { AffectedRecords, OptionsWithRql, PagedResult } from '../../../types';
|
|
2
|
+
export interface AuthOauth2TokenService {
|
|
3
|
+
/**
|
|
4
|
+
* Get a list of OAuth2 tokens
|
|
5
|
+
*
|
|
6
|
+
* Permission | Scope | Effect
|
|
7
|
+
* - | - | -
|
|
8
|
+
* none | | Can only see a list of OAuth2 tokens for this account
|
|
9
|
+
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
10
|
+
*/
|
|
11
|
+
find(options?: OptionsWithRql): Promise<PagedResult<OAuth2Token>>;
|
|
12
|
+
/**
|
|
13
|
+
* Get a list of OAuth2 tokens
|
|
14
|
+
*
|
|
15
|
+
* Permission | Scope | Effect
|
|
16
|
+
* - | - | -
|
|
17
|
+
* none | | Can only see a list of OAuth2 tokens for this account
|
|
18
|
+
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
19
|
+
*/
|
|
20
|
+
findAll(options?: OptionsWithRql): Promise<OAuth2Token[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Get the first OAuth2 token found
|
|
23
|
+
*
|
|
24
|
+
* Permission | Scope | Effect
|
|
25
|
+
* - | - | -
|
|
26
|
+
* none | | Can only see a list of OAuth2 tokens for this account
|
|
27
|
+
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
28
|
+
*/
|
|
29
|
+
findFirst(options?: OptionsWithRql): Promise<OAuth2Token | undefined>;
|
|
30
|
+
/**
|
|
31
|
+
* Get an oAuth2 token by its id
|
|
32
|
+
*
|
|
33
|
+
* Permission | Scope | Effect
|
|
34
|
+
* - | - | -
|
|
35
|
+
* none | | Can only see a list of OAuth2 tokens for this account
|
|
36
|
+
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
37
|
+
*/
|
|
38
|
+
findById(id: string, options?: OptionsWithRql): Promise<OAuth2Token | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Remove an oAuth2 token
|
|
41
|
+
*
|
|
42
|
+
* Permission | Scope | Effect
|
|
43
|
+
* - | - | -
|
|
44
|
+
* none | | Can only delete OAuth2 tokens for this account
|
|
45
|
+
* DELETE_AUTHORIZATIONS | global | Delete any OAuth2 tokens belonging to any user
|
|
46
|
+
*/
|
|
47
|
+
remove(id: string): Promise<AffectedRecords>;
|
|
48
|
+
}
|
|
49
|
+
export interface OAuth2Token {
|
|
50
|
+
id: string;
|
|
51
|
+
applicationId: string;
|
|
52
|
+
userId: string;
|
|
53
|
+
refreshTokenId: string;
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated `accessToken` will be removed from responses returned by listing endpoints in a future version.
|
|
56
|
+
*/
|
|
57
|
+
accessToken?: string;
|
|
58
|
+
expiryTimestamp: Date;
|
|
59
|
+
updateTimestamp: Date;
|
|
60
|
+
creationTimestamp: Date;
|
|
61
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HttpInstance } from '../../../../http/types';
|
|
2
|
+
import { HttpClient } from '../../../http-client';
|
|
3
|
+
import { OAuth2AuthorizationsService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => OAuth2AuthorizationsService;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { AffectedRecords, OptionsBase, OptionsWithRql, PagedResult } from '../../../types';
|
|
2
|
+
import { OAuth2Authorization, OAuth2AuthorizationCreation, OAuth2AuthorizationCreationResponse } from '../types';
|
|
3
|
+
export interface OAuth2AuthorizationsService {
|
|
4
|
+
/**
|
|
5
|
+
* Create an OAuth2 authorization
|
|
6
|
+
*
|
|
7
|
+
* Permission | Scope | Effect
|
|
8
|
+
* - | - | -
|
|
9
|
+
* none | | Everyone can use this endpoint
|
|
10
|
+
*/
|
|
11
|
+
create(data: OAuth2AuthorizationCreation, options?: OptionsBase): Promise<OAuth2AuthorizationCreationResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Get a list of OAuth2 authorizations
|
|
14
|
+
*
|
|
15
|
+
* Permission | Scope | Effect
|
|
16
|
+
* - | - | -
|
|
17
|
+
* none | | Can only see a list of OAuth2 authorizations for this account
|
|
18
|
+
* VIEW_AUTHORIZATIONS | global | See any authorizations belonging to any user
|
|
19
|
+
* @param options.rql Add filters to the requested list
|
|
20
|
+
* @returns PagedResult<OAuth2Authorization>
|
|
21
|
+
*/
|
|
22
|
+
find(options?: OptionsWithRql): Promise<PagedResult<OAuth2Authorization>>;
|
|
23
|
+
/**
|
|
24
|
+
* Get a list of OAuth2 authorizations
|
|
25
|
+
*
|
|
26
|
+
* Permission | Scope | Effect
|
|
27
|
+
* - | - | -
|
|
28
|
+
* none | | Can only see a list of OAuth2 authorizations for this account
|
|
29
|
+
* VIEW_AUTHORIZATIONS | global | See any authorizations belonging to any user
|
|
30
|
+
* @param options.rql Add filters to the requested list
|
|
31
|
+
* @returns OAuth2Authorization[]
|
|
32
|
+
*/
|
|
33
|
+
findAll(options?: OptionsWithRql): Promise<OAuth2Authorization[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Get the first OAuth2 authorization found
|
|
36
|
+
*
|
|
37
|
+
* Permission | Scope | Effect
|
|
38
|
+
* - | - | -
|
|
39
|
+
* none | | Can only see a list of OAuth2 authorizations for this account
|
|
40
|
+
* VIEW_AUTHORIZATIONS | global | See any authorizations belonging to any user
|
|
41
|
+
* @param options.rql Add filters to the requested list
|
|
42
|
+
* @returns {Promise<OAuth2Authorization | undefined>}
|
|
43
|
+
*/
|
|
44
|
+
findFirst(options?: OptionsWithRql): Promise<OAuth2Authorization | undefined>;
|
|
45
|
+
/**
|
|
46
|
+
* Get an OAuth2 authorization by its id
|
|
47
|
+
*
|
|
48
|
+
* Permission | Scope | Effect
|
|
49
|
+
* - | - | -
|
|
50
|
+
* none | | Can only see a list of OAuth2 authorizations for this account
|
|
51
|
+
* VIEW_AUTHORIZATIONS | global | See any authorizations belonging to any user
|
|
52
|
+
* @param authorizationId the authorization id
|
|
53
|
+
* @param options.rql Add filters to the requested list
|
|
54
|
+
* @returns {Promise<OAuth2Authorization | undefined>}
|
|
55
|
+
*/
|
|
56
|
+
findById(authorizationId: string, options?: OptionsWithRql): Promise<OAuth2Authorization | undefined>;
|
|
57
|
+
/**
|
|
58
|
+
* Delete an OAuth2 authorization
|
|
59
|
+
*
|
|
60
|
+
* Permission | Scope | Effect
|
|
61
|
+
* - | - | -
|
|
62
|
+
* none | | Can only delete OAuth2 authorizations for this account
|
|
63
|
+
* DELETE_AUTHORIZATIONS | global | Delete any authorizations belonging to any user
|
|
64
|
+
* @param authorizationId the Authorization id
|
|
65
|
+
*/
|
|
66
|
+
remove(authorizationId: string, options?: OptionsBase): Promise<AffectedRecords>;
|
|
67
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { HttpInstance } from '../../../../http/types';
|
|
2
|
+
import { HttpClient } from '../../../http-client';
|
|
3
|
+
import { OAuth2RefreshTokenService } from './types';
|
|
4
|
+
declare const _default: (client: HttpClient, httpWithAuth: HttpInstance) => OAuth2RefreshTokenService;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AffectedRecords, OptionsBase, OptionsWithRql, PagedResult } from '../../../types';
|
|
2
|
+
export interface OAuth2RefreshTokenService {
|
|
3
|
+
/**
|
|
4
|
+
* # Get a list of OAuth2 refresh tokens
|
|
5
|
+
*
|
|
6
|
+
* Permission | Scope | Effect
|
|
7
|
+
* - | - | -
|
|
8
|
+
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
9
|
+
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
10
|
+
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
11
|
+
* @param options.rql Add filters to the requested list
|
|
12
|
+
* @returns PagedResult<OAuth2RefreshToken>
|
|
13
|
+
*/
|
|
14
|
+
find(options?: OptionsWithRql): Promise<PagedResult<OAuth2RefreshToken>>;
|
|
15
|
+
/**
|
|
16
|
+
* Get a list of OAuth2 refresh tokens
|
|
17
|
+
*
|
|
18
|
+
* Permission | Scope | Effect
|
|
19
|
+
* - | - | -
|
|
20
|
+
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
21
|
+
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
22
|
+
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
23
|
+
* @param options.rql Add filters to the requested list
|
|
24
|
+
* @returns OAuth2RefreshToken[]
|
|
25
|
+
*/
|
|
26
|
+
findAll(options?: OptionsWithRql): Promise<OAuth2RefreshToken[]>;
|
|
27
|
+
/**
|
|
28
|
+
* Get the first OAuth2 refresh token found
|
|
29
|
+
*
|
|
30
|
+
* Permission | Scope | Effect
|
|
31
|
+
* - | - | -
|
|
32
|
+
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
33
|
+
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
34
|
+
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
35
|
+
* @param options.rql Add filters to the requested list
|
|
36
|
+
* @returns {Promise<OAuth2RefreshToken | undefined>}
|
|
37
|
+
*/
|
|
38
|
+
findFirst(options?: OptionsWithRql): Promise<OAuth2RefreshToken | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Get an oAuth2 refresh token by its id
|
|
41
|
+
*
|
|
42
|
+
* Permission | Scope | Effect
|
|
43
|
+
* - | - | -
|
|
44
|
+
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
45
|
+
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
46
|
+
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
47
|
+
* @param id the refresh token id
|
|
48
|
+
* @param options.rql Add filters to the requested list
|
|
49
|
+
* @returns {Promise<OAuth2RefreshToken | undefined>}
|
|
50
|
+
*/
|
|
51
|
+
findById(id: string, options?: OptionsWithRql): Promise<OAuth2RefreshToken | undefined>;
|
|
52
|
+
/**
|
|
53
|
+
* Delete an oAuth2 refresh token
|
|
54
|
+
*
|
|
55
|
+
* Permission | Scope | Effect
|
|
56
|
+
* - | - | -
|
|
57
|
+
* none | | Can only delete OAuth2 refresh tokens for this account
|
|
58
|
+
* DELETE_OAUTH2_REFRESH_TOKEN or DELETE_AUTHORIZATIONS | global | Delete any OAuth2 refresh tokens belonging to any user
|
|
59
|
+
* Using DELETE_AUTHORIZATIONS for this endpoint is deprecated; use DELETE_OAUTH2_REFRESH_TOKEN instead
|
|
60
|
+
* @param id the refresh token id
|
|
61
|
+
* @returns AffectedRecords
|
|
62
|
+
*/
|
|
63
|
+
remove(id: string, options?: OptionsBase): Promise<AffectedRecords>;
|
|
64
|
+
}
|
|
65
|
+
export interface OAuth2RefreshToken {
|
|
66
|
+
id: string;
|
|
67
|
+
applicationId: string;
|
|
68
|
+
userId: string;
|
|
69
|
+
expiryTimestamp: Date;
|
|
70
|
+
updateTimestamp: Date;
|
|
71
|
+
creationTimestamp: Date;
|
|
72
|
+
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { AffectedRecords, OptionsBase, OptionsWithRql, PagedResult } from '../../types';
|
|
2
|
+
import { AuthOauth2TokenService } from './accessTokens/types';
|
|
3
|
+
import { OAuth2AuthorizationsService } from './authorizations/types';
|
|
4
|
+
import { OAuth2RefreshTokenService } from './refreshTokens/types';
|
|
5
|
+
export * from './accessTokens/types';
|
|
6
|
+
export * from './authorizations/types';
|
|
7
|
+
export * from './refreshTokens/types';
|
|
2
8
|
export interface AuthOauth2Service {
|
|
3
9
|
tokens: AuthOauth2TokenService;
|
|
4
10
|
refreshTokens: OAuth2RefreshTokenService;
|
|
11
|
+
authorizations: OAuth2AuthorizationsService;
|
|
5
12
|
/**
|
|
6
13
|
* Create an OAuth2 authorization
|
|
7
14
|
*
|
|
@@ -12,6 +19,7 @@ export interface AuthOauth2Service {
|
|
|
12
19
|
* @throws {ApplicationUnknownError}
|
|
13
20
|
* @throws {CallbackNotValidError}
|
|
14
21
|
* @throws {UnsupportedResponseTypeError}
|
|
22
|
+
* @deprecated - Will be removed in a future version, please use `auth.oauth2.authorizations.create` instead
|
|
15
23
|
*/
|
|
16
24
|
createAuthorization(data: OAuth2AuthorizationCreation, options?: OptionsBase): Promise<OAuth2AuthorizationCreationResponse>;
|
|
17
25
|
/**
|
|
@@ -22,6 +30,7 @@ export interface AuthOauth2Service {
|
|
|
22
30
|
* none | | Can only see a list of OAuth2 authorizations for this account
|
|
23
31
|
* VIEW_AUTHORIZATIONS | global | See any authorizations belonging to any user
|
|
24
32
|
* @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/OAuth2/get_oauth2_authorizations
|
|
33
|
+
* @deprecated - Will be removed in a future version, please use `auth.oauth2.authorizations.find*` instead
|
|
25
34
|
*/
|
|
26
35
|
getAuthorizations(options?: OptionsWithRql): Promise<PagedResult<OAuth2Authorization>>;
|
|
27
36
|
/**
|
|
@@ -33,125 +42,16 @@ export interface AuthOauth2Service {
|
|
|
33
42
|
* DELETE_AUTHORIZATIONS | global | Delete any authorizations belonging to any user
|
|
34
43
|
* @see https://swagger.extrahorizon.com/swagger-ui/?url=https://swagger.extrahorizon.com/auth-service/2.0.4-dev/openapi.yaml#/OAuth2/delete_oauth2_authorizations__authorizationId_
|
|
35
44
|
* @throws {ResourceUnknownError}
|
|
45
|
+
* @deprecated - Will be removed in a future version, please use `auth.oauth2.authorizations.remove` instead
|
|
36
46
|
*/
|
|
37
47
|
deleteAuthorization(authorizationId: string, options?: OptionsWithRql): Promise<AffectedRecords>;
|
|
38
48
|
}
|
|
39
|
-
export interface AuthOauth2TokenService {
|
|
40
|
-
/**
|
|
41
|
-
* Get a list of OAuth2 tokens
|
|
42
|
-
*
|
|
43
|
-
* Permission | Scope | Effect
|
|
44
|
-
* - | - | -
|
|
45
|
-
* none | | Can only see a list of OAuth2 tokens for this account
|
|
46
|
-
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
47
|
-
*/
|
|
48
|
-
find(options?: OptionsWithRql): Promise<PagedResult<OAuth2Token>>;
|
|
49
|
-
/**
|
|
50
|
-
* Get a list of OAuth2 tokens
|
|
51
|
-
*
|
|
52
|
-
* Permission | Scope | Effect
|
|
53
|
-
* - | - | -
|
|
54
|
-
* none | | Can only see a list of OAuth2 tokens for this account
|
|
55
|
-
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
56
|
-
*/
|
|
57
|
-
findAll(options?: OptionsWithRql): Promise<OAuth2Token[]>;
|
|
58
|
-
/**
|
|
59
|
-
* Get the first OAuth2 token found
|
|
60
|
-
*
|
|
61
|
-
* Permission | Scope | Effect
|
|
62
|
-
* - | - | -
|
|
63
|
-
* none | | Can only see a list of OAuth2 tokens for this account
|
|
64
|
-
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
65
|
-
*/
|
|
66
|
-
findFirst(options?: OptionsWithRql): Promise<OAuth2Token | undefined>;
|
|
67
|
-
/**
|
|
68
|
-
* Get an oAuth2 token by its id
|
|
69
|
-
*
|
|
70
|
-
* Permission | Scope | Effect
|
|
71
|
-
* - | - | -
|
|
72
|
-
* none | | Can only see a list of OAuth2 tokens for this account
|
|
73
|
-
* VIEW_AUTHORIZATIONS | global | See any OAuth2 tokens belonging to any user
|
|
74
|
-
*/
|
|
75
|
-
findById(id: string, options?: OptionsWithRql): Promise<OAuth2Token | undefined>;
|
|
76
|
-
/**
|
|
77
|
-
* Remove an oAuth2 token
|
|
78
|
-
*
|
|
79
|
-
* Permission | Scope | Effect
|
|
80
|
-
* - | - | -
|
|
81
|
-
* none | | Can only delete OAuth2 tokens for this account
|
|
82
|
-
* DELETE_AUTHORIZATIONS | global | Delete any OAuth2 tokens belonging to any user
|
|
83
|
-
*/
|
|
84
|
-
remove(id: string): Promise<AffectedRecords>;
|
|
85
|
-
}
|
|
86
|
-
export interface OAuth2RefreshTokenService {
|
|
87
|
-
/**
|
|
88
|
-
* # Get a list of OAuth2 refresh tokens
|
|
89
|
-
*
|
|
90
|
-
* Permission | Scope | Effect
|
|
91
|
-
* - | - | -
|
|
92
|
-
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
93
|
-
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
94
|
-
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
95
|
-
* @param options.rql Add filters to the requested list
|
|
96
|
-
* @returns PagedResult<OAuth2RefreshToken>
|
|
97
|
-
*/
|
|
98
|
-
find(options?: OptionsWithRql): Promise<PagedResult<OAuth2RefreshToken>>;
|
|
99
|
-
/**
|
|
100
|
-
* Get a list of OAuth2 refresh tokens
|
|
101
|
-
*
|
|
102
|
-
* Permission | Scope | Effect
|
|
103
|
-
* - | - | -
|
|
104
|
-
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
105
|
-
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
106
|
-
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
107
|
-
* @param options.rql Add filters to the requested list
|
|
108
|
-
* @returns OAuth2RefreshToken[]
|
|
109
|
-
*/
|
|
110
|
-
findAll(options?: OptionsWithRql): Promise<OAuth2RefreshToken[]>;
|
|
111
|
-
/**
|
|
112
|
-
* Get the first OAuth2 refresh token found
|
|
113
|
-
*
|
|
114
|
-
* Permission | Scope | Effect
|
|
115
|
-
* - | - | -
|
|
116
|
-
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
117
|
-
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
118
|
-
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
119
|
-
* @param options.rql Add filters to the requested list
|
|
120
|
-
* @returns {Promise<OAuth2RefreshToken | undefined>}
|
|
121
|
-
*/
|
|
122
|
-
findFirst(options?: OptionsWithRql): Promise<OAuth2RefreshToken | undefined>;
|
|
123
|
-
/**
|
|
124
|
-
* Get an oAuth2 refresh token by its id
|
|
125
|
-
*
|
|
126
|
-
* Permission | Scope | Effect
|
|
127
|
-
* - | - | -
|
|
128
|
-
* none | | Can only see a list of OAuth2 refresh tokens for this account
|
|
129
|
-
* VIEW_OAUTH2_REFRESH_TOKENS or VIEW_AUTHORIZATIONS | global | Can see a list of OAuth2 refresh tokens for any account
|
|
130
|
-
* Using VIEW_AUTHORIZATIONS for this endpoint is deprecated; use VIEW_OAUTH2_REFRESH_TOKENS instead
|
|
131
|
-
* @param id the refresh token id
|
|
132
|
-
* @param options.rql Add filters to the requested list
|
|
133
|
-
* @returns {Promise<OAuth2RefreshToken | undefined>}
|
|
134
|
-
*/
|
|
135
|
-
findById(id: string, options?: OptionsWithRql): Promise<OAuth2RefreshToken | undefined>;
|
|
136
|
-
/**
|
|
137
|
-
* Delete an oAuth2 refresh token
|
|
138
|
-
*
|
|
139
|
-
* Permission | Scope | Effect
|
|
140
|
-
* - | - | -
|
|
141
|
-
* none | | Can only delete OAuth2 refresh tokens for this account
|
|
142
|
-
* DELETE_OAUTH2_REFRESH_TOKEN or DELETE_AUTHORIZATIONS | global | Delete any OAuth2 refresh tokens belonging to any user
|
|
143
|
-
* Using DELETE_AUTHORIZATIONS for this endpoint is deprecated; use DELETE_OAUTH2_REFRESH_TOKEN instead
|
|
144
|
-
* @param id the refresh token id
|
|
145
|
-
* @returns AffectedRecords
|
|
146
|
-
*/
|
|
147
|
-
remove(id: string, options?: OptionsBase): Promise<AffectedRecords>;
|
|
148
|
-
}
|
|
149
49
|
export interface OAuth2AuthorizationCreation {
|
|
150
|
-
responseType:
|
|
50
|
+
responseType: 'code';
|
|
151
51
|
clientId: string;
|
|
152
52
|
redirectUri?: string;
|
|
153
53
|
state?: string;
|
|
154
|
-
codeChallengeMethod?:
|
|
54
|
+
codeChallengeMethod?: PKCECodeMethods;
|
|
155
55
|
codeChallenge?: string;
|
|
156
56
|
}
|
|
157
57
|
export interface OAuth2AuthorizationCreationResponse {
|
|
@@ -160,7 +60,7 @@ export interface OAuth2AuthorizationCreationResponse {
|
|
|
160
60
|
userId: string;
|
|
161
61
|
redirectUri: string;
|
|
162
62
|
state?: string;
|
|
163
|
-
codeChallengeMethod?:
|
|
63
|
+
codeChallengeMethod?: PKCECodeMethods;
|
|
164
64
|
codeChallenge?: string;
|
|
165
65
|
authorizationCode: string;
|
|
166
66
|
expiryTimestamp: Date;
|
|
@@ -173,7 +73,7 @@ export interface OAuth2Authorization {
|
|
|
173
73
|
userId: string;
|
|
174
74
|
redirectUri: string;
|
|
175
75
|
state?: string;
|
|
176
|
-
codeChallengeMethod?:
|
|
76
|
+
codeChallengeMethod?: PKCECodeMethods;
|
|
177
77
|
/**
|
|
178
78
|
@deprecated `codeChallenge` will be removed from responses returned by listing endpoints in a future version.
|
|
179
79
|
*/
|
|
@@ -186,24 +86,7 @@ export interface OAuth2Authorization {
|
|
|
186
86
|
updateTimestamp: Date;
|
|
187
87
|
creationTimestamp: Date;
|
|
188
88
|
}
|
|
189
|
-
export
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
userId: string;
|
|
193
|
-
refreshTokenId: string;
|
|
194
|
-
/**
|
|
195
|
-
* @deprecated `accessToken` will be removed from responses returned by listing endpoints in a future version.
|
|
196
|
-
*/
|
|
197
|
-
accessToken?: string;
|
|
198
|
-
expiryTimestamp: Date;
|
|
199
|
-
updateTimestamp: Date;
|
|
200
|
-
creationTimestamp: Date;
|
|
201
|
-
}
|
|
202
|
-
export interface OAuth2RefreshToken {
|
|
203
|
-
id: string;
|
|
204
|
-
applicationId: string;
|
|
205
|
-
userId: string;
|
|
206
|
-
expiryTimestamp: Date;
|
|
207
|
-
updateTimestamp: Date;
|
|
208
|
-
creationTimestamp: Date;
|
|
89
|
+
export declare enum PKCECodeMethods {
|
|
90
|
+
PLAIN = "plain",
|
|
91
|
+
S256 = "S256"
|
|
209
92
|
}
|
package/build/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.14.0-dev-
|
|
1
|
+
export declare const version = "8.14.0-dev-201-d4ed5b4";
|
package/build/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.14.0-dev-
|
|
1
|
+
export declare const version = "8.14.0-dev-201-d4ed5b4";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extrahorizon/javascript-sdk",
|
|
3
|
-
"version": "8.14.0-dev-
|
|
3
|
+
"version": "8.14.0-dev-201-d4ed5b4",
|
|
4
4
|
"description": "This package serves as a JavaScript wrapper around all Extra Horizon cloud services.",
|
|
5
5
|
"main": "build/index.cjs.js",
|
|
6
6
|
"types": "build/types/index.d.ts",
|