@acmekit/js-sdk 2.13.31 → 2.13.32

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 (121) hide show
  1. package/package.json +2 -2
  2. package/dist/admin/api-key.d.ts +0 -164
  3. package/dist/admin/api-key.d.ts.map +0 -1
  4. package/dist/admin/api-key.js +0 -202
  5. package/dist/admin/api-key.js.map +0 -1
  6. package/dist/admin/index.d.ts +0 -57
  7. package/dist/admin/index.d.ts.map +0 -1
  8. package/dist/admin/index.js +0 -29
  9. package/dist/admin/index.js.map +0 -1
  10. package/dist/admin/invite.d.ts +0 -182
  11. package/dist/admin/invite.d.ts.map +0 -1
  12. package/dist/admin/invite.js +0 -211
  13. package/dist/admin/invite.js.map +0 -1
  14. package/dist/admin/locale.d.ts +0 -95
  15. package/dist/admin/locale.d.ts.map +0 -1
  16. package/dist/admin/locale.js +0 -104
  17. package/dist/admin/locale.js.map +0 -1
  18. package/dist/admin/notification.d.ts +0 -96
  19. package/dist/admin/notification.d.ts.map +0 -1
  20. package/dist/admin/notification.js +0 -107
  21. package/dist/admin/notification.js.map +0 -1
  22. package/dist/admin/plugin.d.ts +0 -27
  23. package/dist/admin/plugin.d.ts.map +0 -1
  24. package/dist/admin/plugin.js +0 -31
  25. package/dist/admin/plugin.js.map +0 -1
  26. package/dist/admin/translation.d.ts +0 -253
  27. package/dist/admin/translation.d.ts.map +0 -1
  28. package/dist/admin/translation.js +0 -284
  29. package/dist/admin/translation.js.map +0 -1
  30. package/dist/admin/upload.d.ts +0 -97
  31. package/dist/admin/upload.d.ts.map +0 -1
  32. package/dist/admin/upload.js +0 -139
  33. package/dist/admin/upload.js.map +0 -1
  34. package/dist/admin/user.d.ts +0 -166
  35. package/dist/admin/user.d.ts.map +0 -1
  36. package/dist/admin/user.js +0 -192
  37. package/dist/admin/user.js.map +0 -1
  38. package/dist/admin/views.d.ts +0 -54
  39. package/dist/admin/views.d.ts.map +0 -1
  40. package/dist/admin/views.js +0 -96
  41. package/dist/admin/views.js.map +0 -1
  42. package/dist/admin/workflow-execution.d.ts +0 -78
  43. package/dist/admin/workflow-execution.d.ts.map +0 -1
  44. package/dist/admin/workflow-execution.js +0 -86
  45. package/dist/admin/workflow-execution.js.map +0 -1
  46. package/dist/auth/index.d.ts +0 -264
  47. package/dist/auth/index.d.ts.map +0 -1
  48. package/dist/auth/index.js +0 -318
  49. package/dist/auth/index.js.map +0 -1
  50. package/dist/client.d.ts +0 -65
  51. package/dist/client.d.ts.map +0 -1
  52. package/dist/client.js +0 -315
  53. package/dist/client.js.map +0 -1
  54. package/dist/esm/admin/api-key.d.ts +0 -164
  55. package/dist/esm/admin/api-key.d.ts.map +0 -1
  56. package/dist/esm/admin/api-key.js +0 -221
  57. package/dist/esm/admin/api-key.js.map +0 -1
  58. package/dist/esm/admin/index.d.ts +0 -57
  59. package/dist/esm/admin/index.d.ts.map +0 -1
  60. package/dist/esm/admin/index.js +0 -25
  61. package/dist/esm/admin/index.js.map +0 -1
  62. package/dist/esm/admin/invite.d.ts +0 -182
  63. package/dist/esm/admin/invite.d.ts.map +0 -1
  64. package/dist/esm/admin/invite.js +0 -239
  65. package/dist/esm/admin/invite.js.map +0 -1
  66. package/dist/esm/admin/locale.d.ts +0 -95
  67. package/dist/esm/admin/locale.d.ts.map +0 -1
  68. package/dist/esm/admin/locale.js +0 -113
  69. package/dist/esm/admin/locale.js.map +0 -1
  70. package/dist/esm/admin/notification.d.ts +0 -96
  71. package/dist/esm/admin/notification.d.ts.map +0 -1
  72. package/dist/esm/admin/notification.js +0 -116
  73. package/dist/esm/admin/notification.js.map +0 -1
  74. package/dist/esm/admin/plugin.d.ts +0 -27
  75. package/dist/esm/admin/plugin.d.ts.map +0 -1
  76. package/dist/esm/admin/plugin.js +0 -38
  77. package/dist/esm/admin/plugin.js.map +0 -1
  78. package/dist/esm/admin/translation.d.ts +0 -253
  79. package/dist/esm/admin/translation.d.ts.map +0 -1
  80. package/dist/esm/admin/translation.js +0 -301
  81. package/dist/esm/admin/translation.js.map +0 -1
  82. package/dist/esm/admin/upload.d.ts +0 -97
  83. package/dist/esm/admin/upload.d.ts.map +0 -1
  84. package/dist/esm/admin/upload.js +0 -150
  85. package/dist/esm/admin/upload.js.map +0 -1
  86. package/dist/esm/admin/user.d.ts +0 -166
  87. package/dist/esm/admin/user.d.ts.map +0 -1
  88. package/dist/esm/admin/user.js +0 -207
  89. package/dist/esm/admin/user.js.map +0 -1
  90. package/dist/esm/admin/views.d.ts +0 -54
  91. package/dist/esm/admin/views.d.ts.map +0 -1
  92. package/dist/esm/admin/views.js +0 -117
  93. package/dist/esm/admin/views.js.map +0 -1
  94. package/dist/esm/admin/workflow-execution.d.ts +0 -78
  95. package/dist/esm/admin/workflow-execution.d.ts.map +0 -1
  96. package/dist/esm/admin/workflow-execution.js +0 -95
  97. package/dist/esm/admin/workflow-execution.js.map +0 -1
  98. package/dist/esm/auth/index.d.ts +0 -264
  99. package/dist/esm/auth/index.d.ts.map +0 -1
  100. package/dist/esm/auth/index.js +0 -325
  101. package/dist/esm/auth/index.js.map +0 -1
  102. package/dist/esm/client.d.ts +0 -65
  103. package/dist/esm/client.d.ts.map +0 -1
  104. package/dist/esm/client.js +0 -317
  105. package/dist/esm/client.js.map +0 -1
  106. package/dist/esm/index.d.ts +0 -18
  107. package/dist/esm/index.d.ts.map +0 -1
  108. package/dist/esm/index.js +0 -21
  109. package/dist/esm/index.js.map +0 -1
  110. package/dist/esm/types.d.ts +0 -60
  111. package/dist/esm/types.d.ts.map +0 -1
  112. package/dist/esm/types.js +0 -2
  113. package/dist/esm/types.js.map +0 -1
  114. package/dist/index.d.ts +0 -18
  115. package/dist/index.d.ts.map +0 -1
  116. package/dist/index.js +0 -28
  117. package/dist/index.js.map +0 -1
  118. package/dist/types.d.ts +0 -60
  119. package/dist/types.d.ts.map +0 -1
  120. package/dist/types.js +0 -3
  121. package/dist/types.js.map +0 -1
