@picked/admin-api-client 0.0.85-next.4 → 0.0.85-next.6
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 +20 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/index.js +79 -2
- package/dist/esm/index.js +27 -12
- package/dist/types/client.d.ts +35 -2
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/graphql-env.d.ts +18 -7
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/workspace-transfer.d.ts +170 -0
- package/dist/types/workspace-transfer.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exports a workspace as a portable JSON bundle with a manifest of the asset versions its
|
|
3
|
+
* content references.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* const data = await client.request(WorkspaceExportDocument, { input: { workspaceId } })
|
|
7
|
+
*/
|
|
8
|
+
export declare const WorkspaceExportDocument: import("gql.tada").TadaDocumentNode<{
|
|
9
|
+
workspaceExport: {
|
|
10
|
+
bundle: unknown;
|
|
11
|
+
userErrors: {
|
|
12
|
+
code: "ASSET_NOT_FOUND" | "INVALID_SOURCE_ROW" | "UNRESOLVED_REFERENCE" | "WORKSPACE_NOT_FOUND";
|
|
13
|
+
field: string[] | null;
|
|
14
|
+
message: string;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
}, {
|
|
18
|
+
input: {
|
|
19
|
+
workspaceId: string;
|
|
20
|
+
};
|
|
21
|
+
}, void>;
|
|
22
|
+
/**
|
|
23
|
+
* Reads a project's live version and the id of that version's snapshot workspace.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* const data = await client.request(ProjectLiveVersionDocument, { input: { id: projectId } })
|
|
27
|
+
*/
|
|
28
|
+
export declare const ProjectLiveVersionDocument: import("gql.tada").TadaDocumentNode<{
|
|
29
|
+
project: {
|
|
30
|
+
id: string;
|
|
31
|
+
liveWorkspaceVersion: {
|
|
32
|
+
id: string;
|
|
33
|
+
snapshotWorkspaceId: string | null;
|
|
34
|
+
} | null;
|
|
35
|
+
} | null;
|
|
36
|
+
}, {
|
|
37
|
+
input: {
|
|
38
|
+
id: string;
|
|
39
|
+
};
|
|
40
|
+
}, void>;
|
|
41
|
+
/**
|
|
42
|
+
* Imports a bundle as a new draft workspace in a project.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* const data = await client.request(WorkspaceImportDocument, {
|
|
46
|
+
* input: { projectId, bundle, assetMap },
|
|
47
|
+
* })
|
|
48
|
+
*/
|
|
49
|
+
export declare const WorkspaceImportDocument: import("gql.tada").TadaDocumentNode<{
|
|
50
|
+
workspaceImport: {
|
|
51
|
+
userErrors: {
|
|
52
|
+
code: "INVALID_ASSET_MAPPING" | "INVALID_BUNDLE" | "NAME_REQUIRED" | "PROJECT_NOT_FOUND" | "UNMAPPED_ASSET" | "UNRESOLVED_REFERENCE" | "UNSUPPORTED_FORMAT_VERSION" | "WORKFLOW_SCOPES_NOT_HELD";
|
|
53
|
+
field: string[] | null;
|
|
54
|
+
message: string;
|
|
55
|
+
}[];
|
|
56
|
+
workspace: {
|
|
57
|
+
id: string;
|
|
58
|
+
name: string;
|
|
59
|
+
} | null;
|
|
60
|
+
};
|
|
61
|
+
}, {
|
|
62
|
+
input: {
|
|
63
|
+
assetMap?: {
|
|
64
|
+
assetId: string;
|
|
65
|
+
sourceVersionId: string;
|
|
66
|
+
versionId: string;
|
|
67
|
+
}[] | null | undefined;
|
|
68
|
+
bundle: unknown;
|
|
69
|
+
name?: string | null | undefined;
|
|
70
|
+
projectId: string;
|
|
71
|
+
};
|
|
72
|
+
}, void>;
|
|
73
|
+
/**
|
|
74
|
+
* Reserves an asset upload, or returns the project's existing version of the declared
|
|
75
|
+
* `sha256` with `deduplicated: true`.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* const data = await client.request(AssetUploadInitDocument, {
|
|
79
|
+
* input: { projectId, fileName, contentType, sha256 },
|
|
80
|
+
* })
|
|
81
|
+
*/
|
|
82
|
+
export declare const AssetUploadInitDocument: import("gql.tada").TadaDocumentNode<{
|
|
83
|
+
assetUploadInit: {
|
|
84
|
+
assetId: string;
|
|
85
|
+
deduplicated: boolean;
|
|
86
|
+
storagePath: string;
|
|
87
|
+
uploadUrl: string | null;
|
|
88
|
+
versionId: string;
|
|
89
|
+
};
|
|
90
|
+
}, {
|
|
91
|
+
input: {
|
|
92
|
+
assetId?: string | null | undefined;
|
|
93
|
+
contentType: string;
|
|
94
|
+
fileName: string;
|
|
95
|
+
path?: string | null | undefined;
|
|
96
|
+
projectId: string;
|
|
97
|
+
sha256?: string | null | undefined;
|
|
98
|
+
workbenchId?: string | null | undefined;
|
|
99
|
+
};
|
|
100
|
+
}, void>;
|
|
101
|
+
/**
|
|
102
|
+
* Commits an uploaded asset version.
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* const data = await client.request(AssetCommitDocument, {
|
|
106
|
+
* input: { projectId, assetId, versionId, fileName, storagePath, sha256 },
|
|
107
|
+
* })
|
|
108
|
+
*/
|
|
109
|
+
export declare const AssetCommitDocument: import("gql.tada").TadaDocumentNode<{
|
|
110
|
+
assetCommit: {
|
|
111
|
+
asset: {
|
|
112
|
+
id: string;
|
|
113
|
+
} | null;
|
|
114
|
+
userErrors: {
|
|
115
|
+
code: "HASH_MISMATCH";
|
|
116
|
+
field: string[] | null;
|
|
117
|
+
message: string;
|
|
118
|
+
}[];
|
|
119
|
+
};
|
|
120
|
+
}, {
|
|
121
|
+
input: {
|
|
122
|
+
assetId: string;
|
|
123
|
+
fileName: string;
|
|
124
|
+
path?: string | null | undefined;
|
|
125
|
+
projectId: string;
|
|
126
|
+
sha256?: string | null | undefined;
|
|
127
|
+
storagePath: string;
|
|
128
|
+
versionId: string;
|
|
129
|
+
workbenchId?: string | null | undefined;
|
|
130
|
+
};
|
|
131
|
+
}, void>;
|
|
132
|
+
/**
|
|
133
|
+
* Soft-deletes an asset and removes its stored objects.
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* const data = await client.request(AssetDeleteDocument, { input: { id: assetId } })
|
|
137
|
+
*/
|
|
138
|
+
export declare const AssetDeleteDocument: import("gql.tada").TadaDocumentNode<{
|
|
139
|
+
assetDelete: {
|
|
140
|
+
assetId: string | null;
|
|
141
|
+
};
|
|
142
|
+
}, {
|
|
143
|
+
input: {
|
|
144
|
+
id: string;
|
|
145
|
+
};
|
|
146
|
+
}, void>;
|
|
147
|
+
/**
|
|
148
|
+
* Publishes a workspace, making it the project's live version.
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* const data = await client.request(WorkspacePublishDocument, { input: { workspaceId } })
|
|
152
|
+
*/
|
|
153
|
+
export declare const WorkspacePublishDocument: import("gql.tada").TadaDocumentNode<{
|
|
154
|
+
workspacePublish: {
|
|
155
|
+
userErrors: {
|
|
156
|
+
code: "WORKSPACE_ALREADY_LIVE" | "WORKSPACE_NOT_FOUND";
|
|
157
|
+
field: string[] | null;
|
|
158
|
+
message: string;
|
|
159
|
+
}[];
|
|
160
|
+
workspace: {
|
|
161
|
+
id: string;
|
|
162
|
+
} | null;
|
|
163
|
+
};
|
|
164
|
+
}, {
|
|
165
|
+
input: {
|
|
166
|
+
projectId?: string | null | undefined;
|
|
167
|
+
workspaceId: string;
|
|
168
|
+
};
|
|
169
|
+
}, void>;
|
|
170
|
+
//# sourceMappingURL=workspace-transfer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-transfer.d.ts","sourceRoot":"","sources":["../../src/workspace-transfer.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;QAWlC,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;QAUrC,CAAA;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;QAclC,CAAA;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;QAUlC,CAAA;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;QAa9B,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;QAM9B,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;QAanC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@picked/admin-api-client",
|
|
3
3
|
"description": "Typed gql.tada client for the Picked admin (management) GraphQL API",
|
|
4
|
-
"version": "0.0.85-next.
|
|
4
|
+
"version": "0.0.85-next.6",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@0no-co/graphql.web": "^1.2.0",
|
|
7
7
|
"gql.tada": "^1.11.3",
|