cliodot 1.2.3 → 1.2.4
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/LICENSE +201 -0
- package/README.md +2 -0
- package/dist/AuthAppClient.d.ts +1 -0
- package/dist/AuthAppClient.d.ts.map +1 -1
- package/dist/AuthAppClient.js +199 -1
- package/dist/CommercialAppClient.d.ts +50 -9
- package/dist/CommercialAppClient.d.ts.map +1 -1
- package/dist/CommercialAppClient.js +576 -1
- package/dist/ConnectorBuilder.js +104 -1
- package/dist/Events.d.ts +2 -0
- package/dist/Events.d.ts.map +1 -1
- package/dist/Events.js +325 -1
- package/dist/Flosync.js +296 -1
- package/dist/FlosyncClient.js +429 -1
- package/dist/FunctionBuilder.js +65 -1
- package/dist/IdentityAppClient.d.ts +1 -0
- package/dist/IdentityAppClient.d.ts.map +1 -1
- package/dist/IdentityAppClient.js +197 -1
- package/dist/MemoryAppClient.d.ts +1 -0
- package/dist/MemoryAppClient.d.ts.map +1 -1
- package/dist/MemoryAppClient.js +149 -1
- package/dist/MemoryClient.js +20 -1
- package/dist/OAuthAppClient.d.ts +1 -0
- package/dist/OAuthAppClient.d.ts.map +1 -1
- package/dist/OAuthAppClient.js +269 -1
- package/dist/ProviderServicesClient.d.ts +24 -0
- package/dist/ProviderServicesClient.d.ts.map +1 -0
- package/dist/ProviderServicesClient.js +158 -0
- package/dist/Surface.d.ts +2 -0
- package/dist/Surface.d.ts.map +1 -1
- package/dist/Surface.js +255 -1
- package/dist/ValidatorBuilder.js +24 -1
- package/dist/Webhooks.js +61 -1
- package/dist/WorkflowBuilder.js +279 -1
- package/dist/__tests__/CommercialAppClient.test.d.ts +2 -0
- package/dist/__tests__/CommercialAppClient.test.d.ts.map +1 -0
- package/dist/__tests__/CommercialAppClient.test.js +217 -0
- package/dist/__tests__/Events.test.js +191 -1
- package/dist/__tests__/IdentityAppClient.test.js +232 -1
- package/dist/__tests__/OAuthAppClient.test.js +300 -1
- package/dist/__tests__/ProviderServicesClient.test.d.ts +2 -0
- package/dist/__tests__/ProviderServicesClient.test.d.ts.map +1 -0
- package/dist/__tests__/ProviderServicesClient.test.js +131 -0
- package/dist/__tests__/Surface.test.js +150 -1
- package/dist/__tests__/errors.test.js +54 -1
- package/dist/__tests__/function.test.js +58 -1
- package/dist/__tests__/helpers.d.ts +5 -0
- package/dist/__tests__/helpers.d.ts.map +1 -0
- package/dist/__tests__/helpers.js +10 -0
- package/dist/__tests__/localhost-lookup.test.d.ts +2 -0
- package/dist/__tests__/localhost-lookup.test.d.ts.map +1 -0
- package/dist/__tests__/localhost-lookup.test.js +26 -0
- package/dist/__tests__/parse-api-error.test.js +26 -1
- package/dist/__tests__/runner.test.js +156 -1
- package/dist/connectors/builtin.js +354 -1
- package/dist/connectors/registry.js +300 -1
- package/dist/decorators/build.js +105 -1
- package/dist/decorators/connector.js +56 -1
- package/dist/decorators/index.js +34 -1
- package/dist/decorators/metadata.js +338 -1
- package/dist/decorators/steps.js +220 -1
- package/dist/decorators/workflow.js +52 -1
- package/dist/errors.js +76 -1
- package/dist/http/__tests__/cliodot-request.environment.test.d.ts +2 -0
- package/dist/http/__tests__/cliodot-request.environment.test.d.ts.map +1 -0
- package/dist/http/__tests__/cliodot-request.environment.test.js +37 -0
- package/dist/http/__tests__/cliodot-result.test.d.ts +2 -0
- package/dist/http/__tests__/cliodot-result.test.d.ts.map +1 -0
- package/dist/http/__tests__/cliodot-result.test.js +57 -0
- package/dist/http/__tests__/events-instance-id.test.d.ts +2 -0
- package/dist/http/__tests__/events-instance-id.test.d.ts.map +1 -0
- package/dist/http/__tests__/events-instance-id.test.js +45 -0
- package/dist/http/cliodot-request.d.ts +35 -0
- package/dist/http/cliodot-request.d.ts.map +1 -0
- package/dist/http/cliodot-request.js +105 -0
- package/dist/http/cliodot-result.d.ts +40 -0
- package/dist/http/cliodot-result.d.ts.map +1 -0
- package/dist/http/cliodot-result.js +139 -0
- package/dist/http/create-client.d.ts +3 -0
- package/dist/http/create-client.d.ts.map +1 -0
- package/dist/http/create-client.js +14 -0
- package/dist/http/events-instance-id.d.ts +11 -0
- package/dist/http/events-instance-id.d.ts.map +1 -0
- package/dist/http/events-instance-id.js +86 -0
- package/dist/http/localhost-lookup.d.ts +12 -0
- package/dist/http/localhost-lookup.d.ts.map +1 -0
- package/dist/http/localhost-lookup.js +67 -0
- package/dist/http/parse-api-error.js +56 -1
- package/dist/http/sanitize-execution-headers.js +79 -1
- package/dist/identity-offline-verify.js +174 -1
- package/dist/identity-token-cache.js +51 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +108 -1
- package/dist/runner/ProcessorEngine.js +1311 -1
- package/dist/runner/connector.executor.js +1786 -1
- package/dist/runner/utilities/math.executor.js +153 -1
- package/dist/runner/utilities/random.executor.js +151 -1
- package/dist/runner/utilities/string.executor.js +825 -1
- package/dist/template.js +127 -1
- package/dist/transformers/StepsToNodesTransformer.js +214 -1
- package/dist/transformers/WorkflowTransformer.js +189 -1
- package/dist/types/auth-app.api.d.ts +2 -0
- package/dist/types/auth-app.api.d.ts.map +1 -1
- package/dist/types/auth-app.api.js +2 -1
- package/dist/types/builtin.js +2 -1
- package/dist/types/client.api.js +2 -1
- package/dist/types/commercial-app.api.d.ts +407 -11
- package/dist/types/commercial-app.api.d.ts.map +1 -1
- package/dist/types/commercial-app.api.js +2 -1
- package/dist/types/connector.js +2 -1
- package/dist/types/context.js +2 -1
- package/dist/types/event-app.api.d.ts +8 -0
- package/dist/types/event-app.api.d.ts.map +1 -1
- package/dist/types/event-app.api.js +2 -1
- package/dist/types/function.js +2 -1
- package/dist/types/identity-app.api.d.ts +2 -0
- package/dist/types/identity-app.api.d.ts.map +1 -1
- package/dist/types/identity-app.api.js +2 -1
- package/dist/types/index.js +23 -1
- package/dist/types/memory-app.api.d.ts +2 -0
- package/dist/types/memory-app.api.d.ts.map +1 -1
- package/dist/types/memory-app.api.js +2 -1
- package/dist/types/oauth-app.api.d.ts +2 -0
- package/dist/types/oauth-app.api.d.ts.map +1 -1
- package/dist/types/oauth-app.api.js +105 -1
- package/dist/types/provider-services.api.d.ts +98 -0
- package/dist/types/provider-services.api.d.ts.map +1 -0
- package/dist/types/provider-services.api.js +2 -0
- package/dist/types/validator.js +2 -1
- package/dist/types/webhook-app.api.js +2 -1
- package/dist/types/workflow.js +33 -1
- package/dist/validators/validators.js +478 -1
- package/dist/variable.js +37 -1
- package/package.json +3 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -104,6 +104,7 @@ const identity = new IdentityAppClient({
|
|
|
104
104
|
baseUrl: process.env.CLIODOT_BASE_URL!,
|
|
105
105
|
appId: "identity_payroll",
|
|
106
106
|
apiKey: process.env.IDENTITY_APP_API_KEY!,
|
|
107
|
+
environment: "prod", // optional; omit to follow the project switch
|
|
107
108
|
});
|
|
108
109
|
|
|
109
110
|
await identity.authenticate({ target_app_id: "identity_hrms" });
|
|
@@ -122,6 +123,7 @@ const memory = new MemoryAppClient({
|
|
|
122
123
|
baseUrl: process.env.CLIODOT_BASE_URL!,
|
|
123
124
|
appId: process.env.MEMORY_APP_ID!,
|
|
124
125
|
apiKey: process.env.MEMORY_APP_API_KEY!,
|
|
126
|
+
environment: "prod", // optional; omit to follow the project switch
|
|
125
127
|
});
|
|
126
128
|
|
|
127
129
|
await memory.store({
|
package/dist/AuthAppClient.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare class AuthAppClient implements AuthAppClientApi {
|
|
|
4
4
|
private readonly appId;
|
|
5
5
|
private readonly appApiKey?;
|
|
6
6
|
private readonly appSecret?;
|
|
7
|
+
private readonly environment?;
|
|
7
8
|
private readonly axios;
|
|
8
9
|
readonly debug: boolean;
|
|
9
10
|
readonly users: AuthUsersApi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthAppClient.d.ts","sourceRoot":"","sources":["../src/AuthAppClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuthAppClient.d.ts","sourceRoot":"","sources":["../src/AuthAppClient.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EAInB,UAAU,EAMV,gBAAgB,EAKhB,YAAY,EACb,MAAM,sBAAsB,CAAC;AAwB9B,qBAAa,aAAc,YAAW,gBAAgB;IACpD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;IACtC,SAAgB,KAAK,EAAE,OAAO,CAAC;IAE/B,SAAgB,KAAK,EAAE,YAAY,CAAC;IACpC,SAAgB,GAAG,EAAE,UAAU,CAAC;IAChC,SAAgB,SAAS,EAAE,gBAAgB,CAAC;gBAEhC,MAAM,EAAE,mBAAmB;IA6CvC,OAAO,CAAC,uBAAuB;YA4BjB,qBAAqB;IAsBnC,OAAO,CAAC,iBAAiB;IAwBzB,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,QAAQ;YAKF,OAAO;IA2BrB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,UAAU;IAWlB,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,SAAS;IAWjB,OAAO,CAAC,qBAAqB;IAO7B,OAAO,CAAC,kBAAkB;CAQ3B"}
|
package/dist/AuthAppClient.js
CHANGED
|
@@ -1 +1,199 @@
|
|
|
1
|
-
'use strict';const _0x34e156=_0x5b9c;(function(_0x1cee64,_0x4fa13f){const _0x761681=_0x5b9c,_0x22da73=_0x1cee64();while(!![]){try{const _0x453e23=parseInt(_0x761681(0x1e9))/0x1+parseInt(_0x761681(0x1da))/0x2+parseInt(_0x761681(0x1e5))/0x3*(parseInt(_0x761681(0x1d2))/0x4)+parseInt(_0x761681(0x1d6))/0x5*(-parseInt(_0x761681(0x1b7))/0x6)+-parseInt(_0x761681(0x1db))/0x7+parseInt(_0x761681(0x1c0))/0x8+-parseInt(_0x761681(0x1e0))/0x9;if(_0x453e23===_0x4fa13f)break;else _0x22da73['push'](_0x22da73['shift']());}catch(_0x563b53){_0x22da73['push'](_0x22da73['shift']());}}}(_0x2a36,0x22b2d));var __importDefault=this&&this['__importDefault']||function(_0x247a13){const _0x34e5b6=_0x5b9c;return _0x247a13&&_0x247a13[_0x34e5b6(0x1ae)]?_0x247a13:{'default':_0x247a13};};Object['defineProperty'](exports,_0x34e156(0x1ae),{'value':!![]}),exports[_0x34e156(0x1b1)]=void 0x0;function _0x2a36(){const _0x480c8b=['DhjPBq','DxbZzxj0vxnLCG','Dg90CfzLCMLMEq','uMvXDwvZDcbMywLSzwq6ifbpu1qGBwfNAwmTBgLUAY92zxjPzNK','l21Mys90B3rWl2nVBMzPCM0','x19LC01VzhvSzq','CMvWBgfJzq','zgvIDwC','qxv0AefWCenSAwvUDa','qxv0AcbYzxf1zxn0igzHAwXLza','l21Hz2LJlwXPBMSVDMvYAwz5','CgfYC2vbCgLfCNjVCK1LC3nHz2u','yxHPB3m','uMvXDwvZDcbMywLSzwq6ia','nLn1svftAa','Dg9Rzw4GAxmGCMvXDwLYzwq','y3jLyxrLtwfNAwnmAw5RuhjVDMLKzxi','Dg90CevUCM9SBa','y3jLyxrLt3rWuhjVDMLKzxi','l2nOywXSzw5Nzq','yxbWBgLJyxrPB24VANnVBG','l2vUCM9SBa','ue9tva','mteZntm1mKXZBgXSyW','r0vu','l3zLCMLMEq','yxbWu2vJCMv0','yNvPBgrtmLnizwfKzxjZ','yMfZzvvYBa','lI9ODhrWl3bHCNnLlwfWAs1LCNjVCG','l21Mys9YzwnVDMvYEs1JB2rLCY92zxjPzNK','CgfYC2vbCgLfCNjVCKnVzgu','l2fWChmV','l21Mys9ZDgf0Dxm','zgvMyxvSDa','C21Zx290Ca','l2rPC2fIBgu','l21Mys90B3rWl3zLCMLMEq','z2vUzxjHDgvszwnVDMvYEunVzgvZ','Dg90CerPC2fIBgu','y3jLyxrL','mtCZndKYAKfht2Pw','l3n0yxr1CW','y2XPB2rVDefWAuvYCM9YrNjVBuf4Aw9Z','zw1HAwXFB3rW','nJC2ndC1zKTLEK94','l3bYB3zPzgvYCY8','BwzHu3rHDhvZ','l3jLC2vUza','mJy1odG0BvPgtK5J','mJm1nJL6uxLxA04','yxbWswq','l2f1DgG','DMvYAwz5uMvJB3zLCNLdB2rL','DxnLCLbHDgG','mJuZodi3ovHJywj1BW','l3vZzxjZlW','yxbWqxbPs2v5','Dg90CfjLC2v0','y29KzsbPCYbYzxf1AxjLza','mtHItfLptvq','DMvYAwz5twfNAwnmAw5RuhvIBgLJ','Dg90CenVBMzPCM0','q2XPB2rVDefWAuvYCM9Y','mJC3mtL2B1fovfK','CMvXDwvZDa'];_0x2a36=function(){return _0x480c8b;};return _0x2a36();}function _0x5b9c(_0x3dd0be,_0x2bf2bf){_0x3dd0be=_0x3dd0be-0x1ae;const _0x2a361a=_0x2a36();let _0x5b9c9a=_0x2a361a[_0x3dd0be];if(_0x5b9c['QAusvR']===undefined){var _0x140a60=function(_0x569c08){const _0x59ca2d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x247a13='',_0x41425a='';for(let _0x3b7a96=0x0,_0x56b98f,_0x510317,_0x236864=0x0;_0x510317=_0x569c08['charAt'](_0x236864++);~_0x510317&&(_0x56b98f=_0x3b7a96%0x4?_0x56b98f*0x40+_0x510317:_0x510317,_0x3b7a96++%0x4)?_0x247a13+=String['fromCharCode'](0xff&_0x56b98f>>(-0x2*_0x3b7a96&0x6)):0x0){_0x510317=_0x59ca2d['indexOf'](_0x510317);}for(let _0x129663=0x0,_0x4b9056=_0x247a13['length'];_0x129663<_0x4b9056;_0x129663++){_0x41425a+='%'+('00'+_0x247a13['charCodeAt'](_0x129663)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x41425a);};_0x5b9c['PpqZlk']=_0x140a60,_0x5b9c['SHZYvd']={},_0x5b9c['QAusvR']=!![];}const _0x3a9f72=_0x2a361a[0x0],_0x34d4e8=_0x3dd0be+_0x3a9f72,_0x571057=_0x5b9c['SHZYvd'][_0x34d4e8];return!_0x571057?(_0x5b9c9a=_0x5b9c['PpqZlk'](_0x5b9c9a),_0x5b9c['SHZYvd'][_0x34d4e8]=_0x5b9c9a):_0x5b9c9a=_0x571057,_0x5b9c9a;}const axios_1=__importDefault(require(_0x34e156(0x1b5))),errors_1=require('./errors'),parse_api_error_1=require(_0x34e156(0x1c6));function trimBaseUrl(_0x41425a){const _0x39d83b=_0x34e156;return _0x41425a[_0x39d83b(0x1eb)]()[_0x39d83b(0x1af)](/\/+$/,'');}function assertExternalUserId(_0x3b7a96){if(!_0x3b7a96?.['trim']())throw new errors_1['CliodotApiError']('externalUserId\x20is\x20required');}function assertCode(_0x56b98f){const _0x272c89=_0x34e156;if(!_0x56b98f?.['trim']())throw new errors_1[(_0x272c89(0x1e8))](_0x272c89(0x1e4));}function assertToken(_0x510317){const _0xc0d2d1=_0x34e156;if(!_0x510317?.[_0xc0d2d1(0x1eb)]())throw new errors_1[(_0xc0d2d1(0x1e8))](_0xc0d2d1(0x1b8));}class AuthAppClient{constructor(_0x236864){const _0x35dfae=_0x34e156;if(!_0x236864[_0x35dfae(0x1c5)]?.['trim']())throw new errors_1[(_0x35dfae(0x1e8))]('AuthAppClient\x20requires\x20baseUrl');if(!_0x236864[_0x35dfae(0x1dc)]?.[_0x35dfae(0x1eb)]())throw new errors_1[(_0x35dfae(0x1e8))]('AuthAppClient\x20requires\x20appId');this['baseUrl']=trimBaseUrl(_0x236864[_0x35dfae(0x1c5)]),this[_0x35dfae(0x1dc)]=_0x236864[_0x35dfae(0x1dc)][_0x35dfae(0x1eb)](),this[_0x35dfae(0x1e2)]=_0x236864['appApiKey']?.[_0x35dfae(0x1eb)]()||undefined,this[_0x35dfae(0x1c3)]=_0x236864[_0x35dfae(0x1c3)]?.[_0x35dfae(0x1eb)]()||undefined,this[_0x35dfae(0x1b0)]=_0x236864[_0x35dfae(0x1b0)]??![],this[_0x35dfae(0x1b5)]=axios_1[_0x35dfae(0x1cb)][_0x35dfae(0x1d1)]({'baseURL':this[_0x35dfae(0x1c5)]+_0x35dfae(0x1dd),'timeout':0x7530,'headers':{'Content-Type':_0x35dfae(0x1bd)}}),this['users']={'upsert':(_0x129663,_0x4b9056)=>this['upsertUser'](_0x129663,_0x4b9056)},this['mfa']={'status':_0x295252=>this[_0x35dfae(0x1d8)](_0x295252),'totp':{'enroll':(_0x1bc687,_0x41550d)=>this[_0x35dfae(0x1ba)](_0x1bc687,_0x41550d),'confirm':(_0xe80b69,_0x96e5f8)=>this[_0x35dfae(0x1e7)](_0xe80b69,_0x96e5f8),'verify':(_0x3bca36,_0x44821e)=>this[_0x35dfae(0x1ed)](_0x3bca36,_0x44821e),'disable':_0x2239c1=>this['totpDisable'](_0x2239c1),'reset':(_0x304ab6,_0x422d33)=>this[_0x35dfae(0x1e3)](_0x304ab6,_0x422d33)},'recoveryCodes':{'generate':_0x2fc3d1=>this[_0x35dfae(0x1cf)](_0x2fc3d1),'verify':(_0x2973a4,_0x5e01e1)=>this['verifyRecoveryCode'](_0x2973a4,_0x5e01e1)}},this['providers']={'emailOtp':this[_0x35dfae(0x1bb)](_0x35dfae(0x1d5)),'smsOtp':this[_0x35dfae(0x1bb)](_0x35dfae(0x1cc)),'magicLink':this[_0x35dfae(0x1b9)]()};}[_0x34e156(0x1b9)](){const _0x21b77d=_0x34e156,_0x4ab604=_0x50c76f=>this[_0x21b77d(0x1df)](_0x50c76f)+'/providers/magic_link';return{'enroll':(_0x415475,_0xe3093c)=>this[_0x21b77d(0x1ea)](_0x21b77d(0x1bf),_0x4ab604(_0x415475)+_0x21b77d(0x1be),_0xe3093c),'challenge':(_0x4584cf,_0x1ed8c3)=>this[_0x21b77d(0x1ea)](_0x21b77d(0x1bf),_0x4ab604(_0x4584cf)+'/challenge',_0x1ed8c3),'resend':(_0x627270,_0x3fa510)=>this[_0x21b77d(0x1ea)]('POST',_0x4ab604(_0x627270)+_0x21b77d(0x1d9),_0x3fa510),'verify':(_0x2a8d8d,_0x4fa9f0)=>{const _0x123edc=_0x21b77d;return assertToken(_0x4fa9f0),this[_0x123edc(0x1ea)](_0x123edc(0x1bf),_0x4ab604(_0x2a8d8d)+_0x123edc(0x1c2),{'token':_0x4fa9f0});},'verifyPublic':_0x40f9a6=>{const _0x1ccfba=_0x21b77d;return assertToken(_0x40f9a6),this[_0x1ccfba(0x1e6)](_0x40f9a6);},'disable':_0x2abdd9=>this[_0x21b77d(0x1ea)](_0x21b77d(0x1bf),_0x4ab604(_0x2abdd9)+_0x21b77d(0x1cd)),'status':_0x1bfba0=>this[_0x21b77d(0x1ea)]('GET',_0x4ab604(_0x1bfba0)+'/status')};}async[_0x34e156(0x1e6)](_0x1ff4a0){const _0x23caea=_0x34e156;try{const {data:_0x21253c}=await this[_0x23caea(0x1b5)]({'method':_0x23caea(0x1bf),'url':_0x23caea(0x1c9)+encodeURIComponent(this[_0x23caea(0x1dc)])+_0x23caea(0x1b3),'data':{'token':_0x1ff4a0}});if(_0x21253c?.['ok']===![])throw new errors_1[(_0x23caea(0x1e8))]((0x0,parse_api_error_1[_0x23caea(0x1b4)])(_0x21253c)||_0x23caea(0x1b2),{'data':_0x21253c,'code':(0x0,parse_api_error_1[_0x23caea(0x1c8)])(_0x21253c)});return _0x21253c;}catch(_0x42507d){if(_0x42507d instanceof errors_1[_0x23caea(0x1e8)])throw _0x42507d;throw(0x0,errors_1[_0x23caea(0x1d4)])(_0x42507d,_0x23caea(0x1ee));}}[_0x34e156(0x1bb)](_0x4c9bfa){const _0xff4281=_0x34e156,_0x5d5638=_0x5bdd85=>this[_0xff4281(0x1df)](_0x5bdd85)+_0xff4281(0x1d7)+_0x4c9bfa;return{'enroll':(_0x302ca1,_0x3c5f1a)=>this[_0xff4281(0x1ea)](_0xff4281(0x1bf),_0x5d5638(_0x302ca1)+_0xff4281(0x1be),_0x3c5f1a),'challenge':(_0x2cedb5,_0x5526ee)=>this[_0xff4281(0x1ea)](_0xff4281(0x1bf),_0x5d5638(_0x2cedb5)+_0xff4281(0x1bc),_0x5526ee),'resend':(_0x43bda8,_0x5bb216)=>this[_0xff4281(0x1ea)](_0xff4281(0x1bf),_0x5d5638(_0x43bda8)+'/resend',_0x5bb216),'verify':(_0x5cd188,_0x29bb4a)=>{const _0x339db8=_0xff4281;return assertCode(_0x29bb4a),this[_0x339db8(0x1ea)](_0x339db8(0x1bf),_0x5d5638(_0x5cd188)+'/verify',{'code':_0x29bb4a});},'disable':_0x2ff9c3=>this[_0xff4281(0x1ea)](_0xff4281(0x1bf),_0x5d5638(_0x2ff9c3)+'/disable'),'status':_0xad818b=>this[_0xff4281(0x1ea)](_0xff4281(0x1c1),_0x5d5638(_0xad818b)+_0xff4281(0x1d3))};}[_0x34e156(0x1c4)](){const _0x4d2bce=_0x34e156;if(this[_0x4d2bce(0x1e2)])return{'Authorization':'Bearer\x20'+this[_0x4d2bce(0x1e2)]};if(this[_0x4d2bce(0x1c3)])return{'X-Cliodot-App-Id':this['appId'],'X-Cliodot-App-Secret':this[_0x4d2bce(0x1c3)]};throw new errors_1[(_0x4d2bce(0x1e8))]('Auth\x20app\x20credentials\x20required\x20(appApiKey\x20or\x20appSecret)');}[_0x34e156(0x1df)](_0x24ce10){const _0x467fd2=_0x34e156;return assertExternalUserId(_0x24ce10),'/apps/'+encodeURIComponent(this[_0x467fd2(0x1dc)])+_0x467fd2(0x1e1)+encodeURIComponent(_0x24ce10[_0x467fd2(0x1eb)]());}async[_0x34e156(0x1ea)](_0x34bab2,_0x189148,_0x3de6fb){const _0x5923fc=_0x34e156;try{const {data:_0x2f0934}=await this[_0x5923fc(0x1b5)]({'method':_0x34bab2,'url':_0x189148,'headers':this[_0x5923fc(0x1c4)](),'data':_0x3de6fb});if(_0x2f0934?.['ok']===![])throw new errors_1[(_0x5923fc(0x1e8))]((0x0,parse_api_error_1[_0x5923fc(0x1b4)])(_0x2f0934)||'Auth\x20request\x20failed',{'data':_0x2f0934,'code':(0x0,parse_api_error_1['parseApiErrorCode'])(_0x2f0934)});return _0x2f0934;}catch(_0x11ca08){if(_0x11ca08 instanceof errors_1[_0x5923fc(0x1e8)])throw _0x11ca08;throw(0x0,errors_1[_0x5923fc(0x1d4)])(_0x11ca08,_0x5923fc(0x1b6)+_0x34bab2+'\x20'+_0x189148);}}[_0x34e156(0x1ec)](_0x43028a,_0x19cf4b){const _0x180a0e=_0x34e156;return this[_0x180a0e(0x1ea)]('PUT',this['userPath'](_0x43028a),_0x19cf4b);}['mfaStatus'](_0x2e4618){const _0x3d5a0e=_0x34e156;return this[_0x3d5a0e(0x1ea)]('GET',this[_0x3d5a0e(0x1df)](_0x2e4618)+_0x3d5a0e(0x1ca));}[_0x34e156(0x1ba)](_0x3dbd27,_0x329444){const _0x419388=_0x34e156;return this[_0x419388(0x1ea)](_0x419388(0x1bf),this[_0x419388(0x1df)](_0x3dbd27)+'/mfa/totp/enroll',_0x329444);}[_0x34e156(0x1e7)](_0x36c253,_0x448a01){const _0x21a807=_0x34e156;return assertCode(_0x448a01),this[_0x21a807(0x1ea)]('POST',this['userPath'](_0x36c253)+_0x21a807(0x1ef),{'code':_0x448a01});}[_0x34e156(0x1ed)](_0x2304d3,_0x295d73){const _0x565a1e=_0x34e156;return assertCode(_0x295d73),this['request'](_0x565a1e(0x1bf),this[_0x565a1e(0x1df)](_0x2304d3)+_0x565a1e(0x1ce),{'code':_0x295d73});}[_0x34e156(0x1d0)](_0x1b68fb){const _0x5351f8=_0x34e156;return this[_0x5351f8(0x1ea)](_0x5351f8(0x1bf),this[_0x5351f8(0x1df)](_0x1b68fb)+'/mfa/totp/disable');}['totpReset'](_0x12cf62,_0x54eae6){const _0x27ba35=_0x34e156;return this[_0x27ba35(0x1ea)]('POST',this[_0x27ba35(0x1df)](_0x12cf62)+'/mfa/totp/reset',_0x54eae6);}[_0x34e156(0x1cf)](_0x2b1e9c){const _0x471a8a=_0x34e156;return this[_0x471a8a(0x1ea)]('POST',this[_0x471a8a(0x1df)](_0x2b1e9c)+'/mfa/recovery-codes');}[_0x34e156(0x1de)](_0xe4a492,_0x104b6e){const _0x275a00=_0x34e156;return assertCode(_0x104b6e),this[_0x275a00(0x1ea)](_0x275a00(0x1bf),this[_0x275a00(0x1df)](_0xe4a492)+_0x275a00(0x1c7),{'code':_0x104b6e});}}exports['AuthAppClient']=AuthAppClient;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AuthAppClient = void 0;
|
|
7
|
+
const axios_1 = __importDefault(require("axios"));
|
|
8
|
+
const errors_1 = require("./errors");
|
|
9
|
+
const parse_api_error_1 = require("./http/parse-api-error");
|
|
10
|
+
const cliodot_request_1 = require("./http/cliodot-request");
|
|
11
|
+
function trimBaseUrl(url) {
|
|
12
|
+
return url.trim().replace(/\/+$/, "");
|
|
13
|
+
}
|
|
14
|
+
function assertExternalUserId(externalUserId) {
|
|
15
|
+
if (!externalUserId?.trim()) {
|
|
16
|
+
throw new errors_1.CliodotApiError("externalUserId is required");
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function assertCode(code) {
|
|
20
|
+
if (!code?.trim()) {
|
|
21
|
+
throw new errors_1.CliodotApiError("code is required");
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function assertToken(token) {
|
|
25
|
+
if (!token?.trim()) {
|
|
26
|
+
throw new errors_1.CliodotApiError("token is required");
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
class AuthAppClient {
|
|
30
|
+
constructor(config) {
|
|
31
|
+
if (!config.baseUrl?.trim()) {
|
|
32
|
+
throw new errors_1.CliodotApiError("AuthAppClient requires baseUrl");
|
|
33
|
+
}
|
|
34
|
+
if (!config.appId?.trim()) {
|
|
35
|
+
throw new errors_1.CliodotApiError("AuthAppClient requires appId");
|
|
36
|
+
}
|
|
37
|
+
this.baseUrl = trimBaseUrl(config.baseUrl);
|
|
38
|
+
this.appId = config.appId.trim();
|
|
39
|
+
this.appApiKey = config.appApiKey?.trim() || undefined;
|
|
40
|
+
this.appSecret = config.appSecret?.trim() || undefined;
|
|
41
|
+
this.environment = config.environment;
|
|
42
|
+
this.debug = config.debug ?? false;
|
|
43
|
+
this.axios = axios_1.default.create({
|
|
44
|
+
baseURL: `${this.baseUrl}/auth`,
|
|
45
|
+
timeout: 30000,
|
|
46
|
+
headers: { "Content-Type": "application/json" },
|
|
47
|
+
});
|
|
48
|
+
this.users = {
|
|
49
|
+
upsert: (externalUserId, input) => this.upsertUser(externalUserId, input),
|
|
50
|
+
};
|
|
51
|
+
this.mfa = {
|
|
52
|
+
status: (externalUserId) => this.mfaStatus(externalUserId),
|
|
53
|
+
totp: {
|
|
54
|
+
enroll: (externalUserId, input) => this.totpEnroll(externalUserId, input),
|
|
55
|
+
confirm: (externalUserId, code) => this.totpConfirm(externalUserId, code),
|
|
56
|
+
verify: (externalUserId, code) => this.totpVerify(externalUserId, code),
|
|
57
|
+
disable: (externalUserId) => this.totpDisable(externalUserId),
|
|
58
|
+
reset: (externalUserId, input) => this.totpReset(externalUserId, input),
|
|
59
|
+
},
|
|
60
|
+
recoveryCodes: {
|
|
61
|
+
generate: (externalUserId) => this.generateRecoveryCodes(externalUserId),
|
|
62
|
+
verify: (externalUserId, code) => this.verifyRecoveryCode(externalUserId, code),
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
this.providers = {
|
|
66
|
+
emailOtp: this.createOtpProvider("email_otp"),
|
|
67
|
+
smsOtp: this.createOtpProvider("sms_otp"),
|
|
68
|
+
magicLink: this.createMagicLinkProvider(),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
createMagicLinkProvider() {
|
|
72
|
+
const base = (externalUserId) => `${this.userPath(externalUserId)}/providers/magic_link`;
|
|
73
|
+
return {
|
|
74
|
+
enroll: (externalUserId, input) => this.request("POST", `${base(externalUserId)}/enroll`, input),
|
|
75
|
+
challenge: (externalUserId, input) => this.request("POST", `${base(externalUserId)}/challenge`, input),
|
|
76
|
+
resend: (externalUserId, input) => this.request("POST", `${base(externalUserId)}/resend`, input),
|
|
77
|
+
verify: (externalUserId, token) => {
|
|
78
|
+
assertToken(token);
|
|
79
|
+
return this.request("POST", `${base(externalUserId)}/verify`, {
|
|
80
|
+
token,
|
|
81
|
+
});
|
|
82
|
+
},
|
|
83
|
+
verifyPublic: (token) => {
|
|
84
|
+
assertToken(token);
|
|
85
|
+
return this.verifyMagicLinkPublic(token);
|
|
86
|
+
},
|
|
87
|
+
disable: (externalUserId) => this.request("POST", `${base(externalUserId)}/disable`),
|
|
88
|
+
status: (externalUserId) => this.request("GET", `${base(externalUserId)}/status`),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
async verifyMagicLinkPublic(token) {
|
|
92
|
+
try {
|
|
93
|
+
const { data } = await this.axios({
|
|
94
|
+
method: "POST",
|
|
95
|
+
url: `/apps/${encodeURIComponent(this.appId)}/magic-link/verify`,
|
|
96
|
+
data: { token },
|
|
97
|
+
});
|
|
98
|
+
if (data?.ok === false) {
|
|
99
|
+
throw new errors_1.CliodotApiError((0, parse_api_error_1.parseApiErrorMessage)(data) || "Auth request failed", {
|
|
100
|
+
data,
|
|
101
|
+
code: (0, parse_api_error_1.parseApiErrorCode)(data),
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
return data;
|
|
105
|
+
}
|
|
106
|
+
catch (err) {
|
|
107
|
+
if (err instanceof errors_1.CliodotApiError) {
|
|
108
|
+
throw err;
|
|
109
|
+
}
|
|
110
|
+
throw (0, errors_1.cliodotApiErrorFromAxios)(err, "Request failed: POST magic-link/verify");
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
createOtpProvider(provider) {
|
|
114
|
+
const base = (externalUserId) => `${this.userPath(externalUserId)}/providers/${provider}`;
|
|
115
|
+
return {
|
|
116
|
+
enroll: (externalUserId, input) => this.request("POST", `${base(externalUserId)}/enroll`, input),
|
|
117
|
+
challenge: (externalUserId, input) => this.request("POST", `${base(externalUserId)}/challenge`, input),
|
|
118
|
+
resend: (externalUserId, input) => this.request("POST", `${base(externalUserId)}/resend`, input),
|
|
119
|
+
verify: (externalUserId, code) => {
|
|
120
|
+
assertCode(code);
|
|
121
|
+
return this.request("POST", `${base(externalUserId)}/verify`, {
|
|
122
|
+
code,
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
disable: (externalUserId) => this.request("POST", `${base(externalUserId)}/disable`),
|
|
126
|
+
status: (externalUserId) => this.request("GET", `${base(externalUserId)}/status`),
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
buildS2SHeaders() {
|
|
130
|
+
if (this.appApiKey) {
|
|
131
|
+
return (0, cliodot_request_1.applyEnvironmentHeader)({ Authorization: `Bearer ${this.appApiKey}` }, this.environment);
|
|
132
|
+
}
|
|
133
|
+
if (this.appSecret) {
|
|
134
|
+
return (0, cliodot_request_1.applyEnvironmentHeader)({
|
|
135
|
+
"X-Cliodot-App-Id": this.appId,
|
|
136
|
+
"X-Cliodot-App-Secret": this.appSecret,
|
|
137
|
+
}, this.environment);
|
|
138
|
+
}
|
|
139
|
+
throw new errors_1.CliodotApiError("Auth app credentials required (appApiKey or appSecret)");
|
|
140
|
+
}
|
|
141
|
+
userPath(externalUserId) {
|
|
142
|
+
assertExternalUserId(externalUserId);
|
|
143
|
+
return `/apps/${encodeURIComponent(this.appId)}/users/${encodeURIComponent(externalUserId.trim())}`;
|
|
144
|
+
}
|
|
145
|
+
async request(method, path, body) {
|
|
146
|
+
try {
|
|
147
|
+
const { data } = await this.axios({
|
|
148
|
+
method,
|
|
149
|
+
url: path,
|
|
150
|
+
headers: this.buildS2SHeaders(),
|
|
151
|
+
data: body,
|
|
152
|
+
});
|
|
153
|
+
if (data?.ok === false) {
|
|
154
|
+
throw new errors_1.CliodotApiError((0, parse_api_error_1.parseApiErrorMessage)(data) || "Auth request failed", {
|
|
155
|
+
data,
|
|
156
|
+
code: (0, parse_api_error_1.parseApiErrorCode)(data),
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
return data;
|
|
160
|
+
}
|
|
161
|
+
catch (err) {
|
|
162
|
+
if (err instanceof errors_1.CliodotApiError) {
|
|
163
|
+
throw err;
|
|
164
|
+
}
|
|
165
|
+
throw (0, errors_1.cliodotApiErrorFromAxios)(err, `Request failed: ${method} ${path}`);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
upsertUser(externalUserId, input) {
|
|
169
|
+
return this.request("PUT", this.userPath(externalUserId), input);
|
|
170
|
+
}
|
|
171
|
+
mfaStatus(externalUserId) {
|
|
172
|
+
return this.request("GET", `${this.userPath(externalUserId)}/mfa/status`);
|
|
173
|
+
}
|
|
174
|
+
totpEnroll(externalUserId, input) {
|
|
175
|
+
return this.request("POST", `${this.userPath(externalUserId)}/mfa/totp/enroll`, input);
|
|
176
|
+
}
|
|
177
|
+
totpConfirm(externalUserId, code) {
|
|
178
|
+
assertCode(code);
|
|
179
|
+
return this.request("POST", `${this.userPath(externalUserId)}/mfa/totp/confirm`, { code });
|
|
180
|
+
}
|
|
181
|
+
totpVerify(externalUserId, code) {
|
|
182
|
+
assertCode(code);
|
|
183
|
+
return this.request("POST", `${this.userPath(externalUserId)}/mfa/totp/verify`, { code });
|
|
184
|
+
}
|
|
185
|
+
totpDisable(externalUserId) {
|
|
186
|
+
return this.request("POST", `${this.userPath(externalUserId)}/mfa/totp/disable`);
|
|
187
|
+
}
|
|
188
|
+
totpReset(externalUserId, input) {
|
|
189
|
+
return this.request("POST", `${this.userPath(externalUserId)}/mfa/totp/reset`, input);
|
|
190
|
+
}
|
|
191
|
+
generateRecoveryCodes(externalUserId) {
|
|
192
|
+
return this.request("POST", `${this.userPath(externalUserId)}/mfa/recovery-codes`);
|
|
193
|
+
}
|
|
194
|
+
verifyRecoveryCode(externalUserId, code) {
|
|
195
|
+
assertCode(code);
|
|
196
|
+
return this.request("POST", `${this.userPath(externalUserId)}/mfa/recovery-codes/verify`, { code });
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
exports.AuthAppClient = AuthAppClient;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type { CommercialAnalyticsParams, CommercialAppClientApi, CommercialAppClientConfig, CommercialChangePlanInput, CommercialConfirmPaymentInput, CommercialCheckInput, CommercialCreateCustomerInput, CommercialCreateSubscriptionInput, CommercialInitiatePaymentInput, CommercialInitiatePaymentResult, CommercialConfirmPaymentResult, CommercialPaymentMethodSummary, CommercialCheckResult, CommercialConsumeInput, CommercialConsumeResult, CommercialCustomer, CommercialFeature, CommercialLicenseIssueInput, CommercialLicenseValidateInput, CommercialListCustomersResponse, CommercialListFeaturesResponse, CommercialListParams, CommercialListPlansResponse, CommercialInvoice, CommercialListInvoicesParams, CommercialListInvoicesResponse, CommercialListSubscriptionsParams, CommercialListSubscriptionsResponse, CommercialPaginationMeta, CommercialPlan, CommercialPricingQuote, CommercialPricingQuoteInput, CommercialSeatAssignInput, CommercialStateInput, CommercialStateResult, CommercialSubscription, CommercialUpdateSubscriptionStatusInput } from "./types/commercial-app.api";
|
|
1
|
+
import type { CommercialAnalyticsParams, CommercialAppClientApi, CommercialAppClientConfig, CommercialChangePlanInput, CommercialConfirmPaymentInput, CommercialCheckInput, CommercialCreateCustomerInput, CommercialCreateSubscriptionInput, CommercialInitiatePaymentInput, CommercialInitiatePaymentResult, CommercialConfirmPaymentResult, CommercialPaymentMethodSummary, CommercialCheckResult, CommercialConsumeInput, CommercialConsumeResult, CommercialCustomer, CommercialFeature, CommercialLicenseIssueInput, CommercialLicenseValidateInput, CommercialListCustomersResponse, CommercialListFeaturesResponse, CommercialListParams, CommercialListPlansResponse, CommercialInvoice, CommercialListInvoicesParams, CommercialListInvoicesResponse, CommercialListSubscriptionsParams, CommercialListSubscriptionsResponse, CommercialPaginationMeta, CommercialPlan, CommercialPricingQuote, CommercialPricingQuoteInput, CommercialSeatAssignInput, CommercialStateInput, CommercialStateResult, CommercialSubscription, CommercialUpdatePendingSubscriptionInput, CommercialUpdateSubscriptionStatusInput, CommercialEntitlementTopupInput, CommercialCreditsTopupInput, CommercialChargeUsageInput, CommercialChargeUsageResult, CommercialRenewSubscriptionInput, CommercialRenewSubscriptionResult, CommercialListCreditsParams, CommercialListCreditsResponse, CommercialAddCardInput, CommercialCustomerCard, CommercialListCardsParams, CommercialListCardsResponse, CommercialListEventsParams, CommercialListEventsResponse, CommercialListUsageEventsResponse, CommercialDiscount, CommercialTaxRate, CommercialAddon, CommercialSeatAssignment, CommercialLicense } from "./types/commercial-app.api";
|
|
2
2
|
export declare class CommercialAppClient implements CommercialAppClientApi {
|
|
3
3
|
private readonly baseUrl;
|
|
4
4
|
private readonly appId;
|
|
5
5
|
private readonly apiKey?;
|
|
6
6
|
private readonly appSecret?;
|
|
7
|
+
private readonly environment?;
|
|
7
8
|
private readonly axios;
|
|
8
9
|
readonly debug: boolean;
|
|
9
10
|
constructor(config: CommercialAppClientConfig);
|
|
@@ -18,6 +19,28 @@ export declare class CommercialAppClient implements CommercialAppClientApi {
|
|
|
18
19
|
ok: true;
|
|
19
20
|
customer: CommercialCustomer;
|
|
20
21
|
}>;
|
|
22
|
+
listCredits(customerId: string, params?: CommercialListCreditsParams): Promise<CommercialListCreditsResponse>;
|
|
23
|
+
topupCredits(input: CommercialCreditsTopupInput): Promise<{
|
|
24
|
+
ok: true;
|
|
25
|
+
invoice: CommercialInvoice;
|
|
26
|
+
}>;
|
|
27
|
+
listCards(customerId: string, params?: CommercialListCardsParams): Promise<CommercialListCardsResponse>;
|
|
28
|
+
addCard(customerId: string, input?: CommercialAddCardInput): Promise<{
|
|
29
|
+
ok: true;
|
|
30
|
+
card: CommercialCustomerCard;
|
|
31
|
+
}>;
|
|
32
|
+
updateCard(customerId: string, cardId: string, input?: CommercialAddCardInput): Promise<{
|
|
33
|
+
ok: true;
|
|
34
|
+
card: CommercialCustomerCard;
|
|
35
|
+
}>;
|
|
36
|
+
removeCard(customerId: string, cardId: string): Promise<{
|
|
37
|
+
ok: true;
|
|
38
|
+
card: CommercialCustomerCard;
|
|
39
|
+
}>;
|
|
40
|
+
setDefaultCard(customerId: string, cardId: string): Promise<{
|
|
41
|
+
ok: true;
|
|
42
|
+
card: CommercialCustomerCard;
|
|
43
|
+
}>;
|
|
21
44
|
createCustomer(input: CommercialCreateCustomerInput): Promise<{
|
|
22
45
|
ok: true;
|
|
23
46
|
customer: CommercialCustomer;
|
|
@@ -55,10 +78,28 @@ export declare class CommercialAppClient implements CommercialAppClientApi {
|
|
|
55
78
|
ok: true;
|
|
56
79
|
subscription: CommercialSubscription;
|
|
57
80
|
}>;
|
|
81
|
+
updatePendingSubscription(input: CommercialUpdatePendingSubscriptionInput): Promise<{
|
|
82
|
+
ok: true;
|
|
83
|
+
subscription: CommercialSubscription;
|
|
84
|
+
}>;
|
|
58
85
|
changePlan(input: CommercialChangePlanInput): Promise<{
|
|
59
86
|
ok: true;
|
|
60
87
|
subscription: CommercialSubscription;
|
|
61
88
|
}>;
|
|
89
|
+
entitlementTopup(input: CommercialEntitlementTopupInput): Promise<{
|
|
90
|
+
ok: true;
|
|
91
|
+
invoice: CommercialInvoice;
|
|
92
|
+
subscription: CommercialSubscription;
|
|
93
|
+
}>;
|
|
94
|
+
chargeUsage(input: CommercialChargeUsageInput): Promise<CommercialChargeUsageResult>;
|
|
95
|
+
renewSubscription(input: CommercialRenewSubscriptionInput): Promise<CommercialRenewSubscriptionResult>;
|
|
96
|
+
renew(input: CommercialRenewSubscriptionInput): Promise<CommercialRenewSubscriptionResult>;
|
|
97
|
+
listEvents(customerId: string, params?: CommercialListEventsParams): Promise<CommercialListEventsResponse>;
|
|
98
|
+
listUsageEvents(customerId: string, params?: CommercialListEventsParams): Promise<CommercialListUsageEventsResponse>;
|
|
99
|
+
listEventTypes(): Promise<{
|
|
100
|
+
ok: true;
|
|
101
|
+
event_types: string[];
|
|
102
|
+
}>;
|
|
62
103
|
listPaymentMethods(): Promise<{
|
|
63
104
|
ok: true;
|
|
64
105
|
payment_methods: CommercialPaymentMethodSummary[];
|
|
@@ -76,22 +117,22 @@ export declare class CommercialAppClient implements CommercialAppClientApi {
|
|
|
76
117
|
customer?: string;
|
|
77
118
|
}): Promise<{
|
|
78
119
|
ok: true;
|
|
79
|
-
discount:
|
|
80
|
-
quote:
|
|
120
|
+
discount: CommercialDiscount;
|
|
121
|
+
quote: CommercialPricingQuote;
|
|
81
122
|
}>;
|
|
82
123
|
listDiscounts(params?: CommercialListParams): Promise<{
|
|
83
124
|
ok: true;
|
|
84
|
-
discounts:
|
|
125
|
+
discounts: CommercialDiscount[];
|
|
85
126
|
pagination: CommercialPaginationMeta;
|
|
86
127
|
}>;
|
|
87
128
|
listTaxRates(params?: CommercialListParams): Promise<{
|
|
88
129
|
ok: true;
|
|
89
|
-
tax_rates:
|
|
130
|
+
tax_rates: CommercialTaxRate[];
|
|
90
131
|
pagination: CommercialPaginationMeta;
|
|
91
132
|
}>;
|
|
92
133
|
listAddons(params?: CommercialListParams): Promise<{
|
|
93
134
|
ok: true;
|
|
94
|
-
addons:
|
|
135
|
+
addons: CommercialAddon[];
|
|
95
136
|
pagination: CommercialPaginationMeta;
|
|
96
137
|
}>;
|
|
97
138
|
updateSubscriptionStatus(input: CommercialUpdateSubscriptionStatusInput): Promise<{
|
|
@@ -104,14 +145,14 @@ export declare class CommercialAppClient implements CommercialAppClientApi {
|
|
|
104
145
|
}>;
|
|
105
146
|
assignSeat(input: CommercialSeatAssignInput): Promise<{
|
|
106
147
|
ok: true;
|
|
107
|
-
assignment:
|
|
148
|
+
assignment: CommercialSeatAssignment;
|
|
108
149
|
}>;
|
|
109
150
|
unassignSeat(input: CommercialSeatAssignInput): Promise<{
|
|
110
151
|
ok: boolean;
|
|
111
152
|
}>;
|
|
112
153
|
issueLicense(input: CommercialLicenseIssueInput): Promise<{
|
|
113
154
|
ok: true;
|
|
114
|
-
license:
|
|
155
|
+
license: CommercialLicense;
|
|
115
156
|
license_key: string;
|
|
116
157
|
}>;
|
|
117
158
|
validateLicense(input: CommercialLicenseValidateInput): Promise<{
|
|
@@ -121,7 +162,7 @@ export declare class CommercialAppClient implements CommercialAppClientApi {
|
|
|
121
162
|
}>;
|
|
122
163
|
revokeLicense(licenseId: string): Promise<{
|
|
123
164
|
ok: true;
|
|
124
|
-
license:
|
|
165
|
+
license: CommercialLicense;
|
|
125
166
|
}>;
|
|
126
167
|
analytics(params?: CommercialAnalyticsParams): Promise<{
|
|
127
168
|
ok: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommercialAppClient.d.ts","sourceRoot":"","sources":["../src/CommercialAppClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommercialAppClient.d.ts","sourceRoot":"","sources":["../src/CommercialAppClient.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC7B,oBAAoB,EACpB,6BAA6B,EAC7B,iCAAiC,EACjC,8BAA8B,EAC9B,+BAA+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