@smartbills/sdk 0.0.2-alpha.22 → 0.0.2-alpha.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/packages/sdk/package.json.cjs +1 -1
- package/dist/cjs/services/oauth/OAuthService.cjs +4 -3
- package/dist/cjs/services/oauth/OAuthService.cjs.map +1 -1
- package/dist/esm/packages/sdk/package.json.mjs +1 -1
- package/dist/esm/services/oauth/OAuthService.mjs +4 -3
- package/dist/esm/services/oauth/OAuthService.mjs.map +1 -1
- package/dist/umd/index.js +5 -4
- package/dist/umd/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -16,13 +16,14 @@ class OAuthService extends SBService.SBService {
|
|
|
16
16
|
async getAuthorizationCode(request) {
|
|
17
17
|
const response = await super.execute(null, {
|
|
18
18
|
url: "/connect/authorize",
|
|
19
|
-
data: index.default.stringify(request),
|
|
20
19
|
params: {
|
|
21
|
-
response_mode: "form_post"
|
|
20
|
+
response_mode: "form_post",
|
|
21
|
+
...request
|
|
22
22
|
},
|
|
23
23
|
headers: {
|
|
24
24
|
"content-type": "application/x-www-form-urlencoded"
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
|
+
withCredentials: true
|
|
26
27
|
});
|
|
27
28
|
return new AuthorizationCodeResponse.AuthorizationCodeResponse(response);
|
|
28
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthService.cjs","sources":["../../../../src/services/oauth/OAuthService.ts"],"sourcesContent":["import qs from \"qs\";\nimport { SBService } from \"services/SBService\";\nimport { AccessTokenResponse } from \"./AccessTokenResponse\";\nimport { AuthorizationCodeResponse } from \"./AuthorizationCodeResponse\";\nimport { AuthorizeRequest } from \"./AuthorizeRequest\";\nimport { GetTokenRequest } from \"./GetTokenRequest\";\nimport { RefreshTokenRequest } from \"./RefreshTokenRequest\";\nimport { defaultAuthServiceoptions, SBServiceOptions } from \"@/client\";\nexport class OAuthService extends SBService {\n\tpublic constructor(options: SBServiceOptions = defaultAuthServiceoptions) {\n\t\tsuper(options);\n\t}\n\n\tpublic async getAuthorizationCode(\n\t\trequest: AuthorizeRequest,\n\t): Promise<AuthorizationCodeResponse> {\n\t\tconst response = await super.execute<string, string>(null, {\n\t\t\turl: \"/connect/authorize\",\n\t\t\
|
|
1
|
+
{"version":3,"file":"OAuthService.cjs","sources":["../../../../src/services/oauth/OAuthService.ts"],"sourcesContent":["import qs from \"qs\";\nimport { SBService } from \"services/SBService\";\nimport { AccessTokenResponse } from \"./AccessTokenResponse\";\nimport { AuthorizationCodeResponse } from \"./AuthorizationCodeResponse\";\nimport { AuthorizeRequest } from \"./AuthorizeRequest\";\nimport { GetTokenRequest } from \"./GetTokenRequest\";\nimport { RefreshTokenRequest } from \"./RefreshTokenRequest\";\nimport { defaultAuthServiceoptions, SBServiceOptions } from \"@/client\";\nexport class OAuthService extends SBService {\n\tpublic constructor(options: SBServiceOptions = defaultAuthServiceoptions) {\n\t\tsuper(options);\n\t}\n\n\tpublic async getAuthorizationCode(\n\t\trequest: AuthorizeRequest,\n\t): Promise<AuthorizationCodeResponse> {\n\t\tconst response = await super.execute<string, string>(null, {\n\t\t\turl: \"/connect/authorize\",\n\t\t\tparams: { response_mode: \"form_post\", ...request },\n\t\t\theaders: {\n\t\t\t\t\"content-type\": \"application/x-www-form-urlencoded\",\n\t\t\t},\n\t\t\twithCredentials: true,\n\t\t});\n\t\treturn new AuthorizationCodeResponse(response);\n\t}\n\n\tpublic async getToken(\n\t\trequest: GetTokenRequest,\n\t): Promise<AccessTokenResponse> {\n\t\treturn await super.execute(null, {\n\t\t\turl: \"/connect/token\",\n\t\t\tmethod: \"POST\",\n\t\t\tdata: qs.stringify(request),\n\t\t\twithCredentials: true,\n\t\t});\n\t}\n\n\tpublic async refreshToken(\n\t\tloginRequest: RefreshTokenRequest,\n\t): Promise<AccessTokenResponse> {\n\t\treturn await super.execute(null, {\n\t\t\turl: \"/connect/token\",\n\t\t\tmethod: \"POST\",\n\t\t\tdata: qs.stringify(loginRequest),\n\t\t});\n\t}\n}\n"],"names":["OAuthService","SBService","constructor","options","defaultAuthServiceoptions","getAuthorizationCode","request","response","execute","url","params","response_mode","headers","withCredentials","AuthorizationCodeResponse","getToken","method","data","qs","stringify","refreshToken","loginRequest"],"mappings":";;;;;;;;;;;AAQM,MAAOA,YAAa,SAAQC,mBAAS,CAAA;AAC1CC,EAAAA,WAAAA,CAAmBC,UAA4BC,0CAAyB,EAAA;IACvE,KAAK,CAACD,OAAO,CAAC,CAAA;AACf,GAAA;EAEO,MAAME,oBAAoBA,CAChCC,OAAyB,EAAA;IAEzB,MAAMC,QAAQ,GAAG,MAAM,KAAK,CAACC,OAAO,CAAiB,IAAI,EAAE;AAC1DC,MAAAA,GAAG,EAAE,oBAAoB;AACzBC,MAAAA,MAAM,EAAE;AAAEC,QAAAA,aAAa,EAAE,WAAW;QAAE,GAAGL,OAAAA;OAAS;AAClDM,MAAAA,OAAO,EAAE;AACR,QAAA,cAAc,EAAE,mCAAA;OAChB;AACDC,MAAAA,eAAe,EAAE,IAAA;AACjB,KAAA,CAAC,CAAA;AACF,IAAA,OAAO,IAAIC,mDAAyB,CAACP,QAAQ,CAAC,CAAA;AAC/C,GAAA;EAEO,MAAMQ,QAAQA,CACpBT,OAAwB,EAAA;AAExB,IAAA,OAAO,MAAM,KAAK,CAACE,OAAO,CAAC,IAAI,EAAE;AAChCC,MAAAA,GAAG,EAAE,gBAAgB;AACrBO,MAAAA,MAAM,EAAE,MAAM;AACdC,MAAAA,IAAI,EAAEC,aAAE,CAACC,SAAS,CAACb,OAAO,CAAC;AAC3BO,MAAAA,eAAe,EAAE,IAAA;AACjB,KAAA,CAAC,CAAA;AACH,GAAA;EAEO,MAAMO,YAAYA,CACxBC,YAAiC,EAAA;AAEjC,IAAA,OAAO,MAAM,KAAK,CAACb,OAAO,CAAC,IAAI,EAAE;AAChCC,MAAAA,GAAG,EAAE,gBAAgB;AACrBO,MAAAA,MAAM,EAAE,MAAM;AACdC,MAAAA,IAAI,EAAEC,aAAE,CAACC,SAAS,CAACE,YAAY,CAAA;AAC/B,KAAA,CAAC,CAAA;AACH,GAAA;AACA;;;;"}
|
|
@@ -14,13 +14,14 @@ class OAuthService extends SBService {
|
|
|
14
14
|
async getAuthorizationCode(request) {
|
|
15
15
|
const response = await super.execute(null, {
|
|
16
16
|
url: "/connect/authorize",
|
|
17
|
-
data: qs.stringify(request),
|
|
18
17
|
params: {
|
|
19
|
-
response_mode: "form_post"
|
|
18
|
+
response_mode: "form_post",
|
|
19
|
+
...request
|
|
20
20
|
},
|
|
21
21
|
headers: {
|
|
22
22
|
"content-type": "application/x-www-form-urlencoded"
|
|
23
|
-
}
|
|
23
|
+
},
|
|
24
|
+
withCredentials: true
|
|
24
25
|
});
|
|
25
26
|
return new AuthorizationCodeResponse(response);
|
|
26
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthService.mjs","sources":["../../../../src/services/oauth/OAuthService.ts"],"sourcesContent":["import qs from \"qs\";\nimport { SBService } from \"services/SBService\";\nimport { AccessTokenResponse } from \"./AccessTokenResponse\";\nimport { AuthorizationCodeResponse } from \"./AuthorizationCodeResponse\";\nimport { AuthorizeRequest } from \"./AuthorizeRequest\";\nimport { GetTokenRequest } from \"./GetTokenRequest\";\nimport { RefreshTokenRequest } from \"./RefreshTokenRequest\";\nimport { defaultAuthServiceoptions, SBServiceOptions } from \"@/client\";\nexport class OAuthService extends SBService {\n\tpublic constructor(options: SBServiceOptions = defaultAuthServiceoptions) {\n\t\tsuper(options);\n\t}\n\n\tpublic async getAuthorizationCode(\n\t\trequest: AuthorizeRequest,\n\t): Promise<AuthorizationCodeResponse> {\n\t\tconst response = await super.execute<string, string>(null, {\n\t\t\turl: \"/connect/authorize\",\n\t\t\
|
|
1
|
+
{"version":3,"file":"OAuthService.mjs","sources":["../../../../src/services/oauth/OAuthService.ts"],"sourcesContent":["import qs from \"qs\";\nimport { SBService } from \"services/SBService\";\nimport { AccessTokenResponse } from \"./AccessTokenResponse\";\nimport { AuthorizationCodeResponse } from \"./AuthorizationCodeResponse\";\nimport { AuthorizeRequest } from \"./AuthorizeRequest\";\nimport { GetTokenRequest } from \"./GetTokenRequest\";\nimport { RefreshTokenRequest } from \"./RefreshTokenRequest\";\nimport { defaultAuthServiceoptions, SBServiceOptions } from \"@/client\";\nexport class OAuthService extends SBService {\n\tpublic constructor(options: SBServiceOptions = defaultAuthServiceoptions) {\n\t\tsuper(options);\n\t}\n\n\tpublic async getAuthorizationCode(\n\t\trequest: AuthorizeRequest,\n\t): Promise<AuthorizationCodeResponse> {\n\t\tconst response = await super.execute<string, string>(null, {\n\t\t\turl: \"/connect/authorize\",\n\t\t\tparams: { response_mode: \"form_post\", ...request },\n\t\t\theaders: {\n\t\t\t\t\"content-type\": \"application/x-www-form-urlencoded\",\n\t\t\t},\n\t\t\twithCredentials: true,\n\t\t});\n\t\treturn new AuthorizationCodeResponse(response);\n\t}\n\n\tpublic async getToken(\n\t\trequest: GetTokenRequest,\n\t): Promise<AccessTokenResponse> {\n\t\treturn await super.execute(null, {\n\t\t\turl: \"/connect/token\",\n\t\t\tmethod: \"POST\",\n\t\t\tdata: qs.stringify(request),\n\t\t\twithCredentials: true,\n\t\t});\n\t}\n\n\tpublic async refreshToken(\n\t\tloginRequest: RefreshTokenRequest,\n\t): Promise<AccessTokenResponse> {\n\t\treturn await super.execute(null, {\n\t\t\turl: \"/connect/token\",\n\t\t\tmethod: \"POST\",\n\t\t\tdata: qs.stringify(loginRequest),\n\t\t});\n\t}\n}\n"],"names":["OAuthService","SBService","constructor","options","defaultAuthServiceoptions","getAuthorizationCode","request","response","execute","url","params","response_mode","headers","withCredentials","AuthorizationCodeResponse","getToken","method","data","qs","stringify","refreshToken","loginRequest"],"mappings":";;;;;;;;;AAQM,MAAOA,YAAa,SAAQC,SAAS,CAAA;AAC1CC,EAAAA,WAAAA,CAAmBC,UAA4BC,yBAAyB,EAAA;IACvE,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rowser = typeof window !== "undefined";
|
|
102
102
|
class SBInstance {
|
|
@@ -5623,13 +5623,14 @@
|
|
|
5623
5623
|
async getAuthorizationCode(request) {
|
|
5624
5624
|
const response = await super.execute(null, {
|
|
5625
5625
|
url: "/connect/authorize",
|
|
5626
|
-
data: qs.stringify(request),
|
|
5627
5626
|
params: {
|
|
5628
|
-
response_mode: "form_post"
|
|
5627
|
+
response_mode: "form_post",
|
|
5628
|
+
...request
|
|
5629
5629
|
},
|
|
5630
5630
|
headers: {
|
|
5631
5631
|
"content-type": "application/x-www-form-urlencoded"
|
|
5632
|
-
}
|
|
5632
|
+
},
|
|
5633
|
+
withCredentials: true
|
|
5633
5634
|
});
|
|
5634
5635
|
return new AuthorizationCodeResponse(response);
|
|
5635
5636
|
}
|