@zavudev/sdk 0.55.0 → 0.57.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/CHANGELOG.md +26 -0
- package/client.d.mts +25 -13
- package/client.d.mts.map +1 -1
- package/client.d.ts +25 -13
- package/client.d.ts.map +1 -1
- package/client.js +15 -3
- package/client.js.map +1 -1
- package/client.mjs +15 -3
- package/client.mjs.map +1 -1
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/tslib.js +17 -17
- package/internal/utils/query.d.mts +0 -3
- package/internal/utils/query.d.mts.map +1 -1
- package/internal/utils/query.d.ts +0 -3
- package/internal/utils/query.d.ts.map +1 -1
- package/internal/utils/query.js +3 -16
- package/internal/utils/query.js.map +1 -1
- package/internal/utils/query.mjs +2 -16
- package/internal/utils/query.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agent-templates.d.mts +97 -0
- package/resources/agent-templates.d.mts.map +1 -0
- package/resources/agent-templates.d.ts +97 -0
- package/resources/agent-templates.d.ts.map +1 -0
- package/resources/agent-templates.js +39 -0
- package/resources/agent-templates.js.map +1 -0
- package/resources/agent-templates.mjs +35 -0
- package/resources/agent-templates.mjs.map +1 -0
- package/resources/agents/agents.d.mts +462 -0
- package/resources/agents/agents.d.mts.map +1 -0
- package/resources/agents/agents.d.ts +462 -0
- package/resources/agents/agents.d.ts.map +1 -0
- package/resources/agents/agents.js +129 -0
- package/resources/agents/agents.js.map +1 -0
- package/resources/agents/agents.mjs +124 -0
- package/resources/agents/agents.mjs.map +1 -0
- package/resources/agents/index.d.mts +3 -0
- package/resources/agents/index.d.mts.map +1 -0
- package/resources/agents/index.d.ts +3 -0
- package/resources/agents/index.d.ts.map +1 -0
- package/resources/agents/index.js +9 -0
- package/resources/agents/index.js.map +1 -0
- package/resources/agents/index.mjs +4 -0
- package/resources/agents/index.mjs.map +1 -0
- package/resources/agents/senders.d.mts +54 -0
- package/resources/agents/senders.d.mts.map +1 -0
- package/resources/agents/senders.d.ts +54 -0
- package/resources/agents/senders.d.ts.map +1 -0
- package/resources/agents/senders.js +45 -0
- package/resources/agents/senders.js.map +1 -0
- package/resources/agents/senders.mjs +41 -0
- package/resources/agents/senders.mjs.map +1 -0
- package/resources/agents.d.mts +2 -0
- package/resources/agents.d.mts.map +1 -0
- package/resources/agents.d.ts +2 -0
- package/resources/agents.d.ts.map +1 -0
- package/resources/agents.js +6 -0
- package/resources/agents.js.map +1 -0
- package/resources/agents.mjs +3 -0
- package/resources/agents.mjs.map +1 -0
- package/resources/broadcasts/broadcasts.d.mts +16 -9
- package/resources/broadcasts/broadcasts.d.mts.map +1 -1
- package/resources/broadcasts/broadcasts.d.ts +16 -9
- package/resources/broadcasts/broadcasts.d.ts.map +1 -1
- package/resources/broadcasts/broadcasts.js +16 -9
- package/resources/broadcasts/broadcasts.js.map +1 -1
- package/resources/broadcasts/broadcasts.mjs +16 -9
- package/resources/broadcasts/broadcasts.mjs.map +1 -1
- package/resources/calls.d.mts +539 -0
- package/resources/calls.d.mts.map +1 -0
- package/resources/calls.d.ts +539 -0
- package/resources/calls.d.ts.map +1 -0
- package/resources/calls.js +85 -0
- package/resources/calls.js.map +1 -0
- package/resources/calls.mjs +81 -0
- package/resources/calls.mjs.map +1 -0
- package/resources/contacts/contacts.d.mts +32 -13
- package/resources/contacts/contacts.d.mts.map +1 -1
- package/resources/contacts/contacts.d.ts +32 -13
- package/resources/contacts/contacts.d.ts.map +1 -1
- package/resources/contacts/contacts.js +0 -14
- package/resources/contacts/contacts.js.map +1 -1
- package/resources/contacts/contacts.mjs +0 -14
- package/resources/contacts/contacts.mjs.map +1 -1
- package/resources/conversations.d.mts +360 -0
- package/resources/conversations.d.mts.map +1 -0
- package/resources/conversations.d.ts +360 -0
- package/resources/conversations.d.ts.map +1 -0
- package/resources/conversations.js +47 -0
- package/resources/conversations.js.map +1 -0
- package/resources/conversations.mjs +43 -0
- package/resources/conversations.mjs.map +1 -0
- package/resources/email-domains.d.mts +260 -0
- package/resources/email-domains.d.mts.map +1 -0
- package/resources/email-domains.d.ts +260 -0
- package/resources/email-domains.d.ts.map +1 -0
- package/resources/email-domains.js +77 -0
- package/resources/email-domains.js.map +1 -0
- package/resources/email-domains.mjs +73 -0
- package/resources/email-domains.mjs.map +1 -0
- package/resources/functions/functions.d.mts +122 -1
- package/resources/functions/functions.d.mts.map +1 -1
- package/resources/functions/functions.d.ts +122 -1
- package/resources/functions/functions.d.ts.map +1 -1
- package/resources/functions/functions.js +53 -0
- package/resources/functions/functions.js.map +1 -1
- package/resources/functions/functions.mjs +53 -0
- package/resources/functions/functions.mjs.map +1 -1
- package/resources/functions/git-link.d.mts +295 -0
- package/resources/functions/git-link.d.mts.map +1 -0
- package/resources/functions/git-link.d.ts +295 -0
- package/resources/functions/git-link.d.ts.map +1 -0
- package/resources/functions/git-link.js +97 -0
- package/resources/functions/git-link.js.map +1 -0
- package/resources/functions/git-link.mjs +93 -0
- package/resources/functions/git-link.mjs.map +1 -0
- package/resources/functions/index.d.mts +3 -1
- package/resources/functions/index.d.mts.map +1 -1
- package/resources/functions/index.d.ts +3 -1
- package/resources/functions/index.d.ts.map +1 -1
- package/resources/functions/index.js +5 -1
- package/resources/functions/index.js.map +1 -1
- package/resources/functions/index.mjs +2 -0
- package/resources/functions/index.mjs.map +1 -1
- package/resources/functions/triggers.d.mts +164 -0
- package/resources/functions/triggers.d.mts.map +1 -0
- package/resources/functions/triggers.d.ts +164 -0
- package/resources/functions/triggers.d.ts.map +1 -0
- package/resources/functions/triggers.js +74 -0
- package/resources/functions/triggers.js.map +1 -0
- package/resources/functions/triggers.mjs +70 -0
- package/resources/functions/triggers.mjs.map +1 -0
- package/resources/index.d.mts +10 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +10 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +11 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -0
- package/resources/index.mjs.map +1 -1
- package/resources/introspect.d.mts +74 -1
- package/resources/introspect.d.mts.map +1 -1
- package/resources/introspect.d.ts +74 -1
- package/resources/introspect.d.ts.map +1 -1
- package/resources/introspect.js +22 -0
- package/resources/introspect.js.map +1 -1
- package/resources/introspect.mjs +22 -0
- package/resources/introspect.mjs.map +1 -1
- package/resources/messages.d.mts +89 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +89 -1
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +48 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +48 -0
- package/resources/messages.mjs.map +1 -1
- package/resources/number-10dlc/brands.d.mts +10 -5
- package/resources/number-10dlc/brands.d.mts.map +1 -1
- package/resources/number-10dlc/brands.d.ts +10 -5
- package/resources/number-10dlc/brands.d.ts.map +1 -1
- package/resources/number-10dlc/brands.js +10 -5
- package/resources/number-10dlc/brands.js.map +1 -1
- package/resources/number-10dlc/brands.mjs +10 -5
- package/resources/number-10dlc/brands.mjs.map +1 -1
- package/resources/number-10dlc/campaigns/campaigns.d.mts +8 -7
- package/resources/number-10dlc/campaigns/campaigns.d.mts.map +1 -1
- package/resources/number-10dlc/campaigns/campaigns.d.ts +8 -7
- package/resources/number-10dlc/campaigns/campaigns.d.ts.map +1 -1
- package/resources/number-10dlc/campaigns/campaigns.js +8 -7
- package/resources/number-10dlc/campaigns/campaigns.js.map +1 -1
- package/resources/number-10dlc/campaigns/campaigns.mjs +8 -7
- package/resources/number-10dlc/campaigns/campaigns.mjs.map +1 -1
- package/resources/phone-numbers.d.mts +6 -1
- package/resources/phone-numbers.d.mts.map +1 -1
- package/resources/phone-numbers.d.ts +6 -1
- package/resources/phone-numbers.d.ts.map +1 -1
- package/resources/senders/agent/agent.d.mts +4 -3
- package/resources/senders/agent/agent.d.mts.map +1 -1
- package/resources/senders/agent/agent.d.ts +4 -3
- package/resources/senders/agent/agent.d.ts.map +1 -1
- package/resources/senders/agent/agent.js +2 -2
- package/resources/senders/agent/agent.js.map +1 -1
- package/resources/senders/agent/agent.mjs +2 -2
- package/resources/senders/agent/agent.mjs.map +1 -1
- package/resources/senders/agent/index.d.mts +2 -2
- package/resources/senders/agent/index.d.mts.map +1 -1
- package/resources/senders/agent/index.d.ts +2 -2
- package/resources/senders/agent/index.d.ts.map +1 -1
- package/resources/senders/agent/index.js +2 -2
- package/resources/senders/agent/index.js.map +1 -1
- package/resources/senders/agent/index.mjs +1 -1
- package/resources/senders/agent/index.mjs.map +1 -1
- package/resources/senders/agent/knowledge-bases/documents.d.mts +56 -1
- package/resources/senders/agent/knowledge-bases/documents.d.mts.map +1 -1
- package/resources/senders/agent/knowledge-bases/documents.d.ts +56 -1
- package/resources/senders/agent/knowledge-bases/documents.d.ts.map +1 -1
- package/resources/senders/agent/knowledge-bases/documents.js +33 -0
- package/resources/senders/agent/knowledge-bases/documents.js.map +1 -1
- package/resources/senders/agent/knowledge-bases/documents.mjs +33 -0
- package/resources/senders/agent/knowledge-bases/documents.mjs.map +1 -1
- package/resources/senders/agent/knowledge-bases/index.d.mts +1 -1
- package/resources/senders/agent/knowledge-bases/index.d.mts.map +1 -1
- package/resources/senders/agent/knowledge-bases/index.d.ts +1 -1
- package/resources/senders/agent/knowledge-bases/index.d.ts.map +1 -1
- package/resources/senders/agent/knowledge-bases/index.js.map +1 -1
- package/resources/senders/agent/knowledge-bases/index.mjs.map +1 -1
- package/resources/senders/agent/knowledge-bases/knowledge-bases.d.mts +2 -2
- package/resources/senders/agent/knowledge-bases/knowledge-bases.d.mts.map +1 -1
- package/resources/senders/agent/knowledge-bases/knowledge-bases.d.ts +2 -2
- package/resources/senders/agent/knowledge-bases/knowledge-bases.d.ts.map +1 -1
- package/resources/senders/agent/knowledge-bases/knowledge-bases.js.map +1 -1
- package/resources/senders/agent/knowledge-bases/knowledge-bases.mjs.map +1 -1
- package/resources/senders/agent/tools/index.d.mts +3 -0
- package/resources/senders/agent/tools/index.d.mts.map +1 -0
- package/resources/senders/agent/tools/index.d.ts +3 -0
- package/resources/senders/agent/tools/index.d.ts.map +1 -0
- package/resources/senders/agent/tools/index.js +9 -0
- package/resources/senders/agent/tools/index.js.map +1 -0
- package/resources/senders/agent/tools/index.mjs +4 -0
- package/resources/senders/agent/tools/index.mjs.map +1 -0
- package/resources/senders/agent/tools/tools.d.mts +338 -0
- package/resources/senders/agent/tools/tools.d.mts.map +1 -0
- package/resources/senders/agent/tools/tools.d.ts +338 -0
- package/resources/senders/agent/tools/tools.d.ts.map +1 -0
- package/resources/senders/agent/tools/tools.js +163 -0
- package/resources/senders/agent/tools/tools.js.map +1 -0
- package/resources/senders/agent/tools/tools.mjs +158 -0
- package/resources/senders/agent/tools/tools.mjs.map +1 -0
- package/resources/senders/agent/tools/webhook.d.mts +28 -0
- package/resources/senders/agent/tools/webhook.d.mts.map +1 -0
- package/resources/senders/agent/tools/webhook.d.ts +28 -0
- package/resources/senders/agent/tools/webhook.d.ts.map +1 -0
- package/resources/senders/agent/tools/webhook.js +28 -0
- package/resources/senders/agent/tools/webhook.js.map +1 -0
- package/resources/senders/agent/tools/webhook.mjs +24 -0
- package/resources/senders/agent/tools/webhook.mjs.map +1 -0
- package/resources/senders/agent/tools.d.mts +1 -270
- package/resources/senders/agent/tools.d.mts.map +1 -1
- package/resources/senders/agent/tools.d.ts +1 -270
- package/resources/senders/agent/tools.d.ts.map +1 -1
- package/resources/senders/agent/tools.js +2 -131
- package/resources/senders/agent/tools.js.map +1 -1
- package/resources/senders/agent/tools.mjs +1 -129
- package/resources/senders/agent/tools.mjs.map +1 -1
- package/resources/senders/index.d.mts +2 -1
- package/resources/senders/index.d.mts.map +1 -1
- package/resources/senders/index.d.ts +2 -1
- package/resources/senders/index.d.ts.map +1 -1
- package/resources/senders/index.js +3 -1
- package/resources/senders/index.js.map +1 -1
- package/resources/senders/index.mjs +1 -0
- package/resources/senders/index.mjs.map +1 -1
- package/resources/senders/senders.d.mts +4 -0
- package/resources/senders/senders.d.mts.map +1 -1
- package/resources/senders/senders.d.ts +4 -0
- package/resources/senders/senders.d.ts.map +1 -1
- package/resources/senders/senders.js +4 -0
- package/resources/senders/senders.js.map +1 -1
- package/resources/senders/senders.mjs +4 -0
- package/resources/senders/senders.mjs.map +1 -1
- package/resources/senders/telegram.d.mts +48 -0
- package/resources/senders/telegram.d.mts.map +1 -0
- package/resources/senders/telegram.d.ts +48 -0
- package/resources/senders/telegram.d.ts.map +1 -0
- package/resources/senders/telegram.js +41 -0
- package/resources/senders/telegram.js.map +1 -0
- package/resources/senders/telegram.mjs +37 -0
- package/resources/senders/telegram.mjs.map +1 -0
- package/resources/templates.d.mts +66 -1
- package/resources/templates.d.mts.map +1 -1
- package/resources/templates.d.ts +66 -1
- package/resources/templates.d.ts.map +1 -1
- package/resources/templates.js +31 -0
- package/resources/templates.js.map +1 -1
- package/resources/templates.mjs +31 -0
- package/resources/templates.mjs.map +1 -1
- package/resources/urls.d.mts +24 -1
- package/resources/urls.d.mts.map +1 -1
- package/resources/urls.d.ts +24 -1
- package/resources/urls.d.ts.map +1 -1
- package/resources/urls.js +15 -0
- package/resources/urls.js.map +1 -1
- package/resources/urls.mjs +15 -0
- package/resources/urls.mjs.map +1 -1
- package/src/client.ts +129 -3
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/utils/query.ts +2 -18
- package/src/resources/agent-templates.ts +128 -0
- package/src/resources/agents/agents.ts +603 -0
- package/src/resources/agents/index.ts +21 -0
- package/src/resources/agents/senders.ts +79 -0
- package/src/resources/agents.ts +3 -0
- package/src/resources/broadcasts/broadcasts.ts +16 -9
- package/src/resources/calls.ts +647 -0
- package/src/resources/contacts/contacts.ts +35 -20
- package/src/resources/conversations.ts +472 -0
- package/src/resources/email-domains.ts +337 -0
- package/src/resources/functions/functions.ts +202 -0
- package/src/resources/functions/git-link.ts +398 -0
- package/src/resources/functions/index.ts +22 -0
- package/src/resources/functions/triggers.ts +227 -0
- package/src/resources/index.ts +57 -0
- package/src/resources/introspect.ts +105 -0
- package/src/resources/messages.ts +102 -0
- package/src/resources/number-10dlc/brands.ts +10 -5
- package/src/resources/number-10dlc/campaigns/campaigns.ts +8 -7
- package/src/resources/phone-numbers.ts +6 -1
- package/src/resources/senders/agent/agent.ts +23 -17
- package/src/resources/senders/agent/index.ts +4 -1
- package/src/resources/senders/agent/knowledge-bases/documents.ts +89 -0
- package/src/resources/senders/agent/knowledge-bases/index.ts +4 -0
- package/src/resources/senders/agent/knowledge-bases/knowledge-bases.ts +8 -0
- package/src/resources/senders/agent/tools/index.ts +21 -0
- package/src/resources/senders/agent/tools/tools.ts +460 -0
- package/src/resources/senders/agent/tools/webhook.ts +40 -0
- package/src/resources/senders/agent/tools.ts +1 -364
- package/src/resources/senders/index.ts +2 -0
- package/src/resources/senders/senders.ts +10 -0
- package/src/resources/senders/telegram.ts +73 -0
- package/src/resources/templates.ts +80 -0
- package/src/resources/urls.ts +35 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
export declare class GitLink extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* The link and its last deploy. Never returns the webhook secret.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const gitLink = await client.functions.gitLink.retrieve(
|
|
11
|
+
* 'functionId',
|
|
12
|
+
* );
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
retrieve(functionID: string, options?: RequestOptions): APIPromise<GitLinkRetrieveResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Change the branch, the root directory, or whether pushes deploy. Pass at least
|
|
18
|
+
* one field. `rootDir: null` clears the subdirectory.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const gitLink = await client.functions.gitLink.update(
|
|
23
|
+
* 'functionId',
|
|
24
|
+
* );
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
update(functionID: string, body: GitLinkUpdateParams, options?: RequestOptions): APIPromise<GitLinkUpdateResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* Fetch the linked branch and deploy it without waiting for a push. Returns
|
|
30
|
+
* immediately; follow the outcome with `GET /v1/functions/{functionId}/git-link`,
|
|
31
|
+
* whose `lastStatus` and `lastError` describe the run.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.functions.gitLink.deployNow(
|
|
36
|
+
* 'functionId',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
deployNow(functionID: string, options?: RequestOptions): APIPromise<GitLinkDeployNowResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Bind a repository to this function so every push to `branch` deploys it. A
|
|
43
|
+
* function holds at most one link; linking again returns 400.
|
|
44
|
+
*
|
|
45
|
+
* **The server decides how the link authenticates.** If the project has the Zavu
|
|
46
|
+
* GitHub App installed, the link uses that installation: private repositories work
|
|
47
|
+
* and there is nothing to configure in the repository. Otherwise it falls back to
|
|
48
|
+
* a manual link and the response carries a `webhookSecret` you add to the
|
|
49
|
+
* repository yourself. `connection` says which one you got.
|
|
50
|
+
*
|
|
51
|
+
* The repository is not checked against GitHub here, because it cannot be: an
|
|
52
|
+
* owner/repo that does not exist, or that the installation cannot see, is accepted
|
|
53
|
+
* and fails on the first deploy with a fetch error.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const response = await client.functions.gitLink.link(
|
|
58
|
+
* 'functionId',
|
|
59
|
+
* {
|
|
60
|
+
* owner: 'acme',
|
|
61
|
+
* repo: 'order-bot',
|
|
62
|
+
* branch: 'main',
|
|
63
|
+
* },
|
|
64
|
+
* );
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
link(functionID: string, body: GitLinkLinkParams, options?: RequestOptions): APIPromise<GitLinkLinkResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Remove the link. The function and its deployments stay. A manual webhook left in
|
|
70
|
+
* the repository stops being accepted, so remove it there too.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* await client.functions.gitLink.unlink('functionId');
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
unlink(functionID: string, options?: RequestOptions): APIPromise<void>;
|
|
78
|
+
}
|
|
79
|
+
export interface GitLinkRetrieveResponse {
|
|
80
|
+
/**
|
|
81
|
+
* A GitHub repository bound to a function. A push to `branch` deploys the
|
|
82
|
+
* function. A function holds at most one link.
|
|
83
|
+
*/
|
|
84
|
+
link: GitLinkRetrieveResponse.Link;
|
|
85
|
+
/**
|
|
86
|
+
* Endpoint that receives GitHub's push deliveries. Only needed on a `manual` link,
|
|
87
|
+
* where you add it to the repository yourself.
|
|
88
|
+
*/
|
|
89
|
+
webhookUrl: string;
|
|
90
|
+
/**
|
|
91
|
+
* Shared secret for the repository's webhook. **Returned only when creating a
|
|
92
|
+
* `manual` link, and only there** — every later read strips it, and re-linking
|
|
93
|
+
* mints a new one. Absent entirely on an `app` link, which needs no secret of its
|
|
94
|
+
* own.
|
|
95
|
+
*/
|
|
96
|
+
webhookSecret?: string;
|
|
97
|
+
}
|
|
98
|
+
export declare namespace GitLinkRetrieveResponse {
|
|
99
|
+
/**
|
|
100
|
+
* A GitHub repository bound to a function. A push to `branch` deploys the
|
|
101
|
+
* function. A function holds at most one link.
|
|
102
|
+
*/
|
|
103
|
+
interface Link {
|
|
104
|
+
id: string;
|
|
105
|
+
/**
|
|
106
|
+
* When false the link is kept and pushes are ignored.
|
|
107
|
+
*/
|
|
108
|
+
autoDeploy: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Only pushes to this branch deploy.
|
|
111
|
+
*/
|
|
112
|
+
branch: string;
|
|
113
|
+
/**
|
|
114
|
+
* How this link authenticates, decided by the server rather than by the caller.
|
|
115
|
+
*
|
|
116
|
+
* - `app`: the Zavu GitHub App is installed on the account. Pushes arrive on the
|
|
117
|
+
* app's webhook and private repositories work. Nothing to configure in the
|
|
118
|
+
* repository.
|
|
119
|
+
* - `manual`: no installation. The link carries its own secret and you add the
|
|
120
|
+
* webhook to the repository yourself.
|
|
121
|
+
*/
|
|
122
|
+
connection: 'app' | 'manual';
|
|
123
|
+
createdAt: string;
|
|
124
|
+
functionId: string;
|
|
125
|
+
owner: string;
|
|
126
|
+
provider: 'github';
|
|
127
|
+
repo: string;
|
|
128
|
+
updatedAt: string;
|
|
129
|
+
lastCommitMessage?: string | null;
|
|
130
|
+
lastCommitSha?: string | null;
|
|
131
|
+
lastDeployAt?: string | null;
|
|
132
|
+
/**
|
|
133
|
+
* Why the last deploy failed. Null otherwise.
|
|
134
|
+
*/
|
|
135
|
+
lastError?: string | null;
|
|
136
|
+
lastStatus?: 'deploying' | 'deployed' | 'failed' | null;
|
|
137
|
+
/**
|
|
138
|
+
* Subdirectory holding the project, for monorepos. Null when the project is at the
|
|
139
|
+
* repository root.
|
|
140
|
+
*/
|
|
141
|
+
rootDir?: string | null;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
export interface GitLinkUpdateResponse {
|
|
145
|
+
/**
|
|
146
|
+
* A GitHub repository bound to a function. A push to `branch` deploys the
|
|
147
|
+
* function. A function holds at most one link.
|
|
148
|
+
*/
|
|
149
|
+
link: GitLinkUpdateResponse.Link;
|
|
150
|
+
/**
|
|
151
|
+
* Endpoint that receives GitHub's push deliveries. Only needed on a `manual` link,
|
|
152
|
+
* where you add it to the repository yourself.
|
|
153
|
+
*/
|
|
154
|
+
webhookUrl: string;
|
|
155
|
+
/**
|
|
156
|
+
* Shared secret for the repository's webhook. **Returned only when creating a
|
|
157
|
+
* `manual` link, and only there** — every later read strips it, and re-linking
|
|
158
|
+
* mints a new one. Absent entirely on an `app` link, which needs no secret of its
|
|
159
|
+
* own.
|
|
160
|
+
*/
|
|
161
|
+
webhookSecret?: string;
|
|
162
|
+
}
|
|
163
|
+
export declare namespace GitLinkUpdateResponse {
|
|
164
|
+
/**
|
|
165
|
+
* A GitHub repository bound to a function. A push to `branch` deploys the
|
|
166
|
+
* function. A function holds at most one link.
|
|
167
|
+
*/
|
|
168
|
+
interface Link {
|
|
169
|
+
id: string;
|
|
170
|
+
/**
|
|
171
|
+
* When false the link is kept and pushes are ignored.
|
|
172
|
+
*/
|
|
173
|
+
autoDeploy: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Only pushes to this branch deploy.
|
|
176
|
+
*/
|
|
177
|
+
branch: string;
|
|
178
|
+
/**
|
|
179
|
+
* How this link authenticates, decided by the server rather than by the caller.
|
|
180
|
+
*
|
|
181
|
+
* - `app`: the Zavu GitHub App is installed on the account. Pushes arrive on the
|
|
182
|
+
* app's webhook and private repositories work. Nothing to configure in the
|
|
183
|
+
* repository.
|
|
184
|
+
* - `manual`: no installation. The link carries its own secret and you add the
|
|
185
|
+
* webhook to the repository yourself.
|
|
186
|
+
*/
|
|
187
|
+
connection: 'app' | 'manual';
|
|
188
|
+
createdAt: string;
|
|
189
|
+
functionId: string;
|
|
190
|
+
owner: string;
|
|
191
|
+
provider: 'github';
|
|
192
|
+
repo: string;
|
|
193
|
+
updatedAt: string;
|
|
194
|
+
lastCommitMessage?: string | null;
|
|
195
|
+
lastCommitSha?: string | null;
|
|
196
|
+
lastDeployAt?: string | null;
|
|
197
|
+
/**
|
|
198
|
+
* Why the last deploy failed. Null otherwise.
|
|
199
|
+
*/
|
|
200
|
+
lastError?: string | null;
|
|
201
|
+
lastStatus?: 'deploying' | 'deployed' | 'failed' | null;
|
|
202
|
+
/**
|
|
203
|
+
* Subdirectory holding the project, for monorepos. Null when the project is at the
|
|
204
|
+
* repository root.
|
|
205
|
+
*/
|
|
206
|
+
rootDir?: string | null;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
export interface GitLinkDeployNowResponse {
|
|
210
|
+
scheduled: boolean;
|
|
211
|
+
}
|
|
212
|
+
export interface GitLinkLinkResponse {
|
|
213
|
+
/**
|
|
214
|
+
* A GitHub repository bound to a function. A push to `branch` deploys the
|
|
215
|
+
* function. A function holds at most one link.
|
|
216
|
+
*/
|
|
217
|
+
link: GitLinkLinkResponse.Link;
|
|
218
|
+
/**
|
|
219
|
+
* Endpoint that receives GitHub's push deliveries. Only needed on a `manual` link,
|
|
220
|
+
* where you add it to the repository yourself.
|
|
221
|
+
*/
|
|
222
|
+
webhookUrl: string;
|
|
223
|
+
/**
|
|
224
|
+
* Shared secret for the repository's webhook. **Returned only when creating a
|
|
225
|
+
* `manual` link, and only there** — every later read strips it, and re-linking
|
|
226
|
+
* mints a new one. Absent entirely on an `app` link, which needs no secret of its
|
|
227
|
+
* own.
|
|
228
|
+
*/
|
|
229
|
+
webhookSecret?: string;
|
|
230
|
+
}
|
|
231
|
+
export declare namespace GitLinkLinkResponse {
|
|
232
|
+
/**
|
|
233
|
+
* A GitHub repository bound to a function. A push to `branch` deploys the
|
|
234
|
+
* function. A function holds at most one link.
|
|
235
|
+
*/
|
|
236
|
+
interface Link {
|
|
237
|
+
id: string;
|
|
238
|
+
/**
|
|
239
|
+
* When false the link is kept and pushes are ignored.
|
|
240
|
+
*/
|
|
241
|
+
autoDeploy: boolean;
|
|
242
|
+
/**
|
|
243
|
+
* Only pushes to this branch deploy.
|
|
244
|
+
*/
|
|
245
|
+
branch: string;
|
|
246
|
+
/**
|
|
247
|
+
* How this link authenticates, decided by the server rather than by the caller.
|
|
248
|
+
*
|
|
249
|
+
* - `app`: the Zavu GitHub App is installed on the account. Pushes arrive on the
|
|
250
|
+
* app's webhook and private repositories work. Nothing to configure in the
|
|
251
|
+
* repository.
|
|
252
|
+
* - `manual`: no installation. The link carries its own secret and you add the
|
|
253
|
+
* webhook to the repository yourself.
|
|
254
|
+
*/
|
|
255
|
+
connection: 'app' | 'manual';
|
|
256
|
+
createdAt: string;
|
|
257
|
+
functionId: string;
|
|
258
|
+
owner: string;
|
|
259
|
+
provider: 'github';
|
|
260
|
+
repo: string;
|
|
261
|
+
updatedAt: string;
|
|
262
|
+
lastCommitMessage?: string | null;
|
|
263
|
+
lastCommitSha?: string | null;
|
|
264
|
+
lastDeployAt?: string | null;
|
|
265
|
+
/**
|
|
266
|
+
* Why the last deploy failed. Null otherwise.
|
|
267
|
+
*/
|
|
268
|
+
lastError?: string | null;
|
|
269
|
+
lastStatus?: 'deploying' | 'deployed' | 'failed' | null;
|
|
270
|
+
/**
|
|
271
|
+
* Subdirectory holding the project, for monorepos. Null when the project is at the
|
|
272
|
+
* repository root.
|
|
273
|
+
*/
|
|
274
|
+
rootDir?: string | null;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
export interface GitLinkUpdateParams {
|
|
278
|
+
autoDeploy?: boolean;
|
|
279
|
+
branch?: string;
|
|
280
|
+
rootDir?: string | null;
|
|
281
|
+
}
|
|
282
|
+
export interface GitLinkLinkParams {
|
|
283
|
+
owner: string;
|
|
284
|
+
repo: string;
|
|
285
|
+
autoDeploy?: boolean;
|
|
286
|
+
branch?: string;
|
|
287
|
+
/**
|
|
288
|
+
* Subdirectory holding the project, for monorepos.
|
|
289
|
+
*/
|
|
290
|
+
rootDir?: string;
|
|
291
|
+
}
|
|
292
|
+
export declare namespace GitLink {
|
|
293
|
+
export { type GitLinkRetrieveResponse as GitLinkRetrieveResponse, type GitLinkUpdateResponse as GitLinkUpdateResponse, type GitLinkDeployNowResponse as GitLinkDeployNowResponse, type GitLinkLinkResponse as GitLinkLinkResponse, type GitLinkUpdateParams as GitLinkUpdateParams, type GitLinkLinkParams as GitLinkLinkParams, };
|
|
294
|
+
}
|
|
295
|
+
//# sourceMappingURL=git-link.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-link.d.mts","sourceRoot":"","sources":["../../src/resources/functions/git-link.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+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,IAAI,CAAC;KACzB;CACF;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IAEd,IAAI,EAAE,MAAM,CAAC;IAEb,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
export declare class GitLink extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* The link and its last deploy. Never returns the webhook secret.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const gitLink = await client.functions.gitLink.retrieve(
|
|
11
|
+
* 'functionId',
|
|
12
|
+
* );
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
retrieve(functionID: string, options?: RequestOptions): APIPromise<GitLinkRetrieveResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Change the branch, the root directory, or whether pushes deploy. Pass at least
|
|
18
|
+
* one field. `rootDir: null` clears the subdirectory.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const gitLink = await client.functions.gitLink.update(
|
|
23
|
+
* 'functionId',
|
|
24
|
+
* );
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
update(functionID: string, body: GitLinkUpdateParams, options?: RequestOptions): APIPromise<GitLinkUpdateResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* Fetch the linked branch and deploy it without waiting for a push. Returns
|
|
30
|
+
* immediately; follow the outcome with `GET /v1/functions/{functionId}/git-link`,
|
|
31
|
+
* whose `lastStatus` and `lastError` describe the run.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.functions.gitLink.deployNow(
|
|
36
|
+
* 'functionId',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
deployNow(functionID: string, options?: RequestOptions): APIPromise<GitLinkDeployNowResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* Bind a repository to this function so every push to `branch` deploys it. A
|
|
43
|
+
* function holds at most one link; linking again returns 400.
|
|
44
|
+
*
|
|
45
|
+
* **The server decides how the link authenticates.** If the project has the Zavu
|
|
46
|
+
* GitHub App installed, the link uses that installation: private repositories work
|
|
47
|
+
* and there is nothing to configure in the repository. Otherwise it falls back to
|
|
48
|
+
* a manual link and the response carries a `webhookSecret` you add to the
|
|
49
|
+
* repository yourself. `connection` says which one you got.
|
|
50
|
+
*
|
|
51
|
+
* The repository is not checked against GitHub here, because it cannot be: an
|
|
52
|
+
* owner/repo that does not exist, or that the installation cannot see, is accepted
|
|
53
|
+
* and fails on the first deploy with a fetch error.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const response = await client.functions.gitLink.link(
|
|
58
|
+
* 'functionId',
|
|
59
|
+
* {
|
|
60
|
+
* owner: 'acme',
|
|
61
|
+
* repo: 'order-bot',
|
|
62
|
+
* branch: 'main',
|
|
63
|
+
* },
|
|
64
|
+
* );
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
link(functionID: string, body: GitLinkLinkParams, options?: RequestOptions): APIPromise<GitLinkLinkResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Remove the link. The function and its deployments stay. A manual webhook left in
|
|
70
|
+
* the repository stops being accepted, so remove it there too.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* await client.functions.gitLink.unlink('functionId');
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
unlink(functionID: string, options?: RequestOptions): APIPromise<void>;
|
|
78
|
+
}
|
|
79
|
+
export interface GitLinkRetrieveResponse {
|
|
80
|
+
/**
|
|
81
|
+
* A GitHub repository bound to a function. A push to `branch` deploys the
|
|
82
|
+
* function. A function holds at most one link.
|
|
83
|
+
*/
|
|
84
|
+
link: GitLinkRetrieveResponse.Link;
|
|
85
|
+
/**
|
|
86
|
+
* Endpoint that receives GitHub's push deliveries. Only needed on a `manual` link,
|
|
87
|
+
* where you add it to the repository yourself.
|
|
88
|
+
*/
|
|
89
|
+
webhookUrl: string;
|
|
90
|
+
/**
|
|
91
|
+
* Shared secret for the repository's webhook. **Returned only when creating a
|
|
92
|
+
* `manual` link, and only there** — every later read strips it, and re-linking
|
|
93
|
+
* mints a new one. Absent entirely on an `app` link, which needs no secret of its
|
|
94
|
+
* own.
|
|
95
|
+
*/
|
|
96
|
+
webhookSecret?: string;
|
|
97
|
+
}
|
|
98
|
+
export declare namespace GitLinkRetrieveResponse {
|
|
99
|
+
/**
|
|
100
|
+
* A GitHub repository bound to a function. A push to `branch` deploys the
|
|
101
|
+
* function. A function holds at most one link.
|
|
102
|
+
*/
|
|
103
|
+
interface Link {
|
|
104
|
+
id: string;
|
|
105
|
+
/**
|
|
106
|
+
* When false the link is kept and pushes are ignored.
|
|
107
|
+
*/
|
|
108
|
+
autoDeploy: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Only pushes to this branch deploy.
|
|
111
|
+
*/
|
|
112
|
+
branch: string;
|
|
113
|
+
/**
|
|
114
|
+
* How this link authenticates, decided by the server rather than by the caller.
|
|
115
|
+
*
|
|
116
|
+
* - `app`: the Zavu GitHub App is installed on the account. Pushes arrive on the
|
|
117
|
+
* app's webhook and private repositories work. Nothing to configure in the
|
|
118
|
+
* repository.
|
|
119
|
+
* - `manual`: no installation. The link carries its own secret and you add the
|
|
120
|
+
* webhook to the repository yourself.
|
|
121
|
+
*/
|
|
122
|
+
connection: 'app' | 'manual';
|
|
123
|
+
createdAt: string;
|
|
124
|
+
functionId: string;
|
|
125
|
+
owner: string;
|
|
126
|
+
provider: 'github';
|
|
127
|
+
repo: string;
|
|
128
|
+
updatedAt: string;
|
|
129
|
+
lastCommitMessage?: string | null;
|
|
130
|
+
lastCommitSha?: string | null;
|
|
131
|
+
lastDeployAt?: string | null;
|
|
132
|
+
/**
|
|
133
|
+
* Why the last deploy failed. Null otherwise.
|
|
134
|
+
*/
|
|
135
|
+
lastError?: string | null;
|
|
136
|
+
lastStatus?: 'deploying' | 'deployed' | 'failed' | null;
|
|
137
|
+
/**
|
|
138
|
+
* Subdirectory holding the project, for monorepos. Null when the project is at the
|
|
139
|
+
* repository root.
|
|
140
|
+
*/
|
|
141
|
+
rootDir?: string | null;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
export interface GitLinkUpdateResponse {
|
|
145
|
+
/**
|
|
146
|
+
* A GitHub repository bound to a function. A push to `branch` deploys the
|
|
147
|
+
* function. A function holds at most one link.
|
|
148
|
+
*/
|
|
149
|
+
link: GitLinkUpdateResponse.Link;
|
|
150
|
+
/**
|
|
151
|
+
* Endpoint that receives GitHub's push deliveries. Only needed on a `manual` link,
|
|
152
|
+
* where you add it to the repository yourself.
|
|
153
|
+
*/
|
|
154
|
+
webhookUrl: string;
|
|
155
|
+
/**
|
|
156
|
+
* Shared secret for the repository's webhook. **Returned only when creating a
|
|
157
|
+
* `manual` link, and only there** — every later read strips it, and re-linking
|
|
158
|
+
* mints a new one. Absent entirely on an `app` link, which needs no secret of its
|
|
159
|
+
* own.
|
|
160
|
+
*/
|
|
161
|
+
webhookSecret?: string;
|
|
162
|
+
}
|
|
163
|
+
export declare namespace GitLinkUpdateResponse {
|
|
164
|
+
/**
|
|
165
|
+
* A GitHub repository bound to a function. A push to `branch` deploys the
|
|
166
|
+
* function. A function holds at most one link.
|
|
167
|
+
*/
|
|
168
|
+
interface Link {
|
|
169
|
+
id: string;
|
|
170
|
+
/**
|
|
171
|
+
* When false the link is kept and pushes are ignored.
|
|
172
|
+
*/
|
|
173
|
+
autoDeploy: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Only pushes to this branch deploy.
|
|
176
|
+
*/
|
|
177
|
+
branch: string;
|
|
178
|
+
/**
|
|
179
|
+
* How this link authenticates, decided by the server rather than by the caller.
|
|
180
|
+
*
|
|
181
|
+
* - `app`: the Zavu GitHub App is installed on the account. Pushes arrive on the
|
|
182
|
+
* app's webhook and private repositories work. Nothing to configure in the
|
|
183
|
+
* repository.
|
|
184
|
+
* - `manual`: no installation. The link carries its own secret and you add the
|
|
185
|
+
* webhook to the repository yourself.
|
|
186
|
+
*/
|
|
187
|
+
connection: 'app' | 'manual';
|
|
188
|
+
createdAt: string;
|
|
189
|
+
functionId: string;
|
|
190
|
+
owner: string;
|
|
191
|
+
provider: 'github';
|
|
192
|
+
repo: string;
|
|
193
|
+
updatedAt: string;
|
|
194
|
+
lastCommitMessage?: string | null;
|
|
195
|
+
lastCommitSha?: string | null;
|
|
196
|
+
lastDeployAt?: string | null;
|
|
197
|
+
/**
|
|
198
|
+
* Why the last deploy failed. Null otherwise.
|
|
199
|
+
*/
|
|
200
|
+
lastError?: string | null;
|
|
201
|
+
lastStatus?: 'deploying' | 'deployed' | 'failed' | null;
|
|
202
|
+
/**
|
|
203
|
+
* Subdirectory holding the project, for monorepos. Null when the project is at the
|
|
204
|
+
* repository root.
|
|
205
|
+
*/
|
|
206
|
+
rootDir?: string | null;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
export interface GitLinkDeployNowResponse {
|
|
210
|
+
scheduled: boolean;
|
|
211
|
+
}
|
|
212
|
+
export interface GitLinkLinkResponse {
|
|
213
|
+
/**
|
|
214
|
+
* A GitHub repository bound to a function. A push to `branch` deploys the
|
|
215
|
+
* function. A function holds at most one link.
|
|
216
|
+
*/
|
|
217
|
+
link: GitLinkLinkResponse.Link;
|
|
218
|
+
/**
|
|
219
|
+
* Endpoint that receives GitHub's push deliveries. Only needed on a `manual` link,
|
|
220
|
+
* where you add it to the repository yourself.
|
|
221
|
+
*/
|
|
222
|
+
webhookUrl: string;
|
|
223
|
+
/**
|
|
224
|
+
* Shared secret for the repository's webhook. **Returned only when creating a
|
|
225
|
+
* `manual` link, and only there** — every later read strips it, and re-linking
|
|
226
|
+
* mints a new one. Absent entirely on an `app` link, which needs no secret of its
|
|
227
|
+
* own.
|
|
228
|
+
*/
|
|
229
|
+
webhookSecret?: string;
|
|
230
|
+
}
|
|
231
|
+
export declare namespace GitLinkLinkResponse {
|
|
232
|
+
/**
|
|
233
|
+
* A GitHub repository bound to a function. A push to `branch` deploys the
|
|
234
|
+
* function. A function holds at most one link.
|
|
235
|
+
*/
|
|
236
|
+
interface Link {
|
|
237
|
+
id: string;
|
|
238
|
+
/**
|
|
239
|
+
* When false the link is kept and pushes are ignored.
|
|
240
|
+
*/
|
|
241
|
+
autoDeploy: boolean;
|
|
242
|
+
/**
|
|
243
|
+
* Only pushes to this branch deploy.
|
|
244
|
+
*/
|
|
245
|
+
branch: string;
|
|
246
|
+
/**
|
|
247
|
+
* How this link authenticates, decided by the server rather than by the caller.
|
|
248
|
+
*
|
|
249
|
+
* - `app`: the Zavu GitHub App is installed on the account. Pushes arrive on the
|
|
250
|
+
* app's webhook and private repositories work. Nothing to configure in the
|
|
251
|
+
* repository.
|
|
252
|
+
* - `manual`: no installation. The link carries its own secret and you add the
|
|
253
|
+
* webhook to the repository yourself.
|
|
254
|
+
*/
|
|
255
|
+
connection: 'app' | 'manual';
|
|
256
|
+
createdAt: string;
|
|
257
|
+
functionId: string;
|
|
258
|
+
owner: string;
|
|
259
|
+
provider: 'github';
|
|
260
|
+
repo: string;
|
|
261
|
+
updatedAt: string;
|
|
262
|
+
lastCommitMessage?: string | null;
|
|
263
|
+
lastCommitSha?: string | null;
|
|
264
|
+
lastDeployAt?: string | null;
|
|
265
|
+
/**
|
|
266
|
+
* Why the last deploy failed. Null otherwise.
|
|
267
|
+
*/
|
|
268
|
+
lastError?: string | null;
|
|
269
|
+
lastStatus?: 'deploying' | 'deployed' | 'failed' | null;
|
|
270
|
+
/**
|
|
271
|
+
* Subdirectory holding the project, for monorepos. Null when the project is at the
|
|
272
|
+
* repository root.
|
|
273
|
+
*/
|
|
274
|
+
rootDir?: string | null;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
export interface GitLinkUpdateParams {
|
|
278
|
+
autoDeploy?: boolean;
|
|
279
|
+
branch?: string;
|
|
280
|
+
rootDir?: string | null;
|
|
281
|
+
}
|
|
282
|
+
export interface GitLinkLinkParams {
|
|
283
|
+
owner: string;
|
|
284
|
+
repo: string;
|
|
285
|
+
autoDeploy?: boolean;
|
|
286
|
+
branch?: string;
|
|
287
|
+
/**
|
|
288
|
+
* Subdirectory holding the project, for monorepos.
|
|
289
|
+
*/
|
|
290
|
+
rootDir?: string;
|
|
291
|
+
}
|
|
292
|
+
export declare namespace GitLink {
|
|
293
|
+
export { type GitLinkRetrieveResponse as GitLinkRetrieveResponse, type GitLinkUpdateResponse as GitLinkUpdateResponse, type GitLinkDeployNowResponse as GitLinkDeployNowResponse, type GitLinkLinkResponse as GitLinkLinkResponse, type GitLinkUpdateParams as GitLinkUpdateParams, type GitLinkLinkParams as GitLinkLinkParams, };
|
|
294
|
+
}
|
|
295
|
+
//# sourceMappingURL=git-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-link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