@osdk/oauth 1.4.0-beta.1 → 1.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/build/browser/createAuthlessClient.js +27 -0
- package/build/browser/createAuthlessClient.js.map +1 -0
- package/build/browser/createAuthlessClient.test.js +31 -0
- package/build/browser/createAuthlessClient.test.js.map +1 -0
- package/build/esm/createAuthlessClient.js +27 -0
- package/build/esm/createAuthlessClient.js.map +1 -0
- package/build/esm/createAuthlessClient.test.js +31 -0
- package/build/esm/createAuthlessClient.test.js.map +1 -0
- package/build/types/createAuthlessClient.d.ts +6 -0
- package/build/types/createAuthlessClient.d.ts.map +1 -0
- package/build/types/createAuthlessClient.test.d.ts +1 -0
- package/build/types/createAuthlessClient.test.d.ts.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Use this function to initialize an authless client that returns a public token.
|
|
19
|
+
*
|
|
20
|
+
* @returns A token provider function that returns a Promise resolving to a public token
|
|
21
|
+
*/
|
|
22
|
+
export function createAuthlessClient() {
|
|
23
|
+
return async () => {
|
|
24
|
+
return "PUBLIC";
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=createAuthlessClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAuthlessClient.js","names":["createAuthlessClient"],"sources":["createAuthlessClient.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Use this function to initialize an authless client that returns a public token.\n *\n * @returns A token provider function that returns a Promise resolving to a public token\n */\nexport function createAuthlessClient(): () => Promise<string> {\n return async () => {\n return \"PUBLIC\";\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,oBAAoBA,CAAA,EAA0B;EAC5D,OAAO,YAAY;IACjB,OAAO,QAAQ;EACjB,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { describe, expect, it } from "vitest";
|
|
18
|
+
import { createAuthlessClient } from "./createAuthlessClient.js";
|
|
19
|
+
describe(createAuthlessClient, () => {
|
|
20
|
+
it("should return \"PUBLIC\" when called", async () => {
|
|
21
|
+
const authlessClientProvider = createAuthlessClient();
|
|
22
|
+
const result = await authlessClientProvider();
|
|
23
|
+
expect(result).toBe("PUBLIC");
|
|
24
|
+
});
|
|
25
|
+
it("should return a Promise", () => {
|
|
26
|
+
const authlessClientProvider = createAuthlessClient();
|
|
27
|
+
const resultPromise = authlessClientProvider();
|
|
28
|
+
expect(resultPromise).toBeInstanceOf(Promise);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=createAuthlessClient.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAuthlessClient.test.js","names":["describe","expect","it","createAuthlessClient","authlessClientProvider","result","toBe","resultPromise","toBeInstanceOf","Promise"],"sources":["createAuthlessClient.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { describe, expect, it } from \"vitest\";\nimport { createAuthlessClient } from \"./createAuthlessClient.js\";\n\ndescribe(createAuthlessClient, () => {\n it(\"should return \\\"PUBLIC\\\" when called\", async () => {\n const authlessClientProvider = createAuthlessClient();\n const result = await authlessClientProvider();\n expect(result).toBe(\"PUBLIC\");\n });\n\n it(\"should return a Promise\", () => {\n const authlessClientProvider = createAuthlessClient();\n const resultPromise = authlessClientProvider();\n expect(resultPromise).toBeInstanceOf(Promise);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhEH,QAAQ,CAACG,oBAAoB,EAAE,MAAM;EACnCD,EAAE,CAAC,sCAAsC,EAAE,YAAY;IACrD,MAAME,sBAAsB,GAAGD,oBAAoB,CAAC,CAAC;IACrD,MAAME,MAAM,GAAG,MAAMD,sBAAsB,CAAC,CAAC;IAC7CH,MAAM,CAACI,MAAM,CAAC,CAACC,IAAI,CAAC,QAAQ,CAAC;EAC/B,CAAC,CAAC;EAEFJ,EAAE,CAAC,yBAAyB,EAAE,MAAM;IAClC,MAAME,sBAAsB,GAAGD,oBAAoB,CAAC,CAAC;IACrD,MAAMI,aAAa,GAAGH,sBAAsB,CAAC,CAAC;IAC9CH,MAAM,CAACM,aAAa,CAAC,CAACC,cAAc,CAACC,OAAO,CAAC;EAC/C,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2024 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Use this function to initialize an authless client that returns a public token.
|
|
19
|
+
*
|
|
20
|
+
* @returns A token provider function that returns a Promise resolving to a public token
|
|
21
|
+
*/
|
|
22
|
+
export function createAuthlessClient() {
|
|
23
|
+
return async () => {
|
|
24
|
+
return "PUBLIC";
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=createAuthlessClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAuthlessClient.js","names":["createAuthlessClient"],"sources":["createAuthlessClient.ts"],"sourcesContent":["/*\n * Copyright 2024 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Use this function to initialize an authless client that returns a public token.\n *\n * @returns A token provider function that returns a Promise resolving to a public token\n */\nexport function createAuthlessClient(): () => Promise<string> {\n return async () => {\n return \"PUBLIC\";\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,oBAAoBA,CAAA,EAA0B;EAC5D,OAAO,YAAY;IACjB,OAAO,QAAQ;EACjB,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { describe, expect, it } from "vitest";
|
|
18
|
+
import { createAuthlessClient } from "./createAuthlessClient.js";
|
|
19
|
+
describe(createAuthlessClient, () => {
|
|
20
|
+
it("should return \"PUBLIC\" when called", async () => {
|
|
21
|
+
const authlessClientProvider = createAuthlessClient();
|
|
22
|
+
const result = await authlessClientProvider();
|
|
23
|
+
expect(result).toBe("PUBLIC");
|
|
24
|
+
});
|
|
25
|
+
it("should return a Promise", () => {
|
|
26
|
+
const authlessClientProvider = createAuthlessClient();
|
|
27
|
+
const resultPromise = authlessClientProvider();
|
|
28
|
+
expect(resultPromise).toBeInstanceOf(Promise);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=createAuthlessClient.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAuthlessClient.test.js","names":["describe","expect","it","createAuthlessClient","authlessClientProvider","result","toBe","resultPromise","toBeInstanceOf","Promise"],"sources":["createAuthlessClient.test.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { describe, expect, it } from \"vitest\";\nimport { createAuthlessClient } from \"./createAuthlessClient.js\";\n\ndescribe(createAuthlessClient, () => {\n it(\"should return \\\"PUBLIC\\\" when called\", async () => {\n const authlessClientProvider = createAuthlessClient();\n const result = await authlessClientProvider();\n expect(result).toBe(\"PUBLIC\");\n });\n\n it(\"should return a Promise\", () => {\n const authlessClientProvider = createAuthlessClient();\n const resultPromise = authlessClientProvider();\n expect(resultPromise).toBeInstanceOf(Promise);\n });\n});\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,QAAQ;AAC7C,SAASC,oBAAoB,QAAQ,2BAA2B;AAEhEH,QAAQ,CAACG,oBAAoB,EAAE,MAAM;EACnCD,EAAE,CAAC,sCAAsC,EAAE,YAAY;IACrD,MAAME,sBAAsB,GAAGD,oBAAoB,CAAC,CAAC;IACrD,MAAME,MAAM,GAAG,MAAMD,sBAAsB,CAAC,CAAC;IAC7CH,MAAM,CAACI,MAAM,CAAC,CAACC,IAAI,CAAC,QAAQ,CAAC;EAC/B,CAAC,CAAC;EAEFJ,EAAE,CAAC,yBAAyB,EAAE,MAAM;IAClC,MAAME,sBAAsB,GAAGD,oBAAoB,CAAC,CAAC;IACrD,MAAMI,aAAa,GAAGH,sBAAsB,CAAC,CAAC;IAC9CH,MAAM,CAACM,aAAa,CAAC,CAACC,cAAc,CAACC,OAAO,CAAC;EAC/C,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;AAqBA,OAAO,iBAAS,8BAA8B","names":[],"sources":["../../src/createAuthlessClient.ts"],"version":3,"file":"createAuthlessClient.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"","names":[],"sources":["../../src/createAuthlessClient.test.ts"],"version":3,"file":"createAuthlessClient.test.d.ts"}
|