@osdk/faux 0.4.0-beta.2 → 0.4.0-beta.4
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 +25 -0
- package/build/browser/FauxFoundry/validateAction.js +85 -13
- package/build/browser/FauxFoundry/validateAction.js.map +1 -1
- package/build/browser/FauxFoundry/validateAction.test.js +522 -0
- package/build/browser/FauxFoundry/validateAction.test.js.map +1 -0
- package/build/browser/errors.js +11 -0
- package/build/browser/errors.js.map +1 -1
- package/build/browser/mock/OntologiesV2/MediaReferenceProperties.js +2 -1
- package/build/browser/mock/OntologiesV2/MediaReferenceProperties.js.map +1 -1
- package/build/cjs/index.cjs +190 -43
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +2 -1
- package/build/esm/FauxFoundry/validateAction.js +85 -13
- package/build/esm/FauxFoundry/validateAction.js.map +1 -1
- package/build/esm/FauxFoundry/validateAction.test.js +522 -0
- package/build/esm/FauxFoundry/validateAction.test.js.map +1 -0
- package/build/esm/errors.js +11 -0
- package/build/esm/errors.js.map +1 -1
- package/build/esm/mock/OntologiesV2/MediaReferenceProperties.js +2 -1
- package/build/esm/mock/OntologiesV2/MediaReferenceProperties.js.map +1 -1
- package/build/types/FauxFoundry/validateAction.d.ts +2 -1
- package/build/types/FauxFoundry/validateAction.d.ts.map +1 -1
- package/build/types/FauxFoundry/validateAction.test.d.ts +1 -0
- package/build/types/FauxFoundry/validateAction.test.d.ts.map +1 -0
- package/build/types/errors.d.ts.map +1 -1
- package/build/types/mock/OntologiesV2/MediaReferenceProperties.d.ts +2 -1
- package/build/types/mock/OntologiesV2/MediaReferenceProperties.d.ts.map +1 -1
- package/package.json +11 -9
package/build/esm/errors.js
CHANGED
|
@@ -22,6 +22,7 @@ export function ObjectTypeDoesNotExistError(objectType) {
|
|
|
22
22
|
return {
|
|
23
23
|
errorCode: "NOT_FOUND",
|
|
24
24
|
errorName: "ObjectTypeNotFound",
|
|
25
|
+
errorDescription: "The requested object type is not found, or the client token does not have access to it.",
|
|
25
26
|
errorInstanceId,
|
|
26
27
|
parameters: {
|
|
27
28
|
objectType,
|
|
@@ -33,6 +34,7 @@ export function LinkTypeNotFound(objectType, linkType) {
|
|
|
33
34
|
return {
|
|
34
35
|
errorCode: "NOT_FOUND",
|
|
35
36
|
errorName: "LinkTypeNotFound",
|
|
37
|
+
errorDescription: "The link type is not found, or the user does not have access to it.",
|
|
36
38
|
errorInstanceId,
|
|
37
39
|
parameters: {
|
|
38
40
|
objectType,
|
|
@@ -45,6 +47,7 @@ export function OntologyNotFoundError(ontology) {
|
|
|
45
47
|
return {
|
|
46
48
|
errorCode: "NOT_FOUND",
|
|
47
49
|
errorName: "OntologyNotFound",
|
|
50
|
+
errorDescription: "The requested Ontology is not found, or the client token does not have access to it.",
|
|
48
51
|
errorInstanceId,
|
|
49
52
|
parameters: {
|
|
50
53
|
ontologyRid: ontology,
|
|
@@ -56,6 +59,7 @@ export function ObjectNotFoundError(objectType, primaryKey) {
|
|
|
56
59
|
return {
|
|
57
60
|
errorCode: "NOT_FOUND",
|
|
58
61
|
errorName: "ObjectNotFound",
|
|
62
|
+
errorDescription: "The requested object is not found, or the client token does not have access to it.",
|
|
59
63
|
errorInstanceId,
|
|
60
64
|
parameters: {
|
|
61
65
|
objectType,
|
|
@@ -67,6 +71,7 @@ export function QueryNotFoundError(queryApiName) {
|
|
|
67
71
|
return {
|
|
68
72
|
errorCode: "NOT_FOUND",
|
|
69
73
|
errorName: "QueryNotFound",
|
|
74
|
+
errorDescription: "The query is not found, or the user does not have access to it.",
|
|
70
75
|
errorInstanceId,
|
|
71
76
|
parameters: {
|
|
72
77
|
query: queryApiName
|
|
@@ -77,6 +82,7 @@ export function ActionNotFoundError() {
|
|
|
77
82
|
return {
|
|
78
83
|
errorCode: "NOT_FOUND",
|
|
79
84
|
errorName: "ActionNotFound",
|
|
85
|
+
errorDescription: "The action is not found, or the user does not have access to it.",
|
|
80
86
|
errorInstanceId,
|
|
81
87
|
parameters: {
|
|
82
88
|
actionRid: ""
|
|
@@ -94,12 +100,14 @@ export function InvalidRequest(errorName) {
|
|
|
94
100
|
export const ApplyActionFailedError = {
|
|
95
101
|
errorCode: "INVALID_ARGUMENT",
|
|
96
102
|
errorName: "ApplyActionFailed",
|
|
103
|
+
errorDescription: "",
|
|
97
104
|
errorInstanceId,
|
|
98
105
|
parameters: {}
|
|
99
106
|
};
|
|
100
107
|
export const ExecuteQueryFailedError = {
|
|
101
108
|
errorCode: "CONFLICT",
|
|
102
109
|
errorName: "QueryEncounteredUserFacingError",
|
|
110
|
+
errorDescription: "The authored Query failed to execute because of a user induced error. The message argument is meant to be displayed to the user.",
|
|
103
111
|
errorInstanceId,
|
|
104
112
|
parameters: {
|
|
105
113
|
functionRid: "ri.function-registry.main.function.9b55870a-63c7-4d48-8f06-9627c0805968",
|
|
@@ -110,12 +118,14 @@ export const ExecuteQueryFailedError = {
|
|
|
110
118
|
export const InvalidContentTypeError = {
|
|
111
119
|
errorCode: "INVALID_ARGUMENT",
|
|
112
120
|
errorName: "InvalidContentType",
|
|
121
|
+
errorDescription: "The Content-Type cannot be inferred from the request content and filename. Please check your request content and filename to ensure they are compatible.",
|
|
113
122
|
errorInstanceId,
|
|
114
123
|
parameters: {}
|
|
115
124
|
};
|
|
116
125
|
export const AttachmentSizeExceededLimitError = {
|
|
117
126
|
errorCode: "INVALID_ARGUMENT",
|
|
118
127
|
errorName: "AttachmentSizeExceededLimit",
|
|
128
|
+
errorDescription: "The file is too large to be uploaded as an attachment. The maximum attachment size is 200MB.",
|
|
119
129
|
errorInstanceId,
|
|
120
130
|
parameters: {
|
|
121
131
|
fileSizeBytes: "230000",
|
|
@@ -125,6 +135,7 @@ export const AttachmentSizeExceededLimitError = {
|
|
|
125
135
|
export const AttachmentNotFoundError = {
|
|
126
136
|
errorCode: "NOT_FOUND",
|
|
127
137
|
errorName: "AttachmentNotFound",
|
|
138
|
+
errorDescription: "The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object.",
|
|
128
139
|
errorInstanceId,
|
|
129
140
|
parameters: {
|
|
130
141
|
attachmentRid: "ri.attachments.main.attachment.86016861-707f-4292-b258-6a7108915a80"
|
package/build/esm/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","names":["errorInstanceId","objectTypeRid","ObjectTypeDoesNotExistError","objectType","errorCode","errorName","parameters","LinkTypeNotFound","linkType","linkTypeId","undefined","OntologyNotFoundError","ontology","ontologyRid","apiName","ObjectNotFoundError","primaryKey","QueryNotFoundError","queryApiName","query","ActionNotFoundError","actionRid","InvalidRequest","ApplyActionFailedError","ExecuteQueryFailedError","functionRid","functionVersion","message","InvalidContentTypeError","AttachmentSizeExceededLimitError","fileSizeBytes","fileLimitBytes","AttachmentNotFoundError","attachmentRid"],"sources":["errors.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\n//\n\nimport type {\n ActionNotFound,\n ApplyActionFailed,\n AttachmentNotFound,\n AttachmentSizeExceededLimit,\n InvalidContentType,\n LinkTypeNotFound as OGLinkTypeNotFound,\n ObjectNotFound,\n ObjectTypeNotFound,\n OntologyNotFound,\n QueryEncounteredUserFacingError,\n QueryNotFound,\n} from \"@osdk/internal.foundry.ontologies\";\nimport type { BaseAPIError } from \"./BaseError.js\";\n\nconst errorInstanceId = \"errorInstanceId\";\nconst objectTypeRid = \"ri.foundry.main.objectType.1\";\n\nexport function ObjectTypeDoesNotExistError(\n objectType: string,\n): ObjectTypeNotFound {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"ObjectTypeNotFound\",\n errorInstanceId,\n parameters: {\n objectType,\n objectTypeRid,\n },\n };\n}\n\nexport function LinkTypeNotFound(\n objectType: string,\n linkType: string,\n): OGLinkTypeNotFound {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"LinkTypeNotFound\",\n errorInstanceId,\n parameters: {\n objectType,\n linkType,\n linkTypeId: undefined,\n },\n };\n}\n\nexport function OntologyNotFoundError(\n ontology: string,\n): OntologyNotFound {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"OntologyNotFound\",\n errorInstanceId,\n parameters: {\n ontologyRid: ontology,\n apiName: ontology,\n },\n };\n}\n\nexport function ObjectNotFoundError(\n objectType: string,\n primaryKey: string,\n): ObjectNotFound {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"ObjectNotFound\",\n errorInstanceId,\n parameters: {\n objectType,\n primaryKey,\n },\n };\n}\n\nexport function QueryNotFoundError(queryApiName: string): QueryNotFound {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"QueryNotFound\",\n errorInstanceId,\n parameters: {\n query: queryApiName,\n },\n };\n}\n\nexport function ActionNotFoundError(): ActionNotFound {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"ActionNotFound\",\n errorInstanceId,\n parameters: {\n actionRid: \"\",\n },\n };\n}\n\nexport function InvalidRequest(errorName: string): BaseAPIError {\n return {\n errorCode: \"INVALID_REQUEST\",\n errorName,\n errorInstanceId,\n parameters: {},\n };\n}\n\nexport const ApplyActionFailedError: ApplyActionFailed = {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"ApplyActionFailed\",\n errorInstanceId,\n parameters: {},\n};\n\nexport const ExecuteQueryFailedError: QueryEncounteredUserFacingError = {\n errorCode: \"CONFLICT\",\n errorName: \"QueryEncounteredUserFacingError\",\n errorInstanceId,\n parameters: {\n functionRid:\n \"ri.function-registry.main.function.9b55870a-63c7-4d48-8f06-9627c0805968\",\n functionVersion: \"0.11.0\",\n message: \"test failed\",\n },\n};\n\nexport const InvalidContentTypeError: InvalidContentType = {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"InvalidContentType\",\n errorInstanceId,\n parameters: {},\n};\n\nexport const AttachmentSizeExceededLimitError: AttachmentSizeExceededLimit = {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"AttachmentSizeExceededLimit\",\n errorInstanceId,\n parameters: {\n fileSizeBytes: \"230000\",\n fileLimitBytes: \"200000\",\n },\n};\n\nexport const AttachmentNotFoundError: AttachmentNotFound = {\n errorCode: \"NOT_FOUND\",\n errorName: \"AttachmentNotFound\",\n errorInstanceId,\n parameters: {\n attachmentRid:\n \"ri.attachments.main.attachment.86016861-707f-4292-b258-6a7108915a80\",\n },\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAiBA,MAAMA,eAAe,GAAG,iBAAiB;AACzC,MAAMC,aAAa,GAAG,8BAA8B;AAEpD,OAAO,SAASC,2BAA2BA,CACzCC,UAAkB,EACE;EACpB,OAAO;IACLC,SAAS,EAAE,WAAW;IACtBC,SAAS,EAAE,oBAAoB;IAC/
|
|
1
|
+
{"version":3,"file":"errors.js","names":["errorInstanceId","objectTypeRid","ObjectTypeDoesNotExistError","objectType","errorCode","errorName","errorDescription","parameters","LinkTypeNotFound","linkType","linkTypeId","undefined","OntologyNotFoundError","ontology","ontologyRid","apiName","ObjectNotFoundError","primaryKey","QueryNotFoundError","queryApiName","query","ActionNotFoundError","actionRid","InvalidRequest","ApplyActionFailedError","ExecuteQueryFailedError","functionRid","functionVersion","message","InvalidContentTypeError","AttachmentSizeExceededLimitError","fileSizeBytes","fileLimitBytes","AttachmentNotFoundError","attachmentRid"],"sources":["errors.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\n//\n\nimport type {\n ActionNotFound,\n ApplyActionFailed,\n AttachmentNotFound,\n AttachmentSizeExceededLimit,\n InvalidContentType,\n LinkTypeNotFound as OGLinkTypeNotFound,\n ObjectNotFound,\n ObjectTypeNotFound,\n OntologyNotFound,\n QueryEncounteredUserFacingError,\n QueryNotFound,\n} from \"@osdk/internal.foundry.ontologies\";\nimport type { BaseAPIError } from \"./BaseError.js\";\n\nconst errorInstanceId = \"errorInstanceId\";\nconst objectTypeRid = \"ri.foundry.main.objectType.1\";\n\nexport function ObjectTypeDoesNotExistError(\n objectType: string,\n): ObjectTypeNotFound {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"ObjectTypeNotFound\",\n errorDescription:\n \"The requested object type is not found, or the client token does not have access to it.\",\n errorInstanceId,\n parameters: {\n objectType,\n objectTypeRid,\n },\n };\n}\n\nexport function LinkTypeNotFound(\n objectType: string,\n linkType: string,\n): OGLinkTypeNotFound {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"LinkTypeNotFound\",\n errorDescription:\n \"The link type is not found, or the user does not have access to it.\",\n errorInstanceId,\n parameters: {\n objectType,\n linkType,\n linkTypeId: undefined,\n },\n };\n}\n\nexport function OntologyNotFoundError(\n ontology: string,\n): OntologyNotFound {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"OntologyNotFound\",\n errorDescription:\n \"The requested Ontology is not found, or the client token does not have access to it.\",\n errorInstanceId,\n parameters: {\n ontologyRid: ontology,\n apiName: ontology,\n },\n };\n}\n\nexport function ObjectNotFoundError(\n objectType: string,\n primaryKey: string,\n): ObjectNotFound {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"ObjectNotFound\",\n errorDescription:\n \"The requested object is not found, or the client token does not have access to it.\",\n errorInstanceId,\n parameters: {\n objectType,\n primaryKey,\n },\n };\n}\n\nexport function QueryNotFoundError(queryApiName: string): QueryNotFound {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"QueryNotFound\",\n errorDescription:\n \"The query is not found, or the user does not have access to it.\",\n errorInstanceId,\n parameters: {\n query: queryApiName,\n },\n };\n}\n\nexport function ActionNotFoundError(): ActionNotFound {\n return {\n errorCode: \"NOT_FOUND\",\n errorName: \"ActionNotFound\",\n errorDescription:\n \"The action is not found, or the user does not have access to it.\",\n errorInstanceId,\n parameters: {\n actionRid: \"\",\n },\n };\n}\n\nexport function InvalidRequest(errorName: string): BaseAPIError {\n return {\n errorCode: \"INVALID_REQUEST\",\n errorName,\n errorInstanceId,\n parameters: {},\n };\n}\n\nexport const ApplyActionFailedError: ApplyActionFailed = {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"ApplyActionFailed\",\n errorDescription: \"\",\n errorInstanceId,\n parameters: {},\n};\n\nexport const ExecuteQueryFailedError: QueryEncounteredUserFacingError = {\n errorCode: \"CONFLICT\",\n errorName: \"QueryEncounteredUserFacingError\",\n errorDescription:\n \"The authored Query failed to execute because of a user induced error. The message argument is meant to be displayed to the user.\",\n errorInstanceId,\n parameters: {\n functionRid:\n \"ri.function-registry.main.function.9b55870a-63c7-4d48-8f06-9627c0805968\",\n functionVersion: \"0.11.0\",\n message: \"test failed\",\n },\n};\n\nexport const InvalidContentTypeError: InvalidContentType = {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"InvalidContentType\",\n errorDescription:\n \"The Content-Type cannot be inferred from the request content and filename. Please check your request content and filename to ensure they are compatible.\",\n errorInstanceId,\n parameters: {},\n};\n\nexport const AttachmentSizeExceededLimitError: AttachmentSizeExceededLimit = {\n errorCode: \"INVALID_ARGUMENT\",\n errorName: \"AttachmentSizeExceededLimit\",\n errorDescription:\n \"The file is too large to be uploaded as an attachment. The maximum attachment size is 200MB.\",\n errorInstanceId,\n parameters: {\n fileSizeBytes: \"230000\",\n fileLimitBytes: \"200000\",\n },\n};\n\nexport const AttachmentNotFoundError: AttachmentNotFound = {\n errorCode: \"NOT_FOUND\",\n errorName: \"AttachmentNotFound\",\n errorDescription:\n \"The requested attachment is not found, or the client token does not have access to it. Attachments that are not attached to any objects are deleted after two weeks. Attachments that have not been attached to an object can only be viewed by the user who uploaded them. Attachments that have been attached to an object can be viewed by users who can view the object.\",\n errorInstanceId,\n parameters: {\n attachmentRid:\n \"ri.attachments.main.attachment.86016861-707f-4292-b258-6a7108915a80\",\n },\n};\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -14,10 +14,11 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
import { MediaSets } from "@osdk/foundry.mediasets";
|
|
17
18
|
import { MediaReferenceProperties } from "@osdk/foundry.ontologies";
|
|
18
19
|
import { handleOpenApiCall } from "../../handlers/util/handleOpenApiCall.js";
|
|
19
20
|
export const getMediaMetadata = handleOpenApiCall(MediaReferenceProperties.getMediaMetadata, ["ontologyApiName", "objectType", "primaryKey", "propertyName"]);
|
|
20
21
|
export const getMediaContent = handleOpenApiCall(MediaReferenceProperties.getMediaContent, ["ontologyApiName", "objectType", "primaryKey", "propertyName"]);
|
|
21
22
|
export const upload = handleOpenApiCall(MediaReferenceProperties.upload, ["ontologyApiName", "objectType", "propertyName"]);
|
|
22
|
-
export const uploadMedia = handleOpenApiCall(
|
|
23
|
+
export const uploadMedia = handleOpenApiCall(MediaSets.uploadMedia, []);
|
|
23
24
|
//# sourceMappingURL=MediaReferenceProperties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaReferenceProperties.js","names":["MediaReferenceProperties","handleOpenApiCall","getMediaMetadata","getMediaContent","upload","uploadMedia"],"sources":["MediaReferenceProperties.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 { MediaReferenceProperties } from \"@osdk/foundry.ontologies\";\nimport type { CallFactory } from \"../../handlers/util/handleOpenApiCall.js\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\n\nexport const getMediaMetadata: CallFactory<\n \"ontologyApiName\" | \"objectType\" | \"primaryKey\" | \"propertyName\",\n typeof MediaReferenceProperties.getMediaMetadata\n> = handleOpenApiCall(\n MediaReferenceProperties.getMediaMetadata,\n [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"],\n);\n\nexport const getMediaContent: CallFactory<\n \"ontologyApiName\" | \"objectType\" | \"primaryKey\" | \"propertyName\",\n typeof MediaReferenceProperties.getMediaContent\n> = handleOpenApiCall(\n MediaReferenceProperties.getMediaContent,\n [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"],\n);\n\nexport const upload: CallFactory<\n \"ontologyApiName\" | \"objectType\" | \"propertyName\",\n typeof MediaReferenceProperties.upload\n> = handleOpenApiCall(\n MediaReferenceProperties.upload,\n [\"ontologyApiName\", \"objectType\", \"propertyName\"],\n);\n\nexport const uploadMedia: CallFactory<\n
|
|
1
|
+
{"version":3,"file":"MediaReferenceProperties.js","names":["MediaSets","MediaReferenceProperties","handleOpenApiCall","getMediaMetadata","getMediaContent","upload","uploadMedia"],"sources":["MediaReferenceProperties.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 { MediaSets } from \"@osdk/foundry.mediasets\";\nimport { MediaReferenceProperties } from \"@osdk/foundry.ontologies\";\nimport type { CallFactory } from \"../../handlers/util/handleOpenApiCall.js\";\nimport { handleOpenApiCall } from \"../../handlers/util/handleOpenApiCall.js\";\n\nexport const getMediaMetadata: CallFactory<\n \"ontologyApiName\" | \"objectType\" | \"primaryKey\" | \"propertyName\",\n typeof MediaReferenceProperties.getMediaMetadata\n> = handleOpenApiCall(\n MediaReferenceProperties.getMediaMetadata,\n [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"],\n);\n\nexport const getMediaContent: CallFactory<\n \"ontologyApiName\" | \"objectType\" | \"primaryKey\" | \"propertyName\",\n typeof MediaReferenceProperties.getMediaContent\n> = handleOpenApiCall(\n MediaReferenceProperties.getMediaContent,\n [\"ontologyApiName\", \"objectType\", \"primaryKey\", \"propertyName\"],\n);\n\nexport const upload: CallFactory<\n \"ontologyApiName\" | \"objectType\" | \"propertyName\",\n typeof MediaReferenceProperties.upload\n> = handleOpenApiCall(\n MediaReferenceProperties.upload,\n [\"ontologyApiName\", \"objectType\", \"propertyName\"],\n);\n\nexport const uploadMedia: CallFactory<\n never,\n typeof MediaSets.uploadMedia\n> = handleOpenApiCall(\n MediaSets.uploadMedia,\n [],\n);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,QAAQ,yBAAyB;AACnD,SAASC,wBAAwB,QAAQ,0BAA0B;AAEnE,SAASC,iBAAiB,QAAQ,0CAA0C;AAE5E,OAAO,MAAMC,gBAGZ,GAAGD,iBAAiB,CACnBD,wBAAwB,CAACE,gBAAgB,EACzC,CAAC,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,CAChE,CAAC;AAED,OAAO,MAAMC,eAGZ,GAAGF,iBAAiB,CACnBD,wBAAwB,CAACG,eAAe,EACxC,CAAC,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,CAChE,CAAC;AAED,OAAO,MAAMC,MAGZ,GAAGH,iBAAiB,CACnBD,wBAAwB,CAACI,MAAM,EAC/B,CAAC,iBAAiB,EAAE,YAAY,EAAE,cAAc,CAClD,CAAC;AAED,OAAO,MAAMC,WAGZ,GAAGJ,iBAAiB,CACnBF,SAAS,CAACM,WAAW,EACrB,EACF,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { MediaReference } from "@osdk/foundry.core";
|
|
2
|
-
import type { ActionTypeV2, ApplyActionRequestV2, BatchApplyActionRequestItem, ValidateActionResponseV2 } from "@osdk/foundry.ontologies";
|
|
2
|
+
import type { ActionTypeV2, ApplyActionRequestV2, BatchApplyActionRequestItem, OntologyDataType, ValidateActionResponseV2 } from "@osdk/foundry.ontologies";
|
|
3
3
|
import type { FauxDataStore } from "./FauxDataStore.js";
|
|
4
4
|
export declare function validateAction(payload: ApplyActionRequestV2 | BatchApplyActionRequestItem, def: ActionTypeV2, dataStore: FauxDataStore): ValidateActionResponseV2;
|
|
5
|
+
export declare function matchesOntologyDataType(odt: OntologyDataType, value: unknown): boolean;
|
|
5
6
|
export declare function isMediaReference(o: any): o is MediaReference;
|
|
6
7
|
export declare function isInterfaceActionParam(value: any): value is {
|
|
7
8
|
objectTypeApiName: string
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,cAAc,sBAAsB,oBAAqB;AACzD,cAGE,cACA,sBACA,
|
|
1
|
+
{"mappings":"AAgBA,cAAc,sBAAsB,oBAAqB;AACzD,cAGE,cACA,sBACA,6BACA,kBAEA,gCACK,0BAA2B;AAClC,cAAc,qBAAqB,oBAAqB;AAgDxD,OAAO,iBAAS,eACdA,SAAS,uBAAuB,6BAChCC,KAAK,cACLC,WAAW,gBACV;AA6MH,OAAO,iBAAS,wBACdC,KAAK,kBACLC;AA0EF,OAAO,iBAAS,iBAAiBC,SAAS,KAAK;AAa/C,OAAO,iBAAS,uBAAuBC,aAAa,SAAS;CAC3D;CACA;AACD","names":["payload: ApplyActionRequestV2 | BatchApplyActionRequestItem","def: ActionTypeV2","dataStore: FauxDataStore","odt: OntologyDataType","value: unknown","o: any","value: any"],"sources":["../../../src/FauxFoundry/validateAction.ts"],"version":3,"file":"validateAction.d.ts"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"","names":[],"sources":["../../../src/FauxFoundry/validateAction.test.ts"],"version":3,"file":"validateAction.test.d.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAkBA,cACE,gBACA,mBACA,oBACA,6BACA,oBACA,oBAAoB,oBACpB,gBACA,oBACA,kBACA,iCACA,qBACK,mCAAoC;AAC3C,cAAc,oBAAoB,gBAAiB;AAKnD,OAAO,iBAAS,4BACdA,qBACC;
|
|
1
|
+
{"mappings":"AAkBA,cACE,gBACA,mBACA,oBACA,6BACA,oBACA,oBAAoB,oBACpB,gBACA,oBACA,kBACA,iCACA,qBACK,mCAAoC;AAC3C,cAAc,oBAAoB,gBAAiB;AAKnD,OAAO,iBAAS,4BACdA,qBACC;AAcH,OAAO,iBAAS,iBACdA,oBACAC,mBACC;AAeH,OAAO,iBAAS,sBACdC,mBACC;AAcH,OAAO,iBAAS,oBACdF,oBACAG,qBACC;AAcH,OAAO,iBAAS,mBAAmBC,uBAAuB;AAa1D,OAAO,iBAAS,uBAAuB;AAavC,OAAO,iBAAS,eAAeC,oBAAoB;AASnD,OAAO,cAAMC,wBAAwB;AAQrC,OAAO,cAAMC,yBAAyB;AActC,OAAO,cAAMC,yBAAyB;AAStC,OAAO,cAAMC,kCAAkC;AAY/C,OAAO,cAAMC,yBAAyB","names":["objectType: string","linkType: string","ontology: string","primaryKey: string","queryApiName: string","errorName: string","ApplyActionFailedError: ApplyActionFailed","ExecuteQueryFailedError: QueryEncounteredUserFacingError","InvalidContentTypeError: InvalidContentType","AttachmentSizeExceededLimitError: AttachmentSizeExceededLimit","AttachmentNotFoundError: AttachmentNotFound"],"sources":["../../src/errors.ts"],"version":3,"file":"errors.d.ts"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { MediaSets } from "@osdk/foundry.mediasets";
|
|
1
2
|
import { MediaReferenceProperties } from "@osdk/foundry.ontologies";
|
|
2
3
|
import type { CallFactory } from "../../handlers/util/handleOpenApiCall.js";
|
|
3
4
|
export declare const getMediaMetadata: CallFactory<"ontologyApiName" | "objectType" | "primaryKey" | "propertyName", typeof MediaReferenceProperties.getMediaMetadata>;
|
|
4
5
|
export declare const getMediaContent: CallFactory<"ontologyApiName" | "objectType" | "primaryKey" | "propertyName", typeof MediaReferenceProperties.getMediaContent>;
|
|
5
6
|
export declare const upload: CallFactory<"ontologyApiName" | "objectType" | "propertyName", typeof MediaReferenceProperties.upload>;
|
|
6
|
-
export declare const uploadMedia: CallFactory<
|
|
7
|
+
export declare const uploadMedia: CallFactory<never, typeof MediaSets.uploadMedia>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AAgBA,SAAS,gCAAgC,0BAA2B;AACpE,cAAc,mBAAmB,0CAA2C;AAG5E,OAAO,cAAMA,kBAAkB,YAC7B,oBAAoB,eAAe,eAAe,uBAC3C,yBAAyB;AAMlC,OAAO,cAAMC,iBAAiB,YAC5B,oBAAoB,eAAe,eAAe,uBAC3C,yBAAyB;AAMlC,OAAO,cAAMC,QAAQ,YACnB,oBAAoB,eAAe,uBAC5B,yBAAyB;AAMlC,OAAO,cAAMC,aAAa,
|
|
1
|
+
{"mappings":"AAgBA,SAAS,iBAAiB,yBAA0B;AACpD,SAAS,gCAAgC,0BAA2B;AACpE,cAAc,mBAAmB,0CAA2C;AAG5E,OAAO,cAAMA,kBAAkB,YAC7B,oBAAoB,eAAe,eAAe,uBAC3C,yBAAyB;AAMlC,OAAO,cAAMC,iBAAiB,YAC5B,oBAAoB,eAAe,eAAe,uBAC3C,yBAAyB;AAMlC,OAAO,cAAMC,QAAQ,YACnB,oBAAoB,eAAe,uBAC5B,yBAAyB;AAMlC,OAAO,cAAMC,aAAa,0BAEjB,UAAU","names":["getMediaMetadata: CallFactory<\n \"ontologyApiName\" | \"objectType\" | \"primaryKey\" | \"propertyName\",\n typeof MediaReferenceProperties.getMediaMetadata\n>","getMediaContent: CallFactory<\n \"ontologyApiName\" | \"objectType\" | \"primaryKey\" | \"propertyName\",\n typeof MediaReferenceProperties.getMediaContent\n>","upload: CallFactory<\n \"ontologyApiName\" | \"objectType\" | \"propertyName\",\n typeof MediaReferenceProperties.upload\n>","uploadMedia: CallFactory<\n never,\n typeof MediaSets.uploadMedia\n>"],"sources":["../../../../src/mock/OntologiesV2/MediaReferenceProperties.ts"],"version":3,"file":"MediaReferenceProperties.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/faux",
|
|
3
|
-
"version": "0.4.0-beta.
|
|
3
|
+
"version": "0.4.0-beta.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"access": "private",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,11 +29,13 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@osdk/foundry.core": "2.
|
|
33
|
-
"@osdk/foundry.geo": "2.
|
|
34
|
-
"@osdk/foundry.
|
|
35
|
-
"@osdk/
|
|
32
|
+
"@osdk/foundry.core": "2.38.0",
|
|
33
|
+
"@osdk/foundry.geo": "2.38.0",
|
|
34
|
+
"@osdk/foundry.mediasets": "2.38.0",
|
|
35
|
+
"@osdk/foundry.ontologies": "2.38.0",
|
|
36
|
+
"@osdk/internal.foundry.ontologies": "2.38.0",
|
|
36
37
|
"date-fns": "^4.1.0",
|
|
38
|
+
"decimal.js": "^10.6.0",
|
|
37
39
|
"fast-deep-equal": "^3.1.3",
|
|
38
40
|
"fetch-retry": "^6.0.0",
|
|
39
41
|
"json-stable-stringify": "^1.3.0",
|
|
@@ -42,8 +44,8 @@
|
|
|
42
44
|
"semver": "^7.7.2",
|
|
43
45
|
"tiny-invariant": "^1.3.3",
|
|
44
46
|
"type-fest": "^4.41.0",
|
|
45
|
-
"@osdk/api": "~2.6.0-beta.
|
|
46
|
-
"@osdk/generator-converters": "~2.6.0-beta.
|
|
47
|
+
"@osdk/api": "~2.6.0-beta.8",
|
|
48
|
+
"@osdk/generator-converters": "~2.6.0-beta.8"
|
|
47
49
|
},
|
|
48
50
|
"devDependencies": {
|
|
49
51
|
"@types/json-stable-stringify": "^1.2.0",
|
|
@@ -51,8 +53,8 @@
|
|
|
51
53
|
"@types/semver": "^7.7.1",
|
|
52
54
|
"ts-expect": "^1.3.0",
|
|
53
55
|
"typescript": "~5.5.4",
|
|
54
|
-
"@osdk/monorepo.
|
|
55
|
-
"@osdk/monorepo.
|
|
56
|
+
"@osdk/monorepo.api-extractor": "~0.5.0-beta.1",
|
|
57
|
+
"@osdk/monorepo.tsconfig": "~0.5.0-beta.1"
|
|
56
58
|
},
|
|
57
59
|
"publishConfig": {
|
|
58
60
|
"access": "public"
|