@apideck/unify 0.13.1 → 0.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/README.md +0 -13
  2. package/docs/sdks/ageddebtors/README.md +2 -0
  3. package/docs/sdks/pipelines/README.md +0 -542
  4. package/lib/config.d.ts +2 -2
  5. package/lib/config.js +2 -2
  6. package/models/components/ageddebtors.d.ts +3 -3
  7. package/models/components/ageddebtors.d.ts.map +1 -1
  8. package/models/components/ageddebtors.js +5 -3
  9. package/models/components/ageddebtors.js.map +1 -1
  10. package/models/components/agedreportfilter.d.ts +5 -0
  11. package/models/components/agedreportfilter.d.ts.map +1 -1
  12. package/models/components/agedreportfilter.js +4 -0
  13. package/models/components/agedreportfilter.js.map +1 -1
  14. package/models/components/balancebyperiod.d.ts +6 -6
  15. package/models/components/balancebyperiod.d.ts.map +1 -1
  16. package/models/components/balancebyperiod.js +6 -4
  17. package/models/components/balancebyperiod.js.map +1 -1
  18. package/models/components/balancebytransaction.d.ts +8 -3
  19. package/models/components/balancebytransaction.d.ts.map +1 -1
  20. package/models/components/balancebytransaction.js +5 -1
  21. package/models/components/balancebytransaction.js.map +1 -1
  22. package/models/components/bill.d.ts +5 -0
  23. package/models/components/bill.d.ts.map +1 -1
  24. package/models/components/bill.js +9 -0
  25. package/models/components/bill.js.map +1 -1
  26. package/models/components/index.d.ts +1 -8
  27. package/models/components/index.d.ts.map +1 -1
  28. package/models/components/index.js +1 -8
  29. package/models/components/index.js.map +1 -1
  30. package/models/components/ledgeraccount.d.ts +5 -0
  31. package/models/components/ledgeraccount.d.ts.map +1 -1
  32. package/models/components/ledgeraccount.js +9 -0
  33. package/models/components/ledgeraccount.js.map +1 -1
  34. package/models/components/outstandingbalancebycurrency.d.ts +5 -0
  35. package/models/components/outstandingbalancebycurrency.d.ts.map +1 -1
  36. package/models/components/outstandingbalancebycurrency.js +4 -0
  37. package/models/components/outstandingbalancebycurrency.js.map +1 -1
  38. package/models/components/outstandingbalancebycustomer.d.ts +40 -0
  39. package/models/components/outstandingbalancebycustomer.d.ts.map +1 -0
  40. package/models/components/{outstandingbalance.js → outstandingbalancebycustomer.js} +17 -17
  41. package/models/components/outstandingbalancebycustomer.js.map +1 -0
  42. package/models/components/supplier.d.ts +5 -0
  43. package/models/components/supplier.d.ts.map +1 -1
  44. package/models/components/supplier.js +9 -0
  45. package/models/components/supplier.js.map +1 -1
  46. package/models/operations/index.d.ts +0 -5
  47. package/models/operations/index.d.ts.map +1 -1
  48. package/models/operations/index.js +0 -5
  49. package/models/operations/index.js.map +1 -1
  50. package/package.json +1 -1
  51. package/sdk/accounting.d.ts +0 -3
  52. package/sdk/accounting.d.ts.map +1 -1
  53. package/sdk/accounting.js +0 -4
  54. package/sdk/accounting.js.map +1 -1
  55. package/sdk/pipelines.d.ts +0 -28
  56. package/sdk/pipelines.d.ts.map +1 -1
  57. package/sdk/pipelines.js +0 -41
  58. package/sdk/pipelines.js.map +1 -1
  59. package/src/lib/config.ts +2 -2
  60. package/src/models/components/ageddebtors.ts +13 -9
  61. package/src/models/components/agedreportfilter.ts +9 -0
  62. package/src/models/components/balancebyperiod.ts +12 -10
  63. package/src/models/components/balancebytransaction.ts +10 -1
  64. package/src/models/components/bill.ts +18 -0
  65. package/src/models/components/index.ts +1 -8
  66. package/src/models/components/ledgeraccount.ts +18 -0
  67. package/src/models/components/outstandingbalancebycurrency.ts +9 -0
  68. package/src/models/components/{outstandingbalance.ts → outstandingbalancebycustomer.ts} +25 -23
  69. package/src/models/components/supplier.ts +18 -0
  70. package/src/models/operations/index.ts +0 -5
  71. package/src/sdk/accounting.ts +0 -6
  72. package/src/sdk/pipelines.ts +0 -73
  73. package/docs/sdks/agedcreditors/README.md +0 -113
  74. package/funcs/accountingAgedCreditorsGet.d.ts +0 -16
  75. package/funcs/accountingAgedCreditorsGet.d.ts.map +0 -1
  76. package/funcs/accountingAgedCreditorsGet.js +0 -122
  77. package/funcs/accountingAgedCreditorsGet.js.map +0 -1
  78. package/funcs/crmPipelinesCreate.d.ts +0 -16
  79. package/funcs/crmPipelinesCreate.d.ts.map +0 -1
  80. package/funcs/crmPipelinesCreate.js +0 -121
  81. package/funcs/crmPipelinesCreate.js.map +0 -1
  82. package/funcs/crmPipelinesDelete.d.ts +0 -16
  83. package/funcs/crmPipelinesDelete.d.ts.map +0 -1
  84. package/funcs/crmPipelinesDelete.js +0 -126
  85. package/funcs/crmPipelinesDelete.js.map +0 -1
  86. package/funcs/crmPipelinesGet.d.ts +0 -16
  87. package/funcs/crmPipelinesGet.d.ts.map +0 -1
  88. package/funcs/crmPipelinesGet.js +0 -127
  89. package/funcs/crmPipelinesGet.js.map +0 -1
  90. package/funcs/crmPipelinesUpdate.d.ts +0 -16
  91. package/funcs/crmPipelinesUpdate.d.ts.map +0 -1
  92. package/funcs/crmPipelinesUpdate.js +0 -127
  93. package/funcs/crmPipelinesUpdate.js.map +0 -1
  94. package/models/components/agedcreditors.d.ts +0 -51
  95. package/models/components/agedcreditors.d.ts.map +0 -1
  96. package/models/components/agedcreditors.js +0 -86
  97. package/models/components/agedcreditors.js.map +0 -1
  98. package/models/components/createpipelineresponse.d.ts +0 -58
  99. package/models/components/createpipelineresponse.d.ts.map +0 -1
  100. package/models/components/createpipelineresponse.js +0 -79
  101. package/models/components/createpipelineresponse.js.map +0 -1
  102. package/models/components/deletepipelineresponse.d.ts +0 -58
  103. package/models/components/deletepipelineresponse.d.ts.map +0 -1
  104. package/models/components/deletepipelineresponse.js +0 -79
  105. package/models/components/deletepipelineresponse.js.map +0 -1
  106. package/models/components/getagedcreditorsresponse.d.ts +0 -58
  107. package/models/components/getagedcreditorsresponse.d.ts.map +0 -1
  108. package/models/components/getagedcreditorsresponse.js +0 -79
  109. package/models/components/getagedcreditorsresponse.js.map +0 -1
  110. package/models/components/getpipelineresponse.d.ts +0 -58
  111. package/models/components/getpipelineresponse.d.ts.map +0 -1
  112. package/models/components/getpipelineresponse.js +0 -79
  113. package/models/components/getpipelineresponse.js.map +0 -1
  114. package/models/components/outstandingbalance.d.ts +0 -40
  115. package/models/components/outstandingbalance.d.ts.map +0 -1
  116. package/models/components/outstandingbalance.js.map +0 -1
  117. package/models/components/pipelineinput.d.ts +0 -117
  118. package/models/components/pipelineinput.d.ts.map +0 -1
  119. package/models/components/pipelineinput.js +0 -133
  120. package/models/components/pipelineinput.js.map +0 -1
  121. package/models/components/updatepipelineresponse.d.ts +0 -58
  122. package/models/components/updatepipelineresponse.d.ts.map +0 -1
  123. package/models/components/updatepipelineresponse.js +0 -79
  124. package/models/components/updatepipelineresponse.js.map +0 -1
  125. package/models/operations/accountingagedcreditorsone.d.ts +0 -125
  126. package/models/operations/accountingagedcreditorsone.d.ts.map +0 -1
  127. package/models/operations/accountingagedcreditorsone.js +0 -153
  128. package/models/operations/accountingagedcreditorsone.js.map +0 -1
  129. package/models/operations/crmpipelinesadd.d.ts +0 -108
  130. package/models/operations/crmpipelinesadd.d.ts.map +0 -1
  131. package/models/operations/crmpipelinesadd.js +0 -149
  132. package/models/operations/crmpipelinesadd.js.map +0 -1
  133. package/models/operations/crmpipelinesdelete.d.ts +0 -111
  134. package/models/operations/crmpipelinesdelete.d.ts.map +0 -1
  135. package/models/operations/crmpipelinesdelete.js +0 -141
  136. package/models/operations/crmpipelinesdelete.js.map +0 -1
  137. package/models/operations/crmpipelinesone.d.ts +0 -116
  138. package/models/operations/crmpipelinesone.d.ts.map +0 -1
  139. package/models/operations/crmpipelinesone.js +0 -141
  140. package/models/operations/crmpipelinesone.js.map +0 -1
  141. package/models/operations/crmpipelinesupdate.d.ts +0 -113
  142. package/models/operations/crmpipelinesupdate.d.ts.map +0 -1
  143. package/models/operations/crmpipelinesupdate.js +0 -151
  144. package/models/operations/crmpipelinesupdate.js.map +0 -1
  145. package/sdk/agedcreditors.d.ts +0 -12
  146. package/sdk/agedcreditors.d.ts.map +0 -1
  147. package/sdk/agedcreditors.js +0 -22
  148. package/sdk/agedcreditors.js.map +0 -1
  149. package/src/funcs/accountingAgedCreditorsGet.ts +0 -193
  150. package/src/funcs/crmPipelinesCreate.ts +0 -179
  151. package/src/funcs/crmPipelinesDelete.ts +0 -185
  152. package/src/funcs/crmPipelinesGet.ts +0 -186
  153. package/src/funcs/crmPipelinesUpdate.ts +0 -186
  154. package/src/models/components/agedcreditors.ts +0 -116
  155. package/src/models/components/createpipelineresponse.ts +0 -119
  156. package/src/models/components/deletepipelineresponse.ts +0 -119
  157. package/src/models/components/getagedcreditorsresponse.ts +0 -119
  158. package/src/models/components/getpipelineresponse.ts +0 -119
  159. package/src/models/components/pipelineinput.ts +0 -233
  160. package/src/models/components/updatepipelineresponse.ts +0 -119
  161. package/src/models/operations/accountingagedcreditorsone.ts +0 -277
  162. package/src/models/operations/crmpipelinesadd.ts +0 -250
  163. package/src/models/operations/crmpipelinesdelete.ts +0 -245
  164. package/src/models/operations/crmpipelinesone.ts +0 -248
  165. package/src/models/operations/crmpipelinesupdate.ts +0 -257
  166. package/src/sdk/agedcreditors.ts +0 -27
