@toshicloud/sdk 0.5.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -455
- package/dist/client.d.ts +76 -6
- package/dist/client.js +20 -4
- package/dist/gen/toshi/permission_pb.d.ts +12 -0
- package/dist/gen/toshi/permission_pb.js +14 -2
- package/dist/gen/toshi/workspace/v1/connections_pb.d.ts +358 -29
- package/dist/gen/toshi/workspace/v1/connections_pb.js +112 -24
- package/dist/gen/toshi/workspace/v1/domains_pb.d.ts +26 -26
- package/dist/gen/toshi/workspace/v1/domains_pb.js +4 -4
- package/dist/gen/toshi/workspace/v1/{channels_pb.d.ts → endpoints_pb.d.ts} +945 -822
- package/dist/gen/toshi/workspace/v1/endpoints_pb.js +488 -0
- package/dist/gen/toshi/workspace/v1/grants_pb.d.ts +10 -10
- package/dist/gen/toshi/workspace/v1/grants_pb.js +3 -3
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.d.ts +62 -24
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +1 -1
- package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +110 -36
- package/dist/gen/toshi/workspace/v1/hosts_pb.js +1 -1
- package/dist/gen/toshi/workspace/v1/model_credentials_pb.d.ts +654 -0
- package/dist/gen/toshi/workspace/v1/model_credentials_pb.js +110 -0
- package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +21 -2
- package/dist/gen/toshi/workspace/v1/recordings_pb.js +1 -1
- package/dist/gen/toshi/workspace/v1/roles_pb.d.ts +1 -1
- package/dist/gen/toshi/workspace/v1/roles_pb.js +1 -1
- package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +19 -2
- package/dist/gen/toshi/workspace/v1/secrets_pb.js +1 -1
- package/dist/gen/toshi/workspace/v1/triggers_pb.d.ts +28 -28
- package/dist/gen/toshi/workspace/v1/triggers_pb.js +6 -6
- package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +202 -202
- package/dist/gen/toshi/workspace/v1/webhook_pb.js +46 -46
- package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +579 -30
- package/dist/gen/toshi/workspace/v1/workloads_pb.js +85 -55
- package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +991 -123
- package/dist/gen/toshi/workspace/v1/workspace_pb.js +294 -102
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +390 -8
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +75 -50
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/retry.js +38 -22
- package/dist/test/alarms.d.ts +29 -0
- package/dist/test/alarms.js +144 -0
- package/dist/test/fake.js +31 -0
- package/dist/test/index.d.ts +12 -2
- package/dist/test/index.js +12 -2
- package/dist/test/procedures.js +40 -34
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/gen/toshi/workspace/v1/channels_pb.js +0 -483
|
@@ -7,77 +7,77 @@ import { file_toshi_permission } from "../../permission_pb.js";
|
|
|
7
7
|
/**
|
|
8
8
|
* Describes the file toshi/workspace/v1/webhook.proto.
|
|
9
9
|
*/
|
|
10
|
-
export const file_toshi_workspace_v1_webhook = /*@__PURE__*/ fileDesc("
|
|
10
|
+
export const file_toshi_workspace_v1_webhook = /*@__PURE__*/ fileDesc("CiB0b3NoaS93b3Jrc3BhY2UvdjEvd2ViaG9vay5wcm90bxISdG9zaGkud29ya3NwYWNlLnYxItQCCgdXZWJob29rEgoKAmlkGAEgASgJEgsKA3VybBgCIAEoCRIOCgZldmVudHMYAyADKAkSDwoHZW5hYmxlZBgEIAEoCBIOCgZjdXJzb3IYBSABKAkSPgoacHJldmlvdXNfc2VjcmV0X2V4cGlyZXNfYXQYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCmNyZWF0ZWRfYXQYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQ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Jrc3BhY2UudjEuRGVsZXRlV2ViaG9va1JlcXVlc3QaKS50b3NoaS53b3Jrc3BhY2UudjEuRGVsZXRlV2ViaG9va1Jlc3BvbnNlIhLC8xgOd2ViaG9va3Mud3JpdGUSpgEKE1JvdGF0ZVdlYmhvb2tTZWNyZXQSLi50b3NoaS53b3Jrc3BhY2UudjEuUm90YXRlV2ViaG9va1NlY3JldFJlcXVlc3QaLy50b3NoaS53b3Jrc3BhY2UudjEuUm90YXRlV2ViaG9va1NlY3JldFJlc3BvbnNlIi7C8xgOd2ViaG9va3Mud3JpdGXS8xgYChZ3ZWJob29rLnNlY3JldF9yb3RhdGVkEo8BChVMaXN0V2ViaG9va0RlbGl2ZXJpZXMSMC50b3NoaS53b3Jrc3BhY2UudjEuTGlzdFdlYmhvb2tEZWxpdmVyaWVzUmVxdWVzdBoxLnRvc2hpLndvcmtzcGFjZS52MS5MaXN0V2ViaG9va0RlbGl2ZXJpZXNSZXNwb25zZSIRwvMYDXdlYmhvb2tzLnJlYWQSpwEKE1JlcGxheVdlYmhvb2tFdmVudHMSLi50b3NoaS53b3Jrc3BhY2UudjEuUmVwbGF5V2ViaG9va0V2ZW50c1JlcXVlc3QaLy50b3NoaS53b3Jrc3BhY2UudjEuUmVwbGF5V2ViaG9va0V2ZW50c1Jlc3BvbnNlIi/C8xgOd2ViaG9va3Mud3JpdGXS8xgZChd3ZWJob29rLmV2ZW50c19yZXBsYXllZEIiWiBnby50b3NoaWNsb3VkLmlvL2FwaS93b3Jrc3BhY2V2MWIGcHJvdG8z", [file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_toshi_permission]);
|
|
11
11
|
/**
|
|
12
|
-
* Describes the message toshi.workspace.v1.
|
|
13
|
-
* Use `create(
|
|
12
|
+
* Describes the message toshi.workspace.v1.Webhook.
|
|
13
|
+
* Use `create(WebhookSchema)` to create a new message.
|
|
14
14
|
*/
|
|
15
|
-
export const
|
|
15
|
+
export const WebhookSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 0);
|
|
16
16
|
/**
|
|
17
17
|
* Describes the message toshi.workspace.v1.WebhookDelivery.
|
|
18
18
|
* Use `create(WebhookDeliverySchema)` to create a new message.
|
|
19
19
|
*/
|
|
20
20
|
export const WebhookDeliverySchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 1);
|
|
21
21
|
/**
|
|
22
|
-
* Describes the message toshi.workspace.v1.
|
|
23
|
-
* Use `create(
|
|
22
|
+
* Describes the message toshi.workspace.v1.CreateWebhookRequest.
|
|
23
|
+
* Use `create(CreateWebhookRequestSchema)` to create a new message.
|
|
24
24
|
*/
|
|
25
|
-
export const
|
|
25
|
+
export const CreateWebhookRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 2);
|
|
26
26
|
/**
|
|
27
|
-
* Describes the message toshi.workspace.v1.
|
|
28
|
-
* Use `create(
|
|
27
|
+
* Describes the message toshi.workspace.v1.CreateWebhookResponse.
|
|
28
|
+
* Use `create(CreateWebhookResponseSchema)` to create a new message.
|
|
29
29
|
*/
|
|
30
|
-
export const
|
|
30
|
+
export const CreateWebhookResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 3);
|
|
31
31
|
/**
|
|
32
|
-
* Describes the message toshi.workspace.v1.
|
|
33
|
-
* Use `create(
|
|
32
|
+
* Describes the message toshi.workspace.v1.GetWebhookRequest.
|
|
33
|
+
* Use `create(GetWebhookRequestSchema)` to create a new message.
|
|
34
34
|
*/
|
|
35
|
-
export const
|
|
35
|
+
export const GetWebhookRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 4);
|
|
36
36
|
/**
|
|
37
|
-
* Describes the message toshi.workspace.v1.
|
|
38
|
-
* Use `create(
|
|
37
|
+
* Describes the message toshi.workspace.v1.GetWebhookResponse.
|
|
38
|
+
* Use `create(GetWebhookResponseSchema)` to create a new message.
|
|
39
39
|
*/
|
|
40
|
-
export const
|
|
40
|
+
export const GetWebhookResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 5);
|
|
41
41
|
/**
|
|
42
|
-
* Describes the message toshi.workspace.v1.
|
|
43
|
-
* Use `create(
|
|
42
|
+
* Describes the message toshi.workspace.v1.ListWebhooksRequest.
|
|
43
|
+
* Use `create(ListWebhooksRequestSchema)` to create a new message.
|
|
44
44
|
*/
|
|
45
|
-
export const
|
|
45
|
+
export const ListWebhooksRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 6);
|
|
46
46
|
/**
|
|
47
|
-
* Describes the message toshi.workspace.v1.
|
|
48
|
-
* Use `create(
|
|
47
|
+
* Describes the message toshi.workspace.v1.ListWebhooksResponse.
|
|
48
|
+
* Use `create(ListWebhooksResponseSchema)` to create a new message.
|
|
49
49
|
*/
|
|
50
|
-
export const
|
|
50
|
+
export const ListWebhooksResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 7);
|
|
51
51
|
/**
|
|
52
|
-
* Describes the message toshi.workspace.v1.
|
|
53
|
-
* Use `create(
|
|
52
|
+
* Describes the message toshi.workspace.v1.UpdateWebhookRequest.
|
|
53
|
+
* Use `create(UpdateWebhookRequestSchema)` to create a new message.
|
|
54
54
|
*/
|
|
55
|
-
export const
|
|
55
|
+
export const UpdateWebhookRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 8);
|
|
56
56
|
/**
|
|
57
|
-
* Describes the message toshi.workspace.v1.
|
|
58
|
-
* Use `create(
|
|
57
|
+
* Describes the message toshi.workspace.v1.UpdateWebhookResponse.
|
|
58
|
+
* Use `create(UpdateWebhookResponseSchema)` to create a new message.
|
|
59
59
|
*/
|
|
60
|
-
export const
|
|
60
|
+
export const UpdateWebhookResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 9);
|
|
61
61
|
/**
|
|
62
|
-
* Describes the message toshi.workspace.v1.
|
|
63
|
-
* Use `create(
|
|
62
|
+
* Describes the message toshi.workspace.v1.DeleteWebhookRequest.
|
|
63
|
+
* Use `create(DeleteWebhookRequestSchema)` to create a new message.
|
|
64
64
|
*/
|
|
65
|
-
export const
|
|
65
|
+
export const DeleteWebhookRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 10);
|
|
66
66
|
/**
|
|
67
|
-
* Describes the message toshi.workspace.v1.
|
|
68
|
-
* Use `create(
|
|
67
|
+
* Describes the message toshi.workspace.v1.DeleteWebhookResponse.
|
|
68
|
+
* Use `create(DeleteWebhookResponseSchema)` to create a new message.
|
|
69
69
|
*/
|
|
70
|
-
export const
|
|
70
|
+
export const DeleteWebhookResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 11);
|
|
71
71
|
/**
|
|
72
|
-
* Describes the message toshi.workspace.v1.
|
|
73
|
-
* Use `create(
|
|
72
|
+
* Describes the message toshi.workspace.v1.RotateWebhookSecretRequest.
|
|
73
|
+
* Use `create(RotateWebhookSecretRequestSchema)` to create a new message.
|
|
74
74
|
*/
|
|
75
|
-
export const
|
|
75
|
+
export const RotateWebhookSecretRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 12);
|
|
76
76
|
/**
|
|
77
|
-
* Describes the message toshi.workspace.v1.
|
|
78
|
-
* Use `create(
|
|
77
|
+
* Describes the message toshi.workspace.v1.RotateWebhookSecretResponse.
|
|
78
|
+
* Use `create(RotateWebhookSecretResponseSchema)` to create a new message.
|
|
79
79
|
*/
|
|
80
|
-
export const
|
|
80
|
+
export const RotateWebhookSecretResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_webhook, 13);
|
|
81
81
|
/**
|
|
82
82
|
* Describes the message toshi.workspace.v1.ListWebhookDeliveriesRequest.
|
|
83
83
|
* Use `create(ListWebhookDeliveriesRequestSchema)` to create a new message.
|
|
@@ -131,11 +131,11 @@ export var WebhookDeliveryState;
|
|
|
131
131
|
*/
|
|
132
132
|
export const WebhookDeliveryStateSchema = /*@__PURE__*/ enumDesc(file_toshi_workspace_v1_webhook, 0);
|
|
133
133
|
/**
|
|
134
|
-
* WebhookService manages a workspace's
|
|
134
|
+
* WebhookService manages a workspace's webhooks: the URLs its
|
|
135
135
|
* events are POSTed to, signed per Standard Webhooks. The caller's credential
|
|
136
|
-
* names the workspace, as for WorkloadService.
|
|
136
|
+
* names the workspace, as for WorkloadService. A webhook belongs to the
|
|
137
137
|
* workspace, not to an environment, and is owed the events of every
|
|
138
|
-
* project unless its project names one.
|
|
138
|
+
* project unless its project names one. A webhook of another workspace
|
|
139
139
|
* is NOT_FOUND.
|
|
140
140
|
*
|
|
141
141
|
* Every mutating call takes a request_key, with WorkloadService's rule: a
|
|
@@ -143,10 +143,10 @@ export const WebhookDeliveryStateSchema = /*@__PURE__*/ enumDesc(file_toshi_work
|
|
|
143
143
|
* call returned and changes nothing; the same key with a different payload
|
|
144
144
|
* fails with FAILED_PRECONDITION; an empty key means no retry protection.
|
|
145
145
|
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
146
|
+
* A webhook's signing secret is in the answer to the call that made it,
|
|
147
|
+
* CreateWebhook or RotateWebhookSecret, and in no other
|
|
148
148
|
* answer. A retry of that call returns the same secret while it is the
|
|
149
|
-
*
|
|
149
|
+
* webhook's newest; once the webhook is rotated again or deleted, the
|
|
150
150
|
* retry fails with FAILED_PRECONDITION and changes nothing.
|
|
151
151
|
*
|
|
152
152
|
* @generated from service toshi.workspace.v1.WebhookService
|