@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.
Files changed (28) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/build/browser/FauxFoundry/validateAction.js +85 -13
  3. package/build/browser/FauxFoundry/validateAction.js.map +1 -1
  4. package/build/browser/FauxFoundry/validateAction.test.js +522 -0
  5. package/build/browser/FauxFoundry/validateAction.test.js.map +1 -0
  6. package/build/browser/errors.js +11 -0
  7. package/build/browser/errors.js.map +1 -1
  8. package/build/browser/mock/OntologiesV2/MediaReferenceProperties.js +2 -1
  9. package/build/browser/mock/OntologiesV2/MediaReferenceProperties.js.map +1 -1
  10. package/build/cjs/index.cjs +190 -43
  11. package/build/cjs/index.cjs.map +1 -1
  12. package/build/cjs/index.d.cts +2 -1
  13. package/build/esm/FauxFoundry/validateAction.js +85 -13
  14. package/build/esm/FauxFoundry/validateAction.js.map +1 -1
  15. package/build/esm/FauxFoundry/validateAction.test.js +522 -0
  16. package/build/esm/FauxFoundry/validateAction.test.js.map +1 -0
  17. package/build/esm/errors.js +11 -0
  18. package/build/esm/errors.js.map +1 -1
  19. package/build/esm/mock/OntologiesV2/MediaReferenceProperties.js +2 -1
  20. package/build/esm/mock/OntologiesV2/MediaReferenceProperties.js.map +1 -1
  21. package/build/types/FauxFoundry/validateAction.d.ts +2 -1
  22. package/build/types/FauxFoundry/validateAction.d.ts.map +1 -1
  23. package/build/types/FauxFoundry/validateAction.test.d.ts +1 -0
  24. package/build/types/FauxFoundry/validateAction.test.d.ts.map +1 -0
  25. package/build/types/errors.d.ts.map +1 -1
  26. package/build/types/mock/OntologiesV2/MediaReferenceProperties.d.ts +2 -1
  27. package/build/types/mock/OntologiesV2/MediaReferenceProperties.d.ts.map +1 -1
  28. package/package.json +11 -9
@@ -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"
@@ -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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mB;EACpD,OAAO;IACLhB,SAAS,EAAE,WAAW;IACtBC,SAAS,EAAE,gBAAgB;IAC3BL,eAAe;IACfM,UAAU,EAAE;MACVe,SAAS,EAAE;IACb;EACF,CAAC;AACH;AAEA,OAAO,SAASC,cAAcA,CAACjB,SAAiB,EAAgB;EAC9D,OAAO;IACLD,SAAS,EAAE,iBAAiB;IAC5BC,SAAS;IACTL,eAAe;IACfM,UAAU,EAAE,CAAC;EACf,CAAC;AACH;AAEA,OAAO,MAAMiB,sBAAyC,GAAG;EACvDnB,SAAS,EAAE,kBAAkB;EAC7BC,SAAS,EAAE,mBAAmB;EAC9BL,eAAe;EACfM,UAAU,EAAE,CAAC;AACf,CAAC;AAED,OAAO,MAAMkB,uBAAwD,GAAG;EACtEpB,SAAS,EAAE,UAAU;EACrBC,SAAS,EAAE,iCAAiC;EAC5CL,eAAe;EACfM,UAAU,EAAE;IACVmB,WAAW,EACT,yEAAyE;IAC3EC,eAAe,EAAE,QAAQ;IACzBC,OAAO,EAAE;EACX;AACF,CAAC;AAED,OAAO,MAAMC,uBAA2C,GAAG;EACzDxB,SAAS,EAAE,kBAAkB;EAC7BC,SAAS,EAAE,oBAAoB;EAC/BL,eAAe;EACfM,UAAU,EAAE,CAAC;AACf,CAAC;AAED,OAAO,MAAMuB,gCAA6D,GAAG;EAC3EzB,SAAS,EAAE,kBAAkB;EAC7BC,SAAS,EAAE,6BAA6B;EACxCL,eAAe;EACfM,UAAU,EAAE;IACVwB,aAAa,EAAE,QAAQ;IACvBC,cAAc,EAAE;EAClB;AACF,CAAC;AAED,OAAO,MAAMC,uBAA2C,GAAG;EACzD5B,SAAS,EAAE,WAAW;EACtBC,SAAS,EAAE,oBAAoB;EAC/BL,eAAe;EACfM,UAAU,EAAE;IACV2B,aAAa,EACX;EACJ;AACF,CAAC","ignoreList":[]}
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":"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/BC,gBAAgB,EACd,yFAAyF;IAC3FN,eAAe;IACfO,UAAU,EAAE;MACVJ,UAAU;MACVF;IACF;EACF,CAAC;AACH;AAEA,OAAO,SAASO,gBAAgBA,CAC9BL,UAAkB,EAClBM,QAAgB,EACI;EACpB,OAAO;IACLL,SAAS,EAAE,WAA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,SAAS,EAAE,kBAAkB;EAC7BC,SAAS,EAAE,mBAAmB;EAC9BC,gBAAgB,EAAE,EAAE;EACpBN,eAAe;EACfO,UAAU,EAAE,CAAC;AACf,CAAC;AAED,OAAO,MAAMkB,uBAAwD,GAAG;EACtErB,SAAS,EAAE,UAAU;EACrBC,SAAS,EAAE,iCAAiC;EAC5CC,gBAAgB,EACd,kIAAkI;EACpIN,eAAe;EACfO,UAAU,EAAE;IACVmB,WAAW,EACT,yEAAyE;IAC3EC,eAAe,EAAE,QAAQ;IACzBC,OAAO,EAAE;EACX;AACF,CAAC;AAED,OAAO,MAAMC,uBAA2C,GAAG;EACzDzB,SAAS,EAAE,kBAAkB;EAC7BC,SAAS,EAAE,oBAAoB;EAC/BC,gBAAgB,EACd,0JAA0J;EAC5JN,eAAe;EACfO,UAAU,EAAE,CAAC;AACf,CAAC;AAED,OAAO,MAAMuB,gCAA6D,GAAG;EAC3E1B,SAAS,EAAE,kBAAkB;EAC7BC,SAAS,EAAE,6BAA6B;EACxCC,gBAAgB,EACd,8FAA8F;EAChGN,eAAe;EACfO,UAAU,EAAE;IACVwB,aAAa,EAAE,QAAQ;IACvBC,cAAc,EAAE;EAClB;AACF,CAAC;AAED,OAAO,MAAMC,uBAA2C,GAAG;EACzD7B,SAAS,EAAE,WAAW;EACtBC,SAAS,EAAE,oBAAoB;EAC/BC,gBAAgB,EACd,8WAA8W;EAChXN,eAAe;EACfO,UAAU,EAAE;IACV2B,aAAa,EACX;EACJ;AACF,CAAC","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(MediaReferenceProperties.uploadMedia, ["ontologyApiName", "actionTypeApiName"]);
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 \"ontologyApiName\" | \"actionTypeApiName\",\n typeof MediaReferenceProperties.uploadMedia\n> = handleOpenApiCall(\n MediaReferenceProperties.uploadMedia,\n [\"ontologyApiName\", \"actionTypeApiName\"],\n);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,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,CACnBD,wBAAwB,CAACK,WAAW,EACpC,CAAC,iBAAiB,EAAE,mBAAmB,CACzC,CAAC","ignoreList":[]}
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":[]}