@foxy.io/sdk 1.9.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,43 @@
1
+ import type { Graph } from '../../core';
2
+ import type { Store } from './store';
3
+ import type { WebhookLogs } from './webhook_logs';
4
+ import type { WebhookStatuses } from './webhook_statuses';
5
+ import type { Webhooks } from './webhooks';
6
+
7
+ export interface Webhook extends Graph {
8
+ curie: 'fx:webhook';
9
+
10
+ links: {
11
+ /** This resource. */
12
+ 'self': Webhook;
13
+ /** Store this webhook was created in. */
14
+ 'fx:store': Store;
15
+ /** List of all webhooks for the store. */
16
+ 'fx:webhooks': Webhooks;
17
+ /** List of all webhook delivery attempts and their current states. */
18
+ 'fx:statuses': WebhookStatuses;
19
+ /** List of all endpoint responses received during webhook delivery attempts. */
20
+ 'fx:logs': WebhookLogs;
21
+ };
22
+
23
+ props: {
24
+ /** The type of this webhook. Required. */
25
+ format: 'json' | 'webflow' | 'zapier';
26
+ /** The version of this webhook. Should not be modified unless you have specific instructions from Foxy. Default value is 2. */
27
+ version: number;
28
+ /** The name of this webhook. Required. 255 characters or less. */
29
+ name: string;
30
+ /** The endpoint where we will send the webhook data. 1000 characters or less. */
31
+ url: string | null;
32
+ /** The webhook payload mirrors the API, and you can include more or less data according to your needs (using `zoom` and other modifiers). 1000 characters or less. Something like `zoom=items,items:options,customer`. */
33
+ query: string | null;
34
+ /** The JSON webhooks are encrypted in certain situations. This key is also used to generate a signature to verify the integrity of the payload. 1000 characters or less. */
35
+ encryption_key: string | null;
36
+ /** The type of resource to observe changes on. */
37
+ event_resource: ('subscription' | 'transaction' | 'customer')[];
38
+ /** The date this resource was created. */
39
+ date_created: string | null;
40
+ /** The date this resource was last modified. */
41
+ date_modified: string | null;
42
+ };
43
+ }
@@ -0,0 +1,42 @@
1
+ import type { Customer } from './customer';
2
+ import type { Graph } from '../../core';
3
+ import type { Store } from './store';
4
+ import type { Subscription } from './subscription';
5
+ import type { Transaction } from './transaction';
6
+ import type { Webhook } from './webhook';
7
+
8
+ export interface WebhookLog extends Graph {
9
+ curie: 'fx:webhook_log';
10
+
11
+ links: {
12
+ /** This resource. */
13
+ 'self': WebhookLog;
14
+ /** The store this webhook status is associated with. */
15
+ 'fx:store': Store;
16
+ /** The webhook this status is associated with. */
17
+ 'fx:webhook': Webhook;
18
+ /** The resource changes in which have triggered the webhook. */
19
+ 'fx:resource': Transaction | Subscription | Customer;
20
+ };
21
+
22
+ props: {
23
+ /** The type of resource changes were observed on. */
24
+ resource_type: 'subscription' | 'transaction' | 'customer';
25
+ /** The ID of the resource changes in which have triggered the webhook. */
26
+ resource_id: number;
27
+ /** The ID of the webhook this status is associated with. */
28
+ webhook_id: number;
29
+ /** The code received from the server the webhook was sent to. */
30
+ response_code: string;
31
+ /** The content received from the server the webhook was sent to. */
32
+ response_body: string | null;
33
+ /** The date this resource was created. */
34
+ date_created: string | null;
35
+ /** The date this resource was last modified. */
36
+ date_modified: string | null;
37
+ };
38
+
39
+ zooms: {
40
+ webhook?: Webhook;
41
+ };
42
+ }
@@ -0,0 +1,10 @@
1
+ import type { CollectionGraphLinks, CollectionGraphProps } from '../../core/defaults';
2
+ import type { Graph } from '../../core';
3
+ import type { WebhookLog } from './webhook_log';
4
+
5
+ export interface WebhookLogs extends Graph {
6
+ curie: 'fx:webhook_logs';
7
+ links: CollectionGraphLinks<WebhookLogs>;
8
+ props: CollectionGraphProps;
9
+ child: WebhookLog;
10
+ }
@@ -0,0 +1,40 @@
1
+ import type { Customer } from './customer';
2
+ import type { Graph } from '../../core';
3
+ import type { Store } from './store';
4
+ import type { Subscription } from './subscription';
5
+ import type { Transaction } from './transaction';
6
+ import type { Webhook } from './webhook';
7
+
8
+ export interface WebhookStatus extends Graph {
9
+ curie: 'fx:webhook_status';
10
+
11
+ links: {
12
+ /** This resource. */
13
+ 'self': WebhookStatus;
14
+ /** The store this webhook status is associated with. */
15
+ 'fx:store': Store;
16
+ /** The webhook this status is associated with. */
17
+ 'fx:webhook': Webhook;
18
+ /** The resource changes in which have triggered the webhook. */
19
+ 'fx:resource': Transaction | Subscription | Customer;
20
+ };
21
+
22
+ props: {
23
+ /** The type of resource changes were observed on. */
24
+ resource_type: 'subscription' | 'transaction' | 'customer';
25
+ /** The ID of the resource changes in which have triggered the webhook. */
26
+ resource_id: number;
27
+ /** The ID of the webhook this status is associated with. */
28
+ webhook_id: number;
29
+ /** The current state of this attempt. */
30
+ status: 'pending' | 'failed' | 'successful';
31
+ /** The date this resource was created. */
32
+ date_created: string | null;
33
+ /** The date this resource was last modified. */
34
+ date_modified: string | null;
35
+ };
36
+
37
+ zooms: {
38
+ webhook?: Webhook;
39
+ };
40
+ }
@@ -0,0 +1,10 @@
1
+ import type { CollectionGraphLinks, CollectionGraphProps } from '../../core/defaults';
2
+ import type { Graph } from '../../core';
3
+ import type { WebhookStatus } from './webhook_status';
4
+
5
+ export interface WebhookStatuses extends Graph {
6
+ curie: 'fx:webhook_statuses';
7
+ links: CollectionGraphLinks<WebhookStatuses>;
8
+ props: CollectionGraphProps;
9
+ child: WebhookStatus;
10
+ }
@@ -0,0 +1,10 @@
1
+ import type { CollectionGraphLinks, CollectionGraphProps } from '../../core/defaults';
2
+ import type { Graph } from '../../core';
3
+ import type { Webhook } from './webhook';
4
+
5
+ export interface Webhooks extends Graph {
6
+ curie: 'fx:webhooks';
7
+ links: CollectionGraphLinks<Webhooks>;
8
+ props: CollectionGraphProps;
9
+ child: Webhook;
10
+ }
@@ -158,3 +158,9 @@ export * from './Graph/user_access';
158
158
  export * from './Graph/user_accesses';
159
159
  export * from './Graph/users';
160
160
  export * from './Graph/void';
161
+ export * from './Graph/webhook_log';
162
+ export * from './Graph/webhook_logs';
163
+ export * from './Graph/webhook_status';
164
+ export * from './Graph/webhook_statuses';
165
+ export * from './Graph/webhook';
166
+ export * from './Graph/webhooks';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foxy.io/sdk",
3
3
  "type": "commonjs",
4
- "version": "1.9.0",
4
+ "version": "1.9.1",
5
5
  "description": "Universal SDK for a full server-side and a limited in-browser access to Foxy hAPI.",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.js",