@osdk/internal.foundry.mediasets 0.0.0
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/README.md +8 -0
- package/build/browser/_components.d.ts +67 -0
- package/build/browser/_components.d.ts.map +1 -0
- package/build/browser/_components.js +17 -0
- package/build/browser/_components.js.map +1 -0
- package/build/browser/_errors.d.ts +29 -0
- package/build/browser/_errors.d.ts.map +1 -0
- package/build/browser/_errors.js +17 -0
- package/build/browser/_errors.js.map +1 -0
- package/build/browser/index.d.ts +4 -0
- package/build/browser/index.d.ts.map +1 -0
- package/build/browser/index.js +17 -0
- package/build/browser/index.js.map +1 -0
- package/build/browser/public/MediaSet.d.ts +105 -0
- package/build/browser/public/MediaSet.d.ts.map +1 -0
- package/build/browser/public/MediaSet.js +118 -0
- package/build/browser/public/MediaSet.js.map +1 -0
- package/build/esm/_components.d.ts +67 -0
- package/build/esm/_components.d.ts.map +1 -0
- package/build/esm/_components.js +17 -0
- package/build/esm/_components.js.map +1 -0
- package/build/esm/_errors.d.ts +29 -0
- package/build/esm/_errors.d.ts.map +1 -0
- package/build/esm/_errors.js +17 -0
- package/build/esm/_errors.js.map +1 -0
- package/build/esm/index.d.ts +4 -0
- package/build/esm/index.d.ts.map +1 -0
- package/build/esm/index.js +17 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/public/MediaSet.d.ts +105 -0
- package/build/esm/public/MediaSet.d.ts.map +1 -0
- package/build/esm/public/MediaSet.js +118 -0
- package/build/esm/public/MediaSet.js.map +1 -0
- package/package.json +63 -0
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type * as _Core from "@osdk/internal.foundry.core";
|
|
2
|
+
export type LooselyBrandedString<T extends string> = string & {
|
|
3
|
+
__LOOSE_BRAND?: T;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Log Safety: SAFE
|
|
7
|
+
*/
|
|
8
|
+
export interface MediaAttribution {
|
|
9
|
+
creatorId: _Core.UserId;
|
|
10
|
+
creationTimestamp: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A name for a media set branch. Valid branch names must be (a) non-empty, (b) less than 256 characters, and
|
|
14
|
+
(c) not a valid ResourceIdentifier.
|
|
15
|
+
*
|
|
16
|
+
* Log Safety: UNSAFE
|
|
17
|
+
*/
|
|
18
|
+
export type BranchName = LooselyBrandedString<"BranchName">;
|
|
19
|
+
/**
|
|
20
|
+
* A number representing a logical ordering to be used for transactions, etc.
|
|
21
|
+
This can be interpreted as a timestamp in microseconds, but may differ slightly from system clock time due
|
|
22
|
+
to clock drift and slight adjustments for the sake of ordering.
|
|
23
|
+
Only positive timestamps (representing times after epoch) are supported.
|
|
24
|
+
*
|
|
25
|
+
* Log Safety: SAFE
|
|
26
|
+
*/
|
|
27
|
+
export type LogicalTimestamp = string;
|
|
28
|
+
/**
|
|
29
|
+
* Log Safety: UNSAFE
|
|
30
|
+
*/
|
|
31
|
+
export interface GetMediaItemInfoResponse {
|
|
32
|
+
viewRid: _Core.MediaSetViewRid;
|
|
33
|
+
path?: _Core.MediaItemPath;
|
|
34
|
+
logicalTimestamp: LogicalTimestamp;
|
|
35
|
+
attribution?: MediaAttribution;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Log Safety: UNSAFE
|
|
39
|
+
*/
|
|
40
|
+
export type MediaSetName = LooselyBrandedString<"MediaSetName">;
|
|
41
|
+
/**
|
|
42
|
+
* An identifier which represents a transaction on a media set.
|
|
43
|
+
*
|
|
44
|
+
* Log Safety: SAFE
|
|
45
|
+
*/
|
|
46
|
+
export type TransactionId = string;
|
|
47
|
+
/**
|
|
48
|
+
* Log Safety: SAFE
|
|
49
|
+
*/
|
|
50
|
+
export interface PutMediaItemResponse {
|
|
51
|
+
mediaItemRid: _Core.MediaItemRid;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A resource identifier that identifies a branch of a media set.
|
|
55
|
+
*
|
|
56
|
+
* Log Safety: SAFE
|
|
57
|
+
*/
|
|
58
|
+
export type BranchRid = LooselyBrandedString<"BranchRid">;
|
|
59
|
+
/**
|
|
60
|
+
* Log Safety: UNSAFE
|
|
61
|
+
*/
|
|
62
|
+
export interface MediaSet {
|
|
63
|
+
rid: _Core.MediaSetRid;
|
|
64
|
+
name: MediaSetName;
|
|
65
|
+
parentFolderRid: _Core.FolderRid;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=_components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_components.d.ts","sourceRoot":"","sources":["../../src/_components.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,KAAK,MAAM,6BAA6B,CAAC;AAE1D,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,GAAG;IAC5D,aAAa,CAAC,EAAE,CAAC,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;KAKK;AACL,MAAM,MAAM,UAAU,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC;AAE5D;;;;;;;KAOK;AACL,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,KAAK,CAAC,eAAe,CAAC;IAC/B,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC3B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,oBAAoB,CAAC,cAAc,CAAC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC;CAClC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=_components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_components.js","names":[],"sources":["_components.js"],"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 */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type LooselyBrandedString<T extends string> = string & {
|
|
2
|
+
__LOOSE_BRAND?: T;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* The requested media item could not be found, or the client token does not have access to it.
|
|
6
|
+
*
|
|
7
|
+
* Log Safety: SAFE
|
|
8
|
+
*/
|
|
9
|
+
export interface MediaItemNotFound {
|
|
10
|
+
errorCode: "NOT_FOUND";
|
|
11
|
+
errorName: "MediaItemNotFound";
|
|
12
|
+
errorInstanceId: string;
|
|
13
|
+
parameters: {
|
|
14
|
+
mediaSetRid: unknown;
|
|
15
|
+
mediaItemRid: unknown;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Client provided more than one of branch name, branch rid, or view rid as arguments. Only one may be specified.
|
|
20
|
+
*
|
|
21
|
+
* Log Safety: SAFE
|
|
22
|
+
*/
|
|
23
|
+
export interface ConflictingMediaSetIdentifiers {
|
|
24
|
+
errorCode: "INVALID_ARGUMENT";
|
|
25
|
+
errorName: "ConflictingMediaSetIdentifiers";
|
|
26
|
+
errorInstanceId: string;
|
|
27
|
+
parameters: {};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=_errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_errors.d.ts","sourceRoot":"","sources":["../../src/_errors.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,GAAG;IAC5D,aAAa,CAAC,EAAE,CAAC,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,WAAW,CAAC;IACvB,SAAS,EAAE,mBAAmB,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,WAAW,EAAE,OAAO,CAAC;QACrB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,gCAAgC,CAAC;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,EAAE,CAAC;CAChB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=_errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_errors.js","names":[],"sources":["_errors.js"],"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 */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { BranchName, BranchRid, GetMediaItemInfoResponse, LogicalTimestamp, MediaAttribution, MediaSet, MediaSetName, PutMediaItemResponse, TransactionId, } from "./_components.js";
|
|
2
|
+
export type { ConflictingMediaSetIdentifiers, MediaItemNotFound, } from "./_errors.js";
|
|
3
|
+
export * as MediaSets from "./public/MediaSet.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EACV,UAAU,EACV,SAAS,EACT,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,8BAA8B,EAC9B,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
export * as MediaSets from "./public/MediaSet.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["MediaSets"],"sources":["index.js"],"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 */\nexport * as MediaSets from \"./public/MediaSet.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,SAAS,MAAM,sBAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type * as _Core from "@osdk/internal.foundry.core";
|
|
2
|
+
import type { SharedClient as $OldClient, SharedClientContext as $OldClientContext } from "@osdk/shared.client";
|
|
3
|
+
import type { SharedClient as $Client, SharedClientContext as $ClientContext } from "@osdk/shared.client2";
|
|
4
|
+
import type * as _Mediasets from "../_components.js";
|
|
5
|
+
/**
|
|
6
|
+
* Gets the content of a media item.
|
|
7
|
+
*
|
|
8
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.
|
|
9
|
+
*
|
|
10
|
+
* @alpha
|
|
11
|
+
*
|
|
12
|
+
* Required Scopes: [api:mediasets-read]
|
|
13
|
+
* URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}
|
|
14
|
+
*/
|
|
15
|
+
export declare function read($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [mediaSetRid: _Core.MediaSetRid, mediaItemRid: _Core.MediaItemRid]): Promise<Response>;
|
|
16
|
+
/**
|
|
17
|
+
* Gets information about the media item.
|
|
18
|
+
*
|
|
19
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.
|
|
20
|
+
*
|
|
21
|
+
* @alpha
|
|
22
|
+
*
|
|
23
|
+
* Required Scopes: [api:mediasets-read]
|
|
24
|
+
* URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/info
|
|
25
|
+
*/
|
|
26
|
+
export declare function info($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [mediaSetRid: _Core.MediaSetRid, mediaItemRid: _Core.MediaItemRid]): Promise<_Mediasets.GetMediaItemInfoResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Gets the [media reference](https://www.palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item.
|
|
29
|
+
*
|
|
30
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.
|
|
31
|
+
*
|
|
32
|
+
* @alpha
|
|
33
|
+
*
|
|
34
|
+
* Required Scopes: [api:mediasets-read]
|
|
35
|
+
* URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference
|
|
36
|
+
*/
|
|
37
|
+
export declare function reference($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [mediaSetRid: _Core.MediaSetRid, mediaItemRid: _Core.MediaItemRid]): Promise<_Core.MediaReference>;
|
|
38
|
+
/**
|
|
39
|
+
* Uploads a media item to an existing media set.
|
|
40
|
+
* The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.
|
|
41
|
+
* A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown.
|
|
42
|
+
*
|
|
43
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
44
|
+
*
|
|
45
|
+
* @alpha
|
|
46
|
+
*
|
|
47
|
+
* Required Scopes: [api:mediasets-write]
|
|
48
|
+
* URL: /v2/mediasets/{mediaSetRid}/items
|
|
49
|
+
*/
|
|
50
|
+
export declare function upload($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
51
|
+
mediaSetRid: _Core.MediaSetRid,
|
|
52
|
+
$body: Blob,
|
|
53
|
+
$queryParams?: {
|
|
54
|
+
mediaItemPath?: _Core.MediaItemPath | undefined;
|
|
55
|
+
branchName?: _Mediasets.BranchName | undefined;
|
|
56
|
+
branchRid?: _Mediasets.BranchRid | undefined;
|
|
57
|
+
viewRid?: _Core.MediaSetViewRid | undefined;
|
|
58
|
+
transactionId?: _Mediasets.TransactionId | undefined;
|
|
59
|
+
}
|
|
60
|
+
]): Promise<_Mediasets.PutMediaItemResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed.
|
|
63
|
+
*
|
|
64
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
65
|
+
*
|
|
66
|
+
* @alpha
|
|
67
|
+
*
|
|
68
|
+
* Required Scopes: [api:mediasets-write]
|
|
69
|
+
* URL: /v2/mediasets/{mediaSetRid}/transactions
|
|
70
|
+
*/
|
|
71
|
+
export declare function create($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
72
|
+
mediaSetRid: _Core.MediaSetRid,
|
|
73
|
+
$queryParams?: {
|
|
74
|
+
branchName?: _Mediasets.BranchName | undefined;
|
|
75
|
+
}
|
|
76
|
+
]): Promise<_Mediasets.TransactionId>;
|
|
77
|
+
/**
|
|
78
|
+
* Commits an open transaction. On success, items uploaded to the media set during this transaction will become available.
|
|
79
|
+
*
|
|
80
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
81
|
+
*
|
|
82
|
+
* @alpha
|
|
83
|
+
*
|
|
84
|
+
* Required Scopes: [api:mediasets-write]
|
|
85
|
+
* URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit
|
|
86
|
+
*/
|
|
87
|
+
export declare function commit($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
88
|
+
mediaSetRid: _Core.MediaSetRid,
|
|
89
|
+
transactionId: _Mediasets.TransactionId
|
|
90
|
+
]): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted.
|
|
93
|
+
*
|
|
94
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
95
|
+
*
|
|
96
|
+
* @alpha
|
|
97
|
+
*
|
|
98
|
+
* Required Scopes: [api:mediasets-write]
|
|
99
|
+
* URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort
|
|
100
|
+
*/
|
|
101
|
+
export declare function abort($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
102
|
+
mediaSetRid: _Core.MediaSetRid,
|
|
103
|
+
transactionId: _Mediasets.TransactionId
|
|
104
|
+
]): Promise<void>;
|
|
105
|
+
//# sourceMappingURL=MediaSet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaSet.d.ts","sourceRoot":"","sources":["../../../src/public/MediaSet.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,KAAK,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,EACV,YAAY,IAAI,UAAU,EAC1B,mBAAmB,IAAI,iBAAiB,EACzC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,YAAY,IAAI,OAAO,EACvB,mBAAmB,IAAI,cAAc,EACtC,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAWrD;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAClB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,YAAY,EAAE,KAAK,CAAC,Y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AG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,WAAW,EAAE,KAAK,CAAC,WAAW;IAE9B,YAAY,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,UAAU,CAAC,UAAU,GAAG,SAAS,CAAA;KAAE;CAClE,GACA,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAEnC;AASD;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,WAAW,EAAE,KAAK,CAAC,WAAW;IAC9B,aAAa,EAAE,UAAU,CAAC,aAAa;CACxC,GACA,OAAO,CAAC,IAAI,CAAC,CAEf;AASD;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CACnB,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,iBAAiB,EAC/D,GAAG,IAAI,EAAE;IACP,WAAW,EAAE,KAAK,CAAC,WAAW;IAC9B,aAAa,EAAE,UAAU,CAAC,aAAa;CACxC,GACA,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
import { foundryPlatformFetch as $foundryPlatformFetch } from "@osdk/shared.net.platformapi";
|
|
17
|
+
//
|
|
18
|
+
const _read = [0, "/v2/mediasets/{0}/items/{1}",,, "*/*"];
|
|
19
|
+
/**
|
|
20
|
+
* Gets the content of a media item.
|
|
21
|
+
*
|
|
22
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.
|
|
23
|
+
*
|
|
24
|
+
* @alpha
|
|
25
|
+
*
|
|
26
|
+
* Required Scopes: [api:mediasets-read]
|
|
27
|
+
* URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}
|
|
28
|
+
*/
|
|
29
|
+
export function read($ctx, ...args) {
|
|
30
|
+
return $foundryPlatformFetch($ctx, _read, ...args);
|
|
31
|
+
}
|
|
32
|
+
const _info = [0, "/v2/mediasets/{0}/items/{1}/info"];
|
|
33
|
+
/**
|
|
34
|
+
* Gets information about the media item.
|
|
35
|
+
*
|
|
36
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.
|
|
37
|
+
*
|
|
38
|
+
* @alpha
|
|
39
|
+
*
|
|
40
|
+
* Required Scopes: [api:mediasets-read]
|
|
41
|
+
* URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/info
|
|
42
|
+
*/
|
|
43
|
+
export function info($ctx, ...args) {
|
|
44
|
+
return $foundryPlatformFetch($ctx, _info, ...args);
|
|
45
|
+
}
|
|
46
|
+
const _reference = [0, "/v2/mediasets/{0}/items/{1}/reference"];
|
|
47
|
+
/**
|
|
48
|
+
* Gets the [media reference](https://www.palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item.
|
|
49
|
+
*
|
|
50
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.
|
|
51
|
+
*
|
|
52
|
+
* @alpha
|
|
53
|
+
*
|
|
54
|
+
* Required Scopes: [api:mediasets-read]
|
|
55
|
+
* URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference
|
|
56
|
+
*/
|
|
57
|
+
export function reference($ctx, ...args) {
|
|
58
|
+
return $foundryPlatformFetch($ctx, _reference, ...args);
|
|
59
|
+
}
|
|
60
|
+
const _upload = [1, "/v2/mediasets/{0}/items", 3, "*/*"];
|
|
61
|
+
/**
|
|
62
|
+
* Uploads a media item to an existing media set.
|
|
63
|
+
* The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.
|
|
64
|
+
* A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown.
|
|
65
|
+
*
|
|
66
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
67
|
+
*
|
|
68
|
+
* @alpha
|
|
69
|
+
*
|
|
70
|
+
* Required Scopes: [api:mediasets-write]
|
|
71
|
+
* URL: /v2/mediasets/{mediaSetRid}/items
|
|
72
|
+
*/
|
|
73
|
+
export function upload($ctx, ...args) {
|
|
74
|
+
return $foundryPlatformFetch($ctx, _upload, ...args);
|
|
75
|
+
}
|
|
76
|
+
const _create = [1, "/v2/mediasets/{0}/transactions", 2];
|
|
77
|
+
/**
|
|
78
|
+
* Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed.
|
|
79
|
+
*
|
|
80
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
81
|
+
*
|
|
82
|
+
* @alpha
|
|
83
|
+
*
|
|
84
|
+
* Required Scopes: [api:mediasets-write]
|
|
85
|
+
* URL: /v2/mediasets/{mediaSetRid}/transactions
|
|
86
|
+
*/
|
|
87
|
+
export function create($ctx, ...args) {
|
|
88
|
+
return $foundryPlatformFetch($ctx, _create, ...args);
|
|
89
|
+
}
|
|
90
|
+
const _commit = [1, "/v2/mediasets/{0}/transactions/{1}/commit"];
|
|
91
|
+
/**
|
|
92
|
+
* Commits an open transaction. On success, items uploaded to the media set during this transaction will become available.
|
|
93
|
+
*
|
|
94
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
95
|
+
*
|
|
96
|
+
* @alpha
|
|
97
|
+
*
|
|
98
|
+
* Required Scopes: [api:mediasets-write]
|
|
99
|
+
* URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit
|
|
100
|
+
*/
|
|
101
|
+
export function commit($ctx, ...args) {
|
|
102
|
+
return $foundryPlatformFetch($ctx, _commit, ...args);
|
|
103
|
+
}
|
|
104
|
+
const _abort = [1, "/v2/mediasets/{0}/transactions/{1}/abort"];
|
|
105
|
+
/**
|
|
106
|
+
* Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted.
|
|
107
|
+
*
|
|
108
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
109
|
+
*
|
|
110
|
+
* @alpha
|
|
111
|
+
*
|
|
112
|
+
* Required Scopes: [api:mediasets-write]
|
|
113
|
+
* URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort
|
|
114
|
+
*/
|
|
115
|
+
export function abort($ctx, ...args) {
|
|
116
|
+
return $foundryPlatformFetch($ctx, _abort, ...args);
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=MediaSet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaSet.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_read","read","$ctx","args","_info","info","_reference","reference","_upload","upload","_create","create","_commit","commit","_abort","abort"],"sources":["MediaSet.js"],"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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _read = [0, \"/v2/mediasets/{0}/items/{1}\", , , \"*/*\"];\n/**\n * Gets the content of a media item.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}\n */\nexport function read($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _read, ...args);\n}\nconst _info = [0, \"/v2/mediasets/{0}/items/{1}/info\"];\n/**\n * Gets information about the media item.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/info\n */\nexport function info($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _info, ...args);\n}\nconst _reference = [0, \"/v2/mediasets/{0}/items/{1}/reference\"];\n/**\n * Gets the [media reference](https://www.palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference\n */\nexport function reference($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _reference, ...args);\n}\nconst _upload = [1, \"/v2/mediasets/{0}/items\", 3, \"*/*\"];\n/**\n * Uploads a media item to an existing media set.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n * A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/items\n */\nexport function upload($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _upload, ...args);\n}\nconst _create = [1, \"/v2/mediasets/{0}/transactions\", 2];\n/**\n * Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions\n */\nexport function create($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _create, ...args);\n}\nconst _commit = [1, \"/v2/mediasets/{0}/transactions/{1}/commit\"];\n/**\n * Commits an open transaction. On success, items uploaded to the media set during this transaction will become available.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit\n */\nexport function commit($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _commit, ...args);\n}\nconst _abort = [1, \"/v2/mediasets/{0}/transactions/{1}/abort\"];\n/**\n * Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort\n */\nexport function abort($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _abort, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,KAAK,GAAG,CAAC,CAAC,EAAE,6BAA6B,IAAM,KAAK,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EAChC,OAAOJ,qBA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IAAI,EAAE,GAAGC,IAAI,EAAE;EAClC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEU,OAAO,EAAE,GAAGT,IAAI,CAAC;AACxD;AACA,MAAMW,MAAM,GAAG,CAAC,CAAC,EAAE,0CAA0C,CAAC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,KAAKA,CAACb,IAAI,EAAE,GAAGC,IAAI,EAAE;EACjC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEY,MAAM,EAAE,GAAGX,IAAI,CAAC;AACvD","ignoreList":[]}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type * as _Core from "@osdk/internal.foundry.core";
|
|
2
|
+
export type LooselyBrandedString<T extends string> = string & {
|
|
3
|
+
__LOOSE_BRAND?: T;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Log Safety: SAFE
|
|
7
|
+
*/
|
|
8
|
+
export interface MediaAttribution {
|
|
9
|
+
creatorId: _Core.UserId;
|
|
10
|
+
creationTimestamp: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A name for a media set branch. Valid branch names must be (a) non-empty, (b) less than 256 characters, and
|
|
14
|
+
(c) not a valid ResourceIdentifier.
|
|
15
|
+
*
|
|
16
|
+
* Log Safety: UNSAFE
|
|
17
|
+
*/
|
|
18
|
+
export type BranchName = LooselyBrandedString<"BranchName">;
|
|
19
|
+
/**
|
|
20
|
+
* A number representing a logical ordering to be used for transactions, etc.
|
|
21
|
+
This can be interpreted as a timestamp in microseconds, but may differ slightly from system clock time due
|
|
22
|
+
to clock drift and slight adjustments for the sake of ordering.
|
|
23
|
+
Only positive timestamps (representing times after epoch) are supported.
|
|
24
|
+
*
|
|
25
|
+
* Log Safety: SAFE
|
|
26
|
+
*/
|
|
27
|
+
export type LogicalTimestamp = string;
|
|
28
|
+
/**
|
|
29
|
+
* Log Safety: UNSAFE
|
|
30
|
+
*/
|
|
31
|
+
export interface GetMediaItemInfoResponse {
|
|
32
|
+
viewRid: _Core.MediaSetViewRid;
|
|
33
|
+
path?: _Core.MediaItemPath;
|
|
34
|
+
logicalTimestamp: LogicalTimestamp;
|
|
35
|
+
attribution?: MediaAttribution;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Log Safety: UNSAFE
|
|
39
|
+
*/
|
|
40
|
+
export type MediaSetName = LooselyBrandedString<"MediaSetName">;
|
|
41
|
+
/**
|
|
42
|
+
* An identifier which represents a transaction on a media set.
|
|
43
|
+
*
|
|
44
|
+
* Log Safety: SAFE
|
|
45
|
+
*/
|
|
46
|
+
export type TransactionId = string;
|
|
47
|
+
/**
|
|
48
|
+
* Log Safety: SAFE
|
|
49
|
+
*/
|
|
50
|
+
export interface PutMediaItemResponse {
|
|
51
|
+
mediaItemRid: _Core.MediaItemRid;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A resource identifier that identifies a branch of a media set.
|
|
55
|
+
*
|
|
56
|
+
* Log Safety: SAFE
|
|
57
|
+
*/
|
|
58
|
+
export type BranchRid = LooselyBrandedString<"BranchRid">;
|
|
59
|
+
/**
|
|
60
|
+
* Log Safety: UNSAFE
|
|
61
|
+
*/
|
|
62
|
+
export interface MediaSet {
|
|
63
|
+
rid: _Core.MediaSetRid;
|
|
64
|
+
name: MediaSetName;
|
|
65
|
+
parentFolderRid: _Core.FolderRid;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=_components.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_components.d.ts","sourceRoot":"","sources":["../../src/_components.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,KAAK,KAAK,MAAM,6BAA6B,CAAC;AAE1D,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,GAAG;IAC5D,aAAa,CAAC,EAAE,CAAC,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;KAKK;AACL,MAAM,MAAM,UAAU,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC;AAE5D;;;;;;;KAOK;AACL,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,KAAK,CAAC,eAAe,CAAC;IAC/B,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC3B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,oBAAoB,CAAC,cAAc,CAAC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC;IACvB,IAAI,EAAE,YAAY,CAAC;IACnB,eAAe,EAAE,KAAK,CAAC,SAAS,CAAC;CAClC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=_components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_components.js","names":[],"sources":["_components.js"],"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 */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type LooselyBrandedString<T extends string> = string & {
|
|
2
|
+
__LOOSE_BRAND?: T;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* The requested media item could not be found, or the client token does not have access to it.
|
|
6
|
+
*
|
|
7
|
+
* Log Safety: SAFE
|
|
8
|
+
*/
|
|
9
|
+
export interface MediaItemNotFound {
|
|
10
|
+
errorCode: "NOT_FOUND";
|
|
11
|
+
errorName: "MediaItemNotFound";
|
|
12
|
+
errorInstanceId: string;
|
|
13
|
+
parameters: {
|
|
14
|
+
mediaSetRid: unknown;
|
|
15
|
+
mediaItemRid: unknown;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Client provided more than one of branch name, branch rid, or view rid as arguments. Only one may be specified.
|
|
20
|
+
*
|
|
21
|
+
* Log Safety: SAFE
|
|
22
|
+
*/
|
|
23
|
+
export interface ConflictingMediaSetIdentifiers {
|
|
24
|
+
errorCode: "INVALID_ARGUMENT";
|
|
25
|
+
errorName: "ConflictingMediaSetIdentifiers";
|
|
26
|
+
errorInstanceId: string;
|
|
27
|
+
parameters: {};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=_errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_errors.d.ts","sourceRoot":"","sources":["../../src/_errors.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,GAAG;IAC5D,aAAa,CAAC,EAAE,CAAC,CAAC;CACnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,WAAW,CAAC;IACvB,SAAS,EAAE,mBAAmB,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE;QACV,WAAW,EAAE,OAAO,CAAC;QACrB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC7C,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,gCAAgC,CAAC;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,EAAE,CAAC;CAChB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=_errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_errors.js","names":[],"sources":["_errors.js"],"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 */\nexport {};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { BranchName, BranchRid, GetMediaItemInfoResponse, LogicalTimestamp, MediaAttribution, MediaSet, MediaSetName, PutMediaItemResponse, TransactionId, } from "./_components.js";
|
|
2
|
+
export type { ConflictingMediaSetIdentifiers, MediaItemNotFound, } from "./_errors.js";
|
|
3
|
+
export * as MediaSets from "./public/MediaSet.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EACV,UAAU,EACV,SAAS,EACT,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,8BAA8B,EAC9B,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
export * as MediaSets from "./public/MediaSet.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["MediaSets"],"sources":["index.js"],"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 */\nexport * as MediaSets from \"./public/MediaSet.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,SAAS,MAAM,sBAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type * as _Core from "@osdk/internal.foundry.core";
|
|
2
|
+
import type { SharedClient as $OldClient, SharedClientContext as $OldClientContext } from "@osdk/shared.client";
|
|
3
|
+
import type { SharedClient as $Client, SharedClientContext as $ClientContext } from "@osdk/shared.client2";
|
|
4
|
+
import type * as _Mediasets from "../_components.js";
|
|
5
|
+
/**
|
|
6
|
+
* Gets the content of a media item.
|
|
7
|
+
*
|
|
8
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.
|
|
9
|
+
*
|
|
10
|
+
* @alpha
|
|
11
|
+
*
|
|
12
|
+
* Required Scopes: [api:mediasets-read]
|
|
13
|
+
* URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}
|
|
14
|
+
*/
|
|
15
|
+
export declare function read($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [mediaSetRid: _Core.MediaSetRid, mediaItemRid: _Core.MediaItemRid]): Promise<Response>;
|
|
16
|
+
/**
|
|
17
|
+
* Gets information about the media item.
|
|
18
|
+
*
|
|
19
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.
|
|
20
|
+
*
|
|
21
|
+
* @alpha
|
|
22
|
+
*
|
|
23
|
+
* Required Scopes: [api:mediasets-read]
|
|
24
|
+
* URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/info
|
|
25
|
+
*/
|
|
26
|
+
export declare function info($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [mediaSetRid: _Core.MediaSetRid, mediaItemRid: _Core.MediaItemRid]): Promise<_Mediasets.GetMediaItemInfoResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Gets the [media reference](https://www.palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item.
|
|
29
|
+
*
|
|
30
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.
|
|
31
|
+
*
|
|
32
|
+
* @alpha
|
|
33
|
+
*
|
|
34
|
+
* Required Scopes: [api:mediasets-read]
|
|
35
|
+
* URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference
|
|
36
|
+
*/
|
|
37
|
+
export declare function reference($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [mediaSetRid: _Core.MediaSetRid, mediaItemRid: _Core.MediaItemRid]): Promise<_Core.MediaReference>;
|
|
38
|
+
/**
|
|
39
|
+
* Uploads a media item to an existing media set.
|
|
40
|
+
* The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.
|
|
41
|
+
* A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown.
|
|
42
|
+
*
|
|
43
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
44
|
+
*
|
|
45
|
+
* @alpha
|
|
46
|
+
*
|
|
47
|
+
* Required Scopes: [api:mediasets-write]
|
|
48
|
+
* URL: /v2/mediasets/{mediaSetRid}/items
|
|
49
|
+
*/
|
|
50
|
+
export declare function upload($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
51
|
+
mediaSetRid: _Core.MediaSetRid,
|
|
52
|
+
$body: Blob,
|
|
53
|
+
$queryParams?: {
|
|
54
|
+
mediaItemPath?: _Core.MediaItemPath | undefined;
|
|
55
|
+
branchName?: _Mediasets.BranchName | undefined;
|
|
56
|
+
branchRid?: _Mediasets.BranchRid | undefined;
|
|
57
|
+
viewRid?: _Core.MediaSetViewRid | undefined;
|
|
58
|
+
transactionId?: _Mediasets.TransactionId | undefined;
|
|
59
|
+
}
|
|
60
|
+
]): Promise<_Mediasets.PutMediaItemResponse>;
|
|
61
|
+
/**
|
|
62
|
+
* Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed.
|
|
63
|
+
*
|
|
64
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
65
|
+
*
|
|
66
|
+
* @alpha
|
|
67
|
+
*
|
|
68
|
+
* Required Scopes: [api:mediasets-write]
|
|
69
|
+
* URL: /v2/mediasets/{mediaSetRid}/transactions
|
|
70
|
+
*/
|
|
71
|
+
export declare function create($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
72
|
+
mediaSetRid: _Core.MediaSetRid,
|
|
73
|
+
$queryParams?: {
|
|
74
|
+
branchName?: _Mediasets.BranchName | undefined;
|
|
75
|
+
}
|
|
76
|
+
]): Promise<_Mediasets.TransactionId>;
|
|
77
|
+
/**
|
|
78
|
+
* Commits an open transaction. On success, items uploaded to the media set during this transaction will become available.
|
|
79
|
+
*
|
|
80
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
81
|
+
*
|
|
82
|
+
* @alpha
|
|
83
|
+
*
|
|
84
|
+
* Required Scopes: [api:mediasets-write]
|
|
85
|
+
* URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit
|
|
86
|
+
*/
|
|
87
|
+
export declare function commit($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
88
|
+
mediaSetRid: _Core.MediaSetRid,
|
|
89
|
+
transactionId: _Mediasets.TransactionId
|
|
90
|
+
]): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted.
|
|
93
|
+
*
|
|
94
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
95
|
+
*
|
|
96
|
+
* @alpha
|
|
97
|
+
*
|
|
98
|
+
* Required Scopes: [api:mediasets-write]
|
|
99
|
+
* URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort
|
|
100
|
+
*/
|
|
101
|
+
export declare function abort($ctx: $Client | $ClientContext | $OldClient | $OldClientContext, ...args: [
|
|
102
|
+
mediaSetRid: _Core.MediaSetRid,
|
|
103
|
+
transactionId: _Mediasets.TransactionId
|
|
104
|
+
]): Promise<void>;
|
|
105
|
+
//# sourceMappingURL=MediaS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;IAC9B,aAAa,EAAE,UAAU,CAAC,aAAa;CACxC,GACA,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
import { foundryPlatformFetch as $foundryPlatformFetch } from "@osdk/shared.net.platformapi";
|
|
17
|
+
//
|
|
18
|
+
const _read = [0, "/v2/mediasets/{0}/items/{1}",,, "*/*"];
|
|
19
|
+
/**
|
|
20
|
+
* Gets the content of a media item.
|
|
21
|
+
*
|
|
22
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.
|
|
23
|
+
*
|
|
24
|
+
* @alpha
|
|
25
|
+
*
|
|
26
|
+
* Required Scopes: [api:mediasets-read]
|
|
27
|
+
* URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}
|
|
28
|
+
*/
|
|
29
|
+
export function read($ctx, ...args) {
|
|
30
|
+
return $foundryPlatformFetch($ctx, _read, ...args);
|
|
31
|
+
}
|
|
32
|
+
const _info = [0, "/v2/mediasets/{0}/items/{1}/info"];
|
|
33
|
+
/**
|
|
34
|
+
* Gets information about the media item.
|
|
35
|
+
*
|
|
36
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.
|
|
37
|
+
*
|
|
38
|
+
* @alpha
|
|
39
|
+
*
|
|
40
|
+
* Required Scopes: [api:mediasets-read]
|
|
41
|
+
* URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/info
|
|
42
|
+
*/
|
|
43
|
+
export function info($ctx, ...args) {
|
|
44
|
+
return $foundryPlatformFetch($ctx, _info, ...args);
|
|
45
|
+
}
|
|
46
|
+
const _reference = [0, "/v2/mediasets/{0}/items/{1}/reference"];
|
|
47
|
+
/**
|
|
48
|
+
* Gets the [media reference](https://www.palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item.
|
|
49
|
+
*
|
|
50
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.
|
|
51
|
+
*
|
|
52
|
+
* @alpha
|
|
53
|
+
*
|
|
54
|
+
* Required Scopes: [api:mediasets-read]
|
|
55
|
+
* URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference
|
|
56
|
+
*/
|
|
57
|
+
export function reference($ctx, ...args) {
|
|
58
|
+
return $foundryPlatformFetch($ctx, _reference, ...args);
|
|
59
|
+
}
|
|
60
|
+
const _upload = [1, "/v2/mediasets/{0}/items", 3, "*/*"];
|
|
61
|
+
/**
|
|
62
|
+
* Uploads a media item to an existing media set.
|
|
63
|
+
* The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.
|
|
64
|
+
* A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown.
|
|
65
|
+
*
|
|
66
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
67
|
+
*
|
|
68
|
+
* @alpha
|
|
69
|
+
*
|
|
70
|
+
* Required Scopes: [api:mediasets-write]
|
|
71
|
+
* URL: /v2/mediasets/{mediaSetRid}/items
|
|
72
|
+
*/
|
|
73
|
+
export function upload($ctx, ...args) {
|
|
74
|
+
return $foundryPlatformFetch($ctx, _upload, ...args);
|
|
75
|
+
}
|
|
76
|
+
const _create = [1, "/v2/mediasets/{0}/transactions", 2];
|
|
77
|
+
/**
|
|
78
|
+
* Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed.
|
|
79
|
+
*
|
|
80
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
81
|
+
*
|
|
82
|
+
* @alpha
|
|
83
|
+
*
|
|
84
|
+
* Required Scopes: [api:mediasets-write]
|
|
85
|
+
* URL: /v2/mediasets/{mediaSetRid}/transactions
|
|
86
|
+
*/
|
|
87
|
+
export function create($ctx, ...args) {
|
|
88
|
+
return $foundryPlatformFetch($ctx, _create, ...args);
|
|
89
|
+
}
|
|
90
|
+
const _commit = [1, "/v2/mediasets/{0}/transactions/{1}/commit"];
|
|
91
|
+
/**
|
|
92
|
+
* Commits an open transaction. On success, items uploaded to the media set during this transaction will become available.
|
|
93
|
+
*
|
|
94
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
95
|
+
*
|
|
96
|
+
* @alpha
|
|
97
|
+
*
|
|
98
|
+
* Required Scopes: [api:mediasets-write]
|
|
99
|
+
* URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit
|
|
100
|
+
*/
|
|
101
|
+
export function commit($ctx, ...args) {
|
|
102
|
+
return $foundryPlatformFetch($ctx, _commit, ...args);
|
|
103
|
+
}
|
|
104
|
+
const _abort = [1, "/v2/mediasets/{0}/transactions/{1}/abort"];
|
|
105
|
+
/**
|
|
106
|
+
* Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted.
|
|
107
|
+
*
|
|
108
|
+
* Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.
|
|
109
|
+
*
|
|
110
|
+
* @alpha
|
|
111
|
+
*
|
|
112
|
+
* Required Scopes: [api:mediasets-write]
|
|
113
|
+
* URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort
|
|
114
|
+
*/
|
|
115
|
+
export function abort($ctx, ...args) {
|
|
116
|
+
return $foundryPlatformFetch($ctx, _abort, ...args);
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=MediaSet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaSet.js","names":["foundryPlatformFetch","$foundryPlatformFetch","_read","read","$ctx","args","_info","info","_reference","reference","_upload","upload","_create","create","_commit","commit","_abort","abort"],"sources":["MediaSet.js"],"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 */\nimport { foundryPlatformFetch as $foundryPlatformFetch } from \"@osdk/shared.net.platformapi\";\n//\nconst _read = [0, \"/v2/mediasets/{0}/items/{1}\", , , \"*/*\"];\n/**\n * Gets the content of a media item.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}\n */\nexport function read($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _read, ...args);\n}\nconst _info = [0, \"/v2/mediasets/{0}/items/{1}/info\"];\n/**\n * Gets information about the media item.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/info\n */\nexport function info($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _info, ...args);\n}\nconst _reference = [0, \"/v2/mediasets/{0}/items/{1}/reference\"];\n/**\n * Gets the [media reference](https://www.palantir.com/docs/foundry/data-integration/media-sets/#media-references) for this media item.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-read`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-read]\n * URL: /v2/mediasets/{mediaSetRid}/items/{mediaItemRid}/reference\n */\nexport function reference($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _reference, ...args);\n}\nconst _upload = [1, \"/v2/mediasets/{0}/items\", 3, \"*/*\"];\n/**\n * Uploads a media item to an existing media set.\n * The body of the request must contain the binary content of the file and the `Content-Type` header must be `application/octet-stream`.\n * A branch name, or branch rid, or view rid may optionally be specified. If none is specified, the item will be uploaded to the default branch. If more than one is specified, an error is thrown.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/items\n */\nexport function upload($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _upload, ...args);\n}\nconst _create = [1, \"/v2/mediasets/{0}/transactions\", 2];\n/**\n * Creates a new transaction. Items uploaded to the media set while this transaction is open will not be reflected until the transaction is committed.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions\n */\nexport function create($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _create, ...args);\n}\nconst _commit = [1, \"/v2/mediasets/{0}/transactions/{1}/commit\"];\n/**\n * Commits an open transaction. On success, items uploaded to the media set during this transaction will become available.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/commit\n */\nexport function commit($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _commit, ...args);\n}\nconst _abort = [1, \"/v2/mediasets/{0}/transactions/{1}/abort\"];\n/**\n * Aborts an open transaction. Items uploaded to the media set during this transaction will be deleted.\n *\n * Third-party applications using this endpoint via OAuth2 must request the following operation scope: `api:mediasets-write`.\n *\n * @alpha\n *\n * Required Scopes: [api:mediasets-write]\n * URL: /v2/mediasets/{mediaSetRid}/transactions/{transactionId}/abort\n */\nexport function abort($ctx, ...args) {\n return $foundryPlatformFetch($ctx, _abort, ...args);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAoB,IAAIC,qBAAqB,QAAQ,8BAA8B;AAC5F;AACA,MAAMC,KAAK,GAAG,CAAC,CAAC,EAAE,6BAA6B,IAAM,KAAK,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAACC,IAAI,EAAE,GAAGC,IAAI,EAAE;EAChC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEF,KAAK,EAAE,GAAGG,IAAI,CAAC;AACtD;AACA,MAAMC,KAAK,GAAG,CAAC,CAAC,EAAE,kCAAkC,CAAC;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,IAAIA,CAACH,IAAI,EAAE,GAAGC,IAAI,EAAE;EAChC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEE,KAAK,EAAE,GAAGD,IAAI,CAAC;AACtD;AACA,MAAMG,UAAU,GAAG,CAAC,CAAC,EAAE,uCAAuC,CAAC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAACL,IAAI,EAAE,GAAGC,IAAI,EAAE;EACrC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEI,UAAU,EAAE,GAAGH,IAAI,CAAC;AAC3D;AACA,MAAMK,OAAO,GAAG,CAAC,CAAC,EAAE,yBAAyB,EAAE,CAAC,EAAE,KAAK,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAACP,IAAI,EAAE,GAAGC,IAAI,EAAE;EAClC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEM,OAAO,EAAE,GAAGL,IAAI,CAAC;AACxD;AACA,MAAMO,OAAO,GAAG,CAAC,CAAC,EAAE,gCAAgC,EAAE,CAAC,CAAC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAACT,IAAI,EAAE,GAAGC,IAAI,EAAE;EAClC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEQ,OAAO,EAAE,GAAGP,IAAI,CAAC;AACxD;AACA,MAAMS,OAAO,GAAG,CAAC,CAAC,EAAE,2CAA2C,CAAC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAACX,IAAI,EAAE,GAAGC,IAAI,EAAE;EAClC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEU,OAAO,EAAE,GAAGT,IAAI,CAAC;AACxD;AACA,MAAMW,MAAM,GAAG,CAAC,CAAC,EAAE,0CAA0C,CAAC;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,KAAKA,CAACb,IAAI,EAAE,GAAGC,IAAI,EAAE;EACjC,OAAOJ,qBAAqB,CAACG,IAAI,EAAEY,MAAM,EAAE,GAAGX,IAAI,CAAC;AACvD","ignoreList":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@osdk/internal.foundry.mediasets",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/palantir/foundry-platform-typescript.git"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"browser": "./build/browser/index.js",
|
|
12
|
+
"import": "./build/esm/index.js",
|
|
13
|
+
"default": "./build/esm/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./*": {
|
|
16
|
+
"browser": "./build/browser/public/*.js",
|
|
17
|
+
"import": "./build/esm/public/*.js",
|
|
18
|
+
"default": "./build/esm/public/*.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@osdk/shared.client": "^1.0.1",
|
|
23
|
+
"@osdk/shared.client2": "^1.0.0",
|
|
24
|
+
"@osdk/internal.foundry.core": "2.6.0",
|
|
25
|
+
"@osdk/shared.net.platformapi": "~1.2.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"typescript": "^5.5.4",
|
|
29
|
+
"@osdk/monorepo.tsconfig": "~0.0.0"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"build/cjs",
|
|
36
|
+
"build/esm",
|
|
37
|
+
"build/browser",
|
|
38
|
+
"CHANGELOG.md",
|
|
39
|
+
"package.json",
|
|
40
|
+
"templates",
|
|
41
|
+
"*.d.ts"
|
|
42
|
+
],
|
|
43
|
+
"module": "./build/esm/index.js",
|
|
44
|
+
"types": "./build/esm/index.d.ts",
|
|
45
|
+
"sls": {
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"com.palantir.foundry.api:api-gateway": {
|
|
48
|
+
"minVersion": "1.1010.0",
|
|
49
|
+
"maxVersion": "1.x.x",
|
|
50
|
+
"optional": true
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"type": "module",
|
|
55
|
+
"scripts": {
|
|
56
|
+
"check-attw": "monorepo.tool.attw esm",
|
|
57
|
+
"check-spelling": "cspell --quiet .",
|
|
58
|
+
"clean": "rm -rf lib dist types build tsconfig.tsbuildinfo",
|
|
59
|
+
"fix-lint": "eslint . --fix && dprint fmt --config $(find-up dprint.json)",
|
|
60
|
+
"lint": "eslint . && dprint check --config $(find-up dprint.json)",
|
|
61
|
+
"transpile": "monorepo.tool.transpile"
|
|
62
|
+
}
|
|
63
|
+
}
|