webflow-api 1.3.0 → 1.3.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.
Files changed (54) hide show
  1. package/dist/api/collection.d.ts +112 -0
  2. package/dist/api/collection.js +94 -0
  3. package/dist/api/index.d.ts +7 -0
  4. package/dist/api/index.js +23 -0
  5. package/dist/api/item.d.ts +177 -0
  6. package/dist/api/item.js +151 -0
  7. package/dist/api/meta.d.ts +53 -0
  8. package/dist/api/meta.js +25 -0
  9. package/dist/api/oauth.d.ts +71 -0
  10. package/dist/api/oauth.js +71 -0
  11. package/dist/api/site.d.ts +140 -0
  12. package/dist/api/site.js +137 -0
  13. package/dist/api/user.d.ts +143 -0
  14. package/dist/api/user.js +119 -0
  15. package/dist/api/webhook.d.ts +102 -0
  16. package/dist/api/webhook.js +80 -0
  17. package/dist/core/error.d.ts +21 -0
  18. package/dist/core/error.js +30 -0
  19. package/dist/core/index.d.ts +3 -0
  20. package/dist/core/index.js +19 -0
  21. package/dist/core/response.d.ts +32 -0
  22. package/dist/core/response.js +26 -0
  23. package/dist/core/webflow.d.ts +390 -0
  24. package/dist/core/webflow.js +518 -0
  25. package/dist/index.d.ts +2 -0
  26. package/package.json +7 -1
  27. package/yarn.lock +2840 -0
  28. package/.eslintrc +0 -31
  29. package/.github/workflows/code-quality.yml +0 -102
  30. package/.github/workflows/npm-publish.yml +0 -21
  31. package/.github/workflows/semgrep.yml +0 -24
  32. package/.prettierignore +0 -5
  33. package/.prettierrc +0 -6
  34. package/jest.config.js +0 -17
  35. package/tests/api/collection.test.ts +0 -147
  36. package/tests/api/item.test.ts +0 -180
  37. package/tests/api/meta.test.ts +0 -38
  38. package/tests/api/oauth.test.ts +0 -44
  39. package/tests/api/site.test.ts +0 -202
  40. package/tests/api/user.test.ts +0 -139
  41. package/tests/api/webhook.test.ts +0 -82
  42. package/tests/core/error.test.ts +0 -19
  43. package/tests/core/response.test.ts +0 -36
  44. package/tests/core/webflow.test.ts +0 -540
  45. package/tests/fixtures/collection.fixture.ts +0 -374
  46. package/tests/fixtures/index.ts +0 -7
  47. package/tests/fixtures/item.fixture.ts +0 -193
  48. package/tests/fixtures/meta.fixture.ts +0 -34
  49. package/tests/fixtures/oauth.fixture.ts +0 -38
  50. package/tests/fixtures/site.fixture.ts +0 -78
  51. package/tests/fixtures/user.fixture.ts +0 -175
  52. package/tests/fixtures/webhook.fixture.ts +0 -69
  53. package/tsconfig.eslint.json +0 -7
  54. package/tsconfig.json +0 -14