@@ -1,221 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- export class ApiKey {
11
- /**
12
- * @ignore
13
- */
14
- constructor(client) {
15
- this.client = client;
16
- }
17
- /**
18
- * This methods retrieves a paginated list of API keys. It sends a request to the
19
- * [List API Keys](https://docs.acmekit.com/api/admin#api-keys_getapikeys) API route.
20
- *
21
- * @param queryParams - Filters and pagination configurations.
22
- * @param headers - Headers to pass in the request.
23
- * @returns The paginated list of API keys.
24
- *
25
- * @example
26
- * To retrieve the list of API keys:
27
- *
28
- * ```ts
29
- * sdk.admin.apiKey.list()
30
- * .then(({ api_keys, count, limit, offset }) => {
31
- * console.log(api_keys)
32
- * })
33
- * ```
34
- *
35
- * To configure the pagination, pass the `limit` and `offset` query parameters.
36
- *
37
- * For example, to retrieve only 10 items and skip 10 items:
38
- *
39
- * ```ts
40
- * sdk.admin.apiKey.list({
41
- * limit: 10,
42
- * offset: 10
43
- * })
44
- * .then(({ api_keys, count, limit, offset }) => {
45
- * console.log(api_keys)
46
- * })
47
- * ```
48
- *
49
- * Using the `fields` query parameter, you can specify the fields and relations to retrieve
50
- * in each API key:
51
- *
52
- * ```ts
53
- * sdk.admin.apiKey.list({
54
- * fields: "id,*sales_channels"
55
- * })
56
- * .then(({ api_keys, count, limit, offset }) => {
57
- * console.log(api_keys)
58
- * })
59
- * ```
60
- *
61
- * Learn more about the `fields` property in the [API reference](https://docs.acmekit.com/api/store#select-fields-and-relations).
62
- */
63
- list(queryParams, headers) {
64
- return __awaiter(this, void 0, void 0, function* () {
65
- return yield this.client.fetch(`/admin/api-keys`, {
66
- query: queryParams,
67
- headers,
68
- });
69
- });
70
- }
71
- /**
72
- * This method creates an API key. It sends a request to the [Create API Key](https://docs.acmekit.com/api/admin#api-keys_postapikeys)
73
- * API route.
74
- *
75
- * @param body - The API key's details.
76
- * @param query - Configure the fields to retrieve in the created API key.
77
- * @param headers - Headers to pass in the request
78
- * @returns The created API key
79
- *
80
- * @example
81
- * sdk.admin.apiKey.create({
82
- * title: "Development",
83
- * type: "publishable"
84
- * })
85
- * .then(({ api_key }) => {
86
- * console.log(api_key)
87
- * })
88
- */
89
- create(body, query, headers) {
90
- return __awaiter(this, void 0, void 0, function* () {
91
- return yield this.client.fetch(`/admin/api-keys`, {
92
- method: "POST",
93
- headers,
94
- body,
95
- query,
96
- });
97
- });
98
- }
99
- /**
100
- * This method revokes an API key. It sends a request to the
101
- * [Revoke API Key](https://docs.acmekit.com/api/admin#api-keys_postapikeysidrevoke) API route.
102
- *
103
- * @param id - The API key's ID.
104
- * @param headers - Headers to pass in the request.
105
- * @returns The API key's details.
106
- *
107
- * @example
108
- * sdk.admin.apiKey.revoke("apk_123")
109
- * .then(({ api_key }) => {
110
- * console.log(api_key)
111
- * })
112
- */
113
- revoke(id, headers) {
114
- return __awaiter(this, void 0, void 0, function* () {
115
- return yield this.client.fetch(`/admin/api-keys/${id}/revoke`, {
116
- method: "POST",
117
- headers,
118
- });
119
- });
120
- }
121
- /**
122
- * This method retrieves an API key's details. It sends a request to the
123
- * [Get API key](https://docs.acmekit.com/api/admin#api-keys_getapikeysid) API route.
124
- *
125
- * @param id - The API key's ID.
126
- * @param headers - Headers to pass in the request.
127
- * @returns The API key's details.
128
- *
129
- * @example
130
- * sdk.admin.apiKey.retrieve("apk_123")
131
- * .then(({ api_key }) => {
132
- * console.log(api_key)
133
- * })
134
- */
135
- retrieve(id, headers) {
136
- return __awaiter(this, void 0, void 0, function* () {
137
- return yield this.client.fetch(`/admin/api-keys/${id}`, {
138
- headers,
139
- });
140
- });
141
- }
142
- /**
143
- * This method updates an API key's details. It sends a request to the
144
- * [Update API Key](https://docs.acmekit.com/api/admin#api-keys_postapikeysid) API route.
145
- *
146
- * @param id - The API key's ID.
147
- * @param body - The data to update in the API key.
148
- * @param query - Configure the fields to retrieve in the API key.
149
- * @param headers - Headers to pass in the request.
150
- * @returns The API key's details.
151
- *
152
- * @example
153
- * sdk.admin.apiKey.update("apk_123", {
154
- * title: "Development"
155
- * })
156
- * .then(({ api_key }) => {
157
- * console.log(api_key)
158
- * })
159
- */
160
- update(id, body, query, headers) {
161
- return __awaiter(this, void 0, void 0, function* () {
162
- return yield this.client.fetch(`/admin/api-keys/${id}`, {
163
- method: "POST",
164
- headers,
165
- body,
166
- query,
167
- });
168
- });
169
- }
170
- /**
171
- * This method deletes an API key by its ID. It sends a request to the
172
- * [Delete API Key](https://docs.acmekit.com/api/admin#api-keys_deleteapikeysid) API route.
173
- *
174
- * @param id - The API key's ID.
175
- * @param headers - Headers to pass in the request.
176
- * @returns The deletion's details.
177
- *
178
- * @example
179
- * sdk.admin.apiKey.delete("apk_123")
180
- * .then(({ deleted }) => {
181
- * console.log(deleted)
182
- * })
183
- */
184
- delete(id, headers) {
185
- return __awaiter(this, void 0, void 0, function* () {
186
- return yield this.client.fetch(`/admin/api-keys/${id}`, {
187
- method: "DELETE",
188
- headers,
189
- });
190
- });
191
- }
192
- /**
193
- * This method manages the sales channels associated with a publishable API key to either add
194
- * or remove associations. It sends a request to the [Manage Sales Channels](https://docs.acmekit.com/api/admin#api-keys_postapikeysidsaleschannels)
195
- * API route.
196
- *
197
- * @param id - The API key's ID.
198
- * @param body - The sales channels to add or remove from the API key.
199
- * @param headers - Headers to pass in the request.
200
- * @returns The API key's details.
201
- *
202
- * @example
203
- * sdk.admin.apiKey.batchSalesChannels("apk_123", {
204
- * add: ["sc_123"],
205
- * remove: ["sc_321"]
206
- * })
207
- * .then(({ api_key }) => {
208
- * console.log(api_key)
209
- * })
210
- */
211
- batchSalesChannels(id, body, headers) {
212
- return __awaiter(this, void 0, void 0, function* () {
213
- return yield this.client.fetch(`/admin/api-keys/${id}/sales-channels`, {
214
- method: "POST",
215
- headers,
216
- body,
217
- });
218
- });
219
- }
220
- }
221
- //# sourceMappingURL=api-key.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-key.js","sourceRoot":"","sources":["../../../src/admin/api-key.ts"],"names":[],"mappings":";;;;;;;;;AAIA,MAAM,OAAO,MAAM;IAKjB;;OAEG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6CG;IACG,IAAI,CACR,WAA6C,EAC7C,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAE5B,iBAAiB,EAAE;gBACnB,KAAK,EAAE,WAAW;gBAClB,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;OAiBG;IACG,MAAM,CACV,IAAiC,EACjC,KAAuC,EACvC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,iBAAiB,EACjB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;OAaG;IACG,MAAM,CAAC,EAAU,EAAE,OAAuB;;YAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,mBAAmB,EAAE,SAAS,EAC9B;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;OAaG;IACG,QAAQ,CAAC,EAAU,EAAE,OAAuB;;YAChD,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,mBAAmB,EAAE,EAAE,EACvB;gBACE,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;OAiBG;IACG,MAAM,CACV,EAAU,EACV,IAAiC,EACjC,KAAuC,EACvC,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,mBAAmB,EAAE,EAAE,EACvB;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;gBACJ,KAAK;aACN,CACF,CAAA;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;OAaG;IACG,MAAM,CAAC,EAAU,EAAE,OAAuB;;YAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,mBAAmB,EAAE,EAAE,EACvB;gBACE,MAAM,EAAE,QAAQ;gBAChB,OAAO;aACR,CACF,CAAA;QACH,CAAC;KAAA;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACG,kBAAkB,CACtB,EAAU,EACV,IAA8B,EAC9B,OAAuB;;YAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,mBAAmB,EAAE,iBAAiB,EACtC;gBACE,MAAM,EAAE,MAAM;gBACd,OAAO;gBACP,IAAI;aACL,CACF,CAAA;QACH,CAAC;KAAA;CACF"}
@@ -1,57 +0,0 @@
1
- import { Client } from "../client";
2
- import { ApiKey } from "./api-key";
3
- import { Invite } from "./invite";
4
- import { Locale } from "./locale";
5
- import { Notification } from "./notification";
6
- import { Plugin } from "./plugin";
7
- import { Translation } from "./translation";
8
- import { Upload } from "./upload";
9
- import { User } from "./user";
10
- import { Views } from "./views";
11
- import { WorkflowExecution } from "./workflow-execution";
12
- export declare class Admin {
13
- /**
14
- * @tags user
15
- */
16
- invite: Invite;
17
- /**
18
- * @tags file
19
- */
20
- upload: Upload;
21
- /**
22
- * @tags notification
23
- */
24
- notification: Notification;
25
- /**
26
- * @tags user
27
- */
28
- user: User;
29
- /**
30
- * @tags locale
31
- * @since 2.12.3
32
- */
33
- locale: Locale;
34
- /**
35
- * @tags api key
36
- */
37
- apiKey: ApiKey;
38
- /**
39
- * @tags workflow
40
- */
41
- workflowExecution: WorkflowExecution;
42
- /**
43
- * @tags translations
44
- */
45
- translation: Translation;
46
- /**
47
- * @tags plugin
48
- */
49
- plugin: Plugin;
50
- /**
51
- * @tags views
52
- * @featureFlag view_configurations
53
- */
54
- views: Views;
55
- constructor(client: Client);
56
- }
57
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/admin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAExD,qBAAa,KAAK;IAChB;;OAEG;IACI,MAAM,EAAE,MAAM,CAAA;IACrB;;OAEG;IACI,MAAM,EAAE,MAAM,CAAA;IACrB;;OAEG;IACI,YAAY,EAAE,YAAY,CAAA;IACjC;;OAEG;IACI,IAAI,EAAE,IAAI,CAAA;IACjB;;;OAGG;IACI,MAAM,EAAE,MAAM,CAAA;IACrB;;OAEG;IACI,MAAM,EAAE,MAAM,CAAA;IACrB;;OAEG;IACI,iBAAiB,EAAE,iBAAiB,CAAA;IAC3C;;OAEG;IACI,WAAW,EAAE,WAAW,CAAA;IAC/B;;OAEG;IACI,MAAM,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACI,KAAK,EAAE,KAAK,CAAA;gBAEP,MAAM,EAAE,MAAM;CAY3B"}
@@ -1,25 +0,0 @@
1
- import { ApiKey } from "./api-key";
2
- import { Invite } from "./invite";
3
- import { Locale } from "./locale";
4
- import { Notification } from "./notification";
5
- import { Plugin } from "./plugin";
6
- import { Translation } from "./translation";
7
- import { Upload } from "./upload";
8
- import { User } from "./user";
9
- import { Views } from "./views";
10
- import { WorkflowExecution } from "./workflow-execution";
11
- export class Admin {
12
- constructor(client) {
13
- this.invite = new Invite(client);
14
- this.upload = new Upload(client);
15
- this.notification = new Notification(client);
16
- this.user = new User(client);
17
- this.locale = new Locale(client);
18
- this.apiKey = new ApiKey(client);
19
- this.workflowExecution = new WorkflowExecution(client);
20
- this.translation = new Translation(client);
21
- this.plugin = new Plugin(client);
22
- this.views = new Views(client);
23
- }
24
- }
25
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/admin/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,OAAO,KAAK;IA4ChB,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA;QAChC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA;QAChC,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAA;QAC5C,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAAA;QAC5B,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA;QAChC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA;QAChC,IAAI,CAAC,iBAAiB,GAAG,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAA;QACtD,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAA;QAC1C,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,MAAM,CAAC,CAAA;QAChC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAA;IAChC,CAAC;CACF"}
@@ -1,182 +0,0 @@
1
- import { FindParams, HttpTypes, SelectParams } from "@acmekit/types";
2
- import { Client } from "../client";
3
- import { ClientHeaders } from "../types";
4
- export declare class Invite {
5
- /**
6
- * @ignore
7
- */
8
- private client;
9
- /**
10
- * @ignore
11
- */
12
- constructor(client: Client);
13
- /**
14
- * This method accepts an invite. It requires sending a previous request to
15
- * the {@link Auth.register}.
16
- *
17
- * This method sends a request to the [Accept Invite]
18
- * (https://docs.acmekit.com/api/admin#invites_postinvitesaccept)
19
- * API route.
20
- *
21
- * @param input - The details of the user to create.
22
- * @param query - Configure the fields to retrieve in the user.
23
- * @param headers - Headers to pass in the request
24
- * @returns The user's details.
25
- *
26
- * @example
27
- * await sdk.auth.register("user", "emailpass", {
28
- * email: "user@gmail.com",
29
- * password: "supersecret"
30
- * })
31
- *
32
- * // all subsequent requests will use the token in the header
33
- * const { user } = await sdk.admin.invite.accept(
34
- * {
35
- * email: "user@gmail.com",
36
- * first_name: "John",
37
- * last_name: "Smith",
38
- * invite_token: "12345..."
39
- * },
40
- * )
41
- */
42
- accept(input: HttpTypes.AdminAcceptInvite & {
43
- /**
44
- * The invite's token.
45
- */
46
- invite_token: string;
47
- }, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminAcceptInviteResponse>;
48
- /**
49
- * This method creates an invite. It sends a request to the
50
- * [Create Invite](https://docs.acmekit.com/api/admin#invites_postinvites)
51
- * API route.
52
- *
53
- * @param body - The invite's details.
54
- * @param query - Configure the fields to retrieve in the invite.
55
- * @param headers - Headers to pass in the request
56
- * @returns The invite's details.
57
- *
58
- * @example
59
- * sdk.admin.invite.create({
60
- * email: "user@gmail.com",
61
- * })
62
- * .then(({ invite }) => {
63
- * console.log(invite)
64
- * })
65
- */
66
- create(body: HttpTypes.AdminCreateInvite, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminInviteResponse>;
67
- /**
68
- * This method retrieves an invite by its ID. It sends a request to the
69
- * [Get Invite](https://docs.acmekit.com/api/admin#invites_getinvitesid)
70
- * API route.
71
- *
72
- * @param id - The invite's ID.
73
- * @param query - Configure the fields to retrieve in the invite.
74
- * @param headers - Headers to pass in the request
75
- * @returns The invite's details.
76
- *
77
- * @example
78
- * To retrieve an invite its ID:
79
- *
80
- * ```ts
81
- * sdk.admin.invite.retrieve("invite_123")
82
- * .then(({ invite }) => {
83
- * console.log(invite)
84
- * })
85
- * ```
86
- *
87
- * To specify the fields and relations to retrieve:
88
- *
89
- * ```ts
90
- * sdk.admin.invite.retrieve("invite_123", {
91
- * fields: "id,email"
92
- * })
93
- * .then(({ invite }) => {
94
- * console.log(invite)
95
- * })
96
- * ```
97
- *
98
- * Learn more about the `fields` property in the [API reference](https://docs.acmekit.com/api/store#select-fields-and-relations).
99
- */
100
- retrieve(id: string, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminInviteResponse>;
101
- /**
102
- * This method retrieves a paginated list of invites. It sends a request to the
103
- * [List Invites](https://docs.acmekit.com/api/admin#invites_getinvites)
104
- * API route.
105
- *
106
- * @param queryParams - Filters and pagination configurations.
107
- * @param headers - Headers to pass in the request.
108
- * @returns The paginated list of invites.
109
- *
110
- * @example
111
- * To retrieve the list of invites:
112
- *
113
- * ```ts
114
- * sdk.admin.invite.list()
115
- * .then(({ invites, count, limit, offset }) => {
116
- * console.log(invites)
117
- * })
118
- * ```
119
- *
120
- * To configure the pagination, pass the `limit` and `offset` query parameters.
121
- *
122
- * For example, to retrieve only 10 items and skip 10 items:
123
- *
124
- * ```ts
125
- * sdk.admin.invite.list({
126
- * limit: 10,
127
- * offset: 10
128
- * })
129
- * .then(({ invites, count, limit, offset }) => {
130
- * console.log(invites)
131
- * })
132
- * ```
133
- *
134
- * Using the `fields` query parameter, you can specify the fields and relations to retrieve
135
- * in each invite:
136
- *
137
- * ```ts
138
- * sdk.admin.invite.list({
139
- * fields: "id,email"
140
- * })
141
- * .then(({ invites, count, limit, offset }) => {
142
- * console.log(invites)
143
- * })
144
- * ```
145
- *
146
- * Learn more about the `fields` property in the [API reference](https://docs.acmekit.com/api/store#select-fields-and-relations).
147
- */
148
- list(queryParams?: FindParams, headers?: ClientHeaders): Promise<HttpTypes.AdminInviteListResponse>;
149
- /**
150
- * This method refreshes the token of an invite. It sends a request to the
151
- * [Refresh Invite Token](https://docs.acmekit.com/api/admin#invites_postinvitesidresend)
152
- * API route.
153
- *
154
- * @param id - The invite's ID.
155
- * @param headers - Headers to pass in the request.
156
- * @returns The invite's details.
157
- *
158
- * @example
159
- * sdk.admin.invite.resend("invite_123")
160
- * .then(({ invite }) => {
161
- * console.log(invite)
162
- * })
163
- */
164
- resend(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminInviteResponse>;
165
- /**
166
- * This method deletes an invite. It sends a request to the
167
- * [Delete Invite](https://docs.acmekit.com/api/admin#invites_deleteinvitesid)
168
- * API route.
169
- *
170
- * @param id - The invite's ID.
171
- * @param headers - Headers to pass in the request.
172
- * @returns The deletion's details.
173
- *
174
- * @example
175
- * sdk.admin.invite.delete("invite_123")
176
- * .then(({ deleted }) => {
177
- * console.log(deleted)
178
- * })
179
- */
180
- delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminInviteDeleteResponse>;
181
- }
182
- //# sourceMappingURL=invite.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"invite.d.ts","sourceRoot":"","sources":["../../../src/admin/invite.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACb,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,MAAM;IACjB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAQ;IACtB;;OAEG;gBACS,MAAM,EAAE,MAAM;IAI1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACG,MAAM,CACV,KAAK,EAAE,SAAS,CAAC,iBAAiB,GAAG;QACnC;;WAEG;QACH,YAAY,EAAE,MAAM,CAAA;KACrB,EACD,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;IAczB;;;;;;;;;;;;;;;;;OAiBG;IACG,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,iBAAiB,EACjC,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;IAazB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACG,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,aAAa;IAUxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACG,IAAI,CAAC,WAAW,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,aAAa;IAS5D;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAUhD;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;CASjD"}