@flexprice/sdk 2.0.12 → 2.0.13
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/README.md +78 -0
- package/docs/sdk/models/dto-create-customer-request.md +0 -1
- package/docs/sdk/models/dto-customer-response.md +1 -0
- package/docs/sdk/models/dto-invoice-response.md +1 -0
- package/docs/sdk/models/{dto-create-entity-integration-mapping-request.md → dto-link-integration-mapping-request.md} +4 -4
- package/docs/sdk/models/dto-link-integration-mapping-response.md +15 -0
- package/docs/sdk/models/dto-update-customer-request.md +0 -1
- package/docs/sdk/models/invoice-status.md +1 -1
- package/docs/sdk/models/schedule-draft-finalization-response.md +16 -0
- package/docs/sdk/models/scheduled-task-interval.md +1 -1
- package/docs/sdks/integrations/README.md +18 -235
- package/docs/sdks/scheduledtasks/README.md +73 -2
- package/esm/funcs/coupons-create-coupon.d.ts +2 -0
- package/esm/funcs/coupons-create-coupon.d.ts.map +1 -1
- package/esm/funcs/coupons-create-coupon.js +3 -1
- package/esm/funcs/coupons-create-coupon.js.map +1 -1
- package/esm/funcs/coupons-delete-coupon.d.ts +2 -0
- package/esm/funcs/coupons-delete-coupon.d.ts.map +1 -1
- package/esm/funcs/coupons-delete-coupon.js +3 -1
- package/esm/funcs/coupons-delete-coupon.js.map +1 -1
- package/esm/funcs/coupons-update-coupon.d.ts +2 -0
- package/esm/funcs/coupons-update-coupon.d.ts.map +1 -1
- package/esm/funcs/coupons-update-coupon.js +3 -1
- package/esm/funcs/coupons-update-coupon.js.map +1 -1
- package/esm/funcs/credit-notes-create-credit-note.d.ts +2 -0
- package/esm/funcs/credit-notes-create-credit-note.d.ts.map +1 -1
- package/esm/funcs/credit-notes-create-credit-note.js +3 -1
- package/esm/funcs/credit-notes-create-credit-note.js.map +1 -1
- package/esm/funcs/credit-notes-process-credit-note.d.ts +2 -0
- package/esm/funcs/credit-notes-process-credit-note.d.ts.map +1 -1
- package/esm/funcs/credit-notes-process-credit-note.js +3 -1
- package/esm/funcs/credit-notes-process-credit-note.js.map +1 -1
- package/esm/funcs/credit-notes-void-credit-note.d.ts +2 -0
- package/esm/funcs/credit-notes-void-credit-note.d.ts.map +1 -1
- package/esm/funcs/credit-notes-void-credit-note.js +3 -1
- package/esm/funcs/credit-notes-void-credit-note.js.map +1 -1
- package/esm/funcs/{integrations-get-integration.d.ts → integrations-link-integration-mapping.d.ts} +4 -4
- package/esm/funcs/integrations-link-integration-mapping.d.ts.map +1 -0
- package/esm/funcs/{entity-integration-mappings-create-entity-integration-mapping.js → integrations-link-integration-mapping.js} +9 -9
- package/esm/funcs/integrations-link-integration-mapping.js.map +1 -0
- package/esm/funcs/scheduled-tasks-schedule-draft-finalization.d.ts +17 -0
- package/esm/funcs/scheduled-tasks-schedule-draft-finalization.d.ts.map +1 -0
- package/esm/funcs/{integrations-list-linked-integrations.js → scheduled-tasks-schedule-draft-finalization.js} +9 -9
- package/esm/funcs/scheduled-tasks-schedule-draft-finalization.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/lib/security.d.ts +1 -1
- package/esm/lib/security.d.ts.map +1 -1
- package/esm/lib/security.js +19 -8
- package/esm/lib/security.js.map +1 -1
- package/esm/sdk/integrations.d.ts +3 -24
- package/esm/sdk/integrations.d.ts.map +1 -1
- package/esm/sdk/integrations.js +5 -35
- package/esm/sdk/integrations.js.map +1 -1
- package/esm/sdk/models/dto-create-customer-request.d.ts +0 -6
- package/esm/sdk/models/dto-create-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/dto-create-customer-request.js +0 -3
- package/esm/sdk/models/dto-create-customer-request.js.map +1 -1
- package/esm/sdk/models/dto-customer-response.d.ts +2 -0
- package/esm/sdk/models/dto-customer-response.d.ts.map +1 -1
- package/esm/sdk/models/dto-customer-response.js +2 -0
- package/esm/sdk/models/dto-customer-response.js.map +1 -1
- package/esm/sdk/models/dto-invoice-response.d.ts +4 -0
- package/esm/sdk/models/dto-invoice-response.d.ts.map +1 -1
- package/esm/sdk/models/dto-invoice-response.js +2 -0
- package/esm/sdk/models/dto-invoice-response.js.map +1 -1
- package/esm/sdk/models/dto-link-integration-mapping-request.d.ts +25 -0
- package/esm/sdk/models/dto-link-integration-mapping-request.d.ts.map +1 -0
- package/esm/sdk/models/{dto-create-entity-integration-mapping-request.js → dto-link-integration-mapping-request.js} +4 -4
- package/esm/sdk/models/dto-link-integration-mapping-request.js.map +1 -0
- package/esm/sdk/models/dto-link-integration-mapping-response.d.ts +11 -0
- package/esm/sdk/models/dto-link-integration-mapping-response.d.ts.map +1 -0
- package/esm/sdk/models/dto-link-integration-mapping-response.js +15 -0
- package/esm/sdk/models/dto-link-integration-mapping-response.js.map +1 -0
- package/esm/sdk/models/dto-update-customer-request.d.ts +0 -6
- package/esm/sdk/models/dto-update-customer-request.d.ts.map +1 -1
- package/esm/sdk/models/dto-update-customer-request.js +0 -3
- package/esm/sdk/models/dto-update-customer-request.js.map +1 -1
- package/esm/sdk/models/index.d.ts +3 -8
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +3 -8
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/invoice-status.d.ts +1 -0
- package/esm/sdk/models/invoice-status.d.ts.map +1 -1
- package/esm/sdk/models/invoice-status.js +1 -0
- package/esm/sdk/models/invoice-status.js.map +1 -1
- package/esm/sdk/models/schedule-draft-finalization-op.d.ts +11 -0
- package/esm/sdk/models/schedule-draft-finalization-op.d.ts.map +1 -0
- package/esm/sdk/models/schedule-draft-finalization-op.js +11 -0
- package/esm/sdk/models/schedule-draft-finalization-op.js.map +1 -0
- package/esm/sdk/models/scheduled-task-interval.d.ts +1 -0
- package/esm/sdk/models/scheduled-task-interval.d.ts.map +1 -1
- package/esm/sdk/models/scheduled-task-interval.js +1 -0
- package/esm/sdk/models/scheduled-task-interval.js.map +1 -1
- package/esm/sdk/models/secret-provider.d.ts +0 -2
- package/esm/sdk/models/secret-provider.d.ts.map +1 -1
- package/esm/sdk/models/secret-provider.js +0 -2
- package/esm/sdk/models/secret-provider.js.map +1 -1
- package/esm/sdk/scheduled-tasks.d.ts +7 -0
- package/esm/sdk/scheduled-tasks.d.ts.map +1 -1
- package/esm/sdk/scheduled-tasks.js +10 -0
- package/esm/sdk/scheduled-tasks.js.map +1 -1
- package/esm/sdk/sdk.d.ts +2 -5
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +4 -9
- package/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/coupons-create-coupon.ts +3 -1
- package/src/funcs/coupons-delete-coupon.ts +3 -1
- package/src/funcs/coupons-update-coupon.ts +3 -1
- package/src/funcs/credit-notes-create-credit-note.ts +3 -1
- package/src/funcs/credit-notes-process-credit-note.ts +3 -1
- package/src/funcs/credit-notes-void-credit-note.ts +3 -1
- package/src/funcs/{entity-integration-mappings-create-entity-integration-mapping.ts → integrations-link-integration-mapping.ts} +14 -17
- package/src/funcs/{integrations-list-linked-integrations.ts → scheduled-tasks-schedule-draft-finalization.ts} +12 -11
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +14 -2
- package/src/sdk/integrations.ts +8 -62
- package/src/sdk/models/dto-create-customer-request.ts +0 -16
- package/src/sdk/models/dto-customer-response.ts +8 -0
- package/src/sdk/models/dto-invoice-response.ts +6 -0
- package/src/sdk/models/dto-link-integration-mapping-request.ts +59 -0
- package/src/sdk/models/dto-link-integration-mapping-response.ts +35 -0
- package/src/sdk/models/dto-update-customer-request.ts +0 -16
- package/src/sdk/models/index.ts +3 -8
- package/src/sdk/models/invoice-status.ts +1 -0
- package/src/sdk/models/schedule-draft-finalization-op.ts +29 -0
- package/src/sdk/models/scheduled-task-interval.ts +1 -0
- package/src/sdk/models/secret-provider.ts +0 -5
- package/src/sdk/scheduled-tasks.ts +16 -0
- package/src/sdk/sdk.ts +5 -13
- package/docs/sdk/models/create-or-update-integration-request.md +0 -26
- package/docs/sdk/models/delete-entity-integration-mapping-request.md +0 -17
- package/docs/sdk/models/delete-integration-request.md +0 -17
- package/docs/sdk/models/dto-create-integration-request.md +0 -21
- package/docs/sdk/models/dto-integration-entity-mapping.md +0 -21
- package/docs/sdk/models/dto-linked-integrations-response.md +0 -15
- package/docs/sdk/models/get-integration-request.md +0 -17
- package/docs/sdk/models/provider.md +0 -17
- package/docs/sdks/entityintegrationmappings/README.md +0 -160
- package/esm/funcs/entity-integration-mappings-create-entity-integration-mapping.d.ts +0 -17
- package/esm/funcs/entity-integration-mappings-create-entity-integration-mapping.d.ts.map +0 -1
- package/esm/funcs/entity-integration-mappings-create-entity-integration-mapping.js.map +0 -1
- package/esm/funcs/entity-integration-mappings-delete-entity-integration-mapping.d.ts +0 -17
- package/esm/funcs/entity-integration-mappings-delete-entity-integration-mapping.d.ts.map +0 -1
- package/esm/funcs/entity-integration-mappings-delete-entity-integration-mapping.js +0 -90
- package/esm/funcs/entity-integration-mappings-delete-entity-integration-mapping.js.map +0 -1
- package/esm/funcs/integrations-create-or-update-integration.d.ts +0 -17
- package/esm/funcs/integrations-create-or-update-integration.d.ts.map +0 -1
- package/esm/funcs/integrations-create-or-update-integration.js +0 -92
- package/esm/funcs/integrations-create-or-update-integration.js.map +0 -1
- package/esm/funcs/integrations-delete-integration.d.ts +0 -17
- package/esm/funcs/integrations-delete-integration.d.ts.map +0 -1
- package/esm/funcs/integrations-delete-integration.js +0 -90
- package/esm/funcs/integrations-delete-integration.js.map +0 -1
- package/esm/funcs/integrations-get-integration.d.ts.map +0 -1
- package/esm/funcs/integrations-get-integration.js +0 -90
- package/esm/funcs/integrations-get-integration.js.map +0 -1
- package/esm/funcs/integrations-list-linked-integrations.d.ts +0 -17
- package/esm/funcs/integrations-list-linked-integrations.d.ts.map +0 -1
- package/esm/funcs/integrations-list-linked-integrations.js.map +0 -1
- package/esm/sdk/entity-integration-mappings.d.ts +0 -19
- package/esm/sdk/entity-integration-mappings.d.ts.map +0 -1
- package/esm/sdk/entity-integration-mappings.js +0 -28
- package/esm/sdk/entity-integration-mappings.js.map +0 -1
- package/esm/sdk/models/create-or-update-integration-op.d.ts +0 -21
- package/esm/sdk/models/create-or-update-integration-op.d.ts.map +0 -1
- package/esm/sdk/models/create-or-update-integration-op.js +0 -14
- package/esm/sdk/models/create-or-update-integration-op.js.map +0 -1
- package/esm/sdk/models/delete-entity-integration-mapping-op.d.ts +0 -15
- package/esm/sdk/models/delete-entity-integration-mapping-op.d.ts.map +0 -1
- package/esm/sdk/models/delete-entity-integration-mapping-op.js +0 -12
- package/esm/sdk/models/delete-entity-integration-mapping-op.js.map +0 -1
- package/esm/sdk/models/delete-integration-op.d.ts +0 -15
- package/esm/sdk/models/delete-integration-op.d.ts.map +0 -1
- package/esm/sdk/models/delete-integration-op.js +0 -12
- package/esm/sdk/models/delete-integration-op.js.map +0 -1
- package/esm/sdk/models/dto-create-entity-integration-mapping-request.d.ts +0 -25
- package/esm/sdk/models/dto-create-entity-integration-mapping-request.d.ts.map +0 -1
- package/esm/sdk/models/dto-create-entity-integration-mapping-request.js.map +0 -1
- package/esm/sdk/models/dto-create-integration-request.d.ts +0 -21
- package/esm/sdk/models/dto-create-integration-request.d.ts.map +0 -1
- package/esm/sdk/models/dto-create-integration-request.js +0 -15
- package/esm/sdk/models/dto-create-integration-request.js.map +0 -1
- package/esm/sdk/models/dto-integration-entity-mapping.d.ts +0 -38
- package/esm/sdk/models/dto-integration-entity-mapping.d.ts.map +0 -1
- package/esm/sdk/models/dto-integration-entity-mapping.js +0 -23
- package/esm/sdk/models/dto-integration-entity-mapping.js.map +0 -1
- package/esm/sdk/models/dto-linked-integrations-response.d.ts +0 -10
- package/esm/sdk/models/dto-linked-integrations-response.d.ts.map +0 -1
- package/esm/sdk/models/dto-linked-integrations-response.js +0 -14
- package/esm/sdk/models/dto-linked-integrations-response.js.map +0 -1
- package/esm/sdk/models/get-integration-op.d.ts +0 -15
- package/esm/sdk/models/get-integration-op.d.ts.map +0 -1
- package/esm/sdk/models/get-integration-op.js +0 -12
- package/esm/sdk/models/get-integration-op.js.map +0 -1
- package/src/funcs/entity-integration-mappings-delete-entity-integration-mapping.ts +0 -183
- package/src/funcs/integrations-create-or-update-integration.ts +0 -187
- package/src/funcs/integrations-delete-integration.ts +0 -179
- package/src/funcs/integrations-get-integration.ts +0 -181
- package/src/sdk/entity-integration-mappings.ts +0 -45
- package/src/sdk/models/create-or-update-integration-op.ts +0 -46
- package/src/sdk/models/delete-entity-integration-mapping-op.ts +0 -36
- package/src/sdk/models/delete-integration-op.ts +0 -33
- package/src/sdk/models/dto-create-entity-integration-mapping-request.ts +0 -61
- package/src/sdk/models/dto-create-integration-request.ts +0 -42
- package/src/sdk/models/dto-integration-entity-mapping.ts +0 -63
- package/src/sdk/models/dto-linked-integrations-response.ts +0 -31
- package/src/sdk/models/get-integration-op.ts +0 -33
package/esm/sdk/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../src/sdk/sdk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../../src/sdk/sdk.ts"],"names":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AAQ,CAAC,EAAC,CAAC;IAAA,CACvD;IAEO,MAAM,CAAS;IACvB,IAAI,KAAK,GAAU;QACjB,OAAO,CAAC,IAAI,CAAC,MAAM,KAAX,IAAI,CAAC,MAAM,GAAK,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACnD;IAEO,cAAc,CAAiB;IACvC,IAAI,aAAa,GAAkB;QACjC,OAAO,CAAC,IAAI,CAAC,cAAc,KAAnB,IAAI,CAAC,cAAc,GAAK,IAAI,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CACnE;IAEO,UAAU,CAAa;IAC/B,IAAI,SAAS,GAAc;QACzB,OAAO,CAAC,IAAI,CAAC,UAAU,KAAf,IAAI,CAAC,UAAU,GAAK,IAAI,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAAA,CAC3D;CACF"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Use when creating a discount (e.g. promo code or referral). Ideal for percent or fixed value, with optional validity and usage limits.
|
|
33
|
+
*
|
|
34
|
+
* This operation requires either {@link Security.apiKeyAuth} or {@link Security.apiKeyAuth} to be set on the `security` parameter when initializing the SDK.
|
|
33
35
|
*/
|
|
34
36
|
export function couponsCreateCoupon(
|
|
35
37
|
client: FlexpriceCore,
|
|
@@ -97,7 +99,7 @@ async function $do(
|
|
|
97
99
|
|
|
98
100
|
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
99
101
|
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
100
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
102
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
101
103
|
|
|
102
104
|
const context = {
|
|
103
105
|
options: client._options,
|
|
@@ -31,6 +31,8 @@ import * as types$ from "../types/primitives.js";
|
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
33
|
* Use when retiring a coupon (e.g. campaign ended). Returns 200 with success message.
|
|
34
|
+
*
|
|
35
|
+
* This operation requires either {@link Security.apiKeyAuth} or {@link Security.apiKeyAuth} to be set on the `security` parameter when initializing the SDK.
|
|
34
36
|
*/
|
|
35
37
|
export function couponsDeleteCoupon(
|
|
36
38
|
client: FlexpriceCore,
|
|
@@ -107,7 +109,7 @@ async function $do(
|
|
|
107
109
|
|
|
108
110
|
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
109
111
|
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
110
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
112
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
111
113
|
|
|
112
114
|
const context = {
|
|
113
115
|
options: client._options,
|
|
@@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Use when changing coupon config (e.g. value, validity, or usage limits).
|
|
33
|
+
*
|
|
34
|
+
* This operation requires either {@link Security.apiKeyAuth} or {@link Security.apiKeyAuth} to be set on the `security` parameter when initializing the SDK.
|
|
33
35
|
*/
|
|
34
36
|
export function couponsUpdateCoupon(
|
|
35
37
|
client: FlexpriceCore,
|
|
@@ -111,7 +113,7 @@ async function $do(
|
|
|
111
113
|
|
|
112
114
|
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
113
115
|
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
114
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
116
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
115
117
|
|
|
116
118
|
const context = {
|
|
117
119
|
options: client._options,
|
|
@@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Use when issuing a refund or adjustment (e.g. customer dispute or proration). Links to an invoice; create as draft then finalize.
|
|
33
|
+
*
|
|
34
|
+
* This operation requires either {@link Security.apiKeyAuth} or {@link Security.apiKeyAuth} to be set on the `security` parameter when initializing the SDK.
|
|
33
35
|
*/
|
|
34
36
|
export function creditNotesCreateCreditNote(
|
|
35
37
|
client: FlexpriceCore,
|
|
@@ -97,7 +99,7 @@ async function $do(
|
|
|
97
99
|
|
|
98
100
|
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
99
101
|
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
100
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
102
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
101
103
|
|
|
102
104
|
const context = {
|
|
103
105
|
options: client._options,
|
|
@@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Use when locking a draft credit note and applying the credit (e.g. after approval). Once finalized, applied per billing provider.
|
|
33
|
+
*
|
|
34
|
+
* This operation requires either {@link Security.apiKeyAuth} or {@link Security.apiKeyAuth} to be set on the `security` parameter when initializing the SDK.
|
|
33
35
|
*/
|
|
34
36
|
export function creditNotesProcessCreditNote(
|
|
35
37
|
client: FlexpriceCore,
|
|
@@ -106,7 +108,7 @@ async function $do(
|
|
|
106
108
|
|
|
107
109
|
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
108
110
|
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
109
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
111
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
110
112
|
|
|
111
113
|
const context = {
|
|
112
114
|
options: client._options,
|
|
@@ -30,6 +30,8 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Use when cancelling a draft credit note (e.g. created by mistake). Only draft credit notes can be voided.
|
|
33
|
+
*
|
|
34
|
+
* This operation requires either {@link Security.apiKeyAuth} or {@link Security.apiKeyAuth} to be set on the `security` parameter when initializing the SDK.
|
|
33
35
|
*/
|
|
34
36
|
export function creditNotesVoidCreditNote(
|
|
35
37
|
client: FlexpriceCore,
|
|
@@ -106,7 +108,7 @@ async function $do(
|
|
|
106
108
|
|
|
107
109
|
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
108
110
|
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
109
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
111
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
110
112
|
|
|
111
113
|
const context = {
|
|
112
114
|
options: client._options,
|
|
@@ -26,18 +26,18 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
26
26
|
import { Result } from "../types/fp.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Link integration mapping
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
*
|
|
32
|
+
* Link a FlexPrice entity to provider entity with provider-specific side effects.
|
|
33
33
|
*/
|
|
34
|
-
export function
|
|
34
|
+
export function integrationsLinkIntegrationMapping(
|
|
35
35
|
client: FlexpriceCore,
|
|
36
|
-
request: models.
|
|
36
|
+
request: models.DtoLinkIntegrationMappingRequest,
|
|
37
37
|
options?: RequestOptions,
|
|
38
38
|
): APIPromise<
|
|
39
39
|
Result<
|
|
40
|
-
models.
|
|
40
|
+
models.DtoLinkIntegrationMappingResponse,
|
|
41
41
|
| models.ErrorsErrorsErrorResponse
|
|
42
42
|
| FlexPriceError
|
|
43
43
|
| ResponseValidationError
|
|
@@ -58,12 +58,12 @@ export function entityIntegrationMappingsCreateEntityIntegrationMapping(
|
|
|
58
58
|
|
|
59
59
|
async function $do(
|
|
60
60
|
client: FlexpriceCore,
|
|
61
|
-
request: models.
|
|
61
|
+
request: models.DtoLinkIntegrationMappingRequest,
|
|
62
62
|
options?: RequestOptions,
|
|
63
63
|
): Promise<
|
|
64
64
|
[
|
|
65
65
|
Result<
|
|
66
|
-
models.
|
|
66
|
+
models.DtoLinkIntegrationMappingResponse,
|
|
67
67
|
| models.ErrorsErrorsErrorResponse
|
|
68
68
|
| FlexPriceError
|
|
69
69
|
| ResponseValidationError
|
|
@@ -80,10 +80,7 @@ async function $do(
|
|
|
80
80
|
const parsed = safeParse(
|
|
81
81
|
request,
|
|
82
82
|
(value) =>
|
|
83
|
-
z.parse(
|
|
84
|
-
models.DtoCreateEntityIntegrationMappingRequest$outboundSchema,
|
|
85
|
-
value,
|
|
86
|
-
),
|
|
83
|
+
z.parse(models.DtoLinkIntegrationMappingRequest$outboundSchema, value),
|
|
87
84
|
"Input validation failed",
|
|
88
85
|
);
|
|
89
86
|
if (!parsed.ok) {
|
|
@@ -92,7 +89,7 @@ async function $do(
|
|
|
92
89
|
const payload = parsed.value;
|
|
93
90
|
const body = encodeJSON("body", payload, { explode: true });
|
|
94
91
|
|
|
95
|
-
const path = pathToFunc("/
|
|
92
|
+
const path = pathToFunc("/integrations/mappings/link")();
|
|
96
93
|
|
|
97
94
|
const headers = new Headers(compactMap({
|
|
98
95
|
"Content-Type": "application/json",
|
|
@@ -106,7 +103,7 @@ async function $do(
|
|
|
106
103
|
const context = {
|
|
107
104
|
options: client._options,
|
|
108
105
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
109
|
-
operationID: "
|
|
106
|
+
operationID: "linkIntegrationMapping",
|
|
110
107
|
oAuth2Scopes: null,
|
|
111
108
|
|
|
112
109
|
resolvedSecurity: requestSecurity,
|
|
@@ -135,7 +132,7 @@ async function $do(
|
|
|
135
132
|
|
|
136
133
|
const doResult = await client._do(req, {
|
|
137
134
|
context,
|
|
138
|
-
errorCodes: ["400", "
|
|
135
|
+
errorCodes: ["400", "4XX", "500", "5XX"],
|
|
139
136
|
retryConfig: context.retryConfig,
|
|
140
137
|
retryCodes: context.retryCodes,
|
|
141
138
|
});
|
|
@@ -149,7 +146,7 @@ async function $do(
|
|
|
149
146
|
};
|
|
150
147
|
|
|
151
148
|
const [result] = await M.match<
|
|
152
|
-
models.
|
|
149
|
+
models.DtoLinkIntegrationMappingResponse,
|
|
153
150
|
| models.ErrorsErrorsErrorResponse
|
|
154
151
|
| FlexPriceError
|
|
155
152
|
| ResponseValidationError
|
|
@@ -160,8 +157,8 @@ async function $do(
|
|
|
160
157
|
| UnexpectedClientError
|
|
161
158
|
| SDKValidationError
|
|
162
159
|
>(
|
|
163
|
-
M.json(
|
|
164
|
-
M.jsonErr(
|
|
160
|
+
M.json(200, models.DtoLinkIntegrationMappingResponse$inboundSchema),
|
|
161
|
+
M.jsonErr(400, models.ErrorsErrorsErrorResponse$inboundSchema),
|
|
165
162
|
M.jsonErr(500, models.ErrorsErrorsErrorResponse$inboundSchema),
|
|
166
163
|
M.fail("4XX"),
|
|
167
164
|
M.fail("5XX"),
|
|
@@ -23,17 +23,17 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
23
23
|
import { Result } from "../types/fp.js";
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Schedule draft finalization
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
|
-
*
|
|
29
|
+
* Triggers the draft invoice finalization workflow that scans computed draft invoices whose finalization delay has elapsed and finalizes them (assign invoice number, sync to vendors, attempt payment).
|
|
30
30
|
*/
|
|
31
|
-
export function
|
|
31
|
+
export function scheduledTasksScheduleDraftFinalization(
|
|
32
32
|
client: FlexpriceCore,
|
|
33
33
|
options?: RequestOptions,
|
|
34
34
|
): APIPromise<
|
|
35
35
|
Result<
|
|
36
|
-
models.
|
|
36
|
+
models.ScheduleDraftFinalizationResponse,
|
|
37
37
|
| models.ErrorsErrorsErrorResponse
|
|
38
38
|
| FlexPriceError
|
|
39
39
|
| ResponseValidationError
|
|
@@ -57,7 +57,7 @@ async function $do(
|
|
|
57
57
|
): Promise<
|
|
58
58
|
[
|
|
59
59
|
Result<
|
|
60
|
-
models.
|
|
60
|
+
models.ScheduleDraftFinalizationResponse,
|
|
61
61
|
| models.ErrorsErrorsErrorResponse
|
|
62
62
|
| FlexPriceError
|
|
63
63
|
| ResponseValidationError
|
|
@@ -71,7 +71,7 @@ async function $do(
|
|
|
71
71
|
APICall,
|
|
72
72
|
]
|
|
73
73
|
> {
|
|
74
|
-
const path = pathToFunc("/
|
|
74
|
+
const path = pathToFunc("/tasks/scheduled/schedule-draft-finalization")();
|
|
75
75
|
|
|
76
76
|
const headers = new Headers(compactMap({
|
|
77
77
|
Accept: "application/json",
|
|
@@ -84,7 +84,7 @@ async function $do(
|
|
|
84
84
|
const context = {
|
|
85
85
|
options: client._options,
|
|
86
86
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
87
|
-
operationID: "
|
|
87
|
+
operationID: "scheduleDraftFinalization",
|
|
88
88
|
oAuth2Scopes: null,
|
|
89
89
|
|
|
90
90
|
resolvedSecurity: requestSecurity,
|
|
@@ -98,7 +98,7 @@ async function $do(
|
|
|
98
98
|
|
|
99
99
|
const requestRes = client._createRequest(context, {
|
|
100
100
|
security: requestSecurity,
|
|
101
|
-
method: "
|
|
101
|
+
method: "POST",
|
|
102
102
|
baseURL: options?.serverURL,
|
|
103
103
|
path: path,
|
|
104
104
|
headers: headers,
|
|
@@ -112,7 +112,7 @@ async function $do(
|
|
|
112
112
|
|
|
113
113
|
const doResult = await client._do(req, {
|
|
114
114
|
context,
|
|
115
|
-
errorCodes: ["4XX", "500", "5XX"],
|
|
115
|
+
errorCodes: ["400", "4XX", "500", "5XX"],
|
|
116
116
|
retryConfig: context.retryConfig,
|
|
117
117
|
retryCodes: context.retryCodes,
|
|
118
118
|
});
|
|
@@ -126,7 +126,7 @@ async function $do(
|
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
const [result] = await M.match<
|
|
129
|
-
models.
|
|
129
|
+
models.ScheduleDraftFinalizationResponse,
|
|
130
130
|
| models.ErrorsErrorsErrorResponse
|
|
131
131
|
| FlexPriceError
|
|
132
132
|
| ResponseValidationError
|
|
@@ -137,7 +137,8 @@ async function $do(
|
|
|
137
137
|
| UnexpectedClientError
|
|
138
138
|
| SDKValidationError
|
|
139
139
|
>(
|
|
140
|
-
M.json(200, models.
|
|
140
|
+
M.json(200, models.ScheduleDraftFinalizationResponse$inboundSchema),
|
|
141
|
+
M.jsonErr(400, models.ErrorsErrorsErrorResponse$inboundSchema),
|
|
141
142
|
M.jsonErr(500, models.ErrorsErrorsErrorResponse$inboundSchema),
|
|
142
143
|
M.fail("4XX"),
|
|
143
144
|
M.fail("5XX"),
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.0",
|
|
68
|
-
sdkVersion: "2.0.
|
|
69
|
-
genVersion: "2.
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 2.0.
|
|
68
|
+
sdkVersion: "2.0.13",
|
|
69
|
+
genVersion: "2.879.1",
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 2.0.13 2.879.1 1.0 @flexprice/sdk",
|
|
71
71
|
} as const;
|
package/src/lib/security.ts
CHANGED
|
@@ -239,8 +239,9 @@ function applyBearer(
|
|
|
239
239
|
|
|
240
240
|
export function resolveGlobalSecurity(
|
|
241
241
|
security: Partial<models.Security> | null | undefined,
|
|
242
|
+
allowedFields?: number[],
|
|
242
243
|
): SecurityState | null {
|
|
243
|
-
|
|
244
|
+
let inputs: SecurityInput[][] = [
|
|
244
245
|
[
|
|
245
246
|
{
|
|
246
247
|
fieldName: "x-api-key",
|
|
@@ -248,7 +249,18 @@ export function resolveGlobalSecurity(
|
|
|
248
249
|
value: security?.apiKeyAuth,
|
|
249
250
|
},
|
|
250
251
|
],
|
|
251
|
-
|
|
252
|
+
];
|
|
253
|
+
|
|
254
|
+
if (allowedFields) {
|
|
255
|
+
inputs = allowedFields.map((i) => {
|
|
256
|
+
if (i < 0 || i >= inputs.length) {
|
|
257
|
+
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
258
|
+
}
|
|
259
|
+
return inputs[i]!;
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return resolveSecurity(...inputs);
|
|
252
264
|
}
|
|
253
265
|
|
|
254
266
|
export async function extractSecurity<
|
package/src/sdk/integrations.ts
CHANGED
|
@@ -2,79 +2,25 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { integrationsDeleteIntegration } from "../funcs/integrations-delete-integration.js";
|
|
7
|
-
import { integrationsGetIntegration } from "../funcs/integrations-get-integration.js";
|
|
8
|
-
import { integrationsListLinkedIntegrations } from "../funcs/integrations-list-linked-integrations.js";
|
|
5
|
+
import { integrationsLinkIntegrationMapping } from "../funcs/integrations-link-integration-mapping.js";
|
|
9
6
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
7
|
import { unwrapAsync } from "../types/fp.js";
|
|
11
8
|
import * as models from "./models/index.js";
|
|
12
9
|
|
|
13
10
|
export class Integrations extends ClientSDK {
|
|
14
11
|
/**
|
|
15
|
-
*
|
|
12
|
+
* Link integration mapping
|
|
16
13
|
*
|
|
17
14
|
* @remarks
|
|
18
|
-
*
|
|
15
|
+
* Link a FlexPrice entity to provider entity with provider-specific side effects.
|
|
19
16
|
*/
|
|
20
|
-
async
|
|
21
|
-
|
|
17
|
+
async linkIntegrationMapping(
|
|
18
|
+
request: models.DtoLinkIntegrationMappingRequest,
|
|
22
19
|
options?: RequestOptions,
|
|
23
|
-
): Promise<models.
|
|
24
|
-
return unwrapAsync(
|
|
20
|
+
): Promise<models.DtoLinkIntegrationMappingResponse> {
|
|
21
|
+
return unwrapAsync(integrationsLinkIntegrationMapping(
|
|
25
22
|
this,
|
|
26
|
-
|
|
27
|
-
options,
|
|
28
|
-
));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Create or update an integration
|
|
33
|
-
*
|
|
34
|
-
* @remarks
|
|
35
|
-
* Use when storing or updating credentials for an external integration (e.g. Stripe, HubSpot). Secrets are encrypted at rest.
|
|
36
|
-
*/
|
|
37
|
-
async createOrUpdateIntegration(
|
|
38
|
-
provider: string,
|
|
39
|
-
body: models.DtoCreateIntegrationRequest,
|
|
40
|
-
options?: RequestOptions,
|
|
41
|
-
): Promise<models.DtoSecretResponse> {
|
|
42
|
-
return unwrapAsync(integrationsCreateOrUpdateIntegration(
|
|
43
|
-
this,
|
|
44
|
-
provider,
|
|
45
|
-
body,
|
|
46
|
-
options,
|
|
47
|
-
));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* List linked integrations
|
|
52
|
-
*
|
|
53
|
-
* @remarks
|
|
54
|
-
* Use when showing which integrations are connected (e.g. settings page). Returns providers that have valid linked credentials.
|
|
55
|
-
*/
|
|
56
|
-
async listLinkedIntegrations(
|
|
57
|
-
options?: RequestOptions,
|
|
58
|
-
): Promise<models.DtoLinkedIntegrationsResponse> {
|
|
59
|
-
return unwrapAsync(integrationsListLinkedIntegrations(
|
|
60
|
-
this,
|
|
61
|
-
options,
|
|
62
|
-
));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Delete an integration
|
|
67
|
-
*
|
|
68
|
-
* @remarks
|
|
69
|
-
* Use when disconnecting an integration (e.g. switching provider or removing OAuth). Deletes stored credentials.
|
|
70
|
-
*/
|
|
71
|
-
async deleteIntegration(
|
|
72
|
-
id: string,
|
|
73
|
-
options?: RequestOptions,
|
|
74
|
-
): Promise<void> {
|
|
75
|
-
return unwrapAsync(integrationsDeleteIntegration(
|
|
76
|
-
this,
|
|
77
|
-
id,
|
|
23
|
+
request,
|
|
78
24
|
options,
|
|
79
25
|
));
|
|
80
26
|
}
|
|
@@ -4,11 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import {
|
|
8
|
-
DtoIntegrationEntityMapping,
|
|
9
|
-
DtoIntegrationEntityMapping$Outbound,
|
|
10
|
-
DtoIntegrationEntityMapping$outboundSchema,
|
|
11
|
-
} from "./dto-integration-entity-mapping.js";
|
|
12
7
|
import {
|
|
13
8
|
DtoTaxRateOverride,
|
|
14
9
|
DtoTaxRateOverride$Outbound,
|
|
@@ -51,10 +46,6 @@ export type DtoCreateCustomerRequest = {
|
|
|
51
46
|
* external_id is the unique identifier from your system to reference this customer (required)
|
|
52
47
|
*/
|
|
53
48
|
externalId: string;
|
|
54
|
-
/**
|
|
55
|
-
* integration_entity_mapping contains provider integration mappings for this customer
|
|
56
|
-
*/
|
|
57
|
-
integrationEntityMapping?: Array<DtoIntegrationEntityMapping> | undefined;
|
|
58
49
|
/**
|
|
59
50
|
* metadata contains additional key-value pairs for storing extra information
|
|
60
51
|
*/
|
|
@@ -103,9 +94,6 @@ export type DtoCreateCustomerRequest$Outbound = {
|
|
|
103
94
|
address_state?: string | undefined;
|
|
104
95
|
email?: string | undefined;
|
|
105
96
|
external_id: string;
|
|
106
|
-
integration_entity_mapping?:
|
|
107
|
-
| Array<DtoIntegrationEntityMapping$Outbound>
|
|
108
|
-
| undefined;
|
|
109
97
|
metadata?: { [k: string]: string } | undefined;
|
|
110
98
|
name?: string | undefined;
|
|
111
99
|
parent_customer_external_id?: string | undefined;
|
|
@@ -128,9 +116,6 @@ export const DtoCreateCustomerRequest$outboundSchema: z.ZodMiniType<
|
|
|
128
116
|
addressState: z.optional(z.string()),
|
|
129
117
|
email: z.optional(z.string()),
|
|
130
118
|
externalId: z.string(),
|
|
131
|
-
integrationEntityMapping: z.optional(
|
|
132
|
-
z.array(DtoIntegrationEntityMapping$outboundSchema),
|
|
133
|
-
),
|
|
134
119
|
metadata: z.optional(z.record(z.string(), z.string())),
|
|
135
120
|
name: z.optional(z.string()),
|
|
136
121
|
parentCustomerExternalId: z.optional(z.string()),
|
|
@@ -147,7 +132,6 @@ export const DtoCreateCustomerRequest$outboundSchema: z.ZodMiniType<
|
|
|
147
132
|
addressPostalCode: "address_postal_code",
|
|
148
133
|
addressState: "address_state",
|
|
149
134
|
externalId: "external_id",
|
|
150
|
-
integrationEntityMapping: "integration_entity_mapping",
|
|
151
135
|
parentCustomerExternalId: "parent_customer_external_id",
|
|
152
136
|
parentCustomerId: "parent_customer_id",
|
|
153
137
|
skipOnboardingWorkflow: "skip_onboarding_workflow",
|
|
@@ -7,6 +7,10 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import * as types from "../../types/primitives.js";
|
|
10
|
+
import {
|
|
11
|
+
DtoEntityIntegrationMappingResponse,
|
|
12
|
+
DtoEntityIntegrationMappingResponse$inboundSchema,
|
|
13
|
+
} from "./dto-entity-integration-mapping-response.js";
|
|
10
14
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
11
15
|
import { Status, Status$inboundSchema } from "./status.js";
|
|
12
16
|
|
|
@@ -56,6 +60,7 @@ export type DtoCustomerResponse = {
|
|
|
56
60
|
* ID is the unique identifier for the customer
|
|
57
61
|
*/
|
|
58
62
|
id?: string | undefined;
|
|
63
|
+
integrations?: Array<DtoEntityIntegrationMappingResponse> | undefined;
|
|
59
64
|
/**
|
|
60
65
|
* Metadata
|
|
61
66
|
*/
|
|
@@ -100,6 +105,9 @@ export const DtoCustomerResponse$inboundSchema: z.ZodMiniType<
|
|
|
100
105
|
environment_id: types.optional(types.string()),
|
|
101
106
|
external_id: types.optional(types.string()),
|
|
102
107
|
id: types.optional(types.string()),
|
|
108
|
+
integrations: types.optional(
|
|
109
|
+
z.array(DtoEntityIntegrationMappingResponse$inboundSchema),
|
|
110
|
+
),
|
|
103
111
|
metadata: types.optional(z.record(z.string(), types.string())),
|
|
104
112
|
name: types.optional(types.string()),
|
|
105
113
|
parent_customer: types.optional(
|
|
@@ -123,6 +123,10 @@ export type DtoInvoiceResponse = {
|
|
|
123
123
|
invoicePdfUrl?: string | undefined;
|
|
124
124
|
invoiceStatus?: InvoiceStatus | undefined;
|
|
125
125
|
invoiceType?: InvoiceType | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* last_computed_at is the timestamp when this invoice was last computed by ComputeInvoice
|
|
128
|
+
*/
|
|
129
|
+
lastComputedAt?: string | undefined;
|
|
126
130
|
/**
|
|
127
131
|
* line_items contains the individual items that make up this invoice (overrides embedded field)
|
|
128
132
|
*/
|
|
@@ -233,6 +237,7 @@ export const DtoInvoiceResponse$inboundSchema: z.ZodMiniType<
|
|
|
233
237
|
invoice_pdf_url: types.optional(types.string()),
|
|
234
238
|
invoice_status: types.optional(InvoiceStatus$inboundSchema),
|
|
235
239
|
invoice_type: types.optional(InvoiceType$inboundSchema),
|
|
240
|
+
last_computed_at: types.optional(types.string()),
|
|
236
241
|
line_items: types.optional(
|
|
237
242
|
z.array(DtoInvoiceLineItemResponse$inboundSchema),
|
|
238
243
|
),
|
|
@@ -282,6 +287,7 @@ export const DtoInvoiceResponse$inboundSchema: z.ZodMiniType<
|
|
|
282
287
|
"invoice_pdf_url": "invoicePdfUrl",
|
|
283
288
|
"invoice_status": "invoiceStatus",
|
|
284
289
|
"invoice_type": "invoiceType",
|
|
290
|
+
"last_computed_at": "lastComputedAt",
|
|
285
291
|
"line_items": "lineItems",
|
|
286
292
|
"overpaid_amount": "overpaidAmount",
|
|
287
293
|
"paid_at": "paidAt",
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import {
|
|
8
|
+
IntegrationEntityType,
|
|
9
|
+
IntegrationEntityType$outboundSchema,
|
|
10
|
+
} from "./integration-entity-type.js";
|
|
11
|
+
|
|
12
|
+
export type DtoLinkIntegrationMappingRequest = {
|
|
13
|
+
entityId: string;
|
|
14
|
+
entityType: IntegrationEntityType;
|
|
15
|
+
metadata?: { [k: string]: any } | undefined;
|
|
16
|
+
providerEntityId: string;
|
|
17
|
+
providerType: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export type DtoLinkIntegrationMappingRequest$Outbound = {
|
|
22
|
+
entity_id: string;
|
|
23
|
+
entity_type: string;
|
|
24
|
+
metadata?: { [k: string]: any } | undefined;
|
|
25
|
+
provider_entity_id: string;
|
|
26
|
+
provider_type: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const DtoLinkIntegrationMappingRequest$outboundSchema: z.ZodMiniType<
|
|
31
|
+
DtoLinkIntegrationMappingRequest$Outbound,
|
|
32
|
+
DtoLinkIntegrationMappingRequest
|
|
33
|
+
> = z.pipe(
|
|
34
|
+
z.object({
|
|
35
|
+
entityId: z.string(),
|
|
36
|
+
entityType: IntegrationEntityType$outboundSchema,
|
|
37
|
+
metadata: z.optional(z.record(z.string(), z.any())),
|
|
38
|
+
providerEntityId: z.string(),
|
|
39
|
+
providerType: z.string(),
|
|
40
|
+
}),
|
|
41
|
+
z.transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
entityId: "entity_id",
|
|
44
|
+
entityType: "entity_type",
|
|
45
|
+
providerEntityId: "provider_entity_id",
|
|
46
|
+
providerType: "provider_type",
|
|
47
|
+
});
|
|
48
|
+
}),
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
export function dtoLinkIntegrationMappingRequestToJSON(
|
|
52
|
+
dtoLinkIntegrationMappingRequest: DtoLinkIntegrationMappingRequest,
|
|
53
|
+
): string {
|
|
54
|
+
return JSON.stringify(
|
|
55
|
+
DtoLinkIntegrationMappingRequest$outboundSchema.parse(
|
|
56
|
+
dtoLinkIntegrationMappingRequest,
|
|
57
|
+
),
|
|
58
|
+
);
|
|
59
|
+
}
|