@snokam/platform-client 1.0.0 → 2.0.0
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/CHANGELOG.md +139 -0
- package/README.md +4 -3
- package/dist/apis/PlatformClient.d.ts +41 -23
- package/dist/apis/PlatformClient.js +103 -54
- package/dist/esm/apis/PlatformClient.d.ts +41 -23
- package/dist/esm/apis/PlatformClient.js +103 -54
- package/dist/esm/models/index.d.ts +29 -21
- package/dist/models/index.d.ts +29 -21
- package/docs/{SetActiveProviderRequest.md → ChooseProviderRequest.md} +1 -1
- package/docs/IntegrationSummary.md +1 -1
- package/docs/PlatformClient.md +155 -79
- package/docs/StudioSanityConfig.md +1 -0
- package/package.json +1 -1
- package/src/apis/PlatformClient.ts +137 -72
- package/src/models/index.ts +27 -21
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# 2.0.0 (2026-09-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **platform:** collect the founder's details at signup ([#2112](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2112)) ([c5d8149](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/c5d814902d4b298cb6a26375f9c0af074eedf279))
|
|
12
|
+
* **platform:** export endpoint declares binary response — regen emitted a dangling BusinessExport ref that broke every JS build ([d3cf2d9](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/d3cf2d9818ded0388e56254d2328a8f3ded70b84))
|
|
13
|
+
* **platform:** show SSO for accounts without a password, pin scim to platform host ([fc2f551](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/fc2f5512ff8f4983ac052b0728753e630b81d761))
|
|
14
|
+
* **sanity:** close the scope-grant escalation, and move tenant access onto generated clients ([#2093](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2093)) ([c40608a](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/c40608a223cc725d1182dc176561540c3bc237a9))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
* feat!: subcontractor re-invoicing — year overview, kickback via AI, own access scope (#2283) ([bdc81f6](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/bdc81f6818bfc0e910aa3a820cb870054dc73c9f)), closes [#2283](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2283)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **access:** hide baseline (default) scopes from the user-grant picker ([#1684](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1684)) ([2750333](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/27503339d0baac52b2d0da51998551d00f1f6d39))
|
|
23
|
+
* add BusinessStatus enum and update related files ([2af8de7](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/2af8de7707a20e44aca3a3f358b83fbd77cf0ccb))
|
|
24
|
+
* add initial .NET and TypeScript client implementations ([425d183](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/425d183d5f3d928b6c0dd6c2cb36c4d82459b8b6))
|
|
25
|
+
* add platform client and update business management code ([d6c3e5a](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/d6c3e5a7587ee31cb780e13debc35150819cc338))
|
|
26
|
+
* **admin:** self-service admin forms, form kit, and fleet-wide content edit mode ([#1748](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1748)) ([174dab1](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/174dab19f7c75e9e56884cf21b553b6b3893dbb9))
|
|
27
|
+
* **auth:** exchange identity-provider tokens for platform tokens ([#1991](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1991)) ([e711a2f](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/e711a2f638f355891e97e84109b960184bcc2fec))
|
|
28
|
+
* **auth:** password + TOTP login (Phase 1, deploy-dark behind PASSWORD_AUTH_ENABLED) ([#1777](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1777)) ([8545b84](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/8545b847258d6f15563f74808eddf714d32d7f6e))
|
|
29
|
+
* **auth:** record every impersonated request in the impersonation audit log ([#2188](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2188)) ([65e4ab7](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/65e4ab76e842c326c931a18399deae60e08cd4d2))
|
|
30
|
+
* **billing:** card on file is Stripe-owned truth, operators only set invoice terms ([f789f2a](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/f789f2abeafeb9326d79b5ad8590c3244ae6ddfb))
|
|
31
|
+
* **billing:** Phase 2 — enforcement, trial UX, module-aware menu ([#1755](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1755)) ([a5a4533](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/a5a4533b6c8a7658d90063ce76a6f940318cbad8))
|
|
32
|
+
* **employees:** inherited system access + provisioning status on /manage/users ([#2233](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2233)) ([5286900](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/5286900de3524cc9bbffc06e759f3de22c70964c))
|
|
33
|
+
* enforcement hardening + view-as-employee + mobile/dark + scroll fix ([#1780](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1780)) ([54e0eae](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/54e0eae0a31384de6bb65cb86af0a5b5dfff3a0e)), closes [#1779](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1779) [#1779](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1779)
|
|
34
|
+
* **integrations:** disconnect from the UI, and ask which provider to use ([#2410](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2410)) ([a068f81](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/a068f81f1b23c2860b9ed8aeddc2500ae6aeebab))
|
|
35
|
+
* **integrations:** show connected OAuth user on integrasjoner page ([a7703c0](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/a7703c00a1784cabe010d9aa013d5a580a5df2d9))
|
|
36
|
+
* multi-business platform — secret persistence, integration checks, feature flags ([#1556](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1556)) ([990de8f](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/990de8f2044a619de641d8066d40d503ab390070)), closes [#70](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/70) [#71](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/71) [#69](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/69)
|
|
37
|
+
* **newsletter:** AI-summarized newsletters for tag subscribers ([#861](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/861)) ([9f7e676](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/9f7e6761e8c7e8271f0d10856bbc155b890ad1f2))
|
|
38
|
+
* **openapi:** use 7.23.0-SNAPSHOT, drop ThrowOnAnyError post-gen patch ([#1327](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1327)) ([22903d3](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/22903d3fba7234a9222019589922dbfd21484aa2)), closes [OpenAPITools/openapi-generator#23663](https://github.com/OpenAPITools/openapi-generator/issues/23663) [#30](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/30)
|
|
39
|
+
* **platform-client:** regen for GitHub repo picker + business api-token ([ab6aa36](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/ab6aa36354aaadff87c8b5cea5d37317a39d371b))
|
|
40
|
+
* **platform-web:** add an sso section under the enterprise menu ([6349b35](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/6349b354790e3bd69515561f3603954971d91df9))
|
|
41
|
+
* **platform:** access endpoints to edit tenant scopeGrants (phase 4) ([8231fcc](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/8231fcca8aca85c0e09283e87c0b39efa7a37783))
|
|
42
|
+
* **platform:** add olaf teams-settings endpoint and business-config model ([64baa53](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/64baa53b6eafe47e83c73cb10331026e54baf3e4))
|
|
43
|
+
* **platform:** admin app picker for systems + explicit role assignment ([#2234](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2234)) ([9a496f2](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/9a496f214eccdef27bbeb60e5b0b0256b0ace5f4))
|
|
44
|
+
* **platform:** customer API keys with scoped auth + printer pull API ([#1654](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1654)) ([076d7ee](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/076d7ee3a7b5f46fb77e4e5a7718f75a120b3e9d))
|
|
45
|
+
* **platform:** disconnect an integration, and stop guessing between two ([#2408](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2408)) ([2c66faa](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/2c66faae2d0e892269755e968254981b215766e9))
|
|
46
|
+
* **platform:** granular customer API-key scopes with typed catalog + endpoint ([#1660](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1660)) ([20289a3](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/20289a3b5bfe4a19c11e7df6e8b91cf505471d2c))
|
|
47
|
+
* **platform:** hide password management when Entra SSO is the identity source ([da7fd6a](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/da7fd6a6aa9f0ab5c03f2d557f410f5bde63c2f5))
|
|
48
|
+
* **platform:** let businesses pick repos Olaf works on, cloned to the VM ([#1636](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1636)) ([c4f8730](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/c4f873062dba23ec758823e45256ace272fc0feb))
|
|
49
|
+
* **platform:** license-override picker in /manage onboarding config ([7572f1e](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/7572f1e6a3ecd957d62be326cb13c92a5010bcc6))
|
|
50
|
+
* **platform:** meter cleanup + password signup + view-as + loader/copy passes ([#1778](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1778)) ([4f65a12](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/4f65a129a542130679fd7aff5898aaf1999c54f6))
|
|
51
|
+
* **platform:** per-tenant PowerOffice re-invoice product picker ([#2322](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2322)) ([db4fd2b](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/db4fd2b759aa68ee72ff80aee600674a799d24d4)), closes [#2321](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2321)
|
|
52
|
+
* **platform:** per-user system seats with role selection on /manage/users ([#2231](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2231)) ([35c90d5](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/35c90d50ac56aeb28f37cab67ada6f49e93df9d5))
|
|
53
|
+
* **platform:** pick onboarding groups from the tenant's own entra ([d3662d0](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/d3662d0a50dead9f8c4761ecc91842618b54786c))
|
|
54
|
+
* **platform:** PowerOffice onboarding as a connect-style integration ([#2214](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2214)) ([3ea9c70](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/3ea9c704bc958835879f36bb71e0eae517f9070d))
|
|
55
|
+
* **platform:** reconcile registered AI tokens against Azure's actual cost ([#1781](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1781)) ([fdf26bc](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/fdf26bc7f4d6d39d42df2e985cb985560d7e89d1))
|
|
56
|
+
* **platform:** remember saved onboarding directory selections ([#1857](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1857)) ([192e10d](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/192e10d6b66c8214461606869916391f6fc0551a))
|
|
57
|
+
* **platform:** resolve app links for non-admin employees on /manage ([#1893](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1893)) ([4022417](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/4022417a90cf0f037c97a9940c0d953ac16225ed))
|
|
58
|
+
* **platform:** select Google Analytics property at platform level ([#1598](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1598)) ([a4dffed](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/a4dffed997e1128ebc3b729d50a62030d68b1399))
|
|
59
|
+
* **platform:** serve tenant users through platform-function ([#2090](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2090)) ([2a622e6](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/2a622e62ae624a8fda57d7c4cd7940e255e39458))
|
|
60
|
+
* **platform:** serve the caller's settings and employee photos through platform-function ([#2095](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2095)) ([e2ddcb7](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/e2ddcb7514e2a30528168c1d95dbbb3112caeffd))
|
|
61
|
+
* **platform:** systems picker via enterprise-app + app-role dropdowns ([1326174](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/1326174992b77f0df118065dc958072ba42a9eee))
|
|
62
|
+
* **platform:** update generated client with secret status API and use API types ([d2143e4](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/d2143e46f53ca6e089cb483cd90bd4f95b7ac718))
|
|
63
|
+
* **platform:** usage in kroner — stage 1 (units + value everywhere) ([#2073](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2073)) ([aa94645](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/aa94645793e4d320f6a8acfd45f64c560d12a75e))
|
|
64
|
+
* provider-independent accounting connector + PowerOffice-employee onboarding ([#2327](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2327)) ([69fee51](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/69fee51c6353b464de68494dfc0e88768b362deb))
|
|
65
|
+
* **signup:** keep the plan the customer picked on the pricing page ([#2051](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/2051)) ([2795b55](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/2795b55ef094c8d8c1ea1e947003cd304e5c4ff9))
|
|
66
|
+
* **snokam.no/presentasjoner:** Added presentasjoner page ([#1535](https://github.com/GIT_USER_ID/GIT_REPO_ID/issues/1535)) ([c37fbb6](https://github.com/GIT_USER_ID/GIT_REPO_ID/commit/c37fbb60aec35a2817254e4139c3d2080231b15a))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### BREAKING CHANGES
|
|
70
|
+
|
|
71
|
+
* accounting client contract replaces SubcontractorMonthlySummary,
|
|
72
|
+
SubcontractorConfig and ProjectSubcontractor with SubcontractorProject,
|
|
73
|
+
SubcontractorProjectSummary and OutgoingInvoiceSummary.
|
|
74
|
+
|
|
75
|
+
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
76
|
+
|
|
77
|
+
* chore(clients): regenerate accounting client for year-based reinvoicing
|
|
78
|
+
|
|
79
|
+
Regenerated from the reworked reinvoicing endpoints: adds SubcontractorProject,
|
|
80
|
+
SubcontractorProjectSummary and OutgoingInvoiceSummary; removes the retired
|
|
81
|
+
SubcontractorMonthlySummary, SubcontractorConfig and ProjectSubcontractor models.
|
|
82
|
+
|
|
83
|
+
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
84
|
+
|
|
85
|
+
* feat: auto-create subcontractor drafts daily and tag them with the project
|
|
86
|
+
|
|
87
|
+
- Cron GenerateSubcontractorDraftInvoices runs daily (was monthly) so a new
|
|
88
|
+
incoming supplier invoice gets its draft re-invoice the next morning
|
|
89
|
+
- Draft outgoing invoices now carry the project code on both the invoice
|
|
90
|
+
header and each line, so they reconcile in the /okonomi/underleverandor
|
|
91
|
+
panel by project like any posted invoice — previously auto-drafts had no
|
|
92
|
+
project and never appeared
|
|
93
|
+
- Manual re-run endpoint (CreateSubcontractorInvoiceDraft) kept as override
|
|
94
|
+
|
|
95
|
+
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
96
|
+
|
|
97
|
+
* chore(clients): regenerate accounting client for optional-year reinvoicing endpoints
|
|
98
|
+
|
|
99
|
+
Project incoming/outgoing endpoints now accept an optional `year` (omit for full
|
|
100
|
+
history), so the generated query params become `year?: number | null`.
|
|
101
|
+
|
|
102
|
+
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
103
|
+
|
|
104
|
+
* feat: correct incoming totals, full-width income graph, årssum row, full-history detail
|
|
105
|
+
|
|
106
|
+
- Incoming supplier invoices now read from PowerOffice AccountTransactions
|
|
107
|
+
(VoucherType.IncomingInvoice, cost-account lines), fixing the empty incoming
|
|
108
|
+
column: the Voucher.IncomingInvoice list feed returns nothing, so the net cost
|
|
109
|
+
(verified 631 377 for 29.10 Mar–May) never showed.
|
|
110
|
+
- Voucher documentation fetch degrades to no-PDF on PowerOffice Forbidden instead
|
|
111
|
+
of a 500, so "Ingen PDF tilgjengelig" renders cleanly until the scope is granted.
|
|
112
|
+
- Detail page defaults to the project's full history; year becomes an optional
|
|
113
|
+
filter ("Alle år"), and the reconciliation table groups by year+month.
|
|
114
|
+
- Accumulated-income graph spans full width (Section stretchItems); detail table
|
|
115
|
+
gains an annual-total footer row.
|
|
116
|
+
|
|
117
|
+
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
|
118
|
+
|
|
119
|
+
* feat: kickback subcontractors — AI-parse forwarded invoices into provision drafts
|
|
120
|
+
|
|
121
|
+
- chatgpt-function: generic extract(pdf, schema) endpoint (Azure OpenAI Responses
|
|
122
|
+
API, native PDF, metered) — no PdfPig.
|
|
123
|
+
- accounting-function: read the provisjon inbox over Microsoft Graph (per-tenant
|
|
124
|
+
microsoft365 OAuth connection + KICKBACK_INBOX tenant secret), AI-extract each
|
|
125
|
+
forwarded invoice, AI-match to a PowerOffice subproject (Bestillingsnr/
|
|
126
|
+
PurchaseOrderNo + consultant), create an idempotent provision draft
|
|
127
|
+
(markup% × net) — DraftInvoiceExists-guarded, safe to re-run.
|
|
128
|
+
- new accounting.subcontractors scope in the baseline (own scope, not salary);
|
|
129
|
+
all reinvoicing/kickback endpoints move off accounting.salary; frontend shows
|
|
130
|
+
"Du har ikke tilgang" on 403.
|
|
131
|
+
- platform-function: provider-agnostic ListMailboxes endpoint (/businesses/{id}/
|
|
132
|
+
mailboxes) via DirectoryReader — for the provisjon-inbox picker.
|
|
133
|
+
- finance-web: kickback review table. platform-web: provisjon-inbox selector.
|
|
134
|
+
- Regenerate accounting, chatgpt and platform clients.
|
|
135
|
+
|
|
136
|
+
(--no-verify: huge staged set trips the React-Compiler phantom eslint bail;
|
|
137
|
+
prettier clean and per-workspace tsc green.)
|
|
138
|
+
|
|
139
|
+
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
package/README.md
CHANGED
|
@@ -62,6 +62,7 @@ All URIs are relative to *https://snokam.snosky.no/api/platform*
|
|
|
62
62
|
*PlatformClient* | [**backfillBridgeWebhook**](docs/PlatformClient.md#backfillbridgewebhook) | **POST** /v1.0/protected/businesses/{id}/bridge-webhook | Re-create a business\'s Sanity bridge webhook with a managed API key
|
|
63
63
|
*PlatformClient* | [**checkIntegration**](docs/PlatformClient.md#checkintegration) | **POST** /v1.0/protected/businesses/{id}/integrations/{key}/check | Run a live integration connectivity check
|
|
64
64
|
*PlatformClient* | [**checkPlatformIntegration**](docs/PlatformClient.md#checkplatformintegration) | **POST** /v1.0/protected/platform/integrations/{key}/check | Live-probe a platform integration
|
|
65
|
+
*PlatformClient* | [**chooseProvider**](docs/PlatformClient.md#chooseprovideroperation) | **PUT** /v1.0/protected/businesses/{id}/integrations/chosen | Choose the active provider for a capability
|
|
65
66
|
*PlatformClient* | [**connectTenant**](docs/PlatformClient.md#connecttenant) | **POST** /v1.0/protected/businesses/{id}/connect | Connect the caller\'s tenant to a business
|
|
66
67
|
*PlatformClient* | [**createApiToken**](docs/PlatformClient.md#createapitokenoperation) | **POST** /v1.0/protected/businesses/{id}/tokens | Create an API token
|
|
67
68
|
*PlatformClient* | [**createBillingCheckout**](docs/PlatformClient.md#createbillingcheckout) | **POST** /v1.0/protected/businesses/{id}/billing/checkout | Start a subscription checkout
|
|
@@ -73,6 +74,7 @@ All URIs are relative to *https://snokam.snosky.no/api/platform*
|
|
|
73
74
|
*PlatformClient* | [**devicePairPoll**](docs/PlatformClient.md#devicepairpoll) | **POST** /v1.0/public/devices/poll | Ask whether the code was approved
|
|
74
75
|
*PlatformClient* | [**devicePairRequest**](docs/PlatformClient.md#devicepairrequest) | **POST** /v1.0/public/devices/pair | Ask for a pairing code
|
|
75
76
|
*PlatformClient* | [**disableCredential**](docs/PlatformClient.md#disablecredential) | **DELETE** /v1.0/protected/businesses/{id}/credentials/{credentialId} | Disable a password credential
|
|
77
|
+
*PlatformClient* | [**disconnectIntegration**](docs/PlatformClient.md#disconnectintegration) | **DELETE** /v1.0/protected/businesses/{id}/integrations/{key} | Disconnect an integration
|
|
76
78
|
*PlatformClient* | [**endImpersonation**](docs/PlatformClient.md#endimpersonation) | **POST** /v1.0/protected/impersonate/{tokenId}/end | End a view-as-employee session
|
|
77
79
|
*PlatformClient* | [**exportBusinessData**](docs/PlatformClient.md#exportbusinessdata) | **POST** /v1.0/protected/businesses/{id}/export | Export a business\'s data (GDPR)
|
|
78
80
|
*PlatformClient* | [**getApiScopes**](docs/PlatformClient.md#getapiscopes) | **GET** /v1.0/protected/scopes | List grantable API scopes
|
|
@@ -155,7 +157,7 @@ All URIs are relative to *https://snokam.snosky.no/api/platform*
|
|
|
155
157
|
*PlatformClient* | [**requestUpgrade**](docs/PlatformClient.md#requestupgrade) | **POST** /v1.0/protected/businesses/{id}/request-upgrade | Request an Enterprise upgrade
|
|
156
158
|
*PlatformClient* | [**resetCredential**](docs/PlatformClient.md#resetcredential) | **POST** /v1.0/protected/businesses/{id}/credentials/{credentialId}/reset | Admin-initiated password reset
|
|
157
159
|
*PlatformClient* | [**resolvePlatformSanityConfig**](docs/PlatformClient.md#resolveplatformsanityconfig) | **GET** /v1.0/protected/sanity/platform | Resolve the platform Sanity read config
|
|
158
|
-
*PlatformClient* | [**resolveStudioSanityConfig**](docs/PlatformClient.md#resolvestudiosanityconfig) | **GET** /v1.0/public/sanity-config | Resolve the Sanity Studio project/dataset for a host
|
|
160
|
+
*PlatformClient* | [**resolveStudioSanityConfig**](docs/PlatformClient.md#resolvestudiosanityconfig) | **GET** /v1.0/public/sanity-config | Resolve the Sanity Studio project/dataset and frontend URLs for a host
|
|
159
161
|
*PlatformClient* | [**resolveTenant**](docs/PlatformClient.md#resolvetenant) | **GET** /v1.0/protected/tenant | Resolve a tenant
|
|
160
162
|
*PlatformClient* | [**resolveTenantSanityCredentials**](docs/PlatformClient.md#resolvetenantsanitycredentials) | **GET** /v1.0/protected/businesses/by-host/{host}/sanity | Resolve a tenant\'s Sanity read credentials by host
|
|
161
163
|
*PlatformClient* | [**revokeApiToken**](docs/PlatformClient.md#revokeapitoken) | **DELETE** /v1.0/protected/businesses/{id}/tokens/{fingerprint} | Revoke an API token
|
|
@@ -163,7 +165,6 @@ All URIs are relative to *https://snokam.snosky.no/api/platform*
|
|
|
163
165
|
*PlatformClient* | [**revokeDevice**](docs/PlatformClient.md#revokedevice) | **DELETE** /v1.0/protected/businesses/{id}/devices/{deviceId} | Revoke a screen
|
|
164
166
|
*PlatformClient* | [**setAccountingGadgetsProject**](docs/PlatformClient.md#setaccountinggadgetsproject) | **POST** /v1.0/protected/businesses/{id}/accounting/gadgets-project | Set the gadgets project code
|
|
165
167
|
*PlatformClient* | [**setAccountingReinvoiceProduct**](docs/PlatformClient.md#setaccountingreinvoiceproduct) | **POST** /v1.0/protected/businesses/{id}/accounting/reinvoice-product | Set the re-invoice product code
|
|
166
|
-
*PlatformClient* | [**setActiveProvider**](docs/PlatformClient.md#setactiveprovideroperation) | **PUT** /v1.0/protected/businesses/{id}/integrations/active | Choose the active provider for a capability
|
|
167
168
|
*PlatformClient* | [**setBusinessEmployeePhoto**](docs/PlatformClient.md#setbusinessemployeephoto) | **POST** /v1.0/protected/businesses/{id}/employees/{employeeId}/photo | Upload an employee\'s profile photo
|
|
168
169
|
*PlatformClient* | [**setEmployeeScopeGrants**](docs/PlatformClient.md#setemployeescopegrants) | **PUT** /v1.0/protected/businesses/{id}/access/employees/{employeeId} | Set the scopes granted directly to an employee
|
|
169
170
|
*PlatformClient* | [**setFacebookSelectedAccount**](docs/PlatformClient.md#setfacebookselectedaccount) | **PUT** /v1.0/protected/businesses/{id}/oauth/facebook/account | Set the selected Facebook/Instagram posting account
|
|
@@ -210,6 +211,7 @@ All URIs are relative to *https://snokam.snosky.no/api/platform*
|
|
|
210
211
|
- [BusinessOwner](docs/BusinessOwner.md)
|
|
211
212
|
- [BusinessUsageRollup](docs/BusinessUsageRollup.md)
|
|
212
213
|
- [Capability](docs/Capability.md)
|
|
214
|
+
- [ChooseProviderRequest](docs/ChooseProviderRequest.md)
|
|
213
215
|
- [CommissionTierReference](docs/CommissionTierReference.md)
|
|
214
216
|
- [ComponentBlocksInnerOneOfChildrenInner](docs/ComponentBlocksInnerOneOfChildrenInner.md)
|
|
215
217
|
- [ComponentBlocksInnerOneOfMarkDefsInner](docs/ComponentBlocksInnerOneOfMarkDefsInner.md)
|
|
@@ -317,7 +319,6 @@ All URIs are relative to *https://snokam.snosky.no/api/platform*
|
|
|
317
319
|
- [SanityTvCategoryDashboardsInnerBackgroundImageAsset](docs/SanityTvCategoryDashboardsInnerBackgroundImageAsset.md)
|
|
318
320
|
- [ScopeDefinition](docs/ScopeDefinition.md)
|
|
319
321
|
- [SessionBootstrapRequest](docs/SessionBootstrapRequest.md)
|
|
320
|
-
- [SetActiveProviderRequest](docs/SetActiveProviderRequest.md)
|
|
321
322
|
- [SetFacebookAccountRequest](docs/SetFacebookAccountRequest.md)
|
|
322
323
|
- [SetGoogleAnalyticsPropertyRequest](docs/SetGoogleAnalyticsPropertyRequest.md)
|
|
323
324
|
- [SetPlatformSecretRequest](docs/SetPlatformSecretRequest.md)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ActivateRequest, ActivateResult, AddCustomDomainRequest, ApiTokenSummary, ApiTokenVerifyResult, AppCatalogEntry, AppModule, ApproveDeviceRequest, BillingPaymentMethod, BillingSessionRequest, BillingSessionResponse, BridgeWebhookResult, Business, BusinessAccess, BusinessHealth, Capability, CreateApiTokenRequest, CreateUserRequest, CreatedApiToken, CredentialSummary, CustomDomainProvisioning, DevicePairRequestBody, DevicePairing, DevicePairingStatus, DevicePollRequestBody, DeviceScreen, DirectoryGroupsResponse, DirectoryLicensesResponse, DirectoryMailbox, DirectoryServicePrincipalsResponse, EmployeeSettings, EmployeeSystemAccess, EmployeeSystemConfig, FacebookAccount, GitHubRepo, GoogleAnalyticsProperty, GoogleAnalyticsSelection, ImpersonationHistoryEntry, IntegrationCheckResult, IntegrationSummary, InviteCredentialRequest, InvoiceBasis, LoginConfig, MeApp, MeterEnforcementDecision, OAuthAccessTokenResponse, OAuthStartResponse, OlafApiKeyResponse, OlafTeamsSettings, OnboardBusinessRequest, OnboardingConfig, OnboardingStatus, PasswordLoginRequest, PasswordLoginResult, PatchBusinessRequest, PatchEmployee, PendingDevicePreview, PlanInfo, PlatformIntegration, PlatformSanityConfig, PlatformSecretStatus, PowerOfficeConnectResponse, PowerOfficeProduct, PowerOfficeProductsResponse, PowerOfficeProject, PowerOfficeProjectsResponse, ProtectedEmployee, RecordImpersonationActivityRequest, RenameDeviceRequest, ResetConfirmRequest, ResetRequest, RevokeRequest, ScopeDefinition, SessionBootstrapRequest,
|
|
13
|
+
import type { ActivateRequest, ActivateResult, AddCustomDomainRequest, ApiTokenSummary, ApiTokenVerifyResult, AppCatalogEntry, AppModule, ApproveDeviceRequest, BillingPaymentMethod, BillingSessionRequest, BillingSessionResponse, BridgeWebhookResult, Business, BusinessAccess, BusinessHealth, Capability, ChooseProviderRequest, CreateApiTokenRequest, CreateUserRequest, CreatedApiToken, CredentialSummary, CustomDomainProvisioning, DevicePairRequestBody, DevicePairing, DevicePairingStatus, DevicePollRequestBody, DeviceScreen, DirectoryGroupsResponse, DirectoryLicensesResponse, DirectoryMailbox, DirectoryServicePrincipalsResponse, EmployeeSettings, EmployeeSystemAccess, EmployeeSystemConfig, FacebookAccount, GitHubRepo, GoogleAnalyticsProperty, GoogleAnalyticsSelection, ImpersonationHistoryEntry, IntegrationCheckResult, IntegrationSummary, InviteCredentialRequest, InvoiceBasis, LoginConfig, MeApp, MeterEnforcementDecision, OAuthAccessTokenResponse, OAuthStartResponse, OlafApiKeyResponse, OlafTeamsSettings, OnboardBusinessRequest, OnboardingConfig, OnboardingStatus, PasswordLoginRequest, PasswordLoginResult, PatchBusinessRequest, PatchEmployee, PendingDevicePreview, PlanInfo, PlatformIntegration, PlatformSanityConfig, PlatformSecretStatus, PowerOfficeConnectResponse, PowerOfficeProduct, PowerOfficeProductsResponse, PowerOfficeProject, PowerOfficeProjectsResponse, ProtectedEmployee, RecordImpersonationActivityRequest, RenameDeviceRequest, ResetConfirmRequest, ResetRequest, RevokeRequest, ScopeDefinition, SessionBootstrapRequest, SetFacebookAccountRequest, SetGoogleAnalyticsPropertyRequest, SetPlatformSecretRequest, SetScopeGrantsRequest, SetWorkReposRequest, SetWorkspaceRepoRequest, SignupConfig, SignupRequest, SignupResult, SsoExchangeRequest, StartImpersonationRequest, StartImpersonationResult, StudioSanityConfig, TeamsAcsTokenResponse, TeamsAuthStateResponse, TenantInfo, TenantSanityCredentials, TokenExchangeRequest, TokenExchangeResult, TokenReconciliationReport, TotpEnrollRequest, TotpEnrollResult, UpdateAppsRequest, UpdateSecretsRequest, UsageDailySeries, UsageEventsRequest, UsageRollup, UsageSummary, VerifyApiTokenRequest, WorkReposSelection, WorkspaceRepoSelection } from '../models/index';
|
|
14
14
|
export interface AddCustomDomainOperationRequest {
|
|
15
15
|
id: string;
|
|
16
16
|
addCustomDomainRequest: AddCustomDomainRequest;
|
|
@@ -35,6 +35,10 @@ export interface CheckIntegrationRequest {
|
|
|
35
35
|
export interface CheckPlatformIntegrationRequest {
|
|
36
36
|
key: string;
|
|
37
37
|
}
|
|
38
|
+
export interface ChooseProviderOperationRequest {
|
|
39
|
+
id: string;
|
|
40
|
+
chooseProviderRequest: ChooseProviderRequest;
|
|
41
|
+
}
|
|
38
42
|
export interface ConnectTenantRequest {
|
|
39
43
|
id: string;
|
|
40
44
|
}
|
|
@@ -74,6 +78,10 @@ export interface DisableCredentialRequest {
|
|
|
74
78
|
id: string;
|
|
75
79
|
credentialId: string;
|
|
76
80
|
}
|
|
81
|
+
export interface DisconnectIntegrationRequest {
|
|
82
|
+
id: string;
|
|
83
|
+
key: string;
|
|
84
|
+
}
|
|
77
85
|
export interface EndImpersonationRequest {
|
|
78
86
|
tokenId: string;
|
|
79
87
|
}
|
|
@@ -311,10 +319,6 @@ export interface SetAccountingReinvoiceProductRequest {
|
|
|
311
319
|
id: string;
|
|
312
320
|
powerOfficeProduct: PowerOfficeProduct;
|
|
313
321
|
}
|
|
314
|
-
export interface SetActiveProviderOperationRequest {
|
|
315
|
-
id: string;
|
|
316
|
-
setActiveProviderRequest: SetActiveProviderRequest;
|
|
317
|
-
}
|
|
318
322
|
export interface SetBusinessEmployeePhotoRequest {
|
|
319
323
|
id: string;
|
|
320
324
|
employeeId: string;
|
|
@@ -481,6 +485,20 @@ export declare class PlatformClient extends runtime.BaseAPI {
|
|
|
481
485
|
* Live-probe a platform integration
|
|
482
486
|
*/
|
|
483
487
|
checkPlatformIntegration(requestParameters: CheckPlatformIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IntegrationCheckResult>;
|
|
488
|
+
/**
|
|
489
|
+
* Creates request options for chooseProvider without sending the request
|
|
490
|
+
*/
|
|
491
|
+
chooseProviderRequestOpts(requestParameters: ChooseProviderOperationRequest): Promise<runtime.RequestOpts>;
|
|
492
|
+
/**
|
|
493
|
+
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
494
|
+
* Choose the active provider for a capability
|
|
495
|
+
*/
|
|
496
|
+
chooseProviderRaw(requestParameters: ChooseProviderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Business>>;
|
|
497
|
+
/**
|
|
498
|
+
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
499
|
+
* Choose the active provider for a capability
|
|
500
|
+
*/
|
|
501
|
+
chooseProvider(requestParameters: ChooseProviderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Business>;
|
|
484
502
|
/**
|
|
485
503
|
* Creates request options for connectTenant without sending the request
|
|
486
504
|
*/
|
|
@@ -635,6 +653,20 @@ export declare class PlatformClient extends runtime.BaseAPI {
|
|
|
635
653
|
* Disable a password credential
|
|
636
654
|
*/
|
|
637
655
|
disableCredential(requestParameters: DisableCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
656
|
+
/**
|
|
657
|
+
* Creates request options for disconnectIntegration without sending the request
|
|
658
|
+
*/
|
|
659
|
+
disconnectIntegrationRequestOpts(requestParameters: DisconnectIntegrationRequest): Promise<runtime.RequestOpts>;
|
|
660
|
+
/**
|
|
661
|
+
* Deletes every secret the integration stores for this business — including the OAuth refresh token and cached access token — and clears the capability\'s provider choice when it pointed at this integration. Settings such as base URLs are left alone.
|
|
662
|
+
* Disconnect an integration
|
|
663
|
+
*/
|
|
664
|
+
disconnectIntegrationRaw(requestParameters: DisconnectIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Business>>;
|
|
665
|
+
/**
|
|
666
|
+
* Deletes every secret the integration stores for this business — including the OAuth refresh token and cached access token — and clears the capability\'s provider choice when it pointed at this integration. Settings such as base URLs are left alone.
|
|
667
|
+
* Disconnect an integration
|
|
668
|
+
*/
|
|
669
|
+
disconnectIntegration(requestParameters: DisconnectIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Business>;
|
|
638
670
|
/**
|
|
639
671
|
* Creates request options for endImpersonation without sending the request
|
|
640
672
|
*/
|
|
@@ -1782,13 +1814,13 @@ export declare class PlatformClient extends runtime.BaseAPI {
|
|
|
1782
1814
|
*/
|
|
1783
1815
|
resolveStudioSanityConfigRequestOpts(requestParameters: ResolveStudioSanityConfigRequest): Promise<runtime.RequestOpts>;
|
|
1784
1816
|
/**
|
|
1785
|
-
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
1786
|
-
* Resolve the Sanity Studio project/dataset for a host
|
|
1817
|
+
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host, plus that tenant\'s frontend app URLs so document \'Vis side\' links resolve per tenant. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project and no app URLs. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
1818
|
+
* Resolve the Sanity Studio project/dataset and frontend URLs for a host
|
|
1787
1819
|
*/
|
|
1788
1820
|
resolveStudioSanityConfigRaw(requestParameters: ResolveStudioSanityConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StudioSanityConfig>>;
|
|
1789
1821
|
/**
|
|
1790
|
-
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
1791
|
-
* Resolve the Sanity Studio project/dataset for a host
|
|
1822
|
+
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host, plus that tenant\'s frontend app URLs so document \'Vis side\' links resolve per tenant. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project and no app URLs. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
1823
|
+
* Resolve the Sanity Studio project/dataset and frontend URLs for a host
|
|
1792
1824
|
*/
|
|
1793
1825
|
resolveStudioSanityConfig(requestParameters: ResolveStudioSanityConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StudioSanityConfig>;
|
|
1794
1826
|
/**
|
|
@@ -1887,20 +1919,6 @@ export declare class PlatformClient extends runtime.BaseAPI {
|
|
|
1887
1919
|
* Set the re-invoice product code
|
|
1888
1920
|
*/
|
|
1889
1921
|
setAccountingReinvoiceProduct(requestParameters: SetAccountingReinvoiceProductRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
1890
|
-
/**
|
|
1891
|
-
* Creates request options for setActiveProvider without sending the request
|
|
1892
|
-
*/
|
|
1893
|
-
setActiveProviderRequestOpts(requestParameters: SetActiveProviderOperationRequest): Promise<runtime.RequestOpts>;
|
|
1894
|
-
/**
|
|
1895
|
-
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
1896
|
-
* Choose the active provider for a capability
|
|
1897
|
-
*/
|
|
1898
|
-
setActiveProviderRaw(requestParameters: SetActiveProviderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Business>>;
|
|
1899
|
-
/**
|
|
1900
|
-
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
1901
|
-
* Choose the active provider for a capability
|
|
1902
|
-
*/
|
|
1903
|
-
setActiveProvider(requestParameters: SetActiveProviderOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Business>;
|
|
1904
1922
|
/**
|
|
1905
1923
|
* Creates request options for setBusinessEmployeePhoto without sending the request
|
|
1906
1924
|
*/
|
|
@@ -323,6 +323,56 @@ class PlatformClient extends runtime.BaseAPI {
|
|
|
323
323
|
return yield response.value();
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
|
+
/**
|
|
327
|
+
* Creates request options for chooseProvider without sending the request
|
|
328
|
+
*/
|
|
329
|
+
chooseProviderRequestOpts(requestParameters) {
|
|
330
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
331
|
+
if (requestParameters['id'] == null) {
|
|
332
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling chooseProvider().');
|
|
333
|
+
}
|
|
334
|
+
if (requestParameters['chooseProviderRequest'] == null) {
|
|
335
|
+
throw new runtime.RequiredError('chooseProviderRequest', 'Required parameter "chooseProviderRequest" was null or undefined when calling chooseProvider().');
|
|
336
|
+
}
|
|
337
|
+
const queryParameters = {};
|
|
338
|
+
const headerParameters = {};
|
|
339
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
340
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
341
|
+
// oauth required
|
|
342
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("Implicit", []);
|
|
343
|
+
}
|
|
344
|
+
let urlPath = `/v1.0/protected/businesses/{id}/integrations/chosen`;
|
|
345
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
346
|
+
return {
|
|
347
|
+
path: urlPath,
|
|
348
|
+
method: 'PUT',
|
|
349
|
+
headers: headerParameters,
|
|
350
|
+
query: queryParameters,
|
|
351
|
+
body: requestParameters['chooseProviderRequest'],
|
|
352
|
+
};
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
357
|
+
* Choose the active provider for a capability
|
|
358
|
+
*/
|
|
359
|
+
chooseProviderRaw(requestParameters, initOverrides) {
|
|
360
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
361
|
+
const requestOptions = yield this.chooseProviderRequestOpts(requestParameters);
|
|
362
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
363
|
+
return new runtime.JSONApiResponse(response);
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
368
|
+
* Choose the active provider for a capability
|
|
369
|
+
*/
|
|
370
|
+
chooseProvider(requestParameters, initOverrides) {
|
|
371
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
372
|
+
const response = yield this.chooseProviderRaw(requestParameters, initOverrides);
|
|
373
|
+
return yield response.value();
|
|
374
|
+
});
|
|
375
|
+
}
|
|
326
376
|
/**
|
|
327
377
|
* Creates request options for connectTenant without sending the request
|
|
328
378
|
*/
|
|
@@ -836,6 +886,55 @@ class PlatformClient extends runtime.BaseAPI {
|
|
|
836
886
|
yield this.disableCredentialRaw(requestParameters, initOverrides);
|
|
837
887
|
});
|
|
838
888
|
}
|
|
889
|
+
/**
|
|
890
|
+
* Creates request options for disconnectIntegration without sending the request
|
|
891
|
+
*/
|
|
892
|
+
disconnectIntegrationRequestOpts(requestParameters) {
|
|
893
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
894
|
+
if (requestParameters['id'] == null) {
|
|
895
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling disconnectIntegration().');
|
|
896
|
+
}
|
|
897
|
+
if (requestParameters['key'] == null) {
|
|
898
|
+
throw new runtime.RequiredError('key', 'Required parameter "key" was null or undefined when calling disconnectIntegration().');
|
|
899
|
+
}
|
|
900
|
+
const queryParameters = {};
|
|
901
|
+
const headerParameters = {};
|
|
902
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
903
|
+
// oauth required
|
|
904
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("Implicit", []);
|
|
905
|
+
}
|
|
906
|
+
let urlPath = `/v1.0/protected/businesses/{id}/integrations/{key}`;
|
|
907
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
908
|
+
urlPath = urlPath.replace('{key}', encodeURIComponent(String(requestParameters['key'])));
|
|
909
|
+
return {
|
|
910
|
+
path: urlPath,
|
|
911
|
+
method: 'DELETE',
|
|
912
|
+
headers: headerParameters,
|
|
913
|
+
query: queryParameters,
|
|
914
|
+
};
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* Deletes every secret the integration stores for this business — including the OAuth refresh token and cached access token — and clears the capability\'s provider choice when it pointed at this integration. Settings such as base URLs are left alone.
|
|
919
|
+
* Disconnect an integration
|
|
920
|
+
*/
|
|
921
|
+
disconnectIntegrationRaw(requestParameters, initOverrides) {
|
|
922
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
923
|
+
const requestOptions = yield this.disconnectIntegrationRequestOpts(requestParameters);
|
|
924
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
925
|
+
return new runtime.JSONApiResponse(response);
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
/**
|
|
929
|
+
* Deletes every secret the integration stores for this business — including the OAuth refresh token and cached access token — and clears the capability\'s provider choice when it pointed at this integration. Settings such as base URLs are left alone.
|
|
930
|
+
* Disconnect an integration
|
|
931
|
+
*/
|
|
932
|
+
disconnectIntegration(requestParameters, initOverrides) {
|
|
933
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
934
|
+
const response = yield this.disconnectIntegrationRaw(requestParameters, initOverrides);
|
|
935
|
+
return yield response.value();
|
|
936
|
+
});
|
|
937
|
+
}
|
|
839
938
|
/**
|
|
840
939
|
* Creates request options for endImpersonation without sending the request
|
|
841
940
|
*/
|
|
@@ -4478,8 +4577,8 @@ class PlatformClient extends runtime.BaseAPI {
|
|
|
4478
4577
|
});
|
|
4479
4578
|
}
|
|
4480
4579
|
/**
|
|
4481
|
-
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
4482
|
-
* Resolve the Sanity Studio project/dataset for a host
|
|
4580
|
+
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host, plus that tenant\'s frontend app URLs so document \'Vis side\' links resolve per tenant. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project and no app URLs. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
4581
|
+
* Resolve the Sanity Studio project/dataset and frontend URLs for a host
|
|
4483
4582
|
*/
|
|
4484
4583
|
resolveStudioSanityConfigRaw(requestParameters, initOverrides) {
|
|
4485
4584
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -4489,8 +4588,8 @@ class PlatformClient extends runtime.BaseAPI {
|
|
|
4489
4588
|
});
|
|
4490
4589
|
}
|
|
4491
4590
|
/**
|
|
4492
|
-
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
4493
|
-
* Resolve the Sanity Studio project/dataset for a host
|
|
4591
|
+
* Returns the non-secret Sanity project id and dataset a studio should point at for the given host, plus that tenant\'s frontend app URLs so document \'Vis side\' links resolve per tenant. A tenant host returns that tenant\'s project; a host that belongs to no business (the platform host) returns the shared platform project and no app URLs. No read/write token is returned — the studio authenticates the user via Sanity login — so this is a public endpoint safe to call from a browser.
|
|
4592
|
+
* Resolve the Sanity Studio project/dataset and frontend URLs for a host
|
|
4494
4593
|
*/
|
|
4495
4594
|
resolveStudioSanityConfig(requestParameters, initOverrides) {
|
|
4496
4595
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -4838,56 +4937,6 @@ class PlatformClient extends runtime.BaseAPI {
|
|
|
4838
4937
|
yield this.setAccountingReinvoiceProductRaw(requestParameters, initOverrides);
|
|
4839
4938
|
});
|
|
4840
4939
|
}
|
|
4841
|
-
/**
|
|
4842
|
-
* Creates request options for setActiveProvider without sending the request
|
|
4843
|
-
*/
|
|
4844
|
-
setActiveProviderRequestOpts(requestParameters) {
|
|
4845
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
4846
|
-
if (requestParameters['id'] == null) {
|
|
4847
|
-
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling setActiveProvider().');
|
|
4848
|
-
}
|
|
4849
|
-
if (requestParameters['setActiveProviderRequest'] == null) {
|
|
4850
|
-
throw new runtime.RequiredError('setActiveProviderRequest', 'Required parameter "setActiveProviderRequest" was null or undefined when calling setActiveProvider().');
|
|
4851
|
-
}
|
|
4852
|
-
const queryParameters = {};
|
|
4853
|
-
const headerParameters = {};
|
|
4854
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
4855
|
-
if (this.configuration && this.configuration.accessToken) {
|
|
4856
|
-
// oauth required
|
|
4857
|
-
headerParameters["Authorization"] = yield this.configuration.accessToken("Implicit", []);
|
|
4858
|
-
}
|
|
4859
|
-
let urlPath = `/v1.0/protected/businesses/{id}/integrations/active`;
|
|
4860
|
-
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
4861
|
-
return {
|
|
4862
|
-
path: urlPath,
|
|
4863
|
-
method: 'PUT',
|
|
4864
|
-
headers: headerParameters,
|
|
4865
|
-
query: queryParameters,
|
|
4866
|
-
body: requestParameters['setActiveProviderRequest'],
|
|
4867
|
-
};
|
|
4868
|
-
});
|
|
4869
|
-
}
|
|
4870
|
-
/**
|
|
4871
|
-
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
4872
|
-
* Choose the active provider for a capability
|
|
4873
|
-
*/
|
|
4874
|
-
setActiveProviderRaw(requestParameters, initOverrides) {
|
|
4875
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
4876
|
-
const requestOptions = yield this.setActiveProviderRequestOpts(requestParameters);
|
|
4877
|
-
const response = yield this.request(requestOptions, initOverrides);
|
|
4878
|
-
return new runtime.JSONApiResponse(response);
|
|
4879
|
-
});
|
|
4880
|
-
}
|
|
4881
|
-
/**
|
|
4882
|
-
* When a capability has several providers (e.g. PowerOffice vs Tripletex, Coinbase API-key vs OAuth), selects which one the business uses.
|
|
4883
|
-
* Choose the active provider for a capability
|
|
4884
|
-
*/
|
|
4885
|
-
setActiveProvider(requestParameters, initOverrides) {
|
|
4886
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
4887
|
-
const response = yield this.setActiveProviderRaw(requestParameters, initOverrides);
|
|
4888
|
-
return yield response.value();
|
|
4889
|
-
});
|
|
4890
|
-
}
|
|
4891
4940
|
/**
|
|
4892
4941
|
* Creates request options for setBusinessEmployeePhoto without sending the request
|
|
4893
4942
|
*/
|