attio 0.0.1-experimental.20250128 → 0.0.1-experimental.20250128.1
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/lib/api/add-connection-definition.js +1 -2
- package/lib/api/complete-bundle-upload.js +1 -1
- package/lib/api/complete-prod-bundle-upload.js +1 -1
- package/lib/api/create-app.js +1 -1
- package/lib/api/create-dev-version.js +1 -1
- package/lib/api/create-developer-account.js +1 -1
- package/lib/api/create-version.js +1 -1
- package/lib/api/fetch-connections.js +1 -1
- package/lib/api/fetch-installation.js +1 -1
- package/lib/api/fetch-versions.js +1 -1
- package/lib/api/is-app-slug-valid.js +1 -1
- package/lib/api/publish-version.js +1 -1
- package/lib/api/remove-connection-definition.js +1 -1
- package/lib/api/start-upload.js +1 -1
- package/lib/env.js +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,6 @@ export async function addConnectionDefinition({ token, devSlug, appId, label, de
|
|
|
14
14
|
label,
|
|
15
15
|
description,
|
|
16
16
|
global,
|
|
17
|
-
major,
|
|
18
17
|
};
|
|
19
18
|
if (connectionType === "oauth2-code") {
|
|
20
19
|
body.authorize_url = authorizeUrl;
|
|
@@ -23,7 +22,7 @@ export async function addConnectionDefinition({ token, devSlug, appId, label, de
|
|
|
23
22
|
body.client_secret = clientSecret;
|
|
24
23
|
body.scopes = scopes.split(",").map((scope) => scope.trim());
|
|
25
24
|
}
|
|
26
|
-
const response = await fetch(`${API}/developer-
|
|
25
|
+
const response = await fetch(`${API}/developer-accounts/${devSlug}/apps/${appId}/versions/${major}/connection-definitions/${connectionDefinitionId}`, {
|
|
27
26
|
method: "PUT",
|
|
28
27
|
headers: makeHeaders(token),
|
|
29
28
|
body: JSON.stringify(body),
|
|
@@ -6,7 +6,7 @@ const completeBundleUploadSchema = z.object({
|
|
|
6
6
|
success: z.literal(true),
|
|
7
7
|
});
|
|
8
8
|
export async function completeBundleUpload({ token, developerSlug, appId, devVersionId, bundleId, }) {
|
|
9
|
-
const response = await fetch(`${API}/developer-
|
|
9
|
+
const response = await fetch(`${API}/developer-accounts/${developerSlug}/apps/${appId}/dev-versions/${devVersionId}/bundles/${bundleId}/complete`, {
|
|
10
10
|
method: "POST",
|
|
11
11
|
headers: makeHeaders(token),
|
|
12
12
|
});
|
|
@@ -6,7 +6,7 @@ const completeBundleUploadSchema = z.object({
|
|
|
6
6
|
success: z.literal(true),
|
|
7
7
|
});
|
|
8
8
|
export async function completeProdBundleUpload({ token, developerSlug, appId, bundleId, major, minor, }) {
|
|
9
|
-
const response = await fetch(`${API}/developer-
|
|
9
|
+
const response = await fetch(`${API}/developer-accounts/${developerSlug}/apps/${appId}/prod-versions/${major}/${minor}/bundles/${bundleId}/complete`, {
|
|
10
10
|
method: "POST",
|
|
11
11
|
headers: makeHeaders(token),
|
|
12
12
|
});
|
package/lib/api/create-app.js
CHANGED
|
@@ -24,7 +24,7 @@ export async function createApp({ token, developerSlug, appSlug, title, }) {
|
|
|
24
24
|
avatar_url: null,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
const response = await fetch(`${API}/developer-
|
|
27
|
+
const response = await fetch(`${API}/developer-accounts/${developerSlug}/apps/${appId}`, {
|
|
28
28
|
method: "PUT",
|
|
29
29
|
headers: makeHeaders(token),
|
|
30
30
|
body: JSON.stringify({ slug: appSlug, title }),
|
|
@@ -7,7 +7,7 @@ const createDevVersionSchema = z.object({
|
|
|
7
7
|
app_dev_version_id: z.string(),
|
|
8
8
|
});
|
|
9
9
|
export async function createDevVersion({ token, devSlug, appId, targetWorkspaceId, environmentVariables, }) {
|
|
10
|
-
const response = await fetch(`${API}/developer-
|
|
10
|
+
const response = await fetch(`${API}/developer-accounts/${devSlug}/apps/${appId}/dev-versions`, {
|
|
11
11
|
method: "POST",
|
|
12
12
|
headers: makeHeaders(token),
|
|
13
13
|
body: JSON.stringify({
|
|
@@ -20,7 +20,7 @@ export async function createDeveloperAccount({ token, developerSlug, }) {
|
|
|
20
20
|
developer_account_member: { developer_account_member_id: accountId },
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
const response = await fetch(`${API}/developer-
|
|
23
|
+
const response = await fetch(`${API}/developer-accounts/${accountId}`, {
|
|
24
24
|
method: "PUT",
|
|
25
25
|
headers: makeHeaders(token),
|
|
26
26
|
body: JSON.stringify({ slug: developerSlug, title: developerSlug }),
|
|
@@ -11,7 +11,7 @@ const createVersionSchema = z.object({
|
|
|
11
11
|
server_bundle_upload_url: z.string(),
|
|
12
12
|
});
|
|
13
13
|
export async function createVersion({ token, devSlug, appId, major, }) {
|
|
14
|
-
const response = await fetch(`${API}/developer-
|
|
14
|
+
const response = await fetch(`${API}/developer-accounts/${devSlug}/apps/${appId}/prod-versions`, {
|
|
15
15
|
method: "POST",
|
|
16
16
|
headers: makeHeaders(token),
|
|
17
17
|
body: JSON.stringify({
|
|
@@ -11,7 +11,7 @@ const connectionDefinitionsResponseSchema = z.object({
|
|
|
11
11
|
})),
|
|
12
12
|
});
|
|
13
13
|
export async function fetchConnections({ token, devSlug, appId, major, }) {
|
|
14
|
-
const response = await fetch(`${API}/developer-
|
|
14
|
+
const response = await fetch(`${API}/developer-accounts/${devSlug}/apps/${appId}/versions/${major}/connection-definitions`, {
|
|
15
15
|
method: "GET",
|
|
16
16
|
headers: makeHeaders(token),
|
|
17
17
|
});
|
|
@@ -9,7 +9,7 @@ const installationSchema = z.object({
|
|
|
9
9
|
installation_id: z.string().uuid(),
|
|
10
10
|
});
|
|
11
11
|
export async function fetchInstallation({ token, devSlug, appId, workspaceId, }) {
|
|
12
|
-
const response = await fetch(`${API}/developer-
|
|
12
|
+
const response = await fetch(`${API}/developer-accounts/${devSlug}/apps/${appId}/workspace/${workspaceId}/dev-installation`, {
|
|
13
13
|
method: "GET",
|
|
14
14
|
headers: makeHeaders(token),
|
|
15
15
|
});
|
|
@@ -32,7 +32,7 @@ function onlyPublishableVersions(versions) {
|
|
|
32
32
|
v.minor > highestPublishedVersion.minor)));
|
|
33
33
|
}
|
|
34
34
|
export async function fetchVersions({ token, devSlug, appId, }) {
|
|
35
|
-
const response = await fetch(`${API}/developer-
|
|
35
|
+
const response = await fetch(`${API}/developer-accounts/${devSlug}/apps/${appId}/prod-versions`, {
|
|
36
36
|
method: "GET",
|
|
37
37
|
headers: makeHeaders(token),
|
|
38
38
|
});
|
|
@@ -9,7 +9,7 @@ const isAppSlugValidSchema = z.object({
|
|
|
9
9
|
export async function isAppSlugValid({ token, developerSlug, appSlug, }) {
|
|
10
10
|
if (isTest)
|
|
11
11
|
return true;
|
|
12
|
-
const response = await fetch(`${API}/developer-
|
|
12
|
+
const response = await fetch(`${API}/developer-accounts/${developerSlug}/apps/${appSlug}/exists`, {
|
|
13
13
|
headers: makeHeaders(token),
|
|
14
14
|
});
|
|
15
15
|
await handleError(response);
|
|
@@ -6,7 +6,7 @@ const publishVersionSchema = z.object({
|
|
|
6
6
|
success: z.literal(true),
|
|
7
7
|
});
|
|
8
8
|
export async function publishVersion({ token, devSlug, appId, major, minor, }) {
|
|
9
|
-
const response = await fetch(`${API}/developer-
|
|
9
|
+
const response = await fetch(`${API}/developer-accounts/${devSlug}/apps/${appId}/prod-versions/${major}/${minor}/publish`, {
|
|
10
10
|
method: "POST",
|
|
11
11
|
headers: makeHeaders(token),
|
|
12
12
|
});
|
|
@@ -2,7 +2,7 @@ import { API } from "../env.js";
|
|
|
2
2
|
import { handleError } from "./handle-error.js";
|
|
3
3
|
import { makeHeaders } from "./make-headers.js";
|
|
4
4
|
export async function removeConnectionDefinition({ token, devSlug, appId, global, major, }) {
|
|
5
|
-
const response = await fetch(`${API}/developer-
|
|
5
|
+
const response = await fetch(`${API}/developer-accounts/${devSlug}/apps/${appId}/versions/${major}/connection-definitions/${global ? "workspace" : "user"}/remove`, {
|
|
6
6
|
method: "DELETE",
|
|
7
7
|
headers: makeHeaders(token),
|
|
8
8
|
});
|
package/lib/api/start-upload.js
CHANGED
|
@@ -9,7 +9,7 @@ const startUploadSchema = z.object({
|
|
|
9
9
|
server_bundle_upload_url: z.string(),
|
|
10
10
|
});
|
|
11
11
|
export async function startUpload({ token, developerSlug, appId, devVersionId, }) {
|
|
12
|
-
const response = await fetch(`${API}/developer-
|
|
12
|
+
const response = await fetch(`${API}/developer-accounts/${developerSlug}/apps/${appId}/dev-versions/${devVersionId}/bundles`, {
|
|
13
13
|
method: "POST",
|
|
14
14
|
headers: makeHeaders(token),
|
|
15
15
|
});
|
package/lib/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const IS_DEV = process.env.NODE_ENV === "development";
|
|
2
2
|
const DOMAIN = `attio.${IS_DEV ? "me" : "com"}`;
|
|
3
|
-
export const API = `https://
|
|
3
|
+
export const API = `https://build.${DOMAIN}/api`;
|
|
4
4
|
export const APP_NO_PROTOCOL = `app.${DOMAIN}`;
|
|
5
5
|
export const APP = `https://${APP_NO_PROTOCOL}`;
|