@@ -1,119 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- UnifiedId,
12
- UnifiedId$inboundSchema,
13
- UnifiedId$Outbound,
14
- UnifiedId$outboundSchema,
15
- } from "./unifiedid.js";
16
-
17
- /**
18
- * Pipeline created
19
- */
20
- export type CreatePipelineResponse = {
21
- /**
22
- * HTTP Response Status Code
23
- */
24
- statusCode: number;
25
- /**
26
- * HTTP Response Status
27
- */
28
- status: string;
29
- /**
30
- * Apideck ID of service provider
31
- */
32
- service: string;
33
- /**
34
- * Unified API resource name
35
- */
36
- resource: string;
37
- /**
38
- * Operation performed
39
- */
40
- operation: string;
41
- data: UnifiedId;
42
- };
43
-
44
- /** @internal */
45
- export const CreatePipelineResponse$inboundSchema: z.ZodType<
46
- CreatePipelineResponse,
47
- z.ZodTypeDef,
48
- unknown
49
- > = z.object({
50
- status_code: z.number().int(),
51
- status: z.string(),
52
- service: z.string(),
53
- resource: z.string(),
54
- operation: z.string(),
55
- data: UnifiedId$inboundSchema,
56
- }).transform((v) => {
57
- return remap$(v, {
58
- "status_code": "statusCode",
59
- });
60
- });
61
-
62
- /** @internal */
63
- export type CreatePipelineResponse$Outbound = {
64
- status_code: number;
65
- status: string;
66
- service: string;
67
- resource: string;
68
- operation: string;
69
- data: UnifiedId$Outbound;
70
- };
71
-
72
- /** @internal */
73
- export const CreatePipelineResponse$outboundSchema: z.ZodType<
74
- CreatePipelineResponse$Outbound,
75
- z.ZodTypeDef,
76
- CreatePipelineResponse
77
- > = z.object({
78
- statusCode: z.number().int(),
79
- status: z.string(),
80
- service: z.string(),
81
- resource: z.string(),
82
- operation: z.string(),
83
- data: UnifiedId$outboundSchema,
84
- }).transform((v) => {
85
- return remap$(v, {
86
- statusCode: "status_code",
87
- });
88
- });
89
-
90
- /**
91
- * @internal
92
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
93
- */
94
- export namespace CreatePipelineResponse$ {
95
- /** @deprecated use `CreatePipelineResponse$inboundSchema` instead. */
96
- export const inboundSchema = CreatePipelineResponse$inboundSchema;
97
- /** @deprecated use `CreatePipelineResponse$outboundSchema` instead. */
98
- export const outboundSchema = CreatePipelineResponse$outboundSchema;
99
- /** @deprecated use `CreatePipelineResponse$Outbound` instead. */
100
- export type Outbound = CreatePipelineResponse$Outbound;
101
- }
102
-
103
- export function createPipelineResponseToJSON(
104
- createPipelineResponse: CreatePipelineResponse,
105
- ): string {
106
- return JSON.stringify(
107
- CreatePipelineResponse$outboundSchema.parse(createPipelineResponse),
108
- );
109
- }
110
-
111
- export function createPipelineResponseFromJSON(
112
- jsonString: string,
113
- ): SafeParseResult<CreatePipelineResponse, SDKValidationError> {
114
- return safeParse(
115
- jsonString,
116
- (x) => CreatePipelineResponse$inboundSchema.parse(JSON.parse(x)),
117
- `Failed to parse 'CreatePipelineResponse' from JSON`,
118
- );
119
- }
@@ -1,119 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- UnifiedId,
12
- UnifiedId$inboundSchema,
13
- UnifiedId$Outbound,
14
- UnifiedId$outboundSchema,
15
- } from "./unifiedid.js";
16
-
17
- /**
18
- * Pipeline deleted
19
- */
20
- export type DeletePipelineResponse = {
21
- /**
22
- * HTTP Response Status Code
23
- */
24
- statusCode: number;
25
- /**
26
- * HTTP Response Status
27
- */
28
- status: string;
29
- /**
30
- * Apideck ID of service provider
31
- */
32
- service: string;
33
- /**
34
- * Unified API resource name
35
- */
36
- resource: string;
37
- /**
38
- * Operation performed
39
- */
40
- operation: string;
41
- data: UnifiedId;
42
- };
43
-
44
- /** @internal */
45
- export const DeletePipelineResponse$inboundSchema: z.ZodType<
46
- DeletePipelineResponse,
47
- z.ZodTypeDef,
48
- unknown
49
- > = z.object({
50
- status_code: z.number().int(),
51
- status: z.string(),
52
- service: z.string(),
53
- resource: z.string(),
54
- operation: z.string(),
55
- data: UnifiedId$inboundSchema,
56
- }).transform((v) => {
57
- return remap$(v, {
58
- "status_code": "statusCode",
59
- });
60
- });
61
-
62
- /** @internal */
63
- export type DeletePipelineResponse$Outbound = {
64
- status_code: number;
65
- status: string;
66
- service: string;
67
- resource: string;
68
- operation: string;
69
- data: UnifiedId$Outbound;
70
- };
71
-
72
- /** @internal */
73
- export const DeletePipelineResponse$outboundSchema: z.ZodType<
74
- DeletePipelineResponse$Outbound,
75
- z.ZodTypeDef,
76
- DeletePipelineResponse
77
- > = z.object({
78
- statusCode: z.number().int(),
79
- status: z.string(),
80
- service: z.string(),
81
- resource: z.string(),
82
- operation: z.string(),
83
- data: UnifiedId$outboundSchema,
84
- }).transform((v) => {
85
- return remap$(v, {
86
- statusCode: "status_code",
87
- });
88
- });
89
-
90
- /**
91
- * @internal
92
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
93
- */
94
- export namespace DeletePipelineResponse$ {
95
- /** @deprecated use `DeletePipelineResponse$inboundSchema` instead. */
96
- export const inboundSchema = DeletePipelineResponse$inboundSchema;
97
- /** @deprecated use `DeletePipelineResponse$outboundSchema` instead. */
98
- export const outboundSchema = DeletePipelineResponse$outboundSchema;
99
- /** @deprecated use `DeletePipelineResponse$Outbound` instead. */
100
- export type Outbound = DeletePipelineResponse$Outbound;
101
- }
102
-
103
- export function deletePipelineResponseToJSON(
104
- deletePipelineResponse: DeletePipelineResponse,
105
- ): string {
106
- return JSON.stringify(
107
- DeletePipelineResponse$outboundSchema.parse(deletePipelineResponse),
108
- );
109
- }
110
-
111
- export function deletePipelineResponseFromJSON(
112
- jsonString: string,
113
- ): SafeParseResult<DeletePipelineResponse, SDKValidationError> {
114
- return safeParse(
115
- jsonString,
116
- (x) => DeletePipelineResponse$inboundSchema.parse(JSON.parse(x)),
117
- `Failed to parse 'DeletePipelineResponse' from JSON`,
118
- );
119
- }
@@ -1,119 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- AgedCreditors,
12
- AgedCreditors$inboundSchema,
13
- AgedCreditors$Outbound,
14
- AgedCreditors$outboundSchema,
15
- } from "./agedcreditors.js";
16
-
17
- /**
18
- * Aged Creditors
19
- */
20
- export type GetAgedCreditorsResponse = {
21
- /**
22
- * HTTP Response Status Code
23
- */
24
- statusCode: number;
25
- /**
26
- * HTTP Response Status
27
- */
28
- status: string;
29
- /**
30
- * Apideck ID of service provider
31
- */
32
- service: string;
33
- /**
34
- * Unified API resource name
35
- */
36
- resource: string;
37
- /**
38
- * Operation performed
39
- */
40
- operation: string;
41
- data: AgedCreditors;
42
- };
43
-
44
- /** @internal */
45
- export const GetAgedCreditorsResponse$inboundSchema: z.ZodType<
46
- GetAgedCreditorsResponse,
47
- z.ZodTypeDef,
48
- unknown
49
- > = z.object({
50
- status_code: z.number().int(),
51
- status: z.string(),
52
- service: z.string(),
53
- resource: z.string(),
54
- operation: z.string(),
55
- data: AgedCreditors$inboundSchema,
56
- }).transform((v) => {
57
- return remap$(v, {
58
- "status_code": "statusCode",
59
- });
60
- });
61
-
62
- /** @internal */
63
- export type GetAgedCreditorsResponse$Outbound = {
64
- status_code: number;
65
- status: string;
66
- service: string;
67
- resource: string;
68
- operation: string;
69
- data: AgedCreditors$Outbound;
70
- };
71
-
72
- /** @internal */
73
- export const GetAgedCreditorsResponse$outboundSchema: z.ZodType<
74
- GetAgedCreditorsResponse$Outbound,
75
- z.ZodTypeDef,
76
- GetAgedCreditorsResponse
77
- > = z.object({
78
- statusCode: z.number().int(),
79
- status: z.string(),
80
- service: z.string(),
81
- resource: z.string(),
82
- operation: z.string(),
83
- data: AgedCreditors$outboundSchema,
84
- }).transform((v) => {
85
- return remap$(v, {
86
- statusCode: "status_code",
87
- });
88
- });
89
-
90
- /**
91
- * @internal
92
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
93
- */
94
- export namespace GetAgedCreditorsResponse$ {
95
- /** @deprecated use `GetAgedCreditorsResponse$inboundSchema` instead. */
96
- export const inboundSchema = GetAgedCreditorsResponse$inboundSchema;
97
- /** @deprecated use `GetAgedCreditorsResponse$outboundSchema` instead. */
98
- export const outboundSchema = GetAgedCreditorsResponse$outboundSchema;
99
- /** @deprecated use `GetAgedCreditorsResponse$Outbound` instead. */
100
- export type Outbound = GetAgedCreditorsResponse$Outbound;
101
- }
102
-
103
- export function getAgedCreditorsResponseToJSON(
104
- getAgedCreditorsResponse: GetAgedCreditorsResponse,
105
- ): string {
106
- return JSON.stringify(
107
- GetAgedCreditorsResponse$outboundSchema.parse(getAgedCreditorsResponse),
108
- );
109
- }
110
-
111
- export function getAgedCreditorsResponseFromJSON(
112
- jsonString: string,
113
- ): SafeParseResult<GetAgedCreditorsResponse, SDKValidationError> {
114
- return safeParse(
115
- jsonString,
116
- (x) => GetAgedCreditorsResponse$inboundSchema.parse(JSON.parse(x)),
117
- `Failed to parse 'GetAgedCreditorsResponse' from JSON`,
118
- );
119
- }
@@ -1,119 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- Pipeline,
12
- Pipeline$inboundSchema,
13
- Pipeline$Outbound,
14
- Pipeline$outboundSchema,
15
- } from "./pipeline.js";
16
-
17
- /**
18
- * Pipeline
19
- */
20
- export type GetPipelineResponse = {
21
- /**
22
- * HTTP Response Status Code
23
- */
24
- statusCode: number;
25
- /**
26
- * HTTP Response Status
27
- */
28
- status: string;
29
- /**
30
- * Apideck ID of service provider
31
- */
32
- service: string;
33
- /**
34
- * Unified API resource name
35
- */
36
- resource: string;
37
- /**
38
- * Operation performed
39
- */
40
- operation: string;
41
- data: Pipeline;
42
- };
43
-
44
- /** @internal */
45
- export const GetPipelineResponse$inboundSchema: z.ZodType<
46
- GetPipelineResponse,
47
- z.ZodTypeDef,
48
- unknown
49
- > = z.object({
50
- status_code: z.number().int(),
51
- status: z.string(),
52
- service: z.string(),
53
- resource: z.string(),
54
- operation: z.string(),
55
- data: Pipeline$inboundSchema,
56
- }).transform((v) => {
57
- return remap$(v, {
58
- "status_code": "statusCode",
59
- });
60
- });
61
-
62
- /** @internal */
63
- export type GetPipelineResponse$Outbound = {
64
- status_code: number;
65
- status: string;
66
- service: string;
67
- resource: string;
68
- operation: string;
69
- data: Pipeline$Outbound;
70
- };
71
-
72
- /** @internal */
73
- export const GetPipelineResponse$outboundSchema: z.ZodType<
74
- GetPipelineResponse$Outbound,
75
- z.ZodTypeDef,
76
- GetPipelineResponse
77
- > = z.object({
78
- statusCode: z.number().int(),
79
- status: z.string(),
80
- service: z.string(),
81
- resource: z.string(),
82
- operation: z.string(),
83
- data: Pipeline$outboundSchema,
84
- }).transform((v) => {
85
- return remap$(v, {
86
- statusCode: "status_code",
87
- });
88
- });
89
-
90
- /**
91
- * @internal
92
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
93
- */
94
- export namespace GetPipelineResponse$ {
95
- /** @deprecated use `GetPipelineResponse$inboundSchema` instead. */
96
- export const inboundSchema = GetPipelineResponse$inboundSchema;
97
- /** @deprecated use `GetPipelineResponse$outboundSchema` instead. */
98
- export const outboundSchema = GetPipelineResponse$outboundSchema;
99
- /** @deprecated use `GetPipelineResponse$Outbound` instead. */
100
- export type Outbound = GetPipelineResponse$Outbound;
101
- }
102
-
103
- export function getPipelineResponseToJSON(
104
- getPipelineResponse: GetPipelineResponse,
105
- ): string {
106
- return JSON.stringify(
107
- GetPipelineResponse$outboundSchema.parse(getPipelineResponse),
108
- );
109
- }
110
-
111
- export function getPipelineResponseFromJSON(
112
- jsonString: string,
113
- ): SafeParseResult<GetPipelineResponse, SDKValidationError> {
114
- return safeParse(
115
- jsonString,
116
- (x) => GetPipelineResponse$inboundSchema.parse(JSON.parse(x)),
117
- `Failed to parse 'GetPipelineResponse' from JSON`,
118
- );
119
- }
@@ -1,233 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- Currency,
12
- Currency$inboundSchema,
13
- Currency$outboundSchema,
14
- } from "./currency.js";
15
- import {
16
- PassThroughBody,
17
- PassThroughBody$inboundSchema,
18
- PassThroughBody$Outbound,
19
- PassThroughBody$outboundSchema,
20
- } from "./passthroughbody.js";
21
-
22
- export type PipelineStages = {
23
- /**
24
- * The name of the Pipeline Stage.
25
- */
26
- name?: string | null | undefined;
27
- /**
28
- * The value of the Pipeline Stage.
29
- */
30
- value?: string | null | undefined;
31
- /**
32
- * The expected probability of winning an Opportunity in this Pipeline Stage. Valid values are [0-100].
33
- */
34
- winProbability?: number | null | undefined;
35
- /**
36
- * The order in which the Pipeline Stage is displayed in the UI.
37
- */
38
- displayOrder?: number | null | undefined;
39
- };
40
-
41
- export type PipelineInput = {
42
- /**
43
- * The unique identifier of the Pipeline.
44
- */
45
- id?: string | undefined;
46
- /**
47
- * The name of the Pipeline.
48
- */
49
- name: string;
50
- /**
51
- * Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
52
- */
53
- currency?: Currency | null | undefined;
54
- /**
55
- * Whether the Pipeline is archived or not.
56
- */
57
- archived?: boolean | undefined;
58
- /**
59
- * Whether the Pipeline is active or not.
60
- */
61
- active?: boolean | undefined;
62
- /**
63
- * The order in which the Pipeline is displayed in the UI.
64
- */
65
- displayOrder?: number | null | undefined;
66
- /**
67
- * Whether the Pipeline has win probability enabled or not.
68
- */
69
- winProbabilityEnabled?: boolean | undefined;
70
- /**
71
- * The Pipeline Stages.
72
- */
73
- stages?: Array<PipelineStages> | undefined;
74
- /**
75
- * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
76
- */
77
- passThrough?: Array<PassThroughBody> | undefined;
78
- };
79
-
80
- /** @internal */
81
- export const PipelineStages$inboundSchema: z.ZodType<
82
- PipelineStages,
83
- z.ZodTypeDef,
84
- unknown
85
- > = z.object({
86
- name: z.nullable(z.string()).optional(),
87
- value: z.nullable(z.string()).optional(),
88
- win_probability: z.nullable(z.number().int()).optional(),
89
- display_order: z.nullable(z.number().int()).optional(),
90
- }).transform((v) => {
91
- return remap$(v, {
92
- "win_probability": "winProbability",
93
- "display_order": "displayOrder",
94
- });
95
- });
96
-
97
- /** @internal */
98
- export type PipelineStages$Outbound = {
99
- name?: string | null | undefined;
100
- value?: string | null | undefined;
101
- win_probability?: number | null | undefined;
102
- display_order?: number | null | undefined;
103
- };
104
-
105
- /** @internal */
106
- export const PipelineStages$outboundSchema: z.ZodType<
107
- PipelineStages$Outbound,
108
- z.ZodTypeDef,
109
- PipelineStages
110
- > = z.object({
111
- name: z.nullable(z.string()).optional(),
112
- value: z.nullable(z.string()).optional(),
113
- winProbability: z.nullable(z.number().int()).optional(),
114
- displayOrder: z.nullable(z.number().int()).optional(),
115
- }).transform((v) => {
116
- return remap$(v, {
117
- winProbability: "win_probability",
118
- displayOrder: "display_order",
119
- });
120
- });
121
-
122
- /**
123
- * @internal
124
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
125
- */
126
- export namespace PipelineStages$ {
127
- /** @deprecated use `PipelineStages$inboundSchema` instead. */
128
- export const inboundSchema = PipelineStages$inboundSchema;
129
- /** @deprecated use `PipelineStages$outboundSchema` instead. */
130
- export const outboundSchema = PipelineStages$outboundSchema;
131
- /** @deprecated use `PipelineStages$Outbound` instead. */
132
- export type Outbound = PipelineStages$Outbound;
133
- }
134
-
135
- export function pipelineStagesToJSON(pipelineStages: PipelineStages): string {
136
- return JSON.stringify(PipelineStages$outboundSchema.parse(pipelineStages));
137
- }
138
-
139
- export function pipelineStagesFromJSON(
140
- jsonString: string,
141
- ): SafeParseResult<PipelineStages, SDKValidationError> {
142
- return safeParse(
143
- jsonString,
144
- (x) => PipelineStages$inboundSchema.parse(JSON.parse(x)),
145
- `Failed to parse 'PipelineStages' from JSON`,
146
- );
147
- }
148
-
149
- /** @internal */
150
- export const PipelineInput$inboundSchema: z.ZodType<
151
- PipelineInput,
152
- z.ZodTypeDef,
153
- unknown
154
- > = z.object({
155
- id: z.string().optional(),
156
- name: z.string(),
157
- currency: z.nullable(Currency$inboundSchema).optional(),
158
- archived: z.boolean().optional(),
159
- active: z.boolean().optional(),
160
- display_order: z.nullable(z.number().int()).optional(),
161
- win_probability_enabled: z.boolean().optional(),
162
- stages: z.array(z.lazy(() => PipelineStages$inboundSchema)).optional(),
163
- pass_through: z.array(PassThroughBody$inboundSchema).optional(),
164
- }).transform((v) => {
165
- return remap$(v, {
166
- "display_order": "displayOrder",
167
- "win_probability_enabled": "winProbabilityEnabled",
168
- "pass_through": "passThrough",
169
- });
170
- });
171
-
172
- /** @internal */
173
- export type PipelineInput$Outbound = {
174
- id?: string | undefined;
175
- name: string;
176
- currency?: string | null | undefined;
177
- archived?: boolean | undefined;
178
- active?: boolean | undefined;
179
- display_order?: number | null | undefined;
180
- win_probability_enabled?: boolean | undefined;
181
- stages?: Array<PipelineStages$Outbound> | undefined;
182
- pass_through?: Array<PassThroughBody$Outbound> | undefined;
183
- };
184
-
185
- /** @internal */
186
- export const PipelineInput$outboundSchema: z.ZodType<
187
- PipelineInput$Outbound,
188
- z.ZodTypeDef,
189
- PipelineInput
190
- > = z.object({
191
- id: z.string().optional(),
192
- name: z.string(),
193
- currency: z.nullable(Currency$outboundSchema).optional(),
194
- archived: z.boolean().optional(),
195
- active: z.boolean().optional(),
196
- displayOrder: z.nullable(z.number().int()).optional(),
197
- winProbabilityEnabled: z.boolean().optional(),
198
- stages: z.array(z.lazy(() => PipelineStages$outboundSchema)).optional(),
199
- passThrough: z.array(PassThroughBody$outboundSchema).optional(),
200
- }).transform((v) => {
201
- return remap$(v, {
202
- displayOrder: "display_order",
203
- winProbabilityEnabled: "win_probability_enabled",
204
- passThrough: "pass_through",
205
- });
206
- });
207
-
208
- /**
209
- * @internal
210
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
211
- */
212
- export namespace PipelineInput$ {
213
- /** @deprecated use `PipelineInput$inboundSchema` instead. */
214
- export const inboundSchema = PipelineInput$inboundSchema;
215
- /** @deprecated use `PipelineInput$outboundSchema` instead. */
216
- export const outboundSchema = PipelineInput$outboundSchema;
217
- /** @deprecated use `PipelineInput$Outbound` instead. */
218
- export type Outbound = PipelineInput$Outbound;
219
- }
220
-
221
- export function pipelineInputToJSON(pipelineInput: PipelineInput): string {
222
- return JSON.stringify(PipelineInput$outboundSchema.parse(pipelineInput));
223
- }
224
-
225
- export function pipelineInputFromJSON(
226
- jsonString: string,
227
- ): SafeParseResult<PipelineInput, SDKValidationError> {
228
- return safeParse(
229
- jsonString,
230
- (x) => PipelineInput$inboundSchema.parse(JSON.parse(x)),
231
- `Failed to parse 'PipelineInput' from JSON`,
232
- );
233
- }