@@ -1,78 +0,0 @@
1
- export const SiteFixture = {
2
- list: {
3
- response: [
4
- {
5
- _id: "580e63e98c9a982ac9b8b741",
6
- createdOn: "2016-10-24T19:41:29.156Z",
7
- name: "api_docs_sample_json",
8
- shortName: "api-docs-sample-json",
9
- lastPublished: "2016-10-24T23:06:51.251Z",
10
- previewUrl:
11
- "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241603.png",
12
- timezone: "America/Los_Angeles",
13
- database: "580e63fc8c9a982ac9b8b744",
14
- },
15
- {
16
- _id: "580ff8c3ba3e45ba9fe588bb",
17
- createdOn: "2016-10-26T00:28:54.191Z",
18
- name: "Copy of api_docs_sample_json",
19
- shortName: "api-docs-sample-json-086c6538f9b0583762",
20
- lastPublished: null,
21
- previewUrl:
22
- "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241603.png",
23
- timezone: "America/Los_Angeles",
24
- database: "580ff8c3ba3e45ba9fe588bf",
25
- },
26
- {
27
- _id: "580ff8d7ba3e45ba9fe588e9",
28
- createdOn: "2016-10-26T00:29:13.634Z",
29
- name: "Copy of api_docs_sample_json",
30
- shortName: "api-docs-sample-json-ce077aa6c5cd3e0177",
31
- lastPublished: null,
32
- previewUrl:
33
- "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241603.png",
34
- timezone: "America/Los_Angeles",
35
- database: "580ff8d7ba3e45ba9fe588ed",
36
- },
37
- ],
38
- },
39
- getOne: {
40
- parameters: {
41
- siteId: "580e63e98c9a982ac9b8b741",
42
- },
43
- response: {
44
- _id: "580e63e98c9a982ac9b8b741",
45
- createdOn: "2016-10-24T19:41:29.156Z",
46
- name: "api_docs_sample_json",
47
- shortName: "api-docs-sample-json",
48
- lastPublished: "2016-10-24T19:43:17.271Z",
49
- previewUrl: "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241243.png",
50
- timezone: "America/Los_Angeles",
51
- database: "580e63fc8c9a982ac9b8b744",
52
- },
53
- },
54
- domains: {
55
- parameters: {
56
- siteId: "580e63e98c9a982ac9b8b741",
57
- },
58
- response: [
59
- {
60
- _id: "589a331aa51e760df7ccb89d",
61
- name: "test-api-domain.com",
62
- },
63
- {
64
- _id: "589a331aa51e760df7ccb89e",
65
- name: "www.test-api-domain.com",
66
- },
67
- ],
68
- },
69
- publish: {
70
- parameters: {
71
- siteId: "580e63e98c9a982ac9b8b741",
72
- domains: ["test-api-domain.com"],
73
- },
74
- response: {
75
- queued: true,
76
- },
77
- },
78
- };
@@ -1,175 +0,0 @@
1
- export const UserFixture = {
2
- getOne: {
3
- parameters: {
4
- userId: "6287ec36a841b25637c663df",
5
- siteId: "580e63e98c9a982ac9b8b741",
6
- },
7
- response: {
8
- _id: "6287ec36a841b25637c663df",
9
- createdOn: "2022-05-20T13:46:12.093Z",
10
- updatedOn: "2022-05-20T13:46:12.093Z",
11
- emailVerified: true,
12
- status: "verified",
13
- data: {
14
- "accept-privacy": false,
15
- "accept-communications": false,
16
- email: "Some.One@home.com",
17
- name: "Some One",
18
- },
19
- },
20
- },
21
- list: {
22
- parameters: {
23
- siteId: "580e63e98c9a982ac9b8b741",
24
- },
25
- response: {
26
- users: [
27
- {
28
- _id: "6287ec36a841b25637c663df",
29
- createdOn: "2022-05-20T13:46:12.093Z",
30
- updatedOn: "2022-05-20T13:46:12.093Z",
31
- emailVerified: false,
32
- status: "unverified",
33
- data: {
34
- "accept-privacy": false,
35
- "accept-communications": false,
36
- email: "Person.One@home.com",
37
- name: "Person One",
38
- },
39
- },
40
- {
41
- _id: "6287ec36a841b25637c663f0",
42
- createdOn: "2022-05-19T05:32:04.581Z",
43
- updatedOn: "2022-05-19T05:32:04.581Z",
44
- emailVerified: false,
45
- status: "unverified",
46
- data: {
47
- "accept-privacy": false,
48
- "accept-communications": false,
49
- email: "Person.Two@home.com",
50
- name: "Person Two",
51
- },
52
- },
53
- {
54
- _id: "6287ec36a841b25637c663d9",
55
- createdOn: "2022-05-17T03:34:06.720Z",
56
- updatedOn: "2022-05-17T03:34:06.720Z",
57
- emailVerified: true,
58
- status: "verified",
59
- data: {
60
- "accept-privacy": false,
61
- "accept-communications": false,
62
- email: "Person.Three@home.com",
63
- name: "Person Three",
64
- },
65
- },
66
- {
67
- _id: "6287ec37a841b25637c6641b",
68
- createdOn: "2022-05-15T03:46:09.748Z",
69
- updatedOn: "2022-05-15T03:46:09.748Z",
70
- emailVerified: false,
71
- status: "unverified",
72
- data: {
73
- "accept-privacy": false,
74
- "accept-communications": false,
75
- email: "Person.Four@home.com",
76
- name: "Person Four",
77
- },
78
- },
79
- {
80
- _id: "6287ec37a841b25637c66449",
81
- createdOn: "2022-05-15T02:55:38.786Z",
82
- updatedOn: "2022-05-15T02:55:38.786Z",
83
- emailVerified: true,
84
- status: "verified",
85
- data: {
86
- "accept-privacy": false,
87
- "accept-communications": false,
88
- email: "Person.Five@home.com",
89
- name: "Person Five",
90
- },
91
- },
92
- ],
93
- count: 5,
94
- limit: 5,
95
- offset: 0,
96
- total: 201,
97
- },
98
- },
99
- invite: {
100
- parameters: {
101
- siteId: "580e63e98c9a982ac9b8b741",
102
- email: "some.one@home.com",
103
- },
104
- response: {
105
- _id: "6287ec36a841b25637c663df",
106
- createdOn: "2022-05-20T13:46:12.093Z",
107
- updatedOn: "2022-05-20T13:46:12.093Z",
108
- emailVerified: true,
109
- status: "verified",
110
- data: {
111
- "accept-privacy": false,
112
- "accept-communications": false,
113
- email: "some.one@home.com",
114
- name: "Some One",
115
- },
116
- },
117
- },
118
- update: {
119
- parameters: {
120
- userId: "6287ec36a841b25637c663df",
121
- siteId: "580e63e98c9a982ac9b8b741",
122
- data: {
123
- status: "verified",
124
- data: {
125
- "accept-privacy": false,
126
- "accept-communications": false,
127
- email: "Some.One@home.com",
128
- name: "Some One",
129
- },
130
- },
131
- },
132
- response: {
133
- _id: "6287ec36a841b25637c663df",
134
- createdOn: "2022-05-20T13:46:12.093Z",
135
- updatedOn: "2022-05-20T13:46:12.093Z",
136
- emailVerified: true,
137
- status: "verified",
138
- data: {
139
- "accept-privacy": false,
140
- "accept-communications": false,
141
- email: "Some.One@home.com",
142
- name: "Some One",
143
- },
144
- },
145
- },
146
- delete: {
147
- parameters: {
148
- userId: "6287ec36a841b25637c663df",
149
- siteId: "580e63e98c9a982ac9b8b741",
150
- },
151
- response: {
152
- deleted: 1,
153
- },
154
- },
155
- accessGroups: {
156
- parameters: {
157
- siteId: "580e63e98c9a982ac9b8b741",
158
- },
159
- response: {
160
- accessGroups: [
161
- {
162
- _id: "62be58d404be8a6cc900c081",
163
- name: "Webflowers",
164
- shortId: "jo",
165
- slug: "webflowers",
166
- createdOn: "2022-08-01T19:41:48.349Z",
167
- },
168
- ],
169
- count: 1,
170
- limit: 10,
171
- offset: 0,
172
- total: 1,
173
- },
174
- },
175
- };
@@ -1,69 +0,0 @@
1
- export const WebhookFixture = {
2
- getOne: {
3
- parameters: {
4
- siteId: "580e63e98c9a982ac9b8b741",
5
- webhookId: "582266e0cd48de0f0e3c6d8b",
6
- },
7
- response: {
8
- _id: "582266e0cd48de0f0e3c6d8b",
9
- triggerType: "form_submission",
10
- triggerId: "580e63e98c9a982ac9b8b741",
11
- site: "580e63e98c9a982ac9b8b741",
12
- createdOn: "2016-11-08T23:59:28.572Z",
13
- },
14
- },
15
- list: {
16
- parameters: {
17
- siteId: "580e63e98c9a982ac9b8b741",
18
- },
19
- response: [
20
- {
21
- _id: "57ca0a9e418c504a6e1acbb6",
22
- triggerType: "form_submission",
23
- triggerId: "580e63e98c9a982ac9b8b741",
24
- site: "580e63e98c9a982ac9b8b741",
25
- lastUsed: "2016-09-06T21:12:22.148Z",
26
- createdOn: "2016-09-02T23:26:22.241Z",
27
- },
28
- {
29
- _id: "578d85cce0c47cd2865f4cf2",
30
- triggerType: "form_submission",
31
- triggerId: "580e63e98c9a982ac9b8b741",
32
- site: "580e63e98c9a982ac9b8b741",
33
- lastUsed: "2016-09-06T21:12:22.142Z",
34
- createdOn: "2016-07-19T01:43:40.585Z",
35
- },
36
- {
37
- _id: "578d85cce0c47cd2865f4cf3",
38
- triggerType: "form_submission",
39
- triggerId: "580e63e98c9a982ac9b8b741",
40
- site: "580e63e98c9a982ac9b8b741",
41
- lastUsed: "2016-09-06T21:12:22.192Z",
42
- createdOn: "2016-07-19T01:43:40.605Z",
43
- },
44
- ],
45
- },
46
- create: {
47
- parameters: {
48
- siteId: "580e63e98c9a982ac9b8b741",
49
- triggerType: "form_submission",
50
- url: "https://example.com",
51
- },
52
- response: {
53
- _id: "582266e0cd48de0f0e3c6d8b",
54
- triggerType: "form_submission",
55
- triggerId: "580e63e98c9a982ac9b8b741",
56
- site: "580e63e98c9a982ac9b8b741",
57
- createdOn: "2016-11-08T23:59:28.572Z",
58
- },
59
- },
60
- delete: {
61
- parameters: {
62
- siteId: "580e63e98c9a982ac9b8b741",
63
- webhookId: "582266e0cd48de0f0e3c6d8b",
64
- },
65
- response: {
66
- deleted: 1,
67
- },
68
- },
69
- };
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "types": ["jest"]
5
- },
6
- "include": ["src", "tests"]
7
- }
package/tsconfig.json DELETED
@@ -1,14 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "lib": ["es6", "dom"],
4
- "module": "CommonJS",
5
- "target": "es2020",
6
- "outDir": "dist",
7
- "moduleResolution": "Node",
8
- "esModuleInterop": true,
9
- "declaration": true,
10
- "baseUrl": "src",
11
- "experimentalDecorators": true
12
- },
13
- "include": ["src"]
14
- }