@foxy.io/sdk 1.9.0 → 1.9.3

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,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';
@@ -78,8 +78,6 @@ export declare class BooleanSelector {
78
78
  * @returns `BooleanSelector` instance constructed from the given attribite value
79
79
  */
80
80
  static fromAttribute(value: string | null, truthyValue?: string): BooleanSelector;
81
- private static __processors;
82
- private __value;
83
81
  private __tree;
84
82
  /**
85
83
  * Parses the boolean selector value and creates an instance
@@ -105,17 +103,18 @@ export declare class BooleanSelector {
105
103
  */
106
104
  matches(id: string, isFullMatch?: boolean): boolean;
107
105
  /**
108
- * Zooms on the given top-level identifier.
106
+ * Zooms on the given top-level identifier or follows a path.
109
107
  *
110
108
  * @example
109
+ * new BooleanSelector('foo:bar:baz').zoom('foo:bar').toString() // => "baz"
111
110
  * new BooleanSelector('foo:bar:baz').zoom('foo').toString() // => "bar:baz"
112
111
  * new BooleanSelector('not=foo').zoom('bar').toString() // => "not=*"
113
112
  * new BooleanSelector('not=foo').zoom('foo').toString() // => ""
114
113
  *
115
- * @param id identifier to look for
116
- * @returns `true` is current selector includes rules for the given identifier
114
+ * @param path path to look for
115
+ * @returns zoomed BooleanSelector
117
116
  */
118
- zoom(id: string): BooleanSelector;
117
+ zoom(path: string): BooleanSelector;
119
118
  /**
120
119
  * Converts this selector to string.
121
120
  *
@@ -138,6 +137,11 @@ export declare class BooleanSelector {
138
137
  * @returns attribute value representing this selector.
139
138
  */
140
139
  toAttribute(truthyValue?: string): string | null;
141
- private static __stringify;
140
+ private static __parsePath;
141
+ private static __parseSet;
142
+ private static __parseListItem;
143
+ private static __parseList;
144
+ private static __lintList;
142
145
  private static __parse;
146
+ private static __stringifyTree;
143
147
  }
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.3",
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",
@@ -42,7 +42,7 @@
42
42
  "build:cdn": "webpack",
43
43
  "build:cjs": "tsc --outdir \"dist/cjs\"",
44
44
  "build:esm": "ttsc --project tsconfig.esm.json --outdir \"dist/esm\" && copyfiles --up 1 \"./build/esm/**/*\" \"./dist\"",
45
- "build:docs": "typedoc --excludePrivate --ignoreCompilerErrors --mode library --out docs src/index.ts",
45
+ "build:docs": "typedoc --excludePrivate --out docs src/index.ts",
46
46
  "build:types": "tsc --declarationdir \"dist/types\" --declaration --emitdeclarationonly && copyfiles --up 1 \"./src/**/*.d.ts\" \"./dist/types\"",
47
47
  "prepack": "rimraf dist && run-p \"build:!(docs)\""
48
48
  },
@@ -88,7 +88,7 @@
88
88
  "ts-loader": "^8.0.9",
89
89
  "ts-node": "^9.1.1",
90
90
  "ttypescript": "^1.5.12",
91
- "typedoc": "0.17.0-3",
91
+ "typedoc": "^0.22.18",
92
92
  "typescript": "^4.0.3",
93
93
  "webpack": "^5.4.0",
94
94
  "webpack-cli": "^4.2.0",