@mountaya/client 0.0.0-stage → 0.2.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 +149 -0
- package/LICENCE.fr.txt +280 -0
- package/LICENSE.txt +262 -0
- package/README.md +1260 -2
- package/dist/admin/index.cjs +2895 -0
- package/dist/admin/index.cjs.map +1 -0
- package/dist/admin/index.d.cts +889 -0
- package/dist/admin/index.d.ts +889 -0
- package/dist/admin/index.js +204 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/browser.cjs +5993 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.cts +70 -0
- package/dist/browser.d.ts +70 -0
- package/dist/browser.js +22 -0
- package/dist/browser.js.map +1 -0
- package/dist/chunk-CeEX7ayk.d.cts +75531 -0
- package/dist/chunk-CeEX7ayk.d.ts +75531 -0
- package/dist/chunk-Cg7Dtcb4.js +2987 -0
- package/dist/chunk-Cg7Dtcb4.js.map +1 -0
- package/dist/chunk-DJqUsgsy.d.ts +1463 -0
- package/dist/chunk-DNc8T5K1.js +241 -0
- package/dist/chunk-DNc8T5K1.js.map +1 -0
- package/dist/chunk-DTxzw3hu.d.cts +1463 -0
- package/dist/chunk-DmxQID5X.js +2289 -0
- package/dist/chunk-DmxQID5X.js.map +1 -0
- package/dist/chunk-DoZt_oIV.d.ts +3991 -0
- package/dist/chunk-DpJrqANO.js +11 -0
- package/dist/chunk-Dx8mPAdC.d.cts +3991 -0
- package/dist/chunk-X2ukY3ho.js +419 -0
- package/dist/chunk-X2ukY3ho.js.map +1 -0
- package/dist/events/index.cjs +1436 -0
- package/dist/events/index.cjs.map +1 -0
- package/dist/events/index.d.cts +772 -0
- package/dist/events/index.d.ts +772 -0
- package/dist/events/index.js +543 -0
- package/dist/events/index.js.map +1 -0
- package/dist/index.cjs +5992 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +44 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/package.json +126 -4
- package/src/admin/index.ts +47 -0
- package/src/admin/rules/mountayaAdmin.ts +102 -0
- package/src/browser.ts +233 -0
- package/src/core/engines/sessionToken.ts +870 -0
- package/src/core/rules/auth.ts +1017 -0
- package/src/core/rules/clientHeader.ts +28 -0
- package/src/core/rules/dates.ts +200 -0
- package/src/core/rules/decode.ts +154 -0
- package/src/core/rules/envelope.ts +41 -0
- package/src/core/rules/errors.ts +1486 -0
- package/src/core/rules/graphql.ts +576 -0
- package/src/core/rules/headerValue.ts +42 -0
- package/src/core/rules/idempotencyKey.ts +64 -0
- package/src/core/rules/nullMask.ts +127 -0
- package/src/core/rules/nullMasks.gen.ts +428 -0
- package/src/core/rules/paginate.ts +316 -0
- package/src/core/rules/rateLimit.ts +507 -0
- package/src/core/rules/redaction.ts +219 -0
- package/src/core/rules/resourceRef.ts +110 -0
- package/src/core/rules/responseBody.ts +492 -0
- package/src/core/rules/retry.ts +386 -0
- package/src/core/rules/selection.ts +416 -0
- package/src/core/rules/sessionAnswer.ts +90 -0
- package/src/core/rules/sessionSchedule.ts +131 -0
- package/src/core/rules/sessionWait.ts +112 -0
- package/src/core/rules/transport.ts +2386 -0
- package/src/core/rules/version.gen.ts +16 -0
- package/src/core/rules/webAddress.ts +165 -0
- package/src/core/rules/webAddresses.gen.ts +30 -0
- package/src/data/operations.gen.ts +603 -0
- package/src/data/schema.gen.ts +8078 -0
- package/src/data/selection.gen.ts +472 -0
- package/src/events/index.ts +63 -0
- package/src/events/rules/agent.ts +439 -0
- package/src/events/rules/collab.ts +554 -0
- package/src/events/rules/collabNulls.gen.ts +17 -0
- package/src/events/rules/eventStream.ts +94 -0
- package/src/events/rules/openSseStream.ts +594 -0
- package/src/events/rules/sse.ts +349 -0
- package/src/index.ts +231 -0
- package/src/rest/adminOperations.gen.ts +70 -0
- package/src/rest/adminResources.gen.ts +138 -0
- package/src/rest/coreOperations.gen.ts +74 -0
- package/src/rest/coreResources.gen.ts +244 -0
- package/src/rest/dates.gen.ts +217 -0
- package/src/rest/operations.gen.ts +4341 -0
- package/src/rest/resources.gen.ts +371 -0
- package/src/rest/schema.gen.ts +57027 -0
- package/src/tiles/operations.gen.ts +206 -0
- package/src/tiles/schema.gen.ts +8406 -0
- package/src/webhooks/rules/constructWebhookEvent.ts +482 -0
- package/src/webhooks/rules/webhookEvent.ts +38 -0
- package/src/webhooks/rules/webhookEvents.gen.ts +732 -0
|
@@ -0,0 +1,889 @@
|
|
|
1
|
+
import { $ as getOrganizationPublishableKey, $t as postMyInvitationAccept, B as getMyOrganizations, Ct as patchOrganization, Dt as patchOrganizationPublishableKey, Et as patchOrganizationMember, G as getOrganizationBillingInvoices, H as getOrganization, J as getOrganizationBillingSubscription, K as getOrganizationBillingPaymentMethods, Ot as patchOrganizationSettings, Q as getOrganizationMembers, R as getMyInvitations, St as patchMyPreferences, T as getBillingProducts, Tt as patchOrganizationBillingInfo, U as getOrganizationAiProviderConfig, V as getMyPreferences, W as getOrganizationBillingInfo, X as getOrganizationInvitation, Z as getOrganizationInvitations, _ as deleteOrganizationMember, an as postOrganizationBillingProvision, at as getOrganizationWebhookDelivery, ct as getOrganizationWebhookEvent, dn as postOrganizationWebhookEndpoint, dt as getWebhookEventTypes, en as postOrganization, et as getOrganizationPublishableKeys, f as deleteMyInvitation, fn as postSession, g as deleteOrganizationInvitation, h as deleteOrganizationBillingSubscription, in as postOrganizationBillingPaymentMethodSetup, it as getOrganizationWebhookDeliveries, kt as patchOrganizationWebhookEndpoint, ln as postOrganizationPublishableKey, lt as getOrganizationWebhookEvents, m as deleteOrganizationBillingPaymentMethod, nn as postOrganizationBillingPaymentMethod, nt as getOrganizationUsageData, on as postOrganizationBillingSubscription, ot as getOrganizationWebhookEndpoint, p as deleteOrganizationAiProviderConfig, q as getOrganizationBillingPromotionCode, rn as postOrganizationBillingPaymentMethodSetDefault, rt as getOrganizationUsageTiles, sn as postOrganizationInvitation, st as getOrganizationWebhookEndpoints, t as bind, tn as postOrganizationAiProviderConfig, tt as getOrganizationSettings, un as postOrganizationWebhookDelivery, ut as getOrganizationWebhookHealth, v as deleteOrganizationPublishableKey, w as getAiProviders, wt as patchOrganizationAiProviderConfig, xt as patchMyOrganizationNotificationPreferences, y as deleteOrganizationWebhookEndpoint, z as getMyOrganizationNotificationPreferences } from "../chunk-DoZt_oIV.js";
|
|
2
|
+
import { $a as SecretKeyEventObject, $i as OrganizationInvitationCreateParams, $o as UsageDataSurface, $s as WebhookHealthGranularity, An as BillingPricing, As as WebhookDestinationKind, Bi as NotificationPreference, Bs as WebhookEventCatalogEntry, Ca as PaymentMethodEventObject, Ci as ItinerarySegmentGroupEventObject, Cr as CollectionItineraryEventObject, Cs as WebhookDeliveryCreateParams, Da as PreferencesUpdateParams, Dn as BillingInfoTaxIdParams, Dr as CollectionZoneEventObject, Ds as WebhookDeliveryTrigger, Ea as Preferences, En as BillingInfoField, Es as WebhookDeliveryTestParams, Fa as PublishableKeyScope, Fs as WebhookEndpointStatus, Ft as Address, Gs as WebhookEventType, Hi as NotificationPreferences, Hs as WebhookEventObject, Ia as PublishableKeyUpdateParams, Is as WebhookEndpointUpdateParams, Ji as OrganizationBillingProvisionParams, Js as WebhookFailureKind, Ks as WebhookEventWithDeliveries, Li as Membership, Ls as WebhookEndpointWithSecret, Ma as PublishableKey, Mn as BillingUnitKind, Ms as WebhookEndpointCreateParams, Na as PublishableKeyCreateParams, Ns as WebhookEndpointDisabledReason, Oa as PromotionCodePreview, Oi as ItineraryWaypointEventObject, On as BillingInfoUpdateParams, Os as WebhookDeliveryTriggerKind, Pa as PublishableKeyEventObject, Pn as Capability, Ps as WebhookEndpointEventObject, Qi as OrganizationInvitation, Qo as UsageDataResourceType, Qs as WebhookHealthFigures, Ri as MeterDimension, Rs as WebhookEventActor, Sa as PaymentMethodCard, Sn as AssignableOrganizationRole, Ss as WebhookDeliveryAttempt, Tn as BillingInfoEventObject, Tr as CollectionShareLinkEventObject, Ts as WebhookDeliveryRecipient, Ui as NotificationPreferencesUpdateParams, Us as WebhookEventRelatedObject, Vi as NotificationPreferenceUpdate, Vs as WebhookEventData, Wi as NotificationType, Ws as WebhookEventRequest, Xi as OrganizationEntitlementsEventObject, Xo as UsageClientName, Xs as WebhookHealthDestination, Ya as ResponseMetadataPostOrganizationInvitation, Yi as OrganizationCreateParams, Ys as WebhookHealth, Zi as OrganizationEventObject, Zo as UsageDataPoint, Zs as WebhookHealthFailure, _i as ItineraryOrigin, _n as AiProviderCatalog, _o as SubscriptionCollectionMethod, aa as OrganizationMemberUpdateParams, ai as InvoiceEventObject, as as UserInvitation, bn as AiProviderConfigEventObject, bo as SubscriptionStatus, bs as WebhookAttemptOutcome, ca as OrganizationSettingsEventObject, da as OrganizationSubscriptionEventObject, do as SetupIntentSession, ea as OrganizationInvitationEventObject, ec as WebhookHealthPoint, es as UsageMetric, fa as OrganizationSubscriptionItem, fc as components, fi as ItineraryEventObject, gn as AiProvider, hn as AiCredentialField, ia as OrganizationMemberEventObject, ic as ZoneEventObject, ii as Invoice, is as UsageTileSurface, jn as BillingProduct, js as WebhookEndpoint, kn as BillingInterval, ks as WebhookDeliveryWithAttempts, la as OrganizationSettingsPatchParams, lo as SessionCreateParams, lt as MountayaTransport, m as MountayaError, ma as OrganizationUpdateParams, na as OrganizationMember, ns as UsageTilePoint, oi as InvoiceStatus, pa as OrganizationSubscriptionSummary, qi as OrganizationBillingPaymentMethodParams, qs as WebhookFailureClass, ra as OrganizationMemberDeletionReason, rs as UsageTileResourceType, tc as WebhookHealthWindow, ts as UsageStatusClass, ua as OrganizationSubscription, vn as AiProviderConfig, vo as SubscriptionDiscount, wa as PaymentMethodSepaDebit, wi as ItineraryShareLinkEventObject, wn as BillingInfo, wo as TaxId, ws as WebhookDeliveryOutcome, xa as PaymentMethod, xi as ItinerarySegmentEventObject, xn as AiProviderConfigUpdateParams, xr as CollectionEventObject, xs as WebhookDelivery, yn as AiProviderConfigCreateParams, yo as SubscriptionEndReason, zs as WebhookEventActorType } from "../chunk-CeEX7ayk.js";
|
|
3
|
+
declare namespace adminOperations_gen_d_exports {
|
|
4
|
+
export { deleteMyInvitation, deleteOrganizationAiProviderConfig, deleteOrganizationBillingPaymentMethod, deleteOrganizationBillingSubscription, deleteOrganizationInvitation, deleteOrganizationMember, deleteOrganizationPublishableKey, deleteOrganizationWebhookEndpoint, getAiProviders, getBillingProducts, getMyInvitations, getMyOrganizationNotificationPreferences, getMyOrganizations, getMyPreferences, getOrganization, getOrganizationAiProviderConfig, getOrganizationBillingInfo, getOrganizationBillingInvoices, getOrganizationBillingPaymentMethods, getOrganizationBillingPromotionCode, getOrganizationBillingSubscription, getOrganizationInvitation, getOrganizationInvitations, getOrganizationMembers, getOrganizationPublishableKey, getOrganizationPublishableKeys, getOrganizationSettings, getOrganizationUsageData, getOrganizationUsageTiles, getOrganizationWebhookDeliveries, getOrganizationWebhookDelivery, getOrganizationWebhookEndpoint, getOrganizationWebhookEndpoints, getOrganizationWebhookEvent, getOrganizationWebhookEvents, getOrganizationWebhookHealth, getWebhookEventTypes, patchMyOrganizationNotificationPreferences, patchMyPreferences, patchOrganization, patchOrganizationAiProviderConfig, patchOrganizationBillingInfo, patchOrganizationMember, patchOrganizationPublishableKey, patchOrganizationSettings, patchOrganizationWebhookEndpoint, postMyInvitationAccept, postOrganization, postOrganizationAiProviderConfig, postOrganizationBillingPaymentMethod, postOrganizationBillingPaymentMethodSetDefault, postOrganizationBillingPaymentMethodSetup, postOrganizationBillingProvision, postOrganizationBillingSubscription, postOrganizationInvitation, postOrganizationPublishableKey, postOrganizationWebhookDelivery, postOrganizationWebhookEndpoint, postSession };
|
|
5
|
+
}
|
|
6
|
+
/** The schemas the Map Studio contract declares, by the name the contract gives each. */
|
|
7
|
+
type Schemas = components["schemas"];
|
|
8
|
+
/** What every webhook event carries beside its `type` and its `data`. */
|
|
9
|
+
type Envelope = Omit<Schemas["WebhookEvent"], "data" | "type">;
|
|
10
|
+
/**
|
|
11
|
+
* WebhookEventsByType is the event each public webhook event type is delivered as: its `type`,
|
|
12
|
+
* the object it carries at `data.object`, and at `data.previous_attributes` the former value of
|
|
13
|
+
* each field the change moved, which a type that names no such field never carries.
|
|
14
|
+
*/
|
|
15
|
+
interface WebhookEventsByType {
|
|
16
|
+
/** A collection was created. */
|
|
17
|
+
"collection.created": Envelope & {
|
|
18
|
+
type: "collection.created";
|
|
19
|
+
data: {
|
|
20
|
+
object: Schemas["CollectionEventObject"];
|
|
21
|
+
previous_attributes?: undefined;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/** A collection was deleted. */
|
|
25
|
+
"collection.deleted": Envelope & {
|
|
26
|
+
type: "collection.deleted";
|
|
27
|
+
data: {
|
|
28
|
+
object: Schemas["CollectionEventObject"];
|
|
29
|
+
previous_attributes?: undefined;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/** An itinerary was added to a collection. */
|
|
33
|
+
"collection.itinerary.added": Envelope & {
|
|
34
|
+
type: "collection.itinerary.added";
|
|
35
|
+
data: {
|
|
36
|
+
object: Schemas["CollectionItineraryEventObject"];
|
|
37
|
+
previous_attributes?: undefined;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/** An itinerary moved within a collection. */
|
|
41
|
+
"collection.itinerary.moved": Envelope & {
|
|
42
|
+
type: "collection.itinerary.moved";
|
|
43
|
+
data: {
|
|
44
|
+
object: Schemas["CollectionItineraryEventObject"];
|
|
45
|
+
previous_attributes?: {
|
|
46
|
+
position?: Schemas["CollectionItineraryEventObject"]["position"] | undefined;
|
|
47
|
+
} | undefined;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
/** An itinerary left a collection. */
|
|
51
|
+
"collection.itinerary.removed": Envelope & {
|
|
52
|
+
type: "collection.itinerary.removed";
|
|
53
|
+
data: {
|
|
54
|
+
object: Schemas["CollectionItineraryEventObject"];
|
|
55
|
+
previous_attributes?: undefined;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/** A collection's share link was created. */
|
|
59
|
+
"collection.share_link.created": Envelope & {
|
|
60
|
+
type: "collection.share_link.created";
|
|
61
|
+
data: {
|
|
62
|
+
object: Schemas["CollectionShareLinkEventObject"];
|
|
63
|
+
previous_attributes?: undefined;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
/** A collection's share link was removed. */
|
|
67
|
+
"collection.share_link.deleted": Envelope & {
|
|
68
|
+
type: "collection.share_link.deleted";
|
|
69
|
+
data: {
|
|
70
|
+
object: Schemas["CollectionShareLinkEventObject"];
|
|
71
|
+
previous_attributes?: undefined;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/** A collection's share link was rotated. */
|
|
75
|
+
"collection.share_link.rotated": Envelope & {
|
|
76
|
+
type: "collection.share_link.rotated";
|
|
77
|
+
data: {
|
|
78
|
+
object: Schemas["CollectionShareLinkEventObject"];
|
|
79
|
+
previous_attributes?: undefined;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
/** A collection's name, description or privacy changed. */
|
|
83
|
+
"collection.updated": Envelope & {
|
|
84
|
+
type: "collection.updated";
|
|
85
|
+
data: {
|
|
86
|
+
object: Schemas["CollectionEventObject"];
|
|
87
|
+
previous_attributes?: {
|
|
88
|
+
name?: Schemas["CollectionEventObject"]["name"] | undefined;
|
|
89
|
+
description?: Schemas["CollectionEventObject"]["description"] | undefined;
|
|
90
|
+
is_private?: Schemas["CollectionEventObject"]["is_private"] | undefined;
|
|
91
|
+
} | undefined;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
/** A zone was added to a collection. */
|
|
95
|
+
"collection.zone.added": Envelope & {
|
|
96
|
+
type: "collection.zone.added";
|
|
97
|
+
data: {
|
|
98
|
+
object: Schemas["CollectionZoneEventObject"];
|
|
99
|
+
previous_attributes?: undefined;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
/** A zone left a collection. */
|
|
103
|
+
"collection.zone.removed": Envelope & {
|
|
104
|
+
type: "collection.zone.removed";
|
|
105
|
+
data: {
|
|
106
|
+
object: Schemas["CollectionZoneEventObject"];
|
|
107
|
+
previous_attributes?: undefined;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
/** An itinerary was created. */
|
|
111
|
+
"itinerary.created": Envelope & {
|
|
112
|
+
type: "itinerary.created";
|
|
113
|
+
data: {
|
|
114
|
+
object: Schemas["ItineraryEventObject"];
|
|
115
|
+
previous_attributes?: undefined;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
/** An itinerary was deleted. */
|
|
119
|
+
"itinerary.deleted": Envelope & {
|
|
120
|
+
type: "itinerary.deleted";
|
|
121
|
+
data: {
|
|
122
|
+
object: Schemas["ItineraryEventObject"];
|
|
123
|
+
previous_attributes?: undefined;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
/** An itinerary was published. */
|
|
127
|
+
"itinerary.published": Envelope & {
|
|
128
|
+
type: "itinerary.published";
|
|
129
|
+
data: {
|
|
130
|
+
object: Schemas["ItineraryEventObject"];
|
|
131
|
+
previous_attributes?: undefined;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
/** A segment's mode changed. */
|
|
135
|
+
"itinerary.segment.converted": Envelope & {
|
|
136
|
+
type: "itinerary.segment.converted";
|
|
137
|
+
data: {
|
|
138
|
+
object: Schemas["ItinerarySegmentEventObject"];
|
|
139
|
+
previous_attributes?: {
|
|
140
|
+
mode?: Schemas["ItinerarySegmentEventObject"]["mode"] | undefined;
|
|
141
|
+
} | undefined;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
/** A segment was added to an itinerary. */
|
|
145
|
+
"itinerary.segment.created": Envelope & {
|
|
146
|
+
type: "itinerary.segment.created";
|
|
147
|
+
data: {
|
|
148
|
+
object: Schemas["ItinerarySegmentEventObject"];
|
|
149
|
+
previous_attributes?: undefined;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
/** A segment was removed from an itinerary. */
|
|
153
|
+
"itinerary.segment.deleted": Envelope & {
|
|
154
|
+
type: "itinerary.segment.deleted";
|
|
155
|
+
data: {
|
|
156
|
+
object: Schemas["ItinerarySegmentEventObject"];
|
|
157
|
+
previous_attributes?: undefined;
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
/** A segment absorbed the one after it. */
|
|
161
|
+
"itinerary.segment.merged": Envelope & {
|
|
162
|
+
type: "itinerary.segment.merged";
|
|
163
|
+
data: {
|
|
164
|
+
object: Schemas["ItinerarySegmentEventObject"];
|
|
165
|
+
previous_attributes?: undefined;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
/** A segment was cut in two. */
|
|
169
|
+
"itinerary.segment.split": Envelope & {
|
|
170
|
+
type: "itinerary.segment.split";
|
|
171
|
+
data: {
|
|
172
|
+
object: Schemas["ItinerarySegmentEventObject"];
|
|
173
|
+
previous_attributes?: undefined;
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
/** A segment changed. */
|
|
177
|
+
"itinerary.segment.updated": Envelope & {
|
|
178
|
+
type: "itinerary.segment.updated";
|
|
179
|
+
data: {
|
|
180
|
+
object: Schemas["ItinerarySegmentEventObject"];
|
|
181
|
+
previous_attributes?: {
|
|
182
|
+
name?: Schemas["ItinerarySegmentEventObject"]["name"] | undefined;
|
|
183
|
+
} | undefined;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
/** A segment group was created. */
|
|
187
|
+
"itinerary.segment_group.created": Envelope & {
|
|
188
|
+
type: "itinerary.segment_group.created";
|
|
189
|
+
data: {
|
|
190
|
+
object: Schemas["ItinerarySegmentGroupEventObject"];
|
|
191
|
+
previous_attributes?: undefined;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
/** A segment group was dissolved. */
|
|
195
|
+
"itinerary.segment_group.deleted": Envelope & {
|
|
196
|
+
type: "itinerary.segment_group.deleted";
|
|
197
|
+
data: {
|
|
198
|
+
object: Schemas["ItinerarySegmentGroupEventObject"];
|
|
199
|
+
previous_attributes?: undefined;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
/** A segment group changed. */
|
|
203
|
+
"itinerary.segment_group.updated": Envelope & {
|
|
204
|
+
type: "itinerary.segment_group.updated";
|
|
205
|
+
data: {
|
|
206
|
+
object: Schemas["ItinerarySegmentGroupEventObject"];
|
|
207
|
+
previous_attributes?: {
|
|
208
|
+
name?: Schemas["ItinerarySegmentGroupEventObject"]["name"] | undefined;
|
|
209
|
+
color?: Schemas["ItinerarySegmentGroupEventObject"]["color"] | undefined;
|
|
210
|
+
} | undefined;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
/** An itinerary's share link was created. */
|
|
214
|
+
"itinerary.share_link.created": Envelope & {
|
|
215
|
+
type: "itinerary.share_link.created";
|
|
216
|
+
data: {
|
|
217
|
+
object: Schemas["ItineraryShareLinkEventObject"];
|
|
218
|
+
previous_attributes?: undefined;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
/** An itinerary's share link was removed. */
|
|
222
|
+
"itinerary.share_link.deleted": Envelope & {
|
|
223
|
+
type: "itinerary.share_link.deleted";
|
|
224
|
+
data: {
|
|
225
|
+
object: Schemas["ItineraryShareLinkEventObject"];
|
|
226
|
+
previous_attributes?: undefined;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
/** An itinerary's share link was rotated. */
|
|
230
|
+
"itinerary.share_link.rotated": Envelope & {
|
|
231
|
+
type: "itinerary.share_link.rotated";
|
|
232
|
+
data: {
|
|
233
|
+
object: Schemas["ItineraryShareLinkEventObject"];
|
|
234
|
+
previous_attributes?: undefined;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
/** An itinerary was taken down. */
|
|
238
|
+
"itinerary.unpublished": Envelope & {
|
|
239
|
+
type: "itinerary.unpublished";
|
|
240
|
+
data: {
|
|
241
|
+
object: Schemas["ItineraryEventObject"];
|
|
242
|
+
previous_attributes?: undefined;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
/** An itinerary's name, description or privacy changed. */
|
|
246
|
+
"itinerary.updated": Envelope & {
|
|
247
|
+
type: "itinerary.updated";
|
|
248
|
+
data: {
|
|
249
|
+
object: Schemas["ItineraryEventObject"];
|
|
250
|
+
previous_attributes?: {
|
|
251
|
+
name?: Schemas["ItineraryEventObject"]["name"] | undefined;
|
|
252
|
+
description?: Schemas["ItineraryEventObject"]["description"] | undefined;
|
|
253
|
+
is_private?: Schemas["ItineraryEventObject"]["is_private"] | undefined;
|
|
254
|
+
} | undefined;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
/** A waypoint was added to an itinerary. */
|
|
258
|
+
"itinerary.waypoint.created": Envelope & {
|
|
259
|
+
type: "itinerary.waypoint.created";
|
|
260
|
+
data: {
|
|
261
|
+
object: Schemas["ItineraryWaypointEventObject"];
|
|
262
|
+
previous_attributes?: undefined;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
/** A waypoint was removed from an itinerary. */
|
|
266
|
+
"itinerary.waypoint.deleted": Envelope & {
|
|
267
|
+
type: "itinerary.waypoint.deleted";
|
|
268
|
+
data: {
|
|
269
|
+
object: Schemas["ItineraryWaypointEventObject"];
|
|
270
|
+
previous_attributes?: undefined;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
/** A waypoint changed. */
|
|
274
|
+
"itinerary.waypoint.updated": Envelope & {
|
|
275
|
+
type: "itinerary.waypoint.updated";
|
|
276
|
+
data: {
|
|
277
|
+
object: Schemas["ItineraryWaypointEventObject"];
|
|
278
|
+
previous_attributes?: {
|
|
279
|
+
name?: Schemas["ItineraryWaypointEventObject"]["name"] | undefined;
|
|
280
|
+
mode?: Schemas["ItineraryWaypointEventObject"]["mode"] | undefined;
|
|
281
|
+
} | undefined;
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
/** An AI provider was configured. */
|
|
285
|
+
"organization.ai_provider_config.created": Envelope & {
|
|
286
|
+
type: "organization.ai_provider_config.created";
|
|
287
|
+
data: {
|
|
288
|
+
object: Schemas["AiProviderConfigEventObject"];
|
|
289
|
+
previous_attributes?: undefined;
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
/** An AI provider configuration was deleted. */
|
|
293
|
+
"organization.ai_provider_config.deleted": Envelope & {
|
|
294
|
+
type: "organization.ai_provider_config.deleted";
|
|
295
|
+
data: {
|
|
296
|
+
object: Schemas["AiProviderConfigEventObject"];
|
|
297
|
+
previous_attributes?: undefined;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
/** An AI provider configuration changed. */
|
|
301
|
+
"organization.ai_provider_config.updated": Envelope & {
|
|
302
|
+
type: "organization.ai_provider_config.updated";
|
|
303
|
+
data: {
|
|
304
|
+
object: Schemas["AiProviderConfigEventObject"];
|
|
305
|
+
previous_attributes?: {
|
|
306
|
+
model?: Schemas["AiProviderConfigEventObject"]["model"] | undefined;
|
|
307
|
+
credential_hint?: Schemas["AiProviderConfigEventObject"]["credential_hint"] | undefined;
|
|
308
|
+
} | undefined;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
/** An organization's billing information changed. */
|
|
312
|
+
"organization.billing.info.updated": Envelope & {
|
|
313
|
+
type: "organization.billing.info.updated";
|
|
314
|
+
data: {
|
|
315
|
+
object: Schemas["BillingInfoEventObject"];
|
|
316
|
+
previous_attributes?: undefined;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
/** An invoice was paid. */
|
|
320
|
+
"organization.billing.invoice.paid": Envelope & {
|
|
321
|
+
type: "organization.billing.invoice.paid";
|
|
322
|
+
data: {
|
|
323
|
+
object: Schemas["InvoiceEventObject"];
|
|
324
|
+
previous_attributes?: undefined;
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
/** An invoice's payment needs the payer's action. */
|
|
328
|
+
"organization.billing.invoice.payment_action_required": Envelope & {
|
|
329
|
+
type: "organization.billing.invoice.payment_action_required";
|
|
330
|
+
data: {
|
|
331
|
+
object: Schemas["InvoiceEventObject"];
|
|
332
|
+
previous_attributes?: undefined;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
/** An invoice's payment failed. */
|
|
336
|
+
"organization.billing.invoice.payment_failed": Envelope & {
|
|
337
|
+
type: "organization.billing.invoice.payment_failed";
|
|
338
|
+
data: {
|
|
339
|
+
object: Schemas["InvoiceEventObject"];
|
|
340
|
+
previous_attributes?: undefined;
|
|
341
|
+
};
|
|
342
|
+
};
|
|
343
|
+
/** A payment method was saved. */
|
|
344
|
+
"organization.billing.payment_method.attached": Envelope & {
|
|
345
|
+
type: "organization.billing.payment_method.attached";
|
|
346
|
+
data: {
|
|
347
|
+
object: Schemas["PaymentMethodEventObject"];
|
|
348
|
+
previous_attributes?: undefined;
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
/** A payment method was removed. */
|
|
352
|
+
"organization.billing.payment_method.detached": Envelope & {
|
|
353
|
+
type: "organization.billing.payment_method.detached";
|
|
354
|
+
data: {
|
|
355
|
+
object: Schemas["PaymentMethodEventObject"];
|
|
356
|
+
previous_attributes?: undefined;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
/** A payment method became, or stopped being, the default. */
|
|
360
|
+
"organization.billing.payment_method.updated": Envelope & {
|
|
361
|
+
type: "organization.billing.payment_method.updated";
|
|
362
|
+
data: {
|
|
363
|
+
object: Schemas["PaymentMethodEventObject"];
|
|
364
|
+
previous_attributes?: {
|
|
365
|
+
is_default?: Schemas["PaymentMethodEventObject"]["is_default"] | undefined;
|
|
366
|
+
} | undefined;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
/** A Data API subscription ended. */
|
|
370
|
+
"organization.billing.subscription.canceled": Envelope & {
|
|
371
|
+
type: "organization.billing.subscription.canceled";
|
|
372
|
+
data: {
|
|
373
|
+
object: Schemas["OrganizationSubscriptionEventObject"];
|
|
374
|
+
previous_attributes?: undefined;
|
|
375
|
+
};
|
|
376
|
+
};
|
|
377
|
+
/** A Data API subscription was opened. */
|
|
378
|
+
"organization.billing.subscription.created": Envelope & {
|
|
379
|
+
type: "organization.billing.subscription.created";
|
|
380
|
+
data: {
|
|
381
|
+
object: Schemas["OrganizationSubscriptionEventObject"];
|
|
382
|
+
previous_attributes?: undefined;
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
/** A Data API subscription was paused. */
|
|
386
|
+
"organization.billing.subscription.paused": Envelope & {
|
|
387
|
+
type: "organization.billing.subscription.paused";
|
|
388
|
+
data: {
|
|
389
|
+
object: Schemas["OrganizationSubscriptionEventObject"];
|
|
390
|
+
previous_attributes?: undefined;
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
/** A Data API subscription was resumed. */
|
|
394
|
+
"organization.billing.subscription.resumed": Envelope & {
|
|
395
|
+
type: "organization.billing.subscription.resumed";
|
|
396
|
+
data: {
|
|
397
|
+
object: Schemas["OrganizationSubscriptionEventObject"];
|
|
398
|
+
previous_attributes?: undefined;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
/** A Data API subscription changed. */
|
|
402
|
+
"organization.billing.subscription.updated": Envelope & {
|
|
403
|
+
type: "organization.billing.subscription.updated";
|
|
404
|
+
data: {
|
|
405
|
+
object: Schemas["OrganizationSubscriptionEventObject"];
|
|
406
|
+
previous_attributes?: {
|
|
407
|
+
status?: Schemas["OrganizationSubscriptionEventObject"]["status"] | undefined;
|
|
408
|
+
cancel_at_period_end?: Schemas["OrganizationSubscriptionEventObject"]["cancel_at_period_end"] | undefined;
|
|
409
|
+
current_period_end_at?: Schemas["OrganizationSubscriptionEventObject"]["current_period_end_at"] | undefined;
|
|
410
|
+
} | undefined;
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
/** An organization was created. */
|
|
414
|
+
"organization.created": Envelope & {
|
|
415
|
+
type: "organization.created";
|
|
416
|
+
data: {
|
|
417
|
+
object: Schemas["OrganizationEventObject"];
|
|
418
|
+
previous_attributes?: undefined;
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
/** What an organization holds changed. */
|
|
422
|
+
"organization.entitlements.updated": Envelope & {
|
|
423
|
+
type: "organization.entitlements.updated";
|
|
424
|
+
data: {
|
|
425
|
+
object: Schemas["OrganizationEntitlementsEventObject"];
|
|
426
|
+
previous_attributes?: {
|
|
427
|
+
capabilities?: Schemas["OrganizationEntitlementsEventObject"]["capabilities"] | undefined;
|
|
428
|
+
studio_entitlements?: Schemas["OrganizationEntitlementsEventObject"]["studio_entitlements"] | undefined;
|
|
429
|
+
} | undefined;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
/** An invitation was accepted. */
|
|
433
|
+
"organization.invitation.accepted": Envelope & {
|
|
434
|
+
type: "organization.invitation.accepted";
|
|
435
|
+
data: {
|
|
436
|
+
object: Schemas["OrganizationInvitationEventObject"];
|
|
437
|
+
previous_attributes?: undefined;
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
/** Somebody was invited to an organization. */
|
|
441
|
+
"organization.invitation.created": Envelope & {
|
|
442
|
+
type: "organization.invitation.created";
|
|
443
|
+
data: {
|
|
444
|
+
object: Schemas["OrganizationInvitationEventObject"];
|
|
445
|
+
previous_attributes?: undefined;
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
/** An invitation was declined. */
|
|
449
|
+
"organization.invitation.declined": Envelope & {
|
|
450
|
+
type: "organization.invitation.declined";
|
|
451
|
+
data: {
|
|
452
|
+
object: Schemas["OrganizationInvitationEventObject"];
|
|
453
|
+
previous_attributes?: undefined;
|
|
454
|
+
};
|
|
455
|
+
};
|
|
456
|
+
/** An invitation was superseded. */
|
|
457
|
+
"organization.invitation.deleted": Envelope & {
|
|
458
|
+
type: "organization.invitation.deleted";
|
|
459
|
+
data: {
|
|
460
|
+
object: Schemas["OrganizationInvitationEventObject"];
|
|
461
|
+
previous_attributes?: undefined;
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
/** An invitation lapsed unanswered. */
|
|
465
|
+
"organization.invitation.expired": Envelope & {
|
|
466
|
+
type: "organization.invitation.expired";
|
|
467
|
+
data: {
|
|
468
|
+
object: Schemas["OrganizationInvitationEventObject"];
|
|
469
|
+
previous_attributes?: undefined;
|
|
470
|
+
};
|
|
471
|
+
};
|
|
472
|
+
/** An invitation was withdrawn. */
|
|
473
|
+
"organization.invitation.revoked": Envelope & {
|
|
474
|
+
type: "organization.invitation.revoked";
|
|
475
|
+
data: {
|
|
476
|
+
object: Schemas["OrganizationInvitationEventObject"];
|
|
477
|
+
previous_attributes?: undefined;
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
/** Somebody joined an organization. */
|
|
481
|
+
"organization.member.created": Envelope & {
|
|
482
|
+
type: "organization.member.created";
|
|
483
|
+
data: {
|
|
484
|
+
object: Schemas["OrganizationMemberEventObject"];
|
|
485
|
+
previous_attributes?: undefined;
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
/** A member left an organization or was removed from it. */
|
|
489
|
+
"organization.member.deleted": Envelope & {
|
|
490
|
+
type: "organization.member.deleted";
|
|
491
|
+
data: {
|
|
492
|
+
object: Schemas["OrganizationMemberEventObject"];
|
|
493
|
+
previous_attributes?: undefined;
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
/** A member's role changed. */
|
|
497
|
+
"organization.member.updated": Envelope & {
|
|
498
|
+
type: "organization.member.updated";
|
|
499
|
+
data: {
|
|
500
|
+
object: Schemas["OrganizationMemberEventObject"];
|
|
501
|
+
previous_attributes?: {
|
|
502
|
+
role?: Schemas["OrganizationMemberEventObject"]["role"] | undefined;
|
|
503
|
+
} | undefined;
|
|
504
|
+
};
|
|
505
|
+
};
|
|
506
|
+
/** A publishable key was created. */
|
|
507
|
+
"organization.publishable_key.created": Envelope & {
|
|
508
|
+
type: "organization.publishable_key.created";
|
|
509
|
+
data: {
|
|
510
|
+
object: Schemas["PublishableKeyEventObject"];
|
|
511
|
+
previous_attributes?: undefined;
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
/** A publishable key was revoked. */
|
|
515
|
+
"organization.publishable_key.revoked": Envelope & {
|
|
516
|
+
type: "organization.publishable_key.revoked";
|
|
517
|
+
data: {
|
|
518
|
+
object: Schemas["PublishableKeyEventObject"];
|
|
519
|
+
previous_attributes?: undefined;
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
/** A publishable key's name or scopes changed. */
|
|
523
|
+
"organization.publishable_key.updated": Envelope & {
|
|
524
|
+
type: "organization.publishable_key.updated";
|
|
525
|
+
data: {
|
|
526
|
+
object: Schemas["PublishableKeyEventObject"];
|
|
527
|
+
previous_attributes?: {
|
|
528
|
+
name?: Schemas["PublishableKeyEventObject"]["name"] | undefined;
|
|
529
|
+
scopes?: Schemas["PublishableKeyEventObject"]["scopes"] | undefined;
|
|
530
|
+
} | undefined;
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
/** A secret key was created. */
|
|
534
|
+
"organization.secret_key.created": Envelope & {
|
|
535
|
+
type: "organization.secret_key.created";
|
|
536
|
+
data: {
|
|
537
|
+
object: Schemas["SecretKeyEventObject"];
|
|
538
|
+
previous_attributes?: undefined;
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
/** A secret key was revoked. */
|
|
542
|
+
"organization.secret_key.revoked": Envelope & {
|
|
543
|
+
type: "organization.secret_key.revoked";
|
|
544
|
+
data: {
|
|
545
|
+
object: Schemas["SecretKeyEventObject"];
|
|
546
|
+
previous_attributes?: undefined;
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
/** A secret key was renamed. */
|
|
550
|
+
"organization.secret_key.updated": Envelope & {
|
|
551
|
+
type: "organization.secret_key.updated";
|
|
552
|
+
data: {
|
|
553
|
+
object: Schemas["SecretKeyEventObject"];
|
|
554
|
+
previous_attributes?: {
|
|
555
|
+
name?: Schemas["SecretKeyEventObject"]["name"] | undefined;
|
|
556
|
+
} | undefined;
|
|
557
|
+
};
|
|
558
|
+
};
|
|
559
|
+
/** An organization's Map Publishing settings changed. */
|
|
560
|
+
"organization.settings.updated": Envelope & {
|
|
561
|
+
type: "organization.settings.updated";
|
|
562
|
+
data: {
|
|
563
|
+
object: Schemas["OrganizationSettingsEventObject"];
|
|
564
|
+
previous_attributes?: undefined;
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
/** An organization's name changed. */
|
|
568
|
+
"organization.updated": Envelope & {
|
|
569
|
+
type: "organization.updated";
|
|
570
|
+
data: {
|
|
571
|
+
object: Schemas["OrganizationEventObject"];
|
|
572
|
+
previous_attributes?: {
|
|
573
|
+
name?: Schemas["OrganizationEventObject"]["name"] | undefined;
|
|
574
|
+
} | undefined;
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
/** A webhook endpoint was created. */
|
|
578
|
+
"organization.webhook_endpoint.created": Envelope & {
|
|
579
|
+
type: "organization.webhook_endpoint.created";
|
|
580
|
+
data: {
|
|
581
|
+
object: Schemas["WebhookEndpointEventObject"];
|
|
582
|
+
previous_attributes?: undefined;
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
/** A webhook endpoint was deleted. */
|
|
586
|
+
"organization.webhook_endpoint.deleted": Envelope & {
|
|
587
|
+
type: "organization.webhook_endpoint.deleted";
|
|
588
|
+
data: {
|
|
589
|
+
object: Schemas["WebhookEndpointEventObject"];
|
|
590
|
+
previous_attributes?: undefined;
|
|
591
|
+
};
|
|
592
|
+
};
|
|
593
|
+
/** A webhook endpoint was disabled. */
|
|
594
|
+
"organization.webhook_endpoint.disabled": Envelope & {
|
|
595
|
+
type: "organization.webhook_endpoint.disabled";
|
|
596
|
+
data: {
|
|
597
|
+
object: Schemas["WebhookEndpointEventObject"];
|
|
598
|
+
previous_attributes?: undefined;
|
|
599
|
+
};
|
|
600
|
+
};
|
|
601
|
+
/** A webhook endpoint was enabled. */
|
|
602
|
+
"organization.webhook_endpoint.enabled": Envelope & {
|
|
603
|
+
type: "organization.webhook_endpoint.enabled";
|
|
604
|
+
data: {
|
|
605
|
+
object: Schemas["WebhookEndpointEventObject"];
|
|
606
|
+
previous_attributes?: undefined;
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
/** A webhook endpoint has failed for 24 hours. */
|
|
610
|
+
"organization.webhook_endpoint.failing": Envelope & {
|
|
611
|
+
type: "organization.webhook_endpoint.failing";
|
|
612
|
+
data: {
|
|
613
|
+
object: Schemas["WebhookEndpointEventObject"];
|
|
614
|
+
previous_attributes?: undefined;
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
/** A webhook endpoint reported failing succeeded again. */
|
|
618
|
+
"organization.webhook_endpoint.recovered": Envelope & {
|
|
619
|
+
type: "organization.webhook_endpoint.recovered";
|
|
620
|
+
data: {
|
|
621
|
+
object: Schemas["WebhookEndpointEventObject"];
|
|
622
|
+
previous_attributes?: undefined;
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
/** A webhook endpoint's secret was rotated. */
|
|
626
|
+
"organization.webhook_endpoint.secret_rotated": Envelope & {
|
|
627
|
+
type: "organization.webhook_endpoint.secret_rotated";
|
|
628
|
+
data: {
|
|
629
|
+
object: Schemas["WebhookEndpointEventObject"];
|
|
630
|
+
previous_attributes?: undefined;
|
|
631
|
+
};
|
|
632
|
+
};
|
|
633
|
+
/** A webhook endpoint changed. */
|
|
634
|
+
"organization.webhook_endpoint.updated": Envelope & {
|
|
635
|
+
type: "organization.webhook_endpoint.updated";
|
|
636
|
+
data: {
|
|
637
|
+
object: Schemas["WebhookEndpointEventObject"];
|
|
638
|
+
previous_attributes?: {
|
|
639
|
+
host?: Schemas["WebhookEndpointEventObject"]["host"] | undefined;
|
|
640
|
+
} | undefined;
|
|
641
|
+
};
|
|
642
|
+
};
|
|
643
|
+
/** A zone was created. */
|
|
644
|
+
"zone.created": Envelope & {
|
|
645
|
+
type: "zone.created";
|
|
646
|
+
data: {
|
|
647
|
+
object: Schemas["ZoneEventObject"];
|
|
648
|
+
previous_attributes?: undefined;
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
/** A zone was deleted. */
|
|
652
|
+
"zone.deleted": Envelope & {
|
|
653
|
+
type: "zone.deleted";
|
|
654
|
+
data: {
|
|
655
|
+
object: Schemas["ZoneEventObject"];
|
|
656
|
+
previous_attributes?: undefined;
|
|
657
|
+
};
|
|
658
|
+
};
|
|
659
|
+
/** A zone was published. */
|
|
660
|
+
"zone.published": Envelope & {
|
|
661
|
+
type: "zone.published";
|
|
662
|
+
data: {
|
|
663
|
+
object: Schemas["ZoneEventObject"];
|
|
664
|
+
previous_attributes?: undefined;
|
|
665
|
+
};
|
|
666
|
+
};
|
|
667
|
+
/** A zone was taken down. */
|
|
668
|
+
"zone.unpublished": Envelope & {
|
|
669
|
+
type: "zone.unpublished";
|
|
670
|
+
data: {
|
|
671
|
+
object: Schemas["ZoneEventObject"];
|
|
672
|
+
previous_attributes?: undefined;
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
/** A zone changed. */
|
|
676
|
+
"zone.updated": Envelope & {
|
|
677
|
+
type: "zone.updated";
|
|
678
|
+
data: {
|
|
679
|
+
object: Schemas["ZoneEventObject"];
|
|
680
|
+
previous_attributes?: {
|
|
681
|
+
name?: Schemas["ZoneEventObject"]["name"] | undefined;
|
|
682
|
+
description?: Schemas["ZoneEventObject"]["description"] | undefined;
|
|
683
|
+
level?: Schemas["ZoneEventObject"]["level"] | undefined;
|
|
684
|
+
mode?: Schemas["ZoneEventObject"]["mode"] | undefined;
|
|
685
|
+
is_private?: Schemas["ZoneEventObject"]["is_private"] | undefined;
|
|
686
|
+
start_at?: Schemas["ZoneEventObject"]["start_at"] | undefined;
|
|
687
|
+
end_at?: Schemas["ZoneEventObject"]["end_at"] | undefined;
|
|
688
|
+
} | undefined;
|
|
689
|
+
};
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* WebhookEvent is a webhook event as Mountaya delivers it to an endpoint, typed by its `type`:
|
|
694
|
+
* comparing `type` with one of the public types narrows `data.object` to the object that type
|
|
695
|
+
* carries and `data.previous_attributes` to the fields its change can move.
|
|
696
|
+
*
|
|
697
|
+
* Name one type, `WebhookEvent<"organization.member.updated">`, for the event of that type alone,
|
|
698
|
+
* and several for their union. With no argument it is every public type's event, which is what
|
|
699
|
+
* {@link constructWebhookEvent} answers.
|
|
700
|
+
*
|
|
701
|
+
* Every event is the contract's envelope, so a value of this type is also a
|
|
702
|
+
* `RestSchema.components["schemas"]["WebhookEvent"]`, the shape `getOrganizationWebhookEvents`
|
|
703
|
+
* lists, where `type` and `data` are not tied together.
|
|
704
|
+
*
|
|
705
|
+
* @example
|
|
706
|
+
* ```ts
|
|
707
|
+
* declare const event: WebhookEvent;
|
|
708
|
+
*
|
|
709
|
+
* if (event.type === "organization.member.updated") {
|
|
710
|
+
* // The member's role now, and the role it held before the change.
|
|
711
|
+
* console.log(event.data.object.role, event.data.previous_attributes?.role);
|
|
712
|
+
* }
|
|
713
|
+
* ```
|
|
714
|
+
*/
|
|
715
|
+
type WebhookEvent<Type extends WebhookEventType = WebhookEventType> = WebhookEventsByType[Type];
|
|
716
|
+
/**
|
|
717
|
+
* WebhookSignatureFailure is why {@link constructWebhookEvent} refused a delivery, as
|
|
718
|
+
* {@link MountayaWebhookSignatureError} carries it:
|
|
719
|
+
*
|
|
720
|
+
* - `missing-header`: the request carries no `Mountaya-Signature` header, or an empty one.
|
|
721
|
+
* - `malformed-header`: the header is not `t=<unix seconds>,v1=<signature>`. It holds no `t` or
|
|
722
|
+
* more than one, a `t` that is not whole seconds, or no `v1`.
|
|
723
|
+
* - `signature`: no `v1` is the signature of this body under this secret. The body was changed on
|
|
724
|
+
* the way, the secret is another endpoint's or one rotated away, or the delivery is not
|
|
725
|
+
* Mountaya's.
|
|
726
|
+
* - `timestamp`: the signature verifies and `t` stands further from the receiver's clock than the
|
|
727
|
+
* tolerance, either way: a delivery replayed later, or a clock that is wrong.
|
|
728
|
+
*/
|
|
729
|
+
type WebhookSignatureFailure = "malformed-header" | "missing-header" | "signature" | "timestamp";
|
|
730
|
+
/**
|
|
731
|
+
* MountayaWebhookSignatureError is a webhook delivery {@link constructWebhookEvent} cannot trust:
|
|
732
|
+
* a signature header missing or malformed, a signature no `v1` matches, or a timestamp outside
|
|
733
|
+
* the tolerance. `reason` says which.
|
|
734
|
+
*
|
|
735
|
+
* Answer such a delivery with a `400` and do nothing it asks. Mountaya repeats a delivery that
|
|
736
|
+
* failed, so a refusal a wrong secret or a wrong clock caused costs an attempt and not the event:
|
|
737
|
+
* once the secret or the clock is right, the next attempt verifies.
|
|
738
|
+
*/
|
|
739
|
+
export declare class MountayaWebhookSignatureError extends MountayaError {
|
|
740
|
+
readonly name = "MountayaWebhookSignatureError";
|
|
741
|
+
/** Why the delivery was refused: see {@link WebhookSignatureFailure}. */
|
|
742
|
+
readonly reason: WebhookSignatureFailure;
|
|
743
|
+
/**
|
|
744
|
+
* @param message - what was refused, and what to do about it.
|
|
745
|
+
* @param reason - why the delivery was refused.
|
|
746
|
+
*/
|
|
747
|
+
constructor(message: string, reason: WebhookSignatureFailure);
|
|
748
|
+
}
|
|
749
|
+
/** ConstructWebhookEventOptions is how {@link constructWebhookEvent} judges a delivery's time. */
|
|
750
|
+
interface ConstructWebhookEventOptions {
|
|
751
|
+
/**
|
|
752
|
+
* The instant the receiver's clock reads, which a delivery's timestamp is judged against. Pass it
|
|
753
|
+
* where the receiver keeps a clock of its own, or where a test pins the time; left out, it is the
|
|
754
|
+
* machine's wall clock, read once the signature verifies.
|
|
755
|
+
*
|
|
756
|
+
* @default the machine's wall clock, as `Date.now()` reads it
|
|
757
|
+
*/
|
|
758
|
+
readonly now?: Date | undefined;
|
|
759
|
+
/**
|
|
760
|
+
* How far a delivery's timestamp may stand from the receiver's clock, in seconds, either way. A
|
|
761
|
+
* delivery signed longer ago is refused as a replay. Raise it for a receiver whose clock drifts,
|
|
762
|
+
* never to accept a delivery a queue held back: verify a delivery as it arrives, then queue it.
|
|
763
|
+
*
|
|
764
|
+
* @default 300
|
|
765
|
+
*/
|
|
766
|
+
readonly toleranceSeconds?: number | undefined;
|
|
767
|
+
}
|
|
768
|
+
/**
|
|
769
|
+
* constructWebhookEvent verifies a webhook delivery's signature and answers the event its body
|
|
770
|
+
* holds, typed by its `type`.
|
|
771
|
+
*
|
|
772
|
+
* Pass the body exactly as it arrived, before any JSON parser reads it: the signature covers those
|
|
773
|
+
* bytes, and a body parsed and written out again is another string, which does not verify. A
|
|
774
|
+
* `Uint8Array`, a Node `Buffer` among them, is verified as it is, and a string as its UTF-8 bytes,
|
|
775
|
+
* which is what `await request.text()` answers for a body Mountaya sent.
|
|
776
|
+
*
|
|
777
|
+
* The header is read first, then the signature, then the time, so a forged delivery is refused
|
|
778
|
+
* for its signature whatever time it claims. A `v1` that matches is enough: while a rotated secret
|
|
779
|
+
* overlaps its successor the header carries one for each, and either secret verifies it. The time
|
|
780
|
+
* is judged against the receiver's clock: `options.now` where the caller states it, and the
|
|
781
|
+
* machine's wall clock otherwise.
|
|
782
|
+
*
|
|
783
|
+
* The event's instants are `Date`s, as a method of this client answers them: its `created_at`,
|
|
784
|
+
* those of `data.object` and those `data.previous_attributes` holds. A member of the event or of
|
|
785
|
+
* its `data.object` the contract types required and nullable reads null where the delivery leaves
|
|
786
|
+
* it out, as in an answer, and `data.previous_attributes` holds only what it was sent with. An
|
|
787
|
+
* event of a type a newer contract added is answered too, with the type it arrived with, which no
|
|
788
|
+
* case of a `switch` over the types this release knows reaches.
|
|
789
|
+
*
|
|
790
|
+
* @param rawBody - The request body, exactly as it arrived.
|
|
791
|
+
* @param signatureHeader - The request's `Mountaya-Signature` header, as `request.headers.get`
|
|
792
|
+
* answers it: `null` or `undefined` where the request carries none.
|
|
793
|
+
* @param secret - The signing secret of the endpoint the delivery was sent to, `whsk_` included.
|
|
794
|
+
* @param options - How far a timestamp may stand from the receiver's clock, and the instant that
|
|
795
|
+
* clock reads.
|
|
796
|
+
* @returns The event, once a `v1` verifies and its timestamp is within the tolerance.
|
|
797
|
+
* @throws `MountayaWebhookSignatureError` for a delivery that cannot be trusted, its `reason`
|
|
798
|
+
* saying why: answer it with a `400`.
|
|
799
|
+
* @throws `MountayaConfigurationError` for a body that is no string or `Uint8Array`, a secret
|
|
800
|
+
* that does not start with `whsk_`, a `toleranceSeconds` that is no finite number from 0, a
|
|
801
|
+
* `now` that is no `Date` naming an instant, or a runtime with no Web Crypto; and, once the
|
|
802
|
+
* delivery verifies, for a body that holds no event, not even the envelope every event is
|
|
803
|
+
* delivered in, with the parser's failure as its `cause` where the body is not JSON. It names no
|
|
804
|
+
* `reason`: answer it with a `400` as well.
|
|
805
|
+
*
|
|
806
|
+
* @example
|
|
807
|
+
* ```ts
|
|
808
|
+
* declare const webhookSecret: string; // The endpoint's signing secret, whsk_…
|
|
809
|
+
*
|
|
810
|
+
* export const POST = async (request: Request): Promise<Response> => {
|
|
811
|
+
* let event: WebhookEvent;
|
|
812
|
+
* try {
|
|
813
|
+
* event = await constructWebhookEvent(
|
|
814
|
+
* await request.text(),
|
|
815
|
+
* request.headers.get("Mountaya-Signature"),
|
|
816
|
+
* webhookSecret,
|
|
817
|
+
* );
|
|
818
|
+
* } catch (error) {
|
|
819
|
+
* if (error instanceof MountayaWebhookSignatureError) {
|
|
820
|
+
* return new Response(error.reason, { status: 400 });
|
|
821
|
+
* }
|
|
822
|
+
* throw error;
|
|
823
|
+
* }
|
|
824
|
+
*
|
|
825
|
+
* if (event.type === "organization.member.deleted") {
|
|
826
|
+
* console.log(`${event.data.object.user_id} left: ${event.data.object.reason}`);
|
|
827
|
+
* }
|
|
828
|
+
*
|
|
829
|
+
* return new Response(null, { status: 204 });
|
|
830
|
+
* };
|
|
831
|
+
* ```
|
|
832
|
+
*/
|
|
833
|
+
export declare const constructWebhookEvent: (rawBody: string | Uint8Array, signatureHeader: string | null | undefined, secret: string, options?: ConstructWebhookEventOptions | undefined) => Promise<WebhookEvent>;
|
|
834
|
+
/** The admin half of the generated table: the organization's operations, by resource. */
|
|
835
|
+
type AdminOperations = ReturnType<typeof bind>["admin"];
|
|
836
|
+
/**
|
|
837
|
+
* MountayaAdmin is the Map Studio API's organization half for a client: its billing, its
|
|
838
|
+
* organizations, its webhook endpoints, the acting user's memberships and preferences, its keys,
|
|
839
|
+
* invitations and members, and minting a session token. Each method resolves to the response
|
|
840
|
+
* envelope, with the payload at `data`, and calls through the client's own transport, under its
|
|
841
|
+
* credential, retries and error classes.
|
|
842
|
+
*
|
|
843
|
+
* Constructing one is cheap: the operations are bound once per transport, so two instances over
|
|
844
|
+
* one client hold the same namespaces.
|
|
845
|
+
*
|
|
846
|
+
* @example
|
|
847
|
+
* ```ts
|
|
848
|
+
* import { Mountaya } from "@mountaya/client";
|
|
849
|
+
* import { MountayaAdmin } from "@mountaya/client/admin";
|
|
850
|
+
*
|
|
851
|
+
* const secretKey = process.env.MOUNTAYA_SECRET_KEY;
|
|
852
|
+
* if (secretKey === undefined) {
|
|
853
|
+
* throw new Error("MOUNTAYA_SECRET_KEY is not set.");
|
|
854
|
+
* }
|
|
855
|
+
*
|
|
856
|
+
* const server = new Mountaya({ credential: { secretKey } });
|
|
857
|
+
* const { data: session } = await new MountayaAdmin(server).sessions.postSession({
|
|
858
|
+
* body: { publishable_key: "pk_…" },
|
|
859
|
+
* });
|
|
860
|
+
* ```
|
|
861
|
+
*/
|
|
862
|
+
export declare class MountayaAdmin {
|
|
863
|
+
/** The organization's billing: its subscription, its payment methods, its details and invoices. */
|
|
864
|
+
readonly billing: AdminOperations["billing"];
|
|
865
|
+
/** The organization's invitations. */
|
|
866
|
+
readonly invitations: AdminOperations["invitations"];
|
|
867
|
+
/** The organization's publishable keys. */
|
|
868
|
+
readonly keys: AdminOperations["keys"];
|
|
869
|
+
/** The organization's members. */
|
|
870
|
+
readonly members: AdminOperations["members"];
|
|
871
|
+
/** The organizations themselves: their details, settings, usage and AI provider configuration. */
|
|
872
|
+
readonly organizations: AdminOperations["organizations"];
|
|
873
|
+
/** Minting a session token for a publishable key. */
|
|
874
|
+
readonly sessions: AdminOperations["sessions"];
|
|
875
|
+
/** The acting user's own memberships, invitations and preferences. */
|
|
876
|
+
readonly users: AdminOperations["users"];
|
|
877
|
+
/** The organization's webhook endpoints, the events it was sent and their deliveries. */
|
|
878
|
+
readonly webhooks: AdminOperations["webhooks"];
|
|
879
|
+
/**
|
|
880
|
+
* Binds the admin unit's operations to the transport of `mountaya`.
|
|
881
|
+
*
|
|
882
|
+
* @param mountaya The client whose transport the operations call through: a `Mountaya` of
|
|
883
|
+
* `@mountaya/client` or of `@mountaya/client/browser`.
|
|
884
|
+
*/
|
|
885
|
+
constructor(mountaya: {
|
|
886
|
+
readonly transport: MountayaTransport;
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
export { type Address, type AiCredentialField, type AiProvider, type AiProviderCatalog, type AiProviderConfig, type AiProviderConfigCreateParams, type AiProviderConfigEventObject, type AiProviderConfigUpdateParams, type AssignableOrganizationRole, type BillingInfo, type BillingInfoEventObject, type BillingInfoField, type BillingInfoTaxIdParams, type BillingInfoUpdateParams, type BillingInterval, type BillingPricing, type BillingProduct, type BillingUnitKind, type Capability, type CollectionEventObject, type CollectionItineraryEventObject, type CollectionShareLinkEventObject, type CollectionZoneEventObject, type ConstructWebhookEventOptions, type Invoice, type InvoiceEventObject, type InvoiceStatus, type ItineraryEventObject, type ItineraryOrigin, type ItinerarySegmentEventObject, type ItinerarySegmentGroupEventObject, type ItineraryShareLinkEventObject, type ItineraryWaypointEventObject, type Membership, type MeterDimension, type NotificationPreference, type NotificationPreferenceUpdate, type NotificationPreferences, type NotificationPreferencesUpdateParams, type NotificationType, type OrganizationBillingPaymentMethodParams, type OrganizationBillingProvisionParams, type OrganizationCreateParams, type OrganizationEntitlementsEventObject, type OrganizationEventObject, type OrganizationInvitation, type OrganizationInvitationCreateParams, type OrganizationInvitationEventObject, type OrganizationMember, type OrganizationMemberDeletionReason, type OrganizationMemberEventObject, type OrganizationMemberUpdateParams, type OrganizationSettingsEventObject, type OrganizationSettingsPatchParams, type OrganizationSubscription, type OrganizationSubscriptionEventObject, type OrganizationSubscriptionItem, type OrganizationSubscriptionSummary, type OrganizationUpdateParams, type PaymentMethod, type PaymentMethodCard, type PaymentMethodEventObject, type PaymentMethodSepaDebit, type Preferences, type PreferencesUpdateParams, type PromotionCodePreview, type PublishableKey, type PublishableKeyCreateParams, type PublishableKeyEventObject, type PublishableKeyScope, type PublishableKeyUpdateParams, type ResponseMetadataPostOrganizationInvitation, type SecretKeyEventObject, type SessionCreateParams, type SetupIntentSession, type SubscriptionCollectionMethod, type SubscriptionDiscount, type SubscriptionEndReason, type SubscriptionStatus, type TaxId, type UsageClientName, type UsageDataPoint, type UsageDataResourceType, type UsageDataSurface, type UsageMetric, type UsageStatusClass, type UsageTilePoint, type UsageTileResourceType, type UsageTileSurface, type UserInvitation, type WebhookAttemptOutcome, type WebhookDelivery, type WebhookDeliveryAttempt, type WebhookDeliveryCreateParams, type WebhookDeliveryOutcome, type WebhookDeliveryRecipient, type WebhookDeliveryTestParams, type WebhookDeliveryTrigger, type WebhookDeliveryTriggerKind, type WebhookDeliveryWithAttempts, type WebhookDestinationKind, type WebhookEndpoint, type WebhookEndpointCreateParams, type WebhookEndpointDisabledReason, type WebhookEndpointEventObject, type WebhookEndpointStatus, type WebhookEndpointUpdateParams, type WebhookEndpointWithSecret, type WebhookEvent, type WebhookEventActor, type WebhookEventActorType, type WebhookEventCatalogEntry, type WebhookEventData, type WebhookEventObject, type WebhookEventRelatedObject, type WebhookEventRequest, type WebhookEventType, type WebhookEventWithDeliveries, type WebhookFailureClass, type WebhookFailureKind, type WebhookHealth, type WebhookHealthDestination, type WebhookHealthFailure, type WebhookHealthFigures, type WebhookHealthGranularity, type WebhookHealthPoint, type WebhookHealthWindow, type WebhookSignatureFailure, type ZoneEventObject, adminOperations_gen_d_exports as rest };
|