From 7b7d14fc1842a83f2e8b0561088c07a78f8ee0b1 Mon Sep 17 00:00:00 2001 From: stuartc Date: Fri, 25 Oct 2024 11:04:12 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20OpenFn/l?= =?UTF-8?q?ightning@e1e08c7779fbce2fc15bd924f771b90c35c5408a=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .build | 2 +- Lightning.Accounts.html | 142 ++++++++-------- Lightning.AdaptorRegistry.Npm.html | 10 +- Lightning.AdaptorRegistry.html | 12 +- Lightning.AiAssistant.html | 4 +- Lightning.AuthProviders.OauthHTTPClient.html | 154 +++++++++--------- Lightning.AuthProviders.WellKnown.html | 10 +- Lightning.BuildMacros.html | 12 +- Lightning.CLI.Result.html | 2 +- Lightning.Config.Bootstrap.html | 4 +- Lightning.Credentials.html | 60 +++---- Lightning.Invocation.html | 64 ++++---- Lightning.Jobs.html | 26 +-- Lightning.KafkaTriggers.MessageRecovery.html | 2 +- Lightning.OauthClients.html | 32 ++-- Lightning.Policies.Permissions.html | 18 +- Lightning.Projects.html | 74 ++++----- Lightning.PromEx.html | 14 +- Lightning.Repo.html | 14 +- Lightning.Runs.Query.html | 2 +- Lightning.Runs.html | 2 +- Lightning.Runtime.LogAgent.html | 6 +- Lightning.Runtime.RuntimeManager.html | 4 +- Lightning.Scrubber.html | 8 +- Lightning.Storage.GCS.html | 4 +- Lightning.Storage.Local.html | 6 +- Lightning.Storage.ProjectFileDefinition.html | 6 +- Lightning.TaskWorker.html | 2 +- Lightning.Validators.html | 6 +- Lightning.VersionControl.GithubClient.html | 154 +++++++++--------- Lightning.WebhookAuthMethods.html | 76 ++++----- Lightning.WorkOrders.ExportWorker.html | 2 +- Lightning.WorkOrders.html | 4 +- Lightning.Workflows.Job.html | 18 +- Lightning.Workflows.Presence.html | 54 +++--- Lightning.Workflows.html | 30 ++-- Lightning.epub | Bin 660173 -> 660284 bytes LightningWeb.AccountConfirmationModal.html | 4 +- LightningWeb.Components.NewInputs.html | 4 +- LightningWeb.Components.Viewers.html | 4 +- LightningWeb.Gettext.html | 8 +- LightningWeb.OauthCredentialHelper.html | 8 +- LightningWeb.Pagination.html | 10 +- LightningWeb.Plugs.Redirect.html | 12 +- LightningWeb.Plugs.WebhookAuth.html | 8 +- LightningWeb.Telemetry.html | 8 +- Mix.Tasks.Lightning.InstallAdaptorIcons.html | 102 ++++++------ Mix.Tasks.Lightning.InstallSchemas.html | 10 +- benchmarking.md.html | 40 ++--- changelog.html | 25 +-- deployment.html | 12 +- ...ta-3575B5B0.js => search_data-295F0A9B.js} | 2 +- readme.html | 10 +- search.html | 2 +- 54 files changed, 655 insertions(+), 654 deletions(-) rename dist/{search_data-3575B5B0.js => search_data-295F0A9B.js} (77%) diff --git a/.build b/.build index 47e5006a1d..c277d58dcc 100644 --- a/.build +++ b/.build @@ -342,7 +342,7 @@ dist/merriweather-latin-ext-300-normal-K6L27CZ5.woff2 dist/merriweather-vietnamese-300-italic-EHHNZPUO.woff2 dist/merriweather-vietnamese-300-normal-U376L4Z4.woff2 dist/remixicon-NKANDIL5.woff2 -dist/search_data-3575B5B0.js +dist/search_data-295F0A9B.js dist/sidebar_items-5D4B9912.js index.html provisioning.html diff --git a/Lightning.Accounts.html b/Lightning.Accounts.html index 4b44cdc4c3..024e810a65 100644 --- a/Lightning.Accounts.html +++ b/Lightning.Accounts.html @@ -815,10 +815,10 @@

apply_user_email(user, password, attrs)

Examples -
iex> apply_user_email(user, "valid password", %{email: ...})
-{:ok, %User{}}role: :superuser
-iex> apply_user_email(user, "invalid password", %{email: ...})
-{:error, %Ecto.Changeset{}}
+
iex> apply_user_email(user, "valid password", %{email: ...})
+{:ok, %User{}}role: :superuser
+iex> apply_user_email(user, "invalid password", %{email: ...})
+{:error, %Ecto.Changeset{}}
@@ -870,8 +870,8 @@

change_scheduled_deletion(user, attrs \\ %{ Examples

-
iex> change_scheduled_deletion(user)
-%Ecto.Changeset{data: %User{}}
+
iex> change_scheduled_deletion(user)
+%Ecto.Changeset{data: %User{}}
@@ -907,8 +907,8 @@

change_superuser_registration(attrs \\ %{}) Examples

-
iex> change_superuser_registration(user)
-%Ecto.Changeset{data: %User{}}
+
iex> change_superuser_registration(user)
+%Ecto.Changeset{data: %User{}}
@@ -960,8 +960,8 @@

change_user_email(user, attrs \\ %{})

Examples -
iex> change_user_email(user)
-%Ecto.Changeset{data: %User{}}
+
iex> change_user_email(user)
+%Ecto.Changeset{data: %User{}}
@@ -1015,8 +1015,8 @@

change_user_password(user, attrs \\ %{}) Examples

-
iex> change_user_password(user)
-%Ecto.Changeset{data: %User{}}
+
iex> change_user_password(user)
+%Ecto.Changeset{data: %User{}}
@@ -1046,8 +1046,8 @@

change_user_registration(attrs \\ %{})

Examples -
iex> change_user_registration(user)
-%Ecto.Changeset{data: %User{}}
+
iex> change_user_registration(user)
+%Ecto.Changeset{data: %User{}}
@@ -1208,11 +1208,11 @@

delete_token(token)

Examples -
iex> delete_token(token)
-{:ok, %UserToken{}}
+
iex> delete_token(token)
+{:ok, %UserToken{}}
 
-iex> delete_token(token)
-{:error, %Ecto.Changeset{}}
+
iex> delete_token(token) +{:error, %Ecto.Changeset{}}
@@ -1240,11 +1240,11 @@

delete_user(user)

Examples -
iex> delete_user(user)
-{:ok, %User{}}
+
iex> delete_user(user)
+{:ok, %User{}}
 
-iex> delete_user(user)
-{:error, %Ecto.Changeset{}}
+
iex> delete_user(user) +{:error, %Ecto.Changeset{}}
@@ -1301,11 +1301,11 @@

deliver_user_confirmation_instructions(user Examples

-
iex> deliver_user_confirmation_instructions(user)
-{:ok, %{to: ..., body: ...}}
+
iex> deliver_user_confirmation_instructions(user)
+{:ok, %{to: ..., body: ...}}
 
-iex> deliver_user_confirmation_instructions(confirmed_user)
-{:error, :already_confirmed}
+
iex> deliver_user_confirmation_instructions(confirmed_user) +{:error, :already_confirmed}
@@ -1355,8 +1355,8 @@

deliver_user_reset_password_instructions(us Examples

-
iex> deliver_user_reset_password_instructions(user, &Routes.user_reset_password_url(conn, :edit, &1))
-{:ok, %{to: ..., body: ...}}
+
iex> deliver_user_reset_password_instructions(user, &Routes.user_reset_password_url(conn, :edit, &1))
+{:ok, %{to: ..., body: ...}}
@@ -1501,10 +1501,10 @@

get_preference(user, key)

Examples -
iex> get_preference(user, "editor.orientation")
+
iex> get_preference(user, "editor.orientation")
 "vertical"
 
-iex> get_preference(user, "notifications.enabled")
+iex> get_preference(user, "notifications.enabled")
 true
@@ -1533,10 +1533,10 @@

get_token!(id)

Examples -
iex> get_token!(123)
-%UserToken{}
+
iex> get_token!(123)
+%UserToken{}
 
-iex> get_token!(456)
+iex> get_token!(456)
 ** (Ecto.NoResultsError)
@@ -1565,10 +1565,10 @@

get_user!(id)

Examples -
iex> get_user!(123)
-%User{}
+
iex> get_user!(123)
+%User{}
 
-iex> get_user!(456)
+iex> get_user!(456)
 ** (Ecto.NoResultsError)
@@ -1641,10 +1641,10 @@

get_user_by_email(email)

Examples -
iex> get_user_by_email("foo@example.com")
-%User{}
+
iex> get_user_by_email("foo@example.com")
+%User{}
 
-iex> get_user_by_email("unknown@example.com")
+iex> get_user_by_email("unknown@example.com")
 nil
@@ -1673,10 +1673,10 @@

get_user_by_email_and_password(email, passw Examples

-
iex> get_user_by_email_and_password("foo@example.com", "correct_password")
-%User{}
+
iex> get_user_by_email_and_password("foo@example.com", "correct_password")
+%User{}
 
-iex> get_user_by_email_and_password("foo@example.com", "invalid_password")
+iex> get_user_by_email_and_password("foo@example.com", "invalid_password")
 nil
@@ -1705,10 +1705,10 @@

get_user_by_reset_password_token(token)

Examples -
iex> get_user_by_reset_password_token("validtoken")
-%User{}
+
iex> get_user_by_reset_password_token("validtoken")
+%User{}
 
-iex> get_user_by_reset_password_token("invalidtoken")
+iex> get_user_by_reset_password_token("invalidtoken")
 nil
@@ -1905,8 +1905,8 @@

list_users()

Examples -
iex> list_users()
-[%User{}, ...]
+
iex> list_users()
+[%User{}, ...]
@@ -2035,11 +2035,11 @@

register_superuser(attrs)

Examples -
iex> register_superuser(%{field: value})
-{:ok, %User{}}
+
iex> register_superuser(%{field: value})
+{:ok, %User{}}
 
-iex> register_superuser(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> register_superuser(%{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -2077,11 +2077,11 @@

register_user(attrs)

Examples -
iex> register_user(%{field: value})
-{:ok, %User{}}
+
iex> register_user(%{field: value})
+{:ok, %User{}}
 
-iex> register_user(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> register_user(%{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -2131,7 +2131,7 @@

request_email_update(user, new_email)

Examples -
iex> request_email_update(user, new_email)
+
iex> request_email_update(user, new_email)
 :ok
@@ -2160,11 +2160,11 @@

reset_user_password(user, attrs)

Examples -
iex> reset_user_password(user, %{password: "new long password", password_confirmation: "new long password"})
-{:ok, %User{}}
+
iex> reset_user_password(user, %{password: "new long password", password_confirmation: "new long password"})
+{:ok, %User{}}
 
-iex> reset_user_password(user, %{password: "valid", password_confirmation: "not the same"})
-{:error, %Ecto.Changeset{}}
+
iex> reset_user_password(user, %{password: "valid", password_confirmation: "not the same"}) +{:error, %Ecto.Changeset{}}
@@ -2330,11 +2330,11 @@

update_user_password(user, password, attrs) Examples

-
iex> update_user_password(user, "valid password", %{password: ...})
-{:ok, %User{}}
+
iex> update_user_password(user, "valid password", %{password: ...})
+{:ok, %User{}}
 
-iex> update_user_password(user, "invalid password", %{password: ...})
-{:error, %Ecto.Changeset{}}
+
iex> update_user_password(user, "invalid password", %{password: ...}) +{:error, %Ecto.Changeset{}}
@@ -2369,11 +2369,11 @@

update_user_preference(user, key, value) Examples

-
iex> update_user_preference(user, "editor.orientation", "vertical")
-{:ok, %User{}}
+
iex> update_user_preference(user, "editor.orientation", "vertical")
+{:ok, %User{}}
 
-iex> update_user_preference(user, "notifications.enabled", true)
-{:ok, %User{}}
+
iex> update_user_preference(user, "notifications.enabled", true) +{:ok, %User{}}
@@ -2408,7 +2408,7 @@

update_user_preferences(user, preferences)< Examples

-
iex> update_user_preferences(%User{}, %{"editor.orientaion" => "vertical"})
+
iex> update_user_preferences(%User{}, %{"editor.orientaion" => "vertical"})
@@ -2535,8 +2535,8 @@

validate_change_user_email(user, params \\ Examples

-
iex> validate_change_user_email(user, %{"email" => "new@example.com", "current_password" => "secret"})
-%Ecto.Changeset{...}
+
iex> validate_change_user_email(user, %{"email" => "new@example.com", "current_password" => "secret"})
+%Ecto.Changeset{...}
diff --git a/Lightning.AdaptorRegistry.Npm.html b/Lightning.AdaptorRegistry.Npm.html index 7a23218a0e..5601ad1343 100644 --- a/Lightning.AdaptorRegistry.Npm.html +++ b/Lightning.AdaptorRegistry.Npm.html @@ -1690,14 +1690,14 @@

request(request)

Examples -
request = %HTTPoison.Request{
+
request = %HTTPoison.Request{
   method: :post,
   url: "https://my.website.com",
   body: "{\"foo\": 3}",
-  headers: [{"Accept", "application/json"}]
-}
+  headers: [{"Accept", "application/json"}]
+}
 
-request(request)
+
request(request)
@@ -1755,7 +1755,7 @@

request(method, url, body \\ "", Examples

-
request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
+
request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
diff --git a/Lightning.AdaptorRegistry.html b/Lightning.AdaptorRegistry.html index 7272d6d15d..75d1adf107 100644 --- a/Lightning.AdaptorRegistry.html +++ b/Lightning.AdaptorRegistry.html @@ -140,9 +140,9 @@

Registry process to query and maintain a list of adaptors available for writing jobs.

Currently it queries NPM for all modules in the @openfn organization and filters out modules that are known not to be adaptors.

Usage

# Starting the process
-AdaptorRegistry.start_link()
+AdaptorRegistry.start_link()
 # Getting a list of all adaptors
-Lightning.AdaptorRegistry.AdaptorRegistry.all()

Caching

By default the results are cached to disk, and will be reused every start.

In order to disable or configure caching pass see: start_link/1.

The process uses :continue to return before the adaptors have been queried. +Lightning.AdaptorRegistry.AdaptorRegistry.all()

Caching

By default the results are cached to disk, and will be reused every start.

In order to disable or configure caching pass see: start_link/1.

The process uses :continue to return before the adaptors have been queried. This does mean that the first call to the process will be delayed until the handle_continue/2 has finished.

Timeouts

There is a 'general' timeout of 30s, this is used for GenServer calls like all/1 and also internally when the modules are being queried. NPM can @@ -432,10 +432,10 @@

resolve_package_name(package_name)

-

Destructures an NPM style package name into module name and version.

Example

iex> resolve_package_name("@openfn/language-salesforce@1.2.3")
-{ "@openfn/language-salesforce", "1.2.3" }
-iex> resolve_package_name("@openfn/language-salesforce")
-{ "@openfn/language-salesforce", nil }
+

Destructures an NPM style package name into module name and version.

Example

iex> resolve_package_name("@openfn/language-salesforce@1.2.3")
+{ "@openfn/language-salesforce", "1.2.3" }
+iex> resolve_package_name("@openfn/language-salesforce")
+{ "@openfn/language-salesforce", nil }
diff --git a/Lightning.AiAssistant.html b/Lightning.AiAssistant.html index 180677a4d0..97e56887de 100644 --- a/Lightning.AiAssistant.html +++ b/Lightning.AiAssistant.html @@ -508,8 +508,8 @@

query(session, content)

-

Queries the AI assistant with the given content.

Returns {:ok, session} if the query was successful, otherwise :error.

Example

iex> AiAssistant.query(session, "fn()")
-{:ok, session}
+

Queries the AI assistant with the given content.

Returns {:ok, session} if the query was successful, otherwise :error.

Example

iex> AiAssistant.query(session, "fn()")
+{:ok, session}
diff --git a/Lightning.AuthProviders.OauthHTTPClient.html b/Lightning.AuthProviders.OauthHTTPClient.html index 1bd72740c6..3a097fcc20 100644 --- a/Lightning.AuthProviders.OauthHTTPClient.html +++ b/Lightning.AuthProviders.OauthHTTPClient.html @@ -495,11 +495,11 @@

delete(client, url, opts)

-

Perform a DELETE request.

See request/1 or request/2 for options definition.

delete("/users")
-delete("/users", query: [scope: "admin"])
-delete(client, "/users")
-delete(client, "/users", query: [scope: "admin"])
-delete(client, "/users", body: %{name: "Jon"})
+

Perform a DELETE request.

See request/1 or request/2 for options definition.

delete("/users")
+delete("/users", query: [scope: "admin"])
+delete(client, "/users")
+delete(client, "/users", query: [scope: "admin"])
+delete(client, "/users", body: %{name: "Jon"})
@@ -528,11 +528,11 @@

delete!(client, url, opts)

-

Perform a DELETE request.

See request!/1 or request!/2 for options definition.

delete!("/users")
-delete!("/users", query: [scope: "admin"])
-delete!(client, "/users")
-delete!(client, "/users", query: [scope: "admin"])
-delete!(client, "/users", body: %{name: "Jon"})
+

Perform a DELETE request.

See request!/1 or request!/2 for options definition.

delete!("/users")
+delete!("/users", query: [scope: "admin"])
+delete!(client, "/users")
+delete!(client, "/users", query: [scope: "admin"])
+delete!(client, "/users", body: %{name: "Jon"})
@@ -662,11 +662,11 @@

get(client, url, opts)

-

Perform a GET request.

See request/1 or request/2 for options definition.

get("/users")
-get("/users", query: [scope: "admin"])
-get(client, "/users")
-get(client, "/users", query: [scope: "admin"])
-get(client, "/users", body: %{name: "Jon"})
+

Perform a GET request.

See request/1 or request/2 for options definition.

get("/users")
+get("/users", query: [scope: "admin"])
+get(client, "/users")
+get(client, "/users", query: [scope: "admin"])
+get(client, "/users", body: %{name: "Jon"})
@@ -695,11 +695,11 @@

get!(client, url, opts)

-

Perform a GET request.

See request!/1 or request!/2 for options definition.

get!("/users")
-get!("/users", query: [scope: "admin"])
-get!(client, "/users")
-get!(client, "/users", query: [scope: "admin"])
-get!(client, "/users", body: %{name: "Jon"})
+

Perform a GET request.

See request!/1 or request!/2 for options definition.

get!("/users")
+get!("/users", query: [scope: "admin"])
+get!(client, "/users")
+get!(client, "/users", query: [scope: "admin"])
+get!(client, "/users", body: %{name: "Jon"})
@@ -727,11 +727,11 @@

head(client, url, opts)

-

Perform a HEAD request.

See request/1 or request/2 for options definition.

head("/users")
-head("/users", query: [scope: "admin"])
-head(client, "/users")
-head(client, "/users", query: [scope: "admin"])
-head(client, "/users", body: %{name: "Jon"})
+

Perform a HEAD request.

See request/1 or request/2 for options definition.

head("/users")
+head("/users", query: [scope: "admin"])
+head(client, "/users")
+head(client, "/users", query: [scope: "admin"])
+head(client, "/users", body: %{name: "Jon"})
@@ -760,11 +760,11 @@

head!(client, url, opts)

-

Perform a HEAD request.

See request!/1 or request!/2 for options definition.

head!("/users")
-head!("/users", query: [scope: "admin"])
-head!(client, "/users")
-head!(client, "/users", query: [scope: "admin"])
-head!(client, "/users", body: %{name: "Jon"})
+

Perform a HEAD request.

See request!/1 or request!/2 for options definition.

head!("/users")
+head!("/users", query: [scope: "admin"])
+head!(client, "/users")
+head!(client, "/users", query: [scope: "admin"])
+head!(client, "/users", body: %{name: "Jon"})
@@ -792,11 +792,11 @@

options(client, url, opts)

-

Perform a OPTIONS request.

See request/1 or request/2 for options definition.

options("/users")
-options("/users", query: [scope: "admin"])
-options(client, "/users")
-options(client, "/users", query: [scope: "admin"])
-options(client, "/users", body: %{name: "Jon"})
+

Perform a OPTIONS request.

See request/1 or request/2 for options definition.

options("/users")
+options("/users", query: [scope: "admin"])
+options(client, "/users")
+options(client, "/users", query: [scope: "admin"])
+options(client, "/users", body: %{name: "Jon"})
@@ -825,11 +825,11 @@

options!(client, url, opts)

-

Perform a OPTIONS request.

See request!/1 or request!/2 for options definition.

options!("/users")
-options!("/users", query: [scope: "admin"])
-options!(client, "/users")
-options!(client, "/users", query: [scope: "admin"])
-options!(client, "/users", body: %{name: "Jon"})
+

Perform a OPTIONS request.

See request!/1 or request!/2 for options definition.

options!("/users")
+options!("/users", query: [scope: "admin"])
+options!(client, "/users")
+options!(client, "/users", query: [scope: "admin"])
+options!(client, "/users", body: %{name: "Jon"})
@@ -858,10 +858,10 @@

patch(client, url, body, opts)

-

Perform a PATCH request.

See request/1 or request/2 for options definition.

patch("/users", %{name: "Jon"})
-patch("/users", %{name: "Jon"}, query: [scope: "admin"])
-patch(client, "/users", %{name: "Jon"})
-patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+

Perform a PATCH request.

See request/1 or request/2 for options definition.

patch("/users", %{name: "Jon"})
+patch("/users", %{name: "Jon"}, query: [scope: "admin"])
+patch(client, "/users", %{name: "Jon"})
+patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -890,10 +890,10 @@

patch!(client, url, body, opts)

-

Perform a PATCH request.

See request!/1 or request!/2 for options definition.

patch!("/users", %{name: "Jon"})
-patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
-patch!(client, "/users", %{name: "Jon"})
-patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+

Perform a PATCH request.

See request!/1 or request!/2 for options definition.

patch!("/users", %{name: "Jon"})
+patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
+patch!(client, "/users", %{name: "Jon"})
+patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -922,10 +922,10 @@

post(client, url, body, opts)

-

Perform a POST request.

See request/1 or request/2 for options definition.

post("/users", %{name: "Jon"})
-post("/users", %{name: "Jon"}, query: [scope: "admin"])
-post(client, "/users", %{name: "Jon"})
-post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+

Perform a POST request.

See request/1 or request/2 for options definition.

post("/users", %{name: "Jon"})
+post("/users", %{name: "Jon"}, query: [scope: "admin"])
+post(client, "/users", %{name: "Jon"})
+post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -954,10 +954,10 @@

post!(client, url, body, opts)

-

Perform a POST request.

See request!/1 or request!/2 for options definition.

post!("/users", %{name: "Jon"})
-post!("/users", %{name: "Jon"}, query: [scope: "admin"])
-post!(client, "/users", %{name: "Jon"})
-post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+

Perform a POST request.

See request!/1 or request!/2 for options definition.

post!("/users", %{name: "Jon"})
+post!("/users", %{name: "Jon"}, query: [scope: "admin"])
+post!(client, "/users", %{name: "Jon"})
+post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -986,10 +986,10 @@

put(client, url, body, opts)

-

Perform a PUT request.

See request/1 or request/2 for options definition.

put("/users", %{name: "Jon"})
-put("/users", %{name: "Jon"}, query: [scope: "admin"])
-put(client, "/users", %{name: "Jon"})
-put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+

Perform a PUT request.

See request/1 or request/2 for options definition.

put("/users", %{name: "Jon"})
+put("/users", %{name: "Jon"}, query: [scope: "admin"])
+put(client, "/users", %{name: "Jon"})
+put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -1018,10 +1018,10 @@

put!(client, url, body, opts)

-

Perform a PUT request.

See request!/1 or request!/2 for options definition.

put!("/users", %{name: "Jon"})
-put!("/users", %{name: "Jon"}, query: [scope: "admin"])
-put!(client, "/users", %{name: "Jon"})
-put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
+

Perform a PUT request.

See request!/1 or request!/2 for options definition.

put!("/users", %{name: "Jon"})
+put!("/users", %{name: "Jon"}, query: [scope: "admin"])
+put!(client, "/users", %{name: "Jon"})
+put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
@@ -1097,11 +1097,11 @@

request(client \\ %Tesla.Client{}, options) Examples

-
ExampleApi.request(method: :get, url: "/users/path")
+
ExampleApi.request(method: :get, url: "/users/path")
 
 # use shortcut methods
-ExampleApi.get("/users/1")
-ExampleApi.post(client, "/users", %{name: "Jon"})
+
ExampleApi.get("/users/1") +ExampleApi.post(client, "/users", %{name: "Jon"})
@@ -1237,11 +1237,11 @@

trace(client, url, opts)

-

Perform a TRACE request.

See request/1 or request/2 for options definition.

trace("/users")
-trace("/users", query: [scope: "admin"])
-trace(client, "/users")
-trace(client, "/users", query: [scope: "admin"])
-trace(client, "/users", body: %{name: "Jon"})
+

Perform a TRACE request.

See request/1 or request/2 for options definition.

trace("/users")
+trace("/users", query: [scope: "admin"])
+trace(client, "/users")
+trace(client, "/users", query: [scope: "admin"])
+trace(client, "/users", body: %{name: "Jon"})
@@ -1270,11 +1270,11 @@

trace!(client, url, opts)

-

Perform a TRACE request.

See request!/1 or request!/2 for options definition.

trace!("/users")
-trace!("/users", query: [scope: "admin"])
-trace!(client, "/users")
-trace!(client, "/users", query: [scope: "admin"])
-trace!(client, "/users", body: %{name: "Jon"})
+

Perform a TRACE request.

See request!/1 or request!/2 for options definition.

trace!("/users")
+trace!("/users", query: [scope: "admin"])
+trace!(client, "/users")
+trace!(client, "/users", query: [scope: "admin"])
+trace!(client, "/users", body: %{name: "Jon"})
diff --git a/Lightning.AuthProviders.WellKnown.html b/Lightning.AuthProviders.WellKnown.html index ca07d9c22d..19c22da352 100644 --- a/Lightning.AuthProviders.WellKnown.html +++ b/Lightning.AuthProviders.WellKnown.html @@ -1866,14 +1866,14 @@

request(request)

Examples -
request = %HTTPoison.Request{
+
request = %HTTPoison.Request{
   method: :post,
   url: "https://my.website.com",
   body: "{\"foo\": 3}",
-  headers: [{"Accept", "application/json"}]
-}
+  headers: [{"Accept", "application/json"}]
+}
 
-request(request)
+
request(request)
@@ -1931,7 +1931,7 @@

request(method, url, body \\ "", Examples

-
request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
+
request(:post, "https://my.website.com", "{\"foo\": 3}", [{"Accept", "application/json"}])
diff --git a/Lightning.BuildMacros.html b/Lightning.BuildMacros.html index 701b93eec3..7c6a236023 100644 --- a/Lightning.BuildMacros.html +++ b/Lightning.BuildMacros.html @@ -211,13 +211,13 @@

do_in(envs, list)

Examples -
do_in(:dev) do
-  IO.puts("This will only be printed in the dev environment")
-end
+
do_in(:dev) do
+  IO.puts("This will only be printed in the dev environment")
+end
 
-do_in([:dev, :test]) do
-  IO.puts("This will only be printed in the dev and test environments")
-end
+
do_in([:dev, :test]) do + IO.puts("This will only be printed in the dev and test environments") +end
diff --git a/Lightning.CLI.Result.html b/Lightning.CLI.Result.html index f89e5039b7..737f8ac286 100644 --- a/Lightning.CLI.Result.html +++ b/Lightning.CLI.Result.html @@ -144,7 +144,7 @@

Logs

The OpenFn CLI returns JSON formatted log lines, which are decoded and added -to a Result struct.

There are two kinds of output:

{"level":"<<level>>","name":"<<module>>","message":"..."],"time":<<timestamp>>}

These are usually for general logging, and debugging.

{"message":["<<message|filepath|output>>"]}

The above is the equivalent of the output of a command

+to a Result struct.

There are two kinds of output:

{"level":"<<level>>","name":"<<module>>","message":"..."],"time":<<timestamp>>}

These are usually for general logging, and debugging.

{"message":["<<message|filepath|output>>"]}

The above is the equivalent of the output of a command

diff --git a/Lightning.Config.Bootstrap.html b/Lightning.Config.Bootstrap.html index 868549d0f2..aab5149c5d 100644 --- a/Lightning.Config.Bootstrap.html +++ b/Lightning.Config.Bootstrap.html @@ -143,8 +143,8 @@

called from other places (aside from config/runtime.exs) file.

Sourcing envs

Internally this module uses Dotenvy.source/1 to source environment variables from the .env, .env.<config_env>, and .env.<config_env>.override files. It also sources the system environment variables.

Calling configure/0 without calling source_envs/0 or Dotenvy.source/2 -first will result in no environment variables being loaded.

Usage:

Lightning.Config.Bootstrap.source_envs()
-Lightning.Config.Bootstrap.configure()
+first will result in no environment variables being loaded.

Usage:

Lightning.Config.Bootstrap.source_envs()
+Lightning.Config.Bootstrap.configure()
diff --git a/Lightning.Credentials.html b/Lightning.Credentials.html index b43763a399..aa05edcea4 100644 --- a/Lightning.Credentials.html +++ b/Lightning.Credentials.html @@ -406,8 +406,8 @@

change_credential(credential, attrs \\ %{}) Examples

-
iex> change_credential(credential)
-%Ecto.Changeset{data: %Credential{}}
+
iex> change_credential(credential)
+%Ecto.Changeset{data: %Credential{}}
@@ -437,11 +437,11 @@

create_credential(attrs \\ %{})

Examples -
iex> create_credential(%{field: value})
-{:ok, %Credential{}}
+
iex> create_credential(%{field: value})
+{:ok, %Credential{}}
 
-iex> create_credential(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> create_credential(%{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -469,11 +469,11 @@

delete_credential(credential)

Examples -
iex> delete_credential(credential)
-{:ok, %Credential{}}
+
iex> delete_credential(credential)
+{:ok, %Credential{}}
 
-iex> delete_credential(credential)
-{:error, %Ecto.Changeset{}}
+
iex> delete_credential(credential) +{:error, %Ecto.Changeset{}}
@@ -501,10 +501,10 @@

get_credential!(id)

Examples -
iex> get_credential!(123)
-%Credential{}
+
iex> get_credential!(123)
+%Credential{}
 
-iex> get_credential!(456)
+iex> get_credential!(456)
 ** (Ecto.NoResultsError)
@@ -617,10 +617,10 @@

has_activity_in_projects?(credential)

Examples -
iex> has_activity_in_projects?(%Credential{id: some_id})
+
iex> has_activity_in_projects?(%Credential{id: some_id})
 true
 
-iex> has_activity_in_projects?(%Credential{id: another_id})
+iex> has_activity_in_projects?(%Credential{id: another_id})
 false

@@ -659,11 +659,11 @@

invalid_projects_for_user(credential_id, us Examples

-
iex> can_credential_be_shared_to_user(credential_id, user_id)
-[]
+
iex> can_credential_be_shared_to_user(credential_id, user_id)
+[]
 
-iex> can_credential_be_shared_to_user(credential_id, user_id)
-["52ea8758-6ce5-43d7-912f-6a1e1f11dc55"]
+
iex> can_credential_be_shared_to_user(credential_id, user_id) +["52ea8758-6ce5-43d7-912f-6a1e1f11dc55"]
@@ -703,9 +703,9 @@

list_credentials(project)

Examples

-

When given a Project:

iex> list_credentials(%Project{id: 1})
-[%Credential{project_id: 1}, %Credential{project_id: 1}]

When given a User:

iex> list_credentials(%User{id: 123})
-[%Credential{user_id: 123}, %Credential{user_id: 123}]
+

When given a Project:

iex> list_credentials(%Project{id: 1})
+[%Credential{project_id: 1}, %Credential{project_id: 1}]

When given a User:

iex> list_credentials(%User{id: 123})
+[%Credential{user_id: 123}, %Credential{user_id: 123}]
@@ -816,11 +816,11 @@

schedule_credential_deletion(credential) Examples

-
iex> schedule_credential_deletion(%Credential{id: some_id})
-{:ok, %Credential{}}
+
iex> schedule_credential_deletion(%Credential{id: some_id})
+{:ok, %Credential{}}
 
-iex> schedule_credential_deletion(%Credential{})
-{:error, %Ecto.Changeset{}}
+
iex> schedule_credential_deletion(%Credential{}) +{:error, %Ecto.Changeset{}}
@@ -877,11 +877,11 @@

update_credential(credential, attrs)

Examples -
iex> update_credential(credential, %{field: new_value})
-{:ok, %Credential{}}
+
iex> update_credential(credential, %{field: new_value})
+{:ok, %Credential{}}
 
-iex> update_credential(credential, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> update_credential(credential, %{field: bad_value}) +{:error, %Ecto.Changeset{}}
diff --git a/Lightning.Invocation.html b/Lightning.Invocation.html index a59368ca44..5ff16a1873 100644 --- a/Lightning.Invocation.html +++ b/Lightning.Invocation.html @@ -519,8 +519,8 @@

change_dataclip(dataclip, attrs \\ %{})

Examples -
iex> change_dataclip(dataclip)
-%Ecto.Changeset{data: %Dataclip{}}
+
iex> change_dataclip(dataclip)
+%Ecto.Changeset{data: %Dataclip{}}
@@ -550,8 +550,8 @@

change_step(step, attrs \\ %{})

Examples -
iex> change_step(step)
-%Ecto.Changeset{data: %Step{}}
+
iex> change_step(step)
+%Ecto.Changeset{data: %Step{}}
@@ -611,11 +611,11 @@

create_dataclip(attrs \\ %{})

Examples -
iex> create_dataclip(%{field: value})
-{:ok, %Dataclip{}}
+
iex> create_dataclip(%{field: value})
+{:ok, %Dataclip{}}
 
-iex> create_dataclip(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> create_dataclip(%{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -643,11 +643,11 @@

delete_dataclip(dataclip)

Examples -
iex> delete_dataclip(dataclip)
-{:ok, %Dataclip{}}
+
iex> delete_dataclip(dataclip)
+{:ok, %Dataclip{}}
 
-iex> delete_dataclip(dataclip)
-{:error, %Ecto.Changeset{}}
+
iex> delete_dataclip(dataclip) +{:error, %Ecto.Changeset{}}
@@ -682,14 +682,14 @@

get_dataclip(step)

Examples -
iex> get_dataclip("27b73932-16c7-4a72-86a3-85d805ccff98")
-%Dataclip{}
+
iex> get_dataclip("27b73932-16c7-4a72-86a3-85d805ccff98")
+%Dataclip{}
 
-iex> get_dataclip("27b73932-16c7-4a72-86a3-85d805ccff98")
+iex> get_dataclip("27b73932-16c7-4a72-86a3-85d805ccff98")
 nil
 
-iex> get_dataclip(%Step{id: "a uuid"})
-%Dataclip{}
+
iex> get_dataclip(%Step{id: "a uuid"}) +%Dataclip{}
@@ -723,10 +723,10 @@

get_dataclip!(id)

Examples -
iex> get_dataclip!(123)
-%Dataclip{}
+
iex> get_dataclip!(123)
+%Dataclip{}
 
-iex> get_dataclip!(456)
+iex> get_dataclip!(456)
 ** (Ecto.NoResultsError)
@@ -924,10 +924,10 @@

get_step!(id)

Examples -
iex> get_step!(123)
-%Step{}
+
iex> get_step!(123)
+%Step{}
 
-iex> get_step!(456)
+iex> get_step!(456)
 ** (Ecto.NoResultsError)
@@ -1056,8 +1056,8 @@

list_dataclips()

Examples -
iex> list_dataclips()
-[%Dataclip{}, ...]
+
iex> list_dataclips()
+[%Dataclip{}, ...]
@@ -1166,8 +1166,8 @@

list_steps()

Examples -
iex> list_steps()
-[%Step{}, ...]
+
iex> list_steps()
+[%Step{}, ...]
@@ -1294,7 +1294,7 @@

search_workorders(project)

Example: -
search_workorders(%Project{id: 1}, %SearchParams{status: ["completed"]})
+
search_workorders(%Project{id: 1}, %SearchParams{status: ["completed"]})
@@ -1400,11 +1400,11 @@

update_dataclip(dataclip, attrs)

Examples -
iex> update_dataclip(dataclip, %{field: new_value})
-{:ok, %Dataclip{}}
+
iex> update_dataclip(dataclip, %{field: new_value})
+{:ok, %Dataclip{}}
 
-iex> update_dataclip(dataclip, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> update_dataclip(dataclip, %{field: bad_value}) +{:error, %Ecto.Changeset{}}
diff --git a/Lightning.Jobs.html b/Lightning.Jobs.html index 0f02af469f..104a9848b4 100644 --- a/Lightning.Jobs.html +++ b/Lightning.Jobs.html @@ -306,8 +306,8 @@

change_job(job, attrs \\ %{})

Examples -
iex> change_job(job)
-%Ecto.Changeset{data: %Job{}}
+
iex> change_job(job)
+%Ecto.Changeset{data: %Job{}}
@@ -337,11 +337,11 @@

create_job(attrs \\ %{})

Examples -
iex> create_job(%{field: value})
-{:ok, %Job{}}
+
iex> create_job(%{field: value})
+{:ok, %Job{}}
 
-iex> create_job(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> create_job(%{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -405,10 +405,10 @@

get_job!(id)

Examples -
iex> get_job!(123)
-%Job{}
+
iex> get_job!(123)
+%Job{}
 
-iex> get_job!(456)
+iex> get_job!(456)
 ** (Ecto.NoResultsError)
@@ -620,11 +620,11 @@

update_job(job, attrs)

Examples -
iex> update_job(job, %{field: new_value})
-{:ok, %Job{}}
+
iex> update_job(job, %{field: new_value})
+{:ok, %Job{}}
 
-iex> update_job(job, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> update_job(job, %{field: bad_value}) +{:error, %Ecto.Changeset{}}
diff --git a/Lightning.KafkaTriggers.MessageRecovery.html b/Lightning.KafkaTriggers.MessageRecovery.html index 52d6d1db19..dd3f3fb345 100644 --- a/Lightning.KafkaTriggers.MessageRecovery.html +++ b/Lightning.KafkaTriggers.MessageRecovery.html @@ -152,7 +152,7 @@

an error during reprocessing. These files can be reprocessed if you think the error was transient.

Usage:

alias Lightning.KafkaTriggers.MessageRecovery case MessageRecovery.recover_messages(Lightning.Config.kafka_alternate_storage_file_path) do

:ok -> # Success code
-{:error, error_count} -> # Failure code

end

+{:error, error_count} -> # Failure code

end

diff --git a/Lightning.OauthClients.html b/Lightning.OauthClients.html index 748dddff50..afec540ff0 100644 --- a/Lightning.OauthClients.html +++ b/Lightning.OauthClients.html @@ -267,8 +267,8 @@

change_client(client, attrs \\ %{})

Examples -
iex> change_client(%OauthClient{}, %{name: "New Client"})
-%Ecto.Changeset{...}
+
iex> change_client(%OauthClient{}, %{name: "New Client"})
+%Ecto.Changeset{...}
@@ -353,11 +353,11 @@

delete_client(client)

Examples -
iex> delete_client(client)
-{:ok, %OauthClient{}}
+
iex> delete_client(client)
+{:ok, %OauthClient{}}
 
-iex> delete_client(client)
-{:error, %Ecto.Changeset{}}
+
iex> delete_client(client) +{:error, %Ecto.Changeset{}}
@@ -403,10 +403,10 @@

get_client!(id)

Examples -
iex> get_client!(123)
-%OauthClient{}
+
iex> get_client!(123)
+%OauthClient{}
 
-iex> get_client!(456)
+iex> get_client!(456)
 ** (Ecto.NoResultsError)
@@ -447,9 +447,9 @@

list_clients(project)

Examples -

When given a Project:

iex> list_clients(%Project{id: 1})
-[%OauthClient{project_id: 1}, %OauthClient{project_id: 1}]

When given a User:

iex> list_clients(%User{id: 123})
-[%OauthClient{user_id: 123}, %OauthClient{user_id: 123}]
+

When given a Project:

iex> list_clients(%Project{id: 1})
+[%OauthClient{project_id: 1}, %OauthClient{project_id: 1}]

When given a User:

iex> list_clients(%User{id: 123})
+[%OauthClient{user_id: 123}, %OauthClient{user_id: 123}]
@@ -489,11 +489,11 @@

update_client(client, attrs)

Examples -
iex> update_client(client, %{field: new_value})
-{:ok, %OauthClient{}}
+
iex> update_client(client, %{field: new_value})
+{:ok, %OauthClient{}}
 
-iex> update_client(client, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> update_client(client, %{field: bad_value}) +{:error, %Ecto.Changeset{}}
diff --git a/Lightning.Policies.Permissions.html b/Lightning.Policies.Permissions.html index 9d57a4a91e..0a3123d5e4 100644 --- a/Lightning.Policies.Permissions.html +++ b/Lightning.Policies.Permissions.html @@ -138,13 +138,13 @@

This module defines a unique interface managing authorizations in Lightning.

Users in Lightning have instance-wide and project-wide roles which determine their level of access to resources in the application. Fo rmore details see the documentation.

These authorizations policies are all implemented under the lib/lightning/policies folder. In that folder you can find 3 files:

  • The users.ex file has all the policies for the instances wide access levels
  • The project_users.ex file has all the policies for the project wide access levels
  • The permissions.ex file defines the Lightning.Policies.Permissions.can/4 interface. Which is a wrapper around the Bodyguard.permit/4 function. -We use that interface to be able to harmonize the use of policies accross the entire app.

All the policies are tested in the test/lightning/policies folder. And the test are written in a way that allows the reader to quickly who can do what in the app.

We have two variants of the Lightning.Policies.Permissions.can/4 interface:

  • Lightning.Policies.Permissions.can(policy, action, actor, resource) returns :ok if the actor can perform the action on the resource and {:error, :unauthorized} otherwise.
  • Lightning.Policies.Permissions.can?(policy, action, actor, resource) returns true if the actor can perform the action on the resource and false otherwise.

Here is an example of how we the Lightning.Policies.Permissions.can/4 interface to check if the a user can edit a job or not

can_edit_workflow = Lightning.Policies.ProjectUsers |> Lightning.Policies.Permissions.can?(:edit_workflow, socket.assigns.current_user, socket.assigns.project)
+We use that interface to be able to harmonize the use of policies accross the entire app.

All the policies are tested in the test/lightning/policies folder. And the test are written in a way that allows the reader to quickly who can do what in the app.

We have two variants of the Lightning.Policies.Permissions.can/4 interface:

  • Lightning.Policies.Permissions.can(policy, action, actor, resource) returns :ok if the actor can perform the action on the resource and {:error, :unauthorized} otherwise.
  • Lightning.Policies.Permissions.can?(policy, action, actor, resource) returns true if the actor can perform the action on the resource and false otherwise.

Here is an example of how we the Lightning.Policies.Permissions.can/4 interface to check if the a user can edit a job or not

can_edit_workflow = Lightning.Policies.ProjectUsers |> Lightning.Policies.Permissions.can?(:edit_workflow, socket.assigns.current_user, socket.assigns.project)
 
-if can_edit_workflow do
+if can_edit_workflow do
   # allow user to edit the workflow
-else
+else
   # quick user out
-end
+
end
@@ -220,11 +220,11 @@

can(policy, action, user, params \\ [])

Examples -
iex> can(Lightning.Policies.Users, :create_workflow, user, project)
+
iex> can(Lightning.Policies.Users, :create_workflow, user, project)
 :ok
 
-iex> can(Lightning.Policies.Users, :create_project, user, %{})
-{:error, :unauthorized}
+
iex> can(Lightning.Policies.Users, :create_project, user, %{}) +{:error, :unauthorized}
@@ -254,10 +254,10 @@

can?(policy, action, user, params \\ []) Examples

-
iex> can(Lightning.Policies.Users, :create_workflow, user, project)
+
iex> can(Lightning.Policies.Users, :create_workflow, user, project)
 true
 
-iex> can(Lightning.Policies.Users, :create_project, user, %{})
+iex> can(Lightning.Policies.Users, :create_project, user, %{})
 false
diff --git a/Lightning.Projects.html b/Lightning.Projects.html index 00a65dd905..a71fc1aeb4 100644 --- a/Lightning.Projects.html +++ b/Lightning.Projects.html @@ -670,8 +670,8 @@

change_project(project, attrs \\ %{})

Examples -
iex> change_project(project)
-%Ecto.Changeset{data: %Project{}}
+
iex> change_project(project)
+%Ecto.Changeset{data: %Project{}}
@@ -703,11 +703,11 @@

create_project(attrs \\ %{}, schedule_email Examples

-
iex> create_project(%{field: value})
-{:ok, %Project{}}
+
iex> create_project(%{field: value})
+{:ok, %Project{}}
 
-iex> create_project(%{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> create_project(%{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -736,11 +736,11 @@

delete_project(project)

Examples -
iex> delete_project(project)
-{:ok, %Project{}}
+
iex> delete_project(project)
+{:ok, %Project{}}
 
-iex> delete_project(project)
-{:error, %Ecto.Changeset{}}
+
iex> delete_project(project) +{:error, %Ecto.Changeset{}}
@@ -805,8 +805,8 @@

export_project(atom, project_id, snapshot_i Examples

-
iex> export_project(:yaml, project_id)
-{:ok, string}
+
iex> export_project(:yaml, project_id)
+{:ok, string}
@@ -878,10 +878,10 @@

get_project!(id)

Examples -
iex> get_project!(123)
-%Project{}
+
iex> get_project!(123)
+%Project{}
 
-iex> get_project!(456)
+iex> get_project!(456)
 ** (Ecto.NoResultsError)
@@ -976,10 +976,10 @@

get_project_user!(id)

Examples -
iex> get_project_user!(123)
-%ProjectUser{}
+
iex> get_project_user!(123)
+%ProjectUser{}
 
-iex> get_project_user!(456)
+iex> get_project_user!(456)
 ** (Ecto.NoResultsError)
@@ -1009,16 +1009,16 @@

get_project_user_role(user, project)

Examples -
iex> get_project_user_role(user, project)
+
iex> get_project_user_role(user, project)
 :admin
 
-iex> get_project_user_role(user, project)
+iex> get_project_user_role(user, project)
 :viewer
 
-iex> get_project_user_role(user, project)
+iex> get_project_user_role(user, project)
 :editor
 
-iex> get_project_user_role(user, project)
+iex> get_project_user_role(user, project)
 :owner
@@ -1069,10 +1069,10 @@

get_project_with_users!(id)

Examples -
iex> get_project!(123)
-%Project{}
+
iex> get_project!(123)
+%Project{}
 
-iex> get_project!(456)
+iex> get_project!(456)
 ** (Ecto.NoResultsError)
@@ -1274,8 +1274,8 @@

list_projects()

Examples -
iex> list_projects()
-[%Project{}, ...]
+
iex> list_projects()
+[%Project{}, ...]
@@ -1755,11 +1755,11 @@

update_project(project, attrs)

Examples -
iex> update_project(project, %{field: new_value})
-{:ok, %Project{}}
+
iex> update_project(project, %{field: new_value})
+{:ok, %Project{}}
 
-iex> update_project(project, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> update_project(project, %{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -1787,11 +1787,11 @@

update_project_user(project_user, attrs) Examples

-
iex> update_project_user(project_user, %{field: new_value})
-{:ok, %ProjectUser{}}
+
iex> update_project_user(project_user, %{field: new_value})
+{:ok, %ProjectUser{}}
 
-iex> update_project_user(projectUser, %{field: bad_value})
-{:error, %Ecto.Changeset{}}
+
iex> update_project_user(projectUser, %{field: bad_value}) +{:error, %Ecto.Changeset{}}
@@ -1872,8 +1872,8 @@

validate_for_deletion(project, attrs)

Examples -
iex> validate_for_deletion(project)
-%Ecto.Changeset{data: %Project{}}
+
iex> validate_for_deletion(project)
+%Ecto.Changeset{data: %Project{}}
diff --git a/Lightning.PromEx.html b/Lightning.PromEx.html index bd238faa34..9c9e56c61b 100644 --- a/Lightning.PromEx.html +++ b/Lightning.PromEx.html @@ -142,24 +142,24 @@

more details regarding configuring PromEx:

config :lightning, Lightning.PromEx,
   disabled: false,
   manual_metrics_start_delay: :no_delay,
-  drop_metrics_groups: [],
+  drop_metrics_groups: [],
   grafana: :disabled,
   metrics_server: :disabled
  • Add this module to your application supervision tree. It should be one of the first things that is started so that no Telemetry events are missed. For example, if PromEx is started after your Repo module, you will miss Ecto's init events and the dashboards -will be missing some data points:

    def start(_type, _args) do
    -  children = [
    +will be missing some data points:

    def start(_type, _args) do
    +  children = [
         Lightning.PromEx,
     
         ...
    -  ]
    +  ]
     
       ...
    -end
  • Update your endpoint.ex file to expose your metrics (or configure a standalone +end

  • Update your endpoint.ex file to expose your metrics (or configure a standalone server using the :metrics_server config options). Be sure to put this plug before your Plug.Telemetry entry so that you can avoid having calls to your /metrics endpoint create their own metrics and logs which can pollute your logs/metrics given -that Prometheus will scrape at a regular interval and that can get noisy:

    defmodule LightningWeb.Endpoint do
    +that Prometheus will scrape at a regular interval and that can get noisy:

    defmodule LightningWeb.Endpoint do
       use Phoenix.Endpoint, otp_app: :lightning
     
       ...
    @@ -167,7 +167,7 @@ 

    plug PromEx.Plug, prom_ex_module: Lightning.PromEx ... -end

  • Update the list of plugins in the plugins/0 function return list to reflect your +end

  • Update the list of plugins in the plugins/0 function return list to reflect your application's dependencies. Also update the list of dashboards that are to be uploaded to Grafana in the dashboards/0 function.

  • diff --git a/Lightning.Repo.html b/Lightning.Repo.html index 8491cd2d08..b3afada48a 100644 --- a/Lightning.Repo.html +++ b/Lightning.Repo.html @@ -1738,13 +1738,13 @@

    transact(fun, opts \\ [])

    A small wrapper around Repo.transaction/2.

    Commits the transaction if the lambda returns :ok or {:ok, result}, rolling it back if the lambda returns :error or {:error, reason}. In both -cases, the function returns the result of the lambda.

    Example:

    Repo.transact(fn ->
    -  with {:ok, user} <- Accounts.create_user(params),
    -      {:ok, _log} <- Logs.log_action(:user_registered, user),
    -      {:ok, _job} <- Mailer.enqueue_email_confirmation(user) do
    -    {:ok, user}
    -  end
    -end)

    From blog post found here

    +cases, the function returns the result of the lambda.

    Example:

    Repo.transact(fn ->
    +  with {:ok, user} <- Accounts.create_user(params),
    +      {:ok, _log} <- Logs.log_action(:user_registered, user),
    +      {:ok, _job} <- Mailer.enqueue_email_confirmation(user) do
    +    {:ok, user}
    +  end
    +end)

    From blog post found here

    diff --git a/Lightning.Runs.Query.html b/Lightning.Runs.Query.html index 2ff5c27cb3..bd3cd55bb3 100644 --- a/Lightning.Runs.Query.html +++ b/Lightning.Runs.Query.html @@ -241,7 +241,7 @@

    eligible_for_claim()

    This query does not currently take into account the priority of the run. To allow for prioritization, the query should be updated to order by -priority.

    eligible_for_claim() |> prepend_order_by([:priority])
    +priority.

    eligible_for_claim() |> prepend_order_by([:priority])
    diff --git a/Lightning.Runs.html b/Lightning.Runs.html index 7a7da31ebc..9184d7ec30 100644 --- a/Lightning.Runs.html +++ b/Lightning.Runs.html @@ -477,7 +477,7 @@

    get(id, opts \\ [])

    -

    Get a run by id.

    Optionally preload associations by passing a list of atoms to :include.

    Lightning.Runs.get(id, include: [:workflow])
    +

    Get a run by id.

    Optionally preload associations by passing a list of atoms to :include.

    Lightning.Runs.get(id, include: [:workflow])
    diff --git a/Lightning.Runtime.LogAgent.html b/Lightning.Runtime.LogAgent.html index 256ceb3492..6c0f513cb4 100644 --- a/Lightning.Runtime.LogAgent.html +++ b/Lightning.Runtime.LogAgent.html @@ -138,9 +138,9 @@

    Agent facility to consume STDOUT/STDERR byte by byte.

    Since it works on a byte by byte basis, you will need to perform line-splitting -yourself.

    Usage:

    {:ok, log} = LogAgent.start_link()
    -"foo" = LogAgent.process_chunk(log, {:stdout, "foo"})
    -"foobar" = LogAgent.process_chunk(log, {:stdout, "bar"})
    +yourself.

    Usage:

    {:ok, log} = LogAgent.start_link()
    +"foo" = LogAgent.process_chunk(log, {:stdout, "foo"})
    +"foobar" = LogAgent.process_chunk(log, {:stdout, "bar"})
    diff --git a/Lightning.Runtime.RuntimeManager.html b/Lightning.Runtime.RuntimeManager.html index ead7646b57..768442e97a 100644 --- a/Lightning.Runtime.RuntimeManager.html +++ b/Lightning.Runtime.RuntimeManager.html @@ -146,8 +146,8 @@

    Sample:

    config :lightining, Elixir.Lightning.Runtime.RuntimeManager,

    version: "0.1.0",
     start: true,
     args: ~w(js/app.js --bundle --target=es2016 --outdir=../priv/static/assets),
    -cd: Path.expand("../assets", __DIR__),
    -env: %{}

    Options:

    • :version - the expected runtime version

    • :start - flag to start the runtime manager. If false the GenServer +cd: Path.expand("../assets", __DIR__), +env: %{}

    Options:

    • :version - the expected runtime version

    • :start - flag to start the runtime manager. If false the GenServer won't be started

    • :path - the path to find the runtime executable at. By default, it is automatically downloaded and placed inside the _build directory of your current app

    Overriding the :path is not recommended, as we will automatically diff --git a/Lightning.Scrubber.html b/Lightning.Scrubber.html index b3332533ef..6e4b9dea00 100644 --- a/Lightning.Scrubber.html +++ b/Lightning.Scrubber.html @@ -137,11 +137,11 @@

    -

    Process used to scrub strings of sensitive information.

    Can be started via start_link/1.

    {:ok, scrubber} =
    -  Lightning.Scrubber.start_link(
    +

    Process used to scrub strings of sensitive information.

    Can be started via start_link/1.

    {:ok, scrubber} =
    +  Lightning.Scrubber.start_link(
         samples:
    -      Lightning.Credentials.sensitive_values_for(credential)
    -  )

    Takes an optional :name key, in case you need to name the process.

    +
    Lightning.Credentials.sensitive_values_for(credential) + )

    Takes an optional :name key, in case you need to name the process.

    diff --git a/Lightning.Storage.GCS.html b/Lightning.Storage.GCS.html index b970c7b15c..7869eca249 100644 --- a/Lightning.Storage.GCS.html +++ b/Lightning.Storage.GCS.html @@ -150,10 +150,10 @@

    Example Usage

    # Store a file in GCS
    -Lightning.Storage.GCS.store("/path/to/source", "destination/path")
    +Lightning.Storage.GCS.store("/path/to/source", "destination/path")
     
     # Get a signed URL for the stored file
    -{:ok, url} = Lightning.Storage.GCS.get_url("destination/path")
    +
    {:ok, url} = Lightning.Storage.GCS.get_url("destination/path")
    diff --git a/Lightning.Storage.Local.html b/Lightning.Storage.Local.html index 394a2f7018..86e543b6da 100644 --- a/Lightning.Storage.Local.html +++ b/Lightning.Storage.Local.html @@ -156,11 +156,11 @@

    Example Usage

    # Store a file
    -{:ok, filename} =
    -  Lightning.Storage.Local.store("/path/to/source", "destination/path")
    +{:ok, filename} =
    +  Lightning.Storage.Local.store("/path/to/source", "destination/path")
     
     # Get the URL for the stored file
    -{:ok, url} = Lightning.Storage.Local.get_url("destination/path")
    +
    {:ok, url} = Lightning.Storage.Local.get_url("destination/path")
    diff --git a/Lightning.Storage.ProjectFileDefinition.html b/Lightning.Storage.ProjectFileDefinition.html index db22843ab7..5097c51a7e 100644 --- a/Lightning.Storage.ProjectFileDefinition.html +++ b/Lightning.Storage.ProjectFileDefinition.html @@ -138,13 +138,13 @@

    This module provides functionality for managing the storage and retrieval of project files.

    It handles operations related to storing project files, generating URLs for accessing these files, and constructing storage paths for exported files. It serves as an abstraction layer over the underlying storage mechanism provided by the Lightning.Storage module.

    ## Functions

    • store/2: Stores a file from a given source path into the storage system based on the file's path.
    • get_url/1: Retrieves the URL for accessing a stored file.
    • storage_path_for_exports/2: Constructs a storage path for exported files, defaulting to a .zip extension.

    ## Example Usage

      # Store a file
    -  Lightning.Storage.ProjectFileDefinition.store("/path/to/source", project_file)
    +  Lightning.Storage.ProjectFileDefinition.store("/path/to/source", project_file)
     
       # Get a URL for the stored file
    -  url = Lightning.Storage.ProjectFileDefinition.get_url(project_file)
    +  url = Lightning.Storage.ProjectFileDefinition.get_url(project_file)
     
       # Get the storage path for an exported file
    -  path = Lightning.Storage.ProjectFileDefinition.storage_path_for_exports(project_file)
    + path = Lightning.Storage.ProjectFileDefinition.storage_path_for_exports(project_file)

    diff --git a/Lightning.TaskWorker.html b/Lightning.TaskWorker.html index 3c03ff39a8..bf38d04ca8 100644 --- a/Lightning.TaskWorker.html +++ b/Lightning.TaskWorker.html @@ -140,7 +140,7 @@

    A TaskWorker with concurrency limits.

    A simple concurrency limiter that wraps Task.Supervisor, which already does have the ability to specify max_children; it throws an error when that limit is exceeded.

    To use it, start it like any other process; ideally in your supervision tree.

      ...,
    -  {Lightning.TaskWorker, name: :cli_task_worker, max_tasks: 4}

    Options

    • :max_tasks Defaults to the number of system schedulers available to the vm.
    + {Lightning.TaskWorker, name: :cli_task_worker, max_tasks: 4}

    Options

    • :max_tasks Defaults to the number of system schedulers available to the vm.
    diff --git a/Lightning.Validators.html b/Lightning.Validators.html index 01a6e5ef27..b516fffdd3 100644 --- a/Lightning.Validators.html +++ b/Lightning.Validators.html @@ -233,10 +233,10 @@

    validate_exclusive(changeset, fields, messa

    Validate that only one of the fields is set at a time.

    Example:

    changeset
    -|> validate_exclusive(
    -  [:source_job_id, :source_trigger_id],
    +|> validate_exclusive(
    +  [:source_job_id, :source_trigger_id],
       "source_job_id and source_trigger_id are mutually exclusive"
    -)
    +)

    diff --git a/Lightning.VersionControl.GithubClient.html b/Lightning.VersionControl.GithubClient.html index ca05d05833..75a149d1e3 100644 --- a/Lightning.VersionControl.GithubClient.html +++ b/Lightning.VersionControl.GithubClient.html @@ -868,11 +868,11 @@

    delete(client, url, opts)

    -

    Perform a DELETE request.

    See request/1 or request/2 for options definition.

    delete("/users")
    -delete("/users", query: [scope: "admin"])
    -delete(client, "/users")
    -delete(client, "/users", query: [scope: "admin"])
    -delete(client, "/users", body: %{name: "Jon"})
    +

    Perform a DELETE request.

    See request/1 or request/2 for options definition.

    delete("/users")
    +delete("/users", query: [scope: "admin"])
    +delete(client, "/users")
    +delete(client, "/users", query: [scope: "admin"])
    +delete(client, "/users", body: %{name: "Jon"})
    @@ -901,11 +901,11 @@

    delete!(client, url, opts)

    -

    Perform a DELETE request.

    See request!/1 or request!/2 for options definition.

    delete!("/users")
    -delete!("/users", query: [scope: "admin"])
    -delete!(client, "/users")
    -delete!(client, "/users", query: [scope: "admin"])
    -delete!(client, "/users", body: %{name: "Jon"})
    +

    Perform a DELETE request.

    See request!/1 or request!/2 for options definition.

    delete!("/users")
    +delete!("/users", query: [scope: "admin"])
    +delete!(client, "/users")
    +delete!(client, "/users", query: [scope: "admin"])
    +delete!(client, "/users", body: %{name: "Jon"})
    @@ -1021,11 +1021,11 @@

    get(client, url, opts)

    -

    Perform a GET request.

    See request/1 or request/2 for options definition.

    get("/users")
    -get("/users", query: [scope: "admin"])
    -get(client, "/users")
    -get(client, "/users", query: [scope: "admin"])
    -get(client, "/users", body: %{name: "Jon"})
    +

    Perform a GET request.

    See request/1 or request/2 for options definition.

    get("/users")
    +get("/users", query: [scope: "admin"])
    +get(client, "/users")
    +get(client, "/users", query: [scope: "admin"])
    +get(client, "/users", body: %{name: "Jon"})
    @@ -1054,11 +1054,11 @@

    get!(client, url, opts)

    -

    Perform a GET request.

    See request!/1 or request!/2 for options definition.

    get!("/users")
    -get!("/users", query: [scope: "admin"])
    -get!(client, "/users")
    -get!(client, "/users", query: [scope: "admin"])
    -get!(client, "/users", body: %{name: "Jon"})
    +

    Perform a GET request.

    See request!/1 or request!/2 for options definition.

    get!("/users")
    +get!("/users", query: [scope: "admin"])
    +get!(client, "/users")
    +get!(client, "/users", query: [scope: "admin"])
    +get!(client, "/users", body: %{name: "Jon"})
    @@ -1262,11 +1262,11 @@

    head(client, url, opts)

    -

    Perform a HEAD request.

    See request/1 or request/2 for options definition.

    head("/users")
    -head("/users", query: [scope: "admin"])
    -head(client, "/users")
    -head(client, "/users", query: [scope: "admin"])
    -head(client, "/users", body: %{name: "Jon"})
    +

    Perform a HEAD request.

    See request/1 or request/2 for options definition.

    head("/users")
    +head("/users", query: [scope: "admin"])
    +head(client, "/users")
    +head(client, "/users", query: [scope: "admin"])
    +head(client, "/users", body: %{name: "Jon"})
    @@ -1295,11 +1295,11 @@

    head!(client, url, opts)

    -

    Perform a HEAD request.

    See request!/1 or request!/2 for options definition.

    head!("/users")
    -head!("/users", query: [scope: "admin"])
    -head!(client, "/users")
    -head!(client, "/users", query: [scope: "admin"])
    -head!(client, "/users", body: %{name: "Jon"})
    +

    Perform a HEAD request.

    See request!/1 or request!/2 for options definition.

    head!("/users")
    +head!("/users", query: [scope: "admin"])
    +head!(client, "/users")
    +head!(client, "/users", query: [scope: "admin"])
    +head!(client, "/users", body: %{name: "Jon"})
    @@ -1327,11 +1327,11 @@

    options(client, url, opts)

    -

    Perform a OPTIONS request.

    See request/1 or request/2 for options definition.

    options("/users")
    -options("/users", query: [scope: "admin"])
    -options(client, "/users")
    -options(client, "/users", query: [scope: "admin"])
    -options(client, "/users", body: %{name: "Jon"})
    +

    Perform a OPTIONS request.

    See request/1 or request/2 for options definition.

    options("/users")
    +options("/users", query: [scope: "admin"])
    +options(client, "/users")
    +options(client, "/users", query: [scope: "admin"])
    +options(client, "/users", body: %{name: "Jon"})
    @@ -1360,11 +1360,11 @@

    options!(client, url, opts)

    -

    Perform a OPTIONS request.

    See request!/1 or request!/2 for options definition.

    options!("/users")
    -options!("/users", query: [scope: "admin"])
    -options!(client, "/users")
    -options!(client, "/users", query: [scope: "admin"])
    -options!(client, "/users", body: %{name: "Jon"})
    +

    Perform a OPTIONS request.

    See request!/1 or request!/2 for options definition.

    options!("/users")
    +options!("/users", query: [scope: "admin"])
    +options!(client, "/users")
    +options!(client, "/users", query: [scope: "admin"])
    +options!(client, "/users", body: %{name: "Jon"})
    @@ -1393,10 +1393,10 @@

    patch(client, url, body, opts)

    -

    Perform a PATCH request.

    See request/1 or request/2 for options definition.

    patch("/users", %{name: "Jon"})
    -patch("/users", %{name: "Jon"}, query: [scope: "admin"])
    -patch(client, "/users", %{name: "Jon"})
    -patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    +

    Perform a PATCH request.

    See request/1 or request/2 for options definition.

    patch("/users", %{name: "Jon"})
    +patch("/users", %{name: "Jon"}, query: [scope: "admin"])
    +patch(client, "/users", %{name: "Jon"})
    +patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    @@ -1425,10 +1425,10 @@

    patch!(client, url, body, opts)

    -

    Perform a PATCH request.

    See request!/1 or request!/2 for options definition.

    patch!("/users", %{name: "Jon"})
    -patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
    -patch!(client, "/users", %{name: "Jon"})
    -patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    +

    Perform a PATCH request.

    See request!/1 or request!/2 for options definition.

    patch!("/users", %{name: "Jon"})
    +patch!("/users", %{name: "Jon"}, query: [scope: "admin"])
    +patch!(client, "/users", %{name: "Jon"})
    +patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    @@ -1457,10 +1457,10 @@

    post(client, url, body, opts)

    -

    Perform a POST request.

    See request/1 or request/2 for options definition.

    post("/users", %{name: "Jon"})
    -post("/users", %{name: "Jon"}, query: [scope: "admin"])
    -post(client, "/users", %{name: "Jon"})
    -post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    +

    Perform a POST request.

    See request/1 or request/2 for options definition.

    post("/users", %{name: "Jon"})
    +post("/users", %{name: "Jon"}, query: [scope: "admin"])
    +post(client, "/users", %{name: "Jon"})
    +post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    @@ -1489,10 +1489,10 @@

    post!(client, url, body, opts)

    -

    Perform a POST request.

    See request!/1 or request!/2 for options definition.

    post!("/users", %{name: "Jon"})
    -post!("/users", %{name: "Jon"}, query: [scope: "admin"])
    -post!(client, "/users", %{name: "Jon"})
    -post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    +

    Perform a POST request.

    See request!/1 or request!/2 for options definition.

    post!("/users", %{name: "Jon"})
    +post!("/users", %{name: "Jon"}, query: [scope: "admin"])
    +post!(client, "/users", %{name: "Jon"})
    +post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    @@ -1521,10 +1521,10 @@

    put(client, url, body, opts)

    -

    Perform a PUT request.

    See request/1 or request/2 for options definition.

    put("/users", %{name: "Jon"})
    -put("/users", %{name: "Jon"}, query: [scope: "admin"])
    -put(client, "/users", %{name: "Jon"})
    -put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    +

    Perform a PUT request.

    See request/1 or request/2 for options definition.

    put("/users", %{name: "Jon"})
    +put("/users", %{name: "Jon"}, query: [scope: "admin"])
    +put(client, "/users", %{name: "Jon"})
    +put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    @@ -1553,10 +1553,10 @@

    put!(client, url, body, opts)

    -

    Perform a PUT request.

    See request!/1 or request!/2 for options definition.

    put!("/users", %{name: "Jon"})
    -put!("/users", %{name: "Jon"}, query: [scope: "admin"])
    -put!(client, "/users", %{name: "Jon"})
    -put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    +

    Perform a PUT request.

    See request!/1 or request!/2 for options definition.

    put!("/users", %{name: "Jon"})
    +put!("/users", %{name: "Jon"}, query: [scope: "admin"])
    +put!(client, "/users", %{name: "Jon"})
    +put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])
    @@ -1598,11 +1598,11 @@

    request(client \\ %Tesla.Client{}, options) Examples

    -
    ExampleApi.request(method: :get, url: "/users/path")
    +
    ExampleApi.request(method: :get, url: "/users/path")
     
     # use shortcut methods
    -ExampleApi.get("/users/1")
    -ExampleApi.post(client, "/users", %{name: "Jon"})
    +
    ExampleApi.get("/users/1") +ExampleApi.post(client, "/users", %{name: "Jon"})
    @@ -1660,11 +1660,11 @@

    trace(client, url, opts)

    -

    Perform a TRACE request.

    See request/1 or request/2 for options definition.

    trace("/users")
    -trace("/users", query: [scope: "admin"])
    -trace(client, "/users")
    -trace(client, "/users", query: [scope: "admin"])
    -trace(client, "/users", body: %{name: "Jon"})
    +

    Perform a TRACE request.

    See request/1 or request/2 for options definition.

    trace("/users")
    +trace("/users", query: [scope: "admin"])
    +trace(client, "/users")
    +trace(client, "/users", query: [scope: "admin"])
    +trace(client, "/users", body: %{name: "Jon"})
    @@ -1693,11 +1693,11 @@

    trace!(client, url, opts)

    -

    Perform a TRACE request.

    See request!/1 or request!/2 for options definition.

    trace!("/users")
    -trace!("/users", query: [scope: "admin"])
    -trace!(client, "/users")
    -trace!(client, "/users", query: [scope: "admin"])
    -trace!(client, "/users", body: %{name: "Jon"})
    +

    Perform a TRACE request.

    See request!/1 or request!/2 for options definition.

    trace!("/users")
    +trace!("/users", query: [scope: "admin"])
    +trace!(client, "/users")
    +trace!(client, "/users", query: [scope: "admin"])
    +trace!(client, "/users", body: %{name: "Jon"})
    diff --git a/Lightning.WebhookAuthMethods.html b/Lightning.WebhookAuthMethods.html index 4278971394..4aa3e3284c 100644 --- a/Lightning.WebhookAuthMethods.html +++ b/Lightning.WebhookAuthMethods.html @@ -347,15 +347,15 @@

    create_auth_method(attrs, list)

    Examples -
    • Creating a WebhookAuthMethod without an associated trigger:

      iex> create_auth_method(%{valid_attributes}, actor: %User{})
      -{:ok, %WebhookAuthMethod{}}
      +
      • Creating a WebhookAuthMethod without an associated trigger:

        iex> create_auth_method(%{valid_attributes}, actor: %User{})
        +{:ok, %WebhookAuthMethod{}}
         
        -iex> create_auth_method(%{invalid_attributes}, actor: %User{})
        -{:error, %Ecto.Changeset{}}
      • Creating a WebhookAuthMethod with an associated trigger:

        iex> create_auth_method(%Trigger{}, %{valid_attributes}, actor: %User{})
        -{:ok, %WebhookAuthMethod{}}
        +iex> create_auth_method(%{invalid_attributes}, actor: %User{})
        +{:error, %Ecto.Changeset{}}
      • Creating a WebhookAuthMethod with an associated trigger:

        iex> create_auth_method(%Trigger{}, %{valid_attributes}, actor: %User{})
        +{:ok, %WebhookAuthMethod{}}
         
        -iex> create_auth_method(%Trigger{}, %{invalid_attributes}, actor: %User{})
        -{:error, %Ecto.Changeset{}}

      +iex> create_auth_method(%Trigger{}, %{invalid_attributes}, actor: %User{}) +{:error, %Ecto.Changeset{}}

    @@ -440,9 +440,9 @@

    create_changeset(webhook_auth_method, param Examples

    -
    • Creating a changeset for an API type auth method:

      iex> Lightning.Workflows.create_changeset(%WebhookAuthMethod{auth_type: :api}, %{})
      -%WebhookAuthMethod{api_key: some_new_api_key}
    • Creating a changeset for a non-API type auth method:

      iex> Lightning.Workflows.create_changeset(%WebhookAuthMethod{auth_type: :other}, %{})
      -%WebhookAuthMethod{}
    +
    • Creating a changeset for an API type auth method:

      iex> Lightning.Workflows.create_changeset(%WebhookAuthMethod{auth_type: :api}, %{})
      +%WebhookAuthMethod{api_key: some_new_api_key}
    • Creating a changeset for a non-API type auth method:

      iex> Lightning.Workflows.create_changeset(%WebhookAuthMethod{auth_type: :other}, %{})
      +%WebhookAuthMethod{}
    @@ -490,9 +490,9 @@

    delete_auth_method(auth_method)

    Examples -
    • Successful deletion:

      iex> delete_auth_method(%WebhookAuthMethod{id: "some_id"})
      -{:ok, %WebhookAuthMethod{}}
    • Deletion fails due to the item not existing or other conflict:

      iex> delete_auth_method(%WebhookAuthMethod{id: "non_existing_id"})
      -{:error, reason}

    +
    • Successful deletion:

      iex> delete_auth_method(%WebhookAuthMethod{id: "some_id"})
      +{:ok, %WebhookAuthMethod{}}
    • Deletion fails due to the item not existing or other conflict:

      iex> delete_auth_method(%WebhookAuthMethod{id: "non_existing_id"})
      +{:error, reason}

    @@ -545,8 +545,8 @@

    find_by_api_key(api_key, project)

    Examples -
    • When a matching WebhookAuthMethod is found:

      iex> Lightning.Workflows.find_by_api_key("existing_api_key", %Project{id: "existing_project_id"})
      -%WebhookAuthMethod{}
    • When there is no matching WebhookAuthMethod:

      iex> Lightning.Workflows.find_by_api_key("non_existing_api_key", %Project{id: "existing_project_id"})
      +
      • When a matching WebhookAuthMethod is found:

        iex> Lightning.Workflows.find_by_api_key("existing_api_key", %Project{id: "existing_project_id"})
        +%WebhookAuthMethod{}
      • When there is no matching WebhookAuthMethod:

        iex> Lightning.Workflows.find_by_api_key("non_existing_api_key", %Project{id: "existing_project_id"})
         nil
    @@ -599,8 +599,8 @@

    find_by_id!(id)

    Examples -

    @@ -2482,7 +2483,7 @@

    will be less than v0.10.0 and the final states are not guaranteed to be accurate for workflows with multiple branches and leaf nodes with varying exit reasons.

    The migration scripts can be run with a single function call in SetupUtils from -a connect iex session:

    Lightning.SetupUtils.approximate_state_for_attempts_and_workorders()

    Note that (like lots of other functionality in SetupUtils, calling this +a connect iex session:

    Lightning.SetupUtils.approximate_state_for_attempts_and_workorders()

    Note that (like lots of other functionality in SetupUtils, calling this function is a destructive action and you should only do it if you've backed up your data and you know what you're doing.)

    As always, we recommend backing up your data before migrating. (And thanks for bearing with us as we move towards our first stable Lightning release.)

    diff --git a/deployment.html b/deployment.html index 46210ece03..c7e6bf2d7d 100644 --- a/deployment.html +++ b/deployment.html @@ -184,8 +184,8 @@

    Lightning enables connection to github via Github Apps. The following github permissions are needed for the github app:

    ResourceAccess
    ActionsRead and Write
    ContentsRead and Write
    MetadataRead only
    SecretsRead and Write
    WorkflowsRead and Write

    Ensure you set the following URLs:

    • Homepage URL: <app_url_here>
    • Callback URL for authorizing users: <app_url_here>/oauth/github/callback (Do NOT check the two checkboxes in this section requesting Device Flow and OAuth.)
    • Setup URL for Post installation: <app_url_here>/setup_vcs (Check the box for Redirect on update)

    These envrionment variables will need to be set in order to configure the github -app:

    VariableDescription
    GITHUB_APP_IDthe github app ID.
    GITHUB_APP_NAMEthe github app name
    GITHUB_APP_CLIENT_IDthe github app Client ID
    GITHUB_APP_CLIENT_SECRETthe github app Client Secret
    GITHUB_CERTthe github app private key

    You can access these from your github app settings menu. Also needed for the -configurtaion